@aerogel/core 0.0.0-next.b85327579d32f21c6a9fa21142f0165cdd320d7e → 0.0.0-next.f16bd1d894543c5303039c49f6f33488a1ffe931
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 +304 -47
- package/dist/aerogel-core.esm.js +1 -1
- package/dist/aerogel-core.esm.js.map +1 -1
- package/dist/virtual.d.ts +11 -0
- package/noeldemartin.config.js +4 -1
- package/package.json +2 -2
- package/src/components/AGAppModals.vue +15 -0
- package/src/components/AGAppOverlays.vue +5 -7
- package/src/components/AGAppSnackbars.vue +13 -0
- package/src/components/basic/AGMarkdown.vue +7 -2
- package/src/components/constants.ts +8 -0
- package/src/components/forms/AGButton.vue +25 -15
- package/src/components/headless/index.ts +1 -0
- package/src/components/headless/snackbars/AGHeadlessSnackbar.vue +10 -0
- package/src/components/headless/snackbars/index.ts +25 -0
- package/src/components/index.ts +2 -0
- package/src/components/modals/AGConfirmModal.vue +1 -1
- package/src/components/modals/AGErrorReportModal.ts +20 -0
- package/src/components/modals/AGErrorReportModal.vue +62 -0
- package/src/components/modals/AGErrorReportModalButtons.vue +106 -0
- package/src/components/modals/AGErrorReportModalTitle.vue +25 -0
- package/src/components/modals/AGModal.vue +1 -1
- package/src/components/modals/index.ts +15 -2
- package/src/components/snackbars/AGSnackbar.vue +42 -0
- package/src/components/snackbars/index.ts +3 -0
- package/src/directives/index.ts +16 -3
- package/src/errors/Errors.ts +36 -7
- package/src/errors/index.ts +39 -1
- package/src/main.ts +0 -2
- package/src/services/App.state.ts +4 -1
- package/src/types/virtual.d.ts +11 -0
- package/src/ui/UI.state.ts +10 -1
- package/src/ui/UI.ts +37 -6
- package/src/ui/index.ts +4 -0
- package/src/utils/vue.ts +2 -0
- package/tsconfig.json +1 -0
- package/vite.config.ts +2 -1
- package/src/globals.ts +0 -6
package/dist/aerogel-core.d.ts
CHANGED
|
@@ -68,36 +68,23 @@ export declare const AGAppOverlays: DefineComponent< {}, (_ctx: any, _cache:
|
|
|
68
68
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
69
69
|
|
|
70
70
|
export declare const AGButton: DefineComponent< {
|
|
71
|
-
|
|
72
|
-
type: PropType<
|
|
71
|
+
color: {
|
|
72
|
+
type: PropType<"primary" | "secondary" | "danger" | "clear">;
|
|
73
73
|
validator?(value: unknown): boolean;
|
|
74
74
|
} & {
|
|
75
|
-
default:
|
|
76
|
-
};
|
|
77
|
-
secondary: {
|
|
78
|
-
type: PropType<boolean>;
|
|
79
|
-
validator?(value: unknown): boolean;
|
|
80
|
-
} & {
|
|
81
|
-
default: boolean | (() => boolean) | null;
|
|
75
|
+
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
82
76
|
};
|
|
83
77
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
84
78
|
[key: string]: any;
|
|
85
79
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
86
|
-
|
|
87
|
-
type: PropType<
|
|
80
|
+
color: {
|
|
81
|
+
type: PropType<"primary" | "secondary" | "danger" | "clear">;
|
|
88
82
|
validator?(value: unknown): boolean;
|
|
89
83
|
} & {
|
|
90
|
-
default:
|
|
91
|
-
};
|
|
92
|
-
secondary: {
|
|
93
|
-
type: PropType<boolean>;
|
|
94
|
-
validator?(value: unknown): boolean;
|
|
95
|
-
} & {
|
|
96
|
-
default: boolean | (() => boolean) | null;
|
|
84
|
+
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
97
85
|
};
|
|
98
86
|
}>>, {
|
|
99
|
-
|
|
100
|
-
secondary: boolean;
|
|
87
|
+
color: "primary" | "secondary" | "danger" | "clear";
|
|
101
88
|
}, {}>;
|
|
102
89
|
|
|
103
90
|
export declare const AGCheckbox: DefineComponent< {
|
|
@@ -152,6 +139,69 @@ required: true;
|
|
|
152
139
|
title: string | null;
|
|
153
140
|
}, {}>;
|
|
154
141
|
|
|
142
|
+
export declare const AGErrorReportModalButtons: DefineComponent< {
|
|
143
|
+
report: {
|
|
144
|
+
type: PropType<ErrorReport>;
|
|
145
|
+
validator?(value: unknown): boolean;
|
|
146
|
+
} & {
|
|
147
|
+
required: true;
|
|
148
|
+
};
|
|
149
|
+
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
150
|
+
[key: string]: any;
|
|
151
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
152
|
+
report: {
|
|
153
|
+
type: PropType<ErrorReport>;
|
|
154
|
+
validator?(value: unknown): boolean;
|
|
155
|
+
} & {
|
|
156
|
+
required: true;
|
|
157
|
+
};
|
|
158
|
+
}>>, {}, {}>;
|
|
159
|
+
|
|
160
|
+
export declare const AGErrorReportModalTitle: DefineComponent< {
|
|
161
|
+
report: {
|
|
162
|
+
type: PropType<ErrorReport>;
|
|
163
|
+
validator?(value: unknown): boolean;
|
|
164
|
+
} & {
|
|
165
|
+
required: true;
|
|
166
|
+
};
|
|
167
|
+
currentReport: {
|
|
168
|
+
type: PropType<number | null>;
|
|
169
|
+
validator?(value: unknown): boolean;
|
|
170
|
+
} & {
|
|
171
|
+
default: number | (() => number | null) | null;
|
|
172
|
+
};
|
|
173
|
+
totalReports: {
|
|
174
|
+
type: PropType<number | null>;
|
|
175
|
+
validator?(value: unknown): boolean;
|
|
176
|
+
} & {
|
|
177
|
+
default: number | (() => number | null) | null;
|
|
178
|
+
};
|
|
179
|
+
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
180
|
+
[key: string]: any;
|
|
181
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
182
|
+
report: {
|
|
183
|
+
type: PropType<ErrorReport>;
|
|
184
|
+
validator?(value: unknown): boolean;
|
|
185
|
+
} & {
|
|
186
|
+
required: true;
|
|
187
|
+
};
|
|
188
|
+
currentReport: {
|
|
189
|
+
type: PropType<number | null>;
|
|
190
|
+
validator?(value: unknown): boolean;
|
|
191
|
+
} & {
|
|
192
|
+
default: number | (() => number | null) | null;
|
|
193
|
+
};
|
|
194
|
+
totalReports: {
|
|
195
|
+
type: PropType<number | null>;
|
|
196
|
+
validator?(value: unknown): boolean;
|
|
197
|
+
} & {
|
|
198
|
+
default: number | (() => number | null) | null;
|
|
199
|
+
};
|
|
200
|
+
}>>, {
|
|
201
|
+
currentReport: number | null;
|
|
202
|
+
totalReports: number | null;
|
|
203
|
+
}, {}>;
|
|
204
|
+
|
|
155
205
|
export declare const AGForm: DefineComponent< {
|
|
156
206
|
form: {
|
|
157
207
|
type: PropType<Form<FormFieldDefinitions> | null>;
|
|
@@ -366,6 +416,10 @@ default: string | (() => string) | null;
|
|
|
366
416
|
as: string;
|
|
367
417
|
}, {}>;
|
|
368
418
|
|
|
419
|
+
export declare const AGHeadlessSnackbar: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
420
|
+
[key: string]: any;
|
|
421
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
422
|
+
|
|
369
423
|
export declare const AGInput: DefineComponent< {
|
|
370
424
|
name: {
|
|
371
425
|
type: PropType<string | null>;
|
|
@@ -413,29 +467,35 @@ validator?(value: unknown): boolean;
|
|
|
413
467
|
} & {
|
|
414
468
|
default: string | (() => string) | null;
|
|
415
469
|
};
|
|
416
|
-
|
|
417
|
-
type: PropType<
|
|
470
|
+
heading: {
|
|
471
|
+
type: PropType<boolean>;
|
|
418
472
|
validator?(value: unknown): boolean;
|
|
419
473
|
} & {
|
|
420
|
-
default:
|
|
474
|
+
default: boolean | (() => boolean) | null;
|
|
421
475
|
};
|
|
422
|
-
|
|
476
|
+
inline: {
|
|
477
|
+
type: PropType<boolean>;
|
|
478
|
+
validator?(value: unknown): boolean;
|
|
479
|
+
} & {
|
|
480
|
+
default: boolean | (() => boolean) | null;
|
|
481
|
+
};
|
|
482
|
+
langKey: {
|
|
423
483
|
type: PropType<string | null>;
|
|
424
484
|
validator?(value: unknown): boolean;
|
|
425
485
|
} & {
|
|
426
486
|
default: string | (() => string | null) | null;
|
|
427
487
|
};
|
|
428
|
-
|
|
488
|
+
raw: {
|
|
429
489
|
type: PropType<boolean>;
|
|
430
490
|
validator?(value: unknown): boolean;
|
|
431
491
|
} & {
|
|
432
492
|
default: boolean | (() => boolean) | null;
|
|
433
493
|
};
|
|
434
|
-
|
|
435
|
-
type: PropType<
|
|
494
|
+
text: {
|
|
495
|
+
type: PropType<string | null>;
|
|
436
496
|
validator?(value: unknown): boolean;
|
|
437
497
|
} & {
|
|
438
|
-
default:
|
|
498
|
+
default: string | (() => string | null) | null;
|
|
439
499
|
};
|
|
440
500
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
441
501
|
[key: string]: any;
|
|
@@ -446,36 +506,43 @@ validator?(value: unknown): boolean;
|
|
|
446
506
|
} & {
|
|
447
507
|
default: string | (() => string) | null;
|
|
448
508
|
};
|
|
449
|
-
|
|
450
|
-
type: PropType<
|
|
509
|
+
heading: {
|
|
510
|
+
type: PropType<boolean>;
|
|
451
511
|
validator?(value: unknown): boolean;
|
|
452
512
|
} & {
|
|
453
|
-
default:
|
|
513
|
+
default: boolean | (() => boolean) | null;
|
|
454
514
|
};
|
|
455
|
-
|
|
515
|
+
inline: {
|
|
516
|
+
type: PropType<boolean>;
|
|
517
|
+
validator?(value: unknown): boolean;
|
|
518
|
+
} & {
|
|
519
|
+
default: boolean | (() => boolean) | null;
|
|
520
|
+
};
|
|
521
|
+
langKey: {
|
|
456
522
|
type: PropType<string | null>;
|
|
457
523
|
validator?(value: unknown): boolean;
|
|
458
524
|
} & {
|
|
459
525
|
default: string | (() => string | null) | null;
|
|
460
526
|
};
|
|
461
|
-
|
|
527
|
+
raw: {
|
|
462
528
|
type: PropType<boolean>;
|
|
463
529
|
validator?(value: unknown): boolean;
|
|
464
530
|
} & {
|
|
465
531
|
default: boolean | (() => boolean) | null;
|
|
466
532
|
};
|
|
467
|
-
|
|
468
|
-
type: PropType<
|
|
533
|
+
text: {
|
|
534
|
+
type: PropType<string | null>;
|
|
469
535
|
validator?(value: unknown): boolean;
|
|
470
536
|
} & {
|
|
471
|
-
default:
|
|
537
|
+
default: string | (() => string | null) | null;
|
|
472
538
|
};
|
|
473
539
|
}>>, {
|
|
474
540
|
as: string;
|
|
475
|
-
|
|
476
|
-
text: string | null;
|
|
541
|
+
heading: boolean;
|
|
477
542
|
inline: boolean;
|
|
543
|
+
langKey: string | null;
|
|
478
544
|
raw: boolean;
|
|
545
|
+
text: string | null;
|
|
479
546
|
}, {}>;
|
|
480
547
|
|
|
481
548
|
export declare const AGModal: DefineComponent< {
|
|
@@ -528,6 +595,63 @@ required: true;
|
|
|
528
595
|
};
|
|
529
596
|
}>>, {}, {}>;
|
|
530
597
|
|
|
598
|
+
export declare const AGSnackbar: DefineComponent< {
|
|
599
|
+
id: {
|
|
600
|
+
type: PropType<string>;
|
|
601
|
+
validator?(value: unknown): boolean;
|
|
602
|
+
} & {
|
|
603
|
+
required: true;
|
|
604
|
+
};
|
|
605
|
+
message: {
|
|
606
|
+
type: PropType<string>;
|
|
607
|
+
validator?(value: unknown): boolean;
|
|
608
|
+
} & {
|
|
609
|
+
required: true;
|
|
610
|
+
};
|
|
611
|
+
actions: {
|
|
612
|
+
type: PropType<SnackbarAction[]>;
|
|
613
|
+
validator?(value: unknown): boolean;
|
|
614
|
+
} & {
|
|
615
|
+
default: SnackbarAction[] | (() => SnackbarAction[]) | null;
|
|
616
|
+
};
|
|
617
|
+
color: {
|
|
618
|
+
type: PropType<"secondary" | "danger">;
|
|
619
|
+
validator?(value: unknown): boolean;
|
|
620
|
+
} & {
|
|
621
|
+
default: "secondary" | "danger" | (() => "secondary" | "danger") | null;
|
|
622
|
+
};
|
|
623
|
+
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
624
|
+
[key: string]: any;
|
|
625
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
|
|
626
|
+
id: {
|
|
627
|
+
type: PropType<string>;
|
|
628
|
+
validator?(value: unknown): boolean;
|
|
629
|
+
} & {
|
|
630
|
+
required: true;
|
|
631
|
+
};
|
|
632
|
+
message: {
|
|
633
|
+
type: PropType<string>;
|
|
634
|
+
validator?(value: unknown): boolean;
|
|
635
|
+
} & {
|
|
636
|
+
required: true;
|
|
637
|
+
};
|
|
638
|
+
actions: {
|
|
639
|
+
type: PropType<SnackbarAction[]>;
|
|
640
|
+
validator?(value: unknown): boolean;
|
|
641
|
+
} & {
|
|
642
|
+
default: SnackbarAction[] | (() => SnackbarAction[]) | null;
|
|
643
|
+
};
|
|
644
|
+
color: {
|
|
645
|
+
type: PropType<"secondary" | "danger">;
|
|
646
|
+
validator?(value: unknown): boolean;
|
|
647
|
+
} & {
|
|
648
|
+
default: "secondary" | "danger" | (() => "secondary" | "danger") | null;
|
|
649
|
+
};
|
|
650
|
+
}>>, {
|
|
651
|
+
actions: SnackbarAction[];
|
|
652
|
+
color: "secondary" | "danger";
|
|
653
|
+
}, {}>;
|
|
654
|
+
|
|
531
655
|
export declare const App: Facade<AppService, Constructor<AppService>>;
|
|
532
656
|
|
|
533
657
|
export declare class AppService extends _default_2 {
|
|
@@ -549,6 +673,17 @@ export declare function bootServices(app: App_2, services: Record<string, Servic
|
|
|
549
673
|
|
|
550
674
|
export declare function bootstrapApplication(rootComponent: Component, options?: AerogelOptions): Promise<void>;
|
|
551
675
|
|
|
676
|
+
export declare type Color = (typeof Colors)[keyof typeof Colors];
|
|
677
|
+
|
|
678
|
+
export declare const Colors: {
|
|
679
|
+
readonly Primary: "primary";
|
|
680
|
+
readonly Secondary: "secondary";
|
|
681
|
+
readonly Danger: "danger";
|
|
682
|
+
readonly Clear: "clear";
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
export declare type ComponentProps = Record<string, unknown>;
|
|
686
|
+
|
|
552
687
|
export declare function componentRef<T>(): Ref<UnwrapNestedRefs<T> | undefined>;
|
|
553
688
|
|
|
554
689
|
export declare type ComputedStateDefinition<TState extends ServiceState, TComputedState extends ServiceState> = {
|
|
@@ -564,19 +699,48 @@ startupErrors: ErrorReport[];
|
|
|
564
699
|
hasErrors: boolean;
|
|
565
700
|
hasNewErrors: boolean;
|
|
566
701
|
hasStartupErrors: boolean;
|
|
567
|
-
}> & Constructor<Service<
|
|
702
|
+
}> & Constructor<Service< {
|
|
703
|
+
logs: ErrorReportLog[];
|
|
704
|
+
startupErrors: ErrorReport[];
|
|
705
|
+
}, {
|
|
706
|
+
hasErrors: boolean;
|
|
707
|
+
hasNewErrors: boolean;
|
|
708
|
+
hasStartupErrors: boolean;
|
|
709
|
+
}, Partial<{
|
|
710
|
+
logs: ErrorReportLog[];
|
|
711
|
+
startupErrors: ErrorReport[];
|
|
712
|
+
}>>>;
|
|
568
713
|
|
|
569
714
|
declare const _default_2: Constructor< {
|
|
570
715
|
environment: "production" | "development" | "testing";
|
|
716
|
+
sourceUrl: string | undefined;
|
|
571
717
|
isMounted: boolean;
|
|
572
718
|
}> & Constructor< {
|
|
573
719
|
isDevelopment: boolean;
|
|
574
720
|
isTesting: boolean;
|
|
575
|
-
}> & Constructor<Service<
|
|
721
|
+
}> & Constructor<Service< {
|
|
722
|
+
environment: "production" | "development" | "testing";
|
|
723
|
+
sourceUrl: string | undefined;
|
|
724
|
+
isMounted: boolean;
|
|
725
|
+
}, {
|
|
726
|
+
isDevelopment: boolean;
|
|
727
|
+
isTesting: boolean;
|
|
728
|
+
}, Partial<{
|
|
729
|
+
environment: "production" | "development" | "testing";
|
|
730
|
+
sourceUrl: string | undefined;
|
|
731
|
+
isMounted: boolean;
|
|
732
|
+
}>>>;
|
|
576
733
|
|
|
577
734
|
declare const _default_3: Constructor< {
|
|
578
735
|
modals: Modal<unknown>[];
|
|
579
|
-
|
|
736
|
+
snackbars: Snackbar[];
|
|
737
|
+
}> & Constructor< {}> & Constructor<Service< {
|
|
738
|
+
modals: Modal<unknown>[];
|
|
739
|
+
snackbars: Snackbar[];
|
|
740
|
+
}, {}, Partial<{
|
|
741
|
+
modals: Modal<unknown>[];
|
|
742
|
+
snackbars: Snackbar[];
|
|
743
|
+
}>>>;
|
|
580
744
|
|
|
581
745
|
export declare type DefaultServices = typeof defaultServices;
|
|
582
746
|
|
|
@@ -601,6 +765,8 @@ export declare function defineServiceState<State extends ServiceState = ServiceS
|
|
|
601
765
|
|
|
602
766
|
export declare function enumProp<Enum extends Record<string, unknown>>(enumeration: Enum, defaultValue?: Enum[keyof Enum]): OptionalProp<Enum[keyof Enum]>;
|
|
603
767
|
|
|
768
|
+
export declare type ErrorHandler = (error: ErrorSource) => boolean;
|
|
769
|
+
|
|
604
770
|
export declare interface ErrorReport {
|
|
605
771
|
title: string;
|
|
606
772
|
description?: string;
|
|
@@ -614,6 +780,15 @@ export declare interface ErrorReportLog {
|
|
|
614
780
|
date: Date;
|
|
615
781
|
}
|
|
616
782
|
|
|
783
|
+
export declare const errorReportModalProps: {
|
|
784
|
+
reports: {
|
|
785
|
+
type: PropType<ErrorReport[]>;
|
|
786
|
+
validator?(value: unknown): boolean;
|
|
787
|
+
} & {
|
|
788
|
+
required: true;
|
|
789
|
+
};
|
|
790
|
+
};
|
|
791
|
+
|
|
617
792
|
export declare const Errors: Facade<ErrorsService, Constructor<ErrorsService>>;
|
|
618
793
|
|
|
619
794
|
export declare type ErrorSource = string | Error | JSError | unknown;
|
|
@@ -716,6 +891,14 @@ export declare const FormFieldTypes: {
|
|
|
716
891
|
|
|
717
892
|
export declare type GetFormFieldValue<TType> = TType extends typeof FormFieldTypes.String ? string : TType extends typeof FormFieldTypes.Number ? number : TType extends typeof FormFieldTypes.Boolean ? boolean : never;
|
|
718
893
|
|
|
894
|
+
export declare interface IAGErrorReportModalButtonsDefaultSlotProps {
|
|
895
|
+
id: string;
|
|
896
|
+
description: string;
|
|
897
|
+
iconComponent: Component;
|
|
898
|
+
url?: string;
|
|
899
|
+
handler?(): void;
|
|
900
|
+
}
|
|
901
|
+
|
|
719
902
|
export declare interface IAGHeadlessInput {
|
|
720
903
|
id: string;
|
|
721
904
|
value: ComputedRef<string | number | boolean | null>;
|
|
@@ -731,6 +914,15 @@ export declare interface IAGModal {
|
|
|
731
914
|
close(): Promise<void>;
|
|
732
915
|
}
|
|
733
916
|
|
|
917
|
+
export declare interface IAGModalContext {
|
|
918
|
+
modal: Ref<Modal>;
|
|
919
|
+
childIndex: Ref<number>;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
export declare interface IAGModalDefaultSlotProps {
|
|
923
|
+
close(result?: unknown): Promise<void>;
|
|
924
|
+
}
|
|
925
|
+
|
|
734
926
|
export declare function injectOrFail<T>(key: InjectionKey<T> | string, errorMessage?: string): T;
|
|
735
927
|
|
|
736
928
|
export declare function injectReactive<T extends object>(key: InjectionKey<T> | string): UnwrapNestedRefs<T> | undefined;
|
|
@@ -859,6 +1051,60 @@ declare const services_3: {
|
|
|
859
1051
|
|
|
860
1052
|
export declare type ServiceState = Record<string, any>;
|
|
861
1053
|
|
|
1054
|
+
declare interface ShowSnackbarOptions {
|
|
1055
|
+
component?: Component;
|
|
1056
|
+
color?: SnackbarColor;
|
|
1057
|
+
actions?: SnackbarAction[];
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
declare interface Snackbar {
|
|
1061
|
+
id: string;
|
|
1062
|
+
component: Component;
|
|
1063
|
+
properties: Record<string, unknown>;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
export declare interface SnackbarAction {
|
|
1067
|
+
text: string;
|
|
1068
|
+
dismiss?: boolean;
|
|
1069
|
+
handler?(): unknown;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export declare type SnackbarColor = (typeof SnackbarColors)[keyof typeof SnackbarColors];
|
|
1073
|
+
|
|
1074
|
+
export declare const SnackbarColors: Omit<{
|
|
1075
|
+
readonly Primary: "primary";
|
|
1076
|
+
readonly Secondary: "secondary";
|
|
1077
|
+
readonly Danger: "danger";
|
|
1078
|
+
readonly Clear: "clear";
|
|
1079
|
+
}, "Primary" | "Clear">;
|
|
1080
|
+
|
|
1081
|
+
export declare const snackbarProps: {
|
|
1082
|
+
id: {
|
|
1083
|
+
type: PropType<string>;
|
|
1084
|
+
validator?(value: unknown): boolean;
|
|
1085
|
+
} & {
|
|
1086
|
+
required: true;
|
|
1087
|
+
};
|
|
1088
|
+
message: {
|
|
1089
|
+
type: PropType<string>;
|
|
1090
|
+
validator?(value: unknown): boolean;
|
|
1091
|
+
} & {
|
|
1092
|
+
required: true;
|
|
1093
|
+
};
|
|
1094
|
+
actions: {
|
|
1095
|
+
type: PropType<SnackbarAction[]>;
|
|
1096
|
+
validator?(value: unknown): boolean;
|
|
1097
|
+
} & {
|
|
1098
|
+
default: SnackbarAction[] | (() => SnackbarAction[]) | null;
|
|
1099
|
+
};
|
|
1100
|
+
color: {
|
|
1101
|
+
type: PropType<"secondary" | "danger">;
|
|
1102
|
+
validator?(value: unknown): boolean;
|
|
1103
|
+
} & {
|
|
1104
|
+
default: "secondary" | "danger" | (() => "secondary" | "danger") | null;
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
|
|
862
1108
|
export declare function stringInput(defaultValue?: string): FormFieldDefinition<typeof FormFieldTypes.String>;
|
|
863
1109
|
|
|
864
1110
|
export declare function stringProp(): OptionalProp<string | null>;
|
|
@@ -879,23 +1125,27 @@ export declare type UIComponent = ObjectValues<typeof UIComponents>;
|
|
|
879
1125
|
export declare const UIComponents: {
|
|
880
1126
|
readonly AlertModal: "alert-modal";
|
|
881
1127
|
readonly ConfirmModal: "confirm-modal";
|
|
1128
|
+
readonly ErrorReportModal: "error-report-modal";
|
|
882
1129
|
readonly LoadingModal: "loading-modal";
|
|
1130
|
+
readonly Snackbar: "snackbar";
|
|
883
1131
|
};
|
|
884
1132
|
|
|
885
1133
|
declare class UIService extends _default_3 {
|
|
886
1134
|
private modalCallbacks;
|
|
887
1135
|
private components;
|
|
1136
|
+
requireComponent(name: UIComponent): Component;
|
|
888
1137
|
alert(message: string): void;
|
|
889
1138
|
alert(title: string, message: string): void;
|
|
890
1139
|
confirm(message: string): Promise<boolean>;
|
|
891
1140
|
confirm(title: string, message: string): Promise<boolean>;
|
|
892
1141
|
loading<T>(operation: Promise<T>): Promise<T>;
|
|
893
1142
|
loading<T>(message: string, operation: Promise<T>): Promise<T>;
|
|
1143
|
+
showSnackbar(message: string, options?: ShowSnackbarOptions): void;
|
|
1144
|
+
hideSnackbar(id: string): void;
|
|
894
1145
|
registerComponent(name: UIComponent, component: Component): void;
|
|
895
1146
|
openModal<TModalComponent extends ModalComponent>(component: TModalComponent, properties?: ModalProperties<TModalComponent>): Promise<Modal<ModalResult<TModalComponent>>>;
|
|
896
1147
|
closeModal(id: string, result?: unknown): Promise<void>;
|
|
897
1148
|
protected boot(): Promise<void>;
|
|
898
|
-
private requireComponent;
|
|
899
1149
|
private watchModalEvents;
|
|
900
1150
|
}
|
|
901
1151
|
|
|
@@ -903,6 +1153,8 @@ export declare type UIServices = typeof services_3;
|
|
|
903
1153
|
|
|
904
1154
|
export declare type UnknownEvent<T> = T extends keyof EventsPayload ? never : T;
|
|
905
1155
|
|
|
1156
|
+
export declare function useErrorReportModalProps(): typeof errorReportModalProps;
|
|
1157
|
+
|
|
906
1158
|
export declare function useEvent<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): void;
|
|
907
1159
|
|
|
908
1160
|
export declare function useEvent<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): void;
|
|
@@ -913,14 +1165,19 @@ export declare function useForm<const T extends FormFieldDefinitions>(fields: T)
|
|
|
913
1165
|
|
|
914
1166
|
export declare function useInputAttrs(): [ComputedRef<{}>, ComputedRef<unknown>];
|
|
915
1167
|
|
|
1168
|
+
export declare function useSnackbarProps(): typeof snackbarProps;
|
|
1169
|
+
|
|
916
1170
|
export { }
|
|
917
1171
|
|
|
918
|
-
|
|
1172
|
+
interface AerogelOptions {
|
|
1173
|
+
directives?: Record<string, Directive>;
|
|
1174
|
+
}
|
|
919
1175
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
1176
|
+
interface AerogelOptions {
|
|
1177
|
+
handleError?(error: ErrorSource): boolean;
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
export interface Services extends ErrorsServices {}
|
|
924
1181
|
|
|
925
1182
|
export interface Services extends LangServices {}
|
|
926
1183
|
|