@nocobase/client-v2 2.1.0-beta.38 → 2.1.0-beta.41

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 (137) hide show
  1. package/es/Application.d.ts +6 -0
  2. package/es/collection-field-interface/CollectionFieldInterface.d.ts +51 -15
  3. package/es/collection-field-interface/CollectionFieldInterfaceManager.d.ts +82 -3
  4. package/es/collection-manager/field-configure.d.ts +80 -0
  5. package/es/collection-manager/field-validation.d.ts +43 -0
  6. package/es/collection-manager/filter-operators/index.d.ts +46 -0
  7. package/es/collection-manager/filter-operators/operators.d.ts +30 -0
  8. package/es/collection-manager/interfaces/checkbox.d.ts +1 -41
  9. package/es/collection-manager/interfaces/checkboxGroup.d.ts +12 -44
  10. package/es/collection-manager/interfaces/collection.d.ts +12 -51
  11. package/es/collection-manager/interfaces/color.d.ts +1 -16
  12. package/es/collection-manager/interfaces/createdAt.d.ts +1 -44
  13. package/es/collection-manager/interfaces/createdBy.d.ts +0 -4
  14. package/es/collection-manager/interfaces/dateOnly.d.ts +7 -44
  15. package/es/collection-manager/interfaces/datetime.d.ts +1 -44
  16. package/es/collection-manager/interfaces/datetimeNoTz.d.ts +1 -44
  17. package/es/collection-manager/interfaces/email.d.ts +1 -29
  18. package/es/collection-manager/interfaces/id.d.ts +1 -16
  19. package/es/collection-manager/interfaces/index.d.ts +2 -3
  20. package/es/collection-manager/interfaces/input.d.ts +1 -102
  21. package/es/collection-manager/interfaces/integer.d.ts +1 -95
  22. package/es/collection-manager/interfaces/json.d.ts +16 -7
  23. package/es/collection-manager/interfaces/m2m.d.ts +11 -19
  24. package/es/collection-manager/interfaces/m2o.d.ts +11 -19
  25. package/es/collection-manager/interfaces/markdown.d.ts +1 -63
  26. package/es/collection-manager/interfaces/multipleSelect.d.ts +12 -44
  27. package/es/collection-manager/interfaces/nanoid.d.ts +1 -34
  28. package/es/collection-manager/interfaces/number.d.ts +1 -87
  29. package/es/collection-manager/interfaces/o2m.d.ts +12 -24
  30. package/es/collection-manager/interfaces/obo.d.ts +207 -0
  31. package/es/collection-manager/interfaces/oho.d.ts +207 -0
  32. package/es/collection-manager/interfaces/password.d.ts +1 -56
  33. package/es/collection-manager/interfaces/percent.d.ts +1 -84
  34. package/es/collection-manager/interfaces/phone.d.ts +1 -25
  35. package/es/collection-manager/interfaces/properties/index.d.ts +0 -28
  36. package/es/collection-manager/interfaces/radioGroup.d.ts +1 -29
  37. package/es/collection-manager/interfaces/richText.d.ts +1 -63
  38. package/es/collection-manager/interfaces/select.d.ts +12 -44
  39. package/es/collection-manager/interfaces/snowflake-id.d.ts +1 -34
  40. package/es/collection-manager/interfaces/tableoid.d.ts +1 -10
  41. package/es/collection-manager/interfaces/textarea.d.ts +1 -51
  42. package/es/collection-manager/interfaces/time.d.ts +1 -16
  43. package/es/collection-manager/interfaces/types.d.ts +3 -12
  44. package/es/collection-manager/interfaces/unixTimestamp.d.ts +1 -44
  45. package/es/collection-manager/interfaces/updatedAt.d.ts +1 -44
  46. package/es/collection-manager/interfaces/updatedBy.d.ts +0 -4
  47. package/es/collection-manager/interfaces/url.d.ts +1 -20
  48. package/es/collection-manager/interfaces/uuid.d.ts +1 -34
  49. package/es/collection-manager/template-fields.d.ts +53 -0
  50. package/es/components/form/VariableInput.d.ts +53 -2
  51. package/es/components/form/filter/CollectionFilter.d.ts +9 -1
  52. package/es/components/form/filter/CollectionFilterItem.d.ts +10 -2
  53. package/es/flow/components/filter/useFilterOptions.d.ts +13 -1
  54. package/es/flow/models/blocks/assign-form/assignFieldValuesFlow.d.ts +84 -0
  55. package/es/flow/models/blocks/assign-form/index.d.ts +1 -0
  56. package/es/flow/models/blocks/form/FormActionModel.d.ts +9 -2
  57. package/es/index.d.ts +4 -0
  58. package/es/index.mjs +105 -142
  59. package/lib/index.js +106 -143
  60. package/package.json +7 -7
  61. package/src/Application.tsx +24 -0
  62. package/src/collection-field-interface/CollectionFieldInterface.ts +71 -77
  63. package/src/collection-field-interface/CollectionFieldInterfaceManager.ts +201 -4
  64. package/src/collection-manager/field-configure.ts +548 -0
  65. package/src/collection-manager/field-validation.ts +195 -0
  66. package/src/collection-manager/filter-operators/index.ts +176 -0
  67. package/src/collection-manager/{interfaces/properties → filter-operators}/operators.ts +24 -13
  68. package/src/collection-manager/interfaces/checkbox.ts +2 -9
  69. package/src/collection-manager/interfaces/checkboxGroup.ts +2 -10
  70. package/src/collection-manager/interfaces/collection.ts +2 -15
  71. package/src/collection-manager/interfaces/color.ts +2 -2
  72. package/src/collection-manager/interfaces/createdAt.ts +2 -2
  73. package/src/collection-manager/interfaces/createdBy.ts +1 -12
  74. package/src/collection-manager/interfaces/dateOnly.ts +8 -2
  75. package/src/collection-manager/interfaces/datetime.ts +2 -2
  76. package/src/collection-manager/interfaces/datetimeNoTz.ts +2 -2
  77. package/src/collection-manager/interfaces/email.ts +2 -9
  78. package/src/collection-manager/interfaces/id.ts +1 -2
  79. package/src/collection-manager/interfaces/index.ts +2 -3
  80. package/src/collection-manager/interfaces/input.ts +2 -133
  81. package/src/collection-manager/interfaces/integer.ts +2 -71
  82. package/src/collection-manager/interfaces/json.tsx +17 -11
  83. package/src/collection-manager/interfaces/m2m.tsx +0 -21
  84. package/src/collection-manager/interfaces/m2o.tsx +0 -22
  85. package/src/collection-manager/interfaces/markdown.ts +2 -51
  86. package/src/collection-manager/interfaces/multipleSelect.ts +2 -14
  87. package/src/collection-manager/interfaces/nanoid.ts +2 -2
  88. package/src/collection-manager/interfaces/number.ts +2 -85
  89. package/src/collection-manager/interfaces/o2m.tsx +1 -22
  90. package/src/collection-manager/interfaces/obo.tsx +145 -0
  91. package/src/collection-manager/interfaces/oho.tsx +145 -0
  92. package/src/collection-manager/interfaces/password.ts +2 -44
  93. package/src/collection-manager/interfaces/percent.ts +2 -74
  94. package/src/collection-manager/interfaces/phone.ts +2 -2
  95. package/src/collection-manager/interfaces/properties/index.ts +0 -133
  96. package/src/collection-manager/interfaces/radioGroup.ts +2 -2
  97. package/src/collection-manager/interfaces/richText.ts +2 -51
  98. package/src/collection-manager/interfaces/select.ts +2 -14
  99. package/src/collection-manager/interfaces/snowflake-id.ts +2 -2
  100. package/src/collection-manager/interfaces/tableoid.ts +1 -2
  101. package/src/collection-manager/interfaces/textarea.ts +2 -51
  102. package/src/collection-manager/interfaces/time.ts +2 -2
  103. package/src/collection-manager/interfaces/types.ts +4 -12
  104. package/src/collection-manager/interfaces/unixTimestamp.tsx +2 -2
  105. package/src/collection-manager/interfaces/updatedAt.ts +2 -2
  106. package/src/collection-manager/interfaces/updatedBy.ts +1 -12
  107. package/src/collection-manager/interfaces/url.ts +2 -4
  108. package/src/collection-manager/interfaces/uuid.ts +2 -2
  109. package/src/collection-manager/template-fields.ts +109 -0
  110. package/src/components/README.md +1 -0
  111. package/src/components/README.zh-CN.md +1 -0
  112. package/src/components/form/VariableInput.tsx +101 -28
  113. package/src/components/form/__tests__/VariableInput.test.ts +85 -0
  114. package/src/components/form/filter/CollectionFilter.tsx +11 -1
  115. package/src/components/form/filter/CollectionFilterItem.tsx +12 -4
  116. package/src/components/form/filter/__tests__/CollectionFilterItem.test.tsx +42 -0
  117. package/src/components/form/filter/useFilterActionProps.ts +7 -4
  118. package/src/flow/components/filter/useFilterOptions.ts +27 -5
  119. package/src/flow/models/actions/UpdateRecordActionModel.tsx +14 -95
  120. package/src/flow/models/actions/UpdateRecordActionUtils.ts +4 -7
  121. package/src/flow/models/actions/__tests__/AssignFormRefill.test.ts +26 -1
  122. package/src/flow/models/blocks/assign-form/AssignFormItemModel.tsx +63 -2
  123. package/src/flow/models/blocks/assign-form/assignFieldValuesFlow.tsx +206 -0
  124. package/src/flow/models/blocks/assign-form/index.ts +1 -0
  125. package/src/flow/models/blocks/form/FormActionModel.tsx +30 -3
  126. package/src/flow/models/blocks/form/__tests__/submitHandler.test.ts +71 -0
  127. package/src/flow/models/blocks/form/submitHandler.ts +8 -1
  128. package/src/flow/models/fields/CollectionSelectorFieldModel.tsx +8 -2
  129. package/src/flow/models/fields/DisplayEnumFieldModel.tsx +8 -2
  130. package/src/index.ts +4 -0
  131. package/es/collection-manager/interfaces/linkTo.d.ts +0 -90
  132. package/es/collection-manager/interfaces/o2o.d.ts +0 -621
  133. package/es/collection-manager/interfaces/properties/operators.d.ts +0 -294
  134. package/es/collection-manager/interfaces/subTable.d.ts +0 -172
  135. package/src/collection-manager/interfaces/linkTo.ts +0 -120
  136. package/src/collection-manager/interfaces/o2o.tsx +0 -561
  137. package/src/collection-manager/interfaces/subTable.ts +0 -218
@@ -35,15 +35,6 @@ export declare class PhoneFieldInterface extends CollectionFieldInterface {
35
35
  'x-decorator': string;
36
36
  'x-component': string;
37
37
  'x-disabled': string;
38
- 'x-reactions': {
39
- dependencies: string[];
40
- when: string;
41
- fulfill: {
42
- state: {
43
- value: boolean;
44
- };
45
- };
46
- }[];
47
38
  };
48
39
  'uiSchema.title': {
49
40
  type: string;
@@ -64,22 +55,7 @@ export declare class PhoneFieldInterface extends CollectionFieldInterface {
64
55
  };
65
56
  };
66
57
  filterable: {
67
- operators: ({
68
- label: string;
69
- value: string;
70
- selected: boolean;
71
- noValue?: undefined;
72
- } | {
73
- label: string;
74
- value: string;
75
- selected?: undefined;
76
- noValue?: undefined;
77
- } | {
78
- label: string;
79
- value: string;
80
- noValue: boolean;
81
- selected?: undefined;
82
- })[];
58
+ operators: string;
83
59
  };
84
60
  titleUsable: boolean;
85
61
  }
@@ -7,7 +7,6 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { ISchema } from '@formily/react';
10
- export * as operators from './operators';
11
10
  export declare const type: ISchema;
12
11
  export declare const unique: {
13
12
  type: string;
@@ -15,15 +14,6 @@ export declare const unique: {
15
14
  'x-decorator': string;
16
15
  'x-component': string;
17
16
  'x-disabled': string;
18
- 'x-reactions': {
19
- dependencies: string[];
20
- when: string;
21
- fulfill: {
22
- state: {
23
- value: boolean;
24
- };
25
- };
26
- }[];
27
17
  };
28
18
  export declare const primaryKey: {
29
19
  type: string;
@@ -31,15 +21,6 @@ export declare const primaryKey: {
31
21
  'x-decorator': string;
32
22
  'x-component': string;
33
23
  'x-disabled': string;
34
- 'x-reactions': {
35
- dependencies: string[];
36
- when: string;
37
- fulfill: {
38
- state: {
39
- value: boolean;
40
- };
41
- };
42
- }[];
43
24
  };
44
25
  export declare const autoIncrement: {
45
26
  type: string;
@@ -48,15 +29,6 @@ export declare const autoIncrement: {
48
29
  'x-decorator': string;
49
30
  'x-component': string;
50
31
  'x-disabled': string;
51
- 'x-reactions': {
52
- dependencies: string[];
53
- when: string;
54
- fulfill: {
55
- state: {
56
- value: boolean;
57
- };
58
- };
59
- }[];
60
32
  };
61
33
  export declare const autoFill: {
62
34
  type: string;
@@ -100,35 +100,7 @@ export declare class RadioGroupFieldInterface extends CollectionFieldInterface {
100
100
  };
101
101
  };
102
102
  filterable: {
103
- operators: ({
104
- label: string;
105
- value: string;
106
- selected: boolean;
107
- schema: {
108
- 'x-component': string;
109
- 'x-component-props': {
110
- mode: any;
111
- };
112
- };
113
- noValue?: undefined;
114
- } | {
115
- label: string;
116
- value: string;
117
- schema: {
118
- 'x-component': string;
119
- 'x-component-props': {
120
- mode: string;
121
- };
122
- };
123
- selected?: undefined;
124
- noValue?: undefined;
125
- } | {
126
- label: string;
127
- value: string;
128
- noValue: boolean;
129
- selected?: undefined;
130
- schema?: undefined;
131
- })[];
103
+ operators: string;
132
104
  };
133
105
  titleUsable: boolean;
134
106
  }
@@ -6,7 +6,6 @@
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 type { ISchema } from '@formily/react';
10
9
  import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
11
10
  export declare class RichTextFieldInterface extends CollectionFieldInterface {
12
11
  name: string;
@@ -43,68 +42,7 @@ export declare class RichTextFieldInterface extends CollectionFieldInterface {
43
42
  description: string;
44
43
  };
45
44
  };
46
- schemaInitialize(schema: ISchema, { block }: {
47
- block: any;
48
- }): void;
49
- validateSchema: (fieldSchema: any) => {
50
- max: {
51
- type: string;
52
- title: string;
53
- minimum: number;
54
- 'x-decorator': string;
55
- 'x-component': string;
56
- 'x-component-props': {
57
- precision: number;
58
- };
59
- 'x-reactions': string;
60
- };
61
- min: {
62
- type: string;
63
- title: string;
64
- minimum: number;
65
- 'x-decorator': string;
66
- 'x-component': string;
67
- 'x-component-props': {
68
- precision: number;
69
- };
70
- 'x-reactions': {
71
- dependencies: string[];
72
- fulfill: {
73
- state: {
74
- selfErrors: string;
75
- };
76
- };
77
- };
78
- };
79
- };
80
45
  filterable: {
81
- operators: ({
82
- label: string;
83
- value: string;
84
- selected: boolean;
85
- schema: {
86
- type: string;
87
- 'x-component': string;
88
- };
89
- noValue?: undefined;
90
- } | {
91
- label: string;
92
- value: string;
93
- schema: {
94
- type: string;
95
- 'x-component': string;
96
- };
97
- selected?: undefined;
98
- noValue?: undefined;
99
- } | {
100
- label: string;
101
- value: string;
102
- noValue: boolean;
103
- schema: {
104
- type: string;
105
- 'x-component': string;
106
- };
107
- selected?: undefined;
108
- })[];
46
+ operators: string;
109
47
  };
110
48
  }
@@ -6,7 +6,6 @@
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 { ISchema } from '@formily/react';
10
9
  import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
11
10
  export declare class SelectFieldInterface extends CollectionFieldInterface {
12
11
  name: string;
@@ -26,19 +25,19 @@ export declare class SelectFieldInterface extends CollectionFieldInterface {
26
25
  availableTypes: string[];
27
26
  hasDefaultValue: boolean;
28
27
  properties: {
29
- 'uiSchema.enum': import("@formily/react").Stringify<{
28
+ 'uiSchema.enum': import("@formily/json-schema").Stringify<{
30
29
  [key: symbol]: any;
31
30
  [key: `x-${string}`]: any;
32
31
  [key: `x-${number}`]: any;
33
32
  version?: string;
34
- name?: import("@formily/react").SchemaKey;
33
+ name?: import("@formily/json-schema").SchemaKey;
35
34
  title?: any;
36
35
  description?: any;
37
36
  default?: any;
38
37
  readOnly?: boolean;
39
38
  writeOnly?: boolean;
40
- type?: import("@formily/react").SchemaTypes;
41
- enum?: import("@formily/react").SchemaEnum<any>;
39
+ type?: import("@formily/json-schema").SchemaTypes;
40
+ enum?: import("@formily/json-schema").SchemaEnum<any>;
42
41
  const?: any;
43
42
  multipleOf?: number;
44
43
  maximum?: number;
@@ -57,12 +56,12 @@ export declare class SelectFieldInterface extends CollectionFieldInterface {
57
56
  format?: string;
58
57
  $ref?: string;
59
58
  $namespace?: string;
60
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
61
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
62
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
63
- additionalItems?: import("@formily/react").Stringify<any>;
64
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
65
- additionalProperties?: import("@formily/react").Stringify<any>;
59
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
60
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
61
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
62
+ additionalItems?: import("@formily/json-schema").Stringify<any>;
63
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
64
+ additionalProperties?: import("@formily/json-schema").Stringify<any>;
66
65
  "x-value"?: any;
67
66
  "x-index"?: number;
68
67
  "x-pattern"?: any;
@@ -72,7 +71,7 @@ export declare class SelectFieldInterface extends CollectionFieldInterface {
72
71
  "x-decorator-props"?: any;
73
72
  "x-component"?: any;
74
73
  "x-component-props"?: any;
75
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
74
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
76
75
  "x-content"?: any;
77
76
  "x-data"?: any;
78
77
  "x-visible"?: boolean;
@@ -102,38 +101,7 @@ export declare class SelectFieldInterface extends CollectionFieldInterface {
102
101
  };
103
102
  };
104
103
  filterable: {
105
- operators: ({
106
- label: string;
107
- value: string;
108
- selected: boolean;
109
- schema: {
110
- 'x-component': string;
111
- 'x-component-props': {
112
- mode: any;
113
- };
114
- };
115
- noValue?: undefined;
116
- } | {
117
- label: string;
118
- value: string;
119
- schema: {
120
- 'x-component': string;
121
- 'x-component-props': {
122
- mode: string;
123
- };
124
- };
125
- selected?: undefined;
126
- noValue?: undefined;
127
- } | {
128
- label: string;
129
- value: string;
130
- noValue: boolean;
131
- selected?: undefined;
132
- schema?: undefined;
133
- })[];
104
+ operators: string;
134
105
  };
135
106
  titleUsable: boolean;
136
- schemaInitialize(schema: ISchema, { block }: {
137
- block: any;
138
- }): void;
139
107
  }
@@ -48,15 +48,6 @@ export declare class SnowflakeIdFieldInterface extends CollectionFieldInterface
48
48
  'x-decorator': string;
49
49
  'x-component': string;
50
50
  'x-disabled': string;
51
- 'x-reactions': {
52
- dependencies: string[];
53
- when: string;
54
- fulfill: {
55
- state: {
56
- value: boolean;
57
- };
58
- };
59
- }[];
60
51
  };
61
52
  unique: {
62
53
  type: string;
@@ -64,15 +55,6 @@ export declare class SnowflakeIdFieldInterface extends CollectionFieldInterface
64
55
  'x-decorator': string;
65
56
  'x-component': string;
66
57
  'x-disabled': string;
67
- 'x-reactions': {
68
- dependencies: string[];
69
- when: string;
70
- fulfill: {
71
- state: {
72
- value: boolean;
73
- };
74
- };
75
- }[];
76
58
  };
77
59
  };
78
60
  };
@@ -95,22 +77,7 @@ export declare class SnowflakeIdFieldInterface extends CollectionFieldInterface
95
77
  };
96
78
  };
97
79
  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
- })[];
80
+ operators: string;
114
81
  };
115
82
  description: string;
116
83
  titleUsable: boolean;
@@ -45,15 +45,6 @@ export declare class TableoidFieldInterface extends CollectionFieldInterface {
45
45
  };
46
46
  };
47
47
  filterable: {
48
- operators: {
49
- label: string;
50
- value: string;
51
- schema: {
52
- 'x-component': string;
53
- 'x-component-props': {
54
- mode: string;
55
- };
56
- };
57
- }[];
48
+ operators: string;
58
49
  };
59
50
  }
@@ -6,7 +6,6 @@
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 { ISchema } from '@formily/react';
10
9
  import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
11
10
  export declare class TextareaFieldInterface extends CollectionFieldInterface {
12
11
  name: string;
@@ -52,56 +51,7 @@ export declare class TextareaFieldInterface extends CollectionFieldInterface {
52
51
  description: string;
53
52
  };
54
53
  };
55
- schemaInitialize(schema: ISchema, { block }: {
56
- block: any;
57
- }): void;
58
- validateSchema: (fieldSchema: any) => {
59
- max: {
60
- type: string;
61
- title: string;
62
- minimum: number;
63
- 'x-decorator': string;
64
- 'x-component': string;
65
- 'x-component-props': {
66
- precision: number;
67
- };
68
- 'x-reactions': string;
69
- };
70
- min: {
71
- type: string;
72
- title: string;
73
- minimum: number;
74
- 'x-decorator': string;
75
- 'x-component': string;
76
- 'x-component-props': {
77
- precision: number;
78
- };
79
- 'x-reactions': {
80
- dependencies: string[];
81
- fulfill: {
82
- state: {
83
- selfErrors: string;
84
- };
85
- };
86
- };
87
- };
88
- };
89
54
  filterable: {
90
- operators: ({
91
- label: string;
92
- value: string;
93
- selected: boolean;
94
- noValue?: undefined;
95
- } | {
96
- label: string;
97
- value: string;
98
- selected?: undefined;
99
- noValue?: undefined;
100
- } | {
101
- label: string;
102
- value: string;
103
- noValue: boolean;
104
- selected?: undefined;
105
- })[];
55
+ operators: string;
106
56
  };
107
57
  }
@@ -43,22 +43,7 @@ export declare class TimeFieldInterface extends CollectionFieldInterface {
43
43
  };
44
44
  };
45
45
  filterable: {
46
- operators: ({
47
- label: string;
48
- value: string;
49
- selected: boolean;
50
- noValue?: undefined;
51
- } | {
52
- label: string;
53
- value: string;
54
- selected?: undefined;
55
- noValue?: undefined;
56
- } | {
57
- label: string;
58
- value: string;
59
- noValue: boolean;
60
- selected?: undefined;
61
- })[];
46
+ operators: string;
62
47
  };
63
48
  titleUsable: boolean;
64
49
  }
@@ -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 type { FieldFilterable, FieldFilterOperator } from '../filter-operators';
10
11
  interface IDefault {
11
12
  type: string;
12
13
  uiSchema?: ISchema;
@@ -16,22 +17,12 @@ export interface IField extends ISchema {
16
17
  group?: string;
17
18
  order?: number;
18
19
  default?: IDefault;
19
- operators?: any[];
20
+ operators?: FieldFilterOperator[];
20
21
  /**
21
22
  * - 如果该值为空,则在 Filter 组件中该字段会被过滤掉
22
23
  * - 如果该值为空,则不会在变量列表中看到该字段
23
24
  */
24
- filterable?: {
25
- /**
26
- * 字段所支持的操作符,会在 Filter 组件中显示,比如设置 `数据范围` 的时候可以看见
27
- */
28
- operators?: any[];
29
- /**
30
- * 为当前字段添加子选项,这个子选项会在 Filter 组件中显示,比如设置 `数据范围` 的时候可以看见
31
- */
32
- children?: any[];
33
- [key: string]: any;
34
- };
25
+ filterable?: FieldFilterable;
35
26
  titleUsable?: boolean;
36
27
  [key: string]: any;
37
28
  }
@@ -75,50 +75,7 @@ export declare class UnixTimestampFieldInterface extends CollectionFieldInterfac
75
75
  };
76
76
  };
77
77
  filterable: {
78
- operators: ({
79
- label: string;
80
- value: string;
81
- selected: boolean;
82
- schema: {
83
- 'x-component': string;
84
- 'x-component-props': {
85
- isRange: boolean;
86
- };
87
- };
88
- onlyFilterAction: boolean;
89
- noValue?: undefined;
90
- } | {
91
- label: string;
92
- value: string;
93
- schema: {
94
- 'x-component': string;
95
- 'x-component-props': {
96
- isRange: boolean;
97
- };
98
- };
99
- onlyFilterAction: boolean;
100
- selected?: undefined;
101
- noValue?: undefined;
102
- } | {
103
- label: string;
104
- value: string;
105
- schema: {
106
- 'x-component': string;
107
- 'x-component-props': {
108
- isRange: boolean;
109
- };
110
- };
111
- selected?: undefined;
112
- onlyFilterAction?: undefined;
113
- noValue?: undefined;
114
- } | {
115
- label: string;
116
- value: string;
117
- noValue: boolean;
118
- selected?: undefined;
119
- schema?: undefined;
120
- onlyFilterAction?: undefined;
121
- })[];
78
+ operators: string;
122
79
  };
123
80
  titleUsable: boolean;
124
81
  }
@@ -47,50 +47,7 @@ export declare class UpdatedAtFieldInterface extends CollectionFieldInterface {
47
47
  };
48
48
  };
49
49
  filterable: {
50
- operators: ({
51
- label: string;
52
- value: string;
53
- selected: boolean;
54
- schema: {
55
- 'x-component': string;
56
- 'x-component-props': {
57
- isRange: boolean;
58
- };
59
- };
60
- onlyFilterAction: boolean;
61
- noValue?: undefined;
62
- } | {
63
- label: string;
64
- value: string;
65
- schema: {
66
- 'x-component': string;
67
- 'x-component-props': {
68
- isRange: boolean;
69
- };
70
- };
71
- onlyFilterAction: boolean;
72
- selected?: undefined;
73
- noValue?: undefined;
74
- } | {
75
- label: string;
76
- value: string;
77
- schema: {
78
- 'x-component': string;
79
- 'x-component-props': {
80
- isRange: boolean;
81
- };
82
- };
83
- selected?: undefined;
84
- onlyFilterAction?: undefined;
85
- noValue?: undefined;
86
- } | {
87
- label: string;
88
- value: string;
89
- noValue: boolean;
90
- selected?: undefined;
91
- schema?: undefined;
92
- onlyFilterAction?: undefined;
93
- })[];
50
+ operators: string;
94
51
  };
95
52
  titleUsable: boolean;
96
53
  }
@@ -6,7 +6,6 @@
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 { ISchema } from '@formily/react';
10
9
  import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
11
10
  export declare class UpdatedByFieldInterface extends CollectionFieldInterface {
12
11
  name: string;
@@ -56,8 +55,5 @@ export declare class UpdatedByFieldInterface extends CollectionFieldInterface {
56
55
  nested: boolean;
57
56
  children: any[];
58
57
  };
59
- schemaInitialize(schema: ISchema, { block }: {
60
- block: any;
61
- }): void;
62
58
  description: string;
63
59
  }
@@ -6,7 +6,6 @@
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 { ISchema } from '@formily/react';
10
9
  import { CollectionFieldInterface } from '../../collection-field-interface/CollectionFieldInterface';
11
10
  export declare class UrlFieldInterface extends CollectionFieldInterface {
12
11
  name: string;
@@ -26,9 +25,6 @@ export declare class UrlFieldInterface extends CollectionFieldInterface {
26
25
  value: string;
27
26
  }[];
28
27
  availableTypes: string[];
29
- schemaInitialize(schema: ISchema, { block }: {
30
- block: any;
31
- }): void;
32
28
  validationType: string;
33
29
  availableValidationOptions: string[];
34
30
  properties: {
@@ -52,21 +48,6 @@ export declare class UrlFieldInterface extends CollectionFieldInterface {
52
48
  };
53
49
  titleUsable: boolean;
54
50
  filterable: {
55
- operators: ({
56
- label: string;
57
- value: string;
58
- selected: boolean;
59
- noValue?: undefined;
60
- } | {
61
- label: string;
62
- value: string;
63
- selected?: undefined;
64
- noValue?: undefined;
65
- } | {
66
- label: string;
67
- value: string;
68
- noValue: boolean;
69
- selected?: undefined;
70
- })[];
51
+ operators: string;
71
52
  };
72
53
  }