@teambit/scope.models.scope-model 0.0.523 → 0.0.524

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/index.js CHANGED
@@ -1,6 +1,20 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScopeModel = void 0;
4
- var scope_model_1 = require("./scope.model");
5
- Object.defineProperty(exports, "ScopeModel", { enumerable: true, get: function () { return scope_model_1.ScopeModel; } });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ScopeModel", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _scope().ScopeModel;
10
+ }
11
+ });
12
+ function _scope() {
13
+ const data = require("./scope.model");
14
+ _scope = function () {
15
+ return data;
16
+ };
17
+ return data;
18
+ }
19
+
6
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAAlC,yGAAA,UAAU,OAAA"}
1
+ {"version":3,"names":["_scope","data","require"],"sources":["index.ts"],"sourcesContent":["export { ScopeModel } from './scope.model';\n"],"mappings":";;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
@@ -1,53 +1,79 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  exports.ScopeModel = void 0;
4
- const component_1 = require("@teambit/component");
5
- const component_descriptor_1 = require("@teambit/component-descriptor");
6
- const component_id_1 = require("@teambit/component-id");
7
+ function _component() {
8
+ const data = require("@teambit/component");
9
+ _component = function () {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _componentDescriptor() {
15
+ const data = require("@teambit/component-descriptor");
16
+ _componentDescriptor = function () {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ function _componentId() {
22
+ const data = require("@teambit/component-id");
23
+ _componentId = function () {
24
+ return data;
25
+ };
26
+ return data;
27
+ }
7
28
  class ScopeModel {
8
- constructor(
9
- /**
10
- * the scope name.
11
- */
12
- name,
13
- /**
14
- * the scope icon.
15
- */
16
- icon,
17
- /**
18
- * background icon color
19
- */
20
- backgroundIconColor,
21
- /**
22
- * description of the scope
23
- */
24
- description,
25
- /**
26
- * components contained in the scope.
27
- */
28
- components,
29
- /**
30
- * components contained in the scope.
31
- */
32
- componentDescriptors) {
33
- this.name = name;
34
- this.icon = icon;
35
- this.backgroundIconColor = backgroundIconColor;
36
- this.description = description;
37
- this.components = components;
38
- this.componentDescriptors = componentDescriptors;
39
- }
40
- static from({ scope }) {
41
- const components = scope.components || [];
42
- const componentDescriptors = scope.components.map((component) => {
43
- const id = component_id_1.ComponentID.fromObject(component.id);
44
- return component_descriptor_1.ComponentDescriptor.fromObject({ id: id.toString() });
45
- });
46
- return new ScopeModel(scope.name, scope.icon, scope.backgroundIconColor, scope.description, components.map((component) => component_1.ComponentModel.from(component)), componentDescriptors);
47
- }
48
- static empty() {
49
- return new ScopeModel('', '', '', '', [], []);
50
- }
29
+ constructor(
30
+ /**
31
+ * the scope name.
32
+ */
33
+ name,
34
+ /**
35
+ * the scope icon.
36
+ */
37
+ icon,
38
+ /**
39
+ * background icon color
40
+ */
41
+ backgroundIconColor,
42
+ /**
43
+ * description of the scope
44
+ */
45
+ description,
46
+ /**
47
+ * components contained in the scope.
48
+ */
49
+ components,
50
+ /**
51
+ * components contained in the scope.
52
+ */
53
+ componentDescriptors) {
54
+ this.name = name;
55
+ this.icon = icon;
56
+ this.backgroundIconColor = backgroundIconColor;
57
+ this.description = description;
58
+ this.components = components;
59
+ this.componentDescriptors = componentDescriptors;
60
+ }
61
+ static from({
62
+ scope
63
+ }) {
64
+ const components = scope.components || [];
65
+ const componentDescriptors = scope.components.map(component => {
66
+ const id = _componentId().ComponentID.fromObject(component.id);
67
+ return _componentDescriptor().ComponentDescriptor.fromObject({
68
+ id: id.toString()
69
+ });
70
+ });
71
+ return new ScopeModel(scope.name, scope.icon, scope.backgroundIconColor, scope.description, components.map(component => _component().ComponentModel.from(component)), componentDescriptors);
72
+ }
73
+ static empty() {
74
+ return new ScopeModel('', '', '', '', [], []);
75
+ }
51
76
  }
52
77
  exports.ScopeModel = ScopeModel;
78
+
53
79
  //# sourceMappingURL=scope.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"scope.model.js","sourceRoot":"","sources":["../scope.model.ts"],"names":[],"mappings":";;;AAAA,kDAAyE;AACzE,wEAAoE;AACpE,wDAAoD;AAUpD,MAAa,UAAU;IACrB;IACE;;OAEG;IACM,IAAY;IAErB;;OAEG;IACM,IAAY;IAErB;;OAEG;IACM,mBAA2B;IAEpC;;OAEG;IACM,WAAmB;IAE5B;;OAEG;IACM,UAA4B;IAErC;;OAEG;IACM,oBAA2C;QAzB3C,SAAI,GAAJ,IAAI,CAAQ;QAKZ,SAAI,GAAJ,IAAI,CAAQ;QAKZ,wBAAmB,GAAnB,mBAAmB,CAAQ;QAK3B,gBAAW,GAAX,WAAW,CAAQ;QAKnB,eAAU,GAAV,UAAU,CAAkB;QAK5B,yBAAoB,GAApB,oBAAoB,CAAuB;IACnD,CAAC;IAEJ,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAA8B;QAC/C,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,MAAM,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;YAC9D,MAAM,EAAE,GAAG,0BAAW,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YAChD,OAAO,0CAAmB,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,UAAU,CACnB,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,mBAAmB,EACzB,KAAK,CAAC,WAAW,EACjB,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,0BAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAC7D,oBAAoB,CACrB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK;QACV,OAAO,IAAI,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC;CACF;AArDD,gCAqDC"}
1
+ {"version":3,"names":["_component","data","require","_componentDescriptor","_componentId","ScopeModel","constructor","name","icon","backgroundIconColor","description","components","componentDescriptors","from","scope","map","component","id","ComponentID","fromObject","ComponentDescriptor","toString","ComponentModel","empty","exports"],"sources":["scope.model.ts"],"sourcesContent":["import { ComponentModel, ComponentModelProps } from '@teambit/component';\nimport { ComponentDescriptor } from '@teambit/component-descriptor';\nimport { ComponentID } from '@teambit/component-id';\n\nexport type ScopeModelProps = {\n name: string;\n icon: string;\n backgroundIconColor: string;\n description: string;\n components: ComponentModelProps[];\n};\n\nexport class ScopeModel {\n constructor(\n /**\n * the scope name.\n */\n readonly name: string,\n\n /**\n * the scope icon.\n */\n readonly icon: string,\n\n /**\n * background icon color\n */\n readonly backgroundIconColor: string,\n\n /**\n * description of the scope\n */\n readonly description: string,\n\n /**\n * components contained in the scope.\n */\n readonly components: ComponentModel[],\n\n /**\n * components contained in the scope.\n */\n readonly componentDescriptors: ComponentDescriptor[]\n ) {}\n\n static from({ scope }: { scope: ScopeModelProps }) {\n const components = scope.components || [];\n const componentDescriptors = scope.components.map((component) => {\n const id = ComponentID.fromObject(component.id);\n return ComponentDescriptor.fromObject({ id: id.toString() });\n });\n\n return new ScopeModel(\n scope.name,\n scope.icon,\n scope.backgroundIconColor,\n scope.description,\n components.map((component) => ComponentModel.from(component)),\n componentDescriptors\n );\n }\n\n static empty() {\n return new ScopeModel('', '', '', '', [], []);\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,qBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,oBAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,aAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,YAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAUO,MAAMI,UAAU,CAAC;EACtBC,WAAWA;EACT;AACJ;AACA;EACaC,IAAY;EAErB;AACJ;AACA;EACaC,IAAY;EAErB;AACJ;AACA;EACaC,mBAA2B;EAEpC;AACJ;AACA;EACaC,WAAmB;EAE5B;AACJ;AACA;EACaC,UAA4B;EAErC;AACJ;AACA;EACaC,oBAA2C,EACpD;IAAA,KA1BSL,IAAY,GAAZA,IAAY;IAAA,KAKZC,IAAY,GAAZA,IAAY;IAAA,KAKZC,mBAA2B,GAA3BA,mBAA2B;IAAA,KAK3BC,WAAmB,GAAnBA,WAAmB;IAAA,KAKnBC,UAA4B,GAA5BA,UAA4B;IAAA,KAK5BC,oBAA2C,GAA3CA,oBAA2C;EACnD;EAEH,OAAOC,IAAIA,CAAC;IAAEC;EAAkC,CAAC,EAAE;IACjD,MAAMH,UAAU,GAAGG,KAAK,CAACH,UAAU,IAAI,EAAE;IACzC,MAAMC,oBAAoB,GAAGE,KAAK,CAACH,UAAU,CAACI,GAAG,CAAEC,SAAS,IAAK;MAC/D,MAAMC,EAAE,GAAGC,0BAAW,CAACC,UAAU,CAACH,SAAS,CAACC,EAAE,CAAC;MAC/C,OAAOG,0CAAmB,CAACD,UAAU,CAAC;QAAEF,EAAE,EAAEA,EAAE,CAACI,QAAQ,CAAC;MAAE,CAAC,CAAC;IAC9D,CAAC,CAAC;IAEF,OAAO,IAAIhB,UAAU,CACnBS,KAAK,CAACP,IAAI,EACVO,KAAK,CAACN,IAAI,EACVM,KAAK,CAACL,mBAAmB,EACzBK,KAAK,CAACJ,WAAW,EACjBC,UAAU,CAACI,GAAG,CAAEC,SAAS,IAAKM,2BAAc,CAACT,IAAI,CAACG,SAAS,CAAC,CAAC,EAC7DJ,oBACF,CAAC;EACH;EAEA,OAAOW,KAAKA,CAAA,EAAG;IACb,OAAO,IAAIlB,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;EAC/C;AACF;AAACmB,OAAA,CAAAnB,UAAA,GAAAA,UAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/scope.models.scope-model",
3
- "version": "0.0.523",
3
+ "version": "0.0.524",
4
4
  "homepage": "https://bit.cloud/teambit/scope/models/scope-model",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.scope",
8
8
  "name": "models/scope-model",
9
- "version": "0.0.523"
9
+ "version": "0.0.524"
10
10
  },
11
11
  "dependencies": {
12
12
  "@teambit/component-id": "1.2.2",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/mocha": "9.1.0",
17
- "@types/jest": "26.0.20",
18
- "@types/node": "22.10.5"
17
+ "chai": "4.3.0",
18
+ "@teambit/node.envs.node-babel-mocha": "0.1.4"
19
19
  },
20
20
  "peerDependencies": {},
21
21
  "license": "Apache-2.0",
package/types/asset.d.ts CHANGED
@@ -5,12 +5,12 @@ declare module '*.png' {
5
5
  declare module '*.svg' {
6
6
  import type { FunctionComponent, SVGProps } from 'react';
7
7
 
8
- export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
8
+ export const ReactComponent: FunctionComponent<
9
+ SVGProps<SVGSVGElement> & { title?: string }
10
+ >;
9
11
  const src: string;
10
12
  export default src;
11
13
  }
12
-
13
- // @TODO Gilad
14
14
  declare module '*.jpg' {
15
15
  const value: any;
16
16
  export = value;
@@ -27,3 +27,15 @@ declare module '*.bmp' {
27
27
  const value: any;
28
28
  export = value;
29
29
  }
30
+ declare module '*.otf' {
31
+ const value: any;
32
+ export = value;
33
+ }
34
+ declare module '*.woff' {
35
+ const value: any;
36
+ export = value;
37
+ }
38
+ declare module '*.woff2' {
39
+ const value: any;
40
+ export = value;
41
+ }
@@ -1,7 +0,0 @@
1
- ;
2
- ;
3
-
4
- export const compositions = [];
5
- export const overview = [];
6
-
7
- export const compositions_metadata = {"compositions":[]};