@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
- UploadGridForm.displayName = 'GridForm';
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';
@@ -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 formData = rest.formData,
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: formData && formData[mainFormLdId] && formData[mainFormLdId][window.appConfig.constraintKeys.PRIMARY] || ticketData && ticketData[window.appConfig.constraintKeys.PRIMARY]
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
- return request(getUrl('loadFileGrid'));
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
- UploadGridForm.displayName = 'GridForm';
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
- exports.default = _default;
387
+ var _default = Com;
388
+ exports.default = _default;
389
+ Com.displayName = 'GridForm';
@@ -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 formData = rest.formData,
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: formData && formData[mainFormLdId] && formData[mainFormLdId][window.appConfig.constraintKeys.PRIMARY] || ticketData && ticketData[window.appConfig.constraintKeys.PRIMARY]
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
- return (0, _utils.request)(getUrl('loadFileGrid'));
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luck-design-biz/luckda",
3
- "version": "0.0.16-3",
3
+ "version": "0.0.16-5",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",