@aerogel/core 0.0.0-next.a68f133e2c9a1ae9ba84b4e2e42df909289e5fba → 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.
- package/dist/aerogel-core.cjs.js +1 -1
- package/dist/aerogel-core.cjs.js.map +1 -1
- package/dist/aerogel-core.d.ts +383 -48
- package/dist/aerogel-core.esm.js +1 -1
- package/dist/aerogel-core.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/bootstrap/bootstrap.test.ts +0 -1
- package/src/bootstrap/index.ts +5 -4
- package/src/components/AGAppSnackbars.vue +1 -1
- package/src/components/composition.ts +23 -0
- package/src/components/forms/AGForm.vue +9 -10
- package/src/components/forms/AGInput.vue +2 -0
- package/src/components/headless/forms/AGHeadlessButton.ts +3 -0
- package/src/components/headless/forms/AGHeadlessButton.vue +23 -12
- package/src/components/headless/forms/AGHeadlessInput.ts +10 -4
- package/src/components/headless/forms/AGHeadlessInput.vue +18 -5
- package/src/components/headless/forms/AGHeadlessInputDescription.vue +28 -0
- package/src/components/headless/forms/AGHeadlessInputInput.vue +44 -5
- package/src/components/headless/forms/AGHeadlessInputTextArea.vue +43 -0
- package/src/components/headless/forms/composition.ts +10 -0
- package/src/components/headless/forms/index.ts +4 -0
- package/src/components/index.ts +2 -0
- package/src/components/interfaces.ts +24 -0
- package/src/components/lib/AGErrorMessage.vue +2 -2
- package/src/components/lib/AGMarkdown.vue +9 -4
- package/src/components/lib/AGMeasured.vue +1 -0
- package/src/components/modals/AGConfirmModal.ts +9 -3
- package/src/components/modals/AGConfirmModal.vue +2 -2
- package/src/components/modals/AGPromptModal.ts +9 -3
- package/src/components/modals/AGPromptModal.vue +2 -2
- package/src/directives/index.ts +2 -0
- package/src/directives/measure.ts +33 -5
- package/src/errors/Errors.ts +9 -16
- package/src/errors/index.ts +1 -0
- package/src/errors/utils.ts +19 -0
- package/src/forms/Form.test.ts +28 -0
- package/src/forms/Form.ts +65 -8
- package/src/forms/index.ts +3 -1
- package/src/forms/utils.ts +34 -3
- package/src/forms/validation.ts +19 -0
- package/src/jobs/Job.ts +5 -0
- package/src/jobs/index.ts +7 -0
- package/src/lang/DefaultLangProvider.ts +43 -0
- package/src/lang/Lang.state.ts +11 -0
- package/src/lang/Lang.ts +43 -28
- package/src/main.ts +3 -0
- package/src/services/App.state.ts +14 -0
- package/src/services/App.ts +3 -0
- package/src/services/Cache.ts +43 -0
- package/src/services/Events.test.ts +39 -0
- package/src/services/Events.ts +99 -29
- package/src/services/Service.ts +15 -3
- package/src/services/index.ts +3 -1
- package/src/testing/index.ts +25 -0
- package/src/testing/setup.ts +19 -0
- package/src/ui/UI.state.ts +7 -0
- package/src/ui/UI.ts +40 -10
- package/src/ui/index.ts +1 -0
- package/src/ui/utils.ts +16 -0
- package/src/utils/vue.ts +11 -2
- package/vite.config.ts +4 -1
package/dist/aerogel-core.d.ts
CHANGED
|
@@ -27,15 +27,30 @@ import { RendererElement } from 'vue';
|
|
|
27
27
|
import { RendererNode } from 'vue';
|
|
28
28
|
import type { StateTree } from 'pinia';
|
|
29
29
|
import type { Store } from 'pinia';
|
|
30
|
+
import type { SubPartial } from '@noeldemartin/utils';
|
|
30
31
|
import type { UnwrapNestedRefs } from 'vue';
|
|
31
32
|
import { VNode } from 'vue';
|
|
32
33
|
import type { Writable } from '@noeldemartin/utils';
|
|
33
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
|
+
|
|
34
45
|
export declare interface AerogelOptions {
|
|
35
46
|
plugins?: Plugin_2[];
|
|
36
47
|
install?(app: App_2): void | Promise<void>;
|
|
37
48
|
}
|
|
38
49
|
|
|
50
|
+
export declare interface AerogelTestingRuntime {
|
|
51
|
+
on: (typeof Events)['on'];
|
|
52
|
+
}
|
|
53
|
+
|
|
39
54
|
export declare const AGAlertModal: DefineComponent< {
|
|
40
55
|
title: {
|
|
41
56
|
type?: PropType<string | null> | undefined;
|
|
@@ -139,12 +154,24 @@ validator?(value: unknown): boolean;
|
|
|
139
154
|
} & {
|
|
140
155
|
default: string | (() => string | null) | null;
|
|
141
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
|
+
};
|
|
142
163
|
cancelText: {
|
|
143
164
|
type?: PropType<string | null> | undefined;
|
|
144
165
|
validator?(value: unknown): boolean;
|
|
145
166
|
} & {
|
|
146
167
|
default: string | (() => string | null) | null;
|
|
147
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
|
+
};
|
|
148
175
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
149
176
|
[key: string]: any;
|
|
150
177
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -166,19 +193,33 @@ validator?(value: unknown): boolean;
|
|
|
166
193
|
} & {
|
|
167
194
|
default: string | (() => string | null) | null;
|
|
168
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
|
+
};
|
|
169
202
|
cancelText: {
|
|
170
203
|
type?: PropType<string | null> | undefined;
|
|
171
204
|
validator?(value: unknown): boolean;
|
|
172
205
|
} & {
|
|
173
206
|
default: string | (() => string | null) | null;
|
|
174
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
|
+
};
|
|
175
214
|
}>>, {
|
|
176
215
|
title: string | null;
|
|
177
216
|
acceptText: string | null;
|
|
217
|
+
acceptColor: "primary" | "secondary" | "danger" | "clear";
|
|
178
218
|
cancelText: string | null;
|
|
219
|
+
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
179
220
|
}, {}>;
|
|
180
221
|
|
|
181
|
-
export declare type AGConfirmModalProps = ObjectWithoutEmpty<ExtractPropTypes<typeof confirmModalProps
|
|
222
|
+
export declare type AGConfirmModalProps = SubPartial<ObjectWithoutEmpty<ExtractPropTypes<typeof confirmModalProps>>, 'acceptColor' | 'cancelColor'>;
|
|
182
223
|
|
|
183
224
|
export declare const AGErrorMessage: DefineComponent< {
|
|
184
225
|
error: {
|
|
@@ -286,6 +327,12 @@ form: Form<FormFieldDefinitions> | null;
|
|
|
286
327
|
}, {}>;
|
|
287
328
|
|
|
288
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
|
+
};
|
|
289
336
|
href: {
|
|
290
337
|
type?: PropType<string | null> | undefined;
|
|
291
338
|
validator?(value: unknown): boolean;
|
|
@@ -325,6 +372,12 @@ default: boolean | (() => boolean) | null;
|
|
|
325
372
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
326
373
|
[key: string]: any;
|
|
327
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
|
+
};
|
|
328
381
|
href: {
|
|
329
382
|
type?: PropType<string | null> | undefined;
|
|
330
383
|
validator?(value: unknown): boolean;
|
|
@@ -362,6 +415,7 @@ validator?(value: unknown): boolean;
|
|
|
362
415
|
default: boolean | (() => boolean) | null;
|
|
363
416
|
};
|
|
364
417
|
}>>, {
|
|
418
|
+
as: Object | null;
|
|
365
419
|
href: string | null;
|
|
366
420
|
url: string | null;
|
|
367
421
|
route: string | null;
|
|
@@ -383,17 +437,23 @@ validator?(value: unknown): boolean;
|
|
|
383
437
|
} & {
|
|
384
438
|
default: string | (() => string | null) | null;
|
|
385
439
|
};
|
|
386
|
-
|
|
387
|
-
type?: PropType<string> | undefined;
|
|
440
|
+
description: {
|
|
441
|
+
type?: PropType<string | null> | undefined;
|
|
388
442
|
validator?(value: unknown): boolean;
|
|
389
443
|
} & {
|
|
390
|
-
default: string | (() => string) | null;
|
|
444
|
+
default: string | (() => string | null) | null;
|
|
391
445
|
};
|
|
392
446
|
modelValue: {
|
|
393
|
-
type?: PropType<
|
|
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;
|
|
394
454
|
validator?(value: unknown): boolean;
|
|
395
455
|
} & {
|
|
396
|
-
default: string |
|
|
456
|
+
default: string | (() => string) | null;
|
|
397
457
|
};
|
|
398
458
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
399
459
|
[key: string]: any;
|
|
@@ -410,27 +470,38 @@ validator?(value: unknown): boolean;
|
|
|
410
470
|
} & {
|
|
411
471
|
default: string | (() => string | null) | null;
|
|
412
472
|
};
|
|
413
|
-
|
|
414
|
-
type?: PropType<string> | undefined;
|
|
473
|
+
description: {
|
|
474
|
+
type?: PropType<string | null> | undefined;
|
|
415
475
|
validator?(value: unknown): boolean;
|
|
416
476
|
} & {
|
|
417
|
-
default: string | (() => string) | null;
|
|
477
|
+
default: string | (() => string | null) | null;
|
|
418
478
|
};
|
|
419
479
|
modelValue: {
|
|
420
|
-
type?: PropType<
|
|
480
|
+
type?: PropType<FormFieldValue | null> | undefined;
|
|
481
|
+
validator?(value: unknown): boolean;
|
|
482
|
+
} & {
|
|
483
|
+
default: FormFieldValue | (() => FormFieldValue | null) | null;
|
|
484
|
+
};
|
|
485
|
+
as: {
|
|
486
|
+
type?: PropType<string> | undefined;
|
|
421
487
|
validator?(value: unknown): boolean;
|
|
422
488
|
} & {
|
|
423
|
-
default: string |
|
|
489
|
+
default: string | (() => string) | null;
|
|
424
490
|
};
|
|
425
491
|
}>> & {
|
|
426
492
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
427
493
|
}, {
|
|
428
494
|
as: string;
|
|
429
|
-
modelValue: string | number | boolean | null;
|
|
430
495
|
name: string | null;
|
|
431
496
|
label: string | null;
|
|
497
|
+
description: string | null;
|
|
498
|
+
modelValue: FormFieldValue | null;
|
|
432
499
|
}, {}>;
|
|
433
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
|
+
|
|
434
505
|
export declare const AGHeadlessInputError: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
435
506
|
[key: string]: any;
|
|
436
507
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
@@ -459,6 +530,10 @@ export declare const AGHeadlessInputLabel: DefineComponent< {}, (_ctx: any, _
|
|
|
459
530
|
[key: string]: any;
|
|
460
531
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
461
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
|
+
|
|
462
537
|
export declare const AGHeadlessModal: DefineComponent< {
|
|
463
538
|
cancellable: {
|
|
464
539
|
type?: PropType<boolean> | undefined;
|
|
@@ -720,6 +795,18 @@ validator?(value: unknown): boolean;
|
|
|
720
795
|
} & {
|
|
721
796
|
default: string | (() => string | null) | null;
|
|
722
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
|
+
};
|
|
723
810
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
724
811
|
[key: string]: any;
|
|
725
812
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -735,9 +822,23 @@ validator?(value: unknown): boolean;
|
|
|
735
822
|
} & {
|
|
736
823
|
default: string | (() => string | null) | null;
|
|
737
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
|
+
};
|
|
738
837
|
}>>, {
|
|
739
838
|
name: string | null;
|
|
740
839
|
label: string | null;
|
|
840
|
+
description: string | null;
|
|
841
|
+
modelValue: FormFieldValue | null;
|
|
741
842
|
}, {}>;
|
|
742
843
|
|
|
743
844
|
export declare const AGLink: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
@@ -786,10 +887,10 @@ validator?(value: unknown): boolean;
|
|
|
786
887
|
default: string | (() => string | null) | null;
|
|
787
888
|
};
|
|
788
889
|
langParams: {
|
|
789
|
-
type?: PropType<Record<string, unknown> | null> | undefined;
|
|
890
|
+
type?: PropType<number | Record<string, unknown> | null> | undefined;
|
|
790
891
|
validator?(value: unknown): boolean;
|
|
791
892
|
} & {
|
|
792
|
-
default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
|
|
893
|
+
default: number | Record<string, unknown> | (() => number | Record<string, unknown> | null) | null;
|
|
793
894
|
};
|
|
794
895
|
text: {
|
|
795
896
|
type?: PropType<string | null> | undefined;
|
|
@@ -819,10 +920,10 @@ validator?(value: unknown): boolean;
|
|
|
819
920
|
default: string | (() => string | null) | null;
|
|
820
921
|
};
|
|
821
922
|
langParams: {
|
|
822
|
-
type?: PropType<Record<string, unknown> | null> | undefined;
|
|
923
|
+
type?: PropType<number | Record<string, unknown> | null> | undefined;
|
|
823
924
|
validator?(value: unknown): boolean;
|
|
824
925
|
} & {
|
|
825
|
-
default: Record<string, unknown> | (() => Record<string, unknown> | null) | null;
|
|
926
|
+
default: number | Record<string, unknown> | (() => number | Record<string, unknown> | null) | null;
|
|
826
927
|
};
|
|
827
928
|
text: {
|
|
828
929
|
type?: PropType<string | null> | undefined;
|
|
@@ -834,7 +935,7 @@ default: string | (() => string | null) | null;
|
|
|
834
935
|
as: string | null;
|
|
835
936
|
inline: boolean;
|
|
836
937
|
langKey: string | null;
|
|
837
|
-
langParams: Record<string, unknown> | null;
|
|
938
|
+
langParams: number | Record<string, unknown> | null;
|
|
838
939
|
text: string | null;
|
|
839
940
|
}, {}>;
|
|
840
941
|
|
|
@@ -962,12 +1063,24 @@ validator?(value: unknown): boolean;
|
|
|
962
1063
|
} & {
|
|
963
1064
|
default: string | (() => string | null) | null;
|
|
964
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
|
+
};
|
|
965
1072
|
cancelText: {
|
|
966
1073
|
type?: PropType<string | null> | undefined;
|
|
967
1074
|
validator?(value: unknown): boolean;
|
|
968
1075
|
} & {
|
|
969
1076
|
default: string | (() => string | null) | null;
|
|
970
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
|
+
};
|
|
971
1084
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
972
1085
|
[key: string]: any;
|
|
973
1086
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -1007,22 +1120,36 @@ validator?(value: unknown): boolean;
|
|
|
1007
1120
|
} & {
|
|
1008
1121
|
default: string | (() => string | null) | null;
|
|
1009
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
|
+
};
|
|
1010
1129
|
cancelText: {
|
|
1011
1130
|
type?: PropType<string | null> | undefined;
|
|
1012
1131
|
validator?(value: unknown): boolean;
|
|
1013
1132
|
} & {
|
|
1014
1133
|
default: string | (() => string | null) | null;
|
|
1015
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
|
+
};
|
|
1016
1141
|
}>>, {
|
|
1017
1142
|
title: string | null;
|
|
1018
1143
|
label: string | null;
|
|
1019
1144
|
defaultValue: string | null;
|
|
1020
1145
|
placeholder: string | null;
|
|
1021
1146
|
acceptText: string | null;
|
|
1147
|
+
acceptColor: "primary" | "secondary" | "danger" | "clear";
|
|
1022
1148
|
cancelText: string | null;
|
|
1149
|
+
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
1023
1150
|
}, {}>;
|
|
1024
1151
|
|
|
1025
|
-
export declare type AGPromptModalProps = ObjectWithoutEmpty<ExtractPropTypes<typeof promptModalProps
|
|
1152
|
+
export declare type AGPromptModalProps = SubPartial<ObjectWithoutEmpty<ExtractPropTypes<typeof promptModalProps>>, 'acceptColor' | 'cancelColor'>;
|
|
1026
1153
|
|
|
1027
1154
|
export declare const AGSelect: DefineComponent< {
|
|
1028
1155
|
name: {
|
|
@@ -1177,7 +1304,8 @@ export declare const alertModalProps: {
|
|
|
1177
1304
|
|
|
1178
1305
|
export declare const App: Facade<AppService, AppService>;
|
|
1179
1306
|
|
|
1180
|
-
export declare class AppService extends
|
|
1307
|
+
export declare class AppService extends _default_3 {
|
|
1308
|
+
readonly name: string;
|
|
1181
1309
|
readonly ready: PromisedValue<void>;
|
|
1182
1310
|
readonly mounted: PromisedValue<void>;
|
|
1183
1311
|
isReady(): boolean;
|
|
@@ -1195,7 +1323,9 @@ declare type BaseProp<T> = {
|
|
|
1195
1323
|
validator?(value: unknown): boolean;
|
|
1196
1324
|
};
|
|
1197
1325
|
|
|
1198
|
-
export declare function booleanInput(defaultValue?: boolean
|
|
1326
|
+
export declare function booleanInput(defaultValue?: boolean, options?: {
|
|
1327
|
+
rules?: string;
|
|
1328
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
|
|
1199
1329
|
|
|
1200
1330
|
export declare function booleanProp(defaultValue?: boolean): OptionalProp<boolean>;
|
|
1201
1331
|
|
|
@@ -1205,6 +1335,17 @@ export declare function bootstrap(rootComponent: Component, options?: AerogelOpt
|
|
|
1205
1335
|
|
|
1206
1336
|
export declare function bootstrapApplication(app: App_2, options?: AerogelOptions): Promise<void>;
|
|
1207
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
|
+
|
|
1208
1349
|
export declare type Color = (typeof Colors)[keyof typeof Colors];
|
|
1209
1350
|
|
|
1210
1351
|
export declare const Colors: {
|
|
@@ -1245,19 +1386,37 @@ export declare const confirmModalProps: {
|
|
|
1245
1386
|
} & {
|
|
1246
1387
|
default: string | (() => string | null) | null;
|
|
1247
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
|
+
};
|
|
1248
1395
|
cancelText: {
|
|
1249
1396
|
type?: PropType<string | null> | undefined;
|
|
1250
1397
|
validator?(value: unknown): boolean;
|
|
1251
1398
|
} & {
|
|
1252
1399
|
default: string | (() => string | null) | null;
|
|
1253
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
|
+
};
|
|
1254
1407
|
};
|
|
1255
1408
|
|
|
1256
1409
|
export declare interface ConfirmOptions {
|
|
1257
1410
|
acceptText?: string;
|
|
1411
|
+
acceptColor?: Color;
|
|
1258
1412
|
cancelText?: string;
|
|
1413
|
+
cancelColor?: Color;
|
|
1259
1414
|
}
|
|
1260
1415
|
|
|
1416
|
+
export declare function dateInput(defaultValue?: Date, options?: {
|
|
1417
|
+
rules?: string;
|
|
1418
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Date>;
|
|
1419
|
+
|
|
1261
1420
|
declare const _default: Constructor<UnrefServiceState< {
|
|
1262
1421
|
logs: ErrorReportLog[];
|
|
1263
1422
|
startupErrors: ErrorReport[];
|
|
@@ -1278,34 +1437,64 @@ startupErrors: ErrorReport[];
|
|
|
1278
1437
|
}>>>>;
|
|
1279
1438
|
|
|
1280
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< {
|
|
1281
1454
|
plugins: Record<string, Plugin_2>;
|
|
1282
1455
|
environment: string;
|
|
1456
|
+
version: string;
|
|
1283
1457
|
sourceUrl: string | undefined;
|
|
1284
1458
|
}>> & Constructor< {
|
|
1285
1459
|
development: boolean;
|
|
1286
1460
|
testing: boolean;
|
|
1461
|
+
versionName: string;
|
|
1462
|
+
versionUrl: string;
|
|
1287
1463
|
}> & Constructor<Service<UnrefServiceState< {
|
|
1288
1464
|
plugins: Record<string, Plugin_2>;
|
|
1289
1465
|
environment: string;
|
|
1466
|
+
version: string;
|
|
1290
1467
|
sourceUrl: string | undefined;
|
|
1291
1468
|
}>, {
|
|
1292
1469
|
development: boolean;
|
|
1293
1470
|
testing: boolean;
|
|
1471
|
+
versionName: string;
|
|
1472
|
+
versionUrl: string;
|
|
1294
1473
|
}, Partial<UnrefServiceState< {
|
|
1295
1474
|
plugins: Record<string, Plugin_2>;
|
|
1296
1475
|
environment: string;
|
|
1476
|
+
version: string;
|
|
1297
1477
|
sourceUrl: string | undefined;
|
|
1298
1478
|
}>>>>;
|
|
1299
1479
|
|
|
1300
|
-
declare const
|
|
1480
|
+
declare const _default_4: Constructor<UnrefServiceState< {
|
|
1301
1481
|
modals: Modal<unknown>[];
|
|
1302
1482
|
snackbars: Snackbar[];
|
|
1303
|
-
|
|
1483
|
+
layout: Layout;
|
|
1484
|
+
}>> & Constructor< {
|
|
1485
|
+
mobile: boolean;
|
|
1486
|
+
desktop: boolean;
|
|
1487
|
+
}> & Constructor<Service<UnrefServiceState< {
|
|
1304
1488
|
modals: Modal<unknown>[];
|
|
1305
1489
|
snackbars: Snackbar[];
|
|
1306
|
-
|
|
1490
|
+
layout: Layout;
|
|
1491
|
+
}>, {
|
|
1492
|
+
mobile: boolean;
|
|
1493
|
+
desktop: boolean;
|
|
1494
|
+
}, Partial<UnrefServiceState< {
|
|
1307
1495
|
modals: Modal<unknown>[];
|
|
1308
1496
|
snackbars: Snackbar[];
|
|
1497
|
+
layout: Layout;
|
|
1309
1498
|
}>>>>;
|
|
1310
1499
|
|
|
1311
1500
|
export declare type DefaultServices = typeof defaultServices;
|
|
@@ -1319,6 +1508,8 @@ export declare type DefaultServiceState = any;
|
|
|
1319
1508
|
|
|
1320
1509
|
export declare function defineDirective(directive: Directive): Directive;
|
|
1321
1510
|
|
|
1511
|
+
export declare function defineFormValidationRule<T>(rule: string, validator: FormFieldValidator<T>): void;
|
|
1512
|
+
|
|
1322
1513
|
export declare function definePlugin<T extends Plugin_2>(plugin: T): T;
|
|
1323
1514
|
|
|
1324
1515
|
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}>(options: {
|
|
@@ -1331,6 +1522,15 @@ export declare function defineServiceState<State extends ServiceState = ServiceS
|
|
|
1331
1522
|
|
|
1332
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>;
|
|
1333
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
|
+
|
|
1334
1534
|
export declare function enumProp<Enum extends Record<string, unknown>>(enumeration: Enum, defaultValue?: Enum[keyof Enum]): OptionalProp<Enum[keyof Enum]>;
|
|
1335
1535
|
|
|
1336
1536
|
export declare type ErrorHandler = (error: ErrorSource) => boolean;
|
|
@@ -1370,7 +1570,6 @@ declare class ErrorsService extends _default {
|
|
|
1370
1570
|
report(error: ErrorSource, message?: string): Promise<void>;
|
|
1371
1571
|
see(report: ErrorReport): void;
|
|
1372
1572
|
seeAll(): void;
|
|
1373
|
-
getErrorMessage(error: ErrorSource): string;
|
|
1374
1573
|
private logError;
|
|
1375
1574
|
private createErrorReport;
|
|
1376
1575
|
private createStartupErrorReport;
|
|
@@ -1382,6 +1581,17 @@ export declare type ErrorsServices = typeof services;
|
|
|
1382
1581
|
declare type EventListener_2<T = unknown> = (payload: T) => unknown;
|
|
1383
1582
|
export { EventListener_2 as EventListener }
|
|
1384
1583
|
|
|
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
|
+
|
|
1385
1595
|
export declare const Events: Facade<EventsService, EventsService>;
|
|
1386
1596
|
|
|
1387
1597
|
export declare interface EventsPayload {
|
|
@@ -1389,16 +1599,24 @@ export declare interface EventsPayload {
|
|
|
1389
1599
|
|
|
1390
1600
|
export declare class EventsService extends Service {
|
|
1391
1601
|
private listeners;
|
|
1602
|
+
protected boot(): Promise<void>;
|
|
1392
1603
|
emit<Event extends EventWithoutPayload>(event: Event): Promise<void>;
|
|
1393
1604
|
emit<Event extends EventWithPayload>(event: Event, payload: EventsPayload[Event]): Promise<void>;
|
|
1394
1605
|
emit<Event extends string>(event: UnknownEvent<Event>, payload?: unknown): Promise<void>;
|
|
1395
1606
|
on<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1607
|
+
on<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
1396
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;
|
|
1397
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;
|
|
1398
1612
|
once<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1613
|
+
once<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
1399
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;
|
|
1400
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;
|
|
1401
1618
|
off(event: string, listener: EventListener_2): void;
|
|
1619
|
+
protected registerListener(event: string, options: Partial<EventListenerOptions_2>, handler: EventListener_2): void;
|
|
1402
1620
|
}
|
|
1403
1621
|
|
|
1404
1622
|
export declare type EventWithoutPayload = {
|
|
@@ -1415,23 +1633,33 @@ export declare function extractModalProps<T extends ExtractPropTypes<typeof moda
|
|
|
1415
1633
|
|
|
1416
1634
|
export declare function extractSelectProps<T extends ExtractPropTypes<typeof selectProps>>(props: T): Pick<T, keyof typeof selectProps>;
|
|
1417
1635
|
|
|
1418
|
-
declare
|
|
1636
|
+
export declare type FocusFormListener = (input: string) => unknown;
|
|
1637
|
+
|
|
1638
|
+
export declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinitions> extends MagicObject {
|
|
1419
1639
|
errors: DeepReadonly<UnwrapNestedRefs<FormErrors<Fields>>>;
|
|
1420
1640
|
private _fields;
|
|
1421
1641
|
private _data;
|
|
1422
1642
|
private _submitted;
|
|
1423
1643
|
private _errors;
|
|
1644
|
+
private _listeners;
|
|
1424
1645
|
constructor(fields: Fields);
|
|
1425
1646
|
get valid(): boolean;
|
|
1426
1647
|
get submitted(): boolean;
|
|
1427
1648
|
setFieldValue<T extends keyof Fields>(field: T, value: FormData_2<Fields>[T]): void;
|
|
1428
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>;
|
|
1429
1652
|
validate(): boolean;
|
|
1430
1653
|
reset(options?: {
|
|
1431
1654
|
keepData?: boolean;
|
|
1432
1655
|
keepErrors?: boolean;
|
|
1433
1656
|
}): void;
|
|
1434
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>;
|
|
1435
1663
|
protected __get(property: string): unknown;
|
|
1436
1664
|
protected __set(property: string, value: unknown): void;
|
|
1437
1665
|
private getFieldErrors;
|
|
@@ -1452,6 +1680,7 @@ export declare type FormErrors<T> = {
|
|
|
1452
1680
|
|
|
1453
1681
|
export declare interface FormFieldDefinition<TType extends FormFieldType = FormFieldType, TRules extends string = string> {
|
|
1454
1682
|
type: TType;
|
|
1683
|
+
trim?: boolean;
|
|
1455
1684
|
default?: GetFormFieldValue<TType>;
|
|
1456
1685
|
rules?: TRules;
|
|
1457
1686
|
}
|
|
@@ -1465,14 +1694,29 @@ export declare const FormFieldTypes: {
|
|
|
1465
1694
|
readonly Number: "number";
|
|
1466
1695
|
readonly Boolean: "boolean";
|
|
1467
1696
|
readonly Object: "object";
|
|
1697
|
+
readonly Date: "date";
|
|
1468
1698
|
};
|
|
1469
1699
|
|
|
1700
|
+
export declare type FormFieldValidator<T = unknown> = (value: T) => string | string[] | undefined;
|
|
1701
|
+
|
|
1470
1702
|
export declare type FormFieldValue = GetFormFieldValue<FormFieldType>;
|
|
1471
1703
|
|
|
1472
|
-
export declare
|
|
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;
|
|
1473
1711
|
|
|
1474
1712
|
export declare function getPiniaStore(): Pinia;
|
|
1475
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>;
|
|
1719
|
+
|
|
1476
1720
|
export declare interface IAGErrorReportModalButtonsDefaultSlotProps {
|
|
1477
1721
|
id: string;
|
|
1478
1722
|
description: string;
|
|
@@ -1481,13 +1725,18 @@ export declare interface IAGErrorReportModalButtonsDefaultSlotProps {
|
|
|
1481
1725
|
handler?(): void;
|
|
1482
1726
|
}
|
|
1483
1727
|
|
|
1484
|
-
export declare interface
|
|
1728
|
+
export declare interface IAGHeadlessButton extends HasElement {
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
export declare interface IAGHeadlessInput extends HasElement {
|
|
1485
1732
|
id: string;
|
|
1486
1733
|
name: ComputedRef<string | null>;
|
|
1487
1734
|
label: ComputedRef<string | null>;
|
|
1488
|
-
|
|
1735
|
+
description: ComputedRef<string | boolean | null>;
|
|
1736
|
+
value: ComputedRef<FormFieldValue | null>;
|
|
1737
|
+
required: ComputedRef<boolean | null>;
|
|
1489
1738
|
errors: DeepReadonly<Ref<string[] | null>>;
|
|
1490
|
-
update(value:
|
|
1739
|
+
update(value: FormFieldValue | null): void;
|
|
1491
1740
|
}
|
|
1492
1741
|
|
|
1493
1742
|
export declare interface IAGHeadlessModal extends IAGModal {
|
|
@@ -1547,27 +1796,59 @@ export declare const inputProps: {
|
|
|
1547
1796
|
} & {
|
|
1548
1797
|
default: string | (() => string | null) | null;
|
|
1549
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
|
+
};
|
|
1550
1811
|
};
|
|
1551
1812
|
|
|
1552
1813
|
export declare function installPlugins(plugins: Plugin_2[], ...args: GetClosureArgs<Plugin_2['install']>): Promise<void>;
|
|
1553
1814
|
|
|
1815
|
+
export declare abstract class Job {
|
|
1816
|
+
abstract run(): Promise<void>;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1554
1819
|
export declare const Lang: Facade<LangService, LangService>;
|
|
1555
1820
|
|
|
1556
1821
|
export declare interface LangProvider {
|
|
1557
|
-
|
|
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;
|
|
1558
1829
|
}
|
|
1559
1830
|
|
|
1560
|
-
declare class LangService extends
|
|
1831
|
+
declare class LangService extends _default_2 {
|
|
1561
1832
|
private provider;
|
|
1562
1833
|
constructor();
|
|
1563
|
-
setProvider(provider: LangProvider): void
|
|
1564
|
-
translate(key: string, parameters?: Record<string, unknown>): string;
|
|
1565
|
-
translateWithDefault(key: string, defaultMessage: string): string;
|
|
1566
|
-
|
|
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>;
|
|
1567
1839
|
}
|
|
1568
1840
|
|
|
1569
1841
|
export declare type LangServices = typeof services_2;
|
|
1570
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
|
+
|
|
1571
1852
|
export declare const loadingModalProps: {
|
|
1572
1853
|
message: {
|
|
1573
1854
|
type?: PropType<string | null> | undefined;
|
|
@@ -1577,8 +1858,14 @@ export declare const loadingModalProps: {
|
|
|
1577
1858
|
};
|
|
1578
1859
|
};
|
|
1579
1860
|
|
|
1861
|
+
export declare type MeasureDirectiveListener = (size: ElementSize) => unknown;
|
|
1862
|
+
|
|
1580
1863
|
export declare function mixedProp<T>(type?: PropType<T>): OptionalProp<T | null>;
|
|
1581
1864
|
|
|
1865
|
+
export declare function mixedProp<T>(type: PropType<T>, defaultValue: T): OptionalProp<T>;
|
|
1866
|
+
|
|
1867
|
+
export declare const MOBILE_BREAKPOINT = 768;
|
|
1868
|
+
|
|
1582
1869
|
declare interface Modal<T = unknown> {
|
|
1583
1870
|
id: string;
|
|
1584
1871
|
properties: Record<string, unknown>;
|
|
@@ -1609,7 +1896,9 @@ export declare const modalProps: {
|
|
|
1609
1896
|
|
|
1610
1897
|
declare type ModalResult<TComponent> = TComponent extends ModalComponent<Record<string, unknown>, infer TResult> ? TResult : never;
|
|
1611
1898
|
|
|
1612
|
-
export declare function numberInput(defaultValue?: number
|
|
1899
|
+
export declare function numberInput(defaultValue?: number, options?: {
|
|
1900
|
+
rules?: string;
|
|
1901
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Number>;
|
|
1613
1902
|
|
|
1614
1903
|
export declare function numberProp(): OptionalProp<number | null>;
|
|
1615
1904
|
|
|
@@ -1621,6 +1910,10 @@ export declare function objectProp<T>(defaultValue: () => T): OptionalProp<T>;
|
|
|
1621
1910
|
|
|
1622
1911
|
export declare function onCleanMounted(operation: () => Function): void;
|
|
1623
1912
|
|
|
1913
|
+
export declare function onFormFocus(input: {
|
|
1914
|
+
name: string | null;
|
|
1915
|
+
}, listener: () => unknown): void;
|
|
1916
|
+
|
|
1624
1917
|
declare type OptionalProp<T> = BaseProp<T> & {
|
|
1625
1918
|
default: T | (() => T) | null;
|
|
1626
1919
|
};
|
|
@@ -1668,12 +1961,24 @@ export declare const promptModalProps: {
|
|
|
1668
1961
|
} & {
|
|
1669
1962
|
default: string | (() => string | null) | null;
|
|
1670
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
|
+
};
|
|
1671
1970
|
cancelText: {
|
|
1672
1971
|
type?: PropType<string | null> | undefined;
|
|
1673
1972
|
validator?(value: unknown): boolean;
|
|
1674
1973
|
} & {
|
|
1675
1974
|
default: string | (() => string | null) | null;
|
|
1676
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
|
+
};
|
|
1677
1982
|
};
|
|
1678
1983
|
|
|
1679
1984
|
export declare interface PromptOptions {
|
|
@@ -1681,7 +1986,10 @@ export declare interface PromptOptions {
|
|
|
1681
1986
|
defaultValue?: string;
|
|
1682
1987
|
placeholder?: string;
|
|
1683
1988
|
acceptText?: string;
|
|
1989
|
+
acceptColor?: Color;
|
|
1684
1990
|
cancelText?: string;
|
|
1991
|
+
cancelColor?: Color;
|
|
1992
|
+
trim?: boolean;
|
|
1685
1993
|
}
|
|
1686
1994
|
|
|
1687
1995
|
export declare function removeInteractiveClasses(classes: string): string;
|
|
@@ -1690,6 +1998,8 @@ export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
|
|
|
1690
1998
|
|
|
1691
1999
|
export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
|
|
1692
2000
|
|
|
2001
|
+
export declare function requiredDateInput(defaultValue?: Date): FormFieldDefinition<typeof FormFieldTypes.Date>;
|
|
2002
|
+
|
|
1693
2003
|
export declare function requiredEnumProp<Enum extends Record<string, unknown>>(enumeration: Enum): RequiredProp<Enum[keyof Enum]>;
|
|
1694
2004
|
|
|
1695
2005
|
export declare function requiredMixedProp<T>(type?: PropType<T>): RequiredProp<T>;
|
|
@@ -1750,10 +2060,11 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
|
|
|
1750
2060
|
protected _name: string;
|
|
1751
2061
|
private _booted;
|
|
1752
2062
|
private _computedStateKeys;
|
|
1753
|
-
private _store
|
|
2063
|
+
private _store;
|
|
1754
2064
|
constructor();
|
|
1755
2065
|
get booted(): PromisedValue<void>;
|
|
1756
2066
|
launch(): Promise<void>;
|
|
2067
|
+
hasPersistedState(): boolean;
|
|
1757
2068
|
hasState<P extends keyof State>(property: P): boolean;
|
|
1758
2069
|
getState(): State;
|
|
1759
2070
|
getState<P extends keyof State>(property: P): State[P];
|
|
@@ -1770,6 +2081,7 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
|
|
|
1770
2081
|
protected frameworkBoot(): Promise<void>;
|
|
1771
2082
|
protected boot(): Promise<void>;
|
|
1772
2083
|
protected initializePersistedState(): void;
|
|
2084
|
+
protected requireStore(): Store<string, State, ComputedState, {}>;
|
|
1773
2085
|
}
|
|
1774
2086
|
|
|
1775
2087
|
export declare type ServiceConstructor<T extends Service = Service> = Constructor<T> & typeof Service;
|
|
@@ -1845,18 +2157,19 @@ export declare const snackbarProps: {
|
|
|
1845
2157
|
};
|
|
1846
2158
|
};
|
|
1847
2159
|
|
|
1848
|
-
export declare function stringInput(defaultValue?: string
|
|
2160
|
+
export declare function stringInput(defaultValue?: string, options?: {
|
|
2161
|
+
rules?: string;
|
|
2162
|
+
}): FormFieldDefinition<typeof FormFieldTypes.String>;
|
|
1849
2163
|
|
|
1850
2164
|
export declare function stringProp(): OptionalProp<string | null>;
|
|
1851
2165
|
|
|
1852
2166
|
export declare function stringProp(defaultValue: string): OptionalProp<string>;
|
|
1853
2167
|
|
|
1854
|
-
export declare
|
|
2168
|
+
export declare type SubmitFormListener = () => unknown;
|
|
1855
2169
|
|
|
1856
|
-
export declare const
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
};
|
|
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;
|
|
1860
2173
|
|
|
1861
2174
|
export declare const UI: Facade<UIService, UIService>;
|
|
1862
2175
|
|
|
@@ -1872,7 +2185,7 @@ export declare const UIComponents: {
|
|
|
1872
2185
|
readonly StartupCrash: "startup-crash";
|
|
1873
2186
|
};
|
|
1874
2187
|
|
|
1875
|
-
export declare class UIService extends
|
|
2188
|
+
export declare class UIService extends _default_4 {
|
|
1876
2189
|
private modalCallbacks;
|
|
1877
2190
|
private components;
|
|
1878
2191
|
requireComponent(name: UIComponent): Component;
|
|
@@ -1882,8 +2195,8 @@ export declare class UIService extends _default_3 {
|
|
|
1882
2195
|
confirm(title: string, message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
1883
2196
|
prompt(message: string, options?: PromptOptions): Promise<string | null>;
|
|
1884
2197
|
prompt(title: string, message: string, options?: PromptOptions): Promise<string | null>;
|
|
1885
|
-
loading<T>(operation: Promise<T>): Promise<T>;
|
|
1886
|
-
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>;
|
|
1887
2200
|
showSnackbar(message: string, options?: ShowSnackbarOptions): void;
|
|
1888
2201
|
hideSnackbar(id: string): void;
|
|
1889
2202
|
registerComponent(name: UIComponent, component: Component): void;
|
|
@@ -1892,6 +2205,7 @@ export declare class UIService extends _default_3 {
|
|
|
1892
2205
|
protected boot(): Promise<void>;
|
|
1893
2206
|
private watchModalEvents;
|
|
1894
2207
|
private watchMountedEvent;
|
|
2208
|
+
private watchViewportBreakpoints;
|
|
1895
2209
|
}
|
|
1896
2210
|
|
|
1897
2211
|
export declare type UIServices = typeof services_3;
|
|
@@ -1962,9 +2276,14 @@ export declare function useSnackbar(props: ExtractPropTypes<typeof snackbarProps
|
|
|
1962
2276
|
|
|
1963
2277
|
export declare function useSnackbarProps(): typeof snackbarProps;
|
|
1964
2278
|
|
|
2279
|
+
export declare function validate(value: unknown, rule: string): string[];
|
|
2280
|
+
|
|
2281
|
+
export declare const validators: Record<string, FormFieldValidator>;
|
|
2282
|
+
|
|
1965
2283
|
export { }
|
|
1966
2284
|
|
|
1967
2285
|
export interface EventsPayload {
|
|
2286
|
+
'application-ready': void;
|
|
1968
2287
|
'application-mounted': void;
|
|
1969
2288
|
}
|
|
1970
2289
|
|
|
@@ -1972,6 +2291,10 @@ export { }
|
|
|
1972
2291
|
directives?: Record<string, Directive>;
|
|
1973
2292
|
}
|
|
1974
2293
|
|
|
2294
|
+
export interface EventsPayload {
|
|
2295
|
+
error: { error: ErrorSource; message?: string };
|
|
2296
|
+
}
|
|
2297
|
+
|
|
1975
2298
|
export interface AerogelOptions {
|
|
1976
2299
|
handleError?(error: ErrorSource): boolean;
|
|
1977
2300
|
}
|
|
@@ -1986,6 +2309,11 @@ declare module '@vue/runtime-core' {
|
|
|
1986
2309
|
}
|
|
1987
2310
|
}
|
|
1988
2311
|
|
|
2312
|
+
declare global {
|
|
2313
|
+
// eslint-disable-next-line no-var
|
|
2314
|
+
var __aerogelEvents__: AerogelGlobalEvents | undefined;
|
|
2315
|
+
}
|
|
2316
|
+
|
|
1989
2317
|
export interface AerogelOptions {
|
|
1990
2318
|
services?: Record<string, Service>;
|
|
1991
2319
|
}
|
|
@@ -1994,12 +2322,19 @@ declare module '@vue/runtime-core' {
|
|
|
1994
2322
|
interface ComponentCustomProperties extends Services {}
|
|
1995
2323
|
}
|
|
1996
2324
|
|
|
2325
|
+
declare global {
|
|
2326
|
+
// eslint-disable-next-line no-var
|
|
2327
|
+
var testingRuntime: AerogelTestingRuntime | undefined;
|
|
2328
|
+
}
|
|
2329
|
+
|
|
1997
2330
|
export interface EventsPayload {
|
|
1998
|
-
'modal-will-close': { modal: Modal; result?: unknown };
|
|
1999
|
-
'modal-closed': { modal: Modal; result?: unknown };
|
|
2000
2331
|
'close-modal': { id: string; result?: unknown };
|
|
2001
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 };
|
|
2002
2336
|
'show-modal': { id: string };
|
|
2337
|
+
'show-overlays-backdrop': void;
|
|
2003
2338
|
}
|
|
2004
2339
|
|
|
2005
2340
|
export interface AerogelOptions {
|