pxx-vue-quill 1.0.160 → 1.0.162
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/dist/vue-quill.umd.js +283 -267
- package/dist/vue-quill.umd.prod.js +2 -2
- package/package.json +1 -1
package/dist/vue-quill.umd.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-09-15T01:
|
|
10
|
+
* Date: 2025-09-15T01:54:53.887Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18994,11 +18994,11 @@
|
|
|
18994
18994
|
value: true
|
|
18995
18995
|
});
|
|
18996
18996
|
|
|
18997
|
-
var _createClass
|
|
18997
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
18998
18998
|
|
|
18999
18999
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19000
19000
|
|
|
19001
|
-
function _classCallCheck
|
|
19001
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19002
19002
|
|
|
19003
19003
|
var LEFT_ALIGN = 'left';
|
|
19004
19004
|
var CENTER_ALIGN = 'center';
|
|
@@ -19009,7 +19009,7 @@
|
|
|
19009
19009
|
var _this = this,
|
|
19010
19010
|
_alignments;
|
|
19011
19011
|
|
|
19012
|
-
_classCallCheck
|
|
19012
|
+
_classCallCheck(this, DefaultAligner);
|
|
19013
19013
|
|
|
19014
19014
|
this.applyStyle = options.aligner.applyStyle;
|
|
19015
19015
|
this.alignAttribute = options.attribute;
|
|
@@ -19037,7 +19037,7 @@
|
|
|
19037
19037
|
}), _alignments);
|
|
19038
19038
|
}
|
|
19039
19039
|
|
|
19040
|
-
_createClass
|
|
19040
|
+
_createClass(DefaultAligner, [{
|
|
19041
19041
|
key: 'getAlignments',
|
|
19042
19042
|
value: function getAlignments() {
|
|
19043
19043
|
var _this2 = this;
|
|
@@ -19340,182 +19340,190 @@
|
|
|
19340
19340
|
return AlignAction;
|
|
19341
19341
|
}
|
|
19342
19342
|
|
|
19343
|
-
var ResizeAction
|
|
19343
|
+
var ResizeAction = {};
|
|
19344
19344
|
|
|
19345
|
-
|
|
19346
|
-
value: true
|
|
19347
|
-
});
|
|
19345
|
+
var hasRequiredResizeAction;
|
|
19348
19346
|
|
|
19349
|
-
|
|
19347
|
+
function requireResizeAction () {
|
|
19348
|
+
if (hasRequiredResizeAction) return ResizeAction;
|
|
19349
|
+
hasRequiredResizeAction = 1;
|
|
19350
19350
|
|
|
19351
|
-
|
|
19351
|
+
Object.defineProperty(ResizeAction, "__esModule", {
|
|
19352
|
+
value: true
|
|
19353
|
+
});
|
|
19352
19354
|
|
|
19353
|
-
|
|
19355
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
19354
19356
|
|
|
19355
|
-
|
|
19357
|
+
var _Action2 = requireAction();
|
|
19356
19358
|
|
|
19357
|
-
|
|
19359
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19358
19360
|
|
|
19359
|
-
|
|
19361
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19360
19362
|
|
|
19361
|
-
|
|
19363
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19362
19364
|
|
|
19363
|
-
|
|
19365
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19364
19366
|
|
|
19365
|
-
|
|
19367
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19366
19368
|
|
|
19367
|
-
|
|
19368
|
-
_inherits$1(ResizeAction, _Action);
|
|
19369
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
19369
19370
|
|
|
19370
|
-
|
|
19371
|
-
_classCallCheck$1(this, ResizeAction);
|
|
19371
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
19372
19372
|
|
|
19373
|
-
|
|
19373
|
+
var ResizeAction$1 = function (_Action) {
|
|
19374
|
+
_inherits(ResizeAction, _Action);
|
|
19374
19375
|
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
return;
|
|
19378
|
-
}
|
|
19379
|
-
_this.dragHandle = event.target;
|
|
19380
|
-
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19376
|
+
function ResizeAction(formatter) {
|
|
19377
|
+
_classCallCheck(this, ResizeAction);
|
|
19381
19378
|
|
|
19382
|
-
|
|
19383
|
-
return;
|
|
19384
|
-
}
|
|
19379
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19385
19380
|
|
|
19386
|
-
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19381
|
+
_this.onMouseDown = function (event) {
|
|
19382
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19383
|
+
return;
|
|
19384
|
+
}
|
|
19385
|
+
_this.dragHandle = event.target;
|
|
19386
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19390
19387
|
|
|
19391
|
-
|
|
19388
|
+
if (!_this.formatter.currentSpec) {
|
|
19389
|
+
return;
|
|
19390
|
+
}
|
|
19392
19391
|
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19392
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19393
|
+
if (!target) {
|
|
19394
|
+
return;
|
|
19395
|
+
}
|
|
19396
19396
|
|
|
19397
|
-
|
|
19398
|
-
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19399
|
-
};
|
|
19397
|
+
var rect = target.getBoundingClientRect();
|
|
19400
19398
|
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
}
|
|
19399
|
+
_this.dragStartX = event.clientX;
|
|
19400
|
+
_this.preDragWidth = rect.width;
|
|
19401
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19405
19402
|
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
}
|
|
19403
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19404
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19405
|
+
};
|
|
19410
19406
|
|
|
19411
|
-
|
|
19412
|
-
|
|
19407
|
+
_this.onDrag = function (event) {
|
|
19408
|
+
if (!_this.formatter.currentSpec) {
|
|
19409
|
+
return;
|
|
19410
|
+
}
|
|
19413
19411
|
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
}
|
|
19412
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19413
|
+
if (!target) {
|
|
19414
|
+
return;
|
|
19415
|
+
}
|
|
19419
19416
|
|
|
19420
|
-
|
|
19417
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19418
|
+
var newWidth = 0;
|
|
19421
19419
|
|
|
19422
|
-
|
|
19423
|
-
|
|
19420
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19421
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19422
|
+
} else {
|
|
19423
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19424
|
+
}
|
|
19424
19425
|
|
|
19425
|
-
|
|
19426
|
-
};
|
|
19426
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19427
19427
|
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
document.removeEventListener('mousemove', _this.onDrag);
|
|
19431
|
-
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19432
|
-
};
|
|
19428
|
+
target.setAttribute('width', '' + newWidth);
|
|
19429
|
+
target.setAttribute('height', '' + newHeight);
|
|
19433
19430
|
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19437
|
-
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19438
|
-
_this.dragHandle = null;
|
|
19439
|
-
_this.dragStartX = 0;
|
|
19440
|
-
_this.preDragWidth = 0;
|
|
19441
|
-
_this.targetRatio = 0;
|
|
19442
|
-
return _this;
|
|
19443
|
-
}
|
|
19431
|
+
_this.formatter.update();
|
|
19432
|
+
};
|
|
19444
19433
|
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19451
|
-
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19434
|
+
_this.onMouseUp = function () {
|
|
19435
|
+
_this.setCursor('');
|
|
19436
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19437
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19438
|
+
};
|
|
19452
19439
|
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
}
|
|
19464
|
-
}, {
|
|
19465
|
-
key: 'createHandle',
|
|
19466
|
-
value: function createHandle(position, cursor) {
|
|
19467
|
-
var box = document.createElement('div');
|
|
19468
|
-
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19469
|
-
box.setAttribute('data-position', position);
|
|
19470
|
-
box.style.cursor = cursor;
|
|
19471
|
-
|
|
19472
|
-
if (this.formatter.options.resize.handleStyle) {
|
|
19473
|
-
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19474
|
-
}
|
|
19440
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19441
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19442
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19443
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19444
|
+
_this.dragHandle = null;
|
|
19445
|
+
_this.dragStartX = 0;
|
|
19446
|
+
_this.preDragWidth = 0;
|
|
19447
|
+
_this.targetRatio = 0;
|
|
19448
|
+
return _this;
|
|
19449
|
+
}
|
|
19475
19450
|
|
|
19476
|
-
|
|
19451
|
+
_createClass(ResizeAction, [{
|
|
19452
|
+
key: 'onCreate',
|
|
19453
|
+
value: function onCreate() {
|
|
19454
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19455
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19456
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19457
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19477
19458
|
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19459
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19460
|
+
}
|
|
19461
|
+
}, {
|
|
19462
|
+
key: 'onDestroy',
|
|
19463
|
+
value: function onDestroy() {
|
|
19464
|
+
this.setCursor('');
|
|
19465
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19466
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19467
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19468
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19469
|
+
}
|
|
19470
|
+
}, {
|
|
19471
|
+
key: 'createHandle',
|
|
19472
|
+
value: function createHandle(position, cursor) {
|
|
19473
|
+
var box = document.createElement('div');
|
|
19474
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19475
|
+
box.setAttribute('data-position', position);
|
|
19476
|
+
box.style.cursor = cursor;
|
|
19477
|
+
|
|
19478
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19479
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19480
|
+
}
|
|
19493
19481
|
|
|
19494
|
-
|
|
19495
|
-
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19496
|
-
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19497
|
-
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19498
|
-
}
|
|
19499
|
-
}, {
|
|
19500
|
-
key: 'setCursor',
|
|
19501
|
-
value: function setCursor(value) {
|
|
19502
|
-
if (document.body) {
|
|
19503
|
-
document.body.style.cursor = value;
|
|
19504
|
-
}
|
|
19482
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19505
19483
|
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19484
|
+
return box;
|
|
19485
|
+
}
|
|
19486
|
+
}, {
|
|
19487
|
+
key: 'repositionHandles',
|
|
19488
|
+
value: function repositionHandles(handleStyle) {
|
|
19489
|
+
var handleXOffset = '0px';
|
|
19490
|
+
var handleYOffset = '0px';
|
|
19491
|
+
if (handleStyle) {
|
|
19492
|
+
if (handleStyle.width) {
|
|
19493
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19494
|
+
}
|
|
19495
|
+
if (handleStyle.height) {
|
|
19496
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19497
|
+
}
|
|
19498
|
+
}
|
|
19499
|
+
|
|
19500
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19501
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19502
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19503
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19504
|
+
}
|
|
19505
|
+
}, {
|
|
19506
|
+
key: 'setCursor',
|
|
19507
|
+
value: function setCursor(value) {
|
|
19508
|
+
if (document.body) {
|
|
19509
|
+
document.body.style.cursor = value;
|
|
19510
|
+
}
|
|
19511
|
+
|
|
19512
|
+
if (this.formatter.currentSpec) {
|
|
19513
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19514
|
+
if (target) {
|
|
19515
|
+
target.style.cursor = value;
|
|
19516
|
+
}
|
|
19517
|
+
}
|
|
19518
|
+
}
|
|
19519
|
+
}]);
|
|
19514
19520
|
|
|
19515
|
-
|
|
19516
|
-
|
|
19521
|
+
return ResizeAction;
|
|
19522
|
+
}(_Action3.default);
|
|
19517
19523
|
|
|
19518
|
-
|
|
19524
|
+
ResizeAction.default = ResizeAction$1;
|
|
19525
|
+
return ResizeAction;
|
|
19526
|
+
}
|
|
19519
19527
|
|
|
19520
19528
|
var DeleteAction = {};
|
|
19521
19529
|
|
|
@@ -19622,7 +19630,7 @@
|
|
|
19622
19630
|
|
|
19623
19631
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19624
19632
|
|
|
19625
|
-
var _ResizeAction =
|
|
19633
|
+
var _ResizeAction = requireResizeAction();
|
|
19626
19634
|
|
|
19627
19635
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19628
19636
|
|
|
@@ -19754,148 +19762,156 @@
|
|
|
19754
19762
|
|
|
19755
19763
|
var IframeVideoSpec = {};
|
|
19756
19764
|
|
|
19757
|
-
var UnclickableBlotSpec
|
|
19765
|
+
var UnclickableBlotSpec = {};
|
|
19758
19766
|
|
|
19759
|
-
|
|
19760
|
-
value: true
|
|
19761
|
-
});
|
|
19767
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19762
19768
|
|
|
19763
|
-
|
|
19769
|
+
function requireUnclickableBlotSpec () {
|
|
19770
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19771
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19764
19772
|
|
|
19765
|
-
|
|
19773
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19774
|
+
value: true
|
|
19775
|
+
});
|
|
19766
19776
|
|
|
19767
|
-
|
|
19777
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
19768
19778
|
|
|
19769
|
-
|
|
19779
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19770
19780
|
|
|
19771
|
-
|
|
19781
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19772
19782
|
|
|
19773
|
-
|
|
19783
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19774
19784
|
|
|
19775
|
-
|
|
19785
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19776
19786
|
|
|
19777
|
-
|
|
19787
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19778
19788
|
|
|
19779
|
-
|
|
19789
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19780
19790
|
|
|
19781
|
-
|
|
19782
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19791
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
19783
19792
|
|
|
19784
|
-
|
|
19785
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19793
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
19786
19794
|
|
|
19787
|
-
|
|
19788
|
-
|
|
19795
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19796
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19789
19797
|
|
|
19790
|
-
|
|
19798
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19799
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19791
19800
|
|
|
19792
|
-
|
|
19793
|
-
|
|
19794
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19795
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19796
|
-
});
|
|
19797
|
-
};
|
|
19801
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19802
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19798
19803
|
|
|
19799
|
-
|
|
19800
|
-
var unclickable = event.target;
|
|
19801
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19802
|
-
return;
|
|
19803
|
-
}
|
|
19804
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19804
19805
|
|
|
19805
|
-
|
|
19806
|
-
|
|
19807
|
-
|
|
19806
|
+
_this.onTextChange = function () {
|
|
19807
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19808
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19809
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19810
|
+
});
|
|
19811
|
+
};
|
|
19808
19812
|
|
|
19809
|
-
|
|
19810
|
-
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
};
|
|
19813
|
+
_this.onMouseEnter = function (event) {
|
|
19814
|
+
var unclickable = event.target;
|
|
19815
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19816
|
+
return;
|
|
19817
|
+
}
|
|
19815
19818
|
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
return _this;
|
|
19820
|
-
}
|
|
19819
|
+
_this.nextUnclickable = unclickable;
|
|
19820
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19821
|
+
};
|
|
19821
19822
|
|
|
19822
|
-
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
|
|
19827
|
-
|
|
19828
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19829
|
-
*/
|
|
19830
|
-
document.body.appendChild(this.createProxyImage());
|
|
19831
|
-
}
|
|
19823
|
+
_this.onProxyImageClick = function () {
|
|
19824
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19825
|
+
_this.nextUnclickable = null;
|
|
19826
|
+
_this.formatter.show(_this);
|
|
19827
|
+
_this.hideProxyImage();
|
|
19828
|
+
};
|
|
19832
19829
|
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
key: 'getTargetElement',
|
|
19839
|
-
value: function getTargetElement() {
|
|
19840
|
-
return this.unclickable;
|
|
19841
|
-
}
|
|
19842
|
-
}, {
|
|
19843
|
-
key: 'getOverlayElement',
|
|
19844
|
-
value: function getOverlayElement() {
|
|
19845
|
-
return this.unclickable;
|
|
19846
|
-
}
|
|
19847
|
-
}, {
|
|
19848
|
-
key: 'onHide',
|
|
19849
|
-
value: function onHide() {
|
|
19850
|
-
this.hideProxyImage();
|
|
19851
|
-
this.nextUnclickable = null;
|
|
19852
|
-
this.unclickable = null;
|
|
19853
|
-
}
|
|
19854
|
-
}, {
|
|
19855
|
-
key: 'createProxyImage',
|
|
19856
|
-
value: function createProxyImage() {
|
|
19857
|
-
var canvas = document.createElement('canvas');
|
|
19858
|
-
var context = canvas.getContext('2d');
|
|
19859
|
-
context.globalAlpha = 0;
|
|
19860
|
-
context.fillRect(0, 0, 1, 1);
|
|
19861
|
-
|
|
19862
|
-
this.proxyImage = document.createElement('img');
|
|
19863
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19864
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19865
|
-
|
|
19866
|
-
Object.assign(this.proxyImage.style, {
|
|
19867
|
-
position: 'absolute',
|
|
19868
|
-
margin: '0'
|
|
19869
|
-
});
|
|
19830
|
+
_this.selector = selector;
|
|
19831
|
+
_this.unclickable = null;
|
|
19832
|
+
_this.nextUnclickable = null;
|
|
19833
|
+
return _this;
|
|
19834
|
+
}
|
|
19870
19835
|
|
|
19871
|
-
|
|
19872
|
-
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19836
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19837
|
+
key: 'init',
|
|
19838
|
+
value: function init() {
|
|
19839
|
+
if (document.body) {
|
|
19840
|
+
/*
|
|
19841
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19842
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19843
|
+
*/
|
|
19844
|
+
document.body.appendChild(this.createProxyImage());
|
|
19845
|
+
}
|
|
19846
|
+
|
|
19847
|
+
this.hideProxyImage();
|
|
19848
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19849
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19850
|
+
}
|
|
19851
|
+
}, {
|
|
19852
|
+
key: 'getTargetElement',
|
|
19853
|
+
value: function getTargetElement() {
|
|
19854
|
+
return this.unclickable;
|
|
19855
|
+
}
|
|
19856
|
+
}, {
|
|
19857
|
+
key: 'getOverlayElement',
|
|
19858
|
+
value: function getOverlayElement() {
|
|
19859
|
+
return this.unclickable;
|
|
19860
|
+
}
|
|
19861
|
+
}, {
|
|
19862
|
+
key: 'onHide',
|
|
19863
|
+
value: function onHide() {
|
|
19864
|
+
this.hideProxyImage();
|
|
19865
|
+
this.nextUnclickable = null;
|
|
19866
|
+
this.unclickable = null;
|
|
19867
|
+
}
|
|
19868
|
+
}, {
|
|
19869
|
+
key: 'createProxyImage',
|
|
19870
|
+
value: function createProxyImage() {
|
|
19871
|
+
var canvas = document.createElement('canvas');
|
|
19872
|
+
var context = canvas.getContext('2d');
|
|
19873
|
+
context.globalAlpha = 0;
|
|
19874
|
+
context.fillRect(0, 0, 1, 1);
|
|
19875
|
+
|
|
19876
|
+
this.proxyImage = document.createElement('img');
|
|
19877
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19878
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19879
|
+
|
|
19880
|
+
Object.assign(this.proxyImage.style, {
|
|
19881
|
+
position: 'absolute',
|
|
19882
|
+
margin: '0'
|
|
19883
|
+
});
|
|
19894
19884
|
|
|
19895
|
-
|
|
19896
|
-
|
|
19885
|
+
return this.proxyImage;
|
|
19886
|
+
}
|
|
19887
|
+
}, {
|
|
19888
|
+
key: 'hideProxyImage',
|
|
19889
|
+
value: function hideProxyImage() {
|
|
19890
|
+
Object.assign(this.proxyImage.style, {
|
|
19891
|
+
display: 'none'
|
|
19892
|
+
});
|
|
19893
|
+
}
|
|
19894
|
+
}, {
|
|
19895
|
+
key: 'repositionProxyImage',
|
|
19896
|
+
value: function repositionProxyImage(unclickable) {
|
|
19897
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19898
|
+
|
|
19899
|
+
Object.assign(this.proxyImage.style, {
|
|
19900
|
+
display: 'block',
|
|
19901
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19902
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19903
|
+
width: rect.width + 'px',
|
|
19904
|
+
height: rect.height + 'px'
|
|
19905
|
+
});
|
|
19906
|
+
}
|
|
19907
|
+
}]);
|
|
19897
19908
|
|
|
19898
|
-
|
|
19909
|
+
return UnclickableBlotSpec;
|
|
19910
|
+
}(_BlotSpec3.default);
|
|
19911
|
+
|
|
19912
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19913
|
+
return UnclickableBlotSpec;
|
|
19914
|
+
}
|
|
19899
19915
|
|
|
19900
19916
|
var hasRequiredIframeVideoSpec;
|
|
19901
19917
|
|
|
@@ -19907,7 +19923,7 @@
|
|
|
19907
19923
|
value: true
|
|
19908
19924
|
});
|
|
19909
19925
|
|
|
19910
|
-
var _UnclickableBlotSpec2 =
|
|
19926
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19911
19927
|
|
|
19912
19928
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19913
19929
|
|
|
@@ -20107,7 +20123,7 @@
|
|
|
20107
20123
|
}
|
|
20108
20124
|
});
|
|
20109
20125
|
|
|
20110
|
-
var _ResizeAction =
|
|
20126
|
+
var _ResizeAction = requireResizeAction();
|
|
20111
20127
|
|
|
20112
20128
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
20113
20129
|
enumerable: true,
|
|
@@ -20134,7 +20150,7 @@
|
|
|
20134
20150
|
}
|
|
20135
20151
|
});
|
|
20136
20152
|
|
|
20137
|
-
var _UnclickableBlotSpec =
|
|
20153
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
20138
20154
|
|
|
20139
20155
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20140
20156
|
enumerable: true,
|