@aerogel/core 0.0.0-next.c8f032a868370824898e171969aec1bb6827688e → 0.0.0-next.f8cdd39997c56dcd46e07c26af8a84d04d610fce

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.
Files changed (69) hide show
  1. package/dist/aerogel-core.cjs.js +1 -1
  2. package/dist/aerogel-core.cjs.js.map +1 -1
  3. package/dist/aerogel-core.d.ts +529 -87
  4. package/dist/aerogel-core.esm.js +1 -1
  5. package/dist/aerogel-core.esm.js.map +1 -1
  6. package/dist/virtual.d.ts +11 -0
  7. package/noeldemartin.config.js +4 -1
  8. package/package.json +3 -2
  9. package/src/bootstrap/index.ts +4 -1
  10. package/src/components/AGAppModals.vue +15 -0
  11. package/src/components/AGAppOverlays.vue +5 -7
  12. package/src/components/AGAppSnackbars.vue +13 -0
  13. package/src/components/basic/AGErrorMessage.vue +16 -0
  14. package/src/components/basic/AGLink.vue +9 -0
  15. package/src/components/basic/AGMarkdown.vue +10 -9
  16. package/src/components/basic/index.ts +3 -1
  17. package/src/components/constants.ts +8 -0
  18. package/src/components/forms/AGButton.vue +33 -10
  19. package/src/components/forms/AGCheckbox.vue +35 -0
  20. package/src/components/forms/AGInput.vue +8 -4
  21. package/src/components/forms/index.ts +2 -1
  22. package/src/components/headless/forms/AGHeadlessButton.vue +7 -7
  23. package/src/components/headless/forms/AGHeadlessInput.ts +2 -2
  24. package/src/components/headless/forms/AGHeadlessInput.vue +3 -3
  25. package/src/components/headless/forms/AGHeadlessInputError.vue +1 -1
  26. package/src/components/headless/forms/AGHeadlessInputInput.vue +15 -3
  27. package/src/components/headless/index.ts +1 -0
  28. package/src/components/headless/modals/AGHeadlessModalPanel.vue +5 -1
  29. package/src/components/headless/snackbars/AGHeadlessSnackbar.vue +10 -0
  30. package/src/components/headless/snackbars/index.ts +25 -0
  31. package/src/components/index.ts +2 -0
  32. package/src/components/modals/AGAlertModal.vue +0 -1
  33. package/src/components/modals/AGConfirmModal.vue +1 -1
  34. package/src/components/modals/AGErrorReportModal.ts +20 -0
  35. package/src/components/modals/AGErrorReportModal.vue +62 -0
  36. package/src/components/modals/AGErrorReportModalButtons.vue +109 -0
  37. package/src/components/modals/AGErrorReportModalTitle.vue +25 -0
  38. package/src/components/modals/AGLoadingModal.vue +19 -0
  39. package/src/components/modals/AGModal.vue +21 -3
  40. package/src/components/modals/index.ts +16 -2
  41. package/src/components/snackbars/AGSnackbar.vue +42 -0
  42. package/src/components/snackbars/index.ts +3 -0
  43. package/src/directives/index.ts +16 -3
  44. package/src/errors/Errors.state.ts +31 -0
  45. package/src/errors/Errors.ts +183 -0
  46. package/src/errors/index.ts +59 -0
  47. package/src/forms/Form.test.ts +21 -0
  48. package/src/forms/Form.ts +20 -10
  49. package/src/forms/utils.ts +17 -0
  50. package/src/lang/Lang.ts +12 -4
  51. package/src/lang/index.ts +3 -5
  52. package/src/lang/utils.ts +4 -0
  53. package/src/main.ts +1 -2
  54. package/src/services/App.state.ts +8 -2
  55. package/src/services/App.ts +9 -1
  56. package/src/services/Service.ts +132 -45
  57. package/src/services/index.ts +21 -4
  58. package/src/services/store.ts +27 -0
  59. package/src/types/virtual.d.ts +11 -0
  60. package/src/ui/UI.state.ts +11 -1
  61. package/src/ui/UI.ts +52 -8
  62. package/src/ui/index.ts +7 -1
  63. package/src/utils/composition/forms.ts +11 -0
  64. package/src/utils/index.ts +1 -0
  65. package/src/utils/markdown.ts +11 -2
  66. package/src/utils/vue.ts +2 -0
  67. package/tsconfig.json +1 -0
  68. package/vite.config.ts +2 -1
  69. package/src/globals.ts +0 -6
@@ -11,7 +11,7 @@ import type { Directive } from 'vue';
11
11
  import { ExtractPropTypes } from 'vue';
12
12
  import { Facade } from '@noeldemartin/utils';
13
13
  import type { InjectionKey } from 'vue';
14
- import type { LocationQuery } from 'vue-router';
14
+ import type { JSError } from '@noeldemartin/utils';
15
15
  import { MagicObject } from '@noeldemartin/utils';
16
16
  import type { ObjectValues } from '@noeldemartin/utils';
17
17
  import { PromisedValue } from '@noeldemartin/utils';
@@ -19,7 +19,6 @@ import { PropType } from 'vue';
19
19
  import type { Ref } from 'vue';
20
20
  import { RendererElement } from 'vue';
21
21
  import { RendererNode } from 'vue';
22
- import type { RouteParams } from 'vue-router';
23
22
  import type { UnwrapNestedRefs } from 'vue';
24
23
  import { VNode } from 'vue';
25
24
  import { VNodeProps } from 'vue';
@@ -69,23 +68,43 @@ export declare const AGAppOverlays: DefineComponent< {}, (_ctx: any, _cache:
69
68
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
70
69
 
71
70
  export declare const AGButton: DefineComponent< {
72
- secondary: {
73
- type: PropType<boolean>;
71
+ color: {
72
+ type: PropType<"primary" | "secondary" | "danger" | "clear">;
74
73
  validator?(value: unknown): boolean;
75
74
  } & {
76
- default: boolean | (() => boolean) | null;
75
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
77
76
  };
78
77
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
79
78
  [key: string]: any;
80
79
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
81
- secondary: {
82
- type: PropType<boolean>;
80
+ color: {
81
+ type: PropType<"primary" | "secondary" | "danger" | "clear">;
83
82
  validator?(value: unknown): boolean;
84
83
  } & {
85
- default: boolean | (() => boolean) | null;
84
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
86
85
  };
87
86
  }>>, {
88
- secondary: boolean;
87
+ color: "primary" | "secondary" | "danger" | "clear";
88
+ }, {}>;
89
+
90
+ export declare const AGCheckbox: DefineComponent< {
91
+ name: {
92
+ type: PropType<string | null>;
93
+ validator?(value: unknown): boolean;
94
+ } & {
95
+ default: string | (() => string | null) | null;
96
+ };
97
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
98
+ [key: string]: any;
99
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
100
+ name: {
101
+ type: PropType<string | null>;
102
+ validator?(value: unknown): boolean;
103
+ } & {
104
+ default: string | (() => string | null) | null;
105
+ };
106
+ }>>, {
107
+ name: string | null;
89
108
  }, {}>;
90
109
 
91
110
  export declare const AGConfirmModal: DefineComponent< {
@@ -120,6 +139,87 @@ required: true;
120
139
  title: string | null;
121
140
  }, {}>;
122
141
 
142
+ export declare const AGErrorMessage: DefineComponent< {
143
+ error: {
144
+ type: PropType<unknown>;
145
+ validator?(value: unknown): boolean;
146
+ } & {
147
+ required: true;
148
+ };
149
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
150
+ [key: string]: any;
151
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
152
+ error: {
153
+ type: PropType<unknown>;
154
+ validator?(value: unknown): boolean;
155
+ } & {
156
+ required: true;
157
+ };
158
+ }>>, {}, {}>;
159
+
160
+ export declare const AGErrorReportModalButtons: DefineComponent< {
161
+ report: {
162
+ type: PropType<ErrorReport>;
163
+ validator?(value: unknown): boolean;
164
+ } & {
165
+ required: true;
166
+ };
167
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
168
+ [key: string]: any;
169
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
170
+ report: {
171
+ type: PropType<ErrorReport>;
172
+ validator?(value: unknown): boolean;
173
+ } & {
174
+ required: true;
175
+ };
176
+ }>>, {}, {}>;
177
+
178
+ export declare const AGErrorReportModalTitle: DefineComponent< {
179
+ report: {
180
+ type: PropType<ErrorReport>;
181
+ validator?(value: unknown): boolean;
182
+ } & {
183
+ required: true;
184
+ };
185
+ currentReport: {
186
+ type: PropType<number | null>;
187
+ validator?(value: unknown): boolean;
188
+ } & {
189
+ default: number | (() => number | null) | null;
190
+ };
191
+ totalReports: {
192
+ type: PropType<number | null>;
193
+ validator?(value: unknown): boolean;
194
+ } & {
195
+ default: number | (() => number | null) | null;
196
+ };
197
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
198
+ [key: string]: any;
199
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
200
+ report: {
201
+ type: PropType<ErrorReport>;
202
+ validator?(value: unknown): boolean;
203
+ } & {
204
+ required: true;
205
+ };
206
+ currentReport: {
207
+ type: PropType<number | null>;
208
+ validator?(value: unknown): boolean;
209
+ } & {
210
+ default: number | (() => number | null) | null;
211
+ };
212
+ totalReports: {
213
+ type: PropType<number | null>;
214
+ validator?(value: unknown): boolean;
215
+ } & {
216
+ default: number | (() => number | null) | null;
217
+ };
218
+ }>>, {
219
+ currentReport: number | null;
220
+ totalReports: number | null;
221
+ }, {}>;
222
+
123
223
  export declare const AGForm: DefineComponent< {
124
224
  form: {
125
225
  type: PropType<Form<FormFieldDefinitions> | null>;
@@ -143,6 +243,12 @@ form: Form<FormFieldDefinitions> | null;
143
243
  }, {}>;
144
244
 
145
245
  export declare const AGHeadlessButton: DefineComponent< {
246
+ href: {
247
+ type: PropType<string | null>;
248
+ validator?(value: unknown): boolean;
249
+ } & {
250
+ default: string | (() => string | null) | null;
251
+ };
146
252
  url: {
147
253
  type: PropType<string | null>;
148
254
  validator?(value: unknown): boolean;
@@ -156,16 +262,16 @@ validator?(value: unknown): boolean;
156
262
  default: string | (() => string | null) | null;
157
263
  };
158
264
  routeParams: {
159
- type: PropType<RouteParams>;
265
+ type: PropType< {}>;
160
266
  validator?(value: unknown): boolean;
161
267
  } & {
162
- default: RouteParams | (() => RouteParams) | null;
268
+ default: {} | (() => {}) | null;
163
269
  };
164
270
  routeQuery: {
165
- type: PropType<LocationQuery>;
271
+ type: PropType< {}>;
166
272
  validator?(value: unknown): boolean;
167
273
  } & {
168
- default: LocationQuery | (() => LocationQuery) | null;
274
+ default: {} | (() => {}) | null;
169
275
  };
170
276
  submit: {
171
277
  type: PropType<boolean>;
@@ -176,6 +282,12 @@ default: boolean | (() => boolean) | null;
176
282
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
177
283
  [key: string]: any;
178
284
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
285
+ href: {
286
+ type: PropType<string | null>;
287
+ validator?(value: unknown): boolean;
288
+ } & {
289
+ default: string | (() => string | null) | null;
290
+ };
179
291
  url: {
180
292
  type: PropType<string | null>;
181
293
  validator?(value: unknown): boolean;
@@ -189,16 +301,16 @@ validator?(value: unknown): boolean;
189
301
  default: string | (() => string | null) | null;
190
302
  };
191
303
  routeParams: {
192
- type: PropType<RouteParams>;
304
+ type: PropType< {}>;
193
305
  validator?(value: unknown): boolean;
194
306
  } & {
195
- default: RouteParams | (() => RouteParams) | null;
307
+ default: {} | (() => {}) | null;
196
308
  };
197
309
  routeQuery: {
198
- type: PropType<LocationQuery>;
310
+ type: PropType< {}>;
199
311
  validator?(value: unknown): boolean;
200
312
  } & {
201
- default: LocationQuery | (() => LocationQuery) | null;
313
+ default: {} | (() => {}) | null;
202
314
  };
203
315
  submit: {
204
316
  type: PropType<boolean>;
@@ -207,19 +319,20 @@ validator?(value: unknown): boolean;
207
319
  default: boolean | (() => boolean) | null;
208
320
  };
209
321
  }>>, {
322
+ href: string | null;
210
323
  url: string | null;
211
324
  route: string | null;
212
- routeParams: RouteParams;
213
- routeQuery: LocationQuery;
325
+ routeParams: {};
326
+ routeQuery: {};
214
327
  submit: boolean;
215
328
  }, {}>;
216
329
 
217
330
  export declare const AGHeadlessInput: DefineComponent< {
218
331
  as: {
219
- type: PropType<string | null>;
332
+ type: PropType<string>;
220
333
  validator?(value: unknown): boolean;
221
334
  } & {
222
- default: string | (() => string | null) | null;
335
+ default: string | (() => string) | null;
223
336
  };
224
337
  name: {
225
338
  type: PropType<string | null>;
@@ -228,19 +341,19 @@ validator?(value: unknown): boolean;
228
341
  default: string | (() => string | null) | null;
229
342
  };
230
343
  modelValue: {
231
- type: PropType<string | null>;
344
+ type: PropType<string | number | boolean | null>;
232
345
  validator?(value: unknown): boolean;
233
346
  } & {
234
- default: string | (() => string | null) | null;
347
+ default: string | number | boolean | (() => string | number | boolean | null) | null;
235
348
  };
236
349
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
237
350
  [key: string]: any;
238
351
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
239
352
  as: {
240
- type: PropType<string | null>;
353
+ type: PropType<string>;
241
354
  validator?(value: unknown): boolean;
242
355
  } & {
243
- default: string | (() => string | null) | null;
356
+ default: string | (() => string) | null;
244
357
  };
245
358
  name: {
246
359
  type: PropType<string | null>;
@@ -249,26 +362,42 @@ validator?(value: unknown): boolean;
249
362
  default: string | (() => string | null) | null;
250
363
  };
251
364
  modelValue: {
252
- type: PropType<string | null>;
365
+ type: PropType<string | number | boolean | null>;
253
366
  validator?(value: unknown): boolean;
254
367
  } & {
255
- default: string | (() => string | null) | null;
368
+ default: string | number | boolean | (() => string | number | boolean | null) | null;
256
369
  };
257
370
  }>> & {
258
371
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
259
372
  }, {
260
- as: string | null;
373
+ as: string;
261
374
  name: string | null;
262
- modelValue: string | null;
375
+ modelValue: string | number | boolean | null;
263
376
  }, {}>;
264
377
 
265
378
  export declare const AGHeadlessInputError: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
266
379
  [key: string]: any;
267
380
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
268
381
 
269
- export declare const AGHeadlessInputInput: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
382
+ export declare const AGHeadlessInputInput: DefineComponent< {
383
+ type: {
384
+ type: PropType<string>;
385
+ validator?(value: unknown): boolean;
386
+ } & {
387
+ default: string | (() => string) | null;
388
+ };
389
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
270
390
  [key: string]: any;
271
- }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
391
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
392
+ type: {
393
+ type: PropType<string>;
394
+ validator?(value: unknown): boolean;
395
+ } & {
396
+ default: string | (() => string) | null;
397
+ };
398
+ }>>, {
399
+ type: string;
400
+ }, {}>;
272
401
 
273
402
  export declare const AGHeadlessInputLabel: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
274
403
  [key: string]: any;
@@ -318,6 +447,10 @@ default: string | (() => string) | null;
318
447
  as: string;
319
448
  }, {}>;
320
449
 
450
+ export declare const AGHeadlessSnackbar: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
451
+ [key: string]: any;
452
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
453
+
321
454
  export declare const AGInput: DefineComponent< {
322
455
  name: {
323
456
  type: PropType<string | null>;
@@ -338,20 +471,32 @@ default: string | (() => string | null) | null;
338
471
  name: string | null;
339
472
  }, {}>;
340
473
 
341
- export declare const AGMarkdown: DefineComponent< {
342
- as: {
343
- type: PropType<string>;
474
+ export declare const AGLink: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
475
+ [key: string]: any;
476
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
477
+
478
+ export declare const AGLoadingModal: DefineComponent< {
479
+ message: {
480
+ type: PropType<string | null>;
344
481
  validator?(value: unknown): boolean;
345
482
  } & {
346
- default: string | (() => string) | null;
483
+ default: string | (() => string | null) | null;
347
484
  };
348
- langKey: {
485
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
486
+ [key: string]: any;
487
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
488
+ message: {
349
489
  type: PropType<string | null>;
350
490
  validator?(value: unknown): boolean;
351
491
  } & {
352
492
  default: string | (() => string | null) | null;
353
493
  };
354
- text: {
494
+ }>>, {
495
+ message: string | null;
496
+ }, {}>;
497
+
498
+ export declare const AGMarkdown: DefineComponent< {
499
+ as: {
355
500
  type: PropType<string | null>;
356
501
  validator?(value: unknown): boolean;
357
502
  } & {
@@ -363,20 +508,38 @@ validator?(value: unknown): boolean;
363
508
  } & {
364
509
  default: boolean | (() => boolean) | null;
365
510
  };
366
- raw: {
367
- type: PropType<boolean>;
511
+ langKey: {
512
+ type: PropType<string | null>;
368
513
  validator?(value: unknown): boolean;
369
514
  } & {
370
- default: boolean | (() => boolean) | null;
515
+ default: string | (() => string | null) | null;
516
+ };
517
+ langParams: {
518
+ type: PropType<Record<string, unknown> | null>;
519
+ validator?(value: unknown): boolean;
520
+ } & {
521
+ default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
522
+ };
523
+ text: {
524
+ type: PropType<string | null>;
525
+ validator?(value: unknown): boolean;
526
+ } & {
527
+ default: string | (() => string | null) | null;
371
528
  };
372
529
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
373
530
  [key: string]: any;
374
531
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
375
532
  as: {
376
- type: PropType<string>;
533
+ type: PropType<string | null>;
377
534
  validator?(value: unknown): boolean;
378
535
  } & {
379
- default: string | (() => string) | null;
536
+ default: string | (() => string | null) | null;
537
+ };
538
+ inline: {
539
+ type: PropType<boolean>;
540
+ validator?(value: unknown): boolean;
541
+ } & {
542
+ default: boolean | (() => boolean) | null;
380
543
  };
381
544
  langKey: {
382
545
  type: PropType<string | null>;
@@ -384,36 +547,46 @@ validator?(value: unknown): boolean;
384
547
  } & {
385
548
  default: string | (() => string | null) | null;
386
549
  };
550
+ langParams: {
551
+ type: PropType<Record<string, unknown> | null>;
552
+ validator?(value: unknown): boolean;
553
+ } & {
554
+ default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
555
+ };
387
556
  text: {
388
557
  type: PropType<string | null>;
389
558
  validator?(value: unknown): boolean;
390
559
  } & {
391
560
  default: string | (() => string | null) | null;
392
561
  };
393
- inline: {
562
+ }>>, {
563
+ as: string | null;
564
+ inline: boolean;
565
+ langKey: string | null;
566
+ langParams: Record<string, unknown> | null;
567
+ text: string | null;
568
+ }, {}>;
569
+
570
+ export declare const AGModal: DefineComponent< {
571
+ cancellable: {
394
572
  type: PropType<boolean>;
395
573
  validator?(value: unknown): boolean;
396
574
  } & {
397
575
  default: boolean | (() => boolean) | null;
398
576
  };
399
- raw: {
577
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
578
+ [key: string]: any;
579
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
580
+ cancellable: {
400
581
  type: PropType<boolean>;
401
582
  validator?(value: unknown): boolean;
402
583
  } & {
403
584
  default: boolean | (() => boolean) | null;
404
585
  };
405
586
  }>>, {
406
- as: string;
407
- langKey: string | null;
408
- text: string | null;
409
- inline: boolean;
410
- raw: boolean;
587
+ cancellable: boolean;
411
588
  }, {}>;
412
589
 
413
- export declare const AGModal: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
414
- [key: string]: any;
415
- }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
416
-
417
590
  export declare const AGModalContext: DefineComponent< {
418
591
  modal: {
419
592
  type: PropType<Modal<unknown>>;
@@ -444,9 +617,67 @@ required: true;
444
617
  };
445
618
  }>>, {}, {}>;
446
619
 
620
+ export declare const AGSnackbar: DefineComponent< {
621
+ id: {
622
+ type: PropType<string>;
623
+ validator?(value: unknown): boolean;
624
+ } & {
625
+ required: true;
626
+ };
627
+ message: {
628
+ type: PropType<string>;
629
+ validator?(value: unknown): boolean;
630
+ } & {
631
+ required: true;
632
+ };
633
+ actions: {
634
+ type: PropType<SnackbarAction[]>;
635
+ validator?(value: unknown): boolean;
636
+ } & {
637
+ default: SnackbarAction[] | (() => SnackbarAction[]) | null;
638
+ };
639
+ color: {
640
+ type: PropType<"secondary" | "danger">;
641
+ validator?(value: unknown): boolean;
642
+ } & {
643
+ default: "secondary" | "danger" | (() => "secondary" | "danger") | null;
644
+ };
645
+ }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
646
+ [key: string]: any;
647
+ }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
648
+ id: {
649
+ type: PropType<string>;
650
+ validator?(value: unknown): boolean;
651
+ } & {
652
+ required: true;
653
+ };
654
+ message: {
655
+ type: PropType<string>;
656
+ validator?(value: unknown): boolean;
657
+ } & {
658
+ required: true;
659
+ };
660
+ actions: {
661
+ type: PropType<SnackbarAction[]>;
662
+ validator?(value: unknown): boolean;
663
+ } & {
664
+ default: SnackbarAction[] | (() => SnackbarAction[]) | null;
665
+ };
666
+ color: {
667
+ type: PropType<"secondary" | "danger">;
668
+ validator?(value: unknown): boolean;
669
+ } & {
670
+ default: "secondary" | "danger" | (() => "secondary" | "danger") | null;
671
+ };
672
+ }>>, {
673
+ actions: SnackbarAction[];
674
+ color: "secondary" | "danger";
675
+ }, {}>;
676
+
447
677
  export declare const App: Facade<AppService, Constructor<AppService>>;
448
678
 
449
- export declare class AppService extends _default {
679
+ export declare class AppService extends _default_2 {
680
+ protected boot(): Promise<void>;
450
681
  }
451
682
 
452
683
  export declare function arrayProp<T>(defaultValue?: () => T[]): OptionalProp<T[]>;
@@ -456,27 +687,82 @@ declare type BaseProp<T> = {
456
687
  validator?(value: unknown): boolean;
457
688
  };
458
689
 
690
+ export declare function booleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
691
+
459
692
  export declare function booleanProp(defaultValue?: boolean): OptionalProp<boolean>;
460
693
 
461
694
  export declare function bootServices(app: App_2, services: Record<string, Service>): Promise<void>;
462
695
 
463
696
  export declare function bootstrapApplication(rootComponent: Component, options?: AerogelOptions): Promise<void>;
464
697
 
698
+ export declare type Color = (typeof Colors)[keyof typeof Colors];
699
+
700
+ export declare const Colors: {
701
+ readonly Primary: "primary";
702
+ readonly Secondary: "secondary";
703
+ readonly Danger: "danger";
704
+ readonly Clear: "clear";
705
+ };
706
+
707
+ export declare type ComponentProps = Record<string, unknown>;
708
+
465
709
  export declare function componentRef<T>(): Ref<UnwrapNestedRefs<T> | undefined>;
466
710
 
467
711
  export declare type ComputedStateDefinition<TState extends ServiceState, TComputedState extends ServiceState> = {
468
712
  [K in keyof TComputedState]: (state: TState) => TComputedState[K];
469
- };
713
+ } & ThisType<{
714
+ readonly [K in keyof TComputedState]: TComputedState[K];
715
+ }>;
470
716
 
471
717
  declare const _default: Constructor< {
472
- environment: "production" | "development" | "testing";
718
+ logs: ErrorReportLog[];
719
+ startupErrors: ErrorReport[];
473
720
  }> & Constructor< {
474
- isDevelopment: boolean;
475
- }> & Constructor<Service<DefaultServiceState, {}>> & Service;
721
+ hasErrors: boolean;
722
+ hasNewErrors: boolean;
723
+ hasStartupErrors: boolean;
724
+ }> & Constructor<Service< {
725
+ logs: ErrorReportLog[];
726
+ startupErrors: ErrorReport[];
727
+ }, {
728
+ hasErrors: boolean;
729
+ hasNewErrors: boolean;
730
+ hasStartupErrors: boolean;
731
+ }, Partial<{
732
+ logs: ErrorReportLog[];
733
+ startupErrors: ErrorReport[];
734
+ }>>>;
476
735
 
477
736
  declare const _default_2: Constructor< {
737
+ environment: "production" | "development" | "testing";
738
+ sourceUrl: string | undefined;
739
+ isMounted: boolean;
740
+ }> & Constructor< {
741
+ development: boolean;
742
+ testing: boolean;
743
+ }> & Constructor<Service< {
744
+ environment: "production" | "development" | "testing";
745
+ sourceUrl: string | undefined;
746
+ isMounted: boolean;
747
+ }, {
748
+ development: boolean;
749
+ testing: boolean;
750
+ }, Partial<{
751
+ environment: "production" | "development" | "testing";
752
+ sourceUrl: string | undefined;
753
+ isMounted: boolean;
754
+ }>>>;
755
+
756
+ declare const _default_3: Constructor< {
757
+ modals: Modal<unknown>[];
758
+ snackbars: Snackbar[];
759
+ }> & Constructor< {}> & Constructor<Service< {
478
760
  modals: Modal<unknown>[];
479
- }> & Constructor< {}> & Constructor<Service<DefaultServiceState, {}>> & Service;
761
+ snackbars: Snackbar[];
762
+ }, {}, Partial<{
763
+ modals: Modal<unknown>[];
764
+ snackbars: Snackbar[];
765
+ }>>>;
480
766
 
481
767
  export declare type DefaultServices = typeof defaultServices;
482
768
 
@@ -485,19 +771,68 @@ declare const defaultServices: {
485
771
  $events: Facade<EventsService, Constructor<EventsService>>;
486
772
  };
487
773
 
488
- export declare type DefaultServiceState = {};
774
+ export declare type DefaultServiceState = any;
489
775
 
490
776
  export declare function defineDirective(directive: Directive): Directive;
491
777
 
492
778
  export declare function definePlugin<T extends Plugin_2>(plugin: T): T;
493
779
 
494
780
  export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}>(options: {
781
+ name: string;
495
782
  initialState: State;
783
+ persist?: (keyof State)[];
496
784
  computed?: ComputedStateDefinition<State, ComputedState>;
497
- }): Constructor<State> & Constructor<ComputedState> & ServiceConstructor;
785
+ serialize?: (state: Partial<State>) => Partial<State>;
786
+ }): Constructor<State> & Constructor<ComputedState> & Constructor<Service<State, ComputedState, Partial<State>>>;
498
787
 
499
788
  export declare function enumProp<Enum extends Record<string, unknown>>(enumeration: Enum, defaultValue?: Enum[keyof Enum]): OptionalProp<Enum[keyof Enum]>;
500
789
 
790
+ export declare type ErrorHandler = (error: ErrorSource) => boolean;
791
+
792
+ export declare interface ErrorReport {
793
+ title: string;
794
+ description?: string;
795
+ details?: string;
796
+ error?: Error | JSError | unknown;
797
+ }
798
+
799
+ export declare interface ErrorReportLog {
800
+ report: ErrorReport;
801
+ seen: boolean;
802
+ date: Date;
803
+ }
804
+
805
+ export declare const errorReportModalProps: {
806
+ reports: {
807
+ type: PropType<ErrorReport[]>;
808
+ validator?(value: unknown): boolean;
809
+ } & {
810
+ required: true;
811
+ };
812
+ };
813
+
814
+ export declare const Errors: Facade<ErrorsService, Constructor<ErrorsService>>;
815
+
816
+ export declare type ErrorSource = string | Error | JSError | unknown;
817
+
818
+ declare class ErrorsService extends _default {
819
+ forceReporting: boolean;
820
+ private enabled;
821
+ enable(): void;
822
+ disable(): void;
823
+ inspect(error: ErrorSource | ErrorReport[]): Promise<void>;
824
+ report(error: ErrorSource, message?: string): Promise<void>;
825
+ see(report: ErrorReport): void;
826
+ seeAll(): void;
827
+ getErrorMessage(error: ErrorSource): string;
828
+ private logError;
829
+ private createErrorReport;
830
+ private createStartupErrorReport;
831
+ private createErrorReportFromError;
832
+ }
833
+
834
+ export declare type ErrorsServices = typeof services;
835
+
501
836
  declare type EventListener_2<T = unknown> = (payload: T) => unknown;
502
837
  export { EventListener_2 as EventListener }
503
838
 
@@ -548,11 +883,12 @@ declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinitions> e
548
883
  private getFieldErrors;
549
884
  private getInitialData;
550
885
  private getInitialErrors;
886
+ private resetData;
551
887
  private resetErrors;
552
888
  }
553
889
 
554
890
  declare type FormData_2<T> = {
555
- [k in keyof T]: T[k] extends FormFieldDefinition<infer TType, infer TRules> ? TRules extends 'required' ? GetFormFieldValue<TType> : GetFormFieldValue<TType> | null : never;
891
+ -readonly [k in keyof T]: T[k] extends FormFieldDefinition<infer TType, infer TRules> ? TRules extends 'required' ? GetFormFieldValue<TType> : GetFormFieldValue<TType> | null : never;
556
892
  };
557
893
  export { FormData_2 as FormData }
558
894
 
@@ -573,15 +909,24 @@ export declare type FormFieldType = ObjectValues<typeof FormFieldTypes>;
573
909
  export declare const FormFieldTypes: {
574
910
  readonly String: "string";
575
911
  readonly Number: "number";
912
+ readonly Boolean: "boolean";
576
913
  };
577
914
 
578
- export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : never;
915
+ export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : TType extends typeof FormFieldTypes.Boolean ? boolean : never;
916
+
917
+ export declare interface IAGErrorReportModalButtonsDefaultSlotProps {
918
+ id: string;
919
+ description: string;
920
+ iconComponent: Component;
921
+ url?: string;
922
+ handler?(): void;
923
+ }
579
924
 
580
925
  export declare interface IAGHeadlessInput {
581
926
  id: string;
582
- value: ComputedRef<string | number | null>;
927
+ value: ComputedRef<string | number | boolean | null>;
583
928
  errors: DeepReadonly<Ref<string[] | null>>;
584
- update(value: string | number | null): void;
929
+ update(value: string | number | boolean | null): void;
585
930
  }
586
931
 
587
932
  export declare interface IAGHeadlessModal extends IAGModal {
@@ -592,6 +937,15 @@ export declare interface IAGModal {
592
937
  close(): Promise<void>;
593
938
  }
594
939
 
940
+ export declare interface IAGModalContext {
941
+ modal: Ref<Modal>;
942
+ childIndex: Ref<number>;
943
+ }
944
+
945
+ export declare interface IAGModalDefaultSlotProps {
946
+ close(result?: unknown): Promise<void>;
947
+ }
948
+
595
949
  export declare function injectOrFail<T>(key: InjectionKey<T> | string, errorMessage?: string): T;
596
950
 
597
951
  export declare function injectReactive<T extends object>(key: InjectionKey<T> | string): UnwrapNestedRefs<T> | undefined;
@@ -613,7 +967,7 @@ declare class LangService extends Service {
613
967
  translateWithDefault(key: string, parameters: Record<string, unknown>, defaultMessage: string): string;
614
968
  }
615
969
 
616
- export declare type LangServices = typeof services;
970
+ export declare type LangServices = typeof services_2;
617
971
 
618
972
  export declare function mixedProp<T>(type: PropType<T>): OptionalProp<T | null>;
619
973
 
@@ -655,6 +1009,8 @@ export { Plugin_2 as Plugin }
655
1009
 
656
1010
  export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
657
1011
 
1012
+ export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
1013
+
658
1014
  export declare function requiredEnumProp<Enum extends Record<string, unknown>>(enumeration: Enum): RequiredProp<Enum[keyof Enum]>;
659
1015
 
660
1016
  export declare function requiredMixedProp<T>(type: PropType<T>): RequiredProp<T>;
@@ -673,25 +1029,31 @@ export declare function requiredStringInput(defaultValue?: string): FormFieldDef
673
1029
 
674
1030
  export declare function requiredStringProp(): RequiredProp<string>;
675
1031
 
676
- export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}> extends MagicObject {
677
- protected _namespace: string;
1032
+ export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage extends Partial<State> = Partial<State>> extends MagicObject {
1033
+ static persist: string[];
1034
+ protected _name: string;
678
1035
  private _booted;
679
- private _state;
680
- private _computedState;
1036
+ private _computedStateKeys;
1037
+ private _store?;
681
1038
  constructor();
682
1039
  get booted(): PromisedValue<void>;
683
- launch(namespace?: string): Promise<void>;
1040
+ launch(): Promise<void>;
1041
+ hasState<P extends keyof State>(property: P): boolean;
1042
+ getState(): State;
1043
+ getState<P extends keyof State>(property: P): State[P];
1044
+ setState<P extends keyof State>(property: P, value: State[P]): void;
1045
+ setState(state: Partial<State>): void;
684
1046
  protected __get(property: string): unknown;
685
1047
  protected __set(property: string, value: unknown): void;
686
- protected hasState<P extends keyof State>(property: P): boolean;
687
- protected hasComputedState<P extends keyof State>(property: P): boolean;
688
- protected getState(): State;
689
- protected getState<P extends keyof State>(property: P): State[P];
690
- protected getComputedState<P extends keyof ComputedState>(property: P): ComputedState[P];
691
- protected setState(state: Partial<State>): void;
1048
+ protected onStateUpdated(state: Partial<State>): void;
1049
+ protected usesStore(): boolean;
1050
+ protected getName(): string | null;
692
1051
  protected getInitialState(): State;
693
1052
  protected getComputedStateDefinition(): ComputedStateDefinition<State, ComputedState>;
1053
+ protected serializePersistedState(state: Partial<State>): Partial<State>;
1054
+ protected frameworkBoot(): Promise<void>;
694
1055
  protected boot(): Promise<void>;
1056
+ protected restorePersistedState(): void;
695
1057
  }
696
1058
 
697
1059
  export declare type ServiceConstructor<T extends Service = Service> = Constructor<T> & typeof Service;
@@ -700,15 +1062,73 @@ export declare interface Services extends DefaultServices {
700
1062
  }
701
1063
 
702
1064
  declare const services: {
703
- $lang: Facade<LangService, Constructor<LangService>>;
1065
+ $errors: Facade<ErrorsService, Constructor<ErrorsService>>;
704
1066
  };
705
1067
 
706
1068
  declare const services_2: {
1069
+ $lang: Facade<LangService, Constructor<LangService>>;
1070
+ };
1071
+
1072
+ declare const services_3: {
707
1073
  $ui: Facade<UIService, Constructor<UIService>>;
708
1074
  };
709
1075
 
710
1076
  export declare type ServiceState = Record<string, any>;
711
1077
 
1078
+ declare interface ShowSnackbarOptions {
1079
+ component?: Component;
1080
+ color?: SnackbarColor;
1081
+ actions?: SnackbarAction[];
1082
+ }
1083
+
1084
+ declare interface Snackbar {
1085
+ id: string;
1086
+ component: Component;
1087
+ properties: Record<string, unknown>;
1088
+ }
1089
+
1090
+ export declare interface SnackbarAction {
1091
+ text: string;
1092
+ dismiss?: boolean;
1093
+ handler?(): unknown;
1094
+ }
1095
+
1096
+ export declare type SnackbarColor = (typeof SnackbarColors)[keyof typeof SnackbarColors];
1097
+
1098
+ export declare const SnackbarColors: Omit<{
1099
+ readonly Primary: "primary";
1100
+ readonly Secondary: "secondary";
1101
+ readonly Danger: "danger";
1102
+ readonly Clear: "clear";
1103
+ }, "Primary" | "Clear">;
1104
+
1105
+ export declare const snackbarProps: {
1106
+ id: {
1107
+ type: PropType<string>;
1108
+ validator?(value: unknown): boolean;
1109
+ } & {
1110
+ required: true;
1111
+ };
1112
+ message: {
1113
+ type: PropType<string>;
1114
+ validator?(value: unknown): boolean;
1115
+ } & {
1116
+ required: true;
1117
+ };
1118
+ actions: {
1119
+ type: PropType<SnackbarAction[]>;
1120
+ validator?(value: unknown): boolean;
1121
+ } & {
1122
+ default: SnackbarAction[] | (() => SnackbarAction[]) | null;
1123
+ };
1124
+ color: {
1125
+ type: PropType<"secondary" | "danger">;
1126
+ validator?(value: unknown): boolean;
1127
+ } & {
1128
+ default: "secondary" | "danger" | (() => "secondary" | "danger") | null;
1129
+ };
1130
+ };
1131
+
712
1132
  export declare function stringInput(defaultValue?: string): FormFieldDefinition<typeof FormFieldTypes.String>;
713
1133
 
714
1134
  export declare function stringProp(): OptionalProp<string | null>;
@@ -729,27 +1149,36 @@ export declare type UIComponent = ObjectValues<typeof UIComponents>;
729
1149
  export declare const UIComponents: {
730
1150
  readonly AlertModal: "alert-modal";
731
1151
  readonly ConfirmModal: "confirm-modal";
1152
+ readonly ErrorReportModal: "error-report-modal";
1153
+ readonly LoadingModal: "loading-modal";
1154
+ readonly Snackbar: "snackbar";
732
1155
  };
733
1156
 
734
- declare class UIService extends _default_2 {
1157
+ declare class UIService extends _default_3 {
735
1158
  private modalCallbacks;
736
1159
  private components;
1160
+ requireComponent(name: UIComponent): Component;
737
1161
  alert(message: string): void;
738
1162
  alert(title: string, message: string): void;
739
1163
  confirm(message: string): Promise<boolean>;
740
1164
  confirm(title: string, message: string): Promise<boolean>;
1165
+ loading<T>(operation: Promise<T>): Promise<T>;
1166
+ loading<T>(message: string, operation: Promise<T>): Promise<T>;
1167
+ showSnackbar(message: string, options?: ShowSnackbarOptions): void;
1168
+ hideSnackbar(id: string): void;
741
1169
  registerComponent(name: UIComponent, component: Component): void;
742
1170
  openModal<TModalComponent extends ModalComponent>(component: TModalComponent, properties?: ModalProperties<TModalComponent>): Promise<Modal<ModalResult<TModalComponent>>>;
743
1171
  closeModal(id: string, result?: unknown): Promise<void>;
744
1172
  protected boot(): Promise<void>;
745
- private requireComponent;
746
1173
  private watchModalEvents;
747
1174
  }
748
1175
 
749
- export declare type UIServices = typeof services_2;
1176
+ export declare type UIServices = typeof services_3;
750
1177
 
751
1178
  export declare type UnknownEvent<T> = T extends keyof EventsPayload ? never : T;
752
1179
 
1180
+ export declare function useErrorReportModalProps(): typeof errorReportModalProps;
1181
+
753
1182
  export declare function useEvent<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): void;
754
1183
 
755
1184
  export declare function useEvent<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): void;
@@ -758,14 +1187,23 @@ export declare function useEvent<Event extends string>(event: UnknownEvent<Event
758
1187
 
759
1188
  export declare function useForm<const T extends FormFieldDefinitions>(fields: T): Form<T> & FormData_2<T>;
760
1189
 
1190
+ export declare function useInputAttrs(): [ComputedRef<{}>, ComputedRef<unknown>];
1191
+
1192
+ export declare function useSnackbarProps(): typeof snackbarProps;
1193
+
761
1194
  export { }
762
1195
 
763
- declare global {
764
- export const __AG_BASE_PATH: string | undefined;
765
- export const __AG_ENV: 'production' | 'development' | 'testing';
766
- }
1196
+ interface AerogelOptions {
1197
+ directives?: Record<string, Directive>;
1198
+ }
1199
+
1200
+ interface AerogelOptions {
1201
+ handleError?(error: ErrorSource): boolean;
1202
+ }
767
1203
 
768
- interface Services extends LangServices {}
1204
+ export interface Services extends ErrorsServices {}
1205
+
1206
+ export interface Services extends LangServices {}
769
1207
 
770
1208
  declare module '@vue/runtime-core' {
771
1209
  interface ComponentCustomProperties {
@@ -773,6 +1211,10 @@ declare module '@vue/runtime-core' {
773
1211
  }
774
1212
  }
775
1213
 
1214
+ interface AerogelOptions {
1215
+ services?: Record<string, Service>;
1216
+ }
1217
+
776
1218
  declare module '@vue/runtime-core' {
777
1219
  interface ComponentCustomProperties extends Services {}
778
1220
  }
@@ -789,4 +1231,4 @@ declare module '@vue/runtime-core' {
789
1231
  components?: Partial<Record<UIComponent, Component>>;
790
1232
  }
791
1233
 
792
- interface Services extends UIServices {}
1234
+ export interface Services extends UIServices {}