@aerogel/core 0.0.0-next.b18f4e0acd39431045c2f444c711303890143193 → 0.0.0-next.b243de4e2590f02709edeebd8c13b74087592c04

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 (62) 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 +405 -59
  4. package/dist/aerogel-core.esm.js +1 -1
  5. package/dist/aerogel-core.esm.js.map +1 -1
  6. package/package.json +3 -3
  7. package/src/bootstrap/bootstrap.test.ts +0 -1
  8. package/src/bootstrap/index.ts +5 -4
  9. package/src/components/AGAppSnackbars.vue +1 -1
  10. package/src/components/composition.ts +23 -0
  11. package/src/components/forms/AGForm.vue +9 -10
  12. package/src/components/forms/AGInput.vue +2 -0
  13. package/src/components/headless/forms/AGHeadlessButton.ts +3 -0
  14. package/src/components/headless/forms/AGHeadlessButton.vue +23 -12
  15. package/src/components/headless/forms/AGHeadlessInput.ts +10 -4
  16. package/src/components/headless/forms/AGHeadlessInput.vue +18 -5
  17. package/src/components/headless/forms/AGHeadlessInputDescription.vue +28 -0
  18. package/src/components/headless/forms/AGHeadlessInputInput.vue +44 -5
  19. package/src/components/headless/forms/AGHeadlessInputTextArea.vue +43 -0
  20. package/src/components/headless/forms/composition.ts +10 -0
  21. package/src/components/headless/forms/index.ts +4 -0
  22. package/src/components/index.ts +2 -0
  23. package/src/components/interfaces.ts +24 -0
  24. package/src/components/lib/AGErrorMessage.vue +2 -2
  25. package/src/components/lib/AGMarkdown.vue +9 -4
  26. package/src/components/lib/AGMeasured.vue +1 -0
  27. package/src/components/modals/AGConfirmModal.ts +9 -3
  28. package/src/components/modals/AGConfirmModal.vue +2 -2
  29. package/src/components/modals/AGPromptModal.ts +9 -3
  30. package/src/components/modals/AGPromptModal.vue +2 -2
  31. package/src/directives/index.ts +2 -0
  32. package/src/directives/measure.ts +33 -5
  33. package/src/errors/Errors.ts +15 -18
  34. package/src/errors/index.ts +1 -10
  35. package/src/errors/utils.ts +19 -0
  36. package/src/forms/Form.test.ts +28 -0
  37. package/src/forms/Form.ts +65 -8
  38. package/src/forms/index.ts +3 -1
  39. package/src/forms/utils.ts +34 -3
  40. package/src/forms/validation.ts +19 -0
  41. package/src/jobs/Job.ts +5 -0
  42. package/src/jobs/index.ts +7 -0
  43. package/src/lang/DefaultLangProvider.ts +43 -0
  44. package/src/lang/Lang.state.ts +11 -0
  45. package/src/lang/Lang.ts +44 -29
  46. package/src/main.ts +3 -0
  47. package/src/services/App.state.ts +15 -1
  48. package/src/services/App.ts +4 -1
  49. package/src/services/Cache.ts +43 -0
  50. package/src/services/Events.test.ts +39 -0
  51. package/src/services/Events.ts +100 -30
  52. package/src/services/Service.ts +37 -5
  53. package/src/services/index.ts +4 -1
  54. package/src/services/store.ts +8 -5
  55. package/src/testing/index.ts +25 -0
  56. package/src/testing/setup.ts +19 -0
  57. package/src/ui/UI.state.ts +7 -0
  58. package/src/ui/UI.ts +41 -11
  59. package/src/ui/index.ts +1 -0
  60. package/src/ui/utils.ts +16 -0
  61. package/src/utils/vue.ts +11 -2
  62. package/vite.config.ts +4 -1
@@ -6,31 +6,51 @@ import { ComputedRef } from 'vue';
6
6
  import { Constructor } from '@noeldemartin/utils';
7
7
  import type { DeepReadonly } from 'vue';
8
8
  import { DefineComponent } from 'vue';
9
+ import type { DefineStoreOptions } from 'pinia';
9
10
  import type { Directive } from 'vue';
10
11
  import { ExtractPropTypes } from 'vue';
11
12
  import { Facade } from '@noeldemartin/utils';
12
13
  import type { GetClosureArgs } from '@noeldemartin/utils';
14
+ import type { _GettersTree } from 'pinia';
13
15
  import type { InjectionKey } from 'vue';
14
16
  import type { JSError } from '@noeldemartin/utils';
15
17
  import { MagicObject } from '@noeldemartin/utils';
16
18
  import type { MaybeRef } from 'vue';
17
19
  import type { ObjectValues } from '@noeldemartin/utils';
18
20
  import type { ObjectWithoutEmpty } from '@noeldemartin/utils';
21
+ import type { Pinia } from 'pinia';
19
22
  import { PromisedValue } from '@noeldemartin/utils';
20
23
  import { PropType } from 'vue';
21
24
  import { PublicProps } from 'vue';
22
25
  import { Ref } from 'vue';
23
26
  import { RendererElement } from 'vue';
24
27
  import { RendererNode } from 'vue';
28
+ import type { StateTree } from 'pinia';
29
+ import type { Store } from 'pinia';
30
+ import type { SubPartial } from '@noeldemartin/utils';
25
31
  import type { UnwrapNestedRefs } from 'vue';
26
32
  import { VNode } from 'vue';
27
33
  import type { Writable } from '@noeldemartin/utils';
28
34
 
35
+ export declare interface __SetsElement {
36
+ __setElement(element?: HTMLElement): void;
37
+ }
38
+
39
+ export declare type AerogelGlobalEvents = Partial<{
40
+ [Event in EventWithoutPayload]: () => unknown;
41
+ }> & Partial<{
42
+ [Event in EventWithPayload]: EventListener_2<EventsPayload[Event]>;
43
+ }>;
44
+
29
45
  export declare interface AerogelOptions {
30
46
  plugins?: Plugin_2[];
31
47
  install?(app: App_2): void | Promise<void>;
32
48
  }
33
49
 
50
+ export declare interface AerogelTestingRuntime {
51
+ on: (typeof Events)['on'];
52
+ }
53
+
34
54
  export declare const AGAlertModal: DefineComponent< {
35
55
  title: {
36
56
  type?: PropType<string | null> | undefined;
@@ -134,12 +154,24 @@ validator?(value: unknown): boolean;
134
154
  } & {
135
155
  default: string | (() => string | null) | null;
136
156
  };
157
+ acceptColor: {
158
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
159
+ validator?(value: unknown): boolean;
160
+ } & {
161
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
162
+ };
137
163
  cancelText: {
138
164
  type?: PropType<string | null> | undefined;
139
165
  validator?(value: unknown): boolean;
140
166
  } & {
141
167
  default: string | (() => string | null) | null;
142
168
  };
169
+ cancelColor: {
170
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
171
+ validator?(value: unknown): boolean;
172
+ } & {
173
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
174
+ };
143
175
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
144
176
  [key: string]: any;
145
177
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -161,19 +193,33 @@ validator?(value: unknown): boolean;
161
193
  } & {
162
194
  default: string | (() => string | null) | null;
163
195
  };
196
+ acceptColor: {
197
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
198
+ validator?(value: unknown): boolean;
199
+ } & {
200
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
201
+ };
164
202
  cancelText: {
165
203
  type?: PropType<string | null> | undefined;
166
204
  validator?(value: unknown): boolean;
167
205
  } & {
168
206
  default: string | (() => string | null) | null;
169
207
  };
208
+ cancelColor: {
209
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
210
+ validator?(value: unknown): boolean;
211
+ } & {
212
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
213
+ };
170
214
  }>>, {
171
215
  title: string | null;
172
216
  acceptText: string | null;
217
+ acceptColor: "primary" | "secondary" | "danger" | "clear";
173
218
  cancelText: string | null;
219
+ cancelColor: "primary" | "secondary" | "danger" | "clear";
174
220
  }, {}>;
175
221
 
176
- export declare type AGConfirmModalProps = ObjectWithoutEmpty<ExtractPropTypes<typeof confirmModalProps>>;
222
+ export declare type AGConfirmModalProps = SubPartial<ObjectWithoutEmpty<ExtractPropTypes<typeof confirmModalProps>>, 'acceptColor' | 'cancelColor'>;
177
223
 
178
224
  export declare const AGErrorMessage: DefineComponent< {
179
225
  error: {
@@ -281,6 +327,12 @@ form: Form<FormFieldDefinitions> | null;
281
327
  }, {}>;
282
328
 
283
329
  export declare const AGHeadlessButton: DefineComponent< {
330
+ as: {
331
+ type?: PropType<Object | null> | undefined;
332
+ validator?(value: unknown): boolean;
333
+ } & {
334
+ default: Object | (() => Object | null) | null;
335
+ };
284
336
  href: {
285
337
  type?: PropType<string | null> | undefined;
286
338
  validator?(value: unknown): boolean;
@@ -320,6 +372,12 @@ default: boolean | (() => boolean) | null;
320
372
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
321
373
  [key: string]: any;
322
374
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
375
+ as: {
376
+ type?: PropType<Object | null> | undefined;
377
+ validator?(value: unknown): boolean;
378
+ } & {
379
+ default: Object | (() => Object | null) | null;
380
+ };
323
381
  href: {
324
382
  type?: PropType<string | null> | undefined;
325
383
  validator?(value: unknown): boolean;
@@ -357,6 +415,7 @@ validator?(value: unknown): boolean;
357
415
  default: boolean | (() => boolean) | null;
358
416
  };
359
417
  }>>, {
418
+ as: Object | null;
360
419
  href: string | null;
361
420
  url: string | null;
362
421
  route: string | null;
@@ -378,17 +437,23 @@ validator?(value: unknown): boolean;
378
437
  } & {
379
438
  default: string | (() => string | null) | null;
380
439
  };
381
- as: {
382
- type?: PropType<string> | undefined;
440
+ description: {
441
+ type?: PropType<string | null> | undefined;
383
442
  validator?(value: unknown): boolean;
384
443
  } & {
385
- default: string | (() => string) | null;
444
+ default: string | (() => string | null) | null;
386
445
  };
387
446
  modelValue: {
388
- type?: PropType<string | number | boolean | null> | undefined;
447
+ type?: PropType<FormFieldValue | null> | undefined;
448
+ validator?(value: unknown): boolean;
449
+ } & {
450
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
451
+ };
452
+ as: {
453
+ type?: PropType<string> | undefined;
389
454
  validator?(value: unknown): boolean;
390
455
  } & {
391
- default: string | number | boolean | (() => string | number | boolean | null) | null;
456
+ default: string | (() => string) | null;
392
457
  };
393
458
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
394
459
  [key: string]: any;
@@ -405,27 +470,38 @@ validator?(value: unknown): boolean;
405
470
  } & {
406
471
  default: string | (() => string | null) | null;
407
472
  };
408
- as: {
409
- type?: PropType<string> | undefined;
473
+ description: {
474
+ type?: PropType<string | null> | undefined;
410
475
  validator?(value: unknown): boolean;
411
476
  } & {
412
- default: string | (() => string) | null;
477
+ default: string | (() => string | null) | null;
413
478
  };
414
479
  modelValue: {
415
- type?: PropType<string | number | boolean | null> | undefined;
480
+ type?: PropType<FormFieldValue | null> | undefined;
416
481
  validator?(value: unknown): boolean;
417
482
  } & {
418
- default: string | number | boolean | (() => string | number | boolean | null) | null;
483
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
484
+ };
485
+ as: {
486
+ type?: PropType<string> | undefined;
487
+ validator?(value: unknown): boolean;
488
+ } & {
489
+ default: string | (() => string) | null;
419
490
  };
420
491
  }>> & {
421
492
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
422
493
  }, {
423
494
  as: string;
424
- modelValue: string | number | boolean | null;
425
495
  name: string | null;
426
496
  label: string | null;
497
+ description: string | null;
498
+ modelValue: FormFieldValue | null;
427
499
  }, {}>;
428
500
 
501
+ export declare const AGHeadlessInputDescription: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
502
+ [key: string]: any;
503
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
504
+
429
505
  export declare const AGHeadlessInputError: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
430
506
  [key: string]: any;
431
507
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
@@ -454,6 +530,10 @@ export declare const AGHeadlessInputLabel: DefineComponent< {}, (_ctx: any, _
454
530
  [key: string]: any;
455
531
  }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
456
532
 
533
+ export declare const AGHeadlessInputTextArea: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
534
+ [key: string]: any;
535
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
536
+
457
537
  export declare const AGHeadlessModal: DefineComponent< {
458
538
  cancellable: {
459
539
  type?: PropType<boolean> | undefined;
@@ -715,6 +795,18 @@ validator?(value: unknown): boolean;
715
795
  } & {
716
796
  default: string | (() => string | null) | null;
717
797
  };
798
+ description: {
799
+ type?: PropType<string | null> | undefined;
800
+ validator?(value: unknown): boolean;
801
+ } & {
802
+ default: string | (() => string | null) | null;
803
+ };
804
+ modelValue: {
805
+ type?: PropType<FormFieldValue | null> | undefined;
806
+ validator?(value: unknown): boolean;
807
+ } & {
808
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
809
+ };
718
810
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
719
811
  [key: string]: any;
720
812
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -730,9 +822,23 @@ validator?(value: unknown): boolean;
730
822
  } & {
731
823
  default: string | (() => string | null) | null;
732
824
  };
825
+ description: {
826
+ type?: PropType<string | null> | undefined;
827
+ validator?(value: unknown): boolean;
828
+ } & {
829
+ default: string | (() => string | null) | null;
830
+ };
831
+ modelValue: {
832
+ type?: PropType<FormFieldValue | null> | undefined;
833
+ validator?(value: unknown): boolean;
834
+ } & {
835
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
836
+ };
733
837
  }>>, {
734
838
  name: string | null;
735
839
  label: string | null;
840
+ description: string | null;
841
+ modelValue: FormFieldValue | null;
736
842
  }, {}>;
737
843
 
738
844
  export declare const AGLink: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
@@ -781,10 +887,10 @@ validator?(value: unknown): boolean;
781
887
  default: string | (() => string | null) | null;
782
888
  };
783
889
  langParams: {
784
- type?: PropType<Record<string, unknown> | null> | undefined;
890
+ type?: PropType<number | Record<string, unknown> | null> | undefined;
785
891
  validator?(value: unknown): boolean;
786
892
  } & {
787
- default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
893
+ default: number | Record<string, unknown> | (() => number | Record<string, unknown> | null) | null;
788
894
  };
789
895
  text: {
790
896
  type?: PropType<string | null> | undefined;
@@ -814,10 +920,10 @@ validator?(value: unknown): boolean;
814
920
  default: string | (() => string | null) | null;
815
921
  };
816
922
  langParams: {
817
- type?: PropType<Record<string, unknown> | null> | undefined;
923
+ type?: PropType<number | Record<string, unknown> | null> | undefined;
818
924
  validator?(value: unknown): boolean;
819
925
  } & {
820
- default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
926
+ default: number | Record<string, unknown> | (() => number | Record<string, unknown> | null) | null;
821
927
  };
822
928
  text: {
823
929
  type?: PropType<string | null> | undefined;
@@ -829,7 +935,7 @@ default: string | (() => string | null) | null;
829
935
  as: string | null;
830
936
  inline: boolean;
831
937
  langKey: string | null;
832
- langParams: Record<string, unknown> | null;
938
+ langParams: number | Record<string, unknown> | null;
833
939
  text: string | null;
834
940
  }, {}>;
835
941
 
@@ -957,12 +1063,24 @@ validator?(value: unknown): boolean;
957
1063
  } & {
958
1064
  default: string | (() => string | null) | null;
959
1065
  };
1066
+ acceptColor: {
1067
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1068
+ validator?(value: unknown): boolean;
1069
+ } & {
1070
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1071
+ };
960
1072
  cancelText: {
961
1073
  type?: PropType<string | null> | undefined;
962
1074
  validator?(value: unknown): boolean;
963
1075
  } & {
964
1076
  default: string | (() => string | null) | null;
965
1077
  };
1078
+ cancelColor: {
1079
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1080
+ validator?(value: unknown): boolean;
1081
+ } & {
1082
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1083
+ };
966
1084
  }, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
967
1085
  [key: string]: any;
968
1086
  }>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
@@ -1002,22 +1120,36 @@ validator?(value: unknown): boolean;
1002
1120
  } & {
1003
1121
  default: string | (() => string | null) | null;
1004
1122
  };
1123
+ acceptColor: {
1124
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1125
+ validator?(value: unknown): boolean;
1126
+ } & {
1127
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1128
+ };
1005
1129
  cancelText: {
1006
1130
  type?: PropType<string | null> | undefined;
1007
1131
  validator?(value: unknown): boolean;
1008
1132
  } & {
1009
1133
  default: string | (() => string | null) | null;
1010
1134
  };
1135
+ cancelColor: {
1136
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1137
+ validator?(value: unknown): boolean;
1138
+ } & {
1139
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1140
+ };
1011
1141
  }>>, {
1012
1142
  title: string | null;
1013
1143
  label: string | null;
1014
1144
  defaultValue: string | null;
1015
1145
  placeholder: string | null;
1016
1146
  acceptText: string | null;
1147
+ acceptColor: "primary" | "secondary" | "danger" | "clear";
1017
1148
  cancelText: string | null;
1149
+ cancelColor: "primary" | "secondary" | "danger" | "clear";
1018
1150
  }, {}>;
1019
1151
 
1020
- export declare type AGPromptModalProps = ObjectWithoutEmpty<ExtractPropTypes<typeof promptModalProps>>;
1152
+ export declare type AGPromptModalProps = SubPartial<ObjectWithoutEmpty<ExtractPropTypes<typeof promptModalProps>>, 'acceptColor' | 'cancelColor'>;
1021
1153
 
1022
1154
  export declare const AGSelect: DefineComponent< {
1023
1155
  name: {
@@ -1170,9 +1302,10 @@ export declare const alertModalProps: {
1170
1302
  };
1171
1303
  };
1172
1304
 
1173
- export declare const App: Facade<AppService, Constructor<AppService>>;
1305
+ export declare const App: Facade<AppService, AppService>;
1174
1306
 
1175
- export declare class AppService extends _default_2 {
1307
+ export declare class AppService extends _default_3 {
1308
+ readonly name: string;
1176
1309
  readonly ready: PromisedValue<void>;
1177
1310
  readonly mounted: PromisedValue<void>;
1178
1311
  isReady(): boolean;
@@ -1190,7 +1323,9 @@ declare type BaseProp<T> = {
1190
1323
  validator?(value: unknown): boolean;
1191
1324
  };
1192
1325
 
1193
- export declare function booleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
1326
+ export declare function booleanInput(defaultValue?: boolean, options?: {
1327
+ rules?: string;
1328
+ }): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
1194
1329
 
1195
1330
  export declare function booleanProp(defaultValue?: boolean): OptionalProp<boolean>;
1196
1331
 
@@ -1200,6 +1335,17 @@ export declare function bootstrap(rootComponent: Component, options?: AerogelOpt
1200
1335
 
1201
1336
  export declare function bootstrapApplication(app: App_2, options?: AerogelOptions): Promise<void>;
1202
1337
 
1338
+ declare const Cache_2: Facade<CacheService, CacheService>;
1339
+ export { Cache_2 as Cache }
1340
+
1341
+ export declare class CacheService extends Service {
1342
+ private cache?;
1343
+ get(url: string): Promise<Response | null>;
1344
+ store(url: string, response: Response): Promise<void>;
1345
+ replace(url: string, response: Response): Promise<void>;
1346
+ protected open(): Promise<Cache>;
1347
+ }
1348
+
1203
1349
  export declare type Color = (typeof Colors)[keyof typeof Colors];
1204
1350
 
1205
1351
  export declare const Colors: {
@@ -1240,19 +1386,37 @@ export declare const confirmModalProps: {
1240
1386
  } & {
1241
1387
  default: string | (() => string | null) | null;
1242
1388
  };
1389
+ acceptColor: {
1390
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1391
+ validator?(value: unknown): boolean;
1392
+ } & {
1393
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1394
+ };
1243
1395
  cancelText: {
1244
1396
  type?: PropType<string | null> | undefined;
1245
1397
  validator?(value: unknown): boolean;
1246
1398
  } & {
1247
1399
  default: string | (() => string | null) | null;
1248
1400
  };
1401
+ cancelColor: {
1402
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1403
+ validator?(value: unknown): boolean;
1404
+ } & {
1405
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1406
+ };
1249
1407
  };
1250
1408
 
1251
1409
  export declare interface ConfirmOptions {
1252
1410
  acceptText?: string;
1411
+ acceptColor?: Color;
1253
1412
  cancelText?: string;
1413
+ cancelColor?: Color;
1254
1414
  }
1255
1415
 
1416
+ export declare function dateInput(defaultValue?: Date, options?: {
1417
+ rules?: string;
1418
+ }): FormFieldDefinition<typeof FormFieldTypes.Date>;
1419
+
1256
1420
  declare const _default: Constructor<UnrefServiceState< {
1257
1421
  logs: ErrorReportLog[];
1258
1422
  startupErrors: ErrorReport[];
@@ -1273,57 +1437,100 @@ startupErrors: ErrorReport[];
1273
1437
  }>>>>;
1274
1438
 
1275
1439
  declare const _default_2: Constructor<UnrefServiceState< {
1440
+ locale: string | null;
1441
+ locales: string[];
1442
+ fallbackLocale: string;
1443
+ }>> & Constructor< {}> & Constructor<Service<UnrefServiceState< {
1444
+ locale: string | null;
1445
+ locales: string[];
1446
+ fallbackLocale: string;
1447
+ }>, {}, Partial<UnrefServiceState< {
1448
+ locale: string | null;
1449
+ locales: string[];
1450
+ fallbackLocale: string;
1451
+ }>>>>;
1452
+
1453
+ declare const _default_3: Constructor<UnrefServiceState< {
1276
1454
  plugins: Record<string, Plugin_2>;
1277
1455
  environment: string;
1456
+ version: string;
1278
1457
  sourceUrl: string | undefined;
1279
1458
  }>> & Constructor< {
1280
1459
  development: boolean;
1281
1460
  testing: boolean;
1461
+ versionName: string;
1462
+ versionUrl: string;
1282
1463
  }> & Constructor<Service<UnrefServiceState< {
1283
1464
  plugins: Record<string, Plugin_2>;
1284
1465
  environment: string;
1466
+ version: string;
1285
1467
  sourceUrl: string | undefined;
1286
1468
  }>, {
1287
1469
  development: boolean;
1288
1470
  testing: boolean;
1471
+ versionName: string;
1472
+ versionUrl: string;
1289
1473
  }, Partial<UnrefServiceState< {
1290
1474
  plugins: Record<string, Plugin_2>;
1291
1475
  environment: string;
1476
+ version: string;
1292
1477
  sourceUrl: string | undefined;
1293
1478
  }>>>>;
1294
1479
 
1295
- declare const _default_3: Constructor<UnrefServiceState< {
1480
+ declare const _default_4: Constructor<UnrefServiceState< {
1296
1481
  modals: Modal<unknown>[];
1297
1482
  snackbars: Snackbar[];
1298
- }>> & Constructor< {}> & Constructor<Service<UnrefServiceState< {
1483
+ layout: Layout;
1484
+ }>> & Constructor< {
1485
+ mobile: boolean;
1486
+ desktop: boolean;
1487
+ }> & Constructor<Service<UnrefServiceState< {
1299
1488
  modals: Modal<unknown>[];
1300
1489
  snackbars: Snackbar[];
1301
- }>, {}, Partial<UnrefServiceState< {
1490
+ layout: Layout;
1491
+ }>, {
1492
+ mobile: boolean;
1493
+ desktop: boolean;
1494
+ }, Partial<UnrefServiceState< {
1302
1495
  modals: Modal<unknown>[];
1303
1496
  snackbars: Snackbar[];
1497
+ layout: Layout;
1304
1498
  }>>>>;
1305
1499
 
1306
1500
  export declare type DefaultServices = typeof defaultServices;
1307
1501
 
1308
1502
  declare const defaultServices: {
1309
- $app: Facade<AppService, Constructor<AppService>>;
1310
- $events: Facade<EventsService, Constructor<EventsService>>;
1503
+ $app: Facade<AppService, AppService>;
1504
+ $events: Facade<EventsService, EventsService>;
1311
1505
  };
1312
1506
 
1313
1507
  export declare type DefaultServiceState = any;
1314
1508
 
1315
1509
  export declare function defineDirective(directive: Directive): Directive;
1316
1510
 
1511
+ export declare function defineFormValidationRule<T>(rule: string, validator: FormFieldValidator<T>): void;
1512
+
1317
1513
  export declare function definePlugin<T extends Plugin_2>(plugin: T): T;
1318
1514
 
1319
1515
  export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}>(options: {
1320
1516
  name: string;
1321
- initialState: State;
1517
+ initialState: State | (() => State);
1322
1518
  persist?: (keyof State)[];
1323
1519
  computed?: ComputedStateDefinition<State, ComputedState>;
1324
1520
  serialize?: (state: Partial<State>) => Partial<State>;
1325
1521
  }): Constructor<UnrefServiceState<State>> & Constructor<ComputedState> & Constructor<Service<UnrefServiceState<State>, ComputedState, Partial<UnrefServiceState<State>>>>;
1326
1522
 
1523
+ export declare function defineServiceStore<Id extends string, S extends StateTree = {}, G extends _GettersTree<S> = {}, A = {}>(name: Id, options: Omit<DefineStoreOptions<Id, S, G, A>, 'id'>): Store<Id, S, G, A>;
1524
+
1525
+ export declare function dispatch(job: Job): Promise<void>;
1526
+
1527
+ export declare function elementRef(): Ref<HTMLElement | undefined>;
1528
+
1529
+ export declare interface ElementSize {
1530
+ width: number;
1531
+ height: number;
1532
+ }
1533
+
1327
1534
  export declare function enumProp<Enum extends Record<string, unknown>>(enumeration: Enum, defaultValue?: Enum[keyof Enum]): OptionalProp<Enum[keyof Enum]>;
1328
1535
 
1329
1536
  export declare type ErrorHandler = (error: ErrorSource) => boolean;
@@ -1350,7 +1557,7 @@ export declare const errorReportModalProps: {
1350
1557
  };
1351
1558
  };
1352
1559
 
1353
- export declare const Errors: Facade<ErrorsService, Constructor<ErrorsService>>;
1560
+ export declare const Errors: Facade<ErrorsService, ErrorsService>;
1354
1561
 
1355
1562
  export declare type ErrorSource = string | Error | JSError | unknown;
1356
1563
 
@@ -1363,7 +1570,6 @@ declare class ErrorsService extends _default {
1363
1570
  report(error: ErrorSource, message?: string): Promise<void>;
1364
1571
  see(report: ErrorReport): void;
1365
1572
  seeAll(): void;
1366
- getErrorMessage(error: ErrorSource): string;
1367
1573
  private logError;
1368
1574
  private createErrorReport;
1369
1575
  private createStartupErrorReport;
@@ -1375,23 +1581,42 @@ export declare type ErrorsServices = typeof services;
1375
1581
  declare type EventListener_2<T = unknown> = (payload: T) => unknown;
1376
1582
  export { EventListener_2 as EventListener }
1377
1583
 
1378
- export declare const Events: Facade<EventsService, Constructor<EventsService>>;
1584
+ declare interface EventListenerOptions_2 {
1585
+ priority: number;
1586
+ }
1587
+ export { EventListenerOptions_2 as EventListenerOptions }
1588
+
1589
+ export declare const EventListenerPriorities: {
1590
+ readonly Low: -256;
1591
+ readonly Default: 0;
1592
+ readonly High: 256;
1593
+ };
1594
+
1595
+ export declare const Events: Facade<EventsService, EventsService>;
1379
1596
 
1380
1597
  export declare interface EventsPayload {
1381
1598
  }
1382
1599
 
1383
1600
  export declare class EventsService extends Service {
1384
1601
  private listeners;
1602
+ protected boot(): Promise<void>;
1385
1603
  emit<Event extends EventWithoutPayload>(event: Event): Promise<void>;
1386
1604
  emit<Event extends EventWithPayload>(event: Event, payload: EventsPayload[Event]): Promise<void>;
1387
1605
  emit<Event extends string>(event: UnknownEvent<Event>, payload?: unknown): Promise<void>;
1388
1606
  on<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
1607
+ on<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
1389
1608
  on<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
1609
+ on<Event extends EventWithPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
1390
1610
  on<Event extends string>(event: UnknownEvent<Event>, listener: EventListener_2): () => void;
1611
+ on<Event extends string>(event: UnknownEvent<Event>, options: Partial<EventListenerOptions_2>, listener: EventListener_2): () => void;
1391
1612
  once<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
1613
+ once<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
1392
1614
  once<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
1615
+ once<Event extends EventWithPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
1393
1616
  once<Event extends string>(event: UnknownEvent<Event>, listener: EventListener_2): () => void;
1617
+ once<Event extends string>(event: UnknownEvent<Event>, options: Partial<EventListenerOptions_2>, listener: EventListener_2): () => void;
1394
1618
  off(event: string, listener: EventListener_2): void;
1619
+ protected registerListener(event: string, options: Partial<EventListenerOptions_2>, handler: EventListener_2): void;
1395
1620
  }
1396
1621
 
1397
1622
  export declare type EventWithoutPayload = {
@@ -1408,23 +1633,33 @@ export declare function extractModalProps<T extends ExtractPropTypes<typeof moda
1408
1633
 
1409
1634
  export declare function extractSelectProps<T extends ExtractPropTypes<typeof selectProps>>(props: T): Pick<T, keyof typeof selectProps>;
1410
1635
 
1411
- declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinitions> extends MagicObject {
1636
+ export declare type FocusFormListener = (input: string) => unknown;
1637
+
1638
+ export declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinitions> extends MagicObject {
1412
1639
  errors: DeepReadonly<UnwrapNestedRefs<FormErrors<Fields>>>;
1413
1640
  private _fields;
1414
1641
  private _data;
1415
1642
  private _submitted;
1416
1643
  private _errors;
1644
+ private _listeners;
1417
1645
  constructor(fields: Fields);
1418
1646
  get valid(): boolean;
1419
1647
  get submitted(): boolean;
1420
1648
  setFieldValue<T extends keyof Fields>(field: T, value: FormData_2<Fields>[T]): void;
1421
1649
  getFieldValue<T extends keyof Fields>(field: T): GetFormFieldValue<Fields[T]['type']>;
1650
+ getFieldRules<T extends keyof Fields>(field: T): string[];
1651
+ data(): FormData_2<Fields>;
1422
1652
  validate(): boolean;
1423
1653
  reset(options?: {
1424
1654
  keepData?: boolean;
1425
1655
  keepErrors?: boolean;
1426
1656
  }): void;
1427
1657
  submit(): boolean;
1658
+ on(event: 'focus', listener: FocusFormListener): () => void;
1659
+ on(event: 'submit', listener: SubmitFormListener): () => void;
1660
+ off(event: 'focus', listener: FocusFormListener): void;
1661
+ off(event: 'submit', listener: SubmitFormListener): void;
1662
+ focus(input: string): Promise<void>;
1428
1663
  protected __get(property: string): unknown;
1429
1664
  protected __set(property: string, value: unknown): void;
1430
1665
  private getFieldErrors;
@@ -1445,6 +1680,7 @@ export declare type FormErrors<T> = {
1445
1680
 
1446
1681
  export declare interface FormFieldDefinition<TType extends FormFieldType = FormFieldType, TRules extends string = string> {
1447
1682
  type: TType;
1683
+ trim?: boolean;
1448
1684
  default?: GetFormFieldValue<TType>;
1449
1685
  rules?: TRules;
1450
1686
  }
@@ -1458,11 +1694,28 @@ export declare const FormFieldTypes: {
1458
1694
  readonly Number: "number";
1459
1695
  readonly Boolean: "boolean";
1460
1696
  readonly Object: "object";
1697
+ readonly Date: "date";
1461
1698
  };
1462
1699
 
1700
+ export declare type FormFieldValidator<T = unknown> = (value: T) => string | string[] | undefined;
1701
+
1463
1702
  export declare type FormFieldValue = GetFormFieldValue<FormFieldType>;
1464
1703
 
1465
- export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : TType extends typeof FormFieldTypes.Boolean ? boolean : TType extends typeof FormFieldTypes.Object ? object : never;
1704
+ export declare function getCurrentLayout(): Layout;
1705
+
1706
+ export declare function getElement(value: unknown): HTMLElement | undefined;
1707
+
1708
+ export declare function getErrorMessage(error: ErrorSource): string;
1709
+
1710
+ export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : TType extends typeof FormFieldTypes.Boolean ? boolean : TType extends typeof FormFieldTypes.Object ? object : TType extends typeof FormFieldTypes.Date ? Date : never;
1711
+
1712
+ export declare function getPiniaStore(): Pinia;
1713
+
1714
+ export declare interface HasElement {
1715
+ $el: Readonly<Ref<HTMLElement | undefined>>;
1716
+ }
1717
+
1718
+ export declare function hasElement(value: unknown): value is UnwrapNestedRefs<HasElement>;
1466
1719
 
1467
1720
  export declare interface IAGErrorReportModalButtonsDefaultSlotProps {
1468
1721
  id: string;
@@ -1472,13 +1725,18 @@ export declare interface IAGErrorReportModalButtonsDefaultSlotProps {
1472
1725
  handler?(): void;
1473
1726
  }
1474
1727
 
1475
- export declare interface IAGHeadlessInput {
1728
+ export declare interface IAGHeadlessButton extends HasElement {
1729
+ }
1730
+
1731
+ export declare interface IAGHeadlessInput extends HasElement {
1476
1732
  id: string;
1477
1733
  name: ComputedRef<string | null>;
1478
1734
  label: ComputedRef<string | null>;
1479
- value: ComputedRef<string | number | boolean | null>;
1735
+ description: ComputedRef<string | boolean | null>;
1736
+ value: ComputedRef<FormFieldValue | null>;
1737
+ required: ComputedRef<boolean | null>;
1480
1738
  errors: DeepReadonly<Ref<string[] | null>>;
1481
- update(value: string | number | boolean | null): void;
1739
+ update(value: FormFieldValue | null): void;
1482
1740
  }
1483
1741
 
1484
1742
  export declare interface IAGHeadlessModal extends IAGModal {
@@ -1538,27 +1796,59 @@ export declare const inputProps: {
1538
1796
  } & {
1539
1797
  default: string | (() => string | null) | null;
1540
1798
  };
1799
+ description: {
1800
+ type?: PropType<string | null> | undefined;
1801
+ validator?(value: unknown): boolean;
1802
+ } & {
1803
+ default: string | (() => string | null) | null;
1804
+ };
1805
+ modelValue: {
1806
+ type?: PropType<FormFieldValue | null> | undefined;
1807
+ validator?(value: unknown): boolean;
1808
+ } & {
1809
+ default: FormFieldValue | (() => FormFieldValue | null) | null;
1810
+ };
1541
1811
  };
1542
1812
 
1543
1813
  export declare function installPlugins(plugins: Plugin_2[], ...args: GetClosureArgs<Plugin_2['install']>): Promise<void>;
1544
1814
 
1545
- export declare const Lang: Facade<LangService, Constructor<LangService>>;
1815
+ export declare abstract class Job {
1816
+ abstract run(): Promise<void>;
1817
+ }
1818
+
1819
+ export declare const Lang: Facade<LangService, LangService>;
1546
1820
 
1547
1821
  export declare interface LangProvider {
1548
- translate(key: string, parameters?: Record<string, unknown>): string;
1822
+ getLocale(): string;
1823
+ setLocale(locale: string): Promise<void>;
1824
+ getFallbackLocale(): string;
1825
+ setFallbackLocale(fallbackLocale: string): Promise<void>;
1826
+ getLocales(): string[];
1827
+ translate(key: string, parameters?: Record<string, unknown> | number): string;
1828
+ translateWithDefault(key: string, defaultMessage: string, parameters?: Record<string, unknown> | number): string;
1549
1829
  }
1550
1830
 
1551
- declare class LangService extends Service {
1831
+ declare class LangService extends _default_2 {
1552
1832
  private provider;
1553
1833
  constructor();
1554
- setProvider(provider: LangProvider): void;
1555
- translate(key: string, parameters?: Record<string, unknown>): string;
1556
- translateWithDefault(key: string, defaultMessage: string): string;
1557
- translateWithDefault(key: string, parameters: Record<string, unknown>, defaultMessage: string): string;
1834
+ setProvider(provider: LangProvider): Promise<void>;
1835
+ translate(key: string, parameters?: Record<string, unknown> | number): string;
1836
+ translateWithDefault(key: string, defaultMessage: string, parameters?: Record<string, unknown> | number): string;
1837
+ getBrowserLocale(): string;
1838
+ protected boot(): Promise<void>;
1558
1839
  }
1559
1840
 
1560
1841
  export declare type LangServices = typeof services_2;
1561
1842
 
1843
+ export declare type Layout = (typeof Layouts)[keyof typeof Layouts];
1844
+
1845
+ export declare const Layouts: {
1846
+ readonly Mobile: "mobile";
1847
+ readonly Desktop: "desktop";
1848
+ };
1849
+
1850
+ export declare function listenerProp<T extends Function = Function>(): OptionalProp<T | null>;
1851
+
1562
1852
  export declare const loadingModalProps: {
1563
1853
  message: {
1564
1854
  type?: PropType<string | null> | undefined;
@@ -1568,8 +1858,14 @@ export declare const loadingModalProps: {
1568
1858
  };
1569
1859
  };
1570
1860
 
1861
+ export declare type MeasureDirectiveListener = (size: ElementSize) => unknown;
1862
+
1571
1863
  export declare function mixedProp<T>(type?: PropType<T>): OptionalProp<T | null>;
1572
1864
 
1865
+ export declare function mixedProp<T>(type: PropType<T>, defaultValue: T): OptionalProp<T>;
1866
+
1867
+ export declare const MOBILE_BREAKPOINT = 768;
1868
+
1573
1869
  declare interface Modal<T = unknown> {
1574
1870
  id: string;
1575
1871
  properties: Record<string, unknown>;
@@ -1600,7 +1896,9 @@ export declare const modalProps: {
1600
1896
 
1601
1897
  declare type ModalResult<TComponent> = TComponent extends ModalComponent<Record<string, unknown>, infer TResult> ? TResult : never;
1602
1898
 
1603
- export declare function numberInput(defaultValue?: number): FormFieldDefinition<typeof FormFieldTypes.Number>;
1899
+ export declare function numberInput(defaultValue?: number, options?: {
1900
+ rules?: string;
1901
+ }): FormFieldDefinition<typeof FormFieldTypes.Number>;
1604
1902
 
1605
1903
  export declare function numberProp(): OptionalProp<number | null>;
1606
1904
 
@@ -1612,6 +1910,10 @@ export declare function objectProp<T>(defaultValue: () => T): OptionalProp<T>;
1612
1910
 
1613
1911
  export declare function onCleanMounted(operation: () => Function): void;
1614
1912
 
1913
+ export declare function onFormFocus(input: {
1914
+ name: string | null;
1915
+ }, listener: () => unknown): void;
1916
+
1615
1917
  declare type OptionalProp<T> = BaseProp<T> & {
1616
1918
  default: T | (() => T) | null;
1617
1919
  };
@@ -1659,12 +1961,24 @@ export declare const promptModalProps: {
1659
1961
  } & {
1660
1962
  default: string | (() => string | null) | null;
1661
1963
  };
1964
+ acceptColor: {
1965
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1966
+ validator?(value: unknown): boolean;
1967
+ } & {
1968
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1969
+ };
1662
1970
  cancelText: {
1663
1971
  type?: PropType<string | null> | undefined;
1664
1972
  validator?(value: unknown): boolean;
1665
1973
  } & {
1666
1974
  default: string | (() => string | null) | null;
1667
1975
  };
1976
+ cancelColor: {
1977
+ type?: PropType<"primary" | "secondary" | "danger" | "clear"> | undefined;
1978
+ validator?(value: unknown): boolean;
1979
+ } & {
1980
+ default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
1981
+ };
1668
1982
  };
1669
1983
 
1670
1984
  export declare interface PromptOptions {
@@ -1672,7 +1986,10 @@ export declare interface PromptOptions {
1672
1986
  defaultValue?: string;
1673
1987
  placeholder?: string;
1674
1988
  acceptText?: string;
1989
+ acceptColor?: Color;
1675
1990
  cancelText?: string;
1991
+ cancelColor?: Color;
1992
+ trim?: boolean;
1676
1993
  }
1677
1994
 
1678
1995
  export declare function removeInteractiveClasses(classes: string): string;
@@ -1681,6 +1998,8 @@ export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
1681
1998
 
1682
1999
  export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
1683
2000
 
2001
+ export declare function requiredDateInput(defaultValue?: Date): FormFieldDefinition<typeof FormFieldTypes.Date>;
2002
+
1684
2003
  export declare function requiredEnumProp<Enum extends Record<string, unknown>>(enumeration: Enum): RequiredProp<Enum[keyof Enum]>;
1685
2004
 
1686
2005
  export declare function requiredMixedProp<T>(type?: PropType<T>): RequiredProp<T>;
@@ -1699,6 +2018,8 @@ export declare function requiredStringInput(defaultValue?: string): FormFieldDef
1699
2018
 
1700
2019
  export declare function requiredStringProp(): RequiredProp<string>;
1701
2020
 
2021
+ export declare function resetPiniaStore(): Pinia;
2022
+
1702
2023
  export declare const selectEmits: readonly ["update:modelValue"];
1703
2024
 
1704
2025
  export declare const selectProps: {
@@ -1739,10 +2060,11 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
1739
2060
  protected _name: string;
1740
2061
  private _booted;
1741
2062
  private _computedStateKeys;
1742
- private _store?;
2063
+ private _store;
1743
2064
  constructor();
1744
2065
  get booted(): PromisedValue<void>;
1745
2066
  launch(): Promise<void>;
2067
+ hasPersistedState(): boolean;
1746
2068
  hasState<P extends keyof State>(property: P): boolean;
1747
2069
  getState(): State;
1748
2070
  getState<P extends keyof State>(property: P): State[P];
@@ -1759,6 +2081,7 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
1759
2081
  protected frameworkBoot(): Promise<void>;
1760
2082
  protected boot(): Promise<void>;
1761
2083
  protected initializePersistedState(): void;
2084
+ protected requireStore(): Store<string, State, ComputedState, {}>;
1762
2085
  }
1763
2086
 
1764
2087
  export declare type ServiceConstructor<T extends Service = Service> = Constructor<T> & typeof Service;
@@ -1767,15 +2090,15 @@ export declare interface Services extends DefaultServices {
1767
2090
  }
1768
2091
 
1769
2092
  declare const services: {
1770
- $errors: Facade<ErrorsService, Constructor<ErrorsService>>;
2093
+ $errors: Facade<ErrorsService, ErrorsService>;
1771
2094
  };
1772
2095
 
1773
2096
  declare const services_2: {
1774
- $lang: Facade<LangService, Constructor<LangService>>;
2097
+ $lang: Facade<LangService, LangService>;
1775
2098
  };
1776
2099
 
1777
2100
  declare const services_3: {
1778
- $ui: Facade<UIService, Constructor<UIService>>;
2101
+ $ui: Facade<UIService, UIService>;
1779
2102
  };
1780
2103
 
1781
2104
  export declare type ServiceState = Record<string, any>;
@@ -1834,20 +2157,21 @@ export declare const snackbarProps: {
1834
2157
  };
1835
2158
  };
1836
2159
 
1837
- export declare function stringInput(defaultValue?: string): FormFieldDefinition<typeof FormFieldTypes.String>;
2160
+ export declare function stringInput(defaultValue?: string, options?: {
2161
+ rules?: string;
2162
+ }): FormFieldDefinition<typeof FormFieldTypes.String>;
1838
2163
 
1839
2164
  export declare function stringProp(): OptionalProp<string | null>;
1840
2165
 
1841
2166
  export declare function stringProp(defaultValue: string): OptionalProp<string>;
1842
2167
 
1843
- export declare const translate: (key: string, parameters?: Record<string, unknown> | undefined) => string;
2168
+ export declare type SubmitFormListener = () => unknown;
1844
2169
 
1845
- export declare const translateWithDefault: {
1846
- (key: string, defaultMessage: string): string;
1847
- (key: string, parameters: Record<string, unknown>, defaultMessage: string): string;
1848
- };
2170
+ export declare const translate: (key: string, parameters?: number | Record<string, unknown> | undefined) => string;
2171
+
2172
+ export declare const translateWithDefault: (key: string, defaultMessage: string, parameters?: number | Record<string, unknown>) => string;
1849
2173
 
1850
- export declare const UI: Facade<UIService, Constructor<UIService>>;
2174
+ export declare const UI: Facade<UIService, UIService>;
1851
2175
 
1852
2176
  export declare type UIComponent = ObjectValues<typeof UIComponents>;
1853
2177
 
@@ -1861,7 +2185,7 @@ export declare const UIComponents: {
1861
2185
  readonly StartupCrash: "startup-crash";
1862
2186
  };
1863
2187
 
1864
- export declare class UIService extends _default_3 {
2188
+ export declare class UIService extends _default_4 {
1865
2189
  private modalCallbacks;
1866
2190
  private components;
1867
2191
  requireComponent(name: UIComponent): Component;
@@ -1871,8 +2195,8 @@ export declare class UIService extends _default_3 {
1871
2195
  confirm(title: string, message: string, options?: ConfirmOptions): Promise<boolean>;
1872
2196
  prompt(message: string, options?: PromptOptions): Promise<string | null>;
1873
2197
  prompt(title: string, message: string, options?: PromptOptions): Promise<string | null>;
1874
- loading<T>(operation: Promise<T>): Promise<T>;
1875
- loading<T>(message: string, operation: Promise<T>): Promise<T>;
2198
+ loading<T>(operation: Promise<T> | (() => T)): Promise<T>;
2199
+ loading<T>(message: string, operation: Promise<T> | (() => T)): Promise<T>;
1876
2200
  showSnackbar(message: string, options?: ShowSnackbarOptions): void;
1877
2201
  hideSnackbar(id: string): void;
1878
2202
  registerComponent(name: UIComponent, component: Component): void;
@@ -1881,6 +2205,7 @@ export declare class UIService extends _default_3 {
1881
2205
  protected boot(): Promise<void>;
1882
2206
  private watchModalEvents;
1883
2207
  private watchMountedEvent;
2208
+ private watchViewportBreakpoints;
1884
2209
  }
1885
2210
 
1886
2211
  export declare type UIServices = typeof services_3;
@@ -1951,9 +2276,14 @@ export declare function useSnackbar(props: ExtractPropTypes<typeof snackbarProps
1951
2276
 
1952
2277
  export declare function useSnackbarProps(): typeof snackbarProps;
1953
2278
 
2279
+ export declare function validate(value: unknown, rule: string): string[];
2280
+
2281
+ export declare const validators: Record<string, FormFieldValidator>;
2282
+
1954
2283
  export { }
1955
2284
 
1956
2285
  export interface EventsPayload {
2286
+ 'application-ready': void;
1957
2287
  'application-mounted': void;
1958
2288
  }
1959
2289
 
@@ -1961,6 +2291,10 @@ export { }
1961
2291
  directives?: Record<string, Directive>;
1962
2292
  }
1963
2293
 
2294
+ export interface EventsPayload {
2295
+ error: { error: ErrorSource; message?: string };
2296
+ }
2297
+
1964
2298
  export interface AerogelOptions {
1965
2299
  handleError?(error: ErrorSource): boolean;
1966
2300
  }
@@ -1975,6 +2309,11 @@ declare module '@vue/runtime-core' {
1975
2309
  }
1976
2310
  }
1977
2311
 
2312
+ declare global {
2313
+ // eslint-disable-next-line no-var
2314
+ var __aerogelEvents__: AerogelGlobalEvents | undefined;
2315
+ }
2316
+
1978
2317
  export interface AerogelOptions {
1979
2318
  services?: Record<string, Service>;
1980
2319
  }
@@ -1983,12 +2322,19 @@ declare module '@vue/runtime-core' {
1983
2322
  interface ComponentCustomProperties extends Services {}
1984
2323
  }
1985
2324
 
2325
+ declare global {
2326
+ // eslint-disable-next-line no-var
2327
+ var testingRuntime: AerogelTestingRuntime | undefined;
2328
+ }
2329
+
1986
2330
  export interface EventsPayload {
1987
- 'modal-will-close': { modal: Modal; result?: unknown };
1988
- 'modal-closed': { modal: Modal; result?: unknown };
1989
2331
  'close-modal': { id: string; result?: unknown };
1990
2332
  'hide-modal': { id: string };
2333
+ 'hide-overlays-backdrop': void;
2334
+ 'modal-closed': { modal: Modal; result?: unknown };
2335
+ 'modal-will-close': { modal: Modal; result?: unknown };
1991
2336
  'show-modal': { id: string };
2337
+ 'show-overlays-backdrop': void;
1992
2338
  }
1993
2339
 
1994
2340
  export interface AerogelOptions {