@budibase/types 3.3.6 → 3.4.0

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,4 +1,5 @@
1
1
  import { Document } from "../document";
2
+ import { BasicOperator } from "../../sdk";
2
3
  export interface Component extends Document {
3
4
  _instanceName: string;
4
5
  _styles: {
@@ -6,5 +7,16 @@ export interface Component extends Document {
6
7
  };
7
8
  _component: string;
8
9
  _children?: Component[];
10
+ _conditions?: ComponentCondition[];
9
11
  [key: string]: any;
10
12
  }
13
+ export interface ComponentCondition {
14
+ id: string;
15
+ operator: BasicOperator;
16
+ action: "update" | "show" | "hide";
17
+ valueType: "string" | "number" | "datetime" | "boolean";
18
+ newValue?: any;
19
+ referenceValue?: any;
20
+ setting?: string;
21
+ settingValue?: any;
22
+ }
@@ -20,6 +20,7 @@ export interface Screen extends Document {
20
20
  props: ScreenProps;
21
21
  name?: string;
22
22
  pluginAdded?: boolean;
23
+ onLoad?: EventHandler[];
23
24
  }
24
25
  export interface ScreenRoutesViewOutput extends Document {
25
26
  id: string;
@@ -28,3 +29,13 @@ export interface ScreenRoutesViewOutput extends Document {
28
29
  export type ScreenRoutingJson = Record<string, {
29
30
  subpaths: Record<string, any>;
30
31
  }>;
32
+ export interface EventHandler {
33
+ parameters: {
34
+ key: string;
35
+ type: string;
36
+ value: string;
37
+ persist: any | null;
38
+ };
39
+ "##eventHandlerType": string;
40
+ id: string;
41
+ }
@@ -1,8 +1,9 @@
1
- import { CalculationType, FieldSchema, FieldType } from "@budibase/types";
1
+ import { CalculationType, FieldSchema, FieldType, UIRow } from "@budibase/types";
2
2
  export type UIColumn = FieldSchema & {
3
3
  label: string;
4
4
  readonly: boolean;
5
5
  conditions: any;
6
+ format?: (row: UIRow) => any;
6
7
  related?: {
7
8
  field: string;
8
9
  subField: string;
@@ -1,4 +1,4 @@
1
- import { BasicViewFieldMetadata, FieldSchema, FieldType, RelationSchemaField, SortOrder, Table, UISearchFilter } from "@budibase/types";
1
+ import { BasicViewFieldMetadata, FieldSchema, FieldType, RelationSchemaField, SortOrder, Table, UIRow, UISearchFilter } from "@budibase/types";
2
2
  export interface UITable extends Table {
3
3
  name: string;
4
4
  id: string;
@@ -19,6 +19,7 @@ export type UIFieldSchema = FieldSchema & BasicViewFieldMetadata & {
19
19
  columns?: Record<string, UIRelationSchemaField>;
20
20
  cellRenderType?: string;
21
21
  disabled?: boolean;
22
+ format?: (row: UIRow) => any;
22
23
  };
23
24
  interface UIRelationSchemaField extends RelationSchemaField {
24
25
  type: FieldType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/types",
3
- "version": "3.3.6",
3
+ "version": "3.4.0",
4
4
  "description": "Budibase types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,5 +26,5 @@
26
26
  "dependencies": {
27
27
  "scim-patch": "^0.8.1"
28
28
  },
29
- "gitHead": "7c16de5b7a3db6c663cf5d66dd47556ea96cc111"
29
+ "gitHead": "079956852a2be6d40f7d1e3b19335271cfff2d7f"
30
30
  }