@thatopen/components 2.3.16 → 2.3.17

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,7 +1,7 @@
1
1
  import * as FRAGS from "@thatopen/fragments";
2
2
  import { Components } from "../../../core/Components";
3
3
  import { DataSet } from "../../../core/Types";
4
- import { IDSCheckResult, IfcVersion } from "./types";
4
+ import { IDSCheckResult, IDSSpecificationData, IfcVersion } from "./types";
5
5
  import { IDSFacet } from "./facets";
6
6
  /**
7
7
  * Represents a single specification from the Information Delivery Specification (IDS) standard.
@@ -9,10 +9,10 @@ import { IDSFacet } from "./facets";
9
9
  * @remarks This class provides methods for testing a model against the specification,
10
10
  * as well as serializing the specification into XML format.
11
11
  */
12
- export declare class IDSSpecification {
12
+ export declare class IDSSpecification implements IDSSpecificationData {
13
13
  name: string;
14
14
  ifcVersion: Set<IfcVersion>;
15
- identifier: string;
15
+ readonly identifier: string;
16
16
  description?: string;
17
17
  instructions?: string;
18
18
  requirementsDescription?: string;
@@ -20,6 +20,7 @@ export declare class IDSSpecification {
20
20
  requirements: DataSet<IDSFacet>;
21
21
  protected components: Components;
22
22
  constructor(components: Components, name: string, ifcVersion: IfcVersion[]);
23
+ set(data: Partial<IDSSpecificationData>): this;
23
24
  /**
24
25
  * Tests the model to test against the specification's requirements.
25
26
  *
@@ -3,6 +3,7 @@ import { IDSCheckResult, IDSFacetParameter } from "../types";
3
3
  import { Components } from "../../../../core/Components";
4
4
  import { IDSFacet } from "./Facet";
5
5
  export declare class IDSAttribute extends IDSFacet {
6
+ facetType: "Attribute";
6
7
  name: IDSFacetParameter;
7
8
  value?: IDSFacetParameter;
8
9
  constructor(components: Components, name: IDSFacetParameter);
@@ -3,6 +3,7 @@ import { Components } from "../../../../core/Components";
3
3
  import { IDSCheckResult, IDSFacetParameter } from "../types";
4
4
  import { IDSFacet } from "./Facet";
5
5
  export declare class IDSClassification extends IDSFacet {
6
+ facetType: "Classification";
6
7
  system: IDSFacetParameter;
7
8
  value?: IDSFacetParameter;
8
9
  uri?: string;
@@ -3,6 +3,7 @@ import { Components } from "../../../../core/Components";
3
3
  import { IDSFacet } from "./Facet";
4
4
  import { IDSCheck, IDSCheckResult, IDSFacetParameter } from "../types";
5
5
  export declare class IDSEntity extends IDSFacet {
6
+ facetType: "Entity";
6
7
  name: IDSFacetParameter;
7
8
  predefinedType?: IDSFacetParameter;
8
9
  constructor(components: Components, name: IDSFacetParameter);
@@ -1,8 +1,9 @@
1
1
  import * as FRAGS from "@thatopen/fragments";
2
2
  import { Components } from "../../../../core/Components";
3
- import { IDSFacetParameter, IDSCheckResult, IDSFacetParameterName, IDSCheck, IDSConditionalCardinaltiy, IDSSimpleCardinality } from "../types";
3
+ import { IDSFacetParameter, IDSCheckResult, IDSFacetParameterName, IDSCheck, IDSConditionalCardinaltiy, IDSSimpleCardinality, IDSFacetType } from "../types";
4
4
  export declare abstract class IDSFacet {
5
5
  protected components: Components;
6
+ abstract facetType: IDSFacetType;
6
7
  cardinality: IDSSimpleCardinality | IDSConditionalCardinaltiy;
7
8
  instructions?: string;
8
9
  constructor(components: Components);
@@ -1,6 +1,7 @@
1
1
  import { IDSFacetParameter } from "../types";
2
2
  import { IDSFacet } from "./Facet";
3
3
  export declare class IdsMaterialFacet extends IDSFacet {
4
+ facetType: "Material";
4
5
  value?: IDSFacetParameter;
5
6
  uri?: string;
6
7
  serialize(type: "applicability" | "requirement"): string;
@@ -3,6 +3,7 @@ import { Components } from "../../../../core/Components";
3
3
  import { IDSFacet } from "./Facet";
4
4
  import { IDSFacetParameter, IDSSimpleCardinality } from "../types";
5
5
  export declare class IDSPartOf extends IDSFacet {
6
+ facetType: "PartOf";
6
7
  private _entityFacet;
7
8
  private _entity;
8
9
  set entity(value: {
@@ -3,6 +3,7 @@ import { IDSCheckResult, IDSFacetParameter } from "../types";
3
3
  import { Components } from "../../../../core/Components";
4
4
  import { IDSFacet } from "./Facet";
5
5
  export declare class IDSProperty extends IDSFacet {
6
+ facetType: "Property";
6
7
  propertySet: IDSFacetParameter;
7
8
  baseName: IDSFacetParameter;
8
9
  value?: IDSFacetParameter;
@@ -1,28 +1,39 @@
1
1
  export type IfcVersion = "IFC2X3" | "IFC4" | "IFC4X3_ADD2";
2
2
  export type IDSFacetParameterName = "Name" | "PredefinedType" | "Value" | "System" | "URI" | "PropertySet" | "BaseName" | "DataType" | "Value" | "Entity" | "Relation";
3
+ export type IDSFacetType = "Entity" | "Attribute" | "Property" | "Classification" | "Material" | "PartOf";
3
4
  export type IDSSimpleCardinality = "required" | "prohibited";
4
5
  export type IDSConditionalCardinaltiy = IDSSimpleCardinality | "optional";
5
- export type IDSSimpleParameter = string | number | boolean;
6
- export type IDSEnumerationParameter = string[] | number[] | boolean[];
7
- export type IDSPatternParameter = string;
8
- export type IDSBoundsParameter = {
9
- min?: number;
10
- minInclusive?: boolean;
11
- max?: number;
12
- maxInclusive?: boolean;
13
- };
14
- export type IDSLengthParameter = {
15
- min?: number;
16
- length?: number;
17
- max?: number;
18
- };
19
- export interface IDSRestrictionParameter {
20
- }
21
- export type IDSFacetParameterType = "simple" | "enumeration" | "pattern" | "bounds" | "length";
22
- export interface IDSFacetParameter {
23
- type: IDSFacetParameterType;
24
- parameter: IDSSimpleParameter | IDSEnumerationParameter | IDSPatternParameter | IDSBoundsParameter | IDSLengthParameter;
6
+ export interface IDSSimpleParameter {
7
+ type: "simple";
8
+ parameter: string | number | boolean;
25
9
  }
10
+ export interface IDSEnumerationParameter {
11
+ type: "enumeration";
12
+ parameter: string[] | number[] | boolean[];
13
+ }
14
+ export interface IDSPatternParameter {
15
+ type: "pattern";
16
+ parameter: string;
17
+ }
18
+ export interface IDSBoundsParameter {
19
+ type: "bounds";
20
+ parameter: {
21
+ min?: number;
22
+ minInclusive?: boolean;
23
+ max?: number;
24
+ maxInclusive?: boolean;
25
+ };
26
+ }
27
+ export interface IDSLengthParameter {
28
+ type: "length";
29
+ parameter: {
30
+ min?: number;
31
+ length?: number;
32
+ max?: number;
33
+ };
34
+ }
35
+ export type IDSRestrictionParameter = IDSEnumerationParameter | IDSPatternParameter | IDSBoundsParameter | IDSLengthParameter;
36
+ export type IDSFacetParameter = IDSSimpleParameter | IDSRestrictionParameter;
26
37
  export interface IDSCheck {
27
38
  parameter: IDSFacetParameterName;
28
39
  currentValue: string | number | boolean | null;
@@ -49,3 +60,11 @@ export interface IDSInfo {
49
60
  purpose?: string;
50
61
  milestone?: string;
51
62
  }
63
+ export interface IDSSpecificationData {
64
+ name: string;
65
+ ifcVersion: Set<IfcVersion>;
66
+ identifier: string;
67
+ description?: string;
68
+ instructions?: string;
69
+ requirementsDescription?: string;
70
+ }
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.3.16",
4
+ "version": "2.3.17",
5
5
  "author": "That Open Company",
6
6
  "contributors": [
7
7
  "Antonio Gonzalez Viegas (https://github.com/agviegas)",