@looker/extension-utils 0.1.28 → 0.1.30
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 +17 -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/utils.js.map +1 -1
- package/lib/ExtMarkdown.js.map +1 -1
- package/lib/OAuthForm/src/components/CollapserCard.js.map +1 -1
- package/lib/OAuthForm/src/components/ConfigHeading.js.map +1 -1
- package/lib/OAuthForm/src/components/OAuthForm.js.map +1 -1
- package/lib/OAuthForm/src/state/sagas.js.map +1 -1
- package/lib/OAuthForm/src/state/slice.js.map +1 -1
- package/lib/OAuthForm/src/utils.js.map +1 -1
- 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 +16 -25
- package/lib/esm/APIErrorDisplay/APIErrorContent.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDetails.js +13 -21
- package/lib/esm/APIErrorDisplay/APIErrorDetails.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDialog.js +10 -18
- package/lib/esm/APIErrorDisplay/APIErrorDialog.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDisplay.js +7 -15
- package/lib/esm/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
- package/lib/esm/APIErrorDisplay/APIErrorDocLink.js +7 -15
- package/lib/esm/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
- package/lib/esm/APIErrorDisplay/index.js +3 -39
- package/lib/esm/APIErrorDisplay/index.js.map +1 -1
- package/lib/esm/APIErrorDisplay/utils.js +2 -10
- package/lib/esm/APIErrorDisplay/utils.js.map +1 -1
- package/lib/esm/ExtMarkdown.js +6 -14
- package/lib/esm/ExtMarkdown.js.map +1 -1
- package/lib/esm/OAuthForm/index.js +1 -16
- package/lib/esm/OAuthForm/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/CollapserCard.js +13 -21
- package/lib/esm/OAuthForm/src/components/CollapserCard.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/ConfigHeading.js +3 -11
- package/lib/esm/OAuthForm/src/components/ConfigHeading.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/OAuthForm.js +41 -51
- package/lib/esm/OAuthForm/src/components/OAuthForm.js.map +1 -1
- package/lib/esm/OAuthForm/src/components/index.js +1 -12
- package/lib/esm/OAuthForm/src/components/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/index.js +2 -27
- package/lib/esm/OAuthForm/src/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/state/index.js +1 -12
- package/lib/esm/OAuthForm/src/state/index.js.map +1 -1
- package/lib/esm/OAuthForm/src/state/sagas.js +38 -44
- package/lib/esm/OAuthForm/src/state/sagas.js.map +1 -1
- package/lib/esm/OAuthForm/src/state/slice.js +11 -24
- package/lib/esm/OAuthForm/src/state/slice.js.map +1 -1
- package/lib/esm/OAuthForm/src/utils.js +6 -15
- package/lib/esm/OAuthForm/src/utils.js.map +1 -1
- package/lib/esm/OAuthScene.js +14 -23
- package/lib/esm/OAuthScene.js.map +1 -1
- package/lib/esm/adaptorUtils.js +9 -22
- package/lib/esm/adaptorUtils.js.map +1 -1
- package/lib/esm/authUtils.js +2 -9
- package/lib/esm/authUtils.js.map +1 -1
- package/lib/esm/browserAdaptor.js +4 -12
- package/lib/esm/browserAdaptor.js.map +1 -1
- package/lib/esm/extensionAdaptor.js +4 -12
- package/lib/esm/extensionAdaptor.js.map +1 -1
- package/lib/esm/index.js +8 -93
- package/lib/esm/index.js.map +1 -1
- package/lib/extensionAdaptor.js.map +1 -1
- package/package.json +6 -6
package/lib/esm/ExtMarkdown.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.ExtMarkdown = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _codeEditor = require("@looker/code-editor");
|
|
9
|
-
var _adaptorUtils = require("./adaptorUtils");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
var ExtMarkdown = _ref => {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Markdown } from '@looker/code-editor';
|
|
3
|
+
import { getEnvAdaptor } from './adaptorUtils';
|
|
4
|
+
export var ExtMarkdown = _ref => {
|
|
12
5
|
var {
|
|
13
6
|
source,
|
|
14
7
|
pattern = '',
|
|
@@ -17,10 +10,10 @@ var ExtMarkdown = _ref => {
|
|
|
17
10
|
paragraphOverride
|
|
18
11
|
} = _ref;
|
|
19
12
|
var openBrowserWindow = (_pathname, href) => {
|
|
20
|
-
var adaptor =
|
|
13
|
+
var adaptor = getEnvAdaptor();
|
|
21
14
|
adaptor.openBrowserWindow(href);
|
|
22
15
|
};
|
|
23
|
-
return
|
|
16
|
+
return React.createElement(Markdown, {
|
|
24
17
|
source: source,
|
|
25
18
|
pattern: pattern,
|
|
26
19
|
transformLinkUri: transformLinkUri,
|
|
@@ -28,5 +21,4 @@ var ExtMarkdown = _ref => {
|
|
|
28
21
|
paragraphOverride: paragraphOverride
|
|
29
22
|
});
|
|
30
23
|
};
|
|
31
|
-
exports.ExtMarkdown = ExtMarkdown;
|
|
32
24
|
//# sourceMappingURL=ExtMarkdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtMarkdown.js","names":["
|
|
1
|
+
{"version":3,"file":"ExtMarkdown.js","names":["React","Markdown","getEnvAdaptor","ExtMarkdown","_ref","source","pattern","transformLinkUri","linkClickHandler","paragraphOverride","openBrowserWindow","_pathname","href","adaptor","createElement"],"sources":["../../src/ExtMarkdown.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, ReactNode } from 'react'\nimport React from 'react'\nimport { Markdown } from '@looker/code-editor'\nimport { getEnvAdaptor } from './adaptorUtils'\n\ninterface ExtMarkdownProps {\n source: string\n pattern?: string\n transformLinkUri?: (url: string) => string\n linkClickHandler?: (pathname: string, href: string) => void\n paragraphOverride?: ({ children }: { children: ReactNode }) => ReactNode\n}\n\n/**\n * Simple wrapper on the standard Markdown component to handle link clicks in an extension\n * @param source markdown to render\n * @param pattern search pattern\n * @param transformLinkUri link pattern transformer override\n * @param linkClickHandler defaults to ExtensionSDK.openBrowserWindow()\n * @param paragraphOverride override paragraph display handling\n */\nexport const ExtMarkdown: FC<ExtMarkdownProps> = ({\n source,\n pattern = '',\n transformLinkUri,\n linkClickHandler,\n paragraphOverride,\n}) => {\n const openBrowserWindow = (_pathname: string, href: string) => {\n const adaptor = getEnvAdaptor()\n adaptor.openBrowserWindow(href)\n }\n\n return (\n <Markdown\n source={source}\n pattern={pattern}\n transformLinkUri={transformLinkUri}\n linkClickHandler={linkClickHandler || openBrowserWindow}\n paragraphOverride={paragraphOverride}\n />\n )\n}\n"],"mappings":"AA2BA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,aAAa,QAAQ,gBAAgB;AAkB9C,OAAO,IAAMC,WAAiC,GAAGC,IAAA,IAM3C;EAAA,IAN4C;IAChDC,MAAM;IACNC,OAAO,GAAG,EAAE;IACZC,gBAAgB;IAChBC,gBAAgB;IAChBC;EACF,CAAC,GAAAL,IAAA;EACC,IAAMM,iBAAiB,GAAGA,CAACC,SAAiB,EAAEC,IAAY,KAAK;IAC7D,IAAMC,OAAO,GAAGX,aAAa,CAAC,CAAC;IAC/BW,OAAO,CAACH,iBAAiB,CAACE,IAAI,CAAC;EACjC,CAAC;EAED,OACEZ,KAAA,CAAAc,aAAA,CAACb,QAAQ;IACPI,MAAM,EAAEA,MAAO;IACfC,OAAO,EAAEA,OAAQ;IACjBC,gBAAgB,EAAEA,gBAAiB;IACnCC,gBAAgB,EAAEA,gBAAgB,IAAIE,iBAAkB;IACxDD,iBAAiB,EAAEA;EAAkB,CACtC,CAAC;AAEN,CAAC"}
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
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
|
-
});
|
|
1
|
+
export * from './src';
|
|
17
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"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,cAAc,OAAO"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.CollapserCard = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _components = require("@looker/components");
|
|
9
|
-
var _material = require("@styled-icons/material");
|
|
10
|
-
var _ConfigHeading = require("./ConfigHeading");
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
var CollapserCard = _ref => {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useToggle, Accordion2, Divider, Box2 } from '@looker/components';
|
|
3
|
+
import { ArrowRight, ArrowDropDown } from '@styled-icons/material';
|
|
4
|
+
import { ConfigHeading } from './ConfigHeading';
|
|
5
|
+
export var CollapserCard = _ref => {
|
|
13
6
|
var {
|
|
14
7
|
id,
|
|
15
8
|
heading,
|
|
@@ -21,27 +14,26 @@ var CollapserCard = _ref => {
|
|
|
21
14
|
var {
|
|
22
15
|
value,
|
|
23
16
|
toggle
|
|
24
|
-
} =
|
|
25
|
-
return
|
|
17
|
+
} = useToggle(defaultOpen);
|
|
18
|
+
return React.createElement(Box2, {
|
|
26
19
|
display: "flex",
|
|
27
20
|
flexDirection: "column"
|
|
28
|
-
}, divider &&
|
|
21
|
+
}, divider && React.createElement(Divider, {
|
|
29
22
|
appearance: "light"
|
|
30
|
-
}),
|
|
23
|
+
}), React.createElement(Accordion2, {
|
|
31
24
|
id: id,
|
|
32
25
|
indicatorPosition: "left",
|
|
33
26
|
isOpen: value,
|
|
34
27
|
toggleOpen: toggle,
|
|
35
28
|
indicatorIcons: {
|
|
36
|
-
close:
|
|
37
|
-
open:
|
|
29
|
+
close: React.createElement(ArrowRight, null),
|
|
30
|
+
open: React.createElement(ArrowDropDown, null)
|
|
38
31
|
},
|
|
39
|
-
label:
|
|
32
|
+
label: React.createElement(ConfigHeading, {
|
|
40
33
|
as: level
|
|
41
34
|
}, heading)
|
|
42
|
-
},
|
|
35
|
+
}, React.createElement(Box2, {
|
|
43
36
|
pb: "xlarge"
|
|
44
37
|
}, children)));
|
|
45
38
|
};
|
|
46
|
-
exports.CollapserCard = CollapserCard;
|
|
47
39
|
//# sourceMappingURL=CollapserCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapserCard.js","names":["
|
|
1
|
+
{"version":3,"file":"CollapserCard.js","names":["React","useToggle","Accordion2","Divider","Box2","ArrowRight","ArrowDropDown","ConfigHeading","CollapserCard","_ref","id","heading","children","defaultOpen","divider","level","value","toggle","createElement","display","flexDirection","appearance","indicatorPosition","isOpen","toggleOpen","indicatorIcons","close","open","label","as","pb"],"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,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,UAAU,EAAEC,OAAO,EAAEC,IAAI,QAAQ,oBAAoB;AACzE,SAASC,UAAU,EAAEC,aAAa,QAAQ,wBAAwB;AAClE,SAASC,aAAa,QAAQ,iBAAiB;AAa/C,OAAO,IAAMC,aAAqC,GAAGC,IAAA,IAM/C;EAAA,IANgD;IACpDC,EAAE;IACFC,OAAO;IACPC,QAAQ;IACRC,WAAW,GAAG,IAAI;IAClBC,OAAO,GAAG;EACZ,CAAC,GAAAL,IAAA;EACC,IAAMM,KAAK,GAAGD,OAAO,GAAG,IAAI,GAAG,IAAI;EACnC,IAAM;IAAEE,KAAK;IAAEC;EAAO,CAAC,GAAGhB,SAAS,CAACY,WAAW,CAAC;EAEhD,OACEb,KAAA,CAAAkB,aAAA,CAACd,IAAI;IAACe,OAAO,EAAC,MAAM;IAACC,aAAa,EAAC;EAAQ,GACxCN,OAAO,IAAId,KAAA,CAAAkB,aAAA,CAACf,OAAO;IAACkB,UAAU,EAAC;EAAO,CAAE,CAAC,EAC1CrB,KAAA,CAAAkB,aAAA,CAAChB,UAAU;IACTQ,EAAE,EAAEA,EAAG;IACPY,iBAAiB,EAAC,MAAM;IACxBC,MAAM,EAAEP,KAAM;IACdQ,UAAU,EAAEP,MAAO;IACnBQ,cAAc,EAAE;MAAEC,KAAK,EAAE1B,KAAA,CAAAkB,aAAA,CAACb,UAAU,MAAE,CAAC;MAAEsB,IAAI,EAAE3B,KAAA,CAAAkB,aAAA,CAACZ,aAAa,MAAE;IAAE,CAAE;IACnEsB,KAAK,EAAE5B,KAAA,CAAAkB,aAAA,CAACX,aAAa;MAACsB,EAAE,EAAEd;IAAM,GAAEJ,OAAuB;EAAE,GAE3DX,KAAA,CAAAkB,aAAA,CAACd,IAAI;IAAC0B,EAAE,EAAC;EAAQ,GAAElB,QAAe,CACxB,CACR,CAAC;AAEX,CAAC"}
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ConfigHeading = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
var _components = require("@looker/components");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
var ConfigHeading = (0, _styledComponents.default)(_components.Heading).attrs(_ref => {
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Heading } from '@looker/components';
|
|
3
|
+
export var ConfigHeading = styled(Heading).attrs(_ref => {
|
|
11
4
|
var {
|
|
12
5
|
mb = 'xsmall',
|
|
13
6
|
pt = 'xsmall'
|
|
@@ -20,5 +13,4 @@ var ConfigHeading = (0, _styledComponents.default)(_components.Heading).attrs(_r
|
|
|
20
13
|
displayName: "ConfigHeading",
|
|
21
14
|
componentId: "sc-1tkgwv3-0"
|
|
22
15
|
})([""]);
|
|
23
|
-
exports.ConfigHeading = ConfigHeading;
|
|
24
16
|
//# sourceMappingURL=ConfigHeading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigHeading.js","names":["
|
|
1
|
+
{"version":3,"file":"ConfigHeading.js","names":["styled","Heading","ConfigHeading","attrs","_ref","mb","pt","withConfig","displayName","componentId"],"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,OAAOA,MAAM,MAAM,mBAAmB;AACtC,SAASC,OAAO,QAAQ,oBAAoB;AAG5C,OAAO,IAAMC,aAAa,GAAGF,MAAM,CAACC,OAAO,CAAC,CAACE,KAAK,CAChDC,IAAA;EAAA,IAAC;IAAEC,EAAE,GAAG,QAAQ;IAAEC,EAAE,GAAG;EAAuB,CAAC,GAAAF,IAAA;EAAA,OAAM;IAAEC,EAAE;IAAEC;EAAG,CAAC;AAAA,CACjE,CAAC,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,QAAE"}
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.readyToLogin = exports.OAuthForm = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _components = require("@looker/components");
|
|
9
|
-
var _codeEditor = require("@looker/code-editor");
|
|
10
|
-
var _reactRouterDom = require("react-router-dom");
|
|
11
|
-
var _ = require("../../..");
|
|
12
|
-
var _slice = require("../state/slice");
|
|
13
|
-
var _CollapserCard = require("./CollapserCard");
|
|
14
|
-
var _ConfigHeading = require("./ConfigHeading");
|
|
15
|
-
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
|
-
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
1
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
18
2
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
|
+
import { Button, ButtonTransparent, Divider, Fieldset, FieldText, Form, MessageBar, Paragraph, Link, Space, SpaceVertical, Span, Tooltip } from '@looker/components';
|
|
5
|
+
import { CodeCopy } from '@looker/code-editor';
|
|
6
|
+
import { useLocation } from 'react-router-dom';
|
|
7
|
+
import { appPath, getEnvAdaptor } from '../../..';
|
|
8
|
+
import { useOAuthFormActions, useOAuthFormState } from '../state/slice';
|
|
9
|
+
import { CollapserCard } from './CollapserCard';
|
|
10
|
+
import { ConfigHeading } from './ConfigHeading';
|
|
11
|
+
export var readyToLogin = 'OAuth is configured but your browser session is not authenticated. Click Login.';
|
|
12
|
+
export var OAuthForm = _ref => {
|
|
22
13
|
var {
|
|
23
14
|
setHasConfig,
|
|
24
15
|
clientId,
|
|
25
16
|
clientLabel,
|
|
26
17
|
configKey
|
|
27
18
|
} = _ref;
|
|
28
|
-
var location =
|
|
29
|
-
var redirect_uri =
|
|
19
|
+
var location = useLocation();
|
|
20
|
+
var redirect_uri = appPath(location, '/oauth');
|
|
30
21
|
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 ");
|
|
31
|
-
var adaptor =
|
|
22
|
+
var adaptor = getEnvAdaptor();
|
|
32
23
|
var sdk = adaptor.sdk;
|
|
33
24
|
var {
|
|
34
25
|
initAction,
|
|
@@ -37,7 +28,7 @@ var OAuthForm = _ref => {
|
|
|
37
28
|
verifyConfigAction,
|
|
38
29
|
clearMessageBarAction,
|
|
39
30
|
saveConfigAction
|
|
40
|
-
} =
|
|
31
|
+
} = useOAuthFormActions();
|
|
41
32
|
var {
|
|
42
33
|
apiServerUrl,
|
|
43
34
|
fetchedUrl,
|
|
@@ -45,7 +36,7 @@ var OAuthForm = _ref => {
|
|
|
45
36
|
messageBar,
|
|
46
37
|
validationMessages,
|
|
47
38
|
savedConfig
|
|
48
|
-
} =
|
|
39
|
+
} = useOAuthFormState();
|
|
49
40
|
var isConfigured = () => {
|
|
50
41
|
return apiServerUrl === savedConfig.base_url && webUrl === savedConfig.looker_url && apiServerUrl !== '' && webUrl !== '';
|
|
51
42
|
};
|
|
@@ -92,91 +83,90 @@ var OAuthForm = _ref => {
|
|
|
92
83
|
return _ref3.apply(this, arguments);
|
|
93
84
|
};
|
|
94
85
|
}();
|
|
95
|
-
|
|
86
|
+
useEffect(() => {
|
|
96
87
|
initAction(configKey);
|
|
97
88
|
}, [configKey, initAction]);
|
|
98
|
-
return
|
|
89
|
+
return React.createElement(SpaceVertical, {
|
|
99
90
|
gap: "u2"
|
|
100
|
-
},
|
|
91
|
+
}, React.createElement(ConfigHeading, null, "Looker OAuth Configuration"), React.createElement(Span, {
|
|
101
92
|
fontSize: "small"
|
|
102
|
-
}, "To configure Looker OAuth, you need to supply your API server URL, then authenticate into your Looker Instance"),
|
|
93
|
+
}, "To configure Looker OAuth, you need to supply your API server URL, then authenticate into your Looker Instance"), React.createElement(MessageBar, {
|
|
103
94
|
intent: messageBar.intent,
|
|
104
95
|
onPrimaryClick: clearMessageBarAction,
|
|
105
96
|
visible: messageBar.text !== ''
|
|
106
|
-
}, messageBar.text),
|
|
97
|
+
}, messageBar.text), React.createElement(CollapserCard, {
|
|
107
98
|
heading: "1. Supply API Server URL",
|
|
108
99
|
id: "server_config",
|
|
109
100
|
divider: false,
|
|
110
101
|
defaultOpen: !isAuthenticated()
|
|
111
|
-
},
|
|
102
|
+
}, React.createElement(SpaceVertical, {
|
|
112
103
|
gap: "u2",
|
|
113
104
|
pt: "u3",
|
|
114
105
|
px: "u6"
|
|
115
|
-
},
|
|
106
|
+
}, React.createElement(Form, {
|
|
116
107
|
validationMessages: validationMessages
|
|
117
|
-
},
|
|
108
|
+
}, React.createElement(Fieldset, {
|
|
118
109
|
legend: "Server locations"
|
|
119
|
-
},
|
|
110
|
+
}, React.createElement(FieldText, {
|
|
120
111
|
required: true,
|
|
121
112
|
label: "API server URL",
|
|
122
113
|
placeholder: "typically https://myserver.looker.com:19999",
|
|
123
114
|
name: "baseUrl",
|
|
124
115
|
value: apiServerUrl,
|
|
125
116
|
onChange: handleUrlChange
|
|
126
|
-
}),
|
|
117
|
+
}), React.createElement(FieldText, {
|
|
127
118
|
label: "OAuth server URL",
|
|
128
119
|
placeholder: "Click 'Verify' to retrieve",
|
|
129
120
|
name: "webUrl",
|
|
130
121
|
value: webUrl,
|
|
131
122
|
disabled: true
|
|
132
|
-
}))), fetchedUrl &&
|
|
123
|
+
}))), fetchedUrl && React.createElement(React.Fragment, null, React.createElement(Paragraph, {
|
|
133
124
|
fontSize: "small"
|
|
134
|
-
}, "On ", fetchedUrl, ", enable ", clientLabel, " as a", ' ',
|
|
125
|
+
}, "On ", fetchedUrl, ", enable ", clientLabel, " as a", ' ', React.createElement(Link, {
|
|
135
126
|
href: "https://github.com/looker-open-source/sdk-codegen/blob/main/docs/cors.md#reference-implementation",
|
|
136
127
|
target: "_blank"
|
|
137
|
-
}, "Looker OAuth client"), ' ', "by adding \"", window.location.origin, "\" to the", ' ',
|
|
128
|
+
}, "Looker OAuth client"), ' ', "by adding \"", window.location.origin, "\" to the", ' ', React.createElement(Link, {
|
|
138
129
|
href: "".concat(webUrl, "/admin/embed"),
|
|
139
130
|
target: "_blank"
|
|
140
|
-
}, "Embedded Domain Allowlist"), ". If API Explorer is also installed, the configuration below can be used to", ' ',
|
|
131
|
+
}, "Embedded Domain Allowlist"), ". If API Explorer is also installed, the configuration below can be used to", ' ', React.createElement(Link, {
|
|
141
132
|
href: "".concat(fetchedUrl, "/extensions/marketplace_extension_api_explorer::api-explorer/4.0/methods/Auth/register_oauth_client_app"),
|
|
142
133
|
target: "_blank"
|
|
143
|
-
}, "register this API Explorer instance"), ' ', "as an OAuth client."),
|
|
134
|
+
}, "register this API Explorer instance"), ' ', "as an OAuth client."), React.createElement(CodeCopy, {
|
|
144
135
|
key: "appConfig",
|
|
145
136
|
language: "json",
|
|
146
137
|
code: appConfig
|
|
147
|
-
})),
|
|
138
|
+
})), React.createElement(Space, null, React.createElement(Tooltip, {
|
|
148
139
|
content: "Clear the configuration values"
|
|
149
|
-
},
|
|
140
|
+
}, React.createElement(ButtonTransparent, {
|
|
150
141
|
onClick: handleClear,
|
|
151
142
|
disabled: clearButtonDisabled
|
|
152
|
-
}, "Clear")),
|
|
143
|
+
}, "Clear")), React.createElement(Tooltip, {
|
|
153
144
|
content: "Verify ".concat(apiServerUrl)
|
|
154
|
-
},
|
|
145
|
+
}, React.createElement(ButtonTransparent, {
|
|
155
146
|
disabled: verifyButtonDisabled,
|
|
156
147
|
onClick: handleVerify,
|
|
157
148
|
mr: "small"
|
|
158
|
-
}, "Verify")),
|
|
149
|
+
}, "Verify")), React.createElement(Tooltip, {
|
|
159
150
|
content: "Save the configuration for this browser"
|
|
160
|
-
},
|
|
151
|
+
}, React.createElement(Button, {
|
|
161
152
|
disabled: saveButtonDisabled,
|
|
162
153
|
onClick: handleSave,
|
|
163
154
|
mr: "small"
|
|
164
|
-
}, "Save"))))),
|
|
155
|
+
}, "Save"))))), React.createElement(Divider, {
|
|
165
156
|
appearance: "light"
|
|
166
|
-
}),
|
|
157
|
+
}), React.createElement(CollapserCard, {
|
|
167
158
|
heading: "2. Login to instance",
|
|
168
159
|
divider: false,
|
|
169
160
|
id: "login_section",
|
|
170
161
|
defaultOpen: !isAuthenticated()
|
|
171
|
-
},
|
|
162
|
+
}, React.createElement(SpaceVertical, {
|
|
172
163
|
pt: "u3",
|
|
173
164
|
px: "u6"
|
|
174
|
-
}, isAuthenticated() ?
|
|
165
|
+
}, isAuthenticated() ? React.createElement(Span, null, "You are already logged in. Reload the page to log out.") : isConfigured() ? React.createElement(React.Fragment, null, React.createElement(Span, null, readyToLogin)) : React.createElement(Span, null, "You will be able to login after you Verify your API Server URL"), React.createElement(Tooltip, {
|
|
175
166
|
content: "Login to ".concat(webUrl, " using OAuth")
|
|
176
|
-
},
|
|
167
|
+
}, React.createElement(Button, {
|
|
177
168
|
onClick: handleLogin,
|
|
178
169
|
disabled: loginButtonDisabled
|
|
179
170
|
}, "Login")))));
|
|
180
171
|
};
|
|
181
|
-
exports.OAuthForm = OAuthForm;
|
|
182
172
|
//# sourceMappingURL=OAuthForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthForm.js","names":["_react","_interopRequireWildcard","require","_components","_codeEditor","_reactRouterDom","_","_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","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","readyToLogin","exports","OAuthForm","_ref","setHasConfig","clientId","clientLabel","configKey","location","useLocation","redirect_uri","appPath","appConfig","concat","adaptor","getEnvAdaptor","sdk","initAction","setUrlAction","clearConfigAction","verifyConfigAction","clearMessageBarAction","saveConfigAction","useOAuthFormActions","apiServerUrl","fetchedUrl","webUrl","messageBar","validationMessages","savedConfig","useOAuthFormState","isConfigured","base_url","looker_url","handleSave","client_id","handleVerify","handleClear","_ref2","isAuthenticated","handleUrlChange","event","name","currentTarget","authSession","verifyButtonDisabled","trim","length","keys","saveButtonDisabled","clearButtonDisabled","loginButtonDisabled","handleLogin","_ref3","e","preventDefault","login","_x","useEffect","createElement","SpaceVertical","gap","ConfigHeading","Span","fontSize","MessageBar","intent","onPrimaryClick","visible","text","CollapserCard","heading","id","divider","defaultOpen","pt","px","Form","Fieldset","legend","FieldText","required","label","placeholder","onChange","disabled","Fragment","Paragraph","Link","href","target","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 {\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 { useLocation } from 'react-router-dom'\nimport { appPath, getEnvAdaptor } from '../../..'\nimport { useOAuthFormActions, useOAuthFormState } from '../state/slice'\nimport { CollapserCard } from './CollapserCard'\nimport { ConfigHeading } from './ConfigHeading'\nexport const readyToLogin =\n 'OAuth is configured but your browser session is not authenticated. Click Login.'\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 initAction,\n setUrlAction,\n clearConfigAction,\n verifyConfigAction,\n clearMessageBarAction,\n saveConfigAction,\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 handleSave = () => {\n saveConfigAction({\n configKey,\n setHasConfig,\n client_id: clientId,\n redirect_uri,\n })\n }\n\n const handleVerify = () => {\n verifyConfigAction()\n }\n\n const handleClear = async () => {\n clearConfigAction({\n configKey,\n setHasConfig: setHasConfig,\n isAuthenticated: isAuthenticated(),\n })\n }\n\n const handleUrlChange = (event: FormEvent<HTMLInputElement>) => {\n setUrlAction({\n name: event.currentTarget.name,\n value: event.currentTarget.value,\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 initAction(configKey)\n }, [configKey, initAction])\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={clearMessageBarAction}\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\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;AACA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,CAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,cAAA,GAAAP,OAAA;AAA+C,SAAAQ,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gB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,CAAQ,CAC1B,GAEHrD,MAAA,CAAAiB,OAAA,CAAA+F,aAAA,CAAC7G,WAAA,CAAAiH,IAAI,QAAC,gEAEN,CACD,EACDpH,MAAA,CAAAiB,OAAA,CAAA+F,aAAA,CAAC7G,WAAA,CAAAmJ,OAAO;IAACC,OAAO,cAAArF,MAAA,CAAca,MAAM;EAAe,GACjD/E,MAAA,CAAAiB,OAAA,CAAA+F,aAAA,CAAC7G,WAAA,CAAAwJ,MAAM;IAACF,OAAO,EAAEhD,WAAY;IAACiC,QAAQ,EAAElC;EAAoB,GAAC,OAE7D,CAAS,CACD,CACI,CACF,CACF;AAEpB,CAAC;AAAAlD,OAAA,CAAAC,SAAA,GAAAA,SAAA"}
|
|
1
|
+
{"version":3,"file":"OAuthForm.js","names":["React","useEffect","Button","ButtonTransparent","Divider","Fieldset","FieldText","Form","MessageBar","Paragraph","Link","Space","SpaceVertical","Span","Tooltip","CodeCopy","useLocation","appPath","getEnvAdaptor","useOAuthFormActions","useOAuthFormState","CollapserCard","ConfigHeading","readyToLogin","OAuthForm","_ref","setHasConfig","clientId","clientLabel","configKey","location","redirect_uri","appConfig","concat","adaptor","sdk","initAction","setUrlAction","clearConfigAction","verifyConfigAction","clearMessageBarAction","saveConfigAction","apiServerUrl","fetchedUrl","webUrl","messageBar","validationMessages","savedConfig","isConfigured","base_url","looker_url","handleSave","client_id","handleVerify","handleClear","_ref2","_asyncToGenerator","isAuthenticated","apply","arguments","handleUrlChange","event","name","currentTarget","value","authSession","verifyButtonDisabled","trim","length","Object","keys","saveButtonDisabled","clearButtonDisabled","loginButtonDisabled","handleLogin","_ref3","e","preventDefault","login","_x","createElement","gap","fontSize","intent","onPrimaryClick","visible","text","heading","id","divider","defaultOpen","pt","px","legend","required","label","placeholder","onChange","disabled","Fragment","href","target","window","origin","key","language","code","content","onClick","mr","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 {\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 { useLocation } from 'react-router-dom'\nimport { appPath, getEnvAdaptor } from '../../..'\nimport { useOAuthFormActions, useOAuthFormState } from '../state/slice'\nimport { CollapserCard } from './CollapserCard'\nimport { ConfigHeading } from './ConfigHeading'\nexport const readyToLogin =\n 'OAuth is configured but your browser session is not authenticated. Click Login.'\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 initAction,\n setUrlAction,\n clearConfigAction,\n verifyConfigAction,\n clearMessageBarAction,\n saveConfigAction,\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 handleSave = () => {\n saveConfigAction({\n configKey,\n setHasConfig,\n client_id: clientId,\n redirect_uri,\n })\n }\n\n const handleVerify = () => {\n verifyConfigAction()\n }\n\n const handleClear = async () => {\n clearConfigAction({\n configKey,\n setHasConfig: setHasConfig,\n isAuthenticated: isAuthenticated(),\n })\n }\n\n const handleUrlChange = (event: FormEvent<HTMLInputElement>) => {\n setUrlAction({\n name: event.currentTarget.name,\n value: event.currentTarget.value,\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 initAction(configKey)\n }, [configKey, initAction])\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={clearMessageBarAction}\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\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,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SACEC,MAAM,EACNC,iBAAiB,EACjBC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,IAAI,EACJC,UAAU,EACVC,SAAS,EACTC,IAAI,EACJC,KAAK,EACLC,aAAa,EACbC,IAAI,EACJC,OAAO,QACF,oBAAoB;AAC3B,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,OAAO,EAAEC,aAAa,QAAQ,UAAU;AACjD,SAASC,mBAAmB,EAAEC,iBAAiB,QAAQ,gBAAgB;AACvE,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,OAAO,IAAMC,YAAY,GACvB,iFAAiF;AAanF,OAAO,IAAMC,SAAS,GAAGC,IAAA,IAKF;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ElC,WAAY;IAACwB,QAAQ,EAAEzB;EAAoB,GAAC,OAErD,CACD,CACI,CACF,CACF,CAAC;AAEpB,CAAC"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: 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");
|
|
1
|
+
export { OAuthForm } from './OAuthForm';
|
|
13
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["OAuthForm"],"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,SAASA,SAAS,QAAQ,aAAa"}
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
|
|
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
|
-
});
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './state';
|
|
28
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"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,cAAc,cAAc;AAC5B,cAAc,SAAS"}
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
|
|
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");
|
|
1
|
+
export { OAuthFormSlice } from './slice';
|
|
13
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["OAuthFormSlice"],"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,SAASA,cAAc,QAAQ,SAAS"}
|