@antcde/component-library 0.1.31-rc.1 → 0.1.31-rc.10
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/build/uno.safelist.d.ts +1 -1
- package/dist/build/uno.safelist.js +54 -49
- package/dist/build/uno.shortcuts.js +0 -3
- package/dist/index.js +8861 -7603
- package/dist/test/vitest.js +2 -0
- package/dist/types/components/BaseAppCard/_BaseAppCardHint.vue.d.ts +1 -0
- package/dist/types/components/BaseAppCard/index.vue.d.ts +1 -0
- package/dist/types/components/BaseConfirmDialog.vue.d.ts +4 -4
- package/dist/types/components/BaseDialog.vue.d.ts +3 -3
- package/dist/types/components/ScriptTrigger/composables/useTableSelection.d.ts +6 -0
- package/dist/types/components/TasksFlow/composables/useEdgeConditionTables.d.ts +6 -0
- package/dist/types/components/Usage/ResourceTrash.vue.d.ts +8 -0
- package/dist/types/components/Usage/UsageActions.vue.d.ts +21 -0
- package/dist/types/components/Usage/UsagePanel.vue.d.ts +8 -0
- package/dist/types/components/Usage/_EmptyTrashBar.vue.d.ts +8 -0
- package/dist/types/components/Usage/_PurgeConfirmDialog.vue.d.ts +25 -0
- package/dist/types/components/Usage/_UsageCarbon.vue.d.ts +9 -0
- package/dist/types/components/Usage/_UsageClassRow.vue.d.ts +22 -0
- package/dist/types/components/Usage/formatBytes.d.ts +2 -0
- package/dist/types/components/Usage/usageMessages.d.ts +188 -0
- package/dist/types/components/Usage/useResourceTrash.d.ts +39 -0
- package/dist/types/components/Usage/useResourceUsage.d.ts +34 -0
- package/dist/types/components/Usage/useShowUsageSizes.d.ts +1 -0
- package/dist/types/components/Usage/useUsageJob.d.ts +4 -0
- package/dist/types/components/form/AntRadioCards.vue.d.ts +1 -0
- package/dist/types/index.d.ts +290 -17
- package/lib/build/uno.safelist.ts +54 -49
- package/lib/build/uno.shortcuts.ts +0 -3
- package/lib/test/createMockAppContext.ts +9 -0
- package/lib/test/vitest.ts +2 -0
- package/package.json +3 -3
package/dist/test/vitest.js
CHANGED
|
@@ -41,6 +41,8 @@ export function createAntVitestConfig(appRoot, overrides = {}) {
|
|
|
41
41
|
test: {
|
|
42
42
|
globals: true,
|
|
43
43
|
environment: 'happy-dom',
|
|
44
|
+
// Reuse transformed modules across runs — transform is most of a cold run.
|
|
45
|
+
fsModuleCache: true,
|
|
44
46
|
environmentOptions: {
|
|
45
47
|
happyDOM: {
|
|
46
48
|
settings: {
|
|
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
content?: (props: typeof __VLS_28) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
-
close: (
|
|
14
|
-
action: (
|
|
13
|
+
close: () => any;
|
|
14
|
+
action: () => any;
|
|
15
15
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
-
onClose?: ((
|
|
17
|
-
onAction?: ((
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
onAction?: (() => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
19
|
icon: string;
|
|
20
20
|
isLoading: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface Props {
|
|
1
|
+
export interface Props {
|
|
2
2
|
displayed: boolean;
|
|
3
3
|
action: () => PromiseLike<unknown> | unknown;
|
|
4
4
|
title: string;
|
|
@@ -14,9 +14,9 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
content?: (props: typeof __VLS_28) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
-
close: (
|
|
17
|
+
close: () => any;
|
|
18
18
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
19
|
-
onClose?: ((
|
|
19
|
+
onClose?: (() => any) | undefined;
|
|
20
20
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,6 +6,7 @@ export declare function useTableSelection(context: MaybeRefOrGetter<TableScope>)
|
|
|
6
6
|
readonly id: string;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly history_enabled: boolean;
|
|
9
|
+
readonly is_managed?: boolean | undefined;
|
|
9
10
|
readonly is_locked: boolean;
|
|
10
11
|
readonly columns?: readonly {
|
|
11
12
|
readonly id: string;
|
|
@@ -17,6 +18,7 @@ export declare function useTableSelection(context: MaybeRefOrGetter<TableScope>)
|
|
|
17
18
|
readonly required: boolean;
|
|
18
19
|
readonly is_unique: boolean;
|
|
19
20
|
readonly is_indexed: boolean;
|
|
21
|
+
readonly is_managed?: boolean | undefined;
|
|
20
22
|
readonly table: string;
|
|
21
23
|
readonly relation: {
|
|
22
24
|
readonly id: string;
|
|
@@ -28,6 +30,7 @@ export declare function useTableSelection(context: MaybeRefOrGetter<TableScope>)
|
|
|
28
30
|
readonly id: string;
|
|
29
31
|
readonly name: string;
|
|
30
32
|
readonly history_enabled: boolean;
|
|
33
|
+
readonly is_managed?: boolean | undefined;
|
|
31
34
|
readonly is_locked: boolean;
|
|
32
35
|
readonly lock: {
|
|
33
36
|
readonly locked_at: string;
|
|
@@ -110,6 +113,7 @@ export declare function useTableSelection(context: MaybeRefOrGetter<TableScope>)
|
|
|
110
113
|
readonly id: string;
|
|
111
114
|
readonly name: string;
|
|
112
115
|
readonly history_enabled: boolean;
|
|
116
|
+
readonly is_managed?: boolean | undefined;
|
|
113
117
|
readonly is_locked: boolean;
|
|
114
118
|
readonly columns?: readonly {
|
|
115
119
|
readonly id: string;
|
|
@@ -121,6 +125,7 @@ export declare function useTableSelection(context: MaybeRefOrGetter<TableScope>)
|
|
|
121
125
|
readonly required: boolean;
|
|
122
126
|
readonly is_unique: boolean;
|
|
123
127
|
readonly is_indexed: boolean;
|
|
128
|
+
readonly is_managed?: boolean | undefined;
|
|
124
129
|
readonly table: string;
|
|
125
130
|
readonly relation: {
|
|
126
131
|
readonly id: string;
|
|
@@ -132,6 +137,7 @@ export declare function useTableSelection(context: MaybeRefOrGetter<TableScope>)
|
|
|
132
137
|
readonly id: string;
|
|
133
138
|
readonly name: string;
|
|
134
139
|
readonly history_enabled: boolean;
|
|
140
|
+
readonly is_managed?: boolean | undefined;
|
|
135
141
|
readonly is_locked: boolean;
|
|
136
142
|
readonly lock: {
|
|
137
143
|
readonly locked_at: string;
|
|
@@ -15,6 +15,7 @@ export declare function useEdgeConditionTables(): {
|
|
|
15
15
|
id: string;
|
|
16
16
|
name: string;
|
|
17
17
|
history_enabled: boolean;
|
|
18
|
+
is_managed?: boolean | undefined;
|
|
18
19
|
is_locked: boolean;
|
|
19
20
|
columns?: {
|
|
20
21
|
id: string;
|
|
@@ -26,6 +27,7 @@ export declare function useEdgeConditionTables(): {
|
|
|
26
27
|
required: boolean;
|
|
27
28
|
is_unique: boolean;
|
|
28
29
|
is_indexed: boolean;
|
|
30
|
+
is_managed?: boolean | undefined;
|
|
29
31
|
table: string;
|
|
30
32
|
relation: {
|
|
31
33
|
id: string;
|
|
@@ -37,6 +39,7 @@ export declare function useEdgeConditionTables(): {
|
|
|
37
39
|
id: string;
|
|
38
40
|
name: string;
|
|
39
41
|
history_enabled: boolean;
|
|
42
|
+
is_managed?: boolean | undefined;
|
|
40
43
|
is_locked: boolean;
|
|
41
44
|
lock: {
|
|
42
45
|
locked_at: string;
|
|
@@ -114,6 +117,7 @@ export declare function useEdgeConditionTables(): {
|
|
|
114
117
|
id: string;
|
|
115
118
|
name: string;
|
|
116
119
|
history_enabled: boolean;
|
|
120
|
+
is_managed?: boolean | undefined;
|
|
117
121
|
is_locked: boolean;
|
|
118
122
|
columns?: {
|
|
119
123
|
id: string;
|
|
@@ -125,6 +129,7 @@ export declare function useEdgeConditionTables(): {
|
|
|
125
129
|
required: boolean;
|
|
126
130
|
is_unique: boolean;
|
|
127
131
|
is_indexed: boolean;
|
|
132
|
+
is_managed?: boolean | undefined;
|
|
128
133
|
table: string;
|
|
129
134
|
relation: {
|
|
130
135
|
id: string;
|
|
@@ -136,6 +141,7 @@ export declare function useEdgeConditionTables(): {
|
|
|
136
141
|
id: string;
|
|
137
142
|
name: string;
|
|
138
143
|
history_enabled: boolean;
|
|
144
|
+
is_managed?: boolean | undefined;
|
|
139
145
|
is_locked: boolean;
|
|
140
146
|
lock: {
|
|
141
147
|
locked_at: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseResourceTrash } from './useResourceTrash';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
trash: UseResourceTrash;
|
|
4
|
+
emptyConfirmPhrase?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UseResourceTrash } from './useResourceTrash';
|
|
2
|
+
import { UseResourceUsage } from './useResourceUsage';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
usage: UseResourceUsage;
|
|
5
|
+
trash?: UseResourceTrash;
|
|
6
|
+
focus?: 'documents' | 'database';
|
|
7
|
+
/** Typed confirmation before emptying the whole trash (the license trash). */
|
|
8
|
+
emptyConfirmPhrase?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_ModelProps = {
|
|
11
|
+
/** Bind to show the "Show sizes" switch; the host decides what sizes it reveals. */
|
|
12
|
+
'showSizes'?: boolean | undefined;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:showSizes": (value: boolean | undefined) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:showSizes"?: ((value: boolean | undefined) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseResourceUsage } from './useResourceUsage';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
usage: UseResourceUsage;
|
|
4
|
+
focus?: 'documents' | 'database';
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseResourceTrash } from './useResourceTrash';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
trash: UseResourceTrash;
|
|
4
|
+
confirmPhrase?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
body: string;
|
|
4
|
+
frees?: string;
|
|
5
|
+
cancelLabel: string;
|
|
6
|
+
confirmLabel: string;
|
|
7
|
+
closeLabel: string;
|
|
8
|
+
busy: boolean;
|
|
9
|
+
/** Typed confirmation for the widest purges (a license's whole trash): confirm stays off until it matches. */
|
|
10
|
+
phrase?: string;
|
|
11
|
+
phraseLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
"update:modelValue": (value: boolean) => any;
|
|
19
|
+
confirm: () => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
onConfirm?: (() => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CarbonEstimate } from '@antcde/connect-ts';
|
|
2
|
+
import { UseResourceUsage } from './useResourceUsage';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
carbon: CarbonEstimate;
|
|
5
|
+
usage: UseResourceUsage;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
hint: string;
|
|
4
|
+
live: number;
|
|
5
|
+
trashed: number;
|
|
6
|
+
color: 'primary' | 'secondary';
|
|
7
|
+
liveLabel: string;
|
|
8
|
+
trashedLabel: string;
|
|
9
|
+
};
|
|
10
|
+
declare var __VLS_18: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
default?: (props: typeof __VLS_18) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export declare const usageMessages: {
|
|
2
|
+
en: {
|
|
3
|
+
carbon: {
|
|
4
|
+
title: string;
|
|
5
|
+
retention: string;
|
|
6
|
+
basis: string;
|
|
7
|
+
export: string;
|
|
8
|
+
};
|
|
9
|
+
title: string;
|
|
10
|
+
measuredAt: string;
|
|
11
|
+
notMeasured: string;
|
|
12
|
+
recalculate: string;
|
|
13
|
+
recalculating: string;
|
|
14
|
+
recalculateFailed: string;
|
|
15
|
+
total: string;
|
|
16
|
+
inUse: string;
|
|
17
|
+
inTrash: string;
|
|
18
|
+
documents: string;
|
|
19
|
+
documentsHint: string;
|
|
20
|
+
database: string;
|
|
21
|
+
documentsElsewhere: string;
|
|
22
|
+
databaseHint: string;
|
|
23
|
+
compactable: string;
|
|
24
|
+
categories: {
|
|
25
|
+
records: string;
|
|
26
|
+
history: string;
|
|
27
|
+
fal: string;
|
|
28
|
+
metadata: string;
|
|
29
|
+
};
|
|
30
|
+
size: string;
|
|
31
|
+
showSizes: string;
|
|
32
|
+
trash: {
|
|
33
|
+
title: string;
|
|
34
|
+
subtitle: string;
|
|
35
|
+
close: string;
|
|
36
|
+
empty: string;
|
|
37
|
+
emptyHint: string;
|
|
38
|
+
count: string;
|
|
39
|
+
emptyAll: {
|
|
40
|
+
action: string;
|
|
41
|
+
title: string;
|
|
42
|
+
body: string;
|
|
43
|
+
typeToConfirm: string;
|
|
44
|
+
skipped: string;
|
|
45
|
+
};
|
|
46
|
+
deletedAt: string;
|
|
47
|
+
reclaimable: string;
|
|
48
|
+
unmeasured: string;
|
|
49
|
+
restore: string;
|
|
50
|
+
purge: string;
|
|
51
|
+
selected: string;
|
|
52
|
+
select: string;
|
|
53
|
+
restoreFailed: string;
|
|
54
|
+
purgeFailed: string;
|
|
55
|
+
confirmTitle: string;
|
|
56
|
+
confirmBody: string;
|
|
57
|
+
confirmFrees: string;
|
|
58
|
+
confirm: string;
|
|
59
|
+
cancel: string;
|
|
60
|
+
previous: string;
|
|
61
|
+
next: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
nl: {
|
|
65
|
+
carbon: {
|
|
66
|
+
title: string;
|
|
67
|
+
retention: string;
|
|
68
|
+
basis: string;
|
|
69
|
+
export: string;
|
|
70
|
+
};
|
|
71
|
+
title: string;
|
|
72
|
+
measuredAt: string;
|
|
73
|
+
notMeasured: string;
|
|
74
|
+
recalculate: string;
|
|
75
|
+
recalculating: string;
|
|
76
|
+
recalculateFailed: string;
|
|
77
|
+
total: string;
|
|
78
|
+
inUse: string;
|
|
79
|
+
inTrash: string;
|
|
80
|
+
documents: string;
|
|
81
|
+
documentsHint: string;
|
|
82
|
+
database: string;
|
|
83
|
+
documentsElsewhere: string;
|
|
84
|
+
databaseHint: string;
|
|
85
|
+
compactable: string;
|
|
86
|
+
categories: {
|
|
87
|
+
records: string;
|
|
88
|
+
history: string;
|
|
89
|
+
fal: string;
|
|
90
|
+
metadata: string;
|
|
91
|
+
};
|
|
92
|
+
size: string;
|
|
93
|
+
showSizes: string;
|
|
94
|
+
trash: {
|
|
95
|
+
title: string;
|
|
96
|
+
subtitle: string;
|
|
97
|
+
close: string;
|
|
98
|
+
empty: string;
|
|
99
|
+
emptyHint: string;
|
|
100
|
+
count: string;
|
|
101
|
+
emptyAll: {
|
|
102
|
+
action: string;
|
|
103
|
+
title: string;
|
|
104
|
+
body: string;
|
|
105
|
+
typeToConfirm: string;
|
|
106
|
+
skipped: string;
|
|
107
|
+
};
|
|
108
|
+
deletedAt: string;
|
|
109
|
+
reclaimable: string;
|
|
110
|
+
unmeasured: string;
|
|
111
|
+
restore: string;
|
|
112
|
+
purge: string;
|
|
113
|
+
selected: string;
|
|
114
|
+
select: string;
|
|
115
|
+
restoreFailed: string;
|
|
116
|
+
purgeFailed: string;
|
|
117
|
+
confirmTitle: string;
|
|
118
|
+
confirmBody: string;
|
|
119
|
+
confirmFrees: string;
|
|
120
|
+
confirm: string;
|
|
121
|
+
cancel: string;
|
|
122
|
+
previous: string;
|
|
123
|
+
next: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
de: {
|
|
127
|
+
carbon: {
|
|
128
|
+
title: string;
|
|
129
|
+
retention: string;
|
|
130
|
+
basis: string;
|
|
131
|
+
export: string;
|
|
132
|
+
};
|
|
133
|
+
title: string;
|
|
134
|
+
measuredAt: string;
|
|
135
|
+
notMeasured: string;
|
|
136
|
+
recalculate: string;
|
|
137
|
+
recalculating: string;
|
|
138
|
+
recalculateFailed: string;
|
|
139
|
+
total: string;
|
|
140
|
+
inUse: string;
|
|
141
|
+
inTrash: string;
|
|
142
|
+
documents: string;
|
|
143
|
+
documentsHint: string;
|
|
144
|
+
database: string;
|
|
145
|
+
documentsElsewhere: string;
|
|
146
|
+
databaseHint: string;
|
|
147
|
+
compactable: string;
|
|
148
|
+
categories: {
|
|
149
|
+
records: string;
|
|
150
|
+
history: string;
|
|
151
|
+
fal: string;
|
|
152
|
+
metadata: string;
|
|
153
|
+
};
|
|
154
|
+
size: string;
|
|
155
|
+
showSizes: string;
|
|
156
|
+
trash: {
|
|
157
|
+
title: string;
|
|
158
|
+
subtitle: string;
|
|
159
|
+
close: string;
|
|
160
|
+
empty: string;
|
|
161
|
+
emptyHint: string;
|
|
162
|
+
count: string;
|
|
163
|
+
emptyAll: {
|
|
164
|
+
action: string;
|
|
165
|
+
title: string;
|
|
166
|
+
body: string;
|
|
167
|
+
typeToConfirm: string;
|
|
168
|
+
skipped: string;
|
|
169
|
+
};
|
|
170
|
+
deletedAt: string;
|
|
171
|
+
reclaimable: string;
|
|
172
|
+
unmeasured: string;
|
|
173
|
+
restore: string;
|
|
174
|
+
purge: string;
|
|
175
|
+
selected: string;
|
|
176
|
+
select: string;
|
|
177
|
+
restoreFailed: string;
|
|
178
|
+
purgeFailed: string;
|
|
179
|
+
confirmTitle: string;
|
|
180
|
+
confirmBody: string;
|
|
181
|
+
confirmFrees: string;
|
|
182
|
+
confirm: string;
|
|
183
|
+
cancel: string;
|
|
184
|
+
previous: string;
|
|
185
|
+
next: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TrashedResource } from '@antcde/connect-ts';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { UseResourceUsage } from './useResourceUsage';
|
|
4
|
+
export declare function useResourceTrash(usage: UseResourceUsage, options?: {
|
|
5
|
+
onChanged?: () => void;
|
|
6
|
+
}): {
|
|
7
|
+
isAvailable: import('vue').ComputedRef<boolean>;
|
|
8
|
+
items: Ref<TrashedResource[], TrashedResource[]>;
|
|
9
|
+
meta: Ref<{
|
|
10
|
+
current_page: number;
|
|
11
|
+
per_page: number;
|
|
12
|
+
total: number;
|
|
13
|
+
last_page: number;
|
|
14
|
+
} | null, {
|
|
15
|
+
current_page: number;
|
|
16
|
+
per_page: number;
|
|
17
|
+
total: number;
|
|
18
|
+
last_page: number;
|
|
19
|
+
} | {
|
|
20
|
+
current_page: number;
|
|
21
|
+
per_page: number;
|
|
22
|
+
total: number;
|
|
23
|
+
last_page: number;
|
|
24
|
+
} | null>;
|
|
25
|
+
isLoading: Ref<boolean, boolean>;
|
|
26
|
+
selected: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
27
|
+
selectedItems: import('vue').ComputedRef<TrashedResource[]>;
|
|
28
|
+
failed: Ref<"restore" | "purge" | null, "restore" | "purge" | null>;
|
|
29
|
+
load: (page?: number) => Promise<void>;
|
|
30
|
+
restore: (item: TrashedResource) => Promise<void>;
|
|
31
|
+
purge: (targets: TrashedResource[]) => Promise<void>;
|
|
32
|
+
emptyTrash: () => Promise<{
|
|
33
|
+
purged: number;
|
|
34
|
+
skipped: number;
|
|
35
|
+
}>;
|
|
36
|
+
emptying: Ref<boolean, boolean>;
|
|
37
|
+
toggle: (id: string) => void;
|
|
38
|
+
};
|
|
39
|
+
export type UseResourceTrash = ReturnType<typeof useResourceTrash>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AntConnect, Context, LiveTrashed, ResourceFootprint, SignalReceiver, SignalSender, UsageResourceType } from '@antcde/connect-ts';
|
|
2
|
+
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
+
export interface UseResourceUsageOptions {
|
|
4
|
+
connect: AntConnect;
|
|
5
|
+
context: Ref<Context>;
|
|
6
|
+
signal: SignalReceiver & SignalSender;
|
|
7
|
+
resourceType: MaybeRefOrGetter<UsageResourceType>;
|
|
8
|
+
resourceId: MaybeRefOrGetter<string | null | undefined>;
|
|
9
|
+
}
|
|
10
|
+
export interface UseResourceUsage {
|
|
11
|
+
/** Admin of this context. False → no request is ever sent. */
|
|
12
|
+
isAvailable: ComputedRef<boolean>;
|
|
13
|
+
usage: Readonly<Ref<ResourceFootprint | null>>;
|
|
14
|
+
isLoading: Readonly<Ref<boolean>>;
|
|
15
|
+
/** Live DMS bytes from `limit.change` (project scope), fresher than the nightly snapshot. */
|
|
16
|
+
liveDms: Readonly<Ref<LiveTrashed | null>>;
|
|
17
|
+
isRecalculating: Readonly<Ref<boolean>>;
|
|
18
|
+
recalculateError: Readonly<Ref<boolean>>;
|
|
19
|
+
refresh: () => Promise<void>;
|
|
20
|
+
recalculate: () => Promise<void>;
|
|
21
|
+
/** Purge a live table's soft-deleted record versions (AAD-1069); rejects if the job fails. */
|
|
22
|
+
purgeHistory: (tableId: string) => Promise<void>;
|
|
23
|
+
/** Empty this project's DMS trash (AAD-1100); rejects if the job fails. */
|
|
24
|
+
emptyDmsTrash: () => Promise<void>;
|
|
25
|
+
connect: AntConnect;
|
|
26
|
+
signal: SignalReceiver & SignalSender;
|
|
27
|
+
resourceType: ComputedRef<UsageResourceType>;
|
|
28
|
+
resourceId: ComputedRef<string | null | undefined>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The one place usage gating lives (AAD-1061). Consumers render on `isAvailable` and never
|
|
32
|
+
* re-derive admin status, so no panel can forget the rule.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useResourceUsage(options: UseResourceUsageOptions): UseResourceUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useShowUsageSizes(): import('@vueuse/core').RemovableRef<boolean>;
|