@nocobase/plugin-graph-collection-manager 0.11.1-alpha.5 → 0.12.0-alpha.2
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/client.d.ts +2 -3
- package/client.js +1 -1
- package/dist/client/index.js +65917 -0
- package/{lib → dist}/client/utils.d.ts +4 -3
- package/{lib → dist}/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/locale/en-US.js +19 -0
- package/dist/locale/es-ES.js +19 -0
- package/dist/locale/fr-FR.js +19 -0
- package/dist/locale/ja-JP.js +17 -0
- package/dist/locale/pt-BR.js +19 -0
- package/dist/locale/zh-CN.js +20 -0
- package/dist/server/collections/graphPositions.js +26 -0
- package/dist/server/index.js +23 -0
- package/package.json +17 -28
- package/server.d.ts +2 -3
- package/server.js +1 -1
- package/lib/client/GraphCollectionProvider.js +0 -51
- package/lib/client/GraphCollectionShortcut.js +0 -169
- package/lib/client/GraphDrawPage.js +0 -1546
- package/lib/client/action-hooks.js +0 -318
- package/lib/client/components/AddCollectionAction.js +0 -58
- package/lib/client/components/AddFieldAction.js +0 -69
- package/lib/client/components/CollectionNodeProvder.js +0 -34
- package/lib/client/components/EditCollectionAction.js +0 -47
- package/lib/client/components/EditFieldAction.js +0 -63
- package/lib/client/components/Entity.js +0 -529
- package/lib/client/components/FieldSummary.js +0 -69
- package/lib/client/components/OverrideFieldAction.js +0 -64
- package/lib/client/components/ViewFieldAction.js +0 -45
- package/lib/client/components/ViewNode.js +0 -33
- package/lib/client/index.js +0 -27
- package/lib/client/locale/index.js +0 -4
- package/lib/client/style.js +0 -233
- package/lib/client/utils.js +0 -540
- package/lib/index.js +0 -13
- package/lib/locale/en-US.js +0 -22
- package/lib/locale/es-ES.js +0 -22
- package/lib/locale/fr-FR.js +0 -22
- package/lib/locale/ja-JP.js +0 -20
- package/lib/locale/pt-BR.js +0 -22
- package/lib/locale/zh-CN.js +0 -23
- package/lib/server/collections/graphPositions.js +0 -30
- package/lib/server/index.js +0 -37
- package/src/client/GraphCollectionProvider.tsx +0 -33
- package/src/client/GraphCollectionShortcut.tsx +0 -141
- package/src/client/GraphDrawPage.tsx +0 -1382
- package/src/client/action-hooks.tsx +0 -237
- package/src/client/components/AddCollectionAction.tsx +0 -28
- package/src/client/components/AddFieldAction.tsx +0 -37
- package/src/client/components/CollectionNodeProvder.tsx +0 -28
- package/src/client/components/EditCollectionAction.tsx +0 -21
- package/src/client/components/EditFieldAction.tsx +0 -30
- package/src/client/components/Entity.tsx +0 -495
- package/src/client/components/FieldSummary.tsx +0 -42
- package/src/client/components/OverrideFieldAction.tsx +0 -30
- package/src/client/components/ViewFieldAction.tsx +0 -12
- package/src/client/components/ViewNode.tsx +0 -22
- package/src/client/index.tsx +0 -10
- package/src/client/locale/index.ts +0 -3
- package/src/client/style.tsx +0 -227
- package/src/client/utils.tsx +0 -548
- package/src/index.ts +0 -1
- package/src/locale/en-US.ts +0 -15
- package/src/locale/es-ES.ts +0 -15
- package/src/locale/fr-FR.ts +0 -15
- package/src/locale/ja-JP.ts +0 -13
- package/src/locale/pt-BR.ts +0 -15
- package/src/locale/zh-CN.ts +0 -16
- package/src/server/actions/.gitkeep +0 -0
- package/src/server/collections/.gitkeep +0 -0
- package/src/server/collections/graphPositions.ts +0 -22
- package/src/server/index.ts +0 -13
- package/src/server/models/.gitkeep +0 -0
- package/src/server/repositories/.gitkeep +0 -0
- /package/{lib → dist}/client/GraphCollectionProvider.d.ts +0 -0
- /package/{lib → dist}/client/GraphCollectionShortcut.d.ts +0 -0
- /package/{lib → dist}/client/GraphDrawPage.d.ts +0 -0
- /package/{lib → dist}/client/action-hooks.d.ts +0 -0
- /package/{lib → dist}/client/components/AddCollectionAction.d.ts +0 -0
- /package/{lib → dist}/client/components/AddFieldAction.d.ts +0 -0
- /package/{lib → dist}/client/components/CollectionNodeProvder.d.ts +0 -0
- /package/{lib → dist}/client/components/EditCollectionAction.d.ts +0 -0
- /package/{lib → dist}/client/components/EditFieldAction.d.ts +0 -0
- /package/{lib → dist}/client/components/Entity.d.ts +0 -0
- /package/{lib → dist}/client/components/FieldSummary.d.ts +0 -0
- /package/{lib → dist}/client/components/OverrideFieldAction.d.ts +0 -0
- /package/{lib → dist}/client/components/ViewFieldAction.d.ts +0 -0
- /package/{lib → dist}/client/components/ViewNode.d.ts +0 -0
- /package/{lib → dist}/client/index.d.ts +0 -0
- /package/{lib → dist}/client/locale/index.d.ts +0 -0
- /package/{lib → dist}/client/style.d.ts +0 -0
- /package/{lib → dist}/locale/en-US.d.ts +0 -0
- /package/{lib → dist}/locale/es-ES.d.ts +0 -0
- /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
- /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
- /package/{lib → dist}/locale/pt-BR.d.ts +0 -0
- /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
- /package/{lib → dist}/server/collections/graphPositions.d.ts +0 -0
- /package/{lib → dist}/server/index.d.ts +0 -0
|
@@ -1,529 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
function _icons() {
|
|
8
|
-
const data = require("@ant-design/icons");
|
|
9
|
-
_icons = function _icons() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
require("@antv/x6-react-shape");
|
|
15
|
-
function _shared() {
|
|
16
|
-
const data = require("@formily/shared");
|
|
17
|
-
_shared = function _shared() {
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
function _client() {
|
|
23
|
-
const data = require("@nocobase/client");
|
|
24
|
-
_client = function _client() {
|
|
25
|
-
return data;
|
|
26
|
-
};
|
|
27
|
-
return data;
|
|
28
|
-
}
|
|
29
|
-
function _client2() {
|
|
30
|
-
const data = require("@nocobase/utils/client");
|
|
31
|
-
_client2 = function _client2() {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
return data;
|
|
35
|
-
}
|
|
36
|
-
function _antd() {
|
|
37
|
-
const data = require("antd");
|
|
38
|
-
_antd = function _antd() {
|
|
39
|
-
return data;
|
|
40
|
-
};
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
function _react() {
|
|
44
|
-
const data = _interopRequireWildcard(require("react"));
|
|
45
|
-
_react = function _react() {
|
|
46
|
-
return data;
|
|
47
|
-
};
|
|
48
|
-
return data;
|
|
49
|
-
}
|
|
50
|
-
var _actionHooks = require("../action-hooks");
|
|
51
|
-
var _style = _interopRequireDefault(require("../style"));
|
|
52
|
-
var _utils = require("../utils");
|
|
53
|
-
var _AddFieldAction = require("./AddFieldAction");
|
|
54
|
-
var _CollectionNodeProvder = require("./CollectionNodeProvder");
|
|
55
|
-
var _EditCollectionAction = require("./EditCollectionAction");
|
|
56
|
-
var _EditFieldAction = require("./EditFieldAction");
|
|
57
|
-
var _FieldSummary = require("./FieldSummary");
|
|
58
|
-
var _OverrideFieldAction = require("./OverrideFieldAction");
|
|
59
|
-
var _ViewFieldAction = require("./ViewFieldAction");
|
|
60
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
61
|
-
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); }
|
|
62
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
63
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
64
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
65
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
66
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
67
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
68
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
69
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
70
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
71
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
72
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
73
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
74
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
75
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
76
|
-
const Entity = props => {
|
|
77
|
-
const _useStyles = (0, _style.default)(),
|
|
78
|
-
styles = _useStyles.styles;
|
|
79
|
-
const node = props.node,
|
|
80
|
-
setTargetNode = props.setTargetNode,
|
|
81
|
-
targetGraph = props.targetGraph;
|
|
82
|
-
const _node$store$data = node.store.data,
|
|
83
|
-
title = _node$store$data.title,
|
|
84
|
-
name = _node$store$data.name,
|
|
85
|
-
item = _node$store$data.item,
|
|
86
|
-
attrs = _node$store$data.attrs,
|
|
87
|
-
select = _node$store$data.select,
|
|
88
|
-
id = node.id;
|
|
89
|
-
const database = (0, _client().useCurrentAppInfo)();
|
|
90
|
-
const collectionData = (0, _react().useRef)();
|
|
91
|
-
const categoryData = (0, _react().useContext)(_client().CollectionCategroriesContext);
|
|
92
|
-
collectionData.current = _objectSpread(_objectSpread({}, item), {}, {
|
|
93
|
-
title,
|
|
94
|
-
inherits: item.inherits && new Proxy(item.inherits, {})
|
|
95
|
-
});
|
|
96
|
-
const category = item.category;
|
|
97
|
-
const compile = (0, _client().useCompile)();
|
|
98
|
-
const loadCollections = /*#__PURE__*/function () {
|
|
99
|
-
var _ref = _asyncToGenerator(function* (field) {
|
|
100
|
-
var _targetGraph$collecti;
|
|
101
|
-
return (_targetGraph$collecti = targetGraph.collections) === null || _targetGraph$collecti === void 0 ? void 0 : _targetGraph$collecti.map(collection => ({
|
|
102
|
-
label: compile(collection.title),
|
|
103
|
-
value: collection.name
|
|
104
|
-
}));
|
|
105
|
-
});
|
|
106
|
-
return function loadCollections(_x) {
|
|
107
|
-
return _ref.apply(this, arguments);
|
|
108
|
-
};
|
|
109
|
-
}();
|
|
110
|
-
const loadCategories = /*#__PURE__*/function () {
|
|
111
|
-
var _ref2 = _asyncToGenerator(function* () {
|
|
112
|
-
return categoryData === null || categoryData === void 0 ? void 0 : categoryData.data.map(item => ({
|
|
113
|
-
label: compile(item.name),
|
|
114
|
-
value: item.id
|
|
115
|
-
}));
|
|
116
|
-
});
|
|
117
|
-
return function loadCategories() {
|
|
118
|
-
return _ref2.apply(this, arguments);
|
|
119
|
-
};
|
|
120
|
-
}();
|
|
121
|
-
const portsProps = {
|
|
122
|
-
targetGraph,
|
|
123
|
-
collectionData,
|
|
124
|
-
setTargetNode,
|
|
125
|
-
node,
|
|
126
|
-
loadCollections
|
|
127
|
-
};
|
|
128
|
-
return _react().default.createElement("div", {
|
|
129
|
-
className: styles.entityContainer,
|
|
130
|
-
style: {
|
|
131
|
-
boxShadow: attrs === null || attrs === void 0 ? void 0 : attrs.boxShadow,
|
|
132
|
-
border: select ? '2px dashed #f5a20a' : 0
|
|
133
|
-
}
|
|
134
|
-
}, category.map((v, index) => {
|
|
135
|
-
return _react().default.createElement(_antd().Badge.Ribbon, {
|
|
136
|
-
key: index,
|
|
137
|
-
color: v.color,
|
|
138
|
-
style: {
|
|
139
|
-
width: '103%',
|
|
140
|
-
height: '3px',
|
|
141
|
-
marginTop: index * 5 - 8,
|
|
142
|
-
borderRadius: 0
|
|
143
|
-
},
|
|
144
|
-
placement: "start"
|
|
145
|
-
});
|
|
146
|
-
}), _react().default.createElement("div", {
|
|
147
|
-
className: styles.headClass,
|
|
148
|
-
style: {
|
|
149
|
-
background: attrs !== null && attrs !== void 0 && attrs.hightLight ? '#1890ff' : null,
|
|
150
|
-
paddingTop: category.length * 3
|
|
151
|
-
}
|
|
152
|
-
}, _react().default.createElement("span", {
|
|
153
|
-
className: styles.tableNameClass
|
|
154
|
-
}, compile(title)), _react().default.createElement("div", {
|
|
155
|
-
className: styles.tableBtnClass
|
|
156
|
-
}, _react().default.createElement(_client().SchemaComponentProvider, null, _react().default.createElement(_CollectionNodeProvder.CollectionNodeProvder, {
|
|
157
|
-
setTargetNode: setTargetNode,
|
|
158
|
-
node: node
|
|
159
|
-
}, _react().default.createElement(_client().CollectionProvider, {
|
|
160
|
-
collection: _client().collection
|
|
161
|
-
}, _react().default.createElement(_client().SchemaComponent, {
|
|
162
|
-
scope: {
|
|
163
|
-
useUpdateCollectionActionAndRefreshCM: _actionHooks.useUpdateCollectionActionAndRefreshCM,
|
|
164
|
-
useCancelAction: _actionHooks.useCancelAction,
|
|
165
|
-
loadCollections,
|
|
166
|
-
loadCategories,
|
|
167
|
-
useAsyncDataSource: _actionHooks.useAsyncDataSource,
|
|
168
|
-
Action: _client().Action,
|
|
169
|
-
DeleteOutlined: _icons().DeleteOutlined,
|
|
170
|
-
enableInherits: (database === null || database === void 0 ? void 0 : database.dialect) === 'postgres'
|
|
171
|
-
},
|
|
172
|
-
components: {
|
|
173
|
-
Action: _client().Action,
|
|
174
|
-
EditOutlined: _icons().EditOutlined,
|
|
175
|
-
FormItem: _client().FormItem,
|
|
176
|
-
CollectionField: _client().CollectionField,
|
|
177
|
-
Input: _client().Input,
|
|
178
|
-
Form: _client().Form,
|
|
179
|
-
Select: _client().Select,
|
|
180
|
-
EditCollectionAction: _EditCollectionAction.EditCollectionAction,
|
|
181
|
-
Checkbox: _client().Checkbox
|
|
182
|
-
},
|
|
183
|
-
schema: {
|
|
184
|
-
type: 'object',
|
|
185
|
-
properties: {
|
|
186
|
-
update: {
|
|
187
|
-
type: 'void',
|
|
188
|
-
title: '{{ t("Edit") }}',
|
|
189
|
-
'x-component': 'EditCollectionAction',
|
|
190
|
-
'x-component-props': {
|
|
191
|
-
type: 'primary',
|
|
192
|
-
item: collectionData.current,
|
|
193
|
-
className: 'btn-edit-in-head'
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
delete: {
|
|
197
|
-
type: 'void',
|
|
198
|
-
'x-action': 'destroy',
|
|
199
|
-
'x-component': 'Action',
|
|
200
|
-
'x-component-props': {
|
|
201
|
-
component: _icons().DeleteOutlined,
|
|
202
|
-
icon: 'DeleteOutlined',
|
|
203
|
-
className: 'btn-del',
|
|
204
|
-
confirm: {
|
|
205
|
-
title: "{{t('Delete record')}}",
|
|
206
|
-
getContainer: _utils.getPopupContainer,
|
|
207
|
-
collectionConten: "{{t('Are you sure you want to delete it?')}}"
|
|
208
|
-
},
|
|
209
|
-
useAction: () => (0, _actionHooks.useDestroyActionAndRefreshCM)({
|
|
210
|
-
name,
|
|
211
|
-
id
|
|
212
|
-
})
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
})))))), _react().default.createElement(PortsCom, _objectSpread({}, portsProps)));
|
|
218
|
-
};
|
|
219
|
-
const PortsCom = _react().default.memo(({
|
|
220
|
-
targetGraph,
|
|
221
|
-
collectionData,
|
|
222
|
-
setTargetNode,
|
|
223
|
-
node,
|
|
224
|
-
loadCollections
|
|
225
|
-
}) => {
|
|
226
|
-
var _portsData$initPorts, _portsData$morePorts;
|
|
227
|
-
const _node$store$data2 = node.store.data,
|
|
228
|
-
title = _node$store$data2.title,
|
|
229
|
-
name = _node$store$data2.name,
|
|
230
|
-
item = _node$store$data2.item,
|
|
231
|
-
ports = _node$store$data2.ports,
|
|
232
|
-
data = _node$store$data2.data,
|
|
233
|
-
sourcePort = _node$store$data2.sourcePort,
|
|
234
|
-
associated = _node$store$data2.associated,
|
|
235
|
-
targetPort = _node$store$data2.targetPort;
|
|
236
|
-
const _useState = (0, _react().useState)(false),
|
|
237
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
238
|
-
collapse = _useState2[0],
|
|
239
|
-
setCollapse = _useState2[1];
|
|
240
|
-
const _useGCMTranslation = (0, _utils.useGCMTranslation)(),
|
|
241
|
-
t = _useGCMTranslation.t;
|
|
242
|
-
const compile = (0, _client().useCompile)();
|
|
243
|
-
const database = (0, _client().useCurrentAppInfo)();
|
|
244
|
-
const portsData = _client2().lodash.groupBy(ports.items, v => {
|
|
245
|
-
if (v.isForeignKey || v.primaryKey || ['obo', 'oho', 'o2o', 'o2m', 'm2o', 'm2m', 'linkTo', 'id'].includes(v.interface)) {
|
|
246
|
-
return 'initPorts';
|
|
247
|
-
} else {
|
|
248
|
-
return 'morePorts';
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
const useNewId = prefix => {
|
|
252
|
-
return `${prefix || ''}${(0, _shared().uid)()}`;
|
|
253
|
-
};
|
|
254
|
-
const CollectionConten = data => {
|
|
255
|
-
const _useStyles2 = (0, _style.default)(),
|
|
256
|
-
styles = _useStyles2.styles;
|
|
257
|
-
const type = data.type,
|
|
258
|
-
name = data.name,
|
|
259
|
-
primaryKey = data.primaryKey,
|
|
260
|
-
allowNull = data.allowNull,
|
|
261
|
-
autoIncrement = data.autoIncrement;
|
|
262
|
-
return _react().default.createElement("div", {
|
|
263
|
-
className: styles.collectionPopoverClass
|
|
264
|
-
}, _react().default.createElement("div", {
|
|
265
|
-
className: "field-content"
|
|
266
|
-
}, _react().default.createElement("div", null, _react().default.createElement("span", null, "name"), ": ", _react().default.createElement("span", {
|
|
267
|
-
className: "field-type"
|
|
268
|
-
}, name)), _react().default.createElement("div", null, _react().default.createElement("span", null, "type"), ": ", _react().default.createElement("span", {
|
|
269
|
-
className: "field-type"
|
|
270
|
-
}, type))), _react().default.createElement("p", null, primaryKey && _react().default.createElement(_antd().Tag, {
|
|
271
|
-
color: "green"
|
|
272
|
-
}, "PRIMARY"), allowNull && _react().default.createElement(_antd().Tag, {
|
|
273
|
-
color: "geekblue"
|
|
274
|
-
}, "ALLOWNULL"), autoIncrement && _react().default.createElement(_antd().Tag, {
|
|
275
|
-
color: "purple"
|
|
276
|
-
}, "AUTOINCREMENT")));
|
|
277
|
-
};
|
|
278
|
-
const typeColor = v => {
|
|
279
|
-
if (v.isForeignKey || v.primaryKey || v.interface === 'id') {
|
|
280
|
-
return 'red';
|
|
281
|
-
} else if (['obo', 'oho', 'o2o', 'o2m', 'm2o', 'm2m', 'linkTo'].includes(v.interface)) {
|
|
282
|
-
return 'orange';
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
const OperationButton = ({
|
|
286
|
-
property
|
|
287
|
-
}) => {
|
|
288
|
-
const isInheritField = !(property.collectionName !== name);
|
|
289
|
-
return _react().default.createElement("div", {
|
|
290
|
-
className: "field-operator"
|
|
291
|
-
}, _react().default.createElement(_client().SchemaComponentProvider, {
|
|
292
|
-
components: {
|
|
293
|
-
FormItem: _client().FormItem,
|
|
294
|
-
CollectionField: _client().CollectionField,
|
|
295
|
-
Input: _client().Input,
|
|
296
|
-
Form: _client().Form,
|
|
297
|
-
ResourceActionProvider: _client().ResourceActionProvider,
|
|
298
|
-
Select: props => _react().default.createElement(_client().Select, _objectSpread(_objectSpread({
|
|
299
|
-
popupMatchSelectWidth: false
|
|
300
|
-
}, props), {}, {
|
|
301
|
-
getPopupContainer: _utils.getPopupContainer
|
|
302
|
-
})),
|
|
303
|
-
Checkbox: _client().Checkbox,
|
|
304
|
-
Radio: _client().Radio,
|
|
305
|
-
InputNumber: _client().InputNumber,
|
|
306
|
-
Grid: _client().Grid,
|
|
307
|
-
FieldSummary: _FieldSummary.FieldSummary,
|
|
308
|
-
Action: _client().Action,
|
|
309
|
-
EditOutlined: _icons().EditOutlined,
|
|
310
|
-
DeleteOutlined: _icons().DeleteOutlined,
|
|
311
|
-
AddFieldAction: _AddFieldAction.AddFieldAction,
|
|
312
|
-
OverrideFieldAction: _OverrideFieldAction.OverrideFieldAction,
|
|
313
|
-
ViewFieldAction: _ViewFieldAction.ViewFieldAction,
|
|
314
|
-
Dropdown: _antd().Dropdown,
|
|
315
|
-
Formula: _client().Formula
|
|
316
|
-
},
|
|
317
|
-
scope: {
|
|
318
|
-
useAsyncDataSource: _actionHooks.useAsyncDataSource,
|
|
319
|
-
loadCollections,
|
|
320
|
-
useCancelAction: _actionHooks.useCancelAction,
|
|
321
|
-
useNewId,
|
|
322
|
-
useCurrentFields,
|
|
323
|
-
useValuesFromRecord: _actionHooks.useValuesFromRecord,
|
|
324
|
-
useUpdateCollectionActionAndRefreshCM: _actionHooks.useUpdateCollectionActionAndRefreshCM,
|
|
325
|
-
isInheritField
|
|
326
|
-
}
|
|
327
|
-
}, _react().default.createElement(_CollectionNodeProvder.CollectionNodeProvder, {
|
|
328
|
-
record: collectionData.current,
|
|
329
|
-
setTargetNode: setTargetNode,
|
|
330
|
-
node: node,
|
|
331
|
-
handelOpenPorts: () => _handelOpenPorts(true)
|
|
332
|
-
}, _react().default.createElement(_client().SchemaComponent, {
|
|
333
|
-
scope: _actionHooks.useCancelAction,
|
|
334
|
-
schema: {
|
|
335
|
-
type: 'object',
|
|
336
|
-
properties: {
|
|
337
|
-
create: {
|
|
338
|
-
type: 'void',
|
|
339
|
-
'x-action': 'create',
|
|
340
|
-
'x-component': 'AddFieldAction',
|
|
341
|
-
'x-visible': '{{isInheritField}}',
|
|
342
|
-
'x-component-props': {
|
|
343
|
-
item: _objectSpread(_objectSpread({}, property), {}, {
|
|
344
|
-
title
|
|
345
|
-
}),
|
|
346
|
-
database
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
update: {
|
|
350
|
-
type: 'void',
|
|
351
|
-
'x-action': 'update',
|
|
352
|
-
'x-component': _EditFieldAction.EditFieldAction,
|
|
353
|
-
'x-visible': '{{isInheritField}}',
|
|
354
|
-
'x-component-props': {
|
|
355
|
-
item: _objectSpread(_objectSpread({}, property), {}, {
|
|
356
|
-
title,
|
|
357
|
-
__parent: collectionData.current
|
|
358
|
-
})
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
delete: {
|
|
362
|
-
type: 'void',
|
|
363
|
-
'x-action': 'destroy',
|
|
364
|
-
'x-component': 'Action',
|
|
365
|
-
'x-visible': '{{isInheritField}}',
|
|
366
|
-
'x-component-props': {
|
|
367
|
-
component: _icons().DeleteOutlined,
|
|
368
|
-
icon: 'DeleteOutlined',
|
|
369
|
-
className: 'btn-del',
|
|
370
|
-
confirm: {
|
|
371
|
-
title: "{{t('Delete record')}}",
|
|
372
|
-
getContainer: _utils.getPopupContainer,
|
|
373
|
-
collectionConten: "{{t('Are you sure you want to delete it?')}}"
|
|
374
|
-
},
|
|
375
|
-
useAction: () => (0, _actionHooks.useDestroyFieldActionAndRefreshCM)({
|
|
376
|
-
collectionName: property.collectionName,
|
|
377
|
-
name: property.name
|
|
378
|
-
})
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
override: {
|
|
382
|
-
type: 'void',
|
|
383
|
-
'x-action': 'create',
|
|
384
|
-
'x-visible': '{{!isInheritField}}',
|
|
385
|
-
'x-component': 'OverrideFieldAction',
|
|
386
|
-
'x-component-props': {
|
|
387
|
-
icon: 'ReconciliationOutlined',
|
|
388
|
-
item: _objectSpread(_objectSpread({}, property), {}, {
|
|
389
|
-
title,
|
|
390
|
-
__parent: collectionData.current,
|
|
391
|
-
targetCollection: name
|
|
392
|
-
})
|
|
393
|
-
}
|
|
394
|
-
},
|
|
395
|
-
view: {
|
|
396
|
-
type: 'void',
|
|
397
|
-
'x-action': 'view',
|
|
398
|
-
'x-visible': '{{!isInheritField}}',
|
|
399
|
-
'x-component': 'ViewFieldAction',
|
|
400
|
-
'x-component-props': {
|
|
401
|
-
icon: 'ReconciliationOutlined',
|
|
402
|
-
item: _objectSpread(_objectSpread({}, property), {}, {
|
|
403
|
-
title,
|
|
404
|
-
__parent: collectionData.current
|
|
405
|
-
})
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}))));
|
|
411
|
-
};
|
|
412
|
-
const _useCollectionManager = (0, _client().useCollectionManager)(),
|
|
413
|
-
getInterface = _useCollectionManager.getInterface;
|
|
414
|
-
// 获取当前字段列表
|
|
415
|
-
const useCurrentFields = () => {
|
|
416
|
-
const record = (0, _client().useRecord)();
|
|
417
|
-
const _useCollectionManager2 = (0, _client().useCollectionManager)(),
|
|
418
|
-
getCollectionFields = _useCollectionManager2.getCollectionFields;
|
|
419
|
-
const fields = getCollectionFields(record.collectionName || record.name);
|
|
420
|
-
return fields;
|
|
421
|
-
};
|
|
422
|
-
const _handelOpenPorts = isCollapse => {
|
|
423
|
-
var _targetGraph$getCellB;
|
|
424
|
-
(_targetGraph$getCellB = targetGraph.getCellById(item.name)) === null || _targetGraph$getCellB === void 0 ? void 0 : _targetGraph$getCellB.toFront();
|
|
425
|
-
setCollapse(isCollapse);
|
|
426
|
-
const collapseNodes = targetGraph.collapseNodes || [];
|
|
427
|
-
collapseNodes.push({
|
|
428
|
-
[item.name]: isCollapse
|
|
429
|
-
});
|
|
430
|
-
targetGraph.collapseNodes = collapseNodes;
|
|
431
|
-
targetGraph.getCellById(item.name).setData({
|
|
432
|
-
collapse: true
|
|
433
|
-
});
|
|
434
|
-
};
|
|
435
|
-
const isCollapse = collapse && (data === null || data === void 0 ? void 0 : data.collapse);
|
|
436
|
-
return _react().default.createElement("div", {
|
|
437
|
-
className: "body"
|
|
438
|
-
}, (_portsData$initPorts = portsData['initPorts']) === null || _portsData$initPorts === void 0 ? void 0 : _portsData$initPorts.map(property => {
|
|
439
|
-
var _property$uiSchema, _getInterface, _property$uiSchema2, _getInterface2;
|
|
440
|
-
return property.uiSchema && _react().default.createElement(_antd().Popover, {
|
|
441
|
-
content: CollectionConten(property),
|
|
442
|
-
getPopupContainer: _utils.getPopupContainer,
|
|
443
|
-
mouseLeaveDelay: 0,
|
|
444
|
-
zIndex: 100,
|
|
445
|
-
title: _react().default.createElement("div", null, compile((_property$uiSchema = property.uiSchema) === null || _property$uiSchema === void 0 ? void 0 : _property$uiSchema.title), _react().default.createElement("span", {
|
|
446
|
-
style: {
|
|
447
|
-
color: '#ffa940',
|
|
448
|
-
float: 'right'
|
|
449
|
-
}
|
|
450
|
-
}, compile((_getInterface = getInterface(property.interface)) === null || _getInterface === void 0 ? void 0 : _getInterface.title))),
|
|
451
|
-
key: property.id,
|
|
452
|
-
placement: "right"
|
|
453
|
-
}, _react().default.createElement("div", {
|
|
454
|
-
className: "body-item",
|
|
455
|
-
key: property.id,
|
|
456
|
-
id: property.id,
|
|
457
|
-
style: {
|
|
458
|
-
background: targetPort || sourcePort === property.id || associated !== null && associated !== void 0 && associated.includes(property.name) ? '#e6f7ff' : null
|
|
459
|
-
}
|
|
460
|
-
}, _react().default.createElement("div", {
|
|
461
|
-
className: "name"
|
|
462
|
-
}, _react().default.createElement(_antd().Badge, {
|
|
463
|
-
color: typeColor(property)
|
|
464
|
-
}), compile((_property$uiSchema2 = property.uiSchema) === null || _property$uiSchema2 === void 0 ? void 0 : _property$uiSchema2.title)), _react().default.createElement("div", {
|
|
465
|
-
className: `type field_type`
|
|
466
|
-
}, compile((_getInterface2 = getInterface(property.interface)) === null || _getInterface2 === void 0 ? void 0 : _getInterface2.title)), _react().default.createElement(OperationButton, {
|
|
467
|
-
property: property
|
|
468
|
-
})));
|
|
469
|
-
}), _react().default.createElement("div", {
|
|
470
|
-
className: "morePorts"
|
|
471
|
-
}, isCollapse && ((_portsData$morePorts = portsData['morePorts']) === null || _portsData$morePorts === void 0 ? void 0 : _portsData$morePorts.map(property => {
|
|
472
|
-
var _property$uiSchema3, _getInterface3, _property$uiSchema4, _getInterface4;
|
|
473
|
-
return property.uiSchema && _react().default.createElement(_antd().Popover, {
|
|
474
|
-
content: CollectionConten(property),
|
|
475
|
-
getPopupContainer: _utils.getPopupContainer,
|
|
476
|
-
mouseLeaveDelay: 0,
|
|
477
|
-
zIndex: 100,
|
|
478
|
-
title: _react().default.createElement("div", null, compile((_property$uiSchema3 = property.uiSchema) === null || _property$uiSchema3 === void 0 ? void 0 : _property$uiSchema3.title), _react().default.createElement("span", {
|
|
479
|
-
style: {
|
|
480
|
-
color: '#ffa940',
|
|
481
|
-
float: 'right'
|
|
482
|
-
}
|
|
483
|
-
}, compile((_getInterface3 = getInterface(property.interface)) === null || _getInterface3 === void 0 ? void 0 : _getInterface3.title))),
|
|
484
|
-
key: property.id,
|
|
485
|
-
placement: "right"
|
|
486
|
-
}, _react().default.createElement("div", {
|
|
487
|
-
className: "body-item",
|
|
488
|
-
key: property.id,
|
|
489
|
-
id: property.id,
|
|
490
|
-
style: {
|
|
491
|
-
background: targetPort || sourcePort === property.id || associated !== null && associated !== void 0 && associated.includes(property.name) ? '#e6f7ff' : null
|
|
492
|
-
}
|
|
493
|
-
}, _react().default.createElement("div", {
|
|
494
|
-
className: "name"
|
|
495
|
-
}, _react().default.createElement(_antd().Badge, {
|
|
496
|
-
color: "green"
|
|
497
|
-
}), compile((_property$uiSchema4 = property.uiSchema) === null || _property$uiSchema4 === void 0 ? void 0 : _property$uiSchema4.title)), _react().default.createElement("div", {
|
|
498
|
-
className: `type field_type`
|
|
499
|
-
}, compile((_getInterface4 = getInterface(property.interface)) === null || _getInterface4 === void 0 ? void 0 : _getInterface4.title)), _react().default.createElement(OperationButton, {
|
|
500
|
-
property: property
|
|
501
|
-
})));
|
|
502
|
-
}))), _react().default.createElement("a", {
|
|
503
|
-
className: (0, _client().css)`
|
|
504
|
-
display: block;
|
|
505
|
-
color: #958f8f;
|
|
506
|
-
padding: 10px 5px;
|
|
507
|
-
&:hover {
|
|
508
|
-
color: rgb(99 90 88);
|
|
509
|
-
}
|
|
510
|
-
`,
|
|
511
|
-
onClick: () => _handelOpenPorts(!isCollapse)
|
|
512
|
-
}, isCollapse ? [_react().default.createElement(_icons().UpOutlined, {
|
|
513
|
-
style: {
|
|
514
|
-
margin: '0px 8px 0px 5px'
|
|
515
|
-
},
|
|
516
|
-
key: "icon"
|
|
517
|
-
}), _react().default.createElement("span", {
|
|
518
|
-
key: "associate"
|
|
519
|
-
}, t('Association Fields'))] : [_react().default.createElement(_icons().DownOutlined, {
|
|
520
|
-
style: {
|
|
521
|
-
margin: '0px 8px 0px 5px'
|
|
522
|
-
},
|
|
523
|
-
key: "icon"
|
|
524
|
-
}), _react().default.createElement("span", {
|
|
525
|
-
key: "all"
|
|
526
|
-
}, t('All Fields'))]));
|
|
527
|
-
});
|
|
528
|
-
var _default = Entity;
|
|
529
|
-
exports.default = _default;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.FieldSummary = void 0;
|
|
7
|
-
function _react() {
|
|
8
|
-
const data = require("@formily/react");
|
|
9
|
-
_react = function _react() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _client() {
|
|
15
|
-
const data = require("@nocobase/client");
|
|
16
|
-
_client = function _client() {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
return data;
|
|
20
|
-
}
|
|
21
|
-
function _antd() {
|
|
22
|
-
const data = require("antd");
|
|
23
|
-
_antd = function _antd() {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
function _react2() {
|
|
29
|
-
const data = _interopRequireDefault(require("react"));
|
|
30
|
-
_react2 = function _react2() {
|
|
31
|
-
return data;
|
|
32
|
-
};
|
|
33
|
-
return data;
|
|
34
|
-
}
|
|
35
|
-
function _reactI18next() {
|
|
36
|
-
const data = require("react-i18next");
|
|
37
|
-
_reactI18next = function _reactI18next() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
43
|
-
const FieldSummary = (0, _react().observer)(props => {
|
|
44
|
-
const schemaKey = props.schemaKey;
|
|
45
|
-
const _useCollectionManager = (0, _client().useCollectionManager)(),
|
|
46
|
-
getInterface = _useCollectionManager.getInterface;
|
|
47
|
-
const compile = (0, _client().useCompile)();
|
|
48
|
-
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
49
|
-
t = _useTranslation.t;
|
|
50
|
-
const schema = getInterface(schemaKey);
|
|
51
|
-
if (!schema) return null;
|
|
52
|
-
return _react2().default.createElement("div", {
|
|
53
|
-
className: (0, _client().css)`
|
|
54
|
-
background: #f6f6f6;
|
|
55
|
-
margin-bottom: 24px;
|
|
56
|
-
padding: 16px;
|
|
57
|
-
`
|
|
58
|
-
}, _react2().default.createElement("div", {
|
|
59
|
-
className: (0, _client().css)``
|
|
60
|
-
}, t('Field interface'), ": ", _react2().default.createElement(_antd().Tag, null, compile(schema.title))), schema.description ? _react2().default.createElement("div", {
|
|
61
|
-
className: (0, _client().css)`
|
|
62
|
-
margin-top: 8px;
|
|
63
|
-
color: rgba(0, 0, 0, 0.45);
|
|
64
|
-
`
|
|
65
|
-
}, compile(schema.description)) : null);
|
|
66
|
-
}, {
|
|
67
|
-
displayName: 'FieldSummary'
|
|
68
|
-
});
|
|
69
|
-
exports.FieldSummary = FieldSummary;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.OverrideFieldAction = void 0;
|
|
7
|
-
function _icons() {
|
|
8
|
-
const data = require("@ant-design/icons");
|
|
9
|
-
_icons = function _icons() {
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
return data;
|
|
13
|
-
}
|
|
14
|
-
function _client() {
|
|
15
|
-
const data = require("@nocobase/client");
|
|
16
|
-
_client = function _client() {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
return data;
|
|
20
|
-
}
|
|
21
|
-
function _react() {
|
|
22
|
-
const data = _interopRequireDefault(require("react"));
|
|
23
|
-
_react = function _react() {
|
|
24
|
-
return data;
|
|
25
|
-
};
|
|
26
|
-
return data;
|
|
27
|
-
}
|
|
28
|
-
var _actionHooks = require("../action-hooks");
|
|
29
|
-
var _utils = require("../utils");
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
34
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
35
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
36
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
37
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
38
|
-
const _useOverridingCollectionField = record => {
|
|
39
|
-
const collectionName = record.targetCollection;
|
|
40
|
-
const _useCreateAction = (0, _actionHooks.useCreateAction)(collectionName),
|
|
41
|
-
run = _useCreateAction.run;
|
|
42
|
-
return {
|
|
43
|
-
run() {
|
|
44
|
-
return _asyncToGenerator(function* () {
|
|
45
|
-
yield run();
|
|
46
|
-
})();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
const OverrideFieldAction = ({
|
|
51
|
-
item: record
|
|
52
|
-
}) => {
|
|
53
|
-
return _react().default.createElement(_client().OverridingFieldAction, {
|
|
54
|
-
item: _objectSpread({}, record),
|
|
55
|
-
scope: {
|
|
56
|
-
useCancelAction: _actionHooks.useCancelAction,
|
|
57
|
-
useOverridingCollectionField: () => _useOverridingCollectionField(record)
|
|
58
|
-
},
|
|
59
|
-
getContainer: _utils.getPopupContainer
|
|
60
|
-
}, _react().default.createElement(_icons().CopyOutlined, {
|
|
61
|
-
className: "btn-override"
|
|
62
|
-
}));
|
|
63
|
-
};
|
|
64
|
-
exports.OverrideFieldAction = OverrideFieldAction;
|