assui 3.0.42 → 3.0.44

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.
@@ -179,6 +179,7 @@ import Spin from "antd/es/spin";
179
179
  import classNames from 'classnames';
180
180
  import CloseOutlined from "a-icons/es/CloseOutlined";
181
181
  import isObject from 'lodash/isObject';
182
+ import isFunction from 'lodash/isFunction';
182
183
  var getLocalImgURL = function getLocalImgURL(file) {
183
184
  var URL = window.URL || window.webkitURL;
184
185
  var imgURL = URL.createObjectURL(file);
@@ -218,11 +219,16 @@ var SingleImgUpload = function SingleImgUpload(props) {
218
219
  setImageLoading(true);
219
220
  setUploadStatus('done');
220
221
  // eslint-disable-next-line global-require
221
- var heic2Jpeg = require('aa-utils/lib/heic2Jpeg');
222
- heic2Jpeg(value).then(function (resultUrl) {
223
- setFileUrl(resultUrl);
222
+ var heic2Jpeg = require('aa-utils/lib/heic2Jpeg')["default"];
223
+ if (isFunction(heic2Jpeg)) {
224
+ heic2Jpeg(value).then(function (resultUrl) {
225
+ setFileUrl(resultUrl);
226
+ setImageLoading(false);
227
+ });
228
+ } else {
229
+ setFileUrl(value);
224
230
  setImageLoading(false);
225
- });
231
+ }
226
232
  } else {
227
233
  setUploadStatus('init');
228
234
  }
@@ -222,6 +222,7 @@ var spin_1 = __importDefault(require("antd/lib/spin"));
222
222
  var classnames_1 = __importDefault(require("classnames"));
223
223
  var CloseOutlined_1 = __importDefault(require("a-icons/lib/CloseOutlined"));
224
224
  var isObject_1 = __importDefault(require("lodash/isObject"));
225
+ var isFunction_1 = __importDefault(require("lodash/isFunction"));
225
226
  var getLocalImgURL = function getLocalImgURL(file) {
226
227
  var URL = window.URL || window.webkitURL;
227
228
  var imgURL = URL.createObjectURL(file);
@@ -261,11 +262,16 @@ var SingleImgUpload = function SingleImgUpload(props) {
261
262
  setImageLoading(true);
262
263
  setUploadStatus('done');
263
264
  // eslint-disable-next-line global-require
264
- var heic2Jpeg = require('aa-utils/lib/heic2Jpeg');
265
- heic2Jpeg(value).then(function (resultUrl) {
266
- setFileUrl(resultUrl);
265
+ var heic2Jpeg = require('aa-utils/lib/heic2Jpeg')["default"];
266
+ if ((0, isFunction_1["default"])(heic2Jpeg)) {
267
+ heic2Jpeg(value).then(function (resultUrl) {
268
+ setFileUrl(resultUrl);
269
+ setImageLoading(false);
270
+ });
271
+ } else {
272
+ setFileUrl(value);
267
273
  setImageLoading(false);
268
- });
274
+ }
269
275
  } else {
270
276
  setUploadStatus('init');
271
277
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.0.42",
3
+ "version": "3.0.44",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -35,7 +35,7 @@
35
35
  "@types/react-beautiful-dnd": "^13.1.2",
36
36
  "@types/react-color": "^3.0.6",
37
37
  "@types/react-resizable": "^3.0.0",
38
- "a-icons": "^1.1.13",
38
+ "a-icons": "^1.1.14",
39
39
  "aa-utils": "^2.1.14",
40
40
  "ahooks": "^3.0.8",
41
41
  "bignumber.js": "^9.0.1",
@@ -80,5 +80,5 @@
80
80
  "node": ">=10.0.0"
81
81
  },
82
82
  "license": "MIT",
83
- "gitHead": "859311df4547351b3ed8a520bf275d99d062f916"
83
+ "gitHead": "394b0ed499471ad064f28b27f3d7e3a1dbe886d1"
84
84
  }