@looker/extension-utils 0.1.22 → 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.
Files changed (96) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/lib/APIErrorDisplay/APIErrorContent.js.map +1 -1
  3. package/lib/APIErrorDisplay/APIErrorDetails.js.map +1 -1
  4. package/lib/APIErrorDisplay/APIErrorDialog.js.map +1 -1
  5. package/lib/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
  6. package/lib/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
  7. package/lib/APIErrorDisplay/index.js.map +1 -1
  8. package/lib/APIErrorDisplay/utils.js.map +1 -1
  9. package/lib/ExtMarkdown.js.map +1 -1
  10. package/lib/OAuthForm/index.d.ts +1 -0
  11. package/lib/OAuthForm/index.js +17 -0
  12. package/lib/OAuthForm/index.js.map +1 -0
  13. package/lib/{esm/OAuthConfigForm/Collapser → OAuthForm/src/components}/CollapserCard.js +1 -1
  14. package/lib/OAuthForm/src/components/CollapserCard.js.map +1 -0
  15. package/lib/{OAuthConfigForm → OAuthForm/src/components}/ConfigHeading.js +1 -1
  16. package/lib/OAuthForm/src/components/ConfigHeading.js.map +1 -0
  17. package/lib/{OAuthConfigForm/OAuthConfigForm.d.ts → OAuthForm/src/components/OAuthForm.d.ts} +1 -1
  18. package/lib/{OAuthConfigForm/OAuthConfigForm.js → OAuthForm/src/components/OAuthForm.js} +112 -146
  19. package/lib/OAuthForm/src/components/OAuthForm.js.map +1 -0
  20. package/lib/OAuthForm/src/components/index.d.ts +1 -0
  21. package/lib/OAuthForm/src/components/index.js +13 -0
  22. package/lib/OAuthForm/src/components/index.js.map +1 -0
  23. package/lib/OAuthForm/src/index.d.ts +2 -0
  24. package/lib/OAuthForm/src/index.js +28 -0
  25. package/lib/OAuthForm/src/index.js.map +1 -0
  26. package/lib/OAuthForm/src/state/index.d.ts +1 -0
  27. package/lib/OAuthForm/src/state/index.js +13 -0
  28. package/lib/OAuthForm/src/state/index.js.map +1 -0
  29. package/lib/OAuthForm/src/state/slice.d.ts +64 -0
  30. package/lib/OAuthForm/src/state/slice.js +83 -0
  31. package/lib/OAuthForm/src/state/slice.js.map +1 -0
  32. package/lib/OAuthForm/src/utils.js.map +1 -0
  33. package/lib/OAuthScene.js.map +1 -1
  34. package/lib/adaptorUtils.js.map +1 -1
  35. package/lib/authUtils.js.map +1 -1
  36. package/lib/browserAdaptor.js.map +1 -1
  37. package/lib/esm/APIErrorDisplay/APIErrorContent.js.map +1 -1
  38. package/lib/esm/APIErrorDisplay/APIErrorDetails.js.map +1 -1
  39. package/lib/esm/APIErrorDisplay/APIErrorDialog.js.map +1 -1
  40. package/lib/esm/APIErrorDisplay/APIErrorDisplay.js.map +1 -1
  41. package/lib/esm/APIErrorDisplay/APIErrorDocLink.js.map +1 -1
  42. package/lib/esm/APIErrorDisplay/index.js.map +1 -1
  43. package/lib/esm/APIErrorDisplay/utils.js.map +1 -1
  44. package/lib/esm/ExtMarkdown.js.map +1 -1
  45. package/lib/esm/OAuthForm/index.js +17 -0
  46. package/lib/esm/OAuthForm/index.js.map +1 -0
  47. package/lib/{OAuthConfigForm/Collapser → esm/OAuthForm/src/components}/CollapserCard.js +1 -1
  48. package/lib/esm/OAuthForm/src/components/CollapserCard.js.map +1 -0
  49. package/lib/esm/{OAuthConfigForm → OAuthForm/src/components}/ConfigHeading.js +1 -1
  50. package/lib/esm/OAuthForm/src/components/ConfigHeading.js.map +1 -0
  51. package/lib/esm/{OAuthConfigForm/OAuthConfigForm.js → OAuthForm/src/components/OAuthForm.js} +112 -146
  52. package/lib/esm/OAuthForm/src/components/OAuthForm.js.map +1 -0
  53. package/lib/esm/OAuthForm/src/components/index.js +13 -0
  54. package/lib/esm/OAuthForm/src/components/index.js.map +1 -0
  55. package/lib/esm/OAuthForm/src/index.js +28 -0
  56. package/lib/esm/OAuthForm/src/index.js.map +1 -0
  57. package/lib/esm/OAuthForm/src/state/index.js +13 -0
  58. package/lib/esm/OAuthForm/src/state/index.js.map +1 -0
  59. package/lib/esm/OAuthForm/src/state/slice.js +83 -0
  60. package/lib/esm/OAuthForm/src/state/slice.js.map +1 -0
  61. package/lib/esm/OAuthForm/src/utils.js.map +1 -0
  62. package/lib/esm/OAuthScene.js.map +1 -1
  63. package/lib/esm/adaptorUtils.js.map +1 -1
  64. package/lib/esm/authUtils.js.map +1 -1
  65. package/lib/esm/browserAdaptor.js.map +1 -1
  66. package/lib/esm/extensionAdaptor.js.map +1 -1
  67. package/lib/esm/index.js +4 -4
  68. package/lib/esm/index.js.map +1 -1
  69. package/lib/extensionAdaptor.js.map +1 -1
  70. package/lib/index.d.ts +1 -1
  71. package/lib/index.js +4 -4
  72. package/lib/index.js.map +1 -1
  73. package/package.json +8 -5
  74. package/lib/OAuthConfigForm/Collapser/CollapserCard.js.map +0 -1
  75. package/lib/OAuthConfigForm/Collapser/index.d.ts +0 -1
  76. package/lib/OAuthConfigForm/Collapser/index.js +0 -13
  77. package/lib/OAuthConfigForm/Collapser/index.js.map +0 -1
  78. package/lib/OAuthConfigForm/ConfigHeading.js.map +0 -1
  79. package/lib/OAuthConfigForm/OAuthConfigForm.js.map +0 -1
  80. package/lib/OAuthConfigForm/index.d.ts +0 -1
  81. package/lib/OAuthConfigForm/index.js +0 -13
  82. package/lib/OAuthConfigForm/index.js.map +0 -1
  83. package/lib/OAuthConfigForm/utils.js.map +0 -1
  84. package/lib/esm/OAuthConfigForm/Collapser/CollapserCard.js.map +0 -1
  85. package/lib/esm/OAuthConfigForm/Collapser/index.js +0 -13
  86. package/lib/esm/OAuthConfigForm/Collapser/index.js.map +0 -1
  87. package/lib/esm/OAuthConfigForm/ConfigHeading.js.map +0 -1
  88. package/lib/esm/OAuthConfigForm/OAuthConfigForm.js.map +0 -1
  89. package/lib/esm/OAuthConfigForm/index.js +0 -13
  90. package/lib/esm/OAuthConfigForm/index.js.map +0 -1
  91. package/lib/esm/OAuthConfigForm/utils.js.map +0 -1
  92. /package/lib/{OAuthConfigForm/Collapser → OAuthForm/src/components}/CollapserCard.d.ts +0 -0
  93. /package/lib/{OAuthConfigForm → OAuthForm/src/components}/ConfigHeading.d.ts +0 -0
  94. /package/lib/{OAuthConfigForm → OAuthForm/src}/utils.d.ts +0 -0
  95. /package/lib/{OAuthConfigForm → OAuthForm/src}/utils.js +0 -0
  96. /package/lib/esm/{OAuthConfigForm → OAuthForm/src}/utils.js +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,38 @@
7
7
  * @looker/extension-sdk bumped from ^23.0.0 to ^23.2.0
8
8
  * @looker/extension-sdk-react bumped from ^23.0.0 to ^23.2.0
9
9
 
10
+ ### Dependencies
11
+
12
+ * The following workspace dependencies were updated
13
+ * dependencies
14
+ * @looker/extension-sdk bumped from ^23.4.0 to ^23.6.0
15
+ * @looker/extension-sdk-react bumped from ^23.4.0 to ^23.6.0
16
+ * @looker/sdk bumped from ^23.4.0 to ^23.6.0
17
+
18
+ ### Dependencies
19
+
20
+ * The following workspace dependencies were updated
21
+ * dependencies
22
+ * @looker/extension-sdk bumped from ^23.8.0 to ^23.8.1
23
+ * @looker/extension-sdk-react bumped from ^23.8.0 to ^23.8.1
24
+ * @looker/sdk bumped from ^23.8.0 to ^23.8.1
25
+
26
+ ## [0.1.24](https://github.com/looker-open-source/sdk-codegen/compare/extension-utils-v0.1.23...extension-utils-v0.1.24) (2023-05-11)
27
+
28
+
29
+ ### Features
30
+
31
+ * replace @looker/redux for with npm dependency ([#1307](https://github.com/looker-open-source/sdk-codegen/issues/1307)) ([baa58db](https://github.com/looker-open-source/sdk-codegen/commit/baa58db1bce9d974384c63a0e11301f38774a7b2))
32
+
33
+
34
+ ### Dependencies
35
+
36
+ * The following workspace dependencies were updated
37
+ * dependencies
38
+ * @looker/extension-sdk bumped from ^23.6.0 to ^23.8.0
39
+ * @looker/extension-sdk-react bumped from ^23.6.0 to ^23.8.0
40
+ * @looker/sdk bumped from ^23.6.0 to ^23.8.0
41
+
10
42
  ## [0.1.22](https://github.com/looker-open-source/sdk-codegen/compare/extension-utils-v0.1.21...extension-utils-v0.1.22) (2023-03-31)
11
43
 
12
44
 
@@ -1 +1 @@
1
- {"version":3,"file":"APIErrorContent.js","names":["APIErrorContent","error","showDoc","doc","setDoc","useState","getDoc","useCallback","docUrl","adaptor","getEnvAdaptor","errDoc","ErrorDoc","sdk","apiErrorDisplayFetch","content","useEffect","documentation_url"],"sources":["../../src/APIErrorDisplay/APIErrorContent.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { ErrorDoc } from '@looker/sdk-rtl'\nimport { getEnvAdaptor } from '../adaptorUtils'\nimport { ExtMarkdown } from '../ExtMarkdown'\nimport { APIErrorDetails } from './APIErrorDetails'\nimport { APIErrorDocLink } from './APIErrorDocLink'\nimport type { APIErrorDisplayProps } from './APIErrorDisplay'\nimport { apiErrorDisplayFetch } from './utils'\n\n/**\n * Shows available content of an API Error response\n * @param error to display\n * @param showDoc true to retrieve the corresponding error markdown\n */\nexport const APIErrorContent = ({ error, showDoc }: APIErrorDisplayProps) => {\n const [doc, setDoc] = useState<string>('')\n const getDoc = useCallback(\n async (docUrl: string) => {\n const adaptor = getEnvAdaptor()\n const errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch)\n setDoc(await errDoc.content(docUrl))\n },\n [error]\n )\n\n useEffect(() => {\n if (showDoc && error && error.documentation_url) {\n getDoc(error.documentation_url)\n }\n }, [error, showDoc])\n\n return (\n <>\n <APIErrorDetails error={error} />\n {!showDoc && <APIErrorDocLink docUrl={error.documentation_url ?? ''} />}\n {showDoc && doc && <ExtMarkdown source={doc} />}\n </>\n )\n}\n"],"mappings":";;;;;;AA0BA;AACA;AACA;AACA;AACA;AACA;AAEA;AAA8C;AAAA;AAAA;AAAA;AAOvC,IAAMA,eAAe,GAAG,QAA8C;EAAA;EAAA,IAA7C;IAAEC,KAAK;IAAEC;EAA8B,CAAC;EACtE,IAAM,CAACC,GAAG,EAAEC,MAAM,CAAC,GAAG,IAAAC,eAAQ,EAAS,EAAE,CAAC;EAC1C,IAAMC,MAAM,GAAG,IAAAC,kBAAW;IAAA,8BACxB,WAAOC,MAAc,EAAK;MACxB,IAAMC,OAAO,GAAG,IAAAC,2BAAa,GAAE;MAC/B,IAAMC,MAAM,GAAG,IAAIC,gBAAQ,CAACH,OAAO,CAACI,GAAG,EAAEC,2BAAoB,CAAC;MAC9DV,MAAM,OAAOO,MAAM,CAACI,OAAO,CAACP,MAAM,CAAC,CAAC;IACtC,CAAC;IAAA;MAAA;IAAA;EAAA,KACD,CAACP,KAAK,CAAC,CACR;EAED,IAAAe,gBAAS,EAAC,MAAM;IACd,IAAId,OAAO,IAAID,KAAK,IAAIA,KAAK,CAACgB,iBAAiB,EAAE;MAC/CX,MAAM,CAACL,KAAK,CAACgB,iBAAiB,CAAC;IACjC;EACF,CAAC,EAAE,CAAChB,KAAK,EAAEC,OAAO,CAAC,CAAC;EAEpB,OACE,4DACE,6BAAC,gCAAe;IAAC,KAAK,EAAED;EAAM,EAAG,EAChC,CAACC,OAAO,IAAI,6BAAC,gCAAe;IAAC,MAAM,2BAAED,KAAK,CAACgB,iBAAiB,yEAAI;EAAG,EAAG,EACtEf,OAAO,IAAIC,GAAG,IAAI,6BAAC,wBAAW;IAAC,MAAM,EAAEA;EAAI,EAAG,CAC9C;AAEP,CAAC;AAAA"}
1
+ {"version":3,"file":"APIErrorContent.js","names":["_react","_interopRequireWildcard","require","_sdkRtl","_adaptorUtils","_ExtMarkdown","_APIErrorDetails","_APIErrorDocLink","_utils","_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","APIErrorContent","_ref","_error$documentation_","showDoc","doc","setDoc","useState","getDoc","useCallback","_ref2","docUrl","adaptor","getEnvAdaptor","errDoc","ErrorDoc","sdk","apiErrorDisplayFetch","content","_x","useEffect","documentation_url","createElement","Fragment","APIErrorDetails","APIErrorDocLink","ExtMarkdown","source","exports"],"sources":["../../src/APIErrorDisplay/APIErrorContent.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { ErrorDoc } from '@looker/sdk-rtl'\nimport { getEnvAdaptor } from '../adaptorUtils'\nimport { ExtMarkdown } from '../ExtMarkdown'\nimport { APIErrorDetails } from './APIErrorDetails'\nimport { APIErrorDocLink } from './APIErrorDocLink'\nimport type { APIErrorDisplayProps } from './APIErrorDisplay'\nimport { apiErrorDisplayFetch } from './utils'\n\n/**\n * Shows available content of an API Error response\n * @param error to display\n * @param showDoc true to retrieve the corresponding error markdown\n */\nexport const APIErrorContent = ({ error, showDoc }: APIErrorDisplayProps) => {\n const [doc, setDoc] = useState<string>('')\n const getDoc = useCallback(\n async (docUrl: string) => {\n const adaptor = getEnvAdaptor()\n const errDoc = new ErrorDoc(adaptor.sdk, apiErrorDisplayFetch)\n setDoc(await errDoc.content(docUrl))\n },\n [error]\n )\n\n useEffect(() => {\n if (showDoc && error && error.documentation_url) {\n getDoc(error.documentation_url)\n }\n }, [error, showDoc])\n\n return (\n <>\n <APIErrorDetails error={error} />\n {!showDoc && <APIErrorDocLink docUrl={error.documentation_url ?? ''} />}\n {showDoc && doc && <ExtMarkdown source={doc} />}\n </>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ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,CAAC,CAAC;IACtC,CAAC;IAAA,iBAAAQ,EAAA;MAAA,OAAAT,KAAA,CAAAZ,KAAA,OAAAD,SAAA;IAAA;EAAA,KACD,CAACR,KAAK,CAAC,CACR;EAED,IAAA+B,gBAAS,EAAC,MAAM;IACd,IAAIhB,OAAO,IAAIf,KAAK,IAAIA,KAAK,CAACgC,iBAAiB,EAAE;MAC/Cb,MAAM,CAACnB,KAAK,CAACgC,iBAAiB,CAAC;IACjC;EACF,CAAC,EAAE,CAAChC,KAAK,EAAEe,OAAO,CAAC,CAAC;EAEpB,OACEvD,MAAA,CAAAgB,OAAA,CAAAyD,aAAA,CAAAzE,MAAA,CAAAgB,OAAA,CAAA0D,QAAA,QACE1E,MAAA,CAAAgB,OAAA,CAAAyD,aAAA,CAACnE,gBAAA,CAAAqE,eAAe;IAACnC,KAAK,EAAEA;EAAM,EAAG,EAChC,CAACe,OAAO,IAAIvD,MAAA,CAAAgB,OAAA,CAAAyD,aAAA,CAAClE,gBAAA,CAAAqE,eAAe;IAACd,MAAM,GAAAR,qBAAA,GAAEd,KAAK,CAACgC,iBAAiB,cAAAlB,qBAAA,cAAAA,qBAAA,GAAI;EAAG,EAAG,EACtEC,OAAO,IAAIC,GAAG,IAAIxD,MAAA,CAAAgB,OAAA,CAAAyD,aAAA,CAACpE,YAAA,CAAAwE,WAAW;IAACC,MAAM,EAAEtB;EAAI,EAAG,CAC9C;AAEP,CAAC;AAAAuB,OAAA,CAAA3B,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"APIErrorDetails.js","names":["APIErrorDetails","error","errors","map","index","field","code","message"],"sources":["../../src/APIErrorDisplay/APIErrorDetails.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { LookerSDKError } from '@looker/sdk-rtl'\nimport React from 'react'\nimport {\n Span,\n Table,\n TableBody,\n TableDataCell,\n TableHead,\n TableHeaderCell,\n TableRow,\n} from '@looker/components'\n\ninterface APIErrorDetailsProps {\n error: LookerSDKError\n}\n\n/**\n * Shows the detailed API errors table\n *\n * Because documentation_url is currently identical with the main documentation_url\n * it is not included in the table\n *\n * @param error to display\n */\nexport const APIErrorDetails = ({ error }: APIErrorDetailsProps) => {\n if (!error?.errors) return <></>\n\n return (\n <Table>\n <TableHead>\n <TableRow>\n <TableHeaderCell p=\"xsmall\">Field</TableHeaderCell>\n <TableHeaderCell p=\"xsmall\">Code</TableHeaderCell>\n <TableHeaderCell p=\"xsmall\">Message</TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {error.errors.map(({ field, code, message }, index) => (\n <TableRow key={`${field}${index}`}>\n <TableDataCell p=\"xsmall\">{field}</TableDataCell>\n <TableDataCell p=\"xsmall\">{code}</TableDataCell>\n <TableDataCell p=\"xsmall\">\n <Span>{message}</Span>\n </TableDataCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n )\n}\n"],"mappings":";;;;;;AA2BA;AACA;AAQ2B;AAcpB,IAAMA,eAAe,GAAG,QAAqC;EAAA,IAApC;IAAEC;EAA4B,CAAC;EAC7D,IAAI,EAACA,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEC,MAAM,GAAE,OAAO,2DAAK;EAEhC,OACE,6BAAC,iBAAK,QACJ,6BAAC,qBAAS,QACR,6BAAC,oBAAQ,QACP,6BAAC,2BAAe;IAAC,CAAC,EAAC;EAAQ,GAAC,OAAK,CAAkB,EACnD,6BAAC,2BAAe;IAAC,CAAC,EAAC;EAAQ,GAAC,MAAI,CAAkB,EAClD,6BAAC,2BAAe;IAAC,CAAC,EAAC;EAAQ,GAAC,SAAO,CAAkB,CAC5C,CACD,EACZ,6BAAC,qBAAS,QACPD,KAAK,CAACC,MAAM,CAACC,GAAG,CAAC,QAA2BC,KAAK;IAAA,IAA/B;MAAEC,KAAK;MAAEC,IAAI;MAAEC;IAAQ,CAAC;IAAA,OACzC,6BAAC,oBAAQ;MAAC,GAAG,YAAKF,KAAK,SAAGD,KAAK;IAAG,GAChC,6BAAC,yBAAa;MAAC,CAAC,EAAC;IAAQ,GAAEC,KAAK,CAAiB,EACjD,6BAAC,yBAAa;MAAC,CAAC,EAAC;IAAQ,GAAEC,IAAI,CAAiB,EAChD,6BAAC,yBAAa;MAAC,CAAC,EAAC;IAAQ,GACvB,6BAAC,gBAAI,QAAEC,OAAO,CAAQ,CACR,CACP;EAAA,CACZ,CAAC,CACQ,CACN;AAEZ,CAAC;AAAA"}
1
+ {"version":3,"file":"APIErrorDetails.js","names":["_react","_interopRequireDefault","require","_components","obj","__esModule","default","APIErrorDetails","_ref","error","errors","createElement","Fragment","Table","TableHead","TableRow","TableHeaderCell","p","TableBody","map","_ref2","index","field","code","message","key","concat","TableDataCell","Span","exports"],"sources":["../../src/APIErrorDisplay/APIErrorDetails.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { LookerSDKError } from '@looker/sdk-rtl'\nimport React from 'react'\nimport {\n Span,\n Table,\n TableBody,\n TableDataCell,\n TableHead,\n TableHeaderCell,\n TableRow,\n} from '@looker/components'\n\ninterface APIErrorDetailsProps {\n error: LookerSDKError\n}\n\n/**\n * Shows the detailed API errors table\n *\n * Because documentation_url is currently identical with the main documentation_url\n * it is not included in the table\n *\n * @param error to display\n */\nexport const APIErrorDetails = ({ error }: APIErrorDetailsProps) => {\n if (!error?.errors) return <></>\n\n return (\n <Table>\n <TableHead>\n <TableRow>\n <TableHeaderCell p=\"xsmall\">Field</TableHeaderCell>\n <TableHeaderCell p=\"xsmall\">Code</TableHeaderCell>\n <TableHeaderCell p=\"xsmall\">Message</TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {error.errors.map(({ field, code, message }, index) => (\n <TableRow key={`${field}${index}`}>\n <TableDataCell p=\"xsmall\">{field}</TableDataCell>\n <TableDataCell p=\"xsmall\">{code}</TableDataCell>\n <TableDataCell p=\"xsmall\">\n <Span>{message}</Span>\n </Table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AAAJ,KAAA;IAAA,OACzCpB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAY,QAAQ;MAACU,GAAG,KAAAC,MAAA,CAAKJ,KAAK,EAAAI,MAAA,CAAGL,KAAK;IAAG,GAChCrB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAwB,aAAa;MAACV,CAAC,EAAC;IAAQ,GAAEK,KAAK,CAAiB,EACjDtB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAwB,aAAa;MAACV,CAAC,EAAC;IAAQ,GAAEM,IAAI,CAAiB,EAChDvB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAwB,aAAa;MAACV,CAAC,EAAC;IAAQ,GACvBjB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAyB,IAAI,QAAEJ,OAAO,CAAQ,CACR,CACP;EAAA,CACZ,CAAC,CACQ,CACN;AAEZ,CAAC;AAAAK,OAAA,CAAAtB,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"APIErrorDialog.js","names":["APIErrorDialog","error","isOpen","setOpen","showDoc","errorHeading"],"sources":["../../src/APIErrorDisplay/APIErrorDialog.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport { Button, Dialog, DialogLayout } from '@looker/components'\nimport type { APIErrorDisplayProps } from './APIErrorDisplay'\nimport { APIErrorContent } from './APIErrorContent'\nimport { errorHeading } from './utils'\n\ninterface APIErrorDialogProps extends APIErrorDisplayProps {\n /** toggle for dialog being open */\n isOpen: boolean\n /** callback for toggling the dialog display */\n setOpen: (open: boolean) => void\n}\n\nexport const APIErrorDialog = ({\n error,\n isOpen,\n setOpen,\n showDoc = false,\n}: APIErrorDialogProps) => (\n <Dialog\n isOpen={isOpen}\n content={\n <DialogLayout\n header={errorHeading(error)}\n footer={\n <Button size=\"xsmall\" onClick={() => setOpen && setOpen(false)}>\n OK\n </Button>\n }\n >\n <APIErrorContent error={error} showDoc={showDoc} />\n </DialogLayout>\n }\n />\n)\n"],"mappings":";;;;;;AA0BA;AACA;AAEA;AACA;AAAsC;AAS/B,IAAMA,cAAc,GAAG;EAAA,IAAC;IAC7BC,KAAK;IACLC,MAAM;IACNC,OAAO;IACPC,OAAO,GAAG;EACS,CAAC;EAAA,OACpB,6BAAC,kBAAM;IACL,MAAM,EAAEF,MAAO;IACf,OAAO,EACL,6BAAC,wBAAY;MACX,MAAM,EAAE,IAAAG,mBAAY,EAACJ,KAAK,CAAE;MAC5B,MAAM,EACJ,6BAAC,kBAAM;QAAC,IAAI,EAAC,QAAQ;QAAC,OAAO,EAAE,MAAME,OAAO,IAAIA,OAAO,CAAC,KAAK;MAAE,GAAC,IAEhE;IACD,GAED,6BAAC,gCAAe;MAAC,KAAK,EAAEF,KAAM;MAAC,OAAO,EAAEG;IAAQ,EAAG;EAEtD,EACD;AAAA,CACH;AAAA"}
1
+ {"version":3,"file":"APIErrorDialog.js","names":["_react","_interopRequireDefault","require","_components","_APIErrorContent","_utils","obj","__esModule","default","APIErrorDialog","_ref","error","isOpen","setOpen","showDoc","createElement","Dialog","content","DialogLayout","header","errorHeading","footer","Button","size","onClick","APIErrorContent","exports"],"sources":["../../src/APIErrorDisplay/APIErrorDialog.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport { Button, Dialog, DialogLayout } from '@looker/components'\nimport type { APIErrorDisplayProps } from './APIErrorDisplay'\nimport { APIErrorContent } from './APIErrorContent'\nimport { errorHeading } from './utils'\n\ninterface APIErrorDialogProps extends APIErrorDisplayProps {\n /** toggle for dialog being open */\n isOpen: boolean\n /** callback for toggling the dialog display */\n setOpen: (open: boolean) => void\n}\n\nexport const APIErrorDialog = ({\n error,\n isOpen,\n setOpen,\n showDoc = false,\n}: APIErrorDialogProps) => (\n <Dialog\n isOpen={isOpen}\n content={\n <DialogLayout\n header={errorHeading(error)}\n footer={\n <Button size=\"xsmall\" onClick={() => setOpen && setOpen(false)}>\n OK\n </Button>\n }\n >\n <APIErrorContent error={error} showDoc={showDoc} />\n </DialogLayout>\n }\n />\n)\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAsC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAS/B,IAAMG,cAAc,GAAGC,IAAA;EAAA,IAAC;IAC7BC,KAAK;IACLC,MAAM;IACNC,OAAO;IACPC,OAAO,GAAG;EACS,CAAC,GAAAJ,IAAA;EAAA,OACpBV,MAAA,CAAAQ,OAAA,CAAAO,aAAA,CAACZ,WAAA,CAAAa,MAAM;IACLJ,MAAM,EAAEA,MAAO;IACfK,OAAO,EACLjB,MAAA,CAAAQ,OAAA,CAAAO,aAAA,CAACZ,WAAA,CAAAe,YAAY;MACXC,MAAM,EAAE,IAAAC,mBAAY,EAACT,KAAK,CAAE;MAC5BU,MAAM,EACJrB,MAAA,CAAAQ,OAAA,CAAAO,aAAA,CAACZ,WAAA,CAAAmB,MAAM;QAACC,IAAI,EAAC,QAAQ;QAACC,OAAO,EAAEA,CAAA,KAAMX,OAAO,IAAIA,OAAO,CAAC,KAAK;MAAE,GAAC,IAEhE;IACD,GAEDb,MAAA,CAAAQ,OAAA,CAAAO,aAAA,CAACX,gBAAA,CAAAqB,eAAe;MAACd,KAAK,EAAEA,KAAM;MAACG,OAAO,EAAEA;IAAQ,EAAG;EAEtD,EACD;AAAA,CACH;AAAAY,OAAA,CAAAjB,cAAA,GAAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"APIErrorDisplay.js","names":["APIErrorDisplay","error","showDoc","errorHeading"],"sources":["../../src/APIErrorDisplay/APIErrorDisplay.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport type { LookerSDKError } from '@looker/sdk-rtl'\nimport { Heading, SpaceVertical } from '@looker/components'\nimport { APIErrorContent } from './APIErrorContent'\nimport { errorHeading } from './utils'\n\nexport interface APIErrorDisplayProps {\n /** Populated SDK error information, which may contain detailed errors */\n error: LookerSDKError\n /** true to retrieve the markdown error document from the CDN and display it instead of a link */\n showDoc?: boolean\n}\n\n/**\n * Show API error information in the parent React component\n * @param error to display\n * @param showDoc true to fetch the error document markdown. false for a clickable link\n */\nexport const APIErrorDisplay = ({\n error,\n showDoc = false,\n}: APIErrorDisplayProps) => {\n return (\n <>\n {error && (\n <SpaceVertical>\n <Heading type=\"h2\">{errorHeading(error)}</Heading>\n <APIErrorContent error={error} showDoc={showDoc} />\n </SpaceVertical>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA0BA;AAEA;AACA;AACA;AAAsC;AAc/B,IAAMA,eAAe,GAAG,QAGH;EAAA,IAHI;IAC9BC,KAAK;IACLC,OAAO,GAAG;EACU,CAAC;EACrB,OACE,4DACGD,KAAK,IACJ,6BAAC,yBAAa,QACZ,6BAAC,mBAAO;IAAC,IAAI,EAAC;EAAI,GAAE,IAAAE,mBAAY,EAACF,KAAK,CAAC,CAAW,EAClD,6BAAC,gCAAe;IAAC,KAAK,EAAEA,KAAM;IAAC,OAAO,EAAEC;EAAQ,EAAG,CAEtD,CACA;AAEP,CAAC;AAAA"}
1
+ {"version":3,"file":"APIErrorDisplay.js","names":["_react","_interopRequireDefault","require","_components","_APIErrorContent","_utils","obj","__esModule","default","APIErrorDisplay","_ref","error","showDoc","createElement","Fragment","SpaceVertical","Heading","type","errorHeading","APIErrorContent","exports"],"sources":["../../src/APIErrorDisplay/APIErrorDisplay.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport type { LookerSDKError } from '@looker/sdk-rtl'\nimport { Heading, SpaceVertical } from '@looker/components'\nimport { APIErrorContent } from './APIErrorContent'\nimport { errorHeading } from './utils'\n\nexport interface APIErrorDisplayProps {\n /** Populated SDK error information, which may contain detailed errors */\n error: LookerSDKError\n /** true to retrieve the markdown error document from the CDN and display it instead of a link */\n showDoc?: boolean\n}\n\n/**\n * Show API error information in the parent React component\n * @param error to display\n * @param showDoc true to fetch the error document markdown. false for a clickable link\n */\nexport const APIErrorDisplay = ({\n error,\n showDoc = false,\n}: APIErrorDisplayProps) => {\n return (\n <>\n {error && (\n <SpaceVertical>\n <Heading type=\"h2\">{errorHeading(error)}</Heading>\n <APIErrorContent error={error} showDoc={showDoc} />\n </SpaceVertical>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAsC,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAc/B,IAAMG,eAAe,GAAGC,IAAA,IAGH;EAAA,IAHI;IAC9BC,KAAK;IACLC,OAAO,GAAG;EACU,CAAC,GAAAF,IAAA;EACrB,OACEV,MAAA,CAAAQ,OAAA,CAAAK,aAAA,CAAAb,MAAA,CAAAQ,OAAA,CAAAM,QAAA,QACGH,KAAK,IACJX,MAAA,CAAAQ,OAAA,CAAAK,aAAA,CAACV,WAAA,CAAAY,aAAa,QACZf,MAAA,CAAAQ,OAAA,CAAAK,aAAA,CAACV,WAAA,CAAAa,OAAO;IAACC,IAAI,EAAC;EAAI,GAAE,IAAAC,mBAAY,EAACP,KAAK,CAAC,CAAW,EAClDX,MAAA,CAAAQ,OAAA,CAAAK,aAAA,CAACT,gBAAA,CAAAe,eAAe;IAACR,KAAK,EAAEA,KAAM;IAACC,OAAO,EAAEA;EAAQ,EAAG,CAEtD,CACA;AAEP,CAAC;AAAAQ,OAAA,CAAAX,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"APIErrorDocLink.js","names":["APIErrorDocLink","docUrl","onClick","e","preventDefault","adaptor","getEnvAdaptor","openBrowserWindow","currentTarget","href"],"sources":["../../src/APIErrorDisplay/APIErrorDocLink.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport { Link } from '@looker/components'\nimport { getEnvAdaptor } from '../adaptorUtils'\n\ninterface APIErrorDocLinkProps {\n docUrl?: string\n}\n\nexport const APIErrorDocLink = ({ docUrl }: APIErrorDocLinkProps) => {\n const onClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault()\n const adaptor = getEnvAdaptor()\n adaptor.openBrowserWindow(e.currentTarget.href)\n }\n\n if (!docUrl) return <></>\n return (\n <Link href={docUrl} key={docUrl} onClick={onClick}>\n More information\n </Link>\n )\n}\n"],"mappings":";;;;;;AA0BA;AACA;AACA;AAA+C;AAMxC,IAAMA,eAAe,GAAG,QAAsC;EAAA,IAArC;IAAEC;EAA6B,CAAC;EAC9D,IAAMC,OAAO,GAAIC,CAAsC,IAAK;IAC1DA,CAAC,CAACC,cAAc,EAAE;IAClB,IAAMC,OAAO,GAAG,IAAAC,2BAAa,GAAE;IAC/BD,OAAO,CAACE,iBAAiB,CAACJ,CAAC,CAACK,aAAa,CAACC,IAAI,CAAC;EACjD,CAAC;EAED,IAAI,CAACR,MAAM,EAAE,OAAO,2DAAK;EACzB,OACE,6BAAC,gBAAI;IAAC,IAAI,EAAEA,MAAO;IAAC,GAAG,EAAEA,MAAO;IAAC,OAAO,EAAEC;EAAQ,GAAC,kBAEnD,CAAO;AAEX,CAAC;AAAA"}
1
+ {"version":3,"file":"APIErrorDocLink.js","names":["_react","_interopRequireDefault","require","_components","_adaptorUtils","obj","__esModule","default","APIErrorDocLink","_ref","docUrl","onClick","e","preventDefault","adaptor","getEnvAdaptor","openBrowserWindow","currentTarget","href","createElement","Fragment","Link","key","exports"],"sources":["../../src/APIErrorDisplay/APIErrorDocLink.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React from 'react'\nimport { Link } from '@looker/components'\nimport { getEnvAdaptor } from '../adaptorUtils'\n\ninterface APIErrorDocLinkProps {\n docUrl?: string\n}\n\nexport const APIErrorDocLink = ({ docUrl }: APIErrorDocLinkProps) => {\n const onClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault()\n const adaptor = getEnvAdaptor()\n adaptor.openBrowserWindow(e.currentTarget.href)\n }\n\n if (!docUrl) return <></>\n return (\n <Link href={docUrl} key={docUrl} onClick={onClick}>\n More information\n </Link>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAA+C,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAMxC,IAAMG,eAAe,GAAGC,IAAA,IAAsC;EAAA,IAArC;IAAEC;EAA6B,CAAC,GAAAD,IAAA;EAC9D,IAAME,OAAO,GAAIC,CAAsC,IAAK;IAC1DA,CAAC,CAACC,cAAc,EAAE;IAClB,IAAMC,OAAO,GAAG,IAAAC,2BAAa,GAAE;IAC/BD,OAAO,CAACE,iBAAiB,CAACJ,CAAC,CAACK,aAAa,CAACC,IAAI,CAAC;EACjD,CAAC;EAED,IAAI,CAACR,MAAM,EAAE,OAAOV,MAAA,CAAAO,OAAA,CAAAY,aAAA,CAAAnB,MAAA,CAAAO,OAAA,CAAAa,QAAA,OAAK;EACzB,OACEpB,MAAA,CAAAO,OAAA,CAAAY,aAAA,CAAChB,WAAA,CAAAkB,IAAI;IAACH,IAAI,EAAER,MAAO;IAACY,GAAG,EAAEZ,MAAO;IAACC,OAAO,EAAEA;EAAQ,GAAC,kBAEnD,CAAO;AAEX,CAAC;AAAAY,OAAA,CAAAf,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/APIErrorDisplay/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './APIErrorDialog'\nexport * from './APIErrorDisplay'\nexport { apiErrorDisplayFetch } from './utils'\n"],"mappings":";;;;;;;;;;;;;;AA0BA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA"}
1
+ {"version":3,"file":"index.js","names":["_APIErrorDialog","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_APIErrorDisplay","_utils"],"sources":["../../src/APIErrorDisplay/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport * from './APIErrorDialog'\nexport * from './APIErrorDisplay'\nexport { apiErrorDisplayFetch } from './utils'\n"],"mappings":";;;;;;;;;;;;;;AA0BA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,gBAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,gBAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,gBAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,gBAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,MAAA,GAAAd,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["errorHeading","error","message","apiErrorDisplayFetch","_sdk","url","fetched","fetch","mode","result","text","stop","indexOf","substring","trim"],"sources":["../../src/APIErrorDisplay/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { LookerSDKError, IAPIMethods } from '@looker/sdk-rtl'\n\n/**\n * Default the heading to 'Unknown error' if error.message is blank for any reason\n * @param error for heading\n */\nexport const errorHeading = (error: LookerSDKError) =>\n error.message || 'Unknown error'\n\n/**\n * this callback function used by the ErrorDoc constructor gets and truncates\n * API error documents for use within API Explorer\n * @param _sdk required as a parameter, but it's ignored in this function\n * @param url of document (either index.json or md) to fetch\n */\nexport const apiErrorDisplayFetch = async (_sdk: IAPIMethods, url: string) => {\n const fetched = await fetch(url, { mode: 'cors' })\n let result = await fetched.text()\n const stop = result.indexOf('## API Response Type')\n if (stop > 0) {\n result = result.substring(0, stop - 1).trim()\n }\n return result\n}\n"],"mappings":";;;;;;;;AAgCO,IAAMA,YAAY,GAAIC,KAAqB,IAChDA,KAAK,CAACC,OAAO,IAAI,eAAe;AAAA;AAQ3B,IAAMC,oBAAoB;EAAA,6BAAG,WAAOC,IAAiB,EAAEC,GAAW,EAAK;IAC5E,IAAMC,OAAO,SAASC,KAAK,CAACF,GAAG,EAAE;MAAEG,IAAI,EAAE;IAAO,CAAC,CAAC;IAClD,IAAIC,MAAM,SAASH,OAAO,CAACI,IAAI,EAAE;IACjC,IAAMC,IAAI,GAAGF,MAAM,CAACG,OAAO,CAAC,sBAAsB,CAAC;IACnD,IAAID,IAAI,GAAG,CAAC,EAAE;MACZF,MAAM,GAAGA,MAAM,CAACI,SAAS,CAAC,CAAC,EAAEF,IAAI,GAAG,CAAC,CAAC,CAACG,IAAI,EAAE;IAC/C;IACA,OAAOL,MAAM;EACf,CAAC;EAAA,gBARYN,oBAAoB;IAAA;EAAA;AAAA,GAQhC;AAAA"}
1
+ {"version":3,"file":"utils.js","names":["errorHeading","error","message","exports","apiErrorDisplayFetch","_ref","_asyncToGenerator","_sdk","url","fetched","fetch","mode","result","text","stop","indexOf","substring","trim","_x","_x2","apply","arguments"],"sources":["../../src/APIErrorDisplay/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2022 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 { LookerSDKError, IAPIMethods } from '@looker/sdk-rtl'\n\n/**\n * Default the heading to 'Unknown error' if error.message is blank for any reason\n * @param error for heading\n */\nexport const errorHeading = (error: LookerSDKError) =>\n error.message || 'Unknown error'\n\n/**\n * this callback function used by the ErrorDoc constructor gets and truncates\n * API error documents for use within API Explorer\n * @param _sdk required as a parameter, but it's ignored in this function\n * @param url of document (either index.json or md) to fetch\n */\nexport const apiErrorDisplayFetch = async (_sdk: IAPIMethods, url: string) => {\n const fetched = await fetch(url, { mode: 'cors' })\n let result = await fetched.text()\n const stop = result.indexOf('## API Response Type')\n if (stop > 0) {\n result = result.substring(0, stop - 1).trim()\n }\n return result\n}\n"],"mappings":";;;;;;;;AAgCO,IAAMA,YAAY,GAAIC,KAAqB,IAChDA,KAAK,CAACC,OAAO,IAAI,eAAe;AAAAC,OAAA,CAAAH,YAAA,GAAAA,YAAA;AAQ3B,IAAMI,oBAAoB;EAAA,IAAAC,IAAA,GAAAC,iBAAA,CAAG,WAAOC,IAAiB,EAAEC,GAAW,EAAK;IAC5E,IAAMC,OAAO,SAASC,KAAK,CAACF,GAAG,EAAE;MAAEG,IAAI,EAAE;IAAO,CAAC,CAAC;IAClD,IAAIC,MAAM,SAASH,OAAO,CAACI,IAAI,EAAE;IACjC,IAAMC,IAAI,GAAGF,MAAM,CAACG,OAAO,CAAC,sBAAsB,CAAC;IACnD,IAAID,IAAI,GAAG,CAAC,EAAE;MACZF,MAAM,GAAGA,MAAM,CAACI,SAAS,CAAC,CAAC,EAAEF,IAAI,GAAG,CAAC,CAAC,CAACG,IAAI,EAAE;IAC/C;IACA,OAAOL,MAAM;EACf,CAAC;EAAA,gBARYR,oBAAoBA,CAAAc,EAAA,EAAAC,GAAA;IAAA,OAAAd,IAAA,CAAAe,KAAA,OAAAC,SAAA;EAAA;AAAA,GAQhC;AAAAlB,OAAA,CAAAC,oBAAA,GAAAA,oBAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExtMarkdown.js","names":["ExtMarkdown","source","pattern","transformLinkUri","linkClickHandler","paragraphOverride","openBrowserWindow","_pathname","href","adaptor","getEnvAdaptor"],"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;AACA;AACA;AAA8C;AAkBvC,IAAMA,WAAiC,GAAG,QAM3C;EAAA,IAN4C;IAChDC,MAAM;IACNC,OAAO,GAAG,EAAE;IACZC,gBAAgB;IAChBC,gBAAgB;IAChBC;EACF,CAAC;EACC,IAAMC,iBAAiB,GAAG,CAACC,SAAiB,EAAEC,IAAY,KAAK;IAC7D,IAAMC,OAAO,GAAG,IAAAC,2BAAa,GAAE;IAC/BD,OAAO,CAACH,iBAAiB,CAACE,IAAI,CAAC;EACjC,CAAC;EAED,OACE,6BAAC,oBAAQ;IACP,MAAM,EAAEP,MAAO;IACf,OAAO,EAAEC,OAAQ;IACjB,gBAAgB,EAAEC,gBAAiB;IACnC,gBAAgB,EAAEC,gBAAgB,IAAIE,iBAAkB;IACxD,iBAAiB,EAAED;EAAkB,EACrC;AAEN,CAAC;AAAA"}
1
+ {"version":3,"file":"ExtMarkdown.js","names":["_react","_interopRequireDefault","require","_codeEditor","_adaptorUtils","obj","__esModule","default","ExtMarkdown","_ref","source","pattern","transformLinkUri","linkClickHandler","paragraphOverride","openBrowserWindow","_pathname","href","adaptor","getEnvAdaptor","createElement","Markdown","exports"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AAA8C,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAkBvC,IAAMG,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,GAAG,IAAAC,2BAAa,GAAE;IAC/BD,OAAO,CAACH,iBAAiB,CAACE,IAAI,CAAC;EACjC,CAAC;EAED,OACEjB,MAAA,CAAAO,OAAA,CAAAa,aAAA,CAACjB,WAAA,CAAAkB,QAAQ;IACPX,MAAM,EAAEA,MAAO;IACfC,OAAO,EAAEA,OAAQ;IACjBC,gBAAgB,EAAEA,gBAAiB;IACnCC,gBAAgB,EAAEA,gBAAgB,IAAIE,iBAAkB;IACxDD,iBAAiB,EAAEA;EAAkB,EACrC;AAEN,CAAC;AAAAQ,OAAA,CAAAd,WAAA,GAAAA,WAAA"}
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -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("../ConfigHeading");
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}</ConfigH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AAa;IAAI,CAAE;IACnEC,KAAK,EAAEnC,MAAA,CAAAQ,OAAA,CAAAY,aAAA,CAACf,cAAA,CAAA+B,aAAa;MAACC,EAAE,EAAErB;IAAM,GAAEJ,OAAO;EAAkB,GAE3DZ,MAAA,CAAAQ,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-1r36k56-0"
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"}
@@ -6,5 +6,5 @@ interface ConfigFormProps {
6
6
  clientId: string;
7
7
  clientLabel: string;
8
8
  }
9
- export declare const OAuthConfigForm: ({ setHasConfig, clientId, clientLabel, configKey, }: ConfigFormProps) => JSX.Element;
9
+ export declare const OAuthForm: ({ setHasConfig, clientId, clientLabel, configKey, }: ConfigFormProps) => JSX.Element;
10
10
  export {};