@nocobase/client 1.2.8-alpha → 1.2.10-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.
@@ -6,9 +6,8 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- import React, { FC } from 'react';
10
- import { Collection } from '../../data-source';
11
- interface DeclareVariableProps {
9
+ import { Collection } from '../../data-source/collection/Collection';
10
+ export interface DeclareVariableProps {
12
11
  name: string;
13
12
  /** 变量值 */
14
13
  value: any;
@@ -17,9 +16,3 @@ interface DeclareVariableProps {
17
16
  /** 变量对应的数据表信息 */
18
17
  collection?: Collection;
19
18
  }
20
- export declare const DeclareVariableContext: React.Context<DeclareVariableProps>;
21
- /**
22
- * 在当前上下文中声明一个变量
23
- */
24
- export declare const DeclareVariable: FC<DeclareVariableProps>;
25
- export {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { FC } from 'react';
10
+ import { Collection } from '../../../data-source/collection/Collection';
11
+ import { DeclareVariableProps } from '../types';
12
+ export declare const VariablePopupRecordProvider: FC<{
13
+ recordData?: Record<string, any>;
14
+ collection?: Collection;
15
+ parent?: {
16
+ recordData?: Record<string, any>;
17
+ collection?: Collection;
18
+ };
19
+ }>;
20
+ export declare const useCurrentPopupRecord: () => DeclareVariableProps;
21
+ export declare const useParentPopupRecord: () => DeclareVariableProps;
@@ -22,6 +22,9 @@ interface Props {
22
22
  value: any;
23
23
  collectionField: CollectionFieldOptions_deprecated;
24
24
  onChange: (value: any) => void;
25
+ style?: React.CSSProperties;
26
+ componentProps?: any;
25
27
  }
26
28
  export declare const DynamicComponent: (props: Props) => React.JSX.Element;
29
+ export declare const FilterDynamicComponent: (props: Props) => React.JSX.Element;
27
30
  export {};
@@ -9,3 +9,5 @@
9
9
  export * from './Filter';
10
10
  export * from './FilterAction';
11
11
  export * from './useFilterActionProps';
12
+ export { FilterDynamicComponent } from './DynamicComponent';
13
+ export * from './context';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ /**
10
+ * 变量:`Parent popup record`
11
+ * @param props
12
+ * @returns
13
+ */
14
+ export declare const useParentPopupVariable: (props?: any) => {
15
+ /** 变量配置 */
16
+ settings: import("../type").Option;
17
+ /** 变量值 */
18
+ parentPopupRecordCtx: any;
19
+ /** 用于判断是否需要显示配置项 */
20
+ shouldDisplayParentPopupRecord: boolean;
21
+ /** 当前记录对应的 collection name */
22
+ collectionName: string;
23
+ dataSource: string;
24
+ };