@looker/extension-sdk-react 22.20.2-alpha.1648 → 23.0.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/CHANGELOG.md +16 -0
- package/README.md +0 -14
- package/lib/components/ErrorMessage/ErrorMessage.js +0 -4
- package/lib/components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/lib/components/ErrorMessage/index.js +0 -4
- package/lib/components/ErrorMessage/index.js.map +1 -1
- package/lib/components/ErrorMessage/types.js +1 -1
- package/lib/components/ErrorMessage/types.js.map +1 -1
- package/lib/components/ExtensionConnector/ExtensionConnector.js +14 -49
- package/lib/components/ExtensionConnector/ExtensionConnector.js.map +1 -1
- package/lib/components/ExtensionConnector/index.js +0 -4
- package/lib/components/ExtensionConnector/index.js.map +1 -1
- package/lib/components/ExtensionConnector/types.d.ts +2 -7
- package/lib/components/ExtensionConnector/types.js +1 -1
- package/lib/components/ExtensionConnector/types.js.map +1 -1
- package/lib/components/ExtensionProvider/ExtensionProvider.js +11 -48
- package/lib/components/ExtensionProvider/ExtensionProvider.js.map +1 -1
- package/lib/components/ExtensionProvider/index.js +0 -4
- package/lib/components/ExtensionProvider/index.js.map +1 -1
- package/lib/components/ExtensionProvider/types.js +1 -1
- package/lib/components/ExtensionProvider/types.js.map +1 -1
- package/lib/components/ExtensionProvider2/ExtensionProvider2.js +13 -49
- package/lib/components/ExtensionProvider2/ExtensionProvider2.js.map +1 -1
- package/lib/components/ExtensionProvider2/index.js +0 -2
- package/lib/components/ExtensionProvider2/index.js.map +1 -1
- package/lib/components/ExtensionProvider40/ExtensionProvider40.js +12 -46
- package/lib/components/ExtensionProvider40/ExtensionProvider40.js.map +1 -1
- package/lib/components/ExtensionProvider40/index.js +0 -2
- package/lib/components/ExtensionProvider40/index.js.map +1 -1
- package/lib/components/ExtensionProviderBase/ExtensionProviderBase.js +12 -44
- package/lib/components/ExtensionProviderBase/ExtensionProviderBase.js.map +1 -1
- package/lib/components/ExtensionProviderBase/index.js +0 -2
- package/lib/components/ExtensionProviderBase/index.js.map +1 -1
- package/lib/components/RouteChangeListener/RouteChangeListener.js +0 -10
- package/lib/components/RouteChangeListener/RouteChangeListener.js.map +1 -1
- package/lib/components/RouteChangeListener/index.js +0 -4
- package/lib/components/RouteChangeListener/index.js.map +1 -1
- package/lib/components/RouteChangeListener/types.js +1 -1
- package/lib/components/RouteChangeListener/types.js.map +1 -1
- package/lib/components/utils/get_initial_route_entries.js +5 -13
- package/lib/components/utils/get_initial_route_entries.js.map +1 -1
- package/lib/components/utils/setup_close_popovers.js +0 -5
- package/lib/components/utils/setup_close_popovers.js.map +1 -1
- package/lib/esm/components/ErrorMessage/ErrorMessage.js +11 -3
- package/lib/esm/components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/lib/esm/components/ErrorMessage/index.js +27 -2
- package/lib/esm/components/ErrorMessage/index.js.map +1 -1
- package/lib/esm/components/ErrorMessage/types.js.map +1 -1
- package/lib/esm/components/ExtensionConnector/ExtensionConnector.js +45 -57
- package/lib/esm/components/ExtensionConnector/ExtensionConnector.js.map +1 -1
- package/lib/esm/components/ExtensionConnector/index.js +27 -2
- package/lib/esm/components/ExtensionConnector/index.js.map +1 -1
- package/lib/esm/components/ExtensionConnector/types.js.map +1 -1
- package/lib/esm/components/ExtensionProvider/ExtensionProvider.js +36 -50
- package/lib/esm/components/ExtensionProvider/ExtensionProvider.js.map +1 -1
- package/lib/esm/components/ExtensionProvider/index.js +27 -2
- package/lib/esm/components/ExtensionProvider/index.js.map +1 -1
- package/lib/esm/components/ExtensionProvider/types.js.map +1 -1
- package/lib/esm/components/ExtensionProvider2/ExtensionProvider2.js +34 -50
- package/lib/esm/components/ExtensionProvider2/ExtensionProvider2.js.map +1 -1
- package/lib/esm/components/ExtensionProvider2/index.js +16 -1
- package/lib/esm/components/ExtensionProvider2/index.js.map +1 -1
- package/lib/esm/components/ExtensionProvider40/ExtensionProvider40.js +33 -47
- package/lib/esm/components/ExtensionProvider40/ExtensionProvider40.js.map +1 -1
- package/lib/esm/components/ExtensionProvider40/index.js +16 -1
- package/lib/esm/components/ExtensionProvider40/index.js.map +1 -1
- package/lib/esm/components/ExtensionProviderBase/ExtensionProviderBase.js +29 -43
- package/lib/esm/components/ExtensionProviderBase/ExtensionProviderBase.js.map +1 -1
- package/lib/esm/components/ExtensionProviderBase/index.js +16 -1
- package/lib/esm/components/ExtensionProviderBase/index.js.map +1 -1
- package/lib/esm/components/RouteChangeListener/RouteChangeListener.js +20 -12
- package/lib/esm/components/RouteChangeListener/RouteChangeListener.js.map +1 -1
- package/lib/esm/components/RouteChangeListener/index.js +27 -2
- package/lib/esm/components/RouteChangeListener/index.js.map +1 -1
- package/lib/esm/components/RouteChangeListener/types.js.map +1 -1
- package/lib/esm/components/utils/get_initial_route_entries.js +15 -9
- package/lib/esm/components/utils/get_initial_route_entries.js.map +1 -1
- package/lib/esm/components/utils/setup_close_popovers.js +8 -4
- package/lib/esm/components/utils/setup_close_popovers.js.map +1 -1
- package/lib/esm/index.js +115 -10
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/sdk/core_sdk.js +13 -4
- package/lib/esm/sdk/core_sdk.js.map +1 -1
- package/lib/esm/sdk/core_sdk2.js +11 -7
- package/lib/esm/sdk/core_sdk2.js.map +1 -1
- package/lib/esm/sdk/core_sdk_31.js +12 -6
- package/lib/esm/sdk/core_sdk_31.js.map +1 -1
- package/lib/esm/sdk/core_sdk_40.js +12 -6
- package/lib/esm/sdk/core_sdk_40.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -22
- package/lib/index.js.map +1 -1
- package/lib/sdk/core_sdk.js +1 -3
- package/lib/sdk/core_sdk.js.map +1 -1
- package/lib/sdk/core_sdk2.js +1 -7
- package/lib/sdk/core_sdk2.js.map +1 -1
- package/lib/sdk/core_sdk_31.js +1 -10
- package/lib/sdk/core_sdk_31.js.map +1 -1
- package/lib/sdk/core_sdk_40.js +1 -10
- package/lib/sdk/core_sdk_40.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"RouteChangeListener.js","names":["RouteChangeListener","onPathnameChange","onRouteChange","extensionHost","hostRoute","hostRouteState","history","useHistory","location","useLocation","useEffect","pathname","search","clone","state","clientRouteChanged","push"],"sources":["../../../../src/components/RouteChangeListener/RouteChangeListener.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect } from 'react'\nimport { useLocation, useHistory } from 'react-router-dom'\nimport type { ExtensionHostApi } from '@looker/extension-sdk'\nimport clone from 'lodash/clone'\nimport type { RouteChangeListenerProps } from './types'\n\nexport const RouteChangeListener: React.FC<RouteChangeListenerProps> = ({\n onPathnameChange,\n onRouteChange,\n extensionHost,\n hostRoute,\n hostRouteState,\n}) => {\n const history = useHistory()\n const location = useLocation()\n\n useEffect(() => {\n if (onPathnameChange) {\n onPathnameChange(location.pathname)\n }\n if (onRouteChange) {\n onRouteChange(location.pathname + location.search, clone(location.state))\n }\n ;(extensionHost as ExtensionHostApi).clientRouteChanged(\n location.pathname + location.search,\n location.state\n )\n }, [location])\n\n useEffect(() => {\n if (hostRoute) {\n history.push(hostRoute, hostRouteState)\n }\n }, [hostRoute])\n return <></>\n}\n"],"mappings":";;;;;;AA0BA;AACA;AAEA;AAAgC;AAAA;AAAA;AAGzB,IAAMA,mBAAuD,GAAG,QAMjE;EAAA,IANkE;IACtEC,gBAAgB;IAChBC,aAAa;IACbC,aAAa;IACbC,SAAS;IACTC;EACF,CAAC;EACC,IAAMC,OAAO,GAAG,IAAAC,0BAAU,GAAE;EAC5B,IAAMC,QAAQ,GAAG,IAAAC,2BAAW,GAAE;EAE9B,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIT,gBAAgB,EAAE;MACpBA,gBAAgB,CAACO,QAAQ,CAACG,QAAQ,CAAC;IACrC;IACA,IAAIT,aAAa,EAAE;MACjBA,aAAa,CAACM,QAAQ,CAACG,QAAQ,GAAGH,QAAQ,CAACI,MAAM,EAAE,IAAAC,cAAK,EAACL,QAAQ,CAACM,KAAK,CAAC,CAAC;IAC3E;IACA;IAAEX,aAAa,CAAsBY,kBAAkB,CACrDP,QAAQ,CAACG,QAAQ,GAAGH,QAAQ,CAACI,MAAM,EACnCJ,QAAQ,CAACM,KAAK,CACf;EACH,CAAC,EAAE,CAACN,QAAQ,CAAC,CAAC;EAEd,IAAAE,gBAAS,EAAC,MAAM;IACd,IAAIN,SAAS,EAAE;MACbE,OAAO,CAACU,IAAI,CAACZ,SAAS,EAAEC,cAAc,CAAC;IACzC;EACF,CAAC,EAAE,CAACD,SAAS,CAAC,CAAC;EACf,OAAO,2DAAK;AACd,CAAC;AAAA"}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _types = require("./types");
|
|
7
|
+
Object.keys(_types).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _types[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _RouteChangeListener = require("./RouteChangeListener");
|
|
18
|
+
Object.keys(_RouteChangeListener).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _RouteChangeListener[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _RouteChangeListener[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
3
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/RouteChangeListener/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './types'\nexport * from './RouteChangeListener'\n"],"mappings":";;;;;AA0BA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/components/RouteChangeListener/types.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ExtensionSDK } from '@looker/extension-sdk'\n\nexport interface RouteChangeListenerProps {\n onPathnameChange?: (pathname: string) => void\n onRouteChange?: (route: string, routeState?: any) => void\n extensionHost?: ExtensionSDK\n hostRoute?: string\n hostRouteState?: any\n}\n"],"mappings":""}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getInitialRouteEntries = void 0;
|
|
7
|
+
var H = _interopRequireWildcard(require("history"));
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
var getInitialRouteEntries = initialRouteData => {
|
|
9
16
|
var initialEntries;
|
|
10
|
-
|
|
11
17
|
if (initialRouteData) {
|
|
12
18
|
var {
|
|
13
19
|
route,
|
|
@@ -17,7 +23,7 @@ export var getInitialRouteEntries = initialRouteData => {
|
|
|
17
23
|
state: routeState
|
|
18
24
|
})];
|
|
19
25
|
}
|
|
20
|
-
|
|
21
26
|
return initialEntries;
|
|
22
27
|
};
|
|
28
|
+
exports.getInitialRouteEntries = getInitialRouteEntries;
|
|
23
29
|
//# sourceMappingURL=get_initial_route_entries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"get_initial_route_entries.js","names":["getInitialRouteEntries","initialRouteData","initialEntries","route","routeState","H","parsePath","state"],"sources":["../../../../src/components/utils/get_initial_route_entries.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport * as H from 'history'\nimport type { RouteData } from '../ExtensionConnector/types'\n\nexport const getInitialRouteEntries = (initialRouteData?: RouteData) => {\n let initialEntries: H.LocationDescriptor[] | undefined\n if (initialRouteData) {\n const { route, routeState } = initialRouteData\n initialEntries = [{ ...H.parsePath(route), state: routeState }]\n }\n return initialEntries\n}\n"],"mappings":";;;;;;AA0BA;AAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGrB,IAAMA,sBAAsB,GAAIC,gBAA4B,IAAK;EACtE,IAAIC,cAAkD;EACtD,IAAID,gBAAgB,EAAE;IACpB,IAAM;MAAEE,KAAK;MAAEC;IAAW,CAAC,GAAGH,gBAAgB;IAC9CC,cAAc,GAAG,iCAAMG,CAAC,CAACC,SAAS,CAACH,KAAK,CAAC;MAAEI,KAAK,EAAEH;IAAU,GAAG;EACjE;EACA,OAAOF,cAAc;AACvB,CAAC;AAAA"}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setupClosePopoversListener = void 0;
|
|
7
|
+
var setupClosePopoversListener = extensionSDK => {
|
|
2
8
|
var onBodyMousedown = () => {
|
|
3
9
|
if (extensionSDK) {
|
|
4
10
|
extensionSDK.closeHostPopovers();
|
|
5
11
|
}
|
|
6
12
|
};
|
|
7
|
-
|
|
8
13
|
var body = document.querySelector('body');
|
|
9
|
-
|
|
10
14
|
if (body) {
|
|
11
15
|
body.addEventListener('mousedown', onBodyMousedown);
|
|
12
16
|
}
|
|
13
|
-
|
|
14
17
|
return () => {
|
|
15
18
|
if (body) {
|
|
16
19
|
body.removeEventListener('mousedown', onBodyMousedown);
|
|
17
20
|
}
|
|
18
21
|
};
|
|
19
22
|
};
|
|
23
|
+
exports.setupClosePopoversListener = setupClosePopoversListener;
|
|
20
24
|
//# sourceMappingURL=setup_close_popovers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"setup_close_popovers.js","names":["setupClosePopoversListener","extensionSDK","onBodyMousedown","closeHostPopovers","body","document","querySelector","addEventListener","removeEventListener"],"sources":["../../../../src/components/utils/setup_close_popovers.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ExtensionSDK } from '@looker/extension-sdk'\n\nexport const setupClosePopoversListener = (extensionSDK?: ExtensionSDK) => {\n const onBodyMousedown = () => {\n if (extensionSDK) {\n extensionSDK.closeHostPopovers()\n }\n }\n const body: HTMLBodyElement | undefined | null =\n document.querySelector('body')\n if (body) {\n body.addEventListener('mousedown', onBodyMousedown)\n }\n return () => {\n if (body) {\n body.removeEventListener('mousedown', onBodyMousedown)\n }\n }\n}\n"],"mappings":";;;;;;AA4BO,IAAMA,0BAA0B,GAAIC,YAA2B,IAAK;EACzE,IAAMC,eAAe,GAAG,MAAM;IAC5B,IAAID,YAAY,EAAE;MAChBA,YAAY,CAACE,iBAAiB,EAAE;IAClC;EACF,CAAC;EACD,IAAMC,IAAwC,GAC5CC,QAAQ,CAACC,aAAa,CAAC,MAAM,CAAC;EAChC,IAAIF,IAAI,EAAE;IACRA,IAAI,CAACG,gBAAgB,CAAC,WAAW,EAAEL,eAAe,CAAC;EACrD;EACA,OAAO,MAAM;IACX,IAAIE,IAAI,EAAE;MACRA,IAAI,CAACI,mBAAmB,CAAC,WAAW,EAAEN,eAAe,CAAC;IACxD;EACF,CAAC;AACH,CAAC;AAAA"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,11 +1,116 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ExtensionProvider = require("./components/ExtensionProvider/ExtensionProvider");
|
|
7
|
+
Object.keys(_ExtensionProvider).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ExtensionProvider[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _ExtensionProvider[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _types = require("./components/ExtensionProvider/types");
|
|
18
|
+
Object.keys(_types).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _types[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _types[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _ExtensionProvider2 = require("./components/ExtensionProvider2/ExtensionProvider2");
|
|
29
|
+
Object.keys(_ExtensionProvider2).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _ExtensionProvider2[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _ExtensionProvider2[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _ExtensionProviderBase = require("./components/ExtensionProviderBase/ExtensionProviderBase");
|
|
40
|
+
Object.keys(_ExtensionProviderBase).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _ExtensionProviderBase[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _ExtensionProviderBase[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _ExtensionProvider3 = require("./components/ExtensionProvider40/ExtensionProvider40");
|
|
51
|
+
Object.keys(_ExtensionProvider3).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _ExtensionProvider3[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _ExtensionProvider3[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _types2 = require("./components/ExtensionConnector/types");
|
|
62
|
+
Object.keys(_types2).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _types2[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function get() {
|
|
68
|
+
return _types2[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _core_sdk_ = require("./sdk/core_sdk_31");
|
|
73
|
+
Object.keys(_core_sdk_).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _core_sdk_[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function get() {
|
|
79
|
+
return _core_sdk_[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _core_sdk_2 = require("./sdk/core_sdk_40");
|
|
84
|
+
Object.keys(_core_sdk_2).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _core_sdk_2[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function get() {
|
|
90
|
+
return _core_sdk_2[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
var _core_sdk = require("./sdk/core_sdk2");
|
|
95
|
+
Object.keys(_core_sdk).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _core_sdk[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _core_sdk[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
var _core_sdk2 = require("./sdk/core_sdk");
|
|
106
|
+
Object.keys(_core_sdk2).forEach(function (key) {
|
|
107
|
+
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _core_sdk2[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function get() {
|
|
112
|
+
return _core_sdk2[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
11
116
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './components/ExtensionProvider/ExtensionProvider'\nexport * from './components/ExtensionProvider/types'\nexport * from './components/ExtensionProvider2/ExtensionProvider2'\nexport * from './components/ExtensionProviderBase/ExtensionProviderBase'\nexport * from './components/ExtensionProvider40/ExtensionProvider40'\nexport * from './components/ExtensionConnector/types'\nexport * from './sdk/core_sdk_31'\nexport * from './sdk/core_sdk_40'\nexport * from './sdk/core_sdk2'\nexport * from './sdk/core_sdk'\n"],"mappings":";;;;;AA0BA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/lib/esm/sdk/core_sdk.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.unregisterCoreSDK = exports.registerCoreSDK = exports.getCoreSDK = void 0;
|
|
7
|
+
var _core_sdk_ = require("./core_sdk_31");
|
|
8
|
+
var registerCoreSDK = _core_sdk_.registerCore31SDK;
|
|
9
|
+
exports.registerCoreSDK = registerCoreSDK;
|
|
10
|
+
var unregisterCoreSDK = _core_sdk_.unregisterCore31SDK;
|
|
11
|
+
exports.unregisterCoreSDK = unregisterCoreSDK;
|
|
12
|
+
var getCoreSDK = _core_sdk_.getCore31SDK;
|
|
13
|
+
exports.getCoreSDK = getCoreSDK;
|
|
5
14
|
//# sourceMappingURL=core_sdk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"core_sdk.js","names":["registerCoreSDK","registerCore31SDK","unregisterCoreSDK","unregisterCore31SDK","getCoreSDK","getCore31SDK"],"sources":["../../../src/sdk/core_sdk.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport {\n registerCore31SDK,\n unregisterCore31SDK,\n getCore31SDK,\n} from './core_sdk_31'\n\n/**\n * Register the core SDK. The ExtensionProvider will automatically\n * call this when connection with the host succeeds. An extension using\n * the ExtensionProvider should never call this.\n * @param coreSDK core sdk\n * @deprecated use registerCore31SDK or registerCore40SDK instead\n */\nexport const registerCoreSDK = registerCore31SDK\n\n/**\n * Unregister the core SDK. The ExtensionProvider will automatically\n * call this when it is unloaded. An extension using\n * the ExtensionProvider should never call this.\n * @deprecated use unregisterCore31SDK or unregisterCore40SDK instead\n */\nexport const unregisterCoreSDK = unregisterCore31SDK\n\n/**\n * Global access to the coreSDK. An error will be thrown if accessed prematurely.\n * @deprecated use getCore31SDK or getCore40SDK instead\n */\nexport const getCoreSDK = getCore31SDK\n"],"mappings":";;;;;;AA0BA;AAaO,IAAMA,eAAe,GAAGC,4BAAiB;AAAA;AAQzC,IAAMC,iBAAiB,GAAGC,8BAAmB;AAAA;AAM7C,IAAMC,UAAU,GAAGC,uBAAY;AAAA"}
|
package/lib/esm/sdk/core_sdk2.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCoreSDK2 = getCoreSDK2;
|
|
7
|
+
exports.registerCoreSDK2 = registerCoreSDK2;
|
|
8
|
+
exports.unregisterCoreSDK2 = unregisterCoreSDK2;
|
|
9
|
+
var registered = false;
|
|
3
10
|
var _coreSdk;
|
|
4
|
-
|
|
5
|
-
export function registerCoreSDK2(coreSdk) {
|
|
11
|
+
function registerCoreSDK2(coreSdk) {
|
|
6
12
|
if (_coreSdk) {
|
|
7
13
|
throw new Error('coreSDK can only be registered once');
|
|
8
14
|
}
|
|
9
|
-
|
|
10
15
|
_coreSdk = coreSdk;
|
|
11
16
|
registered = true;
|
|
12
17
|
}
|
|
13
|
-
|
|
18
|
+
function unregisterCoreSDK2() {
|
|
14
19
|
registered = false;
|
|
15
20
|
_coreSdk = undefined;
|
|
16
21
|
}
|
|
17
|
-
|
|
22
|
+
function getCoreSDK2() {
|
|
18
23
|
if (!registered) {
|
|
19
24
|
throw new Error('Looker host connection not established');
|
|
20
25
|
}
|
|
21
|
-
|
|
22
26
|
return _coreSdk;
|
|
23
27
|
}
|
|
24
28
|
//# sourceMappingURL=core_sdk2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"core_sdk2.js","names":["registered","_coreSdk","registerCoreSDK2","coreSdk","Error","unregisterCoreSDK2","undefined","getCoreSDK2"],"sources":["../../../src/sdk/core_sdk2.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nlet registered = false\nlet _coreSdk: any\n\n/**\n * Register the SDK. The ExtensionProvider will automatically\n * call this when connection is first requested.\n * @param coreSDK core sdk\n */\nexport function registerCoreSDK2(coreSdk: any) {\n if (_coreSdk) {\n throw new Error('coreSDK can only be registered once')\n }\n _coreSdk = coreSdk\n registered = true\n}\n\n/**\n * Unregister theSDK. The ExtensionProvider will automatically\n * call this when it is unloaded. An extension using\n * the ExtensionProvider should never call this.\n */\nexport function unregisterCoreSDK2() {\n registered = false\n _coreSdk = undefined\n}\n\n/**\n * Global access to the coreSDK. An error will be thrown if accessed prematurely.\n * Note that provider does not have to provide a LookerSdk type. In this case\n * this method will return undefined.\n */\nexport function getCoreSDK2<T>(): T {\n if (!registered) {\n throw new Error('Looker host connection not established')\n }\n return _coreSdk\n}\n"],"mappings":";;;;;;;;AA0BA,IAAIA,UAAU,GAAG,KAAK;AACtB,IAAIC,QAAa;AAOV,SAASC,gBAAgB,CAACC,OAAY,EAAE;EAC7C,IAAIF,QAAQ,EAAE;IACZ,MAAM,IAAIG,KAAK,CAAC,qCAAqC,CAAC;EACxD;EACAH,QAAQ,GAAGE,OAAO;EAClBH,UAAU,GAAG,IAAI;AACnB;AAOO,SAASK,kBAAkB,GAAG;EACnCL,UAAU,GAAG,KAAK;EAClBC,QAAQ,GAAGK,SAAS;AACtB;AAOO,SAASC,WAAW,GAAS;EAClC,IAAI,CAACP,UAAU,EAAE;IACf,MAAM,IAAII,KAAK,CAAC,wCAAwC,CAAC;EAC3D;EACA,OAAOH,QAAQ;AACjB"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.unregisterCore31SDK = exports.registerCore31SDK = exports.getCore31SDK = void 0;
|
|
7
|
+
var _core31SDK;
|
|
8
|
+
var registerCore31SDK = coreSDK => {
|
|
4
9
|
if (_core31SDK) {
|
|
5
10
|
throw new Error('coreSDK can only be registered once');
|
|
6
11
|
}
|
|
7
|
-
|
|
8
12
|
_core31SDK = coreSDK;
|
|
9
13
|
};
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
exports.registerCore31SDK = registerCore31SDK;
|
|
15
|
+
var unregisterCore31SDK = () => _core31SDK = undefined;
|
|
16
|
+
exports.unregisterCore31SDK = unregisterCore31SDK;
|
|
17
|
+
var getCore31SDK = () => {
|
|
12
18
|
if (!_core31SDK) {
|
|
13
19
|
throw new Error('Looker host connection not established');
|
|
14
20
|
}
|
|
15
|
-
|
|
16
21
|
return _core31SDK;
|
|
17
22
|
};
|
|
23
|
+
exports.getCore31SDK = getCore31SDK;
|
|
18
24
|
//# sourceMappingURL=core_sdk_31.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"core_sdk_31.js","names":["_core31SDK","registerCore31SDK","coreSDK","Error","unregisterCore31SDK","undefined","getCore31SDK"],"sources":["../../../src/sdk/core_sdk_31.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { Looker31SDK } from '@looker/sdk'\n\nlet _core31SDK: Looker31SDK | undefined\n\n/**\n * Register the core 3.1 SDK. The ExtensionProvider will automatically\n * call this when connection with the host suceeds. An extension using\n * the ExtensionProvider should never call this.\n * @param coreSDK core sdk\n */\nexport const registerCore31SDK = (coreSDK: Looker31SDK) => {\n if (_core31SDK) {\n throw new Error('coreSDK can only be registered once')\n }\n _core31SDK = coreSDK\n}\n\n/**\n * Unregister the core 3.1 SDK. The ExtensionProvider will automatically\n * call this when it is unloaded. An extension using\n * the ExtensionProvider should never call this.\n */\nexport const unregisterCore31SDK = () => (_core31SDK = undefined)\n\n/**\n * Global access to the coreSDK. An error will be thrown if accessed prematurely.\n */\nexport const getCore31SDK = () => {\n if (!_core31SDK) {\n throw new Error('Looker host connection not established')\n }\n return _core31SDK\n}\n"],"mappings":";;;;;;AA4BA,IAAIA,UAAmC;AAQhC,IAAMC,iBAAiB,GAAIC,OAAoB,IAAK;EACzD,IAAIF,UAAU,EAAE;IACd,MAAM,IAAIG,KAAK,CAAC,qCAAqC,CAAC;EACxD;EACAH,UAAU,GAAGE,OAAO;AACtB,CAAC;AAAA;AAOM,IAAME,mBAAmB,GAAG,MAAOJ,UAAU,GAAGK,SAAU;AAAA;AAK1D,IAAMC,YAAY,GAAG,MAAM;EAChC,IAAI,CAACN,UAAU,EAAE;IACf,MAAM,IAAIG,KAAK,CAAC,wCAAwC,CAAC;EAC3D;EACA,OAAOH,UAAU;AACnB,CAAC;AAAA"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.unregisterCore40SDK = exports.registerCore40SDK = exports.getCore40SDK = void 0;
|
|
7
|
+
var _core40SDK;
|
|
8
|
+
var registerCore40SDK = coreSDK => {
|
|
4
9
|
if (_core40SDK) {
|
|
5
10
|
throw new Error('coreSDK can only be registered onces');
|
|
6
11
|
}
|
|
7
|
-
|
|
8
12
|
_core40SDK = coreSDK;
|
|
9
13
|
};
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
exports.registerCore40SDK = registerCore40SDK;
|
|
15
|
+
var unregisterCore40SDK = () => _core40SDK = undefined;
|
|
16
|
+
exports.unregisterCore40SDK = unregisterCore40SDK;
|
|
17
|
+
var getCore40SDK = () => {
|
|
12
18
|
if (!_core40SDK) {
|
|
13
19
|
throw new Error('Looker host connection not established');
|
|
14
20
|
}
|
|
15
|
-
|
|
16
21
|
return _core40SDK;
|
|
17
22
|
};
|
|
23
|
+
exports.getCore40SDK = getCore40SDK;
|
|
18
24
|
//# sourceMappingURL=core_sdk_40.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"core_sdk_40.js","names":["_core40SDK","registerCore40SDK","coreSDK","Error","unregisterCore40SDK","undefined","getCore40SDK"],"sources":["../../../src/sdk/core_sdk_40.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { Looker40SDK } from '@looker/sdk'\n\nlet _core40SDK: Looker40SDK | undefined\n\n/**\n * Register the core 4.0 SDK. The ExtensionProvider will automatically\n * call this when connection with the host suceeds. An extension using\n * the ExtensionProvider should never call this.\n * @param coreSDK core sdk\n */\nexport const registerCore40SDK = (coreSDK: Looker40SDK) => {\n if (_core40SDK) {\n throw new Error('coreSDK can only be registered onces')\n }\n _core40SDK = coreSDK\n}\n\n/**\n * Unregister the core 4.0 SDK. The ExtensionProvider will automatically\n * call this when it is unloaded. An extension using\n * the ExtensionProvider should never call this.\n */\nexport const unregisterCore40SDK = () => (_core40SDK = undefined)\n\n/**\n * Global access to the core40SDK. An error will be thrown if accessed prematurely.\n */\nexport const getCore40SDK = () => {\n if (!_core40SDK) {\n throw new Error('Looker host connection not established')\n }\n return _core40SDK\n}\n"],"mappings":";;;;;;AA4BA,IAAIA,UAAmC;AAQhC,IAAMC,iBAAiB,GAAIC,OAAoB,IAAK;EACzD,IAAIF,UAAU,EAAE;IACd,MAAM,IAAIG,KAAK,CAAC,sCAAsC,CAAC;EACzD;EACAH,UAAU,GAAGE,OAAO;AACtB,CAAC;AAAA;AAOM,IAAME,mBAAmB,GAAG,MAAOJ,UAAU,GAAGK,SAAU;AAAA;AAK1D,IAAMC,YAAY,GAAG,MAAM;EAChC,IAAI,CAACN,UAAU,EAAE;IACf,MAAM,IAAIG,KAAK,CAAC,wCAAwC,CAAC;EAC3D;EACA,OAAOH,UAAU;AACnB,CAAC;AAAA"}
|
package/lib/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export * from './components/ExtensionProvider40/ExtensionProvider40';
|
|
|
6
6
|
export * from './components/ExtensionConnector/types';
|
|
7
7
|
export * from './sdk/core_sdk_31';
|
|
8
8
|
export * from './sdk/core_sdk_40';
|
|
9
|
-
export * from './sdk/core_sdk';
|
|
10
9
|
export * from './sdk/core_sdk2';
|
|
10
|
+
export * from './sdk/core_sdk';
|
package/lib/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _ExtensionProvider = require("./components/ExtensionProvider/ExtensionProvider");
|
|
8
|
-
|
|
9
7
|
Object.keys(_ExtensionProvider).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _ExtensionProvider[key]) return;
|
|
@@ -16,9 +14,7 @@ Object.keys(_ExtensionProvider).forEach(function (key) {
|
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
var _types = require("./components/ExtensionProvider/types");
|
|
21
|
-
|
|
22
18
|
Object.keys(_types).forEach(function (key) {
|
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
|
24
20
|
if (key in exports && exports[key] === _types[key]) return;
|
|
@@ -29,9 +25,7 @@ Object.keys(_types).forEach(function (key) {
|
|
|
29
25
|
}
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
|
-
|
|
33
28
|
var _ExtensionProvider2 = require("./components/ExtensionProvider2/ExtensionProvider2");
|
|
34
|
-
|
|
35
29
|
Object.keys(_ExtensionProvider2).forEach(function (key) {
|
|
36
30
|
if (key === "default" || key === "__esModule") return;
|
|
37
31
|
if (key in exports && exports[key] === _ExtensionProvider2[key]) return;
|
|
@@ -42,9 +36,7 @@ Object.keys(_ExtensionProvider2).forEach(function (key) {
|
|
|
42
36
|
}
|
|
43
37
|
});
|
|
44
38
|
});
|
|
45
|
-
|
|
46
39
|
var _ExtensionProviderBase = require("./components/ExtensionProviderBase/ExtensionProviderBase");
|
|
47
|
-
|
|
48
40
|
Object.keys(_ExtensionProviderBase).forEach(function (key) {
|
|
49
41
|
if (key === "default" || key === "__esModule") return;
|
|
50
42
|
if (key in exports && exports[key] === _ExtensionProviderBase[key]) return;
|
|
@@ -55,9 +47,7 @@ Object.keys(_ExtensionProviderBase).forEach(function (key) {
|
|
|
55
47
|
}
|
|
56
48
|
});
|
|
57
49
|
});
|
|
58
|
-
|
|
59
50
|
var _ExtensionProvider3 = require("./components/ExtensionProvider40/ExtensionProvider40");
|
|
60
|
-
|
|
61
51
|
Object.keys(_ExtensionProvider3).forEach(function (key) {
|
|
62
52
|
if (key === "default" || key === "__esModule") return;
|
|
63
53
|
if (key in exports && exports[key] === _ExtensionProvider3[key]) return;
|
|
@@ -68,9 +58,7 @@ Object.keys(_ExtensionProvider3).forEach(function (key) {
|
|
|
68
58
|
}
|
|
69
59
|
});
|
|
70
60
|
});
|
|
71
|
-
|
|
72
61
|
var _types2 = require("./components/ExtensionConnector/types");
|
|
73
|
-
|
|
74
62
|
Object.keys(_types2).forEach(function (key) {
|
|
75
63
|
if (key === "default" || key === "__esModule") return;
|
|
76
64
|
if (key in exports && exports[key] === _types2[key]) return;
|
|
@@ -81,9 +69,7 @@ Object.keys(_types2).forEach(function (key) {
|
|
|
81
69
|
}
|
|
82
70
|
});
|
|
83
71
|
});
|
|
84
|
-
|
|
85
72
|
var _core_sdk_ = require("./sdk/core_sdk_31");
|
|
86
|
-
|
|
87
73
|
Object.keys(_core_sdk_).forEach(function (key) {
|
|
88
74
|
if (key === "default" || key === "__esModule") return;
|
|
89
75
|
if (key in exports && exports[key] === _core_sdk_[key]) return;
|
|
@@ -94,9 +80,7 @@ Object.keys(_core_sdk_).forEach(function (key) {
|
|
|
94
80
|
}
|
|
95
81
|
});
|
|
96
82
|
});
|
|
97
|
-
|
|
98
83
|
var _core_sdk_2 = require("./sdk/core_sdk_40");
|
|
99
|
-
|
|
100
84
|
Object.keys(_core_sdk_2).forEach(function (key) {
|
|
101
85
|
if (key === "default" || key === "__esModule") return;
|
|
102
86
|
if (key in exports && exports[key] === _core_sdk_2[key]) return;
|
|
@@ -107,9 +91,7 @@ Object.keys(_core_sdk_2).forEach(function (key) {
|
|
|
107
91
|
}
|
|
108
92
|
});
|
|
109
93
|
});
|
|
110
|
-
|
|
111
|
-
var _core_sdk = require("./sdk/core_sdk");
|
|
112
|
-
|
|
94
|
+
var _core_sdk = require("./sdk/core_sdk2");
|
|
113
95
|
Object.keys(_core_sdk).forEach(function (key) {
|
|
114
96
|
if (key === "default" || key === "__esModule") return;
|
|
115
97
|
if (key in exports && exports[key] === _core_sdk[key]) return;
|
|
@@ -120,9 +102,7 @@ Object.keys(_core_sdk).forEach(function (key) {
|
|
|
120
102
|
}
|
|
121
103
|
});
|
|
122
104
|
});
|
|
123
|
-
|
|
124
|
-
var _core_sdk2 = require("./sdk/core_sdk2");
|
|
125
|
-
|
|
105
|
+
var _core_sdk2 = require("./sdk/core_sdk");
|
|
126
106
|
Object.keys(_core_sdk2).forEach(function (key) {
|
|
127
107
|
if (key === "default" || key === "__esModule") return;
|
|
128
108
|
if (key in exports && exports[key] === _core_sdk2[key]) return;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './components/ExtensionProvider/ExtensionProvider'\nexport * from './components/ExtensionProvider/types'\nexport * from './components/ExtensionProvider2/ExtensionProvider2'\nexport * from './components/ExtensionProviderBase/ExtensionProviderBase'\nexport * from './components/ExtensionProvider40/ExtensionProvider40'\nexport * from './components/ExtensionConnector/types'\nexport * from './sdk/core_sdk_31'\nexport * from './sdk/core_sdk_40'\nexport * from './sdk/core_sdk2'\nexport * from './sdk/core_sdk'\n"],"mappings":";;;;;AA0BA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|