@aerogel/core 0.0.0-next.6c539d8e63b397d4bb6c3d61a7f20a4d108b1cdd → 0.0.0-next.7035064d9ec6a82a936ee8dfcc4b58ed2e25a399
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 +328 -72
- package/dist/aerogel-core.esm.js +1 -1
- package/dist/aerogel-core.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/bootstrap/index.ts +12 -2
- package/src/components/headless/modals/AGHeadlessModal.ts +3 -1
- package/src/components/headless/modals/AGHeadlessModal.vue +10 -4
- package/src/components/headless/modals/AGHeadlessModalPanel.vue +10 -6
- package/src/components/headless/modals/AGHeadlessModalTitle.vue +14 -4
- package/src/components/lib/AGMarkdown.vue +14 -1
- package/src/components/lib/AGProgressBar.vue +30 -0
- package/src/components/lib/index.ts +1 -0
- package/src/components/modals/AGAlertModal.ts +5 -2
- package/src/components/modals/AGConfirmModal.ts +13 -5
- package/src/components/modals/AGConfirmModal.vue +1 -1
- package/src/components/modals/AGErrorReportModal.ts +5 -2
- package/src/components/modals/AGLoadingModal.ts +10 -4
- package/src/components/modals/AGModal.ts +1 -0
- package/src/components/modals/AGModalContext.vue +14 -4
- package/src/components/modals/AGPromptModal.ts +9 -4
- package/src/errors/JobCancelledError.ts +3 -0
- package/src/errors/utils.ts +16 -0
- package/src/forms/Form.ts +10 -3
- package/src/forms/index.ts +2 -1
- package/src/forms/utils.ts +20 -4
- package/src/forms/validation.ts +19 -0
- package/src/jobs/Job.ts +144 -2
- package/src/jobs/index.ts +4 -1
- package/src/jobs/listeners.ts +3 -0
- package/src/jobs/status.ts +4 -0
- package/src/services/App.state.ts +9 -1
- package/src/services/App.ts +5 -0
- package/src/services/Events.ts +13 -3
- package/src/services/Service.ts +107 -44
- package/src/services/Storage.ts +20 -0
- package/src/services/index.ts +7 -2
- package/src/services/utils.ts +18 -0
- package/src/testing/setup.ts +11 -3
- package/src/ui/UI.ts +108 -38
- package/src/utils/composition/persistent.test.ts +33 -0
- package/src/utils/composition/persistent.ts +11 -0
- package/src/utils/composition/state.test.ts +47 -0
- package/src/utils/composition/state.ts +24 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/markdown.test.ts +50 -0
- package/src/utils/markdown.ts +17 -2
- package/src/utils/vue.ts +4 -1
package/dist/aerogel-core.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { App as App_2 } from 'vue';
|
|
|
3
3
|
import type { Component } from 'vue';
|
|
4
4
|
import { ComponentOptionsMixin } from 'vue';
|
|
5
5
|
import { ComputedRef } from 'vue';
|
|
6
|
-
import { Constructor } from '@noeldemartin/utils';
|
|
6
|
+
import type { Constructor } from '@noeldemartin/utils';
|
|
7
7
|
import type { DeepReadonly } from 'vue';
|
|
8
8
|
import { DefineComponent } from 'vue';
|
|
9
9
|
import type { DefineStoreOptions } from 'pinia';
|
|
@@ -14,11 +14,15 @@ import type { GetClosureArgs } from '@noeldemartin/utils';
|
|
|
14
14
|
import type { _GettersTree } from 'pinia';
|
|
15
15
|
import type { InjectionKey } from 'vue';
|
|
16
16
|
import type { JSError } from '@noeldemartin/utils';
|
|
17
|
+
import type { Listeners } from '@noeldemartin/utils';
|
|
18
|
+
import { ListenersManager } from '@noeldemartin/utils';
|
|
17
19
|
import { MagicObject } from '@noeldemartin/utils';
|
|
18
20
|
import type { MaybeRef } from 'vue';
|
|
19
21
|
import type { ObjectValues } from '@noeldemartin/utils';
|
|
22
|
+
import type { ObjectWithout } from '@noeldemartin/utils';
|
|
20
23
|
import type { ObjectWithoutEmpty } from '@noeldemartin/utils';
|
|
21
24
|
import type { Pinia } from 'pinia';
|
|
25
|
+
import type { Pretty } from '@noeldemartin/utils';
|
|
22
26
|
import { PromisedValue } from '@noeldemartin/utils';
|
|
23
27
|
import { PropType } from 'vue';
|
|
24
28
|
import { PublicProps } from 'vue';
|
|
@@ -36,6 +40,10 @@ export declare interface __SetsElement {
|
|
|
36
40
|
__setElement(element?: HTMLElement): void;
|
|
37
41
|
}
|
|
38
42
|
|
|
43
|
+
export declare type AcceptRefs<T> = {
|
|
44
|
+
[K in keyof T]: T[K] | RefUnion<T[K]>;
|
|
45
|
+
};
|
|
46
|
+
|
|
39
47
|
export declare type AerogelGlobalEvents = Partial<{
|
|
40
48
|
[Event in EventWithoutPayload]: () => unknown;
|
|
41
49
|
}> & Partial<{
|
|
@@ -83,7 +91,7 @@ required: true;
|
|
|
83
91
|
title: string | null;
|
|
84
92
|
}, {}>;
|
|
85
93
|
|
|
86
|
-
export declare type AGAlertModalProps =
|
|
94
|
+
export declare type AGAlertModalProps = Pretty<AcceptRefs<ObjectWithout<ExtractPropTypes<typeof alertModalProps>, null | undefined>>>;
|
|
87
95
|
|
|
88
96
|
export declare const AGAppLayout: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
89
97
|
[key: string]: any;
|
|
@@ -172,6 +180,18 @@ validator?(value: unknown): boolean;
|
|
|
172
180
|
} & {
|
|
173
181
|
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
174
182
|
};
|
|
183
|
+
checkboxes: {
|
|
184
|
+
type?: PropType<ConfirmCheckboxes | null> | undefined;
|
|
185
|
+
validator?(value: unknown): boolean;
|
|
186
|
+
} & {
|
|
187
|
+
default: ConfirmCheckboxes | (() => ConfirmCheckboxes | null) | null;
|
|
188
|
+
};
|
|
189
|
+
actions: {
|
|
190
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
191
|
+
validator?(value: unknown): boolean;
|
|
192
|
+
} & {
|
|
193
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
194
|
+
};
|
|
175
195
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
176
196
|
[key: string]: any;
|
|
177
197
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -211,15 +231,29 @@ validator?(value: unknown): boolean;
|
|
|
211
231
|
} & {
|
|
212
232
|
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
213
233
|
};
|
|
234
|
+
checkboxes: {
|
|
235
|
+
type?: PropType<ConfirmCheckboxes | null> | undefined;
|
|
236
|
+
validator?(value: unknown): boolean;
|
|
237
|
+
} & {
|
|
238
|
+
default: ConfirmCheckboxes | (() => ConfirmCheckboxes | null) | null;
|
|
239
|
+
};
|
|
240
|
+
actions: {
|
|
241
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
242
|
+
validator?(value: unknown): boolean;
|
|
243
|
+
} & {
|
|
244
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
245
|
+
};
|
|
214
246
|
}>>, {
|
|
215
247
|
title: string | null;
|
|
216
248
|
acceptText: string | null;
|
|
217
249
|
acceptColor: "primary" | "secondary" | "danger" | "clear";
|
|
218
250
|
cancelText: string | null;
|
|
219
251
|
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
252
|
+
checkboxes: ConfirmCheckboxes | null;
|
|
253
|
+
actions: Record<string, () => unknown> | null;
|
|
220
254
|
}, {}>;
|
|
221
255
|
|
|
222
|
-
export declare type AGConfirmModalProps = SubPartial<
|
|
256
|
+
export declare type AGConfirmModalProps = Pretty<AcceptRefs<SubPartial<ObjectWithout<ExtractPropTypes<typeof confirmModalProps>, null | undefined>, 'acceptColor' | 'cancelColor'>>>;
|
|
223
257
|
|
|
224
258
|
export declare const AGErrorMessage: DefineComponent< {
|
|
225
259
|
error: {
|
|
@@ -257,7 +291,7 @@ required: true;
|
|
|
257
291
|
};
|
|
258
292
|
}>>, {}, {}>;
|
|
259
293
|
|
|
260
|
-
export declare type AGErrorReportModalProps =
|
|
294
|
+
export declare type AGErrorReportModalProps = Pretty<AcceptRefs<ObjectWithout<ExtractPropTypes<typeof errorReportModalProps>, null | undefined>>>;
|
|
261
295
|
|
|
262
296
|
export declare const AGErrorReportModalTitle: DefineComponent< {
|
|
263
297
|
report: {
|
|
@@ -541,6 +575,12 @@ validator?(value: unknown): boolean;
|
|
|
541
575
|
} & {
|
|
542
576
|
default: boolean | (() => boolean) | null;
|
|
543
577
|
};
|
|
578
|
+
inline: {
|
|
579
|
+
type?: PropType<boolean> | undefined;
|
|
580
|
+
validator?(value: unknown): boolean;
|
|
581
|
+
} & {
|
|
582
|
+
default: boolean | (() => boolean) | null;
|
|
583
|
+
};
|
|
544
584
|
title: {
|
|
545
585
|
type?: PropType<string | null> | undefined;
|
|
546
586
|
validator?(value: unknown): boolean;
|
|
@@ -556,6 +596,12 @@ validator?(value: unknown): boolean;
|
|
|
556
596
|
} & {
|
|
557
597
|
default: boolean | (() => boolean) | null;
|
|
558
598
|
};
|
|
599
|
+
inline: {
|
|
600
|
+
type?: PropType<boolean> | undefined;
|
|
601
|
+
validator?(value: unknown): boolean;
|
|
602
|
+
} & {
|
|
603
|
+
default: boolean | (() => boolean) | null;
|
|
604
|
+
};
|
|
559
605
|
title: {
|
|
560
606
|
type?: PropType<string | null> | undefined;
|
|
561
607
|
validator?(value: unknown): boolean;
|
|
@@ -564,6 +610,7 @@ default: string | (() => string | null) | null;
|
|
|
564
610
|
};
|
|
565
611
|
}>>, {
|
|
566
612
|
cancellable: boolean;
|
|
613
|
+
inline: boolean;
|
|
567
614
|
title: string | null;
|
|
568
615
|
}, {}>;
|
|
569
616
|
|
|
@@ -846,26 +893,52 @@ export declare const AGLink: DefineComponent< {}, (_ctx: any, _cache: any) =>
|
|
|
846
893
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
847
894
|
|
|
848
895
|
export declare const AGLoadingModal: DefineComponent< {
|
|
896
|
+
title: {
|
|
897
|
+
type?: PropType<string | null> | undefined;
|
|
898
|
+
validator?(value: unknown): boolean;
|
|
899
|
+
} & {
|
|
900
|
+
default: string | (() => string | null) | null;
|
|
901
|
+
};
|
|
849
902
|
message: {
|
|
850
903
|
type?: PropType<string | null> | undefined;
|
|
851
904
|
validator?(value: unknown): boolean;
|
|
852
905
|
} & {
|
|
853
906
|
default: string | (() => string | null) | null;
|
|
854
907
|
};
|
|
908
|
+
progress: {
|
|
909
|
+
type?: PropType<number | null> | undefined;
|
|
910
|
+
validator?(value: unknown): boolean;
|
|
911
|
+
} & {
|
|
912
|
+
default: number | (() => number | null) | null;
|
|
913
|
+
};
|
|
855
914
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
856
915
|
[key: string]: any;
|
|
857
916
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
917
|
+
title: {
|
|
918
|
+
type?: PropType<string | null> | undefined;
|
|
919
|
+
validator?(value: unknown): boolean;
|
|
920
|
+
} & {
|
|
921
|
+
default: string | (() => string | null) | null;
|
|
922
|
+
};
|
|
858
923
|
message: {
|
|
859
924
|
type?: PropType<string | null> | undefined;
|
|
860
925
|
validator?(value: unknown): boolean;
|
|
861
926
|
} & {
|
|
862
927
|
default: string | (() => string | null) | null;
|
|
863
928
|
};
|
|
929
|
+
progress: {
|
|
930
|
+
type?: PropType<number | null> | undefined;
|
|
931
|
+
validator?(value: unknown): boolean;
|
|
932
|
+
} & {
|
|
933
|
+
default: number | (() => number | null) | null;
|
|
934
|
+
};
|
|
864
935
|
}>>, {
|
|
936
|
+
title: string | null;
|
|
865
937
|
message: string | null;
|
|
938
|
+
progress: number | null;
|
|
866
939
|
}, {}>;
|
|
867
940
|
|
|
868
|
-
export declare type AGLoadingModalProps =
|
|
941
|
+
export declare type AGLoadingModalProps = AcceptRefs<ObjectWithout<ExtractPropTypes<typeof loadingModalProps>, null | undefined>>;
|
|
869
942
|
|
|
870
943
|
export declare const AGMarkdown: DefineComponent< {
|
|
871
944
|
as: {
|
|
@@ -898,6 +971,12 @@ validator?(value: unknown): boolean;
|
|
|
898
971
|
} & {
|
|
899
972
|
default: string | (() => string | null) | null;
|
|
900
973
|
};
|
|
974
|
+
actions: {
|
|
975
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
976
|
+
validator?(value: unknown): boolean;
|
|
977
|
+
} & {
|
|
978
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
979
|
+
};
|
|
901
980
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
902
981
|
[key: string]: any;
|
|
903
982
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -931,12 +1010,19 @@ validator?(value: unknown): boolean;
|
|
|
931
1010
|
} & {
|
|
932
1011
|
default: string | (() => string | null) | null;
|
|
933
1012
|
};
|
|
1013
|
+
actions: {
|
|
1014
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
1015
|
+
validator?(value: unknown): boolean;
|
|
1016
|
+
} & {
|
|
1017
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
1018
|
+
};
|
|
934
1019
|
}>>, {
|
|
935
1020
|
as: string | null;
|
|
936
1021
|
inline: boolean;
|
|
937
1022
|
langKey: string | null;
|
|
938
1023
|
langParams: number | Record<string, unknown> | null;
|
|
939
1024
|
text: string | null;
|
|
1025
|
+
actions: Record<string, () => unknown> | null;
|
|
940
1026
|
}, {}>;
|
|
941
1027
|
|
|
942
1028
|
export declare const AGMeasured: DefineComponent< {
|
|
@@ -966,6 +1052,12 @@ validator?(value: unknown): boolean;
|
|
|
966
1052
|
} & {
|
|
967
1053
|
default: boolean | (() => boolean) | null;
|
|
968
1054
|
};
|
|
1055
|
+
inline: {
|
|
1056
|
+
type?: PropType<boolean> | undefined;
|
|
1057
|
+
validator?(value: unknown): boolean;
|
|
1058
|
+
} & {
|
|
1059
|
+
default: boolean | (() => boolean) | null;
|
|
1060
|
+
};
|
|
969
1061
|
title: {
|
|
970
1062
|
type?: PropType<string | null> | undefined;
|
|
971
1063
|
validator?(value: unknown): boolean;
|
|
@@ -981,6 +1073,12 @@ validator?(value: unknown): boolean;
|
|
|
981
1073
|
} & {
|
|
982
1074
|
default: boolean | (() => boolean) | null;
|
|
983
1075
|
};
|
|
1076
|
+
inline: {
|
|
1077
|
+
type?: PropType<boolean> | undefined;
|
|
1078
|
+
validator?(value: unknown): boolean;
|
|
1079
|
+
} & {
|
|
1080
|
+
default: boolean | (() => boolean) | null;
|
|
1081
|
+
};
|
|
984
1082
|
title: {
|
|
985
1083
|
type?: PropType<string | null> | undefined;
|
|
986
1084
|
validator?(value: unknown): boolean;
|
|
@@ -989,6 +1087,7 @@ default: string | (() => string | null) | null;
|
|
|
989
1087
|
};
|
|
990
1088
|
}>>, {
|
|
991
1089
|
cancellable: boolean;
|
|
1090
|
+
inline: boolean;
|
|
992
1091
|
title: string | null;
|
|
993
1092
|
}, {}>;
|
|
994
1093
|
|
|
@@ -1003,7 +1102,7 @@ childIndex: {
|
|
|
1003
1102
|
type?: PropType<number> | undefined;
|
|
1004
1103
|
validator?(value: unknown): boolean;
|
|
1005
1104
|
} & {
|
|
1006
|
-
|
|
1105
|
+
default: number | (() => number) | null;
|
|
1007
1106
|
};
|
|
1008
1107
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1009
1108
|
[key: string]: any;
|
|
@@ -1018,14 +1117,48 @@ childIndex: {
|
|
|
1018
1117
|
type?: PropType<number> | undefined;
|
|
1019
1118
|
validator?(value: unknown): boolean;
|
|
1020
1119
|
} & {
|
|
1021
|
-
|
|
1120
|
+
default: number | (() => number) | null;
|
|
1022
1121
|
};
|
|
1023
|
-
}>>, {
|
|
1122
|
+
}>>, {
|
|
1123
|
+
childIndex: number;
|
|
1124
|
+
}, {}>;
|
|
1024
1125
|
|
|
1025
1126
|
export declare const AGModalTitle: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1026
1127
|
[key: string]: any;
|
|
1027
1128
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
1028
1129
|
|
|
1130
|
+
export declare const AGProgressBar: DefineComponent< {
|
|
1131
|
+
progress: {
|
|
1132
|
+
type?: PropType<number> | undefined;
|
|
1133
|
+
validator?(value: unknown): boolean;
|
|
1134
|
+
} & {
|
|
1135
|
+
required: true;
|
|
1136
|
+
};
|
|
1137
|
+
class: {
|
|
1138
|
+
type?: PropType<string> | undefined;
|
|
1139
|
+
validator?(value: unknown): boolean;
|
|
1140
|
+
} & {
|
|
1141
|
+
default: string | (() => string) | null;
|
|
1142
|
+
};
|
|
1143
|
+
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1144
|
+
[key: string]: any;
|
|
1145
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1146
|
+
progress: {
|
|
1147
|
+
type?: PropType<number> | undefined;
|
|
1148
|
+
validator?(value: unknown): boolean;
|
|
1149
|
+
} & {
|
|
1150
|
+
required: true;
|
|
1151
|
+
};
|
|
1152
|
+
class: {
|
|
1153
|
+
type?: PropType<string> | undefined;
|
|
1154
|
+
validator?(value: unknown): boolean;
|
|
1155
|
+
} & {
|
|
1156
|
+
default: string | (() => string) | null;
|
|
1157
|
+
};
|
|
1158
|
+
}>>, {
|
|
1159
|
+
class: string;
|
|
1160
|
+
}, {}>;
|
|
1161
|
+
|
|
1029
1162
|
export declare const AGPromptModal: DefineComponent< {
|
|
1030
1163
|
title: {
|
|
1031
1164
|
type?: PropType<string | null> | undefined;
|
|
@@ -1149,7 +1282,7 @@ cancelText: string | null;
|
|
|
1149
1282
|
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
1150
1283
|
}, {}>;
|
|
1151
1284
|
|
|
1152
|
-
export declare type AGPromptModalProps = SubPartial<
|
|
1285
|
+
export declare type AGPromptModalProps = Pretty<AcceptRefs<SubPartial<ObjectWithout<ExtractPropTypes<typeof promptModalProps>, null | undefined>, 'acceptColor' | 'cancelColor'>>>;
|
|
1153
1286
|
|
|
1154
1287
|
export declare const AGSelect: DefineComponent< {
|
|
1155
1288
|
name: {
|
|
@@ -1313,6 +1446,7 @@ export declare class AppService extends _default_3 {
|
|
|
1313
1446
|
whenReady<T>(callback: () => T): Promise<T>;
|
|
1314
1447
|
reload(queryParameters?: Record<string, string | undefined>): Promise<void>;
|
|
1315
1448
|
plugin<T extends Plugin_2 = Plugin_2>(name: string): T | null;
|
|
1449
|
+
service<T extends keyof Services>(name: T): Services[T] | null;
|
|
1316
1450
|
protected boot(): Promise<void>;
|
|
1317
1451
|
}
|
|
1318
1452
|
|
|
@@ -1323,7 +1457,9 @@ declare type BaseProp<T> = {
|
|
|
1323
1457
|
validator?(value: unknown): boolean;
|
|
1324
1458
|
};
|
|
1325
1459
|
|
|
1326
|
-
export declare function booleanInput(defaultValue?: boolean
|
|
1460
|
+
export declare function booleanInput(defaultValue?: boolean, options?: {
|
|
1461
|
+
rules?: string;
|
|
1462
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
|
|
1327
1463
|
|
|
1328
1464
|
export declare function booleanProp(defaultValue?: boolean): OptionalProp<boolean>;
|
|
1329
1465
|
|
|
@@ -1360,11 +1496,17 @@ export declare function componentRef<T>(): Ref<UnwrapNestedRefs<T> | undefined>;
|
|
|
1360
1496
|
export declare function computedAsync<T>(getter: () => Promise<T>): Ref<T | undefined>;
|
|
1361
1497
|
|
|
1362
1498
|
export declare type ComputedStateDefinition<TState extends ServiceState, TComputedState extends ServiceState> = {
|
|
1363
|
-
[K in keyof TComputedState]: (state:
|
|
1499
|
+
[K in keyof TComputedState]: (state: Unref<TState>) => TComputedState[K];
|
|
1364
1500
|
} & ThisType<{
|
|
1365
1501
|
readonly [K in keyof TComputedState]: TComputedState[K];
|
|
1366
1502
|
}>;
|
|
1367
1503
|
|
|
1504
|
+
export declare type ConfirmCheckboxes = Record<string, {
|
|
1505
|
+
label: string;
|
|
1506
|
+
default?: boolean;
|
|
1507
|
+
required?: boolean;
|
|
1508
|
+
}>;
|
|
1509
|
+
|
|
1368
1510
|
export declare const confirmModalProps: {
|
|
1369
1511
|
title: {
|
|
1370
1512
|
type?: PropType<string | null> | undefined;
|
|
@@ -1402,117 +1544,116 @@ export declare const confirmModalProps: {
|
|
|
1402
1544
|
} & {
|
|
1403
1545
|
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
1404
1546
|
};
|
|
1547
|
+
checkboxes: {
|
|
1548
|
+
type?: PropType<ConfirmCheckboxes | null> | undefined;
|
|
1549
|
+
validator?(value: unknown): boolean;
|
|
1550
|
+
} & {
|
|
1551
|
+
default: ConfirmCheckboxes | (() => ConfirmCheckboxes | null) | null;
|
|
1552
|
+
};
|
|
1553
|
+
actions: {
|
|
1554
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
1555
|
+
validator?(value: unknown): boolean;
|
|
1556
|
+
} & {
|
|
1557
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
1558
|
+
};
|
|
1405
1559
|
};
|
|
1406
1560
|
|
|
1407
|
-
export declare
|
|
1561
|
+
export declare type ConfirmOptions = AcceptRefs<{
|
|
1408
1562
|
acceptText?: string;
|
|
1409
1563
|
acceptColor?: Color;
|
|
1410
1564
|
cancelText?: string;
|
|
1411
1565
|
cancelColor?: Color;
|
|
1566
|
+
actions?: Record<string, () => unknown>;
|
|
1567
|
+
}>;
|
|
1568
|
+
|
|
1569
|
+
export declare interface ConfirmOptionsWithCheckboxes<T extends ConfirmCheckboxes = ConfirmCheckboxes> extends ConfirmOptions {
|
|
1570
|
+
checkboxes?: T;
|
|
1412
1571
|
}
|
|
1413
1572
|
|
|
1414
|
-
export declare function dateInput(defaultValue?: Date
|
|
1573
|
+
export declare function dateInput(defaultValue?: Date, options?: {
|
|
1574
|
+
rules?: string;
|
|
1575
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Date>;
|
|
1415
1576
|
|
|
1416
|
-
declare const _default:
|
|
1577
|
+
declare const _default: ServiceWithState< {
|
|
1417
1578
|
logs: ErrorReportLog[];
|
|
1418
1579
|
startupErrors: ErrorReport[];
|
|
1419
|
-
}
|
|
1420
|
-
hasErrors: boolean;
|
|
1421
|
-
hasNewErrors: boolean;
|
|
1422
|
-
hasStartupErrors: boolean;
|
|
1423
|
-
}> & Constructor<Service<UnrefServiceState< {
|
|
1424
|
-
logs: ErrorReportLog[];
|
|
1425
|
-
startupErrors: ErrorReport[];
|
|
1426
|
-
}>, {
|
|
1580
|
+
}, {
|
|
1427
1581
|
hasErrors: boolean;
|
|
1428
1582
|
hasNewErrors: boolean;
|
|
1429
1583
|
hasStartupErrors: boolean;
|
|
1430
|
-
}, Partial<
|
|
1584
|
+
}, Partial<{
|
|
1431
1585
|
logs: ErrorReportLog[];
|
|
1432
1586
|
startupErrors: ErrorReport[];
|
|
1433
|
-
}
|
|
1587
|
+
}>>;
|
|
1434
1588
|
|
|
1435
|
-
declare const _default_2:
|
|
1589
|
+
declare const _default_2: ServiceWithState< {
|
|
1436
1590
|
locale: string | null;
|
|
1437
1591
|
locales: string[];
|
|
1438
1592
|
fallbackLocale: string;
|
|
1439
|
-
}
|
|
1593
|
+
}, {}, Partial<{
|
|
1440
1594
|
locale: string | null;
|
|
1441
1595
|
locales: string[];
|
|
1442
1596
|
fallbackLocale: string;
|
|
1443
|
-
}
|
|
1444
|
-
locale: string | null;
|
|
1445
|
-
locales: string[];
|
|
1446
|
-
fallbackLocale: string;
|
|
1447
|
-
}>>>>;
|
|
1597
|
+
}>>;
|
|
1448
1598
|
|
|
1449
|
-
declare const _default_3:
|
|
1599
|
+
declare const _default_3: ServiceWithState< {
|
|
1450
1600
|
plugins: Record<string, Plugin_2>;
|
|
1601
|
+
instance: App_2<any> | null;
|
|
1451
1602
|
environment: string;
|
|
1452
1603
|
version: string;
|
|
1453
1604
|
sourceUrl: string | undefined;
|
|
1454
|
-
}
|
|
1455
|
-
development: boolean;
|
|
1456
|
-
testing: boolean;
|
|
1457
|
-
versionName: string;
|
|
1458
|
-
versionUrl: string;
|
|
1459
|
-
}> & Constructor<Service<UnrefServiceState< {
|
|
1460
|
-
plugins: Record<string, Plugin_2>;
|
|
1461
|
-
environment: string;
|
|
1462
|
-
version: string;
|
|
1463
|
-
sourceUrl: string | undefined;
|
|
1464
|
-
}>, {
|
|
1605
|
+
}, {
|
|
1465
1606
|
development: boolean;
|
|
1607
|
+
staging: boolean;
|
|
1466
1608
|
testing: boolean;
|
|
1467
1609
|
versionName: string;
|
|
1468
1610
|
versionUrl: string;
|
|
1469
|
-
}, Partial<
|
|
1611
|
+
}, Partial<{
|
|
1470
1612
|
plugins: Record<string, Plugin_2>;
|
|
1613
|
+
instance: App_2<any> | null;
|
|
1471
1614
|
environment: string;
|
|
1472
1615
|
version: string;
|
|
1473
1616
|
sourceUrl: string | undefined;
|
|
1474
|
-
}
|
|
1617
|
+
}>>;
|
|
1475
1618
|
|
|
1476
|
-
declare const _default_4:
|
|
1477
|
-
modals: Modal<unknown>[];
|
|
1478
|
-
snackbars: Snackbar[];
|
|
1479
|
-
layout: Layout;
|
|
1480
|
-
}>> & Constructor< {
|
|
1481
|
-
mobile: boolean;
|
|
1482
|
-
desktop: boolean;
|
|
1483
|
-
}> & Constructor<Service<UnrefServiceState< {
|
|
1619
|
+
declare const _default_4: ServiceWithState< {
|
|
1484
1620
|
modals: Modal<unknown>[];
|
|
1485
1621
|
snackbars: Snackbar[];
|
|
1486
1622
|
layout: Layout;
|
|
1487
|
-
}
|
|
1623
|
+
}, {
|
|
1488
1624
|
mobile: boolean;
|
|
1489
1625
|
desktop: boolean;
|
|
1490
|
-
}, Partial<
|
|
1626
|
+
}, Partial<{
|
|
1491
1627
|
modals: Modal<unknown>[];
|
|
1492
1628
|
snackbars: Snackbar[];
|
|
1493
1629
|
layout: Layout;
|
|
1494
|
-
}
|
|
1630
|
+
}>>;
|
|
1495
1631
|
|
|
1496
1632
|
export declare type DefaultServices = typeof defaultServices;
|
|
1497
1633
|
|
|
1498
1634
|
declare const defaultServices: {
|
|
1499
1635
|
$app: Facade<AppService, AppService>;
|
|
1500
1636
|
$events: Facade<EventsService, EventsService>;
|
|
1637
|
+
$storage: Facade<StorageService, StorageService>;
|
|
1501
1638
|
};
|
|
1502
1639
|
|
|
1503
1640
|
export declare type DefaultServiceState = any;
|
|
1504
1641
|
|
|
1505
1642
|
export declare function defineDirective(directive: Directive): Directive;
|
|
1506
1643
|
|
|
1644
|
+
export declare function defineFormValidationRule<T>(rule: string, validator: FormFieldValidator<T>): void;
|
|
1645
|
+
|
|
1507
1646
|
export declare function definePlugin<T extends Plugin_2>(plugin: T): T;
|
|
1508
1647
|
|
|
1509
|
-
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}
|
|
1648
|
+
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>>(options: {
|
|
1510
1649
|
name: string;
|
|
1511
1650
|
initialState: State | (() => State);
|
|
1512
1651
|
persist?: (keyof State)[];
|
|
1652
|
+
watch?: StateWatchers<Service, State>;
|
|
1513
1653
|
computed?: ComputedStateDefinition<State, ComputedState>;
|
|
1514
|
-
serialize?: (state: Partial<State>) =>
|
|
1515
|
-
|
|
1654
|
+
serialize?: (state: Partial<State>) => ServiceStorage;
|
|
1655
|
+
restore?: (state: ServiceStorage) => Partial<State>;
|
|
1656
|
+
}): ServiceWithState<State, ComputedState, ServiceStorage>;
|
|
1516
1657
|
|
|
1517
1658
|
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>;
|
|
1518
1659
|
|
|
@@ -1529,6 +1670,8 @@ export declare function enumProp<Enum extends Record<string, unknown>>(enumerati
|
|
|
1529
1670
|
|
|
1530
1671
|
export declare type ErrorHandler = (error: ErrorSource) => boolean;
|
|
1531
1672
|
|
|
1673
|
+
declare type ErrorHandler_2 = (error: ErrorSource) => string | undefined;
|
|
1674
|
+
|
|
1532
1675
|
export declare interface ErrorReport {
|
|
1533
1676
|
title: string;
|
|
1534
1677
|
description?: string;
|
|
@@ -1576,7 +1719,7 @@ declare type EventListener_2<T = unknown> = (payload: T) => unknown;
|
|
|
1576
1719
|
export { EventListener_2 as EventListener }
|
|
1577
1720
|
|
|
1578
1721
|
declare interface EventListenerOptions_2 {
|
|
1579
|
-
priority:
|
|
1722
|
+
priority: EventListenerPriority;
|
|
1580
1723
|
}
|
|
1581
1724
|
export { EventListenerOptions_2 as EventListenerOptions }
|
|
1582
1725
|
|
|
@@ -1586,6 +1729,8 @@ export declare const EventListenerPriorities: {
|
|
|
1586
1729
|
readonly High: 256;
|
|
1587
1730
|
};
|
|
1588
1731
|
|
|
1732
|
+
export declare type EventListenerPriority = (typeof EventListenerPriorities)[keyof typeof EventListenerPriorities];
|
|
1733
|
+
|
|
1589
1734
|
export declare const Events: Facade<EventsService, EventsService>;
|
|
1590
1735
|
|
|
1591
1736
|
export declare interface EventsPayload {
|
|
@@ -1598,10 +1743,13 @@ export declare class EventsService extends Service {
|
|
|
1598
1743
|
emit<Event extends EventWithPayload>(event: Event, payload: EventsPayload[Event]): Promise<void>;
|
|
1599
1744
|
emit<Event extends string>(event: UnknownEvent<Event>, payload?: unknown): Promise<void>;
|
|
1600
1745
|
on<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1746
|
+
on<Event extends EventWithoutPayload>(event: Event, priority: EventListenerPriority, listener: () => unknown): () => void;
|
|
1601
1747
|
on<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
1602
1748
|
on<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1749
|
+
on<Event extends EventWithPayload>(event: Event, priority: EventListenerPriority, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1603
1750
|
on<Event extends EventWithPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1604
1751
|
on<Event extends string>(event: UnknownEvent<Event>, listener: EventListener_2): () => void;
|
|
1752
|
+
on<Event extends string>(event: UnknownEvent<Event>, priority: EventListenerPriority, listener: EventListener_2): () => void;
|
|
1605
1753
|
on<Event extends string>(event: UnknownEvent<Event>, options: Partial<EventListenerOptions_2>, listener: EventListener_2): () => void;
|
|
1606
1754
|
once<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1607
1755
|
once<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
@@ -1691,6 +1839,8 @@ export declare const FormFieldTypes: {
|
|
|
1691
1839
|
readonly Date: "date";
|
|
1692
1840
|
};
|
|
1693
1841
|
|
|
1842
|
+
export declare type FormFieldValidator<T = unknown> = (value: T) => string | string[] | undefined;
|
|
1843
|
+
|
|
1694
1844
|
export declare type FormFieldValue = GetFormFieldValue<FormFieldType>;
|
|
1695
1845
|
|
|
1696
1846
|
export declare function getCurrentLayout(): Layout;
|
|
@@ -1756,6 +1906,7 @@ export declare type IAGHeadlessSelectOptionSlotProps = {
|
|
|
1756
1906
|
};
|
|
1757
1907
|
|
|
1758
1908
|
export declare interface IAGModal {
|
|
1909
|
+
inline: Ref<boolean>;
|
|
1759
1910
|
cancellable: Ref<boolean>;
|
|
1760
1911
|
close(result?: unknown): Promise<void>;
|
|
1761
1912
|
}
|
|
@@ -1804,8 +1955,38 @@ export declare const inputProps: {
|
|
|
1804
1955
|
|
|
1805
1956
|
export declare function installPlugins(plugins: Plugin_2[], ...args: GetClosureArgs<Plugin_2['install']>): Promise<void>;
|
|
1806
1957
|
|
|
1807
|
-
export declare abstract class Job {
|
|
1808
|
-
|
|
1958
|
+
export declare abstract class Job<Listener extends JobListener = JobListener, Status extends JobStatus = JobStatus, SerializedStatus extends JobStatus = JobStatus> {
|
|
1959
|
+
protected status: Status;
|
|
1960
|
+
protected _listeners: ListenersManager<JobListener>;
|
|
1961
|
+
protected _progress?: number;
|
|
1962
|
+
protected _cancelled?: PromisedValue<void>;
|
|
1963
|
+
protected _started: PromisedValue<void>;
|
|
1964
|
+
protected _completed: PromisedValue<void>;
|
|
1965
|
+
constructor();
|
|
1966
|
+
start(): Promise<void>;
|
|
1967
|
+
cancel(): Promise<void>;
|
|
1968
|
+
serialize(): SerializedStatus;
|
|
1969
|
+
get listeners(): Listeners<Listener>;
|
|
1970
|
+
get progress(): number;
|
|
1971
|
+
get cancelled(): boolean;
|
|
1972
|
+
get started(): Promise<void>;
|
|
1973
|
+
get completed(): Promise<void>;
|
|
1974
|
+
protected abstract run(): Promise<void>;
|
|
1975
|
+
protected getInitialStatus(): Status;
|
|
1976
|
+
protected beforeStart(): void;
|
|
1977
|
+
protected assertNotCancelled(): void;
|
|
1978
|
+
protected calculateCurrentProgress(status?: JobStatus): number;
|
|
1979
|
+
protected updateProgress(update?: (status: Status) => unknown): Promise<void>;
|
|
1980
|
+
protected serializeStatus(status: Status): SerializedStatus;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
export declare interface JobListener {
|
|
1984
|
+
onUpdated(progress: number): unknown;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
export declare interface JobStatus {
|
|
1988
|
+
completed: boolean;
|
|
1989
|
+
children?: JobStatus[];
|
|
1809
1990
|
}
|
|
1810
1991
|
|
|
1811
1992
|
export declare const Lang: Facade<LangService, LangService>;
|
|
@@ -1842,14 +2023,32 @@ export declare const Layouts: {
|
|
|
1842
2023
|
export declare function listenerProp<T extends Function = Function>(): OptionalProp<T | null>;
|
|
1843
2024
|
|
|
1844
2025
|
export declare const loadingModalProps: {
|
|
2026
|
+
title: {
|
|
2027
|
+
type?: PropType<string | null> | undefined;
|
|
2028
|
+
validator?(value: unknown): boolean;
|
|
2029
|
+
} & {
|
|
2030
|
+
default: string | (() => string | null) | null;
|
|
2031
|
+
};
|
|
1845
2032
|
message: {
|
|
1846
2033
|
type?: PropType<string | null> | undefined;
|
|
1847
2034
|
validator?(value: unknown): boolean;
|
|
1848
2035
|
} & {
|
|
1849
2036
|
default: string | (() => string | null) | null;
|
|
1850
2037
|
};
|
|
2038
|
+
progress: {
|
|
2039
|
+
type?: PropType<number | null> | undefined;
|
|
2040
|
+
validator?(value: unknown): boolean;
|
|
2041
|
+
} & {
|
|
2042
|
+
default: number | (() => number | null) | null;
|
|
2043
|
+
};
|
|
1851
2044
|
};
|
|
1852
2045
|
|
|
2046
|
+
export declare type LoadingOptions = AcceptRefs<{
|
|
2047
|
+
title?: string;
|
|
2048
|
+
message?: string;
|
|
2049
|
+
progress?: number;
|
|
2050
|
+
}>;
|
|
2051
|
+
|
|
1853
2052
|
export declare type MeasureDirectiveListener = (size: ElementSize) => unknown;
|
|
1854
2053
|
|
|
1855
2054
|
export declare function mixedProp<T>(type?: PropType<T>): OptionalProp<T | null>;
|
|
@@ -1878,6 +2077,12 @@ export declare const modalProps: {
|
|
|
1878
2077
|
} & {
|
|
1879
2078
|
default: boolean | (() => boolean) | null;
|
|
1880
2079
|
};
|
|
2080
|
+
inline: {
|
|
2081
|
+
type?: PropType<boolean> | undefined;
|
|
2082
|
+
validator?(value: unknown): boolean;
|
|
2083
|
+
} & {
|
|
2084
|
+
default: boolean | (() => boolean) | null;
|
|
2085
|
+
};
|
|
1881
2086
|
title: {
|
|
1882
2087
|
type?: PropType<string | null> | undefined;
|
|
1883
2088
|
validator?(value: unknown): boolean;
|
|
@@ -1888,7 +2093,9 @@ export declare const modalProps: {
|
|
|
1888
2093
|
|
|
1889
2094
|
declare type ModalResult<TComponent> = TComponent extends ModalComponent<Record<string, unknown>, infer TResult> ? TResult : never;
|
|
1890
2095
|
|
|
1891
|
-
export declare function numberInput(defaultValue?: number
|
|
2096
|
+
export declare function numberInput(defaultValue?: number, options?: {
|
|
2097
|
+
rules?: string;
|
|
2098
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Number>;
|
|
1892
2099
|
|
|
1893
2100
|
export declare function numberProp(): OptionalProp<number | null>;
|
|
1894
2101
|
|
|
@@ -1908,6 +2115,8 @@ declare type OptionalProp<T> = BaseProp<T> & {
|
|
|
1908
2115
|
default: T | (() => T) | null;
|
|
1909
2116
|
};
|
|
1910
2117
|
|
|
2118
|
+
export declare function persistent<T extends object>(name: string, defaults: T): UnwrapNestedRefs<T>;
|
|
2119
|
+
|
|
1911
2120
|
declare interface Plugin_2 {
|
|
1912
2121
|
name?: string;
|
|
1913
2122
|
install(app: App_2, options: AerogelOptions): void | Promise<void>;
|
|
@@ -1971,7 +2180,7 @@ export declare const promptModalProps: {
|
|
|
1971
2180
|
};
|
|
1972
2181
|
};
|
|
1973
2182
|
|
|
1974
|
-
export declare
|
|
2183
|
+
export declare type PromptOptions = AcceptRefs<{
|
|
1975
2184
|
label?: string;
|
|
1976
2185
|
defaultValue?: string;
|
|
1977
2186
|
placeholder?: string;
|
|
@@ -1980,10 +2189,20 @@ export declare interface PromptOptions {
|
|
|
1980
2189
|
cancelText?: string;
|
|
1981
2190
|
cancelColor?: Color;
|
|
1982
2191
|
trim?: boolean;
|
|
1983
|
-
}
|
|
2192
|
+
}>;
|
|
2193
|
+
|
|
2194
|
+
export declare type RefUnion<T> = T extends infer R ? Ref<R> : never;
|
|
2195
|
+
|
|
2196
|
+
export declare function registerErrorHandler(handler: ErrorHandler_2): void;
|
|
1984
2197
|
|
|
1985
2198
|
export declare function removeInteractiveClasses(classes: string): string;
|
|
1986
2199
|
|
|
2200
|
+
export declare type Replace<TOriginal extends Record<string, unknown>, TReplacements extends Partial<Record<keyof TOriginal, unknown>>> = {
|
|
2201
|
+
[K in keyof TOriginal]: TReplacements extends Record<K, infer Replacement> ? Replacement : TOriginal[K];
|
|
2202
|
+
};
|
|
2203
|
+
|
|
2204
|
+
export declare function replaceExisting<TOriginal extends Record<string, unknown>, TReplacements extends Partial<Record<keyof TOriginal, unknown>>>(original: TOriginal, replacements: TReplacements): Replace<TOriginal, TReplacements>;
|
|
2205
|
+
|
|
1987
2206
|
export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
|
|
1988
2207
|
|
|
1989
2208
|
export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
|
|
@@ -2045,14 +2264,17 @@ export declare const selectProps: {
|
|
|
2045
2264
|
};
|
|
2046
2265
|
};
|
|
2047
2266
|
|
|
2048
|
-
export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage
|
|
2267
|
+
export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>> extends MagicObject {
|
|
2049
2268
|
static persist: string[];
|
|
2050
2269
|
protected _name: string;
|
|
2051
2270
|
private _booted;
|
|
2052
2271
|
private _computedStateKeys;
|
|
2272
|
+
private _watchers;
|
|
2053
2273
|
private _store;
|
|
2054
2274
|
constructor();
|
|
2055
2275
|
get booted(): PromisedValue<void>;
|
|
2276
|
+
static<T extends typeof Service>(): T;
|
|
2277
|
+
static<T extends typeof Service, K extends keyof T>(property: K): T[K];
|
|
2056
2278
|
launch(): Promise<void>;
|
|
2057
2279
|
hasPersistedState(): boolean;
|
|
2058
2280
|
hasState<P extends keyof State>(property: P): boolean;
|
|
@@ -2060,17 +2282,22 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
|
|
|
2060
2282
|
getState<P extends keyof State>(property: P): State[P];
|
|
2061
2283
|
setState<P extends keyof State>(property: P, value: State[P]): void;
|
|
2062
2284
|
setState(state: Partial<State>): void;
|
|
2285
|
+
updatePersistedState<T extends keyof State>(key: T): void;
|
|
2286
|
+
updatePersistedState<T extends keyof State>(keys: T[]): void;
|
|
2063
2287
|
protected __get(property: string): unknown;
|
|
2064
2288
|
protected __set(property: string, value: unknown): void;
|
|
2065
|
-
protected onStateUpdated(
|
|
2289
|
+
protected onStateUpdated(update: Partial<State>, old: Partial<State>): void;
|
|
2290
|
+
protected onPersistentStateUpdated(persisted: Partial<State>): void;
|
|
2066
2291
|
protected usesStore(): boolean;
|
|
2067
2292
|
protected getName(): string | null;
|
|
2068
2293
|
protected getInitialState(): State;
|
|
2069
2294
|
protected getComputedStateDefinition(): ComputedStateDefinition<State, ComputedState>;
|
|
2070
|
-
protected
|
|
2295
|
+
protected getStateWatchers(): StateWatchers<Service, State>;
|
|
2296
|
+
protected serializePersistedState(state: Partial<State>): ServiceStorage;
|
|
2297
|
+
protected deserializePersistedState(state: ServiceStorage): Partial<State>;
|
|
2071
2298
|
protected frameworkBoot(): Promise<void>;
|
|
2072
2299
|
protected boot(): Promise<void>;
|
|
2073
|
-
protected
|
|
2300
|
+
protected restorePersistedState(): void;
|
|
2074
2301
|
protected requireStore(): Store<string, State, ComputedState, {}>;
|
|
2075
2302
|
}
|
|
2076
2303
|
|
|
@@ -2093,6 +2320,8 @@ declare const services_3: {
|
|
|
2093
2320
|
|
|
2094
2321
|
export declare type ServiceState = Record<string, any>;
|
|
2095
2322
|
|
|
2323
|
+
export declare type ServiceWithState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>> = Constructor<Unref<State>> & Constructor<ComputedState> & Constructor<Service<Unref<State>, ComputedState, Unref<ServiceStorage>>>;
|
|
2324
|
+
|
|
2096
2325
|
export declare interface ShowSnackbarOptions {
|
|
2097
2326
|
component?: Component;
|
|
2098
2327
|
color?: SnackbarColor;
|
|
@@ -2147,7 +2376,20 @@ export declare const snackbarProps: {
|
|
|
2147
2376
|
};
|
|
2148
2377
|
};
|
|
2149
2378
|
|
|
2150
|
-
export declare
|
|
2379
|
+
export declare type StateWatchers<TService extends Service, TState extends ServiceState> = {
|
|
2380
|
+
[K in keyof TState]?: (this: TService, value: TState[K], oldValue: TState[K]) => unknown;
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2383
|
+
declare const Storage_2: Facade<StorageService, StorageService>;
|
|
2384
|
+
export { Storage_2 as Storage }
|
|
2385
|
+
|
|
2386
|
+
declare class StorageService extends Service {
|
|
2387
|
+
purge(): Promise<void>;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
export declare function stringInput(defaultValue?: string, options?: {
|
|
2391
|
+
rules?: string;
|
|
2392
|
+
}): FormFieldDefinition<typeof FormFieldTypes.String>;
|
|
2151
2393
|
|
|
2152
2394
|
export declare function stringProp(): OptionalProp<string | null>;
|
|
2153
2395
|
|
|
@@ -2181,16 +2423,21 @@ export declare class UIService extends _default_4 {
|
|
|
2181
2423
|
alert(title: string, message: string): void;
|
|
2182
2424
|
confirm(message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
2183
2425
|
confirm(title: string, message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
2426
|
+
confirm<T extends ConfirmCheckboxes>(message: string, options?: ConfirmOptionsWithCheckboxes<T>): Promise<[boolean, Record<keyof T, boolean>]>;
|
|
2427
|
+
confirm<T extends ConfirmCheckboxes>(title: string, message: string, options?: ConfirmOptionsWithCheckboxes<T>): Promise<[boolean, Record<keyof T, boolean>]>;
|
|
2184
2428
|
prompt(message: string, options?: PromptOptions): Promise<string | null>;
|
|
2185
2429
|
prompt(title: string, message: string, options?: PromptOptions): Promise<string | null>;
|
|
2186
2430
|
loading<T>(operation: Promise<T> | (() => T)): Promise<T>;
|
|
2187
2431
|
loading<T>(message: string, operation: Promise<T> | (() => T)): Promise<T>;
|
|
2432
|
+
loading<T>(options: LoadingOptions, operation: Promise<T> | (() => T)): Promise<T>;
|
|
2188
2433
|
showSnackbar(message: string, options?: ShowSnackbarOptions): void;
|
|
2189
2434
|
hideSnackbar(id: string): void;
|
|
2190
2435
|
registerComponent(name: UIComponent, component: Component): void;
|
|
2191
2436
|
openModal<TModalComponent extends ModalComponent>(component: TModalComponent, properties?: ModalProperties<TModalComponent>): Promise<Modal<ModalResult<TModalComponent>>>;
|
|
2192
2437
|
closeModal(id: string, result?: unknown): Promise<void>;
|
|
2438
|
+
closeAllModals(): Promise<void>;
|
|
2193
2439
|
protected boot(): Promise<void>;
|
|
2440
|
+
private removeModal;
|
|
2194
2441
|
private watchModalEvents;
|
|
2195
2442
|
private watchMountedEvent;
|
|
2196
2443
|
private watchViewportBreakpoints;
|
|
@@ -2200,8 +2447,8 @@ export declare type UIServices = typeof services_3;
|
|
|
2200
2447
|
|
|
2201
2448
|
export declare type UnknownEvent<T> = T extends keyof EventsPayload ? never : T;
|
|
2202
2449
|
|
|
2203
|
-
export declare type
|
|
2204
|
-
[K in keyof
|
|
2450
|
+
export declare type Unref<T> = {
|
|
2451
|
+
[K in keyof T]: T[K] extends MaybeRef<infer Value> ? Value : T[K];
|
|
2205
2452
|
};
|
|
2206
2453
|
|
|
2207
2454
|
export declare function useAlertModalProps(): typeof alertModalProps;
|
|
@@ -2239,6 +2486,7 @@ export declare function useInputProps(): typeof inputProps;
|
|
|
2239
2486
|
|
|
2240
2487
|
export declare function useLoadingModal(props: ExtractPropTypes<typeof loadingModalProps>): {
|
|
2241
2488
|
renderedMessage: ComputedRef<string>;
|
|
2489
|
+
showProgress: ComputedRef<boolean>;
|
|
2242
2490
|
};
|
|
2243
2491
|
|
|
2244
2492
|
export declare function useLoadingModalProps(): typeof loadingModalProps;
|
|
@@ -2264,6 +2512,10 @@ export declare function useSnackbar(props: ExtractPropTypes<typeof snackbarProps
|
|
|
2264
2512
|
|
|
2265
2513
|
export declare function useSnackbarProps(): typeof snackbarProps;
|
|
2266
2514
|
|
|
2515
|
+
export declare function validate(value: unknown, rule: string): string[];
|
|
2516
|
+
|
|
2517
|
+
export declare const validators: Record<string, FormFieldValidator>;
|
|
2518
|
+
|
|
2267
2519
|
export { }
|
|
2268
2520
|
|
|
2269
2521
|
export interface EventsPayload {
|
|
@@ -2298,6 +2550,10 @@ declare global {
|
|
|
2298
2550
|
var __aerogelEvents__: AerogelGlobalEvents | undefined;
|
|
2299
2551
|
}
|
|
2300
2552
|
|
|
2553
|
+
export interface EventsPayload {
|
|
2554
|
+
'purge-storage': void;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2301
2557
|
export interface AerogelOptions {
|
|
2302
2558
|
services?: Record<string, Service>;
|
|
2303
2559
|
}
|