@aeriajs/types 0.0.70 → 0.0.71
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/description.d.ts +22 -10
- package/package.json +1 -1
package/dist/description.d.ts
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
import type { WithId } from 'mongodb';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PhosphorIcon } from '@phosphor-icons/core';
|
|
3
3
|
import type { Condition } from './condition.js';
|
|
4
4
|
import type { JsonSchema, PropertiesWithId } from './property.js';
|
|
5
5
|
import type { OwnershipMode } from './security.js';
|
|
6
6
|
export type CollectionPresets = 'crud' | 'duplicate' | 'remove' | 'removeAll' | 'owned' | 'timestamped' | 'view';
|
|
7
|
-
export type Icon = PhosphorIcon['name']
|
|
8
|
-
export type
|
|
7
|
+
export type Icon = PhosphorIcon['name'];
|
|
8
|
+
export type CollectionActionRoute = {
|
|
9
|
+
route: {
|
|
10
|
+
name: string;
|
|
11
|
+
setItem?: boolean;
|
|
12
|
+
fetchItem?: boolean;
|
|
13
|
+
clearItem?: boolean;
|
|
14
|
+
params?: Record<string, any>;
|
|
15
|
+
query?: Record<string, any>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type CollectionActionFunction = {
|
|
19
|
+
function?: string;
|
|
20
|
+
selection?: boolean;
|
|
21
|
+
effect?: string;
|
|
22
|
+
};
|
|
23
|
+
export type CollectionActionEvent = {
|
|
24
|
+
event?: string;
|
|
25
|
+
};
|
|
26
|
+
export type CollectionActionBase<TDescription extends Description> = {
|
|
9
27
|
label: string;
|
|
10
28
|
icon?: Icon;
|
|
11
29
|
ask?: boolean;
|
|
12
|
-
selection?: boolean;
|
|
13
|
-
effect?: string;
|
|
14
30
|
button?: boolean;
|
|
15
31
|
translate?: boolean;
|
|
16
|
-
setItem?: boolean;
|
|
17
|
-
fetchItem?: boolean;
|
|
18
|
-
clearItem?: boolean;
|
|
19
|
-
params?: Record<string, any>;
|
|
20
|
-
query?: Record<string, any>;
|
|
21
32
|
roles?: readonly string[];
|
|
22
33
|
requires?: readonly PropertiesWithId<TDescription>[];
|
|
23
34
|
};
|
|
35
|
+
export type CollectionAction<TDescription extends Description> = CollectionActionBase<TDescription> & (CollectionActionRoute | CollectionActionFunction | CollectionActionEvent);
|
|
24
36
|
export type CollectionActions<TDescription extends Description> = Record<string, null | CollectionAction<TDescription>>;
|
|
25
37
|
export type FormLayout<TDescription extends Description> = {
|
|
26
38
|
fields?: Partial<Record<PropertiesWithId<TDescription>, FormLayoutField<TDescription>>>;
|