@vuu-ui/vuu-utils 0.8.94 → 0.8.95
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/cjs/column-utils.js +10 -4
- package/cjs/column-utils.js.map +1 -1
- package/cjs/context-definitions/DataSourceContext.js.map +1 -1
- package/cjs/datasource-filter-utils.js +25 -0
- package/cjs/datasource-filter-utils.js.map +1 -0
- package/cjs/datasource-utils.js +18 -2
- package/cjs/datasource-utils.js.map +1 -1
- package/cjs/index.js +7 -0
- package/cjs/index.js.map +1 -1
- package/esm/column-utils.js +9 -5
- package/esm/column-utils.js.map +1 -1
- package/esm/context-definitions/DataSourceContext.js.map +1 -1
- package/esm/datasource-filter-utils.js +22 -0
- package/esm/datasource-filter-utils.js.map +1 -0
- package/esm/datasource-utils.js +17 -3
- package/esm/datasource-utils.js.map +1 -1
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/package.json +6 -6
- package/types/column-utils.d.ts +2 -0
- package/types/context-definitions/DataSourceContext.d.ts +1 -1
- package/types/datasource-filter-utils.d.ts +4 -0
- package/types/datasource-utils.d.ts +3 -0
- package/types/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.8.
|
|
2
|
+
"version": "0.8.95",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"types": "types/index.d.ts",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@vuu-ui/vuu-data-types": "0.8.
|
|
8
|
-
"@vuu-ui/vuu-table-types": "0.8.
|
|
9
|
-
"@vuu-ui/vuu-filter-types": "0.8.
|
|
10
|
-
"@vuu-ui/vuu-protocol-types": "0.8.
|
|
7
|
+
"@vuu-ui/vuu-data-types": "0.8.95",
|
|
8
|
+
"@vuu-ui/vuu-table-types": "0.8.95",
|
|
9
|
+
"@vuu-ui/vuu-filter-types": "0.8.95",
|
|
10
|
+
"@vuu-ui/vuu-protocol-types": "0.8.95"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"@internationalized/date": "^3.0.0",
|
|
14
|
-
"@vuu-ui/vuu-filter-parser": "0.8.
|
|
14
|
+
"@vuu-ui/vuu-filter-parser": "0.8.95",
|
|
15
15
|
"clsx": "^2.0.0",
|
|
16
16
|
"react": ">=17.0.2",
|
|
17
17
|
"react-dom": ">=17.0.2"
|
package/types/column-utils.d.ts
CHANGED
|
@@ -145,4 +145,6 @@ export declare const dataAndColumnUnchanged: (p: TableCellRendererProps, p1: Tab
|
|
|
145
145
|
* edits data - ensures we never have a stale key.
|
|
146
146
|
*/
|
|
147
147
|
export declare const dataColumnAndKeyUnchanged: (p: TableCellRendererProps, p1: TableCellRendererProps) => boolean;
|
|
148
|
+
export declare const toColumnName: (column: ColumnDescriptor) => string;
|
|
149
|
+
export declare const isStringColumn: (column: ColumnDescriptor) => boolean;
|
|
148
150
|
export {};
|
|
@@ -7,6 +7,6 @@ export interface DataSourceContextProps {
|
|
|
7
7
|
isLocalData: boolean;
|
|
8
8
|
VuuDataSource: DataSourceConstructor;
|
|
9
9
|
vuuModuleNames?: string[];
|
|
10
|
-
getServerAPI: () => Promise<Pick<ServerAPI, "getTableList" | "getTableSchema">>;
|
|
10
|
+
getServerAPI: () => Promise<Pick<ServerAPI, "getTableList" | "getTableSchema" | "rpcCall">>;
|
|
11
11
|
}
|
|
12
12
|
export declare const DataSourceContext: import("react").Context<DataSourceContextProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DataSourceFilter, WithBaseFilter, WithFullConfig } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { FilterCombinatorOp } from "@vuu-ui/vuu-filter-types";
|
|
3
|
+
export declare const combine: (filter1: DataSourceFilter, filter2: DataSourceFilter, combinator?: FilterCombinatorOp) => DataSourceFilter;
|
|
4
|
+
export declare const combineFilters: (config: WithBaseFilter<WithFullConfig>) => WithBaseFilter<WithFullConfig>;
|
|
@@ -6,6 +6,7 @@ export declare const NoSort: VuuSort;
|
|
|
6
6
|
export declare const vanillaConfig: WithFullConfig;
|
|
7
7
|
export type DataSourceConfigChanges = {
|
|
8
8
|
aggregationsChanged: boolean;
|
|
9
|
+
baseFilterChanged: boolean;
|
|
9
10
|
columnsChanged: boolean;
|
|
10
11
|
filterChanged: boolean;
|
|
11
12
|
groupByChanged: boolean;
|
|
@@ -16,11 +17,13 @@ export type MaybeDataSourceConfigChanges = DataSourceConfigChanges & {
|
|
|
16
17
|
noChanges: boolean;
|
|
17
18
|
};
|
|
18
19
|
type DataConfigPredicate = (config: DataSourceConfig, newConfig: DataSourceConfig) => boolean;
|
|
20
|
+
export declare const isBaseFilterChanged: DataConfigPredicate;
|
|
19
21
|
export declare const isFilterChanged: DataConfigPredicate;
|
|
20
22
|
export declare const isGroupByChanged: DataConfigPredicate;
|
|
21
23
|
export declare const NO_CONFIG_CHANGES: MaybeDataSourceConfigChanges;
|
|
22
24
|
export declare const isConfigChanged: (config: DataSourceConfig | undefined, newConfig: DataSourceConfig | undefined) => MaybeDataSourceConfigChanges;
|
|
23
25
|
export declare const hasGroupBy: (config?: DataSourceConfig) => config is WithGroupBy;
|
|
26
|
+
export declare const hasBaseFilter: (config?: DataSourceConfig) => config is WithFilter;
|
|
24
27
|
export declare const hasFilter: (config?: DataSourceConfig) => config is WithFilter;
|
|
25
28
|
export declare const hasSort: (config?: DataSourceConfig) => config is WithSort;
|
|
26
29
|
export declare const isTypeaheadSuggestionProvider: (source: unknown) => source is TypeaheadSuggestionProvider;
|
package/types/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./common-types";
|
|
|
9
9
|
export * from "./css-utils";
|
|
10
10
|
export * from "./data-utils";
|
|
11
11
|
export * from "./datasource-action-utils";
|
|
12
|
+
export * from "./datasource-filter-utils";
|
|
12
13
|
export * from "./datasource-utils";
|
|
13
14
|
export * from "./date";
|
|
14
15
|
export * from "./debug-utils";
|