@ng-formworks/bootstrap5 15.2.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.
package/README.md ADDED
@@ -0,0 +1,228 @@
1
+ # @ng-formworks/bootstrap5
2
+ This module is a dependency of the [ng-formworks project][npm_core_ver] and is meant to work as a framework installation module for using Bootstrap 5 in the forms.
3
+
4
+ ## Getting started
5
+
6
+ If you are unfamiliar with with the ng-formworks project, it is highly recommended to
7
+ first have a look at the [@ng-formworks pages][npm_core_ver] for examples, demos, options and documentation.
8
+
9
+ ```shell
10
+ npm install @ng-formworks/core@latest @ng-formworks/cssframework@latest @ng-formworks/bootstrap5@latest
11
+ ```
12
+
13
+ With YARN, run the following:
14
+
15
+ ```shell
16
+ yarn add @ng-formworks/core@latest @ng-formworks/cssframework@latest @ng-formworks/bootstrap5@latest
17
+ ```
18
+
19
+ Then import `Bootstrap5FrameworkModule` in your main application module if you want to use `bootstrap5` UI, like this:
20
+
21
+ ```javascript
22
+ import { BrowserModule } from '@angular/platform-browser';
23
+ import { NgModule } from '@angular/core';
24
+
25
+ import { Bootstrap5FrameworkModule } from '@ng-formworks/bootstrap5';
26
+
27
+ import { AppComponent } from './app.component';
28
+
29
+ @NgModule({
30
+ declarations: [ AppComponent ],
31
+ imports: [
32
+ Bootstrap5FrameworkModule
33
+ ],
34
+ providers: [],
35
+ bootstrap: [ AppComponent ]
36
+ })
37
+ export class AppModule { }
38
+ ```
39
+
40
+ For basic use, after loading JsonSchemaFormModule as described above, to display a form in your Angular component, simply add the following to your component's template:
41
+
42
+ ```html
43
+ <json-schema-form
44
+ loadExternalAssets="true"
45
+ [schema]="yourJsonSchema"
46
+ framework="bootstrap-5"
47
+ [theme]="yourTheme"
48
+ (onSubmit)="yourOnSubmitFn($event)">
49
+ </json-schema-form>
50
+ ```
51
+
52
+ Where `schema` is a valid JSON schema object, and `onSubmit` calls a function to process the submitted JSON form data. If you don't already have your own schemas, you can find a bunch of samples to test with in the `demo/assets/example-schemas` folder, as described above.
53
+
54
+ `framework` is for the template you want to use, the default value is `no-framwork`. The possible values are:
55
+
56
+ * `material-design` for Material Design (if installed).
57
+ * `bootstrap-3` for Bootstrap 3 (if installed).
58
+ * `bootstrap-4` for Bootstrap 4 (if installed).
59
+ * `bootstrap-5` for Bootstrap 5.
60
+ * `daisyui` for DaisyUi (if installed).
61
+ * `no-framework` for (plain HTML).
62
+
63
+ `theme` is for the framework theme you want to use.
64
+ The possible values for this framework are:
65
+
66
+ * `bootstrap5_default` for the default theme.
67
+ * `light` for the light theme.
68
+ * `dark` for the dark theme.
69
+
70
+ the list of available themes can also be gotten using the
71
+ FrameworkLibraryService(found in '@ng-formworks/core'):
72
+ ```typescript
73
+ getFrameworkThemes()
74
+ ```
75
+ method
76
+
77
+ ## Custom theming
78
+
79
+ Custom theming can be achieved in two ways:
80
+
81
+ * the simplest is to overwrite the default theme(or any other themes) with css rules:
82
+ css changes can be made using the `data-bs-theme` attribute selector
83
+ so for example to change the .btn class of the default theme, you would
84
+ include the following rule in your application's styles
85
+
86
+ ```css
87
+ [data-bs-theme="bootstrap5_default"] .btn {
88
+ border-radius: 1rem
89
+ }
90
+ ```
91
+
92
+ * the other method is to add a new theme:
93
+ the first step will be to create the entire theme (see the specific frameworks underlying documentation for how this can be done) and have it use the `data-bs-theme` attribute selector for example:
94
+
95
+ ```css
96
+ [data-bs-theme="bootstrap5_custom"] {
97
+ background-color: green;
98
+ font: 15px Arial, sans-serif;
99
+ .
100
+ .
101
+ .
102
+ }
103
+ [data-bs-theme="bootstrap5_custom"] .btn {
104
+ border-color: coral;
105
+ .
106
+ .
107
+ .
108
+ }
109
+
110
+ ```
111
+ after making the css available, the theme will need to be registered using the
112
+ FrameworkLibraryService(found in '@ng-formworks/core'):
113
+ for example
114
+
115
+ ```typescript
116
+ constructor(
117
+ .
118
+ private frameworkLibrary: FrameworkLibraryService,
119
+ .
120
+ .
121
+ ) {
122
+
123
+ frameworkLibrary.registerTheme({name:'bootstrap5_custom',text:'Bootstrap5 custom theme'})
124
+
125
+ }
126
+
127
+ ```
128
+
129
+ ## Framework assets
130
+
131
+ Framework assets are typically third party assets (mainly js and css files) that are loaded at runtime for the particular framework's styling and effects to activate.
132
+ By default these assets are loaded from built in cdn urls. These assets can also be self hosted or loaded from different urls if need be.
133
+ To use custom urls the following steps must be followed:
134
+
135
+
136
+ * create a file called assets.json somewhere in your app src folder
137
+ * edit the assets.json file so that it contains both 'stylesheets' and 'scripts' properties-ex:
138
+
139
+ ```
140
+ {
141
+
142
+ "stylesheets": [
143
+ "http://some.domain/css/style1.css",
144
+ "http://some.domain/css/style2.css",
145
+ "localstyle.css",
146
+ ...
147
+ ],
148
+ "scripts": [
149
+ "http://some.domain/css/script1.js",
150
+ "localscript.js",
151
+ ...
152
+ ]
153
+
154
+ }
155
+
156
+ ```
157
+ * adapt your apps angular.json assets config accordingly, for example:
158
+
159
+ ```
160
+ "projects": {
161
+ "<your project name>": {
162
+ ...
163
+ "architect": {
164
+ "build": {
165
+ "builder": "@angular-devkit/build-angular:browser",
166
+ "options": {
167
+ ...
168
+ "assets": [
169
+ ...
170
+ {
171
+ "glob": "assets.json",
172
+ "input": "src",
173
+ "output": "/assets/bootstrap-5"
174
+ },
175
+ {
176
+ "glob": "localstyle.css",
177
+ "input": "./some/path/to/framework/cssfolder/",
178
+ "output": "/assets/bootstrap-5/cssframework"
179
+ },
180
+ {
181
+ "glob": "localscript.js",
182
+ "input": "./some/path/to/framework/jsfolder/",
183
+ "output": "/assets/bootstrap-5/cssframework"
184
+ }
185
+ ],
186
+ ...
187
+ ```
188
+ Note that relative asset urls will be assumed to reside under "/assets/bootstrap-5/cssframework" and the assets.json file must output to "/assets/bootstrap-5"
189
+
190
+ for convenince a default assets.json file is included for including the framework assets
191
+ from the node_modules folder, this assumes that the third party libraries were installed locally with npm and that they will reside in the "/assets/bootstrap-5/cssframework" deployment folder. In this case, the following config can be used and adapted similar to above:
192
+
193
+ ```
194
+ ...
195
+ "assets": [
196
+ ...
197
+ {
198
+ "glob": "**/*",
199
+ "input": "./node_modules/@ng-formworks/bootstrap5/assets",
200
+ "output": "/assets/bootstrap-5"
201
+ },
202
+ {
203
+ "glob": "bootstrap.bundle.min.js",
204
+ "input": "./node_modules/bootstrap/dist/js/",
205
+ "output": "/assets/bootstrap-5/cssframework"
206
+ },
207
+ {
208
+ "glob": "bootstrap.min.css",
209
+ "input": "./node_modules/bootstrap/dist/css/",
210
+ "output": "/assets/bootstrap-5/cssframework"
211
+ }
212
+ ],
213
+ ```
214
+
215
+ ## Code scaffolding
216
+
217
+ Run `ng generate component component-name --project @ng-formworks/bootstrap5` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project @ng-formworks/bootstrap5`.
218
+ > Note: Don't forget to add `--project @ng-formworks/bootstrap5` or else it will be added to the default project in your `angular.json` file.
219
+
220
+ ## Build
221
+
222
+ Run `ng build @ng-formworks/bootstrap5` to build the project. The build artifacts will be stored in the `dist/` directory.
223
+
224
+ ## Running unit tests
225
+
226
+ Run `ng test @ng-formworks/bootstrap5` to execute the unit tests via [Karma](https://karma-runner.github.io).
227
+
228
+ [npm_core_ver]:https://www.npmjs.com/package/@ng-formworks/core
@@ -0,0 +1,6 @@
1
+ {
2
+
3
+ "stylesheets": ["bootstrap.min.css"],
4
+ "scripts": ["bootstrap.bundle.min.js"]
5
+
6
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+
3
+ "scripts": [
4
+ "//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
5
+ ],
6
+ "stylesheets": [
7
+ "//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"
8
+ ]
9
+
10
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/@ng-formworks/bootstrap5",
4
+ "lib": {
5
+ "entryFile": "src/public_api.ts"
6
+ },
7
+ "assets": ["./assets"],
8
+ "allowedNonPeerDependencies": [
9
+ "lodash-es",
10
+ "@ng-formworks/core",
11
+ "@ng-formworks/cssframework"
12
+ ]
13
+ }
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@ng-formworks/bootstrap5",
3
+ "version": "15.2.7",
4
+ "description": "Angular ng-formworks - JSON Schema Form builder using Bootstrap 5 UI",
5
+ "author": "https://github.com/zahmo/ng-formworks/graphs/contributors",
6
+ "keywords": [
7
+ "Angular",
8
+ "ng",
9
+ "Angular15",
10
+ "Angular 15",
11
+ "Angular16",
12
+ "Angular 16",
13
+ "Angular17",
14
+ "Angular 17",
15
+ "ng15",
16
+ "ng16",
17
+ "ng17",
18
+ "JSON Schema",
19
+ "form",
20
+ "forms",
21
+ "form builder",
22
+ "form themes",
23
+ "form generator",
24
+ "bootstrap",
25
+ "bootstrap 5",
26
+ "ajsf",
27
+ "ng-formworks",
28
+ "ng formworks",
29
+ "formworks",
30
+ "angular json schema form"
31
+ ],
32
+ "license": "MIT",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/zahmo/ng-formworks"
36
+ },
37
+ "bugs": {
38
+ "url": "https://github.com/zahmo/ng-formworks/issues"
39
+ },
40
+ "private": false,
41
+ "dependencies": {
42
+ "lodash-es": "~4.17.21",
43
+ "@ng-formworks/core": "~15.2.7",
44
+ "@ng-formworks/cssframework": "~15.2.7",
45
+ "tslib": "^2.0.0"
46
+ },
47
+ "peerDependencies": {
48
+ "@angular/common": ">=15.0.0",
49
+ "@angular/core": ">=15.0.0"
50
+ },
51
+ "devDependencies": {
52
+ "@types/lodash-es": "^4.17.6"
53
+ }
54
+ }
@@ -0,0 +1,41 @@
1
+ /*adapted from bootstrap 3 to fix input groups */
2
+
3
+ .input-group .form-control:first-child,
4
+ .input-group-text:first-child,
5
+ .input-group-btn:first-child>.btn,
6
+ .input-group-btn:first-child>.btn-group>.btn,
7
+ .input-group-btn:first-child>.dropdown-toggle,
8
+ .input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),
9
+ .input-group-btn:last-child>.btn-group:not(:last-child)>.btn {
10
+ border-top-right-radius: 0;
11
+ border-bottom-right-radius: 0;
12
+ }
13
+
14
+ .input-group-text:first-child {
15
+ border-right: 0;
16
+ }
17
+
18
+ .input-group .form-control:last-child,
19
+ .input-group-text:last-child,
20
+ .input-group-btn:last-child>.btn,
21
+ .input-group-btn:last-child>.btn-group>.btn,
22
+ .input-group-btn:last-child>.dropdown-toggle,
23
+ .input-group-btn:first-child>.btn:not(:first-child),
24
+ .input-group-btn:first-child>.btn-group:not(:first-child)>.btn {
25
+ border-top-left-radius: 0;
26
+ border-bottom-left-radius: 0;
27
+ }
28
+
29
+ .input-group-text:last-child {
30
+ border-left: 0;
31
+ }
32
+
33
+ .input-group .form-control:not(:first-child):not(:last-child),
34
+ .input-group-text:not(:first-child):not(:last-child),
35
+ .input-group-btn:not(:first-child):not(:last-child) {
36
+ border-radius: 0
37
+ }
38
+
39
+ .btn-close>span:first-child {
40
+ display: none;
41
+ }
@@ -0,0 +1,107 @@
1
+ import { css_fw } from "@ng-formworks/cssframework";
2
+
3
+ export const cssFrameworkCfgBootstrap5:css_fw.frameworkcfg={
4
+
5
+ "name": "bootstrap-5",
6
+ "text":"Bootstrap 5",
7
+ "scripts": [
8
+ "//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
9
+ ],
10
+ "stylesheets": [
11
+ "//cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css",
12
+ ],
13
+ "widgetstyles": {
14
+ "__themes__": [
15
+ {"name":"bootstrap5_default","text":"Bootstrap5 default"},
16
+ {"name":"dark","text":"Dark"},
17
+ {"name":"light","text":"Light"}
18
+ ],
19
+ "$ref": {
20
+ "fieldHtmlClass": "btn float-end btn-info"
21
+ },
22
+ "__array_item_nonref__": {
23
+ "htmlClass": "list-group-item"
24
+ },
25
+ "__form_group__": {
26
+ "htmlClass": "form-group"
27
+ },
28
+ "__control_label__": {
29
+ "labelHtmlClass": "control-label"
30
+ },
31
+ "__active__": {
32
+ "activeClass": "active"
33
+ },
34
+ "__required_asterisk__": "text-danger",
35
+ "__screen_reader__": "visually-hidden",
36
+ "__remove_item__": "btn-close float-end",
37
+ "__help_block__": "help-block",
38
+ "__field_addon_left__": "input-group-text",
39
+ "__field_addon_right__": "input-group-text",
40
+ "alt-date": {},
41
+ "alt-datetime": {},
42
+ "__array__": {
43
+ "htmlClass": "list-group"
44
+ },
45
+ "array": {},
46
+ "authfieldset": {},
47
+ "advancedfieldset": {},
48
+ "button": {
49
+ "fieldHtmlClass": "btn btn-sm btn-primary"
50
+ },
51
+ "checkbox": { "fieldHtmlClass": "checkbox" },
52
+ "checkboxes": {
53
+ "fieldHtmlClass": "checkbox"
54
+ },
55
+ "checkboxbuttons": {
56
+ "fieldHtmlClass": "visually-hidden",
57
+ "htmlClass": "btn-group",
58
+ "itemLabelHtmlClass": "btn"
59
+ },
60
+ "checkboxes-inline": {
61
+ "htmlClass": "checkbox",
62
+ "itemLabelHtmlClass": "checkbox-inline"
63
+ },
64
+ "date": {},
65
+ "datetime-local": {},
66
+ "fieldset": {},
67
+ "integer": {},
68
+ "number": {},
69
+ "optionfieldset": {},
70
+ "password": {},
71
+ "radiobuttons": {
72
+ "fieldHtmlClass": "visually-hidden",
73
+ "htmlClass": "btn-group",
74
+ "itemLabelHtmlClass": "btn"
75
+ },
76
+ "radio": { "fieldHtmlClass": "radio" },
77
+ "radios": {
78
+ "fieldHtmlClass": "radio"
79
+ },
80
+ "radios-inline": {
81
+ "htmlClass": "radio",
82
+ "itemLabelHtmlClass": "radio-inline"
83
+ },
84
+ "range": {},
85
+ "section": {},
86
+ "selectfieldset": {},
87
+ "select": {},
88
+ "submit": {
89
+ "fieldHtmlClass": "btn btn-primary"
90
+ },
91
+ "text": {},
92
+ "tabs": {
93
+ "labelHtmlClass": "nav nav-tabs",
94
+ "htmlClass": "tab-content",
95
+ "fieldHtmlClass": "tab-pane"
96
+ },
97
+ "tabarray": {
98
+ "labelHtmlClass": "nav nav-tabs",
99
+ "htmlClass": "tab-content",
100
+ "fieldHtmlClass": "tab-pane"
101
+ },
102
+ "textarea": {},
103
+ "default": {
104
+ "fieldHtmlClass": "form-control"
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,28 @@
1
+ :host ::ng-deep {
2
+ .list-group-item .form-control-feedback {
3
+ top: 40px;
4
+ }
5
+ .checkbox,
6
+ .radio {
7
+ margin-top: 0;
8
+ margin-bottom: 0;
9
+ }
10
+ .checkbox-inline,
11
+ .checkbox-inline+.checkbox-inline,
12
+ .checkbox-inline+.radio-inline,
13
+ .radio-inline,
14
+ .radio-inline+.radio-inline,
15
+ .radio-inline+.checkbox-inline {
16
+ margin-left: 0;
17
+ margin-right: 10px;
18
+ }
19
+ .checkbox-inline:last-child,
20
+ .radio-inline:last-child {
21
+ margin-right: 0;
22
+ }
23
+ .ng-invalid.ng-touched {
24
+ border: 1px solid #f44336;
25
+ }
26
+ }
27
+
28
+ @import './bootstrap5-cssframework.scss';
@@ -0,0 +1,39 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
3
+ import {
4
+ JsonSchemaFormModule,
5
+ JsonSchemaFormService,
6
+ WidgetLibraryModule
7
+ } from '@ng-formworks/core';
8
+ import { Bootstrap5FrameworkComponent } from './bootstrap5-framework.component';
9
+
10
+ describe('Bootstrap5Component', () => {
11
+ let component: Bootstrap5FrameworkComponent;
12
+ let fixture: ComponentFixture<Bootstrap5FrameworkComponent>;
13
+
14
+ beforeEach(waitForAsync(() => {
15
+ TestBed.configureTestingModule({
16
+ imports: [
17
+ JsonSchemaFormModule,
18
+ CommonModule,
19
+ WidgetLibraryModule,
20
+ ],
21
+ declarations: [Bootstrap5FrameworkComponent],
22
+ providers: [JsonSchemaFormService]
23
+ })
24
+ .compileComponents();
25
+ }));
26
+
27
+ beforeEach(() => {
28
+ fixture = TestBed.createComponent(Bootstrap5FrameworkComponent);
29
+ component = fixture.componentInstance;
30
+ component.layoutNode = { options: {} };
31
+ component.layoutIndex = [];
32
+ component.dataIndex = [];
33
+ fixture.detectChanges();
34
+ });
35
+
36
+ it('should create', () => {
37
+ expect(component).toBeTruthy();
38
+ });
39
+ });
@@ -0,0 +1,66 @@
1
+ import {
2
+ ChangeDetectorRef,
3
+ Component,
4
+ Input,
5
+ OnChanges,
6
+ OnInit,
7
+ ViewEncapsulation
8
+ } from '@angular/core';
9
+ import { JsonSchemaFormService } from '@ng-formworks/core';
10
+
11
+ /**
12
+ * Bootstrap 5 framework for Angular JSON Schema Form.
13
+ *
14
+ */
15
+ @Component({
16
+ // tslint:disable-next-line:component-selector
17
+ selector: 'bootstrap-5-framework',
18
+ template: `
19
+ <div>
20
+ <css-framework [layoutNode]="layoutNode"
21
+ [layoutIndex]="layoutIndex"
22
+ [dataIndex]="dataIndex">
23
+ </css-framework>
24
+ </div>
25
+ `,
26
+ styleUrls: ['./bootstrap5-framework.component.scss'],
27
+ encapsulation:ViewEncapsulation.None
28
+ })
29
+ export class Bootstrap5FrameworkComponent implements OnInit, OnChanges {
30
+ frameworkInitialized = false;
31
+ widgetOptions: any; // Options passed to child widget
32
+ widgetLayoutNode: any; // layoutNode passed to child widget
33
+ options: any; // Options used in this framework
34
+ formControl: any = null;
35
+ debugOutput: any = '';
36
+ debug: any = '';
37
+ parentArray: any = null;
38
+ isOrderable = false;
39
+ @Input() layoutNode: any;
40
+ @Input() layoutIndex: number[];
41
+ @Input() dataIndex: number[];
42
+
43
+
44
+ constructor(
45
+ public changeDetector: ChangeDetectorRef,
46
+ public jsf: JsonSchemaFormService
47
+ ) {
48
+ }
49
+
50
+
51
+
52
+ ngOnInit() {
53
+
54
+ }
55
+
56
+ ngOnChanges() {
57
+
58
+ }
59
+
60
+
61
+
62
+
63
+
64
+
65
+ }
66
+
@@ -0,0 +1,37 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { NgModule } from '@angular/core';
3
+ import {
4
+ Framework,
5
+ FrameworkLibraryService,
6
+ JsonSchemaFormModule,
7
+ JsonSchemaFormService,
8
+ WidgetLibraryModule,
9
+ WidgetLibraryService
10
+ } from '@ng-formworks/core';
11
+ import { CssFrameworkModule } from '@ng-formworks/cssframework';
12
+ import { Bootstrap5FrameworkComponent } from './bootstrap5-framework.component';
13
+ import { Bootstrap5Framework } from './bootstrap5.framework';
14
+
15
+ @NgModule({
16
+ imports: [
17
+ JsonSchemaFormModule,
18
+ CommonModule,
19
+ WidgetLibraryModule,
20
+ CssFrameworkModule
21
+ ],
22
+ declarations: [
23
+ Bootstrap5FrameworkComponent,
24
+ ],
25
+ exports: [
26
+ JsonSchemaFormModule,
27
+ Bootstrap5FrameworkComponent,
28
+ ],
29
+ providers: [
30
+ JsonSchemaFormService,
31
+ FrameworkLibraryService,
32
+ WidgetLibraryService,
33
+ { provide: Framework, useClass: Bootstrap5Framework, multi: true },
34
+ ]
35
+ })
36
+ export class Bootstrap5FrameworkModule {
37
+ }
@@ -0,0 +1,17 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { CssFramework, CssframeworkService } from '@ng-formworks/cssframework';
3
+ import { cssFrameworkCfgBootstrap5 } from './bootstrap5-cssframework';
4
+ import { Bootstrap5FrameworkComponent } from './bootstrap5-framework.component';
5
+
6
+ // Bootstrap 4 Framework
7
+ // https://github.com/ng-bootstrap/ng-bootstrap
8
+
9
+ @Injectable()
10
+ export class Bootstrap5Framework extends CssFramework {
11
+
12
+ framework = Bootstrap5FrameworkComponent;
13
+
14
+ constructor(public cssFWService:CssframeworkService){
15
+ super(cssFrameworkCfgBootstrap5,cssFWService);
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ /*
2
+ * Public API Surface of @ng-formworks/bootstrap5
3
+ */
4
+
5
+ export * from './lib/bootstrap5-framework.component';
6
+ export * from './lib/bootstrap5-framework.module';
7
+ export * from './lib/bootstrap5.framework';
8
+
package/src/test.ts ADDED
@@ -0,0 +1,17 @@
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
+ // First, initialize the Angular testing environment.
12
+ getTestBed().initTestEnvironment(
13
+ BrowserDynamicTestingModule,
14
+ platformBrowserDynamicTesting(), {
15
+ teardown: { destroyAfterEach: false }
16
+ }
17
+ );
@@ -0,0 +1,14 @@
1
+ /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
+ {
3
+ "extends": "../../tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "../../out-tsc/lib",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "inlineSources": true,
9
+ "types": []
10
+ },
11
+ "exclude": [
12
+ "**/*.spec.ts"
13
+ ]
14
+ }
@@ -0,0 +1,10 @@
1
+ /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
+ {
3
+ "extends": "./tsconfig.lib.json",
4
+ "compilerOptions": {
5
+ "declarationMap": false
6
+ },
7
+ "angularCompilerOptions": {
8
+ "compilationMode": "partial"
9
+ }
10
+ }
@@ -0,0 +1,14 @@
1
+ /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
+ {
3
+ "extends": "../../tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "../../out-tsc/spec",
6
+ "types": [
7
+ "jasmine"
8
+ ]
9
+ },
10
+ "include": [
11
+ "**/*.spec.ts",
12
+ "**/*.d.ts"
13
+ ]
14
+ }