@nocobase/client 1.7.0 → 1.8.0-alpha.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.
@@ -10,4 +10,6 @@ import React from 'react';
10
10
  export declare const PinnedPluginListProvider: React.FC<{
11
11
  items: any;
12
12
  }>;
13
- export declare const PinnedPluginList: React.MemoExoticComponent<() => React.JSX.Element>;
13
+ export declare const PinnedPluginList: React.MemoExoticComponent<(props: {
14
+ onClick?: () => void;
15
+ }) => React.JSX.Element>;
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { ISchema } from '@formily/react';
10
+ import { UseRequestResult } from '../../../api-client/hooks/useRequest';
10
11
  export interface PopupContext {
11
12
  dataSource?: string;
12
13
  collection?: string;
@@ -15,6 +16,7 @@ export interface PopupContext {
15
16
  * if true, the context will never be updated
16
17
  */
17
18
  doNotUpdateContext?: boolean;
19
+ readonly blockService?: UseRequestResult<any>;
18
20
  }
19
21
  export declare const CONTEXT_SCHEMA_KEY = "x-action-context";
20
22
  /**
@@ -10,6 +10,7 @@ import { PasswordProps as AntdPasswordProps } from 'antd/es/input';
10
10
  import React from 'react';
11
11
  export interface PasswordProps extends AntdPasswordProps {
12
12
  checkStrength?: boolean;
13
+ showForgotPassword?: boolean;
13
14
  }
14
15
  export declare const Password: React.ForwardRefExoticComponent<Partial<PasswordProps> & React.RefAttributes<unknown>>;
15
16
  export default Password;
@@ -58,6 +58,9 @@ export declare function replaceVariables(value: string, { variables, localVariab
58
58
  variables: VariablesContextType;
59
59
  localVariables: VariableOption[];
60
60
  }): Promise<{
61
+ exp?: undefined;
62
+ scope?: undefined;
63
+ } | {
61
64
  exp: string;
62
65
  scope: {};
63
66
  }>;
@@ -33,7 +33,7 @@ type Props = {
33
33
  children?: any;
34
34
  className?: string;
35
35
  style?: React.CSSProperties;
36
- collectionField: CollectionFieldOptions_deprecated;
36
+ collectionField?: CollectionFieldOptions_deprecated;
37
37
  contextCollectionName?: string;
38
38
  /**
39
39
  * 根据 `onChange` 的第一个参数,判断是否需要触发 `onChange`
@@ -12,6 +12,7 @@ export * from './useDateVariable';
12
12
  export * from './useRoleVariable';
13
13
  export * from './useURLSearchParamsVariable';
14
14
  export * from './useUserVariable';
15
+ export * from './useSystemSettingsVariable';
15
16
  export * from './useVariableOptions';
16
17
  export * from './usePopupVariable';
17
18
  export * from './useContextAssociationFields';
@@ -0,0 +1,28 @@
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
+ * 变量:`系统设置`
11
+ * @param param0
12
+ * @returns
13
+ */
14
+ export declare const useSystemSettingsVariable: () => {
15
+ /** 变量的配置项 */
16
+ systemSettings: {
17
+ key: string;
18
+ value: string;
19
+ label: string;
20
+ isLeaf: boolean;
21
+ children: {
22
+ key: string;
23
+ value: string;
24
+ label: string;
25
+ isLeaf: boolean;
26
+ }[];
27
+ };
28
+ };
@@ -36,58 +36,5 @@ interface Props {
36
36
  /** 消费变量值的字段 */
37
37
  targetFieldSchema?: Schema;
38
38
  }
39
- export declare const useVariableOptions: ({ collectionField, form, uiSchema, operator, noDisabled, targetFieldSchema, record, }: Props) => (import("../type").Option | {
40
- label: string;
41
- value: string;
42
- key: string;
43
- children: {
44
- key: string;
45
- value: string;
46
- label: string;
47
- operators: ({
48
- label: string;
49
- value: string;
50
- selected: boolean;
51
- schema: {
52
- 'x-component': string; /** 消费变量值的字段 */
53
- 'x-component-props': {
54
- isRange: boolean;
55
- };
56
- };
57
- onlyFilterAction: boolean;
58
- noValue?: undefined;
59
- } | {
60
- label: string;
61
- value: string;
62
- schema: {
63
- 'x-component': string;
64
- 'x-component-props': {
65
- isRange: boolean;
66
- };
67
- };
68
- onlyFilterAction: boolean;
69
- selected?: undefined;
70
- noValue?: undefined;
71
- } | {
72
- label: string;
73
- value: string;
74
- schema: {
75
- 'x-component': string;
76
- 'x-component-props': {
77
- isRange: boolean;
78
- };
79
- };
80
- selected?: undefined;
81
- onlyFilterAction?: undefined;
82
- noValue?: undefined;
83
- } | {
84
- label: string;
85
- value: string;
86
- noValue: boolean;
87
- selected?: undefined;
88
- schema?: undefined;
89
- onlyFilterAction?: undefined;
90
- })[];
91
- }[];
92
- })[];
39
+ export declare const useVariableOptions: ({ collectionField, form, uiSchema, operator, noDisabled, targetFieldSchema, record, }: Props) => any[];
93
40
  export {};
@@ -0,0 +1,17 @@
1
+ import React, { FC } from "react";
2
+ export declare const VariableScopeContext: React.Context<{
3
+ scopeId: string;
4
+ type: string;
5
+ parent?: any;
6
+ }>;
7
+ export declare const VariableScope: FC<{
8
+ scopeId: string;
9
+ type: string;
10
+ }>;
11
+ export declare const useVariableScopeInfo: () => {
12
+ getVariableScopeInfo: () => {
13
+ scopeId: string;
14
+ type: string;
15
+ parent?: any;
16
+ };
17
+ };
@@ -0,0 +1,16 @@
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 { Form } from '@formily/core';
10
+ import { VariableOption } from '../types';
11
+ interface Props {
12
+ collectionName?: string;
13
+ currentForm?: Form;
14
+ }
15
+ export declare const useLocalVariablesWithoutCustomVariable: (props?: Props) => VariableOption[];
16
+ export {};
@@ -10,8 +10,10 @@ export { default as VariablesProvider, VariablesContext } from './VariablesProvi
10
10
  export { default as useBuiltinVariables } from './hooks/useBuiltinVariables';
11
11
  export { default as useContextVariable } from './hooks/useContextVariable';
12
12
  export { default as useLocalVariables } from './hooks/useLocalVariables';
13
+ export { useLocalVariablesWithoutCustomVariable } from './hooks/useLocalVariablesWithoutCustomVariable';
13
14
  export { default as useVariables } from './hooks/useVariables';
14
15
  export * from './utils/isVariable';
15
16
  export * from './utils/transformVariableValue';
16
17
  export * from './constants';
17
18
  export type { VariablesContextType } from './types';
19
+ export { useVariableScopeInfo } from './VariableScope';