tin-spa 2.1.1 → 2.1.2
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/classes/Classes.mjs +1 -1
- package/esm2020/lib/classes/TinCore.mjs +18 -4
- package/esm2020/lib/components/form/form.component.mjs +3 -3
- package/esm2020/lib/components/text/text.component.mjs +4 -1
- package/esm2020/lib/modules/spa-admin.module.mjs +5 -7
- package/esm2020/lib/modules/spa-index.module.mjs +5 -7
- package/esm2020/lib/modules/spa-user.module.mjs +5 -7
- package/fesm2015/tin-spa.mjs +34 -23
- package/fesm2015/tin-spa.mjs.map +1 -1
- package/fesm2020/tin-spa.mjs +34 -23
- package/fesm2020/tin-spa.mjs.map +1 -1
- package/lib/classes/Classes.d.ts +1 -1
- package/lib/classes/TinCore.d.ts +1 -0
- package/lib/modules/spa-admin.module.d.ts +1 -1
- package/lib/modules/spa-index.module.d.ts +1 -1
- package/lib/modules/spa-user.module.d.ts +1 -1
- package/package.json +1 -1
|
@@ -12,19 +12,18 @@ SpaUserModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
|
12
12
|
SpaUserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SpaUserModule, declarations: [ChangePasswordComponent, ProfileComponent], imports: [i1.ReactiveFormsModule, CommonModule,
|
|
13
13
|
FormsModule,
|
|
14
14
|
ReactiveFormsModule,
|
|
15
|
-
// SpaMatModule,
|
|
16
15
|
TinSpaModule], exports: [CommonModule,
|
|
17
16
|
FormsModule,
|
|
18
|
-
|
|
17
|
+
TinSpaModule,
|
|
19
18
|
ChangePasswordComponent,
|
|
20
19
|
ProfileComponent] });
|
|
21
20
|
SpaUserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaUserModule, imports: [ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
|
|
22
21
|
CommonModule,
|
|
23
22
|
FormsModule,
|
|
24
23
|
ReactiveFormsModule,
|
|
25
|
-
// SpaMatModule,
|
|
26
24
|
TinSpaModule, CommonModule,
|
|
27
|
-
FormsModule
|
|
25
|
+
FormsModule,
|
|
26
|
+
TinSpaModule] });
|
|
28
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaUserModule, decorators: [{
|
|
29
28
|
type: NgModule,
|
|
30
29
|
args: [{
|
|
@@ -34,16 +33,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
34
33
|
CommonModule,
|
|
35
34
|
FormsModule,
|
|
36
35
|
ReactiveFormsModule,
|
|
37
|
-
// SpaMatModule,
|
|
38
36
|
TinSpaModule
|
|
39
37
|
],
|
|
40
38
|
exports: [
|
|
41
39
|
CommonModule,
|
|
42
40
|
FormsModule,
|
|
43
|
-
|
|
41
|
+
TinSpaModule,
|
|
44
42
|
ChangePasswordComponent,
|
|
45
43
|
ProfileComponent,
|
|
46
44
|
],
|
|
47
45
|
}]
|
|
48
46
|
}] });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhLXVzZXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdGluLXNwYS9zcmMvbGliL21vZHVsZXMvc3BhLXVzZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxXQUFXLEVBQUUsbUJBQW1CLEVBQUUsT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XHJcbiAgICBGb3Jtc01vZHVsZSxcclxuICAgIFRpblNwYU1vZHVsZSxcclxuICAgIENoYW5nZVBhc3N3b3JkQ29tcG9uZW50LFxyXG4gICAgUHJvZmlsZUNvbXBvbmVudCxcclxuICBdLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgU3BhVXNlck1vZHVsZSB7fVxyXG4iXX0=
|
package/fesm2015/tin-spa.mjs
CHANGED
|
@@ -196,22 +196,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
196
196
|
}], ctorParameters: function () { return []; } });
|
|
197
197
|
|
|
198
198
|
class Core {
|
|
199
|
+
static camelToWords(value) {
|
|
200
|
+
if (!value)
|
|
201
|
+
return value;
|
|
202
|
+
if (typeof value !== 'string')
|
|
203
|
+
return value;
|
|
204
|
+
if (value.length == 0)
|
|
205
|
+
return value;
|
|
206
|
+
let v = value.charAt(0).toUpperCase() + value.substring(1);
|
|
207
|
+
return v.replace(/([A-Z]+)*([A-Z][a-z])/g, "$1 $2");
|
|
208
|
+
}
|
|
199
209
|
static generateObject(fields) {
|
|
200
210
|
let data = {};
|
|
201
211
|
fields.forEach(field => {
|
|
202
|
-
|
|
212
|
+
if (field.type != 'section' && field.type != 'blank') {
|
|
213
|
+
data[field.name] = this.getInitialValue(field);
|
|
214
|
+
}
|
|
203
215
|
});
|
|
204
216
|
return data;
|
|
205
217
|
}
|
|
206
218
|
static resetObject(fields, data) {
|
|
207
219
|
fields.forEach(field => {
|
|
208
|
-
|
|
220
|
+
if (field.type != 'section' && field.type != 'blank') {
|
|
221
|
+
data[field.name] = this.getInitialValue(field);
|
|
222
|
+
}
|
|
209
223
|
});
|
|
210
224
|
}
|
|
211
225
|
static validateObject(fields, data) {
|
|
212
226
|
console.log("Validations");
|
|
213
227
|
for (let field of fields) {
|
|
214
|
-
let name = field.name;
|
|
228
|
+
let name = this.camelToWords(field.name);
|
|
215
229
|
let d = data[field.name];
|
|
216
230
|
console.log(name);
|
|
217
231
|
if (field.required) {
|
|
@@ -1106,6 +1120,9 @@ class TextComponent {
|
|
|
1106
1120
|
this.control = new FormControl(this.value, [Validators.required, Validators.minLength(this.min), Validators.maxLength(this.max), Validators.pattern(this.regex)]);
|
|
1107
1121
|
}
|
|
1108
1122
|
ngOnInit() {
|
|
1123
|
+
if (!this.options) {
|
|
1124
|
+
this.options = [];
|
|
1125
|
+
}
|
|
1109
1126
|
if (this.options.length > 0) {
|
|
1110
1127
|
this.initFilter();
|
|
1111
1128
|
}
|
|
@@ -2494,10 +2511,10 @@ class FormComponent {
|
|
|
2494
2511
|
}
|
|
2495
2512
|
}
|
|
2496
2513
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormComponent, deps: [{ token: MessageService }, { token: DataServiceLib }], target: i0.ɵɵFactoryTarget.Component });
|
|
2497
|
-
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormComponent, selector: "spa-form", inputs: { data: "data", config: "config" }, outputs: { buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "\r\n<div [ngClass]=\"multiColumn ? 'tin-grid' : 'tin-col'\" >\r\n\r\n <div [ngClass]=\"field.span ? 'span-col' : ''\" *ngFor=\"let field of fields\">\r\n\r\n <ng-container [ngSwitch]=\"field.type\">\r\n\r\n <spa-text *ngSwitchCase=\"'text'\" [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n <spa-number *ngSwitchCase=\"'number'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-number>\r\n\r\n <spa-money *ngSwitchCase=\"'money'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-money>\r\n\r\n <spa-check *ngSwitchCase=\"'checkbox'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\"></spa-check>\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [min]=\"field?.min\" [max]=\"field?.max\" [readonly]=\"config.mode =='view'\" ></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" >\r\n </spa-select>\r\n\r\n <spa-select *ngSwitchCase=\"'multi-select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" [multiple]=\"true\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"span-col-center\" *ngIf=\"config.button\">\r\n <button mat-raised-button color=\"primary\" [disabled]=\"isProcessing\" (click)=\"buttonClicked()\" cdkFocusInitial>{{buttonDisplay}}</button>\r\n </div>\r\n\r\n\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: DateComponent, selector: "spa-date", inputs: ["required", "min", "max", "readonly", "hint", "value", "display", "placeholder", "width"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "optionValue", "optionDisplay", "optionDisplayExtra"], outputs: ["valueChange"] }, { kind: "component", type: MoneyComponent, selector: "spa-money", inputs: ["readonly", "hint", "display", "placeholder", "value", "width", "currency", "required", "min", "max"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: NumberComponent, selector: "spa-number", inputs: ["readonly", "hint", "display", "placeholder", "value", "width", "required", "min", "max", "step"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
|
|
2514
|
+
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormComponent, selector: "spa-form", inputs: { data: "data", config: "config" }, outputs: { buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "\r\n<div [ngClass]=\"multiColumn ? 'tin-grid' : 'tin-col'\" >\r\n\r\n <div [ngClass]=\"field.span || field.type =='section' ? 'span-col' : ''\" *ngFor=\"let field of fields\">\r\n\r\n <ng-container [ngSwitch]=\"field.type\">\r\n\r\n <div *ngSwitchCase=\"'section'\" class=\"title\">\r\n <label style=\"font-size: larger;\">{{field.name | camelToWords}}</label>\r\n </div>\r\n\r\n <label *ngSwitchCase=\"'blank'\">.</label>\r\n\r\n <spa-text *ngSwitchCase=\"'text'\" [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n <spa-number *ngSwitchCase=\"'number'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-number>\r\n\r\n <spa-money *ngSwitchCase=\"'money'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-money>\r\n\r\n <spa-check *ngSwitchCase=\"'checkbox'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\"></spa-check>\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [min]=\"field?.min\" [max]=\"field?.max\" [readonly]=\"config.mode =='view'\" ></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" >\r\n </spa-select>\r\n\r\n <spa-select *ngSwitchCase=\"'multi-select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" [multiple]=\"true\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"span-col-center\" *ngIf=\"config.button\">\r\n <button mat-raised-button color=\"primary\" [disabled]=\"isProcessing\" (click)=\"buttonClicked()\" cdkFocusInitial>{{buttonDisplay}}</button>\r\n </div>\r\n\r\n\r\n</div>\r\n", styles: [".title{margin-top:1em;font-size:larger;font-weight:300}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: TextComponent, selector: "spa-text", inputs: ["readonly", "hint", "display", "placeholder", "value", "format", "type", "rows", "width", "options", "optionValue", "required", "min", "max", "regex"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: CheckComponent, selector: "spa-check", inputs: ["readonly", "display", "value"], outputs: ["valueChange", "click", "check", "uncheck"] }, { kind: "component", type: DateComponent, selector: "spa-date", inputs: ["required", "min", "max", "readonly", "hint", "value", "display", "placeholder", "width"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "spa-select", inputs: ["width", "readonly", "readonlyMode", "hint", "placeholder", "multiple", "display", "value", "options", "optionValue", "optionDisplay", "optionDisplayExtra"], outputs: ["valueChange"] }, { kind: "component", type: MoneyComponent, selector: "spa-money", inputs: ["readonly", "hint", "display", "placeholder", "value", "width", "currency", "required", "min", "max"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "component", type: NumberComponent, selector: "spa-number", inputs: ["readonly", "hint", "display", "placeholder", "value", "width", "required", "min", "max", "step"], outputs: ["valueChange", "leave", "enterPress"] }, { kind: "pipe", type: CamelToWordsPipe, name: "camelToWords" }] });
|
|
2498
2515
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormComponent, decorators: [{
|
|
2499
2516
|
type: Component,
|
|
2500
|
-
args: [{ selector: 'spa-form', template: "\r\n<div [ngClass]=\"multiColumn ? 'tin-grid' : 'tin-col'\" >\r\n\r\n <div [ngClass]=\"field.span ? 'span-col' : ''\" *ngFor=\"let field of fields\">\r\n\r\n <ng-container [ngSwitch]=\"field.type\">\r\n\r\n <spa-text *ngSwitchCase=\"'text'\" [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n <spa-number *ngSwitchCase=\"'number'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-number>\r\n\r\n <spa-money *ngSwitchCase=\"'money'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-money>\r\n\r\n <spa-check *ngSwitchCase=\"'checkbox'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\"></spa-check>\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [min]=\"field?.min\" [max]=\"field?.max\" [readonly]=\"config.mode =='view'\" ></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" >\r\n </spa-select>\r\n\r\n <spa-select *ngSwitchCase=\"'multi-select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" [multiple]=\"true\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"span-col-center\" *ngIf=\"config.button\">\r\n <button mat-raised-button color=\"primary\" [disabled]=\"isProcessing\" (click)=\"buttonClicked()\" cdkFocusInitial>{{buttonDisplay}}</button>\r\n </div>\r\n\r\n\r\n</div>\r\n" }]
|
|
2517
|
+
args: [{ selector: 'spa-form', template: "\r\n<div [ngClass]=\"multiColumn ? 'tin-grid' : 'tin-col'\" >\r\n\r\n <div [ngClass]=\"field.span || field.type =='section' ? 'span-col' : ''\" *ngFor=\"let field of fields\">\r\n\r\n <ng-container [ngSwitch]=\"field.type\">\r\n\r\n <div *ngSwitchCase=\"'section'\" class=\"title\">\r\n <label style=\"font-size: larger;\">{{field.name | camelToWords}}</label>\r\n </div>\r\n\r\n <label *ngSwitchCase=\"'blank'\">.</label>\r\n\r\n <spa-text *ngSwitchCase=\"'text'\" [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n <spa-number *ngSwitchCase=\"'number'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-number>\r\n\r\n <spa-money *ngSwitchCase=\"'money'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-money>\r\n\r\n <spa-check *ngSwitchCase=\"'checkbox'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\"></spa-check>\r\n\r\n <spa-date *ngSwitchCase=\"'date'\" [display]=\"field.name | camelToWords\" [(value)]=\"data[field.name]\" [min]=\"field?.min\" [max]=\"field?.max\" [readonly]=\"config.mode =='view'\" ></spa-date>\r\n\r\n <spa-select *ngSwitchCase=\"'select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" >\r\n </spa-select>\r\n\r\n <spa-select *ngSwitchCase=\"'multi-select'\"\r\n [display]=\"field.name | camelToWords\"\r\n [options]=\"field.options\" [optionDisplay]=\"field.optionDisplay\" [optionValue]=\"field.optionValue\" [(value)]=\"data[field.name]\" [readonly]=\"config.mode =='view'\" [multiple]=\"true\">\r\n </spa-select>\r\n\r\n <spa-text *ngSwitchDefault [display]=\"field.name | camelToWords\" [options]=\"field.options\" [optionValue]=\"field.optionValue\" [rows]=\"field.rows\" [(value)]=\"data[field.name]\" [required]=\"field.required\" [min]=\"field.min\" [max]=\"field.max\" [readonly]=\"config.mode =='view'\"></spa-text>\r\n\r\n </ng-container>\r\n\r\n </div>\r\n\r\n\r\n <div class=\"span-col-center\" *ngIf=\"config.button\">\r\n <button mat-raised-button color=\"primary\" [disabled]=\"isProcessing\" (click)=\"buttonClicked()\" cdkFocusInitial>{{buttonDisplay}}</button>\r\n </div>\r\n\r\n\r\n</div>\r\n", styles: [".title{margin-top:1em;font-size:larger;font-weight:300}\n"] }]
|
|
2501
2518
|
}], ctorParameters: function () { return [{ type: MessageService }, { type: DataServiceLib }]; }, propDecorators: { data: [{
|
|
2502
2519
|
type: Input
|
|
2503
2520
|
}], config: [{
|
|
@@ -3228,10 +3245,9 @@ SpaIndexModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
3228
3245
|
SpaIndexModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SpaIndexModule, declarations: [LoginComponent, SignupComponent, RecoverAccountComponent], imports: [i2.ReactiveFormsModule, CommonModule,
|
|
3229
3246
|
FormsModule,
|
|
3230
3247
|
ReactiveFormsModule,
|
|
3231
|
-
// SpaMatModule,
|
|
3232
3248
|
TinSpaModule], exports: [CommonModule,
|
|
3233
3249
|
FormsModule,
|
|
3234
|
-
|
|
3250
|
+
TinSpaModule,
|
|
3235
3251
|
LoginComponent,
|
|
3236
3252
|
SignupComponent,
|
|
3237
3253
|
RecoverAccountComponent] });
|
|
@@ -3239,9 +3255,9 @@ SpaIndexModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
3239
3255
|
CommonModule,
|
|
3240
3256
|
FormsModule,
|
|
3241
3257
|
ReactiveFormsModule,
|
|
3242
|
-
// SpaMatModule,
|
|
3243
3258
|
TinSpaModule, CommonModule,
|
|
3244
|
-
FormsModule
|
|
3259
|
+
FormsModule,
|
|
3260
|
+
TinSpaModule] });
|
|
3245
3261
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaIndexModule, decorators: [{
|
|
3246
3262
|
type: NgModule,
|
|
3247
3263
|
args: [{
|
|
@@ -3251,13 +3267,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3251
3267
|
CommonModule,
|
|
3252
3268
|
FormsModule,
|
|
3253
3269
|
ReactiveFormsModule,
|
|
3254
|
-
// SpaMatModule,
|
|
3255
3270
|
TinSpaModule
|
|
3256
3271
|
],
|
|
3257
3272
|
exports: [
|
|
3258
3273
|
CommonModule,
|
|
3259
3274
|
FormsModule,
|
|
3260
|
-
|
|
3275
|
+
TinSpaModule,
|
|
3261
3276
|
LoginComponent,
|
|
3262
3277
|
SignupComponent,
|
|
3263
3278
|
RecoverAccountComponent,
|
|
@@ -3433,19 +3448,18 @@ SpaUserModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
|
3433
3448
|
SpaUserModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SpaUserModule, declarations: [ChangePasswordComponent, ProfileComponent], imports: [i2.ReactiveFormsModule, CommonModule,
|
|
3434
3449
|
FormsModule,
|
|
3435
3450
|
ReactiveFormsModule,
|
|
3436
|
-
// SpaMatModule,
|
|
3437
3451
|
TinSpaModule], exports: [CommonModule,
|
|
3438
3452
|
FormsModule,
|
|
3439
|
-
|
|
3453
|
+
TinSpaModule,
|
|
3440
3454
|
ChangePasswordComponent,
|
|
3441
3455
|
ProfileComponent] });
|
|
3442
3456
|
SpaUserModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaUserModule, imports: [ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: "never" }),
|
|
3443
3457
|
CommonModule,
|
|
3444
3458
|
FormsModule,
|
|
3445
3459
|
ReactiveFormsModule,
|
|
3446
|
-
// SpaMatModule,
|
|
3447
3460
|
TinSpaModule, CommonModule,
|
|
3448
|
-
FormsModule
|
|
3461
|
+
FormsModule,
|
|
3462
|
+
TinSpaModule] });
|
|
3449
3463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaUserModule, decorators: [{
|
|
3450
3464
|
type: NgModule,
|
|
3451
3465
|
args: [{
|
|
@@ -3455,13 +3469,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3455
3469
|
CommonModule,
|
|
3456
3470
|
FormsModule,
|
|
3457
3471
|
ReactiveFormsModule,
|
|
3458
|
-
// SpaMatModule,
|
|
3459
3472
|
TinSpaModule
|
|
3460
3473
|
],
|
|
3461
3474
|
exports: [
|
|
3462
3475
|
CommonModule,
|
|
3463
3476
|
FormsModule,
|
|
3464
|
-
|
|
3477
|
+
TinSpaModule,
|
|
3465
3478
|
ChangePasswordComponent,
|
|
3466
3479
|
ProfileComponent,
|
|
3467
3480
|
],
|
|
@@ -3844,10 +3857,9 @@ SpaAdminModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
3844
3857
|
SettingsComponent], imports: [i2.ReactiveFormsModule, CommonModule,
|
|
3845
3858
|
FormsModule,
|
|
3846
3859
|
ReactiveFormsModule,
|
|
3847
|
-
// SpaMatModule,
|
|
3848
3860
|
TinSpaModule], exports: [CommonModule,
|
|
3849
3861
|
FormsModule,
|
|
3850
|
-
|
|
3862
|
+
TinSpaModule,
|
|
3851
3863
|
UsersComponent,
|
|
3852
3864
|
RolesComponent,
|
|
3853
3865
|
addRoleDialog,
|
|
@@ -3858,9 +3870,9 @@ SpaAdminModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
3858
3870
|
CommonModule,
|
|
3859
3871
|
FormsModule,
|
|
3860
3872
|
ReactiveFormsModule,
|
|
3861
|
-
// SpaMatModule,
|
|
3862
3873
|
TinSpaModule, CommonModule,
|
|
3863
|
-
FormsModule
|
|
3874
|
+
FormsModule,
|
|
3875
|
+
TinSpaModule] });
|
|
3864
3876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpaAdminModule, decorators: [{
|
|
3865
3877
|
type: NgModule,
|
|
3866
3878
|
args: [{
|
|
@@ -3877,13 +3889,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3877
3889
|
CommonModule,
|
|
3878
3890
|
FormsModule,
|
|
3879
3891
|
ReactiveFormsModule,
|
|
3880
|
-
// SpaMatModule,
|
|
3881
3892
|
TinSpaModule
|
|
3882
3893
|
],
|
|
3883
3894
|
exports: [
|
|
3884
3895
|
CommonModule,
|
|
3885
3896
|
FormsModule,
|
|
3886
|
-
|
|
3897
|
+
TinSpaModule,
|
|
3887
3898
|
UsersComponent,
|
|
3888
3899
|
RolesComponent,
|
|
3889
3900
|
addRoleDialog,
|