@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.
- package/es/acl/Configuration/schemas/scopes.js +1 -0
- 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/AntdSchemaComponentProvider.js +2 -0
- 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/g2plot/G2Plot.js +33 -3
- package/es/schema-component/antd/g2plot/requestChartData.d.ts +4 -0
- package/es/schema-component/antd/g2plot/requestChartData.js +33 -0
- 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/acl/Configuration/schemas/scopes.js +1 -0
- 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/AntdSchemaComponentProvider.js +3 -0
- 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/g2plot/G2Plot.js +32 -2
- package/lib/schema-component/antd/g2plot/requestChartData.d.ts +4 -0
- package/lib/schema-component/antd/g2plot/requestChartData.js +42 -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
|
@@ -62,14 +62,21 @@ var m2m = {
|
|
|
62
62
|
var readPretty = _ref.readPretty,
|
|
63
63
|
block = _ref.block;
|
|
64
64
|
|
|
65
|
-
if (
|
|
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
|
|
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
|
|
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 (
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
63
|
-
|
|
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:
|
|
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': '
|
|
26
|
-
'x-component-props': {
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
schema['
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
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
|
-
}
|
|
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
|
|
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,
|
|
55
|
-
var
|
|
56
|
-
block =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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:
|
|
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,
|
|
228
|
-
var
|
|
229
|
-
block =
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
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:
|
|
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,
|
|
400
|
-
var
|
|
401
|
-
block =
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
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:
|
|
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
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
|
});
|
package/lib/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/lib/locale/en_US.js
CHANGED
|
@@ -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
|
-
"
|
|
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;
|
package/lib/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;
|