@oncehub/knowledgeowl-angular 4.1.6 → 4.1.7

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.
Files changed (66) hide show
  1. package/dist/knowledgeowl-angular/esm2020/knowledgeowl-angular.mjs +5 -0
  2. package/dist/knowledgeowl-angular/esm2020/lib/index.mjs +3 -0
  3. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-link/knowledge-owl-link-module.mjs +18 -0
  4. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-link/knowledge-owl-link.mjs +92 -0
  5. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-link/knowledge-owl-widget-errors.mjs +3 -0
  6. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-link/public-api.mjs +3 -0
  7. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-widget/knowledge-owl-widget-errors.mjs +4 -0
  8. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-widget/knowledge-owl-widget-module.mjs +19 -0
  9. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-widget/knowledge-owl-widget.mjs +143 -0
  10. package/dist/knowledgeowl-angular/esm2020/lib/knowledge-owl-widget/public-api.mjs +3 -0
  11. package/dist/knowledgeowl-angular/esm2020/public_api.mjs +2 -0
  12. package/dist/knowledgeowl-angular/fesm2015/knowledgeowl-angular.mjs +279 -0
  13. package/dist/knowledgeowl-angular/fesm2015/knowledgeowl-angular.mjs.map +1 -0
  14. package/dist/knowledgeowl-angular/fesm2020/knowledgeowl-angular.mjs +275 -0
  15. package/dist/knowledgeowl-angular/fesm2020/knowledgeowl-angular.mjs.map +1 -0
  16. package/dist/knowledgeowl-angular/index.d.ts +5 -0
  17. package/dist/knowledgeowl-angular/lib/knowledge-owl-link/knowledge-owl-link-module.d.ts +8 -0
  18. package/dist/knowledgeowl-angular/lib/knowledge-owl-link/knowledge-owl-link.d.ts +37 -0
  19. package/dist/knowledgeowl-angular/lib/knowledge-owl-link/knowledge-owl-widget-errors.d.ts +2 -0
  20. package/dist/knowledgeowl-angular/lib/knowledge-owl-widget/knowledge-owl-widget-errors.d.ts +3 -0
  21. package/dist/knowledgeowl-angular/lib/knowledge-owl-widget/knowledge-owl-widget-module.d.ts +8 -0
  22. package/dist/knowledgeowl-angular/lib/knowledge-owl-widget/knowledge-owl-widget.d.ts +63 -0
  23. package/dist/knowledgeowl-angular/package.json +37 -0
  24. package/package.json +4 -4
  25. package/.eslintrc.json +0 -82
  26. package/.github/workflows/codeql-analysis.yml +0 -71
  27. package/.github/workflows/npm-publish.yml +0 -23
  28. package/.lighthouse/jenkins-x/Kptfile +0 -11
  29. package/.lighthouse/jenkins-x/pullrequest.yaml +0 -278
  30. package/.lighthouse/jenkins-x/release.yaml +0 -269
  31. package/.lighthouse/jenkins-x/triggers.yaml +0 -19
  32. package/.prettierignore +0 -2
  33. package/.prettierrc +0 -3
  34. package/.travis.yml +0 -3
  35. package/CHANGELOG.md +0 -250
  36. package/OWNERS +0 -4
  37. package/OWNERS_ALIASES +0 -25
  38. package/angular.json +0 -47
  39. package/deploy.sh +0 -19
  40. package/package-deploy/npm-login.js +0 -14
  41. package/src/lib/knowledge-owl-link/index.ts +0 -1
  42. package/src/lib/knowledge-owl-link/knowledge-owl-link-module.ts +0 -10
  43. package/src/lib/knowledge-owl-link/knowledge-owl-link.spec.ts +0 -51
  44. package/src/lib/knowledge-owl-link/knowledge-owl-link.ts +0 -97
  45. package/src/lib/knowledge-owl-link/knowledge-owl-widget-errors.ts +0 -3
  46. package/src/lib/knowledge-owl-widget/index.ts +0 -1
  47. package/src/lib/knowledge-owl-widget/knowledge-owl-widget-errors.ts +0 -6
  48. package/src/lib/knowledge-owl-widget/knowledge-owl-widget-module.ts +0 -11
  49. package/src/lib/knowledge-owl-widget/knowledge-owl-widget.spec.ts +0 -66
  50. package/src/lib/knowledge-owl-widget/knowledge-owl-widget.ts +0 -162
  51. package/src/lib/tsconfig.json +0 -10
  52. package/src/ng-package.json +0 -7
  53. package/src/package-lock.json +0 -117
  54. package/src/package.json +0 -14
  55. package/src/polyfills.ts +0 -76
  56. package/src/tsconfig.lib.json +0 -31
  57. package/src/tsconfig.spec.json +0 -18
  58. package/test/karma.conf.js +0 -44
  59. package/test/test.ts +0 -24
  60. package/tsconfig.json +0 -34
  61. package/tsconfig.lib.prod.json +0 -9
  62. /package/{src → dist/knowledgeowl-angular}/README.md +0 -0
  63. /package/{src/lib/index.ts → dist/knowledgeowl-angular/lib/index.d.ts} +0 -0
  64. /package/{src/lib/knowledge-owl-link/public-api.ts → dist/knowledgeowl-angular/lib/knowledge-owl-link/public-api.d.ts} +0 -0
  65. /package/{src/lib/knowledge-owl-widget/public-api.ts → dist/knowledgeowl-angular/lib/knowledge-owl-widget/public-api.d.ts} +0 -0
  66. /package/{src/public_api.ts → dist/knowledgeowl-angular/public_api.d.ts} +0 -0
@@ -1,162 +0,0 @@
1
- import {
2
- AfterContentInit,
3
- ChangeDetectionStrategy,
4
- Component,
5
- Inject,
6
- Input,
7
- OnInit,
8
- ViewEncapsulation,
9
- } from '@angular/core';
10
- import {
11
- getKnowledgeWidgetPoductKeyMissingError,
12
- getKnowledgeWidgetInvalidProductURLError,
13
- } from './knowledge-owl-widget-errors';
14
-
15
- /** Regex to validate article URL is valid or not */
16
- const urlValidatorRegex =
17
- /(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
18
-
19
- @Component({
20
- selector: 'knowledge-owl-widget',
21
- template: '',
22
- encapsulation: ViewEncapsulation.None,
23
- changeDetection: ChangeDetectionStrategy.OnPush,
24
- exportAs: 'knowledgeOwlWidget',
25
- providers: [],
26
- })
27
- export class KnowledgeOwlWidget implements OnInit, AfterContentInit {
28
- /** Flag to check initial page location updated */
29
- isPageLocationUpdated = false;
30
-
31
- /** Product key to access KnowledgeOwl widget. */
32
- @Input()
33
- projectKey: string;
34
-
35
- /** Current page location for widget context. */
36
- private _pageLocation: string;
37
- @Input() set pageLocation(value: string) {
38
- this._pageLocation = value.trim();
39
- this._updatePageLocation();
40
- }
41
-
42
- get pageLocation(): string {
43
- return this._pageLocation;
44
- }
45
-
46
- constructor(@Inject('KOProjectURL') private projectURL: string) {}
47
-
48
- ngOnInit(): void {
49
- this._initWidget();
50
- this._loadScript();
51
- }
52
-
53
- ngAfterContentInit(): void {
54
- this._validateWidgetInputs();
55
- this._initPageLocation();
56
- }
57
-
58
- /** Opens the widget. */
59
- open(article = ''): void {
60
- if (!window['__ko16']) {
61
- return;
62
- }
63
- if (article) {
64
- const widgetHref = `${this.projectURL}/help/fetch-article/hash/${article}`;
65
- window['__ko16'].openArticle(widgetHref);
66
- } else {
67
- window['__ko16']._toggleOpen();
68
- }
69
- }
70
-
71
- /**
72
- * Validates the widget's inputs.
73
- *
74
- * @private
75
- */
76
- protected _validateWidgetInputs(): void {
77
- this._validateProductURL();
78
- this._validateProductKey();
79
- }
80
-
81
- /**
82
- * Private methods
83
- */
84
-
85
- /**
86
- * Throws an error if the productKey input is missing.
87
- *
88
- * @private
89
- */
90
- private _validateProductKey() {
91
- if (!this.projectKey) {
92
- throw getKnowledgeWidgetPoductKeyMissingError();
93
- }
94
- }
95
-
96
- /**
97
- * Throws an error if the productURL input is missing.
98
- *
99
- * @private
100
- */
101
- private _validateProductURL() {
102
- if (!this.projectURL || !urlValidatorRegex.test(this.projectURL)) {
103
- throw getKnowledgeWidgetInvalidProductURLError();
104
- }
105
- }
106
-
107
- /**
108
- * Initializes the widget.
109
- *
110
- * @private
111
- */
112
- private _initWidget() {
113
- const ko16p = [];
114
- ko16p.push(['_setProject', this.projectKey]);
115
- window['_ko16_p'] = ko16p;
116
- }
117
-
118
- /**
119
- * Loads script into page
120
- *
121
- * @private
122
- */
123
- private _loadScript() {
124
- const ko = document.createElement('script');
125
- ko.type = 'text/javascript';
126
- ko.async = true;
127
- ko.src = `${this.projectURL}/javascript/ko-index?__pc=${this.projectKey}`;
128
- document.head.appendChild(ko);
129
- }
130
-
131
- /**
132
- * Init page location first time
133
- */
134
- private _initPageLocation() {
135
- const updatePageLocationInterval = setInterval(() => {
136
- if (!this.pageLocation || this.isPageLocationUpdated) {
137
- clearInterval(updatePageLocationInterval);
138
- }
139
- if (
140
- !this.isPageLocationUpdated &&
141
- window['__ko16'] &&
142
- this.pageLocation
143
- ) {
144
- // Updating page location once
145
- window['__ko16'].updatePageLoc(this.pageLocation);
146
- this.isPageLocationUpdated = true;
147
- }
148
- });
149
- }
150
-
151
- /**
152
- * Update page location on change
153
- *
154
- * @private
155
- */
156
- private _updatePageLocation() {
157
- if (!window['__ko16'] || !this.pageLocation) {
158
- return;
159
- }
160
- window['__ko16'].updatePageLoc(this.pageLocation);
161
- }
162
- }
@@ -1,10 +0,0 @@
1
- // Configuration for IDEs only.
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "rootDir": "..",
6
- "baseUrl": ".",
7
- "paths": {}
8
- },
9
- "include": ["./**/*.ts"]
10
- }
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../dist/knowledgeowl-angular",
4
- "lib": {
5
- "entryFile": "public_api.ts"
6
- }
7
- }
@@ -1,117 +0,0 @@
1
- {
2
- "name": "knowledgeowl-angular",
3
- "version": "4.1.3",
4
- "lockfileVersion": 2,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "knowledgeowl-angular",
9
- "version": "4.1.3",
10
- "license": "MIT",
11
- "peerDependencies": {
12
- "@angular/common": "14.2.12",
13
- "@angular/core": "14.2.12"
14
- }
15
- },
16
- "node_modules/@angular/common": {
17
- "version": "14.2.12",
18
- "resolved": "https://registry.npmjs.org/@angular/common/-/common-14.2.12.tgz",
19
- "integrity": "sha512-oZunh9wfInFWhNO1P8uoEs/o4u8kerKMhw8GruywKm1TV7gHDP2Fi5WHGjFqq3XYptgBTPCTSEfyLX6Cwq1PUw==",
20
- "peer": true,
21
- "dependencies": {
22
- "tslib": "^2.3.0"
23
- },
24
- "engines": {
25
- "node": "^14.15.0 || >=16.10.0"
26
- },
27
- "peerDependencies": {
28
- "@angular/core": "14.2.12",
29
- "rxjs": "^6.5.3 || ^7.4.0"
30
- }
31
- },
32
- "node_modules/@angular/core": {
33
- "version": "14.2.12",
34
- "resolved": "https://registry.npmjs.org/@angular/core/-/core-14.2.12.tgz",
35
- "integrity": "sha512-sGQxU5u4uawwvJa6jOTmGoisJiQ5HIN/RoBw99CmoqZIVyUSg9IRJJC1KVdH8gbpWBNLkElZv21lwJTL/msWyg==",
36
- "peer": true,
37
- "dependencies": {
38
- "tslib": "^2.3.0"
39
- },
40
- "engines": {
41
- "node": "^14.15.0 || >=16.10.0"
42
- },
43
- "peerDependencies": {
44
- "rxjs": "^6.5.3 || ^7.4.0",
45
- "zone.js": "~0.11.4 || ~0.12.0"
46
- }
47
- },
48
- "node_modules/rxjs": {
49
- "version": "7.8.1",
50
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
51
- "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
52
- "peer": true,
53
- "dependencies": {
54
- "tslib": "^2.1.0"
55
- }
56
- },
57
- "node_modules/tslib": {
58
- "version": "2.6.0",
59
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
60
- "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==",
61
- "peer": true
62
- },
63
- "node_modules/zone.js": {
64
- "version": "0.12.0",
65
- "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.12.0.tgz",
66
- "integrity": "sha512-XtC+I5dXU14HrzidAKBNMqneIVUykLEAA1x+v4KVrd6AUPWlwYORF8KgsVqvgdHiKZ4BkxxjvYi/ksEixTPR0Q==",
67
- "peer": true,
68
- "dependencies": {
69
- "tslib": "^2.3.0"
70
- }
71
- }
72
- },
73
- "dependencies": {
74
- "@angular/common": {
75
- "version": "14.2.12",
76
- "resolved": "https://registry.npmjs.org/@angular/common/-/common-14.2.12.tgz",
77
- "integrity": "sha512-oZunh9wfInFWhNO1P8uoEs/o4u8kerKMhw8GruywKm1TV7gHDP2Fi5WHGjFqq3XYptgBTPCTSEfyLX6Cwq1PUw==",
78
- "peer": true,
79
- "requires": {
80
- "tslib": "^2.3.0"
81
- }
82
- },
83
- "@angular/core": {
84
- "version": "14.2.12",
85
- "resolved": "https://registry.npmjs.org/@angular/core/-/core-14.2.12.tgz",
86
- "integrity": "sha512-sGQxU5u4uawwvJa6jOTmGoisJiQ5HIN/RoBw99CmoqZIVyUSg9IRJJC1KVdH8gbpWBNLkElZv21lwJTL/msWyg==",
87
- "peer": true,
88
- "requires": {
89
- "tslib": "^2.3.0"
90
- }
91
- },
92
- "rxjs": {
93
- "version": "7.8.1",
94
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
95
- "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
96
- "peer": true,
97
- "requires": {
98
- "tslib": "^2.1.0"
99
- }
100
- },
101
- "tslib": {
102
- "version": "2.6.0",
103
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
104
- "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==",
105
- "peer": true
106
- },
107
- "zone.js": {
108
- "version": "0.12.0",
109
- "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.12.0.tgz",
110
- "integrity": "sha512-XtC+I5dXU14HrzidAKBNMqneIVUykLEAA1x+v4KVrd6AUPWlwYORF8KgsVqvgdHiKZ4BkxxjvYi/ksEixTPR0Q==",
111
- "peer": true,
112
- "requires": {
113
- "tslib": "^2.3.0"
114
- }
115
- }
116
- }
117
- }
package/src/package.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "name": "knowledgeowl-angular",
3
- "version": "4.1.3",
4
- "description": "Knowledge Owl Angular",
5
- "license": "MIT",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/scheduleonce/knowledgeowl-angular"
9
- },
10
- "peerDependencies": {
11
- "@angular/common": "14.2.12",
12
- "@angular/core": "14.2.12"
13
- }
14
- }
package/src/polyfills.ts DELETED
@@ -1,76 +0,0 @@
1
- /**
2
- * This file includes polyfills needed by Angular and is loaded before the app.
3
- * You can add your own extra polyfills to this file.
4
- *
5
- * This file is divided into 2 sections:
6
- * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
- * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
- * file.
9
- *
10
- * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
- * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
- * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
- *
14
- * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
- */
16
-
17
- /***************************************************************************************************
18
- * BROWSER POLYFILLS
19
- */
20
-
21
- /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22
- // import 'core-js/es6/symbol';
23
- // import 'core-js/es6/object';
24
- // import 'core-js/es6/function';
25
- // import 'core-js/es6/parse-int';
26
- // import 'core-js/es6/parse-float';
27
- // import 'core-js/es6/number';
28
- // import 'core-js/es6/math';
29
- // import 'core-js/es6/string';
30
- // import 'core-js/es6/date';
31
- // import 'core-js/es6/array';
32
- // import 'core-js/es6/regexp';
33
- // import 'core-js/es6/map';
34
- // import 'core-js/es6/weak-map';
35
- // import 'core-js/es6/set';
36
-
37
- /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38
- // import 'classlist.js'; // Run `npm install --save classlist.js`.
39
-
40
- /** IE10 and IE11 requires the following for the Reflect API. */
41
- // import 'core-js/es6/reflect';
42
-
43
- /** Evergreen browsers require these. **/
44
- // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
45
- import 'core-js/es7/reflect';
46
-
47
- /**
48
- * Web Animations `@angular/platform-browser/animations`
49
- * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
50
- * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
51
- **/
52
- // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
53
-
54
- /**
55
- * By default, zone.js will patch all possible macroTask and DomEvents
56
- * user can disable parts of macroTask/DomEvents patch by setting following flags
57
- */
58
-
59
- // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
60
- // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
61
- // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
62
-
63
- /*
64
- * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
65
- * with the following flag, it will bypass `zone.js` patch for IE/Edge
66
- */
67
- // (window as any).__Zone_enable_cross_context_check = true;
68
-
69
- /***************************************************************************************************
70
- * Zone JS is required by default for Angular itself.
71
- */
72
- import 'zone.js'; // Included with Angular CLI.
73
-
74
- /***************************************************************************************************
75
- * APPLICATION IMPORTS
76
- */
@@ -1,31 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/lib",
5
- "declarationMap": true,
6
- "target": "es2020",
7
- "module": "es2015",
8
- "moduleResolution": "node",
9
- "declaration": true,
10
- "sourceMap": true,
11
- "inlineSources": true,
12
- "emitDecoratorMetadata": true,
13
- "experimentalDecorators": true,
14
- "importHelpers": true,
15
- "types": [],
16
- "lib": [
17
- "dom",
18
- "es2015"
19
- ]
20
- },
21
- "angularCompilerOptions": {
22
- "skipTemplateCodegen": true,
23
- "strictMetadataEmit": true,
24
- "fullTemplateTypeCheck": true,
25
- "strictInjectionParameters": true,
26
- "enableResourceInlining": true
27
- },
28
- "exclude": [
29
- "**/*.spec.ts"
30
- ]
31
- }
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../out-tsc/spec",
5
- "types": [
6
- "jasmine",
7
- "node"
8
- ]
9
- },
10
- "files": [
11
- "../test/test.ts",
12
- "polyfills.ts"
13
- ],
14
- "include": [
15
- "**/*.spec.ts",
16
- "**/*.d.ts"
17
- ]
18
- }
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
- process.env.CHROME_BIN = require('puppeteer').executablePath();
4
-
5
- module.exports = function (config) {
6
- config.set({
7
- basePath: '',
8
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
9
- plugins: [
10
- require('karma-jasmine'),
11
- require('karma-chrome-launcher'),
12
- require('karma-jasmine-html-reporter'),
13
- require('karma-coverage-istanbul-reporter'),
14
- require('@angular-devkit/build-angular/plugins/karma'),
15
- require('karma-junit-reporter'),
16
- ],
17
- files: [
18
- {
19
- pattern: '../node_modules/zone.js/dist/zone.min.js',
20
- included: true,
21
- watched: false,
22
- },
23
- ],
24
- client: {
25
- clearContext: false, // leave Jasmine Spec Runner output visible in browser
26
- },
27
- junitReporter: {
28
- outputDir: require('path').join(__dirname, '../../reports'),
29
- outputFile: 'knowledge-owl-angular-test-results.xml',
30
- },
31
- coverageIstanbulReporter: {
32
- dir: require('path').join(__dirname, '../../coverage'),
33
- reports: ['html', 'lcovonly'],
34
- fixWebpackSourcePaths: true,
35
- },
36
- reporters: ['dots', 'junit'],
37
- port: 9876,
38
- colors: true,
39
- logLevel: config.LOG_INFO,
40
- autoWatch: true,
41
- browsers: ['ChromeHeadless'],
42
- singleRun: true,
43
- });
44
- };
package/test/test.ts DELETED
@@ -1,24 +0,0 @@
1
- // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
-
3
- import 'zone.js';
4
- import 'zone.js/testing';
5
- import { getTestBed } from '@angular/core/testing';
6
- import {
7
- BrowserDynamicTestingModule,
8
- platformBrowserDynamicTesting,
9
- } from '@angular/platform-browser-dynamic/testing';
10
-
11
- declare const require: any;
12
-
13
- // First, initialize the Angular testing environment.
14
- getTestBed().initTestEnvironment(
15
- BrowserDynamicTestingModule,
16
- platformBrowserDynamicTesting(),
17
- {
18
- teardown: { destroyAfterEach: false },
19
- }
20
- );
21
- // Then we find all the tests.
22
- const context = require.context('../src/', true, /\.spec\.ts$/);
23
- // And load the modules.
24
- context.keys().map(context);
package/tsconfig.json DELETED
@@ -1,34 +0,0 @@
1
- {
2
- "compileOnSave": false,
3
- "compilerOptions": {
4
- "baseUrl": "./",
5
- "downlevelIteration": true,
6
- "importHelpers": true,
7
- "outDir": "./dist/out-tsc",
8
- "sourceMap": true,
9
- "declaration": false,
10
- "module": "es2020",
11
- "moduleResolution": "node",
12
- "emitDecoratorMetadata": true,
13
- "experimentalDecorators": true,
14
- "target": "es2020",
15
- "noUnusedLocals": true,
16
- "noUnusedParameters": true,
17
- "typeRoots": [
18
- "node_modules/@types"
19
- ],
20
- "lib": [
21
- "es2017",
22
- "dom"
23
- ]
24
- },
25
- "include": [
26
- "src/**/*.ts",
27
- "test/**/*.ts"
28
- ],
29
- "exclude": [
30
- // IDEs should not type-check the different node_modules directories of the different packages.
31
- // This would cause the IDEs to be slower and also linters would check the node_modules.
32
- "node_modules/"
33
- ]
34
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./src/tsconfig.lib.json",
3
- "compilerOptions": {
4
- "declarationMap": false
5
- },
6
- "angularCompilerOptions": {
7
- "compilationMode": "partial"
8
- }
9
- }
File without changes