tntd 1.4.5 → 1.4.6

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.
@@ -52,7 +52,7 @@ export default class QueryForm extends React.PureComponent {
52
52
  }
53
53
  }
54
54
 
55
- onSearch = async() => {
55
+ onSearch = () => {
56
56
  const {
57
57
  onSearch,
58
58
  actions
@@ -60,9 +60,12 @@ export default class QueryForm extends React.PureComponent {
60
60
  const values = actions.getFormData();
61
61
  const params = { ...values, current: 1 };
62
62
 
63
- await actions.setData('formData', values); // memory 与 url解析setForm时 监听事件异步
64
- onSearch && onSearch(params);
65
- actions.emit('search', params);
63
+ // memory 与 url解析setForm时 监听事件异步
64
+ actions.setData('formData', values);
65
+ Promise.resolve().then(()=>{
66
+ onSearch && onSearch(params);
67
+ actions.emit('search', params);
68
+ });
66
69
  };
67
70
 
68
71
  onReset = () => {
package/dist/stats.json CHANGED
@@ -5,9 +5,9 @@
5
5
  "entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.\nEntrypoints:\n main (599 KiB)\n tntd.css\n tntd.js\n"
6
6
  ],
7
7
  "version": "4.46.0",
8
- "hash": "59f2bd5c70268fa38f94",
9
- "time": 23048,
10
- "builtAt": 1650781131360,
8
+ "hash": "84d8361f224baea5bd03",
9
+ "time": 20640,
10
+ "builtAt": 1650874735875,
11
11
  "publicPath": "",
12
12
  "outputPath": "/Users/zhouzefei/projects/tntd/dist",
13
13
  "assetsByChunkName": {
@@ -137,7 +137,7 @@
137
137
  },
138
138
  {
139
139
  "name": "tntd.js",
140
- "size": 600923,
140
+ "size": 600786,
141
141
  "chunks": [
142
142
  0
143
143
  ],
@@ -184,7 +184,7 @@
184
184
  "rendered": true,
185
185
  "initial": true,
186
186
  "entry": true,
187
- "size": 890197,
187
+ "size": 889784,
188
188
  "names": [
189
189
  "main"
190
190
  ],
@@ -192,7 +192,7 @@
192
192
  "tntd.css",
193
193
  "tntd.js"
194
194
  ],
195
- "hash": "05b470a22002ad284d3a",
195
+ "hash": "8c90d77c9dfea6a5ee3a",
196
196
  "siblings": [],
197
197
  "parents": [],
198
198
  "children": [
@@ -915,7 +915,7 @@
915
915
  "moduleName": "./components/index.js + 88 modules",
916
916
  "type": "harmony side effect evaluation",
917
917
  "userRequest": "react",
918
- "loc": "27:0-80"
918
+ "loc": "27:0-41"
919
919
  },
920
920
  {
921
921
  "moduleId": 87,
@@ -924,7 +924,7 @@
924
924
  "moduleName": "./components/index.js + 88 modules",
925
925
  "type": "harmony side effect evaluation",
926
926
  "userRequest": "react",
927
- "loc": "27:0-41"
927
+ "loc": "27:0-80"
928
928
  },
929
929
  {
930
930
  "moduleId": 87,
@@ -2067,7 +2067,7 @@
2067
2067
  "moduleName": "./components/index.js + 88 modules",
2068
2068
  "type": "harmony import specifier",
2069
2069
  "userRequest": "react",
2070
- "loc": "132:13-18"
2070
+ "loc": "130:13-18"
2071
2071
  },
2072
2072
  {
2073
2073
  "moduleId": 87,
@@ -2076,7 +2076,7 @@
2076
2076
  "moduleName": "./components/index.js + 88 modules",
2077
2077
  "type": "harmony import specifier",
2078
2078
  "userRequest": "react",
2079
- "loc": "132:25-34"
2079
+ "loc": "132:13-18"
2080
2080
  },
2081
2081
  {
2082
2082
  "moduleId": 87,
@@ -2085,7 +2085,7 @@
2085
2085
  "moduleName": "./components/index.js + 88 modules",
2086
2086
  "type": "harmony import specifier",
2087
2087
  "userRequest": "react",
2088
- "loc": "132:32-37"
2088
+ "loc": "132:25-34"
2089
2089
  },
2090
2090
  {
2091
2091
  "moduleId": 87,
@@ -2094,7 +2094,7 @@
2094
2094
  "moduleName": "./components/index.js + 88 modules",
2095
2095
  "type": "harmony import specifier",
2096
2096
  "userRequest": "react",
2097
- "loc": "134:15-20"
2097
+ "loc": "132:32-37"
2098
2098
  },
2099
2099
  {
2100
2100
  "moduleId": 87,
@@ -2103,7 +2103,7 @@
2103
2103
  "moduleName": "./components/index.js + 88 modules",
2104
2104
  "type": "harmony import specifier",
2105
2105
  "userRequest": "react",
2106
- "loc": "135:19-27"
2106
+ "loc": "134:15-20"
2107
2107
  },
2108
2108
  {
2109
2109
  "moduleId": 87,
@@ -2112,7 +2112,7 @@
2112
2112
  "moduleName": "./components/index.js + 88 modules",
2113
2113
  "type": "harmony import specifier",
2114
2114
  "userRequest": "react",
2115
- "loc": "137:11-16"
2115
+ "loc": "135:19-27"
2116
2116
  },
2117
2117
  {
2118
2118
  "moduleId": 87,
@@ -2121,7 +2121,7 @@
2121
2121
  "moduleName": "./components/index.js + 88 modules",
2122
2122
  "type": "harmony import specifier",
2123
2123
  "userRequest": "react",
2124
- "loc": "138:59-68"
2124
+ "loc": "137:11-16"
2125
2125
  },
2126
2126
  {
2127
2127
  "moduleId": 87,
@@ -2130,7 +2130,7 @@
2130
2130
  "moduleName": "./components/index.js + 88 modules",
2131
2131
  "type": "harmony import specifier",
2132
2132
  "userRequest": "react",
2133
- "loc": "139:19-27"
2133
+ "loc": "138:59-68"
2134
2134
  },
2135
2135
  {
2136
2136
  "moduleId": 87,
@@ -2139,7 +2139,7 @@
2139
2139
  "moduleName": "./components/index.js + 88 modules",
2140
2140
  "type": "harmony import specifier",
2141
2141
  "userRequest": "react",
2142
- "loc": "140:13-18"
2142
+ "loc": "139:19-27"
2143
2143
  },
2144
2144
  {
2145
2145
  "moduleId": 87,
@@ -2319,7 +2319,7 @@
2319
2319
  "moduleName": "./components/index.js + 88 modules",
2320
2320
  "type": "harmony import specifier",
2321
2321
  "userRequest": "react",
2322
- "loc": "166:2-11"
2322
+ "loc": "165:2-7"
2323
2323
  },
2324
2324
  {
2325
2325
  "moduleId": 87,
@@ -2328,7 +2328,7 @@
2328
2328
  "moduleName": "./components/index.js + 88 modules",
2329
2329
  "type": "harmony import specifier",
2330
2330
  "userRequest": "react",
2331
- "loc": "167:9-14"
2331
+ "loc": "166:2-11"
2332
2332
  },
2333
2333
  {
2334
2334
  "moduleId": 87,
@@ -2337,7 +2337,7 @@
2337
2337
  "moduleName": "./components/index.js + 88 modules",
2338
2338
  "type": "harmony import specifier",
2339
2339
  "userRequest": "react",
2340
- "loc": "169:2-11"
2340
+ "loc": "167:9-14"
2341
2341
  },
2342
2342
  {
2343
2343
  "moduleId": 87,
@@ -2346,7 +2346,7 @@
2346
2346
  "moduleName": "./components/index.js + 88 modules",
2347
2347
  "type": "harmony import specifier",
2348
2348
  "userRequest": "react",
2349
- "loc": "171:24-29"
2349
+ "loc": "169:2-11"
2350
2350
  },
2351
2351
  {
2352
2352
  "moduleId": 87,
@@ -2355,7 +2355,7 @@
2355
2355
  "moduleName": "./components/index.js + 88 modules",
2356
2356
  "type": "harmony import specifier",
2357
2357
  "userRequest": "react",
2358
- "loc": "175:2-7"
2358
+ "loc": "171:24-29"
2359
2359
  },
2360
2360
  {
2361
2361
  "moduleId": 87,
@@ -5182,7 +5182,7 @@
5182
5182
  "moduleName": "./components/index.js + 88 modules",
5183
5183
  "type": "harmony side effect evaluation",
5184
5184
  "userRequest": "lodash",
5185
- "loc": "29:0-67"
5185
+ "loc": "29:0-34"
5186
5186
  },
5187
5187
  {
5188
5188
  "moduleId": 87,
@@ -5191,7 +5191,7 @@
5191
5191
  "moduleName": "./components/index.js + 88 modules",
5192
5192
  "type": "harmony side effect evaluation",
5193
5193
  "userRequest": "lodash",
5194
- "loc": "29:0-34"
5194
+ "loc": "29:0-67"
5195
5195
  },
5196
5196
  {
5197
5197
  "moduleId": 87,
@@ -6300,7 +6300,7 @@
6300
6300
  "moduleName": "./components/index.js + 88 modules",
6301
6301
  "type": "harmony import specifier",
6302
6302
  "userRequest": "classnames",
6303
- "loc": "142:19-29"
6303
+ "loc": "132:19-29"
6304
6304
  },
6305
6305
  {
6306
6306
  "moduleId": 87,
@@ -7780,9 +7780,9 @@
7780
7780
  "chunks": [
7781
7781
  0
7782
7782
  ],
7783
- "issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
7784
- "issuerId": 15,
7785
- "issuerName": "./node_modules/react-resizable/build/Resizable.js",
7783
+ "issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
7784
+ "issuerId": 85,
7785
+ "issuerName": "./node_modules/react-resizable/build/ResizableBox.js",
7786
7786
  "issuerPath": [
7787
7787
  {
7788
7788
  "id": null,
@@ -7800,9 +7800,9 @@
7800
7800
  "name": "./node_modules/react-resizable/index.js"
7801
7801
  },
7802
7802
  {
7803
- "id": 15,
7804
- "identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
7805
- "name": "./node_modules/react-resizable/build/Resizable.js"
7803
+ "id": 85,
7804
+ "identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
7805
+ "name": "./node_modules/react-resizable/build/ResizableBox.js"
7806
7806
  }
7807
7807
  ],
7808
7808
  "failed": false,
@@ -12767,7 +12767,7 @@
12767
12767
  "name": "./components/index.js + 88 modules",
12768
12768
  "index": 0,
12769
12769
  "index2": 187,
12770
- "size": 398015,
12770
+ "size": 397602,
12771
12771
  "cacheable": true,
12772
12772
  "built": true,
12773
12773
  "optional": false,
@@ -13447,7 +13447,7 @@
13447
13447
  "moduleName": "./components/QueryListScene/QueryForm.js",
13448
13448
  "type": "harmony import specifier",
13449
13449
  "userRequest": "../QueryForm",
13450
- "loc": "120:25-29"
13450
+ "loc": "110:25-29"
13451
13451
  },
13452
13452
  {
13453
13453
  "moduleId": null,
@@ -13456,7 +13456,7 @@
13456
13456
  "moduleName": "./components/QueryListScene/QueryForm.js",
13457
13457
  "type": "harmony import specifier",
13458
13458
  "userRequest": "../QueryForm",
13459
- "loc": "140:33-37"
13459
+ "loc": "130:33-37"
13460
13460
  },
13461
13461
  {
13462
13462
  "moduleId": null,
@@ -13465,7 +13465,7 @@
13465
13465
  "moduleName": "./components/QueryListScene/QueryForm.js",
13466
13466
  "type": "harmony import specifier",
13467
13467
  "userRequest": "../QueryForm",
13468
- "loc": "179:18-22"
13468
+ "loc": "169:18-22"
13469
13469
  }
13470
13470
  ],
13471
13471
  "usedExports": [
@@ -16637,7 +16637,7 @@
16637
16637
  "name": "./components/QueryListScene/QueryForm.js",
16638
16638
  "index": 148,
16639
16639
  "index2": 146,
16640
- "size": 9103,
16640
+ "size": 8690,
16641
16641
  "cacheable": true,
16642
16642
  "built": true,
16643
16643
  "optional": false,
@@ -16708,7 +16708,7 @@
16708
16708
  ],
16709
16709
  "optimizationBailout": [],
16710
16710
  "depth": 2,
16711
- "source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function _callee() {\n var _this$props, onSearch, actions, values, params;\n\n return regeneratorRuntime.async(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$props = _this.props, onSearch = _this$props.onSearch, actions = _this$props.actions;\n values = actions.getFormData();\n params = _objectSpread({}, values, {\n current: 1\n });\n _context.next = 5;\n return regeneratorRuntime.awrap(actions.setData('formData', values));\n\n case 5:\n // memory 与 url解析setForm时 监听事件异步\n onSearch && onSearch(params);\n actions.emit('search', params);\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n });\n };\n\n _this.onReset = function () {\n var _this$props2 = _this.props,\n initialValues = _this$props2.initialValues,\n onReset = _this$props2.onReset,\n actions = _this$props2.actions;\n actions.setFormData(initialValues, false);\n onReset && onReset(initialValues);\n\n _this.onSearch();\n };\n\n _this.onChange = function (newValues, changedInfo) {\n var _this$props3 = _this.props,\n onChange = _this$props3.onChange,\n actions = _this$props3.actions;\n\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n\n onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));\n actions.setFormData(newValues, false);\n };\n\n _this.setFormData = function (data, needSearch) {\n var actions = _this.props.actions;\n actions.setData('formData', data);\n\n _this.form.setValues(data);\n\n needSearch && _this.onSearch();\n };\n\n _this.resetFormData = function (needSearch) {\n var _this$props4 = _this.props,\n initialValues = _this$props4.initialValues,\n actions = _this$props4.actions;\n actions.setFormData(initialValues, needSearch);\n\n _this.form.resetValues();\n };\n\n var _actions = props.actions,\n form = props.form;\n _this.form = form || Form.createForm();\n\n _actions.on('setFormData', _this.setFormData);\n\n _actions.on('resetFormData', _this.resetFormData);\n\n return _this;\n }\n\n _createClass(QueryForm, [{\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n actions = _this$props5.actions,\n extraActions = _this$props5.extraActions,\n extralActions = _this$props5.extralActions,\n qlsProps = _this$props5.qlsProps,\n props = _objectWithoutProperties(_this$props5, [\"className\", \"actions\", \"extraActions\", \"extralActions\", \"qlsProps\"]);\n\n return React.createElement(Form, _extends({}, props, {\n form: this.form,\n className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api\n ,\n extraActions: extraActions || extralActions,\n onChange: this.onChange,\n onSearch: this.onSearch,\n onReset: this.onReset\n }));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props6 = this.props,\n _this$props6$initialV = _this$props6.initialValues,\n initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,\n actions = _this$props6.actions,\n qlsProps = _this$props6.qlsProps;\n\n if (qlsProps.memory) {\n actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);\n } else {\n actions.setData('formData', initialValues);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var actions = this.props.actions;\n actions.removeListener('setFormData', this.setFormData);\n actions.removeListener('resetFormData', this.resetFormData);\n }\n }]);\n\n return QueryForm;\n}(React.PureComponent);\n\nexport { QueryForm as default };\n;\nQueryForm.Field = Form.Field;"
16711
+ "source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function () {\n var _this$props = _this.props,\n onSearch = _this$props.onSearch,\n actions = _this$props.actions;\n var values = actions.getFormData();\n\n var params = _objectSpread({}, values, {\n current: 1\n }); // memory 与 url解析setForm时 监听事件异步\n\n\n actions.setData('formData', values);\n Promise.resolve().then(function () {\n onSearch && onSearch(params);\n actions.emit('search', params);\n });\n };\n\n _this.onReset = function () {\n var _this$props2 = _this.props,\n initialValues = _this$props2.initialValues,\n onReset = _this$props2.onReset,\n actions = _this$props2.actions;\n actions.setFormData(initialValues, false);\n onReset && onReset(initialValues);\n\n _this.onSearch();\n };\n\n _this.onChange = function (newValues, changedInfo) {\n var _this$props3 = _this.props,\n onChange = _this$props3.onChange,\n actions = _this$props3.actions;\n\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n\n onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));\n actions.setFormData(newValues, false);\n };\n\n _this.setFormData = function (data, needSearch) {\n var actions = _this.props.actions;\n actions.setData('formData', data);\n\n _this.form.setValues(data);\n\n needSearch && _this.onSearch();\n };\n\n _this.resetFormData = function (needSearch) {\n var _this$props4 = _this.props,\n initialValues = _this$props4.initialValues,\n actions = _this$props4.actions;\n actions.setFormData(initialValues, needSearch);\n\n _this.form.resetValues();\n };\n\n var _actions = props.actions,\n form = props.form;\n _this.form = form || Form.createForm();\n\n _actions.on('setFormData', _this.setFormData);\n\n _actions.on('resetFormData', _this.resetFormData);\n\n return _this;\n }\n\n _createClass(QueryForm, [{\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n actions = _this$props5.actions,\n extraActions = _this$props5.extraActions,\n extralActions = _this$props5.extralActions,\n qlsProps = _this$props5.qlsProps,\n props = _objectWithoutProperties(_this$props5, [\"className\", \"actions\", \"extraActions\", \"extralActions\", \"qlsProps\"]);\n\n return React.createElement(Form, _extends({}, props, {\n form: this.form,\n className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api\n ,\n extraActions: extraActions || extralActions,\n onChange: this.onChange,\n onSearch: this.onSearch,\n onReset: this.onReset\n }));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props6 = this.props,\n _this$props6$initialV = _this$props6.initialValues,\n initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,\n actions = _this$props6.actions,\n qlsProps = _this$props6.qlsProps;\n\n if (qlsProps.memory) {\n actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);\n } else {\n actions.setData('formData', initialValues);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var actions = this.props.actions;\n actions.removeListener('setFormData', this.setFormData);\n actions.removeListener('resetFormData', this.resetFormData);\n }\n }]);\n\n return QueryForm;\n}(React.PureComponent);\n\nexport { QueryForm as default };\n;\nQueryForm.Field = Form.Field;"
16712
16712
  },
16713
16713
  {
16714
16714
  "id": null,
@@ -22362,7 +22362,7 @@
22362
22362
  "moduleName": "./components/index.js + 88 modules",
22363
22363
  "type": "harmony side effect evaluation",
22364
22364
  "userRequest": "react",
22365
- "loc": "27:0-80"
22365
+ "loc": "27:0-41"
22366
22366
  },
22367
22367
  {
22368
22368
  "moduleId": 87,
@@ -22371,7 +22371,7 @@
22371
22371
  "moduleName": "./components/index.js + 88 modules",
22372
22372
  "type": "harmony side effect evaluation",
22373
22373
  "userRequest": "react",
22374
- "loc": "27:0-41"
22374
+ "loc": "27:0-80"
22375
22375
  },
22376
22376
  {
22377
22377
  "moduleId": 87,
@@ -23514,7 +23514,7 @@
23514
23514
  "moduleName": "./components/index.js + 88 modules",
23515
23515
  "type": "harmony import specifier",
23516
23516
  "userRequest": "react",
23517
- "loc": "132:13-18"
23517
+ "loc": "130:13-18"
23518
23518
  },
23519
23519
  {
23520
23520
  "moduleId": 87,
@@ -23523,7 +23523,7 @@
23523
23523
  "moduleName": "./components/index.js + 88 modules",
23524
23524
  "type": "harmony import specifier",
23525
23525
  "userRequest": "react",
23526
- "loc": "132:25-34"
23526
+ "loc": "132:13-18"
23527
23527
  },
23528
23528
  {
23529
23529
  "moduleId": 87,
@@ -23532,7 +23532,7 @@
23532
23532
  "moduleName": "./components/index.js + 88 modules",
23533
23533
  "type": "harmony import specifier",
23534
23534
  "userRequest": "react",
23535
- "loc": "132:32-37"
23535
+ "loc": "132:25-34"
23536
23536
  },
23537
23537
  {
23538
23538
  "moduleId": 87,
@@ -23541,7 +23541,7 @@
23541
23541
  "moduleName": "./components/index.js + 88 modules",
23542
23542
  "type": "harmony import specifier",
23543
23543
  "userRequest": "react",
23544
- "loc": "134:15-20"
23544
+ "loc": "132:32-37"
23545
23545
  },
23546
23546
  {
23547
23547
  "moduleId": 87,
@@ -23550,7 +23550,7 @@
23550
23550
  "moduleName": "./components/index.js + 88 modules",
23551
23551
  "type": "harmony import specifier",
23552
23552
  "userRequest": "react",
23553
- "loc": "135:19-27"
23553
+ "loc": "134:15-20"
23554
23554
  },
23555
23555
  {
23556
23556
  "moduleId": 87,
@@ -23559,7 +23559,7 @@
23559
23559
  "moduleName": "./components/index.js + 88 modules",
23560
23560
  "type": "harmony import specifier",
23561
23561
  "userRequest": "react",
23562
- "loc": "137:11-16"
23562
+ "loc": "135:19-27"
23563
23563
  },
23564
23564
  {
23565
23565
  "moduleId": 87,
@@ -23568,7 +23568,7 @@
23568
23568
  "moduleName": "./components/index.js + 88 modules",
23569
23569
  "type": "harmony import specifier",
23570
23570
  "userRequest": "react",
23571
- "loc": "138:59-68"
23571
+ "loc": "137:11-16"
23572
23572
  },
23573
23573
  {
23574
23574
  "moduleId": 87,
@@ -23577,7 +23577,7 @@
23577
23577
  "moduleName": "./components/index.js + 88 modules",
23578
23578
  "type": "harmony import specifier",
23579
23579
  "userRequest": "react",
23580
- "loc": "139:19-27"
23580
+ "loc": "138:59-68"
23581
23581
  },
23582
23582
  {
23583
23583
  "moduleId": 87,
@@ -23586,7 +23586,7 @@
23586
23586
  "moduleName": "./components/index.js + 88 modules",
23587
23587
  "type": "harmony import specifier",
23588
23588
  "userRequest": "react",
23589
- "loc": "140:13-18"
23589
+ "loc": "139:19-27"
23590
23590
  },
23591
23591
  {
23592
23592
  "moduleId": 87,
@@ -23766,7 +23766,7 @@
23766
23766
  "moduleName": "./components/index.js + 88 modules",
23767
23767
  "type": "harmony import specifier",
23768
23768
  "userRequest": "react",
23769
- "loc": "166:2-11"
23769
+ "loc": "165:2-7"
23770
23770
  },
23771
23771
  {
23772
23772
  "moduleId": 87,
@@ -23775,7 +23775,7 @@
23775
23775
  "moduleName": "./components/index.js + 88 modules",
23776
23776
  "type": "harmony import specifier",
23777
23777
  "userRequest": "react",
23778
- "loc": "167:9-14"
23778
+ "loc": "166:2-11"
23779
23779
  },
23780
23780
  {
23781
23781
  "moduleId": 87,
@@ -23784,7 +23784,7 @@
23784
23784
  "moduleName": "./components/index.js + 88 modules",
23785
23785
  "type": "harmony import specifier",
23786
23786
  "userRequest": "react",
23787
- "loc": "169:2-11"
23787
+ "loc": "167:9-14"
23788
23788
  },
23789
23789
  {
23790
23790
  "moduleId": 87,
@@ -23793,7 +23793,7 @@
23793
23793
  "moduleName": "./components/index.js + 88 modules",
23794
23794
  "type": "harmony import specifier",
23795
23795
  "userRequest": "react",
23796
- "loc": "171:24-29"
23796
+ "loc": "169:2-11"
23797
23797
  },
23798
23798
  {
23799
23799
  "moduleId": 87,
@@ -23802,7 +23802,7 @@
23802
23802
  "moduleName": "./components/index.js + 88 modules",
23803
23803
  "type": "harmony import specifier",
23804
23804
  "userRequest": "react",
23805
- "loc": "175:2-7"
23805
+ "loc": "171:24-29"
23806
23806
  },
23807
23807
  {
23808
23808
  "moduleId": 87,
@@ -26629,7 +26629,7 @@
26629
26629
  "moduleName": "./components/index.js + 88 modules",
26630
26630
  "type": "harmony side effect evaluation",
26631
26631
  "userRequest": "lodash",
26632
- "loc": "29:0-67"
26632
+ "loc": "29:0-34"
26633
26633
  },
26634
26634
  {
26635
26635
  "moduleId": 87,
@@ -26638,7 +26638,7 @@
26638
26638
  "moduleName": "./components/index.js + 88 modules",
26639
26639
  "type": "harmony side effect evaluation",
26640
26640
  "userRequest": "lodash",
26641
- "loc": "29:0-34"
26641
+ "loc": "29:0-67"
26642
26642
  },
26643
26643
  {
26644
26644
  "moduleId": 87,
@@ -27747,7 +27747,7 @@
27747
27747
  "moduleName": "./components/index.js + 88 modules",
27748
27748
  "type": "harmony import specifier",
27749
27749
  "userRequest": "classnames",
27750
- "loc": "142:19-29"
27750
+ "loc": "132:19-29"
27751
27751
  },
27752
27752
  {
27753
27753
  "moduleId": 87,
@@ -29227,9 +29227,9 @@
29227
29227
  "chunks": [
29228
29228
  0
29229
29229
  ],
29230
- "issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
29231
- "issuerId": 15,
29232
- "issuerName": "./node_modules/react-resizable/build/Resizable.js",
29230
+ "issuer": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
29231
+ "issuerId": 85,
29232
+ "issuerName": "./node_modules/react-resizable/build/ResizableBox.js",
29233
29233
  "issuerPath": [
29234
29234
  {
29235
29235
  "id": null,
@@ -29247,9 +29247,9 @@
29247
29247
  "name": "./node_modules/react-resizable/index.js"
29248
29248
  },
29249
29249
  {
29250
- "id": 15,
29251
- "identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/Resizable.js",
29252
- "name": "./node_modules/react-resizable/build/Resizable.js"
29250
+ "id": 85,
29251
+ "identifier": "/Users/zhouzefei/projects/tntd/node_modules/react-resizable/build/ResizableBox.js",
29252
+ "name": "./node_modules/react-resizable/build/ResizableBox.js"
29253
29253
  }
29254
29254
  ],
29255
29255
  "failed": false,
@@ -34214,7 +34214,7 @@
34214
34214
  "name": "./components/index.js + 88 modules",
34215
34215
  "index": 0,
34216
34216
  "index2": 187,
34217
- "size": 398015,
34217
+ "size": 397602,
34218
34218
  "cacheable": true,
34219
34219
  "built": true,
34220
34220
  "optional": false,
@@ -34894,7 +34894,7 @@
34894
34894
  "moduleName": "./components/QueryListScene/QueryForm.js",
34895
34895
  "type": "harmony import specifier",
34896
34896
  "userRequest": "../QueryForm",
34897
- "loc": "120:25-29"
34897
+ "loc": "110:25-29"
34898
34898
  },
34899
34899
  {
34900
34900
  "moduleId": null,
@@ -34903,7 +34903,7 @@
34903
34903
  "moduleName": "./components/QueryListScene/QueryForm.js",
34904
34904
  "type": "harmony import specifier",
34905
34905
  "userRequest": "../QueryForm",
34906
- "loc": "140:33-37"
34906
+ "loc": "130:33-37"
34907
34907
  },
34908
34908
  {
34909
34909
  "moduleId": null,
@@ -34912,7 +34912,7 @@
34912
34912
  "moduleName": "./components/QueryListScene/QueryForm.js",
34913
34913
  "type": "harmony import specifier",
34914
34914
  "userRequest": "../QueryForm",
34915
- "loc": "179:18-22"
34915
+ "loc": "169:18-22"
34916
34916
  }
34917
34917
  ],
34918
34918
  "usedExports": [
@@ -38084,7 +38084,7 @@
38084
38084
  "name": "./components/QueryListScene/QueryForm.js",
38085
38085
  "index": 148,
38086
38086
  "index2": 146,
38087
- "size": 9103,
38087
+ "size": 8690,
38088
38088
  "cacheable": true,
38089
38089
  "built": true,
38090
38090
  "optional": false,
@@ -38155,7 +38155,7 @@
38155
38155
  ],
38156
38156
  "optimizationBailout": [],
38157
38157
  "depth": 2,
38158
- "source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function _callee() {\n var _this$props, onSearch, actions, values, params;\n\n return regeneratorRuntime.async(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$props = _this.props, onSearch = _this$props.onSearch, actions = _this$props.actions;\n values = actions.getFormData();\n params = _objectSpread({}, values, {\n current: 1\n });\n _context.next = 5;\n return regeneratorRuntime.awrap(actions.setData('formData', values));\n\n case 5:\n // memory 与 url解析setForm时 监听事件异步\n onSearch && onSearch(params);\n actions.emit('search', params);\n\n case 7:\n case \"end\":\n return _context.stop();\n }\n }\n });\n };\n\n _this.onReset = function () {\n var _this$props2 = _this.props,\n initialValues = _this$props2.initialValues,\n onReset = _this$props2.onReset,\n actions = _this$props2.actions;\n actions.setFormData(initialValues, false);\n onReset && onReset(initialValues);\n\n _this.onSearch();\n };\n\n _this.onChange = function (newValues, changedInfo) {\n var _this$props3 = _this.props,\n onChange = _this$props3.onChange,\n actions = _this$props3.actions;\n\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n\n onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));\n actions.setFormData(newValues, false);\n };\n\n _this.setFormData = function (data, needSearch) {\n var actions = _this.props.actions;\n actions.setData('formData', data);\n\n _this.form.setValues(data);\n\n needSearch && _this.onSearch();\n };\n\n _this.resetFormData = function (needSearch) {\n var _this$props4 = _this.props,\n initialValues = _this$props4.initialValues,\n actions = _this$props4.actions;\n actions.setFormData(initialValues, needSearch);\n\n _this.form.resetValues();\n };\n\n var _actions = props.actions,\n form = props.form;\n _this.form = form || Form.createForm();\n\n _actions.on('setFormData', _this.setFormData);\n\n _actions.on('resetFormData', _this.resetFormData);\n\n return _this;\n }\n\n _createClass(QueryForm, [{\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n actions = _this$props5.actions,\n extraActions = _this$props5.extraActions,\n extralActions = _this$props5.extralActions,\n qlsProps = _this$props5.qlsProps,\n props = _objectWithoutProperties(_this$props5, [\"className\", \"actions\", \"extraActions\", \"extralActions\", \"qlsProps\"]);\n\n return React.createElement(Form, _extends({}, props, {\n form: this.form,\n className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api\n ,\n extraActions: extraActions || extralActions,\n onChange: this.onChange,\n onSearch: this.onSearch,\n onReset: this.onReset\n }));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props6 = this.props,\n _this$props6$initialV = _this$props6.initialValues,\n initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,\n actions = _this$props6.actions,\n qlsProps = _this$props6.qlsProps;\n\n if (qlsProps.memory) {\n actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);\n } else {\n actions.setData('formData', initialValues);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var actions = this.props.actions;\n actions.removeListener('setFormData', this.setFormData);\n actions.removeListener('resetFormData', this.resetFormData);\n }\n }]);\n\n return QueryForm;\n}(React.PureComponent);\n\nexport { QueryForm as default };\n;\nQueryForm.Field = Form.Field;"
38158
+ "source": "function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _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; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport classnames from 'classnames';\nimport Form from '../QueryForm';\nvar clsPrefix = 'tnt-querylistscene-queryform';\n\nvar QueryForm =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(QueryForm, _React$PureComponent);\n\n function QueryForm(props) {\n var _this;\n\n _classCallCheck(this, QueryForm);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(QueryForm).call(this, props));\n\n _this.onSearch = function () {\n var _this$props = _this.props,\n onSearch = _this$props.onSearch,\n actions = _this$props.actions;\n var values = actions.getFormData();\n\n var params = _objectSpread({}, values, {\n current: 1\n }); // memory 与 url解析setForm时 监听事件异步\n\n\n actions.setData('formData', values);\n Promise.resolve().then(function () {\n onSearch && onSearch(params);\n actions.emit('search', params);\n });\n };\n\n _this.onReset = function () {\n var _this$props2 = _this.props,\n initialValues = _this$props2.initialValues,\n onReset = _this$props2.onReset,\n actions = _this$props2.actions;\n actions.setFormData(initialValues, false);\n onReset && onReset(initialValues);\n\n _this.onSearch();\n };\n\n _this.onChange = function (newValues, changedInfo) {\n var _this$props3 = _this.props,\n onChange = _this$props3.onChange,\n actions = _this$props3.actions;\n\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n\n onChange && onChange.apply(void 0, [newValues, changedInfo].concat(rest));\n actions.setFormData(newValues, false);\n };\n\n _this.setFormData = function (data, needSearch) {\n var actions = _this.props.actions;\n actions.setData('formData', data);\n\n _this.form.setValues(data);\n\n needSearch && _this.onSearch();\n };\n\n _this.resetFormData = function (needSearch) {\n var _this$props4 = _this.props,\n initialValues = _this$props4.initialValues,\n actions = _this$props4.actions;\n actions.setFormData(initialValues, needSearch);\n\n _this.form.resetValues();\n };\n\n var _actions = props.actions,\n form = props.form;\n _this.form = form || Form.createForm();\n\n _actions.on('setFormData', _this.setFormData);\n\n _actions.on('resetFormData', _this.resetFormData);\n\n return _this;\n }\n\n _createClass(QueryForm, [{\n key: \"render\",\n value: function render() {\n var _this$props5 = this.props,\n className = _this$props5.className,\n actions = _this$props5.actions,\n extraActions = _this$props5.extraActions,\n extralActions = _this$props5.extralActions,\n qlsProps = _this$props5.qlsProps,\n props = _objectWithoutProperties(_this$props5, [\"className\", \"actions\", \"extraActions\", \"extralActions\", \"qlsProps\"]);\n\n return React.createElement(Form, _extends({}, props, {\n form: this.form,\n className: classnames(clsPrefix, _defineProperty({}, className, className)) // 前期拼写错误,导致需要兼容错误的api\n ,\n extraActions: extraActions || extralActions,\n onChange: this.onChange,\n onSearch: this.onSearch,\n onReset: this.onReset\n }));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props6 = this.props,\n _this$props6$initialV = _this$props6.initialValues,\n initialValues = _this$props6$initialV === void 0 ? {} : _this$props6$initialV,\n actions = _this$props6.actions,\n qlsProps = _this$props6.qlsProps;\n\n if (qlsProps.memory) {\n actions.setFormData(_objectSpread({}, initialValues, {}, actions.getFormData()), false);\n } else {\n actions.setData('formData', initialValues);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var actions = this.props.actions;\n actions.removeListener('setFormData', this.setFormData);\n actions.removeListener('resetFormData', this.resetFormData);\n }\n }]);\n\n return QueryForm;\n}(React.PureComponent);\n\nexport { QueryForm as default };\n;\nQueryForm.Field = Form.Field;"
38159
38159
  },
38160
38160
  {
38161
38161
  "id": null,