@looker/run-it 0.9.46 → 0.9.48
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -0
- package/lib/RunIt.js.map +1 -1
- package/lib/RunItProvider.js.map +1 -1
- package/lib/components/Collapser/CollapserCard.js.map +1 -1
- package/lib/components/Collapser/index.js.map +1 -1
- package/lib/components/ConfigForm/ConfigForm.js.map +1 -1
- package/lib/components/ConfigForm/index.js.map +1 -1
- package/lib/components/ConfigForm/utils.js.map +1 -1
- package/lib/components/CopyLinkWrapper/CopyLinkWrapper.js.map +1 -1
- package/lib/components/CopyLinkWrapper/index.js.map +1 -1
- package/lib/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/components/DataGrid/gridUtils.js.map +1 -1
- package/lib/components/DataGrid/index.js.map +1 -1
- package/lib/components/DocSdkCalls/DocMultiCall.js.map +1 -1
- package/lib/components/DocSdkCalls/DocSdkCalls.js.map +1 -1
- package/lib/components/DocSdkCalls/callUtils.js.map +1 -1
- package/lib/components/DocSdkCalls/index.js.map +1 -1
- package/lib/components/Loading/Loading.js.map +1 -1
- package/lib/components/Loading/index.js.map +1 -1
- package/lib/components/LoginForm/LoginForm.js.map +1 -1
- package/lib/components/LoginForm/index.js.map +1 -1
- package/lib/components/MethodBadge/MethodBadge.js.map +1 -1
- package/lib/components/MethodBadge/index.js.map +1 -1
- package/lib/components/PerfTracker/PerfChart.js.map +1 -1
- package/lib/components/PerfTracker/PerfTable.js.map +1 -1
- package/lib/components/PerfTracker/PerfTracker.js.map +1 -1
- package/lib/components/PerfTracker/index.js.map +1 -1
- package/lib/components/PerfTracker/perfTableUtils.js.map +1 -1
- package/lib/components/PerfTracker/perfUtils.js.map +1 -1
- package/lib/components/RequestForm/FormItem.js.map +1 -1
- package/lib/components/RequestForm/RequestForm.js.map +1 -1
- package/lib/components/RequestForm/formUtils.js.map +1 -1
- package/lib/components/RequestForm/index.js.map +1 -1
- package/lib/components/ResponseExplorer/ResponseExplorer.js.map +1 -1
- package/lib/components/ResponseExplorer/index.js.map +1 -1
- package/lib/components/ShowResponse/ShowResponse.js.map +1 -1
- package/lib/components/ShowResponse/index.js.map +1 -1
- package/lib/components/ShowResponse/responseUtils.js +3 -3
- package/lib/components/ShowResponse/responseUtils.js.map +1 -1
- package/lib/components/common/common.js.map +1 -1
- package/lib/components/common/index.js.map +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/esm/RunIt.js.map +1 -1
- package/lib/esm/RunItProvider.js.map +1 -1
- package/lib/esm/components/Collapser/CollapserCard.js.map +1 -1
- package/lib/esm/components/Collapser/index.js.map +1 -1
- package/lib/esm/components/ConfigForm/ConfigForm.js.map +1 -1
- package/lib/esm/components/ConfigForm/index.js.map +1 -1
- package/lib/esm/components/ConfigForm/utils.js.map +1 -1
- package/lib/esm/components/CopyLinkWrapper/CopyLinkWrapper.js.map +1 -1
- package/lib/esm/components/CopyLinkWrapper/index.js.map +1 -1
- package/lib/esm/components/DataGrid/DataGrid.js.map +1 -1
- package/lib/esm/components/DataGrid/gridUtils.js.map +1 -1
- package/lib/esm/components/DataGrid/index.js.map +1 -1
- package/lib/esm/components/DocSdkCalls/DocMultiCall.js.map +1 -1
- package/lib/esm/components/DocSdkCalls/DocSdkCalls.js.map +1 -1
- package/lib/esm/components/DocSdkCalls/callUtils.js.map +1 -1
- package/lib/esm/components/DocSdkCalls/index.js.map +1 -1
- package/lib/esm/components/Loading/Loading.js.map +1 -1
- package/lib/esm/components/Loading/index.js.map +1 -1
- package/lib/esm/components/LoginForm/LoginForm.js.map +1 -1
- package/lib/esm/components/LoginForm/index.js.map +1 -1
- package/lib/esm/components/MethodBadge/MethodBadge.js.map +1 -1
- package/lib/esm/components/MethodBadge/index.js.map +1 -1
- package/lib/esm/components/PerfTracker/PerfChart.js.map +1 -1
- package/lib/esm/components/PerfTracker/PerfTable.js.map +1 -1
- package/lib/esm/components/PerfTracker/PerfTracker.js.map +1 -1
- package/lib/esm/components/PerfTracker/index.js.map +1 -1
- package/lib/esm/components/PerfTracker/perfTableUtils.js.map +1 -1
- package/lib/esm/components/PerfTracker/perfUtils.js.map +1 -1
- package/lib/esm/components/RequestForm/FormItem.js.map +1 -1
- package/lib/esm/components/RequestForm/RequestForm.js.map +1 -1
- package/lib/esm/components/RequestForm/formUtils.js.map +1 -1
- package/lib/esm/components/RequestForm/index.js.map +1 -1
- package/lib/esm/components/ResponseExplorer/ResponseExplorer.js.map +1 -1
- package/lib/esm/components/ResponseExplorer/index.js.map +1 -1
- package/lib/esm/components/ShowResponse/ShowResponse.js.map +1 -1
- package/lib/esm/components/ShowResponse/index.js.map +1 -1
- package/lib/esm/components/ShowResponse/responseUtils.js +3 -3
- package/lib/esm/components/ShowResponse/responseUtils.js.map +1 -1
- package/lib/esm/components/common/common.js.map +1 -1
- package/lib/esm/components/common/index.js.map +1 -1
- package/lib/esm/components/index.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/test-data/index.js.map +1 -1
- package/lib/esm/test-data/responses.js.map +1 -1
- package/lib/esm/test-data/specs.js.map +1 -1
- package/lib/esm/utils/RunItSDK.js +4 -4
- package/lib/esm/utils/RunItSDK.js.map +1 -1
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/requestUtils.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/test-data/index.js.map +1 -1
- package/lib/test-data/responses.js.map +1 -1
- package/lib/test-data/specs.js.map +1 -1
- package/lib/utils/RunItSDK.js +4 -4
- package/lib/utils/RunItSDK.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/requestUtils.js.map +1 -1
- package/package.json +4 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Loading.js","names":["Loading","loading","message"],"sources":["../../../src/components/Loading/Loading.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Space, ProgressCircular, Text } from '@looker/components'\n\ninterface LoadingProps {\n loading: boolean\n message?: string\n}\n\nexport const Loading: FC<LoadingProps> = ({\n loading,\n message = 'Loading ...',\n}) => (\n <>\n {loading && (\n <Space gap=\"small\">\n <ProgressCircular size=\"small\" />\n <Text color=\"text\">{message}</Text>\n </Space>\n )}\n </>\n)\n"],"mappings":";;;;;;AA2BA;AACA;AAAkE;AAO3D,
|
1
|
+
{"version":3,"file":"Loading.js","names":["_react","_interopRequireDefault","require","_components","obj","__esModule","default","Loading","_ref","loading","message","createElement","Fragment","Space","gap","ProgressCircular","size","Text","color","exports"],"sources":["../../../src/components/Loading/Loading.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Space, ProgressCircular, Text } from '@looker/components'\n\ninterface LoadingProps {\n loading: boolean\n message?: string\n}\n\nexport const Loading: FC<LoadingProps> = ({\n loading,\n message = 'Loading ...',\n}) => (\n <>\n {loading && (\n <Space gap=\"small\">\n <ProgressCircular size=\"small\" />\n <Text color=\"text\">{message}</Text>\n </Space>\n )}\n </>\n)\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAkE,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAO3D,IAAMG,OAAyB,GAAGC,IAAA;EAAA,IAAC;IACxCC,OAAO;IACPC,OAAO,GAAG;EACZ,CAAC,GAAAF,IAAA;EAAA,OACCR,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAAAX,MAAA,CAAAM,OAAA,CAAAM,QAAA,QACGH,OAAO,IACNT,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAU,KAAK;IAACC,GAAG,EAAC;EAAO,GAChBd,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAY,gBAAgB;IAACC,IAAI,EAAC;EAAO,EAAG,EACjChB,MAAA,CAAAM,OAAA,CAAAK,aAAA,CAACR,WAAA,CAAAc,IAAI;IAACC,KAAK,EAAC;EAAM,GAAER,OAAO,CAAQ,CAEtC,CACA;AAAA,CACJ;AAAAS,OAAA,CAAAZ,OAAA,GAAAA,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Loading/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport { Loading } from './Loading'\n"],"mappings":";;;;;;;;;;;AA0BA"}
|
1
|
+
{"version":3,"file":"index.js","names":["_Loading","require"],"sources":["../../../src/components/Loading/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport { Loading } from './Loading'\n"],"mappings":";;;;;;;;;;;AA0BA,IAAAA,QAAA,GAAAC,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LoginForm.js","names":["readyToLogin","notReadyToLogin","LoginForm","requestContent","adaptor","getEnvAdaptor","handleLogin","e","preventDefault","localStorageSetItem","RunItFormKey","JSON","stringify","login","sdk","authSession","settings","authIsConfigured"],"sources":["../../../src/components/LoginForm/LoginForm.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 { BaseSyntheticEvent, FC } from 'react'\nimport React from 'react'\nimport { Button, Tooltip } from '@looker/components'\nimport type { OAuthConfigProvider } from '@looker/extension-utils'\nimport { getEnvAdaptor } from '@looker/extension-utils'\n\nimport { RunItFormKey } from '../ConfigForm'\nimport type { RunItValues } from '../..'\n\ninterface LoginFormProps {\n requestContent: RunItValues\n}\n\nexport const readyToLogin =\n 'OAuth is configured but your browser session is not authenticated. Click Login to enable RunIt.'\n\nexport const notReadyToLogin =\n 'OAuth is not configured. Configure it to be able to Login.'\n\nexport const LoginForm: FC<LoginFormProps> = ({ requestContent }) => {\n const adaptor = getEnvAdaptor()\n const handleLogin = async (e: BaseSyntheticEvent) => {\n e.preventDefault()\n if (requestContent) {\n adaptor.localStorageSetItem(RunItFormKey, JSON.stringify(requestContent))\n }\n // This will set storage variables and return to OAuthScene when successful\n await adaptor.login()\n }\n\n return (\n <Tooltip\n content={\n (\n adaptor.sdk.authSession.settings as OAuthConfigProvider\n ).authIsConfigured()\n ? readyToLogin\n : notReadyToLogin\n }\n >\n <Button onClick={handleLogin}>Login</Button>\n </Tooltip>\n )\n}\n"],"mappings":";;;;;;AA2BA;AACA;AAEA;AAEA;AAA4C;AAAA;AAAA;AAOrC,
|
1
|
+
{"version":3,"file":"LoginForm.js","names":["_react","_interopRequireDefault","require","_components","_extensionUtils","_ConfigForm","obj","__esModule","default","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","args","arguments","apply","err","undefined","readyToLogin","exports","notReadyToLogin","LoginForm","_ref","requestContent","adaptor","getEnvAdaptor","handleLogin","_ref2","e","preventDefault","localStorageSetItem","RunItFormKey","JSON","stringify","login","_x","createElement","Tooltip","content","sdk","authSession","settings","authIsConfigured","Button","onClick"],"sources":["../../../src/components/LoginForm/LoginForm.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 { BaseSyntheticEvent, FC } from 'react'\nimport React from 'react'\nimport { Button, Tooltip } from '@looker/components'\nimport type { OAuthConfigProvider } from '@looker/extension-utils'\nimport { getEnvAdaptor } from '@looker/extension-utils'\n\nimport { RunItFormKey } from '../ConfigForm'\nimport type { RunItValues } from '../..'\n\ninterface LoginFormProps {\n requestContent: RunItValues\n}\n\nexport const readyToLogin =\n 'OAuth is configured but your browser session is not authenticated. Click Login to enable RunIt.'\n\nexport const notReadyToLogin =\n 'OAuth is not configured. Configure it to be able to Login.'\n\nexport const LoginForm: FC<LoginFormProps> = ({ requestContent }) => {\n const adaptor = getEnvAdaptor()\n const handleLogin = async (e: BaseSyntheticEvent) => {\n e.preventDefault()\n if (requestContent) {\n adaptor.localStorageSetItem(RunItFormKey, JSON.stringify(requestContent))\n }\n // This will set storage variables and return to OAuthScene when successful\n await adaptor.login()\n }\n\n return (\n <Tooltip\n content={\n (\n adaptor.sdk.authSession.settings as OAuthConfigProvider\n ).authIsConfigured()\n ? readyToLogin\n : notReadyToLogin\n }\n >\n <Button onClick={handleLogin}>Login</Button>\n </Tooltip>\n )\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAA4C,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,mBAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,GAAA,EAAAC,GAAA,cAAAC,IAAA,GAAAP,GAAA,CAAAK,GAAA,EAAAC,GAAA,OAAAE,KAAA,GAAAD,IAAA,CAAAC,KAAA,WAAAC,KAAA,IAAAP,MAAA,CAAAO,KAAA,iBAAAF,IAAA,CAAAG,IAAA,IAAAT,OAAA,CAAAO,KAAA,YAAAG,OAAA,CAAAV,OAAA,CAAAO,KAAA,EAAAI,IAAA,CAAAT,KAAA,EAAAC,MAAA;AAAA,SAAAS,kBAAAC,EAAA,6BAAAC,IAAA,SAAAC,IAAA,GAAAC,SAAA,aAAAN,OAAA,WAAAV,OAAA,EAAAC,MAAA,QAAAF,GAAA,GAAAc,EAAA,CAAAI,KAAA,CAAAH,IAAA,EAAAC,IAAA,YAAAb,MAAAK,KAAA,IAAAT,kBAAA,CAAAC,GAAA,EAAAC,OAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,MAAA,UAAA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[],"sources":["../../../src/components/LoginForm/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport { LoginForm, readyToLogin } from './LoginForm'\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA"}
|
1
|
+
{"version":3,"file":"index.js","names":["_LoginForm","require"],"sources":["../../../src/components/LoginForm/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nexport { LoginForm, readyToLogin } from './LoginForm'\n"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,IAAAA,UAAA,GAAAC,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MethodBadge.js","names":["pickBadgeIntent","type","cssForIntent","intent","css","intentUIBlend","theme","generatePressed","colors","MethodBadge","styled","div","attrs","fontSize","fontWeight","minWidth","typography","titleStatus","ui1","radii","medium","compact","space","xxsmall","none","xsmall"],"sources":["../../../src/components/MethodBadge/MethodBadge.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 {\n CompatibleHTMLProps,\n TypographyProps,\n} from '@looker/design-tokens'\nimport {\n generatePressed,\n intentUIBlend,\n typography,\n} from '@looker/design-tokens'\nimport type { HttpMethod } from '@looker/sdk-rtl'\nimport styled, { css } from 'styled-components'\n\n/**\n * Status of endpoint method.\n */\ntype MethodStatus =\n | 'alpha'\n | 'beta'\n | 'stable'\n | 'experimental'\n | 'deprecated'\n | 'inform'\n | 'undocumented'\n\ninterface MethodBadgeProps\n extends CompatibleHTMLProps<HTMLDivElement>,\n TypographyProps {\n /** Determines background color */\n type: HttpMethod | MethodStatus | string\n compact?: boolean\n minWidth?: string\n titleStatus?: boolean\n}\n\n/**\n * Intent names to display the correct color for the badge based on the HTTP method or method status.\n */\ntype ApixIntentNames =\n | 'critical'\n | 'inform'\n | 'key'\n | 'neutral'\n | 'positive'\n | 'warn'\n\nexport const pickBadgeIntent = (type: HttpMethod | MethodStatus | string) => {\n switch (type) {\n case 'alpha':\n case 'DELETE':\n case 'deprecated':\n return 'critical'\n case 'HEAD':\n return 'neutral'\n case 'PATCH':\n case 'TRACE':\n case 'experimental':\n case 'undocumented':\n return 'warn'\n case 'POST':\n case 'stable':\n return 'positive'\n case 'PUT':\n case 'beta':\n return 'key'\n case 'GET':\n default:\n return 'inform'\n }\n}\n\nexport const cssForIntent = (intent: ApixIntentNames) =>\n css`\n background: ${intentUIBlend(intent, 1)};\n color: ${({ theme }) => generatePressed(theme.colors[intent])};\n `\n\nexport const MethodBadge = styled.div.attrs(\n ({\n fontSize = 'xsmall',\n fontWeight = 'semiBold',\n minWidth = '2.5rem',\n }: MethodBadgeProps) => ({\n fontSize,\n fontWeight,\n minWidth,\n })\n)<MethodBadgeProps>`\n ${typography}\n\n ${({ type }) => cssForIntent(pickBadgeIntent(type))};\n\n background: ${({ type, titleStatus, theme: { colors } }) =>\n titleStatus ? colors.ui1 : intentUIBlend(pickBadgeIntent(type), 1)};\n border: 1px solid transparent;\n border-radius: ${({ theme: { radii } }) => radii.medium};\n\n /** NOTE: This is below minimum accessibility threshold font-size */\n ${({ compact }) => compact && `font-size: 9px;`}\n\n min-width: ${({ minWidth }) => minWidth};\n padding: ${({ compact, theme: { space } }) =>\n `${space.xxsmall} ${compact ? space.none : space.xsmall}`};\n`\n"],"mappings":";;;;;;AA8BA;AAMA;AAA+C;AAAA;AAmCxC,
|
1
|
+
{"version":3,"file":"MethodBadge.js","names":["_designTokens","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","pickBadgeIntent","type","exports","cssForIntent","intent","css","intentUIBlend","_ref","theme","generatePressed","colors","MethodBadge","styled","div","attrs","_ref2","fontSize","fontWeight","minWidth","withConfig","displayName","componentId","typography","_ref3","_ref4","titleStatus","ui1","_ref5","radii","medium","_ref6","compact","_ref7","_ref8","space","concat","xxsmall","none","xsmall"],"sources":["../../../src/components/MethodBadge/MethodBadge.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 {\n CompatibleHTMLProps,\n TypographyProps,\n} from '@looker/design-tokens'\nimport {\n generatePressed,\n intentUIBlend,\n typography,\n} from '@looker/design-tokens'\nimport type { HttpMethod } from '@looker/sdk-rtl'\nimport styled, { css } from 'styled-components'\n\n/**\n * Status of endpoint method.\n */\ntype MethodStatus =\n | 'alpha'\n | 'beta'\n | 'stable'\n | 'experimental'\n | 'deprecated'\n | 'inform'\n | 'undocumented'\n\ninterface MethodBadgeProps\n extends CompatibleHTMLProps<HTMLDivElement>,\n TypographyProps {\n /** Determines background color */\n type: HttpMethod | MethodStatus | string\n compact?: boolean\n minWidth?: string\n titleStatus?: boolean\n}\n\n/**\n * Intent names to display the correct color for the badge based on the HTTP method or method status.\n */\ntype ApixIntentNames =\n | 'critical'\n | 'inform'\n | 'key'\n | 'neutral'\n | 'positive'\n | 'warn'\n\nexport const pickBadgeIntent = (type: HttpMethod | MethodStatus | string) => {\n switch (type) {\n case 'alpha':\n case 'DELETE':\n case 'deprecated':\n return 'critical'\n case 'HEAD':\n return 'neutral'\n case 'PATCH':\n case 'TRACE':\n case 'experimental':\n case 'undocumented':\n return 'warn'\n case 'POST':\n case 'stable':\n return 'positive'\n case 'PUT':\n case 'beta':\n return 'key'\n case 'GET':\n default:\n return 'inform'\n }\n}\n\nexport const cssForIntent = (intent: ApixIntentNames) =>\n css`\n background: ${intentUIBlend(intent, 1)};\n color: ${({ theme }) => generatePressed(theme.colors[intent])};\n `\n\nexport const MethodBadge = styled.div.attrs(\n ({\n fontSize = 'xsmall',\n fontWeight = 'semiBold',\n minWidth = '2.5rem',\n }: MethodBadgeProps) => ({\n fontSize,\n fontWeight,\n minWidth,\n })\n)<MethodBadgeProps>`\n ${typography}\n\n ${({ type }) => cssForIntent(pickBadgeIntent(type))};\n\n background: ${({ type, titleStatus, theme: { colors } }) =>\n titleStatus ? colors.ui1 : intentUIBlend(pickBadgeIntent(type), 1)};\n border: 1px solid transparent;\n border-radius: ${({ theme: { radii } }) => radii.medium};\n\n /** NOTE: This is below minimum accessibility threshold font-size */\n ${({ compact }) => compact && `font-size: 9px;`}\n\n min-width: ${({ minWidth }) => minWidth};\n padding: ${({ compact, theme: { space } }) =>\n `${space.xxsmall} ${compact ? space.none : space.xsmall}`};\n`\n"],"mappings":";;;;;;AA8BA,IAAAA,aAAA,GAAAC,OAAA;AAMA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+C,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW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KAAA;EAAA,OAAM;IACvBC,QAAQ;IACRC,UAAU;IACVC;EACF,CAAC;AAAA,CAAC,CACH,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,oHACGC,wBAAU,EAEVC,KAAA;EAAA,IAAC;IAAEtB;EAAK,CAAC,GAAAsB,KAAA;EAAA,OAAKpB,YAAY,CAACH,eAAe,CAACC,IAAI,CAAC,CAAC;AAAA,GAErCuB,KAAA;EAAA,IAAC;IAAEvB,IAAI;IAAEwB,WAAW;IAAEjB,KAAK,EAAE;MAAEE;IAAO;EAAE,CAAC,GAAAc,KAAA;EAAA,OACrDC,WAAW,GAAGf,MAAM,CAACgB,GAAG,GAAG,IAAApB,2BAAa,EAACN,eAAe,CAACC,IAAI,CAAC,EAAE,CAAC,CAAC;AAAA,GAEnD0B,KAAA;EAAA,IAAC;IAAEnB,KAAK,EAAE;MAAEoB;IAAM;EAAE,CAAC,GAAAD,KAAA;EAAA,OAAKC,KAAK,CAACC,MAAM;AAAA,GAGrDC,KAAA;EAAA,IAAC;IAAEC;EAAQ,CAAC,GAAAD,KAAA;EAAA,OAAKC,OAAO,qBAAqB;AAAA,GAElCC,KAAA;EAAA,IAAC;IAAEd;EAAS,CAAC,GAAAc,KAAA;EAAA,OAAKd,QAAQ;AAAA,GAC5Be,KAAA;EAAA,IAAC;IAAEF,OAAO;IAAEvB,KAAK,EAAE;MAAE0B;IAAM;EAAE,CAAC,GAAAD,KAAA;EAAA,UAAAE,MAAA,CACpCD,KAAK,CAACE,OAAO,OAAAD,MAAA,CAAIJ,OAAO,GAAGG,KAAK,CAACG,IAAI,GAAGH,KAAK,CAACI,MAAM;AAAA,CAAE,CAC5D;AAAApC,OAAA,CAAAS,WAAA,GAAAA,WAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/MethodBadge/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodBadge } from './MethodBadge'\n"],"mappings":";;;;;;;;;;;AAyBA"}
|
1
|
+
{"version":3,"file":"index.js","names":["_MethodBadge","require"],"sources":["../../../src/components/MethodBadge/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { MethodBadge } from './MethodBadge'\n"],"mappings":";;;;;;;;;;;AAyBA,IAAAA,YAAA,GAAAC,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PerfChart.js","names":["chartItem","list","desc","offset","start","end","push","chartData","timings","item","entry","startTime","result","type","id","role","redirectStart","redirectEnd","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","responseStart","responseEnd","fetchStart","requestStart","processStart","processEnd","PerfChart","loadTimes","data","name","transferSize","encodedBodySize","decodedBodySize","eventName","callback","chartWrapper","container","document","getElementById","getContainerId","labels","getElementsByTagName","n","length","textEl","parseInt","innerHTML"],"sources":["../../../src/components/PerfTracker/PerfChart.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Chart } from 'react-google-charts'\nimport { Heading, Space, Tooltip } from '@looker/components'\nimport { Loading } from '../Loading'\nimport type { IResourceLoadTimes } from './perfUtils'\n\ninterface PerfChartProps {\n /** Performance Resource timing data */\n loadTimes: IResourceLoadTimes\n}\n\n// https://react-google-charts.com/timeline-chart#putting-bars-on-one-row\nconst chartItem = (\n list: any[],\n desc: string,\n offset: number,\n start: number,\n end: number\n) => {\n if (start > 0) list.push([desc, desc, start - offset, end - offset])\n return list\n}\n\nconst chartData = (timings: IResourceLoadTimes) => {\n const item = timings.entry as PerformanceResourceTiming\n const offset = item.startTime\n const result = [\n [\n { type: 'string', id: 'Metric' },\n { type: 'string', role: 'tooltip' },\n { type: 'number', id: 'Start' },\n { type: 'number', id: 'End' },\n ],\n ]\n chartItem(result, 'redirect', offset, item.redirectStart, item.redirectEnd)\n chartItem(\n result,\n 'domainLookup',\n offset,\n item.domainLookupStart,\n item.domainLookupEnd\n )\n chartItem(result, 'connect', offset, item.connectStart, item.connectEnd)\n chartItem(\n result,\n 'secureConnection',\n offset,\n item.secureConnectionStart,\n item.connectEnd\n )\n chartItem(\n result,\n 'responseTime',\n offset,\n item.responseStart,\n item.responseEnd\n )\n chartItem(\n result,\n 'fetchUntilResponseEnd',\n offset,\n item.fetchStart,\n item.responseEnd\n )\n chartItem(\n result,\n 'requestUntilResponseEnd',\n offset,\n item.requestStart,\n item.responseEnd\n )\n chartItem(\n result,\n 'startUntilResponseEnd',\n offset,\n item.startTime,\n item.responseEnd\n )\n chartItem(\n result,\n 'processDuration',\n offset,\n timings.processStart,\n timings.processEnd\n )\n return result\n}\n\nexport const PerfChart: FC<PerfChartProps> = ({ loadTimes }) => {\n const entry = loadTimes.entry as PerformanceResourceTiming\n const data = chartData(loadTimes)\n return (\n <>\n <Heading as=\"h4\">{loadTimes.name}</Heading>\n <Space>\n <Tooltip\n content={`The size (${entry.transferSize} octets) of the fetched resource. The size includes the response header fields plus the response payload body`}\n placement=\"right\"\n textAlign=\"left\"\n >\n <span>Transfer: {entry.transferSize}</span>\n </Tooltip>\n <Tooltip\n content={`The size (${entry.encodedBodySize} octets) received from the fetch (HTTP or cache), of the payload body, before removing any applied content-codings`}\n placement=\"right\"\n textAlign=\"left\"\n >\n <span>Encoded body: {entry.encodedBodySize}</span>\n </Tooltip>\n <Tooltip\n content={`The size (${entry.decodedBodySize} octets) received from the fetch (HTTP or cache) of the message body, after removing any applied content-codings`}\n placement=\"right\"\n textAlign=\"left\"\n >\n <span>Decoded body: {entry.decodedBodySize}</span>\n </Tooltip>\n </Space>\n <Chart\n width={'100%'}\n height={`${8 * 41 + 15}px`}\n chartType=\"Timeline\"\n loader={<Loading loading={true} />}\n data={data}\n chartEvents={[\n {\n eventName: 'ready',\n callback: ({ chartWrapper }) => {\n const container = document.getElementById(\n chartWrapper.getContainerId()\n )\n if (container) {\n const labels = container.getElementsByTagName('text')\n for (let n = 0; n < labels.length; n++) {\n const textEl = labels.item(n)\n // clear any numeric ticks at the bottom of the chart\n if (textEl && parseInt(textEl.innerHTML, 10) > -1) {\n textEl.innerHTML = ''\n }\n }\n }\n },\n },\n ]}\n />\n </>\n )\n}\n"],"mappings":";;;;;;AA2BA;AACA;AACA;AACA;AAAoC;AASpC,IAAMA,SAAS,GAAG,CAChBC,IAAW,EACXC,IAAY,EACZC,MAAc,EACdC,KAAa,EACbC,GAAW,KACR;EACH,IAAID,KAAK,GAAG,CAAC,EAAEH,IAAI,CAACK,IAAI,CAAC,CAACJ,IAAI,EAAEA,IAAI,EAAEE,KAAK,GAAGD,MAAM,EAAEE,GAAG,GAAGF,MAAM,CAAC,CAAC;EACpE,OAAOF,IAAI;AACb,CAAC;AAED,IAAMM,SAAS,GAAIC,OAA2B,IAAK;EACjD,IAAMC,IAAI,GAAGD,OAAO,CAACE,KAAkC;EACvD,IAAMP,MAA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IAAMC,SAAS,GAAGC,QAAQ,CAACC,cAAc,CACvCH,YAAY,CAACI,cAAc,EAAE,CAC9B;QACD,IAAIH,SAAS,EAAE;UACb,IAAMI,MAAM,GAAGJ,SAAS,CAACK,oBAAoB,CAAC,MAAM,CAAC;UACrD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;YACtC,IAAME,MAAM,GAAGJ,MAAM,CAAClC,IAAI,CAACoC,CAAC,CAAC;YAE7B,IAAIE,MAAM,IAAIC,QAAQ,CAACD,MAAM,CAACE,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;cACjDF,MAAM,CAACE,SAAS,GAAG,EAAE;YACvB;UACF;QACF;MACF;IACF,CAAC;EACD,EACF,CACD;AAEP,CAAC;AAAA"}
|
1
|
+
{"version":3,"file":"PerfChart.js","names":["_react","_interopRequireDefault","require","_reactGoogleCharts","_components","_Loading","obj","__esModule","default","chartItem","list","desc","offset","start","end","push","chartData","timings","item","entry","startTime","result","type","id","role","redirectStart","redirectEnd","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","responseStart","responseEnd","fetchStart","requestStart","processStart","processEnd","PerfChart","_ref","loadTimes","data","createElement","Fragment","Heading","as","name","Space","Tooltip","content","concat","transferSize","placement","textAlign","encodedBodySize","decodedBodySize","Chart","width","height","chartType","loader","Loading","loading","chartEvents","eventName","callback","_ref2","chartWrapper","container","document","getElementById","getContainerId","labels","getElementsByTagName","n","length","textEl","parseInt","innerHTML","exports"],"sources":["../../../src/components/PerfTracker/PerfChart.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React from 'react'\nimport { Chart } from 'react-google-charts'\nimport { Heading, Space, Tooltip } from '@looker/components'\nimport { Loading } from '../Loading'\nimport type { IResourceLoadTimes } from './perfUtils'\n\ninterface PerfChartProps {\n /** Performance Resource timing data */\n loadTimes: IResourceLoadTimes\n}\n\n// https://react-google-charts.com/timeline-chart#putting-bars-on-one-row\nconst chartItem = (\n list: any[],\n desc: string,\n offset: number,\n start: number,\n end: number\n) => {\n if (start > 0) list.push([desc, desc, start - offset, end - offset])\n return list\n}\n\nconst chartData = (timings: IResourceLoadTimes) => {\n const item = timings.entry as PerformanceResourceTiming\n const offset = item.startTime\n const result = [\n [\n { type: 'string', id: 'Metric' },\n { type: 'string', role: 'tooltip' },\n { type: 'number', id: 'Start' },\n { type: 'number', id: 'End' },\n ],\n ]\n chartItem(result, 'redirect', offset, item.redirectStart, item.redirectEnd)\n chartItem(\n result,\n 'domainLookup',\n offset,\n item.domainLookupStart,\n item.domainLookupEnd\n )\n chartItem(result, 'connect', offset, item.connectStart, item.connectEnd)\n chartItem(\n result,\n 'secureConnection',\n offset,\n item.secureConnectionStart,\n item.connectEnd\n )\n chartItem(\n result,\n 'responseTime',\n offset,\n item.responseStart,\n item.responseEnd\n )\n chartItem(\n result,\n 'fetchUntilResponseEnd',\n offset,\n item.fetchStart,\n item.responseEnd\n )\n chartItem(\n result,\n 'requestUntilResponseEnd',\n offset,\n item.requestStart,\n item.responseEnd\n )\n chartItem(\n result,\n 'startUntilResponseEnd',\n offset,\n item.startTime,\n item.responseEnd\n )\n chartItem(\n result,\n 'processDuration',\n offset,\n timings.processStart,\n timings.processEnd\n )\n return result\n}\n\nexport const PerfChart: FC<PerfChartProps> = ({ loadTimes }) => {\n const entry = loadTimes.entry as PerformanceResourceTiming\n const data = chartData(loadTimes)\n return (\n <>\n <Heading as=\"h4\">{loadTimes.name}</Heading>\n <Space>\n <Tooltip\n content={`The size (${entry.transferSize} octets) of the fetched resource. The size includes the response header fields plus the response payload body`}\n placement=\"right\"\n textAlign=\"left\"\n >\n <span>Transfer: {entry.transferSize}</span>\n </Tooltip>\n <Tooltip\n content={`The size (${entry.encodedBodySize} octets) received from the fetch (HTTP or cache), of the payload body, before removing any applied content-codings`}\n placement=\"right\"\n textAlign=\"left\"\n >\n <span>Encoded body: {entry.encodedBodySize}</span>\n </Tooltip>\n <Tooltip\n content={`The size (${entry.decodedBodySize} octets) received from the fetch (HTTP or cache) of the message body, after removing any applied content-codings`}\n placement=\"right\"\n textAlign=\"left\"\n >\n <span>Decoded body: {entry.decodedBodySize}</span>\n </Tooltip>\n </Space>\n <Chart\n width={'100%'}\n height={`${8 * 41 + 15}px`}\n chartType=\"Timeline\"\n loader={<Loading loading={true} />}\n data={data}\n chartEvents={[\n {\n eventName: 'ready',\n callback: ({ chartWrapper }) => {\n const container = document.getElementById(\n chartWrapper.getContainerId()\n )\n if (container) {\n const labels = container.getElementsByTagName('text')\n for (let n = 0; n < labels.length; n++) {\n const textEl = labels.item(n)\n // clear any numeric ticks at the bottom of the chart\n if (textEl && parseInt(textEl.innerHTML, 10) > -1) {\n textEl.innerHTML = ''\n }\n }\n }\n },\n },\n ]}\n />\n </>\n )\n}\n"],"mappings":";;;;;;AA2BA,IA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AAEC;QAAa,CAAC,GAAAD,KAAA;QACzB,IAAME,SAAS,GAAGC,QAAQ,CAACC,cAAc,CACvCH,YAAY,CAACI,cAAc,EAAE,CAC9B;QACD,IAAIH,SAAS,EAAE;UACb,IAAMI,MAAM,GAAGJ,SAAS,CAACK,oBAAoB,CAAC,MAAM,CAAC;UACrD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,MAAM,EAAED,CAAC,EAAE,EAAE;YACtC,IAAME,MAAM,GAAGJ,MAAM,CAACtD,IAAI,CAACwD,CAAC,CAAC;YAE7B,IAAIE,MAAM,IAAIC,QAAQ,CAACD,MAAM,CAACE,SAAS,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE;cACjDF,MAAM,CAACE,SAAS,GAAG,EAAE;YACvB;UACF;QACF;MACF;IACF,CAAC;EACD,EACF,CACD;AAEP,CAAC;AAAAC,OAAA,CAAAzC,SAAA,GAAAA,SAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PerfTable.js","names":["PerfTable","data","onSelect","showAllColumns","columns","setColumns","useState","perfTableColumns","rows","setRows","createTableRows","handleSort","id","sortDirection","sortedColumns","sortedData","doDataTableSort","useEffect"],"sources":["../../../src/components/PerfTracker/PerfTable.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { DataTable, doDataTableSort } from '@looker/components'\n\nimport type { LoadTimes } from './perfUtils'\nimport { createTableRows, perfTableColumns } from './perfTableUtils'\n\ninterface PerfTableProps {\n /** An array of performance load times */\n data: LoadTimes[]\n /** A row select action handler */\n onSelect: (item: LoadTimes) => void\n /** Show all columns, or just \"important\" ones */\n showAllColumns?: boolean\n}\n\n/**\n * Creates a sortable table from an array of performance load times. Each row corresponds to a resource and clicking it\n * generates its performance chart.\n */\nexport const PerfTable: FC<PerfTableProps> = ({\n data,\n onSelect,\n showAllColumns = false,\n}) => {\n const [columns, setColumns] = useState(perfTableColumns(showAllColumns))\n const [rows, setRows] = useState(\n createTableRows(data, onSelect, showAllColumns)\n )\n const handleSort = (id: string, sortDirection: 'asc' | 'desc') => {\n const { columns: sortedColumns, data: sortedData } = doDataTableSort(\n data,\n columns,\n id,\n sortDirection\n )\n setRows(\n createTableRows(sortedData as LoadTimes[], onSelect, showAllColumns)\n )\n setColumns(sortedColumns)\n }\n\n useEffect(() => {\n setColumns(perfTableColumns(showAllColumns))\n }, [showAllColumns])\n useEffect(() => {\n setRows(createTableRows(data, onSelect, showAllColumns))\n }, [data, onSelect, showAllColumns])\n return (\n <DataTable\n onSort={handleSort}\n columns={columns}\n caption=\"Performance load times\"\n >\n {rows}\n </DataTable>\n )\n}\n"],"mappings":";;;;;;AA2BA;AACA;AAGA;AAAoE;AAAA;AAe7D,
|
1
|
+
{"version":3,"file":"PerfTable.js","names":["_react","_interopRequireWildcard","require","_components","_perfTableUtils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","PerfTable","_ref","data","onSelect","showAllColumns","columns","setColumns","useState","perfTableColumns","rows","setRows","createTableRows","handleSort","id","sortDirection","sortedColumns","sortedData","doDataTableSort","useEffect","createElement","DataTable","onSort","caption","exports"],"sources":["../../../src/components/PerfTracker/PerfTable.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport { DataTable, doDataTableSort } from '@looker/components'\n\nimport type { LoadTimes } from './perfUtils'\nimport { createTableRows, perfTableColumns } from './perfTableUtils'\n\ninterface PerfTableProps {\n /** An array of performance load times */\n data: LoadTimes[]\n /** A row select action handler */\n onSelect: (item: LoadTimes) => void\n /** Show all columns, or just \"important\" ones */\n showAllColumns?: boolean\n}\n\n/**\n * Creates a sortable table from an array of performance load times. Each row corresponds to a resource and clicking it\n * generates its performance chart.\n */\nexport const PerfTable: FC<PerfTableProps> = ({\n data,\n onSelect,\n showAllColumns = false,\n}) => {\n const [columns, setColumns] = useState(perfTableColumns(showAllColumns))\n const [rows, setRows] = useState(\n createTableRows(data, onSelect, showAllColumns)\n )\n const handleSort = (id: string, sortDirection: 'asc' | 'desc') => {\n const { columns: sortedColumns, data: sortedData } = doDataTableSort(\n data,\n columns,\n id,\n sortDirection\n )\n setRows(\n createTableRows(sortedData as LoadTimes[], onSelect, showAllColumns)\n )\n setColumns(sortedColumns)\n }\n\n useEffect(() => {\n setColumns(perfTableColumns(showAllColumns))\n }, [showAllColumns])\n useEffect(() => {\n setRows(createTableRows(data, onSelect, showAllColumns))\n }, [data, onSelect, showAllColumns])\n return (\n <DataTable\n onSort={handleSort}\n columns={columns}\n caption=\"Performance load times\"\n >\n {rows}\n </DataTable>\n )\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAGA,IAAAE,eAAA,GAAAF,OAAA;AAAoE,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAA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AU,EAAiBb,QAAQ,EAAEC,cAAc,CAAC,CACrE;IACDE,UAAU,CAACS,aAAa,CAAC;EAC3B,CAAC;EAED,IAAAG,gBAAS,EAAC,MAAM;IACdZ,UAAU,CAAC,IAAAE,gCAAgB,EAACJ,cAAc,CAAC,CAAC;EAC9C,CAAC,EAAE,CAACA,cAAc,CAAC,CAAC;EACpB,IAAAc,gBAAS,EAAC,MAAM;IACdR,OAAO,CAAC,IAAAC,+BAAe,EAACT,IAAI,EAAEC,QAAQ,EAAEC,cAAc,CAAC,CAAC;EAC1D,CAAC,EAAE,CAACF,IAAI,EAAEC,QAAQ,EAAEC,cAAc,CAAC,CAAC;EACpC,OACE/B,MAAA,CAAAY,OAAA,CAAAkC,aAAA,CAAC3C,WAAA,CAAA4C,SAAS;IACRC,MAAM,EAAET,UAAW;IACnBP,OAAO,EAAEA,OAAQ;IACjBiB,OAAO,EAAC;EAAwB,GAE/Bb,IAAI,CACK;AAEhB,CAAC;AAAAc,OAAA,CAAAvB,SAAA,GAAAA,SAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PerfTracker.js","names":["perfFilter","all","value","localStorage","getItem","RunItConfigKey","config","JSON","parse","url","URL","base_url","protocol","hostname","PerfTracker","perf","PerfTimings","showAllColumns","loading","setLoading","useState","showAll","setShowAll","filter","setFilter","data","setData","entries","timings","setTimings","
|
1
|
+
{"version":3,"file":"PerfTracker.js","names":["_react","_interopRequireWildcard","require","_components","_Delete","_ConfigForm","_Loading","_perfUtils","_PerfChart","_PerfTable","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","perfFilter","all","arguments","length","undefined","value","localStorage","getItem","RunItConfigKey","config","JSON","parse","url","URL","base_url","concat","protocol","hostname","PerfTracker","_ref","perf","PerfTimings","showAllColumns","loading","setLoading","useState","showAll","setShowAll","filter","setFilter","data","setData","entries","timings","setTimings","handleClear","_","clear","handleFilterChange","e","target","checked","pf","useEffect","handleSelect","item","createElement","Fragment","Heading","Flex","FlexItem","IconButton","icon","Delete","onClick","label","FieldToggleSwitch","name","onChange","on","Loading","supported","SpaceVertical","gap","PerfChart","loadTimes","PerfTable","onSelect","exports"],"sources":["../../../src/components/PerfTracker/PerfTracker.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 { BaseSyntheticEvent, FC } from 'react'\nimport React, { useEffect, useState } from 'react'\nimport {\n Heading,\n FlexItem,\n IconButton,\n SpaceVertical,\n FieldToggleSwitch,\n Flex,\n} from '@looker/components'\nimport { Delete } from '@styled-icons/material/Delete'\n\nimport { RunItConfigKey } from '../ConfigForm'\nimport { Loading } from '../Loading'\nimport type { LoadTimes } from './perfUtils'\nimport { PerfTimings } from './perfUtils'\nimport { PerfChart } from './PerfChart'\nimport { PerfTable } from './PerfTable'\n\ninterface PerfTrackerProps {\n perf?: PerfTimings\n showAllColumns?: boolean\n}\n\nconst perfFilter = (all = false) => {\n if (all) return '.*'\n // TODO: temporary solution until redux is introduced in RunIt. Using the env\n // adaptor makes the below async, which in turn makes it hard to use this to\n // set the initial state. PerfTracker is only used in the standalone version\n // so this achieves parity.\n const value = localStorage.getItem(RunItConfigKey)\n if (!value) return '.*'\n const config = JSON.parse(value)\n const url = new URL(config.base_url)\n return `${url.protocol}//${url.hostname}.*`\n}\n\nexport const PerfTracker: FC<PerfTrackerProps> = ({\n perf = new PerfTimings(),\n showAllColumns = false,\n}) => {\n // TODO UI option to filter by url pattern\n const [loading, setLoading] = useState(false)\n const [showAll, setShowAll] = useState(false)\n const [filter, setFilter] = useState(perfFilter())\n const [data, setData] = useState<LoadTimes[]>(perf.entries(filter))\n const [timings, setTimings] = useState(data.length > 0 ? data[0] : undefined)\n\n const handleClear = (_: BaseSyntheticEvent) => {\n setLoading(true)\n perf.clear()\n setData([])\n setTimings(undefined)\n }\n\n const handleFilterChange = (e: BaseSyntheticEvent) => {\n setLoading(true)\n const all = e.target.checked\n setShowAll(all)\n const pf = perfFilter(all)\n setFilter(pf)\n setData(perf.entries(pf))\n }\n\n useEffect(() => {\n setLoading(false)\n }, [data])\n\n const handleSelect = (item: LoadTimes) => setTimings(item)\n\n return (\n <>\n <Heading>Load Times for {filter}</Heading>\n <Flex>\n <FlexItem>\n <IconButton\n icon={<Delete />}\n onClick={handleClear}\n label=\"Clear the performance queue\"\n />\n </FlexItem>\n <FlexItem>\n <FieldToggleSwitch\n name=\"filtering\"\n label=\"Show All\"\n onChange={handleFilterChange}\n on={showAll}\n />\n </FlexItem>\n <FlexItem>\n <Loading loading={loading} />\n </FlexItem>\n </Flex>\n <>\n {!PerfTimings.supported &&\n 'Performance timing is not supported in this browser'}\n {PerfTimings.supported && !!timings && (\n <SpaceVertical gap=\"small\">\n <PerfChart loadTimes={timings} />\n <PerfTable\n data={data}\n onSelect={handleSelect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EAAe,EAC/B,CAEL,EACAD,sBAAW,CAACwC,SAAS,IACpB/B,IAAI,CAAC3B,MAAM,GAAG,CAAC,IACf,+BAA+B,CAChC,CACF;AAEP,CAAC;AAAAiE,OAAA,CAAAlD,WAAA,GAAAA,WAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/PerfTracker/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { PerfTracker } from './PerfTracker'\nexport { PerfTimings } from './perfUtils'\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA;AACA"}
|
1
|
+
{"version":3,"file":"index.js","names":["_PerfTracker","require","_perfUtils"],"sources":["../../../src/components/PerfTracker/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { PerfTracker } from './PerfTracker'\nexport { PerfTimings } from './perfUtils'\n"],"mappings":";;;;;;;;;;;;;;;;;AAyBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"perfTableUtils.js","names":["perfTableColumns","all","numericColumns","urlWidth","numWidth","result","canSort","id","primaryKey","title","type","widthPercent","push","Metric","value","description","metric","UrlText","styled","Text","urlColumn","url","URL","path","pathname","search","extraPerfColumns","item","showAllColumns","connect","secureConnection","responseTime","createTableRows","data","onSelect","map","index","name","bind","domainLookup","fetchUntilResponseEnd","requestUntilResponseEnd","startUntilResponseEnd","perfRound","processDuration","duration"],"sources":["../../../src/components/PerfTracker/perfTableUtils.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 */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { DataTableColumns } from '@looker/components'\nimport { DataTableItem, Tooltip, Text, DataTableCell } from '@looker/components'\nimport styled from 'styled-components'\nimport type { LoadTimes } from './perfUtils'\nimport { perfRound } from './perfUtils'\n\n/**\n * An array of columns defining the PerfTable\n * @param all true to include all columns\n */\nexport const perfTableColumns = (all = false) => {\n const numericColumns = all ? 9 : 6\n const urlWidth = all ? 13 : 20\n const numWidth = (100 - urlWidth) / numericColumns + 1\n const result = [\n {\n canSort: true,\n id: 'id',\n primaryKey: true,\n title: 'URL',\n type: 'string',\n widthPercent: urlWidth,\n },\n ]\n if (all) {\n result.push(\n {\n canSort: true,\n id: 'domainLookup',\n primaryKey: false,\n title: 'Domain',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'connect',\n primaryKey: false,\n title: 'Connect',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'secureConnection',\n primaryKey: false,\n title: 'Secure',\n type: 'number',\n widthPercent: numWidth,\n }\n )\n }\n result.push(\n {\n canSort: true,\n id: 'responseTime',\n primaryKey: false,\n title: 'Response',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'fetchUntilResponseEnd',\n primaryKey: false,\n title: 'Fetch',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'requestUntilResponseEnd',\n primaryKey: false,\n title: 'Request',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'startUntilResponseEnd',\n primaryKey: false,\n title: 'Start',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'processDuration',\n primaryKey: false,\n title: 'Processing',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'duration',\n primaryKey: false,\n title: 'Duration',\n type: 'number',\n widthPercent: numWidth,\n }\n )\n return result as DataTableColumns\n}\n\ninterface MetricProps {\n value: number\n description: string\n}\n\n/**\n * Renders a metric with its description in a tooltip\n */\nconst Metric: FC<MetricProps> = ({ value, description }) => (\n <Tooltip placement=\"right\" textAlign=\"left\" content={<>{description}</>}>\n <span>{value}</span>\n </Tooltip>\n)\n\n/**\n * Helper function to create a metric data cell\n * @param value milliseconds of performance metric\n * @param description to explain the metric, with ms value appended\n */\nconst metric = (value: number, description: string) => (\n <>\n <Metric value={value} description={`${description} (${value} ms)`} />\n </>\n)\n\n/**\n * Styling override to align url paths to the right and truncate to the left\n */\nexport const UrlText = styled(Text)`\n display: inline-block;\n direction: rtl;\n width: 78px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n`\n\n/**\n * Special url value display handling\n * @param value is the url to massage\n */\nconst urlColumn = (value: string) => {\n const url = new URL(value)\n const path = `${url.pathname}${url.search}`\n return (\n <>\n <Tooltip content={value}>\n <UrlText mb=\"0\" pt=\"0\" fontSize=\"xsmall\">\n {path}\n </UrlText>\n </Tooltip>\n </>\n )\n}\n\n/**\n * Creates the extra performance columns if showAllColumns is true\n * @param item to put into row data\n * @param showAllColumns toggle for showing or skipping these performance columns\n */\nconst extraPerfColumns = (item: LoadTimes, showAllColumns = false) => {\n if (!showAllColumns) return <></>\n return (\n <>\n <DataTableCell>\n {metric(\n item.connect,\n 'Immediately before the browser starts to establish the connection to the server to retrieve the resource until the connection is established.'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.secureConnection,\n 'Immediately before the browser starts the handshake process to secure the current connection until the connection ends. 0 if not a secure connection.'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.responseTime,\n 'Immediately after the browser receives the first byte of the response from the server until the response ends.'\n )}\n </DataTableCell>\n </>\n )\n}\n\n/**\n * Generates PerfTable rows from an array of resource load times\n * @param data A array of resource load times\n * @param onSelect A handler for performing an action when a row is clicked\n * @param showAllColumns should be true to show all columns\n */\nexport const createTableRows = (\n data: LoadTimes[],\n onSelect: (item: LoadTimes) => void,\n showAllColumns = false\n) =>\n data.map((item, index) => {\n const id = `${item.name}.${index}`\n return (\n <DataTableItem id={id} key={id} onClick={onSelect.bind(null, item)}>\n <DataTableCell>{urlColumn(item.name)}</DataTableCell>\n <DataTableCell>\n {metric(\n item.domainLookup,\n 'Immediately before the browser starts the domain name lookup until it ends'\n )}\n </DataTableCell>\n {extraPerfColumns(item, showAllColumns)}\n <DataTableCell>\n {metric(\n item.fetchUntilResponseEnd,\n 'Immediately before the browser starts to fetch the resource until the response ends'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.requestUntilResponseEnd,\n 'Immediately after the browser receives the first byte of the response from the server until the response ends'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.startUntilResponseEnd,\n 'Immediately before the browser starts requesting the resource from the server'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n perfRound(item.processDuration),\n 'Total time to process the payload'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n perfRound(item.duration),\n 'Total time of the request and response'\n )}\n </DataTableCell>\n </DataTableItem>\n )\n })\n"],"mappings":";;;;;;AA0BA;AAEA;AACA;AAEA;AAAuC;AAMhC,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgB,GAAoB;EAAA,IAAhBC,GAAG,uEAAG,KAAK;EA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BAAa,QACXrB,MAAM,CACLW,IAAI,CAACY,YAAY,EACjB,4EAA4E,CAC7E,CACa,EACfb,gBAAgB,CAACC,IAAI,EAAEC,cAAc,CAAC,EACvC,6BAAC,yBAAa,QACXZ,MAAM,CACLW,IAAI,CAACa,qBAAqB,EAC1B,qFAAqF,CACtF,CACa,EAChB,6BAAC,yBAAa,QACXxB,MAAM,CACLW,IAAI,CAACc,uBAAuB,EAC5B,+GAA+G,CAChH,CACa,EAChB,6BAAC,yBAAa,QACXzB,MAAM,CACLW,IAAI,CAACe,qBAAqB,EAC1B,+EAA+E,CAChF,CACa,EAChB,6BAAC,yBAAa,QACX1B,MAAM,CACL,IAAA2B,oBAAS,EAAChB,IAAI,CAACiB,eAAe,CAAC,EAC/B,mCAAmC,CACpC,CACa,EAChB,6BAAC,yBAAa,QACX5B,MAAM,CACL,IAAA2B,oBAAS,EAAChB,IAAI,CAACkB,QAAQ,CAAC,EACxB,wCAAwC,CACzC,CACa,CACF;EAEpB,CAAC,CAAC;AAAA;AAAA"}
|
1
|
+
{"version":3,"file":"perfTableUtils.js","names":["_react","_interopRequireDefault","require","_components","_styledComponents","_perfUtils","obj","__esModule","default","perfTableColumns","all","arguments","length","undefined","numericColumns","urlWidth","numWidth","result","canSort","id","primaryKey","title","type","widthPercent","push","exports","Metric","_ref","value","description","createElement","Tooltip","placement","textAlign","content","Fragment","metric","concat","UrlText","styled","Text","withConfig","displayName","componentId","urlColumn","url","URL","path","pathname","search","mb","pt","fontSize","extraPerfColumns","item","showAllColumns","DataTableCell","connect","secureConnection","responseTime","createTableRows","data","onSelect","map","index","name","DataTableItem","key","onClick","bind","domainLookup","fetchUntilResponseEnd","requestUntilResponseEnd","startUntilResponseEnd","perfRound","processDuration","duration"],"sources":["../../../src/components/PerfTracker/perfTableUtils.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 */\nimport type { FC } from 'react'\nimport React from 'react'\nimport type { DataTableColumns } from '@looker/components'\nimport { DataTableItem, Tooltip, Text, DataTableCell } from '@looker/components'\nimport styled from 'styled-components'\nimport type { LoadTimes } from './perfUtils'\nimport { perfRound } from './perfUtils'\n\n/**\n * An array of columns defining the PerfTable\n * @param all true to include all columns\n */\nexport const perfTableColumns = (all = false) => {\n const numericColumns = all ? 9 : 6\n const urlWidth = all ? 13 : 20\n const numWidth = (100 - urlWidth) / numericColumns + 1\n const result = [\n {\n canSort: true,\n id: 'id',\n primaryKey: true,\n title: 'URL',\n type: 'string',\n widthPercent: urlWidth,\n },\n ]\n if (all) {\n result.push(\n {\n canSort: true,\n id: 'domainLookup',\n primaryKey: false,\n title: 'Domain',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'connect',\n primaryKey: false,\n title: 'Connect',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'secureConnection',\n primaryKey: false,\n title: 'Secure',\n type: 'number',\n widthPercent: numWidth,\n }\n )\n }\n result.push(\n {\n canSort: true,\n id: 'responseTime',\n primaryKey: false,\n title: 'Response',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'fetchUntilResponseEnd',\n primaryKey: false,\n title: 'Fetch',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'requestUntilResponseEnd',\n primaryKey: false,\n title: 'Request',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'startUntilResponseEnd',\n primaryKey: false,\n title: 'Start',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'processDuration',\n primaryKey: false,\n title: 'Processing',\n type: 'number',\n widthPercent: numWidth,\n },\n {\n canSort: true,\n id: 'duration',\n primaryKey: false,\n title: 'Duration',\n type: 'number',\n widthPercent: numWidth,\n }\n )\n return result as DataTableColumns\n}\n\ninterface MetricProps {\n value: number\n description: string\n}\n\n/**\n * Renders a metric with its description in a tooltip\n */\nconst Metric: FC<MetricProps> = ({ value, description }) => (\n <Tooltip placement=\"right\" textAlign=\"left\" content={<>{description}</>}>\n <span>{value}</span>\n </Tooltip>\n)\n\n/**\n * Helper function to create a metric data cell\n * @param value milliseconds of performance metric\n * @param description to explain the metric, with ms value appended\n */\nconst metric = (value: number, description: string) => (\n <>\n <Metric value={value} description={`${description} (${value} ms)`} />\n </>\n)\n\n/**\n * Styling override to align url paths to the right and truncate to the left\n */\nexport const UrlText = styled(Text)`\n display: inline-block;\n direction: rtl;\n width: 78px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n`\n\n/**\n * Special url value display handling\n * @param value is the url to massage\n */\nconst urlColumn = (value: string) => {\n const url = new URL(value)\n const path = `${url.pathname}${url.search}`\n return (\n <>\n <Tooltip content={value}>\n <UrlText mb=\"0\" pt=\"0\" fontSize=\"xsmall\">\n {path}\n </UrlText>\n </Tooltip>\n </>\n )\n}\n\n/**\n * Creates the extra performance columns if showAllColumns is true\n * @param item to put into row data\n * @param showAllColumns toggle for showing or skipping these performance columns\n */\nconst extraPerfColumns = (item: LoadTimes, showAllColumns = false) => {\n if (!showAllColumns) return <></>\n return (\n <>\n <DataTableCell>\n {metric(\n item.connect,\n 'Immediately before the browser starts to establish the connection to the server to retrieve the resource until the connection is established.'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.secureConnection,\n 'Immediately before the browser starts the handshake process to secure the current connection until the connection ends. 0 if not a secure connection.'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.responseTime,\n 'Immediately after the browser receives the first byte of the response from the server until the response ends.'\n )}\n </DataTableCell>\n </>\n )\n}\n\n/**\n * Generates PerfTable rows from an array of resource load times\n * @param data A array of resource load times\n * @param onSelect A handler for performing an action when a row is clicked\n * @param showAllColumns should be true to show all columns\n */\nexport const createTableRows = (\n data: LoadTimes[],\n onSelect: (item: LoadTimes) => void,\n showAllColumns = false\n) =>\n data.map((item, index) => {\n const id = `${item.name}.${index}`\n return (\n <DataTableItem id={id} key={id} onClick={onSelect.bind(null, item)}>\n <DataTableCell>{urlColumn(item.name)}</DataTableCell>\n <DataTableCell>\n {metric(\n item.domainLookup,\n 'Immediately before the browser starts the domain name lookup until it ends'\n )}\n </DataTableCell>\n {extraPerfColumns(item, showAllColumns)}\n <DataTableCell>\n {metric(\n item.fetchUntilResponseEnd,\n 'Immediately before the browser starts to fetch the resource until the response ends'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.requestUntilResponseEnd,\n 'Immediately after the browser receives the first byte of the response from the server until the response ends'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n item.startUntilResponseEnd,\n 'Immediately before the browser starts requesting the resource from the server'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n perfRound(item.processDuration),\n 'Total time to process the payload'\n )}\n </DataTableCell>\n <DataTableCell>\n {metric(\n perfRound(item.duration),\n 'Total time of the request and response'\n )}\n </DataTableCell>\n </DataTableItem>\n )\n })\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,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a,QACXpB,MAAM,CACL,IAAAsC,oBAAS,EAACpB,IAAI,CAACsB,QAAQ,CAAC,EACxB,wCAAwC,CACzC,CACa,CACF;EAEpB,CAAC,CAAC;AAAA;AAAAnD,OAAA,CAAAmC,eAAA,GAAAA,eAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"perfUtils.js","names":["perfRound","num","Math","round","Number","EPSILON","diff","end","start","LoadTimes","constructor","entry","resource","redirect","redirectEnd","redirectStart","domainLookup","domainLookupEnd","domainLookupStart","connect","connectEnd","connectStart","secureConnectionStart","secureConnection","responseTime","responseEnd","responseStart","fetchStart","fetchUntilResponseEnd","requestStart","requestUntilResponseEnd","startTime","startUntilResponseEnd","calcProcessTime","duration","performance","getEntriesByName","undefined","entries","name","length","measure","processStart","processEnd","processDuration","PerfTimings","supported","_supported","value","onresourcetimingbufferfull","_ev","_full","clear","clearResourceTimings","clearMarks","clearMeasures","pattern","type","ex","RegExp","getEntriesByType","filter","p","test","map","bufferSize","_bufferSize","setResourceTimingBufferSize","isFull"],"sources":["../../../src/components/PerfTracker/perfUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\n/**\n * Calculation of Load times for a resource performance entry\n */\nexport interface IResourceLoadTimes {\n entry: PerformanceEntry\n name: string\n duration: number\n redirect: number\n domainLookup: number\n connect: number\n secureConnection: number\n responseTime: number\n fetchUntilResponseEnd: number\n requestUntilResponseEnd: number\n startUntilResponseEnd: number\n processStart: number\n processEnd: number\n processDuration: number\n}\n\n/**\n * Rounds a number to 3 decimal places\n */\nexport const perfRound = (num: number) =>\n Math.round((num + Number.EPSILON) * 10000) / 10000\n\n/**\n * Round and scale (if needed) the difference in performance metrics\n * @param end of high precision timer metric\n * @param start of high precision timer metric\n * @returns rounded difference of end - start\n */\nconst diff = (end: number, start: number) => perfRound(end - start)\n\nexport class LoadTimes implements IResourceLoadTimes {\n duration = 0\n redirect = 0\n domainLookup = 0\n connect = 0\n secureConnection = 0\n responseTime = 0\n fetchUntilResponseEnd = 0\n requestUntilResponseEnd = 0\n startUntilResponseEnd = 0\n processStart = 0\n processEnd = 0\n processDuration = 0\n\n constructor(public entry: PerformanceEntry) {\n if ('redirectStart' in entry) {\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming\n // Either a `PerformanceResourceTiming` or `PerformanceTiming` instance\n const resource = entry as PerformanceResourceTiming\n this.redirect = diff(resource.redirectEnd, resource.redirectStart)\n this.domainLookup = diff(\n resource.domainLookupEnd,\n resource.domainLookupStart\n )\n this.connect = diff(resource.connectEnd, resource.connectStart)\n if (resource.secureConnectionStart > 0)\n this.secureConnection = diff(\n resource.connectEnd,\n resource.secureConnectionStart\n )\n this.responseTime = diff(resource.responseEnd, resource.responseStart)\n if (resource.fetchStart > 0)\n this.fetchUntilResponseEnd = diff(\n resource.responseEnd,\n resource.fetchStart\n )\n if (resource.requestStart > 0)\n this.requestUntilResponseEnd = diff(\n resource.responseEnd,\n resource.requestStart\n )\n if (resource.startTime > 0)\n this.startUntilResponseEnd = diff(\n resource.responseEnd,\n resource.startTime\n )\n this.calcProcessTime()\n }\n }\n\n private calcProcessTime() {\n this.duration = this.entry.duration\n if (performance.getEntriesByName !== undefined) {\n const entries = performance.getEntriesByName(\n `${this.name}-${this.entry.startTime}`,\n 'measure'\n )\n if (entries.length > 0) {\n const measure = entries[entries.length - 1] as PerformanceMeasure\n const resource = this.entry as PerformanceResourceTiming\n this.processStart = resource.responseEnd\n this.processEnd = resource.responseEnd + measure.duration\n this.processDuration = measure.duration\n this.duration += measure.duration\n }\n }\n }\n\n get name() {\n return this.entry.name\n }\n}\n\n/**\n * Performance API utility class\n *\n * Defaults to \"resource\" types\n * */\nexport class PerfTimings {\n private _full = false\n private _bufferSize = 0\n private static _supported: boolean | undefined = undefined\n\n /** Are performance timings supported in this runtime? */\n public static get supported() {\n if (PerfTimings._supported === undefined) {\n // This gyration is necessary to avoid IDEA-based exceptions about performance being undefined,\n // which it may be, but this now throws up in IDEA\n try {\n PerfTimings._supported = performance !== undefined\n } catch {\n PerfTimings._supported = false\n }\n }\n return PerfTimings._supported\n }\n\n public static set supported(value: boolean) {\n PerfTimings._supported = value\n }\n\n constructor() {\n if (PerfTimings.supported) {\n performance.onresourcetimingbufferfull = (_ev) => (this._full = true)\n // https://developer.mozilla.org/en-US/docs/Web/API/Performance/setResourceTimingBufferSize\n // says the buffer size should be at least 150, but I don't know if we need to set it\n // this.bufferSize = 50 // TODO what's the default bufferSize? Does it vary by browser?\n }\n }\n\n clear() {\n if (!PerfTimings.supported) return false\n if (performance.clearResourceTimings !== undefined)\n performance.clearResourceTimings()\n if (performance.clearMarks !== undefined) performance.clearMarks()\n if (performance.clearMeasures !== undefined) performance.clearMeasures()\n this._full = this.entries().length === 0\n return this._full\n }\n\n entries(pattern = '.*', type = 'resource') {\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry\n if (PerfTimings.supported) {\n const ex = new RegExp(pattern, 'i')\n return performance\n .getEntriesByType(type)\n .filter((p) => ex.test(p.name))\n .map((p) => new LoadTimes(p))\n }\n return []\n }\n\n get bufferSize() {\n return this._bufferSize\n }\n\n set bufferSize(value) {\n if (\n PerfTimings.supported &&\n typeof performance.setResourceTimingBufferSize !== undefined\n ) {\n this._bufferSize = value\n performance.setResourceTimingBufferSize(value)\n }\n }\n\n get isFull() {\n return this._full\n }\n}\n"],"mappings":";;;;;;;;;AAiDO,IAAMA,SAAS,GAAIC,GAAW,IACnCC,IAAI,CAACC,KAAK,CAAC,CAACF,GAAG,GAAGG,MAAM,CAACC,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK;AAAA;AAQpD,IAAMC,IAAI,GAAG,CAACC,GAAW,EAAEC,KAAa,KAAKR,SAAS,CAACO,GAAG,GAAGC,KAAK,CAAC;AAE5D,MAAMC,SAAS,CAA+B;EAcnDC,WAAW,CAAQC,KAAuB,EAAE;IAAA,KAAzBA,KAAuB,GAAvBA,KAAuB;IAAA,kCAb/B,CAAC;IAAA,kCACD,CAAC;IAAA,sCACG,CAAC;IAAA,iCACN,CAAC;IAAA,0CACQ,CAAC;IAAA,sCACL,CAAC;IAAA,+CACQ,CAAC;IAAA,iDACC,CAAC;IAAA,+CACH,CAAC;IAAA,sCACV,CAAC;IAAA,oCACH,CAAC;IAAA,yCACI,CAAC;IAGjB,IAAI,eAAe,IAAIA,KAAK,EAAE;MAG5B,IAAMC,QAAQ,GAAGD,KAAkC;MACnD,IAAI,CAACE,QAAQ,GAAGP,IAAI,CAACM,QAAQ,CAACE,WAAW,EAAEF,QAAQ,CAACG,aAAa,CAAC;MAClE,IAAI,CAACC,YAAY,GAAGV,IAAI,CACtBM,QAAQ,CAACK,eAAe,EACxBL,QAAQ,CAACM,iBAAiB,CAC3B;MACD,IAAI,CAACC,OAAO,GAAGb,IAAI,CAACM,QAAQ,CAACQ,UAAU,EAAER,QAAQ,CAACS,YAAY,CAAC;MAC/D,IAAIT,QAAQ,CAACU,qBAA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OAAO,GAAoC;IAAA,IAAnCkB,OAAO,uEAAG,IAAI;IAAA,IAAEC,IAAI,uEAAG,UAAU;IAEvC,IAAIZ,WAAW,CAACC,SAAS,EAAE;MACzB,IAAMY,EAAE,GAAG,IAAIC,MAAM,CAACH,OAAO,EAAE,GAAG,CAAC;MACnC,OAAOrB,WAAW,CACfyB,gBAAgB,CAACH,IAAI,CAAC,CACtBI,MAAM,CAAEC,CAAC,IAAKJ,EAAE,CAACK,IAAI,CAACD,CAAC,CAACvB,IAAI,CAAC,CAAC,CAC9ByB,GAAG,CAAEF,CAAC,IAAK,IAAIrD,SAAS,CAACqD,CAAC,CAAC,CAAC;IACjC;IACA,OAAO,EAAE;EACX;EAEA,IAAIG,UAAU,GAAG;IACf,OAAO,IAAI,CAACC,WAAW;EACzB;EAEA,IAAID,UAAU,CAACjB,KAAK,EAAE;IACpB,IACEH,WAAW,CAACC,SAAS,IACrB,OAAOX,WAAW,CAACgC,2BAA2B,KAAK9B,SAAS,EAC5D;MACA,IAAI,CAAC6B,WAAW,GAAGlB,KAAK;MACxBb,WAAW,CAACgC,2BAA2B,CAACnB,KAAK,CAAC;IAChD;EACF;EAEA,IAAIoB,MAAM,GAAG;IACX,OAAO,IAAI,CAACjB,KAAK;EACnB;AACF;AAAC;AAAA,gBAvEYN,WAAW,gBAG2BR,SAAS"}
|
1
|
+
{"version":3,"file":"perfUtils.js","names":["perfRound","num","Math","round","Number","EPSILON","exports","diff","end","start","LoadTimes","constructor","entry","_defineProperty","resource","redirect","redirectEnd","redirectStart","domainLookup","domainLookupEnd","domainLookupStart","connect","connectEnd","connectStart","secureConnectionStart","secureConnection","responseTime","responseEnd","responseStart","fetchStart","fetchUntilResponseEnd","requestStart","requestUntilResponseEnd","startTime","startUntilResponseEnd","calcProcessTime","duration","performance","getEntriesByName","undefined","entries","concat","name","length","measure","processStart","processEnd","processDuration","PerfTimings","supported","_supported","_unused","value","onresourcetimingbufferfull","_ev","_full","clear","clearResourceTimings","clearMarks","clearMeasures","pattern","arguments","type","ex","RegExp","getEntriesByType","filter","p","test","map","bufferSize","_bufferSize","setResourceTimingBufferSize","isFull"],"sources":["../../../src/components/PerfTracker/perfUtils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\n/**\n * Calculation of Load times for a resource performance entry\n */\nexport interface IResourceLoadTimes {\n entry: PerformanceEntry\n name: string\n duration: number\n redirect: number\n domainLookup: number\n connect: number\n secureConnection: number\n responseTime: number\n fetchUntilResponseEnd: number\n requestUntilResponseEnd: number\n startUntilResponseEnd: number\n processStart: number\n processEnd: number\n processDuration: number\n}\n\n/**\n * Rounds a number to 3 decimal places\n */\nexport const perfRound = (num: number) =>\n Math.round((num + Number.EPSILON) * 10000) / 10000\n\n/**\n * Round and scale (if needed) the difference in performance metrics\n * @param end of high precision timer metric\n * @param start of high precision timer metric\n * @returns rounded difference of end - start\n */\nconst diff = (end: number, start: number) => perfRound(end - start)\n\nexport class LoadTimes implements IResourceLoadTimes {\n duration = 0\n redirect = 0\n domainLookup = 0\n connect = 0\n secureConnection = 0\n responseTime = 0\n fetchUntilResponseEnd = 0\n requestUntilResponseEnd = 0\n startUntilResponseEnd = 0\n processStart = 0\n processEnd = 0\n processDuration = 0\n\n constructor(public entry: PerformanceEntry) {\n if ('redirectStart' in entry) {\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming\n // Either a `PerformanceResourceTiming` or `PerformanceTiming` instance\n const resource = entry as PerformanceResourceTiming\n this.redirect = diff(resource.redirectEnd, resource.redirectStart)\n this.domainLookup = diff(\n resource.domainLookupEnd,\n resource.domainLookupStart\n )\n this.connect = diff(resource.connectEnd, resource.connectStart)\n if (resource.secureConnectionStart > 0)\n this.secureConnection = diff(\n resource.connectEnd,\n resource.secureConnectionStart\n )\n this.responseTime = diff(resource.responseEnd, resource.responseStart)\n if (resource.fetchStart > 0)\n this.fetchUntilResponseEnd = diff(\n resource.responseEnd,\n resource.fetchStart\n )\n if (resource.requestStart > 0)\n this.requestUntilResponseEnd = diff(\n resource.responseEnd,\n resource.requestStart\n )\n if (resource.startTime > 0)\n this.startUntilResponseEnd = diff(\n resource.responseEnd,\n resource.startTime\n )\n this.calcProcessTime()\n }\n }\n\n private calcProcessTime() {\n this.duration = this.entry.duration\n if (performance.getEntriesByName !== undefined) {\n const entries = performance.getEntriesByName(\n `${this.name}-${this.entry.startTime}`,\n 'measure'\n )\n if (entries.length > 0) {\n const measure = entries[entries.length - 1] as PerformanceMeasure\n const resource = this.entry as PerformanceResourceTiming\n this.processStart = resource.responseEnd\n this.processEnd = resource.responseEnd + measure.duration\n this.processDuration = measure.duration\n this.duration += measure.duration\n }\n }\n }\n\n get name() {\n return this.entry.name\n }\n}\n\n/**\n * Performance API utility class\n *\n * Defaults to \"resource\" types\n * */\nexport class PerfTimings {\n private _full = false\n private _bufferSize = 0\n private static _supported: boolean | undefined = undefined\n\n /** Are performance timings supported in this runtime? */\n public static get supported() {\n if (PerfTimings._supported === undefined) {\n // This gyration is necessary to avoid IDEA-based exceptions about performance being undefined,\n // which it may be, but this now throws up in IDEA\n try {\n PerfTimings._supported = performance !== undefined\n } catch {\n PerfTimings._supported = false\n }\n }\n return PerfTimings._supported\n }\n\n public static set supported(value: boolean) {\n PerfTimings._supported = value\n }\n\n constructor() {\n if (PerfTimings.supported) {\n performance.onresourcetimingbufferfull = (_ev) => (this._full = true)\n // https://developer.mozilla.org/en-US/docs/Web/API/Performance/setResourceTimingBufferSize\n // says the buffer size should be at least 150, but I don't know if we need to set it\n // this.bufferSize = 50 // TODO what's the default bufferSize? Does it vary by browser?\n }\n }\n\n clear() {\n if (!PerfTimings.supported) return false\n if (performance.clearResourceTimings !== undefined)\n performance.clearResourceTimings()\n if (performance.clearMarks !== undefined) performance.clearMarks()\n if (performance.clearMeasures !== undefined) performance.clearMeasures()\n this._full = this.entries().length === 0\n return this._full\n }\n\n entries(pattern = '.*', type = 'resource') {\n // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry\n if (PerfTimings.supported) {\n const ex = new RegExp(pattern, 'i')\n return performance\n .getEntriesByType(type)\n .filter((p) => ex.test(p.name))\n .map((p) => new LoadTimes(p))\n }\n return []\n }\n\n get bufferSize() {\n return this._bufferSize\n }\n\n set bufferSize(value) {\n if (\n PerfTimings.supported &&\n typeof performance.setResourceTimingBufferSize !== undefined\n ) {\n this._bufferSize = value\n performance.setResourceTimingBufferSize(value)\n }\n }\n\n get isFull() {\n return this._full\n }\n}\n"],"mappings":";;;;;;;;;AAiDO,IAAMA,SAAS,GAAIC,GAAW,IACnCC,IAAI,CAACC,KAAK,CAAC,CAACF,GAAG,GAAGG,MAAM,CAACC,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK;AAAAC,OAAA,CAAAN,SAAA,GAAAA,SAAA;AAQpD,IAAMO,IAAI,GAAGA,CAACC,GAAW,EAAEC,KAAa,KAAKT,SAAS,CAACQ,GAAG,GAAGC,KAAK,CAAC;AAE5D,MAAMC,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,EAAE,GAAG,CAAC;MACnC,OAAOvB,WAAW,CACf4B,gBAAgB,CAACH,IAAI,CAAC,CACtBI,MAAM,CAAEC,CAAC,IAAKJ,EAAE,CAACK,IAAI,CAACD,CAAC,CAACzB,IAAI,CAAC,CAAC,CAC9B2B,GAAG,CAAEF,CAAC,IAAK,IAAIzD,SAAS,CAACyD,CAAC,CAAC,CAAC;IACjC;IACA,OAAO,EAAE;EACX;EAEA,IAAIG,UAAUA,CAAA,EAAG;IACf,OAAO,IAAI,CAACC,WAAW;EACzB;EAEA,IAAID,UAAUA,CAAClB,KAAK,EAAE;IACpB,IACEJ,WAAW,CAACC,SAAS,IACrB,OAAOZ,WAAW,CAACmC,2BAA2B,KAAKjC,SAAS,EAC5D;MACA,IAAI,CAACgC,WAAW,GAAGnB,KAAK;MACxBf,WAAW,CAACmC,2BAA2B,CAACpB,KAAK,CAAC;IAChD;EACF;EAEA,IAAIqB,MAAMA,CAAA,EAAG;IACX,OAAO,IAAI,CAAClB,KAAK;EACnB;AACF;AAACjD,OAAA,CAAA0C,WAAA,GAAAA,WAAA;AAAAnC,eAAA,CAvEYmC,WAAW,gBAG2BT,SAAS"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FormItem.js","names":["FormItem","id","children","label","key"],"sources":["../../../src/components/RequestForm/FormItem.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 */\nimport type { FC, ReactElement } from 'react'\nimport React from 'react'\nimport { Space, Box, Label } from '@looker/components'\n\ninterface FormItemProps {\n /** ID of input item for label */\n id: string\n /** Optional label. Defaults to an empty string so spacing is preserved */\n label?: string | ReactElement\n /** Nested react elements */\n children: ReactElement\n}\n\n/**\n * basic input form layout component\n * @param id of input item\n * @param children embedded react elements\n * @param label optional label\n */\nexport const FormItem: FC<FormItemProps> = ({ id, children, label = ' ' }) => {\n const key = `space_${id}`\n return (\n <Space id={key} key={key}>\n <Box key={`${key}_box`} width=\"120px\" flexShrink={0}>\n <Label key={`${key}_label_for`} htmlFor={id}>\n {label}\n </Label>\n </Box>\n {children}\n </Space>\n )\n}\n"],"mappings":";;;;;;AA0BA;AACA;AAAsD;AAiB/C,
|
1
|
+
{"version":3,"file":"FormItem.js","names":["_react","_interopRequireDefault","require","_components","obj","__esModule","default","FormItem","_ref","id","children","label","key","concat","createElement","Space","Box","width","flexShrink","Label","htmlFor","exports"],"sources":["../../../src/components/RequestForm/FormItem.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 */\nimport type { FC, ReactElement } from 'react'\nimport React from 'react'\nimport { Space, Box, Label } from '@looker/components'\n\ninterface FormItemProps {\n /** ID of input item for label */\n id: string\n /** Optional label. Defaults to an empty string so spacing is preserved */\n label?: string | ReactElement\n /** Nested react elements */\n children: ReactElement\n}\n\n/**\n * basic input form layout component\n * @param id of input item\n * @param children embedded react elements\n * @param label optional label\n */\nexport const FormItem: FC<FormItemProps> = ({ id, children, label = ' ' }) => {\n const key = `space_${id}`\n return (\n <Space id={key} key={key}>\n <Box key={`${key}_box`} width=\"120px\" flexShrink={0}>\n <Label key={`${key}_label_for`} htmlFor={id}>\n {label}\n </Label>\n </Box>\n {children}\n </Space>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAAsD,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAiB/C,IAAMG,QAA2B,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC,EAAE;IAAEC,QAAQ;IAAEC,KAAK,GAAG;EAAI,CAAC,GAAAH,IAAA;EACvE,IAAMI,GAAG,YAAAC,MAAA,CAAYJ,EAAE,CAAE;EACzB,OACET,MAAA,CAAAM,OAAA,CAAAQ,aAAA,CAACX,WAAA,CAAAY,KAAK;IAACN,EAAE,EAAEG,GAAI;IAACA,GAAG,EAAEA;EAAI,GACvBZ,MAAA,CAAAM,OAAA,CAAAQ,aAAA,CAACX,WAAA,CAAAa,GAAG;IAACJ,GAAG,KAAAC,MAAA,CAAKD,GAAG,SAAO;IAACK,KAAK,EAAC,OAAO;IAACC,UAAU,EAAE;EAAE,GAClDlB,MAAA,CAAAM,OAAA,CAAAQ,aAAA,CAACX,WAAA,CAAAgB,KAAK;IAACP,GAAG,KAAAC,MAAA,CAAKD,GAAG,eAAa;IAACQ,OAAO,EAAEX;EAAG,GACzCE,KAAK,CACA,CACJ,EACLD,QAAQ,CACH;AAEZ,CAAC;AAAAW,OAAA,CAAAd,QAAA,GAAAA,QAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RequestForm.js","names":["RequestForm","inputs","httpMethod","handleSubmit","requestContent","setRequestContent","needsAuth","hasConfig","handleConfig","setHasConfig","validationMessage","setValidationMessage","keepBody","toggleKeepBody","isExtension","hasBody","some","i","location","handleBoolChange","e","target","name","checked","handleNumberChange","value","parseFloat","undefined","newState","updateNullableProp","handleDateChange","date","handleChange","handleComplexChange","safeSetMessage","handleClear","preventDefault","map","input","type","createSimpleItem","createComplexItem","showDataChangeWarning","BODY_HINT"],"sources":["../../../src/components/RequestForm/RequestForm.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 { BaseSyntheticEvent, FC, Dispatch, FormEventHandler } from 'react'\nimport React from 'react'\nimport {\n Button,\n Form,\n ButtonTransparent,\n Tooltip,\n Fieldset,\n MessageBar,\n ToggleSwitch,\n Label,\n} from '@looker/components'\nimport type { RunItHttpMethod, RunItInput, RunItValues } from '../../RunIt'\nimport { LoginForm } from '../LoginForm'\nimport {\n createSimpleItem,\n createComplexItem,\n showDataChangeWarning,\n updateNullableProp,\n BODY_HINT,\n} from './formUtils'\nimport { FormItem } from './FormItem'\nimport { DarkSpan } from './../common'\n\n/** Properties required by RequestForm */\ninterface RequestFormProps {\n /** Request inputs to the endpoint */\n inputs: RunItInput[]\n /** A callback for submitting the form */\n handleSubmit: (e: BaseSyntheticEvent) => void\n /** HTTP method used for this REST request */\n httpMethod: RunItHttpMethod\n /** A collection type react state to store path, query and body parameters as entered by the user */\n requestContent: RunItValues\n /** A set state callback fn for populating requestContent on interaction with the request form */\n setRequestContent: Dispatch<RunItValues>\n /** Is authentication required? */\n needsAuth: boolean\n /** Does RunIt have the configuration values it needs? */\n hasConfig: boolean\n /** Handle config button click */\n handleConfig: (e: BaseSyntheticEvent) => void\n /** A set state callback which, if present, allows for editing, setting or clearing OAuth configuration parameters */\n setHasConfig?: Dispatch<boolean>\n /** Validation message to display */\n validationMessage?: string\n /** Validation message setter */\n setValidationMessage?: Dispatch<string>\n /** Toggle for processing body inputs */\n keepBody?: boolean\n /** Toggle to keep all body inputs */\n toggleKeepBody?: (_event: FormEventHandler<HTMLInputElement>) => void\n /** Is RunIt being used in a Looker extension? */\n isExtension?: boolean\n}\n\n/**\n * Dynamically generates a REST request form and its form elements corresponding to parameters from an array of RunIt\n * inputs\n */\nexport const RequestForm: FC<RequestFormProps> = ({\n inputs,\n httpMethod,\n handleSubmit,\n requestContent,\n setRequestContent,\n needsAuth,\n hasConfig,\n handleConfig,\n setHasConfig,\n validationMessage,\n setValidationMessage,\n keepBody,\n toggleKeepBody,\n isExtension = false,\n}) => {\n const hasBody = inputs.some((i) => i.location === 'body')\n\n const handleBoolChange = (e: BaseSyntheticEvent) => {\n setRequestContent({ ...requestContent, [e.target.name]: e.target.checked })\n }\n\n const handleNumberChange = (e: BaseSyntheticEvent) => {\n const value = e.target.value ? parseFloat(e.target.value) : undefined\n const newState = updateNullableProp(requestContent, e.target.name, value)\n setRequestContent(newState)\n }\n\n const handleDateChange = (name: string, date?: Date) => {\n const newState = updateNullableProp(requestContent, name, date)\n setRequestContent(newState)\n }\n\n const handleChange = (e: BaseSyntheticEvent) => {\n const newState = updateNullableProp(\n requestContent,\n e.target.name,\n e.target.value\n )\n setRequestContent(newState)\n }\n\n const handleComplexChange = (name: string, value: string) => {\n setRequestContent({ ...requestContent, [name]: value })\n }\n\n const safeSetMessage = (value: string) =>\n setValidationMessage && setValidationMessage(value)\n\n const handleClear = (e: BaseSyntheticEvent) => {\n e.preventDefault()\n setRequestContent({})\n safeSetMessage('')\n }\n\n return (\n <Form onSubmit={handleSubmit}>\n {validationMessage && (\n <MessageBar\n intent={'critical'}\n onPrimaryClick={() => safeSetMessage('')}\n visible={validationMessage !== ''}\n >\n {validationMessage}\n </MessageBar>\n )}\n <Fieldset>\n {inputs.map((input) =>\n typeof input.type === 'string'\n ? createSimpleItem(\n input,\n handleChange,\n handleNumberChange,\n handleBoolChange,\n handleDateChange,\n requestContent\n )\n : createComplexItem(input, handleComplexChange, requestContent)\n )}\n {httpMethod !== 'GET' && showDataChangeWarning()}\n {hasBody && !!toggleKeepBody && (\n <>\n <FormItem key=\"keepbody_fib\" id=\"keepBody\" label=\"Send body as-is\">\n <>\n <ToggleSwitch\n key=\"keepBody\"\n id=\"keepBody\"\n name=\"keepBody\"\n onChange={toggleKeepBody as unknown as FormEventHandler}\n on={keepBody}\n />\n <Label>Send the body parameter as entered</Label>\n </>\n </FormItem>\n <FormItem key=\"body_hint\" id=\"bodyHint\">\n <DarkSpan fontSize=\"small\">{BODY_HINT}</DarkSpan>\n </FormItem>\n </>\n )}\n <FormItem id=\"buttonbar\">\n <>\n {hasConfig ? (\n needsAuth ? (\n <LoginForm requestContent={requestContent} />\n ) : (\n <Tooltip content=\"Run the API request\">\n <Button type=\"submit\">Run</Button>\n </Tooltip>\n )\n ) : (\n !isExtension &&\n setHasConfig && (\n <Tooltip content=\"Configure your OAuth server to Run requests\">\n <Button onClick={handleConfig}>Configure</Button>\n </Tooltip>\n )\n )}\n <Tooltip content=\"Clear entered values\">\n <ButtonTransparent type=\"button\" onClick={handleClear}>\n Clear\n </ButtonTransparent>\n </Tooltip>\n </>\n </FormItem>\n </Fieldset>\n </Form>\n )\n}\n"],"mappings":";;;;;;AA2BA;AACA;AAWA;AACA;AAOA;AACA;AAAsC;AAAA;AAAA;AAAA;AAAA;AAAA;AAsC/B,IAAMA,WAAiC,GAAG,QAe3C;EAAA,IAf4C;IAChDC,MAAM;IACNC,UAAU;IACVC,YAAY;IACZC,cAAc;IACdC,iBAAiB;IACjBC,SAAS;IACTC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,iBAAiB;IACjBC,oBAAoB;IACpBC,QAAQ;IACRC,cAAc;IACdC,WAAW,GAAG;EAChB,CAAC;EACC,IAAMC,OAAO,GAAGd,MAAM,CAACe,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,QAAQ,KAAK,MAAM,CAAC;EAEzD,IAAMC,gBAAgB,GAAIC,CAAqB,IAAK;IAClDf,iBAAiB,iCAAMD,cAAc;MAAE,CAACgB,CAAC,CAACC,MAAM,CAACC,IAAI,GAAGF,CAAC,CAACC,MAAM,CAACE;IAAO,GAAG;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AAW,IACZL,YAAY,IACV,6BAAC,mBAAO;IAAC,OAAO,EAAC;EAA6C,GAC5D,6BAAC,kBAAM;IAAC,OAAO,EAAED;EAAa,GAAC,WAAS,CAAS,CAGtD,EACD,6BAAC,mBAAO;IAAC,OAAO,EAAC;EAAsB,GACrC,6BAAC,6BAAiB;IAAC,IAAI,EAAC,QAAQ;IAAC,OAAO,EAAE2B;EAAY,GAAC,OAEvD,CAAoB,CACZ,CACT,CACM,CACF,CACN;AAEX,CAAC;AAAA"}
|
1
|
+
{"version":3,"file":"RequestForm.js","names":["_react","_interopRequireDefault","require","_components","_LoginForm","_formUtils","_FormItem","_common","obj","__esModule","default","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","RequestForm","_ref","inputs","httpMethod","handleSubmit","requestContent","setRequestContent","needsAuth","hasConfig","handleConfig","setHasConfig","validationMessage","setValidationMessage","keepBody","toggleKeepBody","isExtension","hasBody","some","location","handleBoolChange","e","name","checked","handleNumberChange","parseFloat","newState","updateNullableProp","handleDateChange","date","handleChange","handleComplexChange","safeSetMessage","handleClear","preventDefault","createElement","Form","onSubmit","MessageBar","intent","onPrimaryClick","visible","Fieldset","map","type","createSimpleItem","createComplexItem","showDataChangeWarning","Fragment","FormItem","id","label","ToggleSwitch","onChange","on","Label","DarkSpan","fontSize","BODY_HINT","LoginForm","Tooltip","content","Button","onClick","ButtonTransparent","exports"],"sources":["../../../src/components/RequestForm/RequestForm.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 { BaseSyntheticEvent, FC, Dispatch, FormEventHandler } from 'react'\nimport React from 'react'\nimport {\n Button,\n Form,\n ButtonTransparent,\n Tooltip,\n Fieldset,\n MessageBar,\n ToggleSwitch,\n Label,\n} from '@looker/components'\nimport type { RunItHttpMethod, RunItInput, RunItValues } from '../../RunIt'\nimport { LoginForm } from '../LoginForm'\nimport {\n createSimpleItem,\n createComplexItem,\n showDataChangeWarning,\n updateNullableProp,\n BODY_HINT,\n} from './formUtils'\nimport { FormItem } from './FormItem'\nimport { DarkSpan } from './../common'\n\n/** Properties required by RequestForm */\ninterface RequestFormProps {\n /** Request inputs to the endpoint */\n inputs: RunItInput[]\n /** A callback for submitting the form */\n handleSubmit: (e: BaseSyntheticEvent) => void\n /** HTTP method used for this REST request */\n httpMethod: RunItHttpMethod\n /** A collection type react state to store path, query and body parameters as entered by the user */\n requestContent: RunItValues\n /** A set state callback fn for populating requestContent on interaction with the request form */\n setRequestContent: Dispatch<RunItValues>\n /** Is authentication required? */\n needsAuth: boolean\n /** Does RunIt have the configuration values it needs? */\n hasConfig: boolean\n /** Handle config button click */\n handleConfig: (e: BaseSyntheticEvent) => void\n /** A set state callback which, if present, allows for editing, setting or clearing OAuth configuration parameters */\n setHasConfig?: Dispatch<boolean>\n /** Validation message to display */\n validationMessage?: string\n /** Validation message setter */\n setValidationMessage?: Dispatch<string>\n /** Toggle for processing body inputs */\n keepBody?: boolean\n /** Toggle to keep all body inputs */\n toggleKeepBody?: (_event: FormEventHandler<HTMLInputElement>) => void\n /** Is RunIt being used in a Looker extension? */\n isExtension?: boolean\n}\n\n/**\n * Dynamically generates a REST request form and its form elements corresponding to parameters from an array of RunIt\n * inputs\n */\nexport const RequestForm: FC<RequestFormProps> = ({\n inputs,\n httpMethod,\n handleSubmit,\n requestContent,\n setRequestContent,\n needsAuth,\n hasConfig,\n handleConfig,\n setHasConfig,\n validationMessage,\n setValidationMessage,\n keepBody,\n toggleKeepBody,\n isExtension = false,\n}) => {\n const hasBody = inputs.some((i) => i.location === 'body')\n\n const handleBoolChange = (e: BaseSyntheticEvent) => {\n setRequestContent({ ...requestContent, [e.target.name]: e.target.checked })\n }\n\n const handleNumberChange = (e: BaseSyntheticEvent) => {\n const value = e.target.value ? parseFloat(e.target.value) : undefined\n const newState = updateNullableProp(requestContent, e.target.name, value)\n setRequestContent(newState)\n }\n\n const handleDateChange = (name: string, date?: Date) => {\n const newState = updateNullableProp(requestContent, name, date)\n setRequestContent(newState)\n }\n\n const handleChange = (e: BaseSyntheticEvent) => {\n const newState = updateNullableProp(\n requestContent,\n e.target.name,\n e.target.value\n )\n setRequestContent(newState)\n }\n\n const handleComplexChange = (name: string, value: string) => {\n setRequestContent({ ...requestContent, [name]: value })\n }\n\n const safeSetMessage = (value: string) =>\n setValidationMessage && setValidationMessage(value)\n\n const handleClear = (e: BaseSyntheticEvent) => {\n e.preventDefault()\n setRequestContent({})\n safeSetMessage('')\n }\n\n return (\n <Form onSubmit={handleSubmit}>\n {validationMessage && (\n <MessageBar\n intent={'critical'}\n onPrimaryClick={() => safeSetMessage('')}\n visible={validationMessage !== ''}\n >\n {validationMessage}\n </MessageBar>\n )}\n <Fieldset>\n {inputs.map((input) =>\n typeof input.type === 'string'\n ? createSimpleItem(\n input,\n handleChange,\n handleNumberChange,\n handleBoolChange,\n handleDateChange,\n requestContent\n )\n : createComplexItem(input, handleComplexChange, requestContent)\n )}\n {httpMethod !== 'GET' && showDataChangeWarning()}\n {hasBody && !!toggleKeepBody && (\n <>\n <FormItem key=\"keepbody_fib\" id=\"keepBody\" label=\"Send body as-is\">\n <>\n <ToggleSwitch\n key=\"keepBody\"\n id=\"keepBody\"\n name=\"keepBody\"\n onChange={toggleKeepBody as unknown as FormEventHandler}\n on={keepBody}\n />\n <Label>Send the body parameter as entered</Label>\n </>\n </FormItem>\n <FormItem key=\"body_hint\" id=\"bodyHint\">\n <DarkSpan fontSize=\"small\">{BODY_HINT}</DarkSpan>\n </FormItem>\n </>\n )}\n <FormItem id=\"buttonbar\">\n <>\n {hasConfig ? (\n needsAuth ? (\n <LoginForm requestContent={requestContent} />\n ) : (\n <Tooltip content=\"Run the API request\">\n <Button type=\"submit\">Run</Button>\n </Tooltip>\n )\n ) : (\n !isExtension &&\n setHasConfig && (\n <Tooltip content=\"Configure your OAuth server to Run requests\">\n <Button onClick={handleConfig}>Configure</Button>\n </Tooltip>\n )\n )}\n <Tooltip content=\"Clear entered values\">\n <ButtonTransparent type=\"button\" onClick={handleClear}>\n Clear\n </ButtonTransparent>\n </Tooltip>\n </>\n </FormItem>\n </Fieldset>\n </Form>\n )\n}\n"],"mappings":";;;;;;AA2BA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAWA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAOA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAAsC,SAAAD,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF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