pxx-vue-quill 1.0.9 → 1.0.11
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.cjs.js +7 -3
- package/dist/vue-quill.cjs.prod.js +2 -2
- package/dist/vue-quill.esm-browser.js +309 -313
- package/dist/vue-quill.esm-browser.prod.js +2 -2
- package/dist/vue-quill.esm-bundler.js +7 -3
- package/dist/vue-quill.esm-bundler.prod.js +2 -2
- package/dist/vue-quill.global.js +7 -3
- package/dist/vue-quill.global.prod.js +2 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-08-
|
|
10
|
+
* Date: 2025-08-21T07:17:13.736Z
|
|
11
11
|
*/
|
|
12
12
|
import { defineComponent, onMounted, onBeforeUnmount, ref, computed, watch, nextTick, h } from 'vue';
|
|
13
13
|
|
|
@@ -18555,52 +18555,44 @@ var es = /*#__PURE__*/Object.freeze({
|
|
|
18555
18555
|
|
|
18556
18556
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
|
|
18557
18557
|
|
|
18558
|
-
var Action = {};
|
|
18558
|
+
var Action$1 = {};
|
|
18559
18559
|
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
if (hasRequiredAction) return Action;
|
|
18564
|
-
hasRequiredAction = 1;
|
|
18565
|
-
|
|
18566
|
-
Object.defineProperty(Action, "__esModule", {
|
|
18567
|
-
value: true
|
|
18568
|
-
});
|
|
18560
|
+
Object.defineProperty(Action$1, "__esModule", {
|
|
18561
|
+
value: true
|
|
18562
|
+
});
|
|
18569
18563
|
|
|
18570
|
-
|
|
18564
|
+
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; }; }();
|
|
18571
18565
|
|
|
18572
|
-
|
|
18566
|
+
var _BlotFormatter$1 = requireBlotFormatter();
|
|
18573
18567
|
|
|
18574
|
-
|
|
18568
|
+
_interopRequireDefault$1(_BlotFormatter$1);
|
|
18575
18569
|
|
|
18576
|
-
|
|
18570
|
+
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18577
18571
|
|
|
18578
|
-
|
|
18572
|
+
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18579
18573
|
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
|
|
18574
|
+
var Action = function () {
|
|
18575
|
+
function Action(formatter) {
|
|
18576
|
+
_classCallCheck$2(this, Action);
|
|
18583
18577
|
|
|
18584
|
-
|
|
18585
|
-
|
|
18578
|
+
this.formatter = formatter;
|
|
18579
|
+
}
|
|
18586
18580
|
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
|
|
18581
|
+
_createClass$2(Action, [{
|
|
18582
|
+
key: 'onCreate',
|
|
18583
|
+
value: function onCreate() {}
|
|
18584
|
+
}, {
|
|
18585
|
+
key: 'onDestroy',
|
|
18586
|
+
value: function onDestroy() {}
|
|
18587
|
+
}, {
|
|
18588
|
+
key: 'onUpdate',
|
|
18589
|
+
value: function onUpdate() {}
|
|
18590
|
+
}]);
|
|
18597
18591
|
|
|
18598
|
-
|
|
18599
|
-
|
|
18592
|
+
return Action;
|
|
18593
|
+
}();
|
|
18600
18594
|
|
|
18601
|
-
|
|
18602
|
-
return Action;
|
|
18603
|
-
}
|
|
18595
|
+
Action$1.default = Action;
|
|
18604
18596
|
|
|
18605
18597
|
var hasRequiredBlotFormatter;
|
|
18606
18598
|
|
|
@@ -18622,7 +18614,7 @@ function requireBlotFormatter () {
|
|
|
18622
18614
|
|
|
18623
18615
|
var _Options2 = _interopRequireDefault(_Options);
|
|
18624
18616
|
|
|
18625
|
-
var _Action =
|
|
18617
|
+
var _Action = Action$1;
|
|
18626
18618
|
|
|
18627
18619
|
_interopRequireDefault(_Action);
|
|
18628
18620
|
|
|
@@ -19061,7 +19053,7 @@ function requireAlignAction () {
|
|
|
19061
19053
|
|
|
19062
19054
|
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; }; }();
|
|
19063
19055
|
|
|
19064
|
-
var _Action2 =
|
|
19056
|
+
var _Action2 = Action$1;
|
|
19065
19057
|
|
|
19066
19058
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19067
19059
|
|
|
@@ -19126,182 +19118,190 @@ function requireAlignAction () {
|
|
|
19126
19118
|
return AlignAction;
|
|
19127
19119
|
}
|
|
19128
19120
|
|
|
19129
|
-
var ResizeAction
|
|
19121
|
+
var ResizeAction = {};
|
|
19130
19122
|
|
|
19131
|
-
|
|
19132
|
-
value: true
|
|
19133
|
-
});
|
|
19123
|
+
var hasRequiredResizeAction;
|
|
19134
19124
|
|
|
19135
|
-
|
|
19125
|
+
function requireResizeAction () {
|
|
19126
|
+
if (hasRequiredResizeAction) return ResizeAction;
|
|
19127
|
+
hasRequiredResizeAction = 1;
|
|
19136
19128
|
|
|
19137
|
-
|
|
19129
|
+
Object.defineProperty(ResizeAction, "__esModule", {
|
|
19130
|
+
value: true
|
|
19131
|
+
});
|
|
19138
19132
|
|
|
19139
|
-
var
|
|
19133
|
+
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; }; }();
|
|
19140
19134
|
|
|
19141
|
-
var
|
|
19135
|
+
var _Action2 = Action$1;
|
|
19142
19136
|
|
|
19143
|
-
_interopRequireDefault(
|
|
19137
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19144
19138
|
|
|
19145
|
-
|
|
19139
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19146
19140
|
|
|
19147
|
-
|
|
19141
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19148
19142
|
|
|
19149
|
-
function
|
|
19143
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19150
19144
|
|
|
19151
|
-
function
|
|
19145
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19152
19146
|
|
|
19153
|
-
|
|
19154
|
-
_inherits(ResizeAction, _Action);
|
|
19147
|
+
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; }
|
|
19155
19148
|
|
|
19156
|
-
|
|
19157
|
-
_classCallCheck(this, ResizeAction);
|
|
19149
|
+
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; }
|
|
19158
19150
|
|
|
19159
|
-
|
|
19151
|
+
var ResizeAction$1 = function (_Action) {
|
|
19152
|
+
_inherits(ResizeAction, _Action);
|
|
19160
19153
|
|
|
19161
|
-
|
|
19162
|
-
|
|
19163
|
-
return;
|
|
19164
|
-
}
|
|
19165
|
-
_this.dragHandle = event.target;
|
|
19166
|
-
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19154
|
+
function ResizeAction(formatter) {
|
|
19155
|
+
_classCallCheck(this, ResizeAction);
|
|
19167
19156
|
|
|
19168
|
-
|
|
19169
|
-
return;
|
|
19170
|
-
}
|
|
19157
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19171
19158
|
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19159
|
+
_this.onMouseDown = function (event) {
|
|
19160
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19161
|
+
return;
|
|
19162
|
+
}
|
|
19163
|
+
_this.dragHandle = event.target;
|
|
19164
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19176
19165
|
|
|
19177
|
-
|
|
19166
|
+
if (!_this.formatter.currentSpec) {
|
|
19167
|
+
return;
|
|
19168
|
+
}
|
|
19178
19169
|
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19170
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19171
|
+
if (!target) {
|
|
19172
|
+
return;
|
|
19173
|
+
}
|
|
19182
19174
|
|
|
19183
|
-
|
|
19184
|
-
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19185
|
-
};
|
|
19175
|
+
var rect = target.getBoundingClientRect();
|
|
19186
19176
|
|
|
19187
|
-
|
|
19188
|
-
|
|
19189
|
-
|
|
19190
|
-
}
|
|
19177
|
+
_this.dragStartX = event.clientX;
|
|
19178
|
+
_this.preDragWidth = rect.width;
|
|
19179
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19191
19180
|
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19195
|
-
}
|
|
19181
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19182
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19183
|
+
};
|
|
19196
19184
|
|
|
19197
|
-
|
|
19198
|
-
|
|
19185
|
+
_this.onDrag = function (event) {
|
|
19186
|
+
if (!_this.formatter.currentSpec) {
|
|
19187
|
+
return;
|
|
19188
|
+
}
|
|
19199
19189
|
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
|
|
19203
|
-
|
|
19204
|
-
}
|
|
19190
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19191
|
+
if (!target) {
|
|
19192
|
+
return;
|
|
19193
|
+
}
|
|
19205
19194
|
|
|
19206
|
-
|
|
19195
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19196
|
+
var newWidth = 0;
|
|
19207
19197
|
|
|
19208
|
-
|
|
19209
|
-
|
|
19198
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19199
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19200
|
+
} else {
|
|
19201
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19202
|
+
}
|
|
19210
19203
|
|
|
19211
|
-
|
|
19212
|
-
};
|
|
19204
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19213
19205
|
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
document.removeEventListener('mousemove', _this.onDrag);
|
|
19217
|
-
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19218
|
-
};
|
|
19206
|
+
target.setAttribute('width', '' + newWidth);
|
|
19207
|
+
target.setAttribute('height', '' + newHeight);
|
|
19219
19208
|
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19223
|
-
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19224
|
-
_this.dragHandle = null;
|
|
19225
|
-
_this.dragStartX = 0;
|
|
19226
|
-
_this.preDragWidth = 0;
|
|
19227
|
-
_this.targetRatio = 0;
|
|
19228
|
-
return _this;
|
|
19229
|
-
}
|
|
19209
|
+
_this.formatter.update();
|
|
19210
|
+
};
|
|
19230
19211
|
|
|
19231
|
-
|
|
19232
|
-
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19237
|
-
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19212
|
+
_this.onMouseUp = function () {
|
|
19213
|
+
_this.setCursor('');
|
|
19214
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19215
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19216
|
+
};
|
|
19238
19217
|
|
|
19239
|
-
|
|
19240
|
-
|
|
19241
|
-
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
|
|
19245
|
-
|
|
19246
|
-
|
|
19247
|
-
|
|
19248
|
-
|
|
19249
|
-
}
|
|
19250
|
-
}, {
|
|
19251
|
-
key: 'createHandle',
|
|
19252
|
-
value: function createHandle(position, cursor) {
|
|
19253
|
-
var box = document.createElement('div');
|
|
19254
|
-
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19255
|
-
box.setAttribute('data-position', position);
|
|
19256
|
-
box.style.cursor = cursor;
|
|
19257
|
-
|
|
19258
|
-
if (this.formatter.options.resize.handleStyle) {
|
|
19259
|
-
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19260
|
-
}
|
|
19218
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19219
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19220
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19221
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19222
|
+
_this.dragHandle = null;
|
|
19223
|
+
_this.dragStartX = 0;
|
|
19224
|
+
_this.preDragWidth = 0;
|
|
19225
|
+
_this.targetRatio = 0;
|
|
19226
|
+
return _this;
|
|
19227
|
+
}
|
|
19261
19228
|
|
|
19262
|
-
|
|
19229
|
+
_createClass(ResizeAction, [{
|
|
19230
|
+
key: 'onCreate',
|
|
19231
|
+
value: function onCreate() {
|
|
19232
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19233
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19234
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19235
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19263
19236
|
|
|
19264
|
-
|
|
19265
|
-
|
|
19266
|
-
|
|
19267
|
-
|
|
19268
|
-
|
|
19269
|
-
|
|
19270
|
-
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
|
|
19278
|
-
|
|
19237
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19238
|
+
}
|
|
19239
|
+
}, {
|
|
19240
|
+
key: 'onDestroy',
|
|
19241
|
+
value: function onDestroy() {
|
|
19242
|
+
this.setCursor('');
|
|
19243
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19244
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19245
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19246
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19247
|
+
}
|
|
19248
|
+
}, {
|
|
19249
|
+
key: 'createHandle',
|
|
19250
|
+
value: function createHandle(position, cursor) {
|
|
19251
|
+
var box = document.createElement('div');
|
|
19252
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19253
|
+
box.setAttribute('data-position', position);
|
|
19254
|
+
box.style.cursor = cursor;
|
|
19255
|
+
|
|
19256
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19257
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19258
|
+
}
|
|
19279
19259
|
|
|
19280
|
-
|
|
19281
|
-
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19282
|
-
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19283
|
-
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19284
|
-
}
|
|
19285
|
-
}, {
|
|
19286
|
-
key: 'setCursor',
|
|
19287
|
-
value: function setCursor(value) {
|
|
19288
|
-
if (document.body) {
|
|
19289
|
-
document.body.style.cursor = value;
|
|
19290
|
-
}
|
|
19260
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19291
19261
|
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19262
|
+
return box;
|
|
19263
|
+
}
|
|
19264
|
+
}, {
|
|
19265
|
+
key: 'repositionHandles',
|
|
19266
|
+
value: function repositionHandles(handleStyle) {
|
|
19267
|
+
var handleXOffset = '0px';
|
|
19268
|
+
var handleYOffset = '0px';
|
|
19269
|
+
if (handleStyle) {
|
|
19270
|
+
if (handleStyle.width) {
|
|
19271
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19272
|
+
}
|
|
19273
|
+
if (handleStyle.height) {
|
|
19274
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19275
|
+
}
|
|
19276
|
+
}
|
|
19277
|
+
|
|
19278
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19279
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19280
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19281
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19282
|
+
}
|
|
19283
|
+
}, {
|
|
19284
|
+
key: 'setCursor',
|
|
19285
|
+
value: function setCursor(value) {
|
|
19286
|
+
if (document.body) {
|
|
19287
|
+
document.body.style.cursor = value;
|
|
19288
|
+
}
|
|
19289
|
+
|
|
19290
|
+
if (this.formatter.currentSpec) {
|
|
19291
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19292
|
+
if (target) {
|
|
19293
|
+
target.style.cursor = value;
|
|
19294
|
+
}
|
|
19295
|
+
}
|
|
19296
|
+
}
|
|
19297
|
+
}]);
|
|
19300
19298
|
|
|
19301
|
-
|
|
19302
|
-
}(_Action3.default);
|
|
19299
|
+
return ResizeAction;
|
|
19300
|
+
}(_Action3.default);
|
|
19303
19301
|
|
|
19304
|
-
ResizeAction
|
|
19302
|
+
ResizeAction.default = ResizeAction$1;
|
|
19303
|
+
return ResizeAction;
|
|
19304
|
+
}
|
|
19305
19305
|
|
|
19306
19306
|
var DeleteAction = {};
|
|
19307
19307
|
|
|
@@ -19321,7 +19321,7 @@ function requireDeleteAction () {
|
|
|
19321
19321
|
|
|
19322
19322
|
var _quill2 = _interopRequireDefault(_quill);
|
|
19323
19323
|
|
|
19324
|
-
var _Action2 =
|
|
19324
|
+
var _Action2 = Action$1;
|
|
19325
19325
|
|
|
19326
19326
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19327
19327
|
|
|
@@ -19400,7 +19400,7 @@ function requireBlotSpec () {
|
|
|
19400
19400
|
|
|
19401
19401
|
_interopRequireDefault(_BlotFormatter);
|
|
19402
19402
|
|
|
19403
|
-
var _Action =
|
|
19403
|
+
var _Action = Action$1;
|
|
19404
19404
|
|
|
19405
19405
|
_interopRequireDefault(_Action);
|
|
19406
19406
|
|
|
@@ -19408,7 +19408,7 @@ function requireBlotSpec () {
|
|
|
19408
19408
|
|
|
19409
19409
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19410
19410
|
|
|
19411
|
-
var _ResizeAction =
|
|
19411
|
+
var _ResizeAction = requireResizeAction();
|
|
19412
19412
|
|
|
19413
19413
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19414
19414
|
|
|
@@ -19540,156 +19540,148 @@ function requireImageSpec () {
|
|
|
19540
19540
|
|
|
19541
19541
|
var IframeVideoSpec = {};
|
|
19542
19542
|
|
|
19543
|
-
var UnclickableBlotSpec = {};
|
|
19544
|
-
|
|
19545
|
-
var hasRequiredUnclickableBlotSpec;
|
|
19546
|
-
|
|
19547
|
-
function requireUnclickableBlotSpec () {
|
|
19548
|
-
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19549
|
-
hasRequiredUnclickableBlotSpec = 1;
|
|
19543
|
+
var UnclickableBlotSpec$1 = {};
|
|
19550
19544
|
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19554
|
-
|
|
19555
|
-
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; }; }();
|
|
19545
|
+
Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
|
|
19546
|
+
value: true
|
|
19547
|
+
});
|
|
19556
19548
|
|
|
19557
|
-
|
|
19549
|
+
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; }; }();
|
|
19558
19550
|
|
|
19559
|
-
|
|
19551
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19560
19552
|
|
|
19561
|
-
|
|
19553
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19562
19554
|
|
|
19563
|
-
|
|
19555
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19564
19556
|
|
|
19565
|
-
|
|
19557
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19566
19558
|
|
|
19567
|
-
|
|
19559
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19568
19560
|
|
|
19569
|
-
|
|
19561
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19570
19562
|
|
|
19571
|
-
|
|
19563
|
+
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; }
|
|
19572
19564
|
|
|
19573
|
-
|
|
19574
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19565
|
+
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; }
|
|
19575
19566
|
|
|
19576
|
-
|
|
19577
|
-
|
|
19567
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19568
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19578
19569
|
|
|
19579
|
-
|
|
19580
|
-
|
|
19570
|
+
var UnclickableBlotSpec = function (_BlotSpec) {
|
|
19571
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19581
19572
|
|
|
19582
|
-
|
|
19573
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19574
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19583
19575
|
|
|
19584
|
-
|
|
19585
|
-
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19586
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19587
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19588
|
-
});
|
|
19589
|
-
};
|
|
19576
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19590
19577
|
|
|
19591
|
-
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
|
|
19578
|
+
_this.onTextChange = function () {
|
|
19579
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19580
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19581
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19582
|
+
});
|
|
19583
|
+
};
|
|
19596
19584
|
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19585
|
+
_this.onMouseEnter = function (event) {
|
|
19586
|
+
var unclickable = event.target;
|
|
19587
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19588
|
+
return;
|
|
19589
|
+
}
|
|
19600
19590
|
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
_this.formatter.show(_this);
|
|
19605
|
-
_this.hideProxyImage();
|
|
19606
|
-
};
|
|
19591
|
+
_this.nextUnclickable = unclickable;
|
|
19592
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19593
|
+
};
|
|
19607
19594
|
|
|
19608
|
-
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19595
|
+
_this.onProxyImageClick = function () {
|
|
19596
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19597
|
+
_this.nextUnclickable = null;
|
|
19598
|
+
_this.formatter.show(_this);
|
|
19599
|
+
_this.hideProxyImage();
|
|
19600
|
+
};
|
|
19613
19601
|
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
it's important that this is attached to the body instead of the root quill element.
|
|
19620
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19621
|
-
*/
|
|
19622
|
-
document.body.appendChild(this.createProxyImage());
|
|
19623
|
-
}
|
|
19602
|
+
_this.selector = selector;
|
|
19603
|
+
_this.unclickable = null;
|
|
19604
|
+
_this.nextUnclickable = null;
|
|
19605
|
+
return _this;
|
|
19606
|
+
}
|
|
19624
19607
|
|
|
19625
|
-
|
|
19626
|
-
|
|
19627
|
-
|
|
19628
|
-
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
key: 'getOverlayElement',
|
|
19636
|
-
value: function getOverlayElement() {
|
|
19637
|
-
return this.unclickable;
|
|
19638
|
-
}
|
|
19639
|
-
}, {
|
|
19640
|
-
key: 'onHide',
|
|
19641
|
-
value: function onHide() {
|
|
19642
|
-
this.hideProxyImage();
|
|
19643
|
-
this.nextUnclickable = null;
|
|
19644
|
-
this.unclickable = null;
|
|
19645
|
-
}
|
|
19646
|
-
}, {
|
|
19647
|
-
key: 'createProxyImage',
|
|
19648
|
-
value: function createProxyImage() {
|
|
19649
|
-
var canvas = document.createElement('canvas');
|
|
19650
|
-
var context = canvas.getContext('2d');
|
|
19651
|
-
context.globalAlpha = 0;
|
|
19652
|
-
context.fillRect(0, 0, 1, 1);
|
|
19653
|
-
|
|
19654
|
-
this.proxyImage = document.createElement('img');
|
|
19655
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19656
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19657
|
-
|
|
19658
|
-
Object.assign(this.proxyImage.style, {
|
|
19659
|
-
position: 'absolute',
|
|
19660
|
-
margin: '0'
|
|
19661
|
-
});
|
|
19608
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19609
|
+
key: 'init',
|
|
19610
|
+
value: function init() {
|
|
19611
|
+
if (document.body) {
|
|
19612
|
+
/*
|
|
19613
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19614
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19615
|
+
*/
|
|
19616
|
+
document.body.appendChild(this.createProxyImage());
|
|
19617
|
+
}
|
|
19662
19618
|
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19619
|
+
this.hideProxyImage();
|
|
19620
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19621
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19622
|
+
}
|
|
19623
|
+
}, {
|
|
19624
|
+
key: 'getTargetElement',
|
|
19625
|
+
value: function getTargetElement() {
|
|
19626
|
+
return this.unclickable;
|
|
19627
|
+
}
|
|
19628
|
+
}, {
|
|
19629
|
+
key: 'getOverlayElement',
|
|
19630
|
+
value: function getOverlayElement() {
|
|
19631
|
+
return this.unclickable;
|
|
19632
|
+
}
|
|
19633
|
+
}, {
|
|
19634
|
+
key: 'onHide',
|
|
19635
|
+
value: function onHide() {
|
|
19636
|
+
this.hideProxyImage();
|
|
19637
|
+
this.nextUnclickable = null;
|
|
19638
|
+
this.unclickable = null;
|
|
19639
|
+
}
|
|
19640
|
+
}, {
|
|
19641
|
+
key: 'createProxyImage',
|
|
19642
|
+
value: function createProxyImage() {
|
|
19643
|
+
var canvas = document.createElement('canvas');
|
|
19644
|
+
var context = canvas.getContext('2d');
|
|
19645
|
+
context.globalAlpha = 0;
|
|
19646
|
+
context.fillRect(0, 0, 1, 1);
|
|
19647
|
+
|
|
19648
|
+
this.proxyImage = document.createElement('img');
|
|
19649
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19650
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19651
|
+
|
|
19652
|
+
Object.assign(this.proxyImage.style, {
|
|
19653
|
+
position: 'absolute',
|
|
19654
|
+
margin: '0'
|
|
19655
|
+
});
|
|
19676
19656
|
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19657
|
+
return this.proxyImage;
|
|
19658
|
+
}
|
|
19659
|
+
}, {
|
|
19660
|
+
key: 'hideProxyImage',
|
|
19661
|
+
value: function hideProxyImage() {
|
|
19662
|
+
Object.assign(this.proxyImage.style, {
|
|
19663
|
+
display: 'none'
|
|
19664
|
+
});
|
|
19665
|
+
}
|
|
19666
|
+
}, {
|
|
19667
|
+
key: 'repositionProxyImage',
|
|
19668
|
+
value: function repositionProxyImage(unclickable) {
|
|
19669
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19670
|
+
|
|
19671
|
+
Object.assign(this.proxyImage.style, {
|
|
19672
|
+
display: 'block',
|
|
19673
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19674
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19675
|
+
width: rect.width + 'px',
|
|
19676
|
+
height: rect.height + 'px'
|
|
19677
|
+
});
|
|
19678
|
+
}
|
|
19679
|
+
}]);
|
|
19686
19680
|
|
|
19687
|
-
|
|
19688
|
-
|
|
19681
|
+
return UnclickableBlotSpec;
|
|
19682
|
+
}(_BlotSpec3.default);
|
|
19689
19683
|
|
|
19690
|
-
|
|
19691
|
-
return UnclickableBlotSpec;
|
|
19692
|
-
}
|
|
19684
|
+
UnclickableBlotSpec$1.default = UnclickableBlotSpec;
|
|
19693
19685
|
|
|
19694
19686
|
var hasRequiredIframeVideoSpec;
|
|
19695
19687
|
|
|
@@ -19701,7 +19693,7 @@ function requireIframeVideoSpec () {
|
|
|
19701
19693
|
value: true
|
|
19702
19694
|
});
|
|
19703
19695
|
|
|
19704
|
-
var _UnclickableBlotSpec2 =
|
|
19696
|
+
var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
|
|
19705
19697
|
|
|
19706
19698
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19707
19699
|
|
|
@@ -19856,7 +19848,7 @@ function requireOptions () {
|
|
|
19856
19848
|
}
|
|
19857
19849
|
});
|
|
19858
19850
|
|
|
19859
|
-
var _Action =
|
|
19851
|
+
var _Action = Action$1;
|
|
19860
19852
|
|
|
19861
19853
|
Object.defineProperty(exports, 'Action', {
|
|
19862
19854
|
enumerable: true,
|
|
@@ -19901,7 +19893,7 @@ function requireOptions () {
|
|
|
19901
19893
|
}
|
|
19902
19894
|
});
|
|
19903
19895
|
|
|
19904
|
-
var _ResizeAction =
|
|
19896
|
+
var _ResizeAction = requireResizeAction();
|
|
19905
19897
|
|
|
19906
19898
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
19907
19899
|
enumerable: true,
|
|
@@ -19928,7 +19920,7 @@ function requireOptions () {
|
|
|
19928
19920
|
}
|
|
19929
19921
|
});
|
|
19930
19922
|
|
|
19931
|
-
var _UnclickableBlotSpec =
|
|
19923
|
+
var _UnclickableBlotSpec = UnclickableBlotSpec$1;
|
|
19932
19924
|
|
|
19933
19925
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
19934
19926
|
enumerable: true,
|
|
@@ -19989,7 +19981,10 @@ const QuillEditor = defineComponent({
|
|
|
19989
19981
|
},
|
|
19990
19982
|
toolbarMode: {
|
|
19991
19983
|
type: String,
|
|
19992
|
-
default: "fixed-top"
|
|
19984
|
+
default: "fixed-top",
|
|
19985
|
+
validator: (value) => {
|
|
19986
|
+
return ['fixed-top', 'embedded'].includes(value);
|
|
19987
|
+
},
|
|
19993
19988
|
},
|
|
19994
19989
|
theme: {
|
|
19995
19990
|
type: String,
|
|
@@ -20061,7 +20056,8 @@ const QuillEditor = defineComponent({
|
|
|
20061
20056
|
return {
|
|
20062
20057
|
'quill-editor-container': true,
|
|
20063
20058
|
'need-border': props.needBorder,
|
|
20064
|
-
|
|
20059
|
+
'fixed-top': props.toolbarMode === 'fixed-top',
|
|
20060
|
+
'embedded': props.toolbarMode === 'embedded',
|
|
20065
20061
|
};
|
|
20066
20062
|
});
|
|
20067
20063
|
// Register Module if not already registered
|