@nocobase/client 1.5.0-beta.9 → 1.5.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 (36) hide show
  1. package/es/appInfo/CurrentAppInfoProvider.d.ts +1 -0
  2. package/es/application/Application.d.ts +13 -0
  3. package/es/block-provider/BlockProvider.d.ts +2 -2
  4. package/es/collection-manager/interfaces/checkbox.d.ts +20 -0
  5. package/es/collection-manager/interfaces/properties/operators.d.ts +20 -0
  6. package/es/collection-manager/templates/sql.d.ts +13 -13
  7. package/es/collection-manager/templates/view.d.ts +2 -2
  8. package/es/index.mjs +4489 -4044
  9. package/es/modules/blocks/data-blocks/details-single/ReadPrettyFormItemInitializers.d.ts +2 -0
  10. package/es/modules/blocks/filter-blocks/FilterCollectionField.d.ts +15 -0
  11. package/es/schema-component/antd/association-field/InternalViewer.d.ts +3 -0
  12. package/es/schema-component/antd/association-field/Table.d.ts +1 -1
  13. package/es/schema-component/antd/date-picker/util.d.ts +1 -0
  14. package/es/schema-component/antd/form-item/hooks/useSpecialCase.d.ts +6 -2
  15. package/es/schema-component/antd/form-v2/Templates.d.ts +1 -1
  16. package/es/schema-component/antd/password/utils.d.ts +1 -1
  17. package/es/schema-component/antd/table-v2/Table.Column.ActionBar.d.ts +1 -1
  18. package/es/schema-component/antd/time-picker/TimePicker.d.ts +2 -0
  19. package/es/schema-component/antd/unix-timestamp/UnixTimestamp.d.ts +1 -0
  20. package/es/schema-component/antd/upload/placeholder.d.ts +1 -1
  21. package/es/schema-component/antd/upload/shared.d.ts +2 -2
  22. package/es/schema-component/common/utils/uitls.d.ts +0 -6
  23. package/es/{schema-component/antd/table-v2/RenderTextInCell.d.ts → schema-settings/SchemaSettingsDateRange.d.ts} +5 -5
  24. package/es/schema-settings/VariableInput/hooks/useParentRecordVariable.d.ts +2 -2
  25. package/es/schema-settings/VariableInput/hooks/useRecordVariable.d.ts +7 -0
  26. package/lib/index.js +134 -137
  27. package/lib/locale/en-US.js +8 -0
  28. package/lib/locale/es-ES.js +8 -0
  29. package/lib/locale/fr-FR.js +8 -0
  30. package/lib/locale/ja-JP.js +8 -0
  31. package/lib/locale/ko-KR.js +8 -0
  32. package/lib/locale/pt-BR.js +8 -0
  33. package/lib/locale/uk-UA.js +8 -0
  34. package/lib/locale/zh-CN.js +16 -2
  35. package/lib/locale/zh-TW.js +8 -0
  36. package/package.json +6 -6
@@ -6,7 +6,9 @@
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 from 'react';
9
10
  import { CompatibleSchemaInitializer } from '../../../../application/schema-initializer/CompatibleSchemaInitializer';
11
+ export declare const ParentCollectionFields: () => React.JSX.Element;
10
12
  /**
11
13
  * @deprecated
12
14
  * use `readPrettyFormItemInitializers` instead
@@ -0,0 +1,15 @@
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
+ /**
11
+ * TODO: 初步适配
12
+ * @internal
13
+ */
14
+ export declare const FilterCollectionFieldInternalField: React.FC;
15
+ export declare const FilterCollectionField: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
@@ -15,6 +15,9 @@ export interface ButtonListProps {
15
15
  label: string;
16
16
  value: string;
17
17
  };
18
+ onClick?: (props: {
19
+ recordData: any;
20
+ }) => void;
18
21
  }
19
22
  interface ReadPrettyInternalViewerProps {
20
23
  ButtonList: FC<ButtonListProps>;
@@ -62,5 +62,5 @@ export declare const useColumnsDeepMemoized: (columns: any[]) => Pick<import("@f
62
62
  "x-read-only"?: boolean;
63
63
  "x-read-pretty"?: boolean;
64
64
  "x-compile-omitted"?: string[];
65
- }>, symbol | "name" | "title" | "pattern" | "default" | "maximum" | "type" | "maxLength" | "minLength" | "readOnly" | "required" | `x-${string}` | `x-${number}` | "description" | "writeOnly" | "enum" | "const" | "multipleOf" | "exclusiveMaximum" | "minimum" | "exclusiveMinimum" | "maxItems" | "minItems" | "uniqueItems" | "maxProperties" | "minProperties" | "format" | "definitions" | "items" | "additionalItems" | "patternProperties" | "additionalProperties" | "version" | "$ref" | "$namespace">[];
65
+ }>, symbol | "name" | "title" | "pattern" | "default" | "maximum" | "type" | "maxLength" | "minLength" | "readOnly" | "required" | "description" | `x-${string}` | `x-${number}` | "version" | "writeOnly" | "enum" | "const" | "multipleOf" | "exclusiveMaximum" | "minimum" | "exclusiveMinimum" | "maxItems" | "minItems" | "uniqueItems" | "maxProperties" | "minProperties" | "format" | "$ref" | "$namespace" | "definitions" | "items" | "additionalItems" | "patternProperties" | "additionalProperties">[];
66
66
  export declare const Table: any;
@@ -16,6 +16,7 @@ export interface Moment2strOptions {
16
16
  export declare const moment2str: (value?: Dayjs | null, options?: Moment2strOptions) => any;
17
17
  export declare const handleDateChangeOnForm: (value: any, dateOnly: any, utc: any, picker: any, showTime: any, gmt: any) => any;
18
18
  export declare const mapDatePicker: () => (props: any) => any;
19
+ export declare function isMobile(): boolean;
19
20
  export declare const mapRangePicker: () => (props: any) => any;
20
21
  export declare const getDateRanges: (props?: {
21
22
  /** 日期是否是 UTC 格式 */
@@ -65,8 +65,9 @@ export declare function isFromDatabase(value: Record<string, any>): boolean;
65
65
  * 3. 如果子表格中没有设置默认值,就会再把子表格重置为空。
66
66
  * @param param0
67
67
  */
68
- export declare const useSubTableSpecialCase: ({ field }: {
69
- field: any;
68
+ export declare const useSubTableSpecialCase: ({ rootField, rootSchema }: {
69
+ rootField: any;
70
+ rootSchema: any;
70
71
  }) => void;
71
72
  /**
72
73
  * Determines if one array is a subset of another array
@@ -75,3 +76,6 @@ export declare const useSubTableSpecialCase: ({ field }: {
75
76
  * @returns Returns true if subset is a subset of superset, otherwise false
76
77
  */
77
78
  export declare function isSubset(subset: any[], superset: any[]): boolean;
79
+ export declare function useHasUsedVariable(): {
80
+ hasUsedVariable: (variableName: string, rootSchema: Schema) => boolean;
81
+ };
@@ -38,4 +38,4 @@ export declare function fetchTemplateData(api: any, template: {
38
38
  collection: string;
39
39
  dataId: number;
40
40
  fields: string[];
41
- }, t: any): Promise<any>;
41
+ }, headers?: any): Promise<any>;
@@ -6,4 +6,4 @@
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
- export declare const getStrength: (val: any) => 0 | 40 | 100 | 20 | 80 | 60;
9
+ export declare const getStrength: (val: any) => 0 | 20 | 100 | 40 | 80 | 60;
@@ -11,4 +11,4 @@ export declare const designerCss: ({ margin, padding }?: {
11
11
  margin?: string;
12
12
  padding?: string;
13
13
  }) => string;
14
- export declare const TableColumnActionBar: React.MemoExoticComponent<import("@formily/react").ReactFC<unknown>>;
14
+ export declare const TableColumnActionBar: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;
@@ -10,6 +10,8 @@
10
10
  import { TimePickerProps as AntdTimePickerProps, TimeRangePickerProps } from 'antd/es/time-picker';
11
11
  type ComposedTimePicker = React.FC<AntdTimePickerProps> & {
12
12
  RangePicker?: React.FC<TimeRangePickerProps>;
13
+ ReadPretty?: React.FC<any>;
13
14
  };
15
+ export declare const mapTimeFormat: () => (props: any, field: any) => any;
14
16
  export declare const TimePicker: ComposedTimePicker;
15
17
  export default TimePicker;
@@ -10,6 +10,7 @@ import React from 'react';
10
10
  interface UnixTimestampProps {
11
11
  value?: any;
12
12
  onChange?: (value: number) => void;
13
+ accuracy?: 'millisecond' | 'second';
13
14
  }
14
15
  export declare const UnixTimestamp: React.ForwardRefExoticComponent<Partial<UnixTimestampProps> & React.RefAttributes<unknown>>;
15
16
  export {};
@@ -10,4 +10,4 @@ export declare const UPLOAD_PLACEHOLDER: {
10
10
  ext: RegExp;
11
11
  icon: string;
12
12
  }[];
13
- export declare const UNKNOWN_FILE_ICON = "/file-placeholder/unknown-200-200.png";
13
+ export declare const UNKNOWN_FILE_ICON: string;
@@ -68,7 +68,7 @@ export declare function normalizeFile(file: UploadFile & Record<string, any>): {
68
68
  "aria-label"?: string;
69
69
  "aria-labelledby"?: string;
70
70
  };
71
- export declare function useUploadProps<T extends IUploadProps = UploadProps>(props: T): T & {
71
+ export declare function useUploadProps<T extends IUploadProps = UploadProps>(props: T): {
72
72
  customRequest({ action, data, file, filename, headers, onError, onProgress, onSuccess, withCredentials }: {
73
73
  action: any;
74
74
  data: any;
@@ -82,7 +82,7 @@ export declare function useUploadProps<T extends IUploadProps = UploadProps>(pro
82
82
  }): {
83
83
  abort(): void;
84
84
  };
85
- };
85
+ } & T;
86
86
  export declare function toValueItem(data: any): any;
87
87
  export declare const toItem: (file: any) => any;
88
88
  export declare const toFileList: (fileList: any) => any[];
@@ -29,11 +29,5 @@ export declare const conditionAnalyses: ({ ruleGroup, variables, localVariables,
29
29
  */
30
30
  variableNameOfLeftCondition?: string;
31
31
  }) => Promise<boolean>;
32
- /**
33
- * 转化成变量字符串,方便解析出值
34
- * @param targetField
35
- * @returns
36
- */
37
- export declare function targetFieldToVariableString(targetField: string[], variableName?: string): string;
38
32
  export declare function getRenderContent(templateEngine: any, content: any, variables: any, localVariables: any, defaultParse: any): Promise<any>;
39
33
  export {};
@@ -6,8 +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 { FC } from 'react';
10
- export declare const RenderTextInCell: FC<{
11
- value: string;
12
- ellipsis: boolean;
13
- }>;
9
+ import { Schema } from '@formily/react';
10
+ import React from 'react';
11
+ export declare const SchemaSettingsDateRange: (props: {
12
+ fieldSchema: Schema;
13
+ }) => React.JSX.Element;
@@ -31,7 +31,7 @@ export declare const useParentRecordVariable: (props: Props) => import("../type"
31
31
  */
32
32
  export declare const useCurrentParentRecordContext: () => {
33
33
  currentParentRecordCtx: {};
34
- shouldDisplayCurrentParentRecord: boolean;
34
+ shouldDisplayCurrentParentRecord: import("../../../data-source").CollectionFieldOptions;
35
35
  collectionName: string;
36
36
  dataSource: string;
37
37
  };
@@ -43,7 +43,7 @@ export declare const useCurrentParentRecordContext: () => {
43
43
  export declare const useCurrentParentRecordVariable: (props?: Props) => {
44
44
  currentParentRecordSettings: import("../type").Option;
45
45
  currentParentRecordCtx: {};
46
- shouldDisplayCurrentParentRecord: boolean;
46
+ shouldDisplayCurrentParentRecord: import("../../../data-source").CollectionFieldOptions;
47
47
  collectionName: string;
48
48
  dataSource: string;
49
49
  };
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Schema } from '@formily/json-schema';
10
+ import { FC } from 'react';
10
11
  import { CollectionFieldOptions_deprecated } from '../../../collection-manager';
11
12
  interface Props {
12
13
  collectionField?: CollectionFieldOptions_deprecated;
@@ -16,6 +17,12 @@ interface Props {
16
17
  /** 消费变量值的字段 */
17
18
  targetFieldSchema?: Schema;
18
19
  }
20
+ interface CurrentRecordContextProps {
21
+ recordData: any;
22
+ collectionName: string;
23
+ }
24
+ export declare const CurrentRecordContextProvider: FC<CurrentRecordContextProps>;
25
+ export declare const useCurrentRecord: () => CurrentRecordContextProps;
19
26
  /**
20
27
  * @deprecated
21
28
  * 该 hook 已废弃,请使用 `useCurrentRecordVariable` 代替