@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.
Files changed (72) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +38 -49
  3. package/src/lib/app-version.ts +2 -0
  4. package/src/lib/components/autocomplete/autocomplete.css +0 -0
  5. package/src/lib/components/autocomplete/autocomplete.html +23 -0
  6. package/src/lib/components/autocomplete/autocomplete.ts +71 -0
  7. package/src/lib/components/button/button.css +0 -0
  8. package/src/lib/components/button/button.html +1 -0
  9. package/src/lib/components/button/button.ts +11 -0
  10. package/src/lib/components/date/date.css +0 -0
  11. package/src/lib/components/date/date.html +1 -0
  12. package/src/lib/components/date/date.ts +11 -0
  13. package/src/lib/components/dropdown/dropdown.css +0 -0
  14. package/src/lib/components/dropdown/dropdown.html +1 -0
  15. package/src/lib/components/dropdown/dropdown.ts +11 -0
  16. package/src/lib/components/error-message/error-message.css +0 -0
  17. package/src/lib/components/error-message/error-message.html +1 -0
  18. package/src/lib/components/error-message/error-message.ts +11 -0
  19. package/src/lib/components/label/label.css +0 -0
  20. package/src/lib/components/label/label.html +7 -0
  21. package/src/lib/components/label/label.ts +33 -0
  22. package/src/lib/components/string/string.css +0 -0
  23. package/src/lib/components/string/string.html +4 -0
  24. package/src/lib/components/string/string.ts +22 -0
  25. package/src/lib/components/textbox/textbox.css +0 -0
  26. package/src/lib/components/textbox/textbox.html +7 -0
  27. package/src/lib/components/textbox/textbox.ts +33 -0
  28. package/src/lib/components/time/time.css +0 -0
  29. package/src/lib/components/time/time.html +1 -0
  30. package/src/lib/components/time/time.ts +11 -0
  31. package/src/lib/containers/card/card.component.css +0 -0
  32. package/src/lib/containers/card/card.component.html +450 -0
  33. package/src/lib/containers/card/card.component.ts +474 -0
  34. package/src/lib/containers/form/form.component.css +101 -0
  35. package/src/lib/containers/form/form.component.html +305 -0
  36. package/src/lib/containers/form/form.component.ts +333 -0
  37. package/src/lib/containers/grid/grid.component.css +0 -0
  38. package/src/lib/containers/grid/grid.component.html +212 -0
  39. package/src/lib/containers/grid/grid.component.ts +228 -0
  40. package/src/lib/containers/header-menu/header-menu.component.css +0 -0
  41. package/src/lib/containers/header-menu/header-menu.component.html +72 -0
  42. package/src/lib/containers/header-menu/header-menu.component.ts +105 -0
  43. package/src/lib/containers/logs/logs.component.css +160 -0
  44. package/src/lib/containers/logs/logs.component.html +89 -0
  45. package/src/lib/containers/logs/logs.component.ts +29 -0
  46. package/src/lib/containers/model/model.component.css +0 -0
  47. package/src/lib/containers/model/model.component.html +351 -0
  48. package/src/lib/containers/model/model.component.ts +436 -0
  49. package/src/lib/containers/pagination/pagination.component.css +0 -0
  50. package/src/lib/containers/pagination/pagination.component.html +41 -0
  51. package/src/lib/containers/pagination/pagination.component.ts +100 -0
  52. package/src/lib/containers/side-menu/side-menu.component.css +173 -0
  53. package/src/lib/containers/side-menu/side-menu.component.html +126 -0
  54. package/src/lib/containers/side-menu/side-menu.component.ts +458 -0
  55. package/src/lib/services/app-version-reset.service.ts +59 -0
  56. package/src/lib/services/config.service.ts +144 -0
  57. package/src/lib/services/couchdb.ts +275 -0
  58. package/src/lib/services/mobile-keycloak.service.ts +116 -0
  59. package/src/lib/services/network-log.service.ts +27 -0
  60. package/src/lib/services/notification.service.ts +26 -0
  61. package/src/lib/services/request.service.ts +125 -0
  62. package/src/lib/services/utility.service.ts +600 -0
  63. package/src/lib/view-toolkit.module.ts +57 -0
  64. package/src/lib/view-toolkit.spec.ts +23 -0
  65. package/src/lib/view-toolkit.ts +15 -0
  66. package/src/public-api.ts +25 -0
  67. package/tsconfig.lib.json +17 -0
  68. package/tsconfig.lib.prod.json +11 -0
  69. package/tsconfig.spec.json +15 -0
  70. package/fesm2022/yomotech-view-toolkit.mjs +0 -3597
  71. package/fesm2022/yomotech-view-toolkit.mjs.map +0 -1
  72. package/types/yomotech-view-toolkit.d.ts +0 -648
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../dist/view-toolkit",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,50 +1,39 @@
1
- {
2
- "name": "@yomotech/view-toolkit",
3
- "version": "0.0.31",
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
  }
@@ -0,0 +1,2 @@
1
+ // AUTO-GENERATED. Do not edit.
2
+ export const APP_VERSION = '1.0.204';
@@ -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>
@@ -0,0 +1,11 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'vl-button',
5
+ standalone: true,
6
+ templateUrl: './button.html',
7
+ styleUrl: './button.css',
8
+ })
9
+ export class Button {
10
+
11
+ }
File without changes
@@ -0,0 +1 @@
1
+ <p>date works!</p>
@@ -0,0 +1,11 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'vl-date',
5
+ standalone: true,
6
+ templateUrl: './date.html',
7
+ styleUrl: './date.css',
8
+ })
9
+ export class Date {
10
+
11
+ }
File without changes
@@ -0,0 +1 @@
1
+ <p>dropdown works!</p>
@@ -0,0 +1,11 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'vl-dropdown',
5
+ standalone: true,
6
+ templateUrl: './dropdown.html',
7
+ styleUrl: './dropdown.css',
8
+ })
9
+ export class Dropdown {
10
+
11
+ }
@@ -0,0 +1 @@
1
+ <p>error-message works!</p>
@@ -0,0 +1,11 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'vl-error-message',
5
+ standalone: true,
6
+ templateUrl: './error-message.html',
7
+ styleUrl: './error-message.css',
8
+ })
9
+ export class ErrorMessage {
10
+
11
+ }
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,4 @@
1
+ <h5>{{
2
+ modalItemInfo.propertySchema[getScope(formField.scope?.reference)][formField.scope?.reference.split('/').pop()]?.caption
3
+ }}
4
+ </h5>
@@ -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>
@@ -0,0 +1,11 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'vl-time',
5
+ standalone: true,
6
+ templateUrl: './time.html',
7
+ styleUrl: './time.css',
8
+ })
9
+ export class Time {
10
+
11
+ }
File without changes