@yomotech/view-toolkit 0.0.31 → 0.0.32
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/ng-package.json +7 -0
- package/package.json +38 -49
- package/src/lib/app-version.ts +2 -0
- package/src/lib/components/autocomplete/autocomplete.css +0 -0
- package/src/lib/components/autocomplete/autocomplete.html +23 -0
- package/src/lib/components/autocomplete/autocomplete.ts +71 -0
- package/src/lib/components/button/button.css +0 -0
- package/src/lib/components/button/button.html +1 -0
- package/src/lib/components/button/button.ts +11 -0
- package/src/lib/components/date/date.css +0 -0
- package/src/lib/components/date/date.html +1 -0
- package/src/lib/components/date/date.ts +11 -0
- package/src/lib/components/dropdown/dropdown.css +0 -0
- package/src/lib/components/dropdown/dropdown.html +1 -0
- package/src/lib/components/dropdown/dropdown.ts +11 -0
- package/src/lib/components/error-message/error-message.css +0 -0
- package/src/lib/components/error-message/error-message.html +1 -0
- package/src/lib/components/error-message/error-message.ts +11 -0
- package/src/lib/components/label/label.css +0 -0
- package/src/lib/components/label/label.html +7 -0
- package/src/lib/components/label/label.ts +33 -0
- package/src/lib/components/string/string.css +0 -0
- package/src/lib/components/string/string.html +4 -0
- package/src/lib/components/string/string.ts +22 -0
- package/src/lib/components/textbox/textbox.css +0 -0
- package/src/lib/components/textbox/textbox.html +7 -0
- package/src/lib/components/textbox/textbox.ts +33 -0
- package/src/lib/components/time/time.css +0 -0
- package/src/lib/components/time/time.html +1 -0
- package/src/lib/components/time/time.ts +11 -0
- package/src/lib/containers/card/card.component.css +0 -0
- package/src/lib/containers/card/card.component.html +450 -0
- package/src/lib/containers/card/card.component.ts +474 -0
- package/src/lib/containers/form/form.component.css +101 -0
- package/src/lib/containers/form/form.component.html +305 -0
- package/src/lib/containers/form/form.component.ts +333 -0
- package/src/lib/containers/grid/grid.component.css +0 -0
- package/src/lib/containers/grid/grid.component.html +212 -0
- package/src/lib/containers/grid/grid.component.ts +228 -0
- package/src/lib/containers/header-menu/header-menu.component.css +0 -0
- package/src/lib/containers/header-menu/header-menu.component.html +72 -0
- package/src/lib/containers/header-menu/header-menu.component.ts +105 -0
- package/src/lib/containers/logs/logs.component.css +160 -0
- package/src/lib/containers/logs/logs.component.html +89 -0
- package/src/lib/containers/logs/logs.component.ts +29 -0
- package/src/lib/containers/model/model.component.css +0 -0
- package/src/lib/containers/model/model.component.html +351 -0
- package/src/lib/containers/model/model.component.ts +436 -0
- package/src/lib/containers/pagination/pagination.component.css +0 -0
- package/src/lib/containers/pagination/pagination.component.html +41 -0
- package/src/lib/containers/pagination/pagination.component.ts +100 -0
- package/src/lib/containers/side-menu/side-menu.component.css +173 -0
- package/src/lib/containers/side-menu/side-menu.component.html +126 -0
- package/src/lib/containers/side-menu/side-menu.component.ts +458 -0
- package/src/lib/services/app-version-reset.service.ts +59 -0
- package/src/lib/services/config.service.ts +144 -0
- package/src/lib/services/couchdb.ts +275 -0
- package/src/lib/services/mobile-keycloak.service.ts +116 -0
- package/src/lib/services/network-log.service.ts +27 -0
- package/src/lib/services/notification.service.ts +26 -0
- package/src/lib/services/request.service.ts +125 -0
- package/src/lib/services/utility.service.ts +600 -0
- package/src/lib/view-toolkit.module.ts +57 -0
- package/src/lib/view-toolkit.spec.ts +23 -0
- package/src/lib/view-toolkit.ts +15 -0
- package/src/public-api.ts +25 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +15 -0
- package/fesm2022/yomotech-view-toolkit.mjs +0 -3597
- package/fesm2022/yomotech-view-toolkit.mjs.map +0 -1
- package/types/yomotech-view-toolkit.d.ts +0 -648
package/ng-package.json
ADDED
package/package.json
CHANGED
|
@@ -1,50 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@yomotech/view-toolkit",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/animations": "^21.1.2",
|
|
6
|
-
"@angular/cdk": "^21.1.2",
|
|
7
|
-
"@angular/common": "^21.1.2",
|
|
8
|
-
"@angular/core": "^21.1.2",
|
|
9
|
-
"@angular/forms": "^21.1.2",
|
|
10
|
-
"@angular/material": "^21.1.2",
|
|
11
|
-
"@angular/platform-browser": "^21.1.2",
|
|
12
|
-
"@angular/router": "^21.1.2",
|
|
13
|
-
"@ant-design/icons-angular": "^21.0.0",
|
|
14
|
-
"@byteowls/capacitor-oauth2": "^5.0.0",
|
|
15
|
-
"@capacitor/app": "^7.1.0",
|
|
16
|
-
"@capacitor/browser": "^7.0.2",
|
|
17
|
-
"@capacitor/core": "^7.2.0",
|
|
18
|
-
"@capacitor/preferences": "^7.0.1",
|
|
19
|
-
"@ionic/angular": "^8.0.0",
|
|
20
|
-
"@stripe/stripe-js": "^5.5.0",
|
|
21
|
-
"@okta/okta-angular": "^6.5.1",
|
|
22
|
-
"@okta/okta-auth-js": "^7.12.0-rc1",
|
|
23
|
-
"jwt-decode": "^4.0.0",
|
|
24
|
-
"@capacitor/device": "^7.0.3",
|
|
25
|
-
"angular-oauth2-oidc": "^21.0.1",
|
|
26
|
-
"jszip": "^3.10.1",
|
|
27
|
-
"ng-zorro-antd": "^21.1.0",
|
|
28
|
-
"ngx-toastr": "^19.1.0",
|
|
29
|
-
"primeflex": "^4.0.0",
|
|
30
|
-
"primeicons": "^7.0.0",
|
|
31
|
-
"primeng": "^21.1.1",
|
|
32
|
-
"rxjs": "~7.8.0",
|
|
33
|
-
"zone.js": "^0.16.0"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"tslib": "^2.3.0"
|
|
37
|
-
},
|
|
38
|
-
"sideEffects": false
|
|
39
|
-
"module": "fesm2022/yomotech-view-toolkit.mjs",
|
|
40
|
-
"typings": "types/yomotech-view-toolkit.d.ts",
|
|
41
|
-
"exports": {
|
|
42
|
-
"./package.json": {
|
|
43
|
-
"default": "./package.json"
|
|
44
|
-
},
|
|
45
|
-
".": {
|
|
46
|
-
"types": "./types/yomotech-view-toolkit.d.ts",
|
|
47
|
-
"default": "./fesm2022/yomotech-view-toolkit.mjs"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@yomotech/view-toolkit",
|
|
3
|
+
"version": "0.0.32",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/animations": "^21.1.2",
|
|
6
|
+
"@angular/cdk": "^21.1.2",
|
|
7
|
+
"@angular/common": "^21.1.2",
|
|
8
|
+
"@angular/core": "^21.1.2",
|
|
9
|
+
"@angular/forms": "^21.1.2",
|
|
10
|
+
"@angular/material": "^21.1.2",
|
|
11
|
+
"@angular/platform-browser": "^21.1.2",
|
|
12
|
+
"@angular/router": "^21.1.2",
|
|
13
|
+
"@ant-design/icons-angular": "^21.0.0",
|
|
14
|
+
"@byteowls/capacitor-oauth2": "^5.0.0",
|
|
15
|
+
"@capacitor/app": "^7.1.0",
|
|
16
|
+
"@capacitor/browser": "^7.0.2",
|
|
17
|
+
"@capacitor/core": "^7.2.0",
|
|
18
|
+
"@capacitor/preferences": "^7.0.1",
|
|
19
|
+
"@ionic/angular": "^8.0.0",
|
|
20
|
+
"@stripe/stripe-js": "^5.5.0",
|
|
21
|
+
"@okta/okta-angular": "^6.5.1",
|
|
22
|
+
"@okta/okta-auth-js": "^7.12.0-rc1",
|
|
23
|
+
"jwt-decode": "^4.0.0",
|
|
24
|
+
"@capacitor/device": "^7.0.3",
|
|
25
|
+
"angular-oauth2-oidc": "^21.0.1",
|
|
26
|
+
"jszip": "^3.10.1",
|
|
27
|
+
"ng-zorro-antd": "^21.1.0",
|
|
28
|
+
"ngx-toastr": "^19.1.0",
|
|
29
|
+
"primeflex": "^4.0.0",
|
|
30
|
+
"primeicons": "^7.0.0",
|
|
31
|
+
"primeng": "^21.1.1",
|
|
32
|
+
"rxjs": "~7.8.0",
|
|
33
|
+
"zone.js": "^0.16.0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"tslib": "^2.3.0"
|
|
37
|
+
},
|
|
38
|
+
"sideEffects": false
|
|
50
39
|
}
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
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>
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>button works!</p>
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>date works!</p>
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>dropdown works!</p>
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>error-message works!</p>
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
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>
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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" />
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p>time works!</p>
|
|
File without changes
|