@arsedizioni/ars-utils 22.5.33 → 22.5.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arsedizioni/ars-utils",
3
- "version": "22.5.33",
3
+ "version": "22.5.34",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -182,6 +182,78 @@ interface LoginResult<T> extends ApiResult<boolean> {
182
182
  requiresMfa?: boolean;
183
183
  }
184
184
 
185
+ /**
186
+ * Conversions between the objects the API speaks (DTOs) and the models a signal form works with.
187
+ *
188
+ * The two shapes differ in one systematic way. A DTO leaves out what it does not have: a place
189
+ * with no phone number simply has no `phone`. A form model cannot afford that — signal forms only
190
+ * build a child field for a key whose value is defined, and the string validators need a `string`
191
+ * rather than `string | undefined` — so every editable field is present, holding its empty value
192
+ * (`''` for text and for the boxes of a datepicker, `false` for a checkbox, `0` for a counter).
193
+ *
194
+ * Doing that conversion by hand means a `?? ''` per field on the way in and a `|| undefined` per
195
+ * field on the way out, twice per form, kept in sync forever. {@link DtoUtils.fromModel} and
196
+ * {@link DtoUtils.toModel} do it once, driven by a single "empty model" constant that also serves as
197
+ * the initial value of the form and as what a "clear" button restores.
198
+ */
199
+ /**
200
+ * The DTO shape of a form model: the same fields, without the values that stand for "empty".
201
+ *
202
+ * It mirrors what {@link DtoUtils.toModel} does at runtime, so the payload type says the truth. It
203
+ * only works when the empty value is a literal type — `Date | '' | null` narrows to `Date`, while
204
+ * a field typed `Date | string` cannot be narrowed, because `string` is not assignable to `''`.
205
+ * That is the reason the convention is `| ''` and not `| string`.
206
+ */
207
+ type Dto<TModel> = {
208
+ [K in keyof TModel]: Exclude<TModel[K], '' | null>;
209
+ };
210
+ /** The two conversions between an API DTO and the model a signal form works with. */
211
+ declare class DtoUtils {
212
+ /**
213
+ * Builds a form model from the object returned by the API.
214
+ *
215
+ * The shape of the result is decided by `empty`, never by the DTO: every key of `empty` is in
216
+ * the result, taken from the DTO when it carries a usable value and left at its empty value
217
+ * otherwise. A DTO field that is absent and one that is explicitly `null` are treated the same,
218
+ * because both mean "the record has no value here" and the form wants its empty value for both.
219
+ *
220
+ * Keys that exist only in the model (a multi-select decomposed from a bitmask, a checkbox
221
+ * extracted from a flags value) simply keep their empty value: fill them in around the call.
222
+ *
223
+ * @param empty - The neutral model: it declares every field the form owns, and the value each
224
+ * one takes when the DTO does not carry it.
225
+ * @param dto - The object coming from the API, or `undefined` when creating a new record.
226
+ * @returns A new model, never the same reference as `empty` nor as `dto`.
227
+ * @example
228
+ * const EMPTY_PLACE: PlaceForm = { name: '', city: '', phone: '', disabled: false };
229
+ * this.form().reset(DtoUtils.fromModel(EMPTY_PLACE, r.value));
230
+ */
231
+ static fromModel<TModel extends object>(empty: TModel, dto?: Partial<TModel> | null): TModel;
232
+ /**
233
+ * Builds the payload for the API from the current form model.
234
+ *
235
+ * Every empty value — `''`, `null` or `undefined` — is dropped, so a field the user never filled
236
+ * in travels as absent instead of reaching the backend as an empty string that would blank the
237
+ * record. `0` and `false` are NOT empty: an amount of zero and a switch left off are data, and a
238
+ * filter that wants an unticked box to mean "no filter" has to say so where it builds its query.
239
+ *
240
+ * The conversion is shallow: nested objects and arrays are passed through as they are, so a
241
+ * composite field (a bitmask to rebuild, a nested block to normalize) is handled around the call
242
+ * — usually by destructuring it out of the model first.
243
+ *
244
+ * The return type is {@link Dto}, the model without its empty values, so what the compiler sees
245
+ * matches what travels: a `coachLevel: CoachLevel | null` field arrives as `CoachLevel` and fits
246
+ * the optional `coachLevel?: CoachLevel` of the API model. At runtime the empty keys are simply
247
+ * not there, which is what `HttpClient` serializes anyway.
248
+ *
249
+ * @param model - The current form model.
250
+ * @returns A shallow copy without the empty fields.
251
+ * @example
252
+ * this.scmService.places.savePlace(DtoUtils.toModel(this.model()));
253
+ */
254
+ static toModel<TModel extends object>(model: TModel): Dto<TModel>;
255
+ }
256
+
185
257
  declare const UtilsMessages: {
186
258
  /**
187
259
  * Messages
@@ -1309,5 +1381,5 @@ declare class ThemeService implements OnDestroy {
1309
1381
  static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
1310
1382
  }
1311
1383
 
1312
- export { AutoFocusDirective, BroadcastChannelManager, BroadcastService, CHANNEL_NAME, CopyClipboardDirective, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, EnvironmentService, FileInfo, FormatHtmlPipe, FormatPipe, GroupModel, IDModel, ImportModel, LoginOAuthType, QueryModel, RelationModel, RemoveFocusDirective, ReplacePipe, SafeHtmlPipe, SafeUrlPipe, ScreenService, SearchCallbackPipe, SearchFilterPipe, SelectableModel, SplashService, SystemUtils, ThemeService, UpdateRelationsModel, UtilsMessages, ValueModel };
1313
- export type { AddModel, AddResultModel, ApiResponse, ApiResult, BroadcastChannelMessageBag, BroadcastChannelSubscriberInfo, BroadcastMessageInfo, BroadcastMessageToastData, Checkable, DeleteResultModel, DoneResult, EnableDisableModel, ErrorInfo, File, Folder, FolderTree, INode, KeyOf, LoginOAuthResult, LoginResult, NameValueItem, PasswordStrength, QueryResultModel, SearchBag, SearchFilterMetadata, Searchable, SendToModel, ThemeType, UpdateModel, UpdateResultModel, Validated };
1384
+ export { AutoFocusDirective, BroadcastChannelManager, BroadcastService, CHANNEL_NAME, CopyClipboardDirective, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, DtoUtils, EnvironmentService, FileInfo, FormatHtmlPipe, FormatPipe, GroupModel, IDModel, ImportModel, LoginOAuthType, QueryModel, RelationModel, RemoveFocusDirective, ReplacePipe, SafeHtmlPipe, SafeUrlPipe, ScreenService, SearchCallbackPipe, SearchFilterPipe, SelectableModel, SplashService, SystemUtils, ThemeService, UpdateRelationsModel, UtilsMessages, ValueModel };
1385
+ export type { AddModel, AddResultModel, ApiResponse, ApiResult, BroadcastChannelMessageBag, BroadcastChannelSubscriberInfo, BroadcastMessageInfo, BroadcastMessageToastData, Checkable, DeleteResultModel, DoneResult, Dto, EnableDisableModel, ErrorInfo, File, Folder, FolderTree, INode, KeyOf, LoginOAuthResult, LoginResult, NameValueItem, PasswordStrength, QueryResultModel, SearchBag, SearchFilterMetadata, Searchable, SendToModel, ThemeType, UpdateModel, UpdateResultModel, Validated };
@@ -1,323 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Service } from '@angular/core';
3
- import { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';
4
- import { PromptDialogType } from '@arsedizioni/ars-utils/ui';
5
-
6
- class ApplicationDialogService extends DialogService {
7
- /**
8
- * Open a send-to-email dialog.
9
- * @param title - Dialog title.
10
- * @param text - Pre-filled message body.
11
- * @param subject - Pre-filled subject line.
12
- * @param canPopulate - Whether the populate-recipients action is available.
13
- * @param count - Number of documents being sent.
14
- * @param options - Checkable option list.
15
- * @param width - Maximum dialog width in pixels.
16
- * @returns The opened dialog reference.
17
- */
18
- async sendTo(title = 'Invia per email', text, subject, canPopulate = false, count, options, width = 600) {
19
- const { SendToDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');
20
- return this.open(SendToDialogComponent, {
21
- ariaLabel: 'invia per email',
22
- autoFocus: 'dialog',
23
- restoreFocus: false,
24
- data: {
25
- title,
26
- count,
27
- canPopulate,
28
- appearance: this.appearance(),
29
- text,
30
- subject,
31
- options
32
- },
33
- closeOnNavigation: false,
34
- minWidth: '375px',
35
- maxWidth: `${width}px`,
36
- width: '100%'
37
- });
38
- }
39
- /**
40
- * Open a tree-node selection dialog.
41
- * @param nodes - The tree nodes to display.
42
- * @param title - Dialog title.
43
- * @param description - Optional description shown below the title.
44
- * @param initialFilter - Pre-applied filter text.
45
- * @param width - Maximum dialog width in pixels.
46
- * @param okCaption - Label for the confirm button.
47
- * @param canAppend - Whether the append-node action is available.
48
- * @returns The opened dialog reference.
49
- */
50
- async selectTree(nodes, title = 'Seleziona un elemento', description, initialFilter, width = 800, okCaption = 'Ok', canAppend = false) {
51
- const { SelectTreeDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');
52
- return this.open(SelectTreeDialogComponent, {
53
- ariaLabel: 'seleziona un elemento',
54
- autoFocus: 'dialog',
55
- restoreFocus: false,
56
- data: {
57
- title,
58
- description,
59
- initialFilter,
60
- okCaption,
61
- nodes,
62
- appearance: 'outline',
63
- canAppend
64
- },
65
- closeOnNavigation: false,
66
- minWidth: '375px',
67
- maxWidth: `${width}px`,
68
- width: '100%'
69
- });
70
- }
71
- /**
72
- * Open a picture-selection dialog.
73
- * @param title - Dialog title.
74
- * @param description - Brief description shown in the dialog.
75
- * @param okCaption - Label for the confirm button.
76
- * @param options - Checkable option list.
77
- * @param width - Maximum dialog width in pixels.
78
- * @param maxSize - Maximum accepted file size in MB.
79
- * @param maxPictureWidth - Maximum accepted picture width in pixels.
80
- * @param maxPictureHeight - Maximum accepted picture height in pixels.
81
- * @returns The opened dialog reference.
82
- */
83
- async selectPicture(title = 'Seleziona immagine', description, okCaption = 'Ok', options, width = 600, maxSize, maxPictureWidth, maxPictureHeight) {
84
- const { SelectPictureDialogComponent } = await import('@arsedizioni/ars-utils/ui.files');
85
- return this.open(SelectPictureDialogComponent, {
86
- ariaLabel: 'seleziona immagine',
87
- autoFocus: 'dialog',
88
- restoreFocus: false,
89
- data: {
90
- title,
91
- description,
92
- okCaption,
93
- options,
94
- appearance: this.appearance(),
95
- maxSize,
96
- maxWidth: maxPictureWidth,
97
- maxHeight: maxPictureHeight
98
- },
99
- closeOnNavigation: false,
100
- disableClose: true,
101
- minWidth: '375px',
102
- maxWidth: `${width}px`,
103
- width: '100%'
104
- });
105
- }
106
- /**
107
- * Open a file-selection dialog.
108
- * @param title - Dialog title.
109
- * @param description - Brief description shown in the dialog.
110
- * @param okCaption - Label for the confirm button.
111
- * @param helpLink - URL for the help link.
112
- * @param helpCaption - Display text for the help link.
113
- * @param options - Checkable option list.
114
- * @param width - Maximum dialog width in pixels.
115
- * @param maxSize - Maximum accepted file size in MB.
116
- * @param accept - Accepted file extensions (e.g. `.pdf,.docx`).
117
- * @returns The opened dialog reference.
118
- */
119
- async selectFile(title = 'Seleziona file', description, okCaption = 'Ok', helpLink, helpCaption, options, width = 600, maxSize, accept) {
120
- const { SelectFileDialogComponent } = await import('@arsedizioni/ars-utils/ui.files');
121
- return this.open(SelectFileDialogComponent, {
122
- ariaLabel: 'seleziona file',
123
- autoFocus: 'dialog',
124
- restoreFocus: false,
125
- data: {
126
- title,
127
- description,
128
- okCaption,
129
- helpLink,
130
- helpCaption,
131
- options,
132
- appearance: this.appearance(),
133
- maxSize,
134
- accept
135
- },
136
- closeOnNavigation: false,
137
- disableClose: true,
138
- minWidth: '375px',
139
- maxWidth: `${width}px`,
140
- width: '100%'
141
- });
142
- }
143
- /**
144
- * Open a multipurpose selection and CRUD dialog.
145
- * @param data - The dialog configuration model.
146
- * @param disableClose - Whether the dialog can be closed by clicking outside.
147
- * @param closeOnNavigation - Whether the dialog closes on route navigation.
148
- * @returns The opened dialog reference.
149
- */
150
- async select(data, disableClose = true, closeOnNavigation = true) {
151
- const { SelectDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');
152
- const dialogData = { ...data, appearance: data.appearance ?? 'outline' };
153
- return this.open(SelectDialogComponent, {
154
- ariaLabel: 'seleziona',
155
- autoFocus: 'dialog',
156
- restoreFocus: false,
157
- data: dialogData,
158
- closeOnNavigation: closeOnNavigation,
159
- disableClose: disableClose,
160
- minWidth: '375px',
161
- maxWidth: `${data.width ?? 800}px`,
162
- width: '100%'
163
- });
164
- }
165
- /**
166
- * Prompt the user to enter a value.
167
- * @param title - Dialog title.
168
- * @param type - The input type (default, text, number, etc.).
169
- * @param description - Placeholder or description text.
170
- * @param initialValue - Pre-filled value.
171
- * @param okCaption - Label for the confirm button.
172
- * @param cancelCaption - Label for the cancel button.
173
- * @param options - Checkable option list.
174
- * @param width - Maximum dialog width in pixels.
175
- * @param required - Whether the input is required.
176
- * @returns The opened dialog reference.
177
- */
178
- async prompt(title, type = PromptDialogType.Default, description, initialValue, okCaption = 'Ok', cancelCaption = 'Annulla', options, width = 500, required) {
179
- const { PromptDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');
180
- return this.open(PromptDialogComponent, {
181
- ariaLabel: 'inserisci valore',
182
- autoFocus: 'dialog',
183
- restoreFocus: false,
184
- data: {
185
- title,
186
- type,
187
- description,
188
- initialValue,
189
- okCaption,
190
- cancelCaption,
191
- appearance: this.appearance(),
192
- required,
193
- options
194
- },
195
- closeOnNavigation: false,
196
- disableClose: true,
197
- minWidth: '375px',
198
- maxWidth: `${width}px`,
199
- width: '100%'
200
- });
201
- }
202
- /**
203
- * Prompt the user to enter a date or date interval.
204
- * @param title - Dialog title.
205
- * @param type - Date or DateInterval.
206
- * @param description - Placeholder or description text.
207
- * @param initialValue - Pre-filled value.
208
- * @param okCaption - Label for the confirm button.
209
- * @param cancelCaption - Label for the cancel button.
210
- * @param options - Checkable option list.
211
- * @param width - Maximum dialog width in pixels.
212
- * @param required - Whether the input is required.
213
- * @returns The opened dialog reference.
214
- */
215
- async promptDate(title, type = PromptDialogType.Date, description, initialValue, okCaption = 'Ok', cancelCaption = 'Annulla', options, width = 500, required) {
216
- const { PromptDateDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');
217
- return this.open(PromptDateDialogComponent, {
218
- ariaLabel: 'inserisci data',
219
- autoFocus: 'dialog',
220
- restoreFocus: false,
221
- data: {
222
- title,
223
- type,
224
- description,
225
- initialValue,
226
- okCaption,
227
- cancelCaption,
228
- appearance: this.appearance(),
229
- required,
230
- options
231
- },
232
- closeOnNavigation: false,
233
- disableClose: true,
234
- minWidth: '375px',
235
- maxWidth: `${width}px`,
236
- width: '100%'
237
- });
238
- }
239
- /**
240
- * Prompt the user to enter a time value.
241
- * @param title - Dialog title.
242
- * @param description - Placeholder or description text.
243
- * @param slots - Optional time slots string.
244
- * @param initialValue - Pre-filled value.
245
- * @param okCaption - Label for the confirm button.
246
- * @param cancelCaption - Label for the cancel button.
247
- * @param options - Checkable option list.
248
- * @param width - Maximum dialog width in pixels.
249
- * @param required - Whether the input is required.
250
- * @returns The opened dialog reference.
251
- */
252
- async promptTime(title, description, slots, initialValue, okCaption = 'Ok', cancelCaption = 'Annulla', options, width = 500, required) {
253
- const { PromptTimeDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');
254
- return this.open(PromptTimeDialogComponent, {
255
- ariaLabel: 'inserisci orario',
256
- autoFocus: 'dialog',
257
- restoreFocus: false,
258
- data: {
259
- title,
260
- type: PromptDialogType.Time,
261
- description,
262
- slots,
263
- initialValue,
264
- okCaption,
265
- cancelCaption,
266
- appearance: this.appearance(),
267
- required,
268
- options
269
- },
270
- closeOnNavigation: false,
271
- disableClose: true,
272
- minWidth: '375px',
273
- maxWidth: `${width}px`,
274
- width: '100%'
275
- });
276
- }
277
- /**
278
- * Prompt the user to enter an OTP code.
279
- * @param title - Dialog title.
280
- * @param description - Description text shown in the dialog.
281
- * @param okCaption - Label for the confirm button.
282
- * @param cancelCaption - Label for the cancel button.
283
- * @param width - Maximum dialog width in pixels.
284
- * @returns The opened dialog reference.
285
- */
286
- async promptOtp(title = 'Conferma la tua identità', description, okCaption = 'Ok', cancelCaption = 'Annulla', width = 500) {
287
- const { PromptOtpDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.auth');
288
- return this.open(PromptOtpDialogComponent, {
289
- ariaLabel: 'inserisci codice OTP',
290
- autoFocus: 'dialog',
291
- restoreFocus: false,
292
- data: {
293
- title,
294
- type: PromptDialogType.Default,
295
- description,
296
- okCaption,
297
- cancelCaption,
298
- appearance: this.appearance(),
299
- },
300
- closeOnNavigation: false,
301
- disableClose: true,
302
- minWidth: '375px',
303
- maxWidth: `${width}px`,
304
- width: '100%'
305
- });
306
- }
307
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ApplicationDialogService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
308
- static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.3", ngImport: i0, type: ApplicationDialogService }); }
309
- }
310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ApplicationDialogService, decorators: [{
311
- type: Service
312
- }] });
313
-
314
- /*
315
- * Public API Surface of @arsedizioni/ars-utils/ui.application
316
- */
317
-
318
- /**
319
- * Generated bundle index. Do not edit.
320
- */
321
-
322
- export { ApplicationDialogService };
323
- //# sourceMappingURL=arsedizioni-ars-utils-ui.application.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-ui.application.mjs","sources":["../../../projects/ars-utils/ui.application/applicationDialog.service.ts","../../../projects/ars-utils/ui.application/public_api.ts","../../../projects/ars-utils/ui.application/arsedizioni-ars-utils-ui.application.ts"],"sourcesContent":["import { Service } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';\nimport type { SendToDialogComponent, SelectTreeDialogComponent, SelectDialogComponent } from '@arsedizioni/ars-utils/ui.dialogs.select';\n\nimport { PromptDialogData, PromptDialogType, PromptTimeDialogData, SelectDialogData, SelectFileDialogData, SelectTreeDialogData } from '@arsedizioni/ars-utils/ui';\nimport type { SelectPictureDialogComponent, SelectFileDialogComponent } from '@arsedizioni/ars-utils/ui.files';\n\nimport type { PromptDialogComponent, PromptDateDialogComponent, PromptTimeDialogComponent } from '@arsedizioni/ars-utils/ui.dialogs.prompt';\n\nimport type { PromptOtpDialogComponent } from '@arsedizioni/ars-utils/ui.dialogs.auth';\n\n@Service()\nexport class ApplicationDialogService extends DialogService {\n\n /**\n * Open a send-to-email dialog.\n * @param title - Dialog title.\n * @param text - Pre-filled message body.\n * @param subject - Pre-filled subject line.\n * @param canPopulate - Whether the populate-recipients action is available.\n * @param count - Number of documents being sent.\n * @param options - Checkable option list.\n * @param width - Maximum dialog width in pixels.\n * @returns The opened dialog reference.\n */\n async sendTo(\n title: string = 'Invia per email',\n text?: string,\n subject?: string,\n canPopulate: boolean = false,\n count?: number,\n options?: any,\n width: number = 600\n ): Promise<MatDialogRef<SendToDialogComponent, any> | null> {\n const { SendToDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');\n return this.open(SendToDialogComponent, {\n ariaLabel: 'invia per email',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n count,\n canPopulate,\n appearance: this.appearance(),\n text,\n subject,\n options\n },\n closeOnNavigation: false,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n\n /**\n * Open a tree-node selection dialog.\n * @param nodes - The tree nodes to display.\n * @param title - Dialog title.\n * @param description - Optional description shown below the title.\n * @param initialFilter - Pre-applied filter text.\n * @param width - Maximum dialog width in pixels.\n * @param okCaption - Label for the confirm button.\n * @param canAppend - Whether the append-node action is available.\n * @returns The opened dialog reference.\n */\n async selectTree(\n nodes: any,\n title: string = 'Seleziona un elemento',\n description?: string,\n initialFilter?: string,\n width: number = 800,\n okCaption: string = 'Ok',\n canAppend: boolean = false\n ): Promise<MatDialogRef<SelectTreeDialogComponent, any> | null> {\n const { SelectTreeDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');\n return this.open(SelectTreeDialogComponent, {\n ariaLabel: 'seleziona un elemento',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n description,\n initialFilter,\n okCaption,\n nodes,\n appearance: 'outline',\n canAppend\n } as SelectTreeDialogData,\n closeOnNavigation: false,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n /**\n * Open a picture-selection dialog.\n * @param title - Dialog title.\n * @param description - Brief description shown in the dialog.\n * @param okCaption - Label for the confirm button.\n * @param options - Checkable option list.\n * @param width - Maximum dialog width in pixels.\n * @param maxSize - Maximum accepted file size in MB.\n * @param maxPictureWidth - Maximum accepted picture width in pixels.\n * @param maxPictureHeight - Maximum accepted picture height in pixels.\n * @returns The opened dialog reference.\n */\n async selectPicture(\n title: string = 'Seleziona immagine',\n description?: string,\n okCaption: string = 'Ok',\n options?: any,\n width: number = 600,\n maxSize?: number,\n maxPictureWidth?: number,\n maxPictureHeight?: number\n ): Promise<MatDialogRef<SelectPictureDialogComponent, any> | null> {\n const { SelectPictureDialogComponent } = await import('@arsedizioni/ars-utils/ui.files');\n return this.open(SelectPictureDialogComponent, {\n ariaLabel: 'seleziona immagine',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n description,\n okCaption,\n options,\n appearance: this.appearance(),\n maxSize,\n maxWidth: maxPictureWidth,\n maxHeight: maxPictureHeight\n } as SelectFileDialogData,\n closeOnNavigation: false,\n disableClose: true,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n\n /**\n * Open a file-selection dialog.\n * @param title - Dialog title.\n * @param description - Brief description shown in the dialog.\n * @param okCaption - Label for the confirm button.\n * @param helpLink - URL for the help link.\n * @param helpCaption - Display text for the help link.\n * @param options - Checkable option list.\n * @param width - Maximum dialog width in pixels.\n * @param maxSize - Maximum accepted file size in MB.\n * @param accept - Accepted file extensions (e.g. `.pdf,.docx`).\n * @returns The opened dialog reference.\n */\n async selectFile(\n title: string = 'Seleziona file',\n description?: string,\n okCaption: string = 'Ok',\n helpLink?: string,\n helpCaption?: string,\n options?: any,\n width: number = 600,\n maxSize?: number,\n accept?: string\n ): Promise<MatDialogRef<SelectFileDialogComponent, any> | null> {\n const { SelectFileDialogComponent } = await import('@arsedizioni/ars-utils/ui.files');\n return this.open(SelectFileDialogComponent, {\n ariaLabel: 'seleziona file',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n description,\n okCaption,\n helpLink,\n helpCaption,\n options,\n appearance: this.appearance(),\n maxSize,\n accept\n } as SelectFileDialogData,\n closeOnNavigation: false,\n disableClose: true,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n\n /**\n * Open a multipurpose selection and CRUD dialog.\n * @param data - The dialog configuration model.\n * @param disableClose - Whether the dialog can be closed by clicking outside.\n * @param closeOnNavigation - Whether the dialog closes on route navigation.\n * @returns The opened dialog reference.\n */\n async select(\n data: SelectDialogData,\n disableClose: boolean = true,\n closeOnNavigation: boolean = true\n ): Promise<MatDialogRef<SelectDialogComponent, any> | null> {\n const { SelectDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');\n const dialogData: SelectDialogData = { ...data, appearance: data.appearance ?? 'outline' };\n return this.open(SelectDialogComponent, {\n ariaLabel: 'seleziona',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: dialogData,\n closeOnNavigation: closeOnNavigation,\n disableClose: disableClose,\n minWidth: '375px',\n maxWidth: `${data.width ?? 800}px`,\n width: '100%'\n });\n }\n\n /**\n * Prompt the user to enter a value.\n * @param title - Dialog title.\n * @param type - The input type (default, text, number, etc.).\n * @param description - Placeholder or description text.\n * @param initialValue - Pre-filled value.\n * @param okCaption - Label for the confirm button.\n * @param cancelCaption - Label for the cancel button.\n * @param options - Checkable option list.\n * @param width - Maximum dialog width in pixels.\n * @param required - Whether the input is required.\n * @returns The opened dialog reference.\n */\n async prompt(\n title: string,\n type: PromptDialogType = PromptDialogType.Default,\n description?: string,\n initialValue?: any,\n okCaption: string = 'Ok',\n cancelCaption: string = 'Annulla',\n options?: any,\n width: number = 500,\n required?: boolean,\n ): Promise<MatDialogRef<PromptDialogComponent> | null> {\n const { PromptDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');\n return this.open(PromptDialogComponent, {\n ariaLabel: 'inserisci valore',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n type,\n description,\n initialValue,\n okCaption,\n cancelCaption,\n appearance: this.appearance(),\n required,\n options\n } as PromptDialogData,\n closeOnNavigation: false,\n disableClose: true,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n\n /**\n * Prompt the user to enter a date or date interval.\n * @param title - Dialog title.\n * @param type - Date or DateInterval.\n * @param description - Placeholder or description text.\n * @param initialValue - Pre-filled value.\n * @param okCaption - Label for the confirm button.\n * @param cancelCaption - Label for the cancel button.\n * @param options - Checkable option list.\n * @param width - Maximum dialog width in pixels.\n * @param required - Whether the input is required.\n * @returns The opened dialog reference.\n */\n async promptDate(\n title: string,\n type: PromptDialogType.Date | PromptDialogType.DateInterval = PromptDialogType.Date,\n description?: string,\n initialValue?: any,\n okCaption: string = 'Ok',\n cancelCaption: string = 'Annulla',\n options?: any,\n width: number = 500,\n required?: boolean,\n ): Promise<MatDialogRef<PromptDateDialogComponent> | null> {\n const { PromptDateDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');\n return this.open(PromptDateDialogComponent, {\n ariaLabel: 'inserisci data',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n type,\n description,\n initialValue,\n okCaption,\n cancelCaption,\n appearance: this.appearance(),\n required,\n options\n } as PromptDialogData,\n closeOnNavigation: false,\n disableClose: true,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n\n /**\n * Prompt the user to enter a time value.\n * @param title - Dialog title.\n * @param description - Placeholder or description text.\n * @param slots - Optional time slots string.\n * @param initialValue - Pre-filled value.\n * @param okCaption - Label for the confirm button.\n * @param cancelCaption - Label for the cancel button.\n * @param options - Checkable option list.\n * @param width - Maximum dialog width in pixels.\n * @param required - Whether the input is required.\n * @returns The opened dialog reference.\n */\n async promptTime(\n title: string,\n description?: string,\n slots?: string,\n initialValue?: any,\n okCaption: string = 'Ok',\n cancelCaption: string = 'Annulla',\n options?: any,\n width: number = 500,\n required?: boolean,\n ): Promise<MatDialogRef<PromptTimeDialogComponent> | null> {\n const { PromptTimeDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');\n return this.open(PromptTimeDialogComponent, {\n ariaLabel: 'inserisci orario',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n type: PromptDialogType.Time,\n description,\n slots,\n initialValue,\n okCaption,\n cancelCaption,\n appearance: this.appearance(),\n required,\n options\n } as PromptTimeDialogData,\n closeOnNavigation: false,\n disableClose: true,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n\n /**\n * Prompt the user to enter an OTP code.\n * @param title - Dialog title.\n * @param description - Description text shown in the dialog.\n * @param okCaption - Label for the confirm button.\n * @param cancelCaption - Label for the cancel button.\n * @param width - Maximum dialog width in pixels.\n * @returns The opened dialog reference.\n */\n async promptOtp(\n title: string = 'Conferma la tua identità',\n description?: string,\n okCaption: string = 'Ok',\n cancelCaption: string = 'Annulla',\n width: number = 500,\n ): Promise<MatDialogRef<PromptOtpDialogComponent> | null> {\n const { PromptOtpDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.auth');\n return this.open(PromptOtpDialogComponent, {\n ariaLabel: 'inserisci codice OTP',\n autoFocus: 'dialog',\n restoreFocus: false,\n data: {\n title,\n type: PromptDialogType.Default,\n description,\n okCaption,\n cancelCaption,\n appearance: this.appearance(),\n } as PromptDialogData,\n closeOnNavigation: false,\n disableClose: true,\n minWidth: '375px',\n maxWidth: `${width}px`,\n width: '100%'\n });\n }\n}\n","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.application\n */\nexport * from './applicationDialog.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAaM,MAAO,wBAAyB,SAAQ,aAAa,CAAA;AAEzD;;;;;;;;;;AAUG;AACH,IAAA,MAAM,MAAM,CACV,QAAgB,iBAAiB,EACjC,IAAa,EACb,OAAgB,EAChB,WAAA,GAAuB,KAAK,EAC5B,KAAc,EACd,OAAa,EACb,QAAgB,GAAG,EAAA;QAEnB,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,OAAO,0CAA0C,CAAC;AAC1F,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE;AACtC,YAAA,SAAS,EAAE,iBAAi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YAAY,EAAE,KAAK;AACnB,YAAA,IAAI,EAAE;gBACJ,KAAK;gBACL,IAAI,EAAE,gBAAgB,CAAC,OAAO;gBAC9B,WAAW;gBACX,SAAS;gBACT,aAAa;AACb,gBAAA,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;AACV,aAAA;AACrB,YAAA,iBAAiB,EAAE,KAAK;AACxB,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,CAAA,EAAG,KAAK,CAAA,EAAA,CAAI;AACtB,YAAA,KAAK,EAAE;AACR,SAAA,CAAC;IACJ;8GA/XW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA,CAAA;+GAAxB,wBAAwB,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC;;;ACZD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1,126 +0,0 @@
1
- import { MatDialogRef } from '@angular/material/dialog';
2
- import { DialogService } from '@arsedizioni/ars-utils/ui.dialogs';
3
- import { SendToDialogComponent, SelectTreeDialogComponent, SelectDialogComponent } from '@arsedizioni/ars-utils/ui.dialogs.select';
4
- import { SelectDialogData, PromptDialogType } from '@arsedizioni/ars-utils/ui';
5
- import { SelectPictureDialogComponent, SelectFileDialogComponent } from '@arsedizioni/ars-utils/ui.files';
6
- import { PromptDialogComponent, PromptDateDialogComponent, PromptTimeDialogComponent } from '@arsedizioni/ars-utils/ui.dialogs.prompt';
7
- import { PromptOtpDialogComponent } from '@arsedizioni/ars-utils/ui.dialogs.auth';
8
- import * as i0 from '@angular/core';
9
-
10
- declare class ApplicationDialogService extends DialogService {
11
- /**
12
- * Open a send-to-email dialog.
13
- * @param title - Dialog title.
14
- * @param text - Pre-filled message body.
15
- * @param subject - Pre-filled subject line.
16
- * @param canPopulate - Whether the populate-recipients action is available.
17
- * @param count - Number of documents being sent.
18
- * @param options - Checkable option list.
19
- * @param width - Maximum dialog width in pixels.
20
- * @returns The opened dialog reference.
21
- */
22
- sendTo(title?: string, text?: string, subject?: string, canPopulate?: boolean, count?: number, options?: any, width?: number): Promise<MatDialogRef<SendToDialogComponent, any> | null>;
23
- /**
24
- * Open a tree-node selection dialog.
25
- * @param nodes - The tree nodes to display.
26
- * @param title - Dialog title.
27
- * @param description - Optional description shown below the title.
28
- * @param initialFilter - Pre-applied filter text.
29
- * @param width - Maximum dialog width in pixels.
30
- * @param okCaption - Label for the confirm button.
31
- * @param canAppend - Whether the append-node action is available.
32
- * @returns The opened dialog reference.
33
- */
34
- selectTree(nodes: any, title?: string, description?: string, initialFilter?: string, width?: number, okCaption?: string, canAppend?: boolean): Promise<MatDialogRef<SelectTreeDialogComponent, any> | null>;
35
- /**
36
- * Open a picture-selection dialog.
37
- * @param title - Dialog title.
38
- * @param description - Brief description shown in the dialog.
39
- * @param okCaption - Label for the confirm button.
40
- * @param options - Checkable option list.
41
- * @param width - Maximum dialog width in pixels.
42
- * @param maxSize - Maximum accepted file size in MB.
43
- * @param maxPictureWidth - Maximum accepted picture width in pixels.
44
- * @param maxPictureHeight - Maximum accepted picture height in pixels.
45
- * @returns The opened dialog reference.
46
- */
47
- selectPicture(title?: string, description?: string, okCaption?: string, options?: any, width?: number, maxSize?: number, maxPictureWidth?: number, maxPictureHeight?: number): Promise<MatDialogRef<SelectPictureDialogComponent, any> | null>;
48
- /**
49
- * Open a file-selection dialog.
50
- * @param title - Dialog title.
51
- * @param description - Brief description shown in the dialog.
52
- * @param okCaption - Label for the confirm button.
53
- * @param helpLink - URL for the help link.
54
- * @param helpCaption - Display text for the help link.
55
- * @param options - Checkable option list.
56
- * @param width - Maximum dialog width in pixels.
57
- * @param maxSize - Maximum accepted file size in MB.
58
- * @param accept - Accepted file extensions (e.g. `.pdf,.docx`).
59
- * @returns The opened dialog reference.
60
- */
61
- selectFile(title?: string, description?: string, okCaption?: string, helpLink?: string, helpCaption?: string, options?: any, width?: number, maxSize?: number, accept?: string): Promise<MatDialogRef<SelectFileDialogComponent, any> | null>;
62
- /**
63
- * Open a multipurpose selection and CRUD dialog.
64
- * @param data - The dialog configuration model.
65
- * @param disableClose - Whether the dialog can be closed by clicking outside.
66
- * @param closeOnNavigation - Whether the dialog closes on route navigation.
67
- * @returns The opened dialog reference.
68
- */
69
- select(data: SelectDialogData, disableClose?: boolean, closeOnNavigation?: boolean): Promise<MatDialogRef<SelectDialogComponent, any> | null>;
70
- /**
71
- * Prompt the user to enter a value.
72
- * @param title - Dialog title.
73
- * @param type - The input type (default, text, number, etc.).
74
- * @param description - Placeholder or description text.
75
- * @param initialValue - Pre-filled value.
76
- * @param okCaption - Label for the confirm button.
77
- * @param cancelCaption - Label for the cancel button.
78
- * @param options - Checkable option list.
79
- * @param width - Maximum dialog width in pixels.
80
- * @param required - Whether the input is required.
81
- * @returns The opened dialog reference.
82
- */
83
- prompt(title: string, type?: PromptDialogType, description?: string, initialValue?: any, okCaption?: string, cancelCaption?: string, options?: any, width?: number, required?: boolean): Promise<MatDialogRef<PromptDialogComponent> | null>;
84
- /**
85
- * Prompt the user to enter a date or date interval.
86
- * @param title - Dialog title.
87
- * @param type - Date or DateInterval.
88
- * @param description - Placeholder or description text.
89
- * @param initialValue - Pre-filled value.
90
- * @param okCaption - Label for the confirm button.
91
- * @param cancelCaption - Label for the cancel button.
92
- * @param options - Checkable option list.
93
- * @param width - Maximum dialog width in pixels.
94
- * @param required - Whether the input is required.
95
- * @returns The opened dialog reference.
96
- */
97
- promptDate(title: string, type?: PromptDialogType.Date | PromptDialogType.DateInterval, description?: string, initialValue?: any, okCaption?: string, cancelCaption?: string, options?: any, width?: number, required?: boolean): Promise<MatDialogRef<PromptDateDialogComponent> | null>;
98
- /**
99
- * Prompt the user to enter a time value.
100
- * @param title - Dialog title.
101
- * @param description - Placeholder or description text.
102
- * @param slots - Optional time slots string.
103
- * @param initialValue - Pre-filled value.
104
- * @param okCaption - Label for the confirm button.
105
- * @param cancelCaption - Label for the cancel button.
106
- * @param options - Checkable option list.
107
- * @param width - Maximum dialog width in pixels.
108
- * @param required - Whether the input is required.
109
- * @returns The opened dialog reference.
110
- */
111
- promptTime(title: string, description?: string, slots?: string, initialValue?: any, okCaption?: string, cancelCaption?: string, options?: any, width?: number, required?: boolean): Promise<MatDialogRef<PromptTimeDialogComponent> | null>;
112
- /**
113
- * Prompt the user to enter an OTP code.
114
- * @param title - Dialog title.
115
- * @param description - Description text shown in the dialog.
116
- * @param okCaption - Label for the confirm button.
117
- * @param cancelCaption - Label for the cancel button.
118
- * @param width - Maximum dialog width in pixels.
119
- * @returns The opened dialog reference.
120
- */
121
- promptOtp(title?: string, description?: string, okCaption?: string, cancelCaption?: string, width?: number): Promise<MatDialogRef<PromptOtpDialogComponent> | null>;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationDialogService, never>;
123
- static ɵprov: i0.ɵɵInjectableDeclaration<ApplicationDialogService>;
124
- }
125
-
126
- export { ApplicationDialogService };
@@ -1,4 +0,0 @@
1
- {
2
- "module": "../fesm2022/arsedizioni-ars-utils-ui.application.mjs",
3
- "typings": "../types/arsedizioni-ars-utils-ui.application.d.ts"
4
- }