@yomotech/view-toolkit 0.0.32 → 0.0.33
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/fesm2022/yomotech-view-toolkit.mjs +3591 -0
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -0
- package/package.json +49 -38
- package/types/yomotech-view-toolkit.d.ts +648 -0
- package/ng-package.json +0 -7
- package/src/lib/app-version.ts +0 -2
- package/src/lib/components/autocomplete/autocomplete.css +0 -0
- package/src/lib/components/autocomplete/autocomplete.html +0 -23
- package/src/lib/components/autocomplete/autocomplete.ts +0 -71
- package/src/lib/components/button/button.css +0 -0
- package/src/lib/components/button/button.html +0 -1
- package/src/lib/components/button/button.ts +0 -11
- package/src/lib/components/date/date.css +0 -0
- package/src/lib/components/date/date.html +0 -1
- package/src/lib/components/date/date.ts +0 -11
- package/src/lib/components/dropdown/dropdown.css +0 -0
- package/src/lib/components/dropdown/dropdown.html +0 -1
- package/src/lib/components/dropdown/dropdown.ts +0 -11
- package/src/lib/components/error-message/error-message.css +0 -0
- package/src/lib/components/error-message/error-message.html +0 -1
- package/src/lib/components/error-message/error-message.ts +0 -11
- package/src/lib/components/label/label.css +0 -0
- package/src/lib/components/label/label.html +0 -7
- package/src/lib/components/label/label.ts +0 -33
- package/src/lib/components/string/string.css +0 -0
- package/src/lib/components/string/string.html +0 -4
- package/src/lib/components/string/string.ts +0 -22
- package/src/lib/components/textbox/textbox.css +0 -0
- package/src/lib/components/textbox/textbox.html +0 -7
- package/src/lib/components/textbox/textbox.ts +0 -33
- package/src/lib/components/time/time.css +0 -0
- package/src/lib/components/time/time.html +0 -1
- package/src/lib/components/time/time.ts +0 -11
- package/src/lib/containers/card/card.component.css +0 -0
- package/src/lib/containers/card/card.component.html +0 -450
- package/src/lib/containers/card/card.component.ts +0 -474
- package/src/lib/containers/form/form.component.css +0 -101
- package/src/lib/containers/form/form.component.html +0 -305
- package/src/lib/containers/form/form.component.ts +0 -333
- package/src/lib/containers/grid/grid.component.css +0 -0
- package/src/lib/containers/grid/grid.component.html +0 -212
- package/src/lib/containers/grid/grid.component.ts +0 -228
- package/src/lib/containers/header-menu/header-menu.component.css +0 -0
- package/src/lib/containers/header-menu/header-menu.component.html +0 -72
- package/src/lib/containers/header-menu/header-menu.component.ts +0 -105
- package/src/lib/containers/logs/logs.component.css +0 -160
- package/src/lib/containers/logs/logs.component.html +0 -89
- package/src/lib/containers/logs/logs.component.ts +0 -29
- package/src/lib/containers/model/model.component.css +0 -0
- package/src/lib/containers/model/model.component.html +0 -351
- package/src/lib/containers/model/model.component.ts +0 -436
- package/src/lib/containers/pagination/pagination.component.css +0 -0
- package/src/lib/containers/pagination/pagination.component.html +0 -41
- package/src/lib/containers/pagination/pagination.component.ts +0 -100
- package/src/lib/containers/side-menu/side-menu.component.css +0 -173
- package/src/lib/containers/side-menu/side-menu.component.html +0 -126
- package/src/lib/containers/side-menu/side-menu.component.ts +0 -458
- package/src/lib/services/app-version-reset.service.ts +0 -59
- package/src/lib/services/config.service.ts +0 -144
- package/src/lib/services/couchdb.ts +0 -275
- package/src/lib/services/mobile-keycloak.service.ts +0 -116
- package/src/lib/services/network-log.service.ts +0 -27
- package/src/lib/services/notification.service.ts +0 -26
- package/src/lib/services/request.service.ts +0 -125
- package/src/lib/services/utility.service.ts +0 -600
- package/src/lib/view-toolkit.module.ts +0 -57
- package/src/lib/view-toolkit.spec.ts +0 -23
- package/src/lib/view-toolkit.ts +0 -15
- package/src/public-api.ts +0 -25
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<p-autoComplete #autocompleteField="ngModel" [required]="formField.option.required" [name]="formField.scope?.reference"
|
|
2
|
-
inputmode
|
|
3
|
-
[(ngModel)]="modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value"
|
|
4
|
-
[style]="getStyleWithoutClasses(formField?.scope?.style).style" [class]="formField?.scope?.style?.classes[0]"
|
|
5
|
-
[suggestions]="matchData" [dropdown]="true"
|
|
6
|
-
[placeholder]="modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder"
|
|
7
|
-
(completeMethod)="autocompChangeEvent($event, formField)" (onSelect)="autocompSelectEvent($event, formField)"
|
|
8
|
-
(onBlur)="autocompFocusOutEvent($event, formField)"
|
|
9
|
-
[attr.inputmode]="formField.option.keyboard === 'numeric' ? 'numeric' : null">
|
|
10
|
-
</p-autoComplete>
|
|
11
|
-
|
|
12
|
-
<!-- Error Message -->
|
|
13
|
-
<div *ngIf="autocompleteField?.touched && autocompleteField?.invalid"
|
|
14
|
-
[style]="getStyleWithoutClasses(formField?.validation?.style).style">
|
|
15
|
-
<p class="text-danger" *ngIf="autocompleteField?.errors?.['required']">
|
|
16
|
-
{{setErroMessage(formField, errorMessages, "required")}}</p>
|
|
17
|
-
<p class="text-danger" *ngIf="autocompleteField?.errors?.['email']">
|
|
18
|
-
{{(formField.label?.value ?
|
|
19
|
-
formField.label?.value :
|
|
20
|
-
modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption)
|
|
21
|
-
+
|
|
22
|
-
' ' + errorMessages.pattern}}</p>
|
|
23
|
-
</div>
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { NgIf } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
3
|
-
import { FormsModule } from '@angular/forms';
|
|
4
|
-
import { AutoCompleteModule } from 'primeng/autocomplete';
|
|
5
|
-
import { SelectModule } from 'primeng/select';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'vl-autocomplete',
|
|
9
|
-
standalone: true,
|
|
10
|
-
imports: [
|
|
11
|
-
FormsModule,
|
|
12
|
-
AutoCompleteModule,
|
|
13
|
-
SelectModule,
|
|
14
|
-
NgIf
|
|
15
|
-
],
|
|
16
|
-
templateUrl: './autocomplete.html',
|
|
17
|
-
styleUrl: './autocomplete.css',
|
|
18
|
-
})
|
|
19
|
-
export class Autocomplete {
|
|
20
|
-
@Input() formField: any;
|
|
21
|
-
@Input() modalItemInfo: any;
|
|
22
|
-
@Input() matchData: any;
|
|
23
|
-
@Input() selectedLanguageInfo: any;
|
|
24
|
-
@Input() errorMessages: any;
|
|
25
|
-
@Output() autocompSelect: EventEmitter<any> = new EventEmitter();
|
|
26
|
-
@Output() autocompChange: EventEmitter<any> = new EventEmitter();
|
|
27
|
-
@Output() autocompFocusOut: EventEmitter<any> = new EventEmitter();
|
|
28
|
-
|
|
29
|
-
autocompSelectEvent(event: any, formField: any) {
|
|
30
|
-
this.autocompSelect.emit({ event: event, formField: formField });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
autocompChangeEvent(event: any, formField: any) {
|
|
34
|
-
this.autocompChange.emit({ event: event, formField: formField });
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
autocompFocusOutEvent(event: any, formField: any) {
|
|
38
|
-
this.autocompFocusOut.emit({ event: event, formField: formField });
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
getScope(scope: any) {
|
|
42
|
-
let propertyScope = "";
|
|
43
|
-
let start = scope?.indexOf("#/") + 2;
|
|
44
|
-
let end = scope?.indexOf("/", start);
|
|
45
|
-
if (start && end) {
|
|
46
|
-
propertyScope = scope.substring(start, end);
|
|
47
|
-
}
|
|
48
|
-
return propertyScope;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
getStyleWithoutClasses(styleObject: any) {
|
|
52
|
-
if (!styleObject) {
|
|
53
|
-
return { classes: '', style: {} };
|
|
54
|
-
}
|
|
55
|
-
const { classes, ...styleWithoutClasses } = styleObject;
|
|
56
|
-
return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
setErroMessage(formField: any, errorMessages: any, errorType: any) {
|
|
60
|
-
let error: any = "";
|
|
61
|
-
let fieldName: any = formField.label?.value ? formField.label?.value : formField.label?.caption ? formField.label?.caption : this.modalItemInfo.propertySchema[this.getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption;
|
|
62
|
-
if (errorType == "required") {
|
|
63
|
-
error = this.selectedLanguageInfo?.errorMessages?.required ? this.selectedLanguageInfo?.errorMessages.required : errorMessages.required
|
|
64
|
-
}
|
|
65
|
-
if (error && error.toString().includes("{{requiredLength}}")) {
|
|
66
|
-
error = error.replace(/{{\s*requiredLength\s*}}/g, formField?.minlength.toString());
|
|
67
|
-
}
|
|
68
|
-
return error.replace(/{{\s*field\s*}}/g, fieldName);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>button works!</p>
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>date works!</p>
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>dropdown works!</p>
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>error-message works!</p>
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<label [style]="getStyleWithoutClasses(formField?.label?.style).style" [class]="formField?.label?.style?.classes[0]">{{
|
|
2
|
-
formField.label?.value
|
|
3
|
-
?
|
|
4
|
-
formField.label?.value : formField.label?.caption ?
|
|
5
|
-
formField.label?.caption :
|
|
6
|
-
modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption
|
|
7
|
-
}}</label>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'vl-label',
|
|
5
|
-
standalone: true,
|
|
6
|
-
templateUrl: './label.html',
|
|
7
|
-
styleUrl: './label.css',
|
|
8
|
-
})
|
|
9
|
-
export class Label {
|
|
10
|
-
@Input() formField: any;
|
|
11
|
-
@Input() modalItemInfo: any;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
getScope(scope: any) {
|
|
15
|
-
let propertyScope = "";
|
|
16
|
-
let start = scope?.indexOf("#/") + 2;
|
|
17
|
-
let end = scope?.indexOf("/", start);
|
|
18
|
-
if (start && end) {
|
|
19
|
-
propertyScope = scope.substring(start, end);
|
|
20
|
-
}
|
|
21
|
-
return propertyScope;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
getStyleWithoutClasses(styleObject: any) {
|
|
25
|
-
if (!styleObject) {
|
|
26
|
-
return { classes: '', style: {} };
|
|
27
|
-
}
|
|
28
|
-
const { classes, ...styleWithoutClasses } = styleObject;
|
|
29
|
-
return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'vl-string',
|
|
5
|
-
standalone: true,
|
|
6
|
-
templateUrl: './string.html',
|
|
7
|
-
styleUrl: './string.css',
|
|
8
|
-
})
|
|
9
|
-
export class String {
|
|
10
|
-
@Input() formField: any;
|
|
11
|
-
@Input() modalItemInfo: any;
|
|
12
|
-
|
|
13
|
-
getScope(scope: any) {
|
|
14
|
-
let propertyScope = "";
|
|
15
|
-
let start = scope?.indexOf("#/") + 2;
|
|
16
|
-
let end = scope?.indexOf("/", start);
|
|
17
|
-
if (start && end) {
|
|
18
|
-
propertyScope = scope.substring(start, end);
|
|
19
|
-
}
|
|
20
|
-
return propertyScope;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<input pInputText type="text" #inputField="ngModel" [required]="formField.option?.required"
|
|
2
|
-
[email]="formField.option?.email" [disabled]="formField?.option?.disabled"
|
|
3
|
-
[readonly]="modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.readonly"
|
|
4
|
-
[style]="getStyleWithoutClasses(formField?.scope?.style).style" [class]="formField?.scope?.style?.classes[0]"
|
|
5
|
-
[(ngModel)]="modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()].value"
|
|
6
|
-
[name]="formField.scope?.reference"
|
|
7
|
-
[placeholder]="modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.placeholder" />
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { FormsModule } from '@angular/forms';
|
|
3
|
-
import { InputTextModule } from 'primeng/inputtext';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'vl-textbox',
|
|
7
|
-
standalone: true,
|
|
8
|
-
templateUrl: './textbox.html',
|
|
9
|
-
styleUrl: './textbox.css',
|
|
10
|
-
imports: [FormsModule, InputTextModule]
|
|
11
|
-
})
|
|
12
|
-
export class Textbox {
|
|
13
|
-
@Input() formField: any;
|
|
14
|
-
@Input() modalItemInfo: any;
|
|
15
|
-
|
|
16
|
-
getScope(scope: any) {
|
|
17
|
-
let propertyScope = "";
|
|
18
|
-
let start = scope?.indexOf("#/") + 2;
|
|
19
|
-
let end = scope?.indexOf("/", start);
|
|
20
|
-
if (start && end) {
|
|
21
|
-
propertyScope = scope.substring(start, end);
|
|
22
|
-
}
|
|
23
|
-
return propertyScope;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
getStyleWithoutClasses(styleObject: any) {
|
|
27
|
-
if (!styleObject) {
|
|
28
|
-
return { classes: '', style: {} };
|
|
29
|
-
}
|
|
30
|
-
const { classes, ...styleWithoutClasses } = styleObject;
|
|
31
|
-
return { classes: classes && classes.length > 0 ? classes[0] : '', style: styleWithoutClasses };
|
|
32
|
-
}
|
|
33
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<p>time works!</p>
|
|
File without changes
|