@thatopen/components 2.2.0-alpha.1 → 2.2.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.
- package/dist/core/ShadowedScene/index.d.ts +1 -1
- package/dist/core/Viewpoints/index.d.ts +20 -0
- package/dist/core/Viewpoints/src/Viewpoint.d.ts +147 -0
- package/dist/ifc/IfcPropertiesManager/index.d.ts +13 -2
- package/dist/ifc/IfcRelationsIndexer/src/rels-builder.d.ts +4 -0
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +16 -0
- package/dist/index.cjs +71 -2127
- package/dist/index.mjs +7565 -15637
- package/dist/namespace.d.ts +2800 -2719
- package/dist/openbim/BCFTopics/index.d.ts +20 -2
- package/dist/openbim/BCFTopics/src/Comment.d.ts +5 -0
- package/dist/openbim/BCFTopics/src/Topic.d.ts +0 -6
- package/dist/openbim/BCFTopics/src/importers/extensions.d.ts +2 -0
- package/dist/openbim/BCFTopics/src/importers/index.d.ts +1 -0
- package/dist/openbim/BCFTopics/src/index.d.ts +1 -4
- package/dist/openbim/BCFTopics/src/types.d.ts +56 -0
- package/package.json +5 -5
- package/dist/openbim/BCFTopics/src/TopicComments/index.d.ts +0 -12
- package/dist/openbim/BCFTopics/src/TopicComments/src/template.d.ts +0 -20
- package/dist/openbim/BCFTopics/src/TopicForm/index.d.ts +0 -10
- package/dist/openbim/BCFTopics/src/TopicForm/src/template.d.ts +0 -20
- package/dist/openbim/BCFTopics/src/TopicPanel/index.d.ts +0 -12
- package/dist/openbim/BCFTopics/src/TopicPanel/src/template.d.ts +0 -46
- package/dist/openbim/BCFTopics/src/TopicsList/index.d.ts +0 -12
- package/dist/openbim/BCFTopics/src/TopicsList/src/template.d.ts +0 -29
- package/dist/openbim/BCFTopics/src/ViewpointsList/index.d.ts +0 -12
- package/dist/openbim/BCFTopics/src/ViewpointsList/src/template.d.ts +0 -19
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { XMLParser } from "fast-xml-parser";
|
|
1
2
|
import { Component, Configurable, Disposable, Event, World, DataMap } from "../../core/Types";
|
|
2
3
|
import { BCFTopic, BCFTopicsConfig, Topic } from "./src";
|
|
3
4
|
import { Viewpoint } from "../../core/Viewpoints";
|
|
4
5
|
export declare class BCFTopics extends Component implements Disposable, Configurable<BCFTopicsConfig> {
|
|
5
6
|
static uuid: "de977976-e4f6-4e4f-a01a-204727839802";
|
|
6
7
|
enabled: boolean;
|
|
7
|
-
|
|
8
|
+
static xmlParser: XMLParser;
|
|
8
9
|
config: Required<BCFTopicsConfig>;
|
|
9
10
|
readonly list: DataMap<string, Topic>;
|
|
10
11
|
readonly onSetup: Event<unknown>;
|
|
@@ -20,6 +21,13 @@ export declare class BCFTopics extends Component implements Disposable, Configur
|
|
|
20
21
|
*/
|
|
21
22
|
create(data?: Partial<BCFTopic>): Topic;
|
|
22
23
|
readonly onDisposed: Event<unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* Disposes of the BCFTopics component and triggers the onDisposed event.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This method clears the list of topics and triggers the onDisposed event.
|
|
29
|
+
* It also resets the onDisposed event listener.
|
|
30
|
+
*/
|
|
23
31
|
dispose(): void;
|
|
24
32
|
/**
|
|
25
33
|
* Retrieves the unique set of topic types used across all topics.
|
|
@@ -84,7 +92,17 @@ export declare class BCFTopics extends Component implements Disposable, Configur
|
|
|
84
92
|
private getMarkupLabels;
|
|
85
93
|
private getMarkupViewpoints;
|
|
86
94
|
private getMarkupRelatedTopics;
|
|
87
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Loads BCF (Building Collaboration Format) data into the engine.
|
|
97
|
+
*
|
|
98
|
+
* @param world - The default world where the viewpoints are going to be created.
|
|
99
|
+
* @param data - The BCF data to load.
|
|
100
|
+
*
|
|
101
|
+
* @returns A promise that resolves to an object containing the created viewpoints and topics.
|
|
102
|
+
*
|
|
103
|
+
* @throws An error if the BCF version is not supported.
|
|
104
|
+
*/
|
|
105
|
+
load(data: Uint8Array, world: World): Promise<{
|
|
88
106
|
viewpoints: Viewpoint[];
|
|
89
107
|
topics: Topic[];
|
|
90
108
|
}>;
|
|
@@ -31,5 +31,10 @@ export declare class Comment {
|
|
|
31
31
|
* @param text - The initial comment text.
|
|
32
32
|
*/
|
|
33
33
|
constructor(components: Components, text: string);
|
|
34
|
+
/**
|
|
35
|
+
* Serializes the Comment instance into a BCF compliant XML string.
|
|
36
|
+
*
|
|
37
|
+
* @returns A string representing the Comment in BCFv2 XML format.
|
|
38
|
+
*/
|
|
34
39
|
serialize(): string;
|
|
35
40
|
}
|
|
@@ -13,12 +13,6 @@ export declare class Topic implements BCFTopic {
|
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* The `guid` is automatically generated upon topic creation and by no means it should change.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* const topic = new Topic(components);
|
|
20
|
-
* console.log(topic.guid); // Output: "123e4567-e89b-12d3-a456-426614174000"
|
|
21
|
-
* ```
|
|
22
16
|
*/
|
|
23
17
|
guid: string;
|
|
24
18
|
title: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./extensions";
|
|
@@ -17,19 +17,75 @@ export interface BCFTopic {
|
|
|
17
17
|
description?: string;
|
|
18
18
|
stage?: string;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Configuration settings for managing BCF topics.
|
|
22
|
+
* This interface defines the properties and their meanings used to control the behavior of exporting and importing BCF topics.
|
|
23
|
+
*/
|
|
20
24
|
export interface BCFTopicsConfig {
|
|
25
|
+
/**
|
|
26
|
+
* The BCF version used during export.
|
|
27
|
+
*/
|
|
21
28
|
version: BCFVersion;
|
|
29
|
+
/**
|
|
30
|
+
* The email of the user creating topics using this component.
|
|
31
|
+
*/
|
|
22
32
|
author: string;
|
|
33
|
+
/**
|
|
34
|
+
* The set of allowed topic types. This is exported inside the
|
|
35
|
+
* [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
|
|
36
|
+
*/
|
|
23
37
|
types: Set<string>;
|
|
38
|
+
/**
|
|
39
|
+
* The set of allowed topic statuses. This is exported inside the
|
|
40
|
+
* [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
|
|
41
|
+
*/
|
|
24
42
|
statuses: Set<string>;
|
|
43
|
+
/**
|
|
44
|
+
* The set of allowed topic priorities. This is exported inside the
|
|
45
|
+
* [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
|
|
46
|
+
*/
|
|
25
47
|
priorities: Set<string>;
|
|
48
|
+
/**
|
|
49
|
+
* The set of allowed topic labels. This is exported inside the
|
|
50
|
+
* [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
|
|
51
|
+
*/
|
|
26
52
|
labels: Set<string>;
|
|
53
|
+
/**
|
|
54
|
+
* The set of allowed topic stages. This is exported inside the
|
|
55
|
+
* [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
|
|
56
|
+
*/
|
|
27
57
|
stages: Set<string>;
|
|
58
|
+
/**
|
|
59
|
+
* The set of allowed topic users. This is exported inside the
|
|
60
|
+
* [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
|
|
61
|
+
*/
|
|
28
62
|
users: Set<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Whether or not to include the AuthoringSoftwareId in the viewpoint components during export.
|
|
65
|
+
*/
|
|
29
66
|
includeSelectionTag: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Updates the types, statuses, users, etc., after importing an external BCF.
|
|
69
|
+
*/
|
|
30
70
|
updateExtensionsOnImport: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Only allow to use the extensions (types, statuses, etc.) defined in the config when setting the corresponding data in a topic.
|
|
73
|
+
*/
|
|
31
74
|
strict: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* If true, export the extensions (types, status, etc.) based on topics data. This doesn't update the extensions in the config.
|
|
77
|
+
* If false, only export the extensions defined in each collection of possibilities set in the config.
|
|
78
|
+
* In all cases, all the values from each collection of extensions defined in the config are going to be exported.
|
|
79
|
+
*/
|
|
32
80
|
includeAllExtensionsOnExport: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Version to be used when importing if no bcf.version file is present in the incoming data.
|
|
83
|
+
* When null, the importer will throw an error if the version is missing or is not supported.
|
|
84
|
+
*/
|
|
33
85
|
fallbackVersionOnImport: BCFVersion | null;
|
|
86
|
+
/**
|
|
87
|
+
* If true, do not import a topic with missing information (guid, type, status, title, creationDate or creationAuthor).
|
|
88
|
+
* If false, use default values for missing data.
|
|
89
|
+
*/
|
|
34
90
|
ignoreIncompleteTopicsOnImport: boolean;
|
|
35
91
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thatopen/components",
|
|
3
3
|
"description": "Collection of core functionalities to author BIM apps.",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"author": "That Open Company",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@thatopen/fragments": "~2.
|
|
40
|
+
"@thatopen/fragments": "~2.2.0",
|
|
41
41
|
"@thatopen/ui": "~2.1.0",
|
|
42
42
|
"@types/three": "0.160.0",
|
|
43
43
|
"stats.js": "^0.17.0",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"camera-controls": "2.7.3",
|
|
49
|
-
"fast-xml-parser": "
|
|
50
|
-
"jszip": "
|
|
49
|
+
"fast-xml-parser": "4.4.1",
|
|
50
|
+
"jszip": "3.10.1",
|
|
51
51
|
"three-mesh-bvh": "0.7.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@thatopen/fragments": "~2.
|
|
54
|
+
"@thatopen/fragments": "~2.2.0",
|
|
55
55
|
"three": "^0.160.1",
|
|
56
56
|
"web-ifc": "0.0.57"
|
|
57
57
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { TopicCommentsUI } from "./src/template";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Topic Comments List component with the given UI state.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The initial state of the Topic Comments List component.
|
|
7
|
-
* @param autoUpdate - A flag indicating whether the component should automatically update based on events happening in the BCFTopic component.
|
|
8
|
-
* Default value is `true`.
|
|
9
|
-
*
|
|
10
|
-
* @returns A tuple containing the created Topic Comments List component and a function to update it.
|
|
11
|
-
*/
|
|
12
|
-
export declare const topicComments: (state: TopicCommentsUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<TopicCommentsUI> | undefined) => TopicCommentsUI, currentState: () => TopicCommentsUI];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { Topic } from "../../Topic";
|
|
3
|
-
import { Viewpoint } from "../../../../../core";
|
|
4
|
-
interface UserStyles {
|
|
5
|
-
[email: string]: {
|
|
6
|
-
name: string;
|
|
7
|
-
picture?: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
interface TopicCommentsActions {
|
|
11
|
-
delete: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface TopicCommentsUI {
|
|
14
|
-
topic: Topic;
|
|
15
|
-
viewpoint?: Viewpoint;
|
|
16
|
-
styles?: UserStyles;
|
|
17
|
-
actions?: Partial<TopicCommentsActions>;
|
|
18
|
-
}
|
|
19
|
-
export declare const topicCommentsTemplate: (state: TopicCommentsUI) => BUI.TemplateResult<1>;
|
|
20
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { TopicFormUI } from "./src/template";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Topic Form component with the given UI state.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The initial state of the Topic Form component.
|
|
7
|
-
*
|
|
8
|
-
* @returns A tuple containing the created Topic Form component and a function to update it.
|
|
9
|
-
*/
|
|
10
|
-
export declare const topicForm: (state: TopicFormUI) => [element: BUI.Table, update: (state?: Partial<TopicFormUI> | undefined) => TopicFormUI, currentState: () => TopicFormUI];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { Topic } from "../../Topic";
|
|
3
|
-
import { Components } from "../../../../../core";
|
|
4
|
-
interface DataStyles {
|
|
5
|
-
users: {
|
|
6
|
-
[email: string]: {
|
|
7
|
-
name: string;
|
|
8
|
-
picture?: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export interface TopicFormUI {
|
|
13
|
-
components: Components;
|
|
14
|
-
topic?: Topic;
|
|
15
|
-
onSubmit?: (topic: Topic) => void | Promise<void>;
|
|
16
|
-
onCancel?: () => void | Promise<void>;
|
|
17
|
-
styles?: Partial<DataStyles>;
|
|
18
|
-
}
|
|
19
|
-
export declare const topicFormTemplate: (state: TopicFormUI) => BUI.TemplateResult<1>;
|
|
20
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { TopicPanelUI } from "./src/template";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Topic Panel component with the given UI state.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The initial state of the Topic Panel component.
|
|
7
|
-
* @param autoUpdate - A flag indicating whether the component should automatically update based on events happening in the BCFTopic component.
|
|
8
|
-
* Default value is `true`.
|
|
9
|
-
*
|
|
10
|
-
* @returns A tuple containing the created Topic Panel component and a function to update it.
|
|
11
|
-
*/
|
|
12
|
-
export declare const topicPanel: (state: TopicPanelUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<TopicPanelUI> | undefined) => TopicPanelUI, currentState: () => TopicPanelUI];
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { Components, World } from "../../../../../core";
|
|
3
|
-
import { Topic } from "../../Topic";
|
|
4
|
-
interface DataStyles {
|
|
5
|
-
priorities: {
|
|
6
|
-
[name: string]: {
|
|
7
|
-
icon?: string;
|
|
8
|
-
style?: Record<string, string>;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
statuses: {
|
|
12
|
-
[name: string]: {
|
|
13
|
-
icon?: string;
|
|
14
|
-
style?: Record<string, string>;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
types: {
|
|
18
|
-
[name: string]: {
|
|
19
|
-
icon?: string;
|
|
20
|
-
style?: Record<string, string>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
users: {
|
|
24
|
-
[email: string]: {
|
|
25
|
-
name: string;
|
|
26
|
-
picture?: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
interface TopicPanelActions {
|
|
31
|
-
update: boolean;
|
|
32
|
-
addComments: boolean;
|
|
33
|
-
addViewpoints: boolean;
|
|
34
|
-
linkViewpoints: boolean;
|
|
35
|
-
linkTopics: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface TopicPanelUI {
|
|
38
|
-
components: Components;
|
|
39
|
-
topic?: Topic;
|
|
40
|
-
styles?: Partial<DataStyles>;
|
|
41
|
-
onUpdateInformation?: (topic: Topic) => void | Promise<void>;
|
|
42
|
-
actions?: Partial<TopicPanelActions>;
|
|
43
|
-
world?: World;
|
|
44
|
-
}
|
|
45
|
-
export declare const topicPanelTemplate: (state: TopicPanelUI) => BUI.TemplateResult<1>;
|
|
46
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { BCFTopicsUI } from "./src/template";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a BCF Topics List component with the given UI state.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The initial state of the BCF Topics List component.
|
|
7
|
-
* @param autoUpdate - A flag indicating whether the component should automatically update based on events happening in the BCFTopic component.
|
|
8
|
-
* Default value is `true`.
|
|
9
|
-
*
|
|
10
|
-
* @returns A tuple containing the created BCF Topics List component and a function to update it.
|
|
11
|
-
*/
|
|
12
|
-
export declare const bcfTopicsList: (state: BCFTopicsUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<BCFTopicsUI> | undefined) => BCFTopicsUI, currentState: () => BCFTopicsUI];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { Components } from "../../../../../core";
|
|
3
|
-
import { Topic } from "../../Topic";
|
|
4
|
-
interface DataStyles {
|
|
5
|
-
[name: string]: {
|
|
6
|
-
icon?: string;
|
|
7
|
-
style?: Record<string, string>;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
interface UserStyles {
|
|
11
|
-
[email: string]: {
|
|
12
|
-
name: string;
|
|
13
|
-
picture?: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
interface TopicDataStyles {
|
|
17
|
-
priorities?: DataStyles;
|
|
18
|
-
statuses?: DataStyles;
|
|
19
|
-
types?: DataStyles;
|
|
20
|
-
users?: UserStyles;
|
|
21
|
-
}
|
|
22
|
-
export interface BCFTopicsUI {
|
|
23
|
-
components: Components;
|
|
24
|
-
topics?: Iterable<Topic>;
|
|
25
|
-
dataStyles?: TopicDataStyles;
|
|
26
|
-
onTopicEnter?: (topic: Topic) => void | Promise<void>;
|
|
27
|
-
}
|
|
28
|
-
export declare const bcfTopicsListTemplate: (state: BCFTopicsUI) => BUI.TemplateResult<1>;
|
|
29
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { ViewpointsUI } from "./src/template";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a Viewpoints component with the given UI state.
|
|
5
|
-
*
|
|
6
|
-
* @param state - The initial state of the Viewpoints component.
|
|
7
|
-
* @param autoUpdate - A flag indicating whether the component should automatically update based on events happening in the BCFTopic component.
|
|
8
|
-
* Default value is `true`.
|
|
9
|
-
*
|
|
10
|
-
* @returns A tuple containing the created Viewpoints component and a function to update it.
|
|
11
|
-
*/
|
|
12
|
-
export declare const viewpointsList: (state: ViewpointsUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<ViewpointsUI> | undefined) => ViewpointsUI, currentState: () => ViewpointsUI];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { Components, Viewpoint } from "../../../../../core";
|
|
3
|
-
import { Topic } from "../../Topic";
|
|
4
|
-
interface ViewpointUIActions {
|
|
5
|
-
selectComponents: boolean;
|
|
6
|
-
colorizeComponent: boolean;
|
|
7
|
-
resetColors: boolean;
|
|
8
|
-
updateCamera: boolean;
|
|
9
|
-
delete: boolean;
|
|
10
|
-
unlink: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface ViewpointsUI {
|
|
13
|
-
components: Components;
|
|
14
|
-
topic?: Topic;
|
|
15
|
-
actions?: Partial<ViewpointUIActions>;
|
|
16
|
-
onViewpointEnter?: (viewpoint: Viewpoint) => void | Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export declare const viewpointsListTemplate: (state: ViewpointsUI) => BUI.TemplateResult<1>;
|
|
19
|
-
export {};
|