uni-app-fe 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/fesm2022/uni-app-fe.mjs +487 -0
- package/fesm2022/uni-app-fe.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/manager/index.d.ts +1 -0
- package/manager/locale.manager.d.ts +12 -0
- package/package.json +25 -0
- package/pipe/index.d.ts +2 -0
- package/pipe/uni-translate-inline-params.pipe.d.ts +7 -0
- package/pipe/uni-translate.pipe.d.ts +7 -0
- package/public-api.d.ts +3 -0
- package/service/index.d.ts +3 -0
- package/service/uni-loader.service.d.ts +9 -0
- package/service/uni-popup.service.d.ts +82 -0
- package/service/uni-toast.service.d.ts +11 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# UniAppFe
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build uni-app-fe
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/uni-app-fe
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { registerLocaleData } from '@angular/common';
|
|
2
|
+
import localeEs from '@angular/common/locales/es';
|
|
3
|
+
import localeIt from '@angular/common/locales/it';
|
|
4
|
+
import { locale, loadMessages } from 'devextreme/localization';
|
|
5
|
+
import esMessages from 'devextreme/localization/messages/es.json';
|
|
6
|
+
import itMessages from 'devextreme/localization/messages/it.json';
|
|
7
|
+
import { UniLocaleManager } from 'uni-manager';
|
|
8
|
+
import * as i0 from '@angular/core';
|
|
9
|
+
import { Pipe, Injectable } from '@angular/core';
|
|
10
|
+
import LoadPanel from 'devextreme/ui/load_panel';
|
|
11
|
+
import { custom } from 'devextreme/ui/dialog';
|
|
12
|
+
import Popup from 'devextreme/ui/popup';
|
|
13
|
+
import notify from 'devextreme/ui/notify';
|
|
14
|
+
|
|
15
|
+
class UniLocaleManagerAngular {
|
|
16
|
+
/* ------------------------------------------------------------------------------- */
|
|
17
|
+
/* ----------------------------------- Metodi ------------------------------------ */
|
|
18
|
+
/* ------------------------------------------------------------------------------- */
|
|
19
|
+
/**
|
|
20
|
+
* Registra i dati specifici del locale nel framework Angular.
|
|
21
|
+
* Necessario per garantire che le pipe built-in (es. DatePipe, CurrencyPipe) operino secondo le convenzioni del paese corrente.
|
|
22
|
+
*/
|
|
23
|
+
static setLocaleAngular() {
|
|
24
|
+
/* Imposta i dati del locale corrente in Angular necessari per le pipe */
|
|
25
|
+
switch (UniLocaleManager.locale) {
|
|
26
|
+
case 'it':
|
|
27
|
+
registerLocaleData(localeIt);
|
|
28
|
+
break;
|
|
29
|
+
case 'es':
|
|
30
|
+
registerLocaleData(localeEs);
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Inizializza la localizzazione specifica per i componenti DevExtreme.
|
|
38
|
+
* Imposta il locale per le formattazioni native dei widget e carica i file di messaggi JSON per la traduzione dei testi di sistema.
|
|
39
|
+
*/
|
|
40
|
+
static setLocaleDevextreme() {
|
|
41
|
+
/* Imposta i dati del locale corrente in DevExtreme */
|
|
42
|
+
locale(UniLocaleManager.locale);
|
|
43
|
+
/* Carica i messaggi di traduzione */
|
|
44
|
+
switch (UniLocaleManager.language) {
|
|
45
|
+
case 'it':
|
|
46
|
+
loadMessages(itMessages);
|
|
47
|
+
break;
|
|
48
|
+
case 'es':
|
|
49
|
+
loadMessages(esMessages);
|
|
50
|
+
break;
|
|
51
|
+
default:
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class UNITranslateInlineParamsPipe {
|
|
58
|
+
transform(label, splitChar) {
|
|
59
|
+
if (!label)
|
|
60
|
+
return '';
|
|
61
|
+
return UniLocaleManager.translateInlineParams(label, splitChar);
|
|
62
|
+
}
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNITranslateInlineParamsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
64
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: UNITranslateInlineParamsPipe, isStandalone: true, name: "translate_inline_params" }); }
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNITranslateInlineParamsPipe, decorators: [{
|
|
67
|
+
type: Pipe,
|
|
68
|
+
args: [{
|
|
69
|
+
name: 'translate_inline_params',
|
|
70
|
+
standalone: true,
|
|
71
|
+
}]
|
|
72
|
+
}] });
|
|
73
|
+
|
|
74
|
+
class UNITranslatePipe {
|
|
75
|
+
transform(label, prefix = 'lbl', interpolateParams) {
|
|
76
|
+
if (!label)
|
|
77
|
+
return '';
|
|
78
|
+
return UniLocaleManager.translate(label, prefix, interpolateParams);
|
|
79
|
+
}
|
|
80
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNITranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
81
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: UNITranslatePipe, isStandalone: true, name: "translate" }); }
|
|
82
|
+
}
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNITranslatePipe, decorators: [{
|
|
84
|
+
type: Pipe,
|
|
85
|
+
args: [{
|
|
86
|
+
name: 'translate',
|
|
87
|
+
standalone: true,
|
|
88
|
+
}]
|
|
89
|
+
}] });
|
|
90
|
+
|
|
91
|
+
/* eslint-disable simple-import-sort/exports */
|
|
92
|
+
|
|
93
|
+
class UNILoaderService {
|
|
94
|
+
constructor() {
|
|
95
|
+
const container = document.querySelector('body');
|
|
96
|
+
const content = document.createElement('div');
|
|
97
|
+
container.appendChild(content);
|
|
98
|
+
this.loadPanel = new LoadPanel(content, {
|
|
99
|
+
showIndicator: true,
|
|
100
|
+
showPane: true,
|
|
101
|
+
shading: true,
|
|
102
|
+
shadingColor: 'rgba(0,0,0,0.4)',
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/* ------------------------------------- Methods ------------------------------------- */
|
|
106
|
+
show() {
|
|
107
|
+
this.loadPanel.show();
|
|
108
|
+
}
|
|
109
|
+
hide() {
|
|
110
|
+
this.loadPanel.hide();
|
|
111
|
+
}
|
|
112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNILoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
113
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNILoaderService, providedIn: 'root' }); }
|
|
114
|
+
}
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNILoaderService, decorators: [{
|
|
116
|
+
type: Injectable,
|
|
117
|
+
args: [{
|
|
118
|
+
providedIn: 'root',
|
|
119
|
+
}]
|
|
120
|
+
}], ctorParameters: () => [] });
|
|
121
|
+
|
|
122
|
+
class UNIPopupService {
|
|
123
|
+
constructor() {
|
|
124
|
+
/* Variables */
|
|
125
|
+
this.instances = new Map();
|
|
126
|
+
}
|
|
127
|
+
/* -------------------------------- Methods: popup creation -------------------------------- */
|
|
128
|
+
async createPopupConfirm(args) {
|
|
129
|
+
const { message, html, onConfirm, lblTitle, maxWidth } = args;
|
|
130
|
+
// Creazione del contenuto come stringa HTML
|
|
131
|
+
const messageHtml = html ??
|
|
132
|
+
`
|
|
133
|
+
<div style="
|
|
134
|
+
white-space: pre-line;
|
|
135
|
+
word-break: break-all;
|
|
136
|
+
padding: 0rem 1rem 1rem 1rem;
|
|
137
|
+
max-width: ${typeof maxWidth === 'number' ? maxWidth + 'px' : '800px'};
|
|
138
|
+
">
|
|
139
|
+
${message ?? ''}
|
|
140
|
+
</div>
|
|
141
|
+
`;
|
|
142
|
+
await custom({
|
|
143
|
+
title: lblTitle && UniLocaleManager.translate(lblTitle),
|
|
144
|
+
dragEnabled: false,
|
|
145
|
+
showTitle: !!lblTitle,
|
|
146
|
+
messageHtml,
|
|
147
|
+
buttons: [
|
|
148
|
+
{
|
|
149
|
+
text: UniLocaleManager.translate('Confirm', 'btn'),
|
|
150
|
+
onClick: onConfirm,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
text: UniLocaleManager.translate('Delete', 'btn'),
|
|
154
|
+
onClick: () => null,
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
}).show();
|
|
158
|
+
}
|
|
159
|
+
createPopup(args) {
|
|
160
|
+
/* Recupera args */
|
|
161
|
+
const { id, type, message, html, lblTitle, detail, closable } = args;
|
|
162
|
+
/* Aggiunge pulsante il dettaglio dell'errore */
|
|
163
|
+
const toolbarItems = [];
|
|
164
|
+
if (detail && message) {
|
|
165
|
+
toolbarItems.push(...this.createErrorItems(id, message, detail.message, detail.messageToCopy));
|
|
166
|
+
}
|
|
167
|
+
/* Aggiunge pulsante per la chiusura del popup (possibile poi solo da qui) */
|
|
168
|
+
if (closable || closable === undefined) {
|
|
169
|
+
toolbarItems.push(this.createCloseItem(id));
|
|
170
|
+
}
|
|
171
|
+
/* Crea popup */
|
|
172
|
+
this.createPopupInstance({
|
|
173
|
+
id,
|
|
174
|
+
type,
|
|
175
|
+
title: UniLocaleManager.translate(lblTitle ?? 'lblErrorFrontend'),
|
|
176
|
+
message: message ?? html,
|
|
177
|
+
toolbarItems,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/* -------------------------------- Methods: popup error/warning -------------------------------- */
|
|
181
|
+
createPopupError(args) {
|
|
182
|
+
/* Recupera args */
|
|
183
|
+
const { message, lblTitle, detail, closable, ref } = args;
|
|
184
|
+
this.createPopup({
|
|
185
|
+
id: `popup-${ref ?? Date.now()}`,
|
|
186
|
+
type: 'ERROR',
|
|
187
|
+
message,
|
|
188
|
+
lblTitle,
|
|
189
|
+
detail,
|
|
190
|
+
closable,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
createPopupWarning(args) {
|
|
194
|
+
/* Recupera args */
|
|
195
|
+
const { message, lblTitle, detail, closable, ref } = args;
|
|
196
|
+
this.createPopup({
|
|
197
|
+
id: `popup-${ref ?? Date.now()}`,
|
|
198
|
+
type: 'WARNING',
|
|
199
|
+
message,
|
|
200
|
+
lblTitle,
|
|
201
|
+
detail,
|
|
202
|
+
closable,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
async createPopupErrorHttp(args) {
|
|
206
|
+
/* Recupera args */
|
|
207
|
+
const { err, ref } = args;
|
|
208
|
+
/* Evita doppia istanza con lo stesso id */
|
|
209
|
+
if (this.isPopupAlreadyExisting(ref))
|
|
210
|
+
return;
|
|
211
|
+
/* Message detail */
|
|
212
|
+
const { status, statusText, message, error } = err;
|
|
213
|
+
let errorDetail = `[${status} - ${statusText}]: ${message}`;
|
|
214
|
+
if (error) {
|
|
215
|
+
try {
|
|
216
|
+
if (error instanceof Blob)
|
|
217
|
+
errorDetail += `\n ${await error.text()}`;
|
|
218
|
+
else if (typeof error === 'string')
|
|
219
|
+
errorDetail += `\n ${error}`;
|
|
220
|
+
else if (typeof error === 'object')
|
|
221
|
+
errorDetail += `\n ${JSON.stringify(error, null, 2)}`;
|
|
222
|
+
else
|
|
223
|
+
errorDetail += `\n ${String(error)}`;
|
|
224
|
+
}
|
|
225
|
+
catch (e) {
|
|
226
|
+
errorDetail += `\n Error processing the error message: ${e}`;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/* Creazione popup */
|
|
230
|
+
const errorMessage = UniLocaleManager.translate(`error${err.status}`); // es: error404, error500
|
|
231
|
+
this.createPopupError({
|
|
232
|
+
message: errorMessage,
|
|
233
|
+
lblTitle: 'lblErrorBackend',
|
|
234
|
+
detail: { message: errorDetail, messageToCopy: JSON.stringify(err) },
|
|
235
|
+
ref,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
async createPopupErrorCustom(args) {
|
|
239
|
+
/* Recupera args */
|
|
240
|
+
const { label, interpolateParams, ref } = args;
|
|
241
|
+
/* Evita doppia istanza con lo stesso id */
|
|
242
|
+
if (this.isPopupAlreadyExisting(ref))
|
|
243
|
+
return;
|
|
244
|
+
this.createPopupError({
|
|
245
|
+
message: UniLocaleManager.translate(label, 'lbl', interpolateParams),
|
|
246
|
+
lblTitle: 'lblErrorBackendCustom',
|
|
247
|
+
detail: undefined,
|
|
248
|
+
closable: true,
|
|
249
|
+
ref,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/* -------------------------------- Methods: popup close -------------------------------- */
|
|
253
|
+
closePopupError(ref) {
|
|
254
|
+
const id = `popup-${ref}`;
|
|
255
|
+
const instance = this.instances.get(id);
|
|
256
|
+
if (!instance)
|
|
257
|
+
return;
|
|
258
|
+
instance.dispose();
|
|
259
|
+
instance.element()?.remove();
|
|
260
|
+
this.instances.delete(id);
|
|
261
|
+
}
|
|
262
|
+
/* -------------------------------- Methods: utils -------------------------------- */
|
|
263
|
+
createCloseItem(id) {
|
|
264
|
+
return {
|
|
265
|
+
widget: 'dxButton',
|
|
266
|
+
toolbar: 'bottom',
|
|
267
|
+
location: 'after',
|
|
268
|
+
options: {
|
|
269
|
+
type: 'normal',
|
|
270
|
+
icon: 'close',
|
|
271
|
+
text: UniLocaleManager.translate('Close', 'btn'),
|
|
272
|
+
stylingMode: 'contained',
|
|
273
|
+
onClick: () => {
|
|
274
|
+
const popup = id ? this.instances.get(id) : undefined;
|
|
275
|
+
popup?.hide();
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
createErrorItems(id, initialMessage, detailMessage, messageToCopy) {
|
|
281
|
+
let inShow = false; // Variabile di stato per i dettagli
|
|
282
|
+
const items = [
|
|
283
|
+
{
|
|
284
|
+
widget: 'dxButton',
|
|
285
|
+
toolbar: 'bottom',
|
|
286
|
+
location: 'before',
|
|
287
|
+
options: {
|
|
288
|
+
type: 'normal',
|
|
289
|
+
icon: 'find',
|
|
290
|
+
text: UniLocaleManager.translate('Details', 'btn'),
|
|
291
|
+
stylingMode: 'contained',
|
|
292
|
+
onClick: (e) => {
|
|
293
|
+
const popup = this.instances.get(id);
|
|
294
|
+
if (!popup)
|
|
295
|
+
return;
|
|
296
|
+
const content = popup.content().firstElementChild;
|
|
297
|
+
if (!content)
|
|
298
|
+
return;
|
|
299
|
+
inShow = !inShow;
|
|
300
|
+
content.textContent = inShow ? detailMessage : initialMessage;
|
|
301
|
+
if (inShow) {
|
|
302
|
+
// Modalità dettaglio
|
|
303
|
+
content.style.display = 'block';
|
|
304
|
+
content.style.textAlign = 'left';
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
// Modalità principal
|
|
308
|
+
content.style.display = 'flex';
|
|
309
|
+
content.style.alignItems = 'center';
|
|
310
|
+
content.style.justifyContent = 'center';
|
|
311
|
+
content.style.textAlign = 'center';
|
|
312
|
+
}
|
|
313
|
+
e.component.option({
|
|
314
|
+
text: UniLocaleManager.translate(inShow ? 'Back' : 'Details', 'btn'),
|
|
315
|
+
icon: inShow ? 'back' : 'find',
|
|
316
|
+
});
|
|
317
|
+
},
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
widget: 'dxButton',
|
|
322
|
+
toolbar: 'bottom',
|
|
323
|
+
location: 'before',
|
|
324
|
+
options: {
|
|
325
|
+
type: 'normal',
|
|
326
|
+
icon: 'refresh',
|
|
327
|
+
text: UniLocaleManager.translate('Refresh', 'btn'),
|
|
328
|
+
stylingMode: 'contained',
|
|
329
|
+
onClick: () => location.reload(),
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
];
|
|
333
|
+
if (messageToCopy) {
|
|
334
|
+
items.push({
|
|
335
|
+
visible: window.isSecureContext,
|
|
336
|
+
widget: 'dxButton',
|
|
337
|
+
toolbar: 'bottom',
|
|
338
|
+
location: 'after',
|
|
339
|
+
options: {
|
|
340
|
+
type: 'normal',
|
|
341
|
+
icon: 'copy',
|
|
342
|
+
text: UniLocaleManager.translate('Copy', 'btn'),
|
|
343
|
+
stylingMode: 'contained',
|
|
344
|
+
onClick: () => {
|
|
345
|
+
try {
|
|
346
|
+
navigator?.clipboard?.writeText(messageToCopy);
|
|
347
|
+
}
|
|
348
|
+
catch (e) {
|
|
349
|
+
console.error('Failed to copy text: ', e);
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
return items;
|
|
356
|
+
}
|
|
357
|
+
createPopupInstance(arg) {
|
|
358
|
+
/* Recupera argomenti */
|
|
359
|
+
const { id, type, title, message, toolbarItems = [] } = arg;
|
|
360
|
+
/* Evita doppia istanza con lo stesso id */
|
|
361
|
+
if (this.instances.has(id)) {
|
|
362
|
+
this.instances.get(id)?.show();
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
/* Crea container del popup */
|
|
366
|
+
const container = document.createElement('div');
|
|
367
|
+
document.body.appendChild(container);
|
|
368
|
+
/* Crea classe css */
|
|
369
|
+
let cssClass = '';
|
|
370
|
+
switch (type) {
|
|
371
|
+
case 'WARNING':
|
|
372
|
+
cssClass = 'uni-popup-warning';
|
|
373
|
+
break;
|
|
374
|
+
case 'ERROR':
|
|
375
|
+
cssClass = 'uni-popup-error';
|
|
376
|
+
break;
|
|
377
|
+
case 'INFO':
|
|
378
|
+
cssClass = 'uni-popup-info';
|
|
379
|
+
break;
|
|
380
|
+
default:
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
/* Crea popup */
|
|
384
|
+
const popup = new Popup(container, {
|
|
385
|
+
title,
|
|
386
|
+
deferRendering: false,
|
|
387
|
+
maxHeight: 500,
|
|
388
|
+
maxWidth: 1000,
|
|
389
|
+
dragEnabled: false,
|
|
390
|
+
showCloseButton: false,
|
|
391
|
+
hideOnOutsideClick: false,
|
|
392
|
+
shading: true,
|
|
393
|
+
wrapperAttr: {
|
|
394
|
+
id,
|
|
395
|
+
...(cssClass && { class: cssClass }),
|
|
396
|
+
},
|
|
397
|
+
toolbarItems,
|
|
398
|
+
contentTemplate: () => {
|
|
399
|
+
const messageContainer = document.createElement('div');
|
|
400
|
+
messageContainer.style.display = 'flex';
|
|
401
|
+
messageContainer.style.alignItems = 'center';
|
|
402
|
+
messageContainer.style.justifyContent = 'center';
|
|
403
|
+
messageContainer.style.whiteSpace = 'pre-line';
|
|
404
|
+
messageContainer.style.wordBreak = 'break-all';
|
|
405
|
+
messageContainer.style.height = '100%';
|
|
406
|
+
messageContainer.style.textAlign = 'center';
|
|
407
|
+
messageContainer.textContent = message;
|
|
408
|
+
return messageContainer;
|
|
409
|
+
},
|
|
410
|
+
onHidden: () => {
|
|
411
|
+
popup.dispose();
|
|
412
|
+
container.remove();
|
|
413
|
+
this.instances.delete(id);
|
|
414
|
+
},
|
|
415
|
+
});
|
|
416
|
+
/* Mostra popup */
|
|
417
|
+
this.instances.set(id, popup);
|
|
418
|
+
popup.show();
|
|
419
|
+
}
|
|
420
|
+
isPopupAlreadyExisting(ref) {
|
|
421
|
+
if (!ref)
|
|
422
|
+
return false;
|
|
423
|
+
const id = `popup-${ref}`;
|
|
424
|
+
const existingPopup = this.instances.get(id);
|
|
425
|
+
if (existingPopup) {
|
|
426
|
+
existingPopup.show();
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNIPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
432
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNIPopupService, providedIn: 'root' }); }
|
|
433
|
+
}
|
|
434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNIPopupService, decorators: [{
|
|
435
|
+
type: Injectable,
|
|
436
|
+
args: [{
|
|
437
|
+
providedIn: 'root',
|
|
438
|
+
}]
|
|
439
|
+
}] });
|
|
440
|
+
|
|
441
|
+
class UNIToastService {
|
|
442
|
+
success(message, config) {
|
|
443
|
+
this.show(message, 'success', config);
|
|
444
|
+
}
|
|
445
|
+
info(message, config) {
|
|
446
|
+
this.show(message, 'info', config);
|
|
447
|
+
}
|
|
448
|
+
warning(message, config) {
|
|
449
|
+
this.show(message, 'warning', config);
|
|
450
|
+
}
|
|
451
|
+
error(message, config) {
|
|
452
|
+
this.show(message, 'error', config);
|
|
453
|
+
}
|
|
454
|
+
/* ----------------------- Metodi: utils ----------------------- */
|
|
455
|
+
show(message, type, config) {
|
|
456
|
+
notify({
|
|
457
|
+
message,
|
|
458
|
+
type,
|
|
459
|
+
height: 50,
|
|
460
|
+
width: 400,
|
|
461
|
+
displayTime: config?.duration ?? 4000,
|
|
462
|
+
animation: {
|
|
463
|
+
show: { type: 'fade', duration: 400, from: 0, to: 1 },
|
|
464
|
+
hide: { type: 'fade', duration: 300, from: 1, to: 0 },
|
|
465
|
+
},
|
|
466
|
+
}, { position: 'bottom center', direction: 'up-push' });
|
|
467
|
+
}
|
|
468
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNIToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
469
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNIToastService, providedIn: 'root' }); }
|
|
470
|
+
}
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: UNIToastService, decorators: [{
|
|
472
|
+
type: Injectable,
|
|
473
|
+
args: [{
|
|
474
|
+
providedIn: 'root',
|
|
475
|
+
}]
|
|
476
|
+
}] });
|
|
477
|
+
|
|
478
|
+
/*
|
|
479
|
+
* Public API Surface of uni-app-fe
|
|
480
|
+
*/
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Generated bundle index. Do not edit.
|
|
484
|
+
*/
|
|
485
|
+
|
|
486
|
+
export { UNILoaderService, UNIPopupService, UNIToastService, UNITranslateInlineParamsPipe, UNITranslatePipe, UniLocaleManagerAngular };
|
|
487
|
+
//# sourceMappingURL=uni-app-fe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uni-app-fe.mjs","sources":["../../../projects/uni-app-fe/src/manager/locale.manager.ts","../../../projects/uni-app-fe/src/pipe/uni-translate-inline-params.pipe.ts","../../../projects/uni-app-fe/src/pipe/uni-translate.pipe.ts","../../../projects/uni-app-fe/src/pipe/index.ts","../../../projects/uni-app-fe/src/service/uni-loader.service.ts","../../../projects/uni-app-fe/src/service/uni-popup.service.ts","../../../projects/uni-app-fe/src/service/uni-toast.service.ts","../../../projects/uni-app-fe/src/public-api.ts","../../../projects/uni-app-fe/src/uni-app-fe.ts"],"sourcesContent":["import { registerLocaleData } from '@angular/common';\r\nimport localeEs from '@angular/common/locales/es';\r\nimport localeIt from '@angular/common/locales/it';\r\nimport { loadMessages, locale } from 'devextreme/localization';\r\nimport esMessages from 'devextreme/localization/messages/es.json';\r\nimport itMessages from 'devextreme/localization/messages/it.json';\r\nimport { UniLocaleManager } from 'uni-manager';\r\n\r\nexport class UniLocaleManagerAngular {\r\n /* ------------------------------------------------------------------------------- */\r\n /* ----------------------------------- Metodi ------------------------------------ */\r\n /* ------------------------------------------------------------------------------- */\r\n /**\r\n * Registra i dati specifici del locale nel framework Angular.\r\n * Necessario per garantire che le pipe built-in (es. DatePipe, CurrencyPipe) operino secondo le convenzioni del paese corrente.\r\n */\r\n public static setLocaleAngular(): void {\r\n /* Imposta i dati del locale corrente in Angular necessari per le pipe */\r\n switch (UniLocaleManager.locale) {\r\n case 'it':\r\n registerLocaleData(localeIt);\r\n break;\r\n case 'es':\r\n registerLocaleData(localeEs);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Inizializza la localizzazione specifica per i componenti DevExtreme.\r\n * Imposta il locale per le formattazioni native dei widget e carica i file di messaggi JSON per la traduzione dei testi di sistema.\r\n */\r\n public static setLocaleDevextreme(): void {\r\n /* Imposta i dati del locale corrente in DevExtreme */\r\n locale(UniLocaleManager.locale);\r\n\r\n /* Carica i messaggi di traduzione */\r\n switch (UniLocaleManager.language) {\r\n case 'it':\r\n loadMessages(itMessages);\r\n break;\r\n case 'es':\r\n loadMessages(esMessages);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n}\r\n","import { Pipe, type PipeTransform } from '@angular/core';\r\nimport { UniLocaleManager } from 'uni-manager';\r\n\r\n@Pipe({\r\n name: 'translate_inline_params',\r\n standalone: true,\r\n})\r\nexport class UNITranslateInlineParamsPipe implements PipeTransform {\r\n transform(label: string | null | undefined, splitChar: string): string {\r\n if (!label) return '';\r\n\r\n return UniLocaleManager.translateInlineParams(label, splitChar);\r\n }\r\n}\r\n","import { Pipe, type PipeTransform } from '@angular/core';\r\nimport { UniLocaleManager } from 'uni-manager';\r\n\r\n@Pipe({\r\n name: 'translate',\r\n standalone: true,\r\n})\r\nexport class UNITranslatePipe implements PipeTransform {\r\n transform(\r\n label: string | null | undefined,\r\n prefix = 'lbl',\r\n interpolateParams?: Record<string, string | number | Date>,\r\n ): string {\r\n if (!label) return '';\r\n\r\n return UniLocaleManager.translate(label, prefix, interpolateParams);\r\n }\r\n}\r\n","/* eslint-disable simple-import-sort/exports */\r\n\r\nexport * from './uni-translate-inline-params.pipe';\r\nexport * from './uni-translate.pipe';\r\n","import { Injectable } from '@angular/core';\r\nimport LoadPanel from 'devextreme/ui/load_panel';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class UNILoaderService {\r\n /* Load Panel */\r\n private loadPanel: LoadPanel;\r\n\r\n constructor() {\r\n const container = document.querySelector('body');\r\n const content: HTMLDivElement = document.createElement('div');\r\n container!.appendChild(content);\r\n\r\n this.loadPanel = new LoadPanel(content, {\r\n showIndicator: true,\r\n showPane: true,\r\n shading: true,\r\n shadingColor: 'rgba(0,0,0,0.4)',\r\n });\r\n }\r\n\r\n /* ------------------------------------- Methods ------------------------------------- */\r\n public show(): void {\r\n this.loadPanel.show();\r\n }\r\n\r\n public hide(): void {\r\n this.loadPanel.hide();\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { HttpErrorResponse } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { custom } from 'devextreme/ui/dialog';\r\nimport Popup, { ToolbarItem } from 'devextreme/ui/popup';\r\nimport { UniLocaleManager } from 'uni-manager';\r\n\r\nexport type PopupType = 'INFO' | 'WARNING' | 'ERROR';\r\n\r\nexport type Instance = Popup<{\r\n title: string;\r\n deferRendering: boolean;\r\n maxHeight: number;\r\n maxWidth: number;\r\n dragEnabled: boolean;\r\n showCloseButton: boolean;\r\n hideOnOutsideClick: boolean;\r\n shading: boolean;\r\n wrapperAttr: { id: string; class?: string };\r\n toolbarItems: ToolbarItem[];\r\n contentTemplate: () => HTMLDivElement;\r\n onHidden: () => void;\r\n}>;\r\n\r\nexport type PopupContent = { message: string; html?: never } | { message?: never; html: string };\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class UNIPopupService {\r\n /* Variables */\r\n private instances = new Map<string, Instance>();\r\n\r\n /* -------------------------------- Methods: popup creation -------------------------------- */\r\n public async createPopupConfirm(\r\n args: PopupContent & {\r\n onConfirm: () => void;\r\n lblTitle?: string;\r\n maxWidth?: number;\r\n },\r\n ): Promise<void> {\r\n const { message, html, onConfirm, lblTitle, maxWidth } = args;\r\n\r\n // Creazione del contenuto come stringa HTML\r\n const messageHtml =\r\n html ??\r\n `\r\n <div style=\"\r\n white-space: pre-line;\r\n word-break: break-all;\r\n padding: 0rem 1rem 1rem 1rem;\r\n max-width: ${typeof maxWidth === 'number' ? maxWidth + 'px' : '800px'};\r\n \">\r\n ${message ?? ''}\r\n </div>\r\n `;\r\n\r\n await custom({\r\n title: lblTitle && UniLocaleManager.translate(lblTitle),\r\n dragEnabled: false,\r\n showTitle: !!lblTitle,\r\n messageHtml,\r\n buttons: [\r\n {\r\n text: UniLocaleManager.translate('Confirm', 'btn'),\r\n onClick: onConfirm,\r\n },\r\n {\r\n text: UniLocaleManager.translate('Delete', 'btn'),\r\n onClick: (): null => null,\r\n },\r\n ],\r\n }).show();\r\n }\r\n\r\n public createPopup(\r\n args: PopupContent & {\r\n id: string;\r\n type: PopupType;\r\n lblTitle?: string;\r\n detail?: { message: string; messageToCopy?: string };\r\n closable?: boolean;\r\n },\r\n ): void {\r\n /* Recupera args */\r\n const { id, type, message, html, lblTitle, detail, closable } = args;\r\n\r\n /* Aggiunge pulsante il dettaglio dell'errore */\r\n const toolbarItems: ToolbarItem[] = [];\r\n if (detail && message) {\r\n toolbarItems.push(\r\n ...this.createErrorItems(id, message, detail.message, detail.messageToCopy),\r\n );\r\n }\r\n\r\n /* Aggiunge pulsante per la chiusura del popup (possibile poi solo da qui) */\r\n if (closable || closable === undefined) {\r\n toolbarItems.push(this.createCloseItem(id));\r\n }\r\n\r\n /* Crea popup */\r\n this.createPopupInstance({\r\n id,\r\n type,\r\n title: UniLocaleManager.translate(lblTitle ?? 'lblErrorFrontend'),\r\n message: message ?? html,\r\n toolbarItems,\r\n });\r\n }\r\n\r\n /* -------------------------------- Methods: popup error/warning -------------------------------- */\r\n public createPopupError(args: {\r\n message: string;\r\n lblTitle?: string;\r\n detail?: { message: string; messageToCopy?: string };\r\n closable?: boolean;\r\n ref?: string;\r\n }): void {\r\n /* Recupera args */\r\n const { message, lblTitle, detail, closable, ref } = args;\r\n\r\n this.createPopup({\r\n id: `popup-${ref ?? Date.now()}`,\r\n type: 'ERROR',\r\n message,\r\n lblTitle,\r\n detail,\r\n closable,\r\n });\r\n }\r\n\r\n public createPopupWarning(args: {\r\n message: string;\r\n lblTitle?: string;\r\n detail?: { message: string; messageToCopy?: string };\r\n closable?: boolean;\r\n ref?: string;\r\n }): void {\r\n /* Recupera args */\r\n const { message, lblTitle, detail, closable, ref } = args;\r\n\r\n this.createPopup({\r\n id: `popup-${ref ?? Date.now()}`,\r\n type: 'WARNING',\r\n message,\r\n lblTitle,\r\n detail,\r\n closable,\r\n });\r\n }\r\n\r\n public async createPopupErrorHttp(args: { err: HttpErrorResponse; ref?: string }): Promise<void> {\r\n /* Recupera args */\r\n const { err, ref } = args;\r\n\r\n /* Evita doppia istanza con lo stesso id */\r\n if (this.isPopupAlreadyExisting(ref)) return;\r\n\r\n /* Message detail */\r\n const { status, statusText, message, error } = err;\r\n let errorDetail = `[${status} - ${statusText}]: ${message}`;\r\n if (error) {\r\n try {\r\n if (error instanceof Blob) errorDetail += `\\n ${await error.text()}`;\r\n else if (typeof error === 'string') errorDetail += `\\n ${error}`;\r\n else if (typeof error === 'object') errorDetail += `\\n ${JSON.stringify(error, null, 2)}`;\r\n else errorDetail += `\\n ${String(error)}`;\r\n } catch (e) {\r\n errorDetail += `\\n Error processing the error message: ${e}`;\r\n }\r\n }\r\n\r\n /* Creazione popup */\r\n const errorMessage = UniLocaleManager.translate(`error${err.status}`); // es: error404, error500\r\n this.createPopupError({\r\n message: errorMessage,\r\n lblTitle: 'lblErrorBackend',\r\n detail: { message: errorDetail, messageToCopy: JSON.stringify(err) },\r\n ref,\r\n });\r\n }\r\n\r\n public async createPopupErrorCustom(args: {\r\n label: string;\r\n interpolateParams?: Record<string, string | number | Date>;\r\n ref?: string;\r\n }): Promise<void> {\r\n /* Recupera args */\r\n const { label, interpolateParams, ref } = args;\r\n\r\n /* Evita doppia istanza con lo stesso id */\r\n if (this.isPopupAlreadyExisting(ref)) return;\r\n\r\n this.createPopupError({\r\n message: UniLocaleManager.translate(label, 'lbl', interpolateParams),\r\n lblTitle: 'lblErrorBackendCustom',\r\n detail: undefined,\r\n closable: true,\r\n ref,\r\n });\r\n }\r\n\r\n /* -------------------------------- Methods: popup close -------------------------------- */\r\n public closePopupError(ref: string): void {\r\n const id = `popup-${ref}`;\r\n const instance = this.instances.get(id);\r\n if (!instance) return;\r\n\r\n instance.dispose();\r\n instance.element()?.remove();\r\n this.instances.delete(id);\r\n }\r\n\r\n /* -------------------------------- Methods: utils -------------------------------- */\r\n private createCloseItem(id?: string): ToolbarItem {\r\n return {\r\n widget: 'dxButton',\r\n toolbar: 'bottom',\r\n location: 'after',\r\n options: {\r\n type: 'normal',\r\n icon: 'close',\r\n text: UniLocaleManager.translate('Close', 'btn'),\r\n stylingMode: 'contained',\r\n onClick: (): void => {\r\n const popup = id ? this.instances.get(id) : undefined;\r\n popup?.hide();\r\n },\r\n },\r\n };\r\n }\r\n\r\n private createErrorItems(\r\n id: string,\r\n initialMessage: string,\r\n detailMessage: string,\r\n messageToCopy?: string,\r\n ): ToolbarItem[] {\r\n let inShow = false; // Variabile di stato per i dettagli\r\n const items: ToolbarItem[] = [\r\n {\r\n widget: 'dxButton',\r\n toolbar: 'bottom',\r\n location: 'before',\r\n options: {\r\n type: 'normal',\r\n icon: 'find',\r\n text: UniLocaleManager.translate('Details', 'btn'),\r\n stylingMode: 'contained',\r\n onClick: (e: any): void => {\r\n const popup = this.instances.get(id);\r\n if (!popup) return;\r\n const content = popup.content().firstElementChild as HTMLElement;\r\n if (!content) return;\r\n inShow = !inShow;\r\n content.textContent = inShow ? detailMessage : initialMessage;\r\n if (inShow) {\r\n // Modalità dettaglio\r\n content.style.display = 'block';\r\n content.style.textAlign = 'left';\r\n } else {\r\n // Modalità principal\r\n content.style.display = 'flex';\r\n content.style.alignItems = 'center';\r\n content.style.justifyContent = 'center';\r\n content.style.textAlign = 'center';\r\n }\r\n e.component.option({\r\n text: UniLocaleManager.translate(inShow ? 'Back' : 'Details', 'btn'),\r\n icon: inShow ? 'back' : 'find',\r\n });\r\n },\r\n },\r\n },\r\n {\r\n widget: 'dxButton',\r\n toolbar: 'bottom',\r\n location: 'before',\r\n options: {\r\n type: 'normal',\r\n icon: 'refresh',\r\n text: UniLocaleManager.translate('Refresh', 'btn'),\r\n stylingMode: 'contained',\r\n onClick: (): void => location.reload(),\r\n },\r\n },\r\n ];\r\n\r\n if (messageToCopy) {\r\n items.push({\r\n visible: window.isSecureContext,\r\n widget: 'dxButton',\r\n toolbar: 'bottom',\r\n location: 'after',\r\n options: {\r\n type: 'normal',\r\n icon: 'copy',\r\n text: UniLocaleManager.translate('Copy', 'btn'),\r\n stylingMode: 'contained',\r\n onClick: (): void => {\r\n try {\r\n navigator?.clipboard?.writeText(messageToCopy);\r\n } catch (e) {\r\n console.error('Failed to copy text: ', e);\r\n }\r\n },\r\n },\r\n });\r\n }\r\n\r\n return items;\r\n }\r\n\r\n private createPopupInstance(arg: {\r\n id: string;\r\n type: PopupType;\r\n title: string;\r\n message: string;\r\n toolbarItems: ToolbarItem[];\r\n }): void {\r\n /* Recupera argomenti */\r\n const { id, type, title, message, toolbarItems = [] } = arg;\r\n\r\n /* Evita doppia istanza con lo stesso id */\r\n if (this.instances.has(id)) {\r\n this.instances.get(id)?.show();\r\n return;\r\n }\r\n\r\n /* Crea container del popup */\r\n const container = document.createElement('div');\r\n document.body.appendChild(container);\r\n\r\n /* Crea classe css */\r\n let cssClass = '';\r\n switch (type) {\r\n case 'WARNING':\r\n cssClass = 'uni-popup-warning';\r\n break;\r\n case 'ERROR':\r\n cssClass = 'uni-popup-error';\r\n break;\r\n case 'INFO':\r\n cssClass = 'uni-popup-info';\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n /* Crea popup */\r\n const popup = new Popup(container, {\r\n title,\r\n deferRendering: false,\r\n maxHeight: 500,\r\n maxWidth: 1000,\r\n dragEnabled: false,\r\n showCloseButton: false,\r\n hideOnOutsideClick: false,\r\n shading: true,\r\n wrapperAttr: {\r\n id,\r\n ...(cssClass && { class: cssClass }),\r\n },\r\n toolbarItems,\r\n contentTemplate: (): HTMLDivElement => {\r\n const messageContainer = document.createElement('div');\r\n messageContainer.style.display = 'flex';\r\n messageContainer.style.alignItems = 'center';\r\n messageContainer.style.justifyContent = 'center';\r\n messageContainer.style.whiteSpace = 'pre-line';\r\n messageContainer.style.wordBreak = 'break-all';\r\n messageContainer.style.height = '100%';\r\n messageContainer.style.textAlign = 'center';\r\n messageContainer.textContent = message;\r\n return messageContainer;\r\n },\r\n onHidden: (): void => {\r\n popup.dispose();\r\n container.remove();\r\n this.instances.delete(id);\r\n },\r\n });\r\n\r\n /* Mostra popup */\r\n this.instances.set(id, popup);\r\n popup.show();\r\n }\r\n\r\n private isPopupAlreadyExisting(ref?: string): boolean {\r\n if (!ref) return false;\r\n\r\n const id = `popup-${ref}`;\r\n const existingPopup = this.instances.get(id);\r\n\r\n if (existingPopup) {\r\n existingPopup.show();\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport notify from 'devextreme/ui/notify';\r\nimport { ToastType } from 'devextreme/ui/toast_types';\r\nimport { IToastManager, ToastConfig } from 'uni-manager';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class UNIToastService implements IToastManager {\r\n public success(message: string, config?: ToastConfig): void {\r\n this.show(message, 'success', config);\r\n }\r\n\r\n public info(message: string, config?: ToastConfig): void {\r\n this.show(message, 'info', config);\r\n }\r\n\r\n public warning(message: string, config?: ToastConfig): void {\r\n this.show(message, 'warning', config);\r\n }\r\n\r\n public error(message: string, config?: ToastConfig): void {\r\n this.show(message, 'error', config);\r\n }\r\n\r\n /* ----------------------- Metodi: utils ----------------------- */\r\n private show(message: string, type: ToastType, config?: ToastConfig): void {\r\n notify(\r\n {\r\n message,\r\n type,\r\n height: 50,\r\n width: 400,\r\n displayTime: config?.duration ?? 4000,\r\n animation: {\r\n show: { type: 'fade', duration: 400, from: 0, to: 1 },\r\n hide: { type: 'fade', duration: 300, from: 1, to: 0 },\r\n },\r\n },\r\n { position: 'bottom center', direction: 'up-push' },\r\n );\r\n }\r\n}\r\n","/*\r\n * Public API Surface of uni-app-fe\r\n */\r\n\r\nexport * from './manager/index';\r\nexport * from './pipe/index';\r\nexport * from './service/index';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAQa,uBAAuB,CAAA;;;;AAIlC;;;AAGG;AACI,IAAA,OAAO,gBAAgB,GAAA;;AAE5B,QAAA,QAAQ,gBAAgB,CAAC,MAAM;AAC7B,YAAA,KAAK,IAAI;gBACP,kBAAkB,CAAC,QAAQ,CAAC;gBAC5B;AACF,YAAA,KAAK,IAAI;gBACP,kBAAkB,CAAC,QAAQ,CAAC;gBAC5B;AACF,YAAA;gBACE;;;AAIN;;;AAGG;AACI,IAAA,OAAO,mBAAmB,GAAA;;AAE/B,QAAA,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC;;AAG/B,QAAA,QAAQ,gBAAgB,CAAC,QAAQ;AAC/B,YAAA,KAAK,IAAI;gBACP,YAAY,CAAC,UAAU,CAAC;gBACxB;AACF,YAAA,KAAK,IAAI;gBACP,YAAY,CAAC,UAAU,CAAC;gBACxB;AACF,YAAA;gBACE;;;AAGP;;MC3CY,4BAA4B,CAAA;IACvC,SAAS,CAAC,KAAgC,EAAE,SAAiB,EAAA;AAC3D,QAAA,IAAI,CAAC,KAAK;AAAE,YAAA,OAAO,EAAE;QAErB,OAAO,gBAAgB,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC;;8GAJtD,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,IAA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,QAAA,MAAM,CACJ;YACE,OAAO;YACP,IAAI;AACJ,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,WAAW,EAAE,MAAM,EAAE,QAAQ,IAAI,IAAI;AACrC,YAAA,SAAS,EAAE;AACT,gBAAA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;AACrD,gBAAA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;AACtD,aAAA;SACF,EACD,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,CACpD;;8GAhCQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA;;2FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACPD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './locale.manager';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class UniLocaleManagerAngular {
|
|
2
|
+
/**
|
|
3
|
+
* Registra i dati specifici del locale nel framework Angular.
|
|
4
|
+
* Necessario per garantire che le pipe built-in (es. DatePipe, CurrencyPipe) operino secondo le convenzioni del paese corrente.
|
|
5
|
+
*/
|
|
6
|
+
static setLocaleAngular(): void;
|
|
7
|
+
/**
|
|
8
|
+
* Inizializza la localizzazione specifica per i componenti DevExtreme.
|
|
9
|
+
* Imposta il locale per le formattazioni native dei widget e carica i file di messaggi JSON per la traduzione dei testi di sistema.
|
|
10
|
+
*/
|
|
11
|
+
static setLocaleDevextreme(): void;
|
|
12
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uni-app-fe",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": ">=21.0.0",
|
|
6
|
+
"@angular/core": ">=21.0.0",
|
|
7
|
+
"devextreme": ">=24.0.0",
|
|
8
|
+
"uni-manager": ">= 0.0.30"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"tslib": "^2.3.0"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"module": "fesm2022/uni-app-fe.mjs",
|
|
15
|
+
"typings": "index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"default": "./fesm2022/uni-app-fe.mjs"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/pipe/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UNITranslateInlineParamsPipe implements PipeTransform {
|
|
4
|
+
transform(label: string | null | undefined, splitChar: string): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UNITranslateInlineParamsPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<UNITranslateInlineParamsPipe, "translate_inline_params", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UNITranslatePipe implements PipeTransform {
|
|
4
|
+
transform(label: string | null | undefined, prefix?: string, interpolateParams?: Record<string, string | number | Date>): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UNITranslatePipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<UNITranslatePipe, "translate", true>;
|
|
7
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class UNILoaderService {
|
|
3
|
+
private loadPanel;
|
|
4
|
+
constructor();
|
|
5
|
+
show(): void;
|
|
6
|
+
hide(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UNILoaderService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UNILoaderService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
|
+
import Popup, { ToolbarItem } from 'devextreme/ui/popup';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export type PopupType = 'INFO' | 'WARNING' | 'ERROR';
|
|
5
|
+
export type Instance = Popup<{
|
|
6
|
+
title: string;
|
|
7
|
+
deferRendering: boolean;
|
|
8
|
+
maxHeight: number;
|
|
9
|
+
maxWidth: number;
|
|
10
|
+
dragEnabled: boolean;
|
|
11
|
+
showCloseButton: boolean;
|
|
12
|
+
hideOnOutsideClick: boolean;
|
|
13
|
+
shading: boolean;
|
|
14
|
+
wrapperAttr: {
|
|
15
|
+
id: string;
|
|
16
|
+
class?: string;
|
|
17
|
+
};
|
|
18
|
+
toolbarItems: ToolbarItem[];
|
|
19
|
+
contentTemplate: () => HTMLDivElement;
|
|
20
|
+
onHidden: () => void;
|
|
21
|
+
}>;
|
|
22
|
+
export type PopupContent = {
|
|
23
|
+
message: string;
|
|
24
|
+
html?: never;
|
|
25
|
+
} | {
|
|
26
|
+
message?: never;
|
|
27
|
+
html: string;
|
|
28
|
+
};
|
|
29
|
+
export declare class UNIPopupService {
|
|
30
|
+
private instances;
|
|
31
|
+
createPopupConfirm(args: PopupContent & {
|
|
32
|
+
onConfirm: () => void;
|
|
33
|
+
lblTitle?: string;
|
|
34
|
+
maxWidth?: number;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
createPopup(args: PopupContent & {
|
|
37
|
+
id: string;
|
|
38
|
+
type: PopupType;
|
|
39
|
+
lblTitle?: string;
|
|
40
|
+
detail?: {
|
|
41
|
+
message: string;
|
|
42
|
+
messageToCopy?: string;
|
|
43
|
+
};
|
|
44
|
+
closable?: boolean;
|
|
45
|
+
}): void;
|
|
46
|
+
createPopupError(args: {
|
|
47
|
+
message: string;
|
|
48
|
+
lblTitle?: string;
|
|
49
|
+
detail?: {
|
|
50
|
+
message: string;
|
|
51
|
+
messageToCopy?: string;
|
|
52
|
+
};
|
|
53
|
+
closable?: boolean;
|
|
54
|
+
ref?: string;
|
|
55
|
+
}): void;
|
|
56
|
+
createPopupWarning(args: {
|
|
57
|
+
message: string;
|
|
58
|
+
lblTitle?: string;
|
|
59
|
+
detail?: {
|
|
60
|
+
message: string;
|
|
61
|
+
messageToCopy?: string;
|
|
62
|
+
};
|
|
63
|
+
closable?: boolean;
|
|
64
|
+
ref?: string;
|
|
65
|
+
}): void;
|
|
66
|
+
createPopupErrorHttp(args: {
|
|
67
|
+
err: HttpErrorResponse;
|
|
68
|
+
ref?: string;
|
|
69
|
+
}): Promise<void>;
|
|
70
|
+
createPopupErrorCustom(args: {
|
|
71
|
+
label: string;
|
|
72
|
+
interpolateParams?: Record<string, string | number | Date>;
|
|
73
|
+
ref?: string;
|
|
74
|
+
}): Promise<void>;
|
|
75
|
+
closePopupError(ref: string): void;
|
|
76
|
+
private createCloseItem;
|
|
77
|
+
private createErrorItems;
|
|
78
|
+
private createPopupInstance;
|
|
79
|
+
private isPopupAlreadyExisting;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UNIPopupService, never>;
|
|
81
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UNIPopupService>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IToastManager, ToastConfig } from 'uni-manager';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class UNIToastService implements IToastManager {
|
|
4
|
+
success(message: string, config?: ToastConfig): void;
|
|
5
|
+
info(message: string, config?: ToastConfig): void;
|
|
6
|
+
warning(message: string, config?: ToastConfig): void;
|
|
7
|
+
error(message: string, config?: ToastConfig): void;
|
|
8
|
+
private show;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UNIToastService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<UNIToastService>;
|
|
11
|
+
}
|