Skip to content

Commit 8a48136

Browse files
committed
Upgrade cropperjs version
1 parent cc47f94 commit 8a48136

File tree

4 files changed

+46
-31
lines changed

4 files changed

+46
-31
lines changed

VERSIONS.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
| Gem | Cropper.js | jQuery Cropper |
44
|--------|------------|----------------|
5+
| 1.2.0 | 1.6.0 | 1.0.1 |
56
| 1.1.6 | 1.5.13 | 1.0.1 |
67
| 1.1.5 | 1.5.12 | 1.0.1 |
78
| 1.1.4 | 1.5.11 | 1.0.1 |

lib/cropper_rails/version.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Cropper
22
module Rails
3-
VERSION = '1.1.6'.freeze
4-
CROPPER_VERSION = '1.5.13'.freeze
3+
VERSION = '1.2.0'.freeze
4+
CROPPER_VERSION = '1.6.0'.freeze
55
JQUERY_CROPPER_VERSION = '1.0.1'.freeze
66
end
77
end

vendor/assets/javascripts/cropper.js

+40-25
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Cropper.js v1.5.13
2+
* Cropper.js v1.6.0
33
* https://fengyuanchen.github.io/cropperjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2022-11-20T05:30:46.114Z
8+
* Date: 2023-08-26T08:14:27.943Z
99
*/
1010

1111
(function (global, factory) {
@@ -14,35 +14,35 @@
1414
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Cropper = factory());
1515
})(this, (function () { 'use strict';
1616

17-
function ownKeys(object, enumerableOnly) {
18-
var keys = Object.keys(object);
17+
function ownKeys(e, r) {
18+
var t = Object.keys(e);
1919
if (Object.getOwnPropertySymbols) {
20-
var symbols = Object.getOwnPropertySymbols(object);
21-
enumerableOnly && (symbols = symbols.filter(function (sym) {
22-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
23-
})), keys.push.apply(keys, symbols);
20+
var o = Object.getOwnPropertySymbols(e);
21+
r && (o = o.filter(function (r) {
22+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
23+
})), t.push.apply(t, o);
2424
}
25-
return keys;
25+
return t;
2626
}
27-
function _objectSpread2(target) {
28-
for (var i = 1; i < arguments.length; i++) {
29-
var source = null != arguments[i] ? arguments[i] : {};
30-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
31-
_defineProperty(target, key, source[key]);
32-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
33-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
27+
function _objectSpread2(e) {
28+
for (var r = 1; r < arguments.length; r++) {
29+
var t = null != arguments[r] ? arguments[r] : {};
30+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
31+
_defineProperty(e, r, t[r]);
32+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
33+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
3434
});
3535
}
36-
return target;
36+
return e;
3737
}
38-
function _typeof(obj) {
38+
function _typeof(o) {
3939
"@babel/helpers - typeof";
4040

41-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
42-
return typeof obj;
43-
} : function (obj) {
44-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
45-
}, _typeof(obj);
41+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
42+
return typeof o;
43+
} : function (o) {
44+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
45+
}, _typeof(o);
4646
}
4747
function _classCallCheck(instance, Constructor) {
4848
if (!(instance instanceof Constructor)) {
@@ -55,7 +55,7 @@
5555
descriptor.enumerable = descriptor.enumerable || false;
5656
descriptor.configurable = true;
5757
if ("value" in descriptor) descriptor.writable = true;
58-
Object.defineProperty(target, descriptor.key, descriptor);
58+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
5959
}
6060
}
6161
function _createClass(Constructor, protoProps, staticProps) {
@@ -67,6 +67,7 @@
6767
return Constructor;
6868
}
6969
function _defineProperty(obj, key, value) {
70+
key = _toPropertyKey(key);
7071
if (key in obj) {
7172
Object.defineProperty(obj, key, {
7273
value: value,
@@ -104,6 +105,20 @@
104105
function _nonIterableSpread() {
105106
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
106107
}
108+
function _toPrimitive(input, hint) {
109+
if (typeof input !== "object" || input === null) return input;
110+
var prim = input[Symbol.toPrimitive];
111+
if (prim !== undefined) {
112+
var res = prim.call(input, hint || "default");
113+
if (typeof res !== "object") return res;
114+
throw new TypeError("@@toPrimitive must return a primitive value.");
115+
}
116+
return (hint === "string" ? String : Number)(input);
117+
}
118+
function _toPropertyKey(arg) {
119+
var key = _toPrimitive(arg, "string");
120+
return typeof key === "symbol" ? key : String(key);
121+
}
107122

108123
var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
109124
var WINDOW = IS_BROWSER ? window : {};
@@ -2725,7 +2740,7 @@
27252740
if (!this.cropped) {
27262741
return source;
27272742
}
2728-
var _this$getData = this.getData(),
2743+
var _this$getData = this.getData(options.rounded),
27292744
initialX = _this$getData.x,
27302745
initialY = _this$getData.y,
27312746
initialWidth = _this$getData.width,

vendor/assets/stylesheets/cropper.css

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Cropper.js v1.5.13
2+
* Cropper.js v1.6.0
33
* https://fengyuanchen.github.io/cropperjs
44
*
55
* Copyright 2015-present Chen Fengyuan
66
* Released under the MIT license
77
*
8-
* Date: 2022-11-20T05:30:43.444Z
8+
* Date: 2023-08-26T08:14:25.104Z
99
*/
1010

1111
.cropper-container {
@@ -22,8 +22,7 @@
2222
}
2323

2424
.cropper-container img {
25-
-webkit-backface-visibility: hidden;
26-
backface-visibility: hidden;
25+
backface-visibility: hidden;
2726
display: block;
2827
height: 100%;
2928
image-orientation: 0deg;

0 commit comments

Comments
 (0)