@nocobase/client 0.7.1-alpha.7 → 0.7.2-alpha.1
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.
- package/es/application/Application.js +0 -4
- package/es/block-provider/BlockSchemaComponentProvider.js +3 -0
- package/es/block-provider/FormBlockProvider.js +2 -1
- package/es/block-provider/FormFieldProvider.d.ts +8 -0
- package/es/block-provider/FormFieldProvider.js +89 -0
- package/es/block-provider/KanbanBlockProvider.js +117 -3
- package/es/block-provider/TableFieldProvider.js +17 -2
- package/es/block-provider/TableSelectorProvider.js +38 -6
- package/es/block-provider/hooks/index.js +10 -3
- package/es/block-provider/index.d.ts +1 -0
- package/es/block-provider/index.js +2 -1
- package/es/collection-manager/CollectionField.js +5 -1
- package/es/collection-manager/CollectionFieldProvider.js +7 -2
- package/es/collection-manager/Configuration/AddFieldAction.js +1 -1
- package/es/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/es/collection-manager/hooks/useCollectionManager.js +20 -5
- package/es/collection-manager/interfaces/index.d.ts +2 -1
- package/es/collection-manager/interfaces/index.js +3 -2
- package/es/collection-manager/interfaces/integer.d.ts +2 -0
- package/es/{workflow/nodes/update.js → collection-manager/interfaces/integer.js} +24 -20
- package/es/collection-manager/interfaces/linkTo.js +14 -6
- package/es/collection-manager/interfaces/m2m.js +12 -5
- package/es/collection-manager/interfaces/m2o.js +59 -8
- package/es/collection-manager/interfaces/o2m.js +72 -46
- package/es/collection-manager/interfaces/o2o.js +100 -39
- package/es/collection-manager/interfaces/properties/operators.d.ts +13 -0
- package/es/collection-manager/interfaces/properties/operators.js +7 -0
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/es/locale/en_US.d.ts +7 -0
- package/es/locale/en_US.js +9 -2
- package/es/locale/zh_CN.d.ts +10 -1
- package/es/locale/zh_CN.js +10 -1
- package/es/schema-component/antd/filter/DynamicComponent.js +50 -3
- package/es/schema-component/antd/filter/FilterItem.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +2 -0
- package/es/schema-component/antd/form-item/FormItem.js +79 -16
- package/es/schema-component/antd/form-v2/FormField.d.ts +1 -0
- package/es/schema-component/antd/form-v2/FormField.js +29 -0
- package/es/schema-component/antd/form-v2/index.d.ts +1 -0
- package/es/schema-component/antd/form-v2/index.js +2 -1
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +10 -1
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +34 -14
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +34 -11
- package/es/schema-component/antd/record-picker/useFieldNames.js +2 -2
- package/es/schema-component/antd/select/shared.js +4 -2
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -1
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.js +7 -3
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +7 -2
- package/es/schema-component/antd/table-v2/Table.js +4 -2
- package/es/schema-component/antd/table-v2/TableField.js +7 -0
- package/es/schema-initializer/buttons/TableColumnInitializers.js +26 -12
- package/es/schema-initializer/components/assigned-field/AssignedField.js +34 -47
- package/es/schema-initializer/utils.d.ts +2 -0
- package/es/schema-initializer/utils.js +160 -30
- package/es/schema-settings/SchemaSettings.js +6 -3
- package/lib/application/Application.js +0 -5
- package/lib/block-provider/BlockSchemaComponentProvider.js +4 -0
- package/lib/block-provider/FormBlockProvider.js +2 -1
- package/lib/block-provider/FormFieldProvider.d.ts +8 -0
- package/lib/block-provider/FormFieldProvider.js +120 -0
- package/lib/block-provider/KanbanBlockProvider.js +118 -1
- package/lib/block-provider/TableFieldProvider.js +19 -2
- package/lib/block-provider/TableSelectorProvider.js +39 -5
- package/lib/block-provider/hooks/index.js +11 -3
- package/lib/block-provider/index.d.ts +1 -0
- package/lib/block-provider/index.js +13 -0
- package/lib/collection-manager/CollectionField.js +5 -1
- package/lib/collection-manager/CollectionFieldProvider.js +9 -3
- package/lib/collection-manager/Configuration/AddFieldAction.js +1 -1
- package/lib/collection-manager/Configuration/EditFieldAction.js +1 -1
- package/lib/collection-manager/hooks/useCollectionManager.js +20 -5
- package/lib/collection-manager/interfaces/index.d.ts +2 -1
- package/lib/collection-manager/interfaces/index.js +26 -13
- package/lib/collection-manager/interfaces/integer.d.ts +2 -0
- package/lib/{workflow/nodes/update.js → collection-manager/interfaces/integer.js} +26 -24
- package/lib/collection-manager/interfaces/linkTo.js +14 -6
- package/lib/collection-manager/interfaces/m2m.js +12 -5
- package/lib/collection-manager/interfaces/m2o.js +61 -10
- package/lib/collection-manager/interfaces/o2m.js +72 -45
- package/lib/collection-manager/interfaces/o2o.js +103 -43
- package/lib/collection-manager/interfaces/properties/operators.d.ts +13 -0
- package/lib/collection-manager/interfaces/properties/operators.js +7 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -13
- package/lib/locale/en_US.d.ts +7 -0
- package/lib/locale/en_US.js +9 -2
- package/lib/locale/zh_CN.d.ts +10 -1
- package/lib/locale/zh_CN.js +10 -1
- package/lib/schema-component/antd/filter/DynamicComponent.js +52 -1
- package/lib/schema-component/antd/filter/FilterItem.js +7 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +2 -0
- package/lib/schema-component/antd/form-item/FormItem.js +80 -17
- package/lib/schema-component/antd/form-v2/FormField.d.ts +1 -0
- package/lib/schema-component/antd/form-v2/FormField.js +48 -0
- package/lib/schema-component/antd/form-v2/index.d.ts +1 -0
- package/lib/schema-component/antd/form-v2/index.js +17 -0
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +9 -0
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +33 -13
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +32 -9
- package/lib/schema-component/antd/record-picker/useFieldNames.js +2 -2
- package/lib/schema-component/antd/select/shared.js +4 -2
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.d.ts +1 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +6 -2
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +7 -2
- package/lib/schema-component/antd/table-v2/Table.js +4 -2
- package/lib/schema-component/antd/table-v2/TableField.js +8 -0
- package/lib/schema-initializer/buttons/TableColumnInitializers.js +25 -11
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +29 -43
- package/lib/schema-initializer/utils.d.ts +2 -0
- package/lib/schema-initializer/utils.js +166 -30
- package/lib/schema-settings/SchemaSettings.js +5 -2
- package/package.json +4 -5
- package/es/workflow/ExecutionResourceProvider.d.ts +0 -4
- package/es/workflow/ExecutionResourceProvider.js +0 -35
- package/es/workflow/WorkflowCanvas.d.ts +0 -15
- package/es/workflow/WorkflowCanvas.js +0 -375
- package/es/workflow/WorkflowLink.d.ts +0 -1
- package/es/workflow/WorkflowLink.js +0 -21
- package/es/workflow/WorkflowPage.d.ts +0 -1
- package/es/workflow/WorkflowPage.js +0 -43
- package/es/workflow/WorkflowRouteProvider.d.ts +0 -1
- package/es/workflow/WorkflowRouteProvider.js +0 -30
- package/es/workflow/WorkflowShortcut.d.ts +0 -1
- package/es/workflow/WorkflowShortcut.js +0 -62
- package/es/workflow/calculators.d.ts +0 -101
- package/es/workflow/calculators.js +0 -647
- package/es/workflow/components/Duration.d.ts +0 -5
- package/es/workflow/components/Duration.js +0 -61
- package/es/workflow/index.d.ts +0 -5
- package/es/workflow/index.js +0 -5
- package/es/workflow/nodes/calculation.d.ts +0 -25
- package/es/workflow/nodes/calculation.js +0 -47
- package/es/workflow/nodes/condition.d.ts +0 -46
- package/es/workflow/nodes/condition.js +0 -255
- package/es/workflow/nodes/create.d.ts +0 -46
- package/es/workflow/nodes/create.js +0 -90
- package/es/workflow/nodes/delay.d.ts +0 -35
- package/es/workflow/nodes/delay.js +0 -37
- package/es/workflow/nodes/destroy.d.ts +0 -55
- package/es/workflow/nodes/destroy.js +0 -27
- package/es/workflow/nodes/index.d.ts +0 -33
- package/es/workflow/nodes/index.js +0 -312
- package/es/workflow/nodes/parallel.d.ts +0 -24
- package/es/workflow/nodes/parallel.js +0 -132
- package/es/workflow/nodes/query.d.ts +0 -70
- package/es/workflow/nodes/query.js +0 -98
- package/es/workflow/nodes/update.d.ts +0 -60
- package/es/workflow/schemas/collection.d.ts +0 -42
- package/es/workflow/schemas/collection.js +0 -57
- package/es/workflow/schemas/executions.d.ts +0 -209
- package/es/workflow/schemas/executions.js +0 -157
- package/es/workflow/schemas/workflows.d.ts +0 -2
- package/es/workflow/schemas/workflows.js +0 -334
- package/es/workflow/style.d.ts +0 -12
- package/es/workflow/style.js +0 -17
- package/es/workflow/triggers/collection.d.ts +0 -77
- package/es/workflow/triggers/collection.js +0 -144
- package/es/workflow/triggers/index.d.ts +0 -26
- package/es/workflow/triggers/index.js +0 -177
- package/es/workflow/triggers/schedule/DateFieldsSelect.d.ts +0 -2
- package/es/workflow/triggers/schedule/DateFieldsSelect.js +0 -39
- package/es/workflow/triggers/schedule/EndsByField.d.ts +0 -5
- package/es/workflow/triggers/schedule/EndsByField.js +0 -57
- package/es/workflow/triggers/schedule/OnField.d.ts +0 -5
- package/es/workflow/triggers/schedule/OnField.js +0 -87
- package/es/workflow/triggers/schedule/RepeatField.d.ts +0 -5
- package/es/workflow/triggers/schedule/RepeatField.js +0 -131
- package/es/workflow/triggers/schedule/ScheduleConfig.d.ts +0 -1
- package/es/workflow/triggers/schedule/ScheduleConfig.js +0 -225
- package/es/workflow/triggers/schedule/index.d.ts +0 -25
- package/es/workflow/triggers/schedule/index.js +0 -77
- package/es/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -34
- package/es/workflow/triggers/schedule/locale/Cron.zh-CN.js +0 -37
- package/lib/workflow/ExecutionResourceProvider.d.ts +0 -4
- package/lib/workflow/ExecutionResourceProvider.js +0 -48
- package/lib/workflow/WorkflowCanvas.d.ts +0 -15
- package/lib/workflow/WorkflowCanvas.js +0 -408
- package/lib/workflow/WorkflowLink.d.ts +0 -1
- package/lib/workflow/WorkflowLink.js +0 -36
- package/lib/workflow/WorkflowPage.d.ts +0 -1
- package/lib/workflow/WorkflowPage.js +0 -60
- package/lib/workflow/WorkflowRouteProvider.d.ts +0 -1
- package/lib/workflow/WorkflowRouteProvider.js +0 -47
- package/lib/workflow/WorkflowShortcut.d.ts +0 -1
- package/lib/workflow/WorkflowShortcut.js +0 -87
- package/lib/workflow/calculators.d.ts +0 -101
- package/lib/workflow/calculators.js +0 -688
- package/lib/workflow/components/Duration.d.ts +0 -5
- package/lib/workflow/components/Duration.js +0 -74
- package/lib/workflow/index.d.ts +0 -5
- package/lib/workflow/index.js +0 -70
- package/lib/workflow/nodes/calculation.d.ts +0 -25
- package/lib/workflow/nodes/calculation.js +0 -61
- package/lib/workflow/nodes/condition.d.ts +0 -46
- package/lib/workflow/nodes/condition.js +0 -275
- package/lib/workflow/nodes/create.d.ts +0 -46
- package/lib/workflow/nodes/create.js +0 -107
- package/lib/workflow/nodes/delay.d.ts +0 -35
- package/lib/workflow/nodes/delay.js +0 -48
- package/lib/workflow/nodes/destroy.d.ts +0 -55
- package/lib/workflow/nodes/destroy.js +0 -38
- package/lib/workflow/nodes/index.d.ts +0 -33
- package/lib/workflow/nodes/index.js +0 -357
- package/lib/workflow/nodes/parallel.d.ts +0 -24
- package/lib/workflow/nodes/parallel.js +0 -155
- package/lib/workflow/nodes/query.d.ts +0 -70
- package/lib/workflow/nodes/query.js +0 -115
- package/lib/workflow/nodes/update.d.ts +0 -60
- package/lib/workflow/schemas/collection.d.ts +0 -42
- package/lib/workflow/schemas/collection.js +0 -70
- package/lib/workflow/schemas/executions.d.ts +0 -209
- package/lib/workflow/schemas/executions.js +0 -164
- package/lib/workflow/schemas/workflows.d.ts +0 -2
- package/lib/workflow/schemas/workflows.js +0 -344
- package/lib/workflow/style.d.ts +0 -12
- package/lib/workflow/style.js +0 -37
- package/lib/workflow/triggers/collection.d.ts +0 -77
- package/lib/workflow/triggers/collection.js +0 -164
- package/lib/workflow/triggers/index.d.ts +0 -26
- package/lib/workflow/triggers/index.js +0 -201
- package/lib/workflow/triggers/schedule/DateFieldsSelect.d.ts +0 -2
- package/lib/workflow/triggers/schedule/DateFieldsSelect.js +0 -54
- package/lib/workflow/triggers/schedule/EndsByField.d.ts +0 -5
- package/lib/workflow/triggers/schedule/EndsByField.js +0 -73
- package/lib/workflow/triggers/schedule/OnField.d.ts +0 -5
- package/lib/workflow/triggers/schedule/OnField.js +0 -105
- package/lib/workflow/triggers/schedule/RepeatField.d.ts +0 -5
- package/lib/workflow/triggers/schedule/RepeatField.js +0 -146
- package/lib/workflow/triggers/schedule/ScheduleConfig.d.ts +0 -1
- package/lib/workflow/triggers/schedule/ScheduleConfig.js +0 -250
- package/lib/workflow/triggers/schedule/index.d.ts +0 -25
- package/lib/workflow/triggers/schedule/index.js +0 -94
- package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.d.ts +0 -34
- package/lib/workflow/triggers/schedule/locale/Cron.zh-CN.js +0 -44
|
@@ -4,26 +4,30 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
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; }
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
import { defaultProps, operators } from './properties';
|
|
8
|
+
export var integer = {
|
|
9
|
+
name: 'integer',
|
|
10
|
+
type: 'object',
|
|
11
|
+
group: 'basic',
|
|
12
|
+
order: 5,
|
|
13
|
+
title: '{{t("Integer")}}',
|
|
14
|
+
sortable: true,
|
|
15
|
+
default: {
|
|
16
|
+
type: 'integer',
|
|
17
|
+
// name,
|
|
18
|
+
uiSchema: {
|
|
19
|
+
type: 'number',
|
|
20
|
+
// title,
|
|
21
|
+
'x-component': 'InputNumber',
|
|
22
|
+
'x-component-props': {
|
|
23
|
+
stringMode: true,
|
|
24
|
+
step: '0'
|
|
25
|
+
},
|
|
26
|
+
'x-validator': 'integer'
|
|
27
|
+
}
|
|
20
28
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
components: {
|
|
26
|
-
VariableComponent: VariableComponent,
|
|
27
|
-
CollectionFieldset: CollectionFieldset
|
|
29
|
+
properties: _objectSpread({}, defaultProps),
|
|
30
|
+
filterable: {
|
|
31
|
+
operators: operators.number
|
|
28
32
|
}
|
|
29
33
|
};
|
|
@@ -49,16 +49,24 @@ export var linkTo = {
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
schemaInitialize: function schemaInitialize(schema, _ref) {
|
|
52
|
-
var readPretty = _ref.readPretty
|
|
52
|
+
var readPretty = _ref.readPretty,
|
|
53
|
+
block = _ref.block;
|
|
53
54
|
|
|
54
|
-
if (
|
|
55
|
-
schema['properties'] = {
|
|
56
|
-
viewer: cloneDeep(recordPickerViewer)
|
|
57
|
-
};
|
|
58
|
-
} else {
|
|
55
|
+
if (block === 'Form') {
|
|
59
56
|
schema['properties'] = {
|
|
57
|
+
viewer: cloneDeep(recordPickerViewer),
|
|
60
58
|
selector: cloneDeep(recordPickerSelector)
|
|
61
59
|
};
|
|
60
|
+
} else {
|
|
61
|
+
if (readPretty) {
|
|
62
|
+
schema['properties'] = {
|
|
63
|
+
viewer: cloneDeep(recordPickerViewer)
|
|
64
|
+
};
|
|
65
|
+
} else {
|
|
66
|
+
schema['properties'] = {
|
|
67
|
+
selector: cloneDeep(recordPickerSelector)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
62
70
|
}
|
|
63
71
|
},
|
|
64
72
|
initialize: function initialize(values) {
|
|
@@ -52,14 +52,21 @@ export var m2m = {
|
|
|
52
52
|
var readPretty = _ref.readPretty,
|
|
53
53
|
block = _ref.block;
|
|
54
54
|
|
|
55
|
-
if (
|
|
56
|
-
schema['properties'] = {
|
|
57
|
-
viewer: cloneDeep(recordPickerViewer)
|
|
58
|
-
};
|
|
59
|
-
} else {
|
|
55
|
+
if (block === 'Form') {
|
|
60
56
|
schema['properties'] = {
|
|
57
|
+
viewer: cloneDeep(recordPickerViewer),
|
|
61
58
|
selector: cloneDeep(recordPickerSelector)
|
|
62
59
|
};
|
|
60
|
+
} else {
|
|
61
|
+
if (readPretty) {
|
|
62
|
+
schema['properties'] = {
|
|
63
|
+
viewer: cloneDeep(recordPickerViewer)
|
|
64
|
+
};
|
|
65
|
+
} else {
|
|
66
|
+
schema['properties'] = {
|
|
67
|
+
selector: cloneDeep(recordPickerSelector)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
if (['Table', 'Kanban'].includes(block)) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
|
|
1
3
|
import { cloneDeep } from 'lodash';
|
|
2
4
|
import { recordPickerSelector, recordPickerViewer, relationshipType } from './properties';
|
|
3
5
|
export var m2o = {
|
|
@@ -42,17 +44,66 @@ export var m2o = {
|
|
|
42
44
|
}
|
|
43
45
|
},
|
|
44
46
|
schemaInitialize: function schemaInitialize(schema, _ref) {
|
|
45
|
-
var
|
|
46
|
-
block = _ref.block
|
|
47
|
+
var field = _ref.field,
|
|
48
|
+
block = _ref.block,
|
|
49
|
+
readPretty = _ref.readPretty,
|
|
50
|
+
action = _ref.action;
|
|
47
51
|
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
if (block === 'Form' && schema['x-component'] === 'FormField') {
|
|
53
|
+
var association = "".concat(field.collectionName, ".").concat(field.name);
|
|
54
|
+
schema.type = 'void';
|
|
55
|
+
schema.properties = {
|
|
56
|
+
block: {
|
|
57
|
+
type: 'void',
|
|
58
|
+
'x-decorator': 'FormFieldProvider',
|
|
59
|
+
'x-decorator-props': {
|
|
60
|
+
collection: field.target,
|
|
61
|
+
association: association,
|
|
62
|
+
resource: association,
|
|
63
|
+
action: action,
|
|
64
|
+
fieldName: field.name,
|
|
65
|
+
readPretty: readPretty
|
|
66
|
+
},
|
|
67
|
+
'x-component': 'CardItem',
|
|
68
|
+
'x-component-props': {
|
|
69
|
+
bordered: true
|
|
70
|
+
},
|
|
71
|
+
properties: _defineProperty({}, field.name, {
|
|
72
|
+
type: 'object',
|
|
73
|
+
'x-component': 'FormV2',
|
|
74
|
+
'x-component-props': {
|
|
75
|
+
useProps: '{{ useFormFieldProps }}'
|
|
76
|
+
},
|
|
77
|
+
properties: {
|
|
78
|
+
__form_grid: {
|
|
79
|
+
type: 'void',
|
|
80
|
+
'x-component': 'Grid',
|
|
81
|
+
'x-initializer': 'FormItemInitializers',
|
|
82
|
+
properties: {}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
51
87
|
};
|
|
52
88
|
} else {
|
|
53
|
-
schema
|
|
54
|
-
|
|
55
|
-
|
|
89
|
+
schema.type = 'string';
|
|
90
|
+
|
|
91
|
+
if (block === 'Form') {
|
|
92
|
+
schema['properties'] = {
|
|
93
|
+
viewer: cloneDeep(recordPickerViewer),
|
|
94
|
+
selector: cloneDeep(recordPickerSelector)
|
|
95
|
+
};
|
|
96
|
+
} else {
|
|
97
|
+
if (readPretty) {
|
|
98
|
+
schema['properties'] = {
|
|
99
|
+
viewer: cloneDeep(recordPickerViewer)
|
|
100
|
+
};
|
|
101
|
+
} else {
|
|
102
|
+
schema['properties'] = {
|
|
103
|
+
selector: cloneDeep(recordPickerSelector)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
56
107
|
}
|
|
57
108
|
|
|
58
109
|
if (['Table', 'Kanban'].includes(block)) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
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; }
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { cloneDeep } from 'lodash';
|
|
4
|
+
import { recordPickerSelector, recordPickerViewer, relationshipType } from './properties';
|
|
4
5
|
export var o2m = {
|
|
5
6
|
name: 'o2m',
|
|
6
7
|
type: 'object',
|
|
@@ -14,13 +15,14 @@ export var o2m = {
|
|
|
14
15
|
// name,
|
|
15
16
|
uiSchema: {
|
|
16
17
|
// title,
|
|
17
|
-
'x-component': '
|
|
18
|
-
'x-component-props': {
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
'x-component': 'RecordPicker',
|
|
19
|
+
'x-component-props': {
|
|
20
|
+
// mode: 'tags',
|
|
21
|
+
multiple: true,
|
|
22
|
+
fieldNames: {
|
|
23
|
+
label: 'id',
|
|
24
|
+
value: 'id'
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
},
|
|
26
28
|
reverseField: {
|
|
@@ -43,46 +45,69 @@ export var o2m = {
|
|
|
43
45
|
},
|
|
44
46
|
schemaInitialize: function schemaInitialize(schema, _ref) {
|
|
45
47
|
var field = _ref.field,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
schema['
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
showIndex: true,
|
|
64
|
-
dragSort: false
|
|
65
|
-
},
|
|
66
|
-
properties: _defineProperty({
|
|
67
|
-
actions: {
|
|
68
|
-
type: 'void',
|
|
69
|
-
'x-initializer': 'SubTableActionInitializers',
|
|
70
|
-
'x-component': 'TableField.ActionBar',
|
|
71
|
-
'x-component-props': {}
|
|
72
|
-
}
|
|
73
|
-
}, field.name, {
|
|
74
|
-
type: 'array',
|
|
75
|
-
'x-initializer': 'TableColumnInitializers',
|
|
76
|
-
'x-component': 'TableV2',
|
|
77
|
-
'x-component-props': {
|
|
78
|
-
rowSelection: {
|
|
79
|
-
type: 'checkbox'
|
|
48
|
+
block = _ref.block,
|
|
49
|
+
readPretty = _ref.readPretty;
|
|
50
|
+
|
|
51
|
+
if (block === 'Form' && schema['x-component'] === 'TableField') {
|
|
52
|
+
var association = "".concat(field.collectionName, ".").concat(field.name);
|
|
53
|
+
schema['type'] = 'void';
|
|
54
|
+
schema['properties'] = {
|
|
55
|
+
block: {
|
|
56
|
+
type: 'void',
|
|
57
|
+
'x-decorator': 'TableFieldProvider',
|
|
58
|
+
'x-decorator-props': {
|
|
59
|
+
collection: field.target,
|
|
60
|
+
association: association,
|
|
61
|
+
resource: association,
|
|
62
|
+
action: 'list',
|
|
63
|
+
params: {
|
|
64
|
+
paginate: false
|
|
80
65
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
66
|
+
showIndex: true,
|
|
67
|
+
dragSort: false,
|
|
68
|
+
fieldName: field.name
|
|
69
|
+
},
|
|
70
|
+
properties: _defineProperty({
|
|
71
|
+
actions: {
|
|
72
|
+
type: 'void',
|
|
73
|
+
'x-initializer': 'SubTableActionInitializers',
|
|
74
|
+
'x-component': 'TableField.ActionBar',
|
|
75
|
+
'x-component-props': {}
|
|
76
|
+
}
|
|
77
|
+
}, field.name, {
|
|
78
|
+
type: 'array',
|
|
79
|
+
'x-initializer': 'TableColumnInitializers',
|
|
80
|
+
'x-component': 'TableV2',
|
|
81
|
+
'x-component-props': {
|
|
82
|
+
rowSelection: {
|
|
83
|
+
type: 'checkbox'
|
|
84
|
+
},
|
|
85
|
+
useProps: '{{ useTableFieldProps }}'
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
} else {
|
|
91
|
+
schema['x-component'] = 'CollectionField';
|
|
92
|
+
schema.type = 'object';
|
|
93
|
+
|
|
94
|
+
if (block === 'Form') {
|
|
95
|
+
schema['properties'] = {
|
|
96
|
+
viewer: cloneDeep(recordPickerViewer),
|
|
97
|
+
selector: cloneDeep(recordPickerSelector)
|
|
98
|
+
};
|
|
99
|
+
} else {
|
|
100
|
+
if (readPretty) {
|
|
101
|
+
schema['properties'] = {
|
|
102
|
+
viewer: cloneDeep(recordPickerViewer)
|
|
103
|
+
};
|
|
104
|
+
} else {
|
|
105
|
+
schema['properties'] = {
|
|
106
|
+
selector: cloneDeep(recordPickerSelector)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
84
109
|
}
|
|
85
|
-
}
|
|
110
|
+
} // if (readPretty) {
|
|
86
111
|
// schema['properties'] = {
|
|
87
112
|
// viewer: cloneDeep(recordPickerViewer),
|
|
88
113
|
// };
|
|
@@ -92,6 +117,7 @@ export var o2m = {
|
|
|
92
117
|
// };
|
|
93
118
|
// }
|
|
94
119
|
|
|
120
|
+
|
|
95
121
|
if (['Table', 'Kanban'].includes(block)) {
|
|
96
122
|
schema['x-component-props'] = schema['x-component-props'] || {};
|
|
97
123
|
schema['x-component-props']['ellipsis'] = true;
|
|
@@ -1,5 +1,72 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
|
|
1
3
|
import { cloneDeep } from 'lodash';
|
|
2
4
|
import { recordPickerSelector, recordPickerViewer, relationshipType } from './properties';
|
|
5
|
+
|
|
6
|
+
var internalSchameInitialize = function internalSchameInitialize(schema, _ref) {
|
|
7
|
+
var field = _ref.field,
|
|
8
|
+
block = _ref.block,
|
|
9
|
+
readPretty = _ref.readPretty,
|
|
10
|
+
action = _ref.action;
|
|
11
|
+
|
|
12
|
+
if (block === 'Form' && schema['x-component'] === 'FormField') {
|
|
13
|
+
var association = "".concat(field.collectionName, ".").concat(field.name);
|
|
14
|
+
schema.type = 'void';
|
|
15
|
+
schema.properties = {
|
|
16
|
+
block: {
|
|
17
|
+
type: 'void',
|
|
18
|
+
'x-decorator': 'FormFieldProvider',
|
|
19
|
+
'x-decorator-props': {
|
|
20
|
+
collection: field.target,
|
|
21
|
+
association: association,
|
|
22
|
+
resource: association,
|
|
23
|
+
action: action,
|
|
24
|
+
fieldName: field.name,
|
|
25
|
+
readPretty: readPretty
|
|
26
|
+
},
|
|
27
|
+
'x-component': 'CardItem',
|
|
28
|
+
'x-component-props': {
|
|
29
|
+
bordered: true
|
|
30
|
+
},
|
|
31
|
+
properties: _defineProperty({}, field.name, {
|
|
32
|
+
type: 'object',
|
|
33
|
+
'x-component': 'FormV2',
|
|
34
|
+
'x-component-props': {
|
|
35
|
+
useProps: '{{ useFormFieldProps }}'
|
|
36
|
+
},
|
|
37
|
+
properties: {
|
|
38
|
+
__form_grid: {
|
|
39
|
+
type: 'void',
|
|
40
|
+
'x-component': 'Grid',
|
|
41
|
+
'x-initializer': 'FormItemInitializers',
|
|
42
|
+
properties: {}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
} else {
|
|
49
|
+
schema.type = 'string';
|
|
50
|
+
|
|
51
|
+
if (block === 'Form') {
|
|
52
|
+
schema['properties'] = {
|
|
53
|
+
viewer: cloneDeep(recordPickerViewer),
|
|
54
|
+
selector: cloneDeep(recordPickerSelector)
|
|
55
|
+
};
|
|
56
|
+
} else {
|
|
57
|
+
if (readPretty) {
|
|
58
|
+
schema['properties'] = {
|
|
59
|
+
viewer: cloneDeep(recordPickerViewer)
|
|
60
|
+
};
|
|
61
|
+
} else {
|
|
62
|
+
schema['properties'] = {
|
|
63
|
+
selector: cloneDeep(recordPickerSelector)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
3
70
|
export var o2o = {
|
|
4
71
|
name: 'o2o',
|
|
5
72
|
type: 'object',
|
|
@@ -42,19 +109,17 @@ export var o2o = {
|
|
|
42
109
|
}
|
|
43
110
|
}
|
|
44
111
|
},
|
|
45
|
-
schemaInitialize: function schemaInitialize(schema,
|
|
46
|
-
var
|
|
47
|
-
block =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
}
|
|
112
|
+
schemaInitialize: function schemaInitialize(schema, _ref2) {
|
|
113
|
+
var field = _ref2.field,
|
|
114
|
+
block = _ref2.block,
|
|
115
|
+
readPretty = _ref2.readPretty,
|
|
116
|
+
action = _ref2.action;
|
|
117
|
+
internalSchameInitialize(schema, {
|
|
118
|
+
field: field,
|
|
119
|
+
block: block,
|
|
120
|
+
readPretty: readPretty,
|
|
121
|
+
action: action
|
|
122
|
+
});
|
|
58
123
|
|
|
59
124
|
if (['Table', 'Kanban'].includes(block)) {
|
|
60
125
|
schema['x-component-props'] = schema['x-component-props'] || {};
|
|
@@ -214,19 +279,17 @@ export var oho = {
|
|
|
214
279
|
}
|
|
215
280
|
}
|
|
216
281
|
},
|
|
217
|
-
schemaInitialize: function schemaInitialize(schema,
|
|
218
|
-
var
|
|
219
|
-
block =
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
};
|
|
229
|
-
}
|
|
282
|
+
schemaInitialize: function schemaInitialize(schema, _ref3) {
|
|
283
|
+
var field = _ref3.field,
|
|
284
|
+
block = _ref3.block,
|
|
285
|
+
readPretty = _ref3.readPretty,
|
|
286
|
+
action = _ref3.action;
|
|
287
|
+
internalSchameInitialize(schema, {
|
|
288
|
+
field: field,
|
|
289
|
+
block: block,
|
|
290
|
+
readPretty: readPretty,
|
|
291
|
+
action: action
|
|
292
|
+
});
|
|
230
293
|
|
|
231
294
|
if (['Table', 'Kanban'].includes(block)) {
|
|
232
295
|
schema['x-component-props'] = schema['x-component-props'] || {};
|
|
@@ -385,19 +448,17 @@ export var obo = {
|
|
|
385
448
|
}
|
|
386
449
|
}
|
|
387
450
|
},
|
|
388
|
-
schemaInitialize: function schemaInitialize(schema,
|
|
389
|
-
var
|
|
390
|
-
block =
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
};
|
|
400
|
-
}
|
|
451
|
+
schemaInitialize: function schemaInitialize(schema, _ref4) {
|
|
452
|
+
var field = _ref4.field,
|
|
453
|
+
block = _ref4.block,
|
|
454
|
+
readPretty = _ref4.readPretty,
|
|
455
|
+
action = _ref4.action;
|
|
456
|
+
internalSchameInitialize(schema, {
|
|
457
|
+
field: field,
|
|
458
|
+
block: block,
|
|
459
|
+
readPretty: readPretty,
|
|
460
|
+
action: action
|
|
461
|
+
});
|
|
401
462
|
|
|
402
463
|
if (['Table', 'Kanban'].includes(block)) {
|
|
403
464
|
schema['x-component-props'] = schema['x-component-props'] || {};
|
|
@@ -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;
|
|
@@ -129,6 +129,13 @@ export var id = [{
|
|
|
129
129
|
}, {
|
|
130
130
|
label: '{{t("is not")}}',
|
|
131
131
|
value: '$ne'
|
|
132
|
+
}, {
|
|
133
|
+
label: '{{t("is variable")}}',
|
|
134
|
+
value: '$isVar',
|
|
135
|
+
schema: {
|
|
136
|
+
'x-component': 'VariableCascader',
|
|
137
|
+
'x-component-props': {}
|
|
138
|
+
}
|
|
132
139
|
}, {
|
|
133
140
|
label: '{{t("is current logged-in user")}}',
|
|
134
141
|
value: '$isCurrentUser',
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/locale/en_US.d.ts
CHANGED
|
@@ -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;
|
package/es/locale/en_US.js
CHANGED
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
"Add new": "Add new",
|
|
80
80
|
"Add record": "Add record",
|
|
81
81
|
"Custom field display name": "Custom field display name",
|
|
82
|
-
"Display fields": "Display fields",
|
|
82
|
+
"Display fields": "Display collection fields",
|
|
83
83
|
"Edit record": "Edit record",
|
|
84
84
|
"Delete menu item": "Delete menu item",
|
|
85
85
|
"Add page": "Add page",
|
|
@@ -120,6 +120,7 @@ export default {
|
|
|
120
120
|
"Phone": "Phone",
|
|
121
121
|
"Email": "Email",
|
|
122
122
|
"Number": "Number",
|
|
123
|
+
"Integer": "Integer",
|
|
123
124
|
"Percent": "Percent",
|
|
124
125
|
"Password": "Password",
|
|
125
126
|
"Formula": "Formula",
|
|
@@ -176,6 +177,7 @@ export default {
|
|
|
176
177
|
"Add filter group": "Add filter group",
|
|
177
178
|
"is": "is",
|
|
178
179
|
"is not": "is not",
|
|
180
|
+
"is variable": "is variable",
|
|
179
181
|
"contains": "contains",
|
|
180
182
|
"does not contain": "does not contain",
|
|
181
183
|
"starts with": "starts with",
|
|
@@ -541,5 +543,10 @@ export default {
|
|
|
541
543
|
"One to one (has one)": "One to one (has one)",
|
|
542
544
|
"One to one (belongs to)": "One to one (belongs to)",
|
|
543
545
|
"Use the same time zone (GMT) for all users": "Use the same time zone (GMT) for all users",
|
|
544
|
-
"
|
|
546
|
+
"Block title": "Block title",
|
|
547
|
+
"Edit block title": "Edit block title",
|
|
548
|
+
"Province/city/area name": "Province/city/area name",
|
|
549
|
+
"Field component": "Field component",
|
|
550
|
+
"Subtable": "Subtable",
|
|
551
|
+
"Subform": "Subform"
|
|
545
552
|
};
|
package/es/locale/zh_CN.d.ts
CHANGED
|
@@ -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
|
-
"
|
|
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;
|