@thatopen/components 2.4.11 → 3.1.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.
Files changed (162) hide show
  1. package/README.md +92 -92
  2. package/dist/index.cjs +18440 -25937
  3. package/dist/index.d.ts +4537 -6
  4. package/dist/index.min.cjs +3 -3
  5. package/dist/index.min.mjs +3 -3
  6. package/dist/index.mjs +18442 -25939
  7. package/package.json +58 -60
  8. package/dist/core/Clipper/index.d.ts +0 -142
  9. package/dist/core/Clipper/src/clipper-config.d.ts +0 -33
  10. package/dist/core/Clipper/src/index.d.ts +0 -1
  11. package/dist/core/Clipper/src/simple-plane.d.ts +0 -99
  12. package/dist/core/Components/index.d.ts +0 -93
  13. package/dist/core/ConfigManager/index.d.ts +0 -21
  14. package/dist/core/ConfigManager/src/configurator.d.ts +0 -13
  15. package/dist/core/ConfigManager/src/index.d.ts +0 -1
  16. package/dist/core/Cullers/index.d.ts +0 -56
  17. package/dist/core/Cullers/src/culler-renderer-config.d.ts +0 -74
  18. package/dist/core/Cullers/src/culler-renderer.d.ts +0 -76
  19. package/dist/core/Cullers/src/index.d.ts +0 -3
  20. package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +0 -59
  21. package/dist/core/Cullers/src/screen-culler-helper.d.ts +0 -1
  22. package/dist/core/Disposer/index.d.ts +0 -45
  23. package/dist/core/Grids/index.d.ts +0 -46
  24. package/dist/core/Grids/src/index.d.ts +0 -2
  25. package/dist/core/Grids/src/simple-grid-config.d.ts +0 -80
  26. package/dist/core/Grids/src/simple-grid.d.ts +0 -48
  27. package/dist/core/MiniMap/index.d.ts +0 -50
  28. package/dist/core/MiniMap/src/index.d.ts +0 -2
  29. package/dist/core/MiniMap/src/mini-map-config.d.ts +0 -112
  30. package/dist/core/MiniMap/src/mini-map.d.ts +0 -100
  31. package/dist/core/OrthoPerspectiveCamera/index.d.ts +0 -65
  32. package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +0 -16
  33. package/dist/core/OrthoPerspectiveCamera/src/index.d.ts +0 -5
  34. package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +0 -16
  35. package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +0 -20
  36. package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +0 -45
  37. package/dist/core/OrthoPerspectiveCamera/src/types.d.ts +0 -26
  38. package/dist/core/Raycasters/index.d.ts +0 -43
  39. package/dist/core/Raycasters/src/index.d.ts +0 -2
  40. package/dist/core/Raycasters/src/mouse.d.ts +0 -24
  41. package/dist/core/Raycasters/src/simple-raycaster.d.ts +0 -54
  42. package/dist/core/ShadowedScene/index.d.ts +0 -57
  43. package/dist/core/ShadowedScene/src/distance-renderer.d.ts +0 -67
  44. package/dist/core/ShadowedScene/src/index.d.ts +0 -1
  45. package/dist/core/Types/index.d.ts +0 -1
  46. package/dist/core/Types/src/async-event.d.ts +0 -32
  47. package/dist/core/Types/src/base-camera.d.ts +0 -28
  48. package/dist/core/Types/src/base-renderer.d.ts +0 -65
  49. package/dist/core/Types/src/base-scene.d.ts +0 -25
  50. package/dist/core/Types/src/base-world-item.d.ts +0 -23
  51. package/dist/core/Types/src/base.d.ts +0 -19
  52. package/dist/core/Types/src/component-with-ui.d.ts +0 -18
  53. package/dist/core/Types/src/component.d.ts +0 -13
  54. package/dist/core/Types/src/config-types.d.ts +0 -47
  55. package/dist/core/Types/src/data-map.d.ts +0 -73
  56. package/dist/core/Types/src/data-set.d.ts +0 -58
  57. package/dist/core/Types/src/event-manager.d.ts +0 -30
  58. package/dist/core/Types/src/event.d.ts +0 -32
  59. package/dist/core/Types/src/index.d.ts +0 -15
  60. package/dist/core/Types/src/interfaces.d.ts +0 -117
  61. package/dist/core/Types/src/world.d.ts +0 -34
  62. package/dist/core/Viewpoints/index.d.ts +0 -38
  63. package/dist/core/Viewpoints/src/index.d.ts +0 -2
  64. package/dist/core/Viewpoints/src/types.d.ts +0 -36
  65. package/dist/core/Viewpoints/src/viewpoint.d.ts +0 -197
  66. package/dist/core/Viewpoints/src/viewpoints-config.d.ts +0 -23
  67. package/dist/core/Worlds/index.d.ts +0 -54
  68. package/dist/core/Worlds/src/index.d.ts +0 -5
  69. package/dist/core/Worlds/src/simple-camera.d.ts +0 -62
  70. package/dist/core/Worlds/src/simple-renderer.d.ts +0 -54
  71. package/dist/core/Worlds/src/simple-scene-config.d.ts +0 -59
  72. package/dist/core/Worlds/src/simple-scene.d.ts +0 -25
  73. package/dist/core/Worlds/src/simple-world.d.ts +0 -79
  74. package/dist/core/index.d.ts +0 -13
  75. package/dist/fragments/BoundingBoxer/index.d.ts +0 -208
  76. package/dist/fragments/Classifier/index.d.ts +0 -197
  77. package/dist/fragments/Exploder/index.d.ts +0 -50
  78. package/dist/fragments/FragmentsManager/index.d.ts +0 -152
  79. package/dist/fragments/Hider/index.d.ts +0 -38
  80. package/dist/fragments/IfcGeometryTiler/index.d.ts +0 -103
  81. package/dist/fragments/IfcGeometryTiler/src/base-types.d.ts +0 -29
  82. package/dist/fragments/IfcGeometryTiler/src/index.d.ts +0 -2
  83. package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +0 -20
  84. package/dist/fragments/IfcLoader/index.d.ts +0 -116
  85. package/dist/fragments/IfcLoader/src/civil-reader.d.ts +0 -15
  86. package/dist/fragments/IfcLoader/src/ifc-fragment-settings.d.ts +0 -41
  87. package/dist/fragments/IfcLoader/src/ifc-metadata-reader.d.ts +0 -5
  88. package/dist/fragments/IfcLoader/src/index.d.ts +0 -5
  89. package/dist/fragments/IfcLoader/src/spatial-ids-finder.d.ts +0 -5
  90. package/dist/fragments/IfcLoader/src/spatial-structure.d.ts +0 -8
  91. package/dist/fragments/IfcLoader/src/transform-helper.d.ts +0 -5
  92. package/dist/fragments/IfcLoader/src/units.d.ts +0 -10
  93. package/dist/fragments/IfcPropertiesTiler/index.d.ts +0 -66
  94. package/dist/fragments/IfcPropertiesTiler/src/index.d.ts +0 -1
  95. package/dist/fragments/IfcPropertiesTiler/src/streaming-settings.d.ts +0 -11
  96. package/dist/fragments/index.d.ts +0 -8
  97. package/dist/ifc/IfcFinder/index.d.ts +0 -50
  98. package/dist/ifc/IfcFinder/src/ifc-basic-query.d.ts +0 -35
  99. package/dist/ifc/IfcFinder/src/ifc-finder-query.d.ts +0 -96
  100. package/dist/ifc/IfcFinder/src/ifc-property-query.d.ts +0 -36
  101. package/dist/ifc/IfcFinder/src/ifc-query-group.d.ts +0 -69
  102. package/dist/ifc/IfcFinder/src/index.d.ts +0 -4
  103. package/dist/ifc/IfcFinder/src/types.d.ts +0 -84
  104. package/dist/ifc/IfcIsolator/index.d.ts +0 -24
  105. package/dist/ifc/IfcJsonExporter/index.d.ts +0 -26
  106. package/dist/ifc/IfcJsonExporter/src/ifc-geometry-types.d.ts +0 -4
  107. package/dist/ifc/IfcJsonExporter/src/index.d.ts +0 -1
  108. package/dist/ifc/IfcPropertiesManager/index.d.ts +0 -289
  109. package/dist/ifc/IfcPropertiesManager/src/index.d.ts +0 -3
  110. package/dist/ifc/IfcPropertiesManager/src/rel-attrs.d.ts +0 -7
  111. package/dist/ifc/IfcPropertiesManager/src/rel-names.d.ts +0 -3
  112. package/dist/ifc/IfcPropertiesManager/src/types.d.ts +0 -18
  113. package/dist/ifc/IfcRelationsIndexer/index.d.ts +0 -195
  114. package/dist/ifc/IfcRelationsIndexer/src/index.d.ts +0 -2
  115. package/dist/ifc/IfcRelationsIndexer/src/newVersion.d.ts +0 -51
  116. package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +0 -5
  117. package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +0 -73
  118. package/dist/ifc/Utils/ifc-categories.d.ts +0 -7
  119. package/dist/ifc/Utils/ifc-category-case.d.ts +0 -3
  120. package/dist/ifc/Utils/ifc-category-map.d.ts +0 -6
  121. package/dist/ifc/Utils/ifc-elements-map.d.ts +0 -11
  122. package/dist/ifc/Utils/index.d.ts +0 -5
  123. package/dist/ifc/Utils/properties-utils.d.ts +0 -25
  124. package/dist/ifc/index.d.ts +0 -6
  125. package/dist/measurement/MeasurementUtils/index.d.ts +0 -105
  126. package/dist/measurement/index.d.ts +0 -1
  127. package/dist/namespace.d.ts +0 -6018
  128. package/dist/openbim/BCFTopics/index.d.ts +0 -114
  129. package/dist/openbim/BCFTopics/src/Comment.d.ts +0 -40
  130. package/dist/openbim/BCFTopics/src/Topic.d.ts +0 -127
  131. package/dist/openbim/BCFTopics/src/bcf-topics-config.d.ts +0 -121
  132. package/dist/openbim/BCFTopics/src/importers/extensions.d.ts +0 -2
  133. package/dist/openbim/BCFTopics/src/importers/index.d.ts +0 -1
  134. package/dist/openbim/BCFTopics/src/index.d.ts +0 -5
  135. package/dist/openbim/BCFTopics/src/types.d.ts +0 -19
  136. package/dist/openbim/IDSSpecifications/index.d.ts +0 -60
  137. package/dist/openbim/IDSSpecifications/src/Specification.d.ts +0 -40
  138. package/dist/openbim/IDSSpecifications/src/exporters/parameter.d.ts +0 -2
  139. package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +0 -13
  140. package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +0 -21
  141. package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +0 -15
  142. package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +0 -26
  143. package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +0 -10
  144. package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +0 -26
  145. package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +0 -25
  146. package/dist/openbim/IDSSpecifications/src/facets/index.d.ts +0 -5
  147. package/dist/openbim/IDSSpecifications/src/importers/attribute.d.ts +0 -3
  148. package/dist/openbim/IDSSpecifications/src/importers/classification.d.ts +0 -3
  149. package/dist/openbim/IDSSpecifications/src/importers/entity.d.ts +0 -3
  150. package/dist/openbim/IDSSpecifications/src/importers/index.d.ts +0 -3
  151. package/dist/openbim/IDSSpecifications/src/importers/parameter.d.ts +0 -2
  152. package/dist/openbim/IDSSpecifications/src/importers/property.d.ts +0 -3
  153. package/dist/openbim/IDSSpecifications/src/index.d.ts +0 -3
  154. package/dist/openbim/IDSSpecifications/src/types.d.ts +0 -70
  155. package/dist/openbim/index.d.ts +0 -2
  156. package/dist/utils/bbox.d.ts +0 -7
  157. package/dist/utils/geometry.d.ts +0 -1
  158. package/dist/utils/index.d.ts +0 -6
  159. package/dist/utils/materials.d.ts +0 -4
  160. package/dist/utils/section-generator.d.ts +0 -31
  161. package/dist/utils/uuid.d.ts +0 -6
  162. package/dist/utils/vertex-picker.d.ts +0 -116
@@ -1,114 +0,0 @@
1
- import { XMLParser } from "fast-xml-parser";
2
- import { Component, Configurable, Disposable, Event, World, DataMap } from "../../core";
3
- import { BCFTopic, Topic, BCFTopicsConfigManager, BCFTopicsConfig } from "./src";
4
- import { Viewpoint } from "../../core/Viewpoints";
5
- /**
6
- * BCFTopics manages Building Collaboration Format (BCF) data the engine. It provides functionality for importing, exporting, and manipulating BCF data.
7
- */
8
- export declare class BCFTopics extends Component implements Disposable, Configurable<BCFTopicsConfigManager, BCFTopicsConfig> {
9
- static uuid: "de977976-e4f6-4e4f-a01a-204727839802";
10
- enabled: boolean;
11
- static xmlParser: XMLParser;
12
- protected _defaultConfig: Required<BCFTopicsConfig>;
13
- config: BCFTopicsConfigManager;
14
- readonly list: DataMap<string, Topic>;
15
- readonly onSetup: Event<unknown>;
16
- isSetup: boolean;
17
- setup(config?: Partial<BCFTopicsConfig>): void;
18
- readonly onBCFImported: Event<Topic[]>;
19
- /**
20
- * Creates a new BCFTopic instance and adds it to the list.
21
- *
22
- * @param data - Optional partial BCFTopic object to initialize the new topic with.
23
- * If not provided, default values will be used.
24
- * @returns The newly created BCFTopic instance.
25
- */
26
- create(data?: Partial<BCFTopic>): Topic;
27
- readonly onDisposed: Event<unknown>;
28
- /**
29
- * Disposes of the BCFTopics component and triggers the onDisposed event.
30
- *
31
- * @remarks
32
- * This method clears the list of topics and triggers the onDisposed event.
33
- * It also resets the onDisposed event listener.
34
- */
35
- dispose(): void;
36
- /**
37
- * Retrieves the unique set of topic types used across all topics.
38
- *
39
- * @returns A Set containing the unique topic types.
40
- */
41
- get usedTypes(): Set<string>;
42
- /**
43
- * Retrieves the unique set of topic statuses used across all topics.
44
- *
45
- * @returns A Set containing the unique topic statuses.
46
- */
47
- get usedStatuses(): Set<string>;
48
- /**
49
- * Retrieves the unique set of topic priorities used across all topics.
50
- *
51
- * @returns A Set containing the unique topic priorities.
52
- * Note: This method filters out any null or undefined priorities.
53
- */
54
- get usedPriorities(): Set<string | undefined>;
55
- /**
56
- * Retrieves the unique set of topic stages used across all topics.
57
- *
58
- * @returns A Set containing the unique topic stages.
59
- * Note: This method filters out any null or undefined stages.
60
- */
61
- get usedStages(): Set<string | undefined>;
62
- /**
63
- * Retrieves the unique set of users associated with topics.
64
- *
65
- * @returns A Set containing the unique users.
66
- * Note: This method collects users from the creation author, assigned to, modified author, and comment authors.
67
- */
68
- get usedUsers(): Set<string>;
69
- /**
70
- * Retrieves the unique set of labels used across all topics.
71
- *
72
- * @returns A Set containing the unique labels.
73
- */
74
- get usedLabels(): Set<string>;
75
- /**
76
- * Updates the set of extensions (types, statuses, priorities, labels, stages, users) based on the current topics.
77
- * This method iterates through each topic in the list and adds its properties to the corresponding sets in the config.
78
- */
79
- updateExtensions(): void;
80
- /**
81
- * Updates the references to viewpoints in the topics.
82
- * This function iterates through each topic and checks if the viewpoints exist in the viewpoints list.
83
- * If a viewpoint does not exist, it is removed from the topic's viewpoints.
84
- */
85
- updateViewpointReferences(): void;
86
- /**
87
- * Exports the given topics to a BCF (Building Collaboration Format) zip file.
88
- *
89
- * @param topics - The topics to export. Defaults to all topics in the list.
90
- * @returns A promise that resolves to a Blob containing the exported BCF zip file.
91
- */
92
- export(topics?: Iterable<Topic>): Promise<Blob>;
93
- private serializeExtensions;
94
- private processMarkupComment;
95
- private getMarkupComments;
96
- private getMarkupLabels;
97
- private getMarkupViewpoints;
98
- private getMarkupRelatedTopics;
99
- /**
100
- * Loads BCF (Building Collaboration Format) data into the engine.
101
- *
102
- * @param world - The default world where the viewpoints are going to be created.
103
- * @param data - The BCF data to load.
104
- *
105
- * @returns A promise that resolves to an object containing the created viewpoints and topics.
106
- *
107
- * @throws An error if the BCF version is not supported.
108
- */
109
- load(data: Uint8Array, world: World): Promise<{
110
- viewpoints: Viewpoint[];
111
- topics: Topic[];
112
- }>;
113
- }
114
- export * from "./src";
@@ -1,40 +0,0 @@
1
- import { Topic } from "..";
2
- import { Viewpoint } from "../../../core/Viewpoints";
3
- import { Components } from "../../../core/Components";
4
- /**
5
- * Represents a comment in a BCF Topic.
6
- */
7
- export declare class Comment {
8
- date: Date;
9
- author: string;
10
- guid: string;
11
- viewpoint?: Viewpoint;
12
- modifiedAuthor?: string;
13
- modifiedDate?: Date;
14
- topic?: Topic;
15
- private _components;
16
- private _comment;
17
- /**
18
- * Sets the comment text and updates the modified date and author.
19
- * The author will be the one defined in BCFTopics.config.author
20
- * @param value - The new comment text.
21
- */
22
- set comment(value: string);
23
- /**
24
- * Gets the comment text.
25
- * @returns The comment text.
26
- */
27
- get comment(): string;
28
- /**
29
- * Constructs a new BCF Topic Comment instance.
30
- * @param components - The Components instance.
31
- * @param text - The initial comment text.
32
- */
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
- */
39
- serialize(): string;
40
- }
@@ -1,127 +0,0 @@
1
- import { Components } from "../../../core/Components";
2
- import { Viewpoint } from "../../../core/Viewpoints";
3
- import { Comment } from "./Comment";
4
- import { BCFTopic } from "./types";
5
- import { DataMap, DataSet } from "../../../core/Types";
6
- export declare class Topic implements BCFTopic {
7
- /**
8
- * Default values for a BCF Topic, excluding `guid`, `creationDate`, and `creationAuthor`.
9
- */
10
- static default: Omit<Partial<BCFTopic> & {
11
- title: string;
12
- type: string;
13
- status: string;
14
- }, "guid" | "creationDate" | "creationAuthor">;
15
- /**
16
- * A unique identifier for the topic.
17
- *
18
- * @remarks
19
- * The `guid` is automatically generated upon topic creation and by no means it should change.
20
- */
21
- guid: string;
22
- title: string;
23
- creationDate: Date;
24
- creationAuthor: string;
25
- readonly viewpoints: DataSet<string>;
26
- readonly relatedTopics: DataSet<string>;
27
- readonly comments: DataMap<string, Comment>;
28
- customData: Record<string, any>;
29
- description?: string;
30
- serverAssignedId?: string;
31
- dueDate?: Date;
32
- modifiedAuthor?: string;
33
- modifiedDate?: Date;
34
- index?: number;
35
- private _type;
36
- set type(value: string);
37
- get type(): string;
38
- private _status;
39
- set status(value: string);
40
- get status(): string;
41
- private _priority?;
42
- set priority(value: string | undefined);
43
- get priority(): string | undefined;
44
- private _stage?;
45
- set stage(value: string | undefined);
46
- get stage(): string | undefined;
47
- private _assignedTo?;
48
- set assignedTo(value: string | undefined);
49
- get assignedTo(): string | undefined;
50
- private _labels;
51
- set labels(value: Set<string>);
52
- get labels(): Set<string>;
53
- private _components;
54
- private get _managerVersion();
55
- /**
56
- * Initializes a new instance of the `Topic` class representing a BCF (BIM Collaboration Format) topic.
57
- * It provides methods and properties to manage and serialize BCF topics.
58
- *
59
- * @remarks
60
- * The default creationUser is the one set in BCFTopics.config.author
61
- * It should not be created manually. Better use BCFTopics.create().
62
- *
63
- * @param components - The `Components` instance that provides access to other components and services.
64
- */
65
- constructor(components: Components);
66
- /**
67
- * Sets properties of the BCF Topic based on the provided data.
68
- *
69
- * @remarks
70
- * This method iterates over the provided `data` object and updates the corresponding properties of the BCF Topic.
71
- * It skips the `guid` property as it should not be modified.
72
- *
73
- * @param data - An object containing the properties to be updated.
74
- * @returns The topic
75
- *
76
- * @example
77
- * ```typescript
78
- * const topic = new Topic(components);
79
- * topic.set({
80
- * title: "New BCF Topic Title",
81
- * description: "This is a new description.",
82
- * status: "Resolved",
83
- * });
84
- * ```
85
- */
86
- set(data: Partial<BCFTopic>): this;
87
- /**
88
- * Creates a new comment associated with the current topic.
89
- *
90
- * @param text - The text content of the comment.
91
- * @param viewpoint - (Optional) The viewpoint associated with the comment.
92
- *
93
- * @returns The newly created comment.
94
- *
95
- * @example
96
- * ```typescript
97
- * const viewpoint = viewpoints.create(world); // Created with an instance of Viewpoints
98
- * const topic = topics.create(); // Created with an instance of BCFTopics
99
- * topic.viewpoints.add(viewpoint);
100
- * const comment = topic.createComment("This is a new comment", viewpoint);
101
- * ```
102
- */
103
- createComment(text: string, viewpoint?: Viewpoint): Comment;
104
- private createLabelTags;
105
- private createCommentTags;
106
- private createViewpointTags;
107
- private createRelatedTopicTags;
108
- /**
109
- * Serializes the BCF Topic instance into an XML string representation based on the official schema.
110
- *
111
- * @remarks
112
- * This method constructs an XML string based on the properties of the BCF Topic instance.
113
- * It includes the topic's guid, type, status, creation date, creation author, priority, index,
114
- * modified date, modified author, due date, assigned to, description, stage, labels, related topics,
115
- * comments, and viewpoints.
116
- *
117
- * @returns A string representing the XML serialization of the BCF Topic.
118
- *
119
- * @example
120
- * ```typescript
121
- * const topic = bcfTopics.create(); // Created with an instance of BCFTopics
122
- * const xml = topic.serialize();
123
- * console.log(xml);
124
- * ```
125
- */
126
- serialize(): string;
127
- }
@@ -1,121 +0,0 @@
1
- import { BCFTopics, BCFVersion } from "../index";
2
- import { BooleanSettingsControl, Configurator, SelectSettingControl, TextSetSettingControl, TextSettingsControl } from "../../../core";
3
- /**
4
- * Configuration settings for managing BCF topics. This interface defines the properties and their meanings used to control the behavior of exporting and importing BCF topics.
5
- */
6
- export interface BCFTopicsConfig {
7
- /**
8
- * The BCF version used during export.
9
- */
10
- version: BCFVersion;
11
- /**
12
- * The email of the user creating topics using this component.
13
- */
14
- author: string;
15
- /**
16
- * The set of allowed topic types. This is exported inside the
17
- * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
18
- */
19
- types: Set<string>;
20
- /**
21
- * The set of allowed topic statuses. This is exported inside the
22
- * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
23
- */
24
- statuses: Set<string>;
25
- /**
26
- * The set of allowed topic priorities. This is exported inside the
27
- * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
28
- */
29
- priorities: Set<string>;
30
- /**
31
- * The set of allowed topic labels. This is exported inside the
32
- * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
33
- */
34
- labels: Set<string>;
35
- /**
36
- * The set of allowed topic stages. This is exported inside the
37
- * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
38
- */
39
- stages: Set<string>;
40
- /**
41
- * The set of allowed topic users. This is exported inside the
42
- * [bcf.extensions](https://github.com/buildingSMART/BCF-XML/tree/release_3_0/Documentation#bcf-file-structure).
43
- */
44
- users: Set<string>;
45
- /**
46
- * Whether or not to include the AuthoringSoftwareId in the viewpoint components during export.
47
- */
48
- includeSelectionTag: boolean;
49
- /**
50
- * Updates the types, statuses, users, etc., after importing an external BCF.
51
- */
52
- updateExtensionsOnImport: boolean;
53
- /**
54
- * Only allow to use the extensions (types, statuses, etc.) defined in the config when setting the corresponding data in a topic.
55
- */
56
- strict: boolean;
57
- /**
58
- * If true, export the extensions (types, status, etc.) based on topics data. This doesn't update the extensions in the config.
59
- * If false, only export the extensions defined in each collection of possibilities set in the config.
60
- * In all cases, all the values from each collection of extensions defined in the config are going to be exported.
61
- */
62
- includeAllExtensionsOnExport: boolean;
63
- /**
64
- * Version to be used when importing if no bcf.version file is present in the incoming data.
65
- * When null, the importer will throw an error if the version is missing or is not supported.
66
- */
67
- fallbackVersionOnImport: BCFVersion | null;
68
- /**
69
- * If true, do not import a topic with missing information (guid, type, status, title, creationDate or creationAuthor).
70
- * If false, use default values for missing data.
71
- */
72
- ignoreIncompleteTopicsOnImport: boolean;
73
- }
74
- type BCFTopicsConfigType = {
75
- version: SelectSettingControl;
76
- author: TextSettingsControl;
77
- types: TextSetSettingControl;
78
- statuses: TextSetSettingControl;
79
- priorities: TextSetSettingControl;
80
- labels: TextSetSettingControl;
81
- stages: TextSetSettingControl;
82
- users: TextSetSettingControl;
83
- includeSelectionTag: BooleanSettingsControl;
84
- updateExtensionsOnImport: BooleanSettingsControl;
85
- strict: BooleanSettingsControl;
86
- includeAllExtensionsOnExport: BooleanSettingsControl;
87
- fallbackVersionOnImport: SelectSettingControl;
88
- ignoreIncompleteTopicsOnImport: BooleanSettingsControl;
89
- };
90
- export declare class BCFTopicsConfigManager extends Configurator<BCFTopics, BCFTopicsConfigType> {
91
- protected _config: BCFTopicsConfigType;
92
- get version(): string;
93
- set version(value: string);
94
- get author(): string;
95
- set author(value: string);
96
- get types(): Set<string>;
97
- set types(value: Set<string>);
98
- get statuses(): Set<string>;
99
- set statuses(value: Set<string>);
100
- get priorities(): Set<string>;
101
- set priorities(value: Set<string>);
102
- get labels(): Set<string>;
103
- set labels(value: Set<string>);
104
- get stages(): Set<string>;
105
- set stages(value: Set<string>);
106
- get users(): Set<string>;
107
- set users(value: Set<string>);
108
- get includeSelectionTag(): boolean;
109
- set includeSelectionTag(value: boolean);
110
- get updateExtensionsOnImport(): boolean;
111
- set updateExtensionsOnImport(value: boolean);
112
- get strict(): boolean;
113
- set strict(value: boolean);
114
- get includeAllExtensionsOnExport(): boolean;
115
- set includeAllExtensionsOnExport(value: boolean);
116
- get fallbackVersionOnImport(): string;
117
- set fallbackVersionOnImport(value: string);
118
- get ignoreIncompleteTopicsOnImport(): boolean;
119
- set ignoreIncompleteTopicsOnImport(value: boolean);
120
- }
121
- export {};
@@ -1,2 +0,0 @@
1
- import { BCFTopics } from "../..";
2
- export declare const extensionsImporter: (manager: BCFTopics, extensionsXML: string) => void;
@@ -1 +0,0 @@
1
- export * from "./extensions";
@@ -1,5 +0,0 @@
1
- export * from "./Topic";
2
- export * from "./types";
3
- export * from "./Comment";
4
- export * from "./importers";
5
- export * from "./bcf-topics-config";
@@ -1,19 +0,0 @@
1
- export type BCFVersion = "2.1" | "3";
2
- export interface BCFTopic {
3
- guid: string;
4
- serverAssignedId?: string;
5
- type: string;
6
- status: string;
7
- title: string;
8
- priority?: string;
9
- index?: number;
10
- labels: Set<string>;
11
- creationDate: Date;
12
- creationAuthor: string;
13
- modifiedDate?: Date;
14
- modifiedAuthor?: string;
15
- dueDate?: Date;
16
- assignedTo?: string;
17
- description?: string;
18
- stage?: string;
19
- }
@@ -1,60 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { XMLParser } from "fast-xml-parser";
3
- import { Component, DataMap } from "../../core/Types";
4
- import { IDSCheckResult, IDSInfo, IDSSpecification, IfcVersion } from "./src";
5
- import { Components } from "../../core";
6
- /**
7
- * Component that manages Information Delivery Specification (IDS) data. It provides functionality for importing, exporting, and manipulating IDS data.
8
- */
9
- export declare class IDSSpecifications extends Component {
10
- static uuid: "9f0b9f78-9b2e-481a-b766-2fbfd01f342c";
11
- enabled: boolean;
12
- static xmlParser: XMLParser;
13
- constructor(components: Components);
14
- readonly list: DataMap<string, IDSSpecification>;
15
- /**
16
- * Retrieves a FragmentIdMap based on the given IDSCheckResult array.
17
- * The map separates the IDs into two categories: pass and fail.
18
- *
19
- * @param model - The FragmentsGroup model from which to retrieve the fragment map.
20
- * @param result - An array of IDSCheckResult objects, each representing a check result.
21
- *
22
- * @returns An object containing two properties:
23
- * - `pass`: A FragmentIdMap that passed the checks.
24
- * - `fail`: A FragmentIdMap that failed the checks.
25
- */
26
- getFragmentIdMap(model: FRAGS.FragmentsGroup, result: IDSCheckResult[]): {
27
- pass: FRAGS.FragmentIdMap;
28
- fail: FRAGS.FragmentIdMap;
29
- };
30
- /**
31
- * Creates a new IDSSpecification instance and adds it to the list.
32
- *
33
- * @param name - The name of the IDSSpecification.
34
- * @param ifcVersion - An array of IfcVersion values that the specification supports.
35
- *
36
- * @returns The newly created IDSSpecification instance.
37
- */
38
- create(name: string, ifcVersion: IfcVersion[], identifier?: string): IDSSpecification;
39
- /**
40
- * Parses and processes an XML string containing Information Delivery Specification (IDS) data.
41
- * It creates IDSSpecification instances based on the parsed data and returns them in an array.
42
- * Also, the instances are added to the list array.
43
- *
44
- * @param data - The XML string to parse.
45
- *
46
- * @returns An array of IDSSpecification instances created from the parsed data.
47
- */
48
- load(data: string): IDSSpecification[];
49
- /**
50
- * Exports the IDSSpecifications data into an XML string.
51
- *
52
- * @param info - The metadata information for the exported XML.
53
- * @param specifications - An optional iterable of IDSSpecification instances to export.
54
- * If not provided, all specifications in the list will be exported.
55
- *
56
- * @returns A string containing the exported IDSSpecifications data in XML format.
57
- */
58
- export(info: IDSInfo, specifications?: Iterable<IDSSpecification>): string;
59
- }
60
- export * from "./src";
@@ -1,40 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { Components } from "../../../core/Components";
3
- import { DataSet } from "../../../core/Types";
4
- import { IDSCheckResult, IDSSpecificationData, IfcVersion } from "./types";
5
- import { IDSFacet } from "./facets";
6
- /**
7
- * Represents a single specification from the Information Delivery Specification (IDS) standard.
8
- *
9
- * @remarks This class provides methods for testing a model against the specification,
10
- * as well as serializing the specification into XML format.
11
- */
12
- export declare class IDSSpecification implements IDSSpecificationData {
13
- name: string;
14
- ifcVersion: Set<IfcVersion>;
15
- readonly identifier: string;
16
- description?: string;
17
- instructions?: string;
18
- requirementsDescription?: string;
19
- applicability: DataSet<IDSFacet>;
20
- requirements: DataSet<IDSFacet>;
21
- protected components: Components;
22
- constructor(components: Components, name: string, ifcVersion: IfcVersion[]);
23
- set(data: Partial<IDSSpecificationData>): this;
24
- /**
25
- * Tests the model to test against the specification's requirements.
26
- *
27
- * @param model - The model to be tested.
28
- * @returns An array representing the test results.
29
- * If no requirements are defined for the specification, an empty array is returned.
30
- */
31
- test(model: FRAGS.FragmentsGroup): Promise<IDSCheckResult[]>;
32
- /**
33
- * Serializes the IDSSpecification instance into XML format.
34
- *
35
- * @remarks This method is not meant to be used directly. It is used by the IDSSpecifications component.
36
- *
37
- * @returns The XML representation of the IDSSpecification.
38
- */
39
- serialize(): string;
40
- }
@@ -1,2 +0,0 @@
1
- import { IDSFacetParameterName, IDSFacetParameter } from "../types";
2
- export declare const getParameterXML: (name: IDSFacetParameterName, parameter?: IDSFacetParameter) => string;
@@ -1,13 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { IDSCheckResult, IDSFacetParameter } from "../types";
3
- import { Components } from "../../../../core/Components";
4
- import { IDSFacet } from "./Facet";
5
- export declare class IDSAttribute extends IDSFacet {
6
- facetType: "Attribute";
7
- name: IDSFacetParameter;
8
- value?: IDSFacetParameter;
9
- constructor(components: Components, name: IDSFacetParameter);
10
- serialize(type: "applicability" | "requirement"): string;
11
- getEntities(): Promise<never[]>;
12
- test(entities: FRAGS.IfcProperties): Promise<IDSCheckResult[]>;
13
- }
@@ -1,21 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { Components } from "../../../../core/Components";
3
- import { IDSCheckResult, IDSFacetParameter } from "../types";
4
- import { IDSFacet } from "./Facet";
5
- export declare class IDSClassification extends IDSFacet {
6
- facetType: "Classification";
7
- system: IDSFacetParameter;
8
- value?: IDSFacetParameter;
9
- uri?: string;
10
- constructor(components: Components, system: IDSFacetParameter);
11
- serialize(type: "applicability" | "requirement"): string;
12
- getEntities(model: FRAGS.FragmentsGroup, collector?: FRAGS.IfcProperties): Promise<number[]>;
13
- test(entities: FRAGS.IfcProperties, model: FRAGS.FragmentsGroup): Promise<IDSCheckResult[]>;
14
- private processReferencedSource;
15
- private getSystems;
16
- private getSystemName;
17
- private getAllReferenceIdentifications;
18
- private evalSystem;
19
- private evalValue;
20
- private evalURI;
21
- }
@@ -1,15 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { Components } from "../../../../core/Components";
3
- import { IDSFacet } from "./Facet";
4
- import { IDSCheck, IDSCheckResult, IDSFacetParameter } from "../types";
5
- export declare class IDSEntity extends IDSFacet {
6
- facetType: "Entity";
7
- name: IDSFacetParameter;
8
- predefinedType?: IDSFacetParameter;
9
- constructor(components: Components, name: IDSFacetParameter);
10
- serialize(type: "applicability" | "requirement"): string;
11
- getEntities(model: FRAGS.FragmentsGroup, collector?: FRAGS.IfcProperties): Promise<number[]>;
12
- test(entities: FRAGS.IfcProperties, model: FRAGS.FragmentsGroup): Promise<IDSCheckResult[]>;
13
- protected evalName(attrs: any, checks?: IDSCheck[]): Promise<boolean>;
14
- protected evalPredefinedType(model: FRAGS.FragmentsGroup, attrs: any, checks?: IDSCheck[]): Promise<boolean | null>;
15
- }
@@ -1,26 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { Components } from "../../../../core/Components";
3
- import { IDSFacetParameter, IDSCheckResult, IDSFacetParameterName, IDSCheck, IDSConditionalCardinaltiy, IDSSimpleCardinality, IDSFacetType } from "../types";
4
- export declare abstract class IDSFacet {
5
- protected components: Components;
6
- abstract facetType: IDSFacetType;
7
- cardinality: IDSSimpleCardinality | IDSConditionalCardinaltiy;
8
- instructions?: string;
9
- constructor(components: Components);
10
- protected addCheckResult(check: IDSCheck, checks: IDSCheck[]): void;
11
- protected evalRequirement: (value: string | number | boolean | null, facetParameter: IDSFacetParameter, parameter: IDSFacetParameterName, checks?: IDSCheck[]) => boolean;
12
- protected testResult: IDSCheckResult[];
13
- protected saveResult(attrs: any, pass: boolean): void;
14
- /**
15
- * Returns the list of expressIDs that pass the criteria of this facet.
16
- * @param model - The IFC model to retrieve entities from.
17
- * @param collector - An optional object to collect the retrieved entities.
18
- * @remarks
19
- * If the collector already includes the entity, it won't get processed any further.
20
- *
21
- * @returns An array of express IDs of the retrieved entities.
22
- */
23
- abstract getEntities(model: FRAGS.FragmentsGroup, collector: FRAGS.IfcProperties): Promise<number[]>;
24
- abstract test(entities: FRAGS.IfcProperties, model?: FRAGS.FragmentsGroup): Promise<IDSCheckResult[]>;
25
- abstract serialize(type: "applicability" | "requirement"): string;
26
- }
@@ -1,10 +0,0 @@
1
- import { IDSFacetParameter } from "../types";
2
- import { IDSFacet } from "./Facet";
3
- export declare class IdsMaterialFacet extends IDSFacet {
4
- facetType: "Material";
5
- value?: IDSFacetParameter;
6
- uri?: string;
7
- serialize(type: "applicability" | "requirement"): string;
8
- getEntities(): Promise<number[]>;
9
- test(): Promise<import("../types").IDSCheckResult[]>;
10
- }
@@ -1,26 +0,0 @@
1
- import * as FRAGS from "@thatopen/fragments";
2
- import { Components } from "../../../../core/Components";
3
- import { IDSFacet } from "./Facet";
4
- import { IDSFacetParameter, IDSSimpleCardinality } from "../types";
5
- export declare class IDSPartOf extends IDSFacet {
6
- facetType: "PartOf";
7
- private _entityFacet;
8
- private _entity;
9
- set entity(value: {
10
- name: IDSFacetParameter;
11
- predefinedType?: IDSFacetParameter;
12
- });
13
- get entity(): {
14
- name: IDSFacetParameter;
15
- predefinedType?: IDSFacetParameter;
16
- };
17
- relation?: number;
18
- cardinality: IDSSimpleCardinality;
19
- constructor(components: Components, entity: {
20
- name: IDSFacetParameter;
21
- predefinedType?: IDSFacetParameter;
22
- });
23
- serialize(): string;
24
- getEntities(model: FRAGS.FragmentsGroup, collector?: FRAGS.IfcProperties): Promise<number[]>;
25
- test(entities: FRAGS.IfcProperties, model: FRAGS.FragmentsGroup): Promise<import("../types").IDSCheckResult[]>;
26
- }