@softpak/components 18.0.0 → 18.2.0-beta.1
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/esm2022/spx-alert/spx-alert.component.mjs +53 -43
- package/esm2022/spx-app-expiry/spx-app-expiry.component.mjs +57 -40
- package/esm2022/spx-app-update/spx-app-update.component.mjs +61 -55
- package/esm2022/spx-card/spx-card-item.component.mjs +37 -31
- package/esm2022/spx-card/spx-card-line.component.mjs +63 -40
- package/esm2022/spx-card/spx-card.component.mjs +52 -49
- package/esm2022/spx-change-details/spx-change-details.component.mjs +3 -5
- package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +3 -6
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +4 -7
- package/esm2022/spx-form-section/spx-form-section.component.mjs +19 -14
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +3 -5
- package/esm2022/spx-form-view/spx-form-view.component.mjs +140 -132
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +35 -36
- package/esm2022/spx-inputs/spx-input-box.component.mjs +143 -125
- package/esm2022/spx-inputs/spx-input-date.component.mjs +86 -83
- package/esm2022/spx-inputs/spx-input-float.component.mjs +2 -5
- package/esm2022/spx-inputs/spx-input-radio.component.mjs +25 -25
- package/esm2022/spx-inputs/spx-input-text.component.mjs +65 -61
- package/esm2022/spx-inputs/spx-input-time-modal.component.mjs +73 -60
- package/esm2022/spx-inputs/spx-input-time.component.mjs +2 -5
- package/esm2022/spx-inputs/spx-input.component.mjs +223 -213
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +40 -37
- package/esm2022/spx-navigation/spx-navigation.component.mjs +6 -10
- package/esm2022/spx-number-check/spx-number-check.component.mjs +47 -41
- package/esm2022/spx-patch/spx-patch.component.mjs +27 -21
- package/esm2022/spx-spinner/spx-spinner.component.mjs +143 -142
- package/esm2022/spx-stock-info/spx-stock-info.component.mjs +6 -9
- package/esm2022/spx-toaster/src/spx-toaster.component.mjs +91 -96
- package/esm2022/spx-update/src/spx-update-info.component.mjs +3 -5
- package/esm2022/spx-validation/spx-validate-control.component.mjs +4 -7
- package/fesm2022/softpak-components-spx-alert.mjs +52 -42
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-expiry.mjs +56 -39
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-update.mjs +60 -54
- package/fesm2022/softpak-components-spx-app-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-card.mjs +148 -115
- package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +2 -4
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +2 -5
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +3 -6
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +18 -13
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +141 -134
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +645 -595
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +44 -44
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +46 -40
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs +26 -20
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +142 -141
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +5 -8
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +90 -95
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +2 -4
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +3 -6
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +31 -31
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, Input, ViewChild, EventEmitter, ViewChildren, ContentChild, Output } from '@angular/core';
|
|
3
|
-
import * as i1 from '@
|
|
4
|
-
import { NgClass, NgIf, CommonModule, NgFor } from '@angular/common';
|
|
5
|
-
import * as i2 from '@ngx-translate/core';
|
|
3
|
+
import * as i1 from '@ngx-translate/core';
|
|
6
4
|
import { TranslateModule } from '@ngx-translate/core';
|
|
7
|
-
import * as
|
|
5
|
+
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
8
6
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
9
7
|
import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
|
|
8
|
+
import { NgClass } from '@angular/common';
|
|
10
9
|
|
|
11
10
|
class SpxHomeTilesComponent {
|
|
12
11
|
constructor() {
|
|
@@ -35,24 +34,26 @@ class SpxHomeTileComponent {
|
|
|
35
34
|
this.buttonRef?.nativeElement.focus();
|
|
36
35
|
}
|
|
37
36
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxHomeTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxHomeTileComponent, isStandalone: true, selector: "spx-home-tile", inputs: { spxAutofocus: "spxAutofocus", spxClass: "spxClass", spxSubtitle: "spxSubtitle", spxTitle: "spxTitle" }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["button"], descendants: true }], ngImport: i0, template: `<button #button
|
|
38
|
+
class="border border-transparent flex flex-col w-full px-4 py-2 relative rounded text-center focus:outline-none focus:ring-2 focus:ring-offset-2"
|
|
39
|
+
type="button"
|
|
40
|
+
part="button"
|
|
41
|
+
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
42
|
+
[class.bg-blue-600]="!this.spxClass"
|
|
43
|
+
[class.focus:ring-blue-500]="!this.spxClass"
|
|
44
|
+
[class.hover:bg-blue-800]="!this.spxClass"
|
|
45
|
+
[class.text-white]="!this.spxClass"
|
|
46
|
+
[ngClass]="this.spxClass ? this.spxClass : undefined">
|
|
47
|
+
<div class="flex gap-5 items-center">
|
|
48
|
+
<div class="fal my-2 self-center text-xl w-5"><ng-content></ng-content></div>
|
|
49
|
+
<div class="grow flex flex-col text-left">
|
|
50
|
+
<div class="text-lg font-bold text-ellipsis overflow-hidden">{{ this.spxTitle }}</div>
|
|
51
|
+
@if (this.spxSubtitle) {
|
|
52
|
+
<div class="text-sm opacity-70 text-ellipsis overflow-hidden">{{ this.spxSubtitle }}</div>
|
|
53
|
+
}
|
|
54
|
+
</div>
|
|
53
55
|
</div>
|
|
54
|
-
</
|
|
55
|
-
</button>`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
56
|
+
</button>`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
56
57
|
}
|
|
57
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxHomeTileComponent, decorators: [{
|
|
58
59
|
type: Component,
|
|
@@ -60,27 +61,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
60
61
|
selector: 'spx-home-tile',
|
|
61
62
|
standalone: true,
|
|
62
63
|
imports: [
|
|
63
|
-
NgClass
|
|
64
|
-
NgIf,
|
|
64
|
+
NgClass
|
|
65
65
|
],
|
|
66
66
|
template: `<button #button
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
class="border border-transparent flex flex-col w-full px-4 py-2 relative rounded text-center focus:outline-none focus:ring-2 focus:ring-offset-2"
|
|
68
|
+
type="button"
|
|
69
|
+
part="button"
|
|
70
|
+
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
71
|
+
[class.bg-blue-600]="!this.spxClass"
|
|
72
|
+
[class.focus:ring-blue-500]="!this.spxClass"
|
|
73
|
+
[class.hover:bg-blue-800]="!this.spxClass"
|
|
74
|
+
[class.text-white]="!this.spxClass"
|
|
75
|
+
[ngClass]="this.spxClass ? this.spxClass : undefined">
|
|
76
|
+
<div class="flex gap-5 items-center">
|
|
77
|
+
<div class="fal my-2 self-center text-xl w-5"><ng-content></ng-content></div>
|
|
78
|
+
<div class="grow flex flex-col text-left">
|
|
79
|
+
<div class="text-lg font-bold text-ellipsis overflow-hidden">{{ this.spxTitle }}</div>
|
|
80
|
+
@if (this.spxSubtitle) {
|
|
81
|
+
<div class="text-sm opacity-70 text-ellipsis overflow-hidden">{{ this.spxSubtitle }}</div>
|
|
82
|
+
}
|
|
83
|
+
</div>
|
|
81
84
|
</div>
|
|
82
|
-
</
|
|
83
|
-
</button>`,
|
|
85
|
+
</button>`,
|
|
84
86
|
}]
|
|
85
87
|
}], propDecorators: { spxAutofocus: [{
|
|
86
88
|
type: Input
|
|
@@ -108,19 +110,17 @@ class SpxNavigationComponent {
|
|
|
108
110
|
this.spxClick.emit(link);
|
|
109
111
|
}
|
|
110
112
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
111
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxNavigationComponent, isStandalone: true, selector: "spx-navigation", inputs: { navItems: "navItems", spxCols: "spxCols" }, outputs: { spxClick: "spxClick" }, queries: [{ propertyName: "iconTemplateRef", first: true, predicate: ["icon"], descendants: true }], viewQueries: [{ propertyName: "tiles", predicate: ["tiles"], descendants: true }], ngImport: i0, template: "<spx-home-tiles [spxCols]=\"spxCols\">\n @for (item of navItems; track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"onNavigate(item.routerLink)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n</spx-home-tiles>\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxHomeTilesComponent, selector: "spx-home-tiles", inputs: ["spxCols"] }, { kind: "component", type: SpxHomeTileComponent, selector: "spx-home-tile", inputs: ["spxAutofocus", "spxClass", "spxSubtitle", "spxTitle"] }] }); }
|
|
112
114
|
}
|
|
113
115
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxNavigationComponent, decorators: [{
|
|
114
116
|
type: Component,
|
|
115
117
|
args: [{ selector: 'spx-navigation', standalone: true, imports: [
|
|
116
|
-
CommonModule,
|
|
117
118
|
TranslateModule,
|
|
118
119
|
FontAwesomeModule,
|
|
119
120
|
SpxCapitalizePipe,
|
|
120
121
|
SpxHomeTilesComponent,
|
|
121
|
-
SpxHomeTileComponent
|
|
122
|
-
|
|
123
|
-
], template: "<spx-home-tiles [spxCols]=\"spxCols\">\n <spx-home-tile #tiles *ngFor=\"let item of navItems; let i = index\" (click)=\"onNavigate(item.routerLink)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n</spx-home-tiles>\n" }]
|
|
122
|
+
SpxHomeTileComponent
|
|
123
|
+
], template: "<spx-home-tiles [spxCols]=\"spxCols\">\n @for (item of navItems; track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"onNavigate(item.routerLink)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n</spx-home-tiles>\n" }]
|
|
124
124
|
}], ctorParameters: () => [], propDecorators: { tiles: [{
|
|
125
125
|
type: ViewChildren,
|
|
126
126
|
args: ['tiles']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-navigation.mjs","sources":["../../../../projects/softpak/components/spx-navigation/spx-home-tiles.component.ts","../../../../projects/softpak/components/spx-navigation/spx-home-tile.component.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.html","../../../../projects/softpak/components/spx-navigation/softpak-components-spx-navigation.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tiles',\n standalone: true,\n template: `<div class=\"mx-auto max-w-lg grid gap-3\"\n [class.grid-cols-1]=\"this.spxCols === 1\"\n [class.grid-cols-2]=\"this.spxCols === 2\"><ng-content></ng-content></div>`,\n})\nexport class SpxHomeTilesComponent {\n @Input() spxCols: 1 | 2 = 2;\n}\n","import { NgClass
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-navigation.mjs","sources":["../../../../projects/softpak/components/spx-navigation/spx-home-tiles.component.ts","../../../../projects/softpak/components/spx-navigation/spx-home-tile.component.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.ts","../../../../projects/softpak/components/spx-navigation/spx-navigation.component.html","../../../../projects/softpak/components/spx-navigation/softpak-components-spx-navigation.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tiles',\n standalone: true,\n template: `<div class=\"mx-auto max-w-lg grid gap-3\"\n [class.grid-cols-1]=\"this.spxCols === 1\"\n [class.grid-cols-2]=\"this.spxCols === 2\"><ng-content></ng-content></div>`,\n})\nexport class SpxHomeTilesComponent {\n @Input() spxCols: 1 | 2 = 2;\n}\n","import { NgClass } from '@angular/common';\nimport { Component, ElementRef, Input, ViewChild } from '@angular/core';\n\n@Component({\n selector: 'spx-home-tile',\n standalone: true,\n imports: [\n NgClass\n],\n template: `<button #button\n class=\"border border-transparent flex flex-col w-full px-4 py-2 relative rounded text-center focus:outline-none focus:ring-2 focus:ring-offset-2\"\n type=\"button\"\n part=\"button\"\n [attr.autofocus]=\"this.spxAutofocus ? this.spxAutofocus : undefined\"\n [class.bg-blue-600]=\"!this.spxClass\"\n [class.focus:ring-blue-500]=\"!this.spxClass\"\n [class.hover:bg-blue-800]=\"!this.spxClass\"\n [class.text-white]=\"!this.spxClass\"\n [ngClass]=\"this.spxClass ? this.spxClass : undefined\">\n <div class=\"flex gap-5 items-center\">\n <div class=\"fal my-2 self-center text-xl w-5\"><ng-content></ng-content></div>\n <div class=\"grow flex flex-col text-left\">\n <div class=\"text-lg font-bold text-ellipsis overflow-hidden\">{{ this.spxTitle }}</div>\n @if (this.spxSubtitle) {\n <div class=\"text-sm opacity-70 text-ellipsis overflow-hidden\">{{ this.spxSubtitle }}</div>\n }\n </div>\n </div>\n </button>`,\n})\nexport class SpxHomeTileComponent {\n @Input() spxAutofocus?: boolean;\n @Input() spxClass?: string;\n @Input() spxSubtitle?: string;\n @Input() spxTitle?: string;\n @ViewChild('button') private buttonRef?: ElementRef<HTMLButtonElement>;\n\n setFocus(): void {\n this.buttonRef?.nativeElement.focus();\n }\n}\n","import { Component, ContentChild, EventEmitter, Input, Output, QueryList, TemplateRef, ViewChildren } from '@angular/core';\nimport { SpxNavigationItemI } from './spx-navigation-item.interface';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { SpxHomeTilesComponent } from './spx-home-tiles.component';\nimport { SpxHomeTileComponent } from './spx-home-tile.component';\n\n@Component({\n selector: 'spx-navigation',\n templateUrl: './spx-navigation.component.html',\n standalone: true,\n imports: [\n TranslateModule,\n FontAwesomeModule,\n SpxCapitalizePipe,\n SpxHomeTilesComponent,\n SpxHomeTileComponent\n],\n})\nexport class SpxNavigationComponent {\n @ViewChildren('tiles') tiles?: QueryList<SpxHomeTileComponent>;\n @ContentChild('icon',{static: false}) iconTemplateRef?: TemplateRef<any>;\n @Input() navItems: SpxNavigationItemI[] = [];\n @Input() spxCols: 1 | 2 = 2;\n @Output() spxClick: EventEmitter<string> = new EventEmitter<string>();\n\n constructor(\n ) {}\n\n setFocus(): void {\n this.tiles?.first?.setFocus();\n }\n\n onNavigate(link: string) {\n this.spxClick.emit(link);\n }\n}\n","<spx-home-tiles [spxCols]=\"spxCols\">\n @for (item of navItems; track item; let i = $index) {\n <spx-home-tile #tiles (click)=\"onNavigate(item.routerLink)\"\n [spxAutofocus]=\"i === 0\"\n [spxClass]=\"item.tileClasses ? item.tileClasses : undefined\"\n [spxTitle]=\"item.title | translate | capitalize\"\n [spxSubtitle]=\"item.subtite ? (item.subtite | translate | capitalize) : undefined\">\n <fa-icon [icon]=\"item.icon\"></fa-icon>\n </spx-home-tile>\n }\n</spx-home-tiles>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MASa,qBAAqB,CAAA;AAPlC,IAAA,WAAA,GAAA;QAQW,IAAO,CAAA,OAAA,GAAU,CAAC,CAAC;AAC7B,KAAA;+GAFY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,qBAAqB,EAJtB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;AAEiE,4EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAEhE,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBA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ZlC,SAAS;+BACE,gBAAgB,EAAA,UAAA,EAEd,IAAI,EACP,OAAA,EAAA;wBACP,eAAe;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,qBAAqB;wBACrB,oBAAoB;AACvB,qBAAA,EAAA,QAAA,EAAA,mgBAAA,EAAA,CAAA;wDAGwB,KAAK,EAAA,CAAA;sBAA3B,YAAY;uBAAC,OAAO,CAAA;gBACiB,eAAe,EAAA,CAAA;sBAApD,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,MAAM,EAAC,EAAC,MAAM,EAAE,KAAK,EAAC,CAAA;gBAC3B,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACI,QAAQ,EAAA,CAAA;sBAAjB,MAAM;;;AE1BT;;AAEG;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NgIf } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { EventEmitter, Component, Input, Output, ViewChild } from '@angular/core';
|
|
4
3
|
import * as i1 from '@angular/forms';
|
|
@@ -140,7 +139,7 @@ class SpxNumberCheckComponent {
|
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
141
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxNumberCheckComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
143
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxNumberCheckComponent, isStandalone: true, selector: "spx-number-check", inputs: { spxAction: "spxAction", spxSimpleMode: "spxSimpleMode", spxPincode: "spxPincode", txtCancel: "txtCancel", txtConfirm: "txtConfirm", txtConfirmMessage: "txtConfirmMessage", txtReset: "txtReset" }, outputs: { spxCancel: "spxCancel", spxConfirm: "spxConfirm" }, host: { listeners: { "spxChange": "handleChangeEvent($event)" } }, viewQueries: [{ propertyName: "viewChild1", first: true, predicate: ["viewChild1"], descendants: true }, { propertyName: "viewChild2", first: true, predicate: ["viewChild2"], descendants: true }, { propertyName: "viewChild3", first: true, predicate: ["viewChild3"], descendants: true }, { propertyName: "viewChild4", first: true, predicate: ["viewChild4"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
144
143
|
<div class="fixed top-0 left-0 right-0 bottom-0 z-40 bg-black">
|
|
145
144
|
<div class="mx-auto mt-32 max-w-96 bg-black rounded-lg">
|
|
146
145
|
<div class="flex flex-col gap-3 p-3">
|
|
@@ -148,33 +147,37 @@ class SpxNumberCheckComponent {
|
|
|
148
147
|
<div class="font-bold">{{ this.spxAction }}</div>
|
|
149
148
|
{{ this.txtConfirmMessage }}
|
|
150
149
|
</div>
|
|
151
|
-
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
150
|
+
@if (!this.spxSimpleMode) {
|
|
151
|
+
<form class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
152
|
+
<input #viewChild1 [formControl]="ctrl1" type="text" autofocus class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
153
|
+
<input #viewChild2 [formControl]="ctrl2" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
154
|
+
<input #viewChild3 [formControl]="ctrl3" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
155
|
+
<input #viewChild4 [formControl]="ctrl4" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
156
|
+
</form>
|
|
157
|
+
}
|
|
158
|
+
@if (this.spxSimpleMode) {
|
|
159
|
+
<spx-button
|
|
160
|
+
[spxFullWidth]="true"
|
|
161
|
+
[spxSeverity]="this.severitySuccess"
|
|
162
|
+
(spxClick)="this.handleConfirm()"
|
|
162
163
|
>{{ this.txtConfirm }}</spx-button>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
}
|
|
165
|
+
@if (!this.spxSimpleMode) {
|
|
166
|
+
<spx-button
|
|
167
|
+
[spxFullWidth]="true"
|
|
168
|
+
[spxSeverity]="this.severityWarning"
|
|
169
|
+
(spxClick)="this.handleReset()"
|
|
168
170
|
>{{ this.txtReset }}</spx-button>
|
|
171
|
+
}
|
|
169
172
|
<spx-button
|
|
170
173
|
[spxFullWidth]="true"
|
|
171
174
|
[spxSeverity]="this.severityError"
|
|
172
175
|
(spxClick)="this.handleCancel()"
|
|
173
|
-
|
|
176
|
+
>{{ this.txtCancel }}</spx-button>
|
|
174
177
|
</div>
|
|
175
178
|
</div>
|
|
176
179
|
</div>
|
|
177
|
-
|
|
180
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] }); }
|
|
178
181
|
}
|
|
179
182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxNumberCheckComponent, decorators: [{
|
|
180
183
|
type: Component,
|
|
@@ -185,10 +188,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
185
188
|
'(spxChange)': 'handleChangeEvent($event)'
|
|
186
189
|
},
|
|
187
190
|
imports: [
|
|
188
|
-
NgIf,
|
|
189
191
|
SpxButtonComponent,
|
|
190
192
|
FormsModule,
|
|
191
|
-
ReactiveFormsModule
|
|
193
|
+
ReactiveFormsModule
|
|
192
194
|
],
|
|
193
195
|
template: `
|
|
194
196
|
<div class="fixed top-0 left-0 right-0 bottom-0 z-40 bg-black">
|
|
@@ -198,33 +200,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
198
200
|
<div class="font-bold">{{ this.spxAction }}</div>
|
|
199
201
|
{{ this.txtConfirmMessage }}
|
|
200
202
|
</div>
|
|
201
|
-
|
|
202
|
-
<
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
203
|
+
@if (!this.spxSimpleMode) {
|
|
204
|
+
<form class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
205
|
+
<input #viewChild1 [formControl]="ctrl1" type="text" autofocus class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
206
|
+
<input #viewChild2 [formControl]="ctrl2" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
207
|
+
<input #viewChild3 [formControl]="ctrl3" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
208
|
+
<input #viewChild4 [formControl]="ctrl4" type="text" class="w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700" [class.bg-red-700]="this.denied" [class.bg-teal-700]="this.accepted" maxlength="1" (keypress)="onDigitInput($event)" (keyup.backspace)="onBackspace($event)" pattern="[0-9]*" inputmode="numeric" />
|
|
209
|
+
</form>
|
|
210
|
+
}
|
|
211
|
+
@if (this.spxSimpleMode) {
|
|
212
|
+
<spx-button
|
|
213
|
+
[spxFullWidth]="true"
|
|
214
|
+
[spxSeverity]="this.severitySuccess"
|
|
215
|
+
(spxClick)="this.handleConfirm()"
|
|
212
216
|
>{{ this.txtConfirm }}</spx-button>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
}
|
|
218
|
+
@if (!this.spxSimpleMode) {
|
|
219
|
+
<spx-button
|
|
220
|
+
[spxFullWidth]="true"
|
|
221
|
+
[spxSeverity]="this.severityWarning"
|
|
222
|
+
(spxClick)="this.handleReset()"
|
|
218
223
|
>{{ this.txtReset }}</spx-button>
|
|
224
|
+
}
|
|
219
225
|
<spx-button
|
|
220
226
|
[spxFullWidth]="true"
|
|
221
227
|
[spxSeverity]="this.severityError"
|
|
222
228
|
(spxClick)="this.handleCancel()"
|
|
223
|
-
|
|
229
|
+
>{{ this.txtCancel }}</spx-button>
|
|
224
230
|
</div>
|
|
225
231
|
</div>
|
|
226
232
|
</div>
|
|
227
|
-
|
|
233
|
+
`,
|
|
228
234
|
}]
|
|
229
235
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxAction: [{
|
|
230
236
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-number-check.mjs","sources":["../../../../projects/softpak/components/spx-number-check/spx-number-check.component.ts","../../../../projects/softpak/components/spx-number-check/softpak-components-spx-number-check.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-number-check',\n standalone: true,\n host: {\n '(spxChange)': 'handleChangeEvent($event)'\n },\n imports: [\n NgIf,\n SpxButtonComponent,\n FormsModule,\n ReactiveFormsModule,\n ],\n template: `\n <div class=\"fixed top-0 left-0 right-0 bottom-0 z-40 bg-black\">\n <div class=\"mx-auto mt-32 max-w-96 bg-black rounded-lg\">\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"bg-yellow-300 text-black text-center rounded p-3 text-xl\">\n <div class=\"font-bold\">{{ this.spxAction }}</div>\n {{ this.txtConfirmMessage }}\n </div>\n <form *ngIf=\"!this.spxSimpleMode\" class=\"block grid grid-cols-4 gap-3\" [formGroup]=\"this.form\" (ngSubmit)=\"null\">\n <input #viewChild1 [formControl]=\"ctrl1\" type=\"text\" autofocus class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild2 [formControl]=\"ctrl2\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild3 [formControl]=\"ctrl3\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild4 [formControl]=\"ctrl4\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n </form>\n <spx-button\n *ngIf=\"this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severitySuccess\"\n (spxClick)=\"this.handleConfirm()\"\n >{{ this.txtConfirm }}</spx-button>\n <spx-button\n *ngIf=\"!this.spxSimpleMode\"\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityWarning\"\n (spxClick)=\"this.handleReset()\"\n >{{ this.txtReset }}</spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityError\"\n (spxClick)=\"this.handleCancel()\"\n >{{ this.txtCancel }}</spx-button>\n </div>\n </div>\n </div>\n `,\n})\nexport class SpxNumberCheckComponent implements OnChanges, OnInit, OnDestroy {\n @Input() spxAction!: string;\n @Input() spxSimpleMode = false;\n @Input() spxPincode!: string;\n @Input() txtCancel!: string;\n @Input() txtConfirm!: string;\n @Input() txtConfirmMessage!: string;\n @Input() txtReset!: string;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxConfirm: EventEmitter<void> = new EventEmitter<void>();\n @ViewChild('viewChild1') viewChild1!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild2') viewChild2!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild3') viewChild3!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild4') viewChild4!: ElementRef<HTMLInputElement>;\n form!: FormGroup;\n severityError = SpxSeverityEnum.error;\n severitySuccess = SpxSeverityEnum.success;\n severityWarning = SpxSeverityEnum.warning;\n accepted = false;\n denied = false;\n listenToCtrl1?: Subscription;\n listenToCtrl2?: Subscription;\n listenToCtrl3?: Subscription;\n listenToCtrl4?: Subscription;\n listenToTyping?: Subscription;\n\n get ctrl1(): FormControl { return this.form.get('ctrl1') as FormControl; }\n get ctrl2(): FormControl { return this.form.get('ctrl2') as FormControl; }\n get ctrl3(): FormControl { return this.form.get('ctrl3') as FormControl; }\n get ctrl4(): FormControl { return this.form.get('ctrl4') as FormControl; }\n\n constructor(private readonly formBuilder: FormBuilder) {\n this.form = this.formBuilder.group({\n ctrl1: [null, []],\n ctrl2: [null, []],\n ctrl3: [null, []],\n ctrl4: [null, []],\n });\n }\n\n ngOnInit(): void {\n this.listenToTyping = this.form.valueChanges.subscribe(() => {\n this.accepted = false;\n this.denied = false;\n if (this.ctrl1.value && this.ctrl2.value && this.ctrl3.value && this.ctrl4.value) {\n this.checkPincode();\n }\n });\n\n this.listenToCtrl1 = this.ctrl1.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild2.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl2 = this.ctrl2.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild3.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl3 = this.ctrl3.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild4.nativeElement.focus();\n } else {\n\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n setTimeout(() => {\n if (this?.viewChild1?.nativeElement) {\n this.viewChild1.nativeElement.focus();\n }\n }, 0);\n }\n\n ngOnDestroy(): void {\n if (this.listenToTyping) {\n this.listenToTyping.unsubscribe();\n }\n if (this.listenToCtrl1) {\n this.listenToCtrl1.unsubscribe();\n } \n if (this.listenToCtrl2) {\n this.listenToCtrl2.unsubscribe();\n } \n if (this.listenToCtrl3) {\n this.listenToCtrl3.unsubscribe();\n } \n }\n\n handleCancel(): void {\n this.spxCancel.emit();\n }\n\n handleConfirm(): void {\n this.spxConfirm.emit();\n }\n\n handleReset(): void {\n this.ctrl1.reset();\n this.ctrl2.reset();\n this.ctrl3.reset();\n this.ctrl4.reset();\n this.viewChild1.nativeElement.focus();\n this.accepted = false;\n this.denied = false;\n }\n\n onDigitInput(event: any) {\n let element: any;\n if (\n event.code === 'Digit0' ||\n event.code === 'Digit1' ||\n event.code === 'Digit2' ||\n event.code === 'Digit3' ||\n event.code === 'Digit4' ||\n event.code === 'Digit5' ||\n event.code === 'Digit6' ||\n event.code === 'Digit7' ||\n event.code === 'Digit8' ||\n event.code === 'Digit9' ||\n event.code === 'Numpad0' ||\n event.code === 'Numpad1' ||\n event.code === 'Numpad2' ||\n event.code === 'Numpad3' ||\n event.code === 'Numpad4' ||\n event.code === 'Numpad5' ||\n event.code === 'Numpad6' ||\n event.code === 'Numpad7' ||\n event.code === 'Numpad8' ||\n event.code === 'Numpad9') {\n element = event.srcElement.nextElementSibling;\n }\n if (element == null) {\n return;\n }\n else {\n // setTimeout(() => { element.focus(); });\n }\n }\n\n onBackspace(event: any) {\n event.srcElement.previousElementSibling.focus();\n }\n\n private checkPincode(): void {\n if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {\n this.accepted = true;\n setTimeout(() => {\n this.spxConfirm.emit();\n }, 500);\n } else {\n this.denied = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAuDa,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO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EAAA,CAAA,CAAA,EAAA;;4FAsCV,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhDnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,aAAa,EAAE,2BAA2B;AAC3C,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,IAAI;wBACJ,kBAAkB;wBAClB,WAAW;wBACX,mBAAmB;AACpB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCT,EAAA,CAAA;AACF,iBAAA,CAAA;gFAEU,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACI,SAAS,EAAA,CAAA;sBAAlB,MAAM;gBACG,UAAU,EAAA,CAAA;sBAAnB,MAAM;gBACkB,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;;;ACpEzB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-number-check.mjs","sources":["../../../../projects/softpak/components/spx-number-check/spx-number-check.component.ts","../../../../projects/softpak/components/spx-number-check/softpak-components-spx-number-check.ts"],"sourcesContent":["\nimport { Component, ElementRef, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: 'spx-number-check',\n standalone: true,\n host: {\n '(spxChange)': 'handleChangeEvent($event)'\n },\n imports: [\n SpxButtonComponent,\n FormsModule,\n ReactiveFormsModule\n],\n template: `\n <div class=\"fixed top-0 left-0 right-0 bottom-0 z-40 bg-black\">\n <div class=\"mx-auto mt-32 max-w-96 bg-black rounded-lg\">\n <div class=\"flex flex-col gap-3 p-3\">\n <div class=\"bg-yellow-300 text-black text-center rounded p-3 text-xl\">\n <div class=\"font-bold\">{{ this.spxAction }}</div>\n {{ this.txtConfirmMessage }}\n </div>\n @if (!this.spxSimpleMode) {\n <form class=\"block grid grid-cols-4 gap-3\" [formGroup]=\"this.form\" (ngSubmit)=\"null\">\n <input #viewChild1 [formControl]=\"ctrl1\" type=\"text\" autofocus class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild2 [formControl]=\"ctrl2\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild3 [formControl]=\"ctrl3\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n <input #viewChild4 [formControl]=\"ctrl4\" type=\"text\" class=\"w-full text-center font-bold text-2xl p-3 rounded-lg focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-white bg-neutral-700\" [class.bg-red-700]=\"this.denied\" [class.bg-teal-700]=\"this.accepted\" maxlength=\"1\" (keypress)=\"onDigitInput($event)\" (keyup.backspace)=\"onBackspace($event)\" pattern=\"[0-9]*\" inputmode=\"numeric\" />\n </form>\n }\n @if (this.spxSimpleMode) {\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severitySuccess\"\n (spxClick)=\"this.handleConfirm()\"\n >{{ this.txtConfirm }}</spx-button>\n }\n @if (!this.spxSimpleMode) {\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityWarning\"\n (spxClick)=\"this.handleReset()\"\n >{{ this.txtReset }}</spx-button>\n }\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"this.severityError\"\n (spxClick)=\"this.handleCancel()\"\n >{{ this.txtCancel }}</spx-button>\n </div>\n </div>\n </div>\n `,\n})\nexport class SpxNumberCheckComponent implements OnChanges, OnInit, OnDestroy {\n @Input() spxAction!: string;\n @Input() spxSimpleMode = false;\n @Input() spxPincode!: string;\n @Input() txtCancel!: string;\n @Input() txtConfirm!: string;\n @Input() txtConfirmMessage!: string;\n @Input() txtReset!: string;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxConfirm: EventEmitter<void> = new EventEmitter<void>();\n @ViewChild('viewChild1') viewChild1!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild2') viewChild2!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild3') viewChild3!: ElementRef<HTMLInputElement>;\n @ViewChild('viewChild4') viewChild4!: ElementRef<HTMLInputElement>;\n form!: FormGroup;\n severityError = SpxSeverityEnum.error;\n severitySuccess = SpxSeverityEnum.success;\n severityWarning = SpxSeverityEnum.warning;\n accepted = false;\n denied = false;\n listenToCtrl1?: Subscription;\n listenToCtrl2?: Subscription;\n listenToCtrl3?: Subscription;\n listenToCtrl4?: Subscription;\n listenToTyping?: Subscription;\n\n get ctrl1(): FormControl { return this.form.get('ctrl1') as FormControl; }\n get ctrl2(): FormControl { return this.form.get('ctrl2') as FormControl; }\n get ctrl3(): FormControl { return this.form.get('ctrl3') as FormControl; }\n get ctrl4(): FormControl { return this.form.get('ctrl4') as FormControl; }\n\n constructor(private readonly formBuilder: FormBuilder) {\n this.form = this.formBuilder.group({\n ctrl1: [null, []],\n ctrl2: [null, []],\n ctrl3: [null, []],\n ctrl4: [null, []],\n });\n }\n\n ngOnInit(): void {\n this.listenToTyping = this.form.valueChanges.subscribe(() => {\n this.accepted = false;\n this.denied = false;\n if (this.ctrl1.value && this.ctrl2.value && this.ctrl3.value && this.ctrl4.value) {\n this.checkPincode();\n }\n });\n\n this.listenToCtrl1 = this.ctrl1.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild2.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl2 = this.ctrl2.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild3.nativeElement.focus();\n } else {\n\n }\n });\n\n this.listenToCtrl3 = this.ctrl3.valueChanges.subscribe(value => {\n if (value) {\n this.viewChild4.nativeElement.focus();\n } else {\n\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n setTimeout(() => {\n if (this?.viewChild1?.nativeElement) {\n this.viewChild1.nativeElement.focus();\n }\n }, 0);\n }\n\n ngOnDestroy(): void {\n if (this.listenToTyping) {\n this.listenToTyping.unsubscribe();\n }\n if (this.listenToCtrl1) {\n this.listenToCtrl1.unsubscribe();\n } \n if (this.listenToCtrl2) {\n this.listenToCtrl2.unsubscribe();\n } \n if (this.listenToCtrl3) {\n this.listenToCtrl3.unsubscribe();\n } \n }\n\n handleCancel(): void {\n this.spxCancel.emit();\n }\n\n handleConfirm(): void {\n this.spxConfirm.emit();\n }\n\n handleReset(): void {\n this.ctrl1.reset();\n this.ctrl2.reset();\n this.ctrl3.reset();\n this.ctrl4.reset();\n this.viewChild1.nativeElement.focus();\n this.accepted = false;\n this.denied = false;\n }\n\n onDigitInput(event: any) {\n let element: any;\n if (\n event.code === 'Digit0' ||\n event.code === 'Digit1' ||\n event.code === 'Digit2' ||\n event.code === 'Digit3' ||\n event.code === 'Digit4' ||\n event.code === 'Digit5' ||\n event.code === 'Digit6' ||\n event.code === 'Digit7' ||\n event.code === 'Digit8' ||\n event.code === 'Digit9' ||\n event.code === 'Numpad0' ||\n event.code === 'Numpad1' ||\n event.code === 'Numpad2' ||\n event.code === 'Numpad3' ||\n event.code === 'Numpad4' ||\n event.code === 'Numpad5' ||\n event.code === 'Numpad6' ||\n event.code === 'Numpad7' ||\n event.code === 'Numpad8' ||\n event.code === 'Numpad9') {\n element = event.srcElement.nextElementSibling;\n }\n if (element == null) {\n return;\n }\n else {\n // setTimeout(() => { element.focus(); });\n }\n }\n\n onBackspace(event: any) {\n event.srcElement.previousElementSibling.focus();\n }\n\n private checkPincode(): void {\n if (this.spxPincode === `${this.ctrl1.value}${this.ctrl2.value}${this.ctrl3.value}${this.ctrl4.value}`) {\n this.accepted = true;\n setTimeout(() => {\n this.spxConfirm.emit();\n }, 500);\n } else {\n this.denied = true;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MA0Da,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC,EAAE;AAC1E,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CA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A;sBAAnB,MAAM;gBACkB,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY,CAAA;;;ACvEzB;;AAEG;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';
|
|
2
|
-
import { NgIf } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { Component, Input } from '@angular/core';
|
|
5
4
|
import { SpxAlertComponent } from '@softpak/components/spx-alert';
|
|
@@ -32,15 +31,19 @@ class SpxPatchComponent {
|
|
|
32
31
|
this.severityWarning = SpxSeverityEnum.warning;
|
|
33
32
|
}
|
|
34
33
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxPatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxPatchComponent, isStandalone: true, selector: "spx-patch", inputs: { spxText: "spxText", patchCheck: "patchCheck", releaseCheck: "releaseCheck" }, ngImport: i0, template: `<div class="flex flex-col gap-2">
|
|
35
|
+
@if (releaseCheck) {
|
|
36
|
+
<spx-alert [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
37
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
38
|
+
</spx-alert>
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@if (patchCheck) {
|
|
42
|
+
<spx-alert [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
43
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
44
|
+
</spx-alert>
|
|
45
|
+
}
|
|
46
|
+
</div>`, isInline: true, dependencies: [{ kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity", "tick"], outputs: ["spxClose"] }] }); }
|
|
44
47
|
}
|
|
45
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxPatchComponent, decorators: [{
|
|
46
49
|
type: Component,
|
|
@@ -48,18 +51,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
48
51
|
selector: 'spx-patch',
|
|
49
52
|
standalone: true,
|
|
50
53
|
imports: [
|
|
51
|
-
|
|
52
|
-
SpxAlertComponent,
|
|
54
|
+
SpxAlertComponent
|
|
53
55
|
],
|
|
54
56
|
template: `<div class="flex flex-col gap-2">
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
@if (releaseCheck) {
|
|
58
|
+
<spx-alert [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
59
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
60
|
+
</spx-alert>
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@if (patchCheck) {
|
|
64
|
+
<spx-alert [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
65
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
66
|
+
</spx-alert>
|
|
67
|
+
}
|
|
68
|
+
</div>`,
|
|
63
69
|
}]
|
|
64
70
|
}], propDecorators: { spxText: [{
|
|
65
71
|
type: Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-patch.mjs","sources":["../../../../projects/softpak/components/spx-patch/patch-check.function.ts","../../../../projects/softpak/components/spx-patch/release-check.function.ts","../../../../projects/softpak/components/spx-patch/spx-patch.component.ts","../../../../projects/softpak/components/spx-patch/softpak-components-spx-patch.ts"],"sourcesContent":["import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const patchCheck = (pair: { release: string; patchAtLeast: number; }[]) => {\n const release = pair.find(p => p.release === SpxStorage.getSetting(SpxStorageKeyEnum.release));\n if (!release || (parseInt(SpxStorage.getSetting(SpxStorageKeyEnum.patch) ?? '0', 10) >= release.patchAtLeast)) {\n return null;\n }\n return release.patchAtLeast;\n};\n\n","import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const releaseCheck = (releaseAtLeast: string, orInReleaseList?: string[]) => {\n const currentRelease = (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00').split('.').map((v: string) => parseInt(v, 10));\n const requiredRelease = releaseAtLeast.split('.').map((v: string) => parseInt(v, 10));\n \n if (orInReleaseList && orInReleaseList.find(release => release === (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00'))) {\n return null;\n }\n\n if (requiredRelease[0] < currentRelease[0] ||\n requiredRelease[0] === currentRelease[0] && requiredRelease[1] <= currentRelease[1]\n ) {\n return null;\n }\n return releaseAtLeast;\n};\n\n","
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-patch.mjs","sources":["../../../../projects/softpak/components/spx-patch/patch-check.function.ts","../../../../projects/softpak/components/spx-patch/release-check.function.ts","../../../../projects/softpak/components/spx-patch/spx-patch.component.ts","../../../../projects/softpak/components/spx-patch/softpak-components-spx-patch.ts"],"sourcesContent":["import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const patchCheck = (pair: { release: string; patchAtLeast: number; }[]) => {\n const release = pair.find(p => p.release === SpxStorage.getSetting(SpxStorageKeyEnum.release));\n if (!release || (parseInt(SpxStorage.getSetting(SpxStorageKeyEnum.patch) ?? '0', 10) >= release.patchAtLeast)) {\n return null;\n }\n return release.patchAtLeast;\n};\n\n","import { SpxStorage, SpxStorageKeyEnum } from \"@softpak/components/spx-storage\";\n\nexport const releaseCheck = (releaseAtLeast: string, orInReleaseList?: string[]) => {\n const currentRelease = (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00').split('.').map((v: string) => parseInt(v, 10));\n const requiredRelease = releaseAtLeast.split('.').map((v: string) => parseInt(v, 10));\n \n if (orInReleaseList && orInReleaseList.find(release => release === (SpxStorage.getSetting(SpxStorageKeyEnum.release) ?? '00.00'))) {\n return null;\n }\n\n if (requiredRelease[0] < currentRelease[0] ||\n requiredRelease[0] === currentRelease[0] && requiredRelease[1] <= currentRelease[1]\n ) {\n return null;\n }\n return releaseAtLeast;\n};\n\n","\nimport { Component, Input } from '@angular/core';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-patch',\n standalone: true,\n imports: [\n SpxAlertComponent\n],\n template: `<div class=\"flex flex-col gap-2\">\n @if (releaseCheck) {\n <spx-alert [spxTitle]=\"'Requires new release'\" [spxSeverity]=\"severityError\">\n {{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.\n </spx-alert>\n }\n \n @if (patchCheck) {\n <spx-alert [spxTitle]=\"'Softpak patch'\" [spxSeverity]=\"severityWarning\">\n {{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.\n </spx-alert>\n }\n </div>`,\n})\nexport class SpxPatchComponent {\n @Input() spxText!: string;\n @Input() patchCheck!: number | null;\n @Input() releaseCheck!: string | null;\n severityError = SpxSeverityEnum.error;\n severityWarning = SpxSe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