@nocobase/client 1.8.0-beta.9 → 1.8.0

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.
Files changed (43) hide show
  1. package/es/application/Application.d.ts +38 -0
  2. package/es/block-provider/hooks/useParsedFilter.d.ts +2 -1
  3. package/es/collection-manager/action-hooks.d.ts +1 -1
  4. package/es/collection-manager/interfaces/dateOnly.d.ts +1 -0
  5. package/es/flag-provider/FlagProvider.d.ts +5 -0
  6. package/es/hooks/useParsedValue.d.ts +1 -0
  7. package/es/index.mjs +3906 -3181
  8. package/es/modules/fields/component/Input/inputComponentSettings.d.ts +2 -0
  9. package/es/plugin-manager/PinnedPluginListProvider.d.ts +3 -1
  10. package/es/schema-component/antd/action/Action.d.ts +1 -0
  11. package/es/schema-component/antd/appends-tree-select/AppendsTreeSelect.d.ts +3 -1
  12. package/es/schema-component/antd/input/Input.d.ts +2 -0
  13. package/es/schema-component/antd/input/ScanInput/QRCodeScanner.d.ts +19 -0
  14. package/es/schema-component/antd/input/ScanInput/index.d.ts +12 -0
  15. package/es/schema-component/antd/input/ScanInput/useScanner.d.ts +17 -0
  16. package/es/schema-component/antd/page/usePopupContextInActionOrAssociationField.d.ts +2 -0
  17. package/es/schema-component/antd/password/Password.d.ts +1 -0
  18. package/es/schema-component/antd/select/Select.d.ts +1 -1
  19. package/es/schema-component/common/utils/uitls.d.ts +1 -1
  20. package/es/schema-settings/LinkageRules/bindLinkageRulesToFiled.d.ts +3 -0
  21. package/es/schema-settings/VariableInput/VariableInput.d.ts +1 -1
  22. package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
  23. package/es/schema-settings/VariableInput/hooks/useSystemSettingsVariable.d.ts +28 -0
  24. package/es/schema-settings/VariableInput/hooks/useVariableOptions.d.ts +1 -54
  25. package/es/variables/VariableScope.d.ts +17 -0
  26. package/es/variables/hooks/useLocalVariablesWithoutCustomVariable.d.ts +16 -0
  27. package/es/variables/index.d.ts +2 -0
  28. package/lib/index.js +104 -104
  29. package/lib/locale/de-DE.js +2 -1
  30. package/lib/locale/en-US.js +2 -1
  31. package/lib/locale/es-ES.js +2 -1
  32. package/lib/locale/fr-FR.js +2 -1
  33. package/lib/locale/it-IT.js +5 -1
  34. package/lib/locale/ja-JP.js +2 -1
  35. package/lib/locale/ko-KR.js +2 -1
  36. package/lib/locale/nl-NL.js +2 -1
  37. package/lib/locale/pt-BR.js +5 -1
  38. package/lib/locale/ru-RU.js +5 -1
  39. package/lib/locale/tr-TR.js +5 -1
  40. package/lib/locale/uk-UA.js +5 -1
  41. package/lib/locale/zh-CN.js +5 -1
  42. package/lib/locale/zh-TW.js +5 -1
  43. package/package.json +7 -6
@@ -10,5 +10,7 @@ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSe
10
10
  import { SchemaSettingsItemType } from '../../../../application/schema-settings/types';
11
11
  export declare const ellipsisSettingsItem: SchemaSettingsItemType;
12
12
  export declare const enableLinkSettingsItem: SchemaSettingsItemType;
13
+ export declare const enableScanSettingsItem: SchemaSettingsItemType;
14
+ export declare const disableManualInputSettingsItem: SchemaSettingsItemType;
13
15
  export declare const openModeSettingsItem: SchemaSettingsItemType;
14
16
  export declare const inputComponentSettings: SchemaSettings<{}>;
@@ -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>;
@@ -10,3 +10,4 @@ import { ComposedAction } from './types';
10
10
  export declare const Action: ComposedAction;
11
11
  export default Action;
12
12
  export declare function isBulkEditAction(fieldSchema: any): boolean;
13
+ export declare function isWriteEmailAction(fieldSchema: any): boolean;
@@ -20,5 +20,7 @@ export type AppendsTreeSelectProps = {
20
20
  label: string;
21
21
  value: string;
22
22
  };
23
+ includeFieldPaths: boolean;
23
24
  };
24
- export declare const AppendsTreeSelect: React.FC<TreeSelectProps & AppendsTreeSelectProps>;
25
+ export declare const FieldsTreeSelect: React.FC<TreeSelectProps & AppendsTreeSelectProps>;
26
+ export declare const AppendsTreeSelect: React.FC<AppendsTreeSelectProps>;
@@ -25,6 +25,8 @@ type ComposedInput = React.FC<NocoBaseInputProps> & {
25
25
  };
26
26
  export type NocoBaseInputProps = InputProps & {
27
27
  trim?: boolean;
28
+ disableManualInput?: boolean;
29
+ enableScan?: boolean;
28
30
  };
29
31
  export declare const Input: ComposedInput;
30
32
  export default Input;
@@ -0,0 +1,19 @@
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 React from 'react';
10
+ export declare function ScanBox({ style }: {
11
+ style: React.CSSProperties;
12
+ }): React.JSX.Element;
13
+ interface QRCodeScannerProps {
14
+ visible: boolean;
15
+ onClose: () => void;
16
+ onScanSuccess: (result: string) => void;
17
+ }
18
+ export declare const QRCodeScanner: React.FC<QRCodeScannerProps>;
19
+ export {};
@@ -0,0 +1,12 @@
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 React from 'react';
10
+ import { NocoBaseInputProps } from '../Input';
11
+ declare const ScanInput: React.FC<NocoBaseInputProps>;
12
+ export { ScanInput };
@@ -0,0 +1,17 @@
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 { Html5Qrcode } from 'html5-qrcode';
10
+ export declare function useScanner({ onScannerSizeChanged, elementId, onScanSuccess }: {
11
+ onScannerSizeChanged: any;
12
+ elementId: any;
13
+ onScanSuccess: any;
14
+ }): {
15
+ startScanCamera: (scanner: Html5Qrcode) => Promise<null>;
16
+ startScanFile: (file: File) => Promise<void>;
17
+ };
@@ -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;
@@ -7,10 +7,10 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import type { SelectProps as AntdSelectProps } from 'antd';
10
+ import { BaseOptionType, DefaultOptionType } from 'antd/es/select';
10
11
  import React from 'react';
11
12
  import { ReadPretty } from './ReadPretty';
12
13
  import { FieldNames } from './utils';
13
- import { BaseOptionType, DefaultOptionType } from 'antd/es/select';
14
14
  export type SelectProps<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> = AntdSelectProps<ValueType, OptionType> & {
15
15
  /**
16
16
  * Whether it is an object value
@@ -26,5 +26,5 @@ export declare const conditionAnalyses: ({ ruleGroup, variables, localVariables,
26
26
  variableNameOfLeftCondition?: string;
27
27
  conditionType?: 'advanced' | 'basic';
28
28
  }, jsonLogic: any) => Promise<boolean>;
29
- export declare function getRenderContent(templateEngine: any, content: any, variables: any, localVariables: any, defaultParse: any): Promise<any>;
29
+ export declare function getRenderContent(templateEngine: any, content: any, variables: any, localVariables: any, defaultParse: any, t?: any): Promise<any>;
30
30
  export {};
@@ -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';