@thatopen/services 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -59
- package/dist/built-in/index.d.ts +486 -563
- package/dist/cli.js +10 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +3 -5
- package/dist/vite-env.d.ts +1 -1
- package/docs/builtin/paths.json +74 -70
- package/docs/cli/create.md +28 -28
- package/docs/cli/local-server.md +38 -38
- package/docs/cli/login.md +32 -32
- package/docs/cli/publish.md +31 -31
- package/docs/cli/run.md +26 -26
- package/docs/cli/serve.md +43 -43
- package/docs/cli/swap.md +30 -30
- package/package.json +100 -100
- package/resources/AGENTS.md +40 -40
- package/src/built-in/CDEManager/example.ts +214 -214
- package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
- package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
- package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
- package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
- package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
- package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
- package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
- package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
- package/src/built-in/UIManager/src/app/example.ts +99 -99
- package/src/built-in/UIManager/src/app/examples/AppState/example.ts +142 -142
- package/src/built-in/UIManager/src/app/examples/Banner/example.ts +161 -0
- package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +125 -125
- package/src/built-in/UIManager/src/app/examples/FileDrop/example.ts +126 -0
- package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +92 -92
- package/src/built-in/UIManager/src/app/examples/Modal/example.ts +165 -0
- package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +135 -161
- package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +104 -104
- package/src/built-in/index.ts +649 -755
- package/src/cli/templates/app/README.md +241 -241
- package/src/cli/templates/app/index.html +35 -27
- package/src/cli/templates/app/package.json +31 -27
- package/src/cli/templates/app/src/app.ts +37 -0
- package/src/cli/templates/app/src/assets/tool-placeholder.ts +50 -0
- package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +95 -87
- package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
- package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
- package/src/cli/templates/app/src/bim-components/index.ts +1 -1
- package/src/cli/templates/app/src/globals.ts +1 -0
- package/src/cli/templates/app/src/main.ts +340 -56
- package/src/cli/templates/app/src/setups/active-tool-hud.ts +69 -0
- package/src/cli/templates/app/src/setups/camera-tools.ts +63 -0
- package/src/cli/templates/app/src/setups/camera-views.ts +201 -0
- package/src/cli/templates/app/src/setups/card-header.ts +35 -0
- package/src/cli/templates/app/src/setups/clipper-panel.ts +167 -0
- package/src/cli/templates/app/src/setups/clipper-tool.ts +754 -0
- package/src/cli/templates/app/src/setups/clipper.ts +75 -0
- package/src/cli/templates/app/src/setups/cloud-runner.ts +13 -9
- package/src/cli/templates/app/src/setups/commands-panel.ts +239 -0
- package/src/cli/templates/app/src/setups/data-table-panel.ts +2224 -0
- package/src/cli/templates/app/src/setups/exploded-view.ts +246 -0
- package/src/cli/templates/app/src/setups/file-format-icons.ts +95 -0
- package/src/cli/templates/app/src/setups/files-panel.ts +1503 -0
- package/src/cli/templates/app/src/setups/fps-indicator.ts +63 -0
- package/src/cli/templates/app/src/setups/graphics-panel.ts +490 -0
- package/src/cli/templates/app/src/setups/helper-panel.ts +88 -0
- package/src/cli/templates/app/src/setups/hider.ts +98 -0
- package/src/cli/templates/app/src/setups/index.ts +33 -3
- package/src/cli/templates/app/src/setups/inspection.ts +136 -0
- package/src/cli/templates/app/src/setups/measurement-panel.ts +188 -0
- package/src/cli/templates/app/src/setups/measurement-settings-panel.ts +161 -0
- package/src/cli/templates/app/src/setups/measurement-tool.ts +570 -0
- package/src/cli/templates/app/src/setups/measurements.ts +133 -0
- package/src/cli/templates/app/src/setups/model-tree.ts +797 -0
- package/src/cli/templates/app/src/setups/navigation-gizmo.ts +316 -0
- package/src/cli/templates/app/src/setups/objects-panel.ts +127 -0
- package/src/cli/templates/app/src/setups/plans-panel.ts +619 -0
- package/src/cli/templates/app/src/setups/properties-panel.ts +1048 -0
- package/src/cli/templates/app/src/setups/reality-capture/lib/hidden-tiles-plugin.ts +88 -0
- package/src/cli/templates/app/src/setups/reality-capture/lib/point-tile-plugin.ts +166 -0
- package/src/cli/templates/app/src/setups/reality-capture/lib/render-frame.ts +31 -0
- package/src/cli/templates/app/src/setups/reality-capture/lib/splat-tile-plugin.ts +51 -0
- package/src/cli/templates/app/src/setups/reality-capture-viewer.ts +1383 -0
- package/src/cli/templates/app/src/setups/right-sidebar.ts +178 -0
- package/src/cli/templates/app/src/setups/settings-panel.ts +94 -0
- package/src/cli/templates/app/src/setups/styles-panel.ts +110 -0
- package/src/cli/templates/app/src/setups/styles.ts +375 -0
- package/src/cli/templates/app/src/setups/tool-mode-manager.ts +150 -0
- package/src/cli/templates/app/src/setups/tool-mode.ts +23 -0
- package/src/cli/templates/app/src/setups/toolbar.ts +229 -0
- package/src/cli/templates/app/src/setups/ui-manager.ts +27 -0
- package/src/cli/templates/app/src/setups/visibility-toolbar.ts +498 -0
- package/src/cli/templates/app/src/setups/walkthrough.ts +528 -0
- package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +26 -0
- package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +1 -0
- package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +15 -0
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +37 -0
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +1 -0
- package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +14 -0
- package/src/cli/templates/app/src/ui-components/index.ts +2 -1
- package/src/cli/templates/app/tsconfig.json +16 -17
- package/src/cli/templates/app/vite.config.js +45 -42
- package/src/cli/templates/cloud-component/README.md +205 -205
- package/src/cli/templates/cloud-component/_thatopen +5 -5
- package/src/cli/templates/cloud-component/declarations.json +4 -4
- package/src/cli/templates/cloud-component/package.json +21 -21
- package/src/cli/templates/cloud-component/src/main.ts +70 -70
- package/src/cli/templates/cloud-component/tsconfig.json +16 -16
- package/src/cli/templates/cloud-component/vite.config.js +46 -46
- package/src/cli/templates/shared/AGENTS.md +8 -8
- package/src/cli/templates/shared/CLAUDE.md +1 -1
- package/src/cli/templates/shared/_gitignore +5 -5
- package/src/built-in/AppManager/example.ts +0 -86
- package/src/built-in/FileList/example.ts +0 -107
- package/src/built-in/TabbedNavigation/example.ts +0 -115
- package/src/built-in/ViewportsManager/example.ts +0 -106
- package/src/cli/templates/app/src/setups/fragments.ts +0 -18
- package/src/cli/templates/app/src/setups/ifc-loader.ts +0 -12
- package/src/cli/templates/app/src/ui-components/AppPanel/index.ts +0 -160
package/src/built-in/index.ts
CHANGED
|
@@ -1,755 +1,649 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars */
|
|
2
|
-
/**
|
|
3
|
-
* Built-in component types and runtime stubs.
|
|
4
|
-
* Auto-generated by platform_builtin-components/scripts/distribute-types.mjs
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type * as OBC from '@thatopen/components';
|
|
8
|
-
import type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
components: OBC.Components;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
export
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
export
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
export
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
* Optional configuration when creating a viewport instance.
|
|
651
|
-
*/
|
|
652
|
-
export interface ViewportConfig {
|
|
653
|
-
/** Background color for the scene. Set to `null` for transparent. Defaults to `null`. */
|
|
654
|
-
backgroundColor?: THREE.ColorRepresentation | null;
|
|
655
|
-
/** Grid color. Defaults to `"lightgray"`. */
|
|
656
|
-
gridColor?: THREE.ColorRepresentation;
|
|
657
|
-
/** Setup for the floating grid in the viewport. Useful for toolbars. */
|
|
658
|
-
floatingToolbarsSetup?: (state: ViewportFloatingGridToolbarState) => FloatingGridToolbars;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* Built-in component that creates 3D viewports with a pre-configured
|
|
663
|
-
* world (scene, camera, renderer) and fragments manager.
|
|
664
|
-
*
|
|
665
|
-
* ViewportManager is a factory: each call to {@link create} returns a
|
|
666
|
-
* new independent viewport with its own world. The component tracks all
|
|
667
|
-
* created instances and cleans them up on {@link dispose}.
|
|
668
|
-
*
|
|
669
|
-
* @example
|
|
670
|
-
* ```ts
|
|
671
|
-
* const viewports = components.get(ViewportManager);
|
|
672
|
-
* const { element, world } = await viewports.create();
|
|
673
|
-
*
|
|
674
|
-
* // Use `element` as a slot in AppManager
|
|
675
|
-
* app.setup = {
|
|
676
|
-
* elements: { viewer: element },
|
|
677
|
-
* layouts: { Main: { template: `"viewer" 1fr / 1fr` } },
|
|
678
|
-
* };
|
|
679
|
-
* ```
|
|
680
|
-
*/
|
|
681
|
-
declare class _ViewportsManager extends OBC.Component {
|
|
682
|
-
static readonly uuid: "def81d43-6b44-4f4a-9c08-7649486112a4";
|
|
683
|
-
enabled: boolean;
|
|
684
|
-
readonly name = "ViewportManager";
|
|
685
|
-
private _instances;
|
|
686
|
-
private _fragmentsInitialized;
|
|
687
|
-
/**
|
|
688
|
-
* Creates a new viewport instance with its own world, scene, camera,
|
|
689
|
-
* and renderer. Fragments manager is initialised automatically on
|
|
690
|
-
* the first call.
|
|
691
|
-
*
|
|
692
|
-
* @param config - Optional visual configuration for the viewport.
|
|
693
|
-
* @returns A {@link ViewportInstance} containing the DOM element and world.
|
|
694
|
-
*/
|
|
695
|
-
create(config?: ViewportConfig): Promise<ViewportInstance>;
|
|
696
|
-
private setupFloatingGrid;
|
|
697
|
-
/**
|
|
698
|
-
* Disposes all created viewport instances and their worlds.
|
|
699
|
-
*/
|
|
700
|
-
dispose(): void;
|
|
701
|
-
/**
|
|
702
|
-
* Initialises the fragments manager if not yet done, and wires up
|
|
703
|
-
* model loading for the given world.
|
|
704
|
-
*/
|
|
705
|
-
private _initFragments;
|
|
706
|
-
/**
|
|
707
|
-
* Grows the camera's far plane so it always encompasses every loaded
|
|
708
|
-
* model. Without this, large models clip against the default far plane
|
|
709
|
-
* and disappear from view.
|
|
710
|
-
*/
|
|
711
|
-
private _expandCameraFar;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* Built-in component that creates 3D viewports with a pre-configured
|
|
716
|
-
* world (scene, camera, renderer) and fragments manager.
|
|
717
|
-
*
|
|
718
|
-
* ViewportManager is a factory: each call to {@link create} returns a
|
|
719
|
-
* new independent viewport with its own world. The component tracks all
|
|
720
|
-
* created instances and cleans them up on {@link dispose}.
|
|
721
|
-
*
|
|
722
|
-
* @example
|
|
723
|
-
* ```ts
|
|
724
|
-
* const viewports = components.get(ViewportManager);
|
|
725
|
-
* const { element, world } = await viewports.create();
|
|
726
|
-
*
|
|
727
|
-
* // Use `element` as a slot in AppManager
|
|
728
|
-
* app.setup = {
|
|
729
|
-
* elements: { viewer: element },
|
|
730
|
-
* layouts: { Main: { template: `"viewer" 1fr / 1fr` } },
|
|
731
|
-
* };
|
|
732
|
-
* ```
|
|
733
|
-
*/
|
|
734
|
-
export type ViewportsManager = InstanceType<typeof _ViewportsManager>;
|
|
735
|
-
/**
|
|
736
|
-
* Built-in component that creates 3D viewports with a pre-configured
|
|
737
|
-
* world (scene, camera, renderer) and fragments manager.
|
|
738
|
-
*
|
|
739
|
-
* ViewportManager is a factory: each call to {@link create} returns a
|
|
740
|
-
* new independent viewport with its own world. The component tracks all
|
|
741
|
-
* created instances and cleans them up on {@link dispose}.
|
|
742
|
-
*
|
|
743
|
-
* @example
|
|
744
|
-
* ```ts
|
|
745
|
-
* const viewports = components.get(ViewportManager);
|
|
746
|
-
* const { element, world } = await viewports.create();
|
|
747
|
-
*
|
|
748
|
-
* // Use `element` as a slot in AppManager
|
|
749
|
-
* app.setup = {
|
|
750
|
-
* elements: { viewer: element },
|
|
751
|
-
* layouts: { Main: { template: `"viewer" 1fr / 1fr` } },
|
|
752
|
-
* };
|
|
753
|
-
* ```
|
|
754
|
-
*/
|
|
755
|
-
export const ViewportsManager = { uuid: 'def81d43-6b44-4f4a-9c08-7649486112a4' } as typeof _ViewportsManager & { uuid: 'def81d43-6b44-4f4a-9c08-7649486112a4' };
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars */
|
|
2
|
+
/**
|
|
3
|
+
* Built-in component types and runtime stubs.
|
|
4
|
+
* Auto-generated by platform_builtin-components/scripts/distribute-types.mjs
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type * as OBC from '@thatopen/components';
|
|
8
|
+
import type { EngineServicesClient, Item, ItemFolder, ItemVersion, PlatformClient } from '../';
|
|
9
|
+
|
|
10
|
+
export interface CDEContext {
|
|
11
|
+
client: PlatformClient;
|
|
12
|
+
projectId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CDEUserPermissions {
|
|
15
|
+
canRead: boolean;
|
|
16
|
+
canCreate: boolean;
|
|
17
|
+
canUpdate: boolean;
|
|
18
|
+
canDelete: boolean;
|
|
19
|
+
canManage: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type CDEMetadataValue = string | number | boolean | null;
|
|
22
|
+
export interface CDENamingSegment {
|
|
23
|
+
key: string;
|
|
24
|
+
config?: {
|
|
25
|
+
transform: (value: CDEMetadataValue) => string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface CDENamingSchema {
|
|
29
|
+
separator: string;
|
|
30
|
+
segments: CDENamingSegment[];
|
|
31
|
+
}
|
|
32
|
+
export interface CDEFile extends Omit<Item, 'creatingUser'> {
|
|
33
|
+
createdBy: string;
|
|
34
|
+
metadata: Record<string, CDEMetadataValue>;
|
|
35
|
+
versions?: ItemVersion[];
|
|
36
|
+
/** Tag of the file's current version (set by CDEManager from the loaded version). */
|
|
37
|
+
versionTag?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface CDEMetadataField {
|
|
40
|
+
type: "string" | "number" | "boolean" | "list";
|
|
41
|
+
description?: string;
|
|
42
|
+
required?: boolean;
|
|
43
|
+
label: string;
|
|
44
|
+
icon?: string;
|
|
45
|
+
options?: {
|
|
46
|
+
value: string | number | boolean;
|
|
47
|
+
label: string;
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
export type CDEMetadataSchema = Record<string, CDEMetadataField>;
|
|
51
|
+
export interface CDEFileActivity {
|
|
52
|
+
user: string;
|
|
53
|
+
action: string;
|
|
54
|
+
timestamp: string;
|
|
55
|
+
}
|
|
56
|
+
export interface CDEFileHistoryEntry {
|
|
57
|
+
fileId: string;
|
|
58
|
+
activity: CDEFileActivity[];
|
|
59
|
+
}
|
|
60
|
+
export interface CDEMetadataView {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
fields: string[];
|
|
64
|
+
}
|
|
65
|
+
export type CDEPendingMetadata = Record<string, CDEMetadataValue>;
|
|
66
|
+
export type CDEPendingMetadataSchemaEdits = Record<string, CDEMetadataField | null>;
|
|
67
|
+
export type FolderPendingChange = {
|
|
68
|
+
kind: "create";
|
|
69
|
+
tempId: string;
|
|
70
|
+
name: string;
|
|
71
|
+
parentId: string | null;
|
|
72
|
+
} | {
|
|
73
|
+
kind: "rename";
|
|
74
|
+
folderId: string;
|
|
75
|
+
name: string;
|
|
76
|
+
} | {
|
|
77
|
+
kind: "archive";
|
|
78
|
+
folderId: string;
|
|
79
|
+
};
|
|
80
|
+
export type FolderPendingChanges = FolderPendingChange[];
|
|
81
|
+
export type CDEViewFileStatus = "loading" | "ready" | "failed" | "cancelled";
|
|
82
|
+
export type CDEMachineState = {
|
|
83
|
+
kind: "idle";
|
|
84
|
+
} | {
|
|
85
|
+
kind: "loading";
|
|
86
|
+
} | {
|
|
87
|
+
kind: "uploading";
|
|
88
|
+
} | {
|
|
89
|
+
kind: "preparing";
|
|
90
|
+
files: CDEFile[];
|
|
91
|
+
} | {
|
|
92
|
+
kind: "selected";
|
|
93
|
+
files: CDEFile[];
|
|
94
|
+
} | {
|
|
95
|
+
kind: "viewing";
|
|
96
|
+
files: CDEFile[];
|
|
97
|
+
fileStatus: Record<string, CDEViewFileStatus>;
|
|
98
|
+
selectedFiles?: CDEFile[];
|
|
99
|
+
} | {
|
|
100
|
+
kind: "editing";
|
|
101
|
+
files: CDEFile[];
|
|
102
|
+
pendingMetadata: CDEPendingMetadata;
|
|
103
|
+
} | {
|
|
104
|
+
kind: "saving";
|
|
105
|
+
files: CDEFile[];
|
|
106
|
+
pendingMetadata: CDEPendingMetadata;
|
|
107
|
+
} | {
|
|
108
|
+
kind: "deleting";
|
|
109
|
+
files: CDEFile[];
|
|
110
|
+
} | {
|
|
111
|
+
kind: "configuringMetadataSchema";
|
|
112
|
+
pendingEdits: CDEPendingMetadataSchemaEdits;
|
|
113
|
+
} | {
|
|
114
|
+
kind: "savingMetadataSchema";
|
|
115
|
+
pendingEdits: CDEPendingMetadataSchemaEdits;
|
|
116
|
+
} | {
|
|
117
|
+
kind: "configuringMetadataViews";
|
|
118
|
+
pendingViews: CDEMetadataView[];
|
|
119
|
+
} | {
|
|
120
|
+
kind: "savingMetadataViews";
|
|
121
|
+
pendingViews: CDEMetadataView[];
|
|
122
|
+
} | {
|
|
123
|
+
kind: "dragging";
|
|
124
|
+
files: CDEFile[];
|
|
125
|
+
sourceFolderId: string | null;
|
|
126
|
+
previousState: CDEMachineState;
|
|
127
|
+
} | {
|
|
128
|
+
kind: "movingFiles";
|
|
129
|
+
files: CDEFile[];
|
|
130
|
+
targetFolderId: string;
|
|
131
|
+
} | {
|
|
132
|
+
kind: "draggingFolder";
|
|
133
|
+
folderId: string;
|
|
134
|
+
parentFolderId: string | null;
|
|
135
|
+
previousState: CDEMachineState;
|
|
136
|
+
} | {
|
|
137
|
+
kind: "movingFolder";
|
|
138
|
+
folderId: string;
|
|
139
|
+
targetFolderId: string | null;
|
|
140
|
+
} | {
|
|
141
|
+
kind: "editingFolders";
|
|
142
|
+
pendingChanges: FolderPendingChanges;
|
|
143
|
+
} | {
|
|
144
|
+
kind: "savingFolderChanges";
|
|
145
|
+
pendingChanges: FolderPendingChanges;
|
|
146
|
+
} | {
|
|
147
|
+
kind: "editingFiles";
|
|
148
|
+
pendingEdits: Record<string, Record<string, CDEMetadataValue>>;
|
|
149
|
+
pendingArchives: string[];
|
|
150
|
+
pendingRenames: Record<string, string>;
|
|
151
|
+
previousState: {
|
|
152
|
+
kind: "idle";
|
|
153
|
+
} | {
|
|
154
|
+
kind: "selected";
|
|
155
|
+
files: CDEFile[];
|
|
156
|
+
};
|
|
157
|
+
} | {
|
|
158
|
+
kind: "savingFiles";
|
|
159
|
+
pendingEdits: Record<string, Record<string, CDEMetadataValue>>;
|
|
160
|
+
pendingArchives: string[];
|
|
161
|
+
pendingRenames: Record<string, string>;
|
|
162
|
+
previousState: {
|
|
163
|
+
kind: "idle";
|
|
164
|
+
} | {
|
|
165
|
+
kind: "selected";
|
|
166
|
+
files: CDEFile[];
|
|
167
|
+
};
|
|
168
|
+
} | {
|
|
169
|
+
kind: "error";
|
|
170
|
+
reason: string;
|
|
171
|
+
previous: CDEMachineState;
|
|
172
|
+
};
|
|
173
|
+
export type CDEMachineEvent = {
|
|
174
|
+
type: "LOAD";
|
|
175
|
+
} | {
|
|
176
|
+
type: "UPLOAD";
|
|
177
|
+
} | {
|
|
178
|
+
type: "DOWNLOAD";
|
|
179
|
+
} | {
|
|
180
|
+
type: "SELECT";
|
|
181
|
+
files: CDEFile[];
|
|
182
|
+
} | {
|
|
183
|
+
type: "DESELECT";
|
|
184
|
+
} | {
|
|
185
|
+
type: "VIEW";
|
|
186
|
+
} | {
|
|
187
|
+
type: "ADD_TO_VIEW";
|
|
188
|
+
file: CDEFile;
|
|
189
|
+
} | {
|
|
190
|
+
type: "REMOVE_FROM_VIEW";
|
|
191
|
+
fileId: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: "CLOSE_VIEW";
|
|
194
|
+
} | {
|
|
195
|
+
type: "SET_VIEW_FILE_STATUS";
|
|
196
|
+
fileId: string;
|
|
197
|
+
status: CDEViewFileStatus;
|
|
198
|
+
} | {
|
|
199
|
+
type: "START_EDIT";
|
|
200
|
+
} | {
|
|
201
|
+
type: "UPDATE_METADATA";
|
|
202
|
+
key: string;
|
|
203
|
+
value: CDEMetadataValue;
|
|
204
|
+
} | {
|
|
205
|
+
type: "SAVE";
|
|
206
|
+
} | {
|
|
207
|
+
type: "CANCEL_EDIT";
|
|
208
|
+
} | {
|
|
209
|
+
type: "ARCHIVE_FILE";
|
|
210
|
+
} | {
|
|
211
|
+
type: "START_CONFIGURE_METADATA_SCHEMA";
|
|
212
|
+
} | {
|
|
213
|
+
type: "ADD_METADATA_FIELD";
|
|
214
|
+
} | {
|
|
215
|
+
type: "UPDATE_METADATA_FIELD";
|
|
216
|
+
key: string;
|
|
217
|
+
value: CDEMetadataField;
|
|
218
|
+
} | {
|
|
219
|
+
type: "DELETE_METADATA_FIELD";
|
|
220
|
+
key: string;
|
|
221
|
+
} | {
|
|
222
|
+
type: "RESTORE_METADATA_FIELD";
|
|
223
|
+
key: string;
|
|
224
|
+
} | {
|
|
225
|
+
type: "SAVE_METADATA_SCHEMA";
|
|
226
|
+
} | {
|
|
227
|
+
type: "CANCEL_CONFIGURE_METADATA_SCHEMA";
|
|
228
|
+
} | {
|
|
229
|
+
type: "START_DRAG";
|
|
230
|
+
files: CDEFile[];
|
|
231
|
+
sourceFolderId: string | null;
|
|
232
|
+
} | {
|
|
233
|
+
type: "END_DRAG";
|
|
234
|
+
} | {
|
|
235
|
+
type: "DROP_FILES";
|
|
236
|
+
targetFolderId: string | null;
|
|
237
|
+
} | {
|
|
238
|
+
type: "START_FOLDER_DRAG";
|
|
239
|
+
folderId: string;
|
|
240
|
+
parentFolderId: string | null;
|
|
241
|
+
} | {
|
|
242
|
+
type: "END_FOLDER_DRAG";
|
|
243
|
+
} | {
|
|
244
|
+
type: "DROP_FOLDER";
|
|
245
|
+
targetFolderId: string | null;
|
|
246
|
+
} | {
|
|
247
|
+
type: "START_EDIT_FILES";
|
|
248
|
+
} | {
|
|
249
|
+
type: "UPDATE_FILE_METADATA";
|
|
250
|
+
fileId: string;
|
|
251
|
+
key: string;
|
|
252
|
+
value: CDEMetadataValue;
|
|
253
|
+
} | {
|
|
254
|
+
type: "REVERT_FILE_METADATA";
|
|
255
|
+
fileId: string;
|
|
256
|
+
} | {
|
|
257
|
+
type: "ARCHIVE_FILE_EDIT";
|
|
258
|
+
fileId: string;
|
|
259
|
+
} | {
|
|
260
|
+
type: "UNARCHIVE_FILE_EDIT";
|
|
261
|
+
fileId: string;
|
|
262
|
+
} | {
|
|
263
|
+
type: "RENAME_FILE";
|
|
264
|
+
fileId: string;
|
|
265
|
+
name: string;
|
|
266
|
+
} | {
|
|
267
|
+
type: "RENAME_FILE_IMMEDIATE";
|
|
268
|
+
fileId: string;
|
|
269
|
+
name: string;
|
|
270
|
+
} | {
|
|
271
|
+
type: "SAVE_FILE_EDITS";
|
|
272
|
+
} | {
|
|
273
|
+
type: "CANCEL_EDIT_FILES";
|
|
274
|
+
} | {
|
|
275
|
+
type: "START_EDIT_FOLDERS";
|
|
276
|
+
} | {
|
|
277
|
+
type: "ADD_FOLDER";
|
|
278
|
+
tempId: string;
|
|
279
|
+
name: string;
|
|
280
|
+
parentId: string | null;
|
|
281
|
+
} | {
|
|
282
|
+
type: "RENAME_FOLDER";
|
|
283
|
+
folderId: string;
|
|
284
|
+
name: string;
|
|
285
|
+
} | {
|
|
286
|
+
type: "ARCHIVE_FOLDER";
|
|
287
|
+
folderId: string;
|
|
288
|
+
} | {
|
|
289
|
+
type: "SAVE_FOLDER_CHANGES";
|
|
290
|
+
} | {
|
|
291
|
+
type: "CANCEL_FOLDER_CHANGES";
|
|
292
|
+
} | {
|
|
293
|
+
type: "RESET_FOLDER";
|
|
294
|
+
folderId: string;
|
|
295
|
+
} | {
|
|
296
|
+
type: "START_CONFIGURE_METADATA_VIEWS";
|
|
297
|
+
} | {
|
|
298
|
+
type: "ADD_METADATA_VIEW";
|
|
299
|
+
} | {
|
|
300
|
+
type: "UPDATE_METADATA_VIEW";
|
|
301
|
+
id: string;
|
|
302
|
+
view: CDEMetadataView;
|
|
303
|
+
} | {
|
|
304
|
+
type: "DELETE_METADATA_VIEW";
|
|
305
|
+
id: string;
|
|
306
|
+
} | {
|
|
307
|
+
type: "SAVE_METADATA_VIEWS";
|
|
308
|
+
} | {
|
|
309
|
+
type: "CANCEL_CONFIGURE_METADATA_VIEWS";
|
|
310
|
+
} | {
|
|
311
|
+
type: "SET_ACTIVE_METADATA_VIEW";
|
|
312
|
+
id: string | null;
|
|
313
|
+
} | {
|
|
314
|
+
type: "SET_GROUPS_VIEW_MODE";
|
|
315
|
+
mode: "groups" | "metadata";
|
|
316
|
+
} | {
|
|
317
|
+
type: "FAIL";
|
|
318
|
+
reason: string;
|
|
319
|
+
} | {
|
|
320
|
+
type: "DISMISS";
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
declare class _CDEManager extends OBC.Component implements OBC.Transitionable<CDEMachineState, CDEMachineEvent> {
|
|
324
|
+
static readonly uuid: "a3f82c1d-5b74-4e9a-bc30-d7e12f894a61";
|
|
325
|
+
readonly onFilesChanged: OBC.Event<CDEFile[]>;
|
|
326
|
+
readonly onFoldersChanged: OBC.Event<ItemFolder[]>;
|
|
327
|
+
readonly onPermissionsChanged: OBC.Event<CDEUserPermissions>;
|
|
328
|
+
readonly onSelectedGroupChanged: OBC.Event<string | null>;
|
|
329
|
+
readonly onMachineStateChanged: OBC.Event<CDEMachineState>;
|
|
330
|
+
readonly onMetadataViewsChanged: OBC.Event<CDEMetadataView[]>;
|
|
331
|
+
readonly onGroupsViewModeChanged: OBC.Event<"metadata" | "groups">;
|
|
332
|
+
readonly onMetadataGroupChanged: OBC.Event<Record<string, string> | null>;
|
|
333
|
+
readonly onDownloadReady: OBC.Event<{
|
|
334
|
+
blob: Blob;
|
|
335
|
+
filename: string;
|
|
336
|
+
}>;
|
|
337
|
+
readonly onUploadCompleted: OBC.Event<{
|
|
338
|
+
created: CDEFile[];
|
|
339
|
+
versioned: CDEFile[];
|
|
340
|
+
}>;
|
|
341
|
+
readonly onFolderChangesCompleted: OBC.Event<{
|
|
342
|
+
created: number;
|
|
343
|
+
renamed: number;
|
|
344
|
+
archived: number;
|
|
345
|
+
}>;
|
|
346
|
+
readonly onFilesMovedCompleted: OBC.Event<{
|
|
347
|
+
files: CDEFile[];
|
|
348
|
+
targetFolderName: string | null;
|
|
349
|
+
}>;
|
|
350
|
+
readonly onRenameCompleted: OBC.Event<{
|
|
351
|
+
success: boolean;
|
|
352
|
+
error?: string;
|
|
353
|
+
}>;
|
|
354
|
+
readonly onFolderMovedCompleted: OBC.Event<{
|
|
355
|
+
folderName: string;
|
|
356
|
+
targetFolderName: string | null;
|
|
357
|
+
}>;
|
|
358
|
+
readonly onShowArchivedChanged: OBC.Event<boolean>;
|
|
359
|
+
readonly onRestoreCompleted: OBC.Event<{
|
|
360
|
+
files?: CDEFile[];
|
|
361
|
+
folder?: ItemFolder;
|
|
362
|
+
}>;
|
|
363
|
+
enabled: boolean;
|
|
364
|
+
projectName: string;
|
|
365
|
+
missingMetadataPlaceholder: string;
|
|
366
|
+
availableColumns: Set<string>;
|
|
367
|
+
visibleColumns: Set<string>;
|
|
368
|
+
ctx?: CDEContext;
|
|
369
|
+
private _machineState;
|
|
370
|
+
private _showArchived;
|
|
371
|
+
private _preArchivedViewMode;
|
|
372
|
+
private _archivedFiles;
|
|
373
|
+
private _archivedFolders;
|
|
374
|
+
private _archivedLoaded;
|
|
375
|
+
viewerGroups: {
|
|
376
|
+
extensions: string[];
|
|
377
|
+
multiple?: boolean;
|
|
378
|
+
}[];
|
|
379
|
+
get viewableExtensions(): Set<string>;
|
|
380
|
+
private _files;
|
|
381
|
+
private _folders;
|
|
382
|
+
private _fileHistory;
|
|
383
|
+
private _metadataSchema;
|
|
384
|
+
private _metadataViews;
|
|
385
|
+
private _activeMetadataViewId;
|
|
386
|
+
private _groupsViewMode;
|
|
387
|
+
private _selectedGroup;
|
|
388
|
+
private _selectedMetadataGroup;
|
|
389
|
+
private _namingSchema;
|
|
390
|
+
cacheMaxBytes: number;
|
|
391
|
+
cacheExtensions: Set<string>;
|
|
392
|
+
private _fileCache;
|
|
393
|
+
private _fileCacheBytes;
|
|
394
|
+
private _dedup;
|
|
395
|
+
private _cacheKey;
|
|
396
|
+
private _isCacheable;
|
|
397
|
+
private _addToCache;
|
|
398
|
+
downloadFile(file: CDEFile): Promise<ArrayBuffer>;
|
|
399
|
+
private _permissions;
|
|
400
|
+
private _projectDataFolderId;
|
|
401
|
+
private _appFolderIds;
|
|
402
|
+
private _excludedFolderIds;
|
|
403
|
+
private _projectMembers;
|
|
404
|
+
get projectMembers(): {
|
|
405
|
+
fullName: string;
|
|
406
|
+
email: string;
|
|
407
|
+
role: string;
|
|
408
|
+
}[];
|
|
409
|
+
get userPermissions(): CDEUserPermissions;
|
|
410
|
+
query: string | null;
|
|
411
|
+
get machineState(): CDEMachineState;
|
|
412
|
+
get files(): CDEFile[];
|
|
413
|
+
set files(value: CDEFile[]);
|
|
414
|
+
get folders(): ItemFolder[];
|
|
415
|
+
set folders(value: ItemFolder[]);
|
|
416
|
+
get showArchived(): boolean;
|
|
417
|
+
set showArchived(value: boolean);
|
|
418
|
+
get fileHistory(): CDEFileHistoryEntry[];
|
|
419
|
+
set fileHistory(value: CDEFileHistoryEntry[]);
|
|
420
|
+
get metadataSchema(): CDEMetadataSchema;
|
|
421
|
+
set metadataSchema(value: CDEMetadataSchema);
|
|
422
|
+
get selectedGroup(): string | null;
|
|
423
|
+
set selectedGroup(value: string | null);
|
|
424
|
+
get metadataViews(): CDEMetadataView[];
|
|
425
|
+
get activeMetadataViewId(): string | null;
|
|
426
|
+
get activeMetadataView(): CDEMetadataView | null;
|
|
427
|
+
get groupsViewMode(): "groups" | "metadata";
|
|
428
|
+
get selectedMetadataGroup(): Record<string, string> | null;
|
|
429
|
+
set selectedMetadataGroup(value: Record<string, string> | null);
|
|
430
|
+
get visibleFiles(): CDEFile[];
|
|
431
|
+
get namingSchema(): CDENamingSchema | null;
|
|
432
|
+
constructor(components: OBC.Components);
|
|
433
|
+
hasViewer(extension: string): boolean;
|
|
434
|
+
private _groupOf;
|
|
435
|
+
private _sameGroup;
|
|
436
|
+
canView(files: CDEFile[]): boolean;
|
|
437
|
+
canAddToView(files: CDEFile[]): boolean;
|
|
438
|
+
setNamingSchema(schema: CDENamingSchema): void;
|
|
439
|
+
buildFileName(file: CDEFile): string;
|
|
440
|
+
getSelectedFiles(): CDEFile[];
|
|
441
|
+
getActivity(fileId: string): CDEFileActivity[];
|
|
442
|
+
updateFilesMetadata(fileIds: string[], updates: Record<string, string>): Promise<void>;
|
|
443
|
+
readProjectData(app: string, filename: string): Promise<any>;
|
|
444
|
+
writeProjectData(app: string, filename: string, data: unknown): Promise<string>;
|
|
445
|
+
private _ensureProjectDataFolder;
|
|
446
|
+
private _ensureAppFolder;
|
|
447
|
+
private _loadPermissions;
|
|
448
|
+
loadFolders(): Promise<void>;
|
|
449
|
+
createFolder(name: string, parentId?: string): Promise<ItemFolder>;
|
|
450
|
+
getUserId(): Promise<string | undefined>;
|
|
451
|
+
loadUserConfig(): Promise<{
|
|
452
|
+
visibleColumns?: string[];
|
|
453
|
+
metadataViews?: CDEMetadataView[];
|
|
454
|
+
} | null>;
|
|
455
|
+
saveUserConfig(config: {
|
|
456
|
+
visibleColumns?: string[];
|
|
457
|
+
metadataViews?: CDEMetadataView[];
|
|
458
|
+
}): Promise<string | undefined>;
|
|
459
|
+
loadMetadataSchema(): Promise<void>;
|
|
460
|
+
initMetadataViews(views: CDEMetadataView[], activeId: string | null): void;
|
|
461
|
+
loadArchivedItems(): Promise<void>;
|
|
462
|
+
restoreFiles(files: CDEFile[]): Promise<void>;
|
|
463
|
+
restoreFolder(folderId: string): Promise<void>;
|
|
464
|
+
detectConflicts(files: File[]): {
|
|
465
|
+
file: File;
|
|
466
|
+
existing: CDEFile;
|
|
467
|
+
}[];
|
|
468
|
+
checkMoveConflicts(files: CDEFile[], targetFolderId: string | null): {
|
|
469
|
+
file: CDEFile;
|
|
470
|
+
existing: CDEFile;
|
|
471
|
+
}[];
|
|
472
|
+
uploadFiles(files: File[], folderId?: string | null, options?: {
|
|
473
|
+
forceNew?: boolean;
|
|
474
|
+
}): Promise<void>;
|
|
475
|
+
sendMachineEvent(event: CDEMachineEvent): void;
|
|
476
|
+
private _transition;
|
|
477
|
+
private _getAllArchivedIds;
|
|
478
|
+
private _collectTempDescendants;
|
|
479
|
+
private _saveFolderChanges;
|
|
480
|
+
private _moveFolder;
|
|
481
|
+
moveFiles(files: CDEFile[], targetFolderId: string | null): Promise<void>;
|
|
482
|
+
private _moveFiles;
|
|
483
|
+
private _resolveFullName;
|
|
484
|
+
private _prepareDownload;
|
|
485
|
+
private _saveMetadataSchema;
|
|
486
|
+
private _resolveKeys;
|
|
487
|
+
private _saveFileMetadata;
|
|
488
|
+
private _renameFileImmediate;
|
|
489
|
+
private _saveFileEdits;
|
|
490
|
+
private _applyMetadataEdits;
|
|
491
|
+
private _applyMetadataSchemaEdits;
|
|
492
|
+
private _saveMetadataViews;
|
|
493
|
+
private _archiveFiles;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export type CDEManager = InstanceType<typeof _CDEManager>;
|
|
497
|
+
export const CDEManager = { uuid: 'a3f82c1d-5b74-4e9a-bc30-d7e12f894a61' } as typeof _CDEManager & { uuid: 'a3f82c1d-5b74-4e9a-bc30-d7e12f894a61' };
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Which action buttons to expose per file row. All default to `true`.
|
|
501
|
+
*/
|
|
502
|
+
export interface FileListActions {
|
|
503
|
+
download?: boolean;
|
|
504
|
+
rename?: boolean;
|
|
505
|
+
delete?: boolean;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Config passed to {@link FileList.create}.
|
|
509
|
+
*/
|
|
510
|
+
export interface FileListConfig {
|
|
511
|
+
/** Services client used to list and mutate files. */
|
|
512
|
+
client: EngineServicesClient;
|
|
513
|
+
/** Optional folder ID to scope the list. If omitted, lists root files. */
|
|
514
|
+
folderId?: string;
|
|
515
|
+
/** Which action buttons to show per row. Defaults to all enabled. */
|
|
516
|
+
actions?: FileListActions;
|
|
517
|
+
/** Called when a file row is clicked (not an action button). */
|
|
518
|
+
onFileClick?: (file: Item) => void;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* The result returned by {@link FileList.create}.
|
|
522
|
+
*/
|
|
523
|
+
export interface FileListInstance {
|
|
524
|
+
/** The DOM element to mount somewhere in your layout. */
|
|
525
|
+
element: HTMLElement;
|
|
526
|
+
/** Reloads the list from the services client. */
|
|
527
|
+
refresh: () => Promise<void>;
|
|
528
|
+
/** Changes the folder scope and reloads. Pass `undefined` for the root. */
|
|
529
|
+
setFolder: (folderId?: string) => Promise<void>;
|
|
530
|
+
/** Removes the element and forgets the instance. */
|
|
531
|
+
dispose: () => void;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Built-in component that renders a file list backed by the services client,
|
|
536
|
+
* with built-in download / rename / delete actions.
|
|
537
|
+
*
|
|
538
|
+
* The backing data comes from {@link EngineServicesClient.listFiles}, so the
|
|
539
|
+
* list stays in sync with the storage service. Each call to {@link create}
|
|
540
|
+
* returns an independent instance with its own DOM element.
|
|
541
|
+
*
|
|
542
|
+
* @example
|
|
543
|
+
* ```ts
|
|
544
|
+
* const fileList = components.get(FileList);
|
|
545
|
+
* const { element, refresh } = fileList.create({
|
|
546
|
+
* client: app.client,
|
|
547
|
+
* folderId: someFolderId,
|
|
548
|
+
* });
|
|
549
|
+
* container.appendChild(element);
|
|
550
|
+
* ```
|
|
551
|
+
*/
|
|
552
|
+
declare class _FileList extends OBC.Component {
|
|
553
|
+
static readonly uuid: "b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c";
|
|
554
|
+
enabled: boolean;
|
|
555
|
+
readonly name = "FileList";
|
|
556
|
+
private _instances;
|
|
557
|
+
/**
|
|
558
|
+
* Creates a new file-list instance. Returns the DOM element to mount plus a
|
|
559
|
+
* `refresh` handle to reload the list, a `setFolder` to change scope, and a
|
|
560
|
+
* `dispose` to remove it.
|
|
561
|
+
*/
|
|
562
|
+
create(config: FileListConfig): FileListInstance;
|
|
563
|
+
/**
|
|
564
|
+
* Removes every instance this manager has created.
|
|
565
|
+
*/
|
|
566
|
+
dispose(): void;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Built-in component that renders a file list backed by the services client,
|
|
571
|
+
* with built-in download / rename / delete actions.
|
|
572
|
+
*
|
|
573
|
+
* The backing data comes from {@link EngineServicesClient.listFiles}, so the
|
|
574
|
+
* list stays in sync with the storage service. Each call to {@link create}
|
|
575
|
+
* returns an independent instance with its own DOM element.
|
|
576
|
+
*
|
|
577
|
+
* @example
|
|
578
|
+
* ```ts
|
|
579
|
+
* const fileList = components.get(FileList);
|
|
580
|
+
* const { element, refresh } = fileList.create({
|
|
581
|
+
* client: app.client,
|
|
582
|
+
* folderId: someFolderId,
|
|
583
|
+
* });
|
|
584
|
+
* container.appendChild(element);
|
|
585
|
+
* ```
|
|
586
|
+
*/
|
|
587
|
+
export type FileList = InstanceType<typeof _FileList>;
|
|
588
|
+
/**
|
|
589
|
+
* Built-in component that renders a file list backed by the services client,
|
|
590
|
+
* with built-in download / rename / delete actions.
|
|
591
|
+
*
|
|
592
|
+
* The backing data comes from {@link EngineServicesClient.listFiles}, so the
|
|
593
|
+
* list stays in sync with the storage service. Each call to {@link create}
|
|
594
|
+
* returns an independent instance with its own DOM element.
|
|
595
|
+
*
|
|
596
|
+
* @example
|
|
597
|
+
* ```ts
|
|
598
|
+
* const fileList = components.get(FileList);
|
|
599
|
+
* const { element, refresh } = fileList.create({
|
|
600
|
+
* client: app.client,
|
|
601
|
+
* folderId: someFolderId,
|
|
602
|
+
* });
|
|
603
|
+
* container.appendChild(element);
|
|
604
|
+
* ```
|
|
605
|
+
*/
|
|
606
|
+
export const FileList = { uuid: 'b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c' } as typeof _FileList & { uuid: 'b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c' };
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* A simple test component to validate the built-in component pipeline.
|
|
610
|
+
* Replace this with real components once the infrastructure is verified.
|
|
611
|
+
*/
|
|
612
|
+
declare class _HelloWorld extends OBC.Component {
|
|
613
|
+
static readonly uuid: "2c4ae432-fc24-43e9-9783-0c960c674e96";
|
|
614
|
+
enabled: boolean;
|
|
615
|
+
readonly name = "HelloWorld";
|
|
616
|
+
constructor(components: OBC.Components);
|
|
617
|
+
/**
|
|
618
|
+
* Returns a greeting message and logs it to the console.
|
|
619
|
+
* @param who - The name to greet. Defaults to `"World"`.
|
|
620
|
+
*/
|
|
621
|
+
greet(who?: string): string;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* PlatformComponents.import() expects a `main` variable in scope with
|
|
625
|
+
* a `componentDefinition` property pointing to the OBC.Component class.
|
|
626
|
+
* The IIFE build (name: 'main') assigns this to `var main = ...`.
|
|
627
|
+
*/
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* A simple test component to validate the built-in component pipeline.
|
|
631
|
+
* Replace this with real components once the infrastructure is verified.
|
|
632
|
+
*/
|
|
633
|
+
export type HelloWorld = InstanceType<typeof _HelloWorld>;
|
|
634
|
+
/**
|
|
635
|
+
* A simple test component to validate the built-in component pipeline.
|
|
636
|
+
* Replace this with real components once the infrastructure is verified.
|
|
637
|
+
*/
|
|
638
|
+
export const HelloWorld = { uuid: '2c4ae432-fc24-43e9-9783-0c960c674e96' } as typeof _HelloWorld & { uuid: '2c4ae432-fc24-43e9-9783-0c960c674e96' };
|
|
639
|
+
|
|
640
|
+
declare class _UIManager extends OBC.Component {
|
|
641
|
+
#private;
|
|
642
|
+
static readonly uuid: "234f1416-528d-452a-9cc9-a16c5239b2eb";
|
|
643
|
+
enabled: boolean;
|
|
644
|
+
readonly name = "UIManager";
|
|
645
|
+
init(): void;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export type UIManager = InstanceType<typeof _UIManager>;
|
|
649
|
+
export const UIManager = { uuid: '234f1416-528d-452a-9cc9-a16c5239b2eb' } as typeof _UIManager & { uuid: '234f1416-528d-452a-9cc9-a16c5239b2eb' };
|