assui 3.0.32 → 3.0.34

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 assui
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -56,7 +56,7 @@ var ReactEchartCore = function ReactEchartCore(props) {
56
56
  dispose();
57
57
  renderEchartDom();
58
58
  bindEvents();
59
- }, [theme, opts, onEvents]);
59
+ }, [theme, opts]);
60
60
  // need setOption
61
61
  useUpdateEffect(function () {
62
62
  renderEchartDom();
@@ -178,6 +178,7 @@ import Image from "antd/es/image";
178
178
  import classNames from 'classnames';
179
179
  import useUpdateEffect from "ahooks/es/useUpdateEffect";
180
180
  import CloseOutlined from "a-icons/es/CloseOutlined";
181
+ import heic2Jpeg from "aa-utils/es/heic2Jpeg";
181
182
  import isObject from 'lodash/isObject';
182
183
  var getLocalImgURL = function getLocalImgURL(file) {
183
184
  var URL = window.URL || window.webkitURL;
@@ -210,12 +211,14 @@ var SingleImgUpload = function SingleImgUpload(props) {
210
211
  uploadPercent = _c[0],
211
212
  setUploadPercent = _c[1];
212
213
  useUpdateEffect(function () {
213
- setFileUrl(value);
214
- if (value) {
215
- setUploadStatus('done');
216
- } else {
217
- setUploadStatus('init');
218
- }
214
+ heic2Jpeg(value).then(function (resultUrl) {
215
+ setFileUrl(resultUrl);
216
+ if (value) {
217
+ setUploadStatus('done');
218
+ } else {
219
+ setUploadStatus('init');
220
+ }
221
+ });
219
222
  }, [value]);
220
223
  var onBeforeUpload = function onBeforeUpload() {
221
224
  var rest = [];
@@ -99,7 +99,7 @@ var ReactEchartCore = function ReactEchartCore(props) {
99
99
  dispose();
100
100
  renderEchartDom();
101
101
  bindEvents();
102
- }, [theme, opts, onEvents]);
102
+ }, [theme, opts]);
103
103
  // need setOption
104
104
  (0, useUpdateEffect_1["default"])(function () {
105
105
  renderEchartDom();
@@ -221,6 +221,7 @@ var image_1 = __importDefault(require("antd/lib/image"));
221
221
  var classnames_1 = __importDefault(require("classnames"));
222
222
  var useUpdateEffect_1 = __importDefault(require("ahooks/lib/useUpdateEffect"));
223
223
  var CloseOutlined_1 = __importDefault(require("a-icons/lib/CloseOutlined"));
224
+ var heic2Jpeg_1 = __importDefault(require("aa-utils/lib/heic2Jpeg"));
224
225
  var isObject_1 = __importDefault(require("lodash/isObject"));
225
226
  var getLocalImgURL = function getLocalImgURL(file) {
226
227
  var URL = window.URL || window.webkitURL;
@@ -253,12 +254,14 @@ var SingleImgUpload = function SingleImgUpload(props) {
253
254
  uploadPercent = _c[0],
254
255
  setUploadPercent = _c[1];
255
256
  (0, useUpdateEffect_1["default"])(function () {
256
- setFileUrl(value);
257
- if (value) {
258
- setUploadStatus('done');
259
- } else {
260
- setUploadStatus('init');
261
- }
257
+ (0, heic2Jpeg_1["default"])(value).then(function (resultUrl) {
258
+ setFileUrl(resultUrl);
259
+ if (value) {
260
+ setUploadStatus('done');
261
+ } else {
262
+ setUploadStatus('init');
263
+ }
264
+ });
262
265
  }, [value]);
263
266
  var onBeforeUpload = function onBeforeUpload() {
264
267
  var rest = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.0.32",
3
+ "version": "3.0.34",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -36,7 +36,7 @@
36
36
  "@types/react-color": "^3.0.6",
37
37
  "@types/react-resizable": "^3.0.0",
38
38
  "a-icons": "^1.1.13",
39
- "aa-utils": "^2.1.12",
39
+ "aa-utils": "^2.1.13",
40
40
  "ahooks": "^3.0.8",
41
41
  "bignumber.js": "^9.0.1",
42
42
  "copy-to-clipboard": "^3.3.1",
@@ -79,5 +79,6 @@
79
79
  "engines": {
80
80
  "node": ">=10.0.0"
81
81
  },
82
- "license": "MIT"
82
+ "license": "MIT",
83
+ "gitHead": "eba2614cfd203779036b489b6c4c93dbc047989a"
83
84
  }