@softpak/components 19.0.0-beta.1 → 19.0.0-beta.11
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/softpak-components-spx-alert.mjs +54 -44
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-expiry.mjs +58 -41
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-update.mjs +73 -68
- package/fesm2022/softpak-components-spx-app-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-button.mjs +3 -3
- package/fesm2022/softpak-components-spx-capitalize.mjs +3 -3
- package/fesm2022/softpak-components-spx-card.mjs +159 -126
- package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +4 -6
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +8 -11
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +5 -8
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +20 -15
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +145 -138
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-helpers.mjs +1 -0
- package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +809 -860
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +51 -51
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +48 -42
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pagination.mjs +3 -3
- package/fesm2022/softpak-components-spx-patch.mjs +28 -22
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-progress-bar.mjs +3 -3
- package/fesm2022/softpak-components-spx-spinner.mjs +144 -143
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +7 -10
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +41 -49
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +92 -97
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +8 -10
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +5 -8
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +23 -24
- package/spx-alert/spx-alert.component.d.ts +4 -4
- package/spx-app-update/spx-app-update.component.d.ts +3 -3
- package/spx-helpers/spx-severity.enum.d.ts +2 -1
- package/spx-inputs/spx-input-box.component.d.ts +4 -4
- package/spx-inputs/spx-input-date/spx-input-date.component.d.ts +43 -0
- package/spx-inputs/spx-input-float.component.d.ts +5 -4
- package/spx-inputs/spx-input-text.component.d.ts +2 -1
- package/spx-inputs/spx-input-time-modal.component.d.ts +1 -1
- package/spx-inputs/spx-input-time.component.d.ts +1 -1
- package/spx-inputs/spx-input.component.d.ts +2 -1
- package/spx-suggestion/spx-suggestion.component.d.ts +5 -5
- package/tailwind.css +1 -1
- package/spx-inputs/spx-input-date.component.d.ts +0 -50
|
@@ -1,23 +1,22 @@
|
|
|
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() {
|
|
13
12
|
this.spxCols = 2;
|
|
14
13
|
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxHomeTilesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxHomeTilesComponent, isStandalone: true, selector: "spx-home-tiles", inputs: { spxCols: "spxCols" }, ngImport: i0, template: `<div class="mx-auto max-w-lg grid gap-3"
|
|
17
16
|
[class.grid-cols-1]="this.spxCols === 1"
|
|
18
17
|
[class.grid-cols-2]="this.spxCols === 2"><ng-content></ng-content></div>`, isInline: true }); }
|
|
19
18
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxHomeTilesComponent, decorators: [{
|
|
21
20
|
type: Component,
|
|
22
21
|
args: [{
|
|
23
22
|
selector: 'spx-home-tiles',
|
|
@@ -34,52 +33,55 @@ class SpxHomeTileComponent {
|
|
|
34
33
|
setFocus() {
|
|
35
34
|
this.buttonRef?.nativeElement.focus();
|
|
36
35
|
}
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
38
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxHomeTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxHomeTileComponent, decorators: [{
|
|
58
59
|
type: Component,
|
|
59
60
|
args: [{
|
|
60
61
|
selector: 'spx-home-tile',
|
|
61
62
|
imports: [
|
|
62
|
-
NgClass
|
|
63
|
-
NgIf,
|
|
63
|
+
NgClass
|
|
64
64
|
],
|
|
65
65
|
template: `<button #button
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
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"
|
|
67
|
+
type="button"
|
|
68
|
+
part="button"
|
|
69
|
+
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
70
|
+
[class.bg-blue-600]="!this.spxClass"
|
|
71
|
+
[class.focus:ring-blue-500]="!this.spxClass"
|
|
72
|
+
[class.hover:bg-blue-800]="!this.spxClass"
|
|
73
|
+
[class.text-white]="!this.spxClass"
|
|
74
|
+
[ngClass]="this.spxClass ? this.spxClass : undefined">
|
|
75
|
+
<div class="flex gap-5 items-center">
|
|
76
|
+
<div class="fal my-2 self-center text-xl w-5"><ng-content></ng-content></div>
|
|
77
|
+
<div class="grow flex flex-col text-left">
|
|
78
|
+
<div class="text-lg font-bold text-ellipsis overflow-hidden">{{ this.spxTitle }}</div>
|
|
79
|
+
@if (this.spxSubtitle) {
|
|
80
|
+
<div class="text-sm opacity-70 text-ellipsis overflow-hidden">{{ this.spxSubtitle }}</div>
|
|
81
|
+
}
|
|
82
|
+
</div>
|
|
80
83
|
</div>
|
|
81
|
-
</
|
|
82
|
-
</button>`
|
|
84
|
+
</button>`
|
|
83
85
|
}]
|
|
84
86
|
}], propDecorators: { spxAutofocus: [{
|
|
85
87
|
type: Input
|
|
@@ -106,20 +108,18 @@ class SpxNavigationComponent {
|
|
|
106
108
|
onNavigate(link) {
|
|
107
109
|
this.spxClick.emit(link);
|
|
108
110
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
110
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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"] }] }); }
|
|
111
113
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxNavigationComponent, decorators: [{
|
|
113
115
|
type: Component,
|
|
114
116
|
args: [{ selector: 'spx-navigation', imports: [
|
|
115
|
-
CommonModule,
|
|
116
117
|
TranslateModule,
|
|
117
118
|
FontAwesomeModule,
|
|
118
119
|
SpxCapitalizePipe,
|
|
119
120
|
SpxHomeTilesComponent,
|
|
120
|
-
SpxHomeTileComponent
|
|
121
|
-
|
|
122
|
-
], 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" }]
|
|
121
|
+
SpxHomeTileComponent
|
|
122
|
+
], 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" }]
|
|
123
123
|
}], ctorParameters: () => [], propDecorators: { tiles: [{
|
|
124
124
|
type: ViewChildren,
|
|
125
125
|
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 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 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,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AAA,EACjB,iBAAiB,EAAA,IAAA,EAAA,YAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACjB,qBAAqB,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACrB,oBAAoB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,UAAA,EAAA,aAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAGf,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EAEjB,OAAA,EAAA;wBACL,eAAe;wBACf,iBAAiB;wBACjB,iBAAiB;wBACjB,qBAAqB;wBACrB;AACH,qBAAA,EAAA,QAAA,EAAA,mgBAAA,EAAA;wDAGoB,KAAK,EAAA,CAAA;sBAA3B,YAAY;uBAAC,OAAO;gBACiB,eAAe,EAAA,CAAA;sBAApD,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,MAAM,EAAC,EAAC,MAAM,EAAE,KAAK,EAAC;gBAC3B,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACS,QAAQ,EAAA,CAAA;sBAAjB;;;AEzBH;;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';
|
|
@@ -139,8 +138,8 @@ class SpxNumberCheckComponent {
|
|
|
139
138
|
this.denied = true;
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
143
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxNumberCheckComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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,35 +147,39 @@ 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxNumberCheckComponent, decorators: [{
|
|
180
183
|
type: Component,
|
|
181
184
|
args: [{
|
|
182
185
|
selector: 'spx-number-check',
|
|
@@ -184,10 +187,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
184
187
|
'(spxChange)': 'handleChangeEvent($event)'
|
|
185
188
|
},
|
|
186
189
|
imports: [
|
|
187
|
-
NgIf,
|
|
188
190
|
SpxButtonComponent,
|
|
189
191
|
FormsModule,
|
|
190
|
-
ReactiveFormsModule
|
|
192
|
+
ReactiveFormsModule
|
|
191
193
|
],
|
|
192
194
|
template: `
|
|
193
195
|
<div class="fixed top-0 left-0 right-0 bottom-0 z-40 bg-black">
|
|
@@ -197,33 +199,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
197
199
|
<div class="font-bold">{{ this.spxAction }}</div>
|
|
198
200
|
{{ this.txtConfirmMessage }}
|
|
199
201
|
</div>
|
|
200
|
-
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
202
|
+
@if (!this.spxSimpleMode) {
|
|
203
|
+
<form class="block grid grid-cols-4 gap-3" [formGroup]="this.form" (ngSubmit)="null">
|
|
204
|
+
<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" />
|
|
205
|
+
<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" />
|
|
206
|
+
<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" />
|
|
207
|
+
<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" />
|
|
208
|
+
</form>
|
|
209
|
+
}
|
|
210
|
+
@if (this.spxSimpleMode) {
|
|
211
|
+
<spx-button
|
|
212
|
+
[spxFullWidth]="true"
|
|
213
|
+
[spxSeverity]="this.severitySuccess"
|
|
214
|
+
(spxClick)="this.handleConfirm()"
|
|
211
215
|
>{{ this.txtConfirm }}</spx-button>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
}
|
|
217
|
+
@if (!this.spxSimpleMode) {
|
|
218
|
+
<spx-button
|
|
219
|
+
[spxFullWidth]="true"
|
|
220
|
+
[spxSeverity]="this.severityWarning"
|
|
221
|
+
(spxClick)="this.handleReset()"
|
|
217
222
|
>{{ this.txtReset }}</spx-button>
|
|
223
|
+
}
|
|
218
224
|
<spx-button
|
|
219
225
|
[spxFullWidth]="true"
|
|
220
226
|
[spxSeverity]="this.severityError"
|
|
221
227
|
(spxClick)="this.handleCancel()"
|
|
222
|
-
|
|
228
|
+
>{{ this.txtCancel }}</spx-button>
|
|
223
229
|
</div>
|
|
224
230
|
</div>
|
|
225
231
|
</div>
|
|
226
|
-
|
|
232
|
+
`
|
|
227
233
|
}]
|
|
228
234
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxAction: [{
|
|
229
235
|
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 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":";;;;;;;;MAsDa,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC;AACxE,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC;AACxE,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC;AACxE,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC;AAExE,IAAA,WAAA,CAA6B,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW;QA7B/B,IAAa,CAAA,aAAA,GAAG,KAAK;AAMpB,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ;AACxD,QAAA,IAAA,CAAA,UAAU,GAAuB,IAAI,YAAY,EAAQ;AAMnE,QAAA,IAAA,CAAA,aAAa,GAAG,eAAe,CAAC,KAAK;AACrC,QAAA,IAAA,CAAA,eAAe,GAA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,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAsCd,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBA/CnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACF,wBAAA,aAAa,EAAE;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,IAAI;wBACJ,kBAAkB;wBAClB,WAAW;wBACX,mBAAmB;AACtB,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCX,EAAA;AACF,iBAAA;gFAEU,SAAS,EAAA,CAAA;sBAAjB;gBACQ,aAAa,EAAA,CAAA;sBAArB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,iBAAiB,EAAA,CAAA;sBAAzB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,SAAS,EAAA,CAAA;sBAAlB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACwB,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;;;ACnEzB;;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 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":";;;;;;;MAyDa,uBAAuB,CAAA;AA0BlC,IAAA,IAAI,KAAK,GAAA,EAAkB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAgB,CAAC;AACxE,IAAA,IAAI,KAAK,GAAA,EAAk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A,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FA0Cd,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAlDnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,IAAI,EAAE;AACF,wBAAA,aAAa,EAAE;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,kBAAkB;wBAClB,WAAW;wBACX;AACH,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCT,IAAA;AACJ,iBAAA;gFAEU,SAAS,EAAA,CAAA;sBAAjB;gBACQ,aAAa,EAAA,CAAA;sBAArB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,iBAAiB,EAAA,CAAA;sBAAzB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,SAAS,EAAA,CAAA;sBAAlB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBACwB,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;gBACE,UAAU,EAAA,CAAA;sBAAlC,SAAS;uBAAC,YAAY;;;ACtEzB;;AAEG;;;;"}
|
|
@@ -14,10 +14,10 @@ class SpxPaginationComponent {
|
|
|
14
14
|
onPageChange(page) {
|
|
15
15
|
this.spxPageChange.emit(page);
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxPaginationComponent, isStandalone: true, selector: "spx-pagination", inputs: { faArrowLeft: "faArrowLeft", faArrowRight: "faArrowRight", spxPage: "spxPage", spxMaxPages: "spxMaxPages", textNext: "textNext", textPage: "textPage", textPrevious: "textPrevious" }, outputs: { spxPageChange: "spxPageChange" }, ngImport: i0, template: "<div class=\"inline mx-auto flex gap-3 items-center font-bold\">\n <spx-button (click)=\"onPageChange(spxPage - 1)\" [spxDisabled]=\"spxPage === 1\">\n <fa-icon [icon]=\"faArrowLeft\"></fa-icon> {{ textPrevious | translate | capitalize }}\n </spx-button>\n {{ textPage | translate | capitalize }} {{ spxPage }}\n <spx-button [spxDisabled]=\"spxMaxPages > spxPage\" (click)=\"onPageChange(spxPage + 1)\">\n {{ textNext | translate | capitalize }} <fa-icon [icon]=\"faArrowRight\"></fa-icon>\n </spx-button>\n</div>", dependencies: [{ kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxPaginationComponent, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
22
|
args: [{ selector: 'spx-pagination', imports: [
|
|
23
23
|
FontAwesomeModule,
|
|
@@ -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';
|
|
@@ -31,34 +30,41 @@ class SpxPatchComponent {
|
|
|
31
30
|
this.severityError = SpxSeverityEnum.error;
|
|
32
31
|
this.severityWarning = SpxSeverityEnum.warning;
|
|
33
32
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxPatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", 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
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxPatchComponent, decorators: [{
|
|
46
49
|
type: Component,
|
|
47
50
|
args: [{
|
|
48
51
|
selector: 'spx-patch',
|
|
49
52
|
imports: [
|
|
50
|
-
|
|
51
|
-
SpxAlertComponent,
|
|
53
|
+
SpxAlertComponent
|
|
52
54
|
],
|
|
53
55
|
template: `<div class="flex flex-col gap-2">
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
@if (releaseCheck) {
|
|
57
|
+
<spx-alert [spxTitle]="'Requires new release'" [spxSeverity]="severityError">
|
|
58
|
+
{{ spxText ? spxText : 'This new functionality' }} requires release {{releaseCheck}}.
|
|
59
|
+
</spx-alert>
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@if (patchCheck) {
|
|
63
|
+
<spx-alert [spxTitle]="'Softpak patch'" [spxSeverity]="severityWarning">
|
|
64
|
+
{{ spxText ? spxText : 'This new functionality' }} requires patch #{{patchCheck}} to be installed.
|
|
65
|
+
</spx-alert>
|
|
66
|
+
}
|
|
67
|
+
</div>`
|
|
62
68
|
}]
|
|
63
69
|
}], propDecorators: { spxText: [{
|
|
64
70
|
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 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 = SpxSeverityEnum.warning;\n}\n","/**\n *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