@ng-formworks/bootstrap3 15.2.7 → 15.4.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.
Files changed (33) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -2
  3. package/esm2020/lib/bootstrap3-cssframework.mjs +106 -0
  4. package/esm2020/lib/bootstrap3-framework.component.mjs +50 -0
  5. package/esm2020/lib/bootstrap3-framework.module.mjs +49 -0
  6. package/esm2020/lib/bootstrap3.framework.mjs +22 -0
  7. package/esm2020/ng-formworks-bootstrap3.mjs +5 -0
  8. package/esm2020/public_api.mjs +7 -0
  9. package/fesm2015/ng-formworks-bootstrap3.mjs +228 -0
  10. package/fesm2015/ng-formworks-bootstrap3.mjs.map +1 -0
  11. package/fesm2020/ng-formworks-bootstrap3.mjs +228 -0
  12. package/fesm2020/ng-formworks-bootstrap3.mjs.map +1 -0
  13. package/index.d.ts +5 -0
  14. package/lib/bootstrap3-cssframework.d.ts +2 -0
  15. package/lib/bootstrap3-framework.component.d.ts +27 -0
  16. package/lib/bootstrap3-framework.module.d.ts +10 -0
  17. package/lib/bootstrap3.framework.d.ts +11 -0
  18. package/package.json +70 -53
  19. package/{src/public_api.ts → public_api.d.ts} +0 -5
  20. package/karma.conf.js +0 -47
  21. package/ng-package.json +0 -13
  22. package/src/lib/bootstrap3-cssframework.ts +0 -109
  23. package/src/lib/bootstrap3-framework.component.html +0 -62
  24. package/src/lib/bootstrap3-framework.component.scss +0 -31
  25. package/src/lib/bootstrap3-framework.component.spec.ts +0 -39
  26. package/src/lib/bootstrap3-framework.component.ts +0 -57
  27. package/src/lib/bootstrap3-framework.module.ts +0 -37
  28. package/src/lib/bootstrap3.framework.ts +0 -18
  29. package/src/test.ts +0 -17
  30. package/tsconfig.lib.json +0 -25
  31. package/tsconfig.lib.prod.json +0 -9
  32. package/tsconfig.spec.json +0 -17
  33. package/tslint.json +0 -11
@@ -1,62 +0,0 @@
1
- <div
2
- [class]="options?.htmlClass || ''"
3
- [class.has-feedback]="options?.feedback && options?.isInputWidget &&
4
- (formControl?.dirty || options?.feedbackOnRender)"
5
- [class.has-error]="options?.enableErrorState && formControl?.errors &&
6
- (formControl?.dirty || options?.feedbackOnRender)"
7
- [class.has-success]="options?.enableSuccessState && !formControl?.errors &&
8
- (formControl?.dirty || options?.feedbackOnRender)">
9
-
10
- <button *ngIf="showRemoveButton"
11
- class="close pull-right"
12
- type="button"
13
- (click)="removeItem()">
14
- <span aria-hidden="true">&times;</span>
15
- <span class="sr-only">Close</span>
16
- </button>
17
- <div *ngIf="options?.messageLocation === 'top'">
18
- <p *ngIf="options?.helpBlock"
19
- class="help-block"
20
- [innerHTML]="options?.helpBlock"></p>
21
- </div>
22
-
23
- <label *ngIf="options?.title && layoutNode?.type !== 'tab'"
24
- [attr.for]="'control' + layoutNode?._id"
25
- [class]="options?.labelHtmlClass || ''"
26
- [class.sr-only]="options?.notitle"
27
- [innerHTML]="options?.title"></label>
28
- <p *ngIf="layoutNode?.type === 'submit' && jsf?.formOptions?.fieldsRequired">
29
- <strong class="text-danger">*</strong> = required fields
30
- </p>
31
- <div [class.input-group]="options?.fieldAddonLeft || options?.fieldAddonRight">
32
- <span *ngIf="options?.fieldAddonLeft"
33
- class="input-group-addon"
34
- [innerHTML]="options?.fieldAddonLeft"></span>
35
-
36
- <select-widget-widget
37
- [layoutNode]="widgetLayoutNode"
38
- [dataIndex]="dataIndex"
39
- [layoutIndex]="layoutIndex"></select-widget-widget>
40
-
41
- <span *ngIf="options?.fieldAddonRight"
42
- class="input-group-addon"
43
- [innerHTML]="options?.fieldAddonRight"></span>
44
- </div>
45
-
46
- <span *ngIf="options?.feedback && options?.isInputWidget &&
47
- !options?.fieldAddonRight && !layoutNode.arrayItem &&
48
- (formControl?.dirty || options?.feedbackOnRender)"
49
- [class.glyphicon-ok]="options?.enableSuccessState && !formControl?.errors"
50
- [class.glyphicon-remove]="options?.enableErrorState && formControl?.errors"
51
- aria-hidden="true"
52
- class="form-control-feedback glyphicon"></span>
53
- <div *ngIf="options?.messageLocation !== 'top'">
54
- <p *ngIf="options?.helpBlock"
55
- class="help-block"
56
- [innerHTML]="options?.helpBlock"></p>
57
- </div>
58
- </div>
59
-
60
- <div *ngIf="debug && debugOutput">debug:
61
- <pre>{{debugOutput}}</pre>
62
- </div>
@@ -1,31 +0,0 @@
1
- :host ::ng-deep {
2
- .list-group-item .form-control-feedback {
3
- top: 40px;
4
- }
5
-
6
- .checkbox,
7
- .radio {
8
- margin-top: 0;
9
- margin-bottom: 0;
10
- }
11
-
12
- .checkbox-inline,
13
- .checkbox-inline + .checkbox-inline,
14
- .checkbox-inline + .radio-inline,
15
- .radio-inline,
16
- .radio-inline + .radio-inline,
17
- .radio-inline + .checkbox-inline {
18
- margin-left: 0;
19
- margin-right: 10px;
20
- }
21
-
22
- .checkbox-inline:last-child,
23
- .radio-inline:last-child {
24
- margin-right: 0;
25
- }
26
-
27
- .ng-invalid.ng-touched {
28
- border: 1px solid #f44336;
29
- }
30
- }
31
-
@@ -1,39 +0,0 @@
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 { Bootstrap3FrameworkComponent } from './bootstrap3-framework.component';
9
-
10
- describe('Bootstrap3FrameworkComponent', () => {
11
- let component: Bootstrap3FrameworkComponent;
12
- let fixture: ComponentFixture<Bootstrap3FrameworkComponent>;
13
-
14
- beforeEach(waitForAsync(() => {
15
- TestBed.configureTestingModule({
16
- imports: [
17
- JsonSchemaFormModule,
18
- CommonModule,
19
- WidgetLibraryModule,
20
- ],
21
- declarations: [Bootstrap3FrameworkComponent],
22
- providers: [JsonSchemaFormService]
23
- })
24
- .compileComponents();
25
- }));
26
-
27
- beforeEach(() => {
28
- fixture = TestBed.createComponent(Bootstrap3FrameworkComponent);
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
- });
@@ -1,57 +0,0 @@
1
- import { ChangeDetectorRef, Component, Input, OnChanges, OnInit, ViewEncapsulation } from '@angular/core';
2
- import { JsonSchemaFormService } from '@ng-formworks/core';
3
-
4
- /**
5
- * Bootstrap 3 framework for Angular JSON Schema Form.
6
- */
7
- @Component({
8
- // tslint:disable-next-line:component-selector
9
- selector: 'bootstrap-3-framework',
10
- template: `
11
- <div>
12
- <css-framework [layoutNode]="layoutNode"
13
- [layoutIndex]="layoutIndex"
14
- [dataIndex]="dataIndex">
15
- </css-framework>
16
- </div>
17
- `,
18
- styleUrls: ['./bootstrap3-framework.component.scss'],
19
- encapsulation:ViewEncapsulation.None
20
- })
21
- export class Bootstrap3FrameworkComponent implements OnInit, OnChanges {
22
- frameworkInitialized = false;
23
- widgetOptions: any; // Options passed to child widget
24
- widgetLayoutNode: any; // layoutNode passed to child widget
25
- options: any; // Options used in this framework
26
- formControl: any = null;
27
- debugOutput: any = '';
28
- debug: any = '';
29
- parentArray: any = null;
30
- isOrderable = false;
31
- @Input() layoutNode: any;
32
- @Input() layoutIndex: number[];
33
- @Input() dataIndex: number[];
34
-
35
-
36
- constructor(
37
- public changeDetector: ChangeDetectorRef,
38
- public jsf: JsonSchemaFormService
39
- ) {
40
- }
41
-
42
-
43
-
44
- ngOnInit() {
45
-
46
- }
47
-
48
- ngOnChanges() {
49
-
50
- }
51
-
52
-
53
-
54
-
55
-
56
-
57
- }
@@ -1,37 +0,0 @@
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 { Bootstrap3FrameworkComponent } from './bootstrap3-framework.component';
13
- import { Bootstrap3Framework } from './bootstrap3.framework';
14
-
15
- @NgModule({
16
- imports: [
17
- JsonSchemaFormModule,
18
- CommonModule,
19
- WidgetLibraryModule,
20
- CssFrameworkModule
21
- ],
22
- declarations: [
23
- Bootstrap3FrameworkComponent,
24
- ],
25
- exports: [
26
- JsonSchemaFormModule,
27
- Bootstrap3FrameworkComponent,
28
- ],
29
- providers: [
30
- JsonSchemaFormService,
31
- FrameworkLibraryService,
32
- WidgetLibraryService,
33
- { provide: Framework, useClass: Bootstrap3Framework, multi: true },
34
- ]
35
- })
36
- export class Bootstrap3FrameworkModule {
37
- }
@@ -1,18 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { CssFramework, CssframeworkService } from '@ng-formworks/cssframework';
3
- import { cssFrameworkCfgBootstrap3 } from './bootstrap3-cssframework';
4
- import { Bootstrap3FrameworkComponent } from './bootstrap3-framework.component';
5
-
6
- // Bootstrap 3 Framework
7
- // https://github.com/valor-software/ng2-bootstrap
8
-
9
- @Injectable()
10
- export class Bootstrap3Framework extends CssFramework {
11
- name = 'bootstrap-3';
12
-
13
- framework = Bootstrap3FrameworkComponent;
14
-
15
- constructor(public cssFWService:CssframeworkService){
16
- super(cssFrameworkCfgBootstrap3,cssFWService);
17
- }
18
- }
package/src/test.ts DELETED
@@ -1,17 +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
- // First, initialize the Angular testing environment.
12
- getTestBed().initTestEnvironment(
13
- BrowserDynamicTestingModule,
14
- platformBrowserDynamicTesting(), {
15
- teardown: { destroyAfterEach: false }
16
- }
17
- );
package/tsconfig.lib.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../out-tsc/lib",
5
- "declarationMap": true,
6
- "declaration": true,
7
- "inlineSources": true,
8
- "types": [],
9
- "lib": [
10
- "dom",
11
- "es2018"
12
- ]
13
- },
14
- "angularCompilerOptions": {
15
- "skipTemplateCodegen": true,
16
- "strictMetadataEmit": true,
17
- "fullTemplateTypeCheck": true,
18
- "strictInjectionParameters": true,
19
- "enableResourceInlining": true
20
- },
21
- "exclude": [
22
- "src/test.ts",
23
- "**/*.spec.ts"
24
- ]
25
- }
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib.json",
3
- "compilerOptions": {
4
- "declarationMap": false
5
- },
6
- "angularCompilerOptions": {
7
- "compilationMode": "partial"
8
- }
9
- }
@@ -1,17 +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
- "src/test.ts"
12
- ],
13
- "include": [
14
- "**/*.spec.ts",
15
- "**/*.d.ts"
16
- ]
17
- }
package/tslint.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tslint.json",
3
- "rules": {
4
- "directive-selector": [
5
- true,
6
- "attribute",
7
- "lib",
8
- "camelCase"
9
- ]
10
- }
11
- }