pxx-vue-quill 1.0.120 → 1.0.122
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
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-10T04:
|
|
10
|
+
* Date: 2025-09-10T04:28:14.557Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18650,6 +18650,7 @@
|
|
|
18650
18650
|
}, [
|
|
18651
18651
|
vue.h('input', {
|
|
18652
18652
|
type: 'text',
|
|
18653
|
+
class: 'custom-link-input',
|
|
18653
18654
|
value: localLinkUrl.value,
|
|
18654
18655
|
placeholder: '请输入链接',
|
|
18655
18656
|
onInput: (e) => {
|
|
@@ -18768,52 +18769,44 @@
|
|
|
18768
18769
|
|
|
18769
18770
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
|
|
18770
18771
|
|
|
18771
|
-
var Action = {};
|
|
18772
|
+
var Action$1 = {};
|
|
18772
18773
|
|
|
18773
|
-
|
|
18774
|
+
Object.defineProperty(Action$1, "__esModule", {
|
|
18775
|
+
value: true
|
|
18776
|
+
});
|
|
18774
18777
|
|
|
18775
|
-
function
|
|
18776
|
-
if (hasRequiredAction) return Action;
|
|
18777
|
-
hasRequiredAction = 1;
|
|
18778
|
+
var _createClass$3 = 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; }; }();
|
|
18778
18779
|
|
|
18779
|
-
|
|
18780
|
-
value: true
|
|
18781
|
-
});
|
|
18780
|
+
var _BlotFormatter$2 = requireBlotFormatter();
|
|
18782
18781
|
|
|
18783
|
-
|
|
18782
|
+
_interopRequireDefault$2(_BlotFormatter$2);
|
|
18784
18783
|
|
|
18785
|
-
|
|
18784
|
+
function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18786
18785
|
|
|
18787
|
-
|
|
18786
|
+
function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18788
18787
|
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18788
|
+
var Action = function () {
|
|
18789
|
+
function Action(formatter) {
|
|
18790
|
+
_classCallCheck$3(this, Action);
|
|
18792
18791
|
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
_classCallCheck(this, Action);
|
|
18796
|
-
|
|
18797
|
-
this.formatter = formatter;
|
|
18798
|
-
}
|
|
18792
|
+
this.formatter = formatter;
|
|
18793
|
+
}
|
|
18799
18794
|
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18795
|
+
_createClass$3(Action, [{
|
|
18796
|
+
key: 'onCreate',
|
|
18797
|
+
value: function onCreate() {}
|
|
18798
|
+
}, {
|
|
18799
|
+
key: 'onDestroy',
|
|
18800
|
+
value: function onDestroy() {}
|
|
18801
|
+
}, {
|
|
18802
|
+
key: 'onUpdate',
|
|
18803
|
+
value: function onUpdate() {}
|
|
18804
|
+
}]);
|
|
18810
18805
|
|
|
18811
|
-
|
|
18812
|
-
|
|
18806
|
+
return Action;
|
|
18807
|
+
}();
|
|
18813
18808
|
|
|
18814
|
-
|
|
18815
|
-
return Action;
|
|
18816
|
-
}
|
|
18809
|
+
Action$1.default = Action;
|
|
18817
18810
|
|
|
18818
18811
|
var hasRequiredBlotFormatter;
|
|
18819
18812
|
|
|
@@ -18835,7 +18828,7 @@
|
|
|
18835
18828
|
|
|
18836
18829
|
var _Options2 = _interopRequireDefault(_Options);
|
|
18837
18830
|
|
|
18838
|
-
var _Action =
|
|
18831
|
+
var _Action = Action$1;
|
|
18839
18832
|
|
|
18840
18833
|
_interopRequireDefault(_Action);
|
|
18841
18834
|
|
|
@@ -18993,11 +18986,11 @@
|
|
|
18993
18986
|
value: true
|
|
18994
18987
|
});
|
|
18995
18988
|
|
|
18996
|
-
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; }; }();
|
|
18989
|
+
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; }; }();
|
|
18997
18990
|
|
|
18998
18991
|
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; }
|
|
18999
18992
|
|
|
19000
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18993
|
+
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19001
18994
|
|
|
19002
18995
|
var LEFT_ALIGN = 'left';
|
|
19003
18996
|
var CENTER_ALIGN = 'center';
|
|
@@ -19008,7 +19001,7 @@
|
|
|
19008
19001
|
var _this = this,
|
|
19009
19002
|
_alignments;
|
|
19010
19003
|
|
|
19011
|
-
_classCallCheck(this, DefaultAligner);
|
|
19004
|
+
_classCallCheck$2(this, DefaultAligner);
|
|
19012
19005
|
|
|
19013
19006
|
this.applyStyle = options.aligner.applyStyle;
|
|
19014
19007
|
this.alignAttribute = options.attribute;
|
|
@@ -19036,7 +19029,7 @@
|
|
|
19036
19029
|
}), _alignments);
|
|
19037
19030
|
}
|
|
19038
19031
|
|
|
19039
|
-
_createClass(DefaultAligner, [{
|
|
19032
|
+
_createClass$2(DefaultAligner, [{
|
|
19040
19033
|
key: 'getAlignments',
|
|
19041
19034
|
value: function getAlignments() {
|
|
19042
19035
|
var _this2 = this;
|
|
@@ -19274,7 +19267,7 @@
|
|
|
19274
19267
|
|
|
19275
19268
|
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; }; }();
|
|
19276
19269
|
|
|
19277
|
-
var _Action2 =
|
|
19270
|
+
var _Action2 = Action$1;
|
|
19278
19271
|
|
|
19279
19272
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19280
19273
|
|
|
@@ -19339,190 +19332,182 @@
|
|
|
19339
19332
|
return AlignAction;
|
|
19340
19333
|
}
|
|
19341
19334
|
|
|
19342
|
-
var ResizeAction = {};
|
|
19335
|
+
var ResizeAction$1 = {};
|
|
19343
19336
|
|
|
19344
|
-
|
|
19337
|
+
Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
19338
|
+
value: true
|
|
19339
|
+
});
|
|
19345
19340
|
|
|
19346
|
-
function
|
|
19347
|
-
if (hasRequiredResizeAction) return ResizeAction;
|
|
19348
|
-
hasRequiredResizeAction = 1;
|
|
19341
|
+
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; }; }();
|
|
19349
19342
|
|
|
19350
|
-
|
|
19351
|
-
value: true
|
|
19352
|
-
});
|
|
19343
|
+
var _Action2 = Action$1;
|
|
19353
19344
|
|
|
19354
|
-
|
|
19345
|
+
var _Action3 = _interopRequireDefault$1(_Action2);
|
|
19355
19346
|
|
|
19356
|
-
|
|
19347
|
+
var _BlotFormatter$1 = requireBlotFormatter();
|
|
19357
19348
|
|
|
19358
|
-
|
|
19349
|
+
_interopRequireDefault$1(_BlotFormatter$1);
|
|
19359
19350
|
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19351
|
+
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19363
19352
|
|
|
19364
|
-
|
|
19365
|
-
|
|
19366
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19353
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19367
19354
|
|
|
19368
|
-
|
|
19355
|
+
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; }
|
|
19369
19356
|
|
|
19370
|
-
|
|
19357
|
+
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; }
|
|
19371
19358
|
|
|
19372
|
-
|
|
19373
|
-
|
|
19359
|
+
var ResizeAction = function (_Action) {
|
|
19360
|
+
_inherits$1(ResizeAction, _Action);
|
|
19374
19361
|
|
|
19375
|
-
|
|
19376
|
-
|
|
19362
|
+
function ResizeAction(formatter) {
|
|
19363
|
+
_classCallCheck$1(this, ResizeAction);
|
|
19377
19364
|
|
|
19378
|
-
|
|
19365
|
+
var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19379
19366
|
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19367
|
+
_this.onMouseDown = function (event) {
|
|
19368
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19369
|
+
return;
|
|
19370
|
+
}
|
|
19371
|
+
_this.dragHandle = event.target;
|
|
19372
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19386
19373
|
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19374
|
+
if (!_this.formatter.currentSpec) {
|
|
19375
|
+
return;
|
|
19376
|
+
}
|
|
19390
19377
|
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19378
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19379
|
+
if (!target) {
|
|
19380
|
+
return;
|
|
19381
|
+
}
|
|
19395
19382
|
|
|
19396
|
-
|
|
19383
|
+
var rect = target.getBoundingClientRect();
|
|
19397
19384
|
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19385
|
+
_this.dragStartX = event.clientX;
|
|
19386
|
+
_this.preDragWidth = rect.width;
|
|
19387
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19401
19388
|
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19389
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19390
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19391
|
+
};
|
|
19405
19392
|
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19393
|
+
_this.onDrag = function (event) {
|
|
19394
|
+
if (!_this.formatter.currentSpec) {
|
|
19395
|
+
return;
|
|
19396
|
+
}
|
|
19410
19397
|
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19398
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19399
|
+
if (!target) {
|
|
19400
|
+
return;
|
|
19401
|
+
}
|
|
19415
19402
|
|
|
19416
|
-
|
|
19417
|
-
|
|
19403
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19404
|
+
var newWidth = 0;
|
|
19418
19405
|
|
|
19419
|
-
|
|
19420
|
-
|
|
19421
|
-
|
|
19422
|
-
|
|
19423
|
-
|
|
19406
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19407
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19408
|
+
} else {
|
|
19409
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19410
|
+
}
|
|
19424
19411
|
|
|
19425
|
-
|
|
19412
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19426
19413
|
|
|
19427
|
-
|
|
19428
|
-
|
|
19414
|
+
target.setAttribute('width', '' + newWidth);
|
|
19415
|
+
target.setAttribute('height', '' + newHeight);
|
|
19429
19416
|
|
|
19430
|
-
|
|
19431
|
-
|
|
19417
|
+
_this.formatter.update();
|
|
19418
|
+
};
|
|
19432
19419
|
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19420
|
+
_this.onMouseUp = function () {
|
|
19421
|
+
_this.setCursor('');
|
|
19422
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19423
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19424
|
+
};
|
|
19438
19425
|
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19426
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19427
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19428
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19429
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19430
|
+
_this.dragHandle = null;
|
|
19431
|
+
_this.dragStartX = 0;
|
|
19432
|
+
_this.preDragWidth = 0;
|
|
19433
|
+
_this.targetRatio = 0;
|
|
19434
|
+
return _this;
|
|
19435
|
+
}
|
|
19449
19436
|
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19437
|
+
_createClass$1(ResizeAction, [{
|
|
19438
|
+
key: 'onCreate',
|
|
19439
|
+
value: function onCreate() {
|
|
19440
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19441
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19442
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19443
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19457
19444
|
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
|
|
19468
|
-
|
|
19469
|
-
|
|
19470
|
-
|
|
19471
|
-
|
|
19472
|
-
|
|
19473
|
-
|
|
19474
|
-
|
|
19475
|
-
|
|
19476
|
-
|
|
19477
|
-
|
|
19478
|
-
|
|
19479
|
-
|
|
19445
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19446
|
+
}
|
|
19447
|
+
}, {
|
|
19448
|
+
key: 'onDestroy',
|
|
19449
|
+
value: function onDestroy() {
|
|
19450
|
+
this.setCursor('');
|
|
19451
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19452
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19453
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19454
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19455
|
+
}
|
|
19456
|
+
}, {
|
|
19457
|
+
key: 'createHandle',
|
|
19458
|
+
value: function createHandle(position, cursor) {
|
|
19459
|
+
var box = document.createElement('div');
|
|
19460
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19461
|
+
box.setAttribute('data-position', position);
|
|
19462
|
+
box.style.cursor = cursor;
|
|
19463
|
+
|
|
19464
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19465
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19466
|
+
}
|
|
19480
19467
|
|
|
19481
|
-
|
|
19468
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19482
19469
|
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19470
|
+
return box;
|
|
19471
|
+
}
|
|
19472
|
+
}, {
|
|
19473
|
+
key: 'repositionHandles',
|
|
19474
|
+
value: function repositionHandles(handleStyle) {
|
|
19475
|
+
var handleXOffset = '0px';
|
|
19476
|
+
var handleYOffset = '0px';
|
|
19477
|
+
if (handleStyle) {
|
|
19478
|
+
if (handleStyle.width) {
|
|
19479
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19480
|
+
}
|
|
19481
|
+
if (handleStyle.height) {
|
|
19482
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19483
|
+
}
|
|
19484
|
+
}
|
|
19498
19485
|
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19486
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19487
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19488
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19489
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19490
|
+
}
|
|
19491
|
+
}, {
|
|
19492
|
+
key: 'setCursor',
|
|
19493
|
+
value: function setCursor(value) {
|
|
19494
|
+
if (document.body) {
|
|
19495
|
+
document.body.style.cursor = value;
|
|
19496
|
+
}
|
|
19510
19497
|
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19514
|
-
|
|
19515
|
-
|
|
19516
|
-
|
|
19517
|
-
|
|
19518
|
-
|
|
19498
|
+
if (this.formatter.currentSpec) {
|
|
19499
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19500
|
+
if (target) {
|
|
19501
|
+
target.style.cursor = value;
|
|
19502
|
+
}
|
|
19503
|
+
}
|
|
19504
|
+
}
|
|
19505
|
+
}]);
|
|
19519
19506
|
|
|
19520
|
-
|
|
19521
|
-
|
|
19507
|
+
return ResizeAction;
|
|
19508
|
+
}(_Action3.default);
|
|
19522
19509
|
|
|
19523
|
-
|
|
19524
|
-
return ResizeAction;
|
|
19525
|
-
}
|
|
19510
|
+
ResizeAction$1.default = ResizeAction;
|
|
19526
19511
|
|
|
19527
19512
|
var DeleteAction = {};
|
|
19528
19513
|
|
|
@@ -19542,7 +19527,7 @@
|
|
|
19542
19527
|
|
|
19543
19528
|
var _quill2 = _interopRequireDefault(_quill);
|
|
19544
19529
|
|
|
19545
|
-
var _Action2 =
|
|
19530
|
+
var _Action2 = Action$1;
|
|
19546
19531
|
|
|
19547
19532
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19548
19533
|
|
|
@@ -19621,7 +19606,7 @@
|
|
|
19621
19606
|
|
|
19622
19607
|
_interopRequireDefault(_BlotFormatter);
|
|
19623
19608
|
|
|
19624
|
-
var _Action =
|
|
19609
|
+
var _Action = Action$1;
|
|
19625
19610
|
|
|
19626
19611
|
_interopRequireDefault(_Action);
|
|
19627
19612
|
|
|
@@ -19629,7 +19614,7 @@
|
|
|
19629
19614
|
|
|
19630
19615
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19631
19616
|
|
|
19632
|
-
var _ResizeAction =
|
|
19617
|
+
var _ResizeAction = ResizeAction$1;
|
|
19633
19618
|
|
|
19634
19619
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19635
19620
|
|
|
@@ -19761,156 +19746,148 @@
|
|
|
19761
19746
|
|
|
19762
19747
|
var IframeVideoSpec = {};
|
|
19763
19748
|
|
|
19764
|
-
var UnclickableBlotSpec = {};
|
|
19765
|
-
|
|
19766
|
-
var hasRequiredUnclickableBlotSpec;
|
|
19767
|
-
|
|
19768
|
-
function requireUnclickableBlotSpec () {
|
|
19769
|
-
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19770
|
-
hasRequiredUnclickableBlotSpec = 1;
|
|
19771
|
-
|
|
19772
|
-
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19773
|
-
value: true
|
|
19774
|
-
});
|
|
19749
|
+
var UnclickableBlotSpec$1 = {};
|
|
19775
19750
|
|
|
19776
|
-
|
|
19751
|
+
Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
|
|
19752
|
+
value: true
|
|
19753
|
+
});
|
|
19777
19754
|
|
|
19778
|
-
|
|
19755
|
+
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; }; }();
|
|
19779
19756
|
|
|
19780
|
-
|
|
19757
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19781
19758
|
|
|
19782
|
-
|
|
19759
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19783
19760
|
|
|
19784
|
-
|
|
19761
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19785
19762
|
|
|
19786
|
-
|
|
19763
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19787
19764
|
|
|
19788
|
-
|
|
19765
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19789
19766
|
|
|
19790
|
-
|
|
19767
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19791
19768
|
|
|
19792
|
-
|
|
19769
|
+
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; }
|
|
19793
19770
|
|
|
19794
|
-
|
|
19795
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19771
|
+
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; }
|
|
19796
19772
|
|
|
19797
|
-
|
|
19798
|
-
|
|
19773
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19774
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19799
19775
|
|
|
19800
|
-
|
|
19801
|
-
|
|
19776
|
+
var UnclickableBlotSpec = function (_BlotSpec) {
|
|
19777
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19802
19778
|
|
|
19803
|
-
|
|
19779
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19780
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19804
19781
|
|
|
19805
|
-
|
|
19806
|
-
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19807
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19808
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19809
|
-
});
|
|
19810
|
-
};
|
|
19782
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19811
19783
|
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
|
|
19815
|
-
|
|
19816
|
-
|
|
19784
|
+
_this.onTextChange = function () {
|
|
19785
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19786
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19787
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19788
|
+
});
|
|
19789
|
+
};
|
|
19817
19790
|
|
|
19818
|
-
|
|
19819
|
-
|
|
19820
|
-
|
|
19791
|
+
_this.onMouseEnter = function (event) {
|
|
19792
|
+
var unclickable = event.target;
|
|
19793
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19794
|
+
return;
|
|
19795
|
+
}
|
|
19821
19796
|
|
|
19822
|
-
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
_this.formatter.show(_this);
|
|
19826
|
-
_this.hideProxyImage();
|
|
19827
|
-
};
|
|
19797
|
+
_this.nextUnclickable = unclickable;
|
|
19798
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19799
|
+
};
|
|
19828
19800
|
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19801
|
+
_this.onProxyImageClick = function () {
|
|
19802
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19803
|
+
_this.nextUnclickable = null;
|
|
19804
|
+
_this.formatter.show(_this);
|
|
19805
|
+
_this.hideProxyImage();
|
|
19806
|
+
};
|
|
19834
19807
|
|
|
19835
|
-
|
|
19836
|
-
|
|
19837
|
-
|
|
19838
|
-
|
|
19839
|
-
|
|
19840
|
-
it's important that this is attached to the body instead of the root quill element.
|
|
19841
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19842
|
-
*/
|
|
19843
|
-
document.body.appendChild(this.createProxyImage());
|
|
19844
|
-
}
|
|
19808
|
+
_this.selector = selector;
|
|
19809
|
+
_this.unclickable = null;
|
|
19810
|
+
_this.nextUnclickable = null;
|
|
19811
|
+
return _this;
|
|
19812
|
+
}
|
|
19845
19813
|
|
|
19846
|
-
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
|
|
19853
|
-
|
|
19854
|
-
|
|
19855
|
-
|
|
19856
|
-
key: 'getOverlayElement',
|
|
19857
|
-
value: function getOverlayElement() {
|
|
19858
|
-
return this.unclickable;
|
|
19859
|
-
}
|
|
19860
|
-
}, {
|
|
19861
|
-
key: 'onHide',
|
|
19862
|
-
value: function onHide() {
|
|
19863
|
-
this.hideProxyImage();
|
|
19864
|
-
this.nextUnclickable = null;
|
|
19865
|
-
this.unclickable = null;
|
|
19866
|
-
}
|
|
19867
|
-
}, {
|
|
19868
|
-
key: 'createProxyImage',
|
|
19869
|
-
value: function createProxyImage() {
|
|
19870
|
-
var canvas = document.createElement('canvas');
|
|
19871
|
-
var context = canvas.getContext('2d');
|
|
19872
|
-
context.globalAlpha = 0;
|
|
19873
|
-
context.fillRect(0, 0, 1, 1);
|
|
19874
|
-
|
|
19875
|
-
this.proxyImage = document.createElement('img');
|
|
19876
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19877
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19878
|
-
|
|
19879
|
-
Object.assign(this.proxyImage.style, {
|
|
19880
|
-
position: 'absolute',
|
|
19881
|
-
margin: '0'
|
|
19882
|
-
});
|
|
19814
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19815
|
+
key: 'init',
|
|
19816
|
+
value: function init() {
|
|
19817
|
+
if (document.body) {
|
|
19818
|
+
/*
|
|
19819
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19820
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19821
|
+
*/
|
|
19822
|
+
document.body.appendChild(this.createProxyImage());
|
|
19823
|
+
}
|
|
19883
19824
|
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19825
|
+
this.hideProxyImage();
|
|
19826
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19827
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19828
|
+
}
|
|
19829
|
+
}, {
|
|
19830
|
+
key: 'getTargetElement',
|
|
19831
|
+
value: function getTargetElement() {
|
|
19832
|
+
return this.unclickable;
|
|
19833
|
+
}
|
|
19834
|
+
}, {
|
|
19835
|
+
key: 'getOverlayElement',
|
|
19836
|
+
value: function getOverlayElement() {
|
|
19837
|
+
return this.unclickable;
|
|
19838
|
+
}
|
|
19839
|
+
}, {
|
|
19840
|
+
key: 'onHide',
|
|
19841
|
+
value: function onHide() {
|
|
19842
|
+
this.hideProxyImage();
|
|
19843
|
+
this.nextUnclickable = null;
|
|
19844
|
+
this.unclickable = null;
|
|
19845
|
+
}
|
|
19846
|
+
}, {
|
|
19847
|
+
key: 'createProxyImage',
|
|
19848
|
+
value: function createProxyImage() {
|
|
19849
|
+
var canvas = document.createElement('canvas');
|
|
19850
|
+
var context = canvas.getContext('2d');
|
|
19851
|
+
context.globalAlpha = 0;
|
|
19852
|
+
context.fillRect(0, 0, 1, 1);
|
|
19853
|
+
|
|
19854
|
+
this.proxyImage = document.createElement('img');
|
|
19855
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19856
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19857
|
+
|
|
19858
|
+
Object.assign(this.proxyImage.style, {
|
|
19859
|
+
position: 'absolute',
|
|
19860
|
+
margin: '0'
|
|
19861
|
+
});
|
|
19897
19862
|
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
|
|
19905
|
-
|
|
19906
|
-
|
|
19863
|
+
return this.proxyImage;
|
|
19864
|
+
}
|
|
19865
|
+
}, {
|
|
19866
|
+
key: 'hideProxyImage',
|
|
19867
|
+
value: function hideProxyImage() {
|
|
19868
|
+
Object.assign(this.proxyImage.style, {
|
|
19869
|
+
display: 'none'
|
|
19870
|
+
});
|
|
19871
|
+
}
|
|
19872
|
+
}, {
|
|
19873
|
+
key: 'repositionProxyImage',
|
|
19874
|
+
value: function repositionProxyImage(unclickable) {
|
|
19875
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19876
|
+
|
|
19877
|
+
Object.assign(this.proxyImage.style, {
|
|
19878
|
+
display: 'block',
|
|
19879
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19880
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19881
|
+
width: rect.width + 'px',
|
|
19882
|
+
height: rect.height + 'px'
|
|
19883
|
+
});
|
|
19884
|
+
}
|
|
19885
|
+
}]);
|
|
19907
19886
|
|
|
19908
|
-
|
|
19909
|
-
|
|
19887
|
+
return UnclickableBlotSpec;
|
|
19888
|
+
}(_BlotSpec3.default);
|
|
19910
19889
|
|
|
19911
|
-
|
|
19912
|
-
return UnclickableBlotSpec;
|
|
19913
|
-
}
|
|
19890
|
+
UnclickableBlotSpec$1.default = UnclickableBlotSpec;
|
|
19914
19891
|
|
|
19915
19892
|
var hasRequiredIframeVideoSpec;
|
|
19916
19893
|
|
|
@@ -19922,7 +19899,7 @@
|
|
|
19922
19899
|
value: true
|
|
19923
19900
|
});
|
|
19924
19901
|
|
|
19925
|
-
var _UnclickableBlotSpec2 =
|
|
19902
|
+
var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
|
|
19926
19903
|
|
|
19927
19904
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19928
19905
|
|
|
@@ -20077,7 +20054,7 @@
|
|
|
20077
20054
|
}
|
|
20078
20055
|
});
|
|
20079
20056
|
|
|
20080
|
-
var _Action =
|
|
20057
|
+
var _Action = Action$1;
|
|
20081
20058
|
|
|
20082
20059
|
Object.defineProperty(exports, 'Action', {
|
|
20083
20060
|
enumerable: true,
|
|
@@ -20122,7 +20099,7 @@
|
|
|
20122
20099
|
}
|
|
20123
20100
|
});
|
|
20124
20101
|
|
|
20125
|
-
var _ResizeAction =
|
|
20102
|
+
var _ResizeAction = ResizeAction$1;
|
|
20126
20103
|
|
|
20127
20104
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
20128
20105
|
enumerable: true,
|
|
@@ -20149,7 +20126,7 @@
|
|
|
20149
20126
|
}
|
|
20150
20127
|
});
|
|
20151
20128
|
|
|
20152
|
-
var _UnclickableBlotSpec =
|
|
20129
|
+
var _UnclickableBlotSpec = UnclickableBlotSpec$1;
|
|
20153
20130
|
|
|
20154
20131
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20155
20132
|
enumerable: true,
|
|
@@ -20201,32 +20178,6 @@
|
|
|
20201
20178
|
removeQuillBlotFormatter();
|
|
20202
20179
|
}
|
|
20203
20180
|
};
|
|
20204
|
-
const handleGlobalKeyup = (event) => {
|
|
20205
|
-
var _a;
|
|
20206
|
-
if (event.keyCode !== 46 && event.keyCode !== 8)
|
|
20207
|
-
return;
|
|
20208
|
-
const blotFormatter = (_a = quillRef.value) === null || _a === void 0 ? void 0 : _a.getModule('blotFormatter');
|
|
20209
|
-
if (!blotFormatter || !blotFormatter.currentSpec)
|
|
20210
|
-
return;
|
|
20211
|
-
const target = event.target;
|
|
20212
|
-
if (!editor.value || !editor.value.contains(target)) {
|
|
20213
|
-
event.stopImmediatePropagation();
|
|
20214
|
-
event.preventDefault();
|
|
20215
|
-
return;
|
|
20216
|
-
}
|
|
20217
|
-
const allEditors = document.querySelectorAll('.quill-editor-container');
|
|
20218
|
-
allEditors.forEach(editorElement => {
|
|
20219
|
-
if (editorElement !== editor.value) {
|
|
20220
|
-
const otherQuill = editorElement.__quill;
|
|
20221
|
-
if (otherQuill && otherQuill !== quillRef.value) {
|
|
20222
|
-
const otherBlotFormatter = otherQuill.getModule('blotFormatter');
|
|
20223
|
-
if (otherBlotFormatter && otherBlotFormatter.currentSpec) {
|
|
20224
|
-
otherBlotFormatter.hide();
|
|
20225
|
-
}
|
|
20226
|
-
}
|
|
20227
|
-
}
|
|
20228
|
-
});
|
|
20229
|
-
};
|
|
20230
20181
|
const configureBlotFormatter = () => {
|
|
20231
20182
|
if (!quillRef.value)
|
|
20232
20183
|
return;
|
|
@@ -20293,11 +20244,9 @@
|
|
|
20293
20244
|
};
|
|
20294
20245
|
vue.onMounted(() => {
|
|
20295
20246
|
window.addEventListener('click', handleGlobalClick, true);
|
|
20296
|
-
window.addEventListener('keyup', handleGlobalKeyup, true);
|
|
20297
20247
|
});
|
|
20298
20248
|
vue.onBeforeUnmount(() => {
|
|
20299
20249
|
window.removeEventListener('click', handleGlobalClick, true);
|
|
20300
|
-
window.removeEventListener('keyup', handleGlobalKeyup, true);
|
|
20301
20250
|
removeQuillBlotFormatter();
|
|
20302
20251
|
});
|
|
20303
20252
|
const setQuill = (quillInstance) => {
|
|
@@ -20308,7 +20257,6 @@
|
|
|
20308
20257
|
setQuill,
|
|
20309
20258
|
removeQuillBlotFormatter,
|
|
20310
20259
|
handleGlobalClick,
|
|
20311
|
-
handleGlobalKeyup,
|
|
20312
20260
|
configureBlotFormatter,
|
|
20313
20261
|
applyImageStyle,
|
|
20314
20262
|
registerBlotFormatter,
|