@meshmakers/octo-ui 3.4.280 → 3.4.310
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/fesm2022/meshmakers-octo-ui-tree-navigation-settings.mjs +420 -0
- package/fesm2022/meshmakers-octo-ui-tree-navigation-settings.mjs.map +1 -0
- package/fesm2022/meshmakers-octo-ui.mjs +1166 -198
- package/fesm2022/meshmakers-octo-ui.mjs.map +1 -1
- package/lib/runtime-browser/styles/_styles.scss +5 -23
- package/package.json +5 -1
- package/types/meshmakers-octo-ui-tree-navigation-settings.d.ts +157 -0
- package/types/meshmakers-octo-ui.d.ts +291 -7
|
@@ -3818,29 +3818,11 @@
|
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
3820
3820
|
|
|
3821
|
-
//
|
|
3822
|
-
//
|
|
3823
|
-
//
|
|
3824
|
-
//
|
|
3825
|
-
//
|
|
3826
|
-
kendo-tilelayout-item[style*="position: fixed"] {
|
|
3827
|
-
zoom: calc(1 / var(--density-zoom, 1));
|
|
3828
|
-
}
|
|
3829
|
-
|
|
3830
|
-
// Fix Kendo popup positioning when CSS zoom (density) is active on kendo-drawer-content.
|
|
3831
|
-
// Popups with appendTo:'root' are rendered as direct children of <app-root>, outside
|
|
3832
|
-
// the zoomed container. The dropdown component uses wrapper.offsetWidth (inflated by
|
|
3833
|
-
// the zoom factor) for min-width, causing popups to be too wide and mispositioned.
|
|
3834
|
-
// Using transform:scale() instead of CSS zoom because:
|
|
3835
|
-
// - CSS zoom scales BOTH content AND the element's left/top position interpretation,
|
|
3836
|
-
// causing the popup to shift up-left from its intended anchor position.
|
|
3837
|
-
// - transform:scale() only scales the visual rendering from transform-origin,
|
|
3838
|
-
// keeping left/top positioning intact (calculated correctly by Kendo from
|
|
3839
|
-
// getBoundingClientRect of the anchor element).
|
|
3840
|
-
app-root > .k-animation-container {
|
|
3841
|
-
transform: scale(var(--density-zoom, 1));
|
|
3842
|
-
transform-origin: top left;
|
|
3843
|
-
}
|
|
3821
|
+
// NOTE (AB#4258): the former CSS-`zoom`-based UI density was replaced by root
|
|
3822
|
+
// font-size (rem) scaling, so there is no ancestor `zoom` anymore. The Kendo
|
|
3823
|
+
// TileLayout drag-offset and popup-position counter-zoom hacks that used to live
|
|
3824
|
+
// here (keyed on `--density-zoom`) are therefore obsolete and were removed —
|
|
3825
|
+
// coordinates now map 1:1 without compensation.
|
|
3844
3826
|
|
|
3845
3827
|
// Widget Error State
|
|
3846
3828
|
.widget-error {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshmakers/octo-ui",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.310",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ngx-translate/core": "^17.0.0",
|
|
6
6
|
"@angular/animations": "^22.0.0",
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
"./branding-settings": {
|
|
51
51
|
"types": "./types/meshmakers-octo-ui-branding-settings.d.ts",
|
|
52
52
|
"default": "./fesm2022/meshmakers-octo-ui-branding-settings.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./tree-navigation-settings": {
|
|
55
|
+
"types": "./types/meshmakers-octo-ui-tree-navigation-settings.d.ts",
|
|
56
|
+
"default": "./fesm2022/meshmakers-octo-ui-tree-navigation-settings.mjs"
|
|
53
57
|
}
|
|
54
58
|
},
|
|
55
59
|
"type": "module"
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as _progress_kendo_svg_icons from '@progress/kendo-svg-icons';
|
|
2
|
+
import * as _angular_forms from '@angular/forms';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { OnInit } from '@angular/core';
|
|
6
|
+
import { Routes } from '@angular/router';
|
|
7
|
+
|
|
8
|
+
/** UI strings for the tree navigation settings editor. */
|
|
9
|
+
interface TreeNavigationSettingsMessages {
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
/** Shown when System.UI < 2.2.0 (the CK type is not installed on the tenant). */
|
|
13
|
+
notInstalled: string;
|
|
14
|
+
columnSourceType: string;
|
|
15
|
+
columnRole: string;
|
|
16
|
+
columnDisplayName: string;
|
|
17
|
+
columnSortIndex: string;
|
|
18
|
+
columnVisible: string;
|
|
19
|
+
columnGrouped: string;
|
|
20
|
+
columnIcon: string;
|
|
21
|
+
columnActions: string;
|
|
22
|
+
visibleAuto: string;
|
|
23
|
+
visibleShow: string;
|
|
24
|
+
visibleHide: string;
|
|
25
|
+
groupedAuto: string;
|
|
26
|
+
groupedGroup: string;
|
|
27
|
+
groupedFlatten: string;
|
|
28
|
+
sourceTypeHint: string;
|
|
29
|
+
roleHint: string;
|
|
30
|
+
addRule: string;
|
|
31
|
+
removeRule: string;
|
|
32
|
+
save: string;
|
|
33
|
+
reload: string;
|
|
34
|
+
export: string;
|
|
35
|
+
import: string;
|
|
36
|
+
empty: string;
|
|
37
|
+
saveSuccess: string;
|
|
38
|
+
saveError: string;
|
|
39
|
+
loadError: string;
|
|
40
|
+
exportNothing: string;
|
|
41
|
+
exportError: string;
|
|
42
|
+
importSuccess: string;
|
|
43
|
+
importError: string;
|
|
44
|
+
perspectivesTitle: string;
|
|
45
|
+
perspectivesDescription: string;
|
|
46
|
+
columnKey: string;
|
|
47
|
+
columnPerspectiveName: string;
|
|
48
|
+
columnRootMode: string;
|
|
49
|
+
columnRootType: string;
|
|
50
|
+
columnPrimaryRole: string;
|
|
51
|
+
columnSecondaryRoles: string;
|
|
52
|
+
rootModeSpatial: string;
|
|
53
|
+
rootModeType: string;
|
|
54
|
+
secondaryRolesHint: string;
|
|
55
|
+
addPerspective: string;
|
|
56
|
+
perspectivesEmpty: string;
|
|
57
|
+
}
|
|
58
|
+
/** English defaults; hosts may override via the `messages` input. */
|
|
59
|
+
declare const DEFAULT_TREE_NAVIGATION_SETTINGS_MESSAGES: TreeNavigationSettingsMessages;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Admin editor for the per-tenant `System.UI/TreeNavigationConfiguration`.
|
|
63
|
+
* Each row is one override rule matched by (source type, role id); `*` as the
|
|
64
|
+
* source type matches every type. Empty dropdown value = auto (default
|
|
65
|
+
* behavior). Source type and role id offer autocomplete suggestions but also
|
|
66
|
+
* accept custom values (so orphan roles remain configurable).
|
|
67
|
+
*/
|
|
68
|
+
declare class TreeNavigationSettingsComponent implements OnInit {
|
|
69
|
+
readonly messages: _angular_core.InputSignal<TreeNavigationSettingsMessages>;
|
|
70
|
+
private readonly fb;
|
|
71
|
+
private readonly config;
|
|
72
|
+
private readonly ckTypeSelector;
|
|
73
|
+
private readonly assetRepo;
|
|
74
|
+
private readonly jobs;
|
|
75
|
+
private readonly importStrategyDialog;
|
|
76
|
+
private readonly route;
|
|
77
|
+
private readonly messageService;
|
|
78
|
+
protected readonly loading: _angular_core.WritableSignal<boolean>;
|
|
79
|
+
protected readonly saving: _angular_core.WritableSignal<boolean>;
|
|
80
|
+
protected readonly typePresent: _angular_core.WritableSignal<boolean>;
|
|
81
|
+
private rtId;
|
|
82
|
+
protected readonly rules: _angular_forms.FormArray<FormGroup<any>>;
|
|
83
|
+
protected readonly perspectiveRows: _angular_forms.FormArray<FormGroup<any>>;
|
|
84
|
+
protected readonly rootModeOptions: _angular_core.Signal<{
|
|
85
|
+
text: string;
|
|
86
|
+
value: string;
|
|
87
|
+
}[]>;
|
|
88
|
+
protected readonly ckTypeSuggestions: _angular_core.WritableSignal<string[]>;
|
|
89
|
+
protected readonly roleSuggestions: _angular_core.WritableSignal<{
|
|
90
|
+
roleId: string;
|
|
91
|
+
label: string;
|
|
92
|
+
}[]>;
|
|
93
|
+
protected readonly saveIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
94
|
+
protected readonly plusIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
95
|
+
protected readonly reloadIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
96
|
+
protected readonly removeIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
97
|
+
protected readonly exportIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
98
|
+
protected readonly importIcon: _progress_kendo_svg_icons.SVGIcon;
|
|
99
|
+
protected readonly visibleOptions: _angular_core.Signal<{
|
|
100
|
+
text: string;
|
|
101
|
+
value: string;
|
|
102
|
+
}[]>;
|
|
103
|
+
protected readonly groupedOptions: _angular_core.Signal<{
|
|
104
|
+
text: string;
|
|
105
|
+
value: string;
|
|
106
|
+
}[]>;
|
|
107
|
+
ngOnInit(): Promise<void>;
|
|
108
|
+
protected reload(): Promise<void>;
|
|
109
|
+
protected addRule(): void;
|
|
110
|
+
protected removeRule(index: number): void;
|
|
111
|
+
protected addPerspective(): void;
|
|
112
|
+
protected removePerspective(index: number): void;
|
|
113
|
+
protected onSave(): Promise<void>;
|
|
114
|
+
/** Loads CK type suggestions for the source-type combobox (server filter). */
|
|
115
|
+
protected searchCkTypes(term: string): Promise<void>;
|
|
116
|
+
/** Loads role suggestions for the source type of the opened row's combobox. */
|
|
117
|
+
protected loadRoleSuggestions(row: FormGroup): Promise<void>;
|
|
118
|
+
/** Loads role suggestions for the root CK type of a perspective row. */
|
|
119
|
+
protected loadRoleSuggestionsForType(row: FormGroup): Promise<void>;
|
|
120
|
+
/**
|
|
121
|
+
* Exports the saved configuration singleton as a deep-graph runtime model ZIP,
|
|
122
|
+
* via the standard asset-repo export job (same mechanism as pools / adapters /
|
|
123
|
+
* data flows). Requires the config to have been saved first.
|
|
124
|
+
*/
|
|
125
|
+
protected export(): Promise<void>;
|
|
126
|
+
/**
|
|
127
|
+
* Imports a configuration from a deep-graph runtime model ZIP via the standard
|
|
128
|
+
* import-strategy dialog + asset-repo import job, then reloads the editor.
|
|
129
|
+
*/
|
|
130
|
+
protected onFileSelected(event: Event): Promise<void>;
|
|
131
|
+
/** Resolves the tenant id from the route hierarchy (route is /:tenantId/...). */
|
|
132
|
+
private getTenantId;
|
|
133
|
+
private collectRoles;
|
|
134
|
+
private collectPerspectives;
|
|
135
|
+
private createPerspectiveRow;
|
|
136
|
+
private toPerspectiveConfig;
|
|
137
|
+
private createRow;
|
|
138
|
+
private toRoleConfig;
|
|
139
|
+
private toVisibleValue;
|
|
140
|
+
private toGroupedValue;
|
|
141
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeNavigationSettingsComponent, never>;
|
|
142
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreeNavigationSettingsComponent, "mm-tree-navigation-settings", never, { "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Routes for the tree navigation settings UI. Mount under any path, e.g.:
|
|
147
|
+
*
|
|
148
|
+
* ```ts
|
|
149
|
+
* { path: 'tree-navigation', canActivate: [adminGuard], children: TREE_NAVIGATION_SETTINGS_ROUTES }
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* The component is lazy-loaded on first navigation (`loadComponent`).
|
|
153
|
+
*/
|
|
154
|
+
declare const TREE_NAVIGATION_SETTINGS_ROUTES: Routes;
|
|
155
|
+
|
|
156
|
+
export { DEFAULT_TREE_NAVIGATION_SETTINGS_MESSAGES, TREE_NAVIGATION_SETTINGS_ROUTES, TreeNavigationSettingsComponent };
|
|
157
|
+
export type { TreeNavigationSettingsMessages };
|
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnInit, OnDestroy, EventEmitter, OnChanges, SimpleChanges, AfterViewInit, Provider, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as _progress_kendo_svg_icons from '@progress/kendo-svg-icons';
|
|
4
4
|
import { SVGIcon } from '@progress/kendo-svg-icons';
|
|
5
|
-
import { AttributeItem, AttributeValueTypeDto as AttributeValueTypeDto$1, CkTypeSelectorItem as CkTypeSelectorItem$1, RtEntityDto, FieldFilterDto, SearchFilterDto, SortDto, CkModelDto, CkTypeDto, RtAssociationDto, FieldFilterOperatorsDto, GetCkTypesDtoGQL, RuntimeEntityItem, RuntimeEntitySelectDataSource, RuntimeEntityDialogDataSource } from '@meshmakers/octo-services';
|
|
5
|
+
import { AttributeItem, AttributeValueTypeDto as AttributeValueTypeDto$1, CkTypeSelectorItem as CkTypeSelectorItem$1, RtEntityDto, FieldFilterDto, SearchFilterDto, SortDto, CkModelDto, CkTypeDto, GraphDirectionDto, RtAssociationDto, FieldFilterOperatorsDto, GetCkTypesDtoGQL, RuntimeEntityItem, RuntimeEntitySelectDataSource, RuntimeEntityDialogDataSource } from '@meshmakers/octo-services';
|
|
6
6
|
import { GridDataResult, CellClickEvent, RowArgs, PageChangeEvent, SelectionEvent } from '@progress/kendo-angular-grid';
|
|
7
7
|
import { TreeItemDataTyped, TreeItemData, CommandItemExecuteEventArgs, CommandItem } from '@meshmakers/shared-services';
|
|
8
8
|
import { ControlValueAccessor, Validator, FormControl, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
@@ -598,13 +598,183 @@ declare class EntityIdInfoComponent {
|
|
|
598
598
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityIdInfoComponent, "mm-entity-id-info", never, { "rtId": { "alias": "rtId"; "required": true; }; "rtCkTypeId": { "alias": "rtCkTypeId"; "required": true; }; "ckTypeId": { "alias": "ckTypeId"; "required": false; }; }, {}, never, never, true, never>;
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
+
/** One resolved per-role override (presentation only). */
|
|
602
|
+
interface TreeNavigationRoleOverride {
|
|
603
|
+
visible?: boolean;
|
|
604
|
+
displayName?: string;
|
|
605
|
+
sortIndex?: number;
|
|
606
|
+
grouped?: boolean;
|
|
607
|
+
icon?: string;
|
|
608
|
+
}
|
|
609
|
+
/** One editable override rule (a row in the settings editor). */
|
|
610
|
+
interface TreeNavigationRoleConfig {
|
|
611
|
+
/** Source CK type id this rule applies to, or `*` for every type. */
|
|
612
|
+
sourceCkTypeId: string;
|
|
613
|
+
/** Runtime association role id (e.g. `EnergyIQ/SpaceSensors`). */
|
|
614
|
+
roleId: string;
|
|
615
|
+
visible?: boolean;
|
|
616
|
+
displayName?: string;
|
|
617
|
+
sortIndex?: number;
|
|
618
|
+
grouped?: boolean;
|
|
619
|
+
icon?: string;
|
|
620
|
+
}
|
|
621
|
+
/** How a perspective determines its root nodes. */
|
|
622
|
+
type PerspectiveRootMode = 'Spatial' | 'Type';
|
|
623
|
+
/** Direction a perspective's primary role is navigated from the root node. */
|
|
624
|
+
type PerspectiveDirection = 'Inbound' | 'Outbound';
|
|
625
|
+
/**
|
|
626
|
+
* One switchable tree perspective (AB#4263). A perspective defines its own root
|
|
627
|
+
* (the spatial ParentChild tree, or all instances of a CK type) and an optional
|
|
628
|
+
* primary/secondary navigation whitelist applied at the root level. The built-in
|
|
629
|
+
* `Spatial` perspective is synthesized by the data source and is not stored.
|
|
630
|
+
*/
|
|
631
|
+
interface PerspectiveDefinition {
|
|
632
|
+
/** Stable key, unique within the tenant (e.g. `Spatial`, `Systems`). */
|
|
633
|
+
key: string;
|
|
634
|
+
/** Label shown in the perspective switcher. */
|
|
635
|
+
displayName: string;
|
|
636
|
+
/** Switcher ordering hint (ascending). */
|
|
637
|
+
sortIndex?: number;
|
|
638
|
+
/** Icon name for the switcher entry (resolved by the frontend). */
|
|
639
|
+
icon?: string;
|
|
640
|
+
/** `Spatial` = all Basic/Tree entities; `Type` = all instances of rootCkTypeId. */
|
|
641
|
+
rootMode: PerspectiveRootMode;
|
|
642
|
+
/** Runtime CK type id whose instances form the roots when rootMode = `Type`. */
|
|
643
|
+
rootCkTypeId?: string;
|
|
644
|
+
/** Association role flattened directly under each root node (like ParentChild). */
|
|
645
|
+
primaryRoleId?: string;
|
|
646
|
+
/** Direction the primary role is navigated (default: Inbound / containment side). */
|
|
647
|
+
primaryDirection?: PerspectiveDirection;
|
|
648
|
+
/** Additional roles shown as group nodes directly under each root node. */
|
|
649
|
+
secondaryRoleIds?: string[];
|
|
650
|
+
}
|
|
651
|
+
/** The full configuration as loaded for editing. */
|
|
652
|
+
interface TreeNavigationConfig {
|
|
653
|
+
/** rtId of the singleton, or null when it does not exist yet. */
|
|
654
|
+
rtId: string | null;
|
|
655
|
+
/** True when the CK type is installed on the tenant (System.UI >= 2.2.0). */
|
|
656
|
+
typePresent: boolean;
|
|
657
|
+
roles: TreeNavigationRoleConfig[];
|
|
658
|
+
/** Configured extra perspectives (excludes the built-in spatial one). */
|
|
659
|
+
perspectives: PerspectiveDefinition[];
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Loads the optional per-tenant `System.UI/TreeNavigationConfiguration` singleton
|
|
663
|
+
* and resolves per-association overrides for the entity trees.
|
|
664
|
+
*
|
|
665
|
+
* Design notes:
|
|
666
|
+
* - The config entity is OPTIONAL. When the CK type is not installed on the
|
|
667
|
+
* tenant (System.UI < 2.2.0) or no instance exists, every lookup returns
|
|
668
|
+
* undefined and the trees fall back to pure auto-discovery.
|
|
669
|
+
* - The singleton field (`systemUITreeNavigationConfiguration`) only exists in
|
|
670
|
+
* the tenant schema when the CK type is installed, so querying it blindly
|
|
671
|
+
* would raise a GraphQL validation error (and a user-facing toast). We first
|
|
672
|
+
* probe the CK schema with the always-valid `constructionKit.types` query and
|
|
673
|
+
* only run the singleton query when the type is present.
|
|
674
|
+
* - Uses inline `gql` (not codegen) so the feature is decoupled from a schema
|
|
675
|
+
* re-introspection that includes the new CK type.
|
|
676
|
+
*/
|
|
677
|
+
declare class TreeNavigationConfigService {
|
|
678
|
+
private readonly apollo;
|
|
679
|
+
/** key `${sourceCkTypeId}::${roleId}` -> override; cached for the session. */
|
|
680
|
+
private overridesPromise?;
|
|
681
|
+
/** Configured extra perspectives; cached for the session. */
|
|
682
|
+
private perspectivesPromise?;
|
|
683
|
+
/**
|
|
684
|
+
* Resolves the override for one (source type, role) pair, preferring an exact
|
|
685
|
+
* source-type match over a wildcard (`*`) rule. Returns undefined when nothing
|
|
686
|
+
* is configured.
|
|
687
|
+
*/
|
|
688
|
+
resolve(sourceCkTypeId: string, roleId: string): Promise<TreeNavigationRoleOverride | undefined>;
|
|
689
|
+
/** Forces a reload on next access (e.g. after a tenant switch). */
|
|
690
|
+
reset(): void;
|
|
691
|
+
/**
|
|
692
|
+
* Returns the configured extra tree perspectives (AB#4263), sorted by
|
|
693
|
+
* sortIndex then displayName. Returns [] when the CK type is absent
|
|
694
|
+
* (System.UI < 2.3.0) or none are configured. The built-in spatial
|
|
695
|
+
* perspective is synthesized by the data source and is NOT included here.
|
|
696
|
+
*/
|
|
697
|
+
perspectives(): Promise<PerspectiveDefinition[]>;
|
|
698
|
+
private loadPerspectives;
|
|
699
|
+
/** Maps a raw perspective record to a definition, dropping invalid rows. */
|
|
700
|
+
private toPerspectiveDefinition;
|
|
701
|
+
/**
|
|
702
|
+
* Returns the inbound association roles declared on a CK type, for the role
|
|
703
|
+
* autocomplete in the settings editor. Returns `{ roleId, label }` where the
|
|
704
|
+
* label is the friendly inbound name plus the role id. Empty for `*` or an
|
|
705
|
+
* unknown type (orphan roles can still be typed as custom values).
|
|
706
|
+
*/
|
|
707
|
+
getRoleSuggestions(ckTypeId: string): Promise<{
|
|
708
|
+
roleId: string;
|
|
709
|
+
label: string;
|
|
710
|
+
}[]>;
|
|
711
|
+
private getOverrides;
|
|
712
|
+
private load;
|
|
713
|
+
/**
|
|
714
|
+
* Loads the full configuration for editing (settings page). Returns whether
|
|
715
|
+
* the CK type is installed (so the page can show a clear "upgrade System.UI"
|
|
716
|
+
* hint), the singleton rtId (null when not created yet), and the role rules.
|
|
717
|
+
*/
|
|
718
|
+
loadConfig(): Promise<TreeNavigationConfig>;
|
|
719
|
+
/**
|
|
720
|
+
* Creates or updates the singleton with the given rules and perspectives, then
|
|
721
|
+
* invalidates the resolve/perspective cache so the trees pick up the change on
|
|
722
|
+
* the next expand. Returns the singleton rtId.
|
|
723
|
+
*/
|
|
724
|
+
saveConfig(rtId: string | null, roles: TreeNavigationRoleConfig[], perspectives?: PerspectiveDefinition[]): Promise<string>;
|
|
725
|
+
/** Drops undefined fields so the record-array input only carries set values. */
|
|
726
|
+
private toRoleInput;
|
|
727
|
+
/** Drops undefined/empty fields so the perspective input only carries set values. */
|
|
728
|
+
private toPerspectiveInput;
|
|
729
|
+
/**
|
|
730
|
+
* Probes whether the `System.UI/TreeNavigationConfiguration` CK type is
|
|
731
|
+
* installed on the tenant (System.UI >= 2.2.0). Uses the always-valid
|
|
732
|
+
* `constructionKit.types` query so it never raises a schema validation error.
|
|
733
|
+
*/
|
|
734
|
+
private probeTypePresent;
|
|
735
|
+
/**
|
|
736
|
+
* Probes the CK schema and (when present) loads the singleton's raw roles.
|
|
737
|
+
* Perspectives are loaded separately (see fetchPerspectivesRaw) so a System.UI
|
|
738
|
+
* 2.2.0 tenant (type present but no `perspectives` field yet) keeps its roles.
|
|
739
|
+
*/
|
|
740
|
+
private fetchSingleton;
|
|
741
|
+
/**
|
|
742
|
+
* Loads the singleton's raw perspectives, tolerating the System.UI 2.2.0 case
|
|
743
|
+
* where the `perspectives` field does not yet exist (GraphQL validation error).
|
|
744
|
+
* Any failure yields an empty list so roles loading is never affected.
|
|
745
|
+
*/
|
|
746
|
+
private fetchPerspectivesRaw;
|
|
747
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeNavigationConfigService, never>;
|
|
748
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TreeNavigationConfigService>;
|
|
749
|
+
}
|
|
750
|
+
declare const TREE_NAVIGATION_CONFIG_CONSTANTS: {
|
|
751
|
+
CONFIG_CK_TYPE_ID: string;
|
|
752
|
+
CONFIG_WELL_KNOWN_NAME: string;
|
|
753
|
+
WILDCARD: string;
|
|
754
|
+
};
|
|
755
|
+
|
|
601
756
|
type BrowserItem$3 = RtEntityDto | CkModelDto | CkTypeDto | {
|
|
602
757
|
isCkModelsRoot?: boolean;
|
|
603
758
|
ckModelId?: string;
|
|
604
|
-
};
|
|
759
|
+
} | AssociationGroupNode;
|
|
760
|
+
/**
|
|
761
|
+
* Synthetic tree node that groups all entities reachable from a parent entity
|
|
762
|
+
* through a single association role (e.g. "ContainedSensors"). Its children are
|
|
763
|
+
* loaded lazily on expand. It is intentionally not a runtime entity, so the
|
|
764
|
+
* toolbar create/edit/delete actions and the entity picker stay disabled for it.
|
|
765
|
+
*/
|
|
766
|
+
interface AssociationGroupNode {
|
|
767
|
+
isAssociationGroup: true;
|
|
768
|
+
parentRtId: string;
|
|
769
|
+
parentCkTypeId: string;
|
|
770
|
+
roleId: string;
|
|
771
|
+
targetCkTypeId: string;
|
|
772
|
+
direction: GraphDirectionDto;
|
|
773
|
+
}
|
|
605
774
|
declare class RuntimeBrowserDataSource extends OctoGraphQlHierarchyDataSource<BrowserItem$3> {
|
|
606
775
|
private readonly getTreesDtoGQL;
|
|
607
|
-
private readonly
|
|
776
|
+
private readonly getCkTypeAssociationRolesDtoGQL;
|
|
777
|
+
private readonly getTreeAssociationTargetsDtoGQL;
|
|
608
778
|
private readonly getCkModelsGQL;
|
|
609
779
|
private readonly getCkTypesGQL;
|
|
610
780
|
private readonly getCkModelByIdDtoGQL;
|
|
@@ -613,13 +783,112 @@ declare class RuntimeBrowserDataSource extends OctoGraphQlHierarchyDataSource<Br
|
|
|
613
783
|
private readonly updateRuntimeEntitiesDtoGQL;
|
|
614
784
|
private readonly updateTreeNodesDtoGQL;
|
|
615
785
|
private readonly typeHelperService;
|
|
786
|
+
private readonly treeNavConfig;
|
|
787
|
+
private readonly apollo;
|
|
788
|
+
/** Key of the currently active tree perspective (AB#4263). */
|
|
789
|
+
private activePerspectiveKey;
|
|
790
|
+
/**
|
|
791
|
+
* The perspective resolved during the last `fetchRootNodes()`. Used by
|
|
792
|
+
* `fetchChildren()` to apply the root-level whitelist for `Type` perspectives.
|
|
793
|
+
*/
|
|
794
|
+
private activePerspective;
|
|
795
|
+
/**
|
|
796
|
+
* rtIds of the current perspective's root nodes. The primary/secondary role
|
|
797
|
+
* whitelist is applied ONLY to the direct children of these roots — deeper
|
|
798
|
+
* nodes keep full auto-discovery (whitelist-at-root-only).
|
|
799
|
+
*/
|
|
800
|
+
private readonly perspectiveRootRtIds;
|
|
801
|
+
/**
|
|
802
|
+
* Selects the active perspective by key. The host is responsible for reloading
|
|
803
|
+
* the tree afterwards (e.g. `treeDetail.refreshTree()`), which re-runs
|
|
804
|
+
* `fetchRootNodes()` and re-resolves the perspective.
|
|
805
|
+
*/
|
|
806
|
+
setActivePerspective(key: string): void;
|
|
807
|
+
/** The currently selected perspective key. */
|
|
808
|
+
getActivePerspectiveKey(): string;
|
|
809
|
+
/**
|
|
810
|
+
* Returns all selectable perspectives: the built-in spatial one first, then the
|
|
811
|
+
* per-tenant configured perspectives, de-duplicated by key (a configured
|
|
812
|
+
* `Spatial` overrides the built-in). With no configuration this is a single
|
|
813
|
+
* entry, so the host can hide the switcher.
|
|
814
|
+
*/
|
|
815
|
+
getPerspectives(): Promise<PerspectiveDefinition[]>;
|
|
816
|
+
/**
|
|
817
|
+
* The role-id whitelist of the active perspective (primary + secondary), or
|
|
818
|
+
* null when the perspective is not a `Type` perspective or declares no roles.
|
|
819
|
+
*/
|
|
820
|
+
private activePerspectiveWhitelist;
|
|
821
|
+
/**
|
|
822
|
+
* The set of role ids the given entity's direct children are restricted to,
|
|
823
|
+
* or null for full auto-discovery. Non-null only when the entity is a root of
|
|
824
|
+
* the active `Type` perspective (whitelist-at-root-only).
|
|
825
|
+
*/
|
|
826
|
+
private rootWhitelistFor;
|
|
827
|
+
/**
|
|
828
|
+
* Resolves the active perspective from the configured list, falling back to a
|
|
829
|
+
* configured/built-in spatial one when the selected key is unknown.
|
|
830
|
+
*/
|
|
831
|
+
private resolveActivePerspective;
|
|
616
832
|
private isCkModelsRoot;
|
|
617
833
|
private isCkModel;
|
|
618
834
|
private isCkType;
|
|
619
|
-
private
|
|
835
|
+
private isAssociationGroup;
|
|
836
|
+
/**
|
|
837
|
+
* Cache of inbound association roles per CK type id. Discovered lazily from
|
|
838
|
+
* the CK schema and reused across tree expansions (and to decide whether a
|
|
839
|
+
* child entity node is expandable). Lives on the instance because the tree is
|
|
840
|
+
* created fresh per browser/picker mount.
|
|
841
|
+
*/
|
|
842
|
+
private readonly inboundRolesCache;
|
|
620
843
|
private static readonly ckTypeMetaData;
|
|
621
844
|
fetchChildren(item: TreeItemDataTyped<BrowserItem$3>): Promise<TreeItemDataTyped<BrowserItem$3>[]>;
|
|
845
|
+
/**
|
|
846
|
+
* Discovers the navigable inbound role groups of an entity from its ACTUAL
|
|
847
|
+
* inbound edges (associations.definitions), grouped by (roleId, origin CK
|
|
848
|
+
* type) with exact counts. Labels are enriched from the CK type schema
|
|
849
|
+
* (friendly inbound navigation property name) when the role is declared on the
|
|
850
|
+
* type, and otherwise derived from the role id (so orphan roles still get a
|
|
851
|
+
* readable label).
|
|
852
|
+
*/
|
|
853
|
+
private discoverEntityInboundRoleGroups;
|
|
854
|
+
/** Readable fallback label for a role id without a schema navigation name. */
|
|
855
|
+
private deriveRoleLabel;
|
|
856
|
+
/**
|
|
857
|
+
* Orders group nodes by configured sortIndex (ascending, unconfigured last),
|
|
858
|
+
* then by navigation property name for a stable, readable order.
|
|
859
|
+
*/
|
|
860
|
+
private compareGroupOrder;
|
|
861
|
+
/** Resolves a configured group icon name to an SVG icon (folder by default). */
|
|
862
|
+
private resolveGroupIcon;
|
|
863
|
+
/**
|
|
864
|
+
* Returns the inbound association roles of a CK type, discovered from the CK
|
|
865
|
+
* schema and cached per type id for the lifetime of this data source.
|
|
866
|
+
*/
|
|
867
|
+
private getInboundRoles;
|
|
868
|
+
/** Loads the target entities reachable from an entity through one role. */
|
|
869
|
+
private fetchAssociationTargets;
|
|
870
|
+
/**
|
|
871
|
+
* Builds tree items for runtime entities, de-duplicating by rtId and marking
|
|
872
|
+
* an entity expandable when its CK type defines at least one inbound
|
|
873
|
+
* association role.
|
|
874
|
+
*/
|
|
875
|
+
private buildEntityTreeItems;
|
|
876
|
+
/** Stable tree-node id for an association group node. */
|
|
877
|
+
private buildGroupNodeId;
|
|
878
|
+
/** Resolves the display label of an entity from its name/displayName attributes. */
|
|
879
|
+
private extractDisplayName;
|
|
880
|
+
/** Resolves the tooltip of an entity from its description attribute. */
|
|
881
|
+
private extractTooltip;
|
|
882
|
+
/** Resolves the icon for a CK type, falling back to a generic entity icon. */
|
|
883
|
+
private resolveIcon;
|
|
622
884
|
fetchRootNodes(): Promise<TreeItemDataTyped<BrowserItem$3>[]>;
|
|
885
|
+
/**
|
|
886
|
+
* Loads all runtime instances of a CK type as the roots of a `Type`
|
|
887
|
+
* perspective (AB#4263), registering their rtIds so the whitelist applies to
|
|
888
|
+
* their direct children only. Expandability is schema-based (does the type
|
|
889
|
+
* declare an inbound role, restricted to the whitelist when set).
|
|
890
|
+
*/
|
|
891
|
+
private fetchTypePerspectiveRoots;
|
|
623
892
|
/**
|
|
624
893
|
* Gets ParentChild association of given Runtime Entity.
|
|
625
894
|
*
|
|
@@ -698,15 +967,22 @@ interface EntitySelectorDialogResult {
|
|
|
698
967
|
name?: string;
|
|
699
968
|
}
|
|
700
969
|
|
|
701
|
-
declare class EntitySelectorDialogComponent {
|
|
970
|
+
declare class EntitySelectorDialogComponent implements OnInit {
|
|
702
971
|
private readonly windowRef;
|
|
703
972
|
readonly treeDataSource: RuntimeBrowserDataSource;
|
|
973
|
+
private readonly tree?;
|
|
974
|
+
/** Selectable tree perspectives (AB#4263); switcher hides itself when <= 1. */
|
|
975
|
+
protected readonly perspectives: _angular_core.WritableSignal<PerspectiveDefinition[]>;
|
|
976
|
+
protected readonly activePerspectiveKey: _angular_core.WritableSignal<string>;
|
|
704
977
|
data: EntitySelectorDialogData;
|
|
705
978
|
selectedEntity: {
|
|
706
979
|
rtId: string;
|
|
707
980
|
ckTypeId: string;
|
|
708
981
|
name?: string;
|
|
709
982
|
} | null;
|
|
983
|
+
ngOnInit(): Promise<void>;
|
|
984
|
+
/** Switches the active perspective and reloads the picker tree. */
|
|
985
|
+
onPerspectiveChange(key: string): Promise<void>;
|
|
710
986
|
onNodeSelected(node: TreeItemData): void;
|
|
711
987
|
onConfirm(): void;
|
|
712
988
|
onCancel(): void;
|
|
@@ -1561,6 +1837,8 @@ interface RuntimeBrowserMessages {
|
|
|
1561
1837
|
mappingSelect?: string;
|
|
1562
1838
|
/** Empty-state hint shown when no mappings exist. Default: "No data point mappings configured yet." */
|
|
1563
1839
|
mappingNoneConfigured?: string;
|
|
1840
|
+
/** Label before the tree perspective switcher (AB#4263). Default: "Perspective" */
|
|
1841
|
+
perspective?: string;
|
|
1564
1842
|
}
|
|
1565
1843
|
/**
|
|
1566
1844
|
* Default English messages for the RuntimeBrowser components.
|
|
@@ -2168,6 +2446,12 @@ declare class RuntimeBrowserComponent implements AfterViewInit {
|
|
|
2168
2446
|
*/
|
|
2169
2447
|
expressionValidator: _angular_core.InputSignal<ExpressionValidatorFn | undefined>;
|
|
2170
2448
|
protected readonly resolvedMessages: _angular_core.Signal<RuntimeBrowserMessages>;
|
|
2449
|
+
/** Selectable tree perspectives (AB#4263); switcher hides itself when <= 1. */
|
|
2450
|
+
protected readonly perspectives: _angular_core.WritableSignal<PerspectiveDefinition[]>;
|
|
2451
|
+
protected readonly activePerspectiveKey: _angular_core.WritableSignal<string>;
|
|
2452
|
+
/** Switches the active perspective and reloads the tree from its new roots. */
|
|
2453
|
+
protected onPerspectiveChange(key: string): Promise<void>;
|
|
2454
|
+
private loadPerspectives;
|
|
2171
2455
|
treeDetail: BaseTreeDetailComponent<BrowserItem$1>;
|
|
2172
2456
|
detailsPanel: RuntimeBrowserDetailsComponent;
|
|
2173
2457
|
protected get leftToolbarActions(): CommandItem[];
|
|
@@ -3158,5 +3442,5 @@ declare class TenantSwitcherComponent {
|
|
|
3158
3442
|
*/
|
|
3159
3443
|
declare function provideOctoUi(): EnvironmentProviders;
|
|
3160
3444
|
|
|
3161
|
-
export { AssociationValidationService, AttributeSelectorDialogComponent, AttributeSelectorDialogService, AttributeSortSelectorDialogComponent, AttributeSortSelectorDialogService, AttributeValueTypeDto, CkTypeSelectorDialogComponent, CkTypeSelectorDialogService, CkTypeSelectorInputComponent, DEFAULT_CK_TYPE_SELECTOR_DIALOG_MESSAGES, DEFAULT_CK_TYPE_SELECTOR_INPUT_MESSAGES, DEFAULT_DATA_POINT, DEFAULT_MAPPING_COVERAGE_TREE_CONFIG, DEFAULT_PROPERTY_GRID_MESSAGES, DEFAULT_RUNTIME_BROWSER_MESSAGES, DataMappingOverviewComponent, DataPointPickerComponent, DataPointResolverService, DefaultPropertyCategory, EntityDetailComponent, EntityIdInfoComponent, EntitySelectorDialogComponent, EntitySelectorDialogService, FieldFilterEditorComponent, MappingCoverageTreeComponent, MappingCoverageTreeDataSource, MappingEditDialogComponent, MappingEditDialogService, OctoGraphQlDataSource, OctoGraphQlHierarchyDataSource, OctoLoaderComponent, PropertyConverterService, PropertyDisplayMode, PropertyGridComponent, PropertyValueDisplayComponent, RUNTIME_BROWSER_MESSAGES, RecordDetailDialogComponent, RtEntityIdHelper, RuntimeBrowserComponent, RuntimeBrowserOutletComponent, RuntimeBrowserPageComponent, RuntimeBrowserStateService, RuntimeEntityVariableDialogComponent, RuntimeEntityVariableDialogService, TenantSwitcherComponent, account_tree, add, analytics, app_registration, article, botService, category, chat, checklist, code, component_exchange, computer, createRuntimeBrowserRoutes, customer, dashboard, event_list, extractDataPointNames, graphic_eq, group, identityService, insert_link, manage_accounts, more_time, notifications, page_info, pages, person_search, playlist_add_check, pool, power, provideOctoUi, publicIcon, query_builder, schedule_send, settings, sort, storage, swagger, swagger_asset, swagger_bot, swagger_communication, swagger_identity, team_dashboard, tenancy, text_snippet, travel_explore, user_diagnostics, webhook, work };
|
|
3162
|
-
export type { AttributeItemLike, AttributeSelectorDialogData, AttributeSelectorDialogResult, AttributeSelectorResult, AttributeSortItem, AttributeSortSelectorDialogData, AttributeSortSelectorDialogResult, AttributeSortSelectorResult, BinaryDownloadEvent, BrowserItem, BrowserState, CkAssociationRole, CkTypeSelectorDialogData, CkTypeSelectorDialogMessages, CkTypeSelectorDialogResult, CkTypeSelectorInputMessages, CkTypeSelectorResult, CoverageEntityRef, CoverageMappingItem, CoverageNodePayload, CoverageTreeIcons, CoverageTreeItem, DataPointMappingItem, DataPointMappingOverviewItem, EntitySelectorDialogData, EntitySelectorDialogResult, EntitySelectorResult, ExpressionValidationResult, ExpressionValidatorFn, FieldFilterItem, FilterVariable, MappingCoverageTreeConfig, MappingEditDialogData, MappingEditDialogResult, MappingEditValue, MappingOverviewSummary, MoveValidationResult, PropertyChangeEvent, PropertyGridConfig, PropertyGridItem, PropertyGridMessages, RtEntityId, RuntimeBrowserMessages, RuntimeBrowserRouteOptions, RuntimeEntityVariableDialogData, RuntimeEntityVariableDialogResult, RuntimeEntityVariableMapping, RuntimeEntityVariableResult, SortOption, ValidationMessage };
|
|
3445
|
+
export { AssociationValidationService, AttributeSelectorDialogComponent, AttributeSelectorDialogService, AttributeSortSelectorDialogComponent, AttributeSortSelectorDialogService, AttributeValueTypeDto, CkTypeSelectorDialogComponent, CkTypeSelectorDialogService, CkTypeSelectorInputComponent, DEFAULT_CK_TYPE_SELECTOR_DIALOG_MESSAGES, DEFAULT_CK_TYPE_SELECTOR_INPUT_MESSAGES, DEFAULT_DATA_POINT, DEFAULT_MAPPING_COVERAGE_TREE_CONFIG, DEFAULT_PROPERTY_GRID_MESSAGES, DEFAULT_RUNTIME_BROWSER_MESSAGES, DataMappingOverviewComponent, DataPointPickerComponent, DataPointResolverService, DefaultPropertyCategory, EntityDetailComponent, EntityIdInfoComponent, EntitySelectorDialogComponent, EntitySelectorDialogService, FieldFilterEditorComponent, MappingCoverageTreeComponent, MappingCoverageTreeDataSource, MappingEditDialogComponent, MappingEditDialogService, OctoGraphQlDataSource, OctoGraphQlHierarchyDataSource, OctoLoaderComponent, PropertyConverterService, PropertyDisplayMode, PropertyGridComponent, PropertyValueDisplayComponent, RUNTIME_BROWSER_MESSAGES, RecordDetailDialogComponent, RtEntityIdHelper, RuntimeBrowserComponent, RuntimeBrowserOutletComponent, RuntimeBrowserPageComponent, RuntimeBrowserStateService, RuntimeEntityVariableDialogComponent, RuntimeEntityVariableDialogService, TREE_NAVIGATION_CONFIG_CONSTANTS, TenantSwitcherComponent, TreeNavigationConfigService, account_tree, add, analytics, app_registration, article, botService, category, chat, checklist, code, component_exchange, computer, createRuntimeBrowserRoutes, customer, dashboard, event_list, extractDataPointNames, graphic_eq, group, identityService, insert_link, manage_accounts, more_time, notifications, page_info, pages, person_search, playlist_add_check, pool, power, provideOctoUi, publicIcon, query_builder, schedule_send, settings, sort, storage, swagger, swagger_asset, swagger_bot, swagger_communication, swagger_identity, team_dashboard, tenancy, text_snippet, travel_explore, user_diagnostics, webhook, work };
|
|
3446
|
+
export type { AttributeItemLike, AttributeSelectorDialogData, AttributeSelectorDialogResult, AttributeSelectorResult, AttributeSortItem, AttributeSortSelectorDialogData, AttributeSortSelectorDialogResult, AttributeSortSelectorResult, BinaryDownloadEvent, BrowserItem, BrowserState, CkAssociationRole, CkTypeSelectorDialogData, CkTypeSelectorDialogMessages, CkTypeSelectorDialogResult, CkTypeSelectorInputMessages, CkTypeSelectorResult, CoverageEntityRef, CoverageMappingItem, CoverageNodePayload, CoverageTreeIcons, CoverageTreeItem, DataPointMappingItem, DataPointMappingOverviewItem, EntitySelectorDialogData, EntitySelectorDialogResult, EntitySelectorResult, ExpressionValidationResult, ExpressionValidatorFn, FieldFilterItem, FilterVariable, MappingCoverageTreeConfig, MappingEditDialogData, MappingEditDialogResult, MappingEditValue, MappingOverviewSummary, MoveValidationResult, PerspectiveDefinition, PerspectiveDirection, PerspectiveRootMode, PropertyChangeEvent, PropertyGridConfig, PropertyGridItem, PropertyGridMessages, RtEntityId, RuntimeBrowserMessages, RuntimeBrowserRouteOptions, RuntimeEntityVariableDialogData, RuntimeEntityVariableDialogResult, RuntimeEntityVariableMapping, RuntimeEntityVariableResult, SortOption, TreeNavigationConfig, TreeNavigationRoleConfig, TreeNavigationRoleOverride, ValidationMessage };
|