@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.es.js
CHANGED
|
@@ -67,26 +67,6 @@ import { DateRangeInput, DateInput } from "@blueprintjs/datetime";
|
|
|
67
67
|
import { getCreateNewItem, MultiSelect, Suggest } from "@blueprintjs/select";
|
|
68
68
|
import { compose as compose$1, combineReducers, createStore as createStore$2, applyMiddleware, bindActionCreators } from "redux";
|
|
69
69
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
70
|
-
function _mergeNamespaces(n2, m2) {
|
|
71
|
-
for (var i = 0; i < m2.length; i++) {
|
|
72
|
-
const e = m2[i];
|
|
73
|
-
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
74
|
-
for (const k2 in e) {
|
|
75
|
-
if (k2 !== "default" && !(k2 in n2)) {
|
|
76
|
-
const d2 = Object.getOwnPropertyDescriptor(e, k2);
|
|
77
|
-
if (d2) {
|
|
78
|
-
Object.defineProperty(n2, k2, d2.get ? d2 : {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: () => e[k2]
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
|
|
88
|
-
}
|
|
89
|
-
__name(_mergeNamespaces, "_mergeNamespaces");
|
|
90
70
|
var top = "top";
|
|
91
71
|
var bottom = "bottom";
|
|
92
72
|
var right = "right";
|
|
@@ -17930,16 +17910,25 @@ var getIntrinsic = /* @__PURE__ */ __name(function GetIntrinsic(name2, allowMiss
|
|
|
17930
17910
|
return value;
|
|
17931
17911
|
}, "GetIntrinsic");
|
|
17932
17912
|
var callBind$3 = { exports: {} };
|
|
17933
|
-
var
|
|
17934
|
-
var
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17913
|
+
var esDefineProperty;
|
|
17914
|
+
var hasRequiredEsDefineProperty;
|
|
17915
|
+
function requireEsDefineProperty() {
|
|
17916
|
+
if (hasRequiredEsDefineProperty)
|
|
17917
|
+
return esDefineProperty;
|
|
17918
|
+
hasRequiredEsDefineProperty = 1;
|
|
17919
|
+
var GetIntrinsic3 = getIntrinsic;
|
|
17920
|
+
var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
|
|
17921
|
+
if ($defineProperty2) {
|
|
17922
|
+
try {
|
|
17923
|
+
$defineProperty2({}, "a", { value: 1 });
|
|
17924
|
+
} catch (e) {
|
|
17925
|
+
$defineProperty2 = false;
|
|
17926
|
+
}
|
|
17940
17927
|
}
|
|
17928
|
+
esDefineProperty = $defineProperty2;
|
|
17929
|
+
return esDefineProperty;
|
|
17941
17930
|
}
|
|
17942
|
-
|
|
17931
|
+
__name(requireEsDefineProperty, "requireEsDefineProperty");
|
|
17943
17932
|
var GetIntrinsic$3 = getIntrinsic;
|
|
17944
17933
|
var $gOPD$1 = GetIntrinsic$3("%Object.getOwnPropertyDescriptor%", true);
|
|
17945
17934
|
if ($gOPD$1) {
|
|
@@ -17950,7 +17939,7 @@ if ($gOPD$1) {
|
|
|
17950
17939
|
}
|
|
17951
17940
|
}
|
|
17952
17941
|
var gopd$1 = $gOPD$1;
|
|
17953
|
-
var $defineProperty$1 =
|
|
17942
|
+
var $defineProperty$1 = requireEsDefineProperty();
|
|
17954
17943
|
var $SyntaxError = syntax;
|
|
17955
17944
|
var $TypeError$4 = type$1;
|
|
17956
17945
|
var gopd = gopd$1;
|
|
@@ -17991,7 +17980,7 @@ var defineDataProperty$1 = /* @__PURE__ */ __name(function defineDataProperty(ob
|
|
|
17991
17980
|
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
17992
17981
|
}
|
|
17993
17982
|
}, "defineDataProperty");
|
|
17994
|
-
var $defineProperty =
|
|
17983
|
+
var $defineProperty = requireEsDefineProperty();
|
|
17995
17984
|
var hasPropertyDescriptors = /* @__PURE__ */ __name(function hasPropertyDescriptors2() {
|
|
17996
17985
|
return !!$defineProperty;
|
|
17997
17986
|
}, "hasPropertyDescriptors");
|
|
@@ -18060,7 +18049,7 @@ var setFunctionLength = /* @__PURE__ */ __name(function setFunctionLength2(fn4,
|
|
|
18060
18049
|
var $apply = GetIntrinsic3("%Function.prototype.apply%");
|
|
18061
18050
|
var $call = GetIntrinsic3("%Function.prototype.call%");
|
|
18062
18051
|
var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind3.call($call, $apply);
|
|
18063
|
-
var $defineProperty2 =
|
|
18052
|
+
var $defineProperty2 = requireEsDefineProperty();
|
|
18064
18053
|
var $max = GetIntrinsic3("%Math.max%");
|
|
18065
18054
|
module2.exports = /* @__PURE__ */ __name(function callBind2(originalFunction) {
|
|
18066
18055
|
if (typeof originalFunction !== "function") {
|
|
@@ -116398,789 +116387,6 @@ const ConnectedDroppable = connect(
|
|
|
116398
116387
|
)(Droppable$1);
|
|
116399
116388
|
ConnectedDroppable.defaultProps = defaultProps;
|
|
116400
116389
|
var ConnectedDroppable$1 = ConnectedDroppable;
|
|
116401
|
-
var clipboard$1 = { exports: {} };
|
|
116402
|
-
/*!
|
|
116403
|
-
* clipboard.js v2.0.8
|
|
116404
|
-
* https://clipboardjs.com/
|
|
116405
|
-
*
|
|
116406
|
-
* Licensed MIT © Zeno Rocha
|
|
116407
|
-
*/
|
|
116408
|
-
(function(module2, exports2) {
|
|
116409
|
-
(/* @__PURE__ */ __name(function webpackUniversalModuleDefinition(root2, factory) {
|
|
116410
|
-
module2.exports = factory();
|
|
116411
|
-
}, "webpackUniversalModuleDefinition"))(commonjsGlobal, function() {
|
|
116412
|
-
return (
|
|
116413
|
-
/******/
|
|
116414
|
-
function() {
|
|
116415
|
-
var __webpack_modules__ = {
|
|
116416
|
-
/***/
|
|
116417
|
-
134: (
|
|
116418
|
-
/***/
|
|
116419
|
-
function(__unused_webpack_module, __webpack_exports__, __webpack_require__2) {
|
|
116420
|
-
__webpack_require__2.d(__webpack_exports__, {
|
|
116421
|
-
"default": function() {
|
|
116422
|
-
return (
|
|
116423
|
-
/* binding */
|
|
116424
|
-
clipboard2
|
|
116425
|
-
);
|
|
116426
|
-
}
|
|
116427
|
-
});
|
|
116428
|
-
var tiny_emitter = __webpack_require__2(279);
|
|
116429
|
-
var tiny_emitter_default = /* @__PURE__ */ __webpack_require__2.n(tiny_emitter);
|
|
116430
|
-
var listen = __webpack_require__2(370);
|
|
116431
|
-
var listen_default = /* @__PURE__ */ __webpack_require__2.n(listen);
|
|
116432
|
-
var src_select = __webpack_require__2(817);
|
|
116433
|
-
var select_default = /* @__PURE__ */ __webpack_require__2.n(src_select);
|
|
116434
|
-
function _typeof2(obj) {
|
|
116435
|
-
"@babel/helpers - typeof";
|
|
116436
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
116437
|
-
_typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
116438
|
-
return typeof obj2;
|
|
116439
|
-
}, "_typeof");
|
|
116440
|
-
} else {
|
|
116441
|
-
_typeof2 = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
116442
|
-
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
116443
|
-
}, "_typeof");
|
|
116444
|
-
}
|
|
116445
|
-
return _typeof2(obj);
|
|
116446
|
-
}
|
|
116447
|
-
__name(_typeof2, "_typeof");
|
|
116448
|
-
function _classCallCheck2(instance, Constructor) {
|
|
116449
|
-
if (!(instance instanceof Constructor)) {
|
|
116450
|
-
throw new TypeError("Cannot call a class as a function");
|
|
116451
|
-
}
|
|
116452
|
-
}
|
|
116453
|
-
__name(_classCallCheck2, "_classCallCheck");
|
|
116454
|
-
function _defineProperties2(target, props) {
|
|
116455
|
-
for (var i = 0; i < props.length; i++) {
|
|
116456
|
-
var descriptor = props[i];
|
|
116457
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
116458
|
-
descriptor.configurable = true;
|
|
116459
|
-
if ("value" in descriptor)
|
|
116460
|
-
descriptor.writable = true;
|
|
116461
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
116462
|
-
}
|
|
116463
|
-
}
|
|
116464
|
-
__name(_defineProperties2, "_defineProperties");
|
|
116465
|
-
function _createClass2(Constructor, protoProps, staticProps) {
|
|
116466
|
-
if (protoProps)
|
|
116467
|
-
_defineProperties2(Constructor.prototype, protoProps);
|
|
116468
|
-
return Constructor;
|
|
116469
|
-
}
|
|
116470
|
-
__name(_createClass2, "_createClass");
|
|
116471
|
-
var ClipboardAction = /* @__PURE__ */ function() {
|
|
116472
|
-
function ClipboardAction2(options) {
|
|
116473
|
-
_classCallCheck2(this, ClipboardAction2);
|
|
116474
|
-
this.resolveOptions(options);
|
|
116475
|
-
this.initSelection();
|
|
116476
|
-
}
|
|
116477
|
-
__name(ClipboardAction2, "ClipboardAction");
|
|
116478
|
-
_createClass2(ClipboardAction2, [{
|
|
116479
|
-
key: "resolveOptions",
|
|
116480
|
-
value: /* @__PURE__ */ __name(function resolveOptions() {
|
|
116481
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
116482
|
-
this.action = options.action;
|
|
116483
|
-
this.container = options.container;
|
|
116484
|
-
this.emitter = options.emitter;
|
|
116485
|
-
this.target = options.target;
|
|
116486
|
-
this.text = options.text;
|
|
116487
|
-
this.trigger = options.trigger;
|
|
116488
|
-
this.selectedText = "";
|
|
116489
|
-
}, "resolveOptions")
|
|
116490
|
-
/**
|
|
116491
|
-
* Decides which selection strategy is going to be applied based
|
|
116492
|
-
* on the existence of `text` and `target` properties.
|
|
116493
|
-
*/
|
|
116494
|
-
}, {
|
|
116495
|
-
key: "initSelection",
|
|
116496
|
-
value: /* @__PURE__ */ __name(function initSelection() {
|
|
116497
|
-
if (this.text) {
|
|
116498
|
-
this.selectFake();
|
|
116499
|
-
} else if (this.target) {
|
|
116500
|
-
this.selectTarget();
|
|
116501
|
-
}
|
|
116502
|
-
}, "initSelection")
|
|
116503
|
-
/**
|
|
116504
|
-
* Creates a fake textarea element, sets its value from `text` property,
|
|
116505
|
-
*/
|
|
116506
|
-
}, {
|
|
116507
|
-
key: "createFakeElement",
|
|
116508
|
-
value: /* @__PURE__ */ __name(function createFakeElement() {
|
|
116509
|
-
var isRTL = document.documentElement.getAttribute("dir") === "rtl";
|
|
116510
|
-
this.fakeElem = document.createElement("textarea");
|
|
116511
|
-
this.fakeElem.style.fontSize = "12pt";
|
|
116512
|
-
this.fakeElem.style.border = "0";
|
|
116513
|
-
this.fakeElem.style.padding = "0";
|
|
116514
|
-
this.fakeElem.style.margin = "0";
|
|
116515
|
-
this.fakeElem.style.position = "absolute";
|
|
116516
|
-
this.fakeElem.style[isRTL ? "right" : "left"] = "-9999px";
|
|
116517
|
-
var yPosition = window.pageYOffset || document.documentElement.scrollTop;
|
|
116518
|
-
this.fakeElem.style.top = "".concat(yPosition, "px");
|
|
116519
|
-
this.fakeElem.setAttribute("readonly", "");
|
|
116520
|
-
this.fakeElem.value = this.text;
|
|
116521
|
-
return this.fakeElem;
|
|
116522
|
-
}, "createFakeElement")
|
|
116523
|
-
/**
|
|
116524
|
-
* Get's the value of fakeElem,
|
|
116525
|
-
* and makes a selection on it.
|
|
116526
|
-
*/
|
|
116527
|
-
}, {
|
|
116528
|
-
key: "selectFake",
|
|
116529
|
-
value: /* @__PURE__ */ __name(function selectFake() {
|
|
116530
|
-
var _this = this;
|
|
116531
|
-
var fakeElem = this.createFakeElement();
|
|
116532
|
-
this.fakeHandlerCallback = function() {
|
|
116533
|
-
return _this.removeFake();
|
|
116534
|
-
};
|
|
116535
|
-
this.fakeHandler = this.container.addEventListener("click", this.fakeHandlerCallback) || true;
|
|
116536
|
-
this.container.appendChild(fakeElem);
|
|
116537
|
-
this.selectedText = select_default()(fakeElem);
|
|
116538
|
-
this.copyText();
|
|
116539
|
-
this.removeFake();
|
|
116540
|
-
}, "selectFake")
|
|
116541
|
-
/**
|
|
116542
|
-
* Only removes the fake element after another click event, that way
|
|
116543
|
-
* a user can hit `Ctrl+C` to copy because selection still exists.
|
|
116544
|
-
*/
|
|
116545
|
-
}, {
|
|
116546
|
-
key: "removeFake",
|
|
116547
|
-
value: /* @__PURE__ */ __name(function removeFake() {
|
|
116548
|
-
if (this.fakeHandler) {
|
|
116549
|
-
this.container.removeEventListener("click", this.fakeHandlerCallback);
|
|
116550
|
-
this.fakeHandler = null;
|
|
116551
|
-
this.fakeHandlerCallback = null;
|
|
116552
|
-
}
|
|
116553
|
-
if (this.fakeElem) {
|
|
116554
|
-
this.container.removeChild(this.fakeElem);
|
|
116555
|
-
this.fakeElem = null;
|
|
116556
|
-
}
|
|
116557
|
-
}, "removeFake")
|
|
116558
|
-
/**
|
|
116559
|
-
* Selects the content from element passed on `target` property.
|
|
116560
|
-
*/
|
|
116561
|
-
}, {
|
|
116562
|
-
key: "selectTarget",
|
|
116563
|
-
value: /* @__PURE__ */ __name(function selectTarget() {
|
|
116564
|
-
this.selectedText = select_default()(this.target);
|
|
116565
|
-
this.copyText();
|
|
116566
|
-
}, "selectTarget")
|
|
116567
|
-
/**
|
|
116568
|
-
* Executes the copy operation based on the current selection.
|
|
116569
|
-
*/
|
|
116570
|
-
}, {
|
|
116571
|
-
key: "copyText",
|
|
116572
|
-
value: /* @__PURE__ */ __name(function copyText() {
|
|
116573
|
-
var succeeded;
|
|
116574
|
-
try {
|
|
116575
|
-
succeeded = document.execCommand(this.action);
|
|
116576
|
-
} catch (err2) {
|
|
116577
|
-
succeeded = false;
|
|
116578
|
-
}
|
|
116579
|
-
this.handleResult(succeeded);
|
|
116580
|
-
}, "copyText")
|
|
116581
|
-
/**
|
|
116582
|
-
* Fires an event based on the copy operation result.
|
|
116583
|
-
* @param {Boolean} succeeded
|
|
116584
|
-
*/
|
|
116585
|
-
}, {
|
|
116586
|
-
key: "handleResult",
|
|
116587
|
-
value: /* @__PURE__ */ __name(function handleResult(succeeded) {
|
|
116588
|
-
this.emitter.emit(succeeded ? "success" : "error", {
|
|
116589
|
-
action: this.action,
|
|
116590
|
-
text: this.selectedText,
|
|
116591
|
-
trigger: this.trigger,
|
|
116592
|
-
clearSelection: this.clearSelection.bind(this)
|
|
116593
|
-
});
|
|
116594
|
-
}, "handleResult")
|
|
116595
|
-
/**
|
|
116596
|
-
* Moves focus away from `target` and back to the trigger, removes current selection.
|
|
116597
|
-
*/
|
|
116598
|
-
}, {
|
|
116599
|
-
key: "clearSelection",
|
|
116600
|
-
value: /* @__PURE__ */ __name(function clearSelection() {
|
|
116601
|
-
if (this.trigger) {
|
|
116602
|
-
this.trigger.focus();
|
|
116603
|
-
}
|
|
116604
|
-
document.activeElement.blur();
|
|
116605
|
-
window.getSelection().removeAllRanges();
|
|
116606
|
-
}, "clearSelection")
|
|
116607
|
-
/**
|
|
116608
|
-
* Sets the `action` to be performed which can be either 'copy' or 'cut'.
|
|
116609
|
-
* @param {String} action
|
|
116610
|
-
*/
|
|
116611
|
-
}, {
|
|
116612
|
-
key: "destroy",
|
|
116613
|
-
/**
|
|
116614
|
-
* Destroy lifecycle.
|
|
116615
|
-
*/
|
|
116616
|
-
value: /* @__PURE__ */ __name(function destroy2() {
|
|
116617
|
-
this.removeFake();
|
|
116618
|
-
}, "destroy")
|
|
116619
|
-
}, {
|
|
116620
|
-
key: "action",
|
|
116621
|
-
set: /* @__PURE__ */ __name(function set6() {
|
|
116622
|
-
var action2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "copy";
|
|
116623
|
-
this._action = action2;
|
|
116624
|
-
if (this._action !== "copy" && this._action !== "cut") {
|
|
116625
|
-
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
116626
|
-
}
|
|
116627
|
-
}, "set"),
|
|
116628
|
-
get: /* @__PURE__ */ __name(function get7() {
|
|
116629
|
-
return this._action;
|
|
116630
|
-
}, "get")
|
|
116631
|
-
/**
|
|
116632
|
-
* Sets the `target` property using an element
|
|
116633
|
-
* that will be have its content copied.
|
|
116634
|
-
* @param {Element} target
|
|
116635
|
-
*/
|
|
116636
|
-
}, {
|
|
116637
|
-
key: "target",
|
|
116638
|
-
set: /* @__PURE__ */ __name(function set6(target) {
|
|
116639
|
-
if (target !== void 0) {
|
|
116640
|
-
if (target && _typeof2(target) === "object" && target.nodeType === 1) {
|
|
116641
|
-
if (this.action === "copy" && target.hasAttribute("disabled")) {
|
|
116642
|
-
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
|
116643
|
-
}
|
|
116644
|
-
if (this.action === "cut" && (target.hasAttribute("readonly") || target.hasAttribute("disabled"))) {
|
|
116645
|
-
throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);
|
|
116646
|
-
}
|
|
116647
|
-
this._target = target;
|
|
116648
|
-
} else {
|
|
116649
|
-
throw new Error('Invalid "target" value, use a valid Element');
|
|
116650
|
-
}
|
|
116651
|
-
}
|
|
116652
|
-
}, "set"),
|
|
116653
|
-
get: /* @__PURE__ */ __name(function get7() {
|
|
116654
|
-
return this._target;
|
|
116655
|
-
}, "get")
|
|
116656
|
-
}]);
|
|
116657
|
-
return ClipboardAction2;
|
|
116658
|
-
}();
|
|
116659
|
-
var clipboard_action = ClipboardAction;
|
|
116660
|
-
function clipboard_typeof(obj) {
|
|
116661
|
-
"@babel/helpers - typeof";
|
|
116662
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
116663
|
-
clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
116664
|
-
return typeof obj2;
|
|
116665
|
-
}, "_typeof");
|
|
116666
|
-
} else {
|
|
116667
|
-
clipboard_typeof = /* @__PURE__ */ __name(function _typeof3(obj2) {
|
|
116668
|
-
return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
116669
|
-
}, "_typeof");
|
|
116670
|
-
}
|
|
116671
|
-
return clipboard_typeof(obj);
|
|
116672
|
-
}
|
|
116673
|
-
__name(clipboard_typeof, "clipboard_typeof");
|
|
116674
|
-
function clipboard_classCallCheck(instance, Constructor) {
|
|
116675
|
-
if (!(instance instanceof Constructor)) {
|
|
116676
|
-
throw new TypeError("Cannot call a class as a function");
|
|
116677
|
-
}
|
|
116678
|
-
}
|
|
116679
|
-
__name(clipboard_classCallCheck, "clipboard_classCallCheck");
|
|
116680
|
-
function clipboard_defineProperties(target, props) {
|
|
116681
|
-
for (var i = 0; i < props.length; i++) {
|
|
116682
|
-
var descriptor = props[i];
|
|
116683
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
116684
|
-
descriptor.configurable = true;
|
|
116685
|
-
if ("value" in descriptor)
|
|
116686
|
-
descriptor.writable = true;
|
|
116687
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
116688
|
-
}
|
|
116689
|
-
}
|
|
116690
|
-
__name(clipboard_defineProperties, "clipboard_defineProperties");
|
|
116691
|
-
function clipboard_createClass(Constructor, protoProps, staticProps) {
|
|
116692
|
-
if (protoProps)
|
|
116693
|
-
clipboard_defineProperties(Constructor.prototype, protoProps);
|
|
116694
|
-
if (staticProps)
|
|
116695
|
-
clipboard_defineProperties(Constructor, staticProps);
|
|
116696
|
-
return Constructor;
|
|
116697
|
-
}
|
|
116698
|
-
__name(clipboard_createClass, "clipboard_createClass");
|
|
116699
|
-
function _inherits2(subClass, superClass) {
|
|
116700
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
116701
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
116702
|
-
}
|
|
116703
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
116704
|
-
if (superClass)
|
|
116705
|
-
_setPrototypeOf2(subClass, superClass);
|
|
116706
|
-
}
|
|
116707
|
-
__name(_inherits2, "_inherits");
|
|
116708
|
-
function _setPrototypeOf2(o2, p2) {
|
|
116709
|
-
_setPrototypeOf2 = Object.setPrototypeOf || /* @__PURE__ */ __name(function _setPrototypeOf3(o3, p3) {
|
|
116710
|
-
o3.__proto__ = p3;
|
|
116711
|
-
return o3;
|
|
116712
|
-
}, "_setPrototypeOf");
|
|
116713
|
-
return _setPrototypeOf2(o2, p2);
|
|
116714
|
-
}
|
|
116715
|
-
__name(_setPrototypeOf2, "_setPrototypeOf");
|
|
116716
|
-
function _createSuper2(Derived) {
|
|
116717
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct2();
|
|
116718
|
-
return /* @__PURE__ */ __name(function _createSuperInternal() {
|
|
116719
|
-
var Super = _getPrototypeOf2(Derived), result;
|
|
116720
|
-
if (hasNativeReflectConstruct) {
|
|
116721
|
-
var NewTarget = _getPrototypeOf2(this).constructor;
|
|
116722
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
116723
|
-
} else {
|
|
116724
|
-
result = Super.apply(this, arguments);
|
|
116725
|
-
}
|
|
116726
|
-
return _possibleConstructorReturn2(this, result);
|
|
116727
|
-
}, "_createSuperInternal");
|
|
116728
|
-
}
|
|
116729
|
-
__name(_createSuper2, "_createSuper");
|
|
116730
|
-
function _possibleConstructorReturn2(self2, call2) {
|
|
116731
|
-
if (call2 && (clipboard_typeof(call2) === "object" || typeof call2 === "function")) {
|
|
116732
|
-
return call2;
|
|
116733
|
-
}
|
|
116734
|
-
return _assertThisInitialized2(self2);
|
|
116735
|
-
}
|
|
116736
|
-
__name(_possibleConstructorReturn2, "_possibleConstructorReturn");
|
|
116737
|
-
function _assertThisInitialized2(self2) {
|
|
116738
|
-
if (self2 === void 0) {
|
|
116739
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
116740
|
-
}
|
|
116741
|
-
return self2;
|
|
116742
|
-
}
|
|
116743
|
-
__name(_assertThisInitialized2, "_assertThisInitialized");
|
|
116744
|
-
function _isNativeReflectConstruct2() {
|
|
116745
|
-
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
116746
|
-
return false;
|
|
116747
|
-
if (Reflect.construct.sham)
|
|
116748
|
-
return false;
|
|
116749
|
-
if (typeof Proxy === "function")
|
|
116750
|
-
return true;
|
|
116751
|
-
try {
|
|
116752
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
116753
|
-
}));
|
|
116754
|
-
return true;
|
|
116755
|
-
} catch (e) {
|
|
116756
|
-
return false;
|
|
116757
|
-
}
|
|
116758
|
-
}
|
|
116759
|
-
__name(_isNativeReflectConstruct2, "_isNativeReflectConstruct");
|
|
116760
|
-
function _getPrototypeOf2(o2) {
|
|
116761
|
-
_getPrototypeOf2 = Object.setPrototypeOf ? Object.getPrototypeOf : /* @__PURE__ */ __name(function _getPrototypeOf3(o3) {
|
|
116762
|
-
return o3.__proto__ || Object.getPrototypeOf(o3);
|
|
116763
|
-
}, "_getPrototypeOf");
|
|
116764
|
-
return _getPrototypeOf2(o2);
|
|
116765
|
-
}
|
|
116766
|
-
__name(_getPrototypeOf2, "_getPrototypeOf");
|
|
116767
|
-
function getAttributeValue(suffix, element2) {
|
|
116768
|
-
var attribute = "data-clipboard-".concat(suffix);
|
|
116769
|
-
if (!element2.hasAttribute(attribute)) {
|
|
116770
|
-
return;
|
|
116771
|
-
}
|
|
116772
|
-
return element2.getAttribute(attribute);
|
|
116773
|
-
}
|
|
116774
|
-
__name(getAttributeValue, "getAttributeValue");
|
|
116775
|
-
var Clipboard2 = /* @__PURE__ */ function(_Emitter) {
|
|
116776
|
-
_inherits2(Clipboard3, _Emitter);
|
|
116777
|
-
var _super = _createSuper2(Clipboard3);
|
|
116778
|
-
function Clipboard3(trigger2, options) {
|
|
116779
|
-
var _this;
|
|
116780
|
-
clipboard_classCallCheck(this, Clipboard3);
|
|
116781
|
-
_this = _super.call(this);
|
|
116782
|
-
_this.resolveOptions(options);
|
|
116783
|
-
_this.listenClick(trigger2);
|
|
116784
|
-
return _this;
|
|
116785
|
-
}
|
|
116786
|
-
__name(Clipboard3, "Clipboard");
|
|
116787
|
-
clipboard_createClass(Clipboard3, [{
|
|
116788
|
-
key: "resolveOptions",
|
|
116789
|
-
value: /* @__PURE__ */ __name(function resolveOptions() {
|
|
116790
|
-
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
116791
|
-
this.action = typeof options.action === "function" ? options.action : this.defaultAction;
|
|
116792
|
-
this.target = typeof options.target === "function" ? options.target : this.defaultTarget;
|
|
116793
|
-
this.text = typeof options.text === "function" ? options.text : this.defaultText;
|
|
116794
|
-
this.container = clipboard_typeof(options.container) === "object" ? options.container : document.body;
|
|
116795
|
-
}, "resolveOptions")
|
|
116796
|
-
/**
|
|
116797
|
-
* Adds a click event listener to the passed trigger.
|
|
116798
|
-
* @param {String|HTMLElement|HTMLCollection|NodeList} trigger
|
|
116799
|
-
*/
|
|
116800
|
-
}, {
|
|
116801
|
-
key: "listenClick",
|
|
116802
|
-
value: /* @__PURE__ */ __name(function listenClick(trigger2) {
|
|
116803
|
-
var _this2 = this;
|
|
116804
|
-
this.listener = listen_default()(trigger2, "click", function(e) {
|
|
116805
|
-
return _this2.onClick(e);
|
|
116806
|
-
});
|
|
116807
|
-
}, "listenClick")
|
|
116808
|
-
/**
|
|
116809
|
-
* Defines a new `ClipboardAction` on each click event.
|
|
116810
|
-
* @param {Event} e
|
|
116811
|
-
*/
|
|
116812
|
-
}, {
|
|
116813
|
-
key: "onClick",
|
|
116814
|
-
value: /* @__PURE__ */ __name(function onClick(e) {
|
|
116815
|
-
var trigger2 = e.delegateTarget || e.currentTarget;
|
|
116816
|
-
if (this.clipboardAction) {
|
|
116817
|
-
this.clipboardAction = null;
|
|
116818
|
-
}
|
|
116819
|
-
this.clipboardAction = new clipboard_action({
|
|
116820
|
-
action: this.action(trigger2),
|
|
116821
|
-
target: this.target(trigger2),
|
|
116822
|
-
text: this.text(trigger2),
|
|
116823
|
-
container: this.container,
|
|
116824
|
-
trigger: trigger2,
|
|
116825
|
-
emitter: this
|
|
116826
|
-
});
|
|
116827
|
-
}, "onClick")
|
|
116828
|
-
/**
|
|
116829
|
-
* Default `action` lookup function.
|
|
116830
|
-
* @param {Element} trigger
|
|
116831
|
-
*/
|
|
116832
|
-
}, {
|
|
116833
|
-
key: "defaultAction",
|
|
116834
|
-
value: /* @__PURE__ */ __name(function defaultAction(trigger2) {
|
|
116835
|
-
return getAttributeValue("action", trigger2);
|
|
116836
|
-
}, "defaultAction")
|
|
116837
|
-
/**
|
|
116838
|
-
* Default `target` lookup function.
|
|
116839
|
-
* @param {Element} trigger
|
|
116840
|
-
*/
|
|
116841
|
-
}, {
|
|
116842
|
-
key: "defaultTarget",
|
|
116843
|
-
value: /* @__PURE__ */ __name(function defaultTarget(trigger2) {
|
|
116844
|
-
var selector = getAttributeValue("target", trigger2);
|
|
116845
|
-
if (selector) {
|
|
116846
|
-
return document.querySelector(selector);
|
|
116847
|
-
}
|
|
116848
|
-
}, "defaultTarget")
|
|
116849
|
-
/**
|
|
116850
|
-
* Returns the support of the given action, or all actions if no action is
|
|
116851
|
-
* given.
|
|
116852
|
-
* @param {String} [action]
|
|
116853
|
-
*/
|
|
116854
|
-
}, {
|
|
116855
|
-
key: "defaultText",
|
|
116856
|
-
/**
|
|
116857
|
-
* Default `text` lookup function.
|
|
116858
|
-
* @param {Element} trigger
|
|
116859
|
-
*/
|
|
116860
|
-
value: /* @__PURE__ */ __name(function defaultText(trigger2) {
|
|
116861
|
-
return getAttributeValue("text", trigger2);
|
|
116862
|
-
}, "defaultText")
|
|
116863
|
-
/**
|
|
116864
|
-
* Destroy lifecycle.
|
|
116865
|
-
*/
|
|
116866
|
-
}, {
|
|
116867
|
-
key: "destroy",
|
|
116868
|
-
value: /* @__PURE__ */ __name(function destroy2() {
|
|
116869
|
-
this.listener.destroy();
|
|
116870
|
-
if (this.clipboardAction) {
|
|
116871
|
-
this.clipboardAction.destroy();
|
|
116872
|
-
this.clipboardAction = null;
|
|
116873
|
-
}
|
|
116874
|
-
}, "destroy")
|
|
116875
|
-
}], [{
|
|
116876
|
-
key: "isSupported",
|
|
116877
|
-
value: /* @__PURE__ */ __name(function isSupported() {
|
|
116878
|
-
var action2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"];
|
|
116879
|
-
var actions2 = typeof action2 === "string" ? [action2] : action2;
|
|
116880
|
-
var support = !!document.queryCommandSupported;
|
|
116881
|
-
actions2.forEach(function(action3) {
|
|
116882
|
-
support = support && !!document.queryCommandSupported(action3);
|
|
116883
|
-
});
|
|
116884
|
-
return support;
|
|
116885
|
-
}, "isSupported")
|
|
116886
|
-
}]);
|
|
116887
|
-
return Clipboard3;
|
|
116888
|
-
}(tiny_emitter_default());
|
|
116889
|
-
var clipboard2 = Clipboard2;
|
|
116890
|
-
}
|
|
116891
|
-
),
|
|
116892
|
-
/***/
|
|
116893
|
-
828: (
|
|
116894
|
-
/***/
|
|
116895
|
-
function(module3) {
|
|
116896
|
-
var DOCUMENT_NODE_TYPE = 9;
|
|
116897
|
-
if (typeof Element !== "undefined" && !Element.prototype.matches) {
|
|
116898
|
-
var proto = Element.prototype;
|
|
116899
|
-
proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;
|
|
116900
|
-
}
|
|
116901
|
-
function closest2(element2, selector) {
|
|
116902
|
-
while (element2 && element2.nodeType !== DOCUMENT_NODE_TYPE) {
|
|
116903
|
-
if (typeof element2.matches === "function" && element2.matches(selector)) {
|
|
116904
|
-
return element2;
|
|
116905
|
-
}
|
|
116906
|
-
element2 = element2.parentNode;
|
|
116907
|
-
}
|
|
116908
|
-
}
|
|
116909
|
-
__name(closest2, "closest");
|
|
116910
|
-
module3.exports = closest2;
|
|
116911
|
-
}
|
|
116912
|
-
),
|
|
116913
|
-
/***/
|
|
116914
|
-
438: (
|
|
116915
|
-
/***/
|
|
116916
|
-
function(module3, __unused_webpack_exports, __webpack_require__2) {
|
|
116917
|
-
var closest2 = __webpack_require__2(828);
|
|
116918
|
-
function _delegate(element2, selector, type2, callback2, useCapture) {
|
|
116919
|
-
var listenerFn = listener.apply(this, arguments);
|
|
116920
|
-
element2.addEventListener(type2, listenerFn, useCapture);
|
|
116921
|
-
return {
|
|
116922
|
-
destroy: function() {
|
|
116923
|
-
element2.removeEventListener(type2, listenerFn, useCapture);
|
|
116924
|
-
}
|
|
116925
|
-
};
|
|
116926
|
-
}
|
|
116927
|
-
__name(_delegate, "_delegate");
|
|
116928
|
-
function delegate(elements, selector, type2, callback2, useCapture) {
|
|
116929
|
-
if (typeof elements.addEventListener === "function") {
|
|
116930
|
-
return _delegate.apply(null, arguments);
|
|
116931
|
-
}
|
|
116932
|
-
if (typeof type2 === "function") {
|
|
116933
|
-
return _delegate.bind(null, document).apply(null, arguments);
|
|
116934
|
-
}
|
|
116935
|
-
if (typeof elements === "string") {
|
|
116936
|
-
elements = document.querySelectorAll(elements);
|
|
116937
|
-
}
|
|
116938
|
-
return Array.prototype.map.call(elements, function(element2) {
|
|
116939
|
-
return _delegate(element2, selector, type2, callback2, useCapture);
|
|
116940
|
-
});
|
|
116941
|
-
}
|
|
116942
|
-
__name(delegate, "delegate");
|
|
116943
|
-
function listener(element2, selector, type2, callback2) {
|
|
116944
|
-
return function(e) {
|
|
116945
|
-
e.delegateTarget = closest2(e.target, selector);
|
|
116946
|
-
if (e.delegateTarget) {
|
|
116947
|
-
callback2.call(element2, e);
|
|
116948
|
-
}
|
|
116949
|
-
};
|
|
116950
|
-
}
|
|
116951
|
-
__name(listener, "listener");
|
|
116952
|
-
module3.exports = delegate;
|
|
116953
|
-
}
|
|
116954
|
-
),
|
|
116955
|
-
/***/
|
|
116956
|
-
879: (
|
|
116957
|
-
/***/
|
|
116958
|
-
function(__unused_webpack_module, exports3) {
|
|
116959
|
-
exports3.node = function(value) {
|
|
116960
|
-
return value !== void 0 && value instanceof HTMLElement && value.nodeType === 1;
|
|
116961
|
-
};
|
|
116962
|
-
exports3.nodeList = function(value) {
|
|
116963
|
-
var type2 = Object.prototype.toString.call(value);
|
|
116964
|
-
return value !== void 0 && (type2 === "[object NodeList]" || type2 === "[object HTMLCollection]") && "length" in value && (value.length === 0 || exports3.node(value[0]));
|
|
116965
|
-
};
|
|
116966
|
-
exports3.string = function(value) {
|
|
116967
|
-
return typeof value === "string" || value instanceof String;
|
|
116968
|
-
};
|
|
116969
|
-
exports3.fn = function(value) {
|
|
116970
|
-
var type2 = Object.prototype.toString.call(value);
|
|
116971
|
-
return type2 === "[object Function]";
|
|
116972
|
-
};
|
|
116973
|
-
}
|
|
116974
|
-
),
|
|
116975
|
-
/***/
|
|
116976
|
-
370: (
|
|
116977
|
-
/***/
|
|
116978
|
-
function(module3, __unused_webpack_exports, __webpack_require__2) {
|
|
116979
|
-
var is3 = __webpack_require__2(879);
|
|
116980
|
-
var delegate = __webpack_require__2(438);
|
|
116981
|
-
function listen(target, type2, callback2) {
|
|
116982
|
-
if (!target && !type2 && !callback2) {
|
|
116983
|
-
throw new Error("Missing required arguments");
|
|
116984
|
-
}
|
|
116985
|
-
if (!is3.string(type2)) {
|
|
116986
|
-
throw new TypeError("Second argument must be a String");
|
|
116987
|
-
}
|
|
116988
|
-
if (!is3.fn(callback2)) {
|
|
116989
|
-
throw new TypeError("Third argument must be a Function");
|
|
116990
|
-
}
|
|
116991
|
-
if (is3.node(target)) {
|
|
116992
|
-
return listenNode(target, type2, callback2);
|
|
116993
|
-
} else if (is3.nodeList(target)) {
|
|
116994
|
-
return listenNodeList(target, type2, callback2);
|
|
116995
|
-
} else if (is3.string(target)) {
|
|
116996
|
-
return listenSelector(target, type2, callback2);
|
|
116997
|
-
} else {
|
|
116998
|
-
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
116999
|
-
}
|
|
117000
|
-
}
|
|
117001
|
-
__name(listen, "listen");
|
|
117002
|
-
function listenNode(node2, type2, callback2) {
|
|
117003
|
-
node2.addEventListener(type2, callback2);
|
|
117004
|
-
return {
|
|
117005
|
-
destroy: function() {
|
|
117006
|
-
node2.removeEventListener(type2, callback2);
|
|
117007
|
-
}
|
|
117008
|
-
};
|
|
117009
|
-
}
|
|
117010
|
-
__name(listenNode, "listenNode");
|
|
117011
|
-
function listenNodeList(nodeList, type2, callback2) {
|
|
117012
|
-
Array.prototype.forEach.call(nodeList, function(node2) {
|
|
117013
|
-
node2.addEventListener(type2, callback2);
|
|
117014
|
-
});
|
|
117015
|
-
return {
|
|
117016
|
-
destroy: function() {
|
|
117017
|
-
Array.prototype.forEach.call(nodeList, function(node2) {
|
|
117018
|
-
node2.removeEventListener(type2, callback2);
|
|
117019
|
-
});
|
|
117020
|
-
}
|
|
117021
|
-
};
|
|
117022
|
-
}
|
|
117023
|
-
__name(listenNodeList, "listenNodeList");
|
|
117024
|
-
function listenSelector(selector, type2, callback2) {
|
|
117025
|
-
return delegate(document.body, selector, type2, callback2);
|
|
117026
|
-
}
|
|
117027
|
-
__name(listenSelector, "listenSelector");
|
|
117028
|
-
module3.exports = listen;
|
|
117029
|
-
}
|
|
117030
|
-
),
|
|
117031
|
-
/***/
|
|
117032
|
-
817: (
|
|
117033
|
-
/***/
|
|
117034
|
-
function(module3) {
|
|
117035
|
-
function select(element2) {
|
|
117036
|
-
var selectedText;
|
|
117037
|
-
if (element2.nodeName === "SELECT") {
|
|
117038
|
-
element2.focus();
|
|
117039
|
-
selectedText = element2.value;
|
|
117040
|
-
} else if (element2.nodeName === "INPUT" || element2.nodeName === "TEXTAREA") {
|
|
117041
|
-
var isReadOnly = element2.hasAttribute("readonly");
|
|
117042
|
-
if (!isReadOnly) {
|
|
117043
|
-
element2.setAttribute("readonly", "");
|
|
117044
|
-
}
|
|
117045
|
-
element2.select();
|
|
117046
|
-
element2.setSelectionRange(0, element2.value.length);
|
|
117047
|
-
if (!isReadOnly) {
|
|
117048
|
-
element2.removeAttribute("readonly");
|
|
117049
|
-
}
|
|
117050
|
-
selectedText = element2.value;
|
|
117051
|
-
} else {
|
|
117052
|
-
if (element2.hasAttribute("contenteditable")) {
|
|
117053
|
-
element2.focus();
|
|
117054
|
-
}
|
|
117055
|
-
var selection = window.getSelection();
|
|
117056
|
-
var range2 = document.createRange();
|
|
117057
|
-
range2.selectNodeContents(element2);
|
|
117058
|
-
selection.removeAllRanges();
|
|
117059
|
-
selection.addRange(range2);
|
|
117060
|
-
selectedText = selection.toString();
|
|
117061
|
-
}
|
|
117062
|
-
return selectedText;
|
|
117063
|
-
}
|
|
117064
|
-
__name(select, "select");
|
|
117065
|
-
module3.exports = select;
|
|
117066
|
-
}
|
|
117067
|
-
),
|
|
117068
|
-
/***/
|
|
117069
|
-
279: (
|
|
117070
|
-
/***/
|
|
117071
|
-
function(module3) {
|
|
117072
|
-
function E2() {
|
|
117073
|
-
}
|
|
117074
|
-
__name(E2, "E");
|
|
117075
|
-
E2.prototype = {
|
|
117076
|
-
on: function(name2, callback2, ctx) {
|
|
117077
|
-
var e = this.e || (this.e = {});
|
|
117078
|
-
(e[name2] || (e[name2] = [])).push({
|
|
117079
|
-
fn: callback2,
|
|
117080
|
-
ctx
|
|
117081
|
-
});
|
|
117082
|
-
return this;
|
|
117083
|
-
},
|
|
117084
|
-
once: function(name2, callback2, ctx) {
|
|
117085
|
-
var self2 = this;
|
|
117086
|
-
function listener() {
|
|
117087
|
-
self2.off(name2, listener);
|
|
117088
|
-
callback2.apply(ctx, arguments);
|
|
117089
|
-
}
|
|
117090
|
-
__name(listener, "listener");
|
|
117091
|
-
listener._ = callback2;
|
|
117092
|
-
return this.on(name2, listener, ctx);
|
|
117093
|
-
},
|
|
117094
|
-
emit: function(name2) {
|
|
117095
|
-
var data = [].slice.call(arguments, 1);
|
|
117096
|
-
var evtArr = ((this.e || (this.e = {}))[name2] || []).slice();
|
|
117097
|
-
var i = 0;
|
|
117098
|
-
var len = evtArr.length;
|
|
117099
|
-
for (i; i < len; i++) {
|
|
117100
|
-
evtArr[i].fn.apply(evtArr[i].ctx, data);
|
|
117101
|
-
}
|
|
117102
|
-
return this;
|
|
117103
|
-
},
|
|
117104
|
-
off: function(name2, callback2) {
|
|
117105
|
-
var e = this.e || (this.e = {});
|
|
117106
|
-
var evts = e[name2];
|
|
117107
|
-
var liveEvents = [];
|
|
117108
|
-
if (evts && callback2) {
|
|
117109
|
-
for (var i = 0, len = evts.length; i < len; i++) {
|
|
117110
|
-
if (evts[i].fn !== callback2 && evts[i].fn._ !== callback2)
|
|
117111
|
-
liveEvents.push(evts[i]);
|
|
117112
|
-
}
|
|
117113
|
-
}
|
|
117114
|
-
liveEvents.length ? e[name2] = liveEvents : delete e[name2];
|
|
117115
|
-
return this;
|
|
117116
|
-
}
|
|
117117
|
-
};
|
|
117118
|
-
module3.exports = E2;
|
|
117119
|
-
module3.exports.TinyEmitter = E2;
|
|
117120
|
-
}
|
|
117121
|
-
)
|
|
117122
|
-
/******/
|
|
117123
|
-
};
|
|
117124
|
-
var __webpack_module_cache__ = {};
|
|
117125
|
-
function __webpack_require__(moduleId) {
|
|
117126
|
-
if (__webpack_module_cache__[moduleId]) {
|
|
117127
|
-
return __webpack_module_cache__[moduleId].exports;
|
|
117128
|
-
}
|
|
117129
|
-
var module3 = __webpack_module_cache__[moduleId] = {
|
|
117130
|
-
/******/
|
|
117131
|
-
// no module.id needed
|
|
117132
|
-
/******/
|
|
117133
|
-
// no module.loaded needed
|
|
117134
|
-
/******/
|
|
117135
|
-
exports: {}
|
|
117136
|
-
/******/
|
|
117137
|
-
};
|
|
117138
|
-
__webpack_modules__[moduleId](module3, module3.exports, __webpack_require__);
|
|
117139
|
-
return module3.exports;
|
|
117140
|
-
}
|
|
117141
|
-
__name(__webpack_require__, "__webpack_require__");
|
|
117142
|
-
!function() {
|
|
117143
|
-
__webpack_require__.n = function(module3) {
|
|
117144
|
-
var getter = module3 && module3.__esModule ? (
|
|
117145
|
-
/******/
|
|
117146
|
-
function() {
|
|
117147
|
-
return module3["default"];
|
|
117148
|
-
}
|
|
117149
|
-
) : (
|
|
117150
|
-
/******/
|
|
117151
|
-
function() {
|
|
117152
|
-
return module3;
|
|
117153
|
-
}
|
|
117154
|
-
);
|
|
117155
|
-
__webpack_require__.d(getter, { a: getter });
|
|
117156
|
-
return getter;
|
|
117157
|
-
};
|
|
117158
|
-
}();
|
|
117159
|
-
!function() {
|
|
117160
|
-
__webpack_require__.d = function(exports3, definition2) {
|
|
117161
|
-
for (var key in definition2) {
|
|
117162
|
-
if (__webpack_require__.o(definition2, key) && !__webpack_require__.o(exports3, key)) {
|
|
117163
|
-
Object.defineProperty(exports3, key, { enumerable: true, get: definition2[key] });
|
|
117164
|
-
}
|
|
117165
|
-
}
|
|
117166
|
-
};
|
|
117167
|
-
}();
|
|
117168
|
-
!function() {
|
|
117169
|
-
__webpack_require__.o = function(obj, prop2) {
|
|
117170
|
-
return Object.prototype.hasOwnProperty.call(obj, prop2);
|
|
117171
|
-
};
|
|
117172
|
-
}();
|
|
117173
|
-
return __webpack_require__(134);
|
|
117174
|
-
}().default
|
|
117175
|
-
);
|
|
117176
|
-
});
|
|
117177
|
-
})(clipboard$1);
|
|
117178
|
-
var clipboardExports = clipboard$1.exports;
|
|
117179
|
-
const clipboard = /* @__PURE__ */ getDefaultExportFromCjs(clipboardExports);
|
|
117180
|
-
const ClipboardJS = /* @__PURE__ */ _mergeNamespaces({
|
|
117181
|
-
__proto__: null,
|
|
117182
|
-
default: clipboard
|
|
117183
|
-
}, [clipboardExports]);
|
|
117184
116390
|
var connectionStore = /* @__PURE__ */ new WeakMap();
|
|
117185
116391
|
var ITERATION_KEY = Symbol("iteration key");
|
|
117186
116392
|
function storeObservable(obj) {
|
|
@@ -123155,7 +122361,7 @@ function showFileDialog({ multiple = false, onSelect }) {
|
|
|
123155
122361
|
}
|
|
123156
122362
|
__name(showFileDialog, "showFileDialog");
|
|
123157
122363
|
const name = "@teselagen/ove";
|
|
123158
|
-
const version = "0.7.3-beta.
|
|
122364
|
+
const version = "0.7.3-beta.6";
|
|
123159
122365
|
const main = "./src/index.js";
|
|
123160
122366
|
const type = "module";
|
|
123161
122367
|
const exports$1 = {
|
|
@@ -127063,7 +126269,7 @@ function isElementInViewport(el) {
|
|
|
127063
126269
|
return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
127064
126270
|
}
|
|
127065
126271
|
__name(isElementInViewport, "isElementInViewport");
|
|
127066
|
-
const
|
|
126272
|
+
const _Keyboard = class _Keyboard extends React__default$1.Component {
|
|
127067
126273
|
constructor() {
|
|
127068
126274
|
super(...arguments);
|
|
127069
126275
|
__publicField(this, "handleKeyDown", /* @__PURE__ */ __name((e) => {
|
|
@@ -127132,14 +126338,14 @@ const _Clipboard = class _Clipboard extends React__default$1.Component {
|
|
|
127132
126338
|
);
|
|
127133
126339
|
}
|
|
127134
126340
|
};
|
|
127135
|
-
__name(
|
|
126341
|
+
__name(_Keyboard, "Keyboard");
|
|
127136
126342
|
// static propTypes = {
|
|
127137
126343
|
// value: PropTypes.string.isRequired
|
|
127138
126344
|
// };
|
|
127139
|
-
__publicField(
|
|
126345
|
+
__publicField(_Keyboard, "defaultProps", {
|
|
127140
126346
|
className: "clipboard"
|
|
127141
126347
|
});
|
|
127142
|
-
let
|
|
126348
|
+
let Keyboard = _Keyboard;
|
|
127143
126349
|
let dragInProgress = false;
|
|
127144
126350
|
let selectionStartOrEndGrabbed;
|
|
127145
126351
|
let caretPositionOnDragStart;
|
|
@@ -128155,9 +127361,8 @@ function VectorInteractionHOC(Component2) {
|
|
|
128155
127361
|
const { sequenceData: sequenceData2, readOnly: readOnly2, disableBpEditing, selectionLayer: selectionLayer2 } = this.props;
|
|
128156
127362
|
const { isProtein: isProtein2 } = sequenceData2;
|
|
128157
127363
|
const makeTextCopyable = /* @__PURE__ */ __name((transformFunc, className, action2 = "copy") => {
|
|
128158
|
-
|
|
128159
|
-
|
|
128160
|
-
text: () => {
|
|
127364
|
+
document.querySelectorAll(`.${className}`).forEach((element2) => {
|
|
127365
|
+
element2.addEventListener("click", () => __async(this, null, function* () {
|
|
128161
127366
|
const { selectionLayer: selectionLayer22, editorName, store: store2 } = this.props;
|
|
128162
127367
|
const { sequenceData: sequenceData22, copyOptions: copyOptions2 } = store2.getState().VectorEditor[editorName];
|
|
128163
127368
|
const selectedSeqData = getSequenceDataBetweenRange(
|
|
@@ -128182,17 +127387,19 @@ function VectorInteractionHOC(Component2) {
|
|
|
128182
127387
|
sequenceData22
|
|
128183
127388
|
);
|
|
128184
127389
|
this.sequenceDataToCopy = sequenceDataToCopy;
|
|
128185
|
-
|
|
128186
|
-
|
|
128187
|
-
|
|
128188
|
-
|
|
128189
|
-
|
|
128190
|
-
|
|
128191
|
-
|
|
128192
|
-
|
|
127390
|
+
const textToCopy = sequenceDataToCopy.textToCopy || sequenceDataToCopy.sequence;
|
|
127391
|
+
try {
|
|
127392
|
+
yield navigator.clipboard.writeText(textToCopy);
|
|
127393
|
+
if (action2 === "cut") {
|
|
127394
|
+
}
|
|
127395
|
+
if (window.Cypress) {
|
|
127396
|
+
window.Cypress.textToCopy = sequenceDataToCopy.textToCopy;
|
|
127397
|
+
window.Cypress.seqDataToCopy = sequenceDataToCopy;
|
|
127398
|
+
}
|
|
127399
|
+
} catch (err2) {
|
|
127400
|
+
console.error(`${action2} failed:`, err2);
|
|
128193
127401
|
}
|
|
128194
|
-
|
|
128195
|
-
}
|
|
127402
|
+
}));
|
|
128196
127403
|
});
|
|
128197
127404
|
}, "makeTextCopyable");
|
|
128198
127405
|
const aaCopy = {
|
|
@@ -128830,7 +128037,7 @@ function VectorInteractionHOC(Component2) {
|
|
|
128830
128037
|
},
|
|
128831
128038
|
closePanelButton,
|
|
128832
128039
|
/* @__PURE__ */ React__default$1.createElement(
|
|
128833
|
-
|
|
128040
|
+
Keyboard,
|
|
128834
128041
|
{
|
|
128835
128042
|
value: selectedBps,
|
|
128836
128043
|
onCopy: this.handleCopy,
|
|
@@ -141033,15 +140240,27 @@ ${seqDataToCopy}\r
|
|
|
141033
140240
|
this.copyAllAlignmentsFastaClipboardHelper && this.copyAllAlignmentsFastaClipboardHelper.destroy();
|
|
141034
140241
|
},
|
|
141035
140242
|
didMount: () => {
|
|
141036
|
-
|
|
141037
|
-
`.copyAllAlignmentsFastaClipboardHelper
|
|
141038
|
-
{
|
|
141039
|
-
action: "copyAllAlignmentsFasta",
|
|
141040
|
-
text: () => {
|
|
141041
|
-
return this.getAllAlignmentsFastaText();
|
|
141042
|
-
}
|
|
141043
|
-
}
|
|
140243
|
+
const elements = document.querySelectorAll(
|
|
140244
|
+
`.copyAllAlignmentsFastaClipboardHelper`
|
|
141044
140245
|
);
|
|
140246
|
+
elements.forEach((element2) => {
|
|
140247
|
+
element2.addEventListener(
|
|
140248
|
+
"click",
|
|
140249
|
+
() => __async(this, null, function* () {
|
|
140250
|
+
const textToCopy = this.getAllAlignmentsFastaText();
|
|
140251
|
+
try {
|
|
140252
|
+
yield navigator.clipboard.writeText(
|
|
140253
|
+
textToCopy
|
|
140254
|
+
);
|
|
140255
|
+
} catch (err2) {
|
|
140256
|
+
console.error(
|
|
140257
|
+
"Failed to copy text:",
|
|
140258
|
+
err2
|
|
140259
|
+
);
|
|
140260
|
+
}
|
|
140261
|
+
})
|
|
140262
|
+
);
|
|
140263
|
+
});
|
|
141045
140264
|
},
|
|
141046
140265
|
onClick: () => {
|
|
141047
140266
|
window.toastr.success("Selection Copied");
|
|
@@ -141054,11 +140273,13 @@ ${seqDataToCopy}\r
|
|
|
141054
140273
|
this.copySpecificAlignmentFastaClipboardHelper && this.copySpecificAlignmentFastaClipboardHelper.destroy();
|
|
141055
140274
|
},
|
|
141056
140275
|
didMount: () => {
|
|
141057
|
-
|
|
141058
|
-
`.copySpecificAlignmentFastaClipboardHelper
|
|
141059
|
-
|
|
141060
|
-
|
|
141061
|
-
|
|
140276
|
+
const elements = document.querySelectorAll(
|
|
140277
|
+
`.copySpecificAlignmentFastaClipboardHelper`
|
|
140278
|
+
);
|
|
140279
|
+
elements.forEach((element2) => {
|
|
140280
|
+
element2.addEventListener(
|
|
140281
|
+
"click",
|
|
140282
|
+
() => __async(this, null, function* () {
|
|
141062
140283
|
const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
|
|
141063
140284
|
const seqDataToCopy = getSequenceDataBetweenRange(
|
|
141064
140285
|
alignmentData,
|
|
@@ -141067,10 +140288,19 @@ ${seqDataToCopy}\r
|
|
|
141067
140288
|
const seqDataToCopyAsFasta = `>${name2}\r
|
|
141068
140289
|
${seqDataToCopy}\r
|
|
141069
140290
|
`;
|
|
141070
|
-
|
|
141071
|
-
|
|
141072
|
-
|
|
141073
|
-
|
|
140291
|
+
try {
|
|
140292
|
+
yield navigator.clipboard.writeText(
|
|
140293
|
+
seqDataToCopyAsFasta
|
|
140294
|
+
);
|
|
140295
|
+
} catch (err2) {
|
|
140296
|
+
console.error(
|
|
140297
|
+
"Failed to copy text:",
|
|
140298
|
+
err2
|
|
140299
|
+
);
|
|
140300
|
+
}
|
|
140301
|
+
})
|
|
140302
|
+
);
|
|
140303
|
+
});
|
|
141074
140304
|
},
|
|
141075
140305
|
onClick: () => {
|
|
141076
140306
|
window.toastr.success(
|
|
@@ -141085,20 +140315,31 @@ ${seqDataToCopy}\r
|
|
|
141085
140315
|
this.copySpecificAlignmentAsPlainClipboardHelper && this.copySpecificAlignmentAsPlainClipboardHelper.destroy();
|
|
141086
140316
|
},
|
|
141087
140317
|
didMount: () => {
|
|
141088
|
-
|
|
141089
|
-
`.copySpecificAlignmentAsPlainClipboardHelper
|
|
141090
|
-
|
|
141091
|
-
|
|
141092
|
-
|
|
140318
|
+
const elements = document.querySelectorAll(
|
|
140319
|
+
`.copySpecificAlignmentAsPlainClipboardHelper`
|
|
140320
|
+
);
|
|
140321
|
+
elements.forEach((element2) => {
|
|
140322
|
+
element2.addEventListener(
|
|
140323
|
+
"click",
|
|
140324
|
+
() => __async(this, null, function* () {
|
|
141093
140325
|
const { selectionLayer: selectionLayer2 } = this.props.store.getState().VectorEditor.__allEditorsOptions.alignments[this.props.id] || {};
|
|
141094
140326
|
const seqDataToCopy = getSequenceDataBetweenRange(
|
|
141095
140327
|
alignmentData,
|
|
141096
140328
|
selectionLayer2
|
|
141097
140329
|
).sequence;
|
|
141098
|
-
|
|
141099
|
-
|
|
141100
|
-
|
|
141101
|
-
|
|
140330
|
+
try {
|
|
140331
|
+
yield navigator.clipboard.writeText(
|
|
140332
|
+
seqDataToCopy
|
|
140333
|
+
);
|
|
140334
|
+
} catch (err2) {
|
|
140335
|
+
console.error(
|
|
140336
|
+
"Failed to copy text:",
|
|
140337
|
+
err2
|
|
140338
|
+
);
|
|
140339
|
+
}
|
|
140340
|
+
})
|
|
140341
|
+
);
|
|
140342
|
+
});
|
|
141102
140343
|
},
|
|
141103
140344
|
onClick: () => {
|
|
141104
140345
|
window.toastr.success("Selection Copied");
|