@dovetail-v2/refine 0.4.1 → 0.4.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PodShell-1ab70e6b.js +2084 -0
- package/dist/PodShell-fdd7ac78.cjs +2084 -0
- package/dist/{common-1eb43414.cjs → common-84e75a63.cjs} +42 -9
- package/dist/{common-241b21f8.js → common-b35e289c.js} +50 -17
- package/dist/hooks/useEagleTable/useEagleTable.d.ts +1 -1
- package/dist/{index-ab97826a.js → index-33963e6a.js} +126 -5
- package/dist/{index-31874f77.cjs → index-9c194830.cjs} +124 -3
- package/dist/refine.cjs +15869 -5832
- package/dist/refine.js +15816 -5779
- package/dist/shell.cjs +2 -3
- package/dist/shell.js +2 -3
- package/package.json +65 -33
- package/dist/PodShell-43c7028e.cjs +0 -216
- package/dist/PodShell-76331418.js +0 -216
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const React = require("react");
|
|
3
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
4
|
+
function getDefaultExportFromCjs(x) {
|
|
5
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
6
|
+
}
|
|
7
|
+
function getAugmentedNamespace(n) {
|
|
8
|
+
if (n.__esModule)
|
|
9
|
+
return n;
|
|
10
|
+
var f = n.default;
|
|
11
|
+
if (typeof f == "function") {
|
|
12
|
+
var a = function a2() {
|
|
13
|
+
if (this instanceof a2) {
|
|
14
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
15
|
+
}
|
|
16
|
+
return f.apply(this, arguments);
|
|
17
|
+
};
|
|
18
|
+
a.prototype = f.prototype;
|
|
19
|
+
} else
|
|
20
|
+
a = {};
|
|
21
|
+
Object.defineProperty(a, "__esModule", { value: true });
|
|
22
|
+
Object.keys(n).forEach(function(k) {
|
|
23
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
24
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return n[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return a;
|
|
32
|
+
}
|
|
3
33
|
function warn() {
|
|
4
34
|
if (console && console.warn) {
|
|
5
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -586,9 +616,9 @@ function requireReactJsxRuntime_development() {
|
|
|
586
616
|
}
|
|
587
617
|
return config.key !== void 0;
|
|
588
618
|
}
|
|
589
|
-
function warnIfStringRefCannotBeAutoConverted(config,
|
|
619
|
+
function warnIfStringRefCannotBeAutoConverted(config, self2) {
|
|
590
620
|
{
|
|
591
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current &&
|
|
621
|
+
if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
|
|
592
622
|
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
|
593
623
|
if (!didWarnAboutStringRefs[componentName]) {
|
|
594
624
|
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
|
|
@@ -627,7 +657,7 @@ function requireReactJsxRuntime_development() {
|
|
|
627
657
|
});
|
|
628
658
|
}
|
|
629
659
|
}
|
|
630
|
-
var ReactElement = function(type, key, ref,
|
|
660
|
+
var ReactElement = function(type, key, ref, self2, source, owner, props) {
|
|
631
661
|
var element = {
|
|
632
662
|
// This tag allows us to uniquely identify this as a React Element
|
|
633
663
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
@@ -651,7 +681,7 @@ function requireReactJsxRuntime_development() {
|
|
|
651
681
|
configurable: false,
|
|
652
682
|
enumerable: false,
|
|
653
683
|
writable: false,
|
|
654
|
-
value:
|
|
684
|
+
value: self2
|
|
655
685
|
});
|
|
656
686
|
Object.defineProperty(element, "_source", {
|
|
657
687
|
configurable: false,
|
|
@@ -666,7 +696,7 @@ function requireReactJsxRuntime_development() {
|
|
|
666
696
|
}
|
|
667
697
|
return element;
|
|
668
698
|
};
|
|
669
|
-
function jsxDEV(type, config, maybeKey, source,
|
|
699
|
+
function jsxDEV(type, config, maybeKey, source, self2) {
|
|
670
700
|
{
|
|
671
701
|
var propName;
|
|
672
702
|
var props = {};
|
|
@@ -680,7 +710,7 @@ function requireReactJsxRuntime_development() {
|
|
|
680
710
|
}
|
|
681
711
|
if (hasValidRef(config)) {
|
|
682
712
|
ref = config.ref;
|
|
683
|
-
warnIfStringRefCannotBeAutoConverted(config,
|
|
713
|
+
warnIfStringRefCannotBeAutoConverted(config, self2);
|
|
684
714
|
}
|
|
685
715
|
for (propName in config) {
|
|
686
716
|
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
@@ -704,7 +734,7 @@ function requireReactJsxRuntime_development() {
|
|
|
704
734
|
defineRefPropWarningGetter(props, displayName);
|
|
705
735
|
}
|
|
706
736
|
}
|
|
707
|
-
return ReactElement(type, key, ref,
|
|
737
|
+
return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
|
|
708
738
|
}
|
|
709
739
|
}
|
|
710
740
|
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
@@ -855,7 +885,7 @@ function requireReactJsxRuntime_development() {
|
|
|
855
885
|
}
|
|
856
886
|
}
|
|
857
887
|
}
|
|
858
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source,
|
|
888
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
|
|
859
889
|
{
|
|
860
890
|
var validType = isValidElementType(type);
|
|
861
891
|
if (!validType) {
|
|
@@ -882,7 +912,7 @@ function requireReactJsxRuntime_development() {
|
|
|
882
912
|
}
|
|
883
913
|
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
884
914
|
}
|
|
885
|
-
var element = jsxDEV(type, props, key, source,
|
|
915
|
+
var element = jsxDEV(type, props, key, source, self2);
|
|
886
916
|
if (element == null) {
|
|
887
917
|
return element;
|
|
888
918
|
}
|
|
@@ -971,7 +1001,10 @@ var SocketStatus = /* @__PURE__ */ ((SocketStatus2) => {
|
|
|
971
1001
|
})(SocketStatus || {});
|
|
972
1002
|
exports.I18nContext = I18nContext;
|
|
973
1003
|
exports.SocketStatus = SocketStatus;
|
|
1004
|
+
exports.commonjsGlobal = commonjsGlobal;
|
|
974
1005
|
exports.cx_default = cx_default;
|
|
1006
|
+
exports.getAugmentedNamespace = getAugmentedNamespace;
|
|
1007
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
975
1008
|
exports.getDefaults = getDefaults;
|
|
976
1009
|
exports.getI18n = getI18n;
|
|
977
1010
|
exports.jsxRuntimeExports = jsxRuntimeExports;
|
|
@@ -1,4 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { createContext, useContext, useState, useRef, useEffect } from "react";
|
|
2
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
3
|
+
function getDefaultExportFromCjs(x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
+
}
|
|
6
|
+
function getAugmentedNamespace(n) {
|
|
7
|
+
if (n.__esModule)
|
|
8
|
+
return n;
|
|
9
|
+
var f = n.default;
|
|
10
|
+
if (typeof f == "function") {
|
|
11
|
+
var a = function a2() {
|
|
12
|
+
if (this instanceof a2) {
|
|
13
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
return f.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
a.prototype = f.prototype;
|
|
18
|
+
} else
|
|
19
|
+
a = {};
|
|
20
|
+
Object.defineProperty(a, "__esModule", { value: true });
|
|
21
|
+
Object.keys(n).forEach(function(k) {
|
|
22
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
23
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return n[k];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
return a;
|
|
31
|
+
}
|
|
2
32
|
function warn() {
|
|
3
33
|
if (console && console.warn) {
|
|
4
34
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -286,7 +316,7 @@ function requireReactJsxRuntime_production_min() {
|
|
|
286
316
|
if (hasRequiredReactJsxRuntime_production_min)
|
|
287
317
|
return reactJsxRuntime_production_min;
|
|
288
318
|
hasRequiredReactJsxRuntime_production_min = 1;
|
|
289
|
-
var f =
|
|
319
|
+
var f = React__default, g = 60103;
|
|
290
320
|
reactJsxRuntime_production_min.Fragment = 60107;
|
|
291
321
|
if ("function" === typeof Symbol && Symbol.for) {
|
|
292
322
|
var h = Symbol.for;
|
|
@@ -327,7 +357,7 @@ function requireReactJsxRuntime_development() {
|
|
|
327
357
|
(function(exports) {
|
|
328
358
|
if (process.env.NODE_ENV !== "production") {
|
|
329
359
|
(function() {
|
|
330
|
-
var React
|
|
360
|
+
var React = React__default;
|
|
331
361
|
var REACT_ELEMENT_TYPE = 60103;
|
|
332
362
|
var REACT_PORTAL_TYPE = 60106;
|
|
333
363
|
exports.Fragment = 60107;
|
|
@@ -380,7 +410,7 @@ function requireReactJsxRuntime_development() {
|
|
|
380
410
|
}
|
|
381
411
|
return null;
|
|
382
412
|
}
|
|
383
|
-
var ReactSharedInternals = React
|
|
413
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
384
414
|
function error(format) {
|
|
385
415
|
{
|
|
386
416
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -585,9 +615,9 @@ function requireReactJsxRuntime_development() {
|
|
|
585
615
|
}
|
|
586
616
|
return config.key !== void 0;
|
|
587
617
|
}
|
|
588
|
-
function warnIfStringRefCannotBeAutoConverted(config,
|
|
618
|
+
function warnIfStringRefCannotBeAutoConverted(config, self2) {
|
|
589
619
|
{
|
|
590
|
-
if (typeof config.ref === "string" && ReactCurrentOwner.current &&
|
|
620
|
+
if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
|
|
591
621
|
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
|
592
622
|
if (!didWarnAboutStringRefs[componentName]) {
|
|
593
623
|
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
|
|
@@ -626,7 +656,7 @@ function requireReactJsxRuntime_development() {
|
|
|
626
656
|
});
|
|
627
657
|
}
|
|
628
658
|
}
|
|
629
|
-
var ReactElement = function(type, key, ref,
|
|
659
|
+
var ReactElement = function(type, key, ref, self2, source, owner, props) {
|
|
630
660
|
var element = {
|
|
631
661
|
// This tag allows us to uniquely identify this as a React Element
|
|
632
662
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
@@ -650,7 +680,7 @@ function requireReactJsxRuntime_development() {
|
|
|
650
680
|
configurable: false,
|
|
651
681
|
enumerable: false,
|
|
652
682
|
writable: false,
|
|
653
|
-
value:
|
|
683
|
+
value: self2
|
|
654
684
|
});
|
|
655
685
|
Object.defineProperty(element, "_source", {
|
|
656
686
|
configurable: false,
|
|
@@ -665,7 +695,7 @@ function requireReactJsxRuntime_development() {
|
|
|
665
695
|
}
|
|
666
696
|
return element;
|
|
667
697
|
};
|
|
668
|
-
function jsxDEV(type, config, maybeKey, source,
|
|
698
|
+
function jsxDEV(type, config, maybeKey, source, self2) {
|
|
669
699
|
{
|
|
670
700
|
var propName;
|
|
671
701
|
var props = {};
|
|
@@ -679,7 +709,7 @@ function requireReactJsxRuntime_development() {
|
|
|
679
709
|
}
|
|
680
710
|
if (hasValidRef(config)) {
|
|
681
711
|
ref = config.ref;
|
|
682
|
-
warnIfStringRefCannotBeAutoConverted(config,
|
|
712
|
+
warnIfStringRefCannotBeAutoConverted(config, self2);
|
|
683
713
|
}
|
|
684
714
|
for (propName in config) {
|
|
685
715
|
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
@@ -703,7 +733,7 @@ function requireReactJsxRuntime_development() {
|
|
|
703
733
|
defineRefPropWarningGetter(props, displayName);
|
|
704
734
|
}
|
|
705
735
|
}
|
|
706
|
-
return ReactElement(type, key, ref,
|
|
736
|
+
return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
|
|
707
737
|
}
|
|
708
738
|
}
|
|
709
739
|
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
@@ -854,7 +884,7 @@ function requireReactJsxRuntime_development() {
|
|
|
854
884
|
}
|
|
855
885
|
}
|
|
856
886
|
}
|
|
857
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source,
|
|
887
|
+
function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
|
|
858
888
|
{
|
|
859
889
|
var validType = isValidElementType(type);
|
|
860
890
|
if (!validType) {
|
|
@@ -881,7 +911,7 @@ function requireReactJsxRuntime_development() {
|
|
|
881
911
|
}
|
|
882
912
|
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
|
883
913
|
}
|
|
884
|
-
var element = jsxDEV(type, props, key, source,
|
|
914
|
+
var element = jsxDEV(type, props, key, source, self2);
|
|
885
915
|
if (element == null) {
|
|
886
916
|
return element;
|
|
887
917
|
}
|
|
@@ -971,11 +1001,14 @@ var SocketStatus = /* @__PURE__ */ ((SocketStatus2) => {
|
|
|
971
1001
|
export {
|
|
972
1002
|
I18nContext as I,
|
|
973
1003
|
SocketStatus as S,
|
|
974
|
-
|
|
975
|
-
|
|
1004
|
+
commonjsGlobal as a,
|
|
1005
|
+
getDefaults as b,
|
|
976
1006
|
cx_default as c,
|
|
977
|
-
|
|
978
|
-
|
|
1007
|
+
warn as d,
|
|
1008
|
+
getI18n as e,
|
|
1009
|
+
setI18n as f,
|
|
1010
|
+
getDefaultExportFromCjs as g,
|
|
1011
|
+
getAugmentedNamespace as h,
|
|
979
1012
|
jsxRuntimeExports as j,
|
|
980
1013
|
setDefaults as s,
|
|
981
1014
|
useTranslation as u,
|
|
@@ -27,7 +27,7 @@ export declare function addDefaultRenderToColumns<Data, Col extends RequiredColu
|
|
|
27
27
|
} & Col)[];
|
|
28
28
|
export declare const useEagleTable: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(params: Params<Model>) => {
|
|
29
29
|
setCurrent: (current: number) => void;
|
|
30
|
-
tableQueryResult: import("@tanstack/query
|
|
30
|
+
tableQueryResult: import("@tanstack/react-query").QueryObserverResult<import("@refinedev/core").GetListResponse<Model>, import("@refinedev/core").HttpError>;
|
|
31
31
|
sorter: CrudSorting;
|
|
32
32
|
sorters: CrudSorting;
|
|
33
33
|
setSorter: (sorter: CrudSorting) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useTranslation, j as jsxRuntimeExports, c as cx_default, S as SocketStatus } from "./common-
|
|
1
|
+
import { g as getDefaultExportFromCjs, u as useTranslation, j as jsxRuntimeExports, c as cx_default, S as SocketStatus } from "./common-b35e289c.js";
|
|
2
2
|
import { Icon, Typo, DropdownMenu, Tooltip, SearchInput, Alert, Link } from "@cloudtower/eagle";
|
|
3
3
|
import { CanvasAddon } from "@xterm/addon-canvas";
|
|
4
4
|
import { FitAddon } from "@xterm/addon-fit";
|
|
@@ -6,10 +6,131 @@ import { SearchAddon } from "@xterm/addon-search";
|
|
|
6
6
|
import { WebLinksAddon } from "@xterm/addon-web-links";
|
|
7
7
|
import { WebglAddon } from "@xterm/addon-webgl";
|
|
8
8
|
import { Terminal } from "@xterm/xterm";
|
|
9
|
-
import copyToClipboard from "copy-to-clipboard";
|
|
10
9
|
import { debounce } from "lodash-es";
|
|
11
|
-
import
|
|
10
|
+
import React__default, { useRef, useState, useMemo, useCallback, useEffect, useImperativeHandle } from "react";
|
|
12
11
|
import { Loading24GradientBlueIcon, FontSize16GrayIcon, FontSize16BlueIcon, LogCollection16GrayIcon, LogCollection16GradientBlueIcon, TrashBinDeletePermanently16GrayIcon, TrashBinDeletePermanently16BlueIcon } from "@cloudtower/icons-react";
|
|
12
|
+
var toggleSelection = function() {
|
|
13
|
+
var selection = document.getSelection();
|
|
14
|
+
if (!selection.rangeCount) {
|
|
15
|
+
return function() {
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var active = document.activeElement;
|
|
19
|
+
var ranges = [];
|
|
20
|
+
for (var i = 0; i < selection.rangeCount; i++) {
|
|
21
|
+
ranges.push(selection.getRangeAt(i));
|
|
22
|
+
}
|
|
23
|
+
switch (active.tagName.toUpperCase()) {
|
|
24
|
+
case "INPUT":
|
|
25
|
+
case "TEXTAREA":
|
|
26
|
+
active.blur();
|
|
27
|
+
break;
|
|
28
|
+
default:
|
|
29
|
+
active = null;
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
selection.removeAllRanges();
|
|
33
|
+
return function() {
|
|
34
|
+
selection.type === "Caret" && selection.removeAllRanges();
|
|
35
|
+
if (!selection.rangeCount) {
|
|
36
|
+
ranges.forEach(function(range) {
|
|
37
|
+
selection.addRange(range);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
active && active.focus();
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
var deselectCurrent = toggleSelection;
|
|
44
|
+
var clipboardToIE11Formatting = {
|
|
45
|
+
"text/plain": "Text",
|
|
46
|
+
"text/html": "Url",
|
|
47
|
+
"default": "Text"
|
|
48
|
+
};
|
|
49
|
+
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
50
|
+
function format(message) {
|
|
51
|
+
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
52
|
+
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
53
|
+
}
|
|
54
|
+
function copy(text, options) {
|
|
55
|
+
var debug, message, reselectPrevious, range, selection, mark, success = false;
|
|
56
|
+
if (!options) {
|
|
57
|
+
options = {};
|
|
58
|
+
}
|
|
59
|
+
debug = options.debug || false;
|
|
60
|
+
try {
|
|
61
|
+
reselectPrevious = deselectCurrent();
|
|
62
|
+
range = document.createRange();
|
|
63
|
+
selection = document.getSelection();
|
|
64
|
+
mark = document.createElement("span");
|
|
65
|
+
mark.textContent = text;
|
|
66
|
+
mark.ariaHidden = "true";
|
|
67
|
+
mark.style.all = "unset";
|
|
68
|
+
mark.style.position = "fixed";
|
|
69
|
+
mark.style.top = 0;
|
|
70
|
+
mark.style.clip = "rect(0, 0, 0, 0)";
|
|
71
|
+
mark.style.whiteSpace = "pre";
|
|
72
|
+
mark.style.webkitUserSelect = "text";
|
|
73
|
+
mark.style.MozUserSelect = "text";
|
|
74
|
+
mark.style.msUserSelect = "text";
|
|
75
|
+
mark.style.userSelect = "text";
|
|
76
|
+
mark.addEventListener("copy", function(e) {
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
if (options.format) {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
if (typeof e.clipboardData === "undefined") {
|
|
81
|
+
debug && console.warn("unable to use e.clipboardData");
|
|
82
|
+
debug && console.warn("trying IE specific stuff");
|
|
83
|
+
window.clipboardData.clearData();
|
|
84
|
+
var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
|
|
85
|
+
window.clipboardData.setData(format2, text);
|
|
86
|
+
} else {
|
|
87
|
+
e.clipboardData.clearData();
|
|
88
|
+
e.clipboardData.setData(options.format, text);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (options.onCopy) {
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
options.onCopy(e.clipboardData);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
document.body.appendChild(mark);
|
|
97
|
+
range.selectNodeContents(mark);
|
|
98
|
+
selection.addRange(range);
|
|
99
|
+
var successful = document.execCommand("copy");
|
|
100
|
+
if (!successful) {
|
|
101
|
+
throw new Error("copy command was unsuccessful");
|
|
102
|
+
}
|
|
103
|
+
success = true;
|
|
104
|
+
} catch (err) {
|
|
105
|
+
debug && console.error("unable to copy using execCommand: ", err);
|
|
106
|
+
debug && console.warn("trying IE specific stuff");
|
|
107
|
+
try {
|
|
108
|
+
window.clipboardData.setData(options.format || "text", text);
|
|
109
|
+
options.onCopy && options.onCopy(window.clipboardData);
|
|
110
|
+
success = true;
|
|
111
|
+
} catch (err2) {
|
|
112
|
+
debug && console.error("unable to copy using clipboardData: ", err2);
|
|
113
|
+
debug && console.error("falling back to prompt");
|
|
114
|
+
message = format("message" in options ? options.message : defaultMessage);
|
|
115
|
+
window.prompt(message, text);
|
|
116
|
+
}
|
|
117
|
+
} finally {
|
|
118
|
+
if (selection) {
|
|
119
|
+
if (typeof selection.removeRange == "function") {
|
|
120
|
+
selection.removeRange(range);
|
|
121
|
+
} else {
|
|
122
|
+
selection.removeAllRanges();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (mark) {
|
|
126
|
+
document.body.removeChild(mark);
|
|
127
|
+
}
|
|
128
|
+
reselectPrevious();
|
|
129
|
+
}
|
|
130
|
+
return success;
|
|
131
|
+
}
|
|
132
|
+
var copyToClipboard = copy;
|
|
133
|
+
const copyToClipboard$1 = /* @__PURE__ */ getDefaultExportFromCjs(copyToClipboard);
|
|
13
134
|
const Connecting_r8rfff = "";
|
|
14
135
|
const LoadingStyle = "l1ur2ktd";
|
|
15
136
|
const Connecting = () => {
|
|
@@ -143,7 +264,7 @@ const ContainerStyle = "c1q5a2qi";
|
|
|
143
264
|
const ShellStyle = "sdz5fm1";
|
|
144
265
|
const ErrorAlertStyle = "ebp0h2e";
|
|
145
266
|
const ToolbarStyle = "tioilqy";
|
|
146
|
-
const Shell =
|
|
267
|
+
const Shell = React__default.forwardRef(function Shell2(props, ref) {
|
|
147
268
|
const {
|
|
148
269
|
className,
|
|
149
270
|
url,
|
|
@@ -290,7 +411,7 @@ const Shell = React.forwardRef(function Shell2(props, ref) {
|
|
|
290
411
|
let onKeyDown = function(event) {
|
|
291
412
|
if (event.ctrlKey && event.shiftKey && event.key === "C") {
|
|
292
413
|
event.preventDefault();
|
|
293
|
-
copyToClipboard(term.getSelection());
|
|
414
|
+
copyToClipboard$1(term.getSelection());
|
|
294
415
|
}
|
|
295
416
|
}, onResize = function() {
|
|
296
417
|
fit();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const common = require("./common-
|
|
2
|
+
const common = require("./common-84e75a63.cjs");
|
|
3
3
|
const eagle = require("@cloudtower/eagle");
|
|
4
4
|
const addonCanvas = require("@xterm/addon-canvas");
|
|
5
5
|
const addonFit = require("@xterm/addon-fit");
|
|
@@ -7,10 +7,131 @@ const addonSearch = require("@xterm/addon-search");
|
|
|
7
7
|
const addonWebLinks = require("@xterm/addon-web-links");
|
|
8
8
|
const addonWebgl = require("@xterm/addon-webgl");
|
|
9
9
|
const xterm$1 = require("@xterm/xterm");
|
|
10
|
-
const copyToClipboard = require("copy-to-clipboard");
|
|
11
10
|
const lodashEs = require("lodash-es");
|
|
12
11
|
const React = require("react");
|
|
13
12
|
const iconsReact = require("@cloudtower/icons-react");
|
|
13
|
+
var toggleSelection = function() {
|
|
14
|
+
var selection = document.getSelection();
|
|
15
|
+
if (!selection.rangeCount) {
|
|
16
|
+
return function() {
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
var active = document.activeElement;
|
|
20
|
+
var ranges = [];
|
|
21
|
+
for (var i = 0; i < selection.rangeCount; i++) {
|
|
22
|
+
ranges.push(selection.getRangeAt(i));
|
|
23
|
+
}
|
|
24
|
+
switch (active.tagName.toUpperCase()) {
|
|
25
|
+
case "INPUT":
|
|
26
|
+
case "TEXTAREA":
|
|
27
|
+
active.blur();
|
|
28
|
+
break;
|
|
29
|
+
default:
|
|
30
|
+
active = null;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
selection.removeAllRanges();
|
|
34
|
+
return function() {
|
|
35
|
+
selection.type === "Caret" && selection.removeAllRanges();
|
|
36
|
+
if (!selection.rangeCount) {
|
|
37
|
+
ranges.forEach(function(range) {
|
|
38
|
+
selection.addRange(range);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
active && active.focus();
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
var deselectCurrent = toggleSelection;
|
|
45
|
+
var clipboardToIE11Formatting = {
|
|
46
|
+
"text/plain": "Text",
|
|
47
|
+
"text/html": "Url",
|
|
48
|
+
"default": "Text"
|
|
49
|
+
};
|
|
50
|
+
var defaultMessage = "Copy to clipboard: #{key}, Enter";
|
|
51
|
+
function format(message) {
|
|
52
|
+
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
53
|
+
return message.replace(/#{\s*key\s*}/g, copyKey);
|
|
54
|
+
}
|
|
55
|
+
function copy(text, options) {
|
|
56
|
+
var debug, message, reselectPrevious, range, selection, mark, success = false;
|
|
57
|
+
if (!options) {
|
|
58
|
+
options = {};
|
|
59
|
+
}
|
|
60
|
+
debug = options.debug || false;
|
|
61
|
+
try {
|
|
62
|
+
reselectPrevious = deselectCurrent();
|
|
63
|
+
range = document.createRange();
|
|
64
|
+
selection = document.getSelection();
|
|
65
|
+
mark = document.createElement("span");
|
|
66
|
+
mark.textContent = text;
|
|
67
|
+
mark.ariaHidden = "true";
|
|
68
|
+
mark.style.all = "unset";
|
|
69
|
+
mark.style.position = "fixed";
|
|
70
|
+
mark.style.top = 0;
|
|
71
|
+
mark.style.clip = "rect(0, 0, 0, 0)";
|
|
72
|
+
mark.style.whiteSpace = "pre";
|
|
73
|
+
mark.style.webkitUserSelect = "text";
|
|
74
|
+
mark.style.MozUserSelect = "text";
|
|
75
|
+
mark.style.msUserSelect = "text";
|
|
76
|
+
mark.style.userSelect = "text";
|
|
77
|
+
mark.addEventListener("copy", function(e) {
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
if (options.format) {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
if (typeof e.clipboardData === "undefined") {
|
|
82
|
+
debug && console.warn("unable to use e.clipboardData");
|
|
83
|
+
debug && console.warn("trying IE specific stuff");
|
|
84
|
+
window.clipboardData.clearData();
|
|
85
|
+
var format2 = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"];
|
|
86
|
+
window.clipboardData.setData(format2, text);
|
|
87
|
+
} else {
|
|
88
|
+
e.clipboardData.clearData();
|
|
89
|
+
e.clipboardData.setData(options.format, text);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (options.onCopy) {
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
options.onCopy(e.clipboardData);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
document.body.appendChild(mark);
|
|
98
|
+
range.selectNodeContents(mark);
|
|
99
|
+
selection.addRange(range);
|
|
100
|
+
var successful = document.execCommand("copy");
|
|
101
|
+
if (!successful) {
|
|
102
|
+
throw new Error("copy command was unsuccessful");
|
|
103
|
+
}
|
|
104
|
+
success = true;
|
|
105
|
+
} catch (err) {
|
|
106
|
+
debug && console.error("unable to copy using execCommand: ", err);
|
|
107
|
+
debug && console.warn("trying IE specific stuff");
|
|
108
|
+
try {
|
|
109
|
+
window.clipboardData.setData(options.format || "text", text);
|
|
110
|
+
options.onCopy && options.onCopy(window.clipboardData);
|
|
111
|
+
success = true;
|
|
112
|
+
} catch (err2) {
|
|
113
|
+
debug && console.error("unable to copy using clipboardData: ", err2);
|
|
114
|
+
debug && console.error("falling back to prompt");
|
|
115
|
+
message = format("message" in options ? options.message : defaultMessage);
|
|
116
|
+
window.prompt(message, text);
|
|
117
|
+
}
|
|
118
|
+
} finally {
|
|
119
|
+
if (selection) {
|
|
120
|
+
if (typeof selection.removeRange == "function") {
|
|
121
|
+
selection.removeRange(range);
|
|
122
|
+
} else {
|
|
123
|
+
selection.removeAllRanges();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (mark) {
|
|
127
|
+
document.body.removeChild(mark);
|
|
128
|
+
}
|
|
129
|
+
reselectPrevious();
|
|
130
|
+
}
|
|
131
|
+
return success;
|
|
132
|
+
}
|
|
133
|
+
var copyToClipboard = copy;
|
|
134
|
+
const copyToClipboard$1 = /* @__PURE__ */ common.getDefaultExportFromCjs(copyToClipboard);
|
|
14
135
|
const Connecting_r8rfff = "";
|
|
15
136
|
const LoadingStyle = "l1ur2ktd";
|
|
16
137
|
const Connecting = () => {
|
|
@@ -291,7 +412,7 @@ const Shell = React.forwardRef(function Shell2(props, ref) {
|
|
|
291
412
|
let onKeyDown = function(event) {
|
|
292
413
|
if (event.ctrlKey && event.shiftKey && event.key === "C") {
|
|
293
414
|
event.preventDefault();
|
|
294
|
-
copyToClipboard(term.getSelection());
|
|
415
|
+
copyToClipboard$1(term.getSelection());
|
|
295
416
|
}
|
|
296
417
|
}, onResize = function() {
|
|
297
418
|
fit();
|