@stencil/angular-output-target 0.6.1-dev.11681238809.11549fe0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -392,21 +392,22 @@ function generateProxies(components, pkgData, outputTarget, rootDir) {
392
392
  const dtsFilePath = path__default['default'].join(rootDir, distTypesDir, GENERATED_DTS);
393
393
  const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
394
394
  const includeSingleComponentAngularModules = (_a = outputTarget.includeSingleComponentAngularModules) !== null && _a !== void 0 ? _a : false;
395
+ const includeOutputImports = components.some((component) => component.events.some((event) => !event.internal));
395
396
  /**
396
397
  * The collection of named imports from @angular/core.
397
398
  */
398
- const angularCoreImports = [
399
- 'ChangeDetectionStrategy',
400
- 'ChangeDetectorRef',
401
- 'Component',
402
- 'ElementRef',
403
- 'EventEmitter',
404
- 'NgZone',
405
- ];
399
+ const angularCoreImports = ['ChangeDetectionStrategy', 'ChangeDetectorRef', 'Component', 'ElementRef'];
400
+ if (includeOutputImports) {
401
+ angularCoreImports.push('EventEmitter');
402
+ }
403
+ angularCoreImports.push('NgZone');
406
404
  /**
407
405
  * The collection of named imports from the angular-component-lib/utils.
408
406
  */
409
- const componentLibImports = ['ProxyCmp', 'proxyOutputs'];
407
+ const componentLibImports = ['ProxyCmp'];
408
+ if (includeOutputImports) {
409
+ componentLibImports.push('proxyOutputs');
410
+ }
410
411
  if (includeSingleComponentAngularModules) {
411
412
  angularCoreImports.push('NgModule');
412
413
  }
package/dist/index.js CHANGED
@@ -384,21 +384,22 @@ function generateProxies(components, pkgData, outputTarget, rootDir) {
384
384
  const dtsFilePath = path.join(rootDir, distTypesDir, GENERATED_DTS);
385
385
  const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
386
386
  const includeSingleComponentAngularModules = (_a = outputTarget.includeSingleComponentAngularModules) !== null && _a !== void 0 ? _a : false;
387
+ const includeOutputImports = components.some((component) => component.events.some((event) => !event.internal));
387
388
  /**
388
389
  * The collection of named imports from @angular/core.
389
390
  */
390
- const angularCoreImports = [
391
- 'ChangeDetectionStrategy',
392
- 'ChangeDetectorRef',
393
- 'Component',
394
- 'ElementRef',
395
- 'EventEmitter',
396
- 'NgZone',
397
- ];
391
+ const angularCoreImports = ['ChangeDetectionStrategy', 'ChangeDetectorRef', 'Component', 'ElementRef'];
392
+ if (includeOutputImports) {
393
+ angularCoreImports.push('EventEmitter');
394
+ }
395
+ angularCoreImports.push('NgZone');
398
396
  /**
399
397
  * The collection of named imports from the angular-component-lib/utils.
400
398
  */
401
- const componentLibImports = ['ProxyCmp', 'proxyOutputs'];
399
+ const componentLibImports = ['ProxyCmp'];
400
+ if (includeOutputImports) {
401
+ componentLibImports.push('proxyOutputs');
402
+ }
402
403
  if (includeSingleComponentAngularModules) {
403
404
  angularCoreImports.push('NgModule');
404
405
  }
@@ -40,21 +40,22 @@ export function generateProxies(components, pkgData, outputTarget, rootDir) {
40
40
  const dtsFilePath = path.join(rootDir, distTypesDir, GENERATED_DTS);
41
41
  const componentsTypeFile = relativeImport(outputTarget.directivesProxyFile, dtsFilePath, '.d.ts');
42
42
  const includeSingleComponentAngularModules = (_a = outputTarget.includeSingleComponentAngularModules) !== null && _a !== void 0 ? _a : false;
43
+ const includeOutputImports = components.some((component) => component.events.some((event) => !event.internal));
43
44
  /**
44
45
  * The collection of named imports from @angular/core.
45
46
  */
46
- const angularCoreImports = [
47
- 'ChangeDetectionStrategy',
48
- 'ChangeDetectorRef',
49
- 'Component',
50
- 'ElementRef',
51
- 'EventEmitter',
52
- 'NgZone',
53
- ];
47
+ const angularCoreImports = ['ChangeDetectionStrategy', 'ChangeDetectorRef', 'Component', 'ElementRef'];
48
+ if (includeOutputImports) {
49
+ angularCoreImports.push('EventEmitter');
50
+ }
51
+ angularCoreImports.push('NgZone');
54
52
  /**
55
53
  * The collection of named imports from the angular-component-lib/utils.
56
54
  */
57
- const componentLibImports = ['ProxyCmp', 'proxyOutputs'];
55
+ const componentLibImports = ['ProxyCmp'];
56
+ if (includeOutputImports) {
57
+ componentLibImports.push('proxyOutputs');
58
+ }
58
59
  if (includeSingleComponentAngularModules) {
59
60
  angularCoreImports.push('NgModule');
60
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stencil/angular-output-target",
3
- "version": "0.6.1-dev.11681238809.11549fe0",
3
+ "version": "0.7.1",
4
4
  "description": "Angular output target for @stencil/core components.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "@angular/forms": "8.2.14"
43
43
  },
44
44
  "peerDependencies": {
45
- "@stencil/core": "^2.9.0 || ^3.0.0"
45
+ "@stencil/core": ">=2.0.0 || >=3 || >= 4.0.0-beta.0 || >= 4.0.0"
46
46
  },
47
47
  "jest": {
48
48
  "transform": {
@@ -58,5 +58,8 @@
58
58
  ],
59
59
  "testURL": "http://localhost"
60
60
  },
61
- "gitHead": "1549fe0dbcec5dd0927c7aaef10a9032e8b6a4bf"
61
+ "gitHead": "a3588e905186a0e86e7f88418fd5b2f9531b55e0",
62
+ "volta": {
63
+ "extends": "../../package.json"
64
+ }
62
65
  }