@aerogel/core 0.0.0-next.bde642c4a8096c5fc3d5e676c2115da23f4bf1d8 → 0.0.0-next.c29ffcd25bffdbed37ecce3aac1ba14cde3e9d39
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 +389 -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 +45 -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 +2 -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,62 @@ 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 | null> | undefined;
|
|
1146
|
+
validator?(value: unknown): boolean;
|
|
1147
|
+
} & {
|
|
1148
|
+
default: number | (() => number | null) | null;
|
|
1149
|
+
};
|
|
1150
|
+
barClass: {
|
|
1151
|
+
type?: PropType<string> | undefined;
|
|
1152
|
+
validator?(value: unknown): boolean;
|
|
1153
|
+
} & {
|
|
1154
|
+
default: string | (() => string) | null;
|
|
1155
|
+
};
|
|
1156
|
+
job: {
|
|
1157
|
+
type?: PropType<Job<JobListener, JobStatus, JobStatus> | null> | undefined;
|
|
1158
|
+
validator?(value: unknown): boolean;
|
|
1159
|
+
} & {
|
|
1160
|
+
default: Job<JobListener, JobStatus, JobStatus> | (() => Job<JobListener, JobStatus, JobStatus> | null) | null;
|
|
1161
|
+
};
|
|
1162
|
+
}, (_ctx: any, _cache: any) => VNode<RendererNode, RendererElement, {
|
|
1163
|
+
[key: string]: any;
|
|
1164
|
+
}>, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1165
|
+
progress: {
|
|
1166
|
+
type?: PropType<number | null> | undefined;
|
|
1167
|
+
validator?(value: unknown): boolean;
|
|
1168
|
+
} & {
|
|
1169
|
+
default: number | (() => number | null) | null;
|
|
1170
|
+
};
|
|
1171
|
+
barClass: {
|
|
1172
|
+
type?: PropType<string> | undefined;
|
|
1173
|
+
validator?(value: unknown): boolean;
|
|
1174
|
+
} & {
|
|
1175
|
+
default: string | (() => string) | null;
|
|
1176
|
+
};
|
|
1177
|
+
job: {
|
|
1178
|
+
type?: PropType<Job<JobListener, JobStatus, JobStatus> | null> | undefined;
|
|
1179
|
+
validator?(value: unknown): boolean;
|
|
1180
|
+
} & {
|
|
1181
|
+
default: Job<JobListener, JobStatus, JobStatus> | (() => Job<JobListener, JobStatus, JobStatus> | null) | null;
|
|
1182
|
+
};
|
|
1183
|
+
}>>, {
|
|
1184
|
+
progress: number | null;
|
|
1185
|
+
barClass: string;
|
|
1186
|
+
job: Job<JobListener, JobStatus, JobStatus> | null;
|
|
1187
|
+
}, {}>;
|
|
1188
|
+
|
|
1029
1189
|
export declare const AGPromptModal: DefineComponent< {
|
|
1030
1190
|
title: {
|
|
1031
1191
|
type?: PropType<string | null> | undefined;
|
|
@@ -1149,7 +1309,7 @@ cancelText: string | null;
|
|
|
1149
1309
|
cancelColor: "primary" | "secondary" | "danger" | "clear";
|
|
1150
1310
|
}, {}>;
|
|
1151
1311
|
|
|
1152
|
-
export declare type AGPromptModalProps = SubPartial<
|
|
1312
|
+
export declare type AGPromptModalProps = Pretty<AcceptRefs<SubPartial<ObjectWithout<ExtractPropTypes<typeof promptModalProps>, null | undefined>, 'acceptColor' | 'cancelColor'>>>;
|
|
1153
1313
|
|
|
1154
1314
|
export declare const AGSelect: DefineComponent< {
|
|
1155
1315
|
name: {
|
|
@@ -1313,6 +1473,7 @@ export declare class AppService extends _default_3 {
|
|
|
1313
1473
|
whenReady<T>(callback: () => T): Promise<T>;
|
|
1314
1474
|
reload(queryParameters?: Record<string, string | undefined>): Promise<void>;
|
|
1315
1475
|
plugin<T extends Plugin_2 = Plugin_2>(name: string): T | null;
|
|
1476
|
+
service<T extends keyof Services>(name: T): Services[T] | null;
|
|
1316
1477
|
protected boot(): Promise<void>;
|
|
1317
1478
|
}
|
|
1318
1479
|
|
|
@@ -1323,7 +1484,9 @@ declare type BaseProp<T> = {
|
|
|
1323
1484
|
validator?(value: unknown): boolean;
|
|
1324
1485
|
};
|
|
1325
1486
|
|
|
1326
|
-
export declare function booleanInput(defaultValue?: boolean
|
|
1487
|
+
export declare function booleanInput(defaultValue?: boolean, options?: {
|
|
1488
|
+
rules?: string;
|
|
1489
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Boolean>;
|
|
1327
1490
|
|
|
1328
1491
|
export declare function booleanProp(defaultValue?: boolean): OptionalProp<boolean>;
|
|
1329
1492
|
|
|
@@ -1360,11 +1523,17 @@ export declare function componentRef<T>(): Ref<UnwrapNestedRefs<T> | undefined>;
|
|
|
1360
1523
|
export declare function computedAsync<T>(getter: () => Promise<T>): Ref<T | undefined>;
|
|
1361
1524
|
|
|
1362
1525
|
export declare type ComputedStateDefinition<TState extends ServiceState, TComputedState extends ServiceState> = {
|
|
1363
|
-
[K in keyof TComputedState]: (state:
|
|
1526
|
+
[K in keyof TComputedState]: (state: Unref<TState>) => TComputedState[K];
|
|
1364
1527
|
} & ThisType<{
|
|
1365
1528
|
readonly [K in keyof TComputedState]: TComputedState[K];
|
|
1366
1529
|
}>;
|
|
1367
1530
|
|
|
1531
|
+
export declare type ConfirmCheckboxes = Record<string, {
|
|
1532
|
+
label: string;
|
|
1533
|
+
default?: boolean;
|
|
1534
|
+
required?: boolean;
|
|
1535
|
+
}>;
|
|
1536
|
+
|
|
1368
1537
|
export declare const confirmModalProps: {
|
|
1369
1538
|
title: {
|
|
1370
1539
|
type?: PropType<string | null> | undefined;
|
|
@@ -1402,108 +1571,123 @@ export declare const confirmModalProps: {
|
|
|
1402
1571
|
} & {
|
|
1403
1572
|
default: "primary" | "secondary" | "danger" | "clear" | (() => "primary" | "secondary" | "danger" | "clear") | null;
|
|
1404
1573
|
};
|
|
1574
|
+
checkboxes: {
|
|
1575
|
+
type?: PropType<ConfirmCheckboxes | null> | undefined;
|
|
1576
|
+
validator?(value: unknown): boolean;
|
|
1577
|
+
} & {
|
|
1578
|
+
default: ConfirmCheckboxes | (() => ConfirmCheckboxes | null) | null;
|
|
1579
|
+
};
|
|
1580
|
+
actions: {
|
|
1581
|
+
type?: PropType<Record<string, () => unknown> | null> | undefined;
|
|
1582
|
+
validator?(value: unknown): boolean;
|
|
1583
|
+
} & {
|
|
1584
|
+
default: Record<string, () => unknown> | (() => Record<string, () => unknown> | null) | null;
|
|
1585
|
+
};
|
|
1586
|
+
required: {
|
|
1587
|
+
type?: PropType<boolean> | undefined;
|
|
1588
|
+
validator?(value: unknown): boolean;
|
|
1589
|
+
} & {
|
|
1590
|
+
default: boolean | (() => boolean) | null;
|
|
1591
|
+
};
|
|
1405
1592
|
};
|
|
1406
1593
|
|
|
1407
|
-
export declare
|
|
1594
|
+
export declare type ConfirmOptions = AcceptRefs<{
|
|
1408
1595
|
acceptText?: string;
|
|
1409
1596
|
acceptColor?: Color;
|
|
1410
1597
|
cancelText?: string;
|
|
1411
1598
|
cancelColor?: Color;
|
|
1599
|
+
actions?: Record<string, () => unknown>;
|
|
1600
|
+
required?: boolean;
|
|
1601
|
+
}>;
|
|
1602
|
+
|
|
1603
|
+
export declare interface ConfirmOptionsWithCheckboxes<T extends ConfirmCheckboxes = ConfirmCheckboxes> extends ConfirmOptions {
|
|
1604
|
+
checkboxes?: T;
|
|
1412
1605
|
}
|
|
1413
1606
|
|
|
1414
|
-
export declare function dateInput(defaultValue?: Date
|
|
1607
|
+
export declare function dateInput(defaultValue?: Date, options?: {
|
|
1608
|
+
rules?: string;
|
|
1609
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Date>;
|
|
1415
1610
|
|
|
1416
|
-
declare const _default:
|
|
1611
|
+
declare const _default: ServiceWithState< {
|
|
1417
1612
|
logs: ErrorReportLog[];
|
|
1418
1613
|
startupErrors: ErrorReport[];
|
|
1419
|
-
}
|
|
1420
|
-
hasErrors: boolean;
|
|
1421
|
-
hasNewErrors: boolean;
|
|
1422
|
-
hasStartupErrors: boolean;
|
|
1423
|
-
}> & Constructor<Service<UnrefServiceState< {
|
|
1424
|
-
logs: ErrorReportLog[];
|
|
1425
|
-
startupErrors: ErrorReport[];
|
|
1426
|
-
}>, {
|
|
1614
|
+
}, {
|
|
1427
1615
|
hasErrors: boolean;
|
|
1428
1616
|
hasNewErrors: boolean;
|
|
1429
1617
|
hasStartupErrors: boolean;
|
|
1430
|
-
}, Partial<
|
|
1618
|
+
}, Partial<{
|
|
1431
1619
|
logs: ErrorReportLog[];
|
|
1432
1620
|
startupErrors: ErrorReport[];
|
|
1433
|
-
}
|
|
1621
|
+
}>>;
|
|
1434
1622
|
|
|
1435
|
-
declare const _default_2:
|
|
1436
|
-
locale: string | null;
|
|
1437
|
-
locales: string[];
|
|
1438
|
-
fallbackLocale: string;
|
|
1439
|
-
}>> & Constructor< {}> & Constructor<Service<UnrefServiceState< {
|
|
1623
|
+
declare const _default_2: ServiceWithState< {
|
|
1440
1624
|
locale: string | null;
|
|
1441
1625
|
locales: string[];
|
|
1442
1626
|
fallbackLocale: string;
|
|
1443
|
-
}
|
|
1627
|
+
}, {}, Partial<{
|
|
1444
1628
|
locale: string | null;
|
|
1445
1629
|
locales: string[];
|
|
1446
1630
|
fallbackLocale: string;
|
|
1447
|
-
}
|
|
1631
|
+
}>>;
|
|
1448
1632
|
|
|
1449
|
-
declare const _default_3:
|
|
1633
|
+
declare const _default_3: ServiceWithState< {
|
|
1450
1634
|
plugins: Record<string, Plugin_2>;
|
|
1635
|
+
instance: App_2<any> | null;
|
|
1451
1636
|
environment: string;
|
|
1452
1637
|
version: string;
|
|
1453
1638
|
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
|
-
}>, {
|
|
1639
|
+
}, {
|
|
1465
1640
|
development: boolean;
|
|
1641
|
+
staging: boolean;
|
|
1466
1642
|
testing: boolean;
|
|
1467
1643
|
versionName: string;
|
|
1468
1644
|
versionUrl: string;
|
|
1469
|
-
}, Partial<
|
|
1645
|
+
}, Partial<{
|
|
1470
1646
|
plugins: Record<string, Plugin_2>;
|
|
1647
|
+
instance: App_2<any> | null;
|
|
1471
1648
|
environment: string;
|
|
1472
1649
|
version: string;
|
|
1473
1650
|
sourceUrl: string | undefined;
|
|
1474
|
-
}
|
|
1651
|
+
}>>;
|
|
1475
1652
|
|
|
1476
|
-
declare const _default_4:
|
|
1477
|
-
modals: Modal<unknown>[];
|
|
1478
|
-
snackbars: Snackbar[];
|
|
1479
|
-
}>> & Constructor< {}> & Constructor<Service<UnrefServiceState< {
|
|
1653
|
+
declare const _default_4: ServiceWithState< {
|
|
1480
1654
|
modals: Modal<unknown>[];
|
|
1481
1655
|
snackbars: Snackbar[];
|
|
1482
|
-
|
|
1656
|
+
layout: Layout;
|
|
1657
|
+
}, {
|
|
1658
|
+
mobile: boolean;
|
|
1659
|
+
desktop: boolean;
|
|
1660
|
+
}, Partial<{
|
|
1483
1661
|
modals: Modal<unknown>[];
|
|
1484
1662
|
snackbars: Snackbar[];
|
|
1485
|
-
|
|
1663
|
+
layout: Layout;
|
|
1664
|
+
}>>;
|
|
1486
1665
|
|
|
1487
1666
|
export declare type DefaultServices = typeof defaultServices;
|
|
1488
1667
|
|
|
1489
1668
|
declare const defaultServices: {
|
|
1490
1669
|
$app: Facade<AppService, AppService>;
|
|
1491
1670
|
$events: Facade<EventsService, EventsService>;
|
|
1671
|
+
$storage: Facade<StorageService, StorageService>;
|
|
1492
1672
|
};
|
|
1493
1673
|
|
|
1494
1674
|
export declare type DefaultServiceState = any;
|
|
1495
1675
|
|
|
1496
1676
|
export declare function defineDirective(directive: Directive): Directive;
|
|
1497
1677
|
|
|
1678
|
+
export declare function defineFormValidationRule<T>(rule: string, validator: FormFieldValidator<T>): void;
|
|
1679
|
+
|
|
1498
1680
|
export declare function definePlugin<T extends Plugin_2>(plugin: T): T;
|
|
1499
1681
|
|
|
1500
|
-
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}
|
|
1682
|
+
export declare function defineServiceState<State extends ServiceState = ServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>>(options: {
|
|
1501
1683
|
name: string;
|
|
1502
1684
|
initialState: State | (() => State);
|
|
1503
1685
|
persist?: (keyof State)[];
|
|
1686
|
+
watch?: StateWatchers<Service, State>;
|
|
1504
1687
|
computed?: ComputedStateDefinition<State, ComputedState>;
|
|
1505
|
-
serialize?: (state: Partial<State>) =>
|
|
1506
|
-
|
|
1688
|
+
serialize?: (state: Partial<State>) => ServiceStorage;
|
|
1689
|
+
restore?: (state: ServiceStorage) => Partial<State>;
|
|
1690
|
+
}): ServiceWithState<State, ComputedState, ServiceStorage>;
|
|
1507
1691
|
|
|
1508
1692
|
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
1693
|
|
|
@@ -1520,6 +1704,8 @@ export declare function enumProp<Enum extends Record<string, unknown>>(enumerati
|
|
|
1520
1704
|
|
|
1521
1705
|
export declare type ErrorHandler = (error: ErrorSource) => boolean;
|
|
1522
1706
|
|
|
1707
|
+
declare type ErrorHandler_2 = (error: ErrorSource) => string | undefined;
|
|
1708
|
+
|
|
1523
1709
|
export declare interface ErrorReport {
|
|
1524
1710
|
title: string;
|
|
1525
1711
|
description?: string;
|
|
@@ -1567,7 +1753,7 @@ declare type EventListener_2<T = unknown> = (payload: T) => unknown;
|
|
|
1567
1753
|
export { EventListener_2 as EventListener }
|
|
1568
1754
|
|
|
1569
1755
|
declare interface EventListenerOptions_2 {
|
|
1570
|
-
priority:
|
|
1756
|
+
priority: EventListenerPriority;
|
|
1571
1757
|
}
|
|
1572
1758
|
export { EventListenerOptions_2 as EventListenerOptions }
|
|
1573
1759
|
|
|
@@ -1577,6 +1763,8 @@ export declare const EventListenerPriorities: {
|
|
|
1577
1763
|
readonly High: 256;
|
|
1578
1764
|
};
|
|
1579
1765
|
|
|
1766
|
+
export declare type EventListenerPriority = (typeof EventListenerPriorities)[keyof typeof EventListenerPriorities];
|
|
1767
|
+
|
|
1580
1768
|
export declare const Events: Facade<EventsService, EventsService>;
|
|
1581
1769
|
|
|
1582
1770
|
export declare interface EventsPayload {
|
|
@@ -1589,10 +1777,13 @@ export declare class EventsService extends Service {
|
|
|
1589
1777
|
emit<Event extends EventWithPayload>(event: Event, payload: EventsPayload[Event]): Promise<void>;
|
|
1590
1778
|
emit<Event extends string>(event: UnknownEvent<Event>, payload?: unknown): Promise<void>;
|
|
1591
1779
|
on<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1780
|
+
on<Event extends EventWithoutPayload>(event: Event, priority: EventListenerPriority, listener: () => unknown): () => void;
|
|
1592
1781
|
on<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
1593
1782
|
on<Event extends EventWithPayload>(event: Event, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1783
|
+
on<Event extends EventWithPayload>(event: Event, priority: EventListenerPriority, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1594
1784
|
on<Event extends EventWithPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: EventListener_2<EventsPayload[Event]>): () => void | void;
|
|
1595
1785
|
on<Event extends string>(event: UnknownEvent<Event>, listener: EventListener_2): () => void;
|
|
1786
|
+
on<Event extends string>(event: UnknownEvent<Event>, priority: EventListenerPriority, listener: EventListener_2): () => void;
|
|
1596
1787
|
on<Event extends string>(event: UnknownEvent<Event>, options: Partial<EventListenerOptions_2>, listener: EventListener_2): () => void;
|
|
1597
1788
|
once<Event extends EventWithoutPayload>(event: Event, listener: () => unknown): () => void;
|
|
1598
1789
|
once<Event extends EventWithoutPayload>(event: Event, options: Partial<EventListenerOptions_2>, listener: () => unknown): () => void;
|
|
@@ -1632,6 +1823,7 @@ export declare class Form<Fields extends FormFieldDefinitions = FormFieldDefinit
|
|
|
1632
1823
|
get submitted(): boolean;
|
|
1633
1824
|
setFieldValue<T extends keyof Fields>(field: T, value: FormData_2<Fields>[T]): void;
|
|
1634
1825
|
getFieldValue<T extends keyof Fields>(field: T): GetFormFieldValue<Fields[T]['type']>;
|
|
1826
|
+
getFieldRules<T extends keyof Fields>(field: T): string[];
|
|
1635
1827
|
data(): FormData_2<Fields>;
|
|
1636
1828
|
validate(): boolean;
|
|
1637
1829
|
reset(options?: {
|
|
@@ -1664,6 +1856,7 @@ export declare type FormErrors<T> = {
|
|
|
1664
1856
|
|
|
1665
1857
|
export declare interface FormFieldDefinition<TType extends FormFieldType = FormFieldType, TRules extends string = string> {
|
|
1666
1858
|
type: TType;
|
|
1859
|
+
trim?: boolean;
|
|
1667
1860
|
default?: GetFormFieldValue<TType>;
|
|
1668
1861
|
rules?: TRules;
|
|
1669
1862
|
}
|
|
@@ -1680,8 +1873,12 @@ export declare const FormFieldTypes: {
|
|
|
1680
1873
|
readonly Date: "date";
|
|
1681
1874
|
};
|
|
1682
1875
|
|
|
1876
|
+
export declare type FormFieldValidator<T = unknown> = (value: T) => string | string[] | undefined;
|
|
1877
|
+
|
|
1683
1878
|
export declare type FormFieldValue = GetFormFieldValue<FormFieldType>;
|
|
1684
1879
|
|
|
1880
|
+
export declare function getCurrentLayout(): Layout;
|
|
1881
|
+
|
|
1685
1882
|
export declare function getElement(value: unknown): HTMLElement | undefined;
|
|
1686
1883
|
|
|
1687
1884
|
export declare function getErrorMessage(error: ErrorSource): string;
|
|
@@ -1713,6 +1910,7 @@ export declare interface IAGHeadlessInput extends HasElement {
|
|
|
1713
1910
|
label: ComputedRef<string | null>;
|
|
1714
1911
|
description: ComputedRef<string | boolean | null>;
|
|
1715
1912
|
value: ComputedRef<FormFieldValue | null>;
|
|
1913
|
+
required: ComputedRef<boolean | null>;
|
|
1716
1914
|
errors: DeepReadonly<Ref<string[] | null>>;
|
|
1717
1915
|
update(value: FormFieldValue | null): void;
|
|
1718
1916
|
}
|
|
@@ -1742,6 +1940,7 @@ export declare type IAGHeadlessSelectOptionSlotProps = {
|
|
|
1742
1940
|
};
|
|
1743
1941
|
|
|
1744
1942
|
export declare interface IAGModal {
|
|
1943
|
+
inline: Ref<boolean>;
|
|
1745
1944
|
cancellable: Ref<boolean>;
|
|
1746
1945
|
close(result?: unknown): Promise<void>;
|
|
1747
1946
|
}
|
|
@@ -1790,8 +1989,38 @@ export declare const inputProps: {
|
|
|
1790
1989
|
|
|
1791
1990
|
export declare function installPlugins(plugins: Plugin_2[], ...args: GetClosureArgs<Plugin_2['install']>): Promise<void>;
|
|
1792
1991
|
|
|
1793
|
-
export declare abstract class Job {
|
|
1794
|
-
|
|
1992
|
+
export declare abstract class Job<Listener extends JobListener = JobListener, Status extends JobStatus = JobStatus, SerializedStatus extends JobStatus = JobStatus> {
|
|
1993
|
+
protected status: Status;
|
|
1994
|
+
protected _listeners: ListenersManager<JobListener>;
|
|
1995
|
+
protected _progress?: number;
|
|
1996
|
+
protected _cancelled?: PromisedValue<void>;
|
|
1997
|
+
protected _started: PromisedValue<void>;
|
|
1998
|
+
protected _completed: PromisedValue<void>;
|
|
1999
|
+
constructor();
|
|
2000
|
+
start(): Promise<void>;
|
|
2001
|
+
cancel(): Promise<void>;
|
|
2002
|
+
serialize(): SerializedStatus;
|
|
2003
|
+
get listeners(): Listeners<Listener>;
|
|
2004
|
+
get progress(): number;
|
|
2005
|
+
get cancelled(): boolean;
|
|
2006
|
+
get started(): Promise<void>;
|
|
2007
|
+
get completed(): Promise<void>;
|
|
2008
|
+
protected abstract run(): Promise<void>;
|
|
2009
|
+
protected getInitialStatus(): Status;
|
|
2010
|
+
protected beforeStart(): void;
|
|
2011
|
+
protected assertNotCancelled(): void;
|
|
2012
|
+
protected calculateCurrentProgress(status?: JobStatus): number;
|
|
2013
|
+
protected updateProgress(update?: (status: Status) => unknown): Promise<void>;
|
|
2014
|
+
protected serializeStatus(status: Status): SerializedStatus;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
export declare interface JobListener {
|
|
2018
|
+
onUpdated?(progress: number): unknown;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
export declare interface JobStatus {
|
|
2022
|
+
completed: boolean;
|
|
2023
|
+
children?: JobStatus[];
|
|
1795
2024
|
}
|
|
1796
2025
|
|
|
1797
2026
|
export declare const Lang: Facade<LangService, LangService>;
|
|
@@ -1818,21 +2047,50 @@ declare class LangService extends _default_2 {
|
|
|
1818
2047
|
|
|
1819
2048
|
export declare type LangServices = typeof services_2;
|
|
1820
2049
|
|
|
2050
|
+
export declare type Layout = (typeof Layouts)[keyof typeof Layouts];
|
|
2051
|
+
|
|
2052
|
+
export declare const Layouts: {
|
|
2053
|
+
readonly Mobile: "mobile";
|
|
2054
|
+
readonly Desktop: "desktop";
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
export declare function listenerProp<T extends Function = Function>(): OptionalProp<T | null>;
|
|
2058
|
+
|
|
1821
2059
|
export declare const loadingModalProps: {
|
|
2060
|
+
title: {
|
|
2061
|
+
type?: PropType<string | null> | undefined;
|
|
2062
|
+
validator?(value: unknown): boolean;
|
|
2063
|
+
} & {
|
|
2064
|
+
default: string | (() => string | null) | null;
|
|
2065
|
+
};
|
|
1822
2066
|
message: {
|
|
1823
2067
|
type?: PropType<string | null> | undefined;
|
|
1824
2068
|
validator?(value: unknown): boolean;
|
|
1825
2069
|
} & {
|
|
1826
2070
|
default: string | (() => string | null) | null;
|
|
1827
2071
|
};
|
|
2072
|
+
progress: {
|
|
2073
|
+
type?: PropType<number | null> | undefined;
|
|
2074
|
+
validator?(value: unknown): boolean;
|
|
2075
|
+
} & {
|
|
2076
|
+
default: number | (() => number | null) | null;
|
|
2077
|
+
};
|
|
1828
2078
|
};
|
|
1829
2079
|
|
|
2080
|
+
export declare type LoadingOptions = AcceptRefs<{
|
|
2081
|
+
title?: string;
|
|
2082
|
+
message?: string;
|
|
2083
|
+
progress?: number;
|
|
2084
|
+
}>;
|
|
2085
|
+
|
|
1830
2086
|
export declare type MeasureDirectiveListener = (size: ElementSize) => unknown;
|
|
1831
2087
|
|
|
1832
2088
|
export declare function mixedProp<T>(type?: PropType<T>): OptionalProp<T | null>;
|
|
1833
2089
|
|
|
1834
2090
|
export declare function mixedProp<T>(type: PropType<T>, defaultValue: T): OptionalProp<T>;
|
|
1835
2091
|
|
|
2092
|
+
export declare const MOBILE_BREAKPOINT = 768;
|
|
2093
|
+
|
|
1836
2094
|
declare interface Modal<T = unknown> {
|
|
1837
2095
|
id: string;
|
|
1838
2096
|
properties: Record<string, unknown>;
|
|
@@ -1853,6 +2111,12 @@ export declare const modalProps: {
|
|
|
1853
2111
|
} & {
|
|
1854
2112
|
default: boolean | (() => boolean) | null;
|
|
1855
2113
|
};
|
|
2114
|
+
inline: {
|
|
2115
|
+
type?: PropType<boolean> | undefined;
|
|
2116
|
+
validator?(value: unknown): boolean;
|
|
2117
|
+
} & {
|
|
2118
|
+
default: boolean | (() => boolean) | null;
|
|
2119
|
+
};
|
|
1856
2120
|
title: {
|
|
1857
2121
|
type?: PropType<string | null> | undefined;
|
|
1858
2122
|
validator?(value: unknown): boolean;
|
|
@@ -1863,7 +2127,9 @@ export declare const modalProps: {
|
|
|
1863
2127
|
|
|
1864
2128
|
declare type ModalResult<TComponent> = TComponent extends ModalComponent<Record<string, unknown>, infer TResult> ? TResult : never;
|
|
1865
2129
|
|
|
1866
|
-
export declare function numberInput(defaultValue?: number
|
|
2130
|
+
export declare function numberInput(defaultValue?: number, options?: {
|
|
2131
|
+
rules?: string;
|
|
2132
|
+
}): FormFieldDefinition<typeof FormFieldTypes.Number>;
|
|
1867
2133
|
|
|
1868
2134
|
export declare function numberProp(): OptionalProp<number | null>;
|
|
1869
2135
|
|
|
@@ -1883,6 +2149,8 @@ declare type OptionalProp<T> = BaseProp<T> & {
|
|
|
1883
2149
|
default: T | (() => T) | null;
|
|
1884
2150
|
};
|
|
1885
2151
|
|
|
2152
|
+
export declare function persistent<T extends object>(name: string, defaults: T): UnwrapNestedRefs<T>;
|
|
2153
|
+
|
|
1886
2154
|
declare interface Plugin_2 {
|
|
1887
2155
|
name?: string;
|
|
1888
2156
|
install(app: App_2, options: AerogelOptions): void | Promise<void>;
|
|
@@ -1946,7 +2214,7 @@ export declare const promptModalProps: {
|
|
|
1946
2214
|
};
|
|
1947
2215
|
};
|
|
1948
2216
|
|
|
1949
|
-
export declare
|
|
2217
|
+
export declare type PromptOptions = AcceptRefs<{
|
|
1950
2218
|
label?: string;
|
|
1951
2219
|
defaultValue?: string;
|
|
1952
2220
|
placeholder?: string;
|
|
@@ -1955,10 +2223,22 @@ export declare interface PromptOptions {
|
|
|
1955
2223
|
cancelText?: string;
|
|
1956
2224
|
cancelColor?: Color;
|
|
1957
2225
|
trim?: boolean;
|
|
1958
|
-
}
|
|
2226
|
+
}>;
|
|
2227
|
+
|
|
2228
|
+
export declare type RefUnion<T> = T extends infer R ? Ref<R> : never;
|
|
2229
|
+
|
|
2230
|
+
export declare function registerErrorHandler(handler: ErrorHandler_2): void;
|
|
1959
2231
|
|
|
1960
2232
|
export declare function removeInteractiveClasses(classes: string): string;
|
|
1961
2233
|
|
|
2234
|
+
export declare function renderMarkdown(markdown: string): string;
|
|
2235
|
+
|
|
2236
|
+
export declare type Replace<TOriginal extends Record<string, unknown>, TReplacements extends Partial<Record<keyof TOriginal, unknown>>> = {
|
|
2237
|
+
[K in keyof TOriginal]: TReplacements extends Record<K, infer Replacement> ? Replacement : TOriginal[K];
|
|
2238
|
+
};
|
|
2239
|
+
|
|
2240
|
+
export declare function replaceExisting<TOriginal extends Record<string, unknown>, TReplacements extends Partial<Record<keyof TOriginal, unknown>>>(original: TOriginal, replacements: TReplacements): Replace<TOriginal, TReplacements>;
|
|
2241
|
+
|
|
1962
2242
|
export declare function requiredArrayProp<T>(): RequiredProp<T[]>;
|
|
1963
2243
|
|
|
1964
2244
|
export declare function requiredBooleanInput(defaultValue?: boolean): FormFieldDefinition<typeof FormFieldTypes.Boolean, 'required'>;
|
|
@@ -1985,6 +2265,8 @@ export declare function requiredStringProp(): RequiredProp<string>;
|
|
|
1985
2265
|
|
|
1986
2266
|
export declare function resetPiniaStore(): Pinia;
|
|
1987
2267
|
|
|
2268
|
+
export declare function safeHtml(html: string): string;
|
|
2269
|
+
|
|
1988
2270
|
export declare const selectEmits: readonly ["update:modelValue"];
|
|
1989
2271
|
|
|
1990
2272
|
export declare const selectProps: {
|
|
@@ -2020,14 +2302,17 @@ export declare const selectProps: {
|
|
|
2020
2302
|
};
|
|
2021
2303
|
};
|
|
2022
2304
|
|
|
2023
|
-
export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage
|
|
2305
|
+
export declare class Service<State extends ServiceState = DefaultServiceState, ComputedState extends ServiceState = {}, ServiceStorage = Partial<State>> extends MagicObject {
|
|
2024
2306
|
static persist: string[];
|
|
2025
2307
|
protected _name: string;
|
|
2026
2308
|
private _booted;
|
|
2027
2309
|
private _computedStateKeys;
|
|
2310
|
+
private _watchers;
|
|
2028
2311
|
private _store;
|
|
2029
2312
|
constructor();
|
|
2030
2313
|
get booted(): PromisedValue<void>;
|
|
2314
|
+
static<T extends typeof Service>(): T;
|
|
2315
|
+
static<T extends typeof Service, K extends keyof T>(property: K): T[K];
|
|
2031
2316
|
launch(): Promise<void>;
|
|
2032
2317
|
hasPersistedState(): boolean;
|
|
2033
2318
|
hasState<P extends keyof State>(property: P): boolean;
|
|
@@ -2035,17 +2320,22 @@ export declare class Service<State extends ServiceState = DefaultServiceState, C
|
|
|
2035
2320
|
getState<P extends keyof State>(property: P): State[P];
|
|
2036
2321
|
setState<P extends keyof State>(property: P, value: State[P]): void;
|
|
2037
2322
|
setState(state: Partial<State>): void;
|
|
2323
|
+
updatePersistedState<T extends keyof State>(key: T): void;
|
|
2324
|
+
updatePersistedState<T extends keyof State>(keys: T[]): void;
|
|
2038
2325
|
protected __get(property: string): unknown;
|
|
2039
2326
|
protected __set(property: string, value: unknown): void;
|
|
2040
|
-
protected onStateUpdated(
|
|
2327
|
+
protected onStateUpdated(update: Partial<State>, old: Partial<State>): void;
|
|
2328
|
+
protected onPersistentStateUpdated(persisted: Partial<State>): void;
|
|
2041
2329
|
protected usesStore(): boolean;
|
|
2042
2330
|
protected getName(): string | null;
|
|
2043
2331
|
protected getInitialState(): State;
|
|
2044
2332
|
protected getComputedStateDefinition(): ComputedStateDefinition<State, ComputedState>;
|
|
2045
|
-
protected
|
|
2333
|
+
protected getStateWatchers(): StateWatchers<Service, State>;
|
|
2334
|
+
protected serializePersistedState(state: Partial<State>): ServiceStorage;
|
|
2335
|
+
protected deserializePersistedState(state: ServiceStorage): Partial<State>;
|
|
2046
2336
|
protected frameworkBoot(): Promise<void>;
|
|
2047
2337
|
protected boot(): Promise<void>;
|
|
2048
|
-
protected
|
|
2338
|
+
protected restorePersistedState(): void;
|
|
2049
2339
|
protected requireStore(): Store<string, State, ComputedState, {}>;
|
|
2050
2340
|
}
|
|
2051
2341
|
|
|
@@ -2068,6 +2358,8 @@ declare const services_3: {
|
|
|
2068
2358
|
|
|
2069
2359
|
export declare type ServiceState = Record<string, any>;
|
|
2070
2360
|
|
|
2361
|
+
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>>>;
|
|
2362
|
+
|
|
2071
2363
|
export declare interface ShowSnackbarOptions {
|
|
2072
2364
|
component?: Component;
|
|
2073
2365
|
color?: SnackbarColor;
|
|
@@ -2122,7 +2414,20 @@ export declare const snackbarProps: {
|
|
|
2122
2414
|
};
|
|
2123
2415
|
};
|
|
2124
2416
|
|
|
2125
|
-
export declare
|
|
2417
|
+
export declare type StateWatchers<TService extends Service, TState extends ServiceState> = {
|
|
2418
|
+
[K in keyof TState]?: (this: TService, value: TState[K], oldValue: TState[K]) => unknown;
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
declare const Storage_2: Facade<StorageService, StorageService>;
|
|
2422
|
+
export { Storage_2 as Storage }
|
|
2423
|
+
|
|
2424
|
+
declare class StorageService extends Service {
|
|
2425
|
+
purge(): Promise<void>;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
export declare function stringInput(defaultValue?: string, options?: {
|
|
2429
|
+
rules?: string;
|
|
2430
|
+
}): FormFieldDefinition<typeof FormFieldTypes.String>;
|
|
2126
2431
|
|
|
2127
2432
|
export declare function stringProp(): OptionalProp<string | null>;
|
|
2128
2433
|
|
|
@@ -2156,26 +2461,32 @@ export declare class UIService extends _default_4 {
|
|
|
2156
2461
|
alert(title: string, message: string): void;
|
|
2157
2462
|
confirm(message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
2158
2463
|
confirm(title: string, message: string, options?: ConfirmOptions): Promise<boolean>;
|
|
2464
|
+
confirm<T extends ConfirmCheckboxes>(message: string, options?: ConfirmOptionsWithCheckboxes<T>): Promise<[boolean, Record<keyof T, boolean>]>;
|
|
2465
|
+
confirm<T extends ConfirmCheckboxes>(title: string, message: string, options?: ConfirmOptionsWithCheckboxes<T>): Promise<[boolean, Record<keyof T, boolean>]>;
|
|
2159
2466
|
prompt(message: string, options?: PromptOptions): Promise<string | null>;
|
|
2160
2467
|
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>;
|
|
2468
|
+
loading<T>(operation: Promise<T> | (() => T)): Promise<T>;
|
|
2469
|
+
loading<T>(message: string, operation: Promise<T> | (() => T)): Promise<T>;
|
|
2470
|
+
loading<T>(options: LoadingOptions, operation: Promise<T> | (() => T)): Promise<T>;
|
|
2163
2471
|
showSnackbar(message: string, options?: ShowSnackbarOptions): void;
|
|
2164
2472
|
hideSnackbar(id: string): void;
|
|
2165
2473
|
registerComponent(name: UIComponent, component: Component): void;
|
|
2166
2474
|
openModal<TModalComponent extends ModalComponent>(component: TModalComponent, properties?: ModalProperties<TModalComponent>): Promise<Modal<ModalResult<TModalComponent>>>;
|
|
2167
2475
|
closeModal(id: string, result?: unknown): Promise<void>;
|
|
2476
|
+
closeAllModals(): Promise<void>;
|
|
2168
2477
|
protected boot(): Promise<void>;
|
|
2478
|
+
private removeModal;
|
|
2169
2479
|
private watchModalEvents;
|
|
2170
2480
|
private watchMountedEvent;
|
|
2481
|
+
private watchViewportBreakpoints;
|
|
2171
2482
|
}
|
|
2172
2483
|
|
|
2173
2484
|
export declare type UIServices = typeof services_3;
|
|
2174
2485
|
|
|
2175
2486
|
export declare type UnknownEvent<T> = T extends keyof EventsPayload ? never : T;
|
|
2176
2487
|
|
|
2177
|
-
export declare type
|
|
2178
|
-
[K in keyof
|
|
2488
|
+
export declare type Unref<T> = {
|
|
2489
|
+
[K in keyof T]: T[K] extends MaybeRef<infer Value> ? Value : T[K];
|
|
2179
2490
|
};
|
|
2180
2491
|
|
|
2181
2492
|
export declare function useAlertModalProps(): typeof alertModalProps;
|
|
@@ -2213,6 +2524,7 @@ export declare function useInputProps(): typeof inputProps;
|
|
|
2213
2524
|
|
|
2214
2525
|
export declare function useLoadingModal(props: ExtractPropTypes<typeof loadingModalProps>): {
|
|
2215
2526
|
renderedMessage: ComputedRef<string>;
|
|
2527
|
+
showProgress: ComputedRef<boolean>;
|
|
2216
2528
|
};
|
|
2217
2529
|
|
|
2218
2530
|
export declare function useLoadingModalProps(): typeof loadingModalProps;
|
|
@@ -2238,6 +2550,10 @@ export declare function useSnackbar(props: ExtractPropTypes<typeof snackbarProps
|
|
|
2238
2550
|
|
|
2239
2551
|
export declare function useSnackbarProps(): typeof snackbarProps;
|
|
2240
2552
|
|
|
2553
|
+
export declare function validate(value: unknown, rule: string): string[];
|
|
2554
|
+
|
|
2555
|
+
export declare const validators: Record<string, FormFieldValidator>;
|
|
2556
|
+
|
|
2241
2557
|
export { }
|
|
2242
2558
|
|
|
2243
2559
|
export interface EventsPayload {
|
|
@@ -2272,6 +2588,10 @@ declare global {
|
|
|
2272
2588
|
var __aerogelEvents__: AerogelGlobalEvents | undefined;
|
|
2273
2589
|
}
|
|
2274
2590
|
|
|
2591
|
+
export interface EventsPayload {
|
|
2592
|
+
'purge-storage': void;
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2275
2595
|
export interface AerogelOptions {
|
|
2276
2596
|
services?: Record<string, Service>;
|
|
2277
2597
|
}
|