@teambit/component-compare 0.0.128 → 0.0.130
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/component-compare-aspects.section.js +0 -13
- package/dist/component-compare-aspects.section.js.map +1 -1
- package/dist/component-compare-changelog.section.js +0 -13
- package/dist/component-compare-changelog.section.js.map +1 -1
- package/dist/component-compare.aspect.js +0 -5
- package/dist/component-compare.aspect.js.map +1 -1
- package/dist/component-compare.compositions.js +0 -6
- package/dist/component-compare.compositions.js.map +1 -1
- package/dist/component-compare.graphql.js +0 -12
- package/dist/component-compare.graphql.js.map +1 -1
- package/dist/component-compare.main.runtime.js +0 -39
- package/dist/component-compare.main.runtime.js.map +1 -1
- package/dist/component-compare.section.js +0 -13
- package/dist/component-compare.section.js.map +1 -1
- package/dist/component-compare.ui.runtime.js +0 -41
- package/dist/component-compare.ui.runtime.js.map +1 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/package-tar/teambit-component-compare-0.0.130.tgz +0 -0
- package/package.json +9 -9
- package/{preview-1666312873430.js → preview-1666496165706.js} +2 -2
- package/package-tar/teambit-component-compare-0.0.128.tgz +0 -0
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.AspectsCompareSection = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _react() {
|
|
21
16
|
const data = _interopRequireDefault(require("react"));
|
|
22
|
-
|
|
23
17
|
_react = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
function _componentUi() {
|
|
31
23
|
const data = require("@teambit/component.ui.compare");
|
|
32
|
-
|
|
33
24
|
_componentUi = function () {
|
|
34
25
|
return data;
|
|
35
26
|
};
|
|
36
|
-
|
|
37
27
|
return data;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
29
|
class AspectsCompareSection {
|
|
41
30
|
constructor(host) {
|
|
42
31
|
this.host = host;
|
|
@@ -52,9 +41,7 @@ class AspectsCompareSection {
|
|
|
52
41
|
})
|
|
53
42
|
});
|
|
54
43
|
}
|
|
55
|
-
|
|
56
44
|
}
|
|
57
|
-
|
|
58
45
|
exports.AspectsCompareSection = AspectsCompareSection;
|
|
59
46
|
|
|
60
47
|
//# sourceMappingURL=component-compare-aspects.section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AspectsCompareSection","constructor","host","href","children","order","path","element"],"sources":["component-compare-aspects.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { ComponentCompareAspects } from '@teambit/component.ui.compare';\n\nexport class AspectsCompareSection implements Section {\n constructor(private host: string) {}\n\n navigationLink = {\n href: 'aspects',\n children: 'Aspects',\n order: 6,\n };\n\n route = {\n path: 'aspects/*',\n element: <ComponentCompareAspects host={this.host} />,\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["AspectsCompareSection","constructor","host","href","children","order","path","element"],"sources":["component-compare-aspects.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { ComponentCompareAspects } from '@teambit/component.ui.compare';\n\nexport class AspectsCompareSection implements Section {\n constructor(private host: string) {}\n\n navigationLink = {\n href: 'aspects',\n children: 'Aspects',\n order: 6,\n };\n\n route = {\n path: 'aspects/*',\n element: <ComponentCompareAspects host={this.host} />,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,qBAAqB,CAAoB;EACpDC,WAAW,CAASC,IAAY,EAAE;IAAA,KAAdA,IAAY,GAAZA,IAAY;IAAA,wDAEf;MACfC,IAAI,EAAE,SAAS;MACfC,QAAQ,EAAE,SAAS;MACnBC,KAAK,EAAE;IACT,CAAC;IAAA,+CAEO;MACNC,IAAI,EAAE,WAAW;MACjBC,OAAO,eAAE,+BAAC,sCAAuB;QAAC,IAAI,EAAE,IAAI,CAACL;MAAK;IACpD,CAAC;EAXkC;AAYrC;AAAC"}
|
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.CompareChangelogSection = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _react() {
|
|
21
16
|
const data = _interopRequireDefault(require("react"));
|
|
22
|
-
|
|
23
17
|
_react = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
function _componentUi() {
|
|
31
23
|
const data = require("@teambit/component.ui.compare");
|
|
32
|
-
|
|
33
24
|
_componentUi = function () {
|
|
34
25
|
return data;
|
|
35
26
|
};
|
|
36
|
-
|
|
37
27
|
return data;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
29
|
class CompareChangelogSection {
|
|
41
30
|
constructor() {
|
|
42
31
|
(0, _defineProperty2().default)(this, "navigationLink", {
|
|
@@ -49,9 +38,7 @@ class CompareChangelogSection {
|
|
|
49
38
|
element: /*#__PURE__*/_react().default.createElement(_componentUi().ComponentCompareChangelog, null)
|
|
50
39
|
});
|
|
51
40
|
}
|
|
52
|
-
|
|
53
41
|
}
|
|
54
|
-
|
|
55
42
|
exports.CompareChangelogSection = CompareChangelogSection;
|
|
56
43
|
|
|
57
44
|
//# sourceMappingURL=component-compare-changelog.section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CompareChangelogSection","href","children","order","path","element"],"sources":["component-compare-changelog.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { ComponentCompareChangelog } from '@teambit/component.ui.compare';\n\nexport class CompareChangelogSection implements Section {\n navigationLink = {\n href: 'changelog',\n children: 'Changelog',\n order: 5,\n };\n\n route = {\n path: 'changelog/*',\n element: <ComponentCompareChangelog />,\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["CompareChangelogSection","href","children","order","path","element"],"sources":["component-compare-changelog.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { ComponentCompareChangelog } from '@teambit/component.ui.compare';\n\nexport class CompareChangelogSection implements Section {\n navigationLink = {\n href: 'changelog',\n children: 'Changelog',\n order: 5,\n };\n\n route = {\n path: 'changelog/*',\n element: <ComponentCompareChangelog />,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,uBAAuB,CAAoB;EAAA;IAAA,wDACrC;MACfC,IAAI,EAAE,WAAW;MACjBC,QAAQ,EAAE,WAAW;MACrBC,KAAK,EAAE;IACT,CAAC;IAAA,+CAEO;MACNC,IAAI,EAAE,aAAa;MACnBC,OAAO,eAAE,+BAAC,wCAAyB;IACrC,CAAC;EAAA;AACH;AAAC"}
|
|
@@ -4,21 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ComponentCompareAspect = void 0;
|
|
7
|
-
|
|
8
7
|
function _harmony() {
|
|
9
8
|
const data = require("@teambit/harmony");
|
|
10
|
-
|
|
11
9
|
_harmony = function () {
|
|
12
10
|
return data;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
return data;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
14
|
const ComponentCompareAspect = _harmony().Aspect.create({
|
|
19
15
|
id: 'teambit.component/component-compare'
|
|
20
16
|
});
|
|
21
|
-
|
|
22
17
|
exports.ComponentCompareAspect = ComponentCompareAspect;
|
|
23
18
|
|
|
24
19
|
//# sourceMappingURL=component-compare.aspect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentCompareAspect","Aspect","create","id"],"sources":["component-compare.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ComponentCompareAspect = Aspect.create({\n id: 'teambit.component/component-compare',\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ComponentCompareAspect","Aspect","create","id"],"sources":["component-compare.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const ComponentCompareAspect = Aspect.create({\n id: 'teambit.component/component-compare',\n});\n"],"mappings":";;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,sBAAsB,GAAGC,iBAAM,CAACC,MAAM,CAAC;EAClDC,EAAE,EAAE;AACN,CAAC,CAAC;AAAC"}
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Logo = void 0;
|
|
9
|
-
|
|
10
8
|
function _react() {
|
|
11
9
|
const data = _interopRequireDefault(require("react"));
|
|
12
|
-
|
|
13
10
|
_react = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
21
16
|
style: {
|
|
22
17
|
height: '100%',
|
|
@@ -29,7 +24,6 @@ const Logo = () => /*#__PURE__*/_react().default.createElement("div", {
|
|
|
29
24
|
},
|
|
30
25
|
src: "https://static.bit.dev/bit-icons/compare.svg"
|
|
31
26
|
}));
|
|
32
|
-
|
|
33
27
|
exports.Logo = Logo;
|
|
34
28
|
|
|
35
29
|
//# sourceMappingURL=component-compare.compositions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["component-compare.compositions.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/bit-icons/compare.svg\" />\n </div>\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["component-compare.compositions.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/bit-icons/compare.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAM;IAAEC,OAAO,EAAE,MAAM;IAAEC,cAAc,EAAE;EAAS;AAAE,gBACxE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAG,CAAE;EAAC,GAAG,EAAC;AAA8C,EAAG,CAEnF;AAAC"}
|
|
@@ -1,38 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.promise.js");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.componentCompareSchema = componentCompareSchema;
|
|
11
|
-
|
|
12
9
|
function _defineProperty2() {
|
|
13
10
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
|
|
15
11
|
_defineProperty2 = function () {
|
|
16
12
|
return data;
|
|
17
13
|
};
|
|
18
|
-
|
|
19
14
|
return data;
|
|
20
15
|
}
|
|
21
|
-
|
|
22
16
|
function _graphqlTag() {
|
|
23
17
|
const data = _interopRequireDefault(require("graphql-tag"));
|
|
24
|
-
|
|
25
18
|
_graphqlTag = function () {
|
|
26
19
|
return data;
|
|
27
20
|
};
|
|
28
|
-
|
|
29
21
|
return data;
|
|
30
22
|
}
|
|
31
|
-
|
|
32
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
-
|
|
34
24
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
-
|
|
36
25
|
function componentCompareSchema(componentCompareMain) {
|
|
37
26
|
return {
|
|
38
27
|
typeDefs: (0, _graphqlTag().default)`
|
|
@@ -75,7 +64,6 @@ function componentCompareSchema(componentCompareMain) {
|
|
|
75
64
|
compareContent: c.toContent
|
|
76
65
|
}));
|
|
77
66
|
}
|
|
78
|
-
|
|
79
67
|
return result.code.map(c => _objectSpread(_objectSpread({}, c), {}, {
|
|
80
68
|
fileName: c.filePath,
|
|
81
69
|
baseContent: c.fromContent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["componentCompareSchema","componentCompareMain","typeDefs","gql","resolvers","ComponentHost","compareComponent","_","baseId","compareId","compare","ComponentCompareResult","id","result","code","fileName","filter","codeFile","filePath","map","c","baseContent","fromContent","compareContent","toContent"],"sources":["component-compare.graphql.ts"],"sourcesContent":["import gql from 'graphql-tag';\nimport { ComponentCompareMain, ComponentCompareResult } from './component-compare.main.runtime';\n\nexport function componentCompareSchema(componentCompareMain: ComponentCompareMain) {\n return {\n typeDefs: gql`\n type FileCompareResult {\n fileName: String!\n baseContent: String!\n compareContent: String!\n status: String\n diffOutput: String\n }\n\n type ComponentCompareResult {\n # unique id for graphql - baseId + compareId\n id: String!\n code(fileName: String): [FileCompareResult!]!\n }\n\n extend type ComponentHost {\n compareComponent(baseId: String!, compareId: String!): ComponentCompareResult\n }\n `,\n resolvers: {\n ComponentHost: {\n compareComponent: async (_, { baseId, compareId }: { baseId: string; compareId: string }) => {\n return componentCompareMain.compare(baseId, compareId);\n },\n },\n ComponentCompareResult: {\n id: (result: ComponentCompareResult) => result.id,\n code: (result: ComponentCompareResult, { fileName }: { fileName?: string }) => {\n if (fileName) {\n return result.code\n .filter((codeFile) => codeFile.filePath === fileName)\n .map((c) => ({ ...c, fileName: c.filePath, baseContent: c.fromContent, compareContent: c.toContent }));\n }\n\n return result.code.map((c) => ({\n ...c,\n fileName: c.filePath,\n baseContent: c.fromContent,\n compareContent: c.toContent,\n }));\n },\n },\n },\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["componentCompareSchema","componentCompareMain","typeDefs","gql","resolvers","ComponentHost","compareComponent","_","baseId","compareId","compare","ComponentCompareResult","id","result","code","fileName","filter","codeFile","filePath","map","c","baseContent","fromContent","compareContent","toContent"],"sources":["component-compare.graphql.ts"],"sourcesContent":["import gql from 'graphql-tag';\nimport { ComponentCompareMain, ComponentCompareResult } from './component-compare.main.runtime';\n\nexport function componentCompareSchema(componentCompareMain: ComponentCompareMain) {\n return {\n typeDefs: gql`\n type FileCompareResult {\n fileName: String!\n baseContent: String!\n compareContent: String!\n status: String\n diffOutput: String\n }\n\n type ComponentCompareResult {\n # unique id for graphql - baseId + compareId\n id: String!\n code(fileName: String): [FileCompareResult!]!\n }\n\n extend type ComponentHost {\n compareComponent(baseId: String!, compareId: String!): ComponentCompareResult\n }\n `,\n resolvers: {\n ComponentHost: {\n compareComponent: async (_, { baseId, compareId }: { baseId: string; compareId: string }) => {\n return componentCompareMain.compare(baseId, compareId);\n },\n },\n ComponentCompareResult: {\n id: (result: ComponentCompareResult) => result.id,\n code: (result: ComponentCompareResult, { fileName }: { fileName?: string }) => {\n if (fileName) {\n return result.code\n .filter((codeFile) => codeFile.filePath === fileName)\n .map((c) => ({ ...c, fileName: c.filePath, baseContent: c.fromContent, compareContent: c.toContent }));\n }\n\n return result.code.map((c) => ({\n ...c,\n fileName: c.filePath,\n baseContent: c.fromContent,\n compareContent: c.toContent,\n }));\n },\n },\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAA8B;AAAA;AAGvB,SAASA,sBAAsB,CAACC,oBAA0C,EAAE;EACjF,OAAO;IACLC,QAAQ,EAAE,IAAAC,qBAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;IACDC,SAAS,EAAE;MACTC,aAAa,EAAE;QACbC,gBAAgB,EAAE,OAAOC,CAAC,EAAE;UAAEC,MAAM;UAAEC;QAAiD,CAAC,KAAK;UAC3F,OAAOR,oBAAoB,CAACS,OAAO,CAACF,MAAM,EAAEC,SAAS,CAAC;QACxD;MACF,CAAC;MACDE,sBAAsB,EAAE;QACtBC,EAAE,EAAGC,MAA8B,IAAKA,MAAM,CAACD,EAAE;QACjDE,IAAI,EAAE,CAACD,MAA8B,EAAE;UAAEE;QAAgC,CAAC,KAAK;UAC7E,IAAIA,QAAQ,EAAE;YACZ,OAAOF,MAAM,CAACC,IAAI,CACfE,MAAM,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,QAAQ,KAAKH,QAAQ,CAAC,CACpDI,GAAG,CAAEC,CAAC,oCAAWA,CAAC;cAAEL,QAAQ,EAAEK,CAAC,CAACF,QAAQ;cAAEG,WAAW,EAAED,CAAC,CAACE,WAAW;cAAEC,cAAc,EAAEH,CAAC,CAACI;YAAS,EAAG,CAAC;UAC1G;UAEA,OAAOX,MAAM,CAACC,IAAI,CAACK,GAAG,CAAEC,CAAC,oCACpBA,CAAC;YACJL,QAAQ,EAAEK,CAAC,CAACF,QAAQ;YACpBG,WAAW,EAAED,CAAC,CAACE,WAAW;YAC1BC,cAAc,EAAEH,CAAC,CAACI;UAAS,EAC3B,CAAC;QACL;MACF;IACF;EACF,CAAC;AACH"}
|
|
@@ -1,121 +1,87 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.default = exports.ComponentCompareMain = void 0;
|
|
13
|
-
|
|
14
10
|
function _defineProperty2() {
|
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
|
|
17
12
|
_defineProperty2 = function () {
|
|
18
13
|
return data;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
return data;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
function _cli() {
|
|
25
18
|
const data = require("@teambit/cli");
|
|
26
|
-
|
|
27
19
|
_cli = function () {
|
|
28
20
|
return data;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
return data;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
function _scope() {
|
|
35
25
|
const data = require("@teambit/scope");
|
|
36
|
-
|
|
37
26
|
_scope = function () {
|
|
38
27
|
return data;
|
|
39
28
|
};
|
|
40
|
-
|
|
41
29
|
return data;
|
|
42
30
|
}
|
|
43
|
-
|
|
44
31
|
function _graphql() {
|
|
45
32
|
const data = require("@teambit/graphql");
|
|
46
|
-
|
|
47
33
|
_graphql = function () {
|
|
48
34
|
return data;
|
|
49
35
|
};
|
|
50
|
-
|
|
51
36
|
return data;
|
|
52
37
|
}
|
|
53
|
-
|
|
54
38
|
function _generalError() {
|
|
55
39
|
const data = _interopRequireDefault(require("@teambit/legacy/dist/error/general-error"));
|
|
56
|
-
|
|
57
40
|
_generalError = function () {
|
|
58
41
|
return data;
|
|
59
42
|
};
|
|
60
|
-
|
|
61
43
|
return data;
|
|
62
44
|
}
|
|
63
|
-
|
|
64
45
|
function _componentsDiff() {
|
|
65
46
|
const data = require("@teambit/legacy/dist/consumer/component-ops/components-diff");
|
|
66
|
-
|
|
67
47
|
_componentsDiff = function () {
|
|
68
48
|
return data;
|
|
69
49
|
};
|
|
70
|
-
|
|
71
50
|
return data;
|
|
72
51
|
}
|
|
73
|
-
|
|
74
52
|
function _component() {
|
|
75
53
|
const data = _interopRequireDefault(require("@teambit/component"));
|
|
76
|
-
|
|
77
54
|
_component = function () {
|
|
78
55
|
return data;
|
|
79
56
|
};
|
|
80
|
-
|
|
81
57
|
return data;
|
|
82
58
|
}
|
|
83
|
-
|
|
84
59
|
function _componentCompare() {
|
|
85
60
|
const data = require("./component-compare.graphql");
|
|
86
|
-
|
|
87
61
|
_componentCompare = function () {
|
|
88
62
|
return data;
|
|
89
63
|
};
|
|
90
|
-
|
|
91
64
|
return data;
|
|
92
65
|
}
|
|
93
|
-
|
|
94
66
|
function _componentCompare2() {
|
|
95
67
|
const data = require("./component-compare.aspect");
|
|
96
|
-
|
|
97
68
|
_componentCompare2 = function () {
|
|
98
69
|
return data;
|
|
99
70
|
};
|
|
100
|
-
|
|
101
71
|
return data;
|
|
102
72
|
}
|
|
103
|
-
|
|
104
73
|
class ComponentCompareMain {
|
|
105
74
|
constructor(componentAspect, scope) {
|
|
106
75
|
this.componentAspect = componentAspect;
|
|
107
76
|
this.scope = scope;
|
|
108
77
|
}
|
|
109
|
-
|
|
110
78
|
async compare(baseIdStr, compareIdStr) {
|
|
111
79
|
const host = this.componentAspect.getHost();
|
|
112
80
|
const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);
|
|
113
81
|
const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId._legacy);
|
|
114
|
-
|
|
115
82
|
if (!modelComponent) {
|
|
116
83
|
throw new (_generalError().default)(`component ${compareCompId.toString()} doesn't have any version yet`);
|
|
117
84
|
}
|
|
118
|
-
|
|
119
85
|
const baseVersion = baseCompId.version;
|
|
120
86
|
const compareVersion = compareCompId.version;
|
|
121
87
|
const repository = this.scope.legacyScope.objects;
|
|
@@ -128,22 +94,17 @@ class ComponentCompareMain {
|
|
|
128
94
|
};
|
|
129
95
|
return compareResult;
|
|
130
96
|
}
|
|
131
|
-
|
|
132
97
|
static async provider([graphql, component, scope]) {
|
|
133
98
|
const componentCompareMain = new ComponentCompareMain(component, scope);
|
|
134
99
|
graphql.register((0, _componentCompare().componentCompareSchema)(componentCompareMain));
|
|
135
100
|
return componentCompareMain;
|
|
136
101
|
}
|
|
137
|
-
|
|
138
102
|
}
|
|
139
|
-
|
|
140
103
|
exports.ComponentCompareMain = ComponentCompareMain;
|
|
141
104
|
(0, _defineProperty2().default)(ComponentCompareMain, "slots", []);
|
|
142
105
|
(0, _defineProperty2().default)(ComponentCompareMain, "dependencies", [_graphql().GraphqlAspect, _component().default, _scope().ScopeAspect]);
|
|
143
106
|
(0, _defineProperty2().default)(ComponentCompareMain, "runtime", _cli().MainRuntime);
|
|
144
|
-
|
|
145
107
|
_componentCompare2().ComponentCompareAspect.addRuntime(ComponentCompareMain);
|
|
146
|
-
|
|
147
108
|
var _default = ComponentCompareMain;
|
|
148
109
|
exports.default = _default;
|
|
149
110
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentCompareMain","constructor","componentAspect","scope","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","_legacy","GeneralError","toString","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","compareResult","id","code","filesDiff","provider","graphql","component","componentCompareMain","register","componentCompareSchema","GraphqlAspect","ComponentAspect","ScopeAspect","MainRuntime","ComponentCompareAspect","addRuntime"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport {\n diffBetweenVersionsObjects,\n DiffResults,\n FileDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport ComponentAspect, { ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n};\n\nexport class ComponentCompareMain {\n constructor(private componentAspect: ComponentMain, private scope: ScopeMain) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId._legacy);\n if (!modelComponent) {\n throw new GeneralError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n const diff: DiffResults = await diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n this.scope.legacyScope,\n {}\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n };\n\n return compareResult;\n }\n\n static slots = [];\n static dependencies = [GraphqlAspect, ComponentAspect, ScopeAspect];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope]: [GraphqlMain, ComponentMain, ScopeMain]) {\n const componentCompareMain = new ComponentCompareMain(component, scope);\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ComponentCompareMain","constructor","componentAspect","scope","compare","baseIdStr","compareIdStr","host","getHost","baseCompId","compareCompId","resolveMultipleComponentIds","modelComponent","legacyScope","getModelComponentIfExist","_legacy","GeneralError","toString","baseVersion","version","compareVersion","repository","objects","baseVersionObject","loadVersion","compareVersionObject","diff","diffBetweenVersionsObjects","compareResult","id","code","filesDiff","provider","graphql","component","componentCompareMain","register","componentCompareSchema","GraphqlAspect","ComponentAspect","ScopeAspect","MainRuntime","ComponentCompareAspect","addRuntime"],"sources":["component-compare.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { ScopeMain, ScopeAspect } from '@teambit/scope';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport GeneralError from '@teambit/legacy/dist/error/general-error';\nimport {\n diffBetweenVersionsObjects,\n DiffResults,\n FileDiff,\n} from '@teambit/legacy/dist/consumer/component-ops/components-diff';\nimport ComponentAspect, { ComponentMain } from '@teambit/component';\nimport { componentCompareSchema } from './component-compare.graphql';\nimport { ComponentCompareAspect } from './component-compare.aspect';\n\nexport type ComponentCompareResult = {\n id: string;\n code: FileDiff[];\n};\n\nexport class ComponentCompareMain {\n constructor(private componentAspect: ComponentMain, private scope: ScopeMain) {}\n\n async compare(baseIdStr: string, compareIdStr: string): Promise<ComponentCompareResult> {\n const host = this.componentAspect.getHost();\n const [baseCompId, compareCompId] = await host.resolveMultipleComponentIds([baseIdStr, compareIdStr]);\n const modelComponent = await this.scope.legacyScope.getModelComponentIfExist(compareCompId._legacy);\n if (!modelComponent) {\n throw new GeneralError(`component ${compareCompId.toString()} doesn't have any version yet`);\n }\n\n const baseVersion = baseCompId.version as string;\n const compareVersion = compareCompId.version as string;\n\n const repository = this.scope.legacyScope.objects;\n const baseVersionObject = await modelComponent.loadVersion(baseVersion, repository);\n const compareVersionObject = await modelComponent.loadVersion(compareVersion, repository);\n const diff: DiffResults = await diffBetweenVersionsObjects(\n modelComponent,\n baseVersionObject,\n compareVersionObject,\n baseVersion,\n compareVersion,\n this.scope.legacyScope,\n {}\n );\n\n const compareResult = {\n id: `${baseCompId}-${compareCompId}`,\n code: diff.filesDiff || [],\n };\n\n return compareResult;\n }\n\n static slots = [];\n static dependencies = [GraphqlAspect, ComponentAspect, ScopeAspect];\n static runtime = MainRuntime;\n static async provider([graphql, component, scope]: [GraphqlMain, ComponentMain, ScopeMain]) {\n const componentCompareMain = new ComponentCompareMain(component, scope);\n graphql.register(componentCompareSchema(componentCompareMain));\n return componentCompareMain;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareMain);\n\nexport default ComponentCompareMain;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAKA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAOO,MAAMA,oBAAoB,CAAC;EAChCC,WAAW,CAASC,eAA8B,EAAUC,KAAgB,EAAE;IAAA,KAA1DD,eAA8B,GAA9BA,eAA8B;IAAA,KAAUC,KAAgB,GAAhBA,KAAgB;EAAG;EAE/E,MAAMC,OAAO,CAACC,SAAiB,EAAEC,YAAoB,EAAmC;IACtF,MAAMC,IAAI,GAAG,IAAI,CAACL,eAAe,CAACM,OAAO,EAAE;IAC3C,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,MAAMH,IAAI,CAACI,2BAA2B,CAAC,CAACN,SAAS,EAAEC,YAAY,CAAC,CAAC;IACrG,MAAMM,cAAc,GAAG,MAAM,IAAI,CAACT,KAAK,CAACU,WAAW,CAACC,wBAAwB,CAACJ,aAAa,CAACK,OAAO,CAAC;IACnG,IAAI,CAACH,cAAc,EAAE;MACnB,MAAM,KAAII,uBAAY,EAAE,aAAYN,aAAa,CAACO,QAAQ,EAAG,+BAA8B,CAAC;IAC9F;IAEA,MAAMC,WAAW,GAAGT,UAAU,CAACU,OAAiB;IAChD,MAAMC,cAAc,GAAGV,aAAa,CAACS,OAAiB;IAEtD,MAAME,UAAU,GAAG,IAAI,CAAClB,KAAK,CAACU,WAAW,CAACS,OAAO;IACjD,MAAMC,iBAAiB,GAAG,MAAMX,cAAc,CAACY,WAAW,CAACN,WAAW,EAAEG,UAAU,CAAC;IACnF,MAAMI,oBAAoB,GAAG,MAAMb,cAAc,CAACY,WAAW,CAACJ,cAAc,EAAEC,UAAU,CAAC;IACzF,MAAMK,IAAiB,GAAG,MAAM,IAAAC,4CAA0B,EACxDf,cAAc,EACdW,iBAAiB,EACjBE,oBAAoB,EACpBP,WAAW,EACXE,cAAc,EACd,IAAI,CAACjB,KAAK,CAACU,WAAW,EACtB,CAAC,CAAC,CACH;IAED,MAAMe,aAAa,GAAG;MACpBC,EAAE,EAAG,GAAEpB,UAAW,IAAGC,aAAc,EAAC;MACpCoB,IAAI,EAAEJ,IAAI,CAACK,SAAS,IAAI;IAC1B,CAAC;IAED,OAAOH,aAAa;EACtB;EAKA,aAAaI,QAAQ,CAAC,CAACC,OAAO,EAAEC,SAAS,EAAE/B,KAAK,CAA0C,EAAE;IAC1F,MAAMgC,oBAAoB,GAAG,IAAInC,oBAAoB,CAACkC,SAAS,EAAE/B,KAAK,CAAC;IACvE8B,OAAO,CAACG,QAAQ,CAAC,IAAAC,0CAAsB,EAACF,oBAAoB,CAAC,CAAC;IAC9D,OAAOA,oBAAoB;EAC7B;AACF;AAAC;AAAA,gCA3CYnC,oBAAoB,WAmChB,EAAE;AAAA,gCAnCNA,oBAAoB,kBAoCT,CAACsC,wBAAa,EAAEC,oBAAe,EAAEC,oBAAW,CAAC;AAAA,gCApCxDxC,oBAAoB,aAqCdyC,kBAAW;AAQ9BC,2CAAsB,CAACC,UAAU,CAAC3C,oBAAoB,CAAC;AAAC,eAEzCA,oBAAoB;AAAA"}
|
|
@@ -1,42 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.ComponentCompareSection = void 0;
|
|
9
|
-
|
|
10
8
|
function _defineProperty2() {
|
|
11
9
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
10
|
_defineProperty2 = function () {
|
|
14
11
|
return data;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
return data;
|
|
18
14
|
}
|
|
19
|
-
|
|
20
15
|
function _react() {
|
|
21
16
|
const data = _interopRequireDefault(require("react"));
|
|
22
|
-
|
|
23
17
|
_react = function () {
|
|
24
18
|
return data;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
return data;
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
function _uiFoundationUi() {
|
|
31
23
|
const data = require("@teambit/ui-foundation.ui.menu-widget-icon");
|
|
32
|
-
|
|
33
24
|
_uiFoundationUi = function () {
|
|
34
25
|
return data;
|
|
35
26
|
};
|
|
36
|
-
|
|
37
27
|
return data;
|
|
38
28
|
}
|
|
39
|
-
|
|
40
29
|
class ComponentCompareSection {
|
|
41
30
|
constructor(componentCompare) {
|
|
42
31
|
this.componentCompare = componentCompare;
|
|
@@ -54,9 +43,7 @@ class ComponentCompareSection {
|
|
|
54
43
|
});
|
|
55
44
|
(0, _defineProperty2().default)(this, "order", 35);
|
|
56
45
|
}
|
|
57
|
-
|
|
58
46
|
}
|
|
59
|
-
|
|
60
47
|
exports.ComponentCompareSection = ComponentCompareSection;
|
|
61
48
|
|
|
62
49
|
//# sourceMappingURL=component-compare.section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentCompareSection","constructor","componentCompare","href","displayName","children","path","element","getComponentComparePage"],"sources":["component-compare.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';\nimport { ComponentCompareUI } from './component-compare.ui.runtime';\n\nexport class ComponentCompareSection implements Section {\n constructor(private componentCompare: ComponentCompareUI) {}\n\n navigationLink = {\n href: '~compare',\n displayName: 'Compare',\n children: <MenuWidgetIcon icon=\"compare\" tooltipContent=\"Compare\" />,\n };\n\n route = {\n path: '~compare/*',\n element: this.componentCompare.getComponentComparePage(),\n };\n\n order = 35;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ComponentCompareSection","constructor","componentCompare","href","displayName","children","path","element","getComponentComparePage"],"sources":["component-compare.section.tsx"],"sourcesContent":["import React from 'react';\nimport { Section } from '@teambit/component';\nimport { MenuWidgetIcon } from '@teambit/ui-foundation.ui.menu-widget-icon';\nimport { ComponentCompareUI } from './component-compare.ui.runtime';\n\nexport class ComponentCompareSection implements Section {\n constructor(private componentCompare: ComponentCompareUI) {}\n\n navigationLink = {\n href: '~compare',\n displayName: 'Compare',\n children: <MenuWidgetIcon icon=\"compare\" tooltipContent=\"Compare\" />,\n };\n\n route = {\n path: '~compare/*',\n element: this.componentCompare.getComponentComparePage(),\n };\n\n order = 35;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGO,MAAMA,uBAAuB,CAAoB;EACtDC,WAAW,CAASC,gBAAoC,EAAE;IAAA,KAAtCA,gBAAoC,GAApCA,gBAAoC;IAAA,wDAEvC;MACfC,IAAI,EAAE,UAAU;MAChBC,WAAW,EAAE,SAAS;MACtBC,QAAQ,eAAE,+BAAC,gCAAc;QAAC,IAAI,EAAC,SAAS;QAAC,cAAc,EAAC;MAAS;IACnE,CAAC;IAAA,+CAEO;MACNC,IAAI,EAAE,YAAY;MAClBC,OAAO,EAAE,IAAI,CAACL,gBAAgB,CAACM,uBAAuB;IACxD,CAAC;IAAA,+CAEO,EAAE;EAbiD;AAc7D;AAAC"}
|
|
@@ -1,116 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
|
-
|
|
9
6
|
Object.defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
9
|
exports.ComponentCompareUI = void 0;
|
|
13
|
-
|
|
14
10
|
function _defineProperty2() {
|
|
15
11
|
const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
|
|
17
12
|
_defineProperty2 = function () {
|
|
18
13
|
return data;
|
|
19
14
|
};
|
|
20
|
-
|
|
21
15
|
return data;
|
|
22
16
|
}
|
|
23
|
-
|
|
24
17
|
function _component() {
|
|
25
18
|
const data = _interopRequireDefault(require("@teambit/component"));
|
|
26
|
-
|
|
27
19
|
_component = function () {
|
|
28
20
|
return data;
|
|
29
21
|
};
|
|
30
|
-
|
|
31
22
|
return data;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
24
|
function _componentUi() {
|
|
35
25
|
const data = require("@teambit/component.ui.compare");
|
|
36
|
-
|
|
37
26
|
_componentUi = function () {
|
|
38
27
|
return data;
|
|
39
28
|
};
|
|
40
|
-
|
|
41
29
|
return data;
|
|
42
30
|
}
|
|
43
|
-
|
|
44
31
|
function _harmony() {
|
|
45
32
|
const data = require("@teambit/harmony");
|
|
46
|
-
|
|
47
33
|
_harmony = function () {
|
|
48
34
|
return data;
|
|
49
35
|
};
|
|
50
|
-
|
|
51
36
|
return data;
|
|
52
37
|
}
|
|
53
|
-
|
|
54
38
|
function _ui() {
|
|
55
39
|
const data = require("@teambit/ui");
|
|
56
|
-
|
|
57
40
|
_ui = function () {
|
|
58
41
|
return data;
|
|
59
42
|
};
|
|
60
|
-
|
|
61
43
|
return data;
|
|
62
44
|
}
|
|
63
|
-
|
|
64
45
|
function _react() {
|
|
65
46
|
const data = _interopRequireDefault(require("react"));
|
|
66
|
-
|
|
67
47
|
_react = function () {
|
|
68
48
|
return data;
|
|
69
49
|
};
|
|
70
|
-
|
|
71
50
|
return data;
|
|
72
51
|
}
|
|
73
|
-
|
|
74
52
|
function _componentCompareAspects() {
|
|
75
53
|
const data = require("./component-compare-aspects.section");
|
|
76
|
-
|
|
77
54
|
_componentCompareAspects = function () {
|
|
78
55
|
return data;
|
|
79
56
|
};
|
|
80
|
-
|
|
81
57
|
return data;
|
|
82
58
|
}
|
|
83
|
-
|
|
84
59
|
function _componentCompare() {
|
|
85
60
|
const data = require("./component-compare.aspect");
|
|
86
|
-
|
|
87
61
|
_componentCompare = function () {
|
|
88
62
|
return data;
|
|
89
63
|
};
|
|
90
|
-
|
|
91
64
|
return data;
|
|
92
65
|
}
|
|
93
|
-
|
|
94
66
|
function _componentCompare2() {
|
|
95
67
|
const data = require("./component-compare.section");
|
|
96
|
-
|
|
97
68
|
_componentCompare2 = function () {
|
|
98
69
|
return data;
|
|
99
70
|
};
|
|
100
|
-
|
|
101
71
|
return data;
|
|
102
72
|
}
|
|
103
|
-
|
|
104
73
|
function _componentCompareChangelog() {
|
|
105
74
|
const data = require("./component-compare-changelog.section");
|
|
106
|
-
|
|
107
75
|
_componentCompareChangelog = function () {
|
|
108
76
|
return data;
|
|
109
77
|
};
|
|
110
|
-
|
|
111
78
|
return data;
|
|
112
79
|
}
|
|
113
|
-
|
|
114
80
|
class ComponentCompareUI {
|
|
115
81
|
constructor(host, navSlot, routeSlot) {
|
|
116
82
|
this.host = host;
|
|
@@ -122,22 +88,18 @@ class ComponentCompareUI {
|
|
|
122
88
|
host: this.host
|
|
123
89
|
}));
|
|
124
90
|
}
|
|
125
|
-
|
|
126
91
|
registerNavigation(route) {
|
|
127
92
|
if (Array.isArray(route)) {
|
|
128
93
|
this.navSlot.register(route);
|
|
129
94
|
} else {
|
|
130
95
|
this.navSlot.register([route]);
|
|
131
96
|
}
|
|
132
|
-
|
|
133
97
|
return this;
|
|
134
98
|
}
|
|
135
|
-
|
|
136
99
|
registerRoutes(routes) {
|
|
137
100
|
this.routeSlot.register(routes);
|
|
138
101
|
return this;
|
|
139
102
|
}
|
|
140
|
-
|
|
141
103
|
static async provider([componentUi], _, [navSlot, routeSlot], harmony) {
|
|
142
104
|
const {
|
|
143
105
|
config
|
|
@@ -159,14 +121,11 @@ class ComponentCompareUI {
|
|
|
159
121
|
componentCompareUI.registerRoutes([aspectCompareSection.route, compareChangelog.route]);
|
|
160
122
|
return componentCompareUI;
|
|
161
123
|
}
|
|
162
|
-
|
|
163
124
|
}
|
|
164
|
-
|
|
165
125
|
exports.ComponentCompareUI = ComponentCompareUI;
|
|
166
126
|
(0, _defineProperty2().default)(ComponentCompareUI, "runtime", _ui().UIRuntime);
|
|
167
127
|
(0, _defineProperty2().default)(ComponentCompareUI, "slots", [_harmony().Slot.withType(), _harmony().Slot.withType()]);
|
|
168
128
|
(0, _defineProperty2().default)(ComponentCompareUI, "dependencies", [_component().default]);
|
|
169
|
-
|
|
170
129
|
_componentCompare().ComponentCompareAspect.addRuntime(ComponentCompareUI);
|
|
171
130
|
|
|
172
131
|
//# sourceMappingURL=component-compare.ui.runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentCompareUI","constructor","host","navSlot","routeSlot","registerNavigation","route","Array","isArray","register","registerRoutes","routes","provider","componentUi","_","harmony","config","String","get","componentCompareUI","componentCompareSection","ComponentCompareSection","registerRoute","registerWidget","navigationLink","order","aspectCompareSection","AspectsCompareSection","compareChangelog","CompareChangelogSection","props","UIRuntime","Slot","withType","ComponentAspect","ComponentCompareAspect","addRuntime"],"sources":["component-compare.ui.runtime.tsx"],"sourcesContent":["import { NavLinkProps } from '@teambit/base-ui.routing.nav-link';\nimport ComponentAspect, { ComponentUI } from '@teambit/component';\nimport { ComponentCompare } from '@teambit/component.ui.compare';\nimport { Harmony, Slot, SlotRegistry } from '@teambit/harmony';\nimport { UIRuntime } from '@teambit/ui';\nimport { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';\nimport React from 'react';\nimport { RouteProps } from 'react-router-dom';\nimport { AspectsCompareSection } from './component-compare-aspects.section';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { ComponentCompareSection } from './component-compare.section';\nimport { CompareChangelogSection } from './component-compare-changelog.section';\n\nexport type ComponentCompareNav = {\n props: NavLinkProps;\n order: number;\n};\n\nexport type ComponentCompareNavSlot = SlotRegistry<Array<ComponentCompareNav>>;\nexport class ComponentCompareUI {\n constructor(private host: string, private navSlot: ComponentCompareNavSlot, private routeSlot: RouteSlot) {}\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<ComponentCompareNavSlot>(), Slot.withType<RouteSlot>()];\n\n static dependencies = [ComponentAspect];\n\n getComponentComparePage = () => (\n <ComponentCompare navSlot={this.navSlot} routeSlot={this.routeSlot} host={this.host} />\n );\n\n registerNavigation(route: ComponentCompareNav | Array<ComponentCompareNav>) {\n if (Array.isArray(route)) {\n this.navSlot.register(route);\n } else {\n this.navSlot.register([route]);\n }\n return this;\n }\n\n registerRoutes(routes: RouteProps[]) {\n this.routeSlot.register(routes);\n return this;\n }\n\n static async provider(\n [componentUi]: [ComponentUI],\n _,\n [navSlot, routeSlot]: [ComponentCompareNavSlot, RouteSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const componentCompareUI = new ComponentCompareUI(host, navSlot, routeSlot);\n const componentCompareSection = new ComponentCompareSection(componentCompareUI);\n componentUi.registerRoute([componentCompareSection.route]);\n componentUi.registerWidget(componentCompareSection.navigationLink, componentCompareSection.order);\n const aspectCompareSection = new AspectsCompareSection(host);\n const compareChangelog = new CompareChangelogSection();\n componentCompareUI.registerNavigation([\n {\n props: aspectCompareSection.navigationLink,\n order: aspectCompareSection.navigationLink.order,\n },\n {\n props: compareChangelog.navigationLink,\n order: compareChangelog.navigationLink.order,\n },\n ]);\n\n componentCompareUI.registerRoutes([aspectCompareSection.route, compareChangelog.route]);\n return componentCompareUI;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareUI);\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ComponentCompareUI","constructor","host","navSlot","routeSlot","registerNavigation","route","Array","isArray","register","registerRoutes","routes","provider","componentUi","_","harmony","config","String","get","componentCompareUI","componentCompareSection","ComponentCompareSection","registerRoute","registerWidget","navigationLink","order","aspectCompareSection","AspectsCompareSection","compareChangelog","CompareChangelogSection","props","UIRuntime","Slot","withType","ComponentAspect","ComponentCompareAspect","addRuntime"],"sources":["component-compare.ui.runtime.tsx"],"sourcesContent":["import { NavLinkProps } from '@teambit/base-ui.routing.nav-link';\nimport ComponentAspect, { ComponentUI } from '@teambit/component';\nimport { ComponentCompare } from '@teambit/component.ui.compare';\nimport { Harmony, Slot, SlotRegistry } from '@teambit/harmony';\nimport { UIRuntime } from '@teambit/ui';\nimport { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';\nimport React from 'react';\nimport { RouteProps } from 'react-router-dom';\nimport { AspectsCompareSection } from './component-compare-aspects.section';\nimport { ComponentCompareAspect } from './component-compare.aspect';\nimport { ComponentCompareSection } from './component-compare.section';\nimport { CompareChangelogSection } from './component-compare-changelog.section';\n\nexport type ComponentCompareNav = {\n props: NavLinkProps;\n order: number;\n};\n\nexport type ComponentCompareNavSlot = SlotRegistry<Array<ComponentCompareNav>>;\nexport class ComponentCompareUI {\n constructor(private host: string, private navSlot: ComponentCompareNavSlot, private routeSlot: RouteSlot) {}\n\n static runtime = UIRuntime;\n\n static slots = [Slot.withType<ComponentCompareNavSlot>(), Slot.withType<RouteSlot>()];\n\n static dependencies = [ComponentAspect];\n\n getComponentComparePage = () => (\n <ComponentCompare navSlot={this.navSlot} routeSlot={this.routeSlot} host={this.host} />\n );\n\n registerNavigation(route: ComponentCompareNav | Array<ComponentCompareNav>) {\n if (Array.isArray(route)) {\n this.navSlot.register(route);\n } else {\n this.navSlot.register([route]);\n }\n return this;\n }\n\n registerRoutes(routes: RouteProps[]) {\n this.routeSlot.register(routes);\n return this;\n }\n\n static async provider(\n [componentUi]: [ComponentUI],\n _,\n [navSlot, routeSlot]: [ComponentCompareNavSlot, RouteSlot],\n harmony: Harmony\n ) {\n const { config } = harmony;\n const host = String(config.get('teambit.harmony/bit'));\n const componentCompareUI = new ComponentCompareUI(host, navSlot, routeSlot);\n const componentCompareSection = new ComponentCompareSection(componentCompareUI);\n componentUi.registerRoute([componentCompareSection.route]);\n componentUi.registerWidget(componentCompareSection.navigationLink, componentCompareSection.order);\n const aspectCompareSection = new AspectsCompareSection(host);\n const compareChangelog = new CompareChangelogSection();\n componentCompareUI.registerNavigation([\n {\n props: aspectCompareSection.navigationLink,\n order: aspectCompareSection.navigationLink.order,\n },\n {\n props: compareChangelog.navigationLink,\n order: compareChangelog.navigationLink.order,\n },\n ]);\n\n componentCompareUI.registerRoutes([aspectCompareSection.route, compareChangelog.route]);\n return componentCompareUI;\n }\n}\n\nComponentCompareAspect.addRuntime(ComponentCompareUI);\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAQO,MAAMA,kBAAkB,CAAC;EAC9BC,WAAW,CAASC,IAAY,EAAUC,OAAgC,EAAUC,SAAoB,EAAE;IAAA,KAAtFF,IAAY,GAAZA,IAAY;IAAA,KAAUC,OAAgC,GAAhCA,OAAgC;IAAA,KAAUC,SAAoB,GAApBA,SAAoB;IAAA,iEAQ9E,mBACxB,+BAAC,+BAAgB;MAAC,OAAO,EAAE,IAAI,CAACD,OAAQ;MAAC,SAAS,EAAE,IAAI,CAACC,SAAU;MAAC,IAAI,EAAE,IAAI,CAACF;IAAK,EACrF;EAV0G;EAY3GG,kBAAkB,CAACC,KAAuD,EAAE;IAC1E,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;MACxB,IAAI,CAACH,OAAO,CAACM,QAAQ,CAACH,KAAK,CAAC;IAC9B,CAAC,MAAM;MACL,IAAI,CAACH,OAAO,CAACM,QAAQ,CAAC,CAACH,KAAK,CAAC,CAAC;IAChC;IACA,OAAO,IAAI;EACb;EAEAI,cAAc,CAACC,MAAoB,EAAE;IACnC,IAAI,CAACP,SAAS,CAACK,QAAQ,CAACE,MAAM,CAAC;IAC/B,OAAO,IAAI;EACb;EAEA,aAAaC,QAAQ,CACnB,CAACC,WAAW,CAAgB,EAC5BC,CAAC,EACD,CAACX,OAAO,EAAEC,SAAS,CAAuC,EAC1DW,OAAgB,EAChB;IACA,MAAM;MAAEC;IAAO,CAAC,GAAGD,OAAO;IAC1B,MAAMb,IAAI,GAAGe,MAAM,CAACD,MAAM,CAACE,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACtD,MAAMC,kBAAkB,GAAG,IAAInB,kBAAkB,CAACE,IAAI,EAAEC,OAAO,EAAEC,SAAS,CAAC;IAC3E,MAAMgB,uBAAuB,GAAG,KAAIC,4CAAuB,EAACF,kBAAkB,CAAC;IAC/EN,WAAW,CAACS,aAAa,CAAC,CAACF,uBAAuB,CAACd,KAAK,CAAC,CAAC;IAC1DO,WAAW,CAACU,cAAc,CAACH,uBAAuB,CAACI,cAAc,EAAEJ,uBAAuB,CAACK,KAAK,CAAC;IACjG,MAAMC,oBAAoB,GAAG,KAAIC,gDAAqB,EAACzB,IAAI,CAAC;IAC5D,MAAM0B,gBAAgB,GAAG,KAAIC,oDAAuB,GAAE;IACtDV,kBAAkB,CAACd,kBAAkB,CAAC,CACpC;MACEyB,KAAK,EAAEJ,oBAAoB,CAACF,cAAc;MAC1CC,KAAK,EAAEC,oBAAoB,CAACF,cAAc,CAACC;IAC7C,CAAC,EACD;MACEK,KAAK,EAAEF,gBAAgB,CAACJ,cAAc;MACtCC,KAAK,EAAEG,gBAAgB,CAACJ,cAAc,CAACC;IACzC,CAAC,CACF,CAAC;IAEFN,kBAAkB,CAACT,cAAc,CAAC,CAACgB,oBAAoB,CAACpB,KAAK,EAAEsB,gBAAgB,CAACtB,KAAK,CAAC,CAAC;IACvF,OAAOa,kBAAkB;EAC3B;AACF;AAAC;AAAA,gCAvDYnB,kBAAkB,aAGZ+B,eAAS;AAAA,gCAHf/B,kBAAkB,WAKd,CAACgC,eAAI,CAACC,QAAQ,EAA2B,EAAED,eAAI,CAACC,QAAQ,EAAa,CAAC;AAAA,gCAL1EjC,kBAAkB,kBAOP,CAACkC,oBAAe,CAAC;AAkDzCC,0CAAsB,CAACC,UAAU,CAACpC,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,29 +16,21 @@ Object.defineProperty(exports, "ComponentCompareSection", {
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
exports.default = void 0;
|
|
19
|
-
|
|
20
19
|
function _componentCompare() {
|
|
21
20
|
const data = require("./component-compare.aspect");
|
|
22
|
-
|
|
23
21
|
_componentCompare = function () {
|
|
24
22
|
return data;
|
|
25
23
|
};
|
|
26
|
-
|
|
27
24
|
return data;
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
function _componentCompare2() {
|
|
31
27
|
const data = require("./component-compare.section");
|
|
32
|
-
|
|
33
28
|
_componentCompare2 = function () {
|
|
34
29
|
return data;
|
|
35
30
|
};
|
|
36
|
-
|
|
37
31
|
return data;
|
|
38
32
|
}
|
|
39
|
-
|
|
40
33
|
var _default = _componentCompare().ComponentCompareAspect;
|
|
41
|
-
|
|
42
34
|
exports.default = _default;
|
|
43
35
|
|
|
44
36
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentCompareAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentCompareAspect } from './component-compare.aspect';\n\nexport type { ComponentCompareMain } from './component-compare.main.runtime';\n\nexport { ComponentCompareSection } from './component-compare.section';\nexport type { ComponentCompareUI, ComponentCompareNavSlot, ComponentCompareNav } from './component-compare.ui.runtime';\nexport { ComponentCompareAspect };\nexport default ComponentCompareAspect;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["ComponentCompareAspect"],"sources":["index.ts"],"sourcesContent":["import { ComponentCompareAspect } from './component-compare.aspect';\n\nexport type { ComponentCompareMain } from './component-compare.main.runtime';\n\nexport { ComponentCompareSection } from './component-compare.section';\nexport type { ComponentCompareUI, ComponentCompareNavSlot, ComponentCompareNav } from './component-compare.ui.runtime';\nexport { ComponentCompareAspect };\nexport default ComponentCompareAspect;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAIA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAAsE,eAGvDA,0CAAsB;AAAA"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component-compare",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.130",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/component/component-compare",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "component-compare",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.130"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"graphql-tag": "2.12.1",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"core-js": "^3.0.0",
|
|
15
15
|
"@teambit/harmony": "0.3.3",
|
|
16
16
|
"@teambit/base-ui.routing.nav-link": "1.0.0",
|
|
17
|
-
"@teambit/component.ui.compare": "0.0.
|
|
18
|
-
"@teambit/component": "0.0.
|
|
19
|
-
"@teambit/cli": "0.0.
|
|
20
|
-
"@teambit/graphql": "0.0.
|
|
21
|
-
"@teambit/scope": "0.0.
|
|
17
|
+
"@teambit/component.ui.compare": "0.0.105",
|
|
18
|
+
"@teambit/component": "0.0.882",
|
|
19
|
+
"@teambit/cli": "0.0.591",
|
|
20
|
+
"@teambit/graphql": "0.0.882",
|
|
21
|
+
"@teambit/scope": "0.0.882",
|
|
22
22
|
"@teambit/ui-foundation.ui.menu-widget-icon": "0.0.494",
|
|
23
23
|
"@teambit/ui-foundation.ui.react-router.slot-router": "0.0.496",
|
|
24
|
-
"@teambit/ui": "0.0.
|
|
24
|
+
"@teambit/ui": "0.0.882"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^17.0.8",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react-router-dom": "^6.0.0",
|
|
36
|
-
"@teambit/legacy": "1.0.
|
|
36
|
+
"@teambit/legacy": "1.0.374",
|
|
37
37
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
38
38
|
"react": "^16.8.0 || ^17.0.0"
|
|
39
39
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@0.0.130/dist/component-compare.compositions.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.component_component-compare@0.0.130/dist/component-compare.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|