@teselagen/ove 0.7.3 → 0.7.5
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 +4 -0
- package/index.cjs.js +732 -101
- package/index.es.js +733 -102
- package/index.umd.js +721 -81
- package/package.json +3 -6
- package/src/AlignmentView/index.js +45 -83
- package/src/withEditorInteractions/Keyboard.js +2 -2
- package/src/withEditorInteractions/index.js +13 -20
- package/withEditorInteractions/Keyboard.d.ts +2 -2
package/index.umd.js
CHANGED
|
@@ -102796,7 +102796,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
102796
102796
|
this.props.children && isFunction$2(this.props.children) ? this.props.children(windowDimensions) : this.props.children
|
|
102797
102797
|
);
|
|
102798
102798
|
if (asPortal)
|
|
102799
|
-
return
|
|
102799
|
+
return reactExports.createPortal(inner2, window.document.body);
|
|
102800
102800
|
return inner2;
|
|
102801
102801
|
}
|
|
102802
102802
|
}, __name(_F, "FillWindow"), _F);
|
|
@@ -145041,6 +145041,684 @@ ${seq.sequence}
|
|
|
145041
145041
|
)(Droppable$1);
|
|
145042
145042
|
ConnectedDroppable.defaultProps = defaultProps;
|
|
145043
145043
|
var ConnectedDroppable$1 = ConnectedDroppable;
|
|
145044
|
+
var clipboard = { exports: {} };
|
|
145045
|
+
/*!
|
|
145046
|
+
* clipboard.js v2.0.11
|
|
145047
|
+
* https://clipboardjs.com/
|
|
145048
|
+
*
|
|
145049
|
+
* Licensed MIT © Zeno Rocha
|
|
145050
|
+
*/
|
|
145051
|
+
(function(module2, exports3) {
|
|
145052
|
+
(/* @__PURE__ */ __name(function webpackUniversalModuleDefinition(root2, factory) {
|
|
145053
|
+
module2.exports = factory();
|
|
145054
|
+
}, "webpackUniversalModuleDefinition"))(commonjsGlobal, function() {
|
|
145055
|
+
return (
|
|
145056
|
+
/******/
|
|
145057
|
+
function() {
|
|
145058
|
+
var __webpack_modules__ = {
|
|
145059
|
+
/***/
|
|
145060
|
+
686: (
|
|
145061
|
+
/***/
|
|
145062
|
+
function(__unused_webpack_module, __webpack_exports__, __webpack_require__2) {
|
|
145063
|
+
__webpack_require__2.d(__webpack_exports__, {
|
|
145064
|
+
"default": function() {
|
|
145065
|
+
return (
|
|
145066
|
+
/* binding */
|
|
145067
|
+
clipboard2
|
|
145068
|
+
);
|
|
145069
|
+
}
|
|
145070
|
+
});
|
|
145071
|
+
var tiny_emitter = __webpack_require__2(279);
|
|
145072
|
+
var tiny_emitter_default = /* @__PURE__ */ __webpack_require__2.n(tiny_emitter);
|
|
145073
|
+
var listen = __webpack_require__2(370);
|
|
145074
|
+
var listen_default = /* @__PURE__ */ __webpack_require__2.n(listen);
|
|
145075
|
+
var src_select = __webpack_require__2(817);
|
|
145076
|
+
var select_default = /* @__PURE__ */ __webpack_require__2.n(src_select);
|
|
145077
|
+
function command(type2) {
|
|
145078
|
+
try {
|
|
145079
|
+
return document.execCommand(type2);
|
|
145080
|
+
} catch (err2) {
|
|
145081
|
+
return false;
|
|
145082
|
+
}
|
|
145083
|
+
}
|
|
145084
|
+
__name(command, "command");
|
|
145085
|
+
var ClipboardActionCut = /* @__PURE__ */ __name(function ClipboardActionCut2(target) {
|
|
145086
|
+
var selectedText = select_default()(target);
|
|
145087
|
+
command("cut");
|
|
145088
|
+
return selectedText;
|
|
145089
|
+
}, "ClipboardActionCut");
|
|
145090
|
+
var actions_cut = ClipboardActionCut;
|
|
145091
|
+
function createFakeElement(value) {
|
|
145092
|
+
var isRTL = document.documentElement.getAttribute("dir") === "rtl";
|
|
145093
|
+
var fakeElement = document.createElement("textarea");
|
|
145094
|
+
fakeElement.style.fontSize = "12pt";
|
|
145095
|
+
fakeElement.style.border = "0";
|
|
145096
|
+
fakeElement.style.padding = "0";
|
|
145097
|
+
fakeElement.style.margin = "0";
|
|
145098
|
+
fakeElement.style.position = "absolute";
|
|
145099
|
+
fakeElement.style[isRTL ? "right" : "left"] = "-9999px";
|
|
145100
|
+
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
|
|
145101
|
+
fakeElement.style.top = "".concat(yPosition, "px");
|
|
145102
|
+
fakeElement.setAttribute("readonly", "");
|
|
145103
|
+
fakeElement.value = value;
|
|
145104
|
+
return fakeElement;
|
|
145105
|
+
}
|
|
145106
|
+
__name(createFakeElement, "createFakeElement");
|
|
145107
|
+
var fakeCopyAction = /* @__PURE__ */ __name(function fakeCopyAction2(value, options) {
|
|
145108
|
+
var fakeElement = createFakeElement(value);
|
|
145109
|
+
options.container.appendChild(fakeElement);
|
|
145110
|
+
var selectedText = select_default()(fakeElement);
|
|
145111
|
+
command("copy");
|
|
145112
|
+
fakeElement.remove();
|
|
145113
|
+
return selectedText;
|
|
145114
|
+
}, "fakeCopyAction");
|
|
145115
|
+
var ClipboardActionCopy = /* @__PURE__ */ __name(function ClipboardActionCopy2(target) {
|
|
145116
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
145117
|
+
container: document.body
|
|
145118
|
+
};
|
|
145119
|
+
var selectedText = "";
|
|
145120
|
+
if (typeof target === "string") {
|
|
145121
|
+
selectedText = fakeCopyAction(target, options);
|
|
145122
|
+
} else if (target instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(target === null || target === void 0 ? void 0 : target.type)) {
|
|
145123
|
+
selectedText = fakeCopyAction(target.value, options);
|
|
145124
|
+
} else {
|
|
145125
|
+
selectedText = select_default()(target);
|
|
145126
|
+
command("copy");
|
|
145127
|
+
}
|
|
145128
|
+
return selectedText;
|
|
145129
|
+
}, "ClipboardActionCopy");
|
|
145130
|
+
var actions_copy = ClipboardActionCopy;
|
|
145131
|
+
function _typeof2(obj) {
|
|
145132
|
+
"@babel/helpers - typeof";
|
|
145133
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
145134
|
+
_typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145135
|
+
return typeof obj2;
|
|
145136
|
+
}, "_typeof");
|
|
145137
|
+
} else {
|
|
145138
|
+
_typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145139
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
145140
|
+
}, "_typeof");
|
|
145141
|
+
}
|
|
145142
|
+
return _typeof2(obj);
|
|
145143
|
+
}
|
|
145144
|
+
__name(_typeof2, "_typeof");
|
|
145145
|
+
var ClipboardActionDefault = /* @__PURE__ */ __name(function ClipboardActionDefault2() {
|
|
145146
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
145147
|
+
var _options$action = options.action, action2 = _options$action === void 0 ? "copy" : _options$action, container = options.container, target = options.target, text2 = options.text;
|
|
145148
|
+
if (action2 !== "copy" && action2 !== "cut") {
|
|
145149
|
+
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
145150
|
+
}
|
|
145151
|
+
if (target !== void 0) {
|
|
145152
|
+
if (target && _typeof2(target) === "object" && target.nodeType === 1) {
|
|
145153
|
+
if (action2 === "copy" && target.hasAttribute("disabled")) {
|
|
145154
|
+
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
|
145155
|
+
}
|
|
145156
|
+
if (action2 === "cut" && (target.hasAttribute("readonly") || target.hasAttribute("disabled"))) {
|
|
145157
|
+
throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
|
|
145158
|
+
}
|
|
145159
|
+
} else {
|
|
145160
|
+
throw new Error('Invalid "target" value, use a valid Element');
|
|
145161
|
+
}
|
|
145162
|
+
}
|
|
145163
|
+
if (text2) {
|
|
145164
|
+
return actions_copy(text2, {
|
|
145165
|
+
container
|
|
145166
|
+
});
|
|
145167
|
+
}
|
|
145168
|
+
if (target) {
|
|
145169
|
+
return action2 === "cut" ? actions_cut(target) : actions_copy(target, {
|
|
145170
|
+
container
|
|
145171
|
+
});
|
|
145172
|
+
}
|
|
145173
|
+
}, "ClipboardActionDefault");
|
|
145174
|
+
var actions_default = ClipboardActionDefault;
|
|
145175
|
+
function clipboard_typeof(obj) {
|
|
145176
|
+
"@babel/helpers - typeof";
|
|
145177
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
145178
|
+
clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145179
|
+
return typeof obj2;
|
|
145180
|
+
}, "_typeof");
|
|
145181
|
+
} else {
|
|
145182
|
+
clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
145183
|
+
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
145184
|
+
}, "_typeof");
|
|
145185
|
+
}
|
|
145186
|
+
return clipboard_typeof(obj);
|
|
145187
|
+
}
|
|
145188
|
+
__name(clipboard_typeof, "clipboard_typeof");
|
|
145189
|
+
function _classCallCheck2(instance, Constructor) {
|
|
145190
|
+
if (!(instance instanceof Constructor)) {
|
|
145191
|
+
throw new TypeError("Cannot call a class as a function");
|
|
145192
|
+
}
|
|
145193
|
+
}
|
|
145194
|
+
__name(_classCallCheck2, "_classCallCheck");
|
|
145195
|
+
function _defineProperties2(target, props) {
|
|
145196
|
+
for (var i2 = 0; i2 < props.length; i2++) {
|
|
145197
|
+
var descriptor = props[i2];
|
|
145198
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
145199
|
+
descriptor.configurable = true;
|
|
145200
|
+
if ("value" in descriptor)
|
|
145201
|
+
descriptor.writable = true;
|
|
145202
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
145203
|
+
}
|
|
145204
|
+
}
|
|
145205
|
+
__name(_defineProperties2, "_defineProperties");
|
|
145206
|
+
function _createClass2(Constructor, protoProps, staticProps) {
|
|
145207
|
+
if (protoProps)
|
|
145208
|
+
_defineProperties2(Constructor.prototype, protoProps);
|
|
145209
|
+
if (staticProps)
|
|
145210
|
+
_defineProperties2(Constructor, staticProps);
|
|
145211
|
+
return Constructor;
|
|
145212
|
+
}
|
|
145213
|
+
__name(_createClass2, "_createClass");
|
|
145214
|
+
function _inherits2(subClass, superClass) {
|
|
145215
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
145216
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
145217
|
+
}
|
|
145218
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
145219
|
+
if (superClass)
|
|
145220
|
+
_setPrototypeOf2(subClass, superClass);
|
|
145221
|
+
}
|
|
145222
|
+
__name(_inherits2, "_inherits");
|
|
145223
|
+
function _setPrototypeOf2(o2, p2) {
|
|
145224
|
+
_setPrototypeOf2 = Object.setPrototypeOf || /* @__PURE__ */ __name(function _setPrototypeOf3(o3, p3) {
|
|
145225
|
+
o3.__proto__ = p3;
|
|
145226
|
+
return o3;
|
|
145227
|
+
}, "_setPrototypeOf");
|
|
145228
|
+
return _setPrototypeOf2(o2, p2);
|
|
145229
|
+
}
|
|
145230
|
+
__name(_setPrototypeOf2, "_setPrototypeOf");
|
|
145231
|
+
function _createSuper2(Derived) {
|
|
145232
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct2();
|
|
145233
|
+
return /* @__PURE__ */ __name(function _createSuperInternal() {
|
|
145234
|
+
var Super = _getPrototypeOf2(Derived), result;
|
|
145235
|
+
if (hasNativeReflectConstruct) {
|
|
145236
|
+
var NewTarget = _getPrototypeOf2(this).constructor;
|
|
145237
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
145238
|
+
} else {
|
|
145239
|
+
result = Super.apply(this, arguments);
|
|
145240
|
+
}
|
|
145241
|
+
return _possibleConstructorReturn2(this, result);
|
|
145242
|
+
}, "_createSuperInternal");
|
|
145243
|
+
}
|
|
145244
|
+
__name(_createSuper2, "_createSuper");
|
|
145245
|
+
function _possibleConstructorReturn2(self2, call2) {
|
|
145246
|
+
if (call2 && (clipboard_typeof(call2) === "object" || typeof call2 === "function")) {
|
|
145247
|
+
return call2;
|
|
145248
|
+
}
|
|
145249
|
+
return _assertThisInitialized2(self2);
|
|
145250
|
+
}
|
|
145251
|
+
__name(_possibleConstructorReturn2, "_possibleConstructorReturn");
|
|
145252
|
+
function _assertThisInitialized2(self2) {
|
|
145253
|
+
if (self2 === void 0) {
|
|
145254
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
145255
|
+
}
|
|
145256
|
+
return self2;
|
|
145257
|
+
}
|
|
145258
|
+
__name(_assertThisInitialized2, "_assertThisInitialized");
|
|
145259
|
+
function _isNativeReflectConstruct2() {
|
|
145260
|
+
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
145261
|
+
return false;
|
|
145262
|
+
if (Reflect.construct.sham)
|
|
145263
|
+
return false;
|
|
145264
|
+
if (typeof Proxy === "function")
|
|
145265
|
+
return true;
|
|
145266
|
+
try {
|
|
145267
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
145268
|
+
}));
|
|
145269
|
+
return true;
|
|
145270
|
+
} catch (e2) {
|
|
145271
|
+
return false;
|
|
145272
|
+
}
|
|
145273
|
+
}
|
|
145274
|
+
__name(_isNativeReflectConstruct2, "_isNativeReflectConstruct");
|
|
145275
|
+
function _getPrototypeOf2(o2) {
|
|
145276
|
+
_getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf : /* @__PURE__ */ __name(function _getPrototypeOf3(o3) {
|
|
145277
|
+
return o3.__proto__ || Object.getPrototypeOf(o3);
|
|
145278
|
+
}, "_getPrototypeOf");
|
|
145279
|
+
return _getPrototypeOf2(o2);
|
|
145280
|
+
}
|
|
145281
|
+
__name(_getPrototypeOf2, "_getPrototypeOf");
|
|
145282
|
+
function getAttributeValue(suffix, element2) {
|
|
145283
|
+
var attribute = "data-clipboard-".concat(suffix);
|
|
145284
|
+
if (!element2.hasAttribute(attribute)) {
|
|
145285
|
+
return;
|
|
145286
|
+
}
|
|
145287
|
+
return element2.getAttribute(attribute);
|
|
145288
|
+
}
|
|
145289
|
+
__name(getAttributeValue, "getAttributeValue");
|
|
145290
|
+
var Clipboard2 = /* @__PURE__ */ function(_Emitter) {
|
|
145291
|
+
_inherits2(Clipboard3, _Emitter);
|
|
145292
|
+
var _super = _createSuper2(Clipboard3);
|
|
145293
|
+
function Clipboard3(trigger2, options) {
|
|
145294
|
+
var _this;
|
|
145295
|
+
_classCallCheck2(this, Clipboard3);
|
|
145296
|
+
_this = _super.call(this);
|
|
145297
|
+
_this.resolveOptions(options);
|
|
145298
|
+
_this.listenClick(trigger2);
|
|
145299
|
+
return _this;
|
|
145300
|
+
}
|
|
145301
|
+
__name(Clipboard3, "Clipboard");
|
|
145302
|
+
_createClass2(Clipboard3, [{
|
|
145303
|
+
key: "resolveOptions",
|
|
145304
|
+
value: /* @__PURE__ */ __name(function resolveOptions() {
|
|
145305
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
145306
|
+
this.action = typeof options.action === "function" ? options.action : this.defaultAction;
|
|
145307
|
+
this.target = typeof options.target === "function" ? options.target : this.defaultTarget;
|
|
145308
|
+
this.text = typeof options.text === "function" ? options.text : this.defaultText;
|
|
145309
|
+
this.container = clipboard_typeof(options.container) === "object" ? options.container : document.body;
|
|
145310
|
+
}, "resolveOptions")
|
|
145311
|
+
/**
|
|
145312
|
+
* Adds a click event listener to the passed trigger.
|
|
145313
|
+
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
|
145314
|
+
*/
|
|
145315
|
+
}, {
|
|
145316
|
+
key: "listenClick",
|
|
145317
|
+
value: /* @__PURE__ */ __name(function listenClick(trigger2) {
|
|
145318
|
+
var _this2 = this;
|
|
145319
|
+
this.listener = listen_default()(trigger2, "click", function(e2) {
|
|
145320
|
+
return _this2.onClick(e2);
|
|
145321
|
+
});
|
|
145322
|
+
}, "listenClick")
|
|
145323
|
+
/**
|
|
145324
|
+
* Defines a new `ClipboardAction` on each click event.
|
|
145325
|
+
* @param {Event} e
|
|
145326
|
+
*/
|
|
145327
|
+
}, {
|
|
145328
|
+
key: "onClick",
|
|
145329
|
+
value: /* @__PURE__ */ __name(function onClick(e2) {
|
|
145330
|
+
var trigger2 = e2.delegateTarget || e2.currentTarget;
|
|
145331
|
+
var action2 = this.action(trigger2) || "copy";
|
|
145332
|
+
var text2 = actions_default({
|
|
145333
|
+
action: action2,
|
|
145334
|
+
container: this.container,
|
|
145335
|
+
target: this.target(trigger2),
|
|
145336
|
+
text: this.text(trigger2)
|
|
145337
|
+
});
|
|
145338
|
+
this.emit(text2 ? "success" : "error", {
|
|
145339
|
+
action: action2,
|
|
145340
|
+
text: text2,
|
|
145341
|
+
trigger: trigger2,
|
|
145342
|
+
clearSelection: /* @__PURE__ */ __name(function clearSelection() {
|
|
145343
|
+
if (trigger2) {
|
|
145344
|
+
trigger2.focus();
|
|
145345
|
+
}
|
|
145346
|
+
window.getSelection().removeAllRanges();
|
|
145347
|
+
}, "clearSelection")
|
|
145348
|
+
});
|
|
145349
|
+
}, "onClick")
|
|
145350
|
+
/**
|
|
145351
|
+
* Default `action` lookup function.
|
|
145352
|
+
* @param {Element} trigger
|
|
145353
|
+
*/
|
|
145354
|
+
}, {
|
|
145355
|
+
key: "defaultAction",
|
|
145356
|
+
value: /* @__PURE__ */ __name(function defaultAction(trigger2) {
|
|
145357
|
+
return getAttributeValue("action", trigger2);
|
|
145358
|
+
}, "defaultAction")
|
|
145359
|
+
/**
|
|
145360
|
+
* Default `target` lookup function.
|
|
145361
|
+
* @param {Element} trigger
|
|
145362
|
+
*/
|
|
145363
|
+
}, {
|
|
145364
|
+
key: "defaultTarget",
|
|
145365
|
+
value: /* @__PURE__ */ __name(function defaultTarget(trigger2) {
|
|
145366
|
+
var selector = getAttributeValue("target", trigger2);
|
|
145367
|
+
if (selector) {
|
|
145368
|
+
return document.querySelector(selector);
|
|
145369
|
+
}
|
|
145370
|
+
}, "defaultTarget")
|
|
145371
|
+
/**
|
|
145372
|
+
* Allow fire programmatically a copy action
|
|
145373
|
+
* @param {String|HTMLElement} target
|
|
145374
|
+
* @param {Object} options
|
|
145375
|
+
* @returns Text copied.
|
|
145376
|
+
*/
|
|
145377
|
+
}, {
|
|
145378
|
+
key: "defaultText",
|
|
145379
|
+
/**
|
|
145380
|
+
* Default `text` lookup function.
|
|
145381
|
+
* @param {Element} trigger
|
|
145382
|
+
*/
|
|
145383
|
+
value: /* @__PURE__ */ __name(function defaultText(trigger2) {
|
|
145384
|
+
return getAttributeValue("text", trigger2);
|
|
145385
|
+
}, "defaultText")
|
|
145386
|
+
/**
|
|
145387
|
+
* Destroy lifecycle.
|
|
145388
|
+
*/
|
|
145389
|
+
}, {
|
|
145390
|
+
key: "destroy",
|
|
145391
|
+
value: /* @__PURE__ */ __name(function destroy2() {
|
|
145392
|
+
this.listener.destroy();
|
|
145393
|
+
}, "destroy")
|
|
145394
|
+
}], [{
|
|
145395
|
+
key: "copy",
|
|
145396
|
+
value: /* @__PURE__ */ __name(function copy2(target) {
|
|
145397
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
145398
|
+
container: document.body
|
|
145399
|
+
};
|
|
145400
|
+
return actions_copy(target, options);
|
|
145401
|
+
}, "copy")
|
|
145402
|
+
/**
|
|
145403
|
+
* Allow fire programmatically a cut action
|
|
145404
|
+
* @param {String|HTMLElement} target
|
|
145405
|
+
* @returns Text cutted.
|
|
145406
|
+
*/
|
|
145407
|
+
}, {
|
|
145408
|
+
key: "cut",
|
|
145409
|
+
value: /* @__PURE__ */ __name(function cut(target) {
|
|
145410
|
+
return actions_cut(target);
|
|
145411
|
+
}, "cut")
|
|
145412
|
+
/**
|
|
145413
|
+
* Returns the support of the given action, or all actions if no action is
|
|
145414
|
+
* given.
|
|
145415
|
+
* @param {String} [action]
|
|
145416
|
+
*/
|
|
145417
|
+
}, {
|
|
145418
|
+
key: "isSupported",
|
|
145419
|
+
value: /* @__PURE__ */ __name(function isSupported() {
|
|
145420
|
+
var action2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"];
|
|
145421
|
+
var actions2 = typeof action2 === "string" ? [action2] : action2;
|
|
145422
|
+
var support = !!document.queryCommandSupported;
|
|
145423
|
+
actions2.forEach(function(action3) {
|
|
145424
|
+
support = support && !!document.queryCommandSupported(action3);
|
|
145425
|
+
});
|
|
145426
|
+
return support;
|
|
145427
|
+
}, "isSupported")
|
|
145428
|
+
}]);
|
|
145429
|
+
return Clipboard3;
|
|
145430
|
+
}(tiny_emitter_default());
|
|
145431
|
+
var clipboard2 = Clipboard2;
|
|
145432
|
+
}
|
|
145433
|
+
),
|
|
145434
|
+
/***/
|
|
145435
|
+
828: (
|
|
145436
|
+
/***/
|
|
145437
|
+
function(module3) {
|
|
145438
|
+
var DOCUMENT_NODE_TYPE = 9;
|
|
145439
|
+
if (typeof Element !== "undefined" && !Element.prototype.matches) {
|
|
145440
|
+
var proto = Element.prototype;
|
|
145441
|
+
proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
|
|
145442
|
+
}
|
|
145443
|
+
function closest2(element2, selector) {
|
|
145444
|
+
while (element2 && element2.nodeType !== DOCUMENT_NODE_TYPE) {
|
|
145445
|
+
if (typeof element2.matches === "function" && element2.matches(selector)) {
|
|
145446
|
+
return element2;
|
|
145447
|
+
}
|
|
145448
|
+
element2 = element2.parentNode;
|
|
145449
|
+
}
|
|
145450
|
+
}
|
|
145451
|
+
__name(closest2, "closest");
|
|
145452
|
+
module3.exports = closest2;
|
|
145453
|
+
}
|
|
145454
|
+
),
|
|
145455
|
+
/***/
|
|
145456
|
+
438: (
|
|
145457
|
+
/***/
|
|
145458
|
+
function(module3, __unused_webpack_exports, __webpack_require__2) {
|
|
145459
|
+
var closest2 = __webpack_require__2(828);
|
|
145460
|
+
function _delegate(element2, selector, type2, callback2, useCapture) {
|
|
145461
|
+
var listenerFn = listener.apply(this, arguments);
|
|
145462
|
+
element2.addEventListener(type2, listenerFn, useCapture);
|
|
145463
|
+
return {
|
|
145464
|
+
destroy: function() {
|
|
145465
|
+
element2.removeEventListener(type2, listenerFn, useCapture);
|
|
145466
|
+
}
|
|
145467
|
+
};
|
|
145468
|
+
}
|
|
145469
|
+
__name(_delegate, "_delegate");
|
|
145470
|
+
function delegate(elements, selector, type2, callback2, useCapture) {
|
|
145471
|
+
if (typeof elements.addEventListener === "function") {
|
|
145472
|
+
return _delegate.apply(null, arguments);
|
|
145473
|
+
}
|
|
145474
|
+
if (typeof type2 === "function") {
|
|
145475
|
+
return _delegate.bind(null, document).apply(null, arguments);
|
|
145476
|
+
}
|
|
145477
|
+
if (typeof elements === "string") {
|
|
145478
|
+
elements = document.querySelectorAll(elements);
|
|
145479
|
+
}
|
|
145480
|
+
return Array.prototype.map.call(elements, function(element2) {
|
|
145481
|
+
return _delegate(element2, selector, type2, callback2, useCapture);
|
|
145482
|
+
});
|
|
145483
|
+
}
|
|
145484
|
+
__name(delegate, "delegate");
|
|
145485
|
+
function listener(element2, selector, type2, callback2) {
|
|
145486
|
+
return function(e2) {
|
|
145487
|
+
e2.delegateTarget = closest2(e2.target, selector);
|
|
145488
|
+
if (e2.delegateTarget) {
|
|
145489
|
+
callback2.call(element2, e2);
|
|
145490
|
+
}
|
|
145491
|
+
};
|
|
145492
|
+
}
|
|
145493
|
+
__name(listener, "listener");
|
|
145494
|
+
module3.exports = delegate;
|
|
145495
|
+
}
|
|
145496
|
+
),
|
|
145497
|
+
/***/
|
|
145498
|
+
879: (
|
|
145499
|
+
/***/
|
|
145500
|
+
function(__unused_webpack_module, exports4) {
|
|
145501
|
+
exports4.node = function(value) {
|
|
145502
|
+
return value !== void 0 && value instanceof HTMLElement && value.nodeType === 1;
|
|
145503
|
+
};
|
|
145504
|
+
exports4.nodeList = function(value) {
|
|
145505
|
+
var type2 = Object.prototype.toString.call(value);
|
|
145506
|
+
return value !== void 0 && (type2 === "[object NodeList]" || type2 === "[object HTMLCollection]") && "length" in value && (value.length === 0 || exports4.node(value[0]));
|
|
145507
|
+
};
|
|
145508
|
+
exports4.string = function(value) {
|
|
145509
|
+
return typeof value === "string" || value instanceof String;
|
|
145510
|
+
};
|
|
145511
|
+
exports4.fn = function(value) {
|
|
145512
|
+
var type2 = Object.prototype.toString.call(value);
|
|
145513
|
+
return type2 === "[object Function]";
|
|
145514
|
+
};
|
|
145515
|
+
}
|
|
145516
|
+
),
|
|
145517
|
+
/***/
|
|
145518
|
+
370: (
|
|
145519
|
+
/***/
|
|
145520
|
+
function(module3, __unused_webpack_exports, __webpack_require__2) {
|
|
145521
|
+
var is2 = __webpack_require__2(879);
|
|
145522
|
+
var delegate = __webpack_require__2(438);
|
|
145523
|
+
function listen(target, type2, callback2) {
|
|
145524
|
+
if (!target && !type2 && !callback2) {
|
|
145525
|
+
throw new Error("Missing required arguments");
|
|
145526
|
+
}
|
|
145527
|
+
if (!is2.string(type2)) {
|
|
145528
|
+
throw new TypeError("Second argument must be a String");
|
|
145529
|
+
}
|
|
145530
|
+
if (!is2.fn(callback2)) {
|
|
145531
|
+
throw new TypeError("Third argument must be a Function");
|
|
145532
|
+
}
|
|
145533
|
+
if (is2.node(target)) {
|
|
145534
|
+
return listenNode(target, type2, callback2);
|
|
145535
|
+
} else if (is2.nodeList(target)) {
|
|
145536
|
+
return listenNodeList(target, type2, callback2);
|
|
145537
|
+
} else if (is2.string(target)) {
|
|
145538
|
+
return listenSelector(target, type2, callback2);
|
|
145539
|
+
} else {
|
|
145540
|
+
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
145541
|
+
}
|
|
145542
|
+
}
|
|
145543
|
+
__name(listen, "listen");
|
|
145544
|
+
function listenNode(node2, type2, callback2) {
|
|
145545
|
+
node2.addEventListener(type2, callback2);
|
|
145546
|
+
return {
|
|
145547
|
+
destroy: function() {
|
|
145548
|
+
node2.removeEventListener(type2, callback2);
|
|
145549
|
+
}
|
|
145550
|
+
};
|
|
145551
|
+
}
|
|
145552
|
+
__name(listenNode, "listenNode");
|
|
145553
|
+
function listenNodeList(nodeList, type2, callback2) {
|
|
145554
|
+
Array.prototype.forEach.call(nodeList, function(node2) {
|
|
145555
|
+
node2.addEventListener(type2, callback2);
|
|
145556
|
+
});
|
|
145557
|
+
return {
|
|
145558
|
+
destroy: function() {
|
|
145559
|
+
Array.prototype.forEach.call(nodeList, function(node2) {
|
|
145560
|
+
node2.removeEventListener(type2, callback2);
|
|
145561
|
+
});
|
|
145562
|
+
}
|
|
145563
|
+
};
|
|
145564
|
+
}
|
|
145565
|
+
__name(listenNodeList, "listenNodeList");
|
|
145566
|
+
function listenSelector(selector, type2, callback2) {
|
|
145567
|
+
return delegate(document.body, selector, type2, callback2);
|
|
145568
|
+
}
|
|
145569
|
+
__name(listenSelector, "listenSelector");
|
|
145570
|
+
module3.exports = listen;
|
|
145571
|
+
}
|
|
145572
|
+
),
|
|
145573
|
+
/***/
|
|
145574
|
+
817: (
|
|
145575
|
+
/***/
|
|
145576
|
+
function(module3) {
|
|
145577
|
+
function select(element2) {
|
|
145578
|
+
var selectedText;
|
|
145579
|
+
if (element2.nodeName === "SELECT") {
|
|
145580
|
+
element2.focus();
|
|
145581
|
+
selectedText = element2.value;
|
|
145582
|
+
} else if (element2.nodeName === "INPUT" || element2.nodeName === "TEXTAREA") {
|
|
145583
|
+
var isReadOnly = element2.hasAttribute("readonly");
|
|
145584
|
+
if (!isReadOnly) {
|
|
145585
|
+
element2.setAttribute("readonly", "");
|
|
145586
|
+
}
|
|
145587
|
+
element2.select();
|
|
145588
|
+
element2.setSelectionRange(0, element2.value.length);
|
|
145589
|
+
if (!isReadOnly) {
|
|
145590
|
+
element2.removeAttribute("readonly");
|
|
145591
|
+
}
|
|
145592
|
+
selectedText = element2.value;
|
|
145593
|
+
} else {
|
|
145594
|
+
if (element2.hasAttribute("contenteditable")) {
|
|
145595
|
+
element2.focus();
|
|
145596
|
+
}
|
|
145597
|
+
var selection = window.getSelection();
|
|
145598
|
+
var range2 = document.createRange();
|
|
145599
|
+
range2.selectNodeContents(element2);
|
|
145600
|
+
selection.removeAllRanges();
|
|
145601
|
+
selection.addRange(range2);
|
|
145602
|
+
selectedText = selection.toString();
|
|
145603
|
+
}
|
|
145604
|
+
return selectedText;
|
|
145605
|
+
}
|
|
145606
|
+
__name(select, "select");
|
|
145607
|
+
module3.exports = select;
|
|
145608
|
+
}
|
|
145609
|
+
),
|
|
145610
|
+
/***/
|
|
145611
|
+
279: (
|
|
145612
|
+
/***/
|
|
145613
|
+
function(module3) {
|
|
145614
|
+
function E2() {
|
|
145615
|
+
}
|
|
145616
|
+
__name(E2, "E");
|
|
145617
|
+
E2.prototype = {
|
|
145618
|
+
on: function(name2, callback2, ctx) {
|
|
145619
|
+
var e2 = this.e || (this.e = {});
|
|
145620
|
+
(e2[name2] || (e2[name2] = [])).push({
|
|
145621
|
+
fn: callback2,
|
|
145622
|
+
ctx
|
|
145623
|
+
});
|
|
145624
|
+
return this;
|
|
145625
|
+
},
|
|
145626
|
+
once: function(name2, callback2, ctx) {
|
|
145627
|
+
var self2 = this;
|
|
145628
|
+
function listener() {
|
|
145629
|
+
self2.off(name2, listener);
|
|
145630
|
+
callback2.apply(ctx, arguments);
|
|
145631
|
+
}
|
|
145632
|
+
__name(listener, "listener");
|
|
145633
|
+
listener._ = callback2;
|
|
145634
|
+
return this.on(name2, listener, ctx);
|
|
145635
|
+
},
|
|
145636
|
+
emit: function(name2) {
|
|
145637
|
+
var data = [].slice.call(arguments, 1);
|
|
145638
|
+
var evtArr = ((this.e || (this.e = {}))[name2] || []).slice();
|
|
145639
|
+
var i2 = 0;
|
|
145640
|
+
var len2 = evtArr.length;
|
|
145641
|
+
for (i2; i2 < len2; i2++) {
|
|
145642
|
+
evtArr[i2].fn.apply(evtArr[i2].ctx, data);
|
|
145643
|
+
}
|
|
145644
|
+
return this;
|
|
145645
|
+
},
|
|
145646
|
+
off: function(name2, callback2) {
|
|
145647
|
+
var e2 = this.e || (this.e = {});
|
|
145648
|
+
var evts = e2[name2];
|
|
145649
|
+
var liveEvents = [];
|
|
145650
|
+
if (evts && callback2) {
|
|
145651
|
+
for (var i2 = 0, len2 = evts.length; i2 < len2; i2++) {
|
|
145652
|
+
if (evts[i2].fn !== callback2 && evts[i2].fn._ !== callback2)
|
|
145653
|
+
liveEvents.push(evts[i2]);
|
|
145654
|
+
}
|
|
145655
|
+
}
|
|
145656
|
+
liveEvents.length ? e2[name2] = liveEvents : delete e2[name2];
|
|
145657
|
+
return this;
|
|
145658
|
+
}
|
|
145659
|
+
};
|
|
145660
|
+
module3.exports = E2;
|
|
145661
|
+
module3.exports.TinyEmitter = E2;
|
|
145662
|
+
}
|
|
145663
|
+
)
|
|
145664
|
+
/******/
|
|
145665
|
+
};
|
|
145666
|
+
var __webpack_module_cache__ = {};
|
|
145667
|
+
function __webpack_require__(moduleId) {
|
|
145668
|
+
if (__webpack_module_cache__[moduleId]) {
|
|
145669
|
+
return __webpack_module_cache__[moduleId].exports;
|
|
145670
|
+
}
|
|
145671
|
+
var module3 = __webpack_module_cache__[moduleId] = {
|
|
145672
|
+
/******/
|
|
145673
|
+
// no module.id needed
|
|
145674
|
+
/******/
|
|
145675
|
+
// no module.loaded needed
|
|
145676
|
+
/******/
|
|
145677
|
+
exports: {}
|
|
145678
|
+
/******/
|
|
145679
|
+
};
|
|
145680
|
+
__webpack_modules__[moduleId](module3, module3.exports, __webpack_require__);
|
|
145681
|
+
return module3.exports;
|
|
145682
|
+
}
|
|
145683
|
+
__name(__webpack_require__, "__webpack_require__");
|
|
145684
|
+
!function() {
|
|
145685
|
+
__webpack_require__.n = function(module3) {
|
|
145686
|
+
var getter = module3 && module3.__esModule ? (
|
|
145687
|
+
/******/
|
|
145688
|
+
function() {
|
|
145689
|
+
return module3["default"];
|
|
145690
|
+
}
|
|
145691
|
+
) : (
|
|
145692
|
+
/******/
|
|
145693
|
+
function() {
|
|
145694
|
+
return module3;
|
|
145695
|
+
}
|
|
145696
|
+
);
|
|
145697
|
+
__webpack_require__.d(getter, { a: getter });
|
|
145698
|
+
return getter;
|
|
145699
|
+
};
|
|
145700
|
+
}();
|
|
145701
|
+
!function() {
|
|
145702
|
+
__webpack_require__.d = function(exports4, definition2) {
|
|
145703
|
+
for (var key2 in definition2) {
|
|
145704
|
+
if (__webpack_require__.o(definition2, key2) && !__webpack_require__.o(exports4, key2)) {
|
|
145705
|
+
Object.defineProperty(exports4, key2, { enumerable: true, get: definition2[key2] });
|
|
145706
|
+
}
|
|
145707
|
+
}
|
|
145708
|
+
};
|
|
145709
|
+
}();
|
|
145710
|
+
!function() {
|
|
145711
|
+
__webpack_require__.o = function(obj, prop2) {
|
|
145712
|
+
return Object.prototype.hasOwnProperty.call(obj, prop2);
|
|
145713
|
+
};
|
|
145714
|
+
}();
|
|
145715
|
+
return __webpack_require__(686);
|
|
145716
|
+
}().default
|
|
145717
|
+
);
|
|
145718
|
+
});
|
|
145719
|
+
})(clipboard);
|
|
145720
|
+
var clipboardExports = clipboard.exports;
|
|
145721
|
+
const Clipboard$1 = /* @__PURE__ */ getDefaultExportFromCjs(clipboardExports);
|
|
145044
145722
|
var connectionStore = /* @__PURE__ */ new WeakMap();
|
|
145045
145723
|
var ITERATION_KEY = Symbol("iteration key");
|
|
145046
145724
|
function storeObservable(obj) {
|
|
@@ -150981,7 +151659,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
150981
151659
|
}
|
|
150982
151660
|
__name(showFileDialog, "showFileDialog");
|
|
150983
151661
|
const name = "@teselagen/ove";
|
|
150984
|
-
const version = "0.7.
|
|
151662
|
+
const version = "0.7.4";
|
|
150985
151663
|
const main = "./src/index.js";
|
|
150986
151664
|
const type = "module";
|
|
150987
151665
|
const exports$1 = {
|
|
@@ -153284,7 +153962,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
153284
153962
|
return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
153285
153963
|
}
|
|
153286
153964
|
__name(isElementInViewport, "isElementInViewport");
|
|
153287
|
-
const
|
|
153965
|
+
const _Clipboard = class _Clipboard extends React$2.Component {
|
|
153288
153966
|
constructor() {
|
|
153289
153967
|
super(...arguments);
|
|
153290
153968
|
__publicField(this, "handleKeyDown", /* @__PURE__ */ __name((e2) => {
|
|
@@ -153353,14 +154031,14 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
153353
154031
|
);
|
|
153354
154032
|
}
|
|
153355
154033
|
};
|
|
153356
|
-
__name(
|
|
154034
|
+
__name(_Clipboard, "Clipboard");
|
|
153357
154035
|
// static propTypes = {
|
|
153358
154036
|
// value: PropTypes.string.isRequired
|
|
153359
154037
|
// };
|
|
153360
|
-
__publicField(
|
|
154038
|
+
__publicField(_Clipboard, "defaultProps", {
|
|
153361
154039
|
className: "clipboard"
|
|
153362
154040
|
});
|
|
153363
|
-
let
|
|
154041
|
+
let Clipboard = _Clipboard;
|
|
153364
154042
|
let dragInProgress = false;
|
|
153365
154043
|
let selectionStartOrEndGrabbed;
|
|
153366
154044
|
let caretPositionOnDragStart;
|
|
@@ -154376,8 +155054,14 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154376
155054
|
const { sequenceData: sequenceData2, readOnly: readOnly2, disableBpEditing, selectionLayer: selectionLayer2 } = this.props;
|
|
154377
155055
|
const { isProtein: isProtein2 } = sequenceData2;
|
|
154378
155056
|
const makeTextCopyable = /* @__PURE__ */ __name((transformFunc, className, action2 = "copy") => {
|
|
154379
|
-
|
|
154380
|
-
|
|
155057
|
+
return new Clipboard$1(`.${className}`, {
|
|
155058
|
+
action: () => action2,
|
|
155059
|
+
text: () => {
|
|
155060
|
+
if (action2 === "copy") {
|
|
155061
|
+
document.body.addEventListener("copy", this.handleCopy);
|
|
155062
|
+
} else {
|
|
155063
|
+
document.body.addEventListener("cut", this.handleCut);
|
|
155064
|
+
}
|
|
154381
155065
|
const { editorName, store: store2 } = this.props;
|
|
154382
155066
|
const { sequenceData: sequenceData22, copyOptions: copyOptions2, selectionLayer: selectionLayer22 } = store2.getState().VectorEditor[editorName];
|
|
154383
155067
|
const selectedSeqData = getSequenceDataBetweenRange(
|
|
@@ -154402,22 +155086,12 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154402
155086
|
sequenceData22
|
|
154403
155087
|
);
|
|
154404
155088
|
this.sequenceDataToCopy = sequenceDataToCopy;
|
|
154405
|
-
const textToCopy = sequenceDataToCopy.textToCopy || sequenceDataToCopy.sequence;
|
|
154406
|
-
try {
|
|
154407
|
-
yield navigator.clipboard.writeText(textToCopy);
|
|
154408
|
-
} catch (err2) {
|
|
154409
|
-
console.error("Failed to copy text:", err2);
|
|
154410
|
-
}
|
|
154411
|
-
if (action2 === "copy") {
|
|
154412
|
-
document.body.addEventListener("copy", this.handleCopy);
|
|
154413
|
-
} else {
|
|
154414
|
-
document.body.addEventListener("cut", this.handleCut);
|
|
154415
|
-
}
|
|
154416
155089
|
if (window.Cypress) {
|
|
154417
155090
|
window.Cypress.textToCopy = sequenceDataToCopy.textToCopy;
|
|
154418
155091
|
window.Cypress.seqDataToCopy = sequenceDataToCopy;
|
|
154419
155092
|
}
|
|
154420
|
-
|
|
155093
|
+
return sequenceDataToCopy.textToCopy || sequenceDataToCopy.sequence;
|
|
155094
|
+
}
|
|
154421
155095
|
});
|
|
154422
155096
|
}, "makeTextCopyable");
|
|
154423
155097
|
const aaCopy = {
|
|
@@ -155055,7 +155729,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
155055
155729
|
},
|
|
155056
155730
|
closePanelButton,
|
|
155057
155731
|
/* @__PURE__ */ React$2.createElement(
|
|
155058
|
-
|
|
155732
|
+
Clipboard,
|
|
155059
155733
|
{
|
|
155060
155734
|
value: selectedBps,
|
|
155061
155735
|
onCopy: this.handleCopy,
|
|
@@ -173228,27 +173902,15 @@ ${seqDataToCopy}\r
|
|
|
173228
173902
|
this.copyAllAlignmentsFastaClipboardHelper && this.copyAllAlignmentsFastaClipboardHelper.destroy();
|
|
173229
173903
|
},
|
|
173230
173904
|
didMount: () => {
|
|
173231
|
-
|
|
173232
|
-
`.copyAllAlignmentsFastaClipboardHelper
|
|
173905
|
+
this.copyAllAlignmentsFastaClipboardHelper = new Clipboard$1(
|
|
173906
|
+
`.copyAllAlignmentsFastaClipboardHelper`,
|
|
173907
|
+
{
|
|
173908
|
+
action: "copyAllAlignmentsFasta",
|
|
173909
|
+
text: () => {
|
|
173910
|
+
return this.getAllAlignmentsFastaText();
|
|
173911
|
+
}
|
|
173912
|
+
}
|
|
173233
173913
|
);
|
|
173234
|
-
elements.forEach((element2) => {
|
|
173235
|
-
element2.addEventListener(
|
|
173236
|
-
"click",
|
|
173237
|
-
() => __async(this, null, function* () {
|
|
173238
|
-
const textToCopy = this.getAllAlignmentsFastaText();
|
|
173239
|
-
try {
|
|
173240
|
-
yield navigator.clipboard.writeText(
|
|
173241
|
-
textToCopy
|
|
173242
|
-
);
|
|
173243
|
-
} catch (err2) {
|
|
173244
|
-
console.error(
|
|
173245
|
-
"Failed to copy text:",
|
|
173246
|
-
err2
|
|
173247
|
-
);
|
|
173248
|
-
}
|
|
173249
|
-
})
|
|
173250
|
-
);
|
|
173251
|
-
});
|
|
173252
173914
|
},
|
|
173253
173915
|
onClick: () => {
|
|
173254
173916
|
window.toastr.success("Selection Copied");
|
|
@@ -173261,13 +173923,11 @@ ${seqDataToCopy}\r
|
|
|
173261
173923
|
this.copySpecificAlignmentFastaClipboardHelper && this.copySpecificAlignmentFastaClipboardHelper.destroy();
|
|
173262
173924
|
},
|
|
173263
173925
|
didMount: () => {
|
|
173264
|
-
|
|
173265
|
-
`.copySpecificAlignmentFastaClipboardHelper
|
|
173266
|
-
|
|
173267
|
-
|
|
173268
|
-
|
|
173269
|
-
"click",
|
|
173270
|
-
() => __async(this, null, function* () {
|
|
173926
|
+
this.copySpecificAlignmentFastaClipboardHelper = new Clipboard$1(
|
|
173927
|
+
`.copySpecificAlignmentFastaClipboardHelper`,
|
|
173928
|
+
{
|
|
173929
|
+
action: "copySpecificAlignmentFasta",
|
|
173930
|
+
text: () => {
|
|
173271
173931
|
const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
|
|
173272
173932
|
const seqDataToCopy = getSequenceDataBetweenRange(
|
|
173273
173933
|
alignmentData,
|
|
@@ -173276,19 +173936,10 @@ ${seqDataToCopy}\r
|
|
|
173276
173936
|
const seqDataToCopyAsFasta = `>${name2}\r
|
|
173277
173937
|
${seqDataToCopy}\r
|
|
173278
173938
|
`;
|
|
173279
|
-
|
|
173280
|
-
|
|
173281
|
-
|
|
173282
|
-
|
|
173283
|
-
} catch (err2) {
|
|
173284
|
-
console.error(
|
|
173285
|
-
"Failed to copy text:",
|
|
173286
|
-
err2
|
|
173287
|
-
);
|
|
173288
|
-
}
|
|
173289
|
-
})
|
|
173290
|
-
);
|
|
173291
|
-
});
|
|
173939
|
+
return seqDataToCopyAsFasta;
|
|
173940
|
+
}
|
|
173941
|
+
}
|
|
173942
|
+
);
|
|
173292
173943
|
},
|
|
173293
173944
|
onClick: () => {
|
|
173294
173945
|
window.toastr.success(
|
|
@@ -173303,31 +173954,20 @@ ${seqDataToCopy}\r
|
|
|
173303
173954
|
this.copySpecificAlignmentAsPlainClipboardHelper && this.copySpecificAlignmentAsPlainClipboardHelper.destroy();
|
|
173304
173955
|
},
|
|
173305
173956
|
didMount: () => {
|
|
173306
|
-
|
|
173307
|
-
`.copySpecificAlignmentAsPlainClipboardHelper
|
|
173308
|
-
|
|
173309
|
-
|
|
173310
|
-
|
|
173311
|
-
"click",
|
|
173312
|
-
() => __async(this, null, function* () {
|
|
173957
|
+
this.copySpecificAlignmentAsPlainClipboardHelper = new Clipboard$1(
|
|
173958
|
+
`.copySpecificAlignmentAsPlainClipboardHelper`,
|
|
173959
|
+
{
|
|
173960
|
+
action: "copySpecificAlignmentFasta",
|
|
173961
|
+
text: () => {
|
|
173313
173962
|
const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
|
|
173314
173963
|
const seqDataToCopy = getSequenceDataBetweenRange(
|
|
173315
173964
|
alignmentData,
|
|
173316
173965
|
selectionLayer2
|
|
173317
173966
|
).sequence;
|
|
173318
|
-
|
|
173319
|
-
|
|
173320
|
-
|
|
173321
|
-
|
|
173322
|
-
} catch (err2) {
|
|
173323
|
-
console.error(
|
|
173324
|
-
"Failed to copy text:",
|
|
173325
|
-
err2
|
|
173326
|
-
);
|
|
173327
|
-
}
|
|
173328
|
-
})
|
|
173329
|
-
);
|
|
173330
|
-
});
|
|
173967
|
+
return seqDataToCopy;
|
|
173968
|
+
}
|
|
173969
|
+
}
|
|
173970
|
+
);
|
|
173331
173971
|
},
|
|
173332
173972
|
onClick: () => {
|
|
173333
173973
|
window.toastr.success("Selection Copied");
|