@luck-design-biz/luckda 0.0.16-3 → 0.0.16-5
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.
|
@@ -371,9 +371,10 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
371
371
|
}
|
|
372
372
|
}))));
|
|
373
373
|
};
|
|
374
|
-
|
|
375
|
-
export default /*#__PURE__*/forwardRef(function (props, ref) {
|
|
374
|
+
var Com = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
376
375
|
return /*#__PURE__*/React.createElement(UploadGridForm, _extends({
|
|
377
376
|
wrapperRef: ref
|
|
378
377
|
}, props));
|
|
379
|
-
});
|
|
378
|
+
});
|
|
379
|
+
export default Com;
|
|
380
|
+
Com.displayName = 'GridForm';
|
package/es/upload/Form/index.js
CHANGED
|
@@ -15,10 +15,8 @@ function buildComponent(props) {
|
|
|
15
15
|
note = _props$note === void 0 ? '' : _props$note,
|
|
16
16
|
rest = _objectWithoutProperties(props, _excluded);
|
|
17
17
|
var formId = "annex_".concat(_formId);
|
|
18
|
-
var getUrl = function getUrl(behaviorKey, _note) {
|
|
19
|
-
var
|
|
20
|
-
mainFormLdId = rest.mainFormLdId,
|
|
21
|
-
ticketData = rest.ticketData;
|
|
18
|
+
var getUrl = function getUrl(behaviorKey, _note, docUid) {
|
|
19
|
+
var ticketData = rest.ticketData;
|
|
22
20
|
var params = omitBy({
|
|
23
21
|
moduleCode: moduleCode,
|
|
24
22
|
bucket: bucket,
|
|
@@ -26,7 +24,7 @@ function buildComponent(props) {
|
|
|
26
24
|
tag: formId,
|
|
27
25
|
note: _note || note,
|
|
28
26
|
active: !(behaviorKey === 'loadFileGrid' || rest.formMode === 'add' || rest.formMode === 'update'),
|
|
29
|
-
docUid:
|
|
27
|
+
docUid: docUid || ticketData && ticketData[window.appConfig.constraintKeys.PRIMARY]
|
|
30
28
|
}, isNil);
|
|
31
29
|
return "".concat(window.appConfig.OSS_HOST_V3, "?").concat(stringify(params));
|
|
32
30
|
};
|
|
@@ -36,8 +34,14 @@ function buildComponent(props) {
|
|
|
36
34
|
rowKey: "uid"
|
|
37
35
|
}, rest, {
|
|
38
36
|
onQuery: {
|
|
39
|
-
api: function api() {
|
|
40
|
-
|
|
37
|
+
api: function api(_ref) {
|
|
38
|
+
var docUid = _ref.docUid;
|
|
39
|
+
return request(getUrl('loadFileGrid', null, docUid));
|
|
40
|
+
},
|
|
41
|
+
get: function get(formData) {
|
|
42
|
+
return {
|
|
43
|
+
docUid: formData && formData[rest.mainFormLdId] && formData[rest.mainFormLdId][window.appConfig.constraintKeys.PRIMARY]
|
|
44
|
+
};
|
|
41
45
|
},
|
|
42
46
|
format: function format(data) {
|
|
43
47
|
return data.map(function (i) {
|
|
@@ -379,10 +379,11 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
379
379
|
}
|
|
380
380
|
}))));
|
|
381
381
|
};
|
|
382
|
-
|
|
383
|
-
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
382
|
+
var Com = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
384
383
|
return /*#__PURE__*/_react.default.createElement(UploadGridForm, (0, _extends2.default)({
|
|
385
384
|
wrapperRef: ref
|
|
386
385
|
}, props));
|
|
387
386
|
});
|
|
388
|
-
|
|
387
|
+
var _default = Com;
|
|
388
|
+
exports.default = _default;
|
|
389
|
+
Com.displayName = 'GridForm';
|
package/lib/upload/Form/index.js
CHANGED
|
@@ -22,10 +22,8 @@ function buildComponent(props) {
|
|
|
22
22
|
note = _props$note === void 0 ? '' : _props$note,
|
|
23
23
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
24
24
|
var formId = "annex_".concat(_formId);
|
|
25
|
-
var getUrl = function getUrl(behaviorKey, _note) {
|
|
26
|
-
var
|
|
27
|
-
mainFormLdId = rest.mainFormLdId,
|
|
28
|
-
ticketData = rest.ticketData;
|
|
25
|
+
var getUrl = function getUrl(behaviorKey, _note, docUid) {
|
|
26
|
+
var ticketData = rest.ticketData;
|
|
29
27
|
var params = (0, _lodash.omitBy)({
|
|
30
28
|
moduleCode: moduleCode,
|
|
31
29
|
bucket: bucket,
|
|
@@ -33,7 +31,7 @@ function buildComponent(props) {
|
|
|
33
31
|
tag: formId,
|
|
34
32
|
note: _note || note,
|
|
35
33
|
active: !(behaviorKey === 'loadFileGrid' || rest.formMode === 'add' || rest.formMode === 'update'),
|
|
36
|
-
docUid:
|
|
34
|
+
docUid: docUid || ticketData && ticketData[window.appConfig.constraintKeys.PRIMARY]
|
|
37
35
|
}, _lodash.isNil);
|
|
38
36
|
return "".concat(window.appConfig.OSS_HOST_V3, "?").concat((0, _querystring.stringify)(params));
|
|
39
37
|
};
|
|
@@ -43,8 +41,14 @@ function buildComponent(props) {
|
|
|
43
41
|
rowKey: "uid"
|
|
44
42
|
}, rest, {
|
|
45
43
|
onQuery: {
|
|
46
|
-
api: function api() {
|
|
47
|
-
|
|
44
|
+
api: function api(_ref) {
|
|
45
|
+
var docUid = _ref.docUid;
|
|
46
|
+
return (0, _utils.request)(getUrl('loadFileGrid', null, docUid));
|
|
47
|
+
},
|
|
48
|
+
get: function get(formData) {
|
|
49
|
+
return {
|
|
50
|
+
docUid: formData && formData[rest.mainFormLdId] && formData[rest.mainFormLdId][window.appConfig.constraintKeys.PRIMARY]
|
|
51
|
+
};
|
|
48
52
|
},
|
|
49
53
|
format: function format(data) {
|
|
50
54
|
return data.map(function (i) {
|