@automateinc/fleet-types 1.0.81-dev.08bae97 → 1.0.81-dev.c05c289

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.
@@ -1,16 +1,70 @@
1
1
  export type StructuredContentTextVariant = "H1" | "H2" | "H3" | "H4" | "H5" | "H6" | "PARAGRAPH" | "TEXT";
2
2
  export type StructuredContentLinkVariant = "BUTTON" | "LINK";
3
- export type StructuredContentTableColumnType = "BOOLEAN" | "DATE" | "DATETIME" | "LINK" | "NUMBER" | "TEXT" | "TIME";
3
+ export type StructuredContentTableColumnType = "BOOLEAN" | "DATE" | "DATETIME" | "LINK" | "NUMBER" | "TAG" | "TEXT" | "TIME";
4
+ export type StructuredContentTableSortType = "date" | "number" | "string";
5
+ export type StructuredContentTableToolbarFilterType = "DATE_RANGE" | "SELECT";
6
+ export type StructuredContentLayoutWidth = "auto" | "full" | "half" | "third";
7
+ export type StructuredContentLayoutAlign = "center" | "end" | "start";
8
+ export type StructuredContentLayoutSpacing = "lg" | "md" | "none" | "sm";
9
+ export type StructuredContentTagTone = "danger" | "default" | "info" | "success" | "warning";
10
+
11
+ export interface IStructuredContentTagValue {
12
+ label: string;
13
+ tone?: StructuredContentTagTone;
14
+ }
15
+
16
+ export interface IStructuredContentNodeLayout {
17
+ align?: StructuredContentLayoutAlign;
18
+ gap?: StructuredContentLayoutSpacing;
19
+ hidden?: boolean;
20
+ marginBottom?: StructuredContentLayoutSpacing;
21
+ marginTop?: StructuredContentLayoutSpacing;
22
+ paddingX?: StructuredContentLayoutSpacing;
23
+ paddingY?: StructuredContentLayoutSpacing;
24
+ width?: StructuredContentLayoutWidth;
25
+ }
26
+
27
+ export interface IStructuredContentTableToolbarFilter {
28
+ columnKey: string;
29
+ type?: StructuredContentTableToolbarFilterType;
30
+ }
31
+
32
+ export interface IStructuredContentTableToolbar {
33
+ filters?: IStructuredContentTableToolbarFilter[];
34
+ search?: boolean;
35
+ }
36
+
37
+ export interface IStructuredContentTablePagination {
38
+ pageSize?: number;
39
+ }
4
40
 
5
41
  export interface IStructuredContentTableColumn {
6
42
  id: string;
7
43
  name: string;
44
+ sortType?: StructuredContentTableSortType;
45
+ sortable?: boolean;
8
46
  type: StructuredContentTableColumnType;
9
47
  }
10
48
 
11
49
  export interface IStructuredContentNodeBase {
12
50
  id: string;
13
- type: "LINK" | "SPACE" | "TABLE" | "TEXT";
51
+ layout?: IStructuredContentNodeLayout;
52
+ type: "COLLAPSE" | "FILES" | "LINK" | "SPACE" | "TABLE" | "TAG" | "TEXT";
53
+ }
54
+
55
+ export interface IStructuredContentCollapseNode extends IStructuredContentNodeBase {
56
+ children?: IStructuredContentNode[];
57
+ config?: {
58
+ title?: string;
59
+ };
60
+ type: "COLLAPSE";
61
+ }
62
+
63
+ export interface IStructuredContentFilesNode extends IStructuredContentNodeBase {
64
+ config?: {
65
+ source?: "HISTORY";
66
+ };
67
+ type: "FILES";
14
68
  }
15
69
 
16
70
  export interface IStructuredContentSpaceNode extends IStructuredContentNodeBase {
@@ -25,6 +79,13 @@ export interface IStructuredContentTextNode extends IStructuredContentNodeBase {
25
79
  type: "TEXT";
26
80
  }
27
81
 
82
+ export interface IStructuredContentTagNode extends IStructuredContentNodeBase {
83
+ config?: {
84
+ tone?: StructuredContentTagTone;
85
+ };
86
+ type: "TAG";
87
+ }
88
+
28
89
  export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
29
90
  config?: {
30
91
  variant?: StructuredContentLinkVariant;
@@ -35,13 +96,18 @@ export interface IStructuredContentLinkNode extends IStructuredContentNodeBase {
35
96
  export interface IStructuredContentTableNode extends IStructuredContentNodeBase {
36
97
  config?: {
37
98
  columns?: IStructuredContentTableColumn[];
99
+ pagination?: IStructuredContentTablePagination;
100
+ toolbar?: IStructuredContentTableToolbar;
38
101
  };
39
102
  type: "TABLE";
40
103
  }
41
104
 
42
105
  export type IStructuredContentNode =
106
+ | IStructuredContentCollapseNode
107
+ | IStructuredContentFilesNode
43
108
  | IStructuredContentLinkNode
44
109
  | IStructuredContentSpaceNode
110
+ | IStructuredContentTagNode
45
111
  | IStructuredContentTableNode
46
112
  | IStructuredContentTextNode;
47
113
 
@@ -52,9 +118,11 @@ export interface IStructuredContentLinkValue {
52
118
  }
53
119
 
54
120
  export type StructuredContentPrimitiveValue = boolean | number | string | null;
55
- export type IStructuredContentTableRow = Record<string, IStructuredContentLinkValue | StructuredContentPrimitiveValue>;
121
+ export type StructuredContentTaggableValue = IStructuredContentTagValue | StructuredContentPrimitiveValue;
122
+ export type IStructuredContentTableRow = Record<string, IStructuredContentLinkValue | StructuredContentTaggableValue>;
56
123
  export type StructuredContentDataValue =
57
124
  | IStructuredContentLinkValue
125
+ | IStructuredContentTagValue
58
126
  | IStructuredContentTableRow[]
59
127
  | StructuredContentPrimitiveValue;
60
128
  export type IStructuredContentData = Record<string, StructuredContentDataValue>;
package/package.json CHANGED
@@ -52,5 +52,5 @@
52
52
  "test": "echo \"Error: no test specified\" && exit 1"
53
53
  },
54
54
  "types": "dist/types/index.d.ts",
55
- "version": "1.0.81-dev.08bae97"
55
+ "version": "1.0.81-dev.c05c289"
56
56
  }