andoncloud-dashboard-toolkit 1.2.13 → 1.2.15
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/drag-icon~huwwxwKm.svg +3 -0
- package/dist/index.js +54 -325
- package/dist/index.js.map +1 -1
- package/dist/resize-icon~bhMqljwZ.svg +3 -0
- package/dist/types.d.ts +1 -0
- package/package.json +14 -13
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2.46147 10.5737C2.99531 11.0586 3.63181 10.6829 3.63181 10.0478V8.74325H7.26604V12.3699H5.94512C5.30862 12.3699 4.93904 13.0119 5.41813 13.5378L7.42345 15.7234C7.75197 16.0922 8.25159 16.0922 8.58011 15.7234L10.5786 13.5447C11.0645 13.0119 10.6949 12.3699 10.0516 12.3699H8.74437V8.74325H12.3649V10.0478C12.3649 10.6829 13.0083 11.0586 13.5421 10.5737L15.7254 8.57933C16.095 8.24467 16.0881 7.74609 15.7254 7.42508L13.5353 5.42393C13.0083 4.94584 12.3649 5.31465 12.3649 5.94983V7.26117H8.74437V3.62767H10.0516C10.6949 3.62767 11.0645 2.98566 10.5786 2.45293L8.57327 0.267369C8.23791 -0.101445 7.73828 -0.0809553 7.41661 0.281028L5.41813 2.46659C4.93904 2.98566 5.30862 3.62767 5.94512 3.62767H7.26604V7.26117H3.63181V5.94983C3.63181 5.31465 2.98846 4.94584 2.46831 5.42393L0.278192 7.41825C-0.0777021 7.73926 -0.105079 8.23784 0.271348 8.5725L2.46147 10.5737Z" fill="white"/>
|
|
3
|
+
</svg>
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,8 @@ var material = require('@mui/material');
|
|
|
6
6
|
var react = require('@emotion/react');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
8
8
|
var reactIs = _interopDefault(require('react-is'));
|
|
9
|
+
var reactI18next = require('react-i18next');
|
|
9
10
|
var iconsMaterial = require('@mui/icons-material');
|
|
10
|
-
var dragIcon_svg = require('./assets/drag-icon.svg');
|
|
11
|
-
var resizeIcon = _interopDefault(require('./assets/resize-icon.svg'));
|
|
12
11
|
var andoncloudSdk = require('andoncloud-sdk');
|
|
13
12
|
|
|
14
13
|
function _extends() {
|
|
@@ -4724,7 +4723,7 @@ function _typeof(obj) {
|
|
|
4724
4723
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4725
4724
|
});
|
|
4726
4725
|
|
|
4727
|
-
|
|
4726
|
+
unwrapExports(_typeof_1);
|
|
4728
4727
|
|
|
4729
4728
|
var toPrimitive = createCommonjsModule(function (module) {
|
|
4730
4729
|
var _typeof = _typeof_1["default"];
|
|
@@ -4773,7 +4772,7 @@ function _defineProperty(obj, key, value) {
|
|
|
4773
4772
|
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4774
4773
|
});
|
|
4775
4774
|
|
|
4776
|
-
|
|
4775
|
+
unwrapExports(defineProperty);
|
|
4777
4776
|
|
|
4778
4777
|
var objectSpread2 = createCommonjsModule(function (module) {
|
|
4779
4778
|
function ownKeys(object, enumerableOnly) {
|
|
@@ -4885,7 +4884,7 @@ function _slicedToArray(arr, i) {
|
|
|
4885
4884
|
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4886
4885
|
});
|
|
4887
4886
|
|
|
4888
|
-
|
|
4887
|
+
unwrapExports(slicedToArray);
|
|
4889
4888
|
|
|
4890
4889
|
var objectWithoutPropertiesLoose = createCommonjsModule(function (module) {
|
|
4891
4890
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -4935,7 +4934,7 @@ function _classCallCheck(instance, Constructor) {
|
|
|
4935
4934
|
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4936
4935
|
});
|
|
4937
4936
|
|
|
4938
|
-
|
|
4937
|
+
unwrapExports(classCallCheck);
|
|
4939
4938
|
|
|
4940
4939
|
var createClass = createCommonjsModule(function (module) {
|
|
4941
4940
|
function _defineProperties(target, props) {
|
|
@@ -4958,7 +4957,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
|
|
4958
4957
|
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
4959
4958
|
});
|
|
4960
4959
|
|
|
4961
|
-
|
|
4960
|
+
unwrapExports(createClass);
|
|
4962
4961
|
|
|
4963
4962
|
var setPrototypeOf = createCommonjsModule(function (module) {
|
|
4964
4963
|
function _setPrototypeOf(o, p) {
|
|
@@ -7716,305 +7715,34 @@ var SortableSelect = function SortableSelect(_ref) {
|
|
|
7716
7715
|
});
|
|
7717
7716
|
};
|
|
7718
7717
|
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
(_console = console).warn.apply(_console, args);
|
|
7730
|
-
}
|
|
7731
|
-
}
|
|
7732
|
-
var alreadyWarned = {};
|
|
7733
|
-
function warnOnce() {
|
|
7734
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
7735
|
-
args[_key2] = arguments[_key2];
|
|
7736
|
-
}
|
|
7737
|
-
|
|
7738
|
-
if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
|
|
7739
|
-
if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
|
|
7740
|
-
warn.apply(void 0, args);
|
|
7741
|
-
}
|
|
7742
|
-
|
|
7743
|
-
var loadedClb = function loadedClb(i18n, cb) {
|
|
7744
|
-
return function () {
|
|
7745
|
-
if (i18n.isInitialized) {
|
|
7746
|
-
cb();
|
|
7747
|
-
} else {
|
|
7748
|
-
var initialized = function initialized() {
|
|
7749
|
-
setTimeout(function () {
|
|
7750
|
-
i18n.off('initialized', initialized);
|
|
7751
|
-
}, 0);
|
|
7752
|
-
cb();
|
|
7753
|
-
};
|
|
7754
|
-
|
|
7755
|
-
i18n.on('initialized', initialized);
|
|
7718
|
+
var _path;
|
|
7719
|
+
function _extends$2() {
|
|
7720
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
7721
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
7722
|
+
var source = arguments[i];
|
|
7723
|
+
for (var key in source) {
|
|
7724
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7725
|
+
target[key] = source[key];
|
|
7726
|
+
}
|
|
7727
|
+
}
|
|
7756
7728
|
}
|
|
7729
|
+
return target;
|
|
7757
7730
|
};
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
function
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
}
|
|
7770
|
-
|
|
7771
|
-
function oldI18nextHasLoadedNamespace(ns, i18n) {
|
|
7772
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7773
|
-
var lng = i18n.languages[0];
|
|
7774
|
-
var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
|
|
7775
|
-
var lastLng = i18n.languages[i18n.languages.length - 1];
|
|
7776
|
-
if (lng.toLowerCase() === 'cimode') return true;
|
|
7777
|
-
|
|
7778
|
-
var loadNotPending = function loadNotPending(l, n) {
|
|
7779
|
-
var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
|
|
7780
|
-
return loadState === -1 || loadState === 2;
|
|
7781
|
-
};
|
|
7782
|
-
|
|
7783
|
-
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
|
|
7784
|
-
if (i18n.hasResourceBundle(lng, ns)) return true;
|
|
7785
|
-
if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
|
|
7786
|
-
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
|
7787
|
-
return false;
|
|
7788
|
-
}
|
|
7789
|
-
|
|
7790
|
-
function hasLoadedNamespace(ns, i18n) {
|
|
7791
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
7792
|
-
|
|
7793
|
-
if (!i18n.languages || !i18n.languages.length) {
|
|
7794
|
-
warnOnce('i18n.languages were undefined or empty', i18n.languages);
|
|
7795
|
-
return true;
|
|
7796
|
-
}
|
|
7797
|
-
|
|
7798
|
-
var isNewerI18next = i18n.options.ignoreJSONStructure !== undefined;
|
|
7799
|
-
|
|
7800
|
-
if (!isNewerI18next) {
|
|
7801
|
-
return oldI18nextHasLoadedNamespace(ns, i18n, options);
|
|
7802
|
-
}
|
|
7803
|
-
|
|
7804
|
-
return i18n.hasLoadedNamespace(ns, {
|
|
7805
|
-
lng: options.lng,
|
|
7806
|
-
precheck: function precheck(i18nInstance, loadNotPending) {
|
|
7807
|
-
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
|
|
7808
|
-
}
|
|
7809
|
-
});
|
|
7810
|
-
}
|
|
7811
|
-
|
|
7812
|
-
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
7813
|
-
var htmlEntities = {
|
|
7814
|
-
'&': '&',
|
|
7815
|
-
'&': '&',
|
|
7816
|
-
'<': '<',
|
|
7817
|
-
'<': '<',
|
|
7818
|
-
'>': '>',
|
|
7819
|
-
'>': '>',
|
|
7820
|
-
''': "'",
|
|
7821
|
-
''': "'",
|
|
7822
|
-
'"': '"',
|
|
7823
|
-
'"': '"',
|
|
7824
|
-
' ': ' ',
|
|
7825
|
-
' ': ' ',
|
|
7826
|
-
'©': '©',
|
|
7827
|
-
'©': '©',
|
|
7828
|
-
'®': '®',
|
|
7829
|
-
'®': '®',
|
|
7830
|
-
'…': '…',
|
|
7831
|
-
'…': '…',
|
|
7832
|
-
'/': '/',
|
|
7833
|
-
'/': '/'
|
|
7834
|
-
};
|
|
7835
|
-
|
|
7836
|
-
var unescapeHtmlEntity = function unescapeHtmlEntity(m) {
|
|
7837
|
-
return htmlEntities[m];
|
|
7838
|
-
};
|
|
7839
|
-
|
|
7840
|
-
var unescape = function unescape(text) {
|
|
7841
|
-
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
7842
|
-
};
|
|
7843
|
-
|
|
7844
|
-
var defaultOptions = {
|
|
7845
|
-
bindI18n: 'languageChanged',
|
|
7846
|
-
bindI18nStore: '',
|
|
7847
|
-
transEmptyNodeValue: '',
|
|
7848
|
-
transSupportBasicHtmlNodes: true,
|
|
7849
|
-
transWrapTextNodes: '',
|
|
7850
|
-
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
|
|
7851
|
-
useSuspense: true,
|
|
7852
|
-
unescape: unescape
|
|
7853
|
-
};
|
|
7854
|
-
function getDefaults() {
|
|
7855
|
-
return defaultOptions;
|
|
7856
|
-
}
|
|
7857
|
-
|
|
7858
|
-
var i18nInstance;
|
|
7859
|
-
function getI18n() {
|
|
7860
|
-
return i18nInstance;
|
|
7731
|
+
return _extends$2.apply(this, arguments);
|
|
7732
|
+
}
|
|
7733
|
+
function SvgDragIcon(props) {
|
|
7734
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
7735
|
+
width: 16,
|
|
7736
|
+
height: 16,
|
|
7737
|
+
fill: "none",
|
|
7738
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
7739
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
7740
|
+
d: "M2.461 10.574c.534.485 1.17.109 1.17-.526V8.743h3.635v3.627h-1.32c-.637 0-1.007.642-.528 1.168l2.005 2.185c.329.37.829.37 1.157 0l1.999-2.178c.486-.533.116-1.175-.527-1.175H8.744V8.743h3.62v1.305c0 .635.644 1.01 1.178.526l2.183-1.995c.37-.334.363-.833 0-1.154l-2.19-2.001c-.527-.478-1.17-.11-1.17.526V7.26h-3.62V3.628h1.307c.643 0 1.013-.642.527-1.175L8.573.267C8.238-.1 7.738-.08 7.417.281L5.418 2.467c-.479.519-.11 1.16.527 1.16h1.321v3.634H3.632V5.95c0-.635-.644-1.004-1.164-.526L.278 7.418c-.356.321-.383.82-.007 1.154l2.19 2.002z",
|
|
7741
|
+
fill: "#fff"
|
|
7742
|
+
})));
|
|
7861
7743
|
}
|
|
7862
7744
|
|
|
7863
|
-
var
|
|
7864
|
-
var ReportNamespaces = function () {
|
|
7865
|
-
function ReportNamespaces() {
|
|
7866
|
-
_classCallCheck$1(this, ReportNamespaces);
|
|
7867
|
-
|
|
7868
|
-
this.usedNamespaces = {};
|
|
7869
|
-
}
|
|
7870
|
-
|
|
7871
|
-
_createClass$1(ReportNamespaces, [{
|
|
7872
|
-
key: "addUsedNamespaces",
|
|
7873
|
-
value: function addUsedNamespaces(namespaces) {
|
|
7874
|
-
var _this = this;
|
|
7875
|
-
|
|
7876
|
-
namespaces.forEach(function (ns) {
|
|
7877
|
-
if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
|
|
7878
|
-
});
|
|
7879
|
-
}
|
|
7880
|
-
}, {
|
|
7881
|
-
key: "getUsedNamespaces",
|
|
7882
|
-
value: function getUsedNamespaces() {
|
|
7883
|
-
return Object.keys(this.usedNamespaces);
|
|
7884
|
-
}
|
|
7885
|
-
}]);
|
|
7886
|
-
|
|
7887
|
-
return ReportNamespaces;
|
|
7888
|
-
}();
|
|
7889
|
-
|
|
7890
|
-
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7891
|
-
|
|
7892
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7893
|
-
|
|
7894
|
-
var usePrevious = function usePrevious(value, ignore) {
|
|
7895
|
-
var ref = React.useRef();
|
|
7896
|
-
React.useEffect(function () {
|
|
7897
|
-
ref.current = ignore ? ref.current : value;
|
|
7898
|
-
}, [value, ignore]);
|
|
7899
|
-
return ref.current;
|
|
7900
|
-
};
|
|
7901
|
-
|
|
7902
|
-
function useTranslation(ns) {
|
|
7903
|
-
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7904
|
-
var i18nFromProps = props.i18n;
|
|
7905
|
-
|
|
7906
|
-
var _ref = React.useContext(I18nContext) || {},
|
|
7907
|
-
i18nFromContext = _ref.i18n,
|
|
7908
|
-
defaultNSFromContext = _ref.defaultNS;
|
|
7909
|
-
|
|
7910
|
-
var i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
7911
|
-
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
7912
|
-
|
|
7913
|
-
if (!i18n) {
|
|
7914
|
-
warnOnce('You will need to pass in an i18next instance by using initReactI18next');
|
|
7915
|
-
|
|
7916
|
-
var notReadyT = function notReadyT(k, optsOrDefaultValue) {
|
|
7917
|
-
if (typeof optsOrDefaultValue === 'string') return optsOrDefaultValue;
|
|
7918
|
-
if (optsOrDefaultValue && _typeof$1(optsOrDefaultValue) === 'object' && typeof optsOrDefaultValue.defaultValue === 'string') return optsOrDefaultValue.defaultValue;
|
|
7919
|
-
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
7920
|
-
};
|
|
7921
|
-
|
|
7922
|
-
var retNotReady = [notReadyT, {}, false];
|
|
7923
|
-
retNotReady.t = notReadyT;
|
|
7924
|
-
retNotReady.i18n = {};
|
|
7925
|
-
retNotReady.ready = false;
|
|
7926
|
-
return retNotReady;
|
|
7927
|
-
}
|
|
7928
|
-
|
|
7929
|
-
if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
|
|
7930
|
-
|
|
7931
|
-
var i18nOptions = _objectSpread$1(_objectSpread$1(_objectSpread$1({}, getDefaults()), i18n.options.react), props);
|
|
7932
|
-
|
|
7933
|
-
var useSuspense = i18nOptions.useSuspense,
|
|
7934
|
-
keyPrefix = i18nOptions.keyPrefix;
|
|
7935
|
-
var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
|
|
7936
|
-
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
7937
|
-
if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
|
|
7938
|
-
var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
|
|
7939
|
-
return hasLoadedNamespace(n, i18n, i18nOptions);
|
|
7940
|
-
});
|
|
7941
|
-
|
|
7942
|
-
function getT() {
|
|
7943
|
-
return i18n.getFixedT(props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
|
|
7944
|
-
}
|
|
7945
|
-
|
|
7946
|
-
var _useState = React.useState(getT),
|
|
7947
|
-
_useState2 = _slicedToArray$1(_useState, 2),
|
|
7948
|
-
t = _useState2[0],
|
|
7949
|
-
setT = _useState2[1];
|
|
7950
|
-
|
|
7951
|
-
var joinedNS = namespaces.join();
|
|
7952
|
-
if (props.lng) joinedNS = "".concat(props.lng).concat(joinedNS);
|
|
7953
|
-
var previousJoinedNS = usePrevious(joinedNS);
|
|
7954
|
-
var isMounted = React.useRef(true);
|
|
7955
|
-
React.useEffect(function () {
|
|
7956
|
-
var bindI18n = i18nOptions.bindI18n,
|
|
7957
|
-
bindI18nStore = i18nOptions.bindI18nStore;
|
|
7958
|
-
isMounted.current = true;
|
|
7959
|
-
|
|
7960
|
-
if (!ready && !useSuspense) {
|
|
7961
|
-
if (props.lng) {
|
|
7962
|
-
loadLanguages(i18n, props.lng, namespaces, function () {
|
|
7963
|
-
if (isMounted.current) setT(getT);
|
|
7964
|
-
});
|
|
7965
|
-
} else {
|
|
7966
|
-
loadNamespaces(i18n, namespaces, function () {
|
|
7967
|
-
if (isMounted.current) setT(getT);
|
|
7968
|
-
});
|
|
7969
|
-
}
|
|
7970
|
-
}
|
|
7971
|
-
|
|
7972
|
-
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
7973
|
-
setT(getT);
|
|
7974
|
-
}
|
|
7975
|
-
|
|
7976
|
-
function boundReset() {
|
|
7977
|
-
if (isMounted.current) setT(getT);
|
|
7978
|
-
}
|
|
7979
|
-
|
|
7980
|
-
if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
|
|
7981
|
-
if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
|
|
7982
|
-
return function () {
|
|
7983
|
-
isMounted.current = false;
|
|
7984
|
-
if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
|
|
7985
|
-
return i18n.off(e, boundReset);
|
|
7986
|
-
});
|
|
7987
|
-
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
|
|
7988
|
-
return i18n.store.off(e, boundReset);
|
|
7989
|
-
});
|
|
7990
|
-
};
|
|
7991
|
-
}, [i18n, joinedNS]);
|
|
7992
|
-
var isInitial = React.useRef(true);
|
|
7993
|
-
React.useEffect(function () {
|
|
7994
|
-
if (isMounted.current && !isInitial.current) {
|
|
7995
|
-
setT(getT);
|
|
7996
|
-
}
|
|
7997
|
-
|
|
7998
|
-
isInitial.current = false;
|
|
7999
|
-
}, [i18n, keyPrefix]);
|
|
8000
|
-
var ret = [t, i18n, ready];
|
|
8001
|
-
ret.t = t;
|
|
8002
|
-
ret.i18n = i18n;
|
|
8003
|
-
ret.ready = ready;
|
|
8004
|
-
if (ready) return ret;
|
|
8005
|
-
if (!ready && !useSuspense) return ret;
|
|
8006
|
-
throw new Promise(function (resolve) {
|
|
8007
|
-
if (props.lng) {
|
|
8008
|
-
loadLanguages(i18n, props.lng, namespaces, function () {
|
|
8009
|
-
return resolve();
|
|
8010
|
-
});
|
|
8011
|
-
} else {
|
|
8012
|
-
loadNamespaces(i18n, namespaces, function () {
|
|
8013
|
-
return resolve();
|
|
8014
|
-
});
|
|
8015
|
-
}
|
|
8016
|
-
});
|
|
8017
|
-
}
|
|
7745
|
+
var resizeIcon = "resize-icon~bhMqljwZ.svg";
|
|
8018
7746
|
|
|
8019
7747
|
var styles$1 = {
|
|
8020
7748
|
root: {
|
|
@@ -8096,7 +7824,7 @@ var styles$1 = {
|
|
|
8096
7824
|
}
|
|
8097
7825
|
};
|
|
8098
7826
|
|
|
8099
|
-
var _excluded$6 = ["children", "title", "Widget", "id", "url", "wsUrl", "lang", "data", "settings", "openSettingsModal", "onSettingsModalOpened", "onSettingsModalClosed", "onDelete", "editMode"];
|
|
7827
|
+
var _excluded$6 = ["children", "title", "Widget", "id", "url", "wsUrl", "lang", "data", "settings", "openSettingsModal", "onSettingsModalOpened", "onSettingsModalClosed", "onDelete", "editMode", "version"];
|
|
8100
7828
|
var WidgetCard = React__default.forwardRef(function (_ref, ref) {
|
|
8101
7829
|
var children = _ref.children,
|
|
8102
7830
|
title = _ref.title,
|
|
@@ -8112,6 +7840,7 @@ var WidgetCard = React__default.forwardRef(function (_ref, ref) {
|
|
|
8112
7840
|
onSettingsModalClosed = _ref.onSettingsModalClosed,
|
|
8113
7841
|
onDelete = _ref.onDelete,
|
|
8114
7842
|
editMode = _ref.editMode,
|
|
7843
|
+
version = _ref.version,
|
|
8115
7844
|
cardProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
8116
7845
|
var _useState = React.useState(false),
|
|
8117
7846
|
deleteInProgress = _useState[0],
|
|
@@ -8119,7 +7848,7 @@ var WidgetCard = React__default.forwardRef(function (_ref, ref) {
|
|
|
8119
7848
|
var _useState2 = React.useState(false),
|
|
8120
7849
|
removeTooltipOpened = _useState2[0],
|
|
8121
7850
|
setRemoveTooltipOpened = _useState2[1];
|
|
8122
|
-
var _useTranslation = useTranslation(),
|
|
7851
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
8123
7852
|
t = _useTranslation.t;
|
|
8124
7853
|
var handleOpenSettingsModal = function handleOpenSettingsModal() {
|
|
8125
7854
|
if (onSettingsModalOpened) onSettingsModalOpened();
|
|
@@ -8132,7 +7861,7 @@ var WidgetCard = React__default.forwardRef(function (_ref, ref) {
|
|
|
8132
7861
|
};
|
|
8133
7862
|
var renderDragHandle = function renderDragHandle() {
|
|
8134
7863
|
return React__default.createElement(material.SvgIcon, {
|
|
8135
|
-
component:
|
|
7864
|
+
component: SvgDragIcon,
|
|
8136
7865
|
className: "draggable-handle",
|
|
8137
7866
|
sx: styles$1.dragIcon,
|
|
8138
7867
|
inheritViewBox: true
|
|
@@ -8146,8 +7875,8 @@ var WidgetCard = React__default.forwardRef(function (_ref, ref) {
|
|
|
8146
7875
|
color: "secondary",
|
|
8147
7876
|
sx: styles$1.settingsButton,
|
|
8148
7877
|
onClick: handleOpenSettingsModal
|
|
8149
|
-
}, React__default.createElement(iconsMaterial.Settings, null)),
|
|
8150
|
-
title:
|
|
7878
|
+
}, React__default.createElement(iconsMaterial.Settings, null)), version && React__default.createElement(React__default.Fragment, null, React__default.createElement(material.Tooltip, {
|
|
7879
|
+
title: version
|
|
8151
7880
|
}, React__default.createElement(material.Button, {
|
|
8152
7881
|
color: "secondary",
|
|
8153
7882
|
sx: styles$1.infoButton
|
|
@@ -8223,14 +7952,14 @@ var __assign = function() {
|
|
|
8223
7952
|
return __assign.apply(this, arguments);
|
|
8224
7953
|
};
|
|
8225
7954
|
|
|
8226
|
-
function _typeof$
|
|
7955
|
+
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
8227
7956
|
|
|
8228
7957
|
/**
|
|
8229
7958
|
* Return true if `value` is object-like. A value is object-like if it's not
|
|
8230
7959
|
* `null` and has a `typeof` result of "object".
|
|
8231
7960
|
*/
|
|
8232
7961
|
function isObjectLike(value) {
|
|
8233
|
-
return _typeof$
|
|
7962
|
+
return _typeof$1(value) == 'object' && value !== null;
|
|
8234
7963
|
}
|
|
8235
7964
|
|
|
8236
7965
|
// In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
|
|
@@ -8327,25 +8056,25 @@ function leftPad(len, str) {
|
|
|
8327
8056
|
return whitespace(len - str.length) + str;
|
|
8328
8057
|
}
|
|
8329
8058
|
|
|
8330
|
-
function _typeof$
|
|
8059
|
+
function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
|
|
8331
8060
|
|
|
8332
|
-
function ownKeys$
|
|
8061
|
+
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
8333
8062
|
|
|
8334
|
-
function _objectSpread$
|
|
8063
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8335
8064
|
|
|
8336
|
-
function _defineProperty$
|
|
8065
|
+
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8337
8066
|
|
|
8338
|
-
function _classCallCheck$
|
|
8067
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8339
8068
|
|
|
8340
8069
|
function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
8341
8070
|
|
|
8342
|
-
function _createClass$
|
|
8071
|
+
function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
|
|
8343
8072
|
|
|
8344
8073
|
function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
|
|
8345
8074
|
|
|
8346
8075
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf$1(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$1(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$1(this, result); }; }
|
|
8347
8076
|
|
|
8348
|
-
function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$
|
|
8077
|
+
function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$2(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
|
|
8349
8078
|
|
|
8350
8079
|
function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8351
8080
|
|
|
@@ -8418,7 +8147,7 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
8418
8147
|
|
|
8419
8148
|
var _this;
|
|
8420
8149
|
|
|
8421
|
-
_classCallCheck$
|
|
8150
|
+
_classCallCheck$1(this, GraphQLError);
|
|
8422
8151
|
|
|
8423
8152
|
_this = _super.call(this, message);
|
|
8424
8153
|
_this.name = 'GraphQLError';
|
|
@@ -8453,7 +8182,7 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
8453
8182
|
var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;
|
|
8454
8183
|
|
|
8455
8184
|
if (extensions == null && isObjectLike(originalExtensions)) {
|
|
8456
|
-
_this.extensions = _objectSpread$
|
|
8185
|
+
_this.extensions = _objectSpread$1({}, originalExtensions);
|
|
8457
8186
|
} else {
|
|
8458
8187
|
_this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};
|
|
8459
8188
|
} // By being enumerable, JSON.stringify will include bellow properties in the resulting output.
|
|
@@ -8513,7 +8242,7 @@ var GraphQLError = /*#__PURE__*/function (_Error) {
|
|
|
8513
8242
|
return _this;
|
|
8514
8243
|
}
|
|
8515
8244
|
|
|
8516
|
-
_createClass$
|
|
8245
|
+
_createClass$1(GraphQLError, [{
|
|
8517
8246
|
key: "toString",
|
|
8518
8247
|
value: function toString() {
|
|
8519
8248
|
return printError(this);
|
|
@@ -8806,7 +8535,7 @@ var TokenKind = Object.freeze({
|
|
|
8806
8535
|
* The enum type representing the token kinds values.
|
|
8807
8536
|
*/
|
|
8808
8537
|
|
|
8809
|
-
function _typeof$
|
|
8538
|
+
function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
|
|
8810
8539
|
var MAX_ARRAY_LENGTH = 10;
|
|
8811
8540
|
var MAX_RECURSIVE_DEPTH = 2;
|
|
8812
8541
|
/**
|
|
@@ -8818,7 +8547,7 @@ function inspect(value) {
|
|
|
8818
8547
|
}
|
|
8819
8548
|
|
|
8820
8549
|
function formatValue(value, seenValues) {
|
|
8821
|
-
switch (_typeof$
|
|
8550
|
+
switch (_typeof$3(value)) {
|
|
8822
8551
|
case 'string':
|
|
8823
8552
|
return JSON.stringify(value);
|
|
8824
8553
|
|
|
@@ -8936,7 +8665,7 @@ function devAssert(condition, message) {
|
|
|
8936
8665
|
}
|
|
8937
8666
|
}
|
|
8938
8667
|
|
|
8939
|
-
function _typeof$
|
|
8668
|
+
function _typeof$4(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$4 = function _typeof(obj) { return typeof obj; }; } else { _typeof$4 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$4(obj); }
|
|
8940
8669
|
/**
|
|
8941
8670
|
* A replacement for instanceof which includes an error warning when multi-realm
|
|
8942
8671
|
* constructors are detected.
|
|
@@ -8954,7 +8683,7 @@ function instanceOf(value, constructor) {
|
|
|
8954
8683
|
return true;
|
|
8955
8684
|
}
|
|
8956
8685
|
|
|
8957
|
-
if (_typeof$
|
|
8686
|
+
if (_typeof$4(value) === 'object' && value !== null) {
|
|
8958
8687
|
var _value$constructor;
|
|
8959
8688
|
|
|
8960
8689
|
var className = constructor.prototype[Symbol.toStringTag];
|
|
@@ -8972,7 +8701,7 @@ function instanceOf(value, constructor) {
|
|
|
8972
8701
|
|
|
8973
8702
|
function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
8974
8703
|
|
|
8975
|
-
function _createClass$
|
|
8704
|
+
function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }
|
|
8976
8705
|
|
|
8977
8706
|
/**
|
|
8978
8707
|
* A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
|
|
@@ -8997,7 +8726,7 @@ var Source = /*#__PURE__*/function () {
|
|
|
8997
8726
|
} // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
|
|
8998
8727
|
|
|
8999
8728
|
|
|
9000
|
-
_createClass$
|
|
8729
|
+
_createClass$2(Source, [{
|
|
9001
8730
|
key: SYMBOL_TO_STRING_TAG,
|
|
9002
8731
|
get: function get() {
|
|
9003
8732
|
return 'Source';
|