easy3wui 1.5.75 → 1.5.76-beta.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.
@@ -86,8 +86,7 @@ var Easy3wDownLoad = function (_Component) {
86
86
 
87
87
  var _this = (0, _possibleConstructorReturn3['default'])(this, _Component.call(this, props));
88
88
 
89
- _this.onPreview = function (e, file, url) {
90
- e.preventDefault();
89
+ _this.onPreview = function (file, url) {
91
90
  var objPreviewFileNew = (0, _extends3['default'])({}, objPreviewFileDefault, _comonConfig.objPreviewFile, _this.props.objPreviewFile);
92
91
  var previewFileUrl = objPreviewFileNew.previewFileUrl,
93
92
  previewFileType = objPreviewFileNew.previewFileType;
@@ -145,8 +144,7 @@ var Easy3wDownLoad = function (_Component) {
145
144
  }
146
145
  };
147
146
 
148
- _this.showFileView = function (e, uid, name, apiKey, fileViewURL, fileCallURL) {
149
- e.preventDefault();
147
+ _this.showFileView = function (uid, name, apiKey, fileViewURL, fileCallURL) {
150
148
  var callURl = fileCallURL + '?fileId=' + uid;
151
149
  var crypto = require('crypto');
152
150
  var hmac = crypto.createHmac('md5', apiKey);
@@ -161,8 +159,7 @@ var Easy3wDownLoad = function (_Component) {
161
159
  _this.setState({ fileId: '', fileURL: '', fileName: '', fileViewFlag: false });
162
160
  };
163
161
 
164
- _this.showPdfView = function (e, uid, url, name) {
165
- e.preventDefault();
162
+ _this.showPdfView = function (uid, url, name) {
166
163
  _this.setState({ pdfViewFlag: true, fileId: uid, fileURL: url, fileName: name });
167
164
  };
168
165
 
@@ -170,8 +167,7 @@ var Easy3wDownLoad = function (_Component) {
170
167
  _this.setState({ fileId: '', fileURL: '', fileName: '', pdfViewFlag: false });
171
168
  };
172
169
 
173
- _this.showImageView = function (e, url) {
174
- e.preventDefault();
170
+ _this.showImageView = function (url) {
175
171
  _this.setState({ imageViewURL: url });
176
172
  };
177
173
 
@@ -208,8 +204,7 @@ var Easy3wDownLoad = function (_Component) {
208
204
 
209
205
  var objPreviewFileNew = (0, _extends3['default'])({}, objPreviewFileDefault, _comonConfig.objPreviewFile, this.props.objPreviewFile);
210
206
  var previewFileFlag = objPreviewFileNew.previewFileFlag,
211
- _objPreviewFileNew$do = objPreviewFileNew.downloadFileFlag,
212
- downloadFileFlag = _objPreviewFileNew$do === undefined ? '1' : _objPreviewFileNew$do,
207
+ downloadFileFlag = objPreviewFileNew.downloadFileFlag,
213
208
  previewFileType = objPreviewFileNew.previewFileType;
214
209
 
215
210
  var retObj = '';
@@ -231,8 +226,8 @@ var Easy3wDownLoad = function (_Component) {
231
226
  { placement: 'topLeft', title: name, style: { whiteSpace: 'pre-wrap', wordWrap: 'break-word' } },
232
227
  _react2['default'].createElement(
233
228
  'a',
234
- { href: url, onClick: function onClick(e) {
235
- return _this2.onPreview(e, obj, url);
229
+ { onClick: function onClick() {
230
+ return _this2.onPreview(obj, url);
236
231
  }, style: { overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', paddingRight: '12px' } },
237
232
  name
238
233
  )
@@ -249,8 +244,8 @@ var Easy3wDownLoad = function (_Component) {
249
244
  null,
250
245
  _react2['default'].createElement(
251
246
  'a',
252
- { href: url, onClick: function onClick(e) {
253
- return _this2.showPdfView(e, uid, url, name);
247
+ { onClick: function onClick() {
248
+ return _this2.showPdfView(uid, url, name);
254
249
  } },
255
250
  name
256
251
  )
@@ -261,8 +256,8 @@ var Easy3wDownLoad = function (_Component) {
261
256
  null,
262
257
  _react2['default'].createElement(
263
258
  'a',
264
- { href: url, onClick: function onClick(e) {
265
- return _this2.showFileView(e, uid, name, apiKey, fileViewURL, fileCallURL);
259
+ { onClick: function onClick() {
260
+ return _this2.showFileView(uid, name, apiKey, fileViewURL, fileCallURL);
266
261
  } },
267
262
  name
268
263
  )
@@ -273,8 +268,8 @@ var Easy3wDownLoad = function (_Component) {
273
268
  { style: { width: '100%', display: 'flex', alignItems: 'center' } },
274
269
  _react2['default'].createElement(
275
270
  'a',
276
- { href: url, onClick: function onClick(e) {
277
- return _this2.showImageView(e, url);
271
+ { onClick: function onClick() {
272
+ return _this2.showImageView(url);
278
273
  }, style: { overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', paddingRight: '12px' } },
279
274
  name
280
275
  ),
@@ -112,6 +112,13 @@ var Easy3wGridPage = function (_Component) {
112
112
  }
113
113
  };
114
114
 
115
+ Easy3wGridPage.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
116
+ var that = this;
117
+ if (this.props.totalResult && this.props.totalResult !== prevProps.totalResult) {
118
+ that.setState({ pagination: { offset: 1, limit: 10 } });
119
+ }
120
+ };
121
+
115
122
  Easy3wGridPage.prototype.render = function render() {
116
123
  var _this2 = this;
117
124