@teleporthq/teleport-plugin-angular-base-component 0.18.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 teleporthq
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # teleport-plugin-angular-base-component
2
+
3
+ A plugin for handling the skeleton/baseline of a Angular component.
4
+
5
+ > This package is part of the [teleport ecosystem](https://github.com/teleporthq/teleport-code-generators). For a complete guide, check out the [official documentation](https://docs.teleporthq.io/).
6
+
7
+ ## Install
8
+ ```bash
9
+ npm install @teleporthq/teleport-plugin-angular-base-component
10
+ ```
11
+ or
12
+ ```bash
13
+ yarn add @teleporthq/teleport-plugin-angular-base-component
14
+ ```
@@ -0,0 +1,69 @@
1
+ import { createAngularComponentPlugin } from '../src/index'
2
+ import { component, elementNode } from '@teleporthq/teleport-uidl-builders'
3
+ import { ComponentStructure, ChunkType } from '@teleporthq/teleport-types'
4
+
5
+ describe('plugin-angular-base-component', () => {
6
+ const plugin = createAngularComponentPlugin({
7
+ angularTemplateChunkName: 'template-chunk',
8
+ exportClassChunk: 'angular-ts-chunk',
9
+ componentDecoratorChunkName: 'component-decorator',
10
+ tsChunkAfter: ['import-lib', 'import-pack', 'import-local'],
11
+ })
12
+
13
+ it('outputs two AST chunks with the corresponding chunk names', async () => {
14
+ const structure: ComponentStructure = {
15
+ chunks: [],
16
+ options: {},
17
+ uidl: component('Test', elementNode('container')),
18
+ dependencies: {},
19
+ }
20
+ const result = await plugin(structure)
21
+
22
+ // no change to the input UIDL
23
+ expect(JSON.stringify(result.uidl)).toBe(JSON.stringify(structure.uidl))
24
+
25
+ // AST chunks created
26
+ expect(result.chunks.length).toBe(3)
27
+ expect(result.chunks[0].type).toBe(ChunkType.HAST)
28
+ expect(result.chunks[0].content).toBeDefined()
29
+ expect(result.chunks[0].name).toBe('template-chunk')
30
+ expect(result.chunks[1].type).toBe(ChunkType.AST)
31
+ expect(result.chunks[1].content).toBeDefined()
32
+ expect(result.chunks[1].name).toBe('component-decorator')
33
+ expect(result.chunks[2].type).toBe(ChunkType.AST)
34
+ expect(result.chunks[2].content).toBeDefined()
35
+ expect(result.chunks[2].name).toBe('angular-ts-chunk')
36
+ })
37
+
38
+ it('works with state definitions', async () => {
39
+ const structure: ComponentStructure = {
40
+ chunks: [],
41
+ options: {},
42
+ uidl: component(
43
+ 'Test',
44
+ elementNode('container'),
45
+ {},
46
+ {
47
+ isVisible: {
48
+ type: 'boolean',
49
+ defaultValue: false,
50
+ },
51
+ }
52
+ ),
53
+ dependencies: {},
54
+ }
55
+ const result = await plugin(structure)
56
+
57
+ // AST chunks created
58
+ expect(result.chunks.length).toBe(3)
59
+ expect(result.chunks[0].type).toBe(ChunkType.HAST)
60
+ expect(result.chunks[0].content).toBeDefined()
61
+ expect(result.chunks[0].name).toBe('template-chunk')
62
+ expect(result.chunks[1].type).toBe(ChunkType.AST)
63
+ expect(result.chunks[1].content).toBeDefined()
64
+ expect(result.chunks[1].name).toBe('component-decorator')
65
+ expect(result.chunks[2].type).toBe(ChunkType.AST)
66
+ expect(result.chunks[2].content).toBeDefined()
67
+ expect(result.chunks[2].name).toBe('angular-ts-chunk')
68
+ })
69
+ })
@@ -0,0 +1,7 @@
1
+ import { UIDLDependency } from '@teleporthq/teleport-types';
2
+ export declare const DEFAULT_ANGULAR_TEMPLATE_CHUNK_NAME = "template-chunk";
3
+ export declare const DEFAULT_ANGULAR_TS_CHUNK_NAME = "angular-ts-chunk";
4
+ export declare const DEFAULT_ANGULAR_DECORATOR_CHUNK_NAME = "component-decorator";
5
+ export declare const DEFAULT_TS_CHUNK_AFTER: string[];
6
+ export declare const ANGULAR_CORE_DEPENDENCY: UIDLDependency;
7
+ export declare const ANGULAR_PLATFORM_BROWSER: UIDLDependency;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ANGULAR_PLATFORM_BROWSER = exports.ANGULAR_CORE_DEPENDENCY = exports.DEFAULT_TS_CHUNK_AFTER = exports.DEFAULT_ANGULAR_DECORATOR_CHUNK_NAME = exports.DEFAULT_ANGULAR_TS_CHUNK_NAME = exports.DEFAULT_ANGULAR_TEMPLATE_CHUNK_NAME = void 0;
4
+ exports.DEFAULT_ANGULAR_TEMPLATE_CHUNK_NAME = 'template-chunk';
5
+ exports.DEFAULT_ANGULAR_TS_CHUNK_NAME = 'angular-ts-chunk';
6
+ exports.DEFAULT_ANGULAR_DECORATOR_CHUNK_NAME = 'component-decorator';
7
+ exports.DEFAULT_TS_CHUNK_AFTER = ['import-lib', 'import-pack', 'import-local'];
8
+ exports.ANGULAR_CORE_DEPENDENCY = {
9
+ type: 'library',
10
+ path: '@angular/core',
11
+ version: '8.1.0',
12
+ meta: {
13
+ namedImport: true,
14
+ },
15
+ };
16
+ exports.ANGULAR_PLATFORM_BROWSER = {
17
+ type: 'library',
18
+ path: '@angular/platform-browser',
19
+ version: '8.1.0',
20
+ meta: {
21
+ namedImport: true,
22
+ },
23
+ };
24
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,mCAAmC,GAAG,gBAAgB,CAAA;AAEtD,QAAA,6BAA6B,GAAG,kBAAkB,CAAA;AAElD,QAAA,oCAAoC,GAAG,qBAAqB,CAAA;AAE5D,QAAA,sBAAsB,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAAA;AAEtE,QAAA,uBAAuB,GAAmB;IACrD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;KAClB;CACF,CAAA;AAEY,QAAA,wBAAwB,GAAmB;IACtD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;KAClB;CACF,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { ComponentPluginFactory, ComponentPlugin } from '@teleporthq/teleport-types';
2
+ interface AngularPluginConfig {
3
+ angularTemplateChunkName: string;
4
+ exportClassChunk: string;
5
+ componentDecoratorChunkName: string;
6
+ tsChunkAfter: string[];
7
+ }
8
+ export declare const createAngularComponentPlugin: ComponentPluginFactory<AngularPluginConfig>;
9
+ declare const _default: ComponentPlugin;
10
+ export default _default;
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.createAngularComponentPlugin = void 0;
40
+ var teleport_types_1 = require("@teleporthq/teleport-types");
41
+ var teleport_shared_1 = require("@teleporthq/teleport-shared");
42
+ var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
43
+ var utils_1 = require("./utils");
44
+ var constants_1 = require("./constants");
45
+ var createAngularComponentPlugin = function (config) {
46
+ var _a = config || {}, _b = _a.angularTemplateChunkName, angularTemplateChunkName = _b === void 0 ? constants_1.DEFAULT_ANGULAR_TEMPLATE_CHUNK_NAME : _b, _c = _a.exportClassChunk, exportClassChunk = _c === void 0 ? constants_1.DEFAULT_ANGULAR_TS_CHUNK_NAME : _c, _d = _a.componentDecoratorChunkName, componentDecoratorChunkName = _d === void 0 ? constants_1.DEFAULT_ANGULAR_DECORATOR_CHUNK_NAME : _d, _e = _a.tsChunkAfter, tsChunkAfter = _e === void 0 ? constants_1.DEFAULT_TS_CHUNK_AFTER : _e;
47
+ var angularComponentPlugin = function (structure) { return __awaiter(void 0, void 0, void 0, function () {
48
+ var uidl, chunks, dependencies, _a, seo, _b, stateDefinitions, _c, propDefinitions, templateLookup, dataObject, methodsObject, templateContent, componentName, params, componentDecoratorAST, shouldImportEventEmitter, exportAST;
49
+ return __generator(this, function (_d) {
50
+ uidl = structure.uidl, chunks = structure.chunks, dependencies = structure.dependencies;
51
+ _a = uidl.seo, seo = _a === void 0 ? {} : _a, _b = uidl.stateDefinitions, stateDefinitions = _b === void 0 ? {} : _b, _c = uidl.propDefinitions, propDefinitions = _c === void 0 ? {} : _c;
52
+ dependencies.Component = constants_1.ANGULAR_CORE_DEPENDENCY;
53
+ if (seo.title) {
54
+ dependencies.Title = constants_1.ANGULAR_PLATFORM_BROWSER;
55
+ }
56
+ if (seo.metaTags && seo.metaTags.length > 0) {
57
+ dependencies.Meta = constants_1.ANGULAR_PLATFORM_BROWSER;
58
+ }
59
+ if (Object.keys(propDefinitions).length > 0) {
60
+ dependencies.Input = constants_1.ANGULAR_CORE_DEPENDENCY;
61
+ }
62
+ templateLookup = {};
63
+ dataObject = {};
64
+ methodsObject = {};
65
+ templateContent = teleport_plugin_common_1.createHTMLTemplateSyntax(uidl.node, {
66
+ templateLookup: templateLookup,
67
+ dependencies: dependencies,
68
+ dataObject: dataObject,
69
+ methodsObject: methodsObject,
70
+ }, {
71
+ interpolation: function (value) { return "{{ " + value + " }}"; },
72
+ eventBinding: function (value) { return "(" + value + ")"; },
73
+ eventHandlersBindingMode: function (value) { return value + "()"; },
74
+ valueBinding: function (value, node) {
75
+ return node && node.content.dependency ? "[" + value + "]" : "[attr." + value + "]";
76
+ },
77
+ eventEmmitter: function (value) { return "this.$emit('" + value + "')"; },
78
+ conditionalAttr: '*ngIf',
79
+ repeatAttr: '*ngFor',
80
+ repeatIterator: function (iteratorName, iteratedCollection, useIndex) {
81
+ var index = useIndex ? "; index as index" : '';
82
+ return "let " + iteratorName + " of " + iteratedCollection + index;
83
+ },
84
+ customElementTagName: function (value) { return teleport_shared_1.UIDLUtils.createWebComponentFriendlyName(value); },
85
+ dependencyHandling: 'ignore',
86
+ domHTMLInjection: "[innerHTML]",
87
+ });
88
+ chunks.push({
89
+ type: teleport_types_1.ChunkType.HAST,
90
+ name: angularTemplateChunkName,
91
+ fileType: teleport_types_1.FileType.HTML,
92
+ meta: {
93
+ nodesLookup: templateLookup,
94
+ },
95
+ content: templateContent,
96
+ linkAfter: [],
97
+ });
98
+ componentName = teleport_shared_1.UIDLUtils.getComponentClassName(uidl);
99
+ params = {
100
+ selector: teleport_shared_1.UIDLUtils.createWebComponentFriendlyName(componentName),
101
+ templateUrl: teleport_shared_1.UIDLUtils.getComponentFileName(uidl) + "." + teleport_types_1.FileType.HTML,
102
+ };
103
+ componentDecoratorAST = teleport_plugin_common_1.ASTBuilders.createComponentDecorator(params);
104
+ chunks.push({
105
+ type: teleport_types_1.ChunkType.AST,
106
+ name: componentDecoratorChunkName,
107
+ fileType: teleport_types_1.FileType.TS,
108
+ linkAfter: tsChunkAfter,
109
+ content: componentDecoratorAST,
110
+ });
111
+ /* We need to import EventEmitter and Output in Angular to temit events to the parent
112
+ So, to make sure if we need to import them we need to loop through all the methods and
113
+ check if any of them are referring to the function that is passed as prop*/
114
+ if (Object.keys(methodsObject).length > 0) {
115
+ shouldImportEventEmitter = Object.keys(methodsObject).some(function (method) {
116
+ var statements = methodsObject[method];
117
+ if (statements.length > 0) {
118
+ return statements.some(function (event) { return event.type === 'propCall'; });
119
+ }
120
+ return false;
121
+ });
122
+ if (shouldImportEventEmitter) {
123
+ dependencies.Output = constants_1.ANGULAR_CORE_DEPENDENCY;
124
+ dependencies.EventEmitter = constants_1.ANGULAR_CORE_DEPENDENCY;
125
+ }
126
+ }
127
+ exportAST = utils_1.generateExportAST(uidl, propDefinitions, stateDefinitions, dataObject, methodsObject);
128
+ chunks.push({
129
+ type: teleport_types_1.ChunkType.AST,
130
+ name: exportClassChunk,
131
+ fileType: teleport_types_1.FileType.TS,
132
+ linkAfter: tsChunkAfter,
133
+ content: exportAST,
134
+ });
135
+ return [2 /*return*/, structure];
136
+ });
137
+ }); };
138
+ return angularComponentPlugin;
139
+ };
140
+ exports.createAngularComponentPlugin = createAngularComponentPlugin;
141
+ exports.default = exports.createAngularComponentPlugin();
142
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAOmC;AACnC,+DAAuD;AACvD,6EAA0F;AAE1F,iCAA2C;AAE3C,yCAOoB;AASb,IAAM,4BAA4B,GAAgD,UACvF,MAAM;IAEA,IAAA,KAKF,MAAM,IAAI,EAAE,EAJd,gCAA8D,EAA9D,wBAAwB,mBAAG,+CAAmC,KAAA,EAC9D,wBAAgD,EAAhD,gBAAgB,mBAAG,yCAA6B,KAAA,EAChD,mCAAkE,EAAlE,2BAA2B,mBAAG,gDAAoC,KAAA,EAClE,oBAAqC,EAArC,YAAY,mB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A0HxC;AAED,kBAAe,oCAA4B,EAAE,CAAA"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/constants.ts","../../../teleport-shared/dist/cjs/constants/index.d.ts","../../../teleport-shared/dist/cjs/utils/string-utils.d.ts","../../../teleport-shared/dist/cjs/utils/uidl-utils.d.ts","../../../teleport-shared/dist/cjs/index.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-plugin-common/dist/cjs/builders/ast-builders.d.ts","../../../teleport-plugin-common/dist/cjs/utils/parsed-ast.d.ts","../../../teleport-plugin-common/dist/cjs/builders/style-builders.d.ts","../../../teleport-plugin-common/dist/cjs/builders/hast-builders.d.ts","../../../teleport-plugin-common/dist/cjs/utils/ast-utils.d.ts","../../../teleport-plugin-common/dist/cjs/utils/style-utils.d.ts","../../../teleport-plugin-common/dist/cjs/utils/hast-utils.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-html/types.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-html/index.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-jsx/types.d.ts","../../../teleport-plugin-common/dist/cjs/node-handlers/node-to-jsx/index.d.ts","../../../teleport-plugin-common/dist/cjs/index.d.ts","../../src/utils.ts","../../src/index.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostic_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/util/types.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/ts3.6/base.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"d1e076bd03d792a96993f458172927e0c5ac3cb8e1b566f54f925e6ef19bbebb","6a55786dc1b8e3c25bc00e1700a7eb297e20bccae7d4bb5e4a020b97daa2052f","eccf9c0b6e420c47b3e3eb87e8f0dc9df312a9583a6cce96756b18ebff176b70","75ecadee387dde7be130c85ed277fdfcee3923e452260ffaf217ebaefe7bd305","cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","78d135d6db7f15d7ae7c7e90e80c1fa84610e5d127e8a7cd282dc270b2167bcc","28b22326000119f53de35f67ce3096ef475a2224274162b1283ef8718e1efdb5","18aecf77d74ed15ae1e875a0d43f2aa85387794fc447b2bc3c8ab7e2224d0ac6","fcd80368105181b1be66006da7c16a58ed993845e7b37d33302387f18e889001","d2ff55204dd4868d11a163c207d4fbe8d99cbf8cb36fa90d2a2f0bfc802b4d38","a17ba25a194979a88bfd925e849d76b63f68c4160b69a99c5d723eac5ffddaf0","b0900ff47d065c568038fc21d06685e58b7932750f22c49bb5cc4c18bdd35aa3","634d90459c22c0d82376bd48246b99b4a33fe56bc94c15874d1dac1e8a577d75","d31e0e12717950d419acb7b2337e6d413055ea58b2457353fa6886e833e13253","cb33f5a5c73598b92f9aa13a0cf4d0df2dc38f05da11e4ad2fd8f0a735b3b09e","822be0f43855257db7fdf49aa362cc47fa9101b482fad0a6291ca914670ba6d2","cf4ba36b05e7a6194696ffcace1710d29bb681b77a20b9b09460707ea3fcecd5","79fb51af7dc378dfaa66da7791d2c91560a151fa74da9f466d9fb60f5f9ccb39","c84d0840044a735055b7911998976dab071cde1ee160f551f2d845aea5630e2e","3465b9608c725b6a4c35b154f636011da24525a137d73976f1222c624cd9ce40","3594cd8018f215116e41c6f05c6fc9e6845a60c74753cdd1a9521d52f9ac0f2a","50ffd0c3b71cdca0f2c5004b39d876a494648c953079f07d257d679a7b95d40a","0772ec3b64f51bbe952d514e28b9aa3355a5322d1c242d93b3e67292dc7bae7c","63a514b4459f076287bec97b35477129501a8c2c1a8be59d7574eb36b5360f58","d0a508893cfb2e187a8a65ee4fc54875e107a4d5604ab5c9dcfe6610d2cd5970","c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",{"version":"d1c92b66c4105659fcad4eb76a1481f7311033e117d0678a1ec545e8ddb8d4c6","affectsGlobalScope":true},"e23424b97418eca3226fd24de079f1203eb70360622e4e093af2aff14d4be6ec","dee93c07b4df5e26010dc9ec4cdf4d6e4076bb4474d2a8371529217c8b2740a4","d55bc773f71c50f55decb39b64a5d8b9889a7c9e94305b36656ebf30e4f47469","04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef",{"version":"c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","dfc747ab8dd5f623055a4c26fd35e8cceca869fd3f1cf09701c941ca3679665a","c9f5f2920ff61d7158417b8440d5181ddc34a3dfef811a5677dd8a9fb91471e9","5cc0a492da3602510b8f5ed1852b1e0390002780d8758fbc8c0cd023ca7085f8","ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28","64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"a5782d6cea81fe43d2db7ed41e789458c933ab3ab60602f7b5b14c4da3370496","affectsGlobalScope":true},"b86b7ff709a82ef3cba2184136c025989958bad483ffb13e4ca35d720245adf4","6194335ee3353f7226ba31f31d6301d0c6be87228419c0a08976ccd9d4f1213e","5a173b7da4e6d073f9c18a02f387816a934614e7af306193995935fbb95f10b8","b447e123210c68f205f67b20c996c04a1eb64b0e591c5e06e164cd3d3a869b28","13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452","42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","c55776aa1db2b963a5fb820c0650362e721cba51ebf83b069696f2501378c0f3","e2236264a811ed1d09a2487a433e8f5216ae62378cf233954ae220cf886f6717","3ec1e108d587a5661ec790db607f482605ba9f3830e118ce578e3ffa3c42e22b","100b3bb9d39d2b1b5340f1bf45a52e94ef1692b45232b4ba00fac5c3cc56d331",{"version":"ec1a29ddaecb683aa360df0bd98ab5d4171d2d549554f7c5ab2a5c183a3dcb67","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58","2597718d91e306949d89e285bf34c44192014ef541c3bd7cbb825c022749e974","a6b0abdb67d63ebe964ba5fee31bc3daf10c12eecd46b24d778426010c04c67e","ac4801ebc2355ba32329070123b1cd15891bf71b41dcaf9e75b4744832126a59","fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","71ddd49185b68f27bfac127ef5d22cb2672c278e53e5370d9020ef50ca9c377d","b1ea7a6eaa7608e0e0529aebd323b526a79c6c05a4e519ae5c779675004dcdf1","9fcb033a6208485d8f3fadde31eb5cbcaf99149cff3e40c0dc53ebc6d0dff4e9","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9","f4149f1aa299474c7040a35fe8f8ac2ad078cc1b190415adc1fff3ed52d490ea","3730099ed008776216268a97771de31753ef71e0a7d0ec650f588cba2a06ce44","8d649dbc429d7139a1d9a14ea2bf8af1dc089e0a879447539587463d4b6c248c","60c9e27816ec8ac8df7240598bb086e95b47edfb454c5cbf4003c812e0ed6e39","e361aecf17fc4034b4c122a1564471cdcd22ef3a51407803cb5a5fc020c04d02","4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"fc0ae4a8ad3c762b96f9d2c3700cb879a373458cb0bf3175478e3b4f85f7ef2f","fabbec378e1ddd86fcf2662e716c2b8318acedb664ee3a4cba6f9e8ee8269cf1","b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","efd55e8ca79171bf26c0d0e30221cb8ee1f5a31dd0c791ec4b2e886f42bab124","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[110,112],[106,107],[106,107,108,109],[111],[113],[103],[102,103],[57,62],[68,69,76,85],[58,68,76],[94],[62,69,77],[85,90],[65,68,76],[66],[65],[68],[68,70,85,93],[68,69,85],[76,85,93],[68,69,71,76,85,90,93],[71,90,93],[104],[93],[65,68,85],[78],[56],[92],[83,94,97],[68,86],[85],[88],[62,76],[54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101],[76],[82],[95],[57,62,68,70,79,85,93,97],[33],[33,34,38,51,52],[33,38,39,51],[33,39],[33,39,41],[40,41,42,43,44,45,46,47,48,49,50],[33,47],[33,39,49],[35,36,37],[29],[29,30,31,32]],"referencedMap":[[113,1],[108,2],[110,3],[109,2],[112,4],[114,5],[54,6],[104,7],[57,8],[58,9],[59,10],[60,11],[61,12],[62,13],[63,14],[65,15],[66,16],[67,17],[68,17],[69,18],[70,19],[71,20],[72,21],[73,22],[105,23],[74,17],[75,24],[76,25],[78,26],[79,27],[80,28],[83,17],[84,29],[85,30],[86,31],[88,17],[89,32],[90,33],[102,34],[92,35],[93,36],[94,37],[96,31],[98,38],[99,31],[34,39],[53,40],[52,41],[40,42],[43,39],[42,43],[51,44],[48,45],[47,39],[50,46],[49,42],[44,43],[46,39],[45,39],[35,39],[38,47],[37,39],[30,48],[33,49],[32,48]],"exportedModulesMap":[[113,1],[108,2],[110,3],[109,2],[112,4],[114,5],[54,6],[104,7],[57,8],[58,9],[59,10],[60,11],[61,12],[62,13],[63,14],[65,15],[66,16],[67,17],[68,17],[69,18],[70,19],[71,20],[72,21],[73,22],[105,23],[74,17],[75,24],[76,25],[78,26],[79,27],[80,28],[83,17],[84,29],[85,30],[86,31],[88,17],[89,32],[90,33],[102,34],[92,35],[93,36],[94,37],[96,31],[98,38],[99,31],[34,39],[53,40],[52,41],[40,42],[43,39],[42,43],[51,44],[48,45],[47,39],[50,46],[49,42],[44,43],[46,39],[45,39],[35,39],[38,47],[37,39],[30,48],[33,49],[32,48]],"semanticDiagnosticsPerFile":[39,113,106,108,110,109,107,112,111,114,103,54,56,104,57,58,59,60,61,62,63,64,65,66,67,68,69,70,55,100,71,72,73,105,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,102,92,93,94,95,96,97,101,98,99,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,34,53,52,40,43,42,51,48,47,50,49,44,46,41,45,35,38,36,37,31,30,33,29,32]},"version":"4.3.5"}
@@ -0,0 +1,4 @@
1
+ import * as types from '@babel/types';
2
+ import { ComponentUIDL, UIDLPropDefinition, UIDLStateDefinition, UIDLEventHandlerStatement, UIDLPropCallEvent } from '@teleporthq/teleport-types';
3
+ export declare const generateExportAST: (uidl: ComponentUIDL, propDefinitions: Record<string, UIDLPropDefinition>, stateDefinitions: Record<string, UIDLStateDefinition>, dataObject: Record<string, unknown>, methodsObject: Record<string, UIDLEventHandlerStatement[]>, t?: typeof types) => types.ExportNamedDeclaration;
4
+ export declare const createPropCallStatement: (eventHandlerStatement: UIDLPropCallEvent, propDefinitions: Record<string, UIDLPropDefinition>, t?: typeof types) => types.ExpressionStatement;
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
22
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
23
+ to[j] = from[i];
24
+ return to;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.createPropCallStatement = exports.generateExportAST = void 0;
28
+ var types = __importStar(require("@babel/types"));
29
+ var teleport_shared_1 = require("@teleporthq/teleport-shared");
30
+ var teleport_plugin_common_1 = require("@teleporthq/teleport-plugin-common");
31
+ var generateExportAST = function (uidl, propDefinitions, stateDefinitions, dataObject, methodsObject, t) {
32
+ if (t === void 0) { t = types; }
33
+ var componentName = teleport_shared_1.UIDLUtils.getComponentClassName(uidl);
34
+ var angularMethodsAST = [];
35
+ if (Object.keys(methodsObject).length > 0) {
36
+ angularMethodsAST = createMethodsObject(methodsObject, propDefinitions);
37
+ }
38
+ var _a = uidl.importDefinitions, importDefinitions = _a === void 0 ? {} : _a;
39
+ var propDeclaration = Object.keys(propDefinitions).map(function (propKey) {
40
+ var definition = propDefinitions[propKey];
41
+ // By default any prop with type function is used to emitting events to the callee
42
+ if (definition.type === 'func') {
43
+ return t.classProperty(t.identifier(propKey), t.newExpression(t.identifier('EventEmitter'), []), t.typeAnnotation(t.genericTypeAnnotation(t.identifier('EventEmitter'), t.typeParameterInstantiation([t.anyTypeAnnotation()]))), [t.decorator(t.callExpression(t.identifier('Output'), []))]);
44
+ }
45
+ return t.classProperty(t.identifier(propKey), teleport_plugin_common_1.ASTUtils.convertValueToLiteral(propDefinitions[propKey].defaultValue), t.tsTypeAnnotation(teleport_plugin_common_1.ASTUtils.getTSAnnotationForType(propDefinitions[propKey].type)), [t.decorator(t.callExpression(t.identifier('Input'), []))]);
46
+ });
47
+ var propertyDecleration = Object.keys(stateDefinitions).map(function (stateKey) {
48
+ return t.classProperty(t.identifier(stateKey), teleport_plugin_common_1.ASTUtils.convertValueToLiteral(stateDefinitions[stateKey].defaultValue), t.tsTypeAnnotation(teleport_plugin_common_1.ASTUtils.getTSAnnotationForType(stateDefinitions[stateKey].type)));
49
+ });
50
+ var dataDeclaration = Object.keys(dataObject).map(function (dataKey) {
51
+ return t.classProperty(t.identifier(dataKey), teleport_plugin_common_1.ASTUtils.convertValueToLiteral(dataObject[dataKey]), t.tsTypeAnnotation(teleport_plugin_common_1.ASTUtils.getTSAnnotationForType(typeof dataObject[dataKey])));
52
+ });
53
+ var referencedImportDeclarations = Object.keys(importDefinitions).reduce(function (acc, importRef) {
54
+ var _a, _b;
55
+ if (!((_b = (_a = importDefinitions[importRef]) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.importJustPath)) {
56
+ acc.push(t.classProperty(t.identifier(importRef), t.identifier(importRef)));
57
+ }
58
+ return acc;
59
+ }, []);
60
+ var classBodyAST = function (componentUIDL) {
61
+ return t.classBody(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], propDeclaration), propertyDecleration), dataDeclaration), referencedImportDeclarations), [
62
+ constructorAST(componentUIDL.seo)
63
+ ]), angularMethodsAST));
64
+ };
65
+ return t.exportNamedDeclaration(t.classDeclaration(t.identifier(componentName), null, classBodyAST(uidl), null), [], null);
66
+ };
67
+ exports.generateExportAST = generateExportAST;
68
+ var constructorAST = function (seo, t) {
69
+ if (t === void 0) { t = types; }
70
+ var params = [];
71
+ var blockStatements = [];
72
+ if (seo) {
73
+ var title = seo.title, metaTags = seo.metaTags;
74
+ if (title) {
75
+ params.push(t.identifier("private title: Title"));
76
+ blockStatements.push(t.expressionStatement(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('title')), t.identifier('setTitle')), [t.stringLiteral(title)])));
77
+ }
78
+ if (metaTags && metaTags.length > 0) {
79
+ params.push(t.identifier("private meta: Meta"));
80
+ blockStatements.push(t.expressionStatement(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('meta')), t.identifier('addTags')), [t.arrayExpression(constructMetaTagAST(metaTags))])));
81
+ }
82
+ }
83
+ return t.classMethod('constructor', t.identifier('constructor'), params, t.blockStatement(blockStatements));
84
+ };
85
+ var constructMetaTagAST = function (metaTags) {
86
+ var metaTagsAST = [];
87
+ metaTags.forEach(function (tag) {
88
+ metaTagsAST.push(teleport_plugin_common_1.ASTUtils.objectToObjectExpression(tag));
89
+ });
90
+ return metaTagsAST;
91
+ };
92
+ var createMethodsObject = function (methods, propDefinitions, t) {
93
+ if (t === void 0) { t = types; }
94
+ return Object.keys(methods).map(function (eventKey) {
95
+ var astStatements = [];
96
+ methods[eventKey].map(function (statement) {
97
+ var astStatement = statement.type === 'propCall'
98
+ ? exports.createPropCallStatement(statement, propDefinitions)
99
+ : teleport_plugin_common_1.ASTBuilders.createStateChangeStatement(statement);
100
+ if (astStatement) {
101
+ astStatements.push(astStatement);
102
+ }
103
+ });
104
+ return t.classMethod('method', t.identifier(eventKey), [], t.blockStatement(astStatements));
105
+ });
106
+ };
107
+ var createPropCallStatement = function (eventHandlerStatement, propDefinitions, t) {
108
+ if (t === void 0) { t = types; }
109
+ var propFunctionKey = eventHandlerStatement.calls;
110
+ if (!propFunctionKey) {
111
+ console.warn("No prop definition referenced under the \"calls\" field");
112
+ return null;
113
+ }
114
+ var propDefinition = propDefinitions[propFunctionKey];
115
+ if (!propDefinition) {
116
+ console.warn("No prop definition was found for function \"" + propFunctionKey + "\"");
117
+ return null;
118
+ }
119
+ return t.expressionStatement(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier(propFunctionKey)), t.identifier('emit')), []));
120
+ };
121
+ exports.createPropCallStatement = createPropCallStatement;
122
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqC;AACrC,+DAAuD;AACvD,6EAA0E;AAWnE,IAAM,iBAAiB,GAAG,UAC/B,IAAmB,EACnB,eAAmD,EACnD,gBAAqD,EACrD,UAAmC,EACnC,aAA0D,EAC1D,CAAS;IAAT,kBAAA,EAAA,SAAS;IAET,IAAM,aAAa,GAAG,2BAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;IAC3D,IAAI,iBAAiB,GAAwB,EAAE,CAAA;IAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;QACzC,iBAAiB,GAAG,mBAAmB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAA;KACxE;IAEO,IAAA,KAA2B,IAAI,kBAAT,EAAtB,iBAAiB,mBAAG,EAAE,KAAA,CAAS;IAEvC,IAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,C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AAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAA;IAC7F,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAEM,IAAM,uBAAuB,GAAG,UACrC,qBAAwC,EACxC,eAAmD,EACnD,CAAS;IAAT,kBAAA,EAAA,SAAS;IAED,IAAO,eAAe,GAAK,qBAAqB,MAA1B,CAA0B;IAExD,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,CAAC,IAAI,CAAC,yDAAuD,CAAC,CAAA;QACrE,OAAO,IAAI,CAAA;KACZ;IAED,IAAM,cAAc,GAAG,eAAe,CAAC,eAAe,CAAC,CAAA;IAEvD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,CAAC,IAAI,CAAC,iDAA8C,eAAe,OAAG,CAAC,CAAA;QAC9E,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CAAC,CAAC,mBAAmB,CAC1B,CAAC,CAAC,cAAc,CACd,CAAC,CAAC,gBAAgB,CAChB,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,EACrE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CACrB,EACD,EAAE,CACH,CACF,CAAA;AACH,CAAC,CAAA;AA5BY,QAAA,uBAAuB,2BA4BnC"}
@@ -0,0 +1,7 @@
1
+ import { UIDLDependency } from '@teleporthq/teleport-types';
2
+ export declare const DEFAULT_ANGULAR_TEMPLATE_CHUNK_NAME = "template-chunk";
3
+ export declare const DEFAULT_ANGULAR_TS_CHUNK_NAME = "angular-ts-chunk";
4
+ export declare const DEFAULT_ANGULAR_DECORATOR_CHUNK_NAME = "component-decorator";
5
+ export declare const DEFAULT_TS_CHUNK_AFTER: string[];
6
+ export declare const ANGULAR_CORE_DEPENDENCY: UIDLDependency;
7
+ export declare const ANGULAR_PLATFORM_BROWSER: UIDLDependency;
@@ -0,0 +1,21 @@
1
+ export var DEFAULT_ANGULAR_TEMPLATE_CHUNK_NAME = 'template-chunk';
2
+ export var DEFAULT_ANGULAR_TS_CHUNK_NAME = 'angular-ts-chunk';
3
+ export var DEFAULT_ANGULAR_DECORATOR_CHUNK_NAME = 'component-decorator';
4
+ export var DEFAULT_TS_CHUNK_AFTER = ['import-lib', 'import-pack', 'import-local'];
5
+ export var ANGULAR_CORE_DEPENDENCY = {
6
+ type: 'library',
7
+ path: '@angular/core',
8
+ version: '8.1.0',
9
+ meta: {
10
+ namedImport: true,
11
+ },
12
+ };
13
+ export var ANGULAR_PLATFORM_BROWSER = {
14
+ type: 'library',
15
+ path: '@angular/platform-browser',
16
+ version: '8.1.0',
17
+ meta: {
18
+ namedImport: true,
19
+ },
20
+ };
21
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,mCAAmC,GAAG,gBAAgB,CAAA;AAEnE,MAAM,CAAC,IAAM,6BAA6B,GAAG,kBAAkB,CAAA;AAE/D,MAAM,CAAC,IAAM,oCAAoC,GAAG,qBAAqB,CAAA;AAEzE,MAAM,CAAC,IAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,aAAa,EAAE,cAAc,CAAC,CAAA;AAEnF,MAAM,CAAC,IAAM,uBAAuB,GAAmB;IACrD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;KAClB;CACF,CAAA;AAED,MAAM,CAAC,IAAM,wBAAwB,GAAmB;IACtD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,2BAA2B;IACjC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;KAClB;CACF,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { ComponentPluginFactory, ComponentPlugin } from '@teleporthq/teleport-types';
2
+ interface AngularPluginConfig {
3
+ angularTemplateChunkName: string;
4
+ exportClassChunk: string;
5
+ componentDecoratorChunkName: string;
6
+ tsChunkAfter: string[];
7
+ }
8
+ export declare const createAngularComponentPlugin: ComponentPluginFactory<AngularPluginConfig>;
9
+ declare const _default: ComponentPlugin;
10
+ export default _default;