@nocobase/client 1.2.24-alpha → 1.2.26-alpha

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.
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import React, { FC, ReactNode } from 'react';
10
10
  import { UseRequestOptions, UseRequestService } from '../../api-client';
11
+ import { FilterParam } from '../../filter-provider/FilterProvider';
11
12
  import { Designable } from '../../schema-component';
12
13
  import { CollectionOptions } from '../collection';
13
14
  import { CollectionRecord } from '../collection-record';
@@ -21,6 +22,7 @@ export interface AllDataBlockProps {
21
22
  action?: 'list' | 'get';
22
23
  params?: {
23
24
  filterByTk?: string | number;
25
+ filter?: FilterParam;
24
26
  [index: string]: any;
25
27
  };
26
28
  parentRecord?: CollectionRecord;
@@ -77,9 +79,7 @@ export declare const AssociationOrCollectionProvider: (props: {
77
79
  children: ReactNode;
78
80
  allowNull?: boolean;
79
81
  }) => React.JSX.Element;
80
- export declare const DataBlockProvider: FC<DataBlockProviderProps & {
81
- children?: ReactNode;
82
- }>;
82
+ export declare const DataBlockProvider: FC<Partial<AllDataBlockProps>>;
83
83
  export declare const useDataBlock: <T extends {}>() => DataBlockContextValue<T>;
84
84
  export declare const useDataBlockProps: <T extends {}>() => AllDataBlockProps & T;
85
85
  export {};
@@ -7,7 +7,8 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
- import { CollectionFieldOptions_deprecated, useCollection_deprecated } from '../collection-manager';
10
+ import { CollectionFieldOptions_deprecated } from '../collection-manager';
11
+ import { Collection } from '../data-source/collection/Collection';
11
12
  declare enum FILTER_OPERATOR {
12
13
  AND = "$and",
13
14
  OR = "$or"
@@ -25,7 +26,6 @@ export interface ForeignKeyField {
25
26
  reverseKey: null | string;
26
27
  [key: string]: any;
27
28
  }
28
- type Collection = ReturnType<typeof useCollection_deprecated>;
29
29
  export interface DataBlock {
30
30
  /** 唯一标识符,schema 中的 name 值 */
31
31
  uid: string;
@@ -69,7 +69,7 @@ export declare const FilterBlockProvider: React.FC;
69
69
  export declare const DataBlockCollector: ({ children, params, }: {
70
70
  children: React.ReactNode;
71
71
  params?: {
72
- filter: FilterParam;
72
+ filter?: FilterParam;
73
73
  };
74
74
  }) => React.JSX.Element;
75
75
  /**
@@ -8,7 +8,8 @@
8
8
  */
9
9
  import { Schema } from '@formily/react';
10
10
  import { FilterTarget } from '../block-provider/hooks';
11
- import { CollectionFieldOptions_deprecated, Collection_deprecated, FieldOptions, useCollection_deprecated } from '../collection-manager';
11
+ import { CollectionFieldOptions_deprecated, FieldOptions } from '../collection-manager';
12
+ import { Collection } from '../data-source/collection/Collection';
12
13
  import { DataBlock } from './FilterProvider';
13
14
  export declare enum FilterBlockType {
14
15
  FORM = 0,
@@ -18,7 +19,7 @@ export declare enum FilterBlockType {
18
19
  }
19
20
  export declare const mergeFilter: (filters: any[], op?: string) => any;
20
21
  export declare const getSupportFieldsByAssociation: (inheritCollectionsChain: string[], block: DataBlock) => CollectionFieldOptions_deprecated[];
21
- export declare const getSupportFieldsByForeignKey: (filterBlockCollection: ReturnType<typeof useCollection_deprecated>, block: DataBlock) => import("./FilterProvider").ForeignKeyField[];
22
+ export declare const getSupportFieldsByForeignKey: (filterBlockCollection: Collection, block: DataBlock) => import("./FilterProvider").ForeignKeyField[];
22
23
  /**
23
24
  * 根据筛选区块类型筛选出支持的数据区块(同表或具有关系字段的表)
24
25
  * @param filterBlockType
@@ -32,9 +33,9 @@ export declare const transformToFilter: (values: Record<string, any>, operators:
32
33
  };
33
34
  }[];
34
35
  };
35
- export declare const useAssociatedFields: () => import("..").CollectionFieldOptions[];
36
+ export declare const useAssociatedFields: () => import("../data-source/collection/Collection").CollectionFieldOptions[];
36
37
  export declare const isAssocField: (field?: FieldOptions) => boolean;
37
- export declare const isSameCollection: (c1: Collection_deprecated, c2: Collection_deprecated) => boolean;
38
+ export declare const isSameCollection: (c1: Collection, c2: Collection) => boolean;
38
39
  export declare const useFilterAPI: () => {
39
40
  /** 当前区块是否已连接其它区块 */
40
41
  isConnected: boolean;