andoncloud-dashboard-toolkit 1.2.7 → 1.2.8
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/helpers/sdk.d.ts +2 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
package/dist/helpers/sdk.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
export declare const getGraphqlSdk: (url: string, fetch: typeof fetch) => {
|
|
2
3
|
createDashboard(variables: import("../graphql-request").Exact<{
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,6 @@ var reactIs = _interopDefault(require('react-is'));
|
|
|
9
9
|
var iconsMaterial = require('@mui/icons-material');
|
|
10
10
|
var dragIcon_svg = require('./assets/drag-icon.svg');
|
|
11
11
|
var resizeIcon = _interopDefault(require('./assets/resize-icon.svg'));
|
|
12
|
-
var andoncloudSdk = require('andoncloud-sdk');
|
|
13
12
|
|
|
14
13
|
function _extends() {
|
|
15
14
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -545,8 +544,10 @@ const round = Math.round;
|
|
|
545
544
|
|
|
546
545
|
function getCssDimensions(element) {
|
|
547
546
|
const css = getComputedStyle$1(element);
|
|
548
|
-
|
|
549
|
-
|
|
547
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
548
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
549
|
+
let width = parseFloat(css.width) || 0;
|
|
550
|
+
let height = parseFloat(css.height) || 0;
|
|
550
551
|
const hasOffset = isHTMLElement(element);
|
|
551
552
|
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
552
553
|
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
@@ -15951,11 +15952,10 @@ Object.defineProperty(exports, "GraphQLWebSocketClient", { enumerable: true, get
|
|
|
15951
15952
|
unwrapExports(dist);
|
|
15952
15953
|
var dist_7 = dist.GraphQLClient;
|
|
15953
15954
|
|
|
15954
|
-
var getGraphqlSdk = function getGraphqlSdk(url,
|
|
15955
|
+
var getGraphqlSdk = function getGraphqlSdk(url, fetch) {
|
|
15955
15956
|
var graphqlClient = new dist_7(url, {
|
|
15956
|
-
fetch:
|
|
15957
|
+
fetch: fetch
|
|
15957
15958
|
});
|
|
15958
|
-
graphqlClient.setHeader('Authorization', "Bearer " + token);
|
|
15959
15959
|
return getSdk(graphqlClient);
|
|
15960
15960
|
};
|
|
15961
15961
|
|