@aerogel/core 0.0.0-next.bde642c4a8096c5fc3d5e676c2115da23f4bf1d8 → 0.0.0-next.c4825c5cbe0fe3257e478c2a7ec8df27d5a72305
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 +371 -69
- 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/index.ts +12 -2
- package/src/components/headless/forms/AGHeadlessInput.ts +1 -0
- package/src/components/headless/forms/AGHeadlessInput.vue +7 -0
- package/src/components/headless/forms/AGHeadlessInputInput.vue +1 -0
- package/src/components/headless/forms/AGHeadlessInputTextArea.vue +1 -0
- 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/AGMeasured.vue +1 -0
- 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 +14 -5
- package/src/components/modals/AGConfirmModal.vue +2 -2
- 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/directives/measure.ts +24 -5
- package/src/errors/JobCancelledError.ts +3 -0
- package/src/errors/utils.ts +16 -0
- package/src/forms/Form.test.ts +28 -0
- package/src/forms/Form.ts +24 -6
- 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/lang/Lang.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.state.ts +7 -0
- package/src/ui/UI.ts +136 -43
- package/src/ui/index.ts +1 -0
- package/src/ui/utils.ts +16 -0
- 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 +11 -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,24 @@ 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
|
+
};
|
|
195
|
+
required: {
|
|
196
|
+
type?: PropType<boolean> | undefined;
|
|
197
|
+
validator?(value: unknown): boolean;
|
|
198
|
+
} & {
|
|
199
|
+
default: boolean | (() => boolean) | null;
|
|
200
|
+
};
|
|
175
201
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
176
202
|
[key: string]: any;
|
|
177
203
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -211,15 +237,36 @@ validator?(value: unknown): boolean;
|
|
|
211
237
|
} & {
|
|
212
238
|
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
213
239
|
};
|
|
240
|
+
checkboxes: {
|
|
241
|
+
type?: PropType<ConfirmCheckboxes | null> | undefined;
|
|
242
|
+
validator?(value: unknown): boolean;
|
|
243
|
+
} & {
|
|
244
|
+
default: ConfirmCheckboxes | (() => ConfirmCheckboxes | null) | null;
|
|
245
|
+
};
|
|
246
|
+
actions: {
|
|
247
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
248
|
+
validator?(value: unknown): boolean;
|
|
249
|
+
} & {
|
|
250
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
251
|
+
};
|
|
252
|
+
required: {
|
|
253
|
+
type?: PropType<boolean> | undefined;
|
|
254
|
+
validator?(value: unknown): boolean;
|
|
255
|
+
} & {
|
|
256
|
+
default: boolean | (() => boolean) | null;
|
|
257
|
+
};
|
|
214
258
|
}>>, {
|
|
215
259
|
title: string | null;
|
|
216
260
|
acceptText: string | null;
|
|
217
261
|
acceptColor: "primary" | "secondary" | "danger" | "clear";
|
|
218
262
|
cancelText: string | null;
|
|
219
263
|
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
264
|
+
checkboxes: ConfirmCheckboxes | null;
|
|
265
|
+
actions: Record<string, () => unknown> | null;
|
|
266
|
+
required: boolean;
|
|
220
267
|
}, {}>;
|
|
221
268
|
|
|
222
|
-
export declare type AGConfirmModalProps = SubPartial<
|
|
269
|
+
export declare type AGConfirmModalProps = Pretty<AcceptRefs<SubPartial<ObjectWithout<ExtractPropTypes<typeof confirmModalProps>, null | undefined>, 'acceptColor' | 'cancelColor'>>>;
|
|
223
270
|
|
|
224
271
|
export declare const AGErrorMessage: DefineComponent< {
|
|
225
272
|
error: {
|
|
@@ -257,7 +304,7 @@ required: true;
|
|
|
257
304
|
};
|
|
258
305
|
}>>, {}, {}>;
|
|
259
306
|
|
|
260
|
-
export declare type AGErrorReportModalProps =
|
|
307
|
+
export declare type AGErrorReportModalProps = Pretty<AcceptRefs<ObjectWithout<ExtractPropTypes<typeof errorReportModalProps>, null | undefined>>>;
|
|
261
308
|
|
|
262
309
|
export declare const AGErrorReportModalTitle: DefineComponent< {
|
|
263
310
|
report: {
|
|
@@ -541,6 +588,12 @@ validator?(value: unknown): boolean;
|
|
|
541
588
|
} & {
|
|
542
589
|
default: boolean | (() => boolean) | null;
|
|
543
590
|
};
|
|
591
|
+
inline: {
|
|
592
|
+
type?: PropType<boolean> | undefined;
|
|
593
|
+
validator?(value: unknown): boolean;
|
|
594
|
+
} & {
|
|
595
|
+
default: boolean | (() => boolean) | null;
|
|
596
|
+
};
|
|
544
597
|
title: {
|
|
545
598
|
type?: PropType<string | null> | undefined;
|
|
546
599
|
validator?(value: unknown): boolean;
|
|
@@ -556,6 +609,12 @@ validator?(value: unknown): boolean;
|
|
|
556
609
|
} & {
|
|
557
610
|
default: boolean | (() => boolean) | null;
|
|
558
611
|
};
|
|
612
|
+
inline: {
|
|
613
|
+
type?: PropType<boolean> | undefined;
|
|
614
|
+
validator?(value: unknown): boolean;
|
|
615
|
+
} & {
|
|
616
|
+
default: boolean | (() => boolean) | null;
|
|
617
|
+
};
|
|
559
618
|
title: {
|
|
560
619
|
type?: PropType<string | null> | undefined;
|
|
561
620
|
validator?(value: unknown): boolean;
|
|
@@ -564,6 +623,7 @@ default: string | (() => string | null) | null;
|
|
|
564
623
|
};
|
|
565
624
|
}>>, {
|
|
566
625
|
cancellable: boolean;
|
|
626
|
+
inline: boolean;
|
|
567
627
|
title: string | null;
|
|
568
628
|
}, {}>;
|
|
569
629
|
|
|
@@ -846,26 +906,52 @@ export declare const AGLink: DefineComponent< {}, (_ctx: any, _cache: any) =>
|
|
|
846
906
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
847
907
|
|
|
848
908
|
export declare const AGLoadingModal: DefineComponent< {
|
|
909
|
+
title: {
|
|
910
|
+
type?: PropType<string | null> | undefined;
|
|
911
|
+
validator?(value: unknown): boolean;
|
|
912
|
+
} & {
|
|
913
|
+
default: string | (() => string | null) | null;
|
|
914
|
+
};
|
|
849
915
|
message: {
|
|
850
916
|
type?: PropType<string | null> | undefined;
|
|
851
917
|
validator?(value: unknown): boolean;
|
|
852
918
|
} & {
|
|
853
919
|
default: string | (() => string | null) | null;
|
|
854
920
|
};
|
|
921
|
+
progress: {
|
|
922
|
+
type?: PropType<number | null> | undefined;
|
|
923
|
+
validator?(value: unknown): boolean;
|
|
924
|
+
} & {
|
|
925
|
+
default: number | (() => number | null) | null;
|
|
926
|
+
};
|
|
855
927
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
856
928
|
[key: string]: any;
|
|
857
929
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
930
|
+
title: {
|
|
931
|
+
type?: PropType<string | null> | undefined;
|
|
932
|
+
validator?(value: unknown): boolean;
|
|
933
|
+
} & {
|
|
934
|
+
default: string | (() => string | null) | null;
|
|
935
|
+
};
|
|
858
936
|
message: {
|
|
859
937
|
type?: PropType<string | null> | undefined;
|
|
860
938
|
validator?(value: unknown): boolean;
|
|
861
939
|
} & {
|
|
862
940
|
default: string | (() => string | null) | null;
|
|
863
941
|
};
|
|
942
|
+
progress: {
|
|
943
|
+
type?: PropType<number | null> | undefined;
|
|
944
|
+
validator?(value: unknown): boolean;
|
|
945
|
+
} & {
|
|
946
|
+
default: number | (() => number | null) | null;
|
|
947
|
+
};
|
|
864
948
|
}>>, {
|
|
949
|
+
title: string | null;
|
|
865
950
|
message: string | null;
|
|
951
|
+
progress: number | null;
|
|
866
952
|
}, {}>;
|
|
867
953
|
|
|
868
|
-
export declare type AGLoadingModalProps =
|
|
954
|
+
export declare type AGLoadingModalProps = AcceptRefs<ObjectWithout<ExtractPropTypes<typeof loadingModalProps>, null | undefined>>;
|
|
869
955
|
|
|
870
956
|
export declare const AGMarkdown: DefineComponent< {
|
|
871
957
|
as: {
|
|
@@ -898,6 +984,12 @@ validator?(value: unknown): boolean;
|
|
|
898
984
|
} & {
|
|
899
985
|
default: string | (() => string | null) | null;
|
|
900
986
|
};
|
|
987
|
+
actions: {
|
|
988
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
989
|
+
validator?(value: unknown): boolean;
|
|
990
|
+
} & {
|
|
991
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
992
|
+
};
|
|
901
993
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
902
994
|
[key: string]: any;
|
|
903
995
|
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
@@ -931,12 +1023,19 @@ validator?(value: unknown): boolean;
|
|
|
931
1023
|
} & {
|
|
932
1024
|
default: string | (() => string | null) | null;
|
|
933
1025
|
};
|
|
1026
|
+
actions: {
|
|
1027
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
1028
|
+
validator?(value: unknown): boolean;
|
|
1029
|
+
} & {
|
|
1030
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
1031
|
+
};
|
|
934
1032
|
}>>, {
|
|
935
1033
|
as: string | null;
|
|
936
1034
|
inline: boolean;
|
|
937
1035
|
langKey: string | null;
|
|
938
1036
|
langParams: number | Record<string, unknown> | null;
|
|
939
1037
|
text: string | null;
|
|
1038
|
+
actions: Record<string, () => unknown> | null;
|
|
940
1039
|
}, {}>;
|
|
941
1040
|
|
|
942
1041
|
export declare const AGMeasured: DefineComponent< {
|
|
@@ -966,6 +1065,12 @@ validator?(value: unknown): boolean;
|
|
|
966
1065
|
} & {
|
|
967
1066
|
default: boolean | (() => boolean) | null;
|
|
968
1067
|
};
|
|
1068
|
+
inline: {
|
|
1069
|
+
type?: PropType<boolean> | undefined;
|
|
1070
|
+
validator?(value: unknown): boolean;
|
|
1071
|
+
} & {
|
|
1072
|
+
default: boolean | (() => boolean) | null;
|
|
1073
|
+
};
|
|
969
1074
|
title: {
|
|
970
1075
|
type?: PropType<string | null> | undefined;
|
|
971
1076
|
validator?(value: unknown): boolean;
|
|
@@ -981,6 +1086,12 @@ validator?(value: unknown): boolean;
|
|
|
981
1086
|
} & {
|
|
982
1087
|
default: boolean | (() => boolean) | null;
|
|
983
1088
|
};
|
|
1089
|
+
inline: {
|
|
1090
|
+
type?: PropType<boolean> | undefined;
|
|
1091
|
+
validator?(value: unknown): boolean;
|
|
1092
|
+
} & {
|
|
1093
|
+
default: boolean | (() => boolean) | null;
|
|
1094
|
+
};
|
|
984
1095
|
title: {
|
|
985
1096
|
type?: PropType<string | null> | undefined;
|
|
986
1097
|
validator?(value: unknown): boolean;
|
|
@@ -989,6 +1100,7 @@ default: string | (() => string | null) | null;
|
|
|
989
1100
|
};
|
|
990
1101
|
}>>, {
|
|
991
1102
|
cancellable: boolean;
|
|
1103
|
+
inline: boolean;
|
|
992
1104
|
title: string | null;
|
|
993
1105
|
}, {}>;
|
|
994
1106
|
|
|
@@ -1003,7 +1115,7 @@ childIndex: {
|
|
|
1003
1115
|
type?: PropType<number> | undefined;
|
|
1004
1116
|
validator?(value: unknown): boolean;
|
|
1005
1117
|
} & {
|
|
1006
|
-
|
|
1118
|
+
default: number | (() => number) | null;
|
|
1007
1119
|
};
|
|
1008
1120
|
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1009
1121
|
[key: string]: any;
|
|
@@ -1018,14 +1130,48 @@ childIndex: {
|
|
|
1018
1130
|
type?: PropType<number> | undefined;
|
|
1019
1131
|
validator?(value: unknown): boolean;
|
|
1020
1132
|
} & {
|
|
1021
|
-
|
|
1133
|
+
default: number | (() => number) | null;
|
|
1022
1134
|
};
|
|
1023
|
-
}>>, {
|
|
1135
|
+
}>>, {
|
|
1136
|
+
childIndex: number;
|
|
1137
|
+
}, {}>;
|
|
1024
1138
|
|
|
1025
1139
|
export declare const AGModalTitle: DefineComponent< {}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1026
1140
|
[key: string]: any;
|
|
1027
1141
|
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
|
1028
1142
|
|
|
1143
|
+
export declare const AGProgressBar: DefineComponent< {
|
|
1144
|
+
progress: {
|
|
1145
|
+
type?: PropType<number> | undefined;
|
|
1146
|
+
validator?(value: unknown): boolean;
|
|
1147
|
+
} & {
|
|
1148
|
+
required: true;
|
|
1149
|
+
};
|
|
1150
|
+
barClass: {
|
|
1151
|
+
type?: PropType<string> | undefined;
|
|
1152
|
+
validator?(value: unknown): boolean;
|
|
1153
|
+
} & {
|
|
1154
|
+
default: string | (() => string) | null;
|
|
1155
|
+
};
|
|
1156
|
+
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1157
|
+
[key: string]: any;
|
|
1158
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1159
|
+
progress: {
|
|
1160
|
+
type?: PropType<number> | undefined;
|
|
1161
|
+
validator?(value: unknown): boolean;
|
|
1162
|
+
} & {
|
|
1163
|
+
required: true;
|
|
1164
|
+
};
|
|
1165
|
+
barClass: {
|
|
1166
|
+
type?: PropType<string> | undefined;
|
|
1167
|
+
validator?(value: unknown): boolean;
|
|
1168
|
+
} & {
|
|
1169
|
+
default: string | (() => string) | null;
|
|
1170
|
+
};
|
|
1171
|
+
}>>, {
|
|
1172
|
+
barClass: string;
|
|
1173
|
+
}, {}>;
|
|
1174
|
+
|
|
1029
1175
|
export declare const AGPromptModal: DefineComponent< {
|
|
1030
1176
|
title: {
|
|
1031
1177
|
type?: PropType<string | null> | undefined;
|
|
@@ -1149,7 +1295,7 @@ cancelText: string | null;
|
|
|
1149
1295
|
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
1150
1296
|
}, {}>;
|
|
1151
1297
|
|
|
1152
|
-
export declare type AGPromptModalProps = SubPartial<
|
|
1298
|
+
export declare type AGPromptModalProps = Pretty<AcceptRefs<SubPartial<ObjectWithout<ExtractPropTypes<typeof promptModalProps>, null | undefined>, 'acceptColor' | 'cancelColor'>>>;
|
|
1153
1299
|
|
|
1154
1300
|
export declare const AGSelect: DefineComponent< {
|
|
1155
1301
|
name: {
|
|
@@ -1313,6 +1459,7 @@ export declare class AppService extends _default_3 {
|
|
|
1313
1459
|
whenReady<T>(callback: () => T): Promise<T>;
|
|
1314
1460
|
reload(queryParameters?: Record<string, string | undefined>): Promise<void>;
|
|
1315
1461
|
plugin<T extends Plugin_2 = Plugin_2>(name: string): T | null;
|
|
1462
|
+
service<T extends keyof Services>(name: T): Services[T] | null;
|
|
1316
1463
|
protected boot(): Promise<void>;
|
|
1317
1464
|
}
|
|
1318
1465
|
|
|
@@ -1323,7 +1470,9 @@ declare type BaseProp<T> = {
|
|
|
1323
1470
|
validator?(value: unknown): boolean;
|
|
1324
1471
|
};
|
|
1325
1472
|
|
|
1326
|
-
export declare function booleanInput(defaultValue?: boolean
|
|
1473
|
+
export declare function booleanInput(defaultValue?: boolean, options?: {
|
|
1474
|
+
rules?: string;
|
|
1475
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
|
|
1327
1476
|
|
|
1328
1477
|
export declare function booleanProp(defaultValue?: boolean): OptionalProp<boolean>;
|
|
1329
1478
|
|
|
@@ -1360,11 +1509,17 @@ export declare function componentRef<T>(): Ref<UnwrapNestedRefs<T> | undefined>;
|
|
|
1360
1509
|
export declare function computedAsync<T>(getter: () => Promise<T>): Ref<T | undefined>;
|
|
1361
1510
|
|
|
1362
1511
|
export declare type ComputedStateDefinition<TState extends ServiceState, TComputedState extends ServiceState> = {
|
|
1363
|
-
[K in keyof TComputedState]: (state:
|
|
1512
|
+
[K in keyof TComputedState]: (state: Unref<TState>) => TComputedState[K];
|
|
1364
1513
|
} & ThisType<{
|
|
1365
1514
|
readonly [K in keyof TComputedState]: TComputedState[K];
|
|
1366
1515
|
}>;
|
|
1367
1516
|
|
|
1517
|
+
export declare type ConfirmCheckboxes = Record<string, {
|
|
1518
|
+
label: string;
|
|
1519
|
+
default?: boolean;
|
|
1520
|
+
required?: boolean;
|
|
1521
|
+
}>;
|
|
1522
|
+
|
|
1368
1523
|
export declare const confirmModalProps: {
|
|
1369
1524
|
title: {
|
|
1370
1525
|
type?: PropType<string | null> | undefined;
|
|
@@ -1402,108 +1557,123 @@ export declare const confirmModalProps: {
|
|
|
1402
1557
|
} & {
|
|
1403
1558
|
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
1404
1559
|
};
|
|
1560
|
+
checkboxes: {
|
|
1561
|
+
type?: PropType<ConfirmCheckboxes | null> | undefined;
|
|
1562
|
+
validator?(value: unknown): boolean;
|
|
1563
|
+
} & {
|
|
1564
|
+
default: ConfirmCheckboxes | (() => ConfirmCheckboxes | null) | null;
|
|
1565
|
+
};
|
|
1566
|
+
actions: {
|
|
1567
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
1568
|
+
validator?(value: unknown): boolean;
|
|
1569
|
+
} & {
|
|
1570
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
1571
|
+
};
|
|
1572
|
+
required: {
|
|
1573
|
+
type?: PropType<boolean> | undefined;
|
|
1574
|
+
validator?(value: unknown): boolean;
|
|
1575
|
+
} & {
|
|
1576
|
+
default: boolean | (() => boolean) | null;
|
|
1577
|
+
};
|
|
1405
1578
|
};
|
|
1406
1579
|
|
|
1407
|
-
export declare
|
|
1580
|
+
export declare type ConfirmOptions = AcceptRefs<{
|
|
1408
1581
|
acceptText?: string;
|
|
1409
1582
|
acceptColor?: Color;
|
|
1410
1583
|
cancelText?: string;
|
|
1411
1584
|
cancelColor?: Color;
|
|
1585
|
+
actions?: Record<string, () => unknown>;
|
|
1586
|
+
required?: boolean;
|
|
1587
|
+
}>;
|
|
1588
|
+
|
|
1589
|
+
export declare interface ConfirmOptionsWithCheckboxes<T extends ConfirmCheckboxes = ConfirmCheckboxes> extends ConfirmOptions {
|
|
1590
|
+
checkboxes?: T;
|
|
1412
1591
|
}
|
|
1413
1592
|
|
|
1414
|
-
export declare function dateInput(defaultValue?: Date
|
|
1593
|
+
export declare function dateInput(defaultValue?: Date, options?: {
|
|
1594
|
+
rules?: string;
|
|
1595
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Date>;
|
|
1415
1596
|
|
|
1416
|
-
declare const _default:
|
|
1597
|
+
declare const _default: ServiceWithState< {
|
|
1417
1598
|
logs: ErrorReportLog[];
|
|
1418
1599
|
startupErrors: ErrorReport[];
|
|
1419
|
-
}
|
|
1420
|
-
hasErrors: boolean;
|
|
1421
|
-
hasNewErrors: boolean;
|
|
1422
|
-
hasStartupErrors: boolean;
|
|
1423
|
-
}> & Constructor<Service<UnrefServiceState< {
|
|
1424
|
-
logs: ErrorReportLog[];
|
|
1425
|
-
startupErrors: ErrorReport[];
|
|
1426
|
-
}>, {
|
|
1600
|
+
}, {
|
|
1427
1601
|
hasErrors: boolean;
|
|
1428
1602
|
hasNewErrors: boolean;
|
|
1429
1603
|
hasStartupErrors: boolean;
|
|
1430
|
-
}, Partial<
|
|
1604
|
+
}, Partial<{
|
|
1431
1605
|
logs: ErrorReportLog[];
|
|
1432
1606
|
startupErrors: ErrorReport[];
|
|
1433
|
-
}
|
|
1607
|
+
}>>;
|
|
1434
1608
|
|
|
1435
|
-
declare const _default_2:
|
|
1436
|
-
locale: string | null;
|
|
1437
|
-
locales: string[];
|
|
1438
|
-
fallbackLocale: string;
|
|
1439
|
-
}>> & Constructor< {}> & Constructor<Service<UnrefServiceState< {
|
|
1609
|
+
declare const _default_2: ServiceWithState< {
|
|
1440
1610
|
locale: string | null;
|
|
1441
1611
|
locales: string[];
|
|
1442
1612
|
fallbackLocale: string;
|
|
1443
|
-
}
|
|
1613
|
+
}, {}, Partial<{
|
|
1444
1614
|
locale: string | null;
|
|
1445
1615
|
locales: string[];
|
|
1446
1616
|
fallbackLocale: string;
|
|
1447
|
-
}
|
|
1617
|
+
}>>;
|
|
1448
1618
|
|
|
1449
|
-
declare const _default_3:
|
|
1619
|
+
declare const _default_3: ServiceWithState< {
|
|
1450
1620
|
plugins: Record<string, Plugin_2>;
|
|
1621
|
+
instance: App_2<any> | null;
|
|
1451
1622
|
environment: string;
|
|
1452
1623
|
version: string;
|
|
1453
1624
|
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
|
-
}>, {
|
|
1625
|
+
}, {
|
|
1465
1626
|
development: boolean;
|
|
1627
|
+
staging: boolean;
|
|
1466
1628
|
testing: boolean;
|
|
1467
1629
|
versionName: string;
|
|
1468
1630
|
versionUrl: string;
|
|
1469
|
-
}, Partial<
|
|
1631
|
+
}, Partial<{
|
|
1470
1632
|
plugins: Record<string, Plugin_2>;
|
|
1633
|
+
instance: App_2<any> | null;
|
|
1471
1634
|
environment: string;
|
|
1472
1635
|
version: string;
|
|
1473
1636
|
sourceUrl: string | undefined;
|
|
1474
|
-
}
|
|
1637
|
+
}>>;
|
|
1475
1638
|
|
|
1476
|
-
declare const _default_4:
|
|
1477
|
-
modals: Modal<unknown>[];
|
|
1478
|
-
snackbars: Snackbar[];
|
|
1479
|
-
}>> & Constructor< {}> & Constructor<Service<UnrefServiceState< {
|
|
1639
|
+
declare const _default_4: ServiceWithState< {
|
|
1480
1640
|
modals: Modal<unknown>[];
|
|
1481
1641
|
snackbars: Snackbar[];
|
|
1482
|
-
|
|
1642
|
+
layout: Layout;
|
|
1643
|
+
}, {
|
|
1644
|
+
mobile: boolean;
|
|
1645
|
+
desktop: boolean;
|
|
1646
|
+
}, Partial<{
|
|
1483
1647
|
modals: Modal<unknown>[];
|
|
1484
1648
|
snackbars: Snackbar[];
|
|
1485
|
-
|
|
1649
|
+
layout: Layout;
|
|
1650
|
+
}>>;
|
|
1486
1651
|
|
|
1487
1652
|
export declare type DefaultServices = typeof defaultServices;
|
|
1488
1653
|
|
|
1489
1654
|
declare const defaultServices: {
|
|
1490
1655
|
$app: Facade<AppService, AppService>;
|
|
1491
1656
|
$events: Facade<EventsService, EventsService>;
|
|
1657
|
+
$storage: Facade<StorageService, StorageService>;
|
|
1492
1658
|
};
|
|
1493
1659
|
|
|
1494
1660
|
export declare type DefaultServiceState = any;
|
|
1495
1661
|
|
|
1496
1662
|
export declare function defineDirective(directive: Directive): Directive;
|
|
1497
1663
|
|
|
1664
|
+
export declare function defineFormValidationRule<T>(rule: string, validator: FormFieldValidator<T>): void;
|
|
1665
|
+
|
|
1498
1666
|
export declare function definePlugin<T extends Plugin_2>(plugin: T): T;
|
|
1499
1667
|
|
|
1500
|
-
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}
|
|
1668
|
+
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>>(options: {
|
|
1501
1669
|
name: string;
|
|
1502
1670
|
initialState: State | (() => State);
|
|
1503
1671
|
persist?: (keyof State)[];
|
|
1672
|
+
watch?: StateWatchers<Service, State>;
|
|
1504
1673
|
computed?: ComputedStateDefinition<State, ComputedState>;
|
|
1505
|
-
serialize?: (state: Partial<State>) =>
|
|
1506
|
-
|
|
1674
|
+
serialize?: (state: Partial<State>) => ServiceStorage;
|
|
1675
|
+
restore?: (state: ServiceStorage) => Partial<State>;
|
|
1676
|
+
}): ServiceWithState<State, ComputedState, ServiceStorage>;
|
|
1507
1677
|
|
|
1508
1678
|
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>;
|
|
1509
1679
|
|
|
@@ -1520,6 +1690,8 @@ export declare function enumProp<Enum extends Record<string, unknown>>(enumerati
|
|
|
1520
1690
|
|
|
1521
1691
|
export declare type ErrorHandler = (error: ErrorSource) => boolean;
|
|
1522
1692
|
|
|
1693
|
+
declare type ErrorHandler_2 = (error: ErrorSource) => string | undefined;
|
|
1694
|
+
|
|
1523
1695
|
export declare interface ErrorReport {
|
|
1524
1696
|
title: string;
|
|
1525
1697
|
description?: string;
|
|
@@ -1567,7 +1739,7 @@ declare type EventListener_2<T = unknown> = (payload: T) => unknown;
|
|
|
1567
1739
|
export { EventListener_2 as EventListener }
|
|
1568
1740
|
|
|
1569
1741
|
declare interface EventListenerOptions_2 {
|
|
1570
|
-
priority:
|
|
1742
|
+
priority: EventListenerPriority;
|
|
1571
1743
|
}
|
|
1572
1744
|
export { EventListenerOptions_2 as EventListenerOptions }
|
|
1573
1745
|
|
|
@@ -1577,6 +1749,8 @@ export declare const EventListenerPriorities: {
|
|
|
1577
1749
|
readonly High: 256;
|
|
1578
1750
|
};
|
|
1579
1751
|
|
|
1752
|
+
export declare type EventListenerPriority = (typeof EventListenerPriorities)[keyof typeof EventListenerPriorities];
|
|
1753
|
+
|
|
1580
1754
|
export declare const Events: Facade<EventsService, EventsService>;
|
|
1581
1755
|
|
|
1582
1756
|
export declare interface EventsPayload {
|
|
@@ -1589,10 +1763,13 @@ export declare class EventsService extends Service {
|
|
|
1589
1763
|
emit<Event extends EventWithPayload>(event: Event, payload: EventsPayload[Event]): Promise<void>;
|
|
1590
1764
|
emit<Event extends string>(event: UnknownEvent<Event>, payload?: unknown): Promise<void>;
|
|
1591
1765
|
on<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1766
|
+
on<Event extends EventWithoutPayload>(event: Event, priority: EventListenerPriority, listener: () => unknown): () => void;
|
|
1592
1767
|
on<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
1593
1768
|
on<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1769
|
+
on<Event extends EventWithPayload>(event: Event, priority: EventListenerPriority, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1594
1770
|
on<Event extends EventWithPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1595
1771
|
on<Event extends string>(event: UnknownEvent<Event>, listener: EventListener_2): () => void;
|
|
1772
|
+
on<Event extends string>(event: UnknownEvent<Event>, priority: EventListenerPriority, listener: EventListener_2): () => void;
|
|
1596
1773
|
on<Event extends string>(event: UnknownEvent<Event>, options: Partial<EventListenerOptions_2>, listener: EventListener_2): () => void;
|
|
1597
1774
|
once<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1598
1775
|
once<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
@@ -1632,6 +1809,7 @@ export declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinit
|
|
|
1632
1809
|
get submitted(): boolean;
|
|
1633
1810
|
setFieldValue<T extends keyof Fields>(field: T, value: FormData_2<Fields>[T]): void;
|
|
1634
1811
|
getFieldValue<T extends keyof Fields>(field: T): GetFormFieldValue<Fields[T]['type']>;
|
|
1812
|
+
getFieldRules<T extends keyof Fields>(field: T): string[];
|
|
1635
1813
|
data(): FormData_2<Fields>;
|
|
1636
1814
|
validate(): boolean;
|
|
1637
1815
|
reset(options?: {
|
|
@@ -1664,6 +1842,7 @@ export declare type FormErrors<T> = {
|
|
|
1664
1842
|
|
|
1665
1843
|
export declare interface FormFieldDefinition<TType extends FormFieldType = FormFieldType, TRules extends string = string> {
|
|
1666
1844
|
type: TType;
|
|
1845
|
+
trim?: boolean;
|
|
1667
1846
|
default?: GetFormFieldValue<TType>;
|
|
1668
1847
|
rules?: TRules;
|
|
1669
1848
|
}
|
|
@@ -1680,8 +1859,12 @@ export declare const FormFieldTypes: {
|
|
|
1680
1859
|
readonly Date: "date";
|
|
1681
1860
|
};
|
|
1682
1861
|
|
|
1862
|
+
export declare type FormFieldValidator<T = unknown> = (value: T) => string | string[] | undefined;
|
|
1863
|
+
|
|
1683
1864
|
export declare type FormFieldValue = GetFormFieldValue<FormFieldType>;
|
|
1684
1865
|
|
|
1866
|
+
export declare function getCurrentLayout(): Layout;
|
|
1867
|
+
|
|
1685
1868
|
export declare function getElement(value: unknown): HTMLElement | undefined;
|
|
1686
1869
|
|
|
1687
1870
|
export declare function getErrorMessage(error: ErrorSource): string;
|
|
@@ -1713,6 +1896,7 @@ export declare interface IAGHeadlessInput extends HasElement {
|
|
|
1713
1896
|
label: ComputedRef<string | null>;
|
|
1714
1897
|
description: ComputedRef<string | boolean | null>;
|
|
1715
1898
|
value: ComputedRef<FormFieldValue | null>;
|
|
1899
|
+
required: ComputedRef<boolean | null>;
|
|
1716
1900
|
errors: DeepReadonly<Ref<string[] | null>>;
|
|
1717
1901
|
update(value: FormFieldValue | null): void;
|
|
1718
1902
|
}
|
|
@@ -1742,6 +1926,7 @@ export declare type IAGHeadlessSelectOptionSlotProps = {
|
|
|
1742
1926
|
};
|
|
1743
1927
|
|
|
1744
1928
|
export declare interface IAGModal {
|
|
1929
|
+
inline: Ref<boolean>;
|
|
1745
1930
|
cancellable: Ref<boolean>;
|
|
1746
1931
|
close(result?: unknown): Promise<void>;
|
|
1747
1932
|
}
|
|
@@ -1790,8 +1975,38 @@ export declare const inputProps: {
|
|
|
1790
1975
|
|
|
1791
1976
|
export declare function installPlugins(plugins: Plugin_2[], ...args: GetClosureArgs<Plugin_2['install']>): Promise<void>;
|
|
1792
1977
|
|
|
1793
|
-
export declare abstract class Job {
|
|
1794
|
-
|
|
1978
|
+
export declare abstract class Job<Listener extends JobListener = JobListener, Status extends JobStatus = JobStatus, SerializedStatus extends JobStatus = JobStatus> {
|
|
1979
|
+
protected status: Status;
|
|
1980
|
+
protected _listeners: ListenersManager<JobListener>;
|
|
1981
|
+
protected _progress?: number;
|
|
1982
|
+
protected _cancelled?: PromisedValue<void>;
|
|
1983
|
+
protected _started: PromisedValue<void>;
|
|
1984
|
+
protected _completed: PromisedValue<void>;
|
|
1985
|
+
constructor();
|
|
1986
|
+
start(): Promise<void>;
|
|
1987
|
+
cancel(): Promise<void>;
|
|
1988
|
+
serialize(): SerializedStatus;
|
|
1989
|
+
get listeners(): Listeners<Listener>;
|
|
1990
|
+
get progress(): number;
|
|
1991
|
+
get cancelled(): boolean;
|
|
1992
|
+
get started(): Promise<void>;
|
|
1993
|
+
get completed(): Promise<void>;
|
|
1994
|
+
protected abstract run(): Promise<void>;
|
|
1995
|
+
protected getInitialStatus(): Status;
|
|
1996
|
+
protected beforeStart(): void;
|
|
1997
|
+
protected assertNotCancelled(): void;
|
|
1998
|
+
protected calculateCurrentProgress(status?: JobStatus): number;
|
|
1999
|
+
protected updateProgress(update?: (status: Status) => unknown): Promise<void>;
|
|
2000
|
+
protected serializeStatus(status: Status): SerializedStatus;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
export declare interface JobListener {
|
|
2004
|
+
onUpdated(progress: number): unknown;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
export declare interface JobStatus {
|
|
2008
|
+
completed: boolean;
|
|
2009
|
+
children?: JobStatus[];
|
|
1795
2010
|
}
|
|
1796
2011
|
|
|
1797
2012
|
export declare const Lang: Facade<LangService, LangService>;
|
|
@@ -1818,21 +2033,50 @@ declare class LangService extends _default_2 {
|
|
|
1818
2033
|
|
|
1819
2034
|
export declare type LangServices = typeof services_2;
|
|
1820
2035
|
|
|
2036
|
+
export declare type Layout = (typeof Layouts)[keyof typeof Layouts];
|
|
2037
|
+
|
|
2038
|
+
export declare const Layouts: {
|
|
2039
|
+
readonly Mobile: "mobile";
|
|
2040
|
+
readonly Desktop: "desktop";
|
|
2041
|
+
};
|
|
2042
|
+
|
|
2043
|
+
export declare function listenerProp<T extends Function = Function>(): OptionalProp<T | null>;
|
|
2044
|
+
|
|
1821
2045
|
export declare const loadingModalProps: {
|
|
2046
|
+
title: {
|
|
2047
|
+
type?: PropType<string | null> | undefined;
|
|
2048
|
+
validator?(value: unknown): boolean;
|
|
2049
|
+
} & {
|
|
2050
|
+
default: string | (() => string | null) | null;
|
|
2051
|
+
};
|
|
1822
2052
|
message: {
|
|
1823
2053
|
type?: PropType<string | null> | undefined;
|
|
1824
2054
|
validator?(value: unknown): boolean;
|
|
1825
2055
|
} & {
|
|
1826
2056
|
default: string | (() => string | null) | null;
|
|
1827
2057
|
};
|
|
2058
|
+
progress: {
|
|
2059
|
+
type?: PropType<number | null> | undefined;
|
|
2060
|
+
validator?(value: unknown): boolean;
|
|
2061
|
+
} & {
|
|
2062
|
+
default: number | (() => number | null) | null;
|
|
2063
|
+
};
|
|
1828
2064
|
};
|
|
1829
2065
|
|
|
2066
|
+
export declare type LoadingOptions = AcceptRefs<{
|
|
2067
|
+
title?: string;
|
|
2068
|
+
message?: string;
|
|
2069
|
+
progress?: number;
|
|
2070
|
+
}>;
|
|
2071
|
+
|
|
1830
2072
|
export declare type MeasureDirectiveListener = (size: ElementSize) => unknown;
|
|
1831
2073
|
|
|
1832
2074
|
export declare function mixedProp<T>(type?: PropType<T>): OptionalProp<T | null>;
|
|
1833
2075
|
|
|
1834
2076
|
export declare function mixedProp<T>(type: PropType<T>, defaultValue: T): OptionalProp<T>;
|
|
1835
2077
|
|
|
2078
|
+
export declare const MOBILE_BREAKPOINT = 768;
|
|
2079
|
+
|
|
1836
2080
|
declare interface Modal<T = unknown> {
|
|
1837
2081
|
id: string;
|
|
1838
2082
|
properties: Record<string, unknown>;
|
|
@@ -1853,6 +2097,12 @@ export declare const modalProps: {
|
|
|
1853
2097
|
} & {
|
|
1854
2098
|
default: boolean | (() => boolean) | null;
|
|
1855
2099
|
};
|
|
2100
|
+
inline: {
|
|
2101
|
+
type?: PropType<boolean> | undefined;
|
|
2102
|
+
validator?(value: unknown): boolean;
|
|
2103
|
+
} & {
|
|
2104
|
+
default: boolean | (() => boolean) | null;
|
|
2105
|
+
};
|
|
1856
2106
|
title: {
|
|
1857
2107
|
type?: PropType<string | null> | undefined;
|
|
1858
2108
|
validator?(value: unknown): boolean;
|
|
@@ -1863,7 +2113,9 @@ export declare const modalProps: {
|
|
|
1863
2113
|
|
|
1864
2114
|
declare type ModalResult<TComponent> = TComponent extends ModalComponent<Record<string, unknown>, infer TResult> ? TResult : never;
|
|
1865
2115
|
|
|
1866
|
-
export declare function numberInput(defaultValue?: number
|
|
2116
|
+
export declare function numberInput(defaultValue?: number, options?: {
|
|
2117
|
+
rules?: string;
|
|
2118
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Number>;
|
|
1867
2119
|
|
|
1868
2120
|
export declare function numberProp(): OptionalProp<number | null>;
|
|
1869
2121
|
|
|
@@ -1883,6 +2135,8 @@ declare type OptionalProp<T> = BaseProp<T> & {
|
|
|
1883
2135
|
default: T | (() => T) | null;
|
|
1884
2136
|
};
|
|
1885
2137
|
|
|
2138
|
+
export declare function persistent<T extends object>(name: string, defaults: T): UnwrapNestedRefs<T>;
|
|
2139
|
+
|
|
1886
2140
|
declare interface Plugin_2 {
|
|
1887
2141
|
name?: string;
|
|
1888
2142
|
install(app: App_2, options: AerogelOptions): void | Promise<void>;
|
|
@@ -1946,7 +2200,7 @@ export declare const promptModalProps: {
|
|
|
1946
2200
|
};
|
|
1947
2201
|
};
|
|
1948
2202
|
|
|
1949
|
-
export declare
|
|
2203
|
+
export declare type PromptOptions = AcceptRefs<{
|
|
1950
2204
|
label?: string;
|
|
1951
2205
|
defaultValue?: string;
|
|
1952
2206
|
placeholder?: string;
|
|
@@ -1955,10 +2209,20 @@ export declare interface PromptOptions {
|
|
|
1955
2209
|
cancelText?: string;
|
|
1956
2210
|
cancelColor?: Color;
|
|
1957
2211
|
trim?: boolean;
|
|
1958
|
-
}
|
|
2212
|
+
}>;
|
|
2213
|
+
|
|
2214
|
+
export declare type RefUnion<T> = T extends infer R ? Ref<R> : never;
|
|
2215
|
+
|
|
2216
|
+
export declare function registerErrorHandler(handler: ErrorHandler_2): void;
|
|
1959
2217
|
|
|
1960
2218
|
export declare function removeInteractiveClasses(classes: string): string;
|
|
1961
2219
|
|
|
2220
|
+
export declare type Replace<TOriginal extends Record<string, unknown>, TReplacements extends Partial<Record<keyof TOriginal, unknown>>> = {
|
|
2221
|
+
[K in keyof TOriginal]: TReplacements extends Record<K, infer Replacement> ? Replacement : TOriginal[K];
|
|
2222
|
+
};
|
|
2223
|
+
|
|
2224
|
+
export declare function replaceExisting<TOriginal extends Record<string, unknown>, TReplacements extends Partial<Record<keyof TOriginal, unknown>>>(original: TOriginal, replacements: TReplacements): Replace<TOriginal, TReplacements>;
|
|
2225
|
+
|
|
1962
2226
|
export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
|
|
1963
2227
|
|
|
1964
2228
|
export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
|
|
@@ -2020,14 +2284,17 @@ export declare const selectProps: {
|
|
|
2020
2284
|
};
|
|
2021
2285
|
};
|
|
2022
2286
|
|
|
2023
|
-
export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage
|
|
2287
|
+
export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>> extends MagicObject {
|
|
2024
2288
|
static persist: string[];
|
|
2025
2289
|
protected _name: string;
|
|
2026
2290
|
private _booted;
|
|
2027
2291
|
private _computedStateKeys;
|
|
2292
|
+
private _watchers;
|
|
2028
2293
|
private _store;
|
|
2029
2294
|
constructor();
|
|
2030
2295
|
get booted(): PromisedValue<void>;
|
|
2296
|
+
static<T extends typeof Service>(): T;
|
|
2297
|
+
static<T extends typeof Service, K extends keyof T>(property: K): T[K];
|
|
2031
2298
|
launch(): Promise<void>;
|
|
2032
2299
|
hasPersistedState(): boolean;
|
|
2033
2300
|
hasState<P extends keyof State>(property: P): boolean;
|
|
@@ -2035,17 +2302,22 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
|
|
|
2035
2302
|
getState<P extends keyof State>(property: P): State[P];
|
|
2036
2303
|
setState<P extends keyof State>(property: P, value: State[P]): void;
|
|
2037
2304
|
setState(state: Partial<State>): void;
|
|
2305
|
+
updatePersistedState<T extends keyof State>(key: T): void;
|
|
2306
|
+
updatePersistedState<T extends keyof State>(keys: T[]): void;
|
|
2038
2307
|
protected __get(property: string): unknown;
|
|
2039
2308
|
protected __set(property: string, value: unknown): void;
|
|
2040
|
-
protected onStateUpdated(
|
|
2309
|
+
protected onStateUpdated(update: Partial<State>, old: Partial<State>): void;
|
|
2310
|
+
protected onPersistentStateUpdated(persisted: Partial<State>): void;
|
|
2041
2311
|
protected usesStore(): boolean;
|
|
2042
2312
|
protected getName(): string | null;
|
|
2043
2313
|
protected getInitialState(): State;
|
|
2044
2314
|
protected getComputedStateDefinition(): ComputedStateDefinition<State, ComputedState>;
|
|
2045
|
-
protected
|
|
2315
|
+
protected getStateWatchers(): StateWatchers<Service, State>;
|
|
2316
|
+
protected serializePersistedState(state: Partial<State>): ServiceStorage;
|
|
2317
|
+
protected deserializePersistedState(state: ServiceStorage): Partial<State>;
|
|
2046
2318
|
protected frameworkBoot(): Promise<void>;
|
|
2047
2319
|
protected boot(): Promise<void>;
|
|
2048
|
-
protected
|
|
2320
|
+
protected restorePersistedState(): void;
|
|
2049
2321
|
protected requireStore(): Store<string, State, ComputedState, {}>;
|
|
2050
2322
|
}
|
|
2051
2323
|
|
|
@@ -2068,6 +2340,8 @@ declare const services_3: {
|
|
|
2068
2340
|
|
|
2069
2341
|
export declare type ServiceState = Record<string, any>;
|
|
2070
2342
|
|
|
2343
|
+
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>>>;
|
|
2344
|
+
|
|
2071
2345
|
export declare interface ShowSnackbarOptions {
|
|
2072
2346
|
component?: Component;
|
|
2073
2347
|
color?: SnackbarColor;
|
|
@@ -2122,7 +2396,20 @@ export declare const snackbarProps: {
|
|
|
2122
2396
|
};
|
|
2123
2397
|
};
|
|
2124
2398
|
|
|
2125
|
-
export declare
|
|
2399
|
+
export declare type StateWatchers<TService extends Service, TState extends ServiceState> = {
|
|
2400
|
+
[K in keyof TState]?: (this: TService, value: TState[K], oldValue: TState[K]) => unknown;
|
|
2401
|
+
};
|
|
2402
|
+
|
|
2403
|
+
declare const Storage_2: Facade<StorageService, StorageService>;
|
|
2404
|
+
export { Storage_2 as Storage }
|
|
2405
|
+
|
|
2406
|
+
declare class StorageService extends Service {
|
|
2407
|
+
purge(): Promise<void>;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
export declare function stringInput(defaultValue?: string, options?: {
|
|
2411
|
+
rules?: string;
|
|
2412
|
+
}): FormFieldDefinition<typeof FormFieldTypes.String>;
|
|
2126
2413
|
|
|
2127
2414
|
export declare function stringProp(): OptionalProp<string | null>;
|
|
2128
2415
|
|
|
@@ -2156,26 +2443,32 @@ export declare class UIService extends _default_4 {
|
|
|
2156
2443
|
alert(title: string, message: string): void;
|
|
2157
2444
|
confirm(message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
2158
2445
|
confirm(title: string, message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
2446
|
+
confirm<T extends ConfirmCheckboxes>(message: string, options?: ConfirmOptionsWithCheckboxes<T>): Promise<[boolean, Record<keyof T, boolean>]>;
|
|
2447
|
+
confirm<T extends ConfirmCheckboxes>(title: string, message: string, options?: ConfirmOptionsWithCheckboxes<T>): Promise<[boolean, Record<keyof T, boolean>]>;
|
|
2159
2448
|
prompt(message: string, options?: PromptOptions): Promise<string | null>;
|
|
2160
2449
|
prompt(title: string, message: string, options?: PromptOptions): Promise<string | null>;
|
|
2161
|
-
loading<T>(operation: Promise<T>): Promise<T>;
|
|
2162
|
-
loading<T>(message: string, operation: Promise<T>): Promise<T>;
|
|
2450
|
+
loading<T>(operation: Promise<T> | (() => T)): Promise<T>;
|
|
2451
|
+
loading<T>(message: string, operation: Promise<T> | (() => T)): Promise<T>;
|
|
2452
|
+
loading<T>(options: LoadingOptions, operation: Promise<T> | (() => T)): Promise<T>;
|
|
2163
2453
|
showSnackbar(message: string, options?: ShowSnackbarOptions): void;
|
|
2164
2454
|
hideSnackbar(id: string): void;
|
|
2165
2455
|
registerComponent(name: UIComponent, component: Component): void;
|
|
2166
2456
|
openModal<TModalComponent extends ModalComponent>(component: TModalComponent, properties?: ModalProperties<TModalComponent>): Promise<Modal<ModalResult<TModalComponent>>>;
|
|
2167
2457
|
closeModal(id: string, result?: unknown): Promise<void>;
|
|
2458
|
+
closeAllModals(): Promise<void>;
|
|
2168
2459
|
protected boot(): Promise<void>;
|
|
2460
|
+
private removeModal;
|
|
2169
2461
|
private watchModalEvents;
|
|
2170
2462
|
private watchMountedEvent;
|
|
2463
|
+
private watchViewportBreakpoints;
|
|
2171
2464
|
}
|
|
2172
2465
|
|
|
2173
2466
|
export declare type UIServices = typeof services_3;
|
|
2174
2467
|
|
|
2175
2468
|
export declare type UnknownEvent<T> = T extends keyof EventsPayload ? never : T;
|
|
2176
2469
|
|
|
2177
|
-
export declare type
|
|
2178
|
-
[K in keyof
|
|
2470
|
+
export declare type Unref<T> = {
|
|
2471
|
+
[K in keyof T]: T[K] extends MaybeRef<infer Value> ? Value : T[K];
|
|
2179
2472
|
};
|
|
2180
2473
|
|
|
2181
2474
|
export declare function useAlertModalProps(): typeof alertModalProps;
|
|
@@ -2213,6 +2506,7 @@ export declare function useInputProps(): typeof inputProps;
|
|
|
2213
2506
|
|
|
2214
2507
|
export declare function useLoadingModal(props: ExtractPropTypes<typeof loadingModalProps>): {
|
|
2215
2508
|
renderedMessage: ComputedRef<string>;
|
|
2509
|
+
showProgress: ComputedRef<boolean>;
|
|
2216
2510
|
};
|
|
2217
2511
|
|
|
2218
2512
|
export declare function useLoadingModalProps(): typeof loadingModalProps;
|
|
@@ -2238,6 +2532,10 @@ export declare function useSnackbar(props: ExtractPropTypes<typeof snackbarProps
|
|
|
2238
2532
|
|
|
2239
2533
|
export declare function useSnackbarProps(): typeof snackbarProps;
|
|
2240
2534
|
|
|
2535
|
+
export declare function validate(value: unknown, rule: string): string[];
|
|
2536
|
+
|
|
2537
|
+
export declare const validators: Record<string, FormFieldValidator>;
|
|
2538
|
+
|
|
2241
2539
|
export { }
|
|
2242
2540
|
|
|
2243
2541
|
export interface EventsPayload {
|
|
@@ -2272,6 +2570,10 @@ declare global {
|
|
|
2272
2570
|
var __aerogelEvents__: AerogelGlobalEvents | undefined;
|
|
2273
2571
|
}
|
|
2274
2572
|
|
|
2573
|
+
export interface EventsPayload {
|
|
2574
|
+
'purge-storage': void;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2275
2577
|
export interface AerogelOptions {
|
|
2276
2578
|
services?: Record<string, Service>;
|
|
2277
2579
|
}
|