@looker/extension-utils 0.1.23 → 0.1.25
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 +24 -0
- package/lib/APIErrorDisplay/APIErrorContent.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDetails.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDialog.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
- package/lib/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
- package/lib/APIErrorDisplay/index.js.map +1 -1
- package/lib/APIErrorDisplay/utils.js.map +1 -1
- package/lib/ExtMarkdown.js.map +1 -1
- package/lib/OAuthForm/index.d.ts +1 -0
- package/lib/OAuthForm/index.js +17 -0
- package/lib/OAuthForm/index.js.map +1 -0
- package/lib/{esm/OAuthConfigForm/Collapser → OAuthForm/src/components}/CollapserCard.js +1 -1
- package/lib/OAuthForm/src/components/CollapserCard.js.map +1 -0
- package/lib/{OAuthConfigForm → OAuthForm/src/components}/ConfigHeading.js +1 -1
- package/lib/OAuthForm/src/components/ConfigHeading.js.map +1 -0
- package/lib/{OAuthConfigForm/OAuthConfigForm.d.ts → OAuthForm/src/components/OAuthForm.d.ts} +1 -1
- package/lib/{OAuthConfigForm/OAuthConfigForm.js → OAuthForm/src/components/OAuthForm.js} +70 -60
- package/lib/OAuthForm/src/components/OAuthForm.js.map +1 -0
- package/lib/OAuthForm/src/components/index.d.ts +1 -0
- package/lib/OAuthForm/src/components/index.js +13 -0
- package/lib/OAuthForm/src/components/index.js.map +1 -0
- package/lib/OAuthForm/src/index.d.ts +2 -0
- package/lib/OAuthForm/src/index.js +28 -0
- package/lib/OAuthForm/src/index.js.map +1 -0
- package/lib/OAuthForm/src/state/index.d.ts +1 -0
- package/lib/OAuthForm/src/state/index.js +13 -0
- package/lib/OAuthForm/src/state/index.js.map +1 -0
- package/lib/OAuthForm/src/state/slice.d.ts +64 -0
- package/lib/OAuthForm/src/state/slice.js +83 -0
- package/lib/OAuthForm/src/state/slice.js.map +1 -0
- package/lib/OAuthForm/src/utils.js.map +1 -0
- package/lib/OAuthScene.js.map +1 -1
- package/lib/adaptorUtils.js.map +1 -1
- package/lib/authUtils.js.map +1 -1
- package/lib/browserAdaptor.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorContent.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDetails.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDialog.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
- package/lib/esm/APIErrorDisplay/index.js.map +1 -1
- package/lib/esm/APIErrorDisplay/utils.js.map +1 -1
- package/lib/esm/ExtMarkdown.js.map +1 -1
- package/lib/esm/OAuthForm/index.js +17 -0
- package/lib/esm/OAuthForm/index.js.map +1 -0
- package/lib/{OAuthConfigForm/Collapser → esm/OAuthForm/src/components}/CollapserCard.js +1 -1
- package/lib/esm/OAuthForm/src/components/CollapserCard.js.map +1 -0
- package/lib/esm/{OAuthConfigForm → OAuthForm/src/components}/ConfigHeading.js +1 -1
- package/lib/esm/OAuthForm/src/components/ConfigHeading.js.map +1 -0
- package/lib/esm/{OAuthConfigForm/OAuthConfigForm.js → OAuthForm/src/components/OAuthForm.js} +70 -60
- package/lib/esm/OAuthForm/src/components/OAuthForm.js.map +1 -0
- package/lib/esm/OAuthForm/src/components/index.js +13 -0
- package/lib/esm/OAuthForm/src/components/index.js.map +1 -0
- package/lib/esm/OAuthForm/src/index.js +28 -0
- package/lib/esm/OAuthForm/src/index.js.map +1 -0
- package/lib/esm/OAuthForm/src/state/index.js +13 -0
- package/lib/esm/OAuthForm/src/state/index.js.map +1 -0
- package/lib/esm/OAuthForm/src/state/slice.js +83 -0
- package/lib/esm/OAuthForm/src/state/slice.js.map +1 -0
- package/lib/esm/OAuthForm/src/utils.js.map +1 -0
- package/lib/esm/OAuthScene.js.map +1 -1
- package/lib/esm/adaptorUtils.js.map +1 -1
- package/lib/esm/authUtils.js.map +1 -1
- package/lib/esm/browserAdaptor.js.map +1 -1
- package/lib/esm/extensionAdaptor.js.map +1 -1
- package/lib/esm/index.js +4 -4
- package/lib/esm/index.js.map +1 -1
- package/lib/extensionAdaptor.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/package.json +8 -5
- package/lib/OAuthConfigForm/Collapser/CollapserCard.js.map +0 -1
- package/lib/OAuthConfigForm/Collapser/index.d.ts +0 -1
- package/lib/OAuthConfigForm/Collapser/index.js +0 -13
- package/lib/OAuthConfigForm/Collapser/index.js.map +0 -1
- package/lib/OAuthConfigForm/ConfigHeading.js.map +0 -1
- package/lib/OAuthConfigForm/OAuthConfigForm.js.map +0 -1
- package/lib/OAuthConfigForm/index.d.ts +0 -1
- package/lib/OAuthConfigForm/index.js +0 -13
- package/lib/OAuthConfigForm/index.js.map +0 -1
- package/lib/OAuthConfigForm/utils.js.map +0 -1
- package/lib/esm/OAuthConfigForm/Collapser/CollapserCard.js.map +0 -1
- package/lib/esm/OAuthConfigForm/Collapser/index.js +0 -13
- package/lib/esm/OAuthConfigForm/Collapser/index.js.map +0 -1
- package/lib/esm/OAuthConfigForm/ConfigHeading.js.map +0 -1
- package/lib/esm/OAuthConfigForm/OAuthConfigForm.js.map +0 -1
- package/lib/esm/OAuthConfigForm/index.js +0 -13
- package/lib/esm/OAuthConfigForm/index.js.map +0 -1
- package/lib/esm/OAuthConfigForm/utils.js.map +0 -1
- /package/lib/{OAuthConfigForm/Collapser → OAuthForm/src/components}/CollapserCard.d.ts +0 -0
- /package/lib/{OAuthConfigForm → OAuthForm/src/components}/ConfigHeading.d.ts +0 -0
- /package/lib/{OAuthConfigForm → OAuthForm/src}/utils.d.ts +0 -0
- /package/lib/{OAuthConfigForm → OAuthForm/src}/utils.js +0 -0
- /package/lib/esm/{OAuthConfigForm → OAuthForm/src}/utils.js +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _src = require("./src");
|
|
7
|
+
Object.keys(_src).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _src[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _src[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_src","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/OAuthForm/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nexport * from './src'\n"],"mappings":";;;;;AAyBA,IAAAA,IAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,IAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,IAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,IAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -7,7 +7,7 @@ exports.CollapserCard = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _components = require("@looker/components");
|
|
9
9
|
var _material = require("@styled-icons/material");
|
|
10
|
-
var _ConfigHeading = require("
|
|
10
|
+
var _ConfigHeading = require("./ConfigHeading");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
var CollapserCard = _ref => {
|
|
13
13
|
var {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapserCard.js","names":["_react","_interopRequireDefault","require","_components","_material","_ConfigHeading","obj","__esModule","default","CollapserCard","_ref","id","heading","children","defaultOpen","divider","level","value","toggle","useToggle","createElement","Box2","display","flexDirection","Divider","appearance","Accordion2","indicatorPosition","isOpen","toggleOpen","indicatorIcons","close","ArrowRight","open","ArrowDropDown","label","ConfigHeading","as","pb","exports"],"sources":["../../../../../src/OAuthForm/src/components/CollapserCard.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nimport type { FC, ReactElement } from 'react'\nimport React from 'react'\nimport { useToggle, Accordion2, Divider, Box2 } from '@looker/components'\nimport { ArrowRight, ArrowDropDown } from '@styled-icons/material'\nimport { ConfigHeading } from './ConfigHeading'\n\ninterface CollapserCardProps {\n id?: string\n heading: string\n children: ReactElement\n defaultOpen?: boolean\n divider?: boolean\n}\n\n/**\n * Render a collapsable header and children\n */\nexport const CollapserCard: FC<CollapserCardProps> = ({\n id,\n heading,\n children,\n defaultOpen = true,\n divider = true,\n}) => {\n const level = divider ? 'h3' : 'h4'\n const { value, toggle } = useToggle(defaultOpen)\n\n return (\n <Box2 display=\"flex\" flexDirection=\"column\">\n {divider && <Divider appearance=\"light\" />}\n <Accordion2\n id={id}\n indicatorPosition=\"left\"\n isOpen={value}\n toggleOpen={toggle}\n indicatorIcons={{ close: <ArrowRight />, open: <ArrowDropDown /> }}\n label={<ConfigHeading as={level}>{heading}</ConfigHeading>}\n >\n <Box2 pb=\"xlarge\">{children}</Box2>\n </Accordion2>\n </Box2>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,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,OAAA,CAAAY,aAAA,CAACjB,WAAA,CAAAkB,IAAI;IAACiB,EAAE,EAAC;EAAQ,GAAEzB,QAAQ,CAAQ,CACxB,CACR;AAEX,CAAC;AAAA0B,OAAA,CAAA9B,aAAA,GAAAA,aAAA"}
|
|
@@ -18,7 +18,7 @@ var ConfigHeading = (0, _styledComponents.default)(_components.Heading).attrs(_r
|
|
|
18
18
|
};
|
|
19
19
|
}).withConfig({
|
|
20
20
|
displayName: "ConfigHeading",
|
|
21
|
-
componentId: "sc-
|
|
21
|
+
componentId: "sc-1tkgwv3-0"
|
|
22
22
|
})([""]);
|
|
23
23
|
exports.ConfigHeading = ConfigHeading;
|
|
24
24
|
//# sourceMappingURL=ConfigHeading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigHeading.js","names":["_styledComponents","_interopRequireDefault","require","_components","obj","__esModule","default","ConfigHeading","styled","Heading","attrs","_ref","mb","pt","withConfig","displayName","componentId","exports"],"sources":["../../../../../src/OAuthForm/src/components/ConfigHeading.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nimport styled from 'styled-components'\nimport { Heading } from '@looker/components'\nimport type { HeadingProps } from '@looker/components'\n\nexport const ConfigHeading = styled(Heading).attrs(\n ({ mb = 'xsmall', pt = 'xsmall' }: HeadingProps) => ({ mb, pt })\n)``\n"],"mappings":";;;;;;AAyBA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAA4C,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGrC,IAAMG,aAAa,GAAG,IAAAC,yBAAM,EAACC,mBAAO,CAAC,CAACC,KAAK,CAChDC,IAAA;EAAA,IAAC;IAAEC,EAAE,GAAG,QAAQ;IAAEC,EAAE,GAAG;EAAuB,CAAC,GAAAF,IAAA;EAAA,OAAM;IAAEC,EAAE;IAAEC;EAAG,CAAC;AAAA,CAAC,CACjE,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,QAAE;AAAAC,OAAA,CAAAV,aAAA,GAAAA,aAAA"}
|
package/lib/esm/{OAuthConfigForm/OAuthConfigForm.js → OAuthForm/src/components/OAuthForm.js}
RENAMED
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.readyToLogin = exports.
|
|
6
|
+
exports.readyToLogin = exports.OAuthForm = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _components = require("@looker/components");
|
|
9
9
|
var _codeEditor = require("@looker/code-editor");
|
|
10
10
|
var _reactRouterDom = require("react-router-dom");
|
|
11
|
-
var _ = require("
|
|
11
|
+
var _ = require("../../..");
|
|
12
|
+
var _utils = require("../utils");
|
|
13
|
+
var _slice = require("../state/slice");
|
|
14
|
+
var _CollapserCard = require("./CollapserCard");
|
|
12
15
|
var _ConfigHeading = require("./ConfigHeading");
|
|
13
|
-
var _Collapser = require("./Collapser");
|
|
14
|
-
var _utils = require("./utils");
|
|
15
16
|
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); }
|
|
16
17
|
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; }
|
|
17
18
|
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; }
|
|
@@ -27,7 +28,7 @@ var EmptyConfig = {
|
|
|
27
28
|
base_url: '',
|
|
28
29
|
looker_url: ''
|
|
29
30
|
};
|
|
30
|
-
var
|
|
31
|
+
var OAuthForm = _ref => {
|
|
31
32
|
var {
|
|
32
33
|
setHasConfig,
|
|
33
34
|
clientId,
|
|
@@ -36,32 +37,29 @@ var OAuthConfigForm = _ref => {
|
|
|
36
37
|
} = _ref;
|
|
37
38
|
var location = (0, _reactRouterDom.useLocation)();
|
|
38
39
|
var redirect_uri = (0, _.appPath)(location, '/oauth');
|
|
39
|
-
var appConfig = "// client_guid=".concat(clientId, "\n{\n
|
|
40
|
+
var appConfig = "// client_guid=".concat(clientId, "\n {\n \"redirect_uri\": \"").concat(redirect_uri, "\",\n \"display_name\": \"CORS ").concat(clientLabel, "\",\n \"description\": \"Looker ").concat(clientLabel, " using CORS\",\n \"enabled\": true\n }\n ");
|
|
40
41
|
var adaptor = (0, _.getEnvAdaptor)();
|
|
41
42
|
var sdk = adaptor.sdk;
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
var {
|
|
44
|
+
setApiServerUrlAction,
|
|
45
|
+
updateApiServerUrlAction,
|
|
46
|
+
setFetchedUrlAction,
|
|
47
|
+
setWebUrlAction,
|
|
48
|
+
clearFormAction,
|
|
49
|
+
updateMessageBarAction,
|
|
50
|
+
verifyErrorAction,
|
|
51
|
+
saveNewConfigAction
|
|
52
|
+
} = (0, _slice.useOAuthFormActions)();
|
|
53
|
+
var {
|
|
54
|
+
apiServerUrl,
|
|
55
|
+
fetchedUrl,
|
|
56
|
+
webUrl,
|
|
57
|
+
messageBar,
|
|
58
|
+
validationMessages,
|
|
59
|
+
savedConfig
|
|
60
|
+
} = (0, _slice.useOAuthFormState)();
|
|
59
61
|
var isConfigured = () => {
|
|
60
|
-
return apiServerUrl ===
|
|
61
|
-
};
|
|
62
|
-
var fetchError = message => {
|
|
63
|
-
setWebUrl('');
|
|
64
|
-
updateMessageBar('critical', message);
|
|
62
|
+
return apiServerUrl === savedConfig.base_url && webUrl === savedConfig.looker_url && apiServerUrl !== '' && webUrl !== '';
|
|
65
63
|
};
|
|
66
64
|
var saveConfig = (baseUrl, webUrl) => {
|
|
67
65
|
var data = {
|
|
@@ -71,24 +69,29 @@ var OAuthConfigForm = _ref => {
|
|
|
71
69
|
redirect_uri
|
|
72
70
|
};
|
|
73
71
|
localStorage.setItem(configKey, JSON.stringify(data));
|
|
72
|
+
saveNewConfigAction(data);
|
|
74
73
|
if (setHasConfig) setHasConfig(true);
|
|
75
|
-
setSaved(data);
|
|
76
|
-
updateMessageBar('positive', "Saved ".concat(webUrl, " as OAuth server"));
|
|
77
74
|
};
|
|
78
75
|
var verifyUrl = function () {
|
|
79
76
|
var _ref2 = _asyncToGenerator(function* () {
|
|
80
|
-
|
|
77
|
+
updateMessageBarAction({
|
|
78
|
+
intent: messageBar.intent,
|
|
79
|
+
text: ''
|
|
80
|
+
});
|
|
81
81
|
var versionsUrl = "".concat(apiServerUrl, "/versions");
|
|
82
82
|
try {
|
|
83
|
-
|
|
83
|
+
setFetchedUrlAction(apiServerUrl);
|
|
84
84
|
var versions = yield (0, _utils.getVersions)(versionsUrl);
|
|
85
85
|
if (versions) {
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
updateMessageBarAction({
|
|
87
|
+
intent: 'positive',
|
|
88
|
+
text: "Configuration is valid"
|
|
89
|
+
});
|
|
90
|
+
setWebUrlAction(versions.web_server_url);
|
|
88
91
|
}
|
|
89
92
|
return versions;
|
|
90
93
|
} catch (e) {
|
|
91
|
-
|
|
94
|
+
verifyErrorAction(e.message);
|
|
92
95
|
return undefined;
|
|
93
96
|
}
|
|
94
97
|
});
|
|
@@ -113,15 +116,13 @@ var OAuthConfigForm = _ref => {
|
|
|
113
116
|
var handleClear = function () {
|
|
114
117
|
var _ref4 = _asyncToGenerator(function* (_e) {
|
|
115
118
|
localStorage.removeItem(configKey);
|
|
116
|
-
|
|
117
|
-
setFetchedUrl('');
|
|
118
|
-
setWebUrl('');
|
|
119
|
-
setMessageBarText('');
|
|
120
|
-
setMessageBarIntent('critical');
|
|
121
|
-
setSaved(EmptyConfig);
|
|
119
|
+
clearFormAction();
|
|
122
120
|
if (setHasConfig) setHasConfig(false);
|
|
123
121
|
if (isAuthenticated()) {
|
|
124
|
-
|
|
122
|
+
updateMessageBarAction({
|
|
123
|
+
intent: 'warn',
|
|
124
|
+
text: "Please reload the browser page to log out"
|
|
125
|
+
});
|
|
125
126
|
}
|
|
126
127
|
});
|
|
127
128
|
return function handleClear(_x) {
|
|
@@ -131,20 +132,23 @@ var OAuthConfigForm = _ref => {
|
|
|
131
132
|
var handleUrlChange = event => {
|
|
132
133
|
var name = event.currentTarget.name;
|
|
133
134
|
var value = event.currentTarget.value;
|
|
135
|
+
var newApiServerUrl = value;
|
|
134
136
|
var newValidationMessages = _objectSpread({}, validationMessages);
|
|
135
|
-
setApiServerUrl(value);
|
|
136
|
-
setWebUrl('');
|
|
137
137
|
var url = (0, _utils.validateUrl)(value);
|
|
138
138
|
if (url) {
|
|
139
139
|
delete newValidationMessages[name];
|
|
140
|
-
|
|
140
|
+
newApiServerUrl = url;
|
|
141
141
|
} else {
|
|
142
142
|
newValidationMessages[name] = {
|
|
143
143
|
message: "'".concat(value, "' is not a valid url"),
|
|
144
144
|
type: 'error'
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
updateApiServerUrlAction({
|
|
148
|
+
apiServerUrl: newApiServerUrl,
|
|
149
|
+
webUrl: '',
|
|
150
|
+
validationMessages: newValidationMessages
|
|
151
|
+
});
|
|
148
152
|
};
|
|
149
153
|
var isAuthenticated = () => sdk.authSession.isAuthenticated();
|
|
150
154
|
var verifyButtonDisabled = apiServerUrl.trim().length === 0 || Object.keys(validationMessages).length > 0;
|
|
@@ -161,23 +165,29 @@ var OAuthConfigForm = _ref => {
|
|
|
161
165
|
};
|
|
162
166
|
}();
|
|
163
167
|
(0, _react.useEffect)(() => {
|
|
164
|
-
var data =
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
var data = localStorage.getItem(configKey);
|
|
169
|
+
var result = data ? JSON.parse(data) : EmptyConfig;
|
|
170
|
+
if (result.base_url && result.looker_url) {
|
|
171
|
+
var {
|
|
172
|
+
base_url,
|
|
173
|
+
looker_url
|
|
174
|
+
} = result;
|
|
175
|
+
setApiServerUrlAction(base_url);
|
|
176
|
+
setWebUrlAction(looker_url);
|
|
177
|
+
}
|
|
171
178
|
}, []);
|
|
172
179
|
return _react.default.createElement(_components.SpaceVertical, {
|
|
173
180
|
gap: "u2"
|
|
174
181
|
}, _react.default.createElement(_ConfigHeading.ConfigHeading, null, "Looker OAuth Configuration"), _react.default.createElement(_components.Span, {
|
|
175
182
|
fontSize: "small"
|
|
176
183
|
}, "To configure Looker OAuth, you need to supply your API server URL, then authenticate into your Looker Instance"), _react.default.createElement(_components.MessageBar, {
|
|
177
|
-
intent:
|
|
178
|
-
onPrimaryClick: () =>
|
|
179
|
-
|
|
180
|
-
|
|
184
|
+
intent: messageBar.intent,
|
|
185
|
+
onPrimaryClick: () => updateMessageBarAction({
|
|
186
|
+
intent: messageBar.intent,
|
|
187
|
+
text: ''
|
|
188
|
+
}),
|
|
189
|
+
visible: messageBar.text !== ''
|
|
190
|
+
}, messageBar.text), _react.default.createElement(_CollapserCard.CollapserCard, {
|
|
181
191
|
heading: "1. Supply API Server URL",
|
|
182
192
|
id: "server_config",
|
|
183
193
|
divider: false,
|
|
@@ -237,7 +247,7 @@ var OAuthConfigForm = _ref => {
|
|
|
237
247
|
mr: "small"
|
|
238
248
|
}, "Save"))))), _react.default.createElement(_components.Divider, {
|
|
239
249
|
appearance: "light"
|
|
240
|
-
}), _react.default.createElement(
|
|
250
|
+
}), _react.default.createElement(_CollapserCard.CollapserCard, {
|
|
241
251
|
heading: "2. Login to instance",
|
|
242
252
|
divider: false,
|
|
243
253
|
id: "login_section",
|
|
@@ -252,5 +262,5 @@ var OAuthConfigForm = _ref => {
|
|
|
252
262
|
disabled: loginButtonDisabled
|
|
253
263
|
}, "Login")))));
|
|
254
264
|
};
|
|
255
|
-
exports.
|
|
256
|
-
//# sourceMappingURL=
|
|
265
|
+
exports.OAuthForm = OAuthForm;
|
|
266
|
+
//# sourceMappingURL=OAuthForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OAuthForm.js","names":["_react","_interopRequireWildcard","require","_components","_codeEditor","_reactRouterDom","_","_utils","_slice","_CollapserCard","_ConfigHeading","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","asyncGeneratorStep","gen","resolve","reject","_next","_throw","info","error","done","Promise","then","_asyncToGenerator","fn","self","args","err","readyToLogin","exports","EmptyConfig","base_url","looker_url","OAuthForm","_ref","setHasConfig","clientId","clientLabel","configKey","location","useLocation","redirect_uri","appPath","appConfig","concat","adaptor","getEnvAdaptor","sdk","setApiServerUrlAction","updateApiServerUrlAction","setFetchedUrlAction","setWebUrlAction","clearFormAction","updateMessageBarAction","verifyErrorAction","saveNewConfigAction","useOAuthFormActions","apiServerUrl","fetchedUrl","webUrl","messageBar","validationMessages","savedConfig","useOAuthFormState","isConfigured","saveConfig","baseUrl","data","client_id","localStorage","setItem","JSON","stringify","verifyUrl","_ref2","intent","text","versionsUrl","versions","getVersions","web_server_url","e","message","handleSave","_ref3","api_server_url","handleVerify","handleClear","_ref4","_e","removeItem","isAuthenticated","_x","handleUrlChange","event","name","currentTarget","newApiServerUrl","newValidationMessages","url","validateUrl","type","authSession","verifyButtonDisabled","trim","saveButtonDisabled","clearButtonDisabled","loginButtonDisabled","handleLogin","_ref5","preventDefault","login","_x2","useEffect","getItem","result","parse","createElement","SpaceVertical","gap","ConfigHeading","Span","fontSize","MessageBar","onPrimaryClick","visible","CollapserCard","heading","id","divider","defaultOpen","pt","px","Form","Fieldset","legend","FieldText","required","label","placeholder","onChange","disabled","Fragment","Paragraph","Link","href","window","origin","CodeCopy","language","code","Space","Tooltip","content","ButtonTransparent","onClick","mr","Button","Divider","appearance"],"sources":["../../../../../src/OAuthForm/src/components/OAuthForm.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nimport type { BaseSyntheticEvent, Dispatch, FormEvent } from 'react'\nimport React, { useEffect } from 'react'\nimport type { ValidationMessages } from '@looker/components'\nimport {\n Button,\n ButtonTransparent,\n Divider,\n Fieldset,\n FieldText,\n Form,\n MessageBar,\n Paragraph,\n Link,\n Space,\n SpaceVertical,\n Span,\n Tooltip,\n} from '@looker/components'\nimport { CodeCopy } from '@looker/code-editor'\nimport type { ILookerVersions } from '@looker/sdk-codegen'\nimport { useLocation } from 'react-router-dom'\nimport { appPath, getEnvAdaptor } from '../../..'\nimport { getVersions, validateUrl } from '../utils'\nimport { useOAuthFormActions, useOAuthFormState } from '../state/slice'\nimport { CollapserCard } from './CollapserCard'\nimport { ConfigHeading } from './ConfigHeading'\n\nexport const readyToLogin =\n 'OAuth is configured but your browser session is not authenticated. Click Login.'\n\nconst EmptyConfig = { base_url: '', looker_url: '' }\n\ninterface ConfigFormProps {\n /** A set state callback which allows for editing, setting or clearing OAuth configuration parameters if present */\n setHasConfig?: Dispatch<boolean>\n /** Local storage key value for storing config parameters */\n configKey: string\n /** OAuth client id */\n clientId: string\n /** OAuth client display label */\n clientLabel: string\n}\n\nexport const OAuthForm = ({\n setHasConfig,\n clientId,\n clientLabel,\n configKey,\n}: ConfigFormProps) => {\n const location = useLocation()\n const redirect_uri = appPath(location, '/oauth')\n const appConfig = `// client_guid=${clientId}\n {\n \"redirect_uri\": \"${redirect_uri}\",\n \"display_name\": \"CORS ${clientLabel}\",\n \"description\": \"Looker ${clientLabel} using CORS\",\n \"enabled\": true\n }\n `\n const adaptor = getEnvAdaptor()\n const sdk = adaptor.sdk\n\n const {\n setApiServerUrlAction,\n updateApiServerUrlAction,\n setFetchedUrlAction,\n setWebUrlAction,\n clearFormAction,\n updateMessageBarAction,\n verifyErrorAction,\n saveNewConfigAction,\n } = useOAuthFormActions()\n const {\n apiServerUrl,\n fetchedUrl,\n webUrl,\n messageBar,\n validationMessages,\n savedConfig,\n } = useOAuthFormState()\n\n const isConfigured = () => {\n return (\n apiServerUrl === savedConfig.base_url &&\n webUrl === savedConfig.looker_url &&\n apiServerUrl !== '' &&\n webUrl !== ''\n )\n }\n\n const saveConfig = (baseUrl: string, webUrl: string) => {\n const data = {\n base_url: baseUrl,\n looker_url: webUrl,\n client_id: clientId,\n redirect_uri,\n }\n localStorage.setItem(configKey, JSON.stringify(data))\n saveNewConfigAction(data)\n if (setHasConfig) setHasConfig(true)\n }\n\n const verifyUrl = async (): Promise<ILookerVersions | undefined> => {\n updateMessageBarAction({ intent: messageBar.intent, text: '' })\n const versionsUrl = `${apiServerUrl}/versions`\n try {\n setFetchedUrlAction(apiServerUrl)\n\n const versions = await getVersions(versionsUrl)\n\n if (versions) {\n updateMessageBarAction({\n intent: 'positive',\n text: `Configuration is valid`,\n })\n setWebUrlAction(versions.web_server_url)\n }\n\n return versions\n } catch (e: any) {\n verifyErrorAction(e.message)\n return undefined\n }\n }\n\n const handleSave = async () => {\n const versions = await verifyUrl()\n if (versions) {\n saveConfig(versions.api_server_url, versions.web_server_url)\n }\n }\n\n const handleVerify = () => {\n verifyUrl()\n }\n\n const handleClear = async (_e: BaseSyntheticEvent) => {\n localStorage.removeItem(configKey)\n clearFormAction()\n\n if (setHasConfig) setHasConfig(false)\n if (isAuthenticated()) {\n updateMessageBarAction({\n intent: 'warn',\n text: `Please reload the browser page to log out`,\n })\n }\n }\n\n const handleUrlChange = (event: FormEvent<HTMLInputElement>) => {\n const name = event.currentTarget.name\n const value = event.currentTarget.value\n let newApiServerUrl = value\n\n const newValidationMessages = { ...validationMessages }\n\n const url = validateUrl(value)\n if (url) {\n delete newValidationMessages[name]\n // Update URL if it's been cleaned up\n newApiServerUrl = url\n } else {\n newValidationMessages[name] = {\n message: `'${value}' is not a valid url`,\n type: 'error',\n }\n }\n\n updateApiServerUrlAction({\n apiServerUrl: newApiServerUrl,\n webUrl: '',\n validationMessages: newValidationMessages as ValidationMessages,\n })\n }\n\n const isAuthenticated = () => sdk.authSession.isAuthenticated()\n\n const verifyButtonDisabled =\n apiServerUrl.trim().length === 0 ||\n Object.keys(validationMessages).length > 0\n\n const saveButtonDisabled =\n verifyButtonDisabled || webUrl.trim().length === 0 || isConfigured()\n\n const clearButtonDisabled = apiServerUrl.trim().length === 0\n\n const loginButtonDisabled =\n verifyButtonDisabled || !isConfigured() || isAuthenticated()\n\n const handleLogin = async (e: BaseSyntheticEvent) => {\n e.preventDefault()\n // This will set storage variables and return to OAuthScene when successful\n await adaptor.login()\n }\n\n useEffect(() => {\n // Get config values from localstorage\n const data = localStorage.getItem(configKey)\n const result = data ? JSON.parse(data) : EmptyConfig\n if (result.base_url && result.looker_url) {\n const { base_url, looker_url } = result\n setApiServerUrlAction(base_url)\n setWebUrlAction(looker_url)\n }\n }, [])\n\n return (\n <SpaceVertical gap=\"u2\">\n <ConfigHeading>Looker OAuth Configuration</ConfigHeading>\n <Span fontSize=\"small\">\n To configure Looker OAuth, you need to supply your API server URL, then\n authenticate into your Looker Instance\n </Span>\n <MessageBar\n intent={messageBar.intent}\n onPrimaryClick={() =>\n updateMessageBarAction({ intent: messageBar.intent, text: '' })\n }\n visible={messageBar.text !== ''}\n >\n {messageBar.text}\n </MessageBar>\n <CollapserCard\n heading=\"1. Supply API Server URL\"\n id=\"server_config\"\n divider={false}\n defaultOpen={!isAuthenticated()}\n >\n <SpaceVertical gap=\"u2\" pt=\"u3\" px=\"u6\">\n <Form validationMessages={validationMessages}>\n <Fieldset legend=\"Server locations\">\n <FieldText\n required\n label=\"API server URL\"\n placeholder=\"typically https://myserver.looker.com:19999\"\n name=\"baseUrl\"\n value={apiServerUrl}\n onChange={handleUrlChange}\n />\n <FieldText\n label=\"OAuth server URL\"\n placeholder=\"Click 'Verify' to retrieve\"\n name=\"webUrl\"\n value={webUrl}\n disabled={true}\n />\n </Fieldset>\n </Form>\n {fetchedUrl && (\n <>\n <Paragraph fontSize=\"small\">\n On {fetchedUrl}, enable {clientLabel} as a{' '}\n <Link\n href=\"https://github.com/looker-open-source/sdk-codegen/blob/main/docs/cors.md#reference-implementation\"\n target=\"_blank\"\n >\n Looker OAuth client\n </Link>{' '}\n by adding \"{(window as any).location.origin}\" to the{' '}\n <Link href={`${webUrl}/admin/embed`} target=\"_blank\">\n Embedded Domain Allowlist\n </Link>\n . If API Explorer is also installed, the configuration below can\n be used to{' '}\n <Link\n href={`${fetchedUrl}/extensions/marketplace_extension_api_explorer::api-explorer/4.0/methods/Auth/register_oauth_client_app`}\n target=\"_blank\"\n >\n register this API Explorer instance\n </Link>{' '}\n as an OAuth client.\n </Paragraph>\n <CodeCopy key=\"appConfig\" language=\"json\" code={appConfig} />\n </>\n )}\n <Space>\n <Tooltip content=\"Clear the configuration values\">\n <ButtonTransparent\n onClick={handleClear}\n disabled={clearButtonDisabled}\n >\n Clear\n </ButtonTransparent>\n </Tooltip>\n <Tooltip content={`Verify ${apiServerUrl}`}>\n <ButtonTransparent\n disabled={verifyButtonDisabled}\n onClick={handleVerify}\n mr=\"small\"\n >\n Verify\n </ButtonTransparent>\n </Tooltip>\n <Tooltip content=\"Save the configuration for this browser\">\n <Button\n disabled={saveButtonDisabled}\n onClick={handleSave}\n mr=\"small\"\n >\n Save\n </Button>\n </Tooltip>\n </Space>\n </SpaceVertical>\n </CollapserCard>\n <Divider appearance=\"light\" />\n <CollapserCard\n heading=\"2. Login to instance\"\n divider={false}\n id=\"login_section\"\n defaultOpen={!isAuthenticated()}\n >\n <SpaceVertical pt=\"u3\" px=\"u6\">\n {isAuthenticated() ? (\n <Span>You are already logged in. Reload the page to log out.</Span>\n ) : isConfigured() ? (\n <>\n <Span>{readyToLogin}</Span>\n </>\n ) : (\n <Span>\n You will be able to login after you Verify your API Server URL\n </Span>\n )}\n <Tooltip content={`Login to ${webUrl} using OAuth`}>\n <Button onClick={handleLogin} disabled={loginButtonDisabled}>\n Login\n </Button>\n </Tooltip>\n </SpaceVertical>\n </CollapserCard>\n </SpaceVertical>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,CAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAC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true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "OAuthForm", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _OAuthForm.OAuthForm;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _OAuthForm = require("./OAuthForm");
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_OAuthForm","require"],"sources":["../../../../../src/OAuthForm/src/components/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nexport { OAuthForm } from './OAuthForm'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,UAAA,GAAAC,OAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _components = require("./components");
|
|
7
|
+
Object.keys(_components).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _components[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _state = require("./state");
|
|
18
|
+
Object.keys(_state).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _state[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _state[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_components","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_state"],"sources":["../../../../src/OAuthForm/src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nexport * from './components'\nexport * from './state'\n"],"mappings":";;;;;AAyBA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "OAuthFormSlice", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _slice.OAuthFormSlice;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _slice = require("./slice");
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_slice","require"],"sources":["../../../../../src/OAuthForm/src/state/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nexport { OAuthFormSlice } from './slice'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useOAuthFormState = exports.useOAuthFormActions = exports.oAuthFormActions = exports.defaultOAuthFormState = exports.SLICE_NAME = exports.OAuthFormSlice = void 0;
|
|
7
|
+
var _redux = require("@looker/redux");
|
|
8
|
+
var _toolkit = require("@reduxjs/toolkit");
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
13
|
+
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); }
|
|
14
|
+
var SLICE_NAME = 'OAuthForm';
|
|
15
|
+
exports.SLICE_NAME = SLICE_NAME;
|
|
16
|
+
var defaultOAuthFormState = {
|
|
17
|
+
apiServerUrl: '',
|
|
18
|
+
fetchedUrl: '',
|
|
19
|
+
webUrl: '',
|
|
20
|
+
messageBar: {
|
|
21
|
+
text: '',
|
|
22
|
+
intent: 'positive'
|
|
23
|
+
},
|
|
24
|
+
validationMessages: {},
|
|
25
|
+
savedConfig: {
|
|
26
|
+
base_url: '',
|
|
27
|
+
looker_url: ''
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.defaultOAuthFormState = defaultOAuthFormState;
|
|
31
|
+
var OAuthFormSlice = (0, _toolkit.createSlice)({
|
|
32
|
+
name: SLICE_NAME,
|
|
33
|
+
initialState: defaultOAuthFormState,
|
|
34
|
+
reducers: {
|
|
35
|
+
clearFormAction(_state) {
|
|
36
|
+
return _objectSpread({}, defaultOAuthFormState);
|
|
37
|
+
},
|
|
38
|
+
saveNewConfigAction(state, action) {
|
|
39
|
+
state.savedConfig = {
|
|
40
|
+
base_url: action.payload.base_url,
|
|
41
|
+
looker_url: action.payload.looker_url
|
|
42
|
+
};
|
|
43
|
+
state.messageBar = {
|
|
44
|
+
intent: 'positive',
|
|
45
|
+
text: "Saved ".concat(action.payload.looker_url, " as OAuth server")
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
setApiServerUrlAction(state, action) {
|
|
49
|
+
state.apiServerUrl = action.payload;
|
|
50
|
+
},
|
|
51
|
+
setFetchedUrlAction(state, action) {
|
|
52
|
+
state.fetchedUrl = action.payload;
|
|
53
|
+
},
|
|
54
|
+
setWebUrlAction(state, action) {
|
|
55
|
+
state.webUrl = action.payload;
|
|
56
|
+
},
|
|
57
|
+
updateApiServerUrlAction(state, action) {
|
|
58
|
+
state.apiServerUrl = action.payload.apiServerUrl;
|
|
59
|
+
state.webUrl = action.payload.webUrl;
|
|
60
|
+
state.validationMessages = action.payload.validationMessages;
|
|
61
|
+
},
|
|
62
|
+
updateMessageBarAction(state, action) {
|
|
63
|
+
state.messageBar = action.payload;
|
|
64
|
+
},
|
|
65
|
+
verifyErrorAction(state, action) {
|
|
66
|
+
state.messageBar = {
|
|
67
|
+
intent: 'critical',
|
|
68
|
+
text: action.payload
|
|
69
|
+
};
|
|
70
|
+
state.webUrl = '';
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
exports.OAuthFormSlice = OAuthFormSlice;
|
|
75
|
+
var oAuthFormActions = OAuthFormSlice.actions;
|
|
76
|
+
exports.oAuthFormActions = oAuthFormActions;
|
|
77
|
+
var {
|
|
78
|
+
useActions: useOAuthFormActions,
|
|
79
|
+
useStoreState: useOAuthFormState
|
|
80
|
+
} = (0, _redux.createSliceHooks)(OAuthFormSlice);
|
|
81
|
+
exports.useOAuthFormState = useOAuthFormState;
|
|
82
|
+
exports.useOAuthFormActions = useOAuthFormActions;
|
|
83
|
+
//# sourceMappingURL=slice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.js","names":["_redux","require","_toolkit","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","SLICE_NAME","exports","defaultOAuthFormState","apiServerUrl","fetchedUrl","webUrl","messageBar","text","intent","validationMessages","savedConfig","base_url","looker_url","OAuthFormSlice","createSlice","name","initialState","reducers","clearFormAction","_state","saveNewConfigAction","state","action","payload","concat","setApiServerUrlAction","setFetchedUrlAction","setWebUrlAction","updateApiServerUrlAction","updateMessageBarAction","verifyErrorAction","oAuthFormActions","actions","useActions","useOAuthFormActions","useStoreState","useOAuthFormState","createSliceHooks"],"sources":["../../../../../src/OAuthForm/src/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nimport { createSliceHooks } from '@looker/redux'\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport type { MessageBarIntent, ValidationMessages } from '@looker/components'\nimport type { ConfigValues } from '../utils'\n\nexport const SLICE_NAME = 'OAuthForm'\nexport interface MessageBarData {\n intent: MessageBarIntent\n text: string\n}\n\nexport interface OAuthFormState {\n apiServerUrl: string\n fetchedUrl: string\n webUrl: string\n messageBar: MessageBarData\n validationMessages: ValidationMessages\n savedConfig: ConfigValues\n}\n\nexport const defaultOAuthFormState: OAuthFormState = {\n apiServerUrl: '',\n fetchedUrl: '',\n webUrl: '',\n messageBar: {\n text: '',\n intent: 'positive',\n } as MessageBarData,\n validationMessages: {} as ValidationMessages,\n savedConfig: { base_url: '', looker_url: '' },\n}\n\ninterface HandleUrlChangePayload {\n apiServerUrl: string\n webUrl: string\n validationMessages: ValidationMessages\n}\n\ninterface ConfigPayload {\n base_url: string\n looker_url: string\n client_id: string\n redirect_uri: string\n}\n\nexport const OAuthFormSlice = createSlice({\n name: SLICE_NAME,\n initialState: defaultOAuthFormState,\n reducers: {\n clearFormAction(_state) {\n return { ...defaultOAuthFormState }\n },\n saveNewConfigAction(state, action: PayloadAction<ConfigPayload>) {\n state.savedConfig = {\n base_url: action.payload.base_url,\n looker_url: action.payload.looker_url,\n }\n state.messageBar = {\n intent: 'positive',\n text: `Saved ${action.payload.looker_url} as OAuth server`,\n }\n },\n setApiServerUrlAction(state, action: PayloadAction<string>) {\n state.apiServerUrl = action.payload\n },\n setFetchedUrlAction(state, action: PayloadAction<string>) {\n state.fetchedUrl = action.payload\n },\n setWebUrlAction(state, action: PayloadAction<string>) {\n state.webUrl = action.payload\n },\n updateApiServerUrlAction(\n state,\n action: PayloadAction<HandleUrlChangePayload>\n ) {\n state.apiServerUrl = action.payload.apiServerUrl\n state.webUrl = action.payload.webUrl\n state.validationMessages = action.payload.validationMessages\n },\n updateMessageBarAction(state, action: PayloadAction<MessageBarData>) {\n state.messageBar = action.payload\n },\n verifyErrorAction(state, action: PayloadAction<string>) {\n state.messageBar = { intent: 'critical', text: action.payload }\n state.webUrl = ''\n },\n },\n})\n\nexport const oAuthFormActions = OAuthFormSlice.actions\nexport const {\n useActions: useOAuthFormActions,\n useStoreState: useOAuthFormState,\n} = createSliceHooks(OAuthFormSlice)\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA8C,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,IAAAC,eAAA,CAAAP,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA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AChDkB,KAAK,CAAChB,MAAM,GAAGiB,MAAM,CAACC,OAAO,CAAClB,MAAM;MACpCgB,KAAK,CAACZ,kBAAkB,GAAGa,MAAM,CAACC,OAAO,CAACd,kBAAkB;IAC9D,CAAC;IACDoB,sBAAsBA,CAACR,KAAK,EAAEC,MAAqC,EAAE;MACnED,KAAK,CAACf,UAAU,GAAGgB,MAAM,CAACC,OAAO;IACnC,CAAC;IACDO,iBAAiBA,CAACT,KAAK,EAAEC,MAA6B,EAAE;MACtDD,KAAK,CAACf,UAAU,GAAG;QAAEE,MAAM,EAAE,UAAU;QAAED,IAAI,EAAEe,MAAM,CAACC;MAAQ,CAAC;MAC/DF,KAAK,CAAChB,MAAM,GAAG,EAAE;IACnB;EACF;AACF,CAAC,CAAC;AAAAJ,OAAA,CAAAY,cAAA,GAAAA,cAAA;AAEK,IAAMkB,gBAAgB,GAAGlB,cAAc,CAACmB,OAAO;AAAA/B,OAAA,CAAA8B,gBAAA,GAAAA,gBAAA;AAC/C,IAAM;EACXE,UAAU,EAAEC,mBAAmB;EAC/BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACxB,cAAc,CAAC;AAAAZ,OAAA,CAAAmC,iBAAA,GAAAA,iBAAA;AAAAnC,OAAA,CAAAiC,mBAAA,GAAAA,mBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_sdkRtl","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","asyncGeneratorStep","gen","resolve","reject","_next","_throw","info","error","done","Promise","then","_asyncToGenerator","fn","self","args","err","getUrl","_ref","url","settings","DefaultSettings","base_url","verify_ssl","xp","BrowserTransport","response","rawRequest","body","_x","exports","getVersions","_ref2","versionsUrl","versions","content","JSON","parse","_unused","Error","_x2","validateUrl","result","URL","endsWith","origin","_unused2"],"sources":["../../../../src/OAuthForm/src/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 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 */\nimport { BrowserTransport, DefaultSettings } from '@looker/sdk-rtl'\nimport type { ILookerVersions } from '@looker/sdk-codegen'\n\nexport type ConfigValues = Record<string, any>\n\n/**\n * Use the browser transport to GET a url\n * @param url to fetch\n */\nexport const getUrl = async (url: string): Promise<string | ConfigValues> => {\n const settings = {\n ...DefaultSettings(),\n ...{ base_url: url, verify_ssl: false },\n }\n const xp = new BrowserTransport(settings)\n const response = await xp.rawRequest('GET', url)\n return response.body\n}\n\n/**\n * Gets the versions payload given a versions url\n * @param versionsUrl\n */\nexport const getVersions = async (\n versionsUrl: string\n): Promise<ILookerVersions | undefined> => {\n let versions\n try {\n const content = await getUrl(versionsUrl)\n versions = typeof content === 'string' ? JSON.parse(content) : content\n } catch {\n throw new Error('Invalid server configuration')\n }\n return versions\n}\n\n/**\n * Validates URL and standardizes it\n * @param url to validate\n * @returns the standardized url.origin if it's valid, or an empty string if it's not\n */\nexport const validateUrl = (url: string): string => {\n try {\n const result = new URL(url)\n if (url.endsWith(':')) return url\n return result.origin\n } catch {\n return ''\n }\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,OAAA,GAAAC,OAAA;AAAmE,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,IAAAC,eAAA,CAAAP,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,CAAAkB,yBAAA,GAAAlB,MAAA,CAAAmB,gBAAA,CAAAT,MAAA,EAAAV,MAAA,CAAAkB,yBAAA,CAAAJ,MAAA,KAAAlB,OAAA,CAAAI,MAAA,CAAAc,MAAA,GAAAC,OAAA,WAAAC,GAAA,IAAAhB,MAAA,CAAAoB,cAAA,CAAAV,MAAA,EAAAM,GAAA,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AAC,CAAC,OAAAG,OAAA,EAAM;MACN,MAAM,IAAIC,KAAK,CAAC,8BAA8B,CAAC;IACjD;IACA,OAAOL,QAAQ;EACjB,CAAC;EAAA,gBAXYH,WAAWA,CAAAS,GAAA;IAAA,OAAAR,KAAA,CAAA9D,KAAA,OAAAI,SAAA;EAAA;AAAA,GAWvB;AAAAwD,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAOM,IAAMU,WAAW,GAAItB,GAAW,IAAa;EAClD,IAAI;IACF,IAAMuB,MAAM,GAAG,IAAIC,GAAG,CAACxB,GAAG,CAAC;IAC3B,IAAIA,GAAG,CAACyB,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAOzB,GAAG;IACjC,OAAOuB,MAAM,CAACG,MAAM;EACtB,CAAC,CAAC,OAAAC,QAAA,EAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC;AAAAhB,OAAA,CAAAW,WAAA,GAAAA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthScene.js","names":["OAuthScene","adaptor","history","useHistory","location","useLocation","reactPath","pathname","fullPath","window","extraPath","substr","indexOf","authSession","sdk","retPath","returnUrl","oldUrl","replace","useEffect","maybeLogin","token","login","console","
|
|
1
|
+
{"version":3,"file":"OAuthScene.js","names":["_react","_interopRequireWildcard","require","_components","_reactRouter","_reactRouterDom","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","OAuthScene","_ref","_authSession$returnUr","adaptor","history","useHistory","location","useLocation","reactPath","pathname","fullPath","window","extraPath","substr","indexOf","authSession","sdk","retPath","returnUrl","oldUrl","replace","useEffect","maybeLogin","_ref2","token","login","console","push","themeOverrides","createElement","ComponentsProvider","loadGoogleFonts","themeCustomizations","Flex","flexDirection","justifyContent","mt","FlexItem","alignSelf","ProgressCircular","size","Heading","color","as","concat","exports"],"sources":["../../src/OAuthScene.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 type { FC } from 'react'\nimport React, { useEffect } from 'react'\nimport type { BrowserSession } from '@looker/sdk-rtl'\nimport {\n ComponentsProvider,\n Flex,\n FlexItem,\n Heading,\n ProgressCircular,\n} from '@looker/components'\nimport { useHistory } from 'react-router'\nimport { useLocation } from 'react-router-dom'\nimport type { IEnvironmentAdaptor } from './adaptorUtils'\n\ninterface OAuthSceneProps {\n adaptor: IEnvironmentAdaptor\n}\n\n/**\n * OAuth scene for sdk session handling and redirection to OAuth flow initiation\n * route\n */\nexport const OAuthScene: FC<OAuthSceneProps> = ({ adaptor }) => {\n const history = useHistory()\n const location = useLocation()\n const reactPath = location.pathname\n const fullPath = (window as any).location.pathname\n const extraPath = fullPath.substr(0, fullPath.indexOf(reactPath))\n const authSession = adaptor.sdk.authSession as BrowserSession\n const retPath = authSession.returnUrl ?? '/'\n /** If this is a nested React app, remove extraPath to prevent recursive return pathing */\n const oldUrl = retPath.replace(extraPath, '')\n\n useEffect(() => {\n const maybeLogin = async () => {\n const token = await adaptor.login()\n if (token) {\n console.error({ push: oldUrl, retPath, extraPath, location })\n history.push(oldUrl)\n }\n }\n maybeLogin()\n }, [])\n\n const themeOverrides = adaptor.themeOverrides()\n return (\n <ComponentsProvider\n loadGoogleFonts={themeOverrides.loadGoogleFonts}\n themeCustomizations={themeOverrides.themeCustomizations}\n >\n <Flex flexDirection=\"column\" justifyContent=\"center\" mt=\"25%\">\n <FlexItem alignSelf=\"center\">\n <ProgressCircular size=\"large\" />\n </FlexItem>\n <FlexItem mt=\"large\" alignSelf=\"center\">\n <Heading color=\"key\" as=\"h2\">\n {`Returning to ${oldUrl} after OAuth login ...`}\n </Heading>\n </FlexItem>\n </Flex>\n </ComponentsProvider>\n )\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAOA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AAA8C,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IA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