@thatopen/components 2.2.5 → 2.3.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.
@@ -1,12 +1,13 @@
1
1
  import { XMLParser } from "fast-xml-parser";
2
- import { Component, Configurable, Disposable, Event, World, DataMap } from "../../core/Types";
3
- import { BCFTopic, BCFTopicsConfig, Topic } from "./src";
2
+ import { Component, Configurable, Disposable, Event, World, DataMap } from "../../core";
3
+ import { BCFTopic, Topic, BCFTopicsConfigManager, BCFTopicsConfig } from "./src";
4
4
  import { Viewpoint } from "../../core/Viewpoints";
5
- export declare class BCFTopics extends Component implements Disposable, Configurable<BCFTopicsConfig> {
5
+ export declare class BCFTopics extends Component implements Disposable, Configurable<BCFTopicsConfigManager, BCFTopicsConfig> {
6
6
  static uuid: "de977976-e4f6-4e4f-a01a-204727839802";
7
7
  enabled: boolean;
8
8
  static xmlParser: XMLParser;
9
- config: Required<BCFTopicsConfig>;
9
+ protected _defaultConfig: Required<BCFTopicsConfig>;
10
+ config: BCFTopicsConfigManager;
10
11
  readonly list: DataMap<string, Topic>;
11
12
  readonly onSetup: Event<unknown>;
12
13
  isSetup: boolean;
@@ -0,0 +1,181 @@
1
+ import { BCFTopics, BCFVersion } from "../index";
2
+ import { BooleanSettingsControl, ConfigManager, SelectSettingControl, TextSetSettingControl, TextSettingsControl } from "../../../core";
3
+ /**
4
+ * Configuration settings for managing BCF topics.
5
+ * This interface defines the properties and their meanings used to control the behavior of exporting and importing BCF topics.
6
+ */
7
+ export interface BCFTopicsConfig {
8
+ /**
9
+ * The BCF version used during export.
10
+ */
11
+ version: BCFVersion;
12
+ /**
13
+ * The email of the user creating topics using this component.
14
+ */
15
+ author: string;
16
+ /**
17
+ * The set of allowed topic types. This is exported inside the
18
+ * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
19
+ */
20
+ types: Set<string>;
21
+ /**
22
+ * The set of allowed topic statuses. This is exported inside the
23
+ * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
24
+ */
25
+ statuses: Set<string>;
26
+ /**
27
+ * The set of allowed topic priorities. This is exported inside the
28
+ * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
29
+ */
30
+ priorities: Set<string>;
31
+ /**
32
+ * The set of allowed topic labels. This is exported inside the
33
+ * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
34
+ */
35
+ labels: Set<string>;
36
+ /**
37
+ * The set of allowed topic stages. This is exported inside the
38
+ * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
39
+ */
40
+ stages: Set<string>;
41
+ /**
42
+ * The set of allowed topic users. This is exported inside the
43
+ * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
44
+ */
45
+ users: Set<string>;
46
+ /**
47
+ * Whether or not to include the AuthoringSoftwareId in the viewpoint components during export.
48
+ */
49
+ includeSelectionTag: boolean;
50
+ /**
51
+ * Updates the types, statuses, users, etc., after importing an external BCF.
52
+ */
53
+ updateExtensionsOnImport: boolean;
54
+ /**
55
+ * Only allow to use the extensions (types, statuses, etc.) defined in the config when setting the corresponding data in a topic.
56
+ */
57
+ strict: boolean;
58
+ /**
59
+ * If true, export the extensions (types, status, etc.) based on topics data. This doesn't update the extensions in the config.
60
+ * If false, only export the extensions defined in each collection of possibilities set in the config.
61
+ * In all cases, all the values from each collection of extensions defined in the config are going to be exported.
62
+ */
63
+ includeAllExtensionsOnExport: boolean;
64
+ /**
65
+ * Version to be used when importing if no bcf.version file is present in the incoming data.
66
+ * When null, the importer will throw an error if the version is missing or is not supported.
67
+ */
68
+ fallbackVersionOnImport: BCFVersion | null;
69
+ /**
70
+ * If true, do not import a topic with missing information (guid, type, status, title, creationDate or creationAuthor).
71
+ * If false, use default values for missing data.
72
+ */
73
+ ignoreIncompleteTopicsOnImport: boolean;
74
+ }
75
+ type BCFTopicsConfigType = {
76
+ version: SelectSettingControl;
77
+ author: TextSettingsControl;
78
+ types: TextSetSettingControl;
79
+ statuses: TextSetSettingControl;
80
+ priorities: TextSetSettingControl;
81
+ labels: TextSetSettingControl;
82
+ stages: TextSetSettingControl;
83
+ users: TextSetSettingControl;
84
+ includeSelectionTag: BooleanSettingsControl;
85
+ updateExtensionsOnImport: BooleanSettingsControl;
86
+ strict: BooleanSettingsControl;
87
+ includeAllExtensionsOnExport: BooleanSettingsControl;
88
+ fallbackVersionOnImport: SelectSettingControl;
89
+ ignoreIncompleteTopicsOnImport: BooleanSettingsControl;
90
+ };
91
+ export declare class BCFTopicsConfigManager extends ConfigManager<BCFTopics, BCFTopicsConfigType> {
92
+ protected _list: {
93
+ version: {
94
+ type: "Select";
95
+ options: Set<string>;
96
+ value: string;
97
+ };
98
+ author: {
99
+ type: "Text";
100
+ value: string;
101
+ };
102
+ types: {
103
+ type: "TextSet";
104
+ value: Set<string>;
105
+ };
106
+ statuses: {
107
+ type: "TextSet";
108
+ value: Set<string>;
109
+ };
110
+ priorities: {
111
+ type: "TextSet";
112
+ value: Set<string>;
113
+ };
114
+ labels: {
115
+ type: "TextSet";
116
+ value: Set<string>;
117
+ };
118
+ stages: {
119
+ type: "TextSet";
120
+ value: Set<string>;
121
+ };
122
+ users: {
123
+ type: "TextSet";
124
+ value: Set<string>;
125
+ };
126
+ includeSelectionTag: {
127
+ type: "Boolean";
128
+ value: boolean;
129
+ };
130
+ updateExtensionsOnImport: {
131
+ type: "Boolean";
132
+ value: boolean;
133
+ };
134
+ strict: {
135
+ type: "Boolean";
136
+ value: boolean;
137
+ };
138
+ includeAllExtensionsOnExport: {
139
+ type: "Boolean";
140
+ value: boolean;
141
+ };
142
+ fallbackVersionOnImport: {
143
+ type: "Select";
144
+ options: Set<string>;
145
+ value: string;
146
+ };
147
+ ignoreIncompleteTopicsOnImport: {
148
+ type: "Boolean";
149
+ value: boolean;
150
+ };
151
+ };
152
+ get version(): string;
153
+ set version(value: string);
154
+ get author(): string;
155
+ set author(value: string);
156
+ get types(): Set<string>;
157
+ set types(value: Set<string>);
158
+ get statuses(): Set<string>;
159
+ set statuses(value: Set<string>);
160
+ get priorities(): Set<string>;
161
+ set priorities(value: Set<string>);
162
+ get labels(): Set<string>;
163
+ set labels(value: Set<string>);
164
+ get stages(): Set<string>;
165
+ set stages(value: Set<string>);
166
+ get users(): Set<string>;
167
+ set users(value: Set<string>);
168
+ get includeSelectionTag(): boolean;
169
+ set includeSelectionTag(value: boolean);
170
+ get updateExtensionsOnImport(): boolean;
171
+ set updateExtensionsOnImport(value: boolean);
172
+ get strict(): boolean;
173
+ set strict(value: boolean);
174
+ get includeAllExtensionsOnExport(): boolean;
175
+ set includeAllExtensionsOnExport(value: boolean);
176
+ get fallbackVersionOnImport(): string;
177
+ set fallbackVersionOnImport(value: string);
178
+ get ignoreIncompleteTopicsOnImport(): boolean;
179
+ set ignoreIncompleteTopicsOnImport(value: boolean);
180
+ }
181
+ export {};
@@ -2,3 +2,4 @@ export * from "./Topic";
2
2
  export * from "./types";
3
3
  export * from "./Comment";
4
4
  export * from "./importers";
5
+ export * from "./bcf-topics-config";
@@ -17,75 +17,3 @@ 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
- */
24
- export interface BCFTopicsConfig {
25
- /**
26
- * The BCF version used during export.
27
- */
28
- version: BCFVersion;
29
- /**
30
- * The email of the user creating topics using this component.
31
- */
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
- */
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
- */
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
- */
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
- */
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
- */
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
- */
62
- users: Set<string>;
63
- /**
64
- * Whether or not to include the AuthoringSoftwareId in the viewpoint components during export.
65
- */
66
- includeSelectionTag: boolean;
67
- /**
68
- * Updates the types, statuses, users, etc., after importing an external BCF.
69
- */
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
- */
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
- */
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
- */
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
- */
90
- ignoreIncompleteTopicsOnImport: boolean;
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.5",
4
+ "version": "2.3.0-alpha.1",
5
5
  "author": "That Open Company",
6
6
  "contributors": [
7
7
  "Antonio Gonzalez Viegas (https://github.com/agviegas)",