@nocobase/client 0.7.1-alpha.7 → 0.7.2-alpha.3

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 (245) hide show
  1. package/es/acl/Configuration/schemas/scopes.js +1 -0
  2. package/es/application/Application.js +0 -4
  3. package/es/block-provider/BlockSchemaComponentProvider.js +3 -0
  4. package/es/block-provider/FormBlockProvider.js +2 -1
  5. package/es/block-provider/FormFieldProvider.d.ts +8 -0
  6. package/es/block-provider/FormFieldProvider.js +89 -0
  7. package/es/block-provider/KanbanBlockProvider.js +117 -3
  8. package/es/block-provider/TableFieldProvider.js +17 -2
  9. package/es/block-provider/TableSelectorProvider.js +38 -6
  10. package/es/block-provider/hooks/index.js +10 -3
  11. package/es/block-provider/index.d.ts +1 -0
  12. package/es/block-provider/index.js +2 -1
  13. package/es/collection-manager/CollectionField.js +5 -1
  14. package/es/collection-manager/CollectionFieldProvider.js +7 -2
  15. package/es/collection-manager/Configuration/AddFieldAction.js +1 -1
  16. package/es/collection-manager/Configuration/EditFieldAction.js +1 -1
  17. package/es/collection-manager/hooks/useCollectionManager.js +20 -5
  18. package/es/collection-manager/interfaces/index.d.ts +2 -1
  19. package/es/collection-manager/interfaces/index.js +3 -2
  20. package/es/collection-manager/interfaces/integer.d.ts +2 -0
  21. package/es/{workflow/nodes/update.js → collection-manager/interfaces/integer.js} +24 -20
  22. package/es/collection-manager/interfaces/linkTo.js +14 -6
  23. package/es/collection-manager/interfaces/m2m.js +12 -5
  24. package/es/collection-manager/interfaces/m2o.js +59 -8
  25. package/es/collection-manager/interfaces/o2m.js +72 -46
  26. package/es/collection-manager/interfaces/o2o.js +100 -39
  27. package/es/collection-manager/interfaces/properties/operators.d.ts +13 -0
  28. package/es/collection-manager/interfaces/properties/operators.js +7 -0
  29. package/es/index.d.ts +0 -1
  30. package/es/index.js +1 -2
  31. package/es/locale/en_US.d.ts +7 -0
  32. package/es/locale/en_US.js +9 -2
  33. package/es/locale/zh_CN.d.ts +10 -1
  34. package/es/locale/zh_CN.js +10 -1
  35. package/es/schema-component/antd/AntdSchemaComponentProvider.js +2 -0
  36. package/es/schema-component/antd/filter/DynamicComponent.js +50 -3
  37. package/es/schema-component/antd/filter/FilterItem.js +6 -0
  38. package/es/schema-component/antd/filter/useFilterActionProps.js +2 -0
  39. package/es/schema-component/antd/form-item/FormItem.js +79 -16
  40. package/es/schema-component/antd/form-v2/FormField.d.ts +1 -0
  41. package/es/schema-component/antd/form-v2/FormField.js +29 -0
  42. package/es/schema-component/antd/form-v2/index.d.ts +1 -0
  43. package/es/schema-component/antd/form-v2/index.js +2 -1
  44. package/es/schema-component/antd/g2plot/G2Plot.js +33 -3
  45. package/es/schema-component/antd/g2plot/requestChartData.d.ts +4 -0
  46. package/es/schema-component/antd/g2plot/requestChartData.js +33 -0
  47. package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +10 -1
  48. package/es/schema-component/antd/record-picker/InputRecordPicker.js +34 -14
  49. package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +34 -11
  50. package/es/schema-component/antd/record-picker/useFieldNames.js +2 -2
  51. package/es/schema-component/antd/select/shared.js +4 -2
  52. package/es/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -1
  53. package/es/schema-component/antd/table-v2/Table.Column.Decorator.js +7 -3
  54. package/es/schema-component/antd/table-v2/Table.Column.Designer.js +7 -2
  55. package/es/schema-component/antd/table-v2/Table.js +4 -2
  56. package/es/schema-component/antd/table-v2/TableField.js +7 -0
  57. package/es/schema-initializer/buttons/TableColumnInitializers.js +26 -12
  58. package/es/schema-initializer/components/assigned-field/AssignedField.js +34 -47
  59. package/es/schema-initializer/utils.d.ts +2 -0
  60. package/es/schema-initializer/utils.js +160 -30
  61. package/es/schema-settings/SchemaSettings.js +6 -3
  62. package/lib/acl/Configuration/schemas/scopes.js +1 -0
  63. package/lib/application/Application.js +0 -5
  64. package/lib/block-provider/BlockSchemaComponentProvider.js +4 -0
  65. package/lib/block-provider/FormBlockProvider.js +2 -1
  66. package/lib/block-provider/FormFieldProvider.d.ts +8 -0
  67. package/lib/block-provider/FormFieldProvider.js +120 -0
  68. package/lib/block-provider/KanbanBlockProvider.js +118 -1
  69. package/lib/block-provider/TableFieldProvider.js +19 -2
  70. package/lib/block-provider/TableSelectorProvider.js +39 -5
  71. package/lib/block-provider/hooks/index.js +11 -3
  72. package/lib/block-provider/index.d.ts +1 -0
  73. package/lib/block-provider/index.js +13 -0
  74. package/lib/collection-manager/CollectionField.js +5 -1
  75. package/lib/collection-manager/CollectionFieldProvider.js +9 -3
  76. package/lib/collection-manager/Configuration/AddFieldAction.js +1 -1
  77. package/lib/collection-manager/Configuration/EditFieldAction.js +1 -1
  78. package/lib/collection-manager/hooks/useCollectionManager.js +20 -5
  79. package/lib/collection-manager/interfaces/index.d.ts +2 -1
  80. package/lib/collection-manager/interfaces/index.js +26 -13
  81. package/lib/collection-manager/interfaces/integer.d.ts +2 -0
  82. package/lib/{workflow/nodes/update.js → collection-manager/interfaces/integer.js} +26 -24
  83. package/lib/collection-manager/interfaces/linkTo.js +14 -6
  84. package/lib/collection-manager/interfaces/m2m.js +12 -5
  85. package/lib/collection-manager/interfaces/m2o.js +61 -10
  86. package/lib/collection-manager/interfaces/o2m.js +72 -45
  87. package/lib/collection-manager/interfaces/o2o.js +103 -43
  88. package/lib/collection-manager/interfaces/properties/operators.d.ts +13 -0
  89. package/lib/collection-manager/interfaces/properties/operators.js +7 -0
  90. package/lib/index.d.ts +0 -1
  91. package/lib/index.js +0 -13
  92. package/lib/locale/en_US.d.ts +7 -0
  93. package/lib/locale/en_US.js +9 -2
  94. package/lib/locale/zh_CN.d.ts +10 -1
  95. package/lib/locale/zh_CN.js +10 -1
  96. package/lib/schema-component/antd/AntdSchemaComponentProvider.js +3 -0
  97. package/lib/schema-component/antd/filter/DynamicComponent.js +52 -1
  98. package/lib/schema-component/antd/filter/FilterItem.js +7 -0
  99. package/lib/schema-component/antd/filter/useFilterActionProps.js +2 -0
  100. package/lib/schema-component/antd/form-item/FormItem.js +80 -17
  101. package/lib/schema-component/antd/form-v2/FormField.d.ts +1 -0
  102. package/lib/schema-component/antd/form-v2/FormField.js +48 -0
  103. package/lib/schema-component/antd/form-v2/index.d.ts +1 -0
  104. package/lib/schema-component/antd/form-v2/index.js +17 -0
  105. package/lib/schema-component/antd/g2plot/G2Plot.js +32 -2
  106. package/lib/schema-component/antd/g2plot/requestChartData.d.ts +4 -0
  107. package/lib/schema-component/antd/g2plot/requestChartData.js +42 -0
  108. package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +9 -0
  109. package/lib/schema-component/antd/record-picker/InputRecordPicker.js +33 -13
  110. package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +32 -9
  111. package/lib/schema-component/antd/record-picker/useFieldNames.js +2 -2
  112. package/lib/schema-component/antd/select/shared.js +4 -2
  113. package/lib/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -1
  114. package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -2
  115. package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +7 -2
  116. package/lib/schema-component/antd/table-v2/Table.js +4 -2
  117. package/lib/schema-component/antd/table-v2/TableField.js +8 -0
  118. package/lib/schema-initializer/buttons/TableColumnInitializers.js +25 -11
  119. package/lib/schema-initializer/components/assigned-field/AssignedField.js +29 -43
  120. package/lib/schema-initializer/utils.d.ts +2 -0
  121. package/lib/schema-initializer/utils.js +166 -30
  122. package/lib/schema-settings/SchemaSettings.js +5 -2
  123. package/package.json +4 -5
  124. package/es/workflow/ExecutionResourceProvider.d.ts +0 -4
  125. package/es/workflow/ExecutionResourceProvider.js +0 -35
  126. package/es/workflow/WorkflowCanvas.d.ts +0 -15
  127. package/es/workflow/WorkflowCanvas.js +0 -375
  128. package/es/workflow/WorkflowLink.d.ts +0 -1
  129. package/es/workflow/WorkflowLink.js +0 -21
  130. package/es/workflow/WorkflowPage.d.ts +0 -1
  131. package/es/workflow/WorkflowPage.js +0 -43
  132. package/es/workflow/WorkflowRouteProvider.d.ts +0 -1
  133. package/es/workflow/WorkflowRouteProvider.js +0 -30
  134. package/es/workflow/WorkflowShortcut.d.ts +0 -1
  135. package/es/workflow/WorkflowShortcut.js +0 -62
  136. package/es/workflow/calculators.d.ts +0 -101
  137. package/es/workflow/calculators.js +0 -647
  138. package/es/workflow/components/Duration.d.ts +0 -5
  139. package/es/workflow/components/Duration.js +0 -61
  140. package/es/workflow/index.d.ts +0 -5
  141. package/es/workflow/index.js +0 -5
  142. package/es/workflow/nodes/calculation.d.ts +0 -25
  143. package/es/workflow/nodes/calculation.js +0 -47
  144. package/es/workflow/nodes/condition.d.ts +0 -46
  145. package/es/workflow/nodes/condition.js +0 -255
  146. package/es/workflow/nodes/create.d.ts +0 -46
  147. package/es/workflow/nodes/create.js +0 -90
  148. package/es/workflow/nodes/delay.d.ts +0 -35
  149. package/es/workflow/nodes/delay.js +0 -37
  150. package/es/workflow/nodes/destroy.d.ts +0 -55
  151. package/es/workflow/nodes/destroy.js +0 -27
  152. package/es/workflow/nodes/index.d.ts +0 -33
  153. package/es/workflow/nodes/index.js +0 -312
  154. package/es/workflow/nodes/parallel.d.ts +0 -24
  155. package/es/workflow/nodes/parallel.js +0 -132
  156. package/es/workflow/nodes/query.d.ts +0 -70
  157. package/es/workflow/nodes/query.js +0 -98
  158. package/es/workflow/nodes/update.d.ts +0 -60
  159. package/es/workflow/schemas/collection.d.ts +0 -42
  160. package/es/workflow/schemas/collection.js +0 -57
  161. package/es/workflow/schemas/executions.d.ts +0 -209
  162. package/es/workflow/schemas/executions.js +0 -157
  163. package/es/workflow/schemas/workflows.d.ts +0 -2
  164. package/es/workflow/schemas/workflows.js +0 -334
  165. package/es/workflow/style.d.ts +0 -12
  166. package/es/workflow/style.js +0 -17
  167. package/es/workflow/triggers/collection.d.ts +0 -77
  168. package/es/workflow/triggers/collection.js +0 -144
  169. package/es/workflow/triggers/index.d.ts +0 -26
  170. package/es/workflow/triggers/index.js +0 -177
  171. package/es/workflow/triggers/schedule/DateFieldsSelect.d.ts +0 -2
  172. package/es/workflow/triggers/schedule/DateFieldsSelect.js +0 -39
  173. package/es/workflow/triggers/schedule/EndsByField.d.ts +0 -5
  174. package/es/workflow/triggers/schedule/EndsByField.js +0 -57
  175. package/es/workflow/triggers/schedule/OnField.d.ts +0 -5
  176. package/es/workflow/triggers/schedule/OnField.js +0 -87
  177. package/es/workflow/triggers/schedule/RepeatField.d.ts +0 -5
  178. package/es/workflow/triggers/schedule/RepeatField.js +0 -131
  179. package/es/workflow/triggers/schedule/ScheduleConfig.d.ts +0 -1
  180. package/es/workflow/triggers/schedule/ScheduleConfig.js +0 -225
  181. package/es/workflow/triggers/schedule/index.d.ts +0 -25
  182. package/es/workflow/triggers/schedule/index.js +0 -77
  183. package/es/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -34
  184. package/es/workflow/triggers/schedule/locale/Cron.zh-CN.js +0 -37
  185. package/lib/workflow/ExecutionResourceProvider.d.ts +0 -4
  186. package/lib/workflow/ExecutionResourceProvider.js +0 -48
  187. package/lib/workflow/WorkflowCanvas.d.ts +0 -15
  188. package/lib/workflow/WorkflowCanvas.js +0 -408
  189. package/lib/workflow/WorkflowLink.d.ts +0 -1
  190. package/lib/workflow/WorkflowLink.js +0 -36
  191. package/lib/workflow/WorkflowPage.d.ts +0 -1
  192. package/lib/workflow/WorkflowPage.js +0 -60
  193. package/lib/workflow/WorkflowRouteProvider.d.ts +0 -1
  194. package/lib/workflow/WorkflowRouteProvider.js +0 -47
  195. package/lib/workflow/WorkflowShortcut.d.ts +0 -1
  196. package/lib/workflow/WorkflowShortcut.js +0 -87
  197. package/lib/workflow/calculators.d.ts +0 -101
  198. package/lib/workflow/calculators.js +0 -688
  199. package/lib/workflow/components/Duration.d.ts +0 -5
  200. package/lib/workflow/components/Duration.js +0 -74
  201. package/lib/workflow/index.d.ts +0 -5
  202. package/lib/workflow/index.js +0 -70
  203. package/lib/workflow/nodes/calculation.d.ts +0 -25
  204. package/lib/workflow/nodes/calculation.js +0 -61
  205. package/lib/workflow/nodes/condition.d.ts +0 -46
  206. package/lib/workflow/nodes/condition.js +0 -275
  207. package/lib/workflow/nodes/create.d.ts +0 -46
  208. package/lib/workflow/nodes/create.js +0 -107
  209. package/lib/workflow/nodes/delay.d.ts +0 -35
  210. package/lib/workflow/nodes/delay.js +0 -48
  211. package/lib/workflow/nodes/destroy.d.ts +0 -55
  212. package/lib/workflow/nodes/destroy.js +0 -38
  213. package/lib/workflow/nodes/index.d.ts +0 -33
  214. package/lib/workflow/nodes/index.js +0 -357
  215. package/lib/workflow/nodes/parallel.d.ts +0 -24
  216. package/lib/workflow/nodes/parallel.js +0 -155
  217. package/lib/workflow/nodes/query.d.ts +0 -70
  218. package/lib/workflow/nodes/query.js +0 -115
  219. package/lib/workflow/nodes/update.d.ts +0 -60
  220. package/lib/workflow/schemas/collection.d.ts +0 -42
  221. package/lib/workflow/schemas/collection.js +0 -70
  222. package/lib/workflow/schemas/executions.d.ts +0 -209
  223. package/lib/workflow/schemas/executions.js +0 -164
  224. package/lib/workflow/schemas/workflows.d.ts +0 -2
  225. package/lib/workflow/schemas/workflows.js +0 -344
  226. package/lib/workflow/style.d.ts +0 -12
  227. package/lib/workflow/style.js +0 -37
  228. package/lib/workflow/triggers/collection.d.ts +0 -77
  229. package/lib/workflow/triggers/collection.js +0 -164
  230. package/lib/workflow/triggers/index.d.ts +0 -26
  231. package/lib/workflow/triggers/index.js +0 -201
  232. package/lib/workflow/triggers/schedule/DateFieldsSelect.d.ts +0 -2
  233. package/lib/workflow/triggers/schedule/DateFieldsSelect.js +0 -54
  234. package/lib/workflow/triggers/schedule/EndsByField.d.ts +0 -5
  235. package/lib/workflow/triggers/schedule/EndsByField.js +0 -73
  236. package/lib/workflow/triggers/schedule/OnField.d.ts +0 -5
  237. package/lib/workflow/triggers/schedule/OnField.js +0 -105
  238. package/lib/workflow/triggers/schedule/RepeatField.d.ts +0 -5
  239. package/lib/workflow/triggers/schedule/RepeatField.js +0 -146
  240. package/lib/workflow/triggers/schedule/ScheduleConfig.d.ts +0 -1
  241. package/lib/workflow/triggers/schedule/ScheduleConfig.js +0 -250
  242. package/lib/workflow/triggers/schedule/index.d.ts +0 -25
  243. package/lib/workflow/triggers/schedule/index.js +0 -94
  244. package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -34
  245. package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.js +0 -44
@@ -62,14 +62,21 @@ var m2m = {
62
62
  var readPretty = _ref.readPretty,
63
63
  block = _ref.block;
64
64
 
65
- if (readPretty) {
66
- schema['properties'] = {
67
- viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer)
68
- };
69
- } else {
65
+ if (block === 'Form') {
70
66
  schema['properties'] = {
67
+ viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer),
71
68
  selector: (0, _lodash.cloneDeep)(_properties.recordPickerSelector)
72
69
  };
70
+ } else {
71
+ if (readPretty) {
72
+ schema['properties'] = {
73
+ viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer)
74
+ };
75
+ } else {
76
+ schema['properties'] = {
77
+ selector: (0, _lodash.cloneDeep)(_properties.recordPickerSelector)
78
+ };
79
+ }
73
80
  }
74
81
 
75
82
  if (['Table', 'Kanban'].includes(block)) {
@@ -7,7 +7,9 @@ exports.m2o = void 0;
7
7
 
8
8
  var _lodash = require("lodash");
9
9
 
10
- var _properties = require("./properties");
10
+ var _properties2 = require("./properties");
11
+
12
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
13
 
12
14
  var m2o = {
13
15
  name: 'm2o',
@@ -51,17 +53,66 @@ var m2o = {
51
53
  }
52
54
  },
53
55
  schemaInitialize: function schemaInitialize(schema, _ref) {
54
- var readPretty = _ref.readPretty,
55
- block = _ref.block;
56
+ var field = _ref.field,
57
+ block = _ref.block,
58
+ readPretty = _ref.readPretty,
59
+ action = _ref.action;
56
60
 
57
- if (readPretty) {
58
- schema['properties'] = {
59
- viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer)
61
+ if (block === 'Form' && schema['x-component'] === 'FormField') {
62
+ var association = "".concat(field.collectionName, ".").concat(field.name);
63
+ schema.type = 'void';
64
+ schema.properties = {
65
+ block: {
66
+ type: 'void',
67
+ 'x-decorator': 'FormFieldProvider',
68
+ 'x-decorator-props': {
69
+ collection: field.target,
70
+ association: association,
71
+ resource: association,
72
+ action: action,
73
+ fieldName: field.name,
74
+ readPretty: readPretty
75
+ },
76
+ 'x-component': 'CardItem',
77
+ 'x-component-props': {
78
+ bordered: true
79
+ },
80
+ properties: _defineProperty({}, field.name, {
81
+ type: 'object',
82
+ 'x-component': 'FormV2',
83
+ 'x-component-props': {
84
+ useProps: '{{ useFormFieldProps }}'
85
+ },
86
+ properties: {
87
+ __form_grid: {
88
+ type: 'void',
89
+ 'x-component': 'Grid',
90
+ 'x-initializer': 'FormItemInitializers',
91
+ properties: {}
92
+ }
93
+ }
94
+ })
95
+ }
60
96
  };
61
97
  } else {
62
- schema['properties'] = {
63
- selector: (0, _lodash.cloneDeep)(_properties.recordPickerSelector)
64
- };
98
+ schema.type = 'string';
99
+
100
+ if (block === 'Form') {
101
+ schema['properties'] = {
102
+ viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer),
103
+ selector: (0, _lodash.cloneDeep)(_properties2.recordPickerSelector)
104
+ };
105
+ } else {
106
+ if (readPretty) {
107
+ schema['properties'] = {
108
+ viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer)
109
+ };
110
+ } else {
111
+ schema['properties'] = {
112
+ selector: (0, _lodash.cloneDeep)(_properties2.recordPickerSelector)
113
+ };
114
+ }
115
+ }
65
116
  }
66
117
 
67
118
  if (['Table', 'Kanban'].includes(block)) {
@@ -86,7 +137,7 @@ var m2o = {
86
137
  'x-component': 'Input',
87
138
  description: "{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}"
88
139
  },
89
- type: _properties.relationshipType,
140
+ type: _properties2.relationshipType,
90
141
  grid: {
91
142
  type: 'void',
92
143
  'x-component': 'Grid',
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.o2m = void 0;
7
7
 
8
+ var _lodash = require("lodash");
9
+
8
10
  var _properties2 = require("./properties");
9
11
 
10
12
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -22,13 +24,14 @@ var o2m = {
22
24
  // name,
23
25
  uiSchema: {
24
26
  // title,
25
- 'x-component': 'TableField',
26
- 'x-component-props': {// mode: 'tags',
27
- // multiple: true,
28
- // fieldNames: {
29
- // label: 'id',
30
- // value: 'id',
31
- // },
27
+ 'x-component': 'RecordPicker',
28
+ 'x-component-props': {
29
+ // mode: 'tags',
30
+ multiple: true,
31
+ fieldNames: {
32
+ label: 'id',
33
+ value: 'id'
34
+ }
32
35
  }
33
36
  },
34
37
  reverseField: {
@@ -51,46 +54,69 @@ var o2m = {
51
54
  },
52
55
  schemaInitialize: function schemaInitialize(schema, _ref) {
53
56
  var field = _ref.field,
54
- readPretty = _ref.readPretty,
55
- block = _ref.block;
56
- var association = "".concat(field.collectionName, ".").concat(field.name);
57
- schema['type'] = 'void';
58
- schema['x-component'] = 'TableField';
59
- schema['properties'] = {
60
- block: {
61
- type: 'void',
62
- 'x-decorator': 'TableFieldProvider',
63
- 'x-decorator-props': {
64
- collection: field.target,
65
- association: association,
66
- resource: association,
67
- action: 'list',
68
- params: {
69
- paginate: false
70
- },
71
- showIndex: true,
72
- dragSort: false
73
- },
74
- properties: _defineProperty({
75
- actions: {
76
- type: 'void',
77
- 'x-initializer': 'SubTableActionInitializers',
78
- 'x-component': 'TableField.ActionBar',
79
- 'x-component-props': {}
80
- }
81
- }, field.name, {
82
- type: 'array',
83
- 'x-initializer': 'TableColumnInitializers',
84
- 'x-component': 'TableV2',
85
- 'x-component-props': {
86
- rowSelection: {
87
- type: 'checkbox'
57
+ block = _ref.block,
58
+ readPretty = _ref.readPretty;
59
+
60
+ if (block === 'Form' && schema['x-component'] === 'TableField') {
61
+ var association = "".concat(field.collectionName, ".").concat(field.name);
62
+ schema['type'] = 'void';
63
+ schema['properties'] = {
64
+ block: {
65
+ type: 'void',
66
+ 'x-decorator': 'TableFieldProvider',
67
+ 'x-decorator-props': {
68
+ collection: field.target,
69
+ association: association,
70
+ resource: association,
71
+ action: 'list',
72
+ params: {
73
+ paginate: false
88
74
  },
89
- useProps: '{{ useTableFieldProps }}'
90
- }
91
- })
75
+ showIndex: true,
76
+ dragSort: false,
77
+ fieldName: field.name
78
+ },
79
+ properties: _defineProperty({
80
+ actions: {
81
+ type: 'void',
82
+ 'x-initializer': 'SubTableActionInitializers',
83
+ 'x-component': 'TableField.ActionBar',
84
+ 'x-component-props': {}
85
+ }
86
+ }, field.name, {
87
+ type: 'array',
88
+ 'x-initializer': 'TableColumnInitializers',
89
+ 'x-component': 'TableV2',
90
+ 'x-component-props': {
91
+ rowSelection: {
92
+ type: 'checkbox'
93
+ },
94
+ useProps: '{{ useTableFieldProps }}'
95
+ }
96
+ })
97
+ }
98
+ };
99
+ } else {
100
+ schema['x-component'] = 'CollectionField';
101
+ schema.type = 'object';
102
+
103
+ if (block === 'Form') {
104
+ schema['properties'] = {
105
+ viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer),
106
+ selector: (0, _lodash.cloneDeep)(_properties2.recordPickerSelector)
107
+ };
108
+ } else {
109
+ if (readPretty) {
110
+ schema['properties'] = {
111
+ viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer)
112
+ };
113
+ } else {
114
+ schema['properties'] = {
115
+ selector: (0, _lodash.cloneDeep)(_properties2.recordPickerSelector)
116
+ };
117
+ }
92
118
  }
93
- }; // if (readPretty) {
119
+ } // if (readPretty) {
94
120
  // schema['properties'] = {
95
121
  // viewer: cloneDeep(recordPickerViewer),
96
122
  // };
@@ -100,6 +126,7 @@ var o2m = {
100
126
  // };
101
127
  // }
102
128
 
129
+
103
130
  if (['Table', 'Kanban'].includes(block)) {
104
131
  schema['x-component-props'] = schema['x-component-props'] || {};
105
132
  schema['x-component-props']['ellipsis'] = true;
@@ -7,7 +7,73 @@ exports.oho = exports.obo = exports.o2o = void 0;
7
7
 
8
8
  var _lodash = require("lodash");
9
9
 
10
- var _properties = require("./properties");
10
+ var _properties2 = require("./properties");
11
+
12
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+
14
+ var internalSchameInitialize = function internalSchameInitialize(schema, _ref) {
15
+ var field = _ref.field,
16
+ block = _ref.block,
17
+ readPretty = _ref.readPretty,
18
+ action = _ref.action;
19
+
20
+ if (block === 'Form' && schema['x-component'] === 'FormField') {
21
+ var association = "".concat(field.collectionName, ".").concat(field.name);
22
+ schema.type = 'void';
23
+ schema.properties = {
24
+ block: {
25
+ type: 'void',
26
+ 'x-decorator': 'FormFieldProvider',
27
+ 'x-decorator-props': {
28
+ collection: field.target,
29
+ association: association,
30
+ resource: association,
31
+ action: action,
32
+ fieldName: field.name,
33
+ readPretty: readPretty
34
+ },
35
+ 'x-component': 'CardItem',
36
+ 'x-component-props': {
37
+ bordered: true
38
+ },
39
+ properties: _defineProperty({}, field.name, {
40
+ type: 'object',
41
+ 'x-component': 'FormV2',
42
+ 'x-component-props': {
43
+ useProps: '{{ useFormFieldProps }}'
44
+ },
45
+ properties: {
46
+ __form_grid: {
47
+ type: 'void',
48
+ 'x-component': 'Grid',
49
+ 'x-initializer': 'FormItemInitializers',
50
+ properties: {}
51
+ }
52
+ }
53
+ })
54
+ }
55
+ };
56
+ } else {
57
+ schema.type = 'string';
58
+
59
+ if (block === 'Form') {
60
+ schema['properties'] = {
61
+ viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer),
62
+ selector: (0, _lodash.cloneDeep)(_properties2.recordPickerSelector)
63
+ };
64
+ } else {
65
+ if (readPretty) {
66
+ schema['properties'] = {
67
+ viewer: (0, _lodash.cloneDeep)(_properties2.recordPickerViewer)
68
+ };
69
+ } else {
70
+ schema['properties'] = {
71
+ selector: (0, _lodash.cloneDeep)(_properties2.recordPickerSelector)
72
+ };
73
+ }
74
+ }
75
+ }
76
+ };
11
77
 
12
78
  var o2o = {
13
79
  name: 'o2o',
@@ -51,19 +117,17 @@ var o2o = {
51
117
  }
52
118
  }
53
119
  },
54
- schemaInitialize: function schemaInitialize(schema, _ref) {
55
- var readPretty = _ref.readPretty,
56
- block = _ref.block;
57
-
58
- if (readPretty) {
59
- schema['properties'] = {
60
- viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer)
61
- };
62
- } else {
63
- schema['properties'] = {
64
- selector: (0, _lodash.cloneDeep)(_properties.recordPickerSelector)
65
- };
66
- }
120
+ schemaInitialize: function schemaInitialize(schema, _ref2) {
121
+ var field = _ref2.field,
122
+ block = _ref2.block,
123
+ readPretty = _ref2.readPretty,
124
+ action = _ref2.action;
125
+ internalSchameInitialize(schema, {
126
+ field: field,
127
+ block: block,
128
+ readPretty: readPretty,
129
+ action: action
130
+ });
67
131
 
68
132
  if (['Table', 'Kanban'].includes(block)) {
69
133
  schema['x-component-props'] = schema['x-component-props'] || {};
@@ -87,7 +151,7 @@ var o2o = {
87
151
  'x-component': 'Input',
88
152
  description: "{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}"
89
153
  },
90
- type: _properties.relationshipType,
154
+ type: _properties2.relationshipType,
91
155
  grid: {
92
156
  type: 'void',
93
157
  'x-component': 'Grid',
@@ -224,19 +288,17 @@ var oho = {
224
288
  }
225
289
  }
226
290
  },
227
- schemaInitialize: function schemaInitialize(schema, _ref2) {
228
- var readPretty = _ref2.readPretty,
229
- block = _ref2.block;
230
-
231
- if (readPretty) {
232
- schema['properties'] = {
233
- viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer)
234
- };
235
- } else {
236
- schema['properties'] = {
237
- selector: (0, _lodash.cloneDeep)(_properties.recordPickerSelector)
238
- };
239
- }
291
+ schemaInitialize: function schemaInitialize(schema, _ref3) {
292
+ var field = _ref3.field,
293
+ block = _ref3.block,
294
+ readPretty = _ref3.readPretty,
295
+ action = _ref3.action;
296
+ internalSchameInitialize(schema, {
297
+ field: field,
298
+ block: block,
299
+ readPretty: readPretty,
300
+ action: action
301
+ });
240
302
 
241
303
  if (['Table', 'Kanban'].includes(block)) {
242
304
  schema['x-component-props'] = schema['x-component-props'] || {};
@@ -260,7 +322,7 @@ var oho = {
260
322
  'x-component': 'Input',
261
323
  description: "{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}"
262
324
  },
263
- type: _properties.relationshipType,
325
+ type: _properties2.relationshipType,
264
326
  grid: {
265
327
  type: 'void',
266
328
  'x-component': 'Grid',
@@ -396,19 +458,17 @@ var obo = {
396
458
  }
397
459
  }
398
460
  },
399
- schemaInitialize: function schemaInitialize(schema, _ref3) {
400
- var readPretty = _ref3.readPretty,
401
- block = _ref3.block;
402
-
403
- if (readPretty) {
404
- schema['properties'] = {
405
- viewer: (0, _lodash.cloneDeep)(_properties.recordPickerViewer)
406
- };
407
- } else {
408
- schema['properties'] = {
409
- selector: (0, _lodash.cloneDeep)(_properties.recordPickerSelector)
410
- };
411
- }
461
+ schemaInitialize: function schemaInitialize(schema, _ref4) {
462
+ var field = _ref4.field,
463
+ block = _ref4.block,
464
+ readPretty = _ref4.readPretty,
465
+ action = _ref4.action;
466
+ internalSchameInitialize(schema, {
467
+ field: field,
468
+ block: block,
469
+ readPretty: readPretty,
470
+ action: action
471
+ });
412
472
 
413
473
  if (['Table', 'Kanban'].includes(block)) {
414
474
  schema['x-component-props'] = schema['x-component-props'] || {};
@@ -432,7 +492,7 @@ var obo = {
432
492
  'x-component': 'Input',
433
493
  description: "{{t('Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.')}}"
434
494
  },
435
- type: _properties.relationshipType,
495
+ type: _properties2.relationshipType,
436
496
  grid: {
437
497
  type: 'void',
438
498
  'x-component': 'Grid',
@@ -79,10 +79,21 @@ export declare const id: ({
79
79
  label: string;
80
80
  value: string;
81
81
  selected: boolean;
82
+ schema?: undefined;
83
+ noValue?: undefined;
84
+ } | {
85
+ label: string;
86
+ value: string;
87
+ selected?: undefined;
88
+ schema?: undefined;
82
89
  noValue?: undefined;
83
90
  } | {
84
91
  label: string;
85
92
  value: string;
93
+ schema: {
94
+ 'x-component': string;
95
+ 'x-component-props': {};
96
+ };
86
97
  selected?: undefined;
87
98
  noValue?: undefined;
88
99
  } | {
@@ -91,11 +102,13 @@ export declare const id: ({
91
102
  noValue: boolean;
92
103
  visible(field: any): boolean;
93
104
  selected?: undefined;
105
+ schema?: undefined;
94
106
  } | {
95
107
  label: string;
96
108
  value: string;
97
109
  noValue: boolean;
98
110
  selected?: undefined;
111
+ schema?: undefined;
99
112
  })[];
100
113
  export declare const enumType: ({
101
114
  label: string;
@@ -139,6 +139,13 @@ var id = [{
139
139
  }, {
140
140
  label: '{{t("is not")}}',
141
141
  value: '$ne'
142
+ }, {
143
+ label: '{{t("is variable")}}',
144
+ value: '$isVar',
145
+ schema: {
146
+ 'x-component': 'VariableCascader',
147
+ 'x-component-props': {}
148
+ }
142
149
  }, {
143
150
  label: '{{t("is current logged-in user")}}',
144
151
  value: '$isCurrentUser',
package/lib/index.d.ts CHANGED
@@ -24,4 +24,3 @@ export * from './schema-templates';
24
24
  export * from './settings-form';
25
25
  export * from './system-settings';
26
26
  export * from './user';
27
- export * from './workflow';
package/lib/index.js CHANGED
@@ -318,17 +318,4 @@ Object.keys(_user).forEach(function (key) {
318
318
  return _user[key];
319
319
  }
320
320
  });
321
- });
322
-
323
- var _workflow = require("./workflow");
324
-
325
- Object.keys(_workflow).forEach(function (key) {
326
- if (key === "default" || key === "__esModule") return;
327
- if (key in exports && exports[key] === _workflow[key]) return;
328
- Object.defineProperty(exports, key, {
329
- enumerable: true,
330
- get: function get() {
331
- return _workflow[key];
332
- }
333
- });
334
321
  });
@@ -120,6 +120,7 @@ declare const _default: {
120
120
  Phone: string;
121
121
  Email: string;
122
122
  Number: string;
123
+ Integer: string;
123
124
  Percent: string;
124
125
  Password: string;
125
126
  Formula: string;
@@ -176,6 +177,7 @@ declare const _default: {
176
177
  "Add filter group": string;
177
178
  is: string;
178
179
  "is not": string;
180
+ "is variable": string;
179
181
  contains: string;
180
182
  "does not contain": string;
181
183
  "starts with": string;
@@ -541,6 +543,11 @@ declare const _default: {
541
543
  "One to one (has one)": string;
542
544
  "One to one (belongs to)": string;
543
545
  "Use the same time zone (GMT) for all users": string;
546
+ "Block title": string;
547
+ "Edit block title": string;
544
548
  "Province/city/area name": string;
549
+ "Field component": string;
550
+ Subtable: string;
551
+ Subform: string;
545
552
  };
546
553
  export default _default;
@@ -85,7 +85,7 @@ var _default = {
85
85
  "Add new": "Add new",
86
86
  "Add record": "Add record",
87
87
  "Custom field display name": "Custom field display name",
88
- "Display fields": "Display fields",
88
+ "Display fields": "Display collection fields",
89
89
  "Edit record": "Edit record",
90
90
  "Delete menu item": "Delete menu item",
91
91
  "Add page": "Add page",
@@ -126,6 +126,7 @@ var _default = {
126
126
  "Phone": "Phone",
127
127
  "Email": "Email",
128
128
  "Number": "Number",
129
+ "Integer": "Integer",
129
130
  "Percent": "Percent",
130
131
  "Password": "Password",
131
132
  "Formula": "Formula",
@@ -182,6 +183,7 @@ var _default = {
182
183
  "Add filter group": "Add filter group",
183
184
  "is": "is",
184
185
  "is not": "is not",
186
+ "is variable": "is variable",
185
187
  "contains": "contains",
186
188
  "does not contain": "does not contain",
187
189
  "starts with": "starts with",
@@ -547,6 +549,11 @@ var _default = {
547
549
  "One to one (has one)": "One to one (has one)",
548
550
  "One to one (belongs to)": "One to one (belongs to)",
549
551
  "Use the same time zone (GMT) for all users": "Use the same time zone (GMT) for all users",
550
- "Province/city/area name": "Province/city/area name"
552
+ "Block title": "Block title",
553
+ "Edit block title": "Edit block title",
554
+ "Province/city/area name": "Province/city/area name",
555
+ "Field component": "Field component",
556
+ "Subtable": "Subtable",
557
+ "Subform": "Subform"
551
558
  };
552
559
  exports.default = _default;
@@ -120,6 +120,7 @@ declare const _default: {
120
120
  Phone: string;
121
121
  Email: string;
122
122
  Number: string;
123
+ Integer: string;
123
124
  Percent: string;
124
125
  Password: string;
125
126
  Formula: string;
@@ -173,7 +174,11 @@ declare const _default: {
173
174
  "Many to one description": string;
174
175
  "Many to many description": string;
175
176
  "Generated automatically if left blank": string;
176
- "References fields of associated table": string;
177
+ "Display association fields": string;
178
+ "Field component": string;
179
+ Subtable: string;
180
+ Subform: string;
181
+ "Record picker": string;
177
182
  "Toggles the subfield mode": string;
178
183
  "Selector mode": string;
179
184
  "Subtable mode": string;
@@ -189,6 +194,7 @@ declare const _default: {
189
194
  "Add filter group": string;
190
195
  is: string;
191
196
  "is not": string;
197
+ "is variable": string;
192
198
  contains: string;
193
199
  "does not contain": string;
194
200
  "starts with": string;
@@ -500,10 +506,13 @@ declare const _default: {
500
506
  'Branch into "Yes" and "No"': string;
501
507
  Conditions: string;
502
508
  'Parallel branch': string;
509
+ 'Add branch': string;
503
510
  'All succeeded': string;
504
511
  'Any succeeded': string;
512
+ 'Any succeeded or failed': string;
505
513
  'Continue after all branches succeeded': string;
506
514
  'Continue after any branch succeeded': string;
515
+ 'Continue after any branch succeeded, or exit after any branch failed': string;
507
516
  Delay: string;
508
517
  Duration: string;
509
518
  'End Status': string;