@budibase/shared-core 2.33.14 → 3.0.1

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.
@@ -0,0 +1,37 @@
1
+ import { OperationFieldsType } from "@budibase/types";
2
+ export declare const AIOperations: {
3
+ SUMMARISE_TEXT: {
4
+ label: string;
5
+ value: string;
6
+ };
7
+ CLEAN_DATA: {
8
+ label: string;
9
+ value: string;
10
+ };
11
+ TRANSLATE: {
12
+ label: string;
13
+ value: string;
14
+ };
15
+ CATEGORISE_TEXT: {
16
+ label: string;
17
+ value: string;
18
+ };
19
+ SENTIMENT_ANALYSIS: {
20
+ label: string;
21
+ value: string;
22
+ };
23
+ PROMPT: {
24
+ label: string;
25
+ value: string;
26
+ };
27
+ SEARCH_WEB: {
28
+ label: string;
29
+ value: string;
30
+ };
31
+ };
32
+ export declare const OperationFieldTypes: {
33
+ MULTI_COLUMN: string;
34
+ COLUMN: string;
35
+ BINDABLE_TEXT: string;
36
+ };
37
+ export declare const OperationFields: OperationFieldsType;
@@ -1,7 +1,9 @@
1
+ export * from "./ai";
1
2
  export * from "./api";
2
3
  export * from "./fields";
3
4
  export * from "./rows";
4
5
  export * from "./colors";
6
+ export * from "./themes";
5
7
  export declare const OperatorOptions: {
6
8
  Equals: {
7
9
  value: string;
@@ -90,7 +92,8 @@ export declare enum BuilderSocketEvent {
90
92
  AppMetadataChange = "AppMetadataChange",
91
93
  SelectResource = "SelectResource",
92
94
  AppPublishChange = "AppPublishChange",
93
- AutomationChange = "AutomationChange"
95
+ AutomationChange = "AutomationChange",
96
+ RoleChange = "RoleChange"
94
97
  }
95
98
  export declare const SocketSessionTTL = 60;
96
99
  export declare const ValidQueryNameRegex: RegExp;
@@ -0,0 +1,5 @@
1
+ import { ThemeMeta, Theme } from "@budibase/types";
2
+ export declare const ThemeClassPrefix = "spectrum--";
3
+ export declare const DefaultBuilderTheme = Theme.DARKEST;
4
+ export declare const DefaultAppTheme = Theme.LIGHT;
5
+ export declare const ThemeOptions: ThemeMeta[];
package/dist/filters.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, LegacyFilter, SearchFilters, SearchQueryFields, SortType, FieldConstraints, SortOrder, RowSearchParams, SearchResponse, Table, SearchFilterGroup } from "@budibase/types";
1
+ import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, LegacyFilter, SearchFilters, SearchQueryFields, SortType, FieldConstraints, SortOrder, RowSearchParams, EmptyFilterOption, SearchResponse, Table, UISearchFilter, SearchFilter } from "@budibase/types";
2
2
  /**
3
3
  * Returns the valid operator options for a certain data type
4
4
  */
@@ -60,19 +60,20 @@ export declare class ColumnSplitter {
60
60
  column: string;
61
61
  };
62
62
  }
63
- export declare const buildQueryLegacy: (filter?: LegacyFilter[] | SearchFilters) => SearchFilters | undefined;
63
+ export interface LegacyFilterSplit {
64
+ allOr?: boolean;
65
+ onEmptyFilter?: EmptyFilterOption;
66
+ filters: SearchFilter[];
67
+ }
68
+ export declare function splitFiltersArray(filters: LegacyFilter[]): LegacyFilterSplit;
64
69
  /**
65
- * Converts a **SearchFilterGroup** filter definition into a grouped
70
+ * Converts a **UISearchFilter** filter definition into a grouped
66
71
  * search query of type **SearchFilters**
67
72
  *
68
73
  * Legacy support remains for the old **SearchFilter[]** format.
69
74
  * These will be migrated to an appropriate **SearchFilters** object, if encountered
70
- *
71
- * @param filter
72
- *
73
- * @returns {SearchFilters}
74
75
  */
75
- export declare const buildQuery: (filter?: SearchFilterGroup | LegacyFilter[]) => SearchFilters | undefined;
76
+ export declare function buildQuery(filter?: UISearchFilter | LegacyFilter[]): SearchFilters;
76
77
  export declare function fixupFilterArrays(filters: SearchFilters): SearchFilters;
77
78
  export declare function search<T extends Record<string, any>>(docs: T[], query: Omit<RowSearchParams, "tableId">): SearchResponse<T>;
78
79
  /**
@@ -6,4 +6,4 @@ export declare function isDeprecatedSingleUserColumn(schema: Pick<FieldSchema, "
6
6
  export declare function isRequired(constraints: FieldConstraints | undefined): boolean;
7
7
  export declare function encodeNonAscii(str: string): string;
8
8
  export declare function decodeNonAscii(str: string): string;
9
- export declare function isNumeric(field: FieldSchema): boolean;
9
+ export declare function isNumeric(field: FieldSchema): field is import("@budibase/types").NumberFieldMetadata | import("@budibase/types").BigIntFieldMetadata;
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * as helpers from "./helpers";
4
4
  export * as utils from "./utils";
5
5
  export * as sdk from "./sdk";
6
6
  export * from "./table";
7
+ export * from "./themes";