@furo/open-models 1.13.0-rc.1 → 1.14.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.
@@ -1039,6 +1039,26 @@
1039
1039
  }
1040
1040
  ]
1041
1041
  },
1042
+ {
1043
+ "kind": "method",
1044
+ "name": "isRegistered",
1045
+ "static": true,
1046
+ "parameters": [
1047
+ {
1048
+ "name": "type",
1049
+ "description": "The name of the type to check for registration.",
1050
+ "type": {
1051
+ "text": "string"
1052
+ }
1053
+ }
1054
+ ],
1055
+ "description": "Checks whether a given type is registered.",
1056
+ "return": {
1057
+ "type": {
1058
+ "text": "boolean"
1059
+ }
1060
+ }
1061
+ },
1042
1062
  {
1043
1063
  "kind": "method",
1044
1064
  "name": "createInstanceByTypeName",
@@ -87856,7 +87876,7 @@
87856
87876
  "declarations": [
87857
87877
  {
87858
87878
  "kind": "class",
87859
- "description": "Colour",
87879
+ "description": "Colour\n Colour is a rgba color",
87860
87880
  "name": "Colour",
87861
87881
  "members": [
87862
87882
  {
@@ -87902,7 +87922,7 @@
87902
87922
  "type": {
87903
87923
  "text": "string"
87904
87924
  },
87905
- "default": "'Colour'"
87925
+ "default": "'Colour Colour is a rgba color'"
87906
87926
  },
87907
87927
  {
87908
87928
  "kind": "field",
@@ -87910,7 +87930,7 @@
87910
87930
  "type": {
87911
87931
  "text": "array"
87912
87932
  },
87913
- "default": "[ { fieldName: 'red', protoName: 'red', FieldConstructor: INT32, constraints: { maximum: 255 }, description: 'multiline leading comment\\n the red part', }, { fieldName: 'green', protoName: 'green', FieldConstructor: INT32, constraints: { maximum: 255 }, description: 'the green part', }, { fieldName: 'blue', protoName: 'blue', FieldConstructor: INT32, constraints: { maximum: 255 }, description: '', }, { fieldName: 'alpha', protoName: 'alpha', FieldConstructor: FLOAT, constraints: { maximum: 1 }, description: '', }, ]"
87933
+ "default": "[ { fieldName: 'red', protoName: 'red', FieldConstructor: INT32, constraints: { maximum: 255 }, description: 'the red part of the color', }, { fieldName: 'green', protoName: 'green', FieldConstructor: INT32, constraints: { maximum: 255 }, description: 'the green part of the color', }, { fieldName: 'blue', protoName: 'blue', FieldConstructor: INT32, constraints: { maximum: 255 }, description: 'the blue part of the color', }, { fieldName: 'alpha', protoName: 'alpha', FieldConstructor: FLOAT, constraints: { maximum: 1 }, description: '', }, ]"
87914
87934
  },
87915
87935
  {
87916
87936
  "kind": "field",
@@ -88796,7 +88816,7 @@
88796
88816
  "declarations": [
88797
88817
  {
88798
88818
  "kind": "class",
88799
- "description": "CubeDefinition",
88819
+ "description": "CubeDefinition\n CubeDefinition is a definition of a cube.",
88800
88820
  "name": "CubeDefinition",
88801
88821
  "members": [
88802
88822
  {
@@ -88819,18 +88839,6 @@
88819
88839
  "kind": "field",
88820
88840
  "name": "material"
88821
88841
  },
88822
- {
88823
- "kind": "field",
88824
- "name": "str"
88825
- },
88826
- {
88827
- "kind": "field",
88828
- "name": "boo"
88829
- },
88830
- {
88831
- "kind": "field",
88832
- "name": "num"
88833
- },
88834
88842
  {
88835
88843
  "kind": "method",
88836
88844
  "name": "fromLiteral",
@@ -88858,7 +88866,7 @@
88858
88866
  "type": {
88859
88867
  "text": "string"
88860
88868
  },
88861
- "default": "'CubeDefinition'"
88869
+ "default": "'CubeDefinition CubeDefinition is a definition of a cube.'"
88862
88870
  },
88863
88871
  {
88864
88872
  "kind": "field",
@@ -88866,7 +88874,7 @@
88866
88874
  "type": {
88867
88875
  "text": "array"
88868
88876
  },
88869
- "default": "[ { fieldName: 'length', protoName: 'length', FieldConstructor: DOUBLE, constraints: { maximum: 1000, minimum: 100, required: true }, description: '', }, { fieldName: 'breadth', protoName: 'breadth', FieldConstructor: DOUBLE, constraints: { maximum: 1000, minimum: 100, required: true }, description: '', }, { fieldName: 'height', protoName: 'height', FieldConstructor: DOUBLE, constraints: { maximum: 1000, minimum: 100, required: true }, description: '', }, { fieldName: 'colour', protoName: 'colour', FieldConstructor: FuroCubeColour, constraints: {}, description: '', }, { fieldName: 'material', protoName: 'material', FieldConstructor: (ENUM), constraints: {}, description: '', }, { fieldName: 'str', protoName: 'str', FieldConstructor: STRING, constraints: {}, description: '', }, { fieldName: 'boo', protoName: 'boo', FieldConstructor: BOOLEAN, constraints: {}, description: '', }, { fieldName: 'num', protoName: 'num', FieldConstructor: INT32, constraints: {}, description: '', }, ]"
88877
+ "default": "[ { fieldName: 'length', protoName: 'length', FieldConstructor: DOUBLE, constraints: { maximum: 1000, minimum: 100, required: true }, description: 'the length of the cube in cm', }, { fieldName: 'breadth', protoName: 'breadth', FieldConstructor: DOUBLE, constraints: { maximum: 1000, minimum: 100, required: true }, description: 'the breadth / width of the cube in cm', }, { fieldName: 'height', protoName: 'height', FieldConstructor: DOUBLE, constraints: { maximum: 1000, minimum: 100, required: true }, description: 'the height of the cube in cm', }, { fieldName: 'colour', protoName: 'colour', FieldConstructor: FuroCubeColour, constraints: {}, description: 'the color of the cube', }, { fieldName: 'material', protoName: 'material', FieldConstructor: (ENUM), constraints: {}, description: 'The material the cube is made of', }, ]"
88870
88878
  },
88871
88879
  {
88872
88880
  "kind": "field",
@@ -88893,21 +88901,6 @@
88893
88901
  "name": "_material",
88894
88902
  "default": "new ENUM(undefined, FuroCubeMaterials, FuroCubeMaterials.MATERIALS_UNSPECIFIED, this, 'material')"
88895
88903
  },
88896
- {
88897
- "kind": "field",
88898
- "name": "_str",
88899
- "default": "new STRING(undefined, this, 'str')"
88900
- },
88901
- {
88902
- "kind": "field",
88903
- "name": "_boo",
88904
- "default": "new BOOLEAN(undefined, this, 'boo')"
88905
- },
88906
- {
88907
- "kind": "field",
88908
- "name": "_num",
88909
- "default": "new INT32(undefined, this, 'num')"
88910
- },
88911
88904
  {
88912
88905
  "kind": "field",
88913
88906
  "name": "__defaultValues",
@@ -89772,7 +89765,7 @@
89772
89765
  "declarations": [
89773
89766
  {
89774
89767
  "kind": "class",
89775
- "description": "CubeEntity",
89768
+ "description": "CubeEntity\n CubeEntity",
89776
89769
  "name": "CubeEntity",
89777
89770
  "members": [
89778
89771
  {
@@ -89785,7 +89778,7 @@
89785
89778
  "type": {
89786
89779
  "text": "string"
89787
89780
  },
89788
- "default": "'CubeEntity'"
89781
+ "default": "'CubeEntity CubeEntity'"
89789
89782
  },
89790
89783
  {
89791
89784
  "kind": "field",
@@ -89818,7 +89811,7 @@
89818
89811
  "type": {
89819
89812
  "text": "array"
89820
89813
  },
89821
- "default": "[ { fieldName: 'displayName', protoName: 'display_name', FieldConstructor: STRING, constraints: { read_only: true }, description: '', }, { fieldName: 'description', protoName: 'description', FieldConstructor: STRING, constraints: {}, description: '', }, { fieldName: 'cube', protoName: 'cube', FieldConstructor: FuroCubeCubeDefinition, constraints: {}, description: '', }, ]"
89814
+ "default": "[ { fieldName: 'displayName', protoName: 'display_name', FieldConstructor: STRING, constraints: { read_only: true }, description: 'human-readable name for the cube entity', }, { fieldName: 'description', protoName: 'description', FieldConstructor: STRING, constraints: {}, description: 'short and nice description of the cube', }, { fieldName: 'cube', protoName: 'cube', FieldConstructor: FuroCubeCubeDefinition, constraints: {}, description: 'Definition of the cube', }, ]"
89822
89815
  },
89823
89816
  {
89824
89817
  "kind": "field",
@@ -6,6 +6,13 @@ import { FieldNode } from './FieldNode.js';
6
6
  export declare class Registry {
7
7
  static register(type: string, clazz: any): void;
8
8
  private static get;
9
+ /**
10
+ * Checks whether a given type is registered.
11
+ *
12
+ * @param {string} type - The name of the type to check for registration.
13
+ * @returns {boolean} `true` if the specified type is registered; otherwise, `false`.
14
+ */
15
+ static isRegistered(type: string): boolean;
9
16
  /**
10
17
  * Internal method to create instances for Any
11
18
  * @param typename
package/dist/Registry.js CHANGED
@@ -12,6 +12,15 @@ export class Registry {
12
12
  }
13
13
  throw new Error(`Cannot find type ${typename}, ${typename} is not in the registry`);
14
14
  }
15
+ /**
16
+ * Checks whether a given type is registered.
17
+ *
18
+ * @param {string} type - The name of the type to check for registration.
19
+ * @returns {boolean} `true` if the specified type is registered; otherwise, `false`.
20
+ */
21
+ static isRegistered(type) {
22
+ return registry.has(type);
23
+ }
15
24
  /**
16
25
  * Internal method to create instances for Any
17
26
  * @param typename
@@ -1 +1 @@
1
- {"version":3,"file":"Registry.js","sourceRoot":"","sources":["../src/Registry.ts"],"names":[],"mappings":"AAMA,MAAM,QAAQ,GAA2B,IAAI,GAAG,EAAqB,CAAC;AAEtE,MAAM,OAAO,QAAQ;IACnB,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,KAAU;QACtC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAEO,MAAM,CAAC,GAAG,CAChB,QAAgB;QAMhB,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,8DAA8D;YAC9D,OAAO,KAAY,CAAC;QACtB,CAAC;QACD,MAAM,IAAI,KAAK,CACb,oBAAoB,QAAQ,KAAK,QAAQ,yBAAyB,CACnE,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,wBAAwB,CAC7B,QAAgB;IAChB,8DAA8D;IAC9D,QAAc,EACd,MAAkB,EAClB,aAAsB;QAEtB,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC/C,OAAO,IAAI,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["/**\n * notes:\n * primitives are also registered\n */\nimport { FieldNode } from './FieldNode';\n\nconst registry: Map<string, FieldNode> = new Map<string, FieldNode>();\n\nexport class Registry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static register(type: string, clazz: any) {\n registry.set(type, clazz);\n }\n\n private static get(\n typename: string,\n ): new (\n initData?: object,\n parent?: FieldNode | undefined,\n attributeName?: string | undefined,\n ) => FieldNode {\n const clazz = registry.get(typename);\n if (clazz !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n }\n throw new Error(\n `Cannot find type ${typename}, ${typename} is not in the registry`,\n );\n }\n\n /**\n * Internal method to create instances for Any\n * @param typename\n * @param initData\n * @param parent\n * @param attributeName\n */\n static createInstanceByTypeName(\n typename: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n initData?: any,\n parent?: FieldNode,\n attributeName?: string,\n ): FieldNode {\n const ConstructorName = Registry.get(typename);\n return new ConstructorName(initData, parent, attributeName);\n }\n}\n"]}
1
+ {"version":3,"file":"Registry.js","sourceRoot":"","sources":["../src/Registry.ts"],"names":[],"mappings":"AAMA,MAAM,QAAQ,GAA2B,IAAI,GAAG,EAAqB,CAAC;AAEtE,MAAM,OAAO,QAAQ;IACnB,8DAA8D;IAC9D,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,KAAU;QACtC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAEO,MAAM,CAAC,GAAG,CAChB,QAAgB;QAMhB,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,8DAA8D;YAC9D,OAAO,KAAY,CAAC;QACtB,CAAC;QACD,MAAM,IAAI,KAAK,CACb,oBAAoB,QAAQ,KAAK,QAAQ,yBAAyB,CACnE,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,YAAY,CAAC,IAAW;QACpC,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,wBAAwB,CAC7B,QAAgB;IAChB,8DAA8D;IAC9D,QAAc,EACd,MAAkB,EAClB,aAAsB;QAEtB,MAAM,eAAe,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC/C,OAAO,IAAI,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["/**\n * notes:\n * primitives are also registered\n */\nimport { FieldNode } from './FieldNode';\n\nconst registry: Map<string, FieldNode> = new Map<string, FieldNode>();\n\nexport class Registry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static register(type: string, clazz: any) {\n registry.set(type, clazz);\n }\n\n private static get(\n typename: string,\n ): new (\n initData?: object,\n parent?: FieldNode | undefined,\n attributeName?: string | undefined,\n ) => FieldNode {\n const clazz = registry.get(typename);\n if (clazz !== undefined) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return clazz as any;\n }\n throw new Error(\n `Cannot find type ${typename}, ${typename} is not in the registry`,\n );\n }\n\n /**\n * Checks whether a given type is registered.\n *\n * @param {string} type - The name of the type to check for registration.\n * @returns {boolean} `true` if the specified type is registered; otherwise, `false`.\n */\n public static isRegistered(type:string): boolean {\n return registry.has(type);\n }\n\n /**\n * Internal method to create instances for Any\n * @param typename\n * @param initData\n * @param parent\n * @param attributeName\n */\n static createInstanceByTypeName(\n typename: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n initData?: any,\n parent?: FieldNode,\n attributeName?: string,\n ): FieldNode {\n const ConstructorName = Registry.get(typename);\n return new ConstructorName(initData, parent, attributeName);\n }\n}\n"]}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "git+ssh://git@github.com/eclipse/eclipsefuro-web.git"
9
9
  },
10
10
  "author": "eclipse furo",
11
- "version": "1.13.0-rc.1",
11
+ "version": "1.14.0",
12
12
  "type": "module",
13
13
  "main": "dist/index.js",
14
14
  "module": "dist/index.js",