pxx-vue-quill 1.0.110 → 1.0.111
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 +270 -285
- 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-10T03:
|
|
10
|
+
* Date: 2025-09-10T03:19:12.273Z
|
|
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 = 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; }; }();
|
|
18997
|
+
var _createClass$2 = 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(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19001
|
+
function _classCallCheck$2(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(this, DefaultAligner);
|
|
19012
|
+
_classCallCheck$2(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(DefaultAligner, [{
|
|
19040
|
+
_createClass$2(DefaultAligner, [{
|
|
19041
19041
|
key: 'getAlignments',
|
|
19042
19042
|
value: function getAlignments() {
|
|
19043
19043
|
var _this2 = this;
|
|
@@ -19340,190 +19340,182 @@
|
|
|
19340
19340
|
return AlignAction;
|
|
19341
19341
|
}
|
|
19342
19342
|
|
|
19343
|
-
var ResizeAction = {};
|
|
19344
|
-
|
|
19345
|
-
var hasRequiredResizeAction;
|
|
19343
|
+
var ResizeAction$1 = {};
|
|
19346
19344
|
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
|
|
19350
|
-
|
|
19351
|
-
Object.defineProperty(ResizeAction, "__esModule", {
|
|
19352
|
-
value: true
|
|
19353
|
-
});
|
|
19345
|
+
Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
19346
|
+
value: true
|
|
19347
|
+
});
|
|
19354
19348
|
|
|
19355
|
-
|
|
19349
|
+
var _createClass$1 = 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; }; }();
|
|
19356
19350
|
|
|
19357
|
-
|
|
19351
|
+
var _Action2 = requireAction();
|
|
19358
19352
|
|
|
19359
|
-
|
|
19353
|
+
var _Action3 = _interopRequireDefault$1(_Action2);
|
|
19360
19354
|
|
|
19361
|
-
|
|
19355
|
+
var _BlotFormatter$1 = requireBlotFormatter();
|
|
19362
19356
|
|
|
19363
|
-
|
|
19357
|
+
_interopRequireDefault$1(_BlotFormatter$1);
|
|
19364
19358
|
|
|
19365
|
-
|
|
19359
|
+
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19366
19360
|
|
|
19367
|
-
|
|
19361
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19368
19362
|
|
|
19369
|
-
|
|
19363
|
+
function _possibleConstructorReturn$1(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; }
|
|
19370
19364
|
|
|
19371
|
-
|
|
19365
|
+
function _inherits$1(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
19366
|
|
|
19373
|
-
|
|
19374
|
-
|
|
19367
|
+
var ResizeAction = function (_Action) {
|
|
19368
|
+
_inherits$1(ResizeAction, _Action);
|
|
19375
19369
|
|
|
19376
|
-
|
|
19377
|
-
|
|
19370
|
+
function ResizeAction(formatter) {
|
|
19371
|
+
_classCallCheck$1(this, ResizeAction);
|
|
19378
19372
|
|
|
19379
|
-
|
|
19373
|
+
var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19380
19374
|
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
|
|
19375
|
+
_this.onMouseDown = function (event) {
|
|
19376
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19377
|
+
return;
|
|
19378
|
+
}
|
|
19379
|
+
_this.dragHandle = event.target;
|
|
19380
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19387
19381
|
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19382
|
+
if (!_this.formatter.currentSpec) {
|
|
19383
|
+
return;
|
|
19384
|
+
}
|
|
19391
19385
|
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19386
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19387
|
+
if (!target) {
|
|
19388
|
+
return;
|
|
19389
|
+
}
|
|
19396
19390
|
|
|
19397
|
-
|
|
19391
|
+
var rect = target.getBoundingClientRect();
|
|
19398
19392
|
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19393
|
+
_this.dragStartX = event.clientX;
|
|
19394
|
+
_this.preDragWidth = rect.width;
|
|
19395
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19402
19396
|
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19397
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19398
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19399
|
+
};
|
|
19406
19400
|
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19410
|
-
|
|
19401
|
+
_this.onDrag = function (event) {
|
|
19402
|
+
if (!_this.formatter.currentSpec) {
|
|
19403
|
+
return;
|
|
19404
|
+
}
|
|
19411
19405
|
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19406
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19407
|
+
if (!target) {
|
|
19408
|
+
return;
|
|
19409
|
+
}
|
|
19416
19410
|
|
|
19417
|
-
|
|
19418
|
-
|
|
19411
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19412
|
+
var newWidth = 0;
|
|
19419
19413
|
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19424
|
-
|
|
19414
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19415
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19416
|
+
} else {
|
|
19417
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19418
|
+
}
|
|
19425
19419
|
|
|
19426
|
-
|
|
19420
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19427
19421
|
|
|
19428
|
-
|
|
19429
|
-
|
|
19422
|
+
target.setAttribute('width', '' + newWidth);
|
|
19423
|
+
target.setAttribute('height', '' + newHeight);
|
|
19430
19424
|
|
|
19431
|
-
|
|
19432
|
-
|
|
19425
|
+
_this.formatter.update();
|
|
19426
|
+
};
|
|
19433
19427
|
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19438
|
-
|
|
19428
|
+
_this.onMouseUp = function () {
|
|
19429
|
+
_this.setCursor('');
|
|
19430
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19431
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19432
|
+
};
|
|
19439
19433
|
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19434
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19435
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
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
|
+
}
|
|
19450
19444
|
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19445
|
+
_createClass$1(ResizeAction, [{
|
|
19446
|
+
key: 'onCreate',
|
|
19447
|
+
value: function onCreate() {
|
|
19448
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19449
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19450
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19451
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19458
19452
|
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19453
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19454
|
+
}
|
|
19455
|
+
}, {
|
|
19456
|
+
key: 'onDestroy',
|
|
19457
|
+
value: function onDestroy() {
|
|
19458
|
+
this.setCursor('');
|
|
19459
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19460
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19461
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19462
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
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
|
+
}
|
|
19481
19475
|
|
|
19482
|
-
|
|
19476
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19483
19477
|
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19478
|
+
return box;
|
|
19479
|
+
}
|
|
19480
|
+
}, {
|
|
19481
|
+
key: 'repositionHandles',
|
|
19482
|
+
value: function repositionHandles(handleStyle) {
|
|
19483
|
+
var handleXOffset = '0px';
|
|
19484
|
+
var handleYOffset = '0px';
|
|
19485
|
+
if (handleStyle) {
|
|
19486
|
+
if (handleStyle.width) {
|
|
19487
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19488
|
+
}
|
|
19489
|
+
if (handleStyle.height) {
|
|
19490
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19491
|
+
}
|
|
19492
|
+
}
|
|
19499
19493
|
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19494
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
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
|
+
}
|
|
19511
19505
|
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19519
|
-
|
|
19506
|
+
if (this.formatter.currentSpec) {
|
|
19507
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19508
|
+
if (target) {
|
|
19509
|
+
target.style.cursor = value;
|
|
19510
|
+
}
|
|
19511
|
+
}
|
|
19512
|
+
}
|
|
19513
|
+
}]);
|
|
19520
19514
|
|
|
19521
|
-
|
|
19522
|
-
|
|
19515
|
+
return ResizeAction;
|
|
19516
|
+
}(_Action3.default);
|
|
19523
19517
|
|
|
19524
|
-
|
|
19525
|
-
return ResizeAction;
|
|
19526
|
-
}
|
|
19518
|
+
ResizeAction$1.default = ResizeAction;
|
|
19527
19519
|
|
|
19528
19520
|
var DeleteAction = {};
|
|
19529
19521
|
|
|
@@ -19630,7 +19622,7 @@
|
|
|
19630
19622
|
|
|
19631
19623
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19632
19624
|
|
|
19633
|
-
var _ResizeAction =
|
|
19625
|
+
var _ResizeAction = ResizeAction$1;
|
|
19634
19626
|
|
|
19635
19627
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19636
19628
|
|
|
@@ -19762,156 +19754,148 @@
|
|
|
19762
19754
|
|
|
19763
19755
|
var IframeVideoSpec = {};
|
|
19764
19756
|
|
|
19765
|
-
var UnclickableBlotSpec = {};
|
|
19766
|
-
|
|
19767
|
-
var hasRequiredUnclickableBlotSpec;
|
|
19768
|
-
|
|
19769
|
-
function requireUnclickableBlotSpec () {
|
|
19770
|
-
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19771
|
-
hasRequiredUnclickableBlotSpec = 1;
|
|
19757
|
+
var UnclickableBlotSpec$1 = {};
|
|
19772
19758
|
|
|
19773
|
-
|
|
19774
|
-
|
|
19775
|
-
|
|
19759
|
+
Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
|
|
19760
|
+
value: true
|
|
19761
|
+
});
|
|
19776
19762
|
|
|
19777
|
-
|
|
19763
|
+
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; }; }();
|
|
19778
19764
|
|
|
19779
|
-
|
|
19765
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19780
19766
|
|
|
19781
|
-
|
|
19767
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19782
19768
|
|
|
19783
|
-
|
|
19769
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19784
19770
|
|
|
19785
|
-
|
|
19771
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19786
19772
|
|
|
19787
|
-
|
|
19773
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19788
19774
|
|
|
19789
|
-
|
|
19775
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19790
19776
|
|
|
19791
|
-
|
|
19777
|
+
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; }
|
|
19792
19778
|
|
|
19793
|
-
|
|
19779
|
+
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; }
|
|
19794
19780
|
|
|
19795
|
-
|
|
19796
|
-
|
|
19781
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19782
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19797
19783
|
|
|
19798
|
-
|
|
19799
|
-
|
|
19784
|
+
var UnclickableBlotSpec = function (_BlotSpec) {
|
|
19785
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19800
19786
|
|
|
19801
|
-
|
|
19802
|
-
|
|
19787
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19788
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19803
19789
|
|
|
19804
|
-
|
|
19790
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19805
19791
|
|
|
19806
|
-
|
|
19807
|
-
|
|
19808
|
-
|
|
19809
|
-
|
|
19810
|
-
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
_this.onMouseEnter = function (event) {
|
|
19814
|
-
var unclickable = event.target;
|
|
19815
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19816
|
-
return;
|
|
19817
|
-
}
|
|
19792
|
+
_this.onTextChange = function () {
|
|
19793
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19794
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19795
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19796
|
+
});
|
|
19797
|
+
};
|
|
19818
19798
|
|
|
19819
|
-
|
|
19820
|
-
|
|
19821
|
-
|
|
19799
|
+
_this.onMouseEnter = function (event) {
|
|
19800
|
+
var unclickable = event.target;
|
|
19801
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19802
|
+
return;
|
|
19803
|
+
}
|
|
19822
19804
|
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
_this.formatter.show(_this);
|
|
19827
|
-
_this.hideProxyImage();
|
|
19828
|
-
};
|
|
19805
|
+
_this.nextUnclickable = unclickable;
|
|
19806
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19807
|
+
};
|
|
19829
19808
|
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19809
|
+
_this.onProxyImageClick = function () {
|
|
19810
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19811
|
+
_this.nextUnclickable = null;
|
|
19812
|
+
_this.formatter.show(_this);
|
|
19813
|
+
_this.hideProxyImage();
|
|
19814
|
+
};
|
|
19835
19815
|
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
19839
|
-
|
|
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
|
-
}
|
|
19816
|
+
_this.selector = selector;
|
|
19817
|
+
_this.unclickable = null;
|
|
19818
|
+
_this.nextUnclickable = null;
|
|
19819
|
+
return _this;
|
|
19820
|
+
}
|
|
19846
19821
|
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
|
|
19853
|
-
|
|
19854
|
-
|
|
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
|
-
});
|
|
19822
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19823
|
+
key: 'init',
|
|
19824
|
+
value: function init() {
|
|
19825
|
+
if (document.body) {
|
|
19826
|
+
/*
|
|
19827
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19828
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19829
|
+
*/
|
|
19830
|
+
document.body.appendChild(this.createProxyImage());
|
|
19831
|
+
}
|
|
19884
19832
|
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19833
|
+
this.hideProxyImage();
|
|
19834
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19835
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
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
|
+
});
|
|
19898
19870
|
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19871
|
+
return this.proxyImage;
|
|
19872
|
+
}
|
|
19873
|
+
}, {
|
|
19874
|
+
key: 'hideProxyImage',
|
|
19875
|
+
value: function hideProxyImage() {
|
|
19876
|
+
Object.assign(this.proxyImage.style, {
|
|
19877
|
+
display: 'none'
|
|
19878
|
+
});
|
|
19879
|
+
}
|
|
19880
|
+
}, {
|
|
19881
|
+
key: 'repositionProxyImage',
|
|
19882
|
+
value: function repositionProxyImage(unclickable) {
|
|
19883
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19884
|
+
|
|
19885
|
+
Object.assign(this.proxyImage.style, {
|
|
19886
|
+
display: 'block',
|
|
19887
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19888
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19889
|
+
width: rect.width + 'px',
|
|
19890
|
+
height: rect.height + 'px'
|
|
19891
|
+
});
|
|
19892
|
+
}
|
|
19893
|
+
}]);
|
|
19908
19894
|
|
|
19909
|
-
|
|
19910
|
-
|
|
19895
|
+
return UnclickableBlotSpec;
|
|
19896
|
+
}(_BlotSpec3.default);
|
|
19911
19897
|
|
|
19912
|
-
|
|
19913
|
-
return UnclickableBlotSpec;
|
|
19914
|
-
}
|
|
19898
|
+
UnclickableBlotSpec$1.default = UnclickableBlotSpec;
|
|
19915
19899
|
|
|
19916
19900
|
var hasRequiredIframeVideoSpec;
|
|
19917
19901
|
|
|
@@ -19923,7 +19907,7 @@
|
|
|
19923
19907
|
value: true
|
|
19924
19908
|
});
|
|
19925
19909
|
|
|
19926
|
-
var _UnclickableBlotSpec2 =
|
|
19910
|
+
var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
|
|
19927
19911
|
|
|
19928
19912
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19929
19913
|
|
|
@@ -20123,7 +20107,7 @@
|
|
|
20123
20107
|
}
|
|
20124
20108
|
});
|
|
20125
20109
|
|
|
20126
|
-
var _ResizeAction =
|
|
20110
|
+
var _ResizeAction = ResizeAction$1;
|
|
20127
20111
|
|
|
20128
20112
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
20129
20113
|
enumerable: true,
|
|
@@ -20150,7 +20134,7 @@
|
|
|
20150
20134
|
}
|
|
20151
20135
|
});
|
|
20152
20136
|
|
|
20153
|
-
var _UnclickableBlotSpec =
|
|
20137
|
+
var _UnclickableBlotSpec = UnclickableBlotSpec$1;
|
|
20154
20138
|
|
|
20155
20139
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20156
20140
|
enumerable: true,
|
|
@@ -20344,6 +20328,7 @@
|
|
|
20344
20328
|
function useGlobalClick() {
|
|
20345
20329
|
const clickHandlers = vue.ref([]);
|
|
20346
20330
|
const handleGlobalClick = (event) => {
|
|
20331
|
+
console.log('handleGlobalClick');
|
|
20347
20332
|
clickHandlers.value.forEach(handler => {
|
|
20348
20333
|
try {
|
|
20349
20334
|
handler(event);
|
|
@@ -20362,10 +20347,10 @@
|
|
|
20362
20347
|
clickHandlers.value = [];
|
|
20363
20348
|
};
|
|
20364
20349
|
vue.onMounted(() => {
|
|
20365
|
-
window.addEventListener('click', handleGlobalClick);
|
|
20350
|
+
window.addEventListener('click', handleGlobalClick, true);
|
|
20366
20351
|
});
|
|
20367
20352
|
vue.onBeforeUnmount(() => {
|
|
20368
|
-
window.removeEventListener('click', handleGlobalClick);
|
|
20353
|
+
window.removeEventListener('click', handleGlobalClick, true);
|
|
20369
20354
|
clearClickHandlers();
|
|
20370
20355
|
});
|
|
20371
20356
|
return {
|