@myrmidon/cadmus-graph-ui-ex 14.0.0 → 15.0.1
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.
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, model, effect,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
2
|
+
import { EventEmitter, Output, Input, ViewChild, Component, input, model, effect, Pipe, output } from '@angular/core';
|
|
3
|
+
import { Subject, forkJoin, from, BehaviorSubject, Observable, take as take$1 } from 'rxjs';
|
|
4
|
+
import { takeUntil, take } from 'rxjs/operators';
|
|
5
|
+
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
6
|
+
import * as i1 from '@angular/material/button';
|
|
7
|
+
import { MatButtonModule, MatIconButton } from '@angular/material/button';
|
|
8
|
+
import * as i2 from '@angular/material/icon';
|
|
9
|
+
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
10
|
+
import * as i3 from '@angular/material/tooltip';
|
|
11
|
+
import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
|
|
12
|
+
import * as ForceGraph from 'force-graph';
|
|
13
|
+
import * as ForceGraph3D from '3d-force-graph';
|
|
14
|
+
import * as d3 from 'd3-force';
|
|
15
|
+
import * as THREE from 'three';
|
|
8
16
|
import { MatProgressBar } from '@angular/material/progress-bar';
|
|
9
17
|
import { MatTabGroup, MatTab, MatTabLabel } from '@angular/material/tabs';
|
|
10
|
-
import * as
|
|
11
|
-
import { GraphModule } from '@swimlane/ngx-graph';
|
|
12
|
-
import * as i1 from '@angular/forms';
|
|
18
|
+
import * as i1$1 from '@angular/forms';
|
|
13
19
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
14
20
|
import { MatPaginator } from '@angular/material/paginator';
|
|
15
21
|
import { MatCheckbox } from '@angular/material/checkbox';
|
|
@@ -17,13 +23,686 @@ import { MatList, MatListItem } from '@angular/material/list';
|
|
|
17
23
|
import { MatFormField } from '@angular/material/form-field';
|
|
18
24
|
import { MatInput } from '@angular/material/input';
|
|
19
25
|
import { RefLookupComponent } from '@myrmidon/cadmus-refs-lookup';
|
|
20
|
-
import * as i2 from '@myrmidon/cadmus-graph-ui';
|
|
21
|
-
import * as i3 from '@myrmidon/cadmus-api';
|
|
22
|
-
import { take } from 'rxjs/operators';
|
|
26
|
+
import * as i2$1 from '@myrmidon/cadmus-graph-ui';
|
|
27
|
+
import * as i3$1 from '@myrmidon/cadmus-api';
|
|
23
28
|
import { MatSelect } from '@angular/material/select';
|
|
24
29
|
import { MatOption } from '@angular/material/core';
|
|
25
30
|
import { MatChipListbox, MatChipOption, MatChipRemove } from '@angular/material/chips';
|
|
26
|
-
import * as
|
|
31
|
+
import * as i1$2 from '@myrmidon/ngx-mat-tools';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Force graph renderer component that can display graphs in 2D or 3D
|
|
35
|
+
* using force-graph and 3d-force-graph libraries.
|
|
36
|
+
*/
|
|
37
|
+
class ForceGraphRendererComponent {
|
|
38
|
+
graphContainer;
|
|
39
|
+
nodes = [];
|
|
40
|
+
edges = [];
|
|
41
|
+
mode = '2d';
|
|
42
|
+
update$;
|
|
43
|
+
center$;
|
|
44
|
+
zoomToFit$;
|
|
45
|
+
nodeSelect = new EventEmitter();
|
|
46
|
+
nodeDoubleClick = new EventEmitter();
|
|
47
|
+
modeChange = new EventEmitter();
|
|
48
|
+
graph = null;
|
|
49
|
+
currentMode = '2d';
|
|
50
|
+
clickTimeout = null;
|
|
51
|
+
resizeObserver;
|
|
52
|
+
destroy$ = new Subject();
|
|
53
|
+
ngOnInit() {
|
|
54
|
+
this.currentMode = this.mode;
|
|
55
|
+
}
|
|
56
|
+
ngAfterViewInit() {
|
|
57
|
+
this.initGraph();
|
|
58
|
+
this.setupSubscriptions();
|
|
59
|
+
}
|
|
60
|
+
ngOnChanges(changes) {
|
|
61
|
+
if (changes['mode'] && !changes['mode'].firstChange) {
|
|
62
|
+
this.switchMode(this.mode);
|
|
63
|
+
}
|
|
64
|
+
if ((changes['nodes'] || changes['edges']) && this.graph) {
|
|
65
|
+
this.updateGraphData();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
ngOnDestroy() {
|
|
69
|
+
this.destroy$.next();
|
|
70
|
+
this.destroy$.complete();
|
|
71
|
+
if (this.clickTimeout) {
|
|
72
|
+
clearTimeout(this.clickTimeout);
|
|
73
|
+
}
|
|
74
|
+
if (this.resizeObserver) {
|
|
75
|
+
this.resizeObserver.disconnect();
|
|
76
|
+
}
|
|
77
|
+
if (this.graph) {
|
|
78
|
+
// Properly destroy the graph instance
|
|
79
|
+
if (typeof this.graph._destructor === 'function') {
|
|
80
|
+
this.graph._destructor();
|
|
81
|
+
}
|
|
82
|
+
this.graph = null;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
initGraph() {
|
|
86
|
+
this.createGraph();
|
|
87
|
+
this.updateGraphData();
|
|
88
|
+
}
|
|
89
|
+
createGraph() {
|
|
90
|
+
if (this.graph) {
|
|
91
|
+
if (typeof this.graph._destructor === 'function') {
|
|
92
|
+
this.graph._destructor();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const container = this.graphContainer.nativeElement;
|
|
96
|
+
container.innerHTML = ''; // Clear container
|
|
97
|
+
const width = container.clientWidth || 800;
|
|
98
|
+
const height = container.clientHeight || 600;
|
|
99
|
+
if (this.currentMode === '2d') {
|
|
100
|
+
this.graph = ForceGraph
|
|
101
|
+
.default()(container)
|
|
102
|
+
.width(width)
|
|
103
|
+
.height(height)
|
|
104
|
+
.backgroundColor('rgba(0,0,0,0)')
|
|
105
|
+
.nodeLabel('name')
|
|
106
|
+
.nodeColor(this.getNodeColor.bind(this))
|
|
107
|
+
.nodeVal(this.getNodeSize.bind(this))
|
|
108
|
+
.linkColor(this.getLinkColor.bind(this))
|
|
109
|
+
.linkWidth(this.getLinkWidth.bind(this))
|
|
110
|
+
.linkLabel(this.getLinkLabel.bind(this))
|
|
111
|
+
.linkDirectionalArrowLength(6)
|
|
112
|
+
.linkDirectionalArrowRelPos(0.8)
|
|
113
|
+
.onNodeClick(this.onNodeClick.bind(this))
|
|
114
|
+
.onNodeHover(this.onNodeHover.bind(this))
|
|
115
|
+
.onBackgroundClick(this.onBackgroundClick.bind(this))
|
|
116
|
+
.nodeCanvasObject(this.drawNode.bind(this))
|
|
117
|
+
.nodeCanvasObjectMode(() => 'replace')
|
|
118
|
+
.linkCanvasObject(this.drawLink.bind(this))
|
|
119
|
+
.linkCanvasObjectMode(() => 'after')
|
|
120
|
+
// Configure d3 forces properly
|
|
121
|
+
.d3Force('link', d3.forceLink().distance(120).strength(0.5))
|
|
122
|
+
.d3Force('charge', d3.forceManyBody().strength(-300))
|
|
123
|
+
.d3Force('collision', d3.forceCollide().radius(50));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
this.graph = ForceGraph3D
|
|
127
|
+
.default()(container)
|
|
128
|
+
.width(width)
|
|
129
|
+
.height(height)
|
|
130
|
+
.backgroundColor('rgba(240,240,240,0.1)')
|
|
131
|
+
.showNavInfo(false)
|
|
132
|
+
// Node configuration - use nodeThreeObject for static labels
|
|
133
|
+
.nodeThreeObject(this.createNode3DWithLabel.bind(this))
|
|
134
|
+
// Remove link labels - they'll be shown on nodes instead
|
|
135
|
+
// .linkThreeObject(this.createLink3DWithLabel.bind(this))
|
|
136
|
+
// .linkThreeObjectExtend(true)
|
|
137
|
+
.linkColor(this.getLinkColor.bind(this))
|
|
138
|
+
.linkWidth(this.getLinkWidth.bind(this))
|
|
139
|
+
.linkDirectionalArrowLength(4)
|
|
140
|
+
.linkDirectionalArrowRelPos(0.8)
|
|
141
|
+
.linkOpacity(0.6)
|
|
142
|
+
// Keep tooltip labels for additional info on hover
|
|
143
|
+
.nodeLabel(this.getNode3DLabel.bind(this))
|
|
144
|
+
.linkLabel(this.getLink3DLabel.bind(this))
|
|
145
|
+
// Event handlers
|
|
146
|
+
.onNodeClick(this.onNodeClick.bind(this))
|
|
147
|
+
.onNodeHover(this.onNodeHover.bind(this))
|
|
148
|
+
.onBackgroundClick(this.onBackgroundClick.bind(this))
|
|
149
|
+
// Configure d3 forces for 3D
|
|
150
|
+
.d3Force('link', d3.forceLink().distance(120).strength(0.5))
|
|
151
|
+
.d3Force('charge', d3.forceManyBody().strength(-300));
|
|
152
|
+
}
|
|
153
|
+
// Handle window resize
|
|
154
|
+
if (this.resizeObserver) {
|
|
155
|
+
this.resizeObserver.disconnect();
|
|
156
|
+
}
|
|
157
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
158
|
+
if (this.graph && container.clientWidth && container.clientHeight) {
|
|
159
|
+
this.graph.width(container.clientWidth).height(container.clientHeight);
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
this.resizeObserver.observe(container);
|
|
163
|
+
}
|
|
164
|
+
convertToForceGraphData() {
|
|
165
|
+
const forceNodes = this.nodes.map((node) => {
|
|
166
|
+
const label = node.label || String(node.id);
|
|
167
|
+
const count = node.data?.count;
|
|
168
|
+
const displayName = count ? `${label} (${count})` : label;
|
|
169
|
+
return {
|
|
170
|
+
id: node.id,
|
|
171
|
+
name: displayName, // This will be used by nodeLabel
|
|
172
|
+
val: this.getNodeSizeValue(node),
|
|
173
|
+
color: node.data?.customColor || node.data?.color || '#69b3a2',
|
|
174
|
+
group: node.data?.originId || String(node.id).charAt(0) || '1', // Group by first character for auto-coloring
|
|
175
|
+
__nodeData: node,
|
|
176
|
+
};
|
|
177
|
+
});
|
|
178
|
+
const forceLinks = this.edges.map((edge) => {
|
|
179
|
+
const label = edge.label || edge.data?.label || '';
|
|
180
|
+
return {
|
|
181
|
+
source: edge.source,
|
|
182
|
+
target: edge.target,
|
|
183
|
+
color: edge.data?.color || '#999',
|
|
184
|
+
width: edge.data?.width || 1,
|
|
185
|
+
label: this.truncateLabelFor3D(label), // Pre-truncate for 3D
|
|
186
|
+
__linkData: edge,
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
console.log('Force graph data for 3D:', {
|
|
190
|
+
nodes: forceNodes,
|
|
191
|
+
links: forceLinks,
|
|
192
|
+
});
|
|
193
|
+
return { nodes: forceNodes, links: forceLinks };
|
|
194
|
+
}
|
|
195
|
+
getNode3DLabel(node) {
|
|
196
|
+
const nodeData = node.__nodeData;
|
|
197
|
+
if (!nodeData)
|
|
198
|
+
return node.name || String(node.id);
|
|
199
|
+
const label = nodeData.label || String(nodeData.id);
|
|
200
|
+
// Add node count if available
|
|
201
|
+
const count = nodeData.data?.count;
|
|
202
|
+
const displayLabel = count ? `${label} (${count})` : label;
|
|
203
|
+
// Truncate for 3D display
|
|
204
|
+
return displayLabel.length > 15
|
|
205
|
+
? displayLabel.substring(0, 12) + '...'
|
|
206
|
+
: displayLabel;
|
|
207
|
+
}
|
|
208
|
+
getLink3DLabel(link) {
|
|
209
|
+
const label = this.getLinkLabel(link);
|
|
210
|
+
if (!label)
|
|
211
|
+
return '';
|
|
212
|
+
// More aggressive truncation for 3D to avoid performance issues
|
|
213
|
+
if (label.length > 15) {
|
|
214
|
+
if (label.includes(':')) {
|
|
215
|
+
const parts = label.split(':');
|
|
216
|
+
if (parts.length > 1) {
|
|
217
|
+
return parts[0] + ':' + parts[1].substring(0, 10) + '...';
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return label.substring(0, 12) + '...';
|
|
221
|
+
}
|
|
222
|
+
return label;
|
|
223
|
+
}
|
|
224
|
+
truncateLabelFor3D(label) {
|
|
225
|
+
if (!label)
|
|
226
|
+
return '';
|
|
227
|
+
// More aggressive truncation for 3D to ensure performance
|
|
228
|
+
if (label.length > 20) {
|
|
229
|
+
if (label.includes(':')) {
|
|
230
|
+
const parts = label.split(':');
|
|
231
|
+
if (parts.length > 1) {
|
|
232
|
+
const prefix = parts[0];
|
|
233
|
+
const suffix = parts[1];
|
|
234
|
+
if (suffix.length > 12) {
|
|
235
|
+
return `${prefix}:${suffix.substring(0, 9)}...`;
|
|
236
|
+
}
|
|
237
|
+
return `${prefix}:${suffix}`;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return label.substring(0, 17) + '...';
|
|
241
|
+
}
|
|
242
|
+
return label;
|
|
243
|
+
}
|
|
244
|
+
updateGraphData() {
|
|
245
|
+
if (!this.graph)
|
|
246
|
+
return;
|
|
247
|
+
const graphData = this.convertToForceGraphData();
|
|
248
|
+
console.log('Updating graph data:', graphData); // Debug log
|
|
249
|
+
this.graph.graphData(graphData);
|
|
250
|
+
}
|
|
251
|
+
getNodeColor(node) {
|
|
252
|
+
return (node.__nodeData?.data?.customColor ||
|
|
253
|
+
node.__nodeData?.data?.color ||
|
|
254
|
+
node.color ||
|
|
255
|
+
'#69b3a2');
|
|
256
|
+
}
|
|
257
|
+
getNodeSize(node) {
|
|
258
|
+
if (node.__nodeData) {
|
|
259
|
+
return node.val || this.getNodeSizeValue(node.__nodeData);
|
|
260
|
+
}
|
|
261
|
+
return node.val || 4;
|
|
262
|
+
}
|
|
263
|
+
getNodeSizeValue(node) {
|
|
264
|
+
if (!node)
|
|
265
|
+
return 4;
|
|
266
|
+
// Different sizes based on node type
|
|
267
|
+
const id = String(node.id); // Convert to string for startsWith check
|
|
268
|
+
if (id.startsWith('N'))
|
|
269
|
+
return 8; // Node
|
|
270
|
+
if (id.startsWith('P'))
|
|
271
|
+
return 6; // Property
|
|
272
|
+
if (id.startsWith('L'))
|
|
273
|
+
return 4; // Literal
|
|
274
|
+
return 6;
|
|
275
|
+
}
|
|
276
|
+
getLinkColor(link) {
|
|
277
|
+
return link.__linkData?.data?.color || link.color || '#999';
|
|
278
|
+
}
|
|
279
|
+
getLinkWidth(link) {
|
|
280
|
+
return link.__linkData?.data?.width || link.width || 1;
|
|
281
|
+
}
|
|
282
|
+
getLinkLabel(link) {
|
|
283
|
+
return link.__linkData?.label || link.label || '';
|
|
284
|
+
}
|
|
285
|
+
drawNode(node, ctx, globalScale) {
|
|
286
|
+
if (!node.__nodeData || !node.x || !node.y)
|
|
287
|
+
return;
|
|
288
|
+
const nodeData = node.__nodeData;
|
|
289
|
+
const label = nodeData.label || String(nodeData.id);
|
|
290
|
+
const isSelected = nodeData.data?.selected;
|
|
291
|
+
// Node size and color
|
|
292
|
+
const size = this.getNodeSize(node) / Math.max(globalScale, 0.5);
|
|
293
|
+
const color = this.getNodeColor(node);
|
|
294
|
+
// Draw node shape based on type
|
|
295
|
+
ctx.save();
|
|
296
|
+
const nodeId = String(nodeData.id);
|
|
297
|
+
if (nodeId.startsWith('L')) {
|
|
298
|
+
// Literal nodes - diamond shape
|
|
299
|
+
ctx.fillStyle = color;
|
|
300
|
+
ctx.strokeStyle = isSelected ? '#e7d211' : '#666';
|
|
301
|
+
ctx.lineWidth = isSelected ? 2 / globalScale : 1 / globalScale;
|
|
302
|
+
ctx.beginPath();
|
|
303
|
+
ctx.moveTo(node.x, node.y - size);
|
|
304
|
+
ctx.lineTo(node.x + size, node.y);
|
|
305
|
+
ctx.lineTo(node.x, node.y + size);
|
|
306
|
+
ctx.lineTo(node.x - size, node.y);
|
|
307
|
+
ctx.closePath();
|
|
308
|
+
ctx.fill();
|
|
309
|
+
ctx.stroke();
|
|
310
|
+
}
|
|
311
|
+
else if (nodeId.startsWith('P')) {
|
|
312
|
+
// Property nodes - hexagon shape
|
|
313
|
+
ctx.fillStyle = color;
|
|
314
|
+
ctx.strokeStyle = isSelected ? '#e7d211' : '#666';
|
|
315
|
+
ctx.lineWidth = isSelected ? 2 / globalScale : 1 / globalScale;
|
|
316
|
+
const sides = 6;
|
|
317
|
+
const a = (Math.PI * 2) / sides;
|
|
318
|
+
ctx.beginPath();
|
|
319
|
+
for (let i = 0; i < sides; i++) {
|
|
320
|
+
const x = node.x + Math.cos(a * i) * size;
|
|
321
|
+
const y = node.y + Math.sin(a * i) * size;
|
|
322
|
+
if (i === 0)
|
|
323
|
+
ctx.moveTo(x, y);
|
|
324
|
+
else
|
|
325
|
+
ctx.lineTo(x, y);
|
|
326
|
+
}
|
|
327
|
+
ctx.closePath();
|
|
328
|
+
ctx.fill();
|
|
329
|
+
ctx.stroke();
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
// Regular nodes - circle
|
|
333
|
+
ctx.fillStyle = color;
|
|
334
|
+
ctx.strokeStyle = isSelected ? '#e7d211' : '#666';
|
|
335
|
+
ctx.lineWidth = isSelected ? 2 / globalScale : 1 / globalScale;
|
|
336
|
+
ctx.beginPath();
|
|
337
|
+
ctx.arc(node.x, node.y, size, 0, 2 * Math.PI);
|
|
338
|
+
ctx.fill();
|
|
339
|
+
ctx.stroke();
|
|
340
|
+
}
|
|
341
|
+
// Draw label
|
|
342
|
+
if (globalScale > 0.3) {
|
|
343
|
+
const fontSize = Math.max(8, 10 / globalScale);
|
|
344
|
+
ctx.font = `${fontSize}px Arial`;
|
|
345
|
+
ctx.fillStyle = '#333';
|
|
346
|
+
ctx.textAlign = 'center';
|
|
347
|
+
ctx.textBaseline = 'middle';
|
|
348
|
+
// Truncate long labels
|
|
349
|
+
let displayLabel = label;
|
|
350
|
+
if (displayLabel.length > 15) {
|
|
351
|
+
displayLabel = displayLabel.substring(0, 12) + '...';
|
|
352
|
+
}
|
|
353
|
+
ctx.fillText(displayLabel, node.x, node.y + size + fontSize);
|
|
354
|
+
}
|
|
355
|
+
ctx.restore();
|
|
356
|
+
}
|
|
357
|
+
drawLink(link, ctx, globalScale) {
|
|
358
|
+
if (!link.source || !link.target)
|
|
359
|
+
return;
|
|
360
|
+
const source = link.source;
|
|
361
|
+
const target = link.target;
|
|
362
|
+
if (!source.x || !source.y || !target.x || !target.y)
|
|
363
|
+
return;
|
|
364
|
+
const label = this.getLinkLabel(link);
|
|
365
|
+
if (!label || globalScale < 0.3)
|
|
366
|
+
return; // Show labels at lower zoom levels
|
|
367
|
+
// Calculate link vector and angle
|
|
368
|
+
const dx = target.x - source.x;
|
|
369
|
+
const dy = target.y - source.y;
|
|
370
|
+
const linkLength = Math.sqrt(dx * dx + dy * dy);
|
|
371
|
+
if (linkLength === 0)
|
|
372
|
+
return;
|
|
373
|
+
const angle = Math.atan2(dy, dx);
|
|
374
|
+
// Position label at 40% of the way from source to target
|
|
375
|
+
const labelX = source.x + dx * 0.4;
|
|
376
|
+
const labelY = source.y + dy * 0.4;
|
|
377
|
+
// Calculate offset perpendicular to the link to avoid overlap
|
|
378
|
+
const offsetDistance = 20 / globalScale;
|
|
379
|
+
const offsetX = -Math.sin(angle) * offsetDistance;
|
|
380
|
+
const offsetY = Math.cos(angle) * offsetDistance;
|
|
381
|
+
const finalX = labelX + offsetX;
|
|
382
|
+
const finalY = labelY + offsetY;
|
|
383
|
+
ctx.save();
|
|
384
|
+
// Smaller font size
|
|
385
|
+
const fontSize = Math.max(6, 7 / globalScale);
|
|
386
|
+
ctx.font = `${fontSize}px Arial`;
|
|
387
|
+
// Rotate text to be parallel to the link
|
|
388
|
+
ctx.translate(finalX, finalY);
|
|
389
|
+
// Keep text readable by avoiding upside-down text
|
|
390
|
+
let textAngle = angle;
|
|
391
|
+
if (Math.abs(angle) > Math.PI / 2) {
|
|
392
|
+
textAngle = angle + Math.PI;
|
|
393
|
+
}
|
|
394
|
+
ctx.rotate(textAngle);
|
|
395
|
+
ctx.textAlign = 'center';
|
|
396
|
+
ctx.textBaseline = 'middle';
|
|
397
|
+
// More generous truncation based on link length
|
|
398
|
+
let displayLabel = label;
|
|
399
|
+
const maxChars = Math.min(Math.max(15, Math.floor(linkLength / 8)), 25); // Dynamic based on link length, min 15, max 25
|
|
400
|
+
if (displayLabel.length > maxChars) {
|
|
401
|
+
// Try to be smart about truncation - keep the meaningful part
|
|
402
|
+
if (displayLabel.includes(':')) {
|
|
403
|
+
// For URIs like "crm:P98_brought_into_existence", try to keep the part after the colon
|
|
404
|
+
const parts = displayLabel.split(':');
|
|
405
|
+
if (parts.length > 1 && parts[1].length <= maxChars - 3) {
|
|
406
|
+
displayLabel = parts[0] + ':' + parts[1];
|
|
407
|
+
}
|
|
408
|
+
else if (parts[1].length > maxChars - 3) {
|
|
409
|
+
displayLabel =
|
|
410
|
+
parts[0] + ':' + parts[1].substring(0, maxChars - 6) + '...';
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
// Regular truncation
|
|
415
|
+
displayLabel = displayLabel.substring(0, maxChars - 3) + '...';
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
// Measure text for background
|
|
419
|
+
const textMetrics = ctx.measureText(displayLabel);
|
|
420
|
+
const textWidth = textMetrics.width;
|
|
421
|
+
const textHeight = fontSize;
|
|
422
|
+
// Draw background
|
|
423
|
+
ctx.fillStyle = 'rgba(255, 255, 255, 0.85)';
|
|
424
|
+
ctx.fillRect(-textWidth / 2 - 1, -textHeight / 2 - 0.5, textWidth + 2, textHeight + 1);
|
|
425
|
+
// Draw border
|
|
426
|
+
ctx.strokeStyle = 'rgba(0, 0, 0, 0.15)';
|
|
427
|
+
ctx.lineWidth = 0.3 / globalScale;
|
|
428
|
+
ctx.strokeRect(-textWidth / 2 - 1, -textHeight / 2 - 0.5, textWidth + 2, textHeight + 1);
|
|
429
|
+
// Draw text
|
|
430
|
+
ctx.fillStyle = '#333';
|
|
431
|
+
ctx.fillText(displayLabel, 0, 0);
|
|
432
|
+
ctx.restore();
|
|
433
|
+
}
|
|
434
|
+
onNodeClick(node, event) {
|
|
435
|
+
if (!node.__nodeData)
|
|
436
|
+
return;
|
|
437
|
+
// Handle double-click detection with timeout
|
|
438
|
+
if (this.clickTimeout) {
|
|
439
|
+
clearTimeout(this.clickTimeout);
|
|
440
|
+
this.clickTimeout = null;
|
|
441
|
+
// Double click detected
|
|
442
|
+
this.nodeDoubleClick.emit(node.__nodeData);
|
|
443
|
+
}
|
|
444
|
+
else {
|
|
445
|
+
// Set timeout for single click
|
|
446
|
+
this.clickTimeout = setTimeout(() => {
|
|
447
|
+
this.clickTimeout = null;
|
|
448
|
+
this.nodeSelect.emit(node.__nodeData);
|
|
449
|
+
}, 300);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
onNodeHover(node) {
|
|
453
|
+
if (this.graph) {
|
|
454
|
+
// Change cursor on hover for both 2D and 3D
|
|
455
|
+
const container = this.graphContainer.nativeElement;
|
|
456
|
+
container.style.cursor = node ? 'pointer' : 'default';
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
onBackgroundClick() {
|
|
460
|
+
// Deselect node on background click
|
|
461
|
+
this.nodeSelect.emit(null);
|
|
462
|
+
}
|
|
463
|
+
setupSubscriptions() {
|
|
464
|
+
if (this.update$) {
|
|
465
|
+
this.update$.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
466
|
+
this.updateGraphData();
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
if (this.center$) {
|
|
470
|
+
this.center$.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
471
|
+
this.centerView();
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
if (this.zoomToFit$) {
|
|
475
|
+
this.zoomToFit$.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
476
|
+
this.zoomToFit();
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
toggleMode() {
|
|
481
|
+
const newMode = this.currentMode === '2d' ? '3d' : '2d';
|
|
482
|
+
this.switchMode(newMode);
|
|
483
|
+
this.modeChange.emit(newMode);
|
|
484
|
+
}
|
|
485
|
+
switchMode(newMode) {
|
|
486
|
+
if (newMode === this.currentMode)
|
|
487
|
+
return;
|
|
488
|
+
this.currentMode = newMode;
|
|
489
|
+
this.createGraph();
|
|
490
|
+
this.updateGraphData();
|
|
491
|
+
}
|
|
492
|
+
centerView() {
|
|
493
|
+
if (this.graph) {
|
|
494
|
+
if (this.currentMode === '2d') {
|
|
495
|
+
this.graph.centerAt(0, 0, 1000);
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
this.graph.cameraPosition({ x: 0, y: 0, z: 400 }, { x: 0, y: 0, z: 0 }, 1000);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
zoomToFit() {
|
|
503
|
+
if (this.graph) {
|
|
504
|
+
this.graph.zoomToFit(1000, 50);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
createNode3DWithLabel(node) {
|
|
508
|
+
const nodeData = node.__nodeData;
|
|
509
|
+
if (!nodeData)
|
|
510
|
+
return null;
|
|
511
|
+
console.log('Creating 3D node with label for:', nodeData.label);
|
|
512
|
+
const size = this.getNodeSize(node);
|
|
513
|
+
const color = this.getNodeColor(node);
|
|
514
|
+
const nodeId = String(nodeData.id);
|
|
515
|
+
// Create a group to hold both the node and the labels
|
|
516
|
+
const group = new THREE.Group();
|
|
517
|
+
// Create node geometry based on type
|
|
518
|
+
let geometry;
|
|
519
|
+
if (nodeId.startsWith('L')) {
|
|
520
|
+
geometry = new THREE.OctahedronGeometry(size);
|
|
521
|
+
}
|
|
522
|
+
else if (nodeId.startsWith('P')) {
|
|
523
|
+
geometry = new THREE.CylinderGeometry(size * 0.8, size * 0.8, size * 0.5, 6);
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
geometry = new THREE.SphereGeometry(size);
|
|
527
|
+
}
|
|
528
|
+
const material = new THREE.MeshLambertMaterial({ color });
|
|
529
|
+
const mesh = new THREE.Mesh(geometry, material);
|
|
530
|
+
group.add(mesh);
|
|
531
|
+
// Create node label with count and incoming link labels
|
|
532
|
+
const label = nodeData.label || String(nodeData.id);
|
|
533
|
+
const count = nodeData.data?.count;
|
|
534
|
+
// Get incoming link labels
|
|
535
|
+
const incomingLinks = this.edges.filter((edge) => edge.target === nodeData.id);
|
|
536
|
+
const linkLabels = incomingLinks
|
|
537
|
+
.map((edge) => edge.label || edge.data?.label)
|
|
538
|
+
.filter((label) => label) // Remove empty labels
|
|
539
|
+
.slice(0, 3); // Limit to first 3 to avoid too long text
|
|
540
|
+
// Build display text
|
|
541
|
+
let displayText = label;
|
|
542
|
+
if (count || linkLabels.length > 0) {
|
|
543
|
+
const parts = [];
|
|
544
|
+
if (count) {
|
|
545
|
+
parts.push(count.toString());
|
|
546
|
+
}
|
|
547
|
+
if (linkLabels.length > 0) {
|
|
548
|
+
// Join multiple link labels with commas
|
|
549
|
+
const linkText = linkLabels.join(', ');
|
|
550
|
+
parts.push(linkText);
|
|
551
|
+
}
|
|
552
|
+
if (parts.length > 0) {
|
|
553
|
+
displayText = `${label} (${parts.join(': ')})`;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
// Truncate for 3D - be more generous to keep labels readable
|
|
557
|
+
let truncatedText = displayText;
|
|
558
|
+
if (truncatedText.length > 25) {
|
|
559
|
+
// Try to keep the meaningful part - prioritize the link labels over the node label
|
|
560
|
+
if (linkLabels.length > 0 && count) {
|
|
561
|
+
// Format: "NodeLabel (count: linkLabel1, linkLabel2)"
|
|
562
|
+
const linkText = linkLabels.join(', ');
|
|
563
|
+
const maxLinkLength = 15; // Reserve space for link labels
|
|
564
|
+
const truncatedLinkText = linkText.length > maxLinkLength
|
|
565
|
+
? linkText.substring(0, maxLinkLength - 3) + '...'
|
|
566
|
+
: linkText;
|
|
567
|
+
const nodePartLength = Math.max(5, 25 - count.toString().length - truncatedLinkText.length - 5); // 5 for " (: )"
|
|
568
|
+
const truncatedLabel = label.length > nodePartLength
|
|
569
|
+
? label.substring(0, nodePartLength - 3) + '...'
|
|
570
|
+
: label;
|
|
571
|
+
truncatedText = `${truncatedLabel} (${count}: ${truncatedLinkText})`;
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
// Fallback to simple truncation
|
|
575
|
+
truncatedText = truncatedText.substring(0, 22) + '...';
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
const nodeSprite = this.createTextSprite(truncatedText);
|
|
579
|
+
nodeSprite.position.set(0, size + 15, 0); // Position above node
|
|
580
|
+
group.add(nodeSprite);
|
|
581
|
+
console.log('Created node sprite with text:', truncatedText);
|
|
582
|
+
return group;
|
|
583
|
+
}
|
|
584
|
+
createTextSprite(text) {
|
|
585
|
+
const fontFace = 'Arial';
|
|
586
|
+
const fontSize = 24;
|
|
587
|
+
const canvas = document.createElement('canvas');
|
|
588
|
+
const context = canvas.getContext('2d');
|
|
589
|
+
// Set font for measurement
|
|
590
|
+
context.font = `Normal ${fontSize}px ${fontFace}`;
|
|
591
|
+
const metrics = context.measureText(text);
|
|
592
|
+
const textWidth = metrics.width;
|
|
593
|
+
const padding = 10;
|
|
594
|
+
// Set canvas size
|
|
595
|
+
canvas.width = textWidth + padding * 2;
|
|
596
|
+
canvas.height = fontSize + padding * 2;
|
|
597
|
+
// Clear and draw background
|
|
598
|
+
context.fillStyle = 'rgba(255, 255, 255, 0.9)';
|
|
599
|
+
context.fillRect(0, 0, canvas.width, canvas.height);
|
|
600
|
+
// Draw border
|
|
601
|
+
context.strokeStyle = 'rgba(0, 0, 0, 0.3)';
|
|
602
|
+
context.lineWidth = 2;
|
|
603
|
+
context.strokeRect(0, 0, canvas.width, canvas.height);
|
|
604
|
+
// Draw text
|
|
605
|
+
context.font = `Normal ${fontSize}px ${fontFace}`;
|
|
606
|
+
context.textAlign = 'center';
|
|
607
|
+
context.textBaseline = 'middle';
|
|
608
|
+
context.fillStyle = 'rgba(0, 0, 0, 1)';
|
|
609
|
+
context.fillText(text, canvas.width / 2, canvas.height / 2);
|
|
610
|
+
// Create texture and sprite
|
|
611
|
+
const texture = new THREE.CanvasTexture(canvas);
|
|
612
|
+
const material = new THREE.SpriteMaterial({ map: texture });
|
|
613
|
+
const sprite = new THREE.Sprite(material);
|
|
614
|
+
// Scale the sprite appropriately
|
|
615
|
+
sprite.scale.set(canvas.width / 4, canvas.height / 4, 1);
|
|
616
|
+
return sprite;
|
|
617
|
+
}
|
|
618
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ForceGraphRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
619
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.3", type: ForceGraphRendererComponent, isStandalone: true, selector: "cadmus-force-graph-renderer", inputs: { nodes: "nodes", edges: "edges", mode: "mode", update$: "update$", center$: "center$", zoomToFit$: "zoomToFit$" }, outputs: { nodeSelect: "nodeSelect", nodeDoubleClick: "nodeDoubleClick", modeChange: "modeChange" }, viewQueries: [{ propertyName: "graphContainer", first: true, predicate: ["graphContainer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
620
|
+
<div class="renderer-container">
|
|
621
|
+
<div class="controls">
|
|
622
|
+
<button
|
|
623
|
+
type="button"
|
|
624
|
+
mat-icon-button
|
|
625
|
+
matTooltip="Switch to {{ mode === '2d' ? '3D' : '2D' }} view"
|
|
626
|
+
(click)="toggleMode()"
|
|
627
|
+
>
|
|
628
|
+
<mat-icon>{{ mode === '2d' ? 'view_in_ar' : 'view_quilt' }}</mat-icon>
|
|
629
|
+
</button>
|
|
630
|
+
<button
|
|
631
|
+
type="button"
|
|
632
|
+
mat-icon-button
|
|
633
|
+
matTooltip="Center view"
|
|
634
|
+
(click)="centerView()"
|
|
635
|
+
>
|
|
636
|
+
<mat-icon>filter_center_focus</mat-icon>
|
|
637
|
+
</button>
|
|
638
|
+
<button
|
|
639
|
+
type="button"
|
|
640
|
+
mat-icon-button
|
|
641
|
+
matTooltip="Zoom to fit"
|
|
642
|
+
(click)="zoomToFit()"
|
|
643
|
+
>
|
|
644
|
+
<mat-icon>fit_screen</mat-icon>
|
|
645
|
+
</button>
|
|
646
|
+
</div>
|
|
647
|
+
<div #graphContainer class="graph-container"></div>
|
|
648
|
+
</div>
|
|
649
|
+
`, isInline: true, styles: [".renderer-container{width:100%;height:100%;min-height:600px;position:relative;display:flex;flex-direction:column}.controls{position:absolute;top:10px;right:10px;z-index:1000;display:flex;gap:4px;background:#ffffffe6;border-radius:4px;padding:4px;box-shadow:0 2px 4px #0000001a}.graph-container{width:100%;height:100%;min-height:600px;flex:1;position:relative}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
650
|
+
}
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: ForceGraphRendererComponent, decorators: [{
|
|
652
|
+
type: Component,
|
|
653
|
+
args: [{ selector: 'cadmus-force-graph-renderer', template: `
|
|
654
|
+
<div class="renderer-container">
|
|
655
|
+
<div class="controls">
|
|
656
|
+
<button
|
|
657
|
+
type="button"
|
|
658
|
+
mat-icon-button
|
|
659
|
+
matTooltip="Switch to {{ mode === '2d' ? '3D' : '2D' }} view"
|
|
660
|
+
(click)="toggleMode()"
|
|
661
|
+
>
|
|
662
|
+
<mat-icon>{{ mode === '2d' ? 'view_in_ar' : 'view_quilt' }}</mat-icon>
|
|
663
|
+
</button>
|
|
664
|
+
<button
|
|
665
|
+
type="button"
|
|
666
|
+
mat-icon-button
|
|
667
|
+
matTooltip="Center view"
|
|
668
|
+
(click)="centerView()"
|
|
669
|
+
>
|
|
670
|
+
<mat-icon>filter_center_focus</mat-icon>
|
|
671
|
+
</button>
|
|
672
|
+
<button
|
|
673
|
+
type="button"
|
|
674
|
+
mat-icon-button
|
|
675
|
+
matTooltip="Zoom to fit"
|
|
676
|
+
(click)="zoomToFit()"
|
|
677
|
+
>
|
|
678
|
+
<mat-icon>fit_screen</mat-icon>
|
|
679
|
+
</button>
|
|
680
|
+
</div>
|
|
681
|
+
<div #graphContainer class="graph-container"></div>
|
|
682
|
+
</div>
|
|
683
|
+
`, imports: [CommonModule, MatButtonModule, MatIconModule, MatTooltipModule], styles: [".renderer-container{width:100%;height:100%;min-height:600px;position:relative;display:flex;flex-direction:column}.controls{position:absolute;top:10px;right:10px;z-index:1000;display:flex;gap:4px;background:#ffffffe6;border-radius:4px;padding:4px;box-shadow:0 2px 4px #0000001a}.graph-container{width:100%;height:100%;min-height:600px;flex:1;position:relative}\n"] }]
|
|
684
|
+
}], propDecorators: { graphContainer: [{
|
|
685
|
+
type: ViewChild,
|
|
686
|
+
args: ['graphContainer', { static: true }]
|
|
687
|
+
}], nodes: [{
|
|
688
|
+
type: Input
|
|
689
|
+
}], edges: [{
|
|
690
|
+
type: Input
|
|
691
|
+
}], mode: [{
|
|
692
|
+
type: Input
|
|
693
|
+
}], update$: [{
|
|
694
|
+
type: Input
|
|
695
|
+
}], center$: [{
|
|
696
|
+
type: Input
|
|
697
|
+
}], zoomToFit$: [{
|
|
698
|
+
type: Input
|
|
699
|
+
}], nodeSelect: [{
|
|
700
|
+
type: Output
|
|
701
|
+
}], nodeDoubleClick: [{
|
|
702
|
+
type: Output
|
|
703
|
+
}], modeChange: [{
|
|
704
|
+
type: Output
|
|
705
|
+
}] } });
|
|
27
706
|
|
|
28
707
|
/**
|
|
29
708
|
* Triples filter.
|
|
@@ -34,23 +713,23 @@ class TripleFilterComponent {
|
|
|
34
713
|
/**
|
|
35
714
|
* True if this component is disabled.
|
|
36
715
|
*/
|
|
37
|
-
disabled = input(false);
|
|
716
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
38
717
|
/**
|
|
39
718
|
* True if this component should show a pager.
|
|
40
719
|
*/
|
|
41
|
-
hasPager = input(false);
|
|
720
|
+
hasPager = input(false, ...(ngDevMode ? [{ debugName: "hasPager" }] : []));
|
|
42
721
|
/**
|
|
43
722
|
* The total number of triples returned from the last
|
|
44
723
|
* page fetch operation. Used when hasPager is true.
|
|
45
724
|
*/
|
|
46
|
-
total = input(0);
|
|
725
|
+
total = input(0, ...(ngDevMode ? [{ debugName: "total" }] : []));
|
|
47
726
|
/**
|
|
48
727
|
* The filter.
|
|
49
728
|
*/
|
|
50
729
|
filter = model({
|
|
51
730
|
pageNumber: 1,
|
|
52
731
|
pageSize: 10,
|
|
53
|
-
});
|
|
732
|
+
}, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
54
733
|
pageNumber;
|
|
55
734
|
pageSize;
|
|
56
735
|
litPattern;
|
|
@@ -228,10 +907,10 @@ class TripleFilterComponent {
|
|
|
228
907
|
this.filter.set(this.getFilter());
|
|
229
908
|
this.form.markAsPristine();
|
|
230
909
|
}
|
|
231
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
232
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: TripleFilterComponent, isStandalone: true, selector: "cadmus-walker-triple-filter", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasPager: { classPropertyName: "hasPager", publicName: "hasPager", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n <mat-tab-group>\r\n <!-- TRIPLE -->\r\n <mat-tab label=\"triple\">\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-ref-lookup\r\n label=\"subject\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onSubjectNodeChange($event)\"\r\n />\r\n </div>\r\n <!-- predicate IDs -->\r\n <div>\r\n <cadmus-ref-lookup\r\n label=\"predicate\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ tag: 'property' }\"\r\n (itemChange)=\"onPredicateNodeChange($event)\"\r\n />\r\n <mat-checkbox [formControl]=\"isNotPred\">not</mat-checkbox>\r\n <!-- notPreds -->\r\n @if (isNotPred.value) {\r\n <div>\r\n <mat-list dense>\r\n @for (n of notPreds.value; track n.id) {\r\n <mat-list-item>\r\n <span>{{ n.label }}</span>\r\n <button type=\"button\" mat-icon-button (click)=\"deleteNotPred(n)\">\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </div>\r\n }\r\n <!-- preds -->\r\n @if (!isNotPred.value) {\r\n <div>\r\n <mat-list dense>\r\n @for (n of preds.value; track n.id) {\r\n <mat-list-item>\r\n <span>{{ n.label }}</span>\r\n <button type=\"button\" mat-icon-button (click)=\"deletePred(n)\">\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </div>\r\n }\r\n </div>\r\n <!-- object ID -->\r\n <div>\r\n <cadmus-ref-lookup\r\n label=\"object\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onObjectNodeChange($event)\"\r\n />\r\n </div>\r\n <!-- sid -->\r\n <div>\r\n <mat-form-field>\r\n <input\r\n matInput\r\n [formControl]=\"sid\"\r\n placeholder=\"sid\"\r\n maxlength=\"500\"\r\n />\r\n </mat-form-field>\r\n \r\n <mat-checkbox [formControl]=\"isSidPrefix\">prefix</mat-checkbox>\r\n </div>\r\n <!-- tag -->\r\n <div>\r\n <mat-form-field>\r\n <input\r\n matInput\r\n [formControl]=\"tag\"\r\n placeholder=\"tag\"\r\n maxlength=\"50\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </mat-tab>\r\n <!-- LITERAL -->\r\n <mat-tab label=\"literal\">\r\n <!-- litPattern -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litPattern\" placeholder=\"pattern\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litType -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litType\" placeholder=\"type\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litLanguage-->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litLanguage\" placeholder=\"language\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- minLitNumber, maxLitNumber -->\r\n <div>\r\n <mat-form-field style=\"width: 4em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"minLitNumber\"\r\n placeholder=\"min.\"\r\n />\r\n </mat-form-field>\r\n -\r\n <mat-form-field style=\"width: 4em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"maxLitNumber\"\r\n placeholder=\"max.\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </mat-tab>\r\n </mat-tab-group>\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled()\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: RefLookupComponent, selector: "cadmus-ref-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "optionsChange", "moreRequest"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
910
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TripleFilterComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2$1.GraphNodeLookupService }, { token: i3$1.GraphService }], target: i0.ɵɵFactoryTarget.Component });
|
|
911
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: TripleFilterComponent, isStandalone: true, selector: "cadmus-walker-triple-filter", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasPager: { classPropertyName: "hasPager", publicName: "hasPager", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n <mat-tab-group>\r\n <!-- TRIPLE -->\r\n <mat-tab label=\"triple\">\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"subject\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onSubjectNodeChange($event)\"\r\n />\r\n </div>\r\n <!-- predicate IDs -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"predicate\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ tag: 'property' }\"\r\n (itemChange)=\"onPredicateNodeChange($event)\"\r\n />\r\n <mat-checkbox [formControl]=\"isNotPred\">not</mat-checkbox>\r\n <!-- notPreds -->\r\n @if (isNotPred.value) {\r\n <div>\r\n <mat-list dense>\r\n @for (n of notPreds.value; track n.id) {\r\n <mat-list-item>\r\n <span>{{ n.label }}</span>\r\n <button type=\"button\" mat-icon-button (click)=\"deleteNotPred(n)\">\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </div>\r\n }\r\n <!-- preds -->\r\n @if (!isNotPred.value) {\r\n <div>\r\n <mat-list dense>\r\n @for (n of preds.value; track n.id) {\r\n <mat-list-item>\r\n <span>{{ n.label }}</span>\r\n <button type=\"button\" mat-icon-button (click)=\"deletePred(n)\">\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </div>\r\n }\r\n </div>\r\n <!-- object ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"object\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onObjectNodeChange($event)\"\r\n />\r\n </div>\r\n <!-- sid -->\r\n <div>\r\n <mat-form-field>\r\n <input\r\n matInput\r\n [formControl]=\"sid\"\r\n placeholder=\"sid\"\r\n maxlength=\"500\"\r\n />\r\n </mat-form-field>\r\n \r\n <mat-checkbox [formControl]=\"isSidPrefix\">prefix</mat-checkbox>\r\n </div>\r\n <!-- tag -->\r\n <div>\r\n <mat-form-field>\r\n <input\r\n matInput\r\n [formControl]=\"tag\"\r\n placeholder=\"tag\"\r\n maxlength=\"50\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </mat-tab>\r\n <!-- LITERAL -->\r\n <mat-tab label=\"literal\">\r\n <!-- litPattern -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litPattern\" placeholder=\"pattern\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litType -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litType\" placeholder=\"type\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litLanguage-->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litLanguage\" placeholder=\"language\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- minLitNumber, maxLitNumber -->\r\n <div>\r\n <mat-form-field style=\"width: 4em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"minLitNumber\"\r\n placeholder=\"min.\"\r\n />\r\n </mat-form-field>\r\n -\r\n <mat-form-field style=\"width: 4em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"maxLitNumber\"\r\n placeholder=\"max.\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </mat-tab>\r\n </mat-tab-group>\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled()\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: RefLookupComponent, selector: "cadmus-refs-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "optionsChange", "moreRequest"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
233
912
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: TripleFilterComponent, decorators: [{
|
|
235
914
|
type: Component,
|
|
236
915
|
args: [{ selector: 'cadmus-walker-triple-filter', imports: [
|
|
237
916
|
FormsModule,
|
|
@@ -248,8 +927,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
248
927
|
MatFormField,
|
|
249
928
|
MatInput,
|
|
250
929
|
MatTooltip,
|
|
251
|
-
], template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n <mat-tab-group>\r\n <!-- TRIPLE -->\r\n <mat-tab label=\"triple\">\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-
|
|
252
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.GraphNodeLookupService }, { type: i3.GraphService }] });
|
|
930
|
+
], template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n <mat-tab-group>\r\n <!-- TRIPLE -->\r\n <mat-tab label=\"triple\">\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"subject\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onSubjectNodeChange($event)\"\r\n />\r\n </div>\r\n <!-- predicate IDs -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"predicate\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ tag: 'property' }\"\r\n (itemChange)=\"onPredicateNodeChange($event)\"\r\n />\r\n <mat-checkbox [formControl]=\"isNotPred\">not</mat-checkbox>\r\n <!-- notPreds -->\r\n @if (isNotPred.value) {\r\n <div>\r\n <mat-list dense>\r\n @for (n of notPreds.value; track n.id) {\r\n <mat-list-item>\r\n <span>{{ n.label }}</span>\r\n <button type=\"button\" mat-icon-button (click)=\"deleteNotPred(n)\">\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </div>\r\n }\r\n <!-- preds -->\r\n @if (!isNotPred.value) {\r\n <div>\r\n <mat-list dense>\r\n @for (n of preds.value; track n.id) {\r\n <mat-list-item>\r\n <span>{{ n.label }}</span>\r\n <button type=\"button\" mat-icon-button (click)=\"deletePred(n)\">\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n </mat-list-item>\r\n }\r\n </mat-list>\r\n </div>\r\n }\r\n </div>\r\n <!-- object ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"object\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onObjectNodeChange($event)\"\r\n />\r\n </div>\r\n <!-- sid -->\r\n <div>\r\n <mat-form-field>\r\n <input\r\n matInput\r\n [formControl]=\"sid\"\r\n placeholder=\"sid\"\r\n maxlength=\"500\"\r\n />\r\n </mat-form-field>\r\n \r\n <mat-checkbox [formControl]=\"isSidPrefix\">prefix</mat-checkbox>\r\n </div>\r\n <!-- tag -->\r\n <div>\r\n <mat-form-field>\r\n <input\r\n matInput\r\n [formControl]=\"tag\"\r\n placeholder=\"tag\"\r\n maxlength=\"50\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </mat-tab>\r\n <!-- LITERAL -->\r\n <mat-tab label=\"literal\">\r\n <!-- litPattern -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litPattern\" placeholder=\"pattern\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litType -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litType\" placeholder=\"type\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litLanguage-->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litLanguage\" placeholder=\"language\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- minLitNumber, maxLitNumber -->\r\n <div>\r\n <mat-form-field style=\"width: 4em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"minLitNumber\"\r\n placeholder=\"min.\"\r\n />\r\n </mat-form-field>\r\n -\r\n <mat-form-field style=\"width: 4em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"maxLitNumber\"\r\n placeholder=\"max.\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n </mat-tab>\r\n </mat-tab-group>\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled()\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n" }]
|
|
931
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2$1.GraphNodeLookupService }, { type: i3$1.GraphService }] });
|
|
253
932
|
|
|
254
933
|
/**
|
|
255
934
|
* Linked non-literal node filter.
|
|
@@ -260,16 +939,16 @@ class LinkedNodeFilterComponent {
|
|
|
260
939
|
/**
|
|
261
940
|
* True if this component is disabled.
|
|
262
941
|
*/
|
|
263
|
-
disabled = input();
|
|
942
|
+
disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : []));
|
|
264
943
|
/**
|
|
265
944
|
* True if this component should show a pager.
|
|
266
945
|
*/
|
|
267
|
-
hasPager = input(false);
|
|
946
|
+
hasPager = input(false, ...(ngDevMode ? [{ debugName: "hasPager" }] : []));
|
|
268
947
|
/**
|
|
269
948
|
* The total number of nodes returned from the last
|
|
270
949
|
* page fetch operation. Used when hasPager is true.
|
|
271
950
|
*/
|
|
272
|
-
total = input(0);
|
|
951
|
+
total = input(0, ...(ngDevMode ? [{ debugName: "total" }] : []));
|
|
273
952
|
/**
|
|
274
953
|
* The filter.
|
|
275
954
|
*/
|
|
@@ -278,7 +957,7 @@ class LinkedNodeFilterComponent {
|
|
|
278
957
|
pageSize: 10,
|
|
279
958
|
otherNodeId: 0,
|
|
280
959
|
predicateId: 0,
|
|
281
|
-
});
|
|
960
|
+
}, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
282
961
|
otherNodeId;
|
|
283
962
|
predicateId;
|
|
284
963
|
isObject;
|
|
@@ -408,10 +1087,10 @@ class LinkedNodeFilterComponent {
|
|
|
408
1087
|
this.filter.set(this.getFilter());
|
|
409
1088
|
this.form.markAsPristine();
|
|
410
1089
|
}
|
|
411
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
412
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1090
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LinkedNodeFilterComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2$1.GraphNodeLookupService }, { token: i3$1.GraphService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1091
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: LinkedNodeFilterComponent, isStandalone: true, selector: "cadmus-walker-linked-node-filter", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasPager: { classPropertyName: "hasPager", publicName: "hasPager", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n\r\n <!-- label -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"label\" placeholder=\"label\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- uid -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"uid\" placeholder=\"UID\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- isClass -->\r\n <div>\r\n <mat-form-field>\r\n <mat-select [formControl]=\"isClass\" placeholder=\"class\">\r\n <mat-option [value]=\"0\">(any)</mat-option>\r\n <mat-option [value]=\"1\">not-class</mat-option>\r\n <mat-option [value]=\"2\">class</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- tag -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"tag\" placeholder=\"tag\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- sourceType -->\r\n <div>\r\n <mat-form-field>\r\n <mat-select [formControl]=\"sourceType\" placeholder=\"source type\">\r\n <mat-option [value]=\"null\">(any)</mat-option>\r\n <mat-option [value]=\"0\">user</mat-option>\r\n <mat-option [value]=\"1\">item</mat-option>\r\n <mat-option [value]=\"2\">part</mat-option>\r\n <mat-option [value]=\"3\">thesaurus</mat-option>\r\n <mat-option [value]=\"4\">implicit</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div>\r\n <!-- sid -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"sid\" placeholder=\"SID\" />\r\n </mat-form-field>\r\n\r\n <!-- isSidPrefix -->\r\n <mat-checkbox [formControl]=\"isSidPrefix\">prefix</mat-checkbox>\r\n </div>\r\n </div>\r\n <!-- classes -->\r\n <div>\r\n <fieldset>\r\n <legend>classes</legend>\r\n <cadmus-refs-lookup\r\n label=\"class\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ isClass: true }\"\r\n (itemChange)=\"onClassAdd($event)\"\r\n />\r\n\r\n @if (classes.value.length) {\r\n <mat-chip-listbox>\r\n @for (node of classes.value; track node.id) {\r\n <mat-chip-option\r\n [removable]=\"true\"\r\n (removed)=\"onClassRemove(node)\"\r\n matTooltip=\"{{ node.uri }}\"\r\n >{{ node.label }}\r\n <button type=\"button\" matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n }\r\n </fieldset>\r\n </div>\r\n\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled()\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n", styles: ["fieldset{border:1px solid silver;border-radius:4px;padding:4px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: RefLookupComponent, selector: "cadmus-refs-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "optionsChange", "moreRequest"] }, { kind: "component", type: MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
|
|
413
1092
|
}
|
|
414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LinkedNodeFilterComponent, decorators: [{
|
|
415
1094
|
type: Component,
|
|
416
1095
|
args: [{ selector: 'cadmus-walker-linked-node-filter', imports: [
|
|
417
1096
|
FormsModule,
|
|
@@ -429,8 +1108,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
429
1108
|
MatChipRemove,
|
|
430
1109
|
MatIcon,
|
|
431
1110
|
MatIconButton,
|
|
432
|
-
], template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n\r\n <!-- label -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"label\" placeholder=\"label\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- uid -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"uid\" placeholder=\"UID\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- isClass -->\r\n <div>\r\n <mat-form-field>\r\n <mat-select [formControl]=\"isClass\" placeholder=\"class\">\r\n <mat-option [value]=\"0\">(any)</mat-option>\r\n <mat-option [value]=\"1\">not-class</mat-option>\r\n <mat-option [value]=\"2\">class</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- tag -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"tag\" placeholder=\"tag\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- sourceType -->\r\n <div>\r\n <mat-form-field>\r\n <mat-select [formControl]=\"sourceType\" placeholder=\"source type\">\r\n <mat-option [value]=\"null\">(any)</mat-option>\r\n <mat-option [value]=\"0\">user</mat-option>\r\n <mat-option [value]=\"1\">item</mat-option>\r\n <mat-option [value]=\"2\">part</mat-option>\r\n <mat-option [value]=\"3\">thesaurus</mat-option>\r\n <mat-option [value]=\"4\">implicit</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div>\r\n <!-- sid -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"sid\" placeholder=\"SID\" />\r\n </mat-form-field>\r\n\r\n <!-- isSidPrefix -->\r\n <mat-checkbox [formControl]=\"isSidPrefix\">prefix</mat-checkbox>\r\n </div>\r\n </div>\r\n <!-- classes -->\r\n <div>\r\n <fieldset>\r\n <legend>classes</legend>\r\n <cadmus-
|
|
433
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.GraphNodeLookupService }, { type: i3.GraphService }] });
|
|
1111
|
+
], template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n\r\n <!-- label -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"label\" placeholder=\"label\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- uid -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"uid\" placeholder=\"UID\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- isClass -->\r\n <div>\r\n <mat-form-field>\r\n <mat-select [formControl]=\"isClass\" placeholder=\"class\">\r\n <mat-option [value]=\"0\">(any)</mat-option>\r\n <mat-option [value]=\"1\">not-class</mat-option>\r\n <mat-option [value]=\"2\">class</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <!-- tag -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"tag\" placeholder=\"tag\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- sourceType -->\r\n <div>\r\n <mat-form-field>\r\n <mat-select [formControl]=\"sourceType\" placeholder=\"source type\">\r\n <mat-option [value]=\"null\">(any)</mat-option>\r\n <mat-option [value]=\"0\">user</mat-option>\r\n <mat-option [value]=\"1\">item</mat-option>\r\n <mat-option [value]=\"2\">part</mat-option>\r\n <mat-option [value]=\"3\">thesaurus</mat-option>\r\n <mat-option [value]=\"4\">implicit</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div>\r\n <!-- sid -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"sid\" placeholder=\"SID\" />\r\n </mat-form-field>\r\n\r\n <!-- isSidPrefix -->\r\n <mat-checkbox [formControl]=\"isSidPrefix\">prefix</mat-checkbox>\r\n </div>\r\n </div>\r\n <!-- classes -->\r\n <div>\r\n <fieldset>\r\n <legend>classes</legend>\r\n <cadmus-refs-lookup\r\n label=\"class\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ isClass: true }\"\r\n (itemChange)=\"onClassAdd($event)\"\r\n />\r\n\r\n @if (classes.value.length) {\r\n <mat-chip-listbox>\r\n @for (node of classes.value; track node.id) {\r\n <mat-chip-option\r\n [removable]=\"true\"\r\n (removed)=\"onClassRemove(node)\"\r\n matTooltip=\"{{ node.uri }}\"\r\n >{{ node.label }}\r\n <button type=\"button\" matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n }\r\n </fieldset>\r\n </div>\r\n\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled()\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled()\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n", styles: ["fieldset{border:1px solid silver;border-radius:4px;padding:4px}\n"] }]
|
|
1112
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2$1.GraphNodeLookupService }, { type: i3$1.GraphService }] });
|
|
434
1113
|
|
|
435
1114
|
/**
|
|
436
1115
|
* Linked literal filter.
|
|
@@ -441,23 +1120,23 @@ class LinkedLiteralFilterComponent {
|
|
|
441
1120
|
/**
|
|
442
1121
|
* True if this component is disabled.
|
|
443
1122
|
*/
|
|
444
|
-
disabled = input();
|
|
1123
|
+
disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : []));
|
|
445
1124
|
/**
|
|
446
1125
|
* True if this component should show a pager.
|
|
447
1126
|
*/
|
|
448
|
-
hasPager = input();
|
|
1127
|
+
hasPager = input(...(ngDevMode ? [undefined, { debugName: "hasPager" }] : []));
|
|
449
1128
|
/**
|
|
450
1129
|
* The total number of triples returned from the last
|
|
451
1130
|
* page fetch operation. Used when hasPager is true.
|
|
452
1131
|
*/
|
|
453
|
-
total = input(0);
|
|
1132
|
+
total = input(0, ...(ngDevMode ? [{ debugName: "total" }] : []));
|
|
454
1133
|
/**
|
|
455
1134
|
* The filter.
|
|
456
1135
|
*/
|
|
457
1136
|
filter = model({
|
|
458
1137
|
pageNumber: 1,
|
|
459
1138
|
pageSize: 10,
|
|
460
|
-
});
|
|
1139
|
+
}, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
461
1140
|
pageNumber;
|
|
462
1141
|
pageSize;
|
|
463
1142
|
litPattern;
|
|
@@ -551,10 +1230,10 @@ class LinkedLiteralFilterComponent {
|
|
|
551
1230
|
this.filter.set(this.getFilter());
|
|
552
1231
|
this.form.markAsPristine();
|
|
553
1232
|
}
|
|
554
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
555
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
1233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LinkedLiteralFilterComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2$1.GraphNodeLookupService }, { token: i3$1.GraphService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1234
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: LinkedLiteralFilterComponent, isStandalone: true, selector: "cadmus-walker-linked-literal-filter", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hasPager: { classPropertyName: "hasPager", publicName: "hasPager", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filter: "filterChange" }, ngImport: i0, template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total()\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"subject\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onSubjectNodeChange($event)\"\r\n />\r\n </div>\r\n\r\n <!-- predicate ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"predicate\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ tag: 'property' }\"\r\n (itemChange)=\"onPredicateNodeChange($event)\"\r\n />\r\n </div>\r\n\r\n <!-- LITERAL -->\r\n <!-- litPattern -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litPattern\" placeholder=\"pattern\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litType -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litType\" placeholder=\"type\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litLanguage-->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litLanguage\" placeholder=\"language\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- minLitNumber, maxLitNumber -->\r\n <div>\r\n <mat-form-field style=\"width: 5em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"minLitNumber\"\r\n placeholder=\"min.\"\r\n />\r\n </mat-form-field>\r\n -\r\n <mat-form-field style=\"width: 5em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"maxLitNumber\"\r\n placeholder=\"max.\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: RefLookupComponent, selector: "cadmus-refs-lookup", inputs: ["label", "limit", "baseFilter", "service", "item", "required", "hasMore", "linkTemplate", "optDialog", "options"], outputs: ["itemChange", "optionsChange", "moreRequest"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
556
1235
|
}
|
|
557
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: LinkedLiteralFilterComponent, decorators: [{
|
|
558
1237
|
type: Component,
|
|
559
1238
|
args: [{ selector: 'cadmus-walker-linked-literal-filter', imports: [
|
|
560
1239
|
FormsModule,
|
|
@@ -566,8 +1245,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
566
1245
|
MatIconButton,
|
|
567
1246
|
MatTooltip,
|
|
568
1247
|
MatIcon,
|
|
569
|
-
], template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total()\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-
|
|
570
|
-
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.GraphNodeLookupService }, { type: i3.GraphService }] });
|
|
1248
|
+
], template: "<form [formGroup]=\"form\" (submit)=\"apply()\" [attr.disabled]=\"disabled()\">\r\n <!-- paginator -->\r\n @if (hasPager()) {\r\n <mat-paginator\r\n [length]=\"total()\"\r\n [pageSize]=\"pageSize.value || 10\"\r\n [pageSizeOptions]=\"[5, 10, 20]\"\r\n (page)=\"onPageChange($event)\"\r\n aria-label=\"Select page\"\r\n />\r\n }\r\n\r\n <!-- subject ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"subject\"\r\n [service]=\"lookupService\"\r\n (itemChange)=\"onSubjectNodeChange($event)\"\r\n />\r\n </div>\r\n\r\n <!-- predicate ID -->\r\n <div>\r\n <cadmus-refs-lookup\r\n label=\"predicate\"\r\n [service]=\"lookupService\"\r\n [baseFilter]=\"{ tag: 'property' }\"\r\n (itemChange)=\"onPredicateNodeChange($event)\"\r\n />\r\n </div>\r\n\r\n <!-- LITERAL -->\r\n <!-- litPattern -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litPattern\" placeholder=\"pattern\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litType -->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litType\" placeholder=\"type\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- litLanguage-->\r\n <div>\r\n <mat-form-field>\r\n <input matInput [formControl]=\"litLanguage\" placeholder=\"language\" />\r\n </mat-form-field>\r\n </div>\r\n <!-- minLitNumber, maxLitNumber -->\r\n <div>\r\n <mat-form-field style=\"width: 5em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"minLitNumber\"\r\n placeholder=\"min.\"\r\n />\r\n </mat-form-field>\r\n -\r\n <mat-form-field style=\"width: 5em\">\r\n <input\r\n matInput\r\n type=\"number\"\r\n [formControl]=\"maxLitNumber\"\r\n placeholder=\"max.\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div\r\n class=\"btn-group\"\r\n role=\"group\"\r\n aria-label=\"toolbar\"\r\n style=\"margin-bottom: 10px\"\r\n >\r\n <button\r\n mat-icon-button\r\n type=\"button\"\r\n (click)=\"reset()\"\r\n matTooltip=\"Reset filters\"\r\n [disabled]=\"disabled\"\r\n >\r\n <mat-icon class=\"mat-warn\">clear</mat-icon>\r\n </button>\r\n <button\r\n type=\"submit\"\r\n mat-icon-button\r\n [disabled]=\"disabled\"\r\n matTooltip=\"Apply filters\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n </div>\r\n</form>\r\n" }]
|
|
1249
|
+
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2$1.GraphNodeLookupService }, { type: i3$1.GraphService }] });
|
|
571
1250
|
|
|
572
1251
|
/**
|
|
573
1252
|
* Get the extended label for the specified graph node. This returns the label
|
|
@@ -586,10 +1265,10 @@ class GraphNodeLabelPipe {
|
|
|
586
1265
|
}
|
|
587
1266
|
return node.label;
|
|
588
1267
|
}
|
|
589
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
590
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.
|
|
1268
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: GraphNodeLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1269
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.1.3", ngImport: i0, type: GraphNodeLabelPipe, isStandalone: true, name: "graphNodeLabel" });
|
|
591
1270
|
}
|
|
592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: GraphNodeLabelPipe, decorators: [{
|
|
593
1272
|
type: Pipe,
|
|
594
1273
|
args: [{ name: 'graphNodeLabel' }]
|
|
595
1274
|
}] });
|
|
@@ -604,7 +1283,6 @@ class GraphWalker {
|
|
|
604
1283
|
_graphService;
|
|
605
1284
|
_nodes$;
|
|
606
1285
|
_edges$;
|
|
607
|
-
// TODO: add clusters
|
|
608
1286
|
_loading$;
|
|
609
1287
|
_error$;
|
|
610
1288
|
_rootNode;
|
|
@@ -770,11 +1448,6 @@ class GraphWalker {
|
|
|
770
1448
|
buildLiteralId(tripleId) {
|
|
771
1449
|
return `L${tripleId}`;
|
|
772
1450
|
}
|
|
773
|
-
scale(n, domainMin, domainMax, rangeMin, rangeMax) {
|
|
774
|
-
// https://stackoverflow.com/questions/5294955/how-to-scale-down-a-range-of-numbers-with-a-known-min-and-max-value
|
|
775
|
-
return (((domainMax - domainMin) * (n - rangeMin)) / (rangeMax - rangeMin) +
|
|
776
|
-
domainMin);
|
|
777
|
-
}
|
|
778
1451
|
addEdgeIfAbsent(edge, edges) {
|
|
779
1452
|
const id = edge.id;
|
|
780
1453
|
if (edges.some((e) => e.id === id)) {
|
|
@@ -1354,16 +2027,24 @@ class GraphWalkerComponent {
|
|
|
1354
2027
|
/**
|
|
1355
2028
|
* The root origin node ID.
|
|
1356
2029
|
*/
|
|
1357
|
-
nodeId = input(0);
|
|
2030
|
+
nodeId = input(0, ...(ngDevMode ? [{ debugName: "nodeId" }] : []));
|
|
2031
|
+
/**
|
|
2032
|
+
* The graph service instance to use.
|
|
2033
|
+
*/
|
|
2034
|
+
graphService = input(...(ngDevMode ? [undefined, { debugName: "graphService" }] : []));
|
|
1358
2035
|
/**
|
|
1359
2036
|
* True if user can pick a node from the graph.
|
|
1360
2037
|
*/
|
|
1361
|
-
canPick = input();
|
|
2038
|
+
canPick = input(...(ngDevMode ? [undefined, { debugName: "canPick" }] : []));
|
|
1362
2039
|
/**
|
|
1363
2040
|
* True if user can move to the source of a picked node when
|
|
1364
2041
|
* shift-clicking it.
|
|
1365
2042
|
*/
|
|
1366
|
-
canMoveToSource = input();
|
|
2043
|
+
canMoveToSource = input(...(ngDevMode ? [undefined, { debugName: "canMoveToSource" }] : []));
|
|
2044
|
+
/**
|
|
2045
|
+
* The graph visualization mode (2D or 3D).
|
|
2046
|
+
*/
|
|
2047
|
+
graphMode = '2d';
|
|
1367
2048
|
/**
|
|
1368
2049
|
* Emitted when a graph node is picked by user.
|
|
1369
2050
|
*/
|
|
@@ -1389,9 +2070,42 @@ class GraphWalkerComponent {
|
|
|
1389
2070
|
update$ = new Subject();
|
|
1390
2071
|
center$ = new Subject();
|
|
1391
2072
|
zoomToFit$ = new Subject();
|
|
1392
|
-
constructor(
|
|
2073
|
+
constructor(_dialog) {
|
|
1393
2074
|
this._dialog = _dialog;
|
|
1394
|
-
|
|
2075
|
+
// Initialize observables with empty observables initially
|
|
2076
|
+
this.nodes$ = new Observable();
|
|
2077
|
+
this.edges$ = new Observable();
|
|
2078
|
+
this.loading$ = new Observable();
|
|
2079
|
+
this.error$ = new Observable();
|
|
2080
|
+
this.selectedNode$ = new Observable();
|
|
2081
|
+
this.pOutFilter$ = new Observable();
|
|
2082
|
+
this.pInFilter$ = new Observable();
|
|
2083
|
+
this.pLitFilter$ = new Observable();
|
|
2084
|
+
this.nOutFilter$ = new Observable();
|
|
2085
|
+
this.nInFilter$ = new Observable();
|
|
2086
|
+
this.childTotals$ = new Observable();
|
|
2087
|
+
// initialize walker when graphService is available
|
|
2088
|
+
effect(() => {
|
|
2089
|
+
const service = this.graphService();
|
|
2090
|
+
console.log('GraphService effect triggered:', service);
|
|
2091
|
+
if (service && !this._walker) {
|
|
2092
|
+
console.log('Creating new GraphWalker');
|
|
2093
|
+
this._walker = new GraphWalker(service);
|
|
2094
|
+
this.setupObservables();
|
|
2095
|
+
}
|
|
2096
|
+
});
|
|
2097
|
+
effect(() => {
|
|
2098
|
+
const id = this.nodeId();
|
|
2099
|
+
console.log('NodeId effect triggered:', id);
|
|
2100
|
+
if (id && this._walker) {
|
|
2101
|
+
console.log('Calling reset with id:', id);
|
|
2102
|
+
this.reset(id);
|
|
2103
|
+
}
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
2106
|
+
setupObservables() {
|
|
2107
|
+
if (!this._walker)
|
|
2108
|
+
return;
|
|
1395
2109
|
this.nodes$ = this._walker.nodes$;
|
|
1396
2110
|
this.edges$ = this._walker.edges$;
|
|
1397
2111
|
this.loading$ = this._walker.loading$;
|
|
@@ -1403,11 +2117,12 @@ class GraphWalkerComponent {
|
|
|
1403
2117
|
this.nOutFilter$ = this._walker.nOutFilter$;
|
|
1404
2118
|
this.nInFilter$ = this._walker.nInFilter$;
|
|
1405
2119
|
this.childTotals$ = this._walker.childTotals$;
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
2120
|
+
// add debugging
|
|
2121
|
+
this.nodes$.subscribe((nodes) => {
|
|
2122
|
+
console.log('GraphWalker nodes updated:', nodes);
|
|
2123
|
+
});
|
|
2124
|
+
this.edges$.subscribe((edges) => {
|
|
2125
|
+
console.log('GraphWalker edges updated:', edges);
|
|
1411
2126
|
});
|
|
1412
2127
|
}
|
|
1413
2128
|
ngOnInit() {
|
|
@@ -1419,10 +2134,18 @@ class GraphWalkerComponent {
|
|
|
1419
2134
|
this._sub?.unsubscribe();
|
|
1420
2135
|
}
|
|
1421
2136
|
onNodeSelect(node) {
|
|
1422
|
-
|
|
2137
|
+
if (node) {
|
|
2138
|
+
this._walker?.selectNode(node.id);
|
|
2139
|
+
}
|
|
1423
2140
|
}
|
|
1424
2141
|
reset(id) {
|
|
1425
|
-
|
|
2142
|
+
console.log('GraphWalker reset called with id:', id);
|
|
2143
|
+
if (this._walker) {
|
|
2144
|
+
this._walker.reset(id);
|
|
2145
|
+
}
|
|
2146
|
+
else {
|
|
2147
|
+
console.log('GraphWalker instance not available');
|
|
2148
|
+
}
|
|
1426
2149
|
}
|
|
1427
2150
|
onReset() {
|
|
1428
2151
|
if (!this.nodeId()) {
|
|
@@ -1438,25 +2161,28 @@ class GraphWalkerComponent {
|
|
|
1438
2161
|
});
|
|
1439
2162
|
}
|
|
1440
2163
|
onNodeDblClick(node) {
|
|
1441
|
-
this._walker
|
|
2164
|
+
this._walker?.toggleNode(node);
|
|
2165
|
+
}
|
|
2166
|
+
onGraphModeChange(mode) {
|
|
2167
|
+
this.graphMode = mode;
|
|
1442
2168
|
}
|
|
1443
2169
|
onPOutFilterChange(filter) {
|
|
1444
|
-
this._walker
|
|
2170
|
+
this._walker?.expandSelectedProperty(filter);
|
|
1445
2171
|
}
|
|
1446
2172
|
onPInFilterChange(filter) {
|
|
1447
|
-
this._walker
|
|
2173
|
+
this._walker?.expandSelectedProperty(null, filter);
|
|
1448
2174
|
}
|
|
1449
2175
|
onPLitFilterChange(filter) {
|
|
1450
|
-
this._walker
|
|
2176
|
+
this._walker?.expandSelectedProperty(null, null, filter);
|
|
1451
2177
|
}
|
|
1452
2178
|
onNOutFilterChange(filter) {
|
|
1453
|
-
this._walker
|
|
2179
|
+
this._walker?.expandSelectedNode(filter);
|
|
1454
2180
|
}
|
|
1455
2181
|
onNInFilterChange(filter) {
|
|
1456
|
-
this._walker
|
|
2182
|
+
this._walker?.expandSelectedNode(null, filter);
|
|
1457
2183
|
}
|
|
1458
2184
|
pickSelectedNode(event) {
|
|
1459
|
-
const node = this._walker
|
|
2185
|
+
const node = this._walker?.getSelectedNode();
|
|
1460
2186
|
if (!node) {
|
|
1461
2187
|
return;
|
|
1462
2188
|
}
|
|
@@ -1469,13 +2195,13 @@ class GraphWalkerComponent {
|
|
|
1469
2195
|
this.nodePick.emit(node);
|
|
1470
2196
|
}
|
|
1471
2197
|
}
|
|
1472
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: GraphWalkerComponent, isStandalone: true, selector: "cadmus-graph-walker", inputs: { nodeId: { classPropertyName: "nodeId", publicName: "nodeId", isSignal: true, isRequired: false, transformFunction: null }, canPick: { classPropertyName: "canPick", publicName: "canPick", isSignal: true, isRequired: false, transformFunction: null }, canMoveToSource: { classPropertyName: "canMoveToSource", publicName: "canMoveToSource", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodePick: "nodePick", moveToSource: "moveToSource" }, ngImport: i0, template: "<div id=\"container\">\r\n <!-- graph -->\r\n <div id=\"graph\">\r\n <ngx-graph\r\n class=\"chart-container\"\r\n [showMiniMap]=\"true\"\r\n [links]=\"(edges$ | async) || []\"\r\n [nodes]=\"(nodes$ | async) || []\"\r\n [update$]=\"update$\"\r\n [center$]=\"center$\"\r\n [zoomToFit$]=\"zoomToFit$\"\r\n layout=\"colaForceDirected\"\r\n (select)=\"onNodeSelect($event)\"\r\n >\r\n <ng-template #defsTemplate>\r\n <svg:marker\r\n id=\"arrow\"\r\n viewBox=\"0 -5 10 10\"\r\n refX=\"8\"\r\n refY=\"0\"\r\n markerWidth=\"4\"\r\n markerHeight=\"4\"\r\n orient=\"auto\"\r\n >\r\n <svg:path d=\"M0,-5L10,0L0,5\" class=\"arrow-head\" />\r\n </svg:marker>\r\n </ng-template>\r\n\r\n <!-- cluster template -->\r\n <ng-template #clusterTemplate let-cluster>\r\n <svg:g class=\"node cluster\">\r\n <svg:rect\r\n rx=\"5\"\r\n ry=\"5\"\r\n [attr.width]=\"cluster.dimension.width\"\r\n [attr.height]=\"cluster.dimension.height\"\r\n [attr.fill]=\"cluster.data.color\"\r\n />\r\n </svg:g>\r\n </ng-template>\r\n\r\n <!-- node template -->\r\n <ng-template #nodeTemplate let-node>\r\n <svg:g class=\"node\" (dblclick)=\"onNodeDblClick(node)\">\r\n <svg:rect\r\n [class.selected]=\"node.data?.selected\"\r\n [attr.width]=\"node.dimension.width\"\r\n [attr.height]=\"node.dimension.height\"\r\n [attr.fill]=\"node.data.customColor || node.data.color\"\r\n />\r\n <svg:text\r\n alignment-baseline=\"central\"\r\n [attr.x]=\"10\"\r\n [attr.y]=\"node.dimension.height / 2\"\r\n >\r\n {{ node.label }}\r\n </svg:text>\r\n </svg:g>\r\n </ng-template>\r\n\r\n <!-- link template -->\r\n <ng-template #linkTemplate let-link>\r\n <svg:g class=\"edge\">\r\n <svg:path\r\n class=\"line\"\r\n stroke-width=\"2\"\r\n marker-end=\"url(#arrow)\"\r\n ></svg:path>\r\n <svg:text class=\"edge-label\" text-anchor=\"middle\">\r\n <textPath\r\n class=\"text-path\"\r\n [attr.href]=\"'#' + link.id\"\r\n [style.dominant-baseline]=\"link.dominantBaseline\"\r\n startOffset=\"50%\"\r\n >\r\n {{ link.label }}\r\n </textPath>\r\n </svg:text>\r\n </svg:g>\r\n </ng-template>\r\n </ngx-graph>\r\n </div>\r\n\r\n <!-- tools -->\r\n <div id=\"tools\">\r\n <div id=\"bar\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Center\"\r\n (click)=\"center$.next(true)\"\r\n >\r\n <mat-icon>filter_center_focus</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Zoom to fit\"\r\n (click)=\"zoomToFit$.next({ force: true })\"\r\n >\r\n <mat-icon>fit_screen</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Reset\"\r\n (click)=\"update$.next(true)\"\r\n >\r\n <mat-icon class=\"mat-warn\">restart_alt</mat-icon>\r\n </button>\r\n @if (nodes$ | async; as nodes) {\r\n <span class=\"muted\"\r\n >N:{{ nodes.length }} E:{{ (edges$ | async)?.length }}</span\r\n >\r\n } @if (selectedNode$ | async; as selectedNode) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Toggle the selected node\"\r\n [disabled]=\"!selectedNode\"\r\n (click)=\"onNodeDblClick(selectedNode)\"\r\n >\r\n <mat-icon class=\"mat-primary\">unfold_more</mat-icon>\r\n </button>\r\n } @if (canPick()) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n canMoveToSource()\r\n ? 'Pick selected node or (shift) its source'\r\n : 'Pick the selected node'\r\n \"\r\n [disabled]=\"!(selectedNode$ | async)\"\r\n (click)=\"pickSelectedNode($event)\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n <!-- progress -->\r\n <div id=\"progress\">\r\n @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div id=\"filters\">\r\n @if (selectedNode$ | async; as node) {\r\n <div id=\"filter-head\">\r\n <span [style.color]=\"node.data.color || 'black'\">⬤</span>\r\n <span style=\"margin-left: 6px\" matTooltip=\"{{ node.data.uri }}\">{{\r\n node | graphNodeLabel\r\n }}</span>\r\n <span class=\"muted\" style=\"margin-left: 8px; font-size: 90%\">{{\r\n node.id\r\n }}</span>\r\n </div>\r\n }\r\n <mat-tab-group>\r\n <!-- N-outs -->\r\n @if (nOutFilter$ | async; as nOutFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n N<mat-icon>logout</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-triple-filter\r\n [filter]=\"nOutFilter\"\r\n (filterChange)=\"onNOutFilterChange($event)\"\r\n ></cadmus-walker-triple-filter>\r\n </mat-tab>\r\n }\r\n <!-- N-ins -->\r\n @if (nInFilter$ | async; as nInFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label> N<mat-icon>login</mat-icon> </ng-template>\r\n <cadmus-walker-triple-filter\r\n [filter]=\"nInFilter\"\r\n (filterChange)=\"onNInFilterChange($event)\"\r\n ></cadmus-walker-triple-filter>\r\n </mat-tab>\r\n }\r\n <!-- P-outs -->\r\n @if (pOutFilter$ | async; as pOutFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n P<mat-icon>logout</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-linked-node-filter\r\n [filter]=\"pOutFilter\"\r\n (filterChange)=\"onPOutFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n <!-- P-ins -->\r\n @if (pInFilter$ | async; as pInFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label> P<mat-icon>login</mat-icon> </ng-template>\r\n <cadmus-walker-linked-node-filter\r\n [filter]=\"pInFilter\"\r\n (filterChange)=\"onPInFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n <!-- P-lit -->\r\n @if (pLitFilter$ | async; as pLitFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n P<mat-icon>exit_to_app</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-linked-literal-filter\r\n [filter]=\"pLitFilter\"\r\n (filterChange)=\"onPLitFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["div#filter-head{border:1px solid #f8f1ae;border-radius:4px;padding:4px;margin-bottom:4px;background-color:#f8f1ae;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.muted{color:silver}.selected{stroke-width:2px;stroke:#e7d211}#container{width:100%;max-width:100%;height:100%;max-height:100%;display:grid;grid-template-rows:1fr;grid-template-columns:auto 1fr;grid-template-areas:\"tools graph\";gap:8px}#graph{grid-area:graph}#tools{grid-area:tools;padding:8px;border:1px solid silver;height:100%;max-height:100%;min-width:324px;background-color:#fdfdfd}#tools #bar{display:flex;align-items:center;flex-wrap:wrap}@media only screen and (max-width: 959px){#container{grid-template-rows:auto 1fr;grid-template-columns:1fr;grid-template-areas:\"tools\" \"graph\"}}\n"], dependencies: [{ kind: "ngmodule", type: GraphModule }, { kind: "component", type: i3$1.GraphComponent, selector: "ngx-graph", inputs: ["nodes", "clusters", "compoundNodes", "links", "activeEntries", "curve", "draggingEnabled", "nodeHeight", "nodeMaxHeight", "nodeMinHeight", "nodeWidth", "nodeMinWidth", "nodeMaxWidth", "panningEnabled", "panningAxis", "enableZoom", "zoomSpeed", "minZoomLevel", "maxZoomLevel", "autoZoom", "panOnZoom", "animate", "autoCenter", "update$", "center$", "zoomToFit$", "panToNode$", "layout", "layoutSettings", "enableTrackpadSupport", "showMiniMap", "miniMapMaxWidth", "miniMapMaxHeight", "miniMapPosition", "view", "scheme", "customColors", "deferDisplayUntilPosition", "centerNodesOnPositionChange", "enablePreUpdateTransform", "groupResultsBy", "zoomLevel", "panOffsetX", "panOffsetY"], outputs: ["select", "activate", "deactivate", "zoomChange", "clickHandler", "stateChange"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "directive", type: MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: TripleFilterComponent, selector: "cadmus-walker-triple-filter", inputs: ["disabled", "hasPager", "total", "filter"], outputs: ["filterChange"] }, { kind: "component", type: LinkedNodeFilterComponent, selector: "cadmus-walker-linked-node-filter", inputs: ["disabled", "hasPager", "total", "filter"], outputs: ["filterChange"] }, { kind: "component", type: LinkedLiteralFilterComponent, selector: "cadmus-walker-linked-literal-filter", inputs: ["disabled", "hasPager", "total", "filter"], outputs: ["filterChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: GraphNodeLabelPipe, name: "graphNodeLabel" }] });
|
|
2198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: GraphWalkerComponent, deps: [{ token: i1$2.DialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2199
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: GraphWalkerComponent, isStandalone: true, selector: "cadmus-graph-walker", inputs: { nodeId: { classPropertyName: "nodeId", publicName: "nodeId", isSignal: true, isRequired: false, transformFunction: null }, graphService: { classPropertyName: "graphService", publicName: "graphService", isSignal: true, isRequired: false, transformFunction: null }, canPick: { classPropertyName: "canPick", publicName: "canPick", isSignal: true, isRequired: false, transformFunction: null }, canMoveToSource: { classPropertyName: "canMoveToSource", publicName: "canMoveToSource", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodePick: "nodePick", moveToSource: "moveToSource" }, ngImport: i0, template: "<div id=\"container\">\r\n <!-- graph -->\r\n <div id=\"graph\">\r\n <cadmus-force-graph-renderer\r\n [nodes]=\"(nodes$ | async) || []\"\r\n [edges]=\"(edges$ | async) || []\"\r\n [mode]=\"graphMode\"\r\n [update$]=\"update$\"\r\n [center$]=\"center$\"\r\n [zoomToFit$]=\"zoomToFit$\"\r\n (nodeSelect)=\"onNodeSelect($event)\"\r\n (nodeDoubleClick)=\"onNodeDblClick($event)\"\r\n (modeChange)=\"onGraphModeChange($event)\"\r\n />\r\n </div>\r\n\r\n <!-- tools -->\r\n <div id=\"tools\">\r\n <div id=\"bar\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Center\"\r\n (click)=\"center$.next(true)\"\r\n >\r\n <mat-icon>filter_center_focus</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Zoom to fit\"\r\n (click)=\"zoomToFit$.next({ force: true })\"\r\n >\r\n <mat-icon>fit_screen</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Reset\"\r\n (click)=\"update$.next(true)\"\r\n >\r\n <mat-icon class=\"mat-warn\">restart_alt</mat-icon>\r\n </button>\r\n @if (nodes$ | async; as nodes) {\r\n <span class=\"muted\"\r\n >N:{{ nodes.length }} E:{{ (edges$ | async)?.length }}</span\r\n >\r\n } @if (selectedNode$ | async; as selectedNode) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Toggle the selected node\"\r\n [disabled]=\"!selectedNode\"\r\n (click)=\"onNodeDblClick(selectedNode)\"\r\n >\r\n <mat-icon class=\"mat-primary\">unfold_more</mat-icon>\r\n </button>\r\n } @if (canPick()) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n canMoveToSource()\r\n ? 'Pick selected node or (shift) its source'\r\n : 'Pick the selected node'\r\n \"\r\n [disabled]=\"!(selectedNode$ | async)\"\r\n (click)=\"pickSelectedNode($event)\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n <!-- progress -->\r\n <div id=\"progress\">\r\n @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div id=\"filters\">\r\n @if (selectedNode$ | async; as node) {\r\n <div id=\"filter-head\">\r\n <span [style.color]=\"node.data.color || 'black'\">⬤</span>\r\n <span class=\"node-uri\" matTooltip=\"{{ node.data.uri }}\">{{\r\n node | graphNodeLabel\r\n }}</span>\r\n <span class=\"muted node-id\">{{\r\n node.id\r\n }}</span>\r\n </div>\r\n }\r\n <mat-tab-group>\r\n <!-- N-outs -->\r\n @if (nOutFilter$ | async; as nOutFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n N<mat-icon>logout</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-triple-filter\r\n [filter]=\"nOutFilter\"\r\n (filterChange)=\"onNOutFilterChange($event)\"\r\n ></cadmus-walker-triple-filter>\r\n </mat-tab>\r\n }\r\n <!-- N-ins -->\r\n @if (nInFilter$ | async; as nInFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label> N<mat-icon>login</mat-icon> </ng-template>\r\n <cadmus-walker-triple-filter\r\n [filter]=\"nInFilter\"\r\n (filterChange)=\"onNInFilterChange($event)\"\r\n ></cadmus-walker-triple-filter>\r\n </mat-tab>\r\n }\r\n <!-- P-outs -->\r\n @if (pOutFilter$ | async; as pOutFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n P<mat-icon>logout</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-linked-node-filter\r\n [filter]=\"pOutFilter\"\r\n (filterChange)=\"onPOutFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n <!-- P-ins -->\r\n @if (pInFilter$ | async; as pInFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label> P<mat-icon>login</mat-icon> </ng-template>\r\n <cadmus-walker-linked-node-filter\r\n [filter]=\"pInFilter\"\r\n (filterChange)=\"onPInFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n <!-- P-lit -->\r\n @if (pLitFilter$ | async; as pLitFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n P<mat-icon>exit_to_app</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-linked-literal-filter\r\n [filter]=\"pLitFilter\"\r\n (filterChange)=\"onPLitFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["div#filter-head{border:1px solid #f8f1ae;border-radius:4px;padding:4px;margin-bottom:4px;background-color:#f8f1ae;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.muted{color:silver}.node-uri{margin-left:6px}.node-id{margin-left:8px;font-size:90%}.selected{stroke-width:2px;stroke:#e7d211}#container{width:100%;max-width:100%;height:100vh;max-height:100vh;display:grid;grid-template-rows:1fr;grid-template-columns:324px 1fr;grid-template-areas:\"tools graph\";gap:8px}#graph{grid-area:graph;min-height:500px}#tools{grid-area:tools;padding:8px;border:1px solid silver;height:100%;max-height:100%;min-width:324px;max-width:324px;background-color:#fdfdfd;overflow-y:auto}#tools #bar{display:flex;align-items:center;flex-wrap:wrap}@media only screen and (max-width: 959px){#container{height:100vh;grid-template-rows:auto 1fr;grid-template-columns:1fr;grid-template-areas:\"tools\" \"graph\"}#graph{min-height:400px}}\n"], dependencies: [{ kind: "component", type: ForceGraphRendererComponent, selector: "cadmus-force-graph-renderer", inputs: ["nodes", "edges", "mode", "update$", "center$", "zoomToFit$"], outputs: ["nodeSelect", "nodeDoubleClick", "modeChange"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "directive", type: MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: TripleFilterComponent, selector: "cadmus-walker-triple-filter", inputs: ["disabled", "hasPager", "total", "filter"], outputs: ["filterChange"] }, { kind: "component", type: LinkedNodeFilterComponent, selector: "cadmus-walker-linked-node-filter", inputs: ["disabled", "hasPager", "total", "filter"], outputs: ["filterChange"] }, { kind: "component", type: LinkedLiteralFilterComponent, selector: "cadmus-walker-linked-literal-filter", inputs: ["disabled", "hasPager", "total", "filter"], outputs: ["filterChange"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: GraphNodeLabelPipe, name: "graphNodeLabel" }] });
|
|
1474
2200
|
}
|
|
1475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: GraphWalkerComponent, decorators: [{
|
|
1476
2202
|
type: Component,
|
|
1477
2203
|
args: [{ selector: 'cadmus-graph-walker', imports: [
|
|
1478
|
-
|
|
2204
|
+
ForceGraphRendererComponent,
|
|
1479
2205
|
MatIconButton,
|
|
1480
2206
|
MatTooltip,
|
|
1481
2207
|
MatIcon,
|
|
@@ -1488,8 +2214,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
1488
2214
|
LinkedLiteralFilterComponent,
|
|
1489
2215
|
AsyncPipe,
|
|
1490
2216
|
GraphNodeLabelPipe,
|
|
1491
|
-
], template: "<div id=\"container\">\r\n <!-- graph -->\r\n <div id=\"graph\">\r\n <
|
|
1492
|
-
}], ctorParameters: () => [{ type:
|
|
2217
|
+
], template: "<div id=\"container\">\r\n <!-- graph -->\r\n <div id=\"graph\">\r\n <cadmus-force-graph-renderer\r\n [nodes]=\"(nodes$ | async) || []\"\r\n [edges]=\"(edges$ | async) || []\"\r\n [mode]=\"graphMode\"\r\n [update$]=\"update$\"\r\n [center$]=\"center$\"\r\n [zoomToFit$]=\"zoomToFit$\"\r\n (nodeSelect)=\"onNodeSelect($event)\"\r\n (nodeDoubleClick)=\"onNodeDblClick($event)\"\r\n (modeChange)=\"onGraphModeChange($event)\"\r\n />\r\n </div>\r\n\r\n <!-- tools -->\r\n <div id=\"tools\">\r\n <div id=\"bar\">\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Center\"\r\n (click)=\"center$.next(true)\"\r\n >\r\n <mat-icon>filter_center_focus</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Zoom to fit\"\r\n (click)=\"zoomToFit$.next({ force: true })\"\r\n >\r\n <mat-icon>fit_screen</mat-icon>\r\n </button>\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Reset\"\r\n (click)=\"update$.next(true)\"\r\n >\r\n <mat-icon class=\"mat-warn\">restart_alt</mat-icon>\r\n </button>\r\n @if (nodes$ | async; as nodes) {\r\n <span class=\"muted\"\r\n >N:{{ nodes.length }} E:{{ (edges$ | async)?.length }}</span\r\n >\r\n } @if (selectedNode$ | async; as selectedNode) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n matTooltip=\"Toggle the selected node\"\r\n [disabled]=\"!selectedNode\"\r\n (click)=\"onNodeDblClick(selectedNode)\"\r\n >\r\n <mat-icon class=\"mat-primary\">unfold_more</mat-icon>\r\n </button>\r\n } @if (canPick()) {\r\n <button\r\n type=\"button\"\r\n mat-icon-button\r\n [matTooltip]=\"\r\n canMoveToSource()\r\n ? 'Pick selected node or (shift) its source'\r\n : 'Pick the selected node'\r\n \"\r\n [disabled]=\"!(selectedNode$ | async)\"\r\n (click)=\"pickSelectedNode($event)\"\r\n >\r\n <mat-icon class=\"mat-primary\">check_circle</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n <!-- progress -->\r\n <div id=\"progress\">\r\n @if (loading$ | async) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n }\r\n </div>\r\n <div id=\"filters\">\r\n @if (selectedNode$ | async; as node) {\r\n <div id=\"filter-head\">\r\n <span [style.color]=\"node.data.color || 'black'\">⬤</span>\r\n <span class=\"node-uri\" matTooltip=\"{{ node.data.uri }}\">{{\r\n node | graphNodeLabel\r\n }}</span>\r\n <span class=\"muted node-id\">{{\r\n node.id\r\n }}</span>\r\n </div>\r\n }\r\n <mat-tab-group>\r\n <!-- N-outs -->\r\n @if (nOutFilter$ | async; as nOutFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n N<mat-icon>logout</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-triple-filter\r\n [filter]=\"nOutFilter\"\r\n (filterChange)=\"onNOutFilterChange($event)\"\r\n ></cadmus-walker-triple-filter>\r\n </mat-tab>\r\n }\r\n <!-- N-ins -->\r\n @if (nInFilter$ | async; as nInFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label> N<mat-icon>login</mat-icon> </ng-template>\r\n <cadmus-walker-triple-filter\r\n [filter]=\"nInFilter\"\r\n (filterChange)=\"onNInFilterChange($event)\"\r\n ></cadmus-walker-triple-filter>\r\n </mat-tab>\r\n }\r\n <!-- P-outs -->\r\n @if (pOutFilter$ | async; as pOutFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n P<mat-icon>logout</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-linked-node-filter\r\n [filter]=\"pOutFilter\"\r\n (filterChange)=\"onPOutFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n <!-- P-ins -->\r\n @if (pInFilter$ | async; as pInFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label> P<mat-icon>login</mat-icon> </ng-template>\r\n <cadmus-walker-linked-node-filter\r\n [filter]=\"pInFilter\"\r\n (filterChange)=\"onPInFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n <!-- P-lit -->\r\n @if (pLitFilter$ | async; as pLitFilter) {\r\n <mat-tab>\r\n <ng-template mat-tab-label>\r\n P<mat-icon>exit_to_app</mat-icon>\r\n </ng-template>\r\n <cadmus-walker-linked-literal-filter\r\n [filter]=\"pLitFilter\"\r\n (filterChange)=\"onPLitFilterChange($event)\"\r\n />\r\n </mat-tab>\r\n }\r\n </mat-tab-group>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: ["div#filter-head{border:1px solid #f8f1ae;border-radius:4px;padding:4px;margin-bottom:4px;background-color:#f8f1ae;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.muted{color:silver}.node-uri{margin-left:6px}.node-id{margin-left:8px;font-size:90%}.selected{stroke-width:2px;stroke:#e7d211}#container{width:100%;max-width:100%;height:100vh;max-height:100vh;display:grid;grid-template-rows:1fr;grid-template-columns:324px 1fr;grid-template-areas:\"tools graph\";gap:8px}#graph{grid-area:graph;min-height:500px}#tools{grid-area:tools;padding:8px;border:1px solid silver;height:100%;max-height:100%;min-width:324px;max-width:324px;background-color:#fdfdfd;overflow-y:auto}#tools #bar{display:flex;align-items:center;flex-wrap:wrap}@media only screen and (max-width: 959px){#container{height:100vh;grid-template-rows:auto 1fr;grid-template-columns:1fr;grid-template-areas:\"tools\" \"graph\"}#graph{min-height:400px}}\n"] }]
|
|
2218
|
+
}], ctorParameters: () => [{ type: i1$2.DialogService }] });
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* Graph interfaces to replace ngx-graph types
|
|
2222
|
+
*/
|
|
1493
2223
|
|
|
1494
2224
|
/*
|
|
1495
2225
|
* Public API Surface of cadmus-graph-ui-ex
|
|
@@ -1499,5 +2229,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImpor
|
|
|
1499
2229
|
* Generated bundle index. Do not edit.
|
|
1500
2230
|
*/
|
|
1501
2231
|
|
|
1502
|
-
export { GraphNodeLabelPipe, GraphWalker, GraphWalkerComponent, LinkedLiteralFilterComponent, LinkedNodeFilterComponent, TripleFilterComponent };
|
|
2232
|
+
export { ForceGraphRendererComponent, GraphNodeLabelPipe, GraphWalker, GraphWalkerComponent, LinkedLiteralFilterComponent, LinkedNodeFilterComponent, TripleFilterComponent };
|
|
1503
2233
|
//# sourceMappingURL=myrmidon-cadmus-graph-ui-ex.mjs.map
|