@thatopen/components 2.2.0-alpha.0 → 2.2.0-alpha.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/Types/src/data-map.d.ts +12 -1
- package/dist/core/Types/src/data-set.d.ts +12 -2
- package/dist/core/Viewpoints/index.d.ts +16 -2
- package/dist/core/Viewpoints/src/Viewpoint.d.ts +10 -4
- package/dist/core/Viewpoints/src/types.d.ts +1 -1
- package/dist/index.cjs +411 -262
- package/dist/index.mjs +6380 -5937
- package/dist/namespace.d.ts +2265 -2152
- package/dist/openbim/BCFTopics/index.d.ts +6 -0
- package/dist/openbim/BCFTopics/src/Comment.d.ts +2 -0
- package/dist/openbim/BCFTopics/src/Topic.d.ts +4 -4
- package/dist/openbim/BCFTopics/src/TopicComments/index.d.ts +12 -0
- package/dist/openbim/BCFTopics/src/TopicComments/src/template.d.ts +20 -0
- package/dist/openbim/BCFTopics/src/TopicForm/index.d.ts +1 -1
- package/dist/openbim/BCFTopics/src/TopicPanel/index.d.ts +1 -1
- package/dist/openbim/BCFTopics/src/TopicPanel/src/template.d.ts +10 -1
- package/dist/openbim/BCFTopics/src/TopicsList/index.d.ts +1 -1
- package/dist/openbim/BCFTopics/src/TopicsList/src/template.d.ts +15 -23
- package/dist/openbim/BCFTopics/src/ViewpointsList/index.d.ts +12 -0
- package/dist/openbim/BCFTopics/src/ViewpointsList/src/template.d.ts +19 -0
- package/dist/openbim/BCFTopics/src/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -65,6 +65,12 @@ export declare class BCFTopics extends Component implements Disposable, Configur
|
|
|
65
65
|
* This method iterates through each topic in the list and adds its properties to the corresponding sets in the config.
|
|
66
66
|
*/
|
|
67
67
|
updateExtensions(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Updates the references to viewpoints in the topics.
|
|
70
|
+
* This function iterates through each topic and checks if the viewpoints exist in the viewpoints list.
|
|
71
|
+
* If a viewpoint does not exist, it is removed from the topic's viewpoints.
|
|
72
|
+
*/
|
|
73
|
+
updateViewpointReferences(): void;
|
|
68
74
|
/**
|
|
69
75
|
* Exports the given topics to a BCF (Building Collaboration Format) zip file.
|
|
70
76
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Topic } from "..";
|
|
1
2
|
import { Viewpoint } from "../../../core/Viewpoints";
|
|
2
3
|
import { Components } from "../../../core/Components";
|
|
3
4
|
/**
|
|
@@ -10,6 +11,7 @@ export declare class Comment {
|
|
|
10
11
|
viewpoint?: Viewpoint;
|
|
11
12
|
modifiedAuthor?: string;
|
|
12
13
|
modifiedDate?: Date;
|
|
14
|
+
topic?: Topic;
|
|
13
15
|
private _components;
|
|
14
16
|
private _comment;
|
|
15
17
|
/**
|
|
@@ -2,7 +2,7 @@ import { Components } from "../../../core/Components";
|
|
|
2
2
|
import { Viewpoint } from "../../../core/Viewpoints";
|
|
3
3
|
import { Comment } from "./Comment";
|
|
4
4
|
import { BCFTopic } from "./types";
|
|
5
|
-
import { DataSet } from "../../../core/Types";
|
|
5
|
+
import { DataMap, DataSet } from "../../../core/Types";
|
|
6
6
|
export declare class Topic implements BCFTopic {
|
|
7
7
|
/**
|
|
8
8
|
* Default values for a BCF Topic, excluding `guid`, `creationDate`, and `creationAuthor`.
|
|
@@ -24,9 +24,9 @@ export declare class Topic implements BCFTopic {
|
|
|
24
24
|
title: string;
|
|
25
25
|
creationDate: Date;
|
|
26
26
|
creationAuthor: string;
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
27
|
+
readonly viewpoints: DataSet<string>;
|
|
28
|
+
readonly relatedTopics: DataSet<string>;
|
|
29
|
+
readonly comments: DataMap<string, Comment>;
|
|
30
30
|
customData: Record<string, any>;
|
|
31
31
|
description?: string;
|
|
32
32
|
serverAssignedId?: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
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];
|
|
@@ -0,0 +1,20 @@
|
|
|
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 {};
|
|
@@ -7,4 +7,4 @@ import { TopicFormUI } from "./src/template";
|
|
|
7
7
|
*
|
|
8
8
|
* @returns A tuple containing the created Topic Form component and a function to update it.
|
|
9
9
|
*/
|
|
10
|
-
export declare const topicForm: (state: TopicFormUI) => [element: BUI.Table, update: (state?: Partial<TopicFormUI> | undefined) => TopicFormUI];
|
|
10
|
+
export declare const topicForm: (state: TopicFormUI) => [element: BUI.Table, update: (state?: Partial<TopicFormUI> | undefined) => TopicFormUI, currentState: () => TopicFormUI];
|
|
@@ -9,4 +9,4 @@ import { TopicPanelUI } from "./src/template";
|
|
|
9
9
|
*
|
|
10
10
|
* @returns A tuple containing the created Topic Panel component and a function to update it.
|
|
11
11
|
*/
|
|
12
|
-
export declare const topicPanel: (state: TopicPanelUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<TopicPanelUI> | undefined) => TopicPanelUI];
|
|
12
|
+
export declare const topicPanel: (state: TopicPanelUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<TopicPanelUI> | undefined) => TopicPanelUI, currentState: () => TopicPanelUI];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as BUI from "@thatopen/ui";
|
|
2
|
-
import { Components } from "../../../../../core";
|
|
2
|
+
import { Components, World } from "../../../../../core";
|
|
3
3
|
import { Topic } from "../../Topic";
|
|
4
4
|
interface DataStyles {
|
|
5
5
|
priorities: {
|
|
@@ -27,11 +27,20 @@ interface DataStyles {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
interface TopicPanelActions {
|
|
31
|
+
update: boolean;
|
|
32
|
+
addComments: boolean;
|
|
33
|
+
addViewpoints: boolean;
|
|
34
|
+
linkViewpoints: boolean;
|
|
35
|
+
linkTopics: boolean;
|
|
36
|
+
}
|
|
30
37
|
export interface TopicPanelUI {
|
|
31
38
|
components: Components;
|
|
32
39
|
topic?: Topic;
|
|
33
40
|
styles?: Partial<DataStyles>;
|
|
34
41
|
onUpdateInformation?: (topic: Topic) => void | Promise<void>;
|
|
42
|
+
actions?: Partial<TopicPanelActions>;
|
|
43
|
+
world?: World;
|
|
35
44
|
}
|
|
36
45
|
export declare const topicPanelTemplate: (state: TopicPanelUI) => BUI.TemplateResult<1>;
|
|
37
46
|
export {};
|
|
@@ -9,4 +9,4 @@ import { BCFTopicsUI } from "./src/template";
|
|
|
9
9
|
*
|
|
10
10
|
* @returns A tuple containing the created BCF Topics List component and a function to update it.
|
|
11
11
|
*/
|
|
12
|
-
export declare const bcfTopicsList: (state: BCFTopicsUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<BCFTopicsUI> | undefined) => BCFTopicsUI];
|
|
12
|
+
export declare const bcfTopicsList: (state: BCFTopicsUI, autoUpdate?: boolean) => [element: BUI.Table, update: (state?: Partial<BCFTopicsUI> | undefined) => BCFTopicsUI, currentState: () => BCFTopicsUI];
|
|
@@ -2,35 +2,27 @@ import * as BUI from "@thatopen/ui";
|
|
|
2
2
|
import { Components } from "../../../../../core";
|
|
3
3
|
import { Topic } from "../../Topic";
|
|
4
4
|
interface DataStyles {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
style?: Record<string, string>;
|
|
9
|
-
};
|
|
5
|
+
[name: string]: {
|
|
6
|
+
icon?: string;
|
|
7
|
+
style?: Record<string, string>;
|
|
10
8
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
};
|
|
9
|
+
}
|
|
10
|
+
interface UserStyles {
|
|
11
|
+
[email: string]: {
|
|
12
|
+
name: string;
|
|
13
|
+
picture?: string;
|
|
28
14
|
};
|
|
29
15
|
}
|
|
16
|
+
interface TopicDataStyles {
|
|
17
|
+
priorities?: DataStyles;
|
|
18
|
+
statuses?: DataStyles;
|
|
19
|
+
types?: DataStyles;
|
|
20
|
+
users?: UserStyles;
|
|
21
|
+
}
|
|
30
22
|
export interface BCFTopicsUI {
|
|
31
23
|
components: Components;
|
|
32
24
|
topics?: Iterable<Topic>;
|
|
33
|
-
|
|
25
|
+
dataStyles?: TopicDataStyles;
|
|
34
26
|
onTopicEnter?: (topic: Topic) => void | Promise<void>;
|
|
35
27
|
}
|
|
36
28
|
export declare const bcfTopicsListTemplate: (state: BCFTopicsUI) => BUI.TemplateResult<1>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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];
|
|
@@ -0,0 +1,19 @@
|
|
|
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 {};
|
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.0-alpha.
|
|
4
|
+
"version": "2.2.0-alpha.1",
|
|
5
5
|
"author": "That Open Company",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
|