@teselagen/ove 0.7.3-beta.6 → 0.7.3-beta.7
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/AlignmentView/index.d.ts +0 -4
- package/index.cjs.js +100 -859
- package/index.es.js +100 -859
- package/index.umd.js +80 -828
- package/package.json +1 -2
- package/src/AlignmentView/index.js +83 -45
- package/src/withEditorInteractions/Keyboard.js +2 -2
- package/src/withEditorInteractions/index.js +19 -16
- package/withEditorInteractions/Keyboard.d.ts +2 -2
package/index.umd.js
CHANGED
|
@@ -145010,789 +145010,6 @@ ${seq.sequence}
|
|
|
145010
145010
|
)(Droppable$1);
|
|
145011
145011
|
ConnectedDroppable.defaultProps = defaultProps;
|
|
145012
145012
|
var ConnectedDroppable$1 = ConnectedDroppable;
|
|
145013
|
-
var clipboard$1 = { exports: {} };
|
|
145014
|
-
/*!
|
|
145015
|
-
* clipboard.js v2.0.8
|
|
145016
|
-
* https://clipboardjs.com/
|
|
145017
|
-
*
|
|
145018
|
-
* Licensed MIT © Zeno Rocha
|
|
145019
|
-
*/
|
|
145020
|
-
(function(module2, exports3) {
|
|
145021
|
-
(/* @__PURE__ */ __name(function webpackUniversalModuleDefinition(root2, factory) {
|
|
145022
|
-
module2.exports = factory();
|
|
145023
|
-
}, "webpackUniversalModuleDefinition"))(commonjsGlobal, function() {
|
|
145024
|
-
return (
|
|
145025
|
-
/******/
|
|
145026
|
-
function() {
|
|
145027
|
-
var __webpack_modules__ = {
|
|
145028
|
-
/***/
|
|
145029
|
-
134: (
|
|
145030
|
-
/***/
|
|
145031
|
-
function(__unused_webpack_module, __webpack_exports__, __webpack_require__2) {
|
|
145032
|
-
__webpack_require__2.d(__webpack_exports__, {
|
|
145033
|
-
"default": function() {
|
|
145034
|
-
return (
|
|
145035
|
-
/* binding */
|
|
145036
|
-
clipboard2
|
|
145037
|
-
);
|
|
145038
|
-
}
|
|
145039
|
-
});
|
|
145040
|
-
var tiny_emitter = __webpack_require__2(279);
|
|
145041
|
-
var tiny_emitter_default = /* @__PURE__ */ __webpack_require__2.n(tiny_emitter);
|
|
145042
|
-
var listen = __webpack_require__2(370);
|
|
145043
|
-
var listen_default = /* @__PURE__ */ __webpack_require__2.n(listen);
|
|
145044
|
-
var src_select = __webpack_require__2(817);
|
|
145045
|
-
var select_default = /* @__PURE__ */ __webpack_require__2.n(src_select);
|
|
145046
|
-
function _typeof2(obj) {
|
|
145047
|
-
"@babel/helpers - typeof";
|
|
145048
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
145049
|
-
_typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145050
|
-
return typeof obj2;
|
|
145051
|
-
}, "_typeof");
|
|
145052
|
-
} else {
|
|
145053
|
-
_typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145054
|
-
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
145055
|
-
}, "_typeof");
|
|
145056
|
-
}
|
|
145057
|
-
return _typeof2(obj);
|
|
145058
|
-
}
|
|
145059
|
-
__name(_typeof2, "_typeof");
|
|
145060
|
-
function _classCallCheck2(instance, Constructor) {
|
|
145061
|
-
if (!(instance instanceof Constructor)) {
|
|
145062
|
-
throw new TypeError("Cannot call a class as a function");
|
|
145063
|
-
}
|
|
145064
|
-
}
|
|
145065
|
-
__name(_classCallCheck2, "_classCallCheck");
|
|
145066
|
-
function _defineProperties2(target, props) {
|
|
145067
|
-
for (var i2 = 0; i2 < props.length; i2++) {
|
|
145068
|
-
var descriptor = props[i2];
|
|
145069
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
145070
|
-
descriptor.configurable = true;
|
|
145071
|
-
if ("value" in descriptor)
|
|
145072
|
-
descriptor.writable = true;
|
|
145073
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
145074
|
-
}
|
|
145075
|
-
}
|
|
145076
|
-
__name(_defineProperties2, "_defineProperties");
|
|
145077
|
-
function _createClass2(Constructor, protoProps, staticProps) {
|
|
145078
|
-
if (protoProps)
|
|
145079
|
-
_defineProperties2(Constructor.prototype, protoProps);
|
|
145080
|
-
return Constructor;
|
|
145081
|
-
}
|
|
145082
|
-
__name(_createClass2, "_createClass");
|
|
145083
|
-
var ClipboardAction = /* @__PURE__ */ function() {
|
|
145084
|
-
function ClipboardAction2(options) {
|
|
145085
|
-
_classCallCheck2(this, ClipboardAction2);
|
|
145086
|
-
this.resolveOptions(options);
|
|
145087
|
-
this.initSelection();
|
|
145088
|
-
}
|
|
145089
|
-
__name(ClipboardAction2, "ClipboardAction");
|
|
145090
|
-
_createClass2(ClipboardAction2, [{
|
|
145091
|
-
key: "resolveOptions",
|
|
145092
|
-
value: /* @__PURE__ */ __name(function resolveOptions() {
|
|
145093
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
145094
|
-
this.action = options.action;
|
|
145095
|
-
this.container = options.container;
|
|
145096
|
-
this.emitter = options.emitter;
|
|
145097
|
-
this.target = options.target;
|
|
145098
|
-
this.text = options.text;
|
|
145099
|
-
this.trigger = options.trigger;
|
|
145100
|
-
this.selectedText = "";
|
|
145101
|
-
}, "resolveOptions")
|
|
145102
|
-
/**
|
|
145103
|
-
* Decides which selection strategy is going to be applied based
|
|
145104
|
-
* on the existence of `text` and `target` properties.
|
|
145105
|
-
*/
|
|
145106
|
-
}, {
|
|
145107
|
-
key: "initSelection",
|
|
145108
|
-
value: /* @__PURE__ */ __name(function initSelection() {
|
|
145109
|
-
if (this.text) {
|
|
145110
|
-
this.selectFake();
|
|
145111
|
-
} else if (this.target) {
|
|
145112
|
-
this.selectTarget();
|
|
145113
|
-
}
|
|
145114
|
-
}, "initSelection")
|
|
145115
|
-
/**
|
|
145116
|
-
* Creates a fake textarea element, sets its value from `text` property,
|
|
145117
|
-
*/
|
|
145118
|
-
}, {
|
|
145119
|
-
key: "createFakeElement",
|
|
145120
|
-
value: /* @__PURE__ */ __name(function createFakeElement() {
|
|
145121
|
-
var isRTL = document.documentElement.getAttribute("dir") === "rtl";
|
|
145122
|
-
this.fakeElem = document.createElement("textarea");
|
|
145123
|
-
this.fakeElem.style.fontSize = "12pt";
|
|
145124
|
-
this.fakeElem.style.border = "0";
|
|
145125
|
-
this.fakeElem.style.padding = "0";
|
|
145126
|
-
this.fakeElem.style.margin = "0";
|
|
145127
|
-
this.fakeElem.style.position = "absolute";
|
|
145128
|
-
this.fakeElem.style[isRTL ? "right" : "left"] = "-9999px";
|
|
145129
|
-
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
|
|
145130
|
-
this.fakeElem.style.top = "".concat(yPosition, "px");
|
|
145131
|
-
this.fakeElem.setAttribute("readonly", "");
|
|
145132
|
-
this.fakeElem.value = this.text;
|
|
145133
|
-
return this.fakeElem;
|
|
145134
|
-
}, "createFakeElement")
|
|
145135
|
-
/**
|
|
145136
|
-
* Get's the value of fakeElem,
|
|
145137
|
-
* and makes a selection on it.
|
|
145138
|
-
*/
|
|
145139
|
-
}, {
|
|
145140
|
-
key: "selectFake",
|
|
145141
|
-
value: /* @__PURE__ */ __name(function selectFake() {
|
|
145142
|
-
var _this = this;
|
|
145143
|
-
var fakeElem = this.createFakeElement();
|
|
145144
|
-
this.fakeHandlerCallback = function() {
|
|
145145
|
-
return _this.removeFake();
|
|
145146
|
-
};
|
|
145147
|
-
this.fakeHandler = this.container.addEventListener("click", this.fakeHandlerCallback) || true;
|
|
145148
|
-
this.container.appendChild(fakeElem);
|
|
145149
|
-
this.selectedText = select_default()(fakeElem);
|
|
145150
|
-
this.copyText();
|
|
145151
|
-
this.removeFake();
|
|
145152
|
-
}, "selectFake")
|
|
145153
|
-
/**
|
|
145154
|
-
* Only removes the fake element after another click event, that way
|
|
145155
|
-
* a user can hit `Ctrl+C` to copy because selection still exists.
|
|
145156
|
-
*/
|
|
145157
|
-
}, {
|
|
145158
|
-
key: "removeFake",
|
|
145159
|
-
value: /* @__PURE__ */ __name(function removeFake() {
|
|
145160
|
-
if (this.fakeHandler) {
|
|
145161
|
-
this.container.removeEventListener("click", this.fakeHandlerCallback);
|
|
145162
|
-
this.fakeHandler = null;
|
|
145163
|
-
this.fakeHandlerCallback = null;
|
|
145164
|
-
}
|
|
145165
|
-
if (this.fakeElem) {
|
|
145166
|
-
this.container.removeChild(this.fakeElem);
|
|
145167
|
-
this.fakeElem = null;
|
|
145168
|
-
}
|
|
145169
|
-
}, "removeFake")
|
|
145170
|
-
/**
|
|
145171
|
-
* Selects the content from element passed on `target` property.
|
|
145172
|
-
*/
|
|
145173
|
-
}, {
|
|
145174
|
-
key: "selectTarget",
|
|
145175
|
-
value: /* @__PURE__ */ __name(function selectTarget() {
|
|
145176
|
-
this.selectedText = select_default()(this.target);
|
|
145177
|
-
this.copyText();
|
|
145178
|
-
}, "selectTarget")
|
|
145179
|
-
/**
|
|
145180
|
-
* Executes the copy operation based on the current selection.
|
|
145181
|
-
*/
|
|
145182
|
-
}, {
|
|
145183
|
-
key: "copyText",
|
|
145184
|
-
value: /* @__PURE__ */ __name(function copyText() {
|
|
145185
|
-
var succeeded;
|
|
145186
|
-
try {
|
|
145187
|
-
succeeded = document.execCommand(this.action);
|
|
145188
|
-
} catch (err2) {
|
|
145189
|
-
succeeded = false;
|
|
145190
|
-
}
|
|
145191
|
-
this.handleResult(succeeded);
|
|
145192
|
-
}, "copyText")
|
|
145193
|
-
/**
|
|
145194
|
-
* Fires an event based on the copy operation result.
|
|
145195
|
-
* @param {Boolean} succeeded
|
|
145196
|
-
*/
|
|
145197
|
-
}, {
|
|
145198
|
-
key: "handleResult",
|
|
145199
|
-
value: /* @__PURE__ */ __name(function handleResult(succeeded) {
|
|
145200
|
-
this.emitter.emit(succeeded ? "success" : "error", {
|
|
145201
|
-
action: this.action,
|
|
145202
|
-
text: this.selectedText,
|
|
145203
|
-
trigger: this.trigger,
|
|
145204
|
-
clearSelection: this.clearSelection.bind(this)
|
|
145205
|
-
});
|
|
145206
|
-
}, "handleResult")
|
|
145207
|
-
/**
|
|
145208
|
-
* Moves focus away from `target` and back to the trigger, removes current selection.
|
|
145209
|
-
*/
|
|
145210
|
-
}, {
|
|
145211
|
-
key: "clearSelection",
|
|
145212
|
-
value: /* @__PURE__ */ __name(function clearSelection() {
|
|
145213
|
-
if (this.trigger) {
|
|
145214
|
-
this.trigger.focus();
|
|
145215
|
-
}
|
|
145216
|
-
document.activeElement.blur();
|
|
145217
|
-
window.getSelection().removeAllRanges();
|
|
145218
|
-
}, "clearSelection")
|
|
145219
|
-
/**
|
|
145220
|
-
* Sets the `action` to be performed which can be either 'copy' or 'cut'.
|
|
145221
|
-
* @param {String} action
|
|
145222
|
-
*/
|
|
145223
|
-
}, {
|
|
145224
|
-
key: "destroy",
|
|
145225
|
-
/**
|
|
145226
|
-
* Destroy lifecycle.
|
|
145227
|
-
*/
|
|
145228
|
-
value: /* @__PURE__ */ __name(function destroy2() {
|
|
145229
|
-
this.removeFake();
|
|
145230
|
-
}, "destroy")
|
|
145231
|
-
}, {
|
|
145232
|
-
key: "action",
|
|
145233
|
-
set: /* @__PURE__ */ __name(function set2() {
|
|
145234
|
-
var action2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "copy";
|
|
145235
|
-
this._action = action2;
|
|
145236
|
-
if (this._action !== "copy" && this._action !== "cut") {
|
|
145237
|
-
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
145238
|
-
}
|
|
145239
|
-
}, "set"),
|
|
145240
|
-
get: /* @__PURE__ */ __name(function get2() {
|
|
145241
|
-
return this._action;
|
|
145242
|
-
}, "get")
|
|
145243
|
-
/**
|
|
145244
|
-
* Sets the `target` property using an element
|
|
145245
|
-
* that will be have its content copied.
|
|
145246
|
-
* @param {Element} target
|
|
145247
|
-
*/
|
|
145248
|
-
}, {
|
|
145249
|
-
key: "target",
|
|
145250
|
-
set: /* @__PURE__ */ __name(function set2(target) {
|
|
145251
|
-
if (target !== void 0) {
|
|
145252
|
-
if (target && _typeof2(target) === "object" && target.nodeType === 1) {
|
|
145253
|
-
if (this.action === "copy" && target.hasAttribute("disabled")) {
|
|
145254
|
-
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
|
145255
|
-
}
|
|
145256
|
-
if (this.action === "cut" && (target.hasAttribute("readonly") || target.hasAttribute("disabled"))) {
|
|
145257
|
-
throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
|
|
145258
|
-
}
|
|
145259
|
-
this._target = target;
|
|
145260
|
-
} else {
|
|
145261
|
-
throw new Error('Invalid "target" value, use a valid Element');
|
|
145262
|
-
}
|
|
145263
|
-
}
|
|
145264
|
-
}, "set"),
|
|
145265
|
-
get: /* @__PURE__ */ __name(function get2() {
|
|
145266
|
-
return this._target;
|
|
145267
|
-
}, "get")
|
|
145268
|
-
}]);
|
|
145269
|
-
return ClipboardAction2;
|
|
145270
|
-
}();
|
|
145271
|
-
var clipboard_action = ClipboardAction;
|
|
145272
|
-
function clipboard_typeof(obj) {
|
|
145273
|
-
"@babel/helpers - typeof";
|
|
145274
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
145275
|
-
clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145276
|
-
return typeof obj2;
|
|
145277
|
-
}, "_typeof");
|
|
145278
|
-
} else {
|
|
145279
|
-
clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145280
|
-
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
145281
|
-
}, "_typeof");
|
|
145282
|
-
}
|
|
145283
|
-
return clipboard_typeof(obj);
|
|
145284
|
-
}
|
|
145285
|
-
__name(clipboard_typeof, "clipboard_typeof");
|
|
145286
|
-
function clipboard_classCallCheck(instance, Constructor) {
|
|
145287
|
-
if (!(instance instanceof Constructor)) {
|
|
145288
|
-
throw new TypeError("Cannot call a class as a function");
|
|
145289
|
-
}
|
|
145290
|
-
}
|
|
145291
|
-
__name(clipboard_classCallCheck, "clipboard_classCallCheck");
|
|
145292
|
-
function clipboard_defineProperties(target, props) {
|
|
145293
|
-
for (var i2 = 0; i2 < props.length; i2++) {
|
|
145294
|
-
var descriptor = props[i2];
|
|
145295
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
145296
|
-
descriptor.configurable = true;
|
|
145297
|
-
if ("value" in descriptor)
|
|
145298
|
-
descriptor.writable = true;
|
|
145299
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
145300
|
-
}
|
|
145301
|
-
}
|
|
145302
|
-
__name(clipboard_defineProperties, "clipboard_defineProperties");
|
|
145303
|
-
function clipboard_createClass(Constructor, protoProps, staticProps) {
|
|
145304
|
-
if (protoProps)
|
|
145305
|
-
clipboard_defineProperties(Constructor.prototype, protoProps);
|
|
145306
|
-
if (staticProps)
|
|
145307
|
-
clipboard_defineProperties(Constructor, staticProps);
|
|
145308
|
-
return Constructor;
|
|
145309
|
-
}
|
|
145310
|
-
__name(clipboard_createClass, "clipboard_createClass");
|
|
145311
|
-
function _inherits2(subClass, superClass) {
|
|
145312
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
145313
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
145314
|
-
}
|
|
145315
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
145316
|
-
if (superClass)
|
|
145317
|
-
_setPrototypeOf2(subClass, superClass);
|
|
145318
|
-
}
|
|
145319
|
-
__name(_inherits2, "_inherits");
|
|
145320
|
-
function _setPrototypeOf2(o2, p2) {
|
|
145321
|
-
_setPrototypeOf2 = Object.setPrototypeOf || /* @__PURE__ */ __name(function _setPrototypeOf3(o3, p3) {
|
|
145322
|
-
o3.__proto__ = p3;
|
|
145323
|
-
return o3;
|
|
145324
|
-
}, "_setPrototypeOf");
|
|
145325
|
-
return _setPrototypeOf2(o2, p2);
|
|
145326
|
-
}
|
|
145327
|
-
__name(_setPrototypeOf2, "_setPrototypeOf");
|
|
145328
|
-
function _createSuper2(Derived) {
|
|
145329
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct2();
|
|
145330
|
-
return /* @__PURE__ */ __name(function _createSuperInternal() {
|
|
145331
|
-
var Super = _getPrototypeOf2(Derived), result;
|
|
145332
|
-
if (hasNativeReflectConstruct) {
|
|
145333
|
-
var NewTarget = _getPrototypeOf2(this).constructor;
|
|
145334
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
145335
|
-
} else {
|
|
145336
|
-
result = Super.apply(this, arguments);
|
|
145337
|
-
}
|
|
145338
|
-
return _possibleConstructorReturn2(this, result);
|
|
145339
|
-
}, "_createSuperInternal");
|
|
145340
|
-
}
|
|
145341
|
-
__name(_createSuper2, "_createSuper");
|
|
145342
|
-
function _possibleConstructorReturn2(self2, call2) {
|
|
145343
|
-
if (call2 && (clipboard_typeof(call2) === "object" || typeof call2 === "function")) {
|
|
145344
|
-
return call2;
|
|
145345
|
-
}
|
|
145346
|
-
return _assertThisInitialized2(self2);
|
|
145347
|
-
}
|
|
145348
|
-
__name(_possibleConstructorReturn2, "_possibleConstructorReturn");
|
|
145349
|
-
function _assertThisInitialized2(self2) {
|
|
145350
|
-
if (self2 === void 0) {
|
|
145351
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
145352
|
-
}
|
|
145353
|
-
return self2;
|
|
145354
|
-
}
|
|
145355
|
-
__name(_assertThisInitialized2, "_assertThisInitialized");
|
|
145356
|
-
function _isNativeReflectConstruct2() {
|
|
145357
|
-
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
145358
|
-
return false;
|
|
145359
|
-
if (Reflect.construct.sham)
|
|
145360
|
-
return false;
|
|
145361
|
-
if (typeof Proxy === "function")
|
|
145362
|
-
return true;
|
|
145363
|
-
try {
|
|
145364
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
145365
|
-
}));
|
|
145366
|
-
return true;
|
|
145367
|
-
} catch (e2) {
|
|
145368
|
-
return false;
|
|
145369
|
-
}
|
|
145370
|
-
}
|
|
145371
|
-
__name(_isNativeReflectConstruct2, "_isNativeReflectConstruct");
|
|
145372
|
-
function _getPrototypeOf2(o2) {
|
|
145373
|
-
_getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf : /* @__PURE__ */ __name(function _getPrototypeOf3(o3) {
|
|
145374
|
-
return o3.__proto__ || Object.getPrototypeOf(o3);
|
|
145375
|
-
}, "_getPrototypeOf");
|
|
145376
|
-
return _getPrototypeOf2(o2);
|
|
145377
|
-
}
|
|
145378
|
-
__name(_getPrototypeOf2, "_getPrototypeOf");
|
|
145379
|
-
function getAttributeValue(suffix, element2) {
|
|
145380
|
-
var attribute = "data-clipboard-".concat(suffix);
|
|
145381
|
-
if (!element2.hasAttribute(attribute)) {
|
|
145382
|
-
return;
|
|
145383
|
-
}
|
|
145384
|
-
return element2.getAttribute(attribute);
|
|
145385
|
-
}
|
|
145386
|
-
__name(getAttributeValue, "getAttributeValue");
|
|
145387
|
-
var Clipboard2 = /* @__PURE__ */ function(_Emitter) {
|
|
145388
|
-
_inherits2(Clipboard3, _Emitter);
|
|
145389
|
-
var _super = _createSuper2(Clipboard3);
|
|
145390
|
-
function Clipboard3(trigger2, options) {
|
|
145391
|
-
var _this;
|
|
145392
|
-
clipboard_classCallCheck(this, Clipboard3);
|
|
145393
|
-
_this = _super.call(this);
|
|
145394
|
-
_this.resolveOptions(options);
|
|
145395
|
-
_this.listenClick(trigger2);
|
|
145396
|
-
return _this;
|
|
145397
|
-
}
|
|
145398
|
-
__name(Clipboard3, "Clipboard");
|
|
145399
|
-
clipboard_createClass(Clipboard3, [{
|
|
145400
|
-
key: "resolveOptions",
|
|
145401
|
-
value: /* @__PURE__ */ __name(function resolveOptions() {
|
|
145402
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
145403
|
-
this.action = typeof options.action === "function" ? options.action : this.defaultAction;
|
|
145404
|
-
this.target = typeof options.target === "function" ? options.target : this.defaultTarget;
|
|
145405
|
-
this.text = typeof options.text === "function" ? options.text : this.defaultText;
|
|
145406
|
-
this.container = clipboard_typeof(options.container) === "object" ? options.container : document.body;
|
|
145407
|
-
}, "resolveOptions")
|
|
145408
|
-
/**
|
|
145409
|
-
* Adds a click event listener to the passed trigger.
|
|
145410
|
-
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
|
145411
|
-
*/
|
|
145412
|
-
}, {
|
|
145413
|
-
key: "listenClick",
|
|
145414
|
-
value: /* @__PURE__ */ __name(function listenClick(trigger2) {
|
|
145415
|
-
var _this2 = this;
|
|
145416
|
-
this.listener = listen_default()(trigger2, "click", function(e2) {
|
|
145417
|
-
return _this2.onClick(e2);
|
|
145418
|
-
});
|
|
145419
|
-
}, "listenClick")
|
|
145420
|
-
/**
|
|
145421
|
-
* Defines a new `ClipboardAction` on each click event.
|
|
145422
|
-
* @param {Event} e
|
|
145423
|
-
*/
|
|
145424
|
-
}, {
|
|
145425
|
-
key: "onClick",
|
|
145426
|
-
value: /* @__PURE__ */ __name(function onClick(e2) {
|
|
145427
|
-
var trigger2 = e2.delegateTarget || e2.currentTarget;
|
|
145428
|
-
if (this.clipboardAction) {
|
|
145429
|
-
this.clipboardAction = null;
|
|
145430
|
-
}
|
|
145431
|
-
this.clipboardAction = new clipboard_action({
|
|
145432
|
-
action: this.action(trigger2),
|
|
145433
|
-
target: this.target(trigger2),
|
|
145434
|
-
text: this.text(trigger2),
|
|
145435
|
-
container: this.container,
|
|
145436
|
-
trigger: trigger2,
|
|
145437
|
-
emitter: this
|
|
145438
|
-
});
|
|
145439
|
-
}, "onClick")
|
|
145440
|
-
/**
|
|
145441
|
-
* Default `action` lookup function.
|
|
145442
|
-
* @param {Element} trigger
|
|
145443
|
-
*/
|
|
145444
|
-
}, {
|
|
145445
|
-
key: "defaultAction",
|
|
145446
|
-
value: /* @__PURE__ */ __name(function defaultAction(trigger2) {
|
|
145447
|
-
return getAttributeValue("action", trigger2);
|
|
145448
|
-
}, "defaultAction")
|
|
145449
|
-
/**
|
|
145450
|
-
* Default `target` lookup function.
|
|
145451
|
-
* @param {Element} trigger
|
|
145452
|
-
*/
|
|
145453
|
-
}, {
|
|
145454
|
-
key: "defaultTarget",
|
|
145455
|
-
value: /* @__PURE__ */ __name(function defaultTarget(trigger2) {
|
|
145456
|
-
var selector = getAttributeValue("target", trigger2);
|
|
145457
|
-
if (selector) {
|
|
145458
|
-
return document.querySelector(selector);
|
|
145459
|
-
}
|
|
145460
|
-
}, "defaultTarget")
|
|
145461
|
-
/**
|
|
145462
|
-
* Returns the support of the given action, or all actions if no action is
|
|
145463
|
-
* given.
|
|
145464
|
-
* @param {String} [action]
|
|
145465
|
-
*/
|
|
145466
|
-
}, {
|
|
145467
|
-
key: "defaultText",
|
|
145468
|
-
/**
|
|
145469
|
-
* Default `text` lookup function.
|
|
145470
|
-
* @param {Element} trigger
|
|
145471
|
-
*/
|
|
145472
|
-
value: /* @__PURE__ */ __name(function defaultText(trigger2) {
|
|
145473
|
-
return getAttributeValue("text", trigger2);
|
|
145474
|
-
}, "defaultText")
|
|
145475
|
-
/**
|
|
145476
|
-
* Destroy lifecycle.
|
|
145477
|
-
*/
|
|
145478
|
-
}, {
|
|
145479
|
-
key: "destroy",
|
|
145480
|
-
value: /* @__PURE__ */ __name(function destroy2() {
|
|
145481
|
-
this.listener.destroy();
|
|
145482
|
-
if (this.clipboardAction) {
|
|
145483
|
-
this.clipboardAction.destroy();
|
|
145484
|
-
this.clipboardAction = null;
|
|
145485
|
-
}
|
|
145486
|
-
}, "destroy")
|
|
145487
|
-
}], [{
|
|
145488
|
-
key: "isSupported",
|
|
145489
|
-
value: /* @__PURE__ */ __name(function isSupported() {
|
|
145490
|
-
var action2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"];
|
|
145491
|
-
var actions2 = typeof action2 === "string" ? [action2] : action2;
|
|
145492
|
-
var support = !!document.queryCommandSupported;
|
|
145493
|
-
actions2.forEach(function(action3) {
|
|
145494
|
-
support = support && !!document.queryCommandSupported(action3);
|
|
145495
|
-
});
|
|
145496
|
-
return support;
|
|
145497
|
-
}, "isSupported")
|
|
145498
|
-
}]);
|
|
145499
|
-
return Clipboard3;
|
|
145500
|
-
}(tiny_emitter_default());
|
|
145501
|
-
var clipboard2 = Clipboard2;
|
|
145502
|
-
}
|
|
145503
|
-
),
|
|
145504
|
-
/***/
|
|
145505
|
-
828: (
|
|
145506
|
-
/***/
|
|
145507
|
-
function(module3) {
|
|
145508
|
-
var DOCUMENT_NODE_TYPE = 9;
|
|
145509
|
-
if (typeof Element !== "undefined" && !Element.prototype.matches) {
|
|
145510
|
-
var proto = Element.prototype;
|
|
145511
|
-
proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
|
|
145512
|
-
}
|
|
145513
|
-
function closest2(element2, selector) {
|
|
145514
|
-
while (element2 && element2.nodeType !== DOCUMENT_NODE_TYPE) {
|
|
145515
|
-
if (typeof element2.matches === "function" && element2.matches(selector)) {
|
|
145516
|
-
return element2;
|
|
145517
|
-
}
|
|
145518
|
-
element2 = element2.parentNode;
|
|
145519
|
-
}
|
|
145520
|
-
}
|
|
145521
|
-
__name(closest2, "closest");
|
|
145522
|
-
module3.exports = closest2;
|
|
145523
|
-
}
|
|
145524
|
-
),
|
|
145525
|
-
/***/
|
|
145526
|
-
438: (
|
|
145527
|
-
/***/
|
|
145528
|
-
function(module3, __unused_webpack_exports, __webpack_require__2) {
|
|
145529
|
-
var closest2 = __webpack_require__2(828);
|
|
145530
|
-
function _delegate(element2, selector, type2, callback2, useCapture) {
|
|
145531
|
-
var listenerFn = listener.apply(this, arguments);
|
|
145532
|
-
element2.addEventListener(type2, listenerFn, useCapture);
|
|
145533
|
-
return {
|
|
145534
|
-
destroy: function() {
|
|
145535
|
-
element2.removeEventListener(type2, listenerFn, useCapture);
|
|
145536
|
-
}
|
|
145537
|
-
};
|
|
145538
|
-
}
|
|
145539
|
-
__name(_delegate, "_delegate");
|
|
145540
|
-
function delegate(elements, selector, type2, callback2, useCapture) {
|
|
145541
|
-
if (typeof elements.addEventListener === "function") {
|
|
145542
|
-
return _delegate.apply(null, arguments);
|
|
145543
|
-
}
|
|
145544
|
-
if (typeof type2 === "function") {
|
|
145545
|
-
return _delegate.bind(null, document).apply(null, arguments);
|
|
145546
|
-
}
|
|
145547
|
-
if (typeof elements === "string") {
|
|
145548
|
-
elements = document.querySelectorAll(elements);
|
|
145549
|
-
}
|
|
145550
|
-
return Array.prototype.map.call(elements, function(element2) {
|
|
145551
|
-
return _delegate(element2, selector, type2, callback2, useCapture);
|
|
145552
|
-
});
|
|
145553
|
-
}
|
|
145554
|
-
__name(delegate, "delegate");
|
|
145555
|
-
function listener(element2, selector, type2, callback2) {
|
|
145556
|
-
return function(e2) {
|
|
145557
|
-
e2.delegateTarget = closest2(e2.target, selector);
|
|
145558
|
-
if (e2.delegateTarget) {
|
|
145559
|
-
callback2.call(element2, e2);
|
|
145560
|
-
}
|
|
145561
|
-
};
|
|
145562
|
-
}
|
|
145563
|
-
__name(listener, "listener");
|
|
145564
|
-
module3.exports = delegate;
|
|
145565
|
-
}
|
|
145566
|
-
),
|
|
145567
|
-
/***/
|
|
145568
|
-
879: (
|
|
145569
|
-
/***/
|
|
145570
|
-
function(__unused_webpack_module, exports4) {
|
|
145571
|
-
exports4.node = function(value) {
|
|
145572
|
-
return value !== void 0 && value instanceof HTMLElement && value.nodeType === 1;
|
|
145573
|
-
};
|
|
145574
|
-
exports4.nodeList = function(value) {
|
|
145575
|
-
var type2 = Object.prototype.toString.call(value);
|
|
145576
|
-
return value !== void 0 && (type2 === "[object NodeList]" || type2 === "[object HTMLCollection]") && "length" in value && (value.length === 0 || exports4.node(value[0]));
|
|
145577
|
-
};
|
|
145578
|
-
exports4.string = function(value) {
|
|
145579
|
-
return typeof value === "string" || value instanceof String;
|
|
145580
|
-
};
|
|
145581
|
-
exports4.fn = function(value) {
|
|
145582
|
-
var type2 = Object.prototype.toString.call(value);
|
|
145583
|
-
return type2 === "[object Function]";
|
|
145584
|
-
};
|
|
145585
|
-
}
|
|
145586
|
-
),
|
|
145587
|
-
/***/
|
|
145588
|
-
370: (
|
|
145589
|
-
/***/
|
|
145590
|
-
function(module3, __unused_webpack_exports, __webpack_require__2) {
|
|
145591
|
-
var is2 = __webpack_require__2(879);
|
|
145592
|
-
var delegate = __webpack_require__2(438);
|
|
145593
|
-
function listen(target, type2, callback2) {
|
|
145594
|
-
if (!target && !type2 && !callback2) {
|
|
145595
|
-
throw new Error("Missing required arguments");
|
|
145596
|
-
}
|
|
145597
|
-
if (!is2.string(type2)) {
|
|
145598
|
-
throw new TypeError("Second argument must be a String");
|
|
145599
|
-
}
|
|
145600
|
-
if (!is2.fn(callback2)) {
|
|
145601
|
-
throw new TypeError("Third argument must be a Function");
|
|
145602
|
-
}
|
|
145603
|
-
if (is2.node(target)) {
|
|
145604
|
-
return listenNode(target, type2, callback2);
|
|
145605
|
-
} else if (is2.nodeList(target)) {
|
|
145606
|
-
return listenNodeList(target, type2, callback2);
|
|
145607
|
-
} else if (is2.string(target)) {
|
|
145608
|
-
return listenSelector(target, type2, callback2);
|
|
145609
|
-
} else {
|
|
145610
|
-
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
145611
|
-
}
|
|
145612
|
-
}
|
|
145613
|
-
__name(listen, "listen");
|
|
145614
|
-
function listenNode(node2, type2, callback2) {
|
|
145615
|
-
node2.addEventListener(type2, callback2);
|
|
145616
|
-
return {
|
|
145617
|
-
destroy: function() {
|
|
145618
|
-
node2.removeEventListener(type2, callback2);
|
|
145619
|
-
}
|
|
145620
|
-
};
|
|
145621
|
-
}
|
|
145622
|
-
__name(listenNode, "listenNode");
|
|
145623
|
-
function listenNodeList(nodeList, type2, callback2) {
|
|
145624
|
-
Array.prototype.forEach.call(nodeList, function(node2) {
|
|
145625
|
-
node2.addEventListener(type2, callback2);
|
|
145626
|
-
});
|
|
145627
|
-
return {
|
|
145628
|
-
destroy: function() {
|
|
145629
|
-
Array.prototype.forEach.call(nodeList, function(node2) {
|
|
145630
|
-
node2.removeEventListener(type2, callback2);
|
|
145631
|
-
});
|
|
145632
|
-
}
|
|
145633
|
-
};
|
|
145634
|
-
}
|
|
145635
|
-
__name(listenNodeList, "listenNodeList");
|
|
145636
|
-
function listenSelector(selector, type2, callback2) {
|
|
145637
|
-
return delegate(document.body, selector, type2, callback2);
|
|
145638
|
-
}
|
|
145639
|
-
__name(listenSelector, "listenSelector");
|
|
145640
|
-
module3.exports = listen;
|
|
145641
|
-
}
|
|
145642
|
-
),
|
|
145643
|
-
/***/
|
|
145644
|
-
817: (
|
|
145645
|
-
/***/
|
|
145646
|
-
function(module3) {
|
|
145647
|
-
function select(element2) {
|
|
145648
|
-
var selectedText;
|
|
145649
|
-
if (element2.nodeName === "SELECT") {
|
|
145650
|
-
element2.focus();
|
|
145651
|
-
selectedText = element2.value;
|
|
145652
|
-
} else if (element2.nodeName === "INPUT" || element2.nodeName === "TEXTAREA") {
|
|
145653
|
-
var isReadOnly = element2.hasAttribute("readonly");
|
|
145654
|
-
if (!isReadOnly) {
|
|
145655
|
-
element2.setAttribute("readonly", "");
|
|
145656
|
-
}
|
|
145657
|
-
element2.select();
|
|
145658
|
-
element2.setSelectionRange(0, element2.value.length);
|
|
145659
|
-
if (!isReadOnly) {
|
|
145660
|
-
element2.removeAttribute("readonly");
|
|
145661
|
-
}
|
|
145662
|
-
selectedText = element2.value;
|
|
145663
|
-
} else {
|
|
145664
|
-
if (element2.hasAttribute("contenteditable")) {
|
|
145665
|
-
element2.focus();
|
|
145666
|
-
}
|
|
145667
|
-
var selection = window.getSelection();
|
|
145668
|
-
var range2 = document.createRange();
|
|
145669
|
-
range2.selectNodeContents(element2);
|
|
145670
|
-
selection.removeAllRanges();
|
|
145671
|
-
selection.addRange(range2);
|
|
145672
|
-
selectedText = selection.toString();
|
|
145673
|
-
}
|
|
145674
|
-
return selectedText;
|
|
145675
|
-
}
|
|
145676
|
-
__name(select, "select");
|
|
145677
|
-
module3.exports = select;
|
|
145678
|
-
}
|
|
145679
|
-
),
|
|
145680
|
-
/***/
|
|
145681
|
-
279: (
|
|
145682
|
-
/***/
|
|
145683
|
-
function(module3) {
|
|
145684
|
-
function E2() {
|
|
145685
|
-
}
|
|
145686
|
-
__name(E2, "E");
|
|
145687
|
-
E2.prototype = {
|
|
145688
|
-
on: function(name2, callback2, ctx) {
|
|
145689
|
-
var e2 = this.e || (this.e = {});
|
|
145690
|
-
(e2[name2] || (e2[name2] = [])).push({
|
|
145691
|
-
fn: callback2,
|
|
145692
|
-
ctx
|
|
145693
|
-
});
|
|
145694
|
-
return this;
|
|
145695
|
-
},
|
|
145696
|
-
once: function(name2, callback2, ctx) {
|
|
145697
|
-
var self2 = this;
|
|
145698
|
-
function listener() {
|
|
145699
|
-
self2.off(name2, listener);
|
|
145700
|
-
callback2.apply(ctx, arguments);
|
|
145701
|
-
}
|
|
145702
|
-
__name(listener, "listener");
|
|
145703
|
-
listener._ = callback2;
|
|
145704
|
-
return this.on(name2, listener, ctx);
|
|
145705
|
-
},
|
|
145706
|
-
emit: function(name2) {
|
|
145707
|
-
var data = [].slice.call(arguments, 1);
|
|
145708
|
-
var evtArr = ((this.e || (this.e = {}))[name2] || []).slice();
|
|
145709
|
-
var i2 = 0;
|
|
145710
|
-
var len2 = evtArr.length;
|
|
145711
|
-
for (i2; i2 < len2; i2++) {
|
|
145712
|
-
evtArr[i2].fn.apply(evtArr[i2].ctx, data);
|
|
145713
|
-
}
|
|
145714
|
-
return this;
|
|
145715
|
-
},
|
|
145716
|
-
off: function(name2, callback2) {
|
|
145717
|
-
var e2 = this.e || (this.e = {});
|
|
145718
|
-
var evts = e2[name2];
|
|
145719
|
-
var liveEvents = [];
|
|
145720
|
-
if (evts && callback2) {
|
|
145721
|
-
for (var i2 = 0, len2 = evts.length; i2 < len2; i2++) {
|
|
145722
|
-
if (evts[i2].fn !== callback2 && evts[i2].fn._ !== callback2)
|
|
145723
|
-
liveEvents.push(evts[i2]);
|
|
145724
|
-
}
|
|
145725
|
-
}
|
|
145726
|
-
liveEvents.length ? e2[name2] = liveEvents : delete e2[name2];
|
|
145727
|
-
return this;
|
|
145728
|
-
}
|
|
145729
|
-
};
|
|
145730
|
-
module3.exports = E2;
|
|
145731
|
-
module3.exports.TinyEmitter = E2;
|
|
145732
|
-
}
|
|
145733
|
-
)
|
|
145734
|
-
/******/
|
|
145735
|
-
};
|
|
145736
|
-
var __webpack_module_cache__ = {};
|
|
145737
|
-
function __webpack_require__(moduleId) {
|
|
145738
|
-
if (__webpack_module_cache__[moduleId]) {
|
|
145739
|
-
return __webpack_module_cache__[moduleId].exports;
|
|
145740
|
-
}
|
|
145741
|
-
var module3 = __webpack_module_cache__[moduleId] = {
|
|
145742
|
-
/******/
|
|
145743
|
-
// no module.id needed
|
|
145744
|
-
/******/
|
|
145745
|
-
// no module.loaded needed
|
|
145746
|
-
/******/
|
|
145747
|
-
exports: {}
|
|
145748
|
-
/******/
|
|
145749
|
-
};
|
|
145750
|
-
__webpack_modules__[moduleId](module3, module3.exports, __webpack_require__);
|
|
145751
|
-
return module3.exports;
|
|
145752
|
-
}
|
|
145753
|
-
__name(__webpack_require__, "__webpack_require__");
|
|
145754
|
-
!function() {
|
|
145755
|
-
__webpack_require__.n = function(module3) {
|
|
145756
|
-
var getter = module3 && module3.__esModule ? (
|
|
145757
|
-
/******/
|
|
145758
|
-
function() {
|
|
145759
|
-
return module3["default"];
|
|
145760
|
-
}
|
|
145761
|
-
) : (
|
|
145762
|
-
/******/
|
|
145763
|
-
function() {
|
|
145764
|
-
return module3;
|
|
145765
|
-
}
|
|
145766
|
-
);
|
|
145767
|
-
__webpack_require__.d(getter, { a: getter });
|
|
145768
|
-
return getter;
|
|
145769
|
-
};
|
|
145770
|
-
}();
|
|
145771
|
-
!function() {
|
|
145772
|
-
__webpack_require__.d = function(exports4, definition2) {
|
|
145773
|
-
for (var key2 in definition2) {
|
|
145774
|
-
if (__webpack_require__.o(definition2, key2) && !__webpack_require__.o(exports4, key2)) {
|
|
145775
|
-
Object.defineProperty(exports4, key2, { enumerable: true, get: definition2[key2] });
|
|
145776
|
-
}
|
|
145777
|
-
}
|
|
145778
|
-
};
|
|
145779
|
-
}();
|
|
145780
|
-
!function() {
|
|
145781
|
-
__webpack_require__.o = function(obj, prop2) {
|
|
145782
|
-
return Object.prototype.hasOwnProperty.call(obj, prop2);
|
|
145783
|
-
};
|
|
145784
|
-
}();
|
|
145785
|
-
return __webpack_require__(134);
|
|
145786
|
-
}().default
|
|
145787
|
-
);
|
|
145788
|
-
});
|
|
145789
|
-
})(clipboard$1);
|
|
145790
|
-
var clipboardExports = clipboard$1.exports;
|
|
145791
|
-
const clipboard = /* @__PURE__ */ getDefaultExportFromCjs(clipboardExports);
|
|
145792
|
-
const ClipboardJS = /* @__PURE__ */ _mergeNamespaces({
|
|
145793
|
-
__proto__: null,
|
|
145794
|
-
default: clipboard
|
|
145795
|
-
}, [clipboardExports]);
|
|
145796
145013
|
var connectionStore = /* @__PURE__ */ new WeakMap();
|
|
145797
145014
|
var ITERATION_KEY = Symbol("iteration key");
|
|
145798
145015
|
function storeObservable(obj) {
|
|
@@ -151733,7 +150950,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
151733
150950
|
}
|
|
151734
150951
|
__name(showFileDialog, "showFileDialog");
|
|
151735
150952
|
const name = "@teselagen/ove";
|
|
151736
|
-
const version = "0.7.3-beta.
|
|
150953
|
+
const version = "0.7.3-beta.6";
|
|
151737
150954
|
const main = "./src/index.js";
|
|
151738
150955
|
const type = "module";
|
|
151739
150956
|
const exports$1 = {
|
|
@@ -154036,7 +153253,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154036
153253
|
return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
154037
153254
|
}
|
|
154038
153255
|
__name(isElementInViewport, "isElementInViewport");
|
|
154039
|
-
const
|
|
153256
|
+
const _Keyboard = class _Keyboard extends React$2.Component {
|
|
154040
153257
|
constructor() {
|
|
154041
153258
|
super(...arguments);
|
|
154042
153259
|
__publicField(this, "handleKeyDown", /* @__PURE__ */ __name((e2) => {
|
|
@@ -154105,14 +153322,14 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154105
153322
|
);
|
|
154106
153323
|
}
|
|
154107
153324
|
};
|
|
154108
|
-
__name(
|
|
153325
|
+
__name(_Keyboard, "Keyboard");
|
|
154109
153326
|
// static propTypes = {
|
|
154110
153327
|
// value: PropTypes.string.isRequired
|
|
154111
153328
|
// };
|
|
154112
|
-
__publicField(
|
|
153329
|
+
__publicField(_Keyboard, "defaultProps", {
|
|
154113
153330
|
className: "clipboard"
|
|
154114
153331
|
});
|
|
154115
|
-
let
|
|
153332
|
+
let Keyboard = _Keyboard;
|
|
154116
153333
|
let dragInProgress = false;
|
|
154117
153334
|
let selectionStartOrEndGrabbed;
|
|
154118
153335
|
let caretPositionOnDragStart;
|
|
@@ -155128,9 +154345,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
155128
154345
|
const { sequenceData: sequenceData2, readOnly: readOnly2, disableBpEditing, selectionLayer: selectionLayer2 } = this.props;
|
|
155129
154346
|
const { isProtein: isProtein2 } = sequenceData2;
|
|
155130
154347
|
const makeTextCopyable = /* @__PURE__ */ __name((transformFunc, className, action2 = "copy") => {
|
|
155131
|
-
|
|
155132
|
-
|
|
155133
|
-
text: () => {
|
|
154348
|
+
document.querySelectorAll(`.${className}`).forEach((element2) => {
|
|
154349
|
+
element2.addEventListener("click", () => __async(this, null, function* () {
|
|
155134
154350
|
const { selectionLayer: selectionLayer22, editorName, store: store2 } = this.props;
|
|
155135
154351
|
const { sequenceData: sequenceData22, copyOptions: copyOptions2 } = store2.getState().VectorEditor[editorName];
|
|
155136
154352
|
const selectedSeqData = getSequenceDataBetweenRange(
|
|
@@ -155155,17 +154371,19 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
155155
154371
|
sequenceData22
|
|
155156
154372
|
);
|
|
155157
154373
|
this.sequenceDataToCopy = sequenceDataToCopy;
|
|
155158
|
-
|
|
155159
|
-
|
|
155160
|
-
|
|
155161
|
-
|
|
155162
|
-
|
|
155163
|
-
|
|
155164
|
-
|
|
155165
|
-
|
|
154374
|
+
const textToCopy = sequenceDataToCopy.textToCopy || sequenceDataToCopy.sequence;
|
|
154375
|
+
try {
|
|
154376
|
+
yield navigator.clipboard.writeText(textToCopy);
|
|
154377
|
+
if (action2 === "cut") {
|
|
154378
|
+
}
|
|
154379
|
+
if (window.Cypress) {
|
|
154380
|
+
window.Cypress.textToCopy = sequenceDataToCopy.textToCopy;
|
|
154381
|
+
window.Cypress.seqDataToCopy = sequenceDataToCopy;
|
|
154382
|
+
}
|
|
154383
|
+
} catch (err2) {
|
|
154384
|
+
console.error(`${action2} failed:`, err2);
|
|
155166
154385
|
}
|
|
155167
|
-
|
|
155168
|
-
}
|
|
154386
|
+
}));
|
|
155169
154387
|
});
|
|
155170
154388
|
}, "makeTextCopyable");
|
|
155171
154389
|
const aaCopy = {
|
|
@@ -155803,7 +155021,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
155803
155021
|
},
|
|
155804
155022
|
closePanelButton,
|
|
155805
155023
|
/* @__PURE__ */ React$2.createElement(
|
|
155806
|
-
|
|
155024
|
+
Keyboard,
|
|
155807
155025
|
{
|
|
155808
155026
|
value: selectedBps,
|
|
155809
155027
|
onCopy: this.handleCopy,
|
|
@@ -168006,15 +167224,27 @@ ${seqDataToCopy}\r
|
|
|
168006
167224
|
this.copyAllAlignmentsFastaClipboardHelper && this.copyAllAlignmentsFastaClipboardHelper.destroy();
|
|
168007
167225
|
},
|
|
168008
167226
|
didMount: () => {
|
|
168009
|
-
|
|
168010
|
-
`.copyAllAlignmentsFastaClipboardHelper
|
|
168011
|
-
{
|
|
168012
|
-
action: "copyAllAlignmentsFasta",
|
|
168013
|
-
text: () => {
|
|
168014
|
-
return this.getAllAlignmentsFastaText();
|
|
168015
|
-
}
|
|
168016
|
-
}
|
|
167227
|
+
const elements = document.querySelectorAll(
|
|
167228
|
+
`.copyAllAlignmentsFastaClipboardHelper`
|
|
168017
167229
|
);
|
|
167230
|
+
elements.forEach((element2) => {
|
|
167231
|
+
element2.addEventListener(
|
|
167232
|
+
"click",
|
|
167233
|
+
() => __async(this, null, function* () {
|
|
167234
|
+
const textToCopy = this.getAllAlignmentsFastaText();
|
|
167235
|
+
try {
|
|
167236
|
+
yield navigator.clipboard.writeText(
|
|
167237
|
+
textToCopy
|
|
167238
|
+
);
|
|
167239
|
+
} catch (err2) {
|
|
167240
|
+
console.error(
|
|
167241
|
+
"Failed to copy text:",
|
|
167242
|
+
err2
|
|
167243
|
+
);
|
|
167244
|
+
}
|
|
167245
|
+
})
|
|
167246
|
+
);
|
|
167247
|
+
});
|
|
168018
167248
|
},
|
|
168019
167249
|
onClick: () => {
|
|
168020
167250
|
window.toastr.success("Selection Copied");
|
|
@@ -168027,11 +167257,13 @@ ${seqDataToCopy}\r
|
|
|
168027
167257
|
this.copySpecificAlignmentFastaClipboardHelper && this.copySpecificAlignmentFastaClipboardHelper.destroy();
|
|
168028
167258
|
},
|
|
168029
167259
|
didMount: () => {
|
|
168030
|
-
|
|
168031
|
-
`.copySpecificAlignmentFastaClipboardHelper
|
|
168032
|
-
|
|
168033
|
-
|
|
168034
|
-
|
|
167260
|
+
const elements = document.querySelectorAll(
|
|
167261
|
+
`.copySpecificAlignmentFastaClipboardHelper`
|
|
167262
|
+
);
|
|
167263
|
+
elements.forEach((element2) => {
|
|
167264
|
+
element2.addEventListener(
|
|
167265
|
+
"click",
|
|
167266
|
+
() => __async(this, null, function* () {
|
|
168035
167267
|
const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
|
|
168036
167268
|
const seqDataToCopy = getSequenceDataBetweenRange(
|
|
168037
167269
|
alignmentData,
|
|
@@ -168040,10 +167272,19 @@ ${seqDataToCopy}\r
|
|
|
168040
167272
|
const seqDataToCopyAsFasta = `>${name2}\r
|
|
168041
167273
|
${seqDataToCopy}\r
|
|
168042
167274
|
`;
|
|
168043
|
-
|
|
168044
|
-
|
|
168045
|
-
|
|
168046
|
-
|
|
167275
|
+
try {
|
|
167276
|
+
yield navigator.clipboard.writeText(
|
|
167277
|
+
seqDataToCopyAsFasta
|
|
167278
|
+
);
|
|
167279
|
+
} catch (err2) {
|
|
167280
|
+
console.error(
|
|
167281
|
+
"Failed to copy text:",
|
|
167282
|
+
err2
|
|
167283
|
+
);
|
|
167284
|
+
}
|
|
167285
|
+
})
|
|
167286
|
+
);
|
|
167287
|
+
});
|
|
168047
167288
|
},
|
|
168048
167289
|
onClick: () => {
|
|
168049
167290
|
window.toastr.success(
|
|
@@ -168058,20 +167299,31 @@ ${seqDataToCopy}\r
|
|
|
168058
167299
|
this.copySpecificAlignmentAsPlainClipboardHelper && this.copySpecificAlignmentAsPlainClipboardHelper.destroy();
|
|
168059
167300
|
},
|
|
168060
167301
|
didMount: () => {
|
|
168061
|
-
|
|
168062
|
-
`.copySpecificAlignmentAsPlainClipboardHelper
|
|
168063
|
-
|
|
168064
|
-
|
|
168065
|
-
|
|
167302
|
+
const elements = document.querySelectorAll(
|
|
167303
|
+
`.copySpecificAlignmentAsPlainClipboardHelper`
|
|
167304
|
+
);
|
|
167305
|
+
elements.forEach((element2) => {
|
|
167306
|
+
element2.addEventListener(
|
|
167307
|
+
"click",
|
|
167308
|
+
() => __async(this, null, function* () {
|
|
168066
167309
|
const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
|
|
168067
167310
|
const seqDataToCopy = getSequenceDataBetweenRange(
|
|
168068
167311
|
alignmentData,
|
|
168069
167312
|
selectionLayer2
|
|
168070
167313
|
).sequence;
|
|
168071
|
-
|
|
168072
|
-
|
|
168073
|
-
|
|
168074
|
-
|
|
167314
|
+
try {
|
|
167315
|
+
yield navigator.clipboard.writeText(
|
|
167316
|
+
seqDataToCopy
|
|
167317
|
+
);
|
|
167318
|
+
} catch (err2) {
|
|
167319
|
+
console.error(
|
|
167320
|
+
"Failed to copy text:",
|
|
167321
|
+
err2
|
|
167322
|
+
);
|
|
167323
|
+
}
|
|
167324
|
+
})
|
|
167325
|
+
);
|
|
167326
|
+
});
|
|
168075
167327
|
},
|
|
168076
167328
|
onClick: () => {
|
|
168077
167329
|
window.toastr.success("Selection Copied");
|