@nocobase/client 0.7.2-alpha.7 → 0.7.4-alpha.4
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.d.ts +1 -0
- package/es/application/Application.js +7 -1
- package/es/block-provider/FormBlockProvider.js +15 -3
- package/es/block-provider/TableFieldProvider.d.ts +1 -0
- package/es/block-provider/TableFieldProvider.js +5 -2
- package/es/block-provider/TableSelectorProvider.js +42 -14
- package/es/block-provider/hooks/index.d.ts +6 -0
- package/es/block-provider/hooks/index.js +159 -65
- package/es/collection-manager/CollectionField.js +11 -4
- package/es/collection-manager/Configuration/AddFieldAction.js +6 -0
- package/es/collection-manager/Configuration/EditFieldAction.js +7 -0
- package/es/collection-manager/Configuration/index.js +5 -1
- package/es/collection-manager/Configuration/schemas/collections.js +2 -1
- package/es/collection-manager/interfaces/checkbox.js +1 -0
- package/es/collection-manager/interfaces/checkboxGroup.js +1 -0
- package/es/collection-manager/interfaces/datetime.js +1 -0
- package/es/collection-manager/interfaces/email.js +1 -0
- package/es/collection-manager/interfaces/icon.js +1 -0
- package/es/collection-manager/interfaces/input.js +104 -0
- package/es/collection-manager/interfaces/integer.js +64 -0
- package/es/collection-manager/interfaces/m2m.js +2 -0
- package/es/collection-manager/interfaces/m2o.js +1 -0
- package/es/collection-manager/interfaces/markdown.js +35 -0
- package/es/collection-manager/interfaces/multipleSelect.js +1 -0
- package/es/collection-manager/interfaces/number.js +56 -0
- package/es/collection-manager/interfaces/o2m.js +1 -0
- package/es/collection-manager/interfaces/o2o.js +3 -0
- package/es/collection-manager/interfaces/password.js +37 -1
- package/es/collection-manager/interfaces/percent.js +98 -0
- package/es/collection-manager/interfaces/phone.js +1 -0
- package/es/collection-manager/interfaces/properties/index.d.ts +1 -0
- package/es/collection-manager/interfaces/properties/index.js +1 -0
- package/es/collection-manager/interfaces/properties/operators.js +4 -4
- package/es/collection-manager/interfaces/radioGroup.js +1 -0
- package/es/collection-manager/interfaces/richText.js +35 -0
- package/es/collection-manager/interfaces/select.js +1 -0
- package/es/collection-manager/interfaces/textarea.js +35 -0
- package/es/collection-manager/interfaces/time.js +1 -0
- package/es/file-manager/FileStorageShortcut.js +2 -2
- package/es/locale/en_US.d.ts +8 -2
- package/es/locale/en_US.js +9 -3
- package/es/locale/zh_CN.d.ts +28 -2
- package/es/locale/zh_CN.js +29 -3
- package/es/plugin-manager/PluginManager.d.ts +1 -0
- package/es/plugin-manager/PluginManager.js +20 -6
- package/es/schema-component/antd/action/Action.Modal.js +1 -1
- package/es/schema-component/antd/calendar/Calendar.Designer.js +16 -10
- package/es/schema-component/antd/date-picker/DatePicker.d.ts +1 -1
- package/es/schema-component/antd/date-picker/DatePicker.js +1 -1
- package/es/schema-component/antd/date-picker/ReadPretty.js +1 -1
- package/es/schema-component/antd/date-picker/util.d.ts +0 -10
- package/es/schema-component/antd/date-picker/util.js +1 -79
- package/es/schema-component/antd/form-item/FormItem.js +193 -10
- package/es/schema-component/antd/grid/Grid.js +72 -6
- package/es/schema-component/antd/input-number/InputNumber.d.ts +1 -5
- package/es/schema-component/antd/input-number/InputNumber.js +25 -1
- package/es/schema-component/antd/input-number/ReadPretty.js +2 -4
- package/es/schema-component/antd/kanban/Kanban.Card.Designer.js +20 -14
- package/es/schema-component/antd/menu/Menu.js +6 -3
- package/es/schema-component/antd/percent/Percent.js +2 -2
- package/es/schema-component/antd/record-picker/InputRecordPicker.js +27 -13
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +5 -3
- package/es/schema-component/antd/table/Table.Array.js +2 -2
- package/es/schema-component/antd/table/Table.Void.js +11 -1
- package/es/schema-component/antd/table-v2/Table.Column.Designer.js +3 -1
- package/es/schema-component/antd/table-v2/Table.d.ts +0 -11
- package/es/schema-component/antd/table-v2/Table.js +163 -92
- package/es/schema-component/antd/table-v2/TableField.js +3 -0
- package/es/schema-component/antd/tabs/Tabs.Designer.js +23 -12
- package/es/schema-component/antd/tabs/Tabs.js +7 -1
- package/es/schema-component/antd/time-picker/ReadPretty.js +11 -5
- package/es/schema-component/core/DesignableSwitch.js +7 -1
- package/es/schema-component/hooks/useDesignable.js +21 -21
- package/es/schema-component/hooks/useProps.js +1 -1
- package/es/schema-initializer/buttons/FormItemInitializers.js +14 -3
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +8 -0
- package/es/schema-initializer/buttons/ReadPrettyFormItemInitializers.js +14 -3
- package/es/schema-initializer/buttons/RecordBlockInitializers.js +32 -3
- package/es/schema-initializer/buttons/TabPaneInitializers.js +11 -3
- package/es/schema-initializer/buttons/TableActionInitializers.js +11 -0
- package/es/schema-initializer/components/assigned-field/AssignedField.d.ts +4 -0
- package/es/schema-initializer/components/assigned-field/AssignedField.js +255 -69
- package/es/schema-initializer/items/index.d.ts +2 -0
- package/es/schema-initializer/items/index.js +48 -2
- package/es/schema-initializer/utils.js +22 -2
- package/es/schema-settings/SchemaSettings.js +7 -0
- package/es/system-settings/SystemSettingsShortcut.js +35 -12
- package/lib/application/Application.d.ts +1 -0
- package/lib/application/Application.js +11 -2
- package/lib/block-provider/FormBlockProvider.js +15 -2
- package/lib/block-provider/TableFieldProvider.d.ts +1 -0
- package/lib/block-provider/TableFieldProvider.js +4 -1
- package/lib/block-provider/TableSelectorProvider.js +42 -14
- package/lib/block-provider/hooks/index.d.ts +6 -0
- package/lib/block-provider/hooks/index.js +168 -67
- package/lib/collection-manager/CollectionField.js +12 -4
- package/lib/collection-manager/Configuration/AddFieldAction.js +6 -0
- package/lib/collection-manager/Configuration/EditFieldAction.js +7 -0
- package/lib/collection-manager/Configuration/index.js +5 -0
- package/lib/collection-manager/Configuration/schemas/collections.js +2 -1
- package/lib/collection-manager/interfaces/checkbox.js +1 -0
- package/lib/collection-manager/interfaces/checkboxGroup.js +1 -0
- package/lib/collection-manager/interfaces/datetime.js +1 -0
- package/lib/collection-manager/interfaces/email.js +1 -0
- package/lib/collection-manager/interfaces/icon.js +1 -0
- package/lib/collection-manager/interfaces/input.js +105 -0
- package/lib/collection-manager/interfaces/integer.js +66 -0
- package/lib/collection-manager/interfaces/m2m.js +2 -0
- package/lib/collection-manager/interfaces/m2o.js +1 -0
- package/lib/collection-manager/interfaces/markdown.js +36 -0
- package/lib/collection-manager/interfaces/multipleSelect.js +1 -0
- package/lib/collection-manager/interfaces/number.js +57 -0
- package/lib/collection-manager/interfaces/o2m.js +1 -0
- package/lib/collection-manager/interfaces/o2o.js +3 -0
- package/lib/collection-manager/interfaces/password.js +38 -1
- package/lib/collection-manager/interfaces/percent.js +100 -0
- package/lib/collection-manager/interfaces/phone.js +1 -0
- package/lib/collection-manager/interfaces/properties/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/properties/index.js +1 -0
- package/lib/collection-manager/interfaces/properties/operators.js +4 -4
- package/lib/collection-manager/interfaces/radioGroup.js +1 -0
- package/lib/collection-manager/interfaces/richText.js +36 -0
- package/lib/collection-manager/interfaces/select.js +1 -0
- package/lib/collection-manager/interfaces/textarea.js +36 -0
- package/lib/collection-manager/interfaces/time.js +1 -0
- package/lib/file-manager/FileStorageShortcut.js +1 -1
- package/lib/locale/en_US.d.ts +8 -2
- package/lib/locale/en_US.js +9 -3
- package/lib/locale/zh_CN.d.ts +28 -2
- package/lib/locale/zh_CN.js +29 -3
- package/lib/plugin-manager/PluginManager.d.ts +1 -0
- package/lib/plugin-manager/PluginManager.js +23 -5
- package/lib/schema-component/antd/action/Action.Modal.js +1 -1
- package/lib/schema-component/antd/calendar/Calendar.Designer.js +16 -10
- package/lib/schema-component/antd/date-picker/DatePicker.d.ts +1 -1
- package/lib/schema-component/antd/date-picker/DatePicker.js +2 -2
- package/lib/schema-component/antd/date-picker/ReadPretty.js +6 -6
- package/lib/schema-component/antd/date-picker/util.d.ts +0 -10
- package/lib/schema-component/antd/date-picker/util.js +6 -89
- package/lib/schema-component/antd/form-item/FormItem.js +196 -12
- package/lib/schema-component/antd/grid/Grid.js +69 -3
- package/lib/schema-component/antd/input-number/InputNumber.d.ts +1 -5
- package/lib/schema-component/antd/input-number/InputNumber.js +28 -1
- package/lib/schema-component/antd/input-number/ReadPretty.js +2 -5
- package/lib/schema-component/antd/kanban/Kanban.Card.Designer.js +20 -14
- package/lib/schema-component/antd/menu/Menu.js +6 -3
- package/lib/schema-component/antd/percent/Percent.js +2 -2
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +27 -12
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +4 -2
- package/lib/schema-component/antd/table/Table.Array.js +2 -2
- package/lib/schema-component/antd/table/Table.Void.js +11 -1
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +3 -1
- package/lib/schema-component/antd/table-v2/Table.d.ts +0 -11
- package/lib/schema-component/antd/table-v2/Table.js +172 -94
- package/lib/schema-component/antd/table-v2/TableField.js +3 -0
- package/lib/schema-component/antd/tabs/Tabs.Designer.js +23 -12
- package/lib/schema-component/antd/tabs/Tabs.js +8 -1
- package/lib/schema-component/antd/time-picker/ReadPretty.js +10 -3
- package/lib/schema-component/core/DesignableSwitch.js +8 -1
- package/lib/schema-component/hooks/useDesignable.js +21 -21
- package/lib/schema-component/hooks/useProps.js +1 -1
- package/lib/schema-initializer/buttons/FormItemInitializers.js +14 -2
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +8 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormItemInitializers.js +14 -2
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +34 -4
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +11 -3
- package/lib/schema-initializer/buttons/TableActionInitializers.js +11 -0
- package/lib/schema-initializer/components/assigned-field/AssignedField.d.ts +4 -0
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +257 -66
- package/lib/schema-initializer/items/index.d.ts +2 -0
- package/lib/schema-initializer/items/index.js +54 -2
- package/lib/schema-initializer/utils.js +22 -2
- package/lib/schema-settings/SchemaSettings.js +7 -0
- package/lib/system-settings/SystemSettingsShortcut.js +37 -13
- package/package.json +7 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.Application = void 0;
|
|
6
|
+
exports.getCurrentTimezone = exports.Application = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -79,6 +79,14 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
79
79
|
|
|
80
80
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
81
81
|
|
|
82
|
+
var getCurrentTimezone = function getCurrentTimezone() {
|
|
83
|
+
var timezoneOffset = new Date().getTimezoneOffset() / -60;
|
|
84
|
+
var timezone = String(timezoneOffset).padStart(2, '0') + ':00';
|
|
85
|
+
return (timezoneOffset > 0 ? '+' : '-') + timezone;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.getCurrentTimezone = getCurrentTimezone;
|
|
89
|
+
|
|
82
90
|
var Application = /*#__PURE__*/function () {
|
|
83
91
|
function Application(options) {
|
|
84
92
|
var _window, _window$location;
|
|
@@ -93,7 +101,8 @@ var Application = /*#__PURE__*/function () {
|
|
|
93
101
|
this.apiClient = new _apiClient.APIClient(_objectSpread({
|
|
94
102
|
baseURL: process.env.API_BASE_URL,
|
|
95
103
|
headers: {
|
|
96
|
-
'X-Hostname': (_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname
|
|
104
|
+
'X-Hostname': (_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.hostname,
|
|
105
|
+
'X-Timezone': getCurrentTimezone()
|
|
97
106
|
}
|
|
98
107
|
}, options.apiClient));
|
|
99
108
|
this.i18n = options.i18n || _i18n.i18n;
|
|
@@ -15,6 +15,8 @@ var _antd = require("antd");
|
|
|
15
15
|
|
|
16
16
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
+
var _recordProvider = require("../record-provider");
|
|
19
|
+
|
|
18
20
|
var _BlockProvider = require("./BlockProvider");
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -31,6 +33,8 @@ var FormBlockContext = /*#__PURE__*/(0, _react2.createContext)({});
|
|
|
31
33
|
exports.FormBlockContext = FormBlockContext;
|
|
32
34
|
|
|
33
35
|
var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
|
|
36
|
+
var _service$data;
|
|
37
|
+
|
|
34
38
|
var action = props.action,
|
|
35
39
|
readPretty = props.readPretty;
|
|
36
40
|
var field = (0, _react.useField)();
|
|
@@ -44,6 +48,8 @@ var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
|
|
|
44
48
|
resource = _useBlockRequestConte.resource,
|
|
45
49
|
service = _useBlockRequestConte.service;
|
|
46
50
|
|
|
51
|
+
var formBlockRef = (0, _react2.useRef)();
|
|
52
|
+
|
|
47
53
|
if (service.loading) {
|
|
48
54
|
return /*#__PURE__*/_react2.default.createElement(_antd.Spin, null);
|
|
49
55
|
}
|
|
@@ -55,9 +61,16 @@ var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
|
|
|
55
61
|
field: field,
|
|
56
62
|
service: service,
|
|
57
63
|
resource: resource,
|
|
58
|
-
updateAssociationValues: []
|
|
64
|
+
updateAssociationValues: [],
|
|
65
|
+
formBlockRef: formBlockRef
|
|
59
66
|
}
|
|
60
|
-
},
|
|
67
|
+
}, readPretty ? /*#__PURE__*/_react2.default.createElement(_recordProvider.RecordProvider, {
|
|
68
|
+
record: service === null || service === void 0 ? void 0 : (_service$data = service.data) === null || _service$data === void 0 ? void 0 : _service$data.data
|
|
69
|
+
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
70
|
+
ref: formBlockRef
|
|
71
|
+
}, props.children)) : /*#__PURE__*/_react2.default.createElement("div", {
|
|
72
|
+
ref: formBlockRef
|
|
73
|
+
}, props.children));
|
|
61
74
|
};
|
|
62
75
|
|
|
63
76
|
var FormBlockProvider = function FormBlockProvider(props) {
|
|
@@ -49,6 +49,7 @@ var InternalTableFieldProvider = function InternalTableFieldProvider(props) {
|
|
|
49
49
|
dragSort = props.dragSort,
|
|
50
50
|
fieldName = props.fieldName;
|
|
51
51
|
var field = (0, _react.useField)();
|
|
52
|
+
var fieldSchema = (0, _react.useFieldSchema)();
|
|
52
53
|
|
|
53
54
|
var _useBlockRequestConte = (0, _BlockProvider.useBlockRequestContext)(),
|
|
54
55
|
resource = _useBlockRequestConte.resource,
|
|
@@ -70,6 +71,7 @@ var InternalTableFieldProvider = function InternalTableFieldProvider(props) {
|
|
|
70
71
|
return /*#__PURE__*/_react2.default.createElement(TableFieldContext.Provider, {
|
|
71
72
|
value: {
|
|
72
73
|
field: field,
|
|
74
|
+
fieldSchema: fieldSchema,
|
|
73
75
|
service: service,
|
|
74
76
|
resource: resource,
|
|
75
77
|
params: params,
|
|
@@ -306,7 +308,7 @@ var useTableFieldContext = function useTableFieldContext() {
|
|
|
306
308
|
exports.useTableFieldContext = useTableFieldContext;
|
|
307
309
|
|
|
308
310
|
var useTableFieldProps = function useTableFieldProps() {
|
|
309
|
-
var _ctx$service3, _ctx$service4;
|
|
311
|
+
var _ctx$service3, _ctx$service4, _ctx$fieldSchema, _ctx$fieldSchema$pare;
|
|
310
312
|
|
|
311
313
|
var field = (0, _react.useField)();
|
|
312
314
|
var ctx = useTableFieldContext();
|
|
@@ -327,6 +329,7 @@ var useTableFieldProps = function useTableFieldProps() {
|
|
|
327
329
|
showIndex: ctx.showIndex,
|
|
328
330
|
dragSort: ctx.dragSort,
|
|
329
331
|
pagination: false,
|
|
332
|
+
required: ctx === null || ctx === void 0 ? void 0 : (_ctx$fieldSchema = ctx.fieldSchema) === null || _ctx$fieldSchema === void 0 ? void 0 : (_ctx$fieldSchema$pare = _ctx$fieldSchema.parent) === null || _ctx$fieldSchema$pare === void 0 ? void 0 : _ctx$fieldSchema$pare.required,
|
|
330
333
|
rowKey: function rowKey(record) {
|
|
331
334
|
var _field$value, _field$value$indexOf;
|
|
332
335
|
|
|
@@ -82,7 +82,8 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
|
|
|
82
82
|
var ctx = (0, _FormBlockProvider.useFormBlockContext)();
|
|
83
83
|
|
|
84
84
|
var _useCollectionManager2 = (0, _collectionManager.useCollectionManager)(),
|
|
85
|
-
getCollectionJoinField = _useCollectionManager2.getCollectionJoinField
|
|
85
|
+
getCollectionJoinField = _useCollectionManager2.getCollectionJoinField,
|
|
86
|
+
getCollectionFields = _useCollectionManager2.getCollectionFields;
|
|
86
87
|
|
|
87
88
|
var record = (0, _recordProvider.useRecord)();
|
|
88
89
|
var collectionFieldSchema = recursiveParent(fieldSchema, 'CollectionField'); // const value = ctx.form.query(collectionFieldSchema?.name).value();
|
|
@@ -98,22 +99,49 @@ var TableSelectorProvider = function TableSelectorProvider(props) {
|
|
|
98
99
|
params['sort'] = ['sort'];
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
if (
|
|
102
|
+
if (!Object.keys(params).includes('appends')) {
|
|
102
103
|
params['appends'] = appends;
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
if (collectionField) {
|
|
106
107
|
if (['oho', 'o2m'].includes(collectionField.interface)) {
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
if (record === null || record === void 0 ? void 0 : record[collectionField.sourceKey]) {
|
|
109
|
+
params['filter'] = {
|
|
110
|
+
$or: [_defineProperty({}, collectionField.foreignKey, {
|
|
111
|
+
$is: null
|
|
112
|
+
}), _defineProperty({}, collectionField.foreignKey, {
|
|
113
|
+
$eq: record === null || record === void 0 ? void 0 : record[collectionField.sourceKey]
|
|
114
|
+
})]
|
|
115
|
+
};
|
|
116
|
+
} else {
|
|
117
|
+
params['filter'] = _defineProperty({}, collectionField.foreignKey, {
|
|
109
118
|
$is: null
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
})]
|
|
113
|
-
};
|
|
119
|
+
});
|
|
120
|
+
}
|
|
114
121
|
}
|
|
115
122
|
|
|
116
|
-
if (['obo'].includes(collectionField.interface)) {
|
|
123
|
+
if (['obo'].includes(collectionField.interface)) {
|
|
124
|
+
var fields = getCollectionFields(collectionField.target);
|
|
125
|
+
var targetField = fields.find(function (f) {
|
|
126
|
+
return f.foreignKey && f.foreignKey === collectionField.foreignKey;
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
if (targetField) {
|
|
130
|
+
if (record === null || record === void 0 ? void 0 : record[collectionField.foreignKey]) {
|
|
131
|
+
params['filter'] = {
|
|
132
|
+
$or: [_defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
|
|
133
|
+
$is: null
|
|
134
|
+
}), _defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
|
|
135
|
+
$eq: record === null || record === void 0 ? void 0 : record[collectionField.foreignKey]
|
|
136
|
+
})]
|
|
137
|
+
};
|
|
138
|
+
} else {
|
|
139
|
+
params['filter'] = _defineProperty({}, "".concat(targetField.name, ".").concat(targetField.foreignKey), {
|
|
140
|
+
$is: null
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
117
145
|
}
|
|
118
146
|
|
|
119
147
|
return /*#__PURE__*/_react2.default.createElement(_BlockProvider.BlockProvider, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -166,14 +194,14 @@ var useTableSelectorProps = function useTableSelectorProps() {
|
|
|
166
194
|
ctx.field.data = (ctx === null || ctx === void 0 ? void 0 : (_ctx$field2 = ctx.field) === null || _ctx$field2 === void 0 ? void 0 : _ctx$field2.data) || {};
|
|
167
195
|
ctx.field.data.selectedRowKeys = selectedRowKeys;
|
|
168
196
|
},
|
|
169
|
-
onRowDragEnd: function onRowDragEnd(
|
|
197
|
+
onRowDragEnd: function onRowDragEnd(_ref5) {
|
|
170
198
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
171
199
|
var from, to;
|
|
172
200
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
173
201
|
while (1) {
|
|
174
202
|
switch (_context.prev = _context.next) {
|
|
175
203
|
case 0:
|
|
176
|
-
from =
|
|
204
|
+
from = _ref5.from, to = _ref5.to;
|
|
177
205
|
_context.next = 3;
|
|
178
206
|
return ctx.resource.move({
|
|
179
207
|
sourceId: from[ctx.rowKey || 'id'],
|
|
@@ -191,11 +219,11 @@ var useTableSelectorProps = function useTableSelectorProps() {
|
|
|
191
219
|
}, _callee);
|
|
192
220
|
}))();
|
|
193
221
|
},
|
|
194
|
-
onChange: function onChange(
|
|
222
|
+
onChange: function onChange(_ref6) {
|
|
195
223
|
var _ctx$service$params;
|
|
196
224
|
|
|
197
|
-
var current =
|
|
198
|
-
pageSize =
|
|
225
|
+
var current = _ref6.current,
|
|
226
|
+
pageSize = _ref6.pageSize;
|
|
199
227
|
ctx.service.run(_objectSpread(_objectSpread({}, (_ctx$service$params = ctx.service.params) === null || _ctx$service$params === void 0 ? void 0 : _ctx$service$params[0]), {}, {
|
|
200
228
|
page: current,
|
|
201
229
|
pageSize: pageSize
|
|
@@ -16,9 +16,15 @@ export declare const useUpdateActionProps: () => {
|
|
|
16
16
|
export declare const useDestroyActionProps: () => {
|
|
17
17
|
onClick(): Promise<void>;
|
|
18
18
|
};
|
|
19
|
+
export declare const useDetailPrintActionProps: () => {
|
|
20
|
+
onClick(): Promise<void>;
|
|
21
|
+
};
|
|
19
22
|
export declare const useBulkDestroyActionProps: () => {
|
|
20
23
|
onClick(): Promise<void>;
|
|
21
24
|
};
|
|
25
|
+
export declare const useRefreshActionProps: () => {
|
|
26
|
+
onClick(): Promise<void>;
|
|
27
|
+
};
|
|
22
28
|
export declare const useDetailsPaginationProps: () => {
|
|
23
29
|
simple: boolean;
|
|
24
30
|
hidden: boolean;
|