onshore-forms 0.0.7 → 0.0.9
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/esm2020/lib/components/form-autocomplete-item/form-autocomplete-item.component.mjs +11 -0
- package/esm2020/lib/components/form-checkbox-item/form-checkbox-item.component.mjs +62 -0
- package/esm2020/lib/components/form-colorpicker-item/form-colorpicker-item.component.mjs +69 -0
- package/esm2020/lib/components/form-dropdown-item/form-dropdown-item.component.mjs +65 -0
- package/esm2020/lib/components/form-image-item/form-image-item.component.mjs +160 -0
- package/esm2020/lib/components/form-input-item/form-input-item.component.mjs +63 -0
- package/esm2020/lib/components/form-switch-item/form-switch-item.component.mjs +65 -0
- package/esm2020/lib/components/form-textarea-item/form-textarea-item.component.mjs +61 -0
- package/esm2020/lib/components/form-validation-output/form-validation-output.component.mjs +41 -0
- package/esm2020/lib/enums/form.enums.mjs +26 -0
- package/esm2020/lib/models/form.models.mjs +2 -0
- package/esm2020/lib/onshore-forms.component.mjs +22 -0
- package/esm2020/lib/onshore-forms.module.mjs +134 -0
- package/esm2020/lib/onshore-forms.service.mjs +151 -0
- package/esm2020/onshore-forms.mjs +5 -0
- package/esm2020/public-api.mjs +18 -0
- package/fesm2015/onshore-forms.mjs +921 -0
- package/fesm2015/onshore-forms.mjs.map +1 -0
- package/fesm2020/onshore-forms.mjs +877 -0
- package/fesm2020/onshore-forms.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/form-autocomplete-item/form-autocomplete-item.component.d.ts +5 -0
- package/lib/components/form-checkbox-item/form-checkbox-item.component.d.ts +21 -0
- package/lib/components/form-colorpicker-item/form-colorpicker-item.component.d.ts +23 -0
- package/lib/components/form-dropdown-item/form-dropdown-item.component.d.ts +22 -0
- package/lib/components/form-image-item/form-image-item.component.d.ts +40 -0
- package/lib/components/form-input-item/form-input-item.component.d.ts +23 -0
- package/lib/components/form-switch-item/form-switch-item.component.d.ts +21 -0
- package/lib/components/form-textarea-item/form-textarea-item.component.d.ts +22 -0
- package/lib/components/form-validation-output/form-validation-output.component.d.ts +17 -0
- package/lib/enums/form.enums.d.ts +23 -0
- package/lib/models/form.models.d.ts +61 -0
- package/lib/onshore-forms.component.d.ts +8 -0
- package/lib/onshore-forms.module.d.ts +31 -0
- package/lib/onshore-forms.service.d.ts +32 -0
- package/package.json +21 -10
- package/{src/public-api.ts → public-api.d.ts} +0 -4
- package/karma.conf.js +0 -44
- package/ng-package.json +0 -11
- package/src/lib/components/form-autocomplete-item/form-autocomplete-item.component.html +0 -46
- package/src/lib/components/form-autocomplete-item/form-autocomplete-item.component.scss +0 -0
- package/src/lib/components/form-autocomplete-item/form-autocomplete-item.component.ts +0 -133
- package/src/lib/components/form-checkbox-item/form-checkbox-item.component.html +0 -23
- package/src/lib/components/form-checkbox-item/form-checkbox-item.component.scss +0 -0
- package/src/lib/components/form-checkbox-item/form-checkbox-item.component.ts +0 -65
- package/src/lib/components/form-colorpicker-item/form-colorpicker-item.component.html +0 -30
- package/src/lib/components/form-colorpicker-item/form-colorpicker-item.component.scss +0 -0
- package/src/lib/components/form-colorpicker-item/form-colorpicker-item.component.ts +0 -71
- package/src/lib/components/form-dropdown-item/form-dropdown-item.component.html +0 -44
- package/src/lib/components/form-dropdown-item/form-dropdown-item.component.scss +0 -0
- package/src/lib/components/form-dropdown-item/form-dropdown-item.component.ts +0 -68
- package/src/lib/components/form-image-item/form-image-item.component.html +0 -79
- package/src/lib/components/form-image-item/form-image-item.component.scss +0 -3
- package/src/lib/components/form-image-item/form-image-item.component.ts +0 -155
- package/src/lib/components/form-input-item/form-input-item.component.html +0 -81
- package/src/lib/components/form-input-item/form-input-item.component.scss +0 -3
- package/src/lib/components/form-input-item/form-input-item.component.ts +0 -66
- package/src/lib/components/form-switch-item/form-switch-item.component.html +0 -8
- package/src/lib/components/form-switch-item/form-switch-item.component.scss +0 -0
- package/src/lib/components/form-switch-item/form-switch-item.component.ts +0 -72
- package/src/lib/components/form-textarea-item/form-textarea-item.component.html +0 -39
- package/src/lib/components/form-textarea-item/form-textarea-item.component.scss +0 -0
- package/src/lib/components/form-textarea-item/form-textarea-item.component.ts +0 -64
- package/src/lib/components/form-validation-output/form-validation-output.component.html +0 -2
- package/src/lib/components/form-validation-output/form-validation-output.component.scss +0 -1
- package/src/lib/components/form-validation-output/form-validation-output.component.ts +0 -43
- package/src/lib/enums/form.enums.ts +0 -24
- package/src/lib/models/form.models.ts +0 -70
- package/src/lib/onshore-forms.component.ts +0 -20
- package/src/lib/onshore-forms.module.ts +0 -78
- package/src/lib/onshore-forms.service.ts +0 -172
- package/src/test.ts +0 -27
- package/styles/css/main.css +0 -1
- package/styles/css/theme1.css +0 -1
- package/tsconfig.lib.json +0 -24
- package/tsconfig.lib.prod.json +0 -20
- package/tsconfig.spec.json +0 -17
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { OnshoreFormTemplateType } from '../enums/form.enums';
|
|
2
|
-
|
|
3
|
-
export interface OnshoreCountryCode {
|
|
4
|
-
id: number;
|
|
5
|
-
name: string;
|
|
6
|
-
alpha2: string;
|
|
7
|
-
alpha3: string;
|
|
8
|
-
currency?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface OnshoreLanguageLocale {
|
|
12
|
-
id: number;
|
|
13
|
-
name: string;
|
|
14
|
-
code: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface OnshoreInputNumberOptionSettings {
|
|
18
|
-
step?: number;
|
|
19
|
-
min?: number;
|
|
20
|
-
max?: number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface OnshoreInputTextOptionSettings {
|
|
24
|
-
minLength?: number;
|
|
25
|
-
maxLength?: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface OnshoreImageItemSettings {
|
|
29
|
-
disableImageSelection?: boolean;
|
|
30
|
-
disableWebcamSelection?: boolean;
|
|
31
|
-
disableMediaSelection?: boolean;
|
|
32
|
-
disableDelete?: boolean;
|
|
33
|
-
imagePlaceholder?: string;
|
|
34
|
-
mediaType?: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface OnshoreDropdownSettings {
|
|
38
|
-
multiple?: boolean;
|
|
39
|
-
showClear?: boolean;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface OnshoreFormTemplateItem {
|
|
43
|
-
name: string;
|
|
44
|
-
type?: OnshoreFormTemplateType;
|
|
45
|
-
required?: boolean;
|
|
46
|
-
label?: string;
|
|
47
|
-
placeholder?: string;
|
|
48
|
-
tooltip?: string;
|
|
49
|
-
enabled?: boolean;
|
|
50
|
-
options?: OnshoreFormTemplateOptions[] | void[];
|
|
51
|
-
optionDataKey?: string;
|
|
52
|
-
settings?: OnshoreInputNumberOptionSettings | OnshoreInputTextOptionSettings | OnshoreImageItemSettings | OnshoreDropdownSettings;
|
|
53
|
-
default?: any;
|
|
54
|
-
description?: string;
|
|
55
|
-
validationPatternTranslation?: string;
|
|
56
|
-
validationItems?: OnshoreFormValidationItem[];
|
|
57
|
-
validators?: any[];
|
|
58
|
-
subformArray?: OnshoreFormTemplateItem[];
|
|
59
|
-
subformObject?: OnshoreFormTemplateItem[];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface OnshoreFormTemplateOptions {
|
|
63
|
-
label: string;
|
|
64
|
-
value: any;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface OnshoreFormValidationItem {
|
|
68
|
-
key: string;
|
|
69
|
-
label: string;
|
|
70
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'lib-onshore-forms',
|
|
5
|
-
template: `
|
|
6
|
-
<p>
|
|
7
|
-
onshore-forms works 2!
|
|
8
|
-
</p>
|
|
9
|
-
`,
|
|
10
|
-
styles: [
|
|
11
|
-
]
|
|
12
|
-
})
|
|
13
|
-
export class OnshoreFormsComponent implements OnInit {
|
|
14
|
-
|
|
15
|
-
constructor() { }
|
|
16
|
-
|
|
17
|
-
ngOnInit(): void {
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { OnshoreFormsComponent } from './onshore-forms.component';
|
|
3
|
-
import { OnshoreFormsService } from './onshore-forms.service';
|
|
4
|
-
import { OnshoreFormInputItemComponent } from './components/form-input-item/form-input-item.component';
|
|
5
|
-
import { OnshoreFormSwitchItemComponent } from './components/form-switch-item/form-switch-item.component';
|
|
6
|
-
import { OnshoreFormTextareaItemComponent } from './components/form-textarea-item/form-textarea-item.component';
|
|
7
|
-
import { OnshoreFormValidationOutputComponent } from './components/form-validation-output/form-validation-output.component';
|
|
8
|
-
import { OnshoreFormImageItemComponent } from './components/form-image-item/form-image-item.component';
|
|
9
|
-
import { OnshoreFormDropdownItemComponent } from './components/form-dropdown-item/form-dropdown-item.component';
|
|
10
|
-
import { OnshoreFormColorpickerItemComponent } from './components/form-colorpicker-item/form-colorpicker-item.component';
|
|
11
|
-
import { OnshoreFormCheckboxItemComponent } from './components/form-checkbox-item/form-checkbox-item.component';
|
|
12
|
-
import { OnshoreFormAutocompleteItemComponent } from './components/form-autocomplete-item/form-autocomplete-item.component';
|
|
13
|
-
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
14
|
-
import { CheckboxModule } from 'primeng/checkbox';
|
|
15
|
-
import { ColorPickerModule } from 'primeng/colorpicker';
|
|
16
|
-
import { DropdownModule } from 'primeng/dropdown';
|
|
17
|
-
import { MultiSelectModule } from 'primeng/multiselect';
|
|
18
|
-
import { TooltipModule } from 'primeng/tooltip';
|
|
19
|
-
import { InputNumberModule } from 'primeng/inputnumber';
|
|
20
|
-
import { InputSwitchModule } from 'primeng/inputswitch';
|
|
21
|
-
import { InputTextModule } from 'primeng/inputtext';
|
|
22
|
-
import { InputTextareaModule } from 'primeng/inputtextarea';
|
|
23
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
24
|
-
import { ButtonModule } from 'primeng/button';
|
|
25
|
-
import { RippleModule } from 'primeng/ripple';
|
|
26
|
-
import { DialogModule } from 'primeng/dialog';
|
|
27
|
-
import { CommonModule } from '@angular/common';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@NgModule({
|
|
32
|
-
declarations: [
|
|
33
|
-
OnshoreFormsComponent,
|
|
34
|
-
OnshoreFormInputItemComponent,
|
|
35
|
-
OnshoreFormSwitchItemComponent,
|
|
36
|
-
OnshoreFormTextareaItemComponent,
|
|
37
|
-
OnshoreFormValidationOutputComponent,
|
|
38
|
-
OnshoreFormImageItemComponent,
|
|
39
|
-
OnshoreFormDropdownItemComponent,
|
|
40
|
-
OnshoreFormColorpickerItemComponent,
|
|
41
|
-
OnshoreFormCheckboxItemComponent,
|
|
42
|
-
OnshoreFormAutocompleteItemComponent
|
|
43
|
-
],
|
|
44
|
-
imports: [
|
|
45
|
-
CommonModule,
|
|
46
|
-
FormsModule,
|
|
47
|
-
ReactiveFormsModule,
|
|
48
|
-
ButtonModule,
|
|
49
|
-
RippleModule,
|
|
50
|
-
AutoCompleteModule,
|
|
51
|
-
CheckboxModule,
|
|
52
|
-
ColorPickerModule,
|
|
53
|
-
DropdownModule,
|
|
54
|
-
MultiSelectModule,
|
|
55
|
-
TooltipModule,
|
|
56
|
-
InputNumberModule,
|
|
57
|
-
InputSwitchModule,
|
|
58
|
-
InputTextModule,
|
|
59
|
-
InputTextareaModule,
|
|
60
|
-
DialogModule
|
|
61
|
-
],
|
|
62
|
-
exports: [
|
|
63
|
-
OnshoreFormsComponent,
|
|
64
|
-
OnshoreFormInputItemComponent,
|
|
65
|
-
OnshoreFormSwitchItemComponent,
|
|
66
|
-
OnshoreFormTextareaItemComponent,
|
|
67
|
-
OnshoreFormValidationOutputComponent,
|
|
68
|
-
OnshoreFormImageItemComponent,
|
|
69
|
-
OnshoreFormDropdownItemComponent,
|
|
70
|
-
OnshoreFormColorpickerItemComponent,
|
|
71
|
-
OnshoreFormCheckboxItemComponent,
|
|
72
|
-
OnshoreFormAutocompleteItemComponent
|
|
73
|
-
],
|
|
74
|
-
providers: [
|
|
75
|
-
OnshoreFormsService
|
|
76
|
-
]
|
|
77
|
-
})
|
|
78
|
-
export class OnshoreFormsModule { }
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { FormArray, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
-
import { Subject, Subscription } from 'rxjs';
|
|
4
|
-
import { OnshoreFormTemplateType } from './enums/form.enums';
|
|
5
|
-
import { OnshoreFormTemplateItem, OnshoreFormValidationItem } from './models/form.models';
|
|
6
|
-
@Injectable({
|
|
7
|
-
providedIn: 'root'
|
|
8
|
-
})
|
|
9
|
-
export class OnshoreFormsService {
|
|
10
|
-
|
|
11
|
-
_form: FormGroup;
|
|
12
|
-
_formTemplate: OnshoreFormTemplateItem[];
|
|
13
|
-
_formValidations: OnshoreFormValidationItem[] = [];
|
|
14
|
-
|
|
15
|
-
subscriptions: Array<Subscription> = [];
|
|
16
|
-
|
|
17
|
-
public isLoading$: Subject<boolean> = new Subject<boolean>();
|
|
18
|
-
|
|
19
|
-
constructor() {
|
|
20
|
-
this._form = new FormGroup({}, {updateOn: 'change'});
|
|
21
|
-
this._formTemplate = [];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public get form(): FormGroup {
|
|
25
|
-
return this._form;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public get formValues() {
|
|
29
|
-
return this._form?.value;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public patchForm(value: any) {
|
|
33
|
-
this._form?.patchValue(value);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public resetForm() {
|
|
37
|
-
this._form?.reset();
|
|
38
|
-
this._form?.updateValueAndValidity({ onlySelf: false, emitEvent: true });
|
|
39
|
-
this.subscriptions.forEach((subscription: Subscription) => {
|
|
40
|
-
subscription.unsubscribe();
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
this._form = null!;
|
|
44
|
-
this._formTemplate = null!;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
public generateForm(formTemplate: OnshoreFormTemplateItem[]): FormGroup | null {
|
|
48
|
-
this._formTemplate = formTemplate;
|
|
49
|
-
this._form = new FormGroup({}, {updateOn: 'change'});
|
|
50
|
-
this._form = this.iterateNestedForm(this._form, formTemplate);
|
|
51
|
-
return this._form;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public formTemplate(name: string, formTemplate: OnshoreFormTemplateItem[] = this._formTemplate): OnshoreFormTemplateItem {
|
|
55
|
-
let template: OnshoreFormTemplateItem;
|
|
56
|
-
|
|
57
|
-
if(formTemplate) {
|
|
58
|
-
for(let i = 0; i < formTemplate?.length; i++) {
|
|
59
|
-
const item = formTemplate[i];
|
|
60
|
-
if(item.name === name) {
|
|
61
|
-
template = item;
|
|
62
|
-
i = formTemplate.length;
|
|
63
|
-
}else if(item.subformArray) {
|
|
64
|
-
const arrayTemplate = this.formTemplate(name, item.subformArray);
|
|
65
|
-
if(arrayTemplate) template = arrayTemplate;
|
|
66
|
-
}else if(item.subformObject) {
|
|
67
|
-
const objectTemplate = this.formTemplate(name, item.subformObject);
|
|
68
|
-
if(objectTemplate) template = objectTemplate;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return template!;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public formControl(name: string, formGroup: FormGroup | null = this._form): FormControl {
|
|
77
|
-
return formGroup?.get(name) as FormControl;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
public formArray(name: string): FormArray {
|
|
81
|
-
return this._form?.get(name) as FormArray;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
public formGroup(form: FormGroup, name: string): FormGroup {
|
|
85
|
-
return form.get(name) as FormGroup;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
public addFormArrayItem(name: string, item: OnshoreFormTemplateItem) {
|
|
89
|
-
let formControls = <any>{};
|
|
90
|
-
|
|
91
|
-
if(item) {
|
|
92
|
-
item.subformArray?.forEach((subitem: OnshoreFormTemplateItem) => {
|
|
93
|
-
formControls[subitem.name] = new FormControl(subitem.default !== undefined ? subitem.default : '', {
|
|
94
|
-
validators: subitem.validators || [],
|
|
95
|
-
updateOn: 'change'
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const formGroup = new FormGroup(formControls);
|
|
101
|
-
formGroup.setParent(this.formArray(name));
|
|
102
|
-
|
|
103
|
-
this.formArray(name).push(formGroup);
|
|
104
|
-
|
|
105
|
-
this.subscribeNestedFormGroup(formGroup);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public removeFormArrayItem(form: FormArray, index: number) {
|
|
109
|
-
form.removeAt(index);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
public setFormValidations(validations: OnshoreFormValidationItem[] = []) {
|
|
113
|
-
this._formValidations = validations;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
public enable() {
|
|
117
|
-
setTimeout(() => {
|
|
118
|
-
this._form?.enable({onlySelf: true, emitEvent: false});
|
|
119
|
-
}, 100);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
public disable() {
|
|
123
|
-
setTimeout(() => {
|
|
124
|
-
this._form?.disable({onlySelf: true, emitEvent: false});
|
|
125
|
-
}, 100);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
public setError(control: string, error: Object) {
|
|
129
|
-
this.formControl(control).setErrors(error);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
public setLoader(loaders$: Subject<boolean>[]) {
|
|
133
|
-
loaders$.forEach($loader => {
|
|
134
|
-
this.subscriptions.push($loader.subscribe(isLoading => {
|
|
135
|
-
isLoading ? this.disable() : this.enable();
|
|
136
|
-
this.isLoading$.next(isLoading);
|
|
137
|
-
}));
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
iterateNestedForm(form: FormGroup, formTemplate: OnshoreFormTemplateItem[]): any {
|
|
142
|
-
formTemplate.forEach((item: OnshoreFormTemplateItem) => {
|
|
143
|
-
if(item.type === OnshoreFormTemplateType.subform) {
|
|
144
|
-
if(item.subformArray) {
|
|
145
|
-
form.controls[item.name] = new FormArray([]);
|
|
146
|
-
form.controls[item.name].setParent(form);
|
|
147
|
-
}
|
|
148
|
-
if(item.subformObject) {
|
|
149
|
-
form.controls[item.name] = new FormGroup({});
|
|
150
|
-
form.controls[item.name] = this.iterateNestedForm(form.controls[item.name] as FormGroup, item.subformObject) as FormGroup;
|
|
151
|
-
this.subscribeNestedFormGroup(form.controls[item.name] as FormGroup);
|
|
152
|
-
}
|
|
153
|
-
} else {
|
|
154
|
-
form.addControl(item.name, new FormControl(item.default !== undefined ? item.default : '', {
|
|
155
|
-
validators: item.validators || [],
|
|
156
|
-
updateOn: 'change'
|
|
157
|
-
}));
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
return form;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
subscribeNestedFormGroup(nestedFormItem: FormGroup) {
|
|
164
|
-
this.subscriptions.push(nestedFormItem.valueChanges.subscribe(() => {
|
|
165
|
-
this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
|
|
166
|
-
}));
|
|
167
|
-
this.subscriptions.push(nestedFormItem.statusChanges.subscribe(() => {
|
|
168
|
-
this.form?.updateValueAndValidity({ onlySelf: true, emitEvent: false });
|
|
169
|
-
}));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
}
|
package/src/test.ts
DELETED
|
@@ -1,27 +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: {
|
|
12
|
-
context(path: string, deep?: boolean, filter?: RegExp): {
|
|
13
|
-
<T>(id: string): T;
|
|
14
|
-
keys(): string[];
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// First, initialize the Angular testing environment.
|
|
19
|
-
getTestBed().initTestEnvironment(
|
|
20
|
-
BrowserDynamicTestingModule,
|
|
21
|
-
platformBrowserDynamicTesting(),
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
// Then we find all the tests.
|
|
25
|
-
const context = require.context('./', true, /\.spec\.ts$/);
|
|
26
|
-
// And load the modules.
|
|
27
|
-
context.keys().forEach(context);
|
package/styles/css/main.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import"~primeng/resources/themes/saga-blue/theme.css";@import"~primeng/resources/primeng.min.css";@import"~primeflex/primeflex.min.css";@import"~primeicons/primeicons.css"
|
package/styles/css/theme1.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import"~primeng/resources/themes/saga-blue/theme.css";@import"~primeng/resources/primeng.min.css";@import"~primeflex/primeflex.min.css";@import"~primeicons/primeicons.css";:root{--color-light: #ffffff;--color-dark: #000000;--color-primary: #24C875;--color-secondary: #20A6FC}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
"strictNullChecks": false,
|
|
10
|
-
"types": [],
|
|
11
|
-
"paths": {
|
|
12
|
-
"onshore-forms": [
|
|
13
|
-
"dist/onshore-forms"
|
|
14
|
-
],
|
|
15
|
-
"onshore-forms/*": [
|
|
16
|
-
"dist/onshore-forms/*"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"exclude": [
|
|
21
|
-
"src/test.ts",
|
|
22
|
-
"**/*.spec.ts"
|
|
23
|
-
]
|
|
24
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
"strictNullChecks": false,
|
|
7
|
-
"paths": {
|
|
8
|
-
"onshore-forms": [
|
|
9
|
-
"src/lib/onshore-forms"
|
|
10
|
-
],
|
|
11
|
-
"onshore-forms/*": [
|
|
12
|
-
"src/lib/onshore-forms/*"
|
|
13
|
-
]
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"angularCompilerOptions": {
|
|
17
|
-
"compilationMode": "partial",
|
|
18
|
-
"strictTemplates": false
|
|
19
|
-
}
|
|
20
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
"files": [
|
|
11
|
-
"src/test.ts"
|
|
12
|
-
],
|
|
13
|
-
"include": [
|
|
14
|
-
"**/*.spec.ts",
|
|
15
|
-
"**/*.d.ts"
|
|
16
|
-
]
|
|
17
|
-
}
|