@softpak/components 19.17.0-beta.3 → 19.17.0
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 +6 -7
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-expiry.mjs +91 -23
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-button.mjs +22 -8
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-card.mjs +88 -17
- package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +64 -48
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +27 -23
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +33 -8
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +53 -39
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +6 -15
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +89 -34
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +198 -91
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pagination.mjs +21 -12
- package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs +39 -8
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-progress-bar.mjs +22 -8
- package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +160 -15
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +128 -71
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +162 -35
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +3 -3
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +54 -68
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +9 -9
- package/spx-alert/spx-alert.component.d.ts +1 -1
- package/spx-app-expiry/spx-app-expiry.component.d.ts +14 -14
- package/spx-button/spx-button.component.d.ts +3 -0
- package/spx-card/spx-card-item/spx-card-item.component.d.ts +1 -0
- package/spx-card/spx-card.component.d.ts +9 -8
- package/spx-change-details/spx-change-details.component.d.ts +23 -22
- package/spx-check-digit/spx-check-digit.component.d.ts +9 -9
- package/spx-form-section/spx-form-section.component.d.ts +5 -5
- package/spx-form-view/spx-autocomplete-search.component.d.ts +16 -15
- package/spx-form-view/spx-form-view.component.d.ts +1 -1
- package/spx-inputs/spx-input-text/spx-input-text.component.d.ts +1 -4
- package/spx-inputs/spx-input.component.d.ts +0 -1
- package/spx-navigation/public-api.d.ts +2 -2
- package/spx-navigation/spx-home-tile.component.d.ts +11 -0
- package/spx-navigation/{spx-home-tile/spx-home-tiles.component.d.ts → spx-home-tiles.component.d.ts} +2 -2
- package/spx-navigation/spx-navigation.component.d.ts +8 -11
- package/spx-navigation/store/spx-navigation/spx-navigation.actions.d.ts +3 -3
- package/spx-number-check/spx-number-check.component.d.ts +32 -26
- package/spx-pagination/spx-pagination.component.d.ts +10 -9
- package/spx-patch/spx-patch.component.d.ts +4 -4
- package/spx-progress-bar/spx-progress-bar.component.d.ts +3 -3
- package/spx-spinner/spx-spinner.component.d.ts +3 -3
- package/spx-stock-info/spx-stock-info.component.d.ts +49 -48
- package/spx-toaster/src/spx-toaster-message.interface.d.ts +1 -5
- package/spx-toaster/src/spx-toaster.component.d.ts +14 -6
- package/spx-validation/spx-validate-control.component.d.ts +19 -19
- package/tailwind.css +1 -1
- package/spx-navigation/spx-home-tile/spx-home-tile.component.d.ts +0 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { EventEmitter, Component, HostBinding, Input, Output } from '@angular/core';
|
|
3
3
|
import { SpxAlertComponent } from '@softpak/components/spx-alert';
|
|
4
4
|
import { createAction, props, union, createFeature, createReducer, on } from '@ngrx/store';
|
|
5
5
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
@@ -28,49 +28,169 @@ function toasterAutocloseSpeed(autoCloseSpeed, messageText) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
class SpxToasterComponent {
|
|
31
|
-
constructor() {
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
constructor(renderer, el) {
|
|
32
|
+
this.renderer = renderer;
|
|
33
|
+
this.el = el;
|
|
34
|
+
this.hostClass = true;
|
|
35
|
+
this.spxClose = new EventEmitter();
|
|
36
|
+
this.count = 0;
|
|
37
|
+
}
|
|
38
|
+
ngOnChanges() {
|
|
39
|
+
this.messages = this.messages.map(m => ({ ...m, autoClose: this.calcToasterAutocloseSpeed(m.autoClose, m.message) }));
|
|
40
|
+
if (this.messages.length > 0) {
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
this.messages = this.messages.map(message => {
|
|
43
|
+
if (message.autoClose) {
|
|
44
|
+
// console.log(message.autoClose);
|
|
45
|
+
// this.showProgressBar(message.autoClose, message.id)
|
|
46
|
+
// this.showProgressBar(600000, message.id)
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
this.handleClose(message.id);
|
|
49
|
+
}, message.autoClose);
|
|
50
|
+
}
|
|
51
|
+
return message;
|
|
52
|
+
});
|
|
53
|
+
}, 0);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
showProgressBar(autoclose, id) {
|
|
57
|
+
const alertElement = this.el.nativeElement.querySelector(`spx-alert[id="${id}"]`);
|
|
58
|
+
console.log(alertElement);
|
|
59
|
+
if (alertElement) {
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
console.error(`spx-alert element with ID ${id} not found.`);
|
|
63
|
+
}
|
|
44
64
|
}
|
|
45
65
|
handleClose(id) {
|
|
46
66
|
this.spxClose.emit(id);
|
|
47
67
|
}
|
|
48
|
-
|
|
49
|
-
|
|
68
|
+
calcToasterAutocloseSpeed(autoCloseSpeed, messageText) {
|
|
69
|
+
switch (autoCloseSpeed) {
|
|
70
|
+
case SpxToasterAutoCloseSpeedEnum.DEFAULT:
|
|
71
|
+
return Math.min(Math.max(messageText.length * 50, 2000), 7000);
|
|
72
|
+
case SpxToasterAutoCloseSpeedEnum.SLOW:
|
|
73
|
+
return Math.min(Math.max(messageText.length * 60, 3000), 10000);
|
|
74
|
+
default:
|
|
75
|
+
return autoCloseSpeed;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxToasterComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
79
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxToasterComponent, isStandalone: true, selector: "spx-toaster", inputs: { messages: "messages", spxAutoclose: "spxAutoclose" }, outputs: { spxClose: "spxClose" }, host: { properties: { "class.spx-toasts-displayer": "this.hostClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
80
|
+
@if (messages && messages.length > 0) {
|
|
81
|
+
<div
|
|
82
|
+
class="flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50">
|
|
83
|
+
<style>
|
|
84
|
+
.progress-bar-container {
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 5px;
|
|
87
|
+
background-color: #ccc;
|
|
88
|
+
margin-top: 8px;
|
|
89
|
+
border-radius: 2px;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
}
|
|
92
|
+
.progress-bar {
|
|
93
|
+
height: 100%;
|
|
94
|
+
background-color: #76c7c0;
|
|
95
|
+
animation-name: progress;
|
|
96
|
+
animation-timing-function: ease-in-out;
|
|
97
|
+
animation-fill-mode: forwards;
|
|
98
|
+
animation-duration: 5000;
|
|
99
|
+
}
|
|
100
|
+
@keyframes progress {
|
|
101
|
+
from {
|
|
102
|
+
width: 0%;
|
|
103
|
+
}
|
|
104
|
+
to {
|
|
105
|
+
width: 100%;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
109
|
+
@for (message of messages; track message) {
|
|
110
|
+
<spx-alert
|
|
111
|
+
[spxAutoclose]="message.autoClose"
|
|
112
|
+
[spxCloseable]="message.closeable"
|
|
113
|
+
[spxSeverity]="message.severity"
|
|
114
|
+
[spxTitle]="message.title"
|
|
115
|
+
(spxClose)="handleClose(message.id)"
|
|
116
|
+
(click)="handleClose(message.id)"
|
|
117
|
+
[id]="message.id"
|
|
118
|
+
>{{message.message}}
|
|
119
|
+
<!-- <div *ngIf="message.autoClose" class="progress-bar-container">
|
|
120
|
+
<div class="progress-bar"></div>
|
|
121
|
+
</div> -->
|
|
122
|
+
</spx-alert>
|
|
123
|
+
}
|
|
124
|
+
</div>
|
|
125
|
+
}`, isInline: true, styles: [".progress-bar-container{width:100%;height:5px;background-color:#ccc;margin-top:8px;border-radius:2px;overflow:hidden}.progress-bar{height:100%;background-color:#76c7c0;animation-name:progress;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-duration:5000}@keyframes progress{0%{width:0%}to{width:100%}}\n"], dependencies: [{ kind: "component", type: SpxAlertComponent, selector: "spx-alert", inputs: ["spxAutoclose", "spxCloseable", "spxHideTitle", "spxTitle", "spxMarginTop", "spxSeverity"], outputs: ["spxClose", "spxTitleChange"] }] }); }
|
|
50
126
|
}
|
|
51
127
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxToasterComponent, decorators: [{
|
|
52
128
|
type: Component,
|
|
53
|
-
args: [{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
129
|
+
args: [{
|
|
130
|
+
selector: 'spx-toaster',
|
|
131
|
+
template: `
|
|
132
|
+
@if (messages && messages.length > 0) {
|
|
133
|
+
<div
|
|
134
|
+
class="flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50">
|
|
135
|
+
<style>
|
|
136
|
+
.progress-bar-container {
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: 5px;
|
|
139
|
+
background-color: #ccc;
|
|
140
|
+
margin-top: 8px;
|
|
141
|
+
border-radius: 2px;
|
|
142
|
+
overflow: hidden;
|
|
143
|
+
}
|
|
144
|
+
.progress-bar {
|
|
145
|
+
height: 100%;
|
|
146
|
+
background-color: #76c7c0;
|
|
147
|
+
animation-name: progress;
|
|
148
|
+
animation-timing-function: ease-in-out;
|
|
149
|
+
animation-fill-mode: forwards;
|
|
150
|
+
animation-duration: 5000;
|
|
151
|
+
}
|
|
152
|
+
@keyframes progress {
|
|
153
|
+
from {
|
|
154
|
+
width: 0%;
|
|
65
155
|
}
|
|
66
|
-
|
|
67
|
-
|
|
156
|
+
to {
|
|
157
|
+
width: 100%;
|
|
68
158
|
}
|
|
69
|
-
set autoClose(value) {
|
|
70
|
-
if (value && value !== this._autoClose) {
|
|
71
|
-
this._autoClose = toasterAutocloseSpeed(value, this.message);
|
|
72
|
-
}
|
|
73
159
|
}
|
|
160
|
+
</style>
|
|
161
|
+
@for (message of messages; track message) {
|
|
162
|
+
<spx-alert
|
|
163
|
+
[spxAutoclose]="message.autoClose"
|
|
164
|
+
[spxCloseable]="message.closeable"
|
|
165
|
+
[spxSeverity]="message.severity"
|
|
166
|
+
[spxTitle]="message.title"
|
|
167
|
+
(spxClose)="handleClose(message.id)"
|
|
168
|
+
(click)="handleClose(message.id)"
|
|
169
|
+
[id]="message.id"
|
|
170
|
+
>{{message.message}}
|
|
171
|
+
<!-- <div *ngIf="message.autoClose" class="progress-bar-container">
|
|
172
|
+
<div class="progress-bar"></div>
|
|
173
|
+
</div> -->
|
|
174
|
+
</spx-alert>
|
|
175
|
+
}
|
|
176
|
+
</div>
|
|
177
|
+
}`,
|
|
178
|
+
imports: [
|
|
179
|
+
SpxAlertComponent
|
|
180
|
+
]
|
|
181
|
+
}]
|
|
182
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { hostClass: [{
|
|
183
|
+
type: HostBinding,
|
|
184
|
+
args: ['class.spx-toasts-displayer']
|
|
185
|
+
}], messages: [{
|
|
186
|
+
type: Input
|
|
187
|
+
}], spxClose: [{
|
|
188
|
+
type: Output
|
|
189
|
+
}], spxAutoclose: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}] } });
|
|
192
|
+
|
|
193
|
+
class SpxToasterMessageI {
|
|
74
194
|
}
|
|
75
195
|
|
|
76
196
|
const clearAll = createAction('[SPX / Toaster] Clear all', props());
|
|
@@ -115,7 +235,14 @@ var spxToaster_initial = /*#__PURE__*/Object.freeze({
|
|
|
115
235
|
});
|
|
116
236
|
|
|
117
237
|
function addMessage(currentMessages, newMessage) {
|
|
118
|
-
const messages = [
|
|
238
|
+
const messages = [{
|
|
239
|
+
autoClose: newMessage.autoClose ? newMessage.autoClose : undefined,
|
|
240
|
+
closeable: newMessage.closeable ? newMessage.closeable : true,
|
|
241
|
+
id: newMessage.id,
|
|
242
|
+
message: newMessage.message,
|
|
243
|
+
title: newMessage.title,
|
|
244
|
+
severity: newMessage.severity,
|
|
245
|
+
}, ...currentMessages];
|
|
119
246
|
if (messages.length > 5) {
|
|
120
247
|
messages.length = 5;
|
|
121
248
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-toaster.mjs","sources":["../../../../projects/softpak/components/spx-toaster/src/spx-toaster-autoclose-speed.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.html","../../../../projects/softpak/components/spx-toaster/src/spx-toaster-message.interface.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.actions.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.initial.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.reducer.ts","../../../../projects/softpak/components/spx-toaster/softpak-components-spx-toaster.ts"],"sourcesContent":["export enum SpxToasterSeverityEnum {\n ERROR = 'error',\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n}\n\nexport enum SpxToasterAutoCloseSpeedEnum {\n DEFAULT = -1,\n SLOW = -2,\n}\n\nexport function toasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string) {\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageText.length * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageText.length * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n effect,\n input,\n output,\n} from '@angular/core';\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\n\n@Component({\n selector: 'spx-toaster',\n standalone: true,\n imports: [SpxAlertComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrl: './spx-toaster.component.scss',\n templateUrl: './spx-toaster.component.html',\n host: {\n class: 'spx-toasts-displayer',\n },\n})\nexport class SpxToasterComponent {\n messages = input.required<SpxToasterMessageI[]>();\n readonly spxAutoclose = input<number>();\n spxClose = output<number>();\n constructor() {\n effect(() => {\n this.messages().forEach((message) => {\n if (message.autoClose) {\n setTimeout(() => {\n this.handleClose(message.id);\n }, message.autoClose);\n }\n });\n });\n }\n\n public handleClose(id: number) {\n this.spxClose.emit(id);\n }\n}\n","\n@if (messages().length > 0) {\n <div\n class=\"flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50\">\n @for (message of messages(); track message) {\n <spx-alert\n [spxAutoclose]=\"message.autoClose\"\n [spxCloseable]=\"message.closeable\"\n [spxSeverity]=\"message.severity\"\n [spxTitle]=\"message.title\"\n (spxClose)=\"handleClose(message.id)\"\n (click)=\"handleClose(message.id)\"\n [id]=\"message.id\"\n >{{message.message}}\n </spx-alert>\n }\n </div>\n}","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\nimport { SpxToasterAutoCloseSpeedEnum, toasterAutocloseSpeed } from \"./spx-toaster-autoclose-speed\";\n\nexport class SpxToasterMessageI {\n private _autoClose?: number;\n title?: string;\n closeable?: boolean;\n id!: number;\n message!: string;\n severity!: SpxSeverityEnum;\n uniqueIdentifier?: string;\n\n constructor(message: string, id: number, severity: SpxSeverityEnum, autoClose?: SpxToasterAutoCloseSpeedEnum, closeable?: boolean) {\n this.autoClose = autoClose;\n this.message = message || '';\n this.id = id;\n this.severity = severity;\n this.closeable = closeable;\n }\n\n get autoClose(): number | undefined {\n return this._autoClose;\n }\n\n set autoClose(value: number | undefined) {\n if (value && value !== this._autoClose) {\n this._autoClose = toasterAutocloseSpeed(value, this.message);\n }\n }\n\n}\n","import { createAction, props, union } from '@ngrx/store';\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const clearAll = createAction('[SPX / Toaster] Clear all', props<Record<string, unknown>>());\nexport const clearAllErrors = createAction('[SPX / Toaster] Clear all errors', props<Record<string, unknown>>());\nexport const clearAllErrorsAndWarnings = createAction('[SPX / Toaster] Clear all errors and warnings', props<Record<string, unknown>>());\nexport const clearMessage = createAction('[SPX / Toaster] Clear message', props<{ id: number }>());\nexport const createError = createAction('[SPX / Toaster] Create error', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createInfo = createAction('[SPX / Toaster] Create info', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createSuccess = createAction('[SPX / Toaster] Create success', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createWarning = createAction('[SPX / Toaster] Create warning', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\n\nconst all = union({\n clearAll,\n clearAllErrors,\n clearAllErrorsAndWarnings,\n clearMessage,\n createError,\n createInfo,\n createSuccess,\n createWarning,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","\nimport * as actions from './spx-toaster.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\n \nexport function addMessage(\n currentMessages: SpxToasterMessageI[], newMessage: SpxToasterMessageI): SpxToasterMessageI[] {\n const messages = [new SpxToasterMessageI(\n newMessage.message,\n newMessage.id,\n newMessage.severity,\n newMessage.autoClose ? newMessage.autoClose : undefined,\n newMessage.closeable ? newMessage.closeable : true,\n ), ...currentMessages];\n if (messages.length > 5) {\n messages.length = 5;\n }\n return messages;\n}\n\nexport default createFeature({\n name: 'spxToaster',\n reducer: createReducer(\n initialState,\n on(actions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(actions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(actions.clearAllErrorsAndWarnings, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&\n msg.severity !== SpxSeverityEnum.warning)]\n };\n }),\n on(actions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(actions.createError, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.error,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createInfo, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.info,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createSuccess, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.success,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createWarning, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.warning,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.clearAll","actions.clearAllErrors","actions.clearAllErrorsAndWarnings","actions.clearMessage","actions.createError","actions.createInfo","actions.createSuccess","actions.createWarning"],"mappings":";;;;;;IAAY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,GAKjC,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,4BAA4B,EAAA;AACpC,IAAA,4BAAA,CAAA,4BAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,SAAY;AACZ,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,MAAS;AACb,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,GAGvC,EAAA,CAAA,CAAA;AAEe,SAAA,qBAAqB,CAAC,cAA4C,EAAE,WAAmB,EAAA;IACnG,QAAQ,cAAc;QAClB,KAAK,4BAA4B,CAAC,OAAO;AACrC,YAAA,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC;QAClE,KAAK,4BAA4B,CAAC,IAAI;AAClC,YAAA,OAAO,IA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../../../../projects/softpak/components/spx-toaster/src/spx-toaster-autoclose-speed.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster.component.ts","../../../../projects/softpak/components/spx-toaster/src/spx-toaster-message.interface.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.actions.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.initial.ts","../../../../projects/softpak/components/spx-toaster/store/spx-toaster/spx-toaster.reducer.ts","../../../../projects/softpak/components/spx-toaster/softpak-components-spx-toaster.ts"],"sourcesContent":["export enum SpxToasterSeverityEnum {\n ERROR = 'error',\n INFO = 'info',\n SUCCESS = 'success',\n WARNING = 'warning',\n}\n\nexport enum SpxToasterAutoCloseSpeedEnum {\n DEFAULT = -1,\n SLOW = -2,\n}\n\nexport function toasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string) {\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageText.length * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageText.length * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n OnChanges,\n OnInit,\n Output,\n Renderer2\n} from '@angular/core';\nimport { SpxToasterMessageI } from './spx-toaster-message.interface';\nimport { SpxAlertComponent } from '@softpak/components/spx-alert';\n\nimport { SpxToasterAutoCloseSpeedEnum } from './spx-toaster-autoclose-speed';\n\n@Component({\n selector: 'spx-toaster',\n template: `\n @if (messages && messages.length > 0) {\n <div\n class=\"flex flex-col gap-2 fixed bottom-16 left-0 right-0 mx-auto px-3 z-50\">\n <style>\n .progress-bar-container {\n width: 100%;\n height: 5px;\n background-color: #ccc;\n margin-top: 8px;\n border-radius: 2px;\n overflow: hidden;\n }\n .progress-bar {\n height: 100%;\n background-color: #76c7c0;\n animation-name: progress;\n animation-timing-function: ease-in-out;\n animation-fill-mode: forwards;\n animation-duration: 5000;\n }\n @keyframes progress {\n from {\n width: 0%;\n }\n to {\n width: 100%;\n }\n }\n </style>\n @for (message of messages; track message) {\n <spx-alert\n [spxAutoclose]=\"message.autoClose\"\n [spxCloseable]=\"message.closeable\"\n [spxSeverity]=\"message.severity\"\n [spxTitle]=\"message.title\"\n (spxClose)=\"handleClose(message.id)\"\n (click)=\"handleClose(message.id)\"\n [id]=\"message.id\"\n >{{message.message}}\n <!-- <div *ngIf=\"message.autoClose\" class=\"progress-bar-container\">\n <div class=\"progress-bar\"></div>\n </div> -->\n </spx-alert>\n }\n </div>\n }`,\n imports: [\n SpxAlertComponent\n ]\n})\nexport class SpxToasterComponent implements OnChanges {\n @HostBinding('class.spx-toasts-displayer') hostClass = true;\n @Input() messages!: SpxToasterMessageI[];\n @Output() spxClose: EventEmitter<number> = new EventEmitter<number>();\n @Input() spxAutoclose: number | undefined;\n count: number = 0;\n constructor(private renderer: Renderer2, private el: ElementRef) { \n\n }\n\n\n ngOnChanges() {\n this.messages = this.messages.map(m => ({ ...m, autoClose: this.calcToasterAutocloseSpeed(m.autoClose, m.message) }));\n if (this.messages.length > 0) {\n setTimeout(() => {\n this.messages = this.messages.map(message => {\n if (message.autoClose) {\n // console.log(message.autoClose);\n // this.showProgressBar(message.autoClose, message.id)\n // this.showProgressBar(600000, message.id)\n setTimeout(() => {\n this.handleClose(message.id)\n }, message.autoClose);\n }\n return message;\n });\n }, 0);\n }\n }\n \n\n showProgressBar(autoclose: number, id: number) {\n const alertElement = this.el.nativeElement.querySelector(`spx-alert[id=\"${id}\"]`);\n console.log(alertElement);\n if (alertElement) {\n \n } else {\n console.error(`spx-alert element with ID ${id} not found.`);\n }\n }\n \n\n public handleClose(id: number) {\n this.spxClose.emit(id);\n }\n\n private calcToasterAutocloseSpeed(autoCloseSpeed: SpxToasterAutoCloseSpeedEnum, messageText: string): number {\n switch (autoCloseSpeed) {\n case SpxToasterAutoCloseSpeedEnum.DEFAULT:\n return Math.min(Math.max(messageText.length * 50, 2000), 7000);\n case SpxToasterAutoCloseSpeedEnum.SLOW:\n return Math.min(Math.max(messageText.length * 60, 3000), 10000);\n default:\n return autoCloseSpeed;\n }\n }\n}\n","import { SpxSeverityEnum } from \"@softpak/components/spx-helpers\";\n\nexport class SpxToasterMessageI {\n autoClose?: any;\n title?: string;\n closeable?: boolean;\n id!: number;\n message!: string;\n severity!: SpxSeverityEnum;\n uniqueIdentifier?: string;\n}\n","import { createAction, props, union } from '@ngrx/store';\nimport { SpxToasterAutoCloseSpeedEnum } from '../../src/spx-toaster-autoclose-speed';\n\nexport const clearAll = createAction('[SPX / Toaster] Clear all', props<Record<string, unknown>>());\nexport const clearAllErrors = createAction('[SPX / Toaster] Clear all errors', props<Record<string, unknown>>());\nexport const clearAllErrorsAndWarnings = createAction('[SPX / Toaster] Clear all errors and warnings', props<Record<string, unknown>>());\nexport const clearMessage = createAction('[SPX / Toaster] Clear message', props<{ id: number }>());\nexport const createError = createAction('[SPX / Toaster] Create error', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createInfo = createAction('[SPX / Toaster] Create info', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createSuccess = createAction('[SPX / Toaster] Create success', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\nexport const createWarning = createAction('[SPX / Toaster] Create warning', props<{ autoClose?: number | SpxToasterAutoCloseSpeedEnum, closeable?: boolean, messageText: string, title?: string }>());\n\nconst all = union({\n clearAll,\n clearAllErrors,\n clearAllErrorsAndWarnings,\n clearMessage,\n createError,\n createInfo,\n createSuccess,\n createWarning,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-toaster.state\";\n\nexport const initialState: StateI = {\n messages: [],\n nextId: 1,\n};\n","\nimport * as actions from './spx-toaster.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-toaster.state';\nimport { initialState } from './spx-toaster.initial';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { toasterAutocloseSpeed } from '../../src/spx-toaster-autoclose-speed';\nimport { SpxToasterMessageI } from '../../src/spx-toaster-message.interface';\n \nexport function addMessage(\n currentMessages: SpxToasterMessageI[], newMessage: SpxToasterMessageI): SpxToasterMessageI[] {\n const messages = [{\n autoClose: newMessage.autoClose ? newMessage.autoClose : undefined,\n closeable: newMessage.closeable ? newMessage.closeable : true,\n id: newMessage.id,\n message: newMessage.message,\n title: newMessage.title,\n severity: newMessage.severity,\n }, ...currentMessages];\n if (messages.length > 5) {\n messages.length = 5;\n }\n return messages;\n}\n\nexport default createFeature({\n name: 'spxToaster',\n reducer: createReducer(\n initialState,\n on(actions.clearAll, (state: StateI): StateI => {\n return {\n ...state,\n messages: []\n };\n }),\n on(actions.clearAllErrors, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error)]\n };\n }),\n on(actions.clearAllErrorsAndWarnings, (state: StateI): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.severity !== SpxSeverityEnum.error &&\n msg.severity !== SpxSeverityEnum.warning)]\n };\n }),\n on(actions.clearMessage, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: [...state.messages.filter(msg => msg.id !== action.id)]\n };\n }),\n on(actions.createError, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.error,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createInfo, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.info,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createSuccess, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.success,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n on(actions.createWarning, (state: StateI, action): StateI => {\n return {\n ...state,\n messages: addMessage(state.messages, {\n autoClose: action.autoClose ? toasterAutocloseSpeed(action.autoClose, action.messageText) : undefined,\n closeable: action.closeable ? action.closeable : true,\n id: state.nextId,\n message: action.messageText,\n severity: SpxSeverityEnum.warning,\n title: action.title,\n }),\n nextId: state.nextId + 1\n };\n }),\n ),\n});\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.clearAll","actions.clearAllErrors","actions.clearAllErrorsAndWarnings","actions.clearMessage","actions.createError","actions.createInfo","actions.createSuccess","actions.createWarning"],"mappings":";;;;;;IAAY;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAC9B,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,sBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,GAKjC,EAAA,CAAA,CAAA;IAEW;AAAZ,CAAA,UAAY,4BAA4B,EAAA;AACpC,IAAA,4BAAA,CAAA,4BAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA,GAAA,SAAY;AACZ,IAAA,4BAAA,CAAA,4BAAA,CAAA,MAAA,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C;;;;;;;;;;;;AC/GF;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, signal,
|
|
2
|
+
import { Component, signal, Injectable } from '@angular/core';
|
|
3
3
|
import { TranslatePipe } from '@ngx-translate/core';
|
|
4
4
|
import * as i3 from '@ionic/angular/standalone';
|
|
5
5
|
import { IonContent, IonHeader, IonToolbar, IonTitle } from '@ionic/angular/standalone';
|
|
@@ -235,7 +235,7 @@ class SpxUpdatePendingComponent {
|
|
|
235
235
|
this.appStore.dispatch(acceptUpdate({}));
|
|
236
236
|
}
|
|
237
237
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxUpdatePendingComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
238
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxUpdatePendingComponent, isStandalone: true, selector: "spx-update-pending", ngImport: i0, template: "@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}", dependencies: [{ 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: "pipe", type: TranslatePipe, name: "translate" }]
|
|
238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxUpdatePendingComponent, isStandalone: true, selector: "spx-update-pending", ngImport: i0, template: "@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}", dependencies: [{ 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: "pipe", type: TranslatePipe, name: "translate" }] }); }
|
|
239
239
|
}
|
|
240
240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxUpdatePendingComponent, decorators: [{
|
|
241
241
|
type: Component,
|
|
@@ -243,7 +243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
243
243
|
SpxButtonComponent,
|
|
244
244
|
SpxCapitalizePipe,
|
|
245
245
|
TranslatePipe,
|
|
246
|
-
],
|
|
246
|
+
], template: "@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}" }]
|
|
247
247
|
}], ctorParameters: () => [{ type: i1.Store }] });
|
|
248
248
|
|
|
249
249
|
const spxUpdateUrl = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.html","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.html","../../../../projects/softpak/components/spx-update/spx-update-url.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.effects.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.effects.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\n\nexport const anUpdateIsReady = createAction('[SPX / Update Check] An update is ready', props<Record<string, unknown>>());\nexport const clearError = createAction('[SPX / Update Check] Clear error', props<Record<string, unknown>>());\nexport const checkFailed = createAction('[SPX / Update Check] Error happened', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const initialize = createAction('[SPX / Update Check] Initialize', props<Record<string, unknown>>());\nexport const noUpdateWasFound = createAction('[SPX / Update Check] No update was found', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const notAvailableOnWeb = createAction('[SPX / Update Check] Not available on web', props<Record<string, unknown>>());\nexport const runCheck = createAction('[SPX / Update Check] Run', props<{ forceWaitForUpdate?: boolean; }>());\n\nconst all = union({\n anUpdateIsReady,\n clearError,\n checkFailed,\n initialize,\n noUpdateWasFound,\n notAvailableOnWeb,\n runCheck,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastCheck: null,\n showError: false,\n};\n","\nimport * as actions from './spx-update-check.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { DateTime } from 'luxon';\n \nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(actions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n showError: false,\n };\n }),\n on(actions.checkFailed, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n showError: true,\n };\n }),\n on(actions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\n };\n }),\n on(actions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false\n };\n }),\n ),\n});\n","import { Component } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { runCheck } from './store/spx-update-check/spx-update-check.actions';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\nimport { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextCheckingForUpdates, spxTextOneMomentPlease } from '@softpak/components/spx-translate';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n selector: 'spx-update-page',\n imports: [\n IonContent,\n IonHeader,\n IonToolbar,\n IonTitle,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-page.component.html`,\n})\nexport class SpxUpdatePageComponent {\n spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n\n private subscriptions: {\n updCheck?: Subscription;\n } = {};\n\n ngOnInit() {\n console.log('ngOnInit event fired');\n\n this.appStore.dispatch(runCheck({ forceWaitForUpdate: true }));\n this.subscriptions.updCheck = this.appStore.select(updCheck.selectForceWaitForUpdate).subscribe(forceWaitForUpdate => {\n if (forceWaitForUpdate === false) {\n if (this.activatedRoute.snapshot.data['url'] === undefined) {\n console.error('configure data property \\'url\\' in route for update page');\n }\n this.navController.navigateRoot(this.activatedRoute.snapshot.data['url']);\n }\n });\n }\n\n ngOnDestroy() {\n console.log('ngOnDestroy event fired');\n\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\n console.log('UPD constructor');\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n","import { createAction, props, union } from '@ngrx/store';\n\nexport const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props<Record<string, unknown>>());\nexport const hasBeenDownloaded = createAction('[SPX / Update Pending] Has been downloaded', props<Record<string, unknown>>());\nexport const hasBeenInstalled = createAction('[SPX / Update Pending] Has been installed', props<Record<string, unknown>>());\nexport const postpone = createAction('[SPX / Update Pending] Postpone', props<Record<string, unknown>>());\nexport const postponeExpired = createAction('[SPX / Update Pending] Postpone expired', props<Record<string, unknown>>());\n\nconst all = union({\n acceptUpdate,\n hasBeenDownloaded,\n hasBeenInstalled,\n postpone,\n postponeExpired,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","\nimport * as actions from './spx-update-pending.actions';\nimport { createReducer, on, createFeature } from '@ngrx/store';\nimport { StateI } from './spx-update-pending.state';\nimport { initialState } from './spx-update-pending.initial';\n\nexport default createFeature({\n name: 'spxUpdatePending',\n reducer: createReducer(\n initialState,\n on(actions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(actions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(actions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(actions.postponeExpired, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n };\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, signal } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { acceptUpdate } from './store/spx-update-pending/spx-update-pending.actions';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-update-pending',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-pending.component.html`,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxUpdatePendingComponent {\n availableStoreVersion = signal<undefined | string>(undefined);\n currentStoreVersion = signal<undefined | string>(undefined);\n severitySuccess = SpxSeverityEnum.success;\n showLiveUpdateReady = signal<boolean>(false);\n spxTextUpdate = spxTextUpdate;\n spxTextReadyToBeInstalled = spxTextReadyToBeInstalled;\n spxTextPatchAvailable = spxTextPatchAvailable;\n spxTextUpdateAvailable = spxTextUpdateAvailable;\n spxTextOpenAppStore = spxTextOpenAppStore;\n\n private subscriptions: {\n updPending?: Subscription;\n } = {};\n\n ngOnInit() {\n this.subscriptions.updPending = this.appStore.select(updPending.selectShowLiveUpdateReady).subscribe(showLiveUpdateReady => {\n this.showLiveUpdateReady.set(showLiveUpdateReady);\n });\n }\n\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n ) {}\n\n onUpdate(): void {\n this.appStore.dispatch(acceptUpdate({}));\n }\n}\n","@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}","export const spxUpdateUrl = '';","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { from, Observable, of } from 'rxjs';\nimport { catchError, delay, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-check.actions';\nimport { getConfig, reload, setConfig, sync, SyncResult } from '@capacitor/live-updates';\nimport { captureMessage } from '@sentry/angular';\nimport { Capacitor } from '@capacitor/core';\nimport { App } from '@capacitor/app';\nimport { hasBeenDownloaded } from '../spx-update-pending/spx-update-pending.actions';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\n\n@Injectable()\nexport class Effects {\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.initialize),\n delay(120000),\n mergeMap(() => [\n actions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.runCheck),\n tap(async () => {\n if (Capacitor.getPlatform() !== 'web') {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryInfo = await App.getInfo()\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n const config = await getConfig();\n const channelVersionGroup = config.channel!.split('-')[1].substring(0, 3); // e.g. \"1.4\"\n let channelType = config.channel!.split('-')[0];\n // Temp fix\n if (channelType === 'null') {\n channelType = 'Production';\n }\n // End temp fix\n if (channelType === null || binaryVersionGroup != channelVersionGroup) {\n await setConfig({\n channel: `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`\n });\n }\n // End migrate from e.g. 1.2.x to 1.3.x\n }\n }),\n exhaustMap((action) => from(sync()).pipe(\n map((syncResult: SyncResult) => {\n if (syncResult.activeApplicationPathChanged) {\n if (action.forceWaitForUpdate) {\n reload();\n }\n return actions.anUpdateIsReady({});\n } else {\n return actions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\n }\n }),\n catchError((err) => {\n if (err.message !== 'Not implemented for web only') {\n captureMessage(\"[UPD] Handled: \" + err.message);\n }\n return err.message === 'Not implemented for web only' ? of(actions.notAvailableOnWeb({})) : of(actions.checkFailed({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }))\n })\n )),\n ));\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.anUpdateIsReady),\n mergeMap(() => [\n hasBeenDownloaded({}),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n}\n\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-pending.actions';\nimport { reload } from '@capacitor/live-updates';\n\n@Injectable()\nexport class Effects {\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAccepted$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.acceptUpdate),\n mergeMap(() => {\n reload();\n return []; \n })) as any\n );\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["all","initialState","actions.anUpdateIsReady","actions.clearError","actions.checkFailed","actions.noUpdateWasFound","actions.runCheck","actions.notAvailableOnWeb","actions.hasBeenDownloaded","actions.hasBeenInstalled","actions.postpone","actions.postponeExpired","actions.initialize","i1","Effects","actions.acceptUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,YAAY,CAAC,yCAAyC,EAAE,KAAK,EAA2B,CAAC;AACjH,MAAM,UAAU,GAAG,YAAY,CAAC,kCAAkC,EAAE,KAAK,EAA2B,CAAC;AACrG,MAAM,WAAW,GAAG,YAAY,CAAC,qCAAqC,EAAE,KAAK,EAA8C,CAAC;AAC5H,MAAM,UAAU,GAAG,YAAY,CAAC,iCAAiC,EAAE,KAAK,EAA2B,CAAC;AACpG,MAAM,gBAAgB,GAAG,YAAY,CAAC,0CAA0C,EAAE,KAAK,EAA8C,CAAC;AACtI,MAAM,iBAAiB,GAAG,YAAY,CAAC,2CAA2C,EAAE,KAAK,EAA2B,CAAC;AACrH,MAAM,QAAQ,GAAG,YAAY,CAAC,0BAA0B,EAAE,KAAK,EAAqC,CAAC;AAE5G,MAAMA,KAAG,GAAG,KAAK,CAAC;IACd,eAAe;IACf,UAAU;IACV,WAAW;IACX,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,QAAQ;AACX,CAAA,CAAC;;;;;;;;;;;;;AChBK,MAAMC,cAAY,GAAW;AAChC,IAAA,kBAAkB,EAAE,KAAK;AACzB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,KAAK;CACnB;;;;;;;ACCD,eAAe,aAAa,CAAC;AACzB,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,OAAO,EAAE,aAAa,CAClBA,cAAY,EACZ,EAAE,CAACC,eAAuB,EAAE,CAAC,KAAa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C,MAAM,KAAK,CAAC,MAAM,CAAC,4BAA4B,GAAG,EAAE,GAAG;AAC7D,YAAAC,QAAgB,CAAC,EAAE,CAAC;SACvB,CAAC,CAAC,CACN;;8GA5EQ,OAAO,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAO,IAAA,CAAA,OAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAPC,SAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;;;;;MCJY,OAAO,CAAA;AAEhB,IAAA,WAAA,CACqB,QAAiB,EAAA;QAAjB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAG7B,IAAa,CAAA,aAAA,GAAoB,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAClE,MAAM,CAACC,YAAoB,CAAC,EAC5B,QAAQ,CAAC,MAAK;AACV,YAAA,MAAM,EAAE;AACR,YAAA,OAAO,EAAE;SACZ,CAAC,CAAQ,CACb;;8GAZQ,OAAO,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAF,IAAA,CAAA,OAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;;;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-update.mjs","sources":["../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.ts","../../../../projects/softpak/components/spx-update/spx-update-page.component.html","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.actions.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.initial.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.reducer.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.ts","../../../../projects/softpak/components/spx-update/spx-update-pending.component.html","../../../../projects/softpak/components/spx-update/spx-update-url.ts","../../../../projects/softpak/components/spx-update/store/spx-update-check/spx-update-check.effects.ts","../../../../projects/softpak/components/spx-update/store/spx-update-pending/spx-update-pending.effects.ts","../../../../projects/softpak/components/spx-update/softpak-components-spx-update.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\n\nexport const anUpdateIsReady = createAction('[SPX / Update Check] An update is ready', props<Record<string, unknown>>());\nexport const clearError = createAction('[SPX / Update Check] Clear error', props<Record<string, unknown>>());\nexport const checkFailed = createAction('[SPX / Update Check] Error happened', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const initialize = createAction('[SPX / Update Check] Initialize', props<Record<string, unknown>>());\nexport const noUpdateWasFound = createAction('[SPX / Update Check] No update was found', props<{ startUpdateAgainAfterTimeout?: boolean }>());\nexport const notAvailableOnWeb = createAction('[SPX / Update Check] Not available on web', props<Record<string, unknown>>());\nexport const runCheck = createAction('[SPX / Update Check] Run', props<{ forceWaitForUpdate?: boolean; }>());\n\nconst all = union({\n anUpdateIsReady,\n clearError,\n checkFailed,\n initialize,\n noUpdateWasFound,\n notAvailableOnWeb,\n runCheck,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-check.state\";\n\nexport const initialState: StateI = {\n forceWaitForUpdate: false,\n lastCheck: null,\n showError: false,\n};\n","\nimport * as actions from './spx-update-check.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { StateI } from './spx-update-check.state';\nimport { initialState } from './spx-update-check.initial';\nimport { DateTime } from 'luxon';\n \nexport default createFeature({\n name: 'spxUpdateCheck',\n reducer: createReducer(\n initialState,\n on(actions.anUpdateIsReady, (state: StateI): StateI => {\n return {\n ...state,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.clearError, (state: StateI): StateI => {\n return {\n ...state,\n showError: false,\n };\n }),\n on(actions.checkFailed, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n showError: true,\n };\n }),\n on(actions.noUpdateWasFound, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false,\n lastCheck: DateTime.now().toISO(),\n showError: false,\n };\n }),\n on(actions.runCheck, (state: StateI, { forceWaitForUpdate }): StateI => {\n return {\n ...state,\n forceWaitForUpdate: forceWaitForUpdate ? true : state.forceWaitForUpdate\n };\n }),\n on(actions.notAvailableOnWeb, (state: StateI): StateI => {\n return {\n ...state,\n forceWaitForUpdate: false\n };\n }),\n ),\n});\n","import { Component } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { IonContent, IonHeader, IonTitle, IonToolbar, NavController } from '@ionic/angular/standalone';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { runCheck } from './store/spx-update-check/spx-update-check.actions';\nimport { default as updCheck } from './store/spx-update-check/spx-update-check.reducer';\nimport { unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextCheckingForUpdates, spxTextOneMomentPlease } from '@softpak/components/spx-translate';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n selector: 'spx-update-page',\n imports: [\n IonContent,\n IonHeader,\n IonToolbar,\n IonTitle,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-page.component.html`,\n})\nexport class SpxUpdatePageComponent {\n spxTextCheckingForUpdates = spxTextCheckingForUpdates;\n spxTextOneMomentPlease = spxTextOneMomentPlease;\n\n private subscriptions: {\n updCheck?: Subscription;\n } = {};\n\n ngOnInit() {\n console.log('ngOnInit event fired');\n\n this.appStore.dispatch(runCheck({ forceWaitForUpdate: true }));\n this.subscriptions.updCheck = this.appStore.select(updCheck.selectForceWaitForUpdate).subscribe(forceWaitForUpdate => {\n if (forceWaitForUpdate === false) {\n if (this.activatedRoute.snapshot.data['url'] === undefined) {\n console.error('configure data property \\'url\\' in route for update page');\n }\n this.navController.navigateRoot(this.activatedRoute.snapshot.data['url']);\n }\n });\n }\n\n ngOnDestroy() {\n console.log('ngOnDestroy event fired');\n\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n private readonly activatedRoute: ActivatedRoute,\n private readonly navController: NavController,\n ) {\n console.log('UPD constructor');\n }\n}\n","<ion-header>\n <ion-toolbar>\n <ion-title>\n {{ spxTextCheckingForUpdates | translate | capitalize }}\n </ion-title>\n </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n {{ spxTextOneMomentPlease | translate | capitalize }}...\n</ion-content>\n","import { createAction, props, union } from '@ngrx/store';\n\nexport const acceptUpdate = createAction('[SPX / Update Pending] Accept update', props<Record<string, unknown>>());\nexport const hasBeenDownloaded = createAction('[SPX / Update Pending] Has been downloaded', props<Record<string, unknown>>());\nexport const hasBeenInstalled = createAction('[SPX / Update Pending] Has been installed', props<Record<string, unknown>>());\nexport const postpone = createAction('[SPX / Update Pending] Postpone', props<Record<string, unknown>>());\nexport const postponeExpired = createAction('[SPX / Update Pending] Postpone expired', props<Record<string, unknown>>());\n\nconst all = union({\n acceptUpdate,\n hasBeenDownloaded,\n hasBeenInstalled,\n postpone,\n postponeExpired,\n});\n\nexport type Actions = typeof all;\n","import { StateI } from \"./spx-update-pending.state\";\n\nexport const initialState: StateI = {\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n};\n","\nimport * as actions from './spx-update-pending.actions';\nimport { createReducer, on, createFeature } from '@ngrx/store';\nimport { StateI } from './spx-update-pending.state';\nimport { initialState } from './spx-update-pending.initial';\n\nexport default createFeature({\n name: 'spxUpdatePending',\n reducer: createReducer(\n initialState,\n on(actions.hasBeenDownloaded, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n updateIsDownloadedAndPending: true,\n };\n }),\n on(actions.hasBeenInstalled, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n updateIsDownloadedAndPending: false,\n };\n }),\n on(actions.postpone, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: false,\n };\n }),\n on(actions.postponeExpired, (state: StateI): StateI => {\n return {\n ...state,\n showLiveUpdateReady: true,\n };\n }),\n ),\n});\n","import { Component, computed, signal } from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { Store } from '@ngrx/store';\nimport { acceptUpdate } from './store/spx-update-pending/spx-update-pending.actions';\nimport { default as updPending } from './store/spx-update-pending/spx-update-pending.reducer';\nimport { SpxSeverityEnum, unsubscribeSubscriptions } from '@softpak/components/spx-helpers';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextOpenAppStore, spxTextPatchAvailable, spxTextReadyToBeInstalled, spxTextUpdate, spxTextUpdateAvailable } from '@softpak/components/spx-translate';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-update-pending',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n templateUrl: `./spx-update-pending.component.html`,\n})\nexport class SpxUpdatePendingComponent {\n availableStoreVersion = signal<undefined | string>(undefined);\n currentStoreVersion = signal<undefined | string>(undefined);\n severitySuccess = SpxSeverityEnum.success;\n showLiveUpdateReady = signal<boolean>(false);\n spxTextUpdate = spxTextUpdate;\n spxTextReadyToBeInstalled = spxTextReadyToBeInstalled;\n spxTextPatchAvailable = spxTextPatchAvailable;\n spxTextUpdateAvailable = spxTextUpdateAvailable;\n spxTextOpenAppStore = spxTextOpenAppStore;\n\n private subscriptions: {\n updPending?: Subscription;\n } = {};\n\n ngOnInit() {\n this.subscriptions.updPending = this.appStore.select(updPending.selectShowLiveUpdateReady).subscribe(showLiveUpdateReady => {\n this.showLiveUpdateReady.set(showLiveUpdateReady);\n });\n }\n\n ngOnDestroy() {\n unsubscribeSubscriptions(this.subscriptions);\n }\n\n constructor(\n private readonly appStore: Store,\n ) {}\n\n onUpdate(): void {\n this.appStore.dispatch(acceptUpdate({}));\n }\n}\n","@if (showLiveUpdateReady()) {\n<div class=\"bg-zinc-700 text-black p-3 rounded flex gap-3 mx-auto max-w-lg items-center\">\n <div class=\"grow\">\n <p\n class=\"text-xl font-extrabold bg-clip-text text-transparent bg-[linear-gradient(to_right,theme(colors.green.300),theme(colors.green.100),theme(colors.sky.400),theme(colors.yellow.200),theme(colors.sky.400),theme(colors.green.100),theme(colors.green.300))] bg-[length:200%_auto] animate-gradient\">\n {{ spxTextPatchAvailable | translate | capitalize }}</p>\n <div class=\"text-sm text-zinc-300\">{{ spxTextReadyToBeInstalled | translate | capitalize }}</div>\n </div>\n <spx-button [spxSeverity]=\"severitySuccess\" (spxClick)=\"onUpdate()\">{{ spxTextUpdate | translate | capitalize\n }}</spx-button>\n</div>\n}","export const spxUpdateUrl = '';","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { from, Observable, of } from 'rxjs';\nimport { catchError, delay, exhaustMap, map, mergeMap, tap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-check.actions';\nimport { getConfig, reload, setConfig, sync, SyncResult } from '@capacitor/live-updates';\nimport { captureMessage } from '@sentry/angular';\nimport { Capacitor } from '@capacitor/core';\nimport { App } from '@capacitor/app';\nimport { hasBeenDownloaded } from '../spx-update-pending/spx-update-pending.actions';\nimport { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\n\n@Injectable()\nexport class Effects {\n afterInitialize$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.initialize),\n delay(120000),\n mergeMap(() => [\n actions.runCheck({}),\n ]))\n );\n onRun$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.runCheck),\n tap(async () => {\n if (Capacitor.getPlatform() !== 'web') {\n // Migrate from e.g. 1.2.x to 1.3.x\n const binaryInfo = await App.getInfo()\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n const config = await getConfig();\n const channelVersionGroup = config.channel!.split('-')[1].substring(0, 3); // e.g. \"1.4\"\n let channelType = config.channel!.split('-')[0];\n // Temp fix\n if (channelType === 'null') {\n channelType = 'Production';\n }\n // End temp fix\n if (channelType === null || binaryVersionGroup != channelVersionGroup) {\n await setConfig({\n channel: `${channelType ? channelType : SpxAppChannelTypeEnum.production}-${binaryVersionGroup}.x`\n });\n }\n // End migrate from e.g. 1.2.x to 1.3.x\n }\n }),\n exhaustMap((action) => from(sync()).pipe(\n map((syncResult: SyncResult) => {\n if (syncResult.activeApplicationPathChanged) {\n if (action.forceWaitForUpdate) {\n reload();\n }\n return actions.anUpdateIsReady({});\n } else {\n return actions.noUpdateWasFound({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate });\n }\n }),\n catchError((err) => {\n if (err.message !== 'Not implemented for web only') {\n captureMessage(\"[UPD] Handled: \" + err.message);\n }\n return err.message === 'Not implemented for web only' ? of(actions.notAvailableOnWeb({})) : of(actions.checkFailed({ startUpdateAgainAfterTimeout: !action.forceWaitForUpdate }))\n })\n )),\n ));\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAndUpdateIsReady$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.anUpdateIsReady),\n mergeMap(() => [\n hasBeenDownloaded({}),\n ]))\n );\n\n whenCheckHasFailed$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.checkFailed),\n delay(30000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n\n whenNoUpdateWasFound$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.noUpdateWasFound),\n delay(120000),\n mergeMap((action) => !action.startUpdateAgainAfterTimeout ? [] : [\n actions.runCheck({}),\n ]))\n );\n}\n\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-update-pending.actions';\nimport { reload } from '@capacitor/live-updates';\n\n@Injectable()\nexport class Effects {\n\n constructor(\n private readonly actions$: Actions,\n ) { }\n\n whenAccepted$: Observable<any> = createEffect(() => this.actions$.pipe(\n ofType(actions.acceptUpdate),\n mergeMap(() => {\n reload();\n return []; \n })) as any\n );\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["all","initialState","actions.anUpdateIsReady","actions.clearError","actions.checkFailed","actions.noUpdateWasFound","actions.runCheck","actions.notAvailableOnWeb","actions.hasBeenDownloaded","actions.hasBeenInstalled","actions.postpone","actions.postponeExpired","actions.initialize","i1","Effects","actions.acceptUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,YAAY,CAAC,yCAAyC,EAAE,KAAK,EAA2B,CAAC;AACjH,MAAM,UAAU,GAAG,YAAY,CAAC,kCAAkC,EAAE,KAAK,EAA2B,CAAC;AACrG,MAAM,WAAW,GAAG,YAAY,CAAC,qCAAqC,EAAE,KAAK,EAA8C,CAAC;AAC5H,MAAM,UAAU,GAAG,YAAY,CAAC,iCAAiC,EAAE,KAAK,EAA2B,CAAC;AACpG,MAAM,gBAAgB,GAAG,YAAY,CAAC,0CAA0C,EAAE,KAAK,EAA8C,CAAC;AACtI,MAAM,iBAAiB,GAAG,YAAY,CAAC,2CAA2C,EAAE,KAAK,EAA2B,CAAC;AACrH,MAAM,QAAQ,GAAG,YAAY,CAAC,0BAA0B,EAAE,KAAK,EAAqC,CAAC;AAE5G,MAAMA,KAAG,GAAG,KAAK,CAAC;IACd,eAAe;IACf,UAAU;IACV,WAAW;IACX,UAAU;IACV,gBAAgB;IAChB,iBAAiB;IACjB,QAAQ;AACX,CAAA,CAAC;;;;;;;;;;;;;AChB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