@nocobase/client 2.0.0-alpha.52 → 2.0.0-alpha.54

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 (44) hide show
  1. package/es/collection-manager/Configuration/SetPrimaryKeyAction.d.ts +10 -0
  2. package/es/collection-manager/Configuration/interfaces.d.ts +1 -0
  3. package/es/collection-manager/interfaces/index.d.ts +1 -0
  4. package/es/collection-manager/interfaces/input.d.ts +1 -0
  5. package/es/collection-manager/interfaces/integer.d.ts +1 -0
  6. package/es/collection-manager/interfaces/nanoid.d.ts +1 -0
  7. package/es/collection-manager/interfaces/snowflake-id.d.ts +117 -0
  8. package/es/collection-manager/interfaces/uuid.d.ts +1 -0
  9. package/es/collection-manager/templates/properties/index.d.ts +1 -0
  10. package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
  11. package/es/flow/actions/displayFieldComponent.d.ts +1 -1
  12. package/es/flow/actions/titleField.d.ts +0 -1
  13. package/es/flow/internal/utils/rebuildFieldSubModel.d.ts +2 -1
  14. package/es/flow/models/base/GridModel.d.ts +1 -1
  15. package/es/flow/models/base/PageModel/PageTabModel.d.ts +1 -0
  16. package/es/flow/models/blocks/details/DetailsGridModel.d.ts +1 -0
  17. package/es/flow/models/blocks/form/FormActionModel.d.ts +1 -0
  18. package/es/flow/models/blocks/form/FormGridModel.d.ts +1 -0
  19. package/es/flow/models/fields/DisplayAssociationField/DisplaySubItemFieldModel.d.ts +1 -0
  20. package/es/flow/models/fields/DisplayAssociationField/DisplaySubListFieldModel.d.ts +1 -0
  21. package/es/flow/models/fields/DisplayAssociationField/DisplaySubTableFieldModel.d.ts +1 -0
  22. package/es/flow/models/fields/DisplayEnumFieldModel.d.ts +1 -0
  23. package/es/flow/models/fields/DisplayNumberFieldModel.d.ts +3 -1
  24. package/es/index.mjs +2949 -2487
  25. package/lib/{index-C3fHjsMw-C4GzBlfp.js → index-C3fHjsMw-BlqGU4Bh.js} +236 -236
  26. package/lib/index.js +121 -121
  27. package/lib/locale/de-DE.json +1 -1
  28. package/lib/locale/en-US.json +9 -3
  29. package/lib/locale/es-ES.json +1 -1
  30. package/lib/locale/fr-FR.json +1 -1
  31. package/lib/locale/hu-HU.json +1 -1
  32. package/lib/locale/id-ID.json +1 -1
  33. package/lib/locale/it-IT.json +1 -1
  34. package/lib/locale/ja-JP.json +1 -1
  35. package/lib/locale/ko-KR.json +1 -1
  36. package/lib/locale/nl-NL.json +1 -1
  37. package/lib/locale/pt-BR.json +1 -1
  38. package/lib/locale/ru-RU.json +1 -1
  39. package/lib/locale/tr-TR.json +1 -1
  40. package/lib/locale/uk-UA.json +1 -1
  41. package/lib/locale/vi-VN.json +1 -1
  42. package/lib/locale/zh-CN.json +20 -8
  43. package/lib/locale/zh-TW.json +1 -1
  44. package/package.json +6 -6
@@ -0,0 +1,10 @@
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 const SetPrimaryKeyAction: (props: any) => React.JSX.Element;
@@ -22,3 +22,4 @@ export declare const useFieldInterfaceOptions: () => {
22
22
  label: string;
23
23
  order?: number;
24
24
  }[];
25
+ export declare const isPrimaryKeyCandidate: (field: CollectionFieldInterface) => any;
@@ -33,6 +33,7 @@ export * from './phone';
33
33
  export * from './radioGroup';
34
34
  export * from './richText';
35
35
  export * from './select';
36
+ export * from './snowflake-id';
36
37
  export * from './subTable';
37
38
  export * from './tableoid';
38
39
  export * from './textarea';
@@ -14,6 +14,7 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
14
14
  group: string;
15
15
  order: number;
16
16
  title: string;
17
+ primaryKeyDescription: string;
17
18
  sortable: boolean;
18
19
  default: {
19
20
  interface: string;
@@ -13,6 +13,7 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
13
13
  group: string;
14
14
  order: number;
15
15
  title: string;
16
+ primaryKeyDescription: string;
16
17
  sortable: boolean;
17
18
  default: {
18
19
  type: string;
@@ -13,6 +13,7 @@ export declare class NanoidFieldInterface extends CollectionFieldInterface {
13
13
  group: string;
14
14
  order: number;
15
15
  title: string;
16
+ primaryKeyDescription: string;
16
17
  hidden: boolean;
17
18
  sortable: boolean;
18
19
  default: {
@@ -0,0 +1,117 @@
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 { CollectionFieldInterface } from '../../data-source/collection-field-interface/CollectionFieldInterface';
10
+ export declare class SnowflakeIdFieldInterface extends CollectionFieldInterface {
11
+ name: string;
12
+ type: string;
13
+ group: string;
14
+ order: number;
15
+ title: string;
16
+ primaryKeyDescription: string;
17
+ hidden: boolean;
18
+ sortable: boolean;
19
+ default: {
20
+ type: string;
21
+ uiSchema: {
22
+ type: string;
23
+ 'x-component': string;
24
+ 'x-component-props': {
25
+ stringMode: boolean;
26
+ separator: string;
27
+ step: string;
28
+ };
29
+ 'x-validator': string;
30
+ };
31
+ };
32
+ availableTypes: string[];
33
+ properties: {
34
+ layout: {
35
+ type: string;
36
+ title: string;
37
+ 'x-component': string;
38
+ 'x-decorator': string;
39
+ 'x-decorator-props': {
40
+ style: {
41
+ marginBottom: string;
42
+ };
43
+ };
44
+ properties: {
45
+ primaryKey: {
46
+ type: string;
47
+ 'x-content': string;
48
+ 'x-decorator': string;
49
+ 'x-component': string;
50
+ 'x-disabled': string;
51
+ 'x-reactions': {
52
+ dependencies: string[];
53
+ when: string;
54
+ fulfill: {
55
+ state: {
56
+ value: boolean;
57
+ };
58
+ };
59
+ }[];
60
+ };
61
+ unique: {
62
+ type: string;
63
+ 'x-content': string;
64
+ 'x-decorator': string;
65
+ 'x-component': string;
66
+ 'x-disabled': string;
67
+ 'x-reactions': {
68
+ dependencies: string[];
69
+ when: string;
70
+ fulfill: {
71
+ state: {
72
+ value: boolean;
73
+ };
74
+ };
75
+ }[];
76
+ };
77
+ };
78
+ };
79
+ 'uiSchema.title': {
80
+ type: string;
81
+ title: string;
82
+ required: boolean;
83
+ 'x-decorator': string;
84
+ 'x-component': string;
85
+ };
86
+ name: {
87
+ type: string;
88
+ title: string;
89
+ required: boolean;
90
+ 'x-disabled': string;
91
+ 'x-decorator': string;
92
+ 'x-component': string;
93
+ 'x-validator': string;
94
+ description: string;
95
+ };
96
+ };
97
+ filterable: {
98
+ operators: ({
99
+ label: string;
100
+ value: string;
101
+ selected: boolean;
102
+ noValue?: undefined;
103
+ } | {
104
+ label: string;
105
+ value: string;
106
+ selected?: undefined;
107
+ noValue?: undefined;
108
+ } | {
109
+ label: string;
110
+ value: string;
111
+ noValue: boolean;
112
+ selected?: undefined;
113
+ })[];
114
+ };
115
+ description: string;
116
+ titleUsable: boolean;
117
+ }
@@ -13,6 +13,7 @@ export declare class UUIDFieldInterface extends CollectionFieldInterface {
13
13
  group: string;
14
14
  order: number;
15
15
  title: string;
16
+ primaryKeyDescription: string;
16
17
  hidden: boolean;
17
18
  sortable: boolean;
18
19
  default: {
@@ -74,6 +74,7 @@ export declare const defaultConfigurableProperties: {
74
74
  };
75
75
  'x-component': import("react").MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<any, "ref">>>;
76
76
  'x-component-props': {
77
+ template: string;
77
78
  disabled: string;
78
79
  presetFieldsDisabledIncludes: string;
79
80
  };
@@ -23,6 +23,7 @@ export declare abstract class CollectionFieldInterface {
23
23
  group: string;
24
24
  title?: string;
25
25
  description?: string;
26
+ primaryKeyDescription?: string;
26
27
  order?: number;
27
28
  default?: {
28
29
  type: string;
@@ -10,7 +10,7 @@ export declare function buildAssociationOptions(ctx: any, itemModel: any, titleF
10
10
  label: any;
11
11
  value: any;
12
12
  }[] | {
13
- label: string;
13
+ label: any;
14
14
  options: {
15
15
  label: any;
16
16
  value: any;
@@ -6,5 +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 SelectOptions: (props: any) => any;
10
9
  export declare const titleField: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -26,7 +26,8 @@ type RebuildOptions = {
26
26
  targetUse: string;
27
27
  defaultProps?: Record<string, unknown>;
28
28
  pattern?: string;
29
+ fieldSettingsInit?: unknown;
29
30
  };
30
31
  export declare function getFieldBindingUse(fieldModel?: FieldModel): string | undefined;
31
- export declare function rebuildFieldSubModel({ parentModel, targetUse, defaultProps, pattern }: RebuildOptions): Promise<void>;
32
+ export declare function rebuildFieldSubModel({ parentModel, targetUse, defaultProps, pattern, fieldSettingsInit, }: RebuildOptions): Promise<void>;
32
33
  export {};
@@ -29,7 +29,7 @@ export declare class GridModel<T extends {
29
29
  itemSettingsMenuLevel: number;
30
30
  itemFlowSettings: Exclude<FlowModelRendererProps['showFlowSettings'], boolean>;
31
31
  dragOverlayConfig?: DragOverlayConfig;
32
- private readonly itemFallback;
32
+ itemFallback: React.JSX.Element;
33
33
  private readonly itemExtraToolbarItems;
34
34
  private dragState?;
35
35
  private _memoItemFlowSettings?;
@@ -17,6 +17,7 @@ export declare class BasePageTabModel extends FlowModel<{
17
17
  getTabTitle(defaultTitle?: string): any;
18
18
  getTabIcon(): any;
19
19
  renderChildren(): any;
20
+ renderHiddenInConfig(): React.JSX.Element;
20
21
  render(): React.JSX.Element;
21
22
  }
22
23
  export declare class RootPageTabModel extends BasePageTabModel {
@@ -16,6 +16,7 @@ export declare class DetailsGridModel extends GridModel<{
16
16
  items: FieldModel[];
17
17
  };
18
18
  }> {
19
+ itemFallback: React.JSX.Element;
19
20
  itemSettingsMenuLevel: number;
20
21
  itemFlowSettings: {
21
22
  showBackground: boolean;
@@ -18,4 +18,5 @@ export declare class FormSubmitActionModel extends FormActionModel {
18
18
  * @param requestConfig
19
19
  */
20
20
  setSaveRequestConfig(requestConfig?: AxiosRequestConfig): void;
21
+ getAclActionName(): "update" | "create";
21
22
  }
@@ -17,6 +17,7 @@ export type DefaultFormGridStructure = {
17
17
  };
18
18
  };
19
19
  export declare class FormGridModel<T extends DefaultFormGridStructure = DefaultFormGridStructure> extends GridModel<T> {
20
+ itemFallback: React.JSX.Element;
20
21
  itemSettingsMenuLevel: number;
21
22
  itemFlowSettings: {
22
23
  showBackground: boolean;
@@ -9,6 +9,7 @@
9
9
  import React from 'react';
10
10
  import { FieldModel } from '../../base';
11
11
  export declare class DisplaySubItemFieldModel extends FieldModel {
12
+ disableTitleField: boolean;
12
13
  subModelBaseClasses: {
13
14
  action: any;
14
15
  field: any;
@@ -9,6 +9,7 @@
9
9
  import React from 'react';
10
10
  import { FieldModel } from '../../base';
11
11
  export declare class DisplaySubListFieldModel extends FieldModel {
12
+ disableTitleField: boolean;
12
13
  subModelBaseClasses: {
13
14
  action: any;
14
15
  field: any;
@@ -9,6 +9,7 @@
9
9
  import React from 'react';
10
10
  import { FieldModel } from '../../base';
11
11
  export declare class DisplaySubTableFieldModel extends FieldModel {
12
+ disableTitleField: boolean;
12
13
  defaultOverflowMode: string;
13
14
  get collection(): any;
14
15
  get collectionField(): any;
@@ -9,5 +9,6 @@
9
9
  import React from 'react';
10
10
  import { ClickableFieldModel } from './ClickableFieldModel';
11
11
  export declare class DisplayEnumFieldModel extends ClickableFieldModel {
12
+ isEmpty(value: any): boolean;
12
13
  renderComponent(value: any): React.JSX.Element[];
13
14
  }
@@ -8,6 +8,7 @@
8
8
  */
9
9
  import React from 'react';
10
10
  import { ClickableFieldModel } from './ClickableFieldModel';
11
+ export declare function formatNumber(props: any): any;
11
12
  interface displayNumberProps {
12
13
  formatStyle?: 'normal' | 'scientifix';
13
14
  unitConversion?: number;
@@ -24,8 +25,9 @@ interface displayNumberProps {
24
25
  addonBefore?: React.ReactNode;
25
26
  addonAfter?: React.ReactNode;
26
27
  }
27
- export declare const DisplayNumber: (props: displayNumberProps) => React.JSX.Element;
28
+ export declare const getDisplayNumber: (props: displayNumberProps) => any;
28
29
  export declare class DisplayNumberFieldModel extends ClickableFieldModel {
29
30
  renderComponent(value: any): React.JSX.Element;
30
31
  }
32
+ export declare const UnitConversion: () => React.JSX.Element;
31
33
  export {};