@aerogel/core 0.0.0-next.7f6ed5a1f91688a86bf5ede2adc465e4fd6cfdea → 0.0.0-next.b58141fee5d2fe7d25debdbca6b1d2bf1c13e48e

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