cropper_rails 1.1.6 → 1.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d587dac674704bb9039d1f13bb7ac350447567323cef9df92b703109073f2cf7
4
- data.tar.gz: 41ed4c0591388f8a3548ffbc78982cb5e69d474eeee919dd73876386fd5db51f
3
+ metadata.gz: 03c92be91eae44243f14c7c294f6c40f89eb1c1fbd6d217ea246aa80989e7320
4
+ data.tar.gz: ad68358d2b7e6590abe067e4819198f8aa3e916b9ff95726ee53b82b74584912
5
5
  SHA512:
6
- metadata.gz: 9854332b18208c46d7d0c1643dcde7c7efdd9209ae84caafbe060b943f91ec82257f10406239d163df51d4b70812fbf57cd6ce53c0e1956989c620ef2f5f984d
7
- data.tar.gz: 48e714295b78cb4b400768ef01cff0ca77b6d8a30e37e13616fdc8156ee8ccdd7d51f282f11fc21ba39e5e312802d5e0283a8a1ddda218afcbd891cde1443ced
6
+ metadata.gz: 18c68793331e3a3d4bc51cf46c794ec7176786d325dc4508a3401bf778e87c094c63c542ca45b67882142de010f95cac0ec272541fc6d40fe7ba1d8874f11960
7
+ data.tar.gz: 284b3978a6b7b6396eee170a3e2252a112afabaf1ce7edae55ee831ff5e4c0ba4958d781649962ed1dfe169a01267337e873deea374df3db7c64e0313fa2b9c3
data/SECURITY.md ADDED
@@ -0,0 +1,3 @@
1
+ ## Reporting a Vulnerability
2
+
3
+ Please report (suspected) security vulnerabilities to **[security@d1ceward.com](mailto:security@d1ceward.com)**. If the issue is confirmed, a patch will be released as soon as possible depending on complexity.
data/VERSIONS.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  | Gem | Cropper.js | jQuery Cropper |
4
4
  |--------|------------|----------------|
5
+ | 1.2.0 | 1.6.0 | 1.0.1 |
5
6
  | 1.1.6 | 1.5.13 | 1.0.1 |
6
7
  | 1.1.5 | 1.5.12 | 1.0.1 |
7
8
  | 1.1.4 | 1.5.11 | 1.0.1 |
@@ -1,7 +1,7 @@
1
1
  module Cropper
2
2
  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
5
5
  JQUERY_CROPPER_VERSION = '1.0.1'.freeze
6
6
  end
7
7
  end
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Cropper.js v1.5.13
2
+ * Cropper.js v1.6.0
3
3
  * https://fengyuanchen.github.io/cropperjs
4
4
  *
5
5
  * Copyright 2015-present Chen Fengyuan
6
6
  * Released under the MIT license
7
7
  *
8
- * Date: 2022-11-20T05:30:46.114Z
8
+ * Date: 2023-08-26T08:14:27.943Z
9
9
  */
10
10
 
11
11
  (function (global, factory) {
@@ -14,35 +14,35 @@
14
14
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Cropper = factory());
15
15
  })(this, (function () { 'use strict';
16
16
 
17
- function ownKeys(object, enumerableOnly) {
18
- var keys = Object.keys(object);
17
+ function ownKeys(e, r) {
18
+ var t = Object.keys(e);
19
19
  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);
24
24
  }
25
- return keys;
25
+ return t;
26
26
  }
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));
34
34
  });
35
35
  }
36
- return target;
36
+ return e;
37
37
  }
38
- function _typeof(obj) {
38
+ function _typeof(o) {
39
39
  "@babel/helpers - typeof";
40
40
 
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);
46
46
  }
47
47
  function _classCallCheck(instance, Constructor) {
48
48
  if (!(instance instanceof Constructor)) {
@@ -55,7 +55,7 @@
55
55
  descriptor.enumerable = descriptor.enumerable || false;
56
56
  descriptor.configurable = true;
57
57
  if ("value" in descriptor) descriptor.writable = true;
58
- Object.defineProperty(target, descriptor.key, descriptor);
58
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
59
59
  }
60
60
  }
61
61
  function _createClass(Constructor, protoProps, staticProps) {
@@ -67,6 +67,7 @@
67
67
  return Constructor;
68
68
  }
69
69
  function _defineProperty(obj, key, value) {
70
+ key = _toPropertyKey(key);
70
71
  if (key in obj) {
71
72
  Object.defineProperty(obj, key, {
72
73
  value: value,
@@ -104,6 +105,20 @@
104
105
  function _nonIterableSpread() {
105
106
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
106
107
  }
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
+ }
107
122
 
108
123
  var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
109
124
  var WINDOW = IS_BROWSER ? window : {};
@@ -2725,7 +2740,7 @@
2725
2740
  if (!this.cropped) {
2726
2741
  return source;
2727
2742
  }
2728
- var _this$getData = this.getData(),
2743
+ var _this$getData = this.getData(options.rounded),
2729
2744
  initialX = _this$getData.x,
2730
2745
  initialY = _this$getData.y,
2731
2746
  initialWidth = _this$getData.width,
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * Cropper.js v1.5.13
2
+ * Cropper.js v1.6.0
3
3
  * https://fengyuanchen.github.io/cropperjs
4
4
  *
5
5
  * Copyright 2015-present Chen Fengyuan
6
6
  * Released under the MIT license
7
7
  *
8
- * Date: 2022-11-20T05:30:43.444Z
8
+ * Date: 2023-08-26T08:14:25.104Z
9
9
  */
10
10
 
11
11
  .cropper-container {
@@ -22,8 +22,7 @@
22
22
  }
23
23
 
24
24
  .cropper-container img {
25
- -webkit-backface-visibility: hidden;
26
- backface-visibility: hidden;
25
+ backface-visibility: hidden;
27
26
  display: block;
28
27
  height: 100%;
29
28
  image-orientation: 0deg;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cropper_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - d1ceward
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-20 00:00:00.000000000 Z
11
+ date: 2023-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-rails
@@ -54,6 +54,7 @@ files:
54
54
  - Gemfile
55
55
  - LICENSE
56
56
  - README.md
57
+ - SECURITY.md
57
58
  - VERSIONS.md
58
59
  - cropper_rails.gemspec
59
60
  - lib/cropper_rails.rb
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  requirements: []
84
- rubygems_version: 3.3.7
85
+ rubygems_version: 3.4.10
85
86
  signing_key:
86
87
  specification_version: 4
87
88
  summary: Integrate Cropper library with Rails asset pipeline