@looker/embed-components 23.14.1 → 23.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/lib/GlobalStore/sagas.js.map +1 -1
  3. package/lib/QuickEmbed/QuickEmbed.js.map +1 -1
  4. package/lib/Theme/SelectTheme.js.map +1 -1
  5. package/lib/Theme/state/sagas.js.map +1 -1
  6. package/lib/esm/GlobalStore/index.js +2 -27
  7. package/lib/esm/GlobalStore/index.js.map +1 -1
  8. package/lib/esm/GlobalStore/sagas.js +10 -16
  9. package/lib/esm/GlobalStore/sagas.js.map +1 -1
  10. package/lib/esm/GlobalStore/slice.js +9 -21
  11. package/lib/esm/GlobalStore/slice.js.map +1 -1
  12. package/lib/esm/GlobalStore/store.js +8 -15
  13. package/lib/esm/GlobalStore/store.js.map +1 -1
  14. package/lib/esm/QuickEmbed/QuickEmbed.js +27 -36
  15. package/lib/esm/QuickEmbed/QuickEmbed.js.map +1 -1
  16. package/lib/esm/QuickEmbed/index.js +1 -16
  17. package/lib/esm/QuickEmbed/index.js.map +1 -1
  18. package/lib/esm/Theme/SelectTheme.js +13 -22
  19. package/lib/esm/Theme/SelectTheme.js.map +1 -1
  20. package/lib/esm/Theme/index.js +2 -27
  21. package/lib/esm/Theme/index.js.map +1 -1
  22. package/lib/esm/Theme/state/index.js +1 -16
  23. package/lib/esm/Theme/state/index.js.map +1 -1
  24. package/lib/esm/Theme/state/sagas.js +23 -29
  25. package/lib/esm/Theme/state/sagas.js.map +1 -1
  26. package/lib/esm/Theme/state/slice.js +9 -21
  27. package/lib/esm/Theme/state/slice.js.map +1 -1
  28. package/lib/esm/index.js +3 -38
  29. package/lib/esm/index.js.map +1 -1
  30. package/lib/esm/test-utils/index.js +2 -27
  31. package/lib/esm/test-utils/index.js.map +1 -1
  32. package/lib/esm/test-utils/store.js +8 -15
  33. package/lib/esm/test-utils/store.js.map +1 -1
  34. package/lib/esm/test-utils/utils.js +11 -25
  35. package/lib/esm/test-utils/utils.js.map +1 -1
  36. package/lib/test-utils/utils.js.map +1 -1
  37. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## [23.18.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.16.0...embed-components-v23.18.0) (2023-11-22)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **embed-components:** Synchronize undefined versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @looker/embed-services bumped from 23.16.0 to 23.18.0
16
+ * @looker/sdk bumped from 23.16.0 to 23.18.0
17
+ * devDependencies
18
+ * @looker/sdk-node bumped from 23.16.0 to 23.18.0
19
+
20
+ ## [23.16.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.14.1...embed-components-v23.16.0) (2023-09-21)
21
+
22
+
23
+ ### Miscellaneous Chores
24
+
25
+ * **embed-components:** Synchronize undefined versions
26
+
27
+
28
+ ### Dependencies
29
+
30
+ * The following workspace dependencies were updated
31
+ * dependencies
32
+ * @looker/embed-services bumped from 23.14.1 to 23.16.0
33
+ * @looker/sdk bumped from 23.14.1 to 23.16.0
34
+ * devDependencies
35
+ * @looker/sdk-node bumped from 23.14.1 to 23.16.0
36
+
3
37
  ## [23.14.1](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.12.0...embed-components-v23.14.1) (2023-08-15)
4
38
 
5
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","action","initFactorySuccessAction","setFailureAction","factoryActions","createFactory","payload","sdk","put","error","message","saga","initFactoryAction","takeEvery"],"sources":["../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put } from 'typed-redux-saga'\nimport { createFactory } from '@looker/embed-services'\nimport type { PayloadAction } from '@reduxjs/toolkit'\n\nimport { factoryActions } from './slice'\nimport type { InitFactoryAction } from './slice'\n\nfunction* initSaga(action: PayloadAction<InitFactoryAction>) {\n const { initFactorySuccessAction, setFailureAction } = factoryActions\n try {\n createFactory(action.payload.sdk)\n yield* put(initFactorySuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\nexport function* saga() {\n const { initFactoryAction } = factoryActions\n yield* takeEvery(initFactoryAction, initSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,UAAUG,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGC,qBAAc;EACrE,IAAI;IACF,IAAAC,4BAAa,EAACJ,MAAM,CAACK,OAAO,CAACC,GAAG,CAAC;IACjC,OAAO,IAAAC,mBAAG,EAACN,wBAAwB,EAAE,CAAC;EACxC,CAAC,CAAC,OAAOO,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACL,gBAAgB,CAAC;MAAEM,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAEO,UAAUC,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC;EAAkB,CAAC,GAAGR,qBAAc;EAC5C,OAAO,IAAAS,yBAAS,EAACD,iBAAiB,EAAEZ,QAAQ,CAAC;AAC/C"}
1
+ {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","action","initFactorySuccessAction","setFailureAction","factoryActions","createFactory","payload","sdk","put","error","message","saga","initFactoryAction","takeEvery"],"sources":["../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put } from 'typed-redux-saga'\nimport { createFactory } from '@looker/embed-services'\nimport type { PayloadAction } from '@reduxjs/toolkit'\n\nimport { factoryActions } from './slice'\nimport type { InitFactoryAction } from './slice'\n\nfunction* initSaga(action: PayloadAction<InitFactoryAction>) {\n const { initFactorySuccessAction, setFailureAction } = factoryActions\n try {\n createFactory(action.payload.sdk)\n yield* put(initFactorySuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\nexport function* saga() {\n const { initFactoryAction } = factoryActions\n yield* takeEvery(initFactoryAction, initSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,UAAUG,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGC,qBAAc;EACrE,IAAI;IACF,IAAAC,4BAAa,EAACJ,MAAM,CAACK,OAAO,CAACC,GAAG,CAAC;IACjC,OAAO,IAAAC,mBAAG,EAACN,wBAAwB,CAAC,CAAC,CAAC;EACxC,CAAC,CAAC,OAAOO,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACL,gBAAgB,CAAC;MAAEM,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAEO,UAAUC,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC;EAAkB,CAAC,GAAGR,qBAAc;EAC5C,OAAO,IAAAS,yBAAS,EAACD,iBAAiB,EAAEZ,QAAQ,CAAC;AAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"QuickEmbed.js","names":["_react","_interopRequireWildcard","require","_components","_materialOutlined","_embedServices","_Theme","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","QuickEmbed","_ref","onClose","onCopy","service","EmbedUrl","toggleValue","setToggle","useState","embedUrl","setEmbedUrl","selectedTheme","useThemesStoreState","selectThemeAction","useThemeActions","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","useEffect","overrides","isThemable","name","newUrl","createElement","Section","padding","Heading","as","fontWeight","SpaceVertical","pt","pb","gap","Fragment","Span","fontSize","contentType","toLocaleLowerCase","SelectTheme","Label","htmlFor","InputText","id","iconBefore","Link","readOnly","value","Space","ToggleSwitch","onChange","on","mt","between","onClick","width","CopyToClipboard","content","ButtonOutline","Button","exports"],"sources":["../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport {\n InputText,\n CopyToClipboard,\n Space,\n SpaceVertical,\n Button,\n Heading,\n Label,\n Span,\n Section,\n ButtonOutline,\n ToggleSwitch,\n} from '@looker/components'\nimport { Link } from '@styled-icons/material-outlined'\nimport { EmbedUrl } from '@looker/embed-services'\nimport { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme'\n\ninterface QuickEmbedProps {\n /** A function triggered when close button is clicked. */\n onClose: () => void\n /**\n * An optional callback triggered when the copy button is clicked.\n * The copy to clipboard action is already handled\n */\n onCopy?: () => void\n}\n\nexport const QuickEmbed = ({ onClose, onCopy }: QuickEmbedProps) => {\n const service = new EmbedUrl()\n const [toggleValue, setToggle] = useState(false)\n const [embedUrl, setEmbedUrl] = useState<string>(service.embedUrl(false))\n const { selectedTheme } = useThemesStoreState()\n const { selectThemeAction } = useThemeActions()\n\n const handleCopy = () => {\n if (onCopy) {\n onCopy()\n }\n }\n\n const handleToggle = () => {\n const newToggleValue = !toggleValue\n if (newToggleValue) {\n // Change the selected theme if there's a theme param in the url\n const urlThemeName = service.searchParams.theme\n if (urlThemeName) {\n selectThemeAction({ key: urlThemeName })\n }\n }\n setToggle(newToggleValue)\n }\n\n useEffect(() => {\n let overrides\n if (service.isThemable) {\n overrides = { theme: selectedTheme.name }\n }\n const newUrl = service.embedUrl(toggleValue, overrides)\n setEmbedUrl(newUrl)\n }, [toggleValue, selectedTheme])\n\n return (\n <Section padding=\"large\">\n <Heading as=\"h3\" fontWeight=\"medium\">\n Get embed URL\n </Heading>\n\n <SpaceVertical pt=\"medium\" pb=\"medium\" gap=\"xsmall\">\n {service.isThemable && (\n <>\n <Span fontWeight=\"normal\" fontSize=\"xsmall\">\n Apply theme to {service.contentType.toLocaleLowerCase()} URL\n </Span>\n <SelectTheme />\n </>\n )}\n <>\n <Label htmlFor=\"embed-url\" fontWeight=\"normal\" fontSize=\"xsmall\">\n Embed URL\n </Label>\n <InputText\n id=\"embed-url\"\n iconBefore={<Link />}\n readOnly\n value={embedUrl}\n />\n </>\n </SpaceVertical>\n\n <Space gap=\"xxsmall\" fontWeight=\"normal\" fontSize=\"small\">\n <ToggleSwitch onChange={handleToggle} on={toggleValue} />\n Include current params in URL\n </Space>\n\n <Space mt=\"large\" between>\n <Space onClick={handleCopy} width=\"fit-content\">\n <CopyToClipboard content={embedUrl}>\n <ButtonOutline iconBefore={<Link />}>Copy Link</ButtonOutline>\n </CopyToClipboard>\n </Space>\n <Button onClick={onClose}>Close</Button>\n </Space>\n </Section>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA4E,SAAAK,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,SAAAP,wBAAAW,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,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,G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
+ {"version":3,"file":"QuickEmbed.js","names":["_react","_interopRequireWildcard","require","_components","_materialOutlined","_embedServices","_Theme","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","QuickEmbed","_ref","onClose","onCopy","service","EmbedUrl","toggleValue","setToggle","useState","embedUrl","setEmbedUrl","selectedTheme","useThemesStoreState","selectThemeAction","useThemeActions","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","useEffect","overrides","isThemable","name","newUrl","createElement","Section","padding","Heading","as","fontWeight","SpaceVertical","pt","pb","gap","Fragment","Span","fontSize","contentType","toLocaleLowerCase","SelectTheme","Label","htmlFor","InputText","id","iconBefore","Link","readOnly","value","Space","ToggleSwitch","onChange","on","mt","between","onClick","width","CopyToClipboard","content","ButtonOutline","Button","exports"],"sources":["../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport {\n InputText,\n CopyToClipboard,\n Space,\n SpaceVertical,\n Button,\n Heading,\n Label,\n Span,\n Section,\n ButtonOutline,\n ToggleSwitch,\n} from '@looker/components'\nimport { Link } from '@styled-icons/material-outlined'\nimport { EmbedUrl } from '@looker/embed-services'\nimport { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme'\n\ninterface QuickEmbedProps {\n /** A function triggered when close button is clicked. */\n onClose: () => void\n /**\n * An optional callback triggered when the copy button is clicked.\n * The copy to clipboard action is already handled\n */\n onCopy?: () => void\n}\n\nexport const QuickEmbed = ({ onClose, onCopy }: QuickEmbedProps) => {\n const service = new EmbedUrl()\n const [toggleValue, setToggle] = useState(false)\n const [embedUrl, setEmbedUrl] = useState<string>(service.embedUrl(false))\n const { selectedTheme } = useThemesStoreState()\n const { selectThemeAction } = useThemeActions()\n\n const handleCopy = () => {\n if (onCopy) {\n onCopy()\n }\n }\n\n const handleToggle = () => {\n const newToggleValue = !toggleValue\n if (newToggleValue) {\n // Change the selected theme if there's a theme param in the url\n const urlThemeName = service.searchParams.theme\n if (urlThemeName) {\n selectThemeAction({ key: urlThemeName })\n }\n }\n setToggle(newToggleValue)\n }\n\n useEffect(() => {\n let overrides\n if (service.isThemable) {\n overrides = { theme: selectedTheme.name }\n }\n const newUrl = service.embedUrl(toggleValue, overrides)\n setEmbedUrl(newUrl)\n }, [toggleValue, selectedTheme])\n\n return (\n <Section padding=\"large\">\n <Heading as=\"h3\" fontWeight=\"medium\">\n Get embed URL\n </Heading>\n\n <SpaceVertical pt=\"medium\" pb=\"medium\" gap=\"xsmall\">\n {service.isThemable && (\n <>\n <Span fontWeight=\"normal\" fontSize=\"xsmall\">\n Apply theme to {service.contentType.toLocaleLowerCase()} URL\n </Span>\n <SelectTheme />\n </>\n )}\n <>\n <Label htmlFor=\"embed-url\" fontWeight=\"normal\" fontSize=\"xsmall\">\n Embed URL\n </Label>\n <InputText\n id=\"embed-url\"\n iconBefore={<Link />}\n readOnly\n value={embedUrl}\n />\n </>\n </SpaceVertical>\n\n <Space gap=\"xxsmall\" fontWeight=\"normal\" fontSize=\"small\">\n <ToggleSwitch onChange={handleToggle} on={toggleValue} />\n Include current params in URL\n </Space>\n\n <Space mt=\"large\" between>\n <Space onClick={handleCopy} width=\"fit-content\">\n <CopyToClipboard content={embedUrl}>\n <ButtonOutline iconBefore={<Link />}>Copy Link</ButtonOutline>\n </CopyToClipboard>\n </Space>\n <Button onClick={onClose}>Close</Button>\n </Space>\n </Section>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA4E,SAAAK,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,SAAAP,wBAAAW,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,kBA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AAA,CAAAyC,aAAA,CAACnD,iBAAA,CAAAwE,IAAI,MAAE;EAAE,GAAC,WAAwB,CAC9C,CACZ,CAAC,EACR5E,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAuF,MAAM;IAACL,OAAO,EAAEtD;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC;AAAA4D,OAAA,CAAA9D,UAAA,GAAAA,UAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTheme.js","names":["_react","_interopRequireWildcard","require","_components","_state","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SelectTheme","initialized","themes","selectedTheme","error","working","useThemesStoreState","initAction","loadThemeDataAction","selectThemeAction","useThemeActions","options","setOptions","useState","useEffect","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","createElement","SpaceVertical","gap","Select","disabled","length","isLoading","validationType","undefined","onChange","ValidationMessage","type","message","exports"],"sources":["../../src/Theme/SelectTheme.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { useState, useEffect } from 'react'\nimport { Select, SpaceVertical, ValidationMessage } from '@looker/components'\nimport type { SelectOptionObject } from '@looker/components'\nimport { useThemeActions, useThemesStoreState } from './state'\n\nexport const SelectTheme = () => {\n const { initialized, themes, selectedTheme, error, working } =\n useThemesStoreState()\n const { initAction, loadThemeDataAction, selectThemeAction } =\n useThemeActions()\n const [options, setOptions] = useState<SelectOptionObject[]>([])\n\n useEffect(() => {\n /** initialize theme service */\n initAction()\n }, [])\n\n useEffect(() => {\n if (initialized) {\n /** If theme service is initialized, load all theme data */\n loadThemeDataAction()\n }\n }, [initialized])\n\n useEffect(() => {\n const themeOptions: SelectOptionObject[] = themes\n .map((theme) => ({\n value: theme.id!,\n label: theme.name,\n }))\n .sort((x, y) => x.label!.localeCompare(y.label!))\n setOptions(themeOptions)\n }, [themes])\n\n const handleChange = (key: string) => {\n selectThemeAction({ key })\n }\n\n return (\n <SpaceVertical gap=\"xxxsmall\">\n <Select\n disabled={themes.length <= 1}\n isLoading={!initialized || working}\n validationType={error ? 'error' : undefined}\n value={selectedTheme.name}\n options={options}\n onChange={handleChange}\n />\n {error && <ValidationMessage type=\"error\" message={error} />}\n </SpaceVertical>\n )\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA8D,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAA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C,OAAO;IAACC,OAAO,EAAEnC;EAAM,EAAG,CAC9C;AAEpB,CAAC;AAAAoC,OAAA,CAAAxC,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"SelectTheme.js","names":["_react","_interopRequireWildcard","require","_components","_state","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SelectTheme","initialized","themes","selectedTheme","error","working","useThemesStoreState","initAction","loadThemeDataAction","selectThemeAction","useThemeActions","options","setOptions","useState","useEffect","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","createElement","SpaceVertical","gap","Select","disabled","length","isLoading","validationType","undefined","onChange","ValidationMessage","type","message","exports"],"sources":["../../src/Theme/SelectTheme.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { useState, useEffect } from 'react'\nimport { Select, SpaceVertical, ValidationMessage } from '@looker/components'\nimport type { SelectOptionObject } from '@looker/components'\nimport { useThemeActions, useThemesStoreState } from './state'\n\nexport const SelectTheme = () => {\n const { initialized, themes, selectedTheme, error, working } =\n useThemesStoreState()\n const { initAction, loadThemeDataAction, selectThemeAction } =\n useThemeActions()\n const [options, setOptions] = useState<SelectOptionObject[]>([])\n\n useEffect(() => {\n /** initialize theme service */\n initAction()\n }, [])\n\n useEffect(() => {\n if (initialized) {\n /** If theme service is initialized, load all theme data */\n loadThemeDataAction()\n }\n }, [initialized])\n\n useEffect(() => {\n const themeOptions: SelectOptionObject[] = themes\n .map((theme) => ({\n value: theme.id!,\n label: theme.name,\n }))\n .sort((x, y) => x.label!.localeCompare(y.label!))\n setOptions(themeOptions)\n }, [themes])\n\n const handleChange = (key: string) => {\n selectThemeAction({ key })\n }\n\n return (\n <SpaceVertical gap=\"xxxsmall\">\n <Select\n disabled={themes.length <= 1}\n isLoading={!initialized || working}\n validationType={error ? 'error' : undefined}\n value={selectedTheme.name}\n options={options}\n onChange={handleChange}\n />\n {error && <ValidationMessage type=\"error\" message={error} />}\n </SpaceVertical>\n )\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA8D,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,G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["_typedReduxSaga","require","_embedServices","_slice","initSaga","initSuccessAction","setFailureAction","themeActions","registerThemeService","put","error","message","loadThemeDataSaga","loadThemeDataSuccessAction","_urlTheme","service","getThemeService","call","searchParams","EmbedUrl","urlThemeName","theme","urlTheme","find","themes","items","defaultTheme","selectedTheme","selectThemeSaga","action","selectThemeSuccessAction","_item","key","payload","item","indexedItems","concat","saga","initAction","loadThemeDataAction","selectThemeAction","takeEvery"],"sources":["../../../src/Theme/state/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put, call } from 'typed-redux-saga'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport type { ITheme } from '@looker/sdk'\nimport {\n registerThemeService,\n getThemeService,\n EmbedUrl,\n} from '@looker/embed-services'\nimport { themeActions } from './slice'\nimport type { SelectThemeAction } from './slice'\n\n/**\n * Registers theme service with factory\n */\nfunction* initSaga() {\n const { initSuccessAction, setFailureAction } = themeActions\n try {\n registerThemeService()\n yield* put(initSuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\n/**\n * Gets all themes, default and url themes, and sets the selected theme\n */\nfunction* loadThemeDataSaga() {\n const { loadThemeDataSuccessAction, setFailureAction } = themeActions\n try {\n const service = getThemeService()\n yield* call([service, 'load'])\n const searchParams = new EmbedUrl().searchParams\n const urlThemeName = searchParams.theme\n let urlTheme: ITheme | undefined\n if (urlThemeName) {\n urlTheme = service.find('name', urlThemeName)\n }\n yield* put(\n loadThemeDataSuccessAction({\n themes: service.items,\n defaultTheme: service.defaultTheme!,\n selectedTheme: (urlTheme ?? service.defaultTheme!)!,\n })\n )\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\n/**\n * Sets the selected theme by id or name\n * @param action containing id or name of theme to select\n */\nfunction* selectThemeSaga(action: PayloadAction<SelectThemeAction>) {\n const { selectThemeSuccessAction, setFailureAction } = themeActions\n try {\n const service = getThemeService()\n yield* call([service, 'getAll'])\n const key = action.payload.key\n let item: ITheme | undefined = service.indexedItems[key]\n if (!item) {\n item = service.find(['id', 'name'], `^${key}$`)\n }\n yield* put(\n selectThemeSuccessAction({ selectedTheme: item ?? service.defaultTheme! })\n )\n } catch (error: any) {\n yield* put(\n setFailureAction({\n error: error.message,\n })\n )\n }\n}\n\nexport function* saga() {\n const { initAction, loadThemeDataAction, selectThemeAction } = themeActions\n yield* takeEvery(initAction, initSaga)\n yield* takeEvery(loadThemeDataAction, loadThemeDataSaga)\n yield* takeEvery(selectThemeAction, selectThemeSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAMA,UAAUG,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGC,mBAAY;EAC5D,IAAI;IACF,IAAAC,mCAAoB,G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AAC,8BAAe,GAAE;IACjC,OAAO,IAAAC,oBAAI,EAAC,CAACF,OAAO,EAAE,QAAQ,CAAC,CAAC;IAChC,IAAMiB,GAAG,GAAGH,MAAM,CAACI,OAAO,CAACD,GAAG;IAC9B,IAAIE,IAAwB,GAAGnB,OAAO,CAACoB,YAAY,CAACH,GAAG,CAAC;IACxD,IAAI,CAACE,IAAI,EAAE;MACTA,IAAI,GAAGnB,OAAO,CAACQ,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAAa,MAAA,CAAMJ,GAAG,OAAI;IACjD;IACA,OAAO,IAAAvB,mBAAG,EACRqB,wBAAwB,CAAC;MAAEH,aAAa,GAAAI,KAAA,GAAEG,IAAI,cAAAH,KAAA,cAAAA,KAAA,GAAIhB,OAAO,CAACW;IAAc,CAAC,CAAC,CAC3E;EACH,CAAC,CAAC,OAAOhB,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EACRH,gBAAgB,CAAC;MACfI,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CAAC,CACH;EACH;AACF;AAEO,UAAU0B,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAGjC,mBAAY;EAC3E,OAAO,IAAAkC,yBAAS,EAACH,UAAU,EAAElC,QAAQ,CAAC;EACtC,OAAO,IAAAqC,yBAAS,EAACF,mBAAmB,EAAE3B,iBAAiB,CAAC;EACxD,OAAO,IAAA6B,yBAAS,EAACD,iBAAiB,EAAEZ,eAAe,CAAC;AACtD"}
1
+ {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","initSuccessAction","setFailureAction","themeActions","registerThemeService","put","error","message","loadThemeDataSaga","loadThemeDataSuccessAction","_urlTheme","service","getThemeService","call","searchParams","EmbedUrl","urlThemeName","theme","urlTheme","find","themes","items","defaultTheme","selectedTheme","selectThemeSaga","action","selectThemeSuccessAction","_item","key","payload","item","indexedItems","concat","saga","initAction","loadThemeDataAction","selectThemeAction","takeEvery"],"sources":["../../../src/Theme/state/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put, call } from 'typed-redux-saga'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport type { ITheme } from '@looker/sdk'\nimport {\n registerThemeService,\n getThemeService,\n EmbedUrl,\n} from '@looker/embed-services'\nimport { themeActions } from './slice'\nimport type { SelectThemeAction } from './slice'\n\n/**\n * Registers theme service with factory\n */\nfunction* initSaga() {\n const { initSuccessAction, setFailureAction } = themeActions\n try {\n registerThemeService()\n yield* put(initSuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\n/**\n * Gets all themes, default and url themes, and sets the selected theme\n */\nfunction* loadThemeDataSaga() {\n const { loadThemeDataSuccessAction, setFailureAction } = themeActions\n try {\n const service = getThemeService()\n yield* call([service, 'load'])\n const searchParams = new EmbedUrl().searchParams\n const urlThemeName = searchParams.theme\n let urlTheme: ITheme | undefined\n if (urlThemeName) {\n urlTheme = service.find('name', urlThemeName)\n }\n yield* put(\n loadThemeDataSuccessAction({\n themes: service.items,\n defaultTheme: service.defaultTheme!,\n selectedTheme: (urlTheme ?? service.defaultTheme!)!,\n })\n )\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\n/**\n * Sets the selected theme by id or name\n * @param action containing id or name of theme to select\n */\nfunction* selectThemeSaga(action: PayloadAction<SelectThemeAction>) {\n const { selectThemeSuccessAction, setFailureAction } = themeActions\n try {\n const service = getThemeService()\n yield* call([service, 'getAll'])\n const key = action.payload.key\n let item: ITheme | undefined = service.indexedItems[key]\n if (!item) {\n item = service.find(['id', 'name'], `^${key}$`)\n }\n yield* put(\n selectThemeSuccessAction({ selectedTheme: item ?? service.defaultTheme! })\n )\n } catch (error: any) {\n yield* put(\n setFailureAction({\n error: error.message,\n })\n )\n }\n}\n\nexport function* saga() {\n const { initAction, loadThemeDataAction, selectThemeAction } = themeActions\n yield* takeEvery(initAction, initSaga)\n yield* takeEvery(loadThemeDataAction, loadThemeDataSaga)\n yield* takeEvery(selectThemeAction, selectThemeSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAMA,UAAUG,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGC,mBAAY;EAC5D,IAAI;IACF,IAAAC,mCAAoB,EAAC,CAAC;IACtB,OAAO,IAAAC,mBAAG,EAACJ,iBAAiB,CAAC,CAAC,CAAC;EACjC,CAAC,CAAC,OAAOK,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACH,gBAAgB,CAAC;MAAEI,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAKA,UA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AAG,CAAC;IACxD,IAAI,CAACE,IAAI,EAAE;MACTA,IAAI,GAAGnB,OAAO,CAACQ,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAAa,MAAA,CAAMJ,GAAG,MAAG,CAAC;IACjD;IACA,OAAO,IAAAvB,mBAAG,EACRqB,wBAAwB,CAAC;MAAEH,aAAa,GAAAI,KAAA,GAAEG,IAAI,cAAAH,KAAA,cAAAA,KAAA,GAAIhB,OAAO,CAACW;IAAc,CAAC,CAC3E,CAAC;EACH,CAAC,CAAC,OAAOhB,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EACRH,gBAAgB,CAAC;MACfI,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CACH,CAAC;EACH;AACF;AAEO,UAAU0B,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAGjC,mBAAY;EAC3E,OAAO,IAAAkC,yBAAS,EAACH,UAAU,EAAElC,QAAQ,CAAC;EACtC,OAAO,IAAAqC,yBAAS,EAACF,mBAAmB,EAAE3B,iBAAiB,CAAC;EACxD,OAAO,IAAA6B,yBAAS,EAACD,iBAAiB,EAAEZ,eAAe,CAAC;AACtD"}
@@ -1,28 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _slice = require("./slice");
7
- Object.keys(_slice).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _slice[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return _slice[key];
14
- }
15
- });
16
- });
17
- var _store = require("./store");
18
- Object.keys(_store).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _store[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function get() {
24
- return _store[key];
25
- }
26
- });
27
- });
1
+ export * from './slice';
2
+ export * from './store';
28
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_slice","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_store"],"sources":["../../../src/GlobalStore/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './slice'\nexport * from './store'\n"],"mappings":";;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/GlobalStore/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './slice'\nexport * from './store'\n"],"mappings":"AAyBA,cAAc,SAAS;AACvB,cAAc,SAAS"}
@@ -1,30 +1,24 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.saga = saga;
7
- var _typedReduxSaga = require("typed-redux-saga");
8
- var _embedServices = require("@looker/embed-services");
9
- var _slice = require("./slice");
1
+ import { takeEvery, put } from 'typed-redux-saga';
2
+ import { createFactory } from '@looker/embed-services';
3
+ import { factoryActions } from './slice';
10
4
  function* initSaga(action) {
11
5
  var {
12
6
  initFactorySuccessAction,
13
7
  setFailureAction
14
- } = _slice.factoryActions;
8
+ } = factoryActions;
15
9
  try {
16
- (0, _embedServices.createFactory)(action.payload.sdk);
17
- yield* (0, _typedReduxSaga.put)(initFactorySuccessAction());
10
+ createFactory(action.payload.sdk);
11
+ yield* put(initFactorySuccessAction());
18
12
  } catch (error) {
19
- yield* (0, _typedReduxSaga.put)(setFailureAction({
13
+ yield* put(setFailureAction({
20
14
  error: error.message
21
15
  }));
22
16
  }
23
17
  }
24
- function* saga() {
18
+ export function* saga() {
25
19
  var {
26
20
  initFactoryAction
27
- } = _slice.factoryActions;
28
- yield* (0, _typedReduxSaga.takeEvery)(initFactoryAction, initSaga);
21
+ } = factoryActions;
22
+ yield* takeEvery(initFactoryAction, initSaga);
29
23
  }
30
24
  //# sourceMappingURL=sagas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","action","initFactorySuccessAction","setFailureAction","factoryActions","createFactory","payload","sdk","put","error","message","saga","initFactoryAction","takeEvery"],"sources":["../../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put } from 'typed-redux-saga'\nimport { createFactory } from '@looker/embed-services'\nimport type { PayloadAction } from '@reduxjs/toolkit'\n\nimport { factoryActions } from './slice'\nimport type { InitFactoryAction } from './slice'\n\nfunction* initSaga(action: PayloadAction<InitFactoryAction>) {\n const { initFactorySuccessAction, setFailureAction } = factoryActions\n try {\n createFactory(action.payload.sdk)\n yield* put(initFactorySuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\nexport function* saga() {\n const { initFactoryAction } = factoryActions\n yield* takeEvery(initFactoryAction, initSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,UAAUG,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGC,qBAAc;EACrE,IAAI;IACF,IAAAC,4BAAa,EAACJ,MAAM,CAACK,OAAO,CAACC,GAAG,CAAC;IACjC,OAAO,IAAAC,mBAAG,EAACN,wBAAwB,EAAE,CAAC;EACxC,CAAC,CAAC,OAAOO,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACL,gBAAgB,CAAC;MAAEM,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAEO,UAAUC,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC;EAAkB,CAAC,GAAGR,qBAAc;EAC5C,OAAO,IAAAS,yBAAS,EAACD,iBAAiB,EAAEZ,QAAQ,CAAC;AAC/C"}
1
+ {"version":3,"file":"sagas.js","names":["takeEvery","put","createFactory","factoryActions","initSaga","action","initFactorySuccessAction","setFailureAction","payload","sdk","error","message","saga","initFactoryAction"],"sources":["../../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put } from 'typed-redux-saga'\nimport { createFactory } from '@looker/embed-services'\nimport type { PayloadAction } from '@reduxjs/toolkit'\n\nimport { factoryActions } from './slice'\nimport type { InitFactoryAction } from './slice'\n\nfunction* initSaga(action: PayloadAction<InitFactoryAction>) {\n const { initFactorySuccessAction, setFailureAction } = factoryActions\n try {\n createFactory(action.payload.sdk)\n yield* put(initFactorySuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\nexport function* saga() {\n const { initFactoryAction } = factoryActions\n yield* takeEvery(initFactoryAction, initSaga)\n}\n"],"mappings":"AAyBA,SAASA,SAAS,EAAEC,GAAG,QAAQ,kBAAkB;AACjD,SAASC,aAAa,QAAQ,wBAAwB;AAGtD,SAASC,cAAc,QAAQ,SAAS;AAGxC,UAAUC,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGJ,cAAc;EACrE,IAAI;IACFD,aAAa,CAACG,MAAM,CAACG,OAAO,CAACC,GAAG,CAAC;IACjC,OAAOR,GAAG,CAACK,wBAAwB,CAAC,CAAC,CAAC;EACxC,CAAC,CAAC,OAAOI,KAAU,EAAE;IACnB,OAAOT,GAAG,CAACM,gBAAgB,CAAC;MAAEG,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAEA,OAAO,UAAUC,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC;EAAkB,CAAC,GAAGV,cAAc;EAC5C,OAAOH,SAAS,CAACa,iBAAiB,EAAET,QAAQ,CAAC;AAC/C"}
@@ -1,19 +1,11 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useFactoryStoreState = exports.useFactoryActions = exports.factorySlice = exports.factoryActions = exports.defaultFactoryState = exports.FACTORY_SLICE_NAME = void 0;
7
- var _toolkit = require("@reduxjs/toolkit");
8
- var _redux = require("@looker/redux");
9
- var _sagas = require("./sagas");
10
- var defaultFactoryState = {
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { createSliceHooks } from '@looker/redux';
3
+ import { saga } from './sagas';
4
+ export var defaultFactoryState = {
11
5
  initialized: false
12
6
  };
13
- exports.defaultFactoryState = defaultFactoryState;
14
- var FACTORY_SLICE_NAME = 'factory';
15
- exports.FACTORY_SLICE_NAME = FACTORY_SLICE_NAME;
16
- var factorySlice = (0, _toolkit.createSlice)({
7
+ export var FACTORY_SLICE_NAME = 'factory';
8
+ export var factorySlice = createSlice({
17
9
  name: FACTORY_SLICE_NAME,
18
10
  initialState: defaultFactoryState,
19
11
  reducers: {
@@ -27,13 +19,9 @@ var factorySlice = (0, _toolkit.createSlice)({
27
19
  }
28
20
  }
29
21
  });
30
- exports.factorySlice = factorySlice;
31
- var factoryActions = factorySlice.actions;
32
- exports.factoryActions = factoryActions;
33
- var {
22
+ export var factoryActions = factorySlice.actions;
23
+ export var {
34
24
  useActions: useFactoryActions,
35
25
  useStoreState: useFactoryStoreState
36
- } = (0, _redux.createSliceHooks)(factorySlice, _sagas.saga);
37
- exports.useFactoryStoreState = useFactoryStoreState;
38
- exports.useFactoryActions = useFactoryActions;
26
+ } = createSliceHooks(factorySlice, saga);
39
27
  //# sourceMappingURL=slice.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":["_toolkit","require","_redux","_sagas","defaultFactoryState","initialized","exports","FACTORY_SLICE_NAME","factorySlice","createSlice","name","initialState","reducers","initFactoryAction","_state","_action","initFactorySuccessAction","state","destroyFactoryAction","setFailureAction","action","error","payload","factoryActions","actions","useActions","useFactoryActions","useStoreState","useFactoryStoreState","createSliceHooks","saga"],"sources":["../../../src/GlobalStore/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { IAPIMethods } from '@looker/sdk-rtl'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { saga } from './sagas'\n\nexport interface FactoryState {\n initialized: boolean\n error?: string\n}\n\nexport const defaultFactoryState: FactoryState = {\n initialized: false,\n}\n\nexport interface InitFactoryAction {\n sdk: IAPIMethods\n}\n\ntype SetFailureAction = Record<'error', string>\n\nexport const FACTORY_SLICE_NAME = 'factory'\n\nexport const factorySlice = createSlice({\n name: FACTORY_SLICE_NAME,\n initialState: defaultFactoryState,\n reducers: {\n initFactoryAction(_state, _action: PayloadAction<InitFactoryAction>) {\n // noop\n },\n initFactorySuccessAction(state) {\n state.initialized = true\n },\n destroyFactoryAction() {\n // noop\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error\n },\n },\n})\n\nexport const factoryActions = factorySlice.actions\nexport const {\n useActions: useFactoryActions,\n useStoreState: useFactoryStoreState,\n} = createSliceHooks(factorySlice, saga)\n"],"mappings":";;;;;;AAyBA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAOO,IAAMG,mBAAiC,GAAG;EAC/CC,WAAW,EAAE;AACf,CAAC;AAAAC,OAAA,CAAAF,mBAAA,GAAAA,mBAAA;AAQM,IAAMG,kBAAkB,GAAG,SAAS;AAAAD,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEpC,IAAMC,YAAY,GAAG,IAAAC,oBAAW,EAAC;EACtCC,IAAI,EAAEH,kBAAkB;EACxBI,YAAY,EAAEP,mBAAmB;EACjCQ,QAAQ,EAAE;IACRC,iBAAiBA,CAACC,MAAM,EAAEC,OAAyC,EAAE,CAErE,CAAC;IACDC,wBAAwBA,CAACC,KAAK,EAAE;MAC9BA,KAAK,CAACZ,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDa,oBAAoBA,CAAA,EAAG,CAEvB,CAAC;IACDC,gBAAgBA,CAACF,KAAK,EAAEG,MAAuC,EAAE;MAC/DH,KAAK,CAACI,KAAK,GAAGD,MAAM,CAACE,OAAO,CAACD,KAAK;IACpC;EACF;AACF,CAAC,CAAC;AAAAf,OAAA,CAAAE,YAAA,GAAAA,YAAA;AAEK,IAAMe,cAAc,GAAGf,YAAY,CAACgB,OAAO;AAAAlB,OAAA,CAAAiB,cAAA,GAAAA,cAAA;AAC3C,IAAM;EACXE,UAAU,EAAEC,iBAAiB;EAC7BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACrB,YAAY,EAAEsB,WAAI,CAAC;AAAAxB,OAAA,CAAAsB,oBAAA,GAAAA,oBAAA;AAAAtB,OAAA,CAAAoB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"slice.js","names":["createSlice","createSliceHooks","saga","defaultFactoryState","initialized","FACTORY_SLICE_NAME","factorySlice","name","initialState","reducers","initFactoryAction","_state","_action","initFactorySuccessAction","state","destroyFactoryAction","setFailureAction","action","error","payload","factoryActions","actions","useActions","useFactoryActions","useStoreState","useFactoryStoreState"],"sources":["../../../src/GlobalStore/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { IAPIMethods } from '@looker/sdk-rtl'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { saga } from './sagas'\n\nexport interface FactoryState {\n initialized: boolean\n error?: string\n}\n\nexport const defaultFactoryState: FactoryState = {\n initialized: false,\n}\n\nexport interface InitFactoryAction {\n sdk: IAPIMethods\n}\n\ntype SetFailureAction = Record<'error', string>\n\nexport const FACTORY_SLICE_NAME = 'factory'\n\nexport const factorySlice = createSlice({\n name: FACTORY_SLICE_NAME,\n initialState: defaultFactoryState,\n reducers: {\n initFactoryAction(_state, _action: PayloadAction<InitFactoryAction>) {\n // noop\n },\n initFactorySuccessAction(state) {\n state.initialized = true\n },\n destroyFactoryAction() {\n // noop\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error\n },\n },\n})\n\nexport const factoryActions = factorySlice.actions\nexport const {\n useActions: useFactoryActions,\n useStoreState: useFactoryStoreState,\n} = createSliceHooks(factorySlice, saga)\n"],"mappings":"AAyBA,SAASA,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,gBAAgB,QAAQ,eAAe;AAGhD,SAASC,IAAI,QAAQ,SAAS;AAO9B,OAAO,IAAMC,mBAAiC,GAAG;EAC/CC,WAAW,EAAE;AACf,CAAC;AAQD,OAAO,IAAMC,kBAAkB,GAAG,SAAS;AAE3C,OAAO,IAAMC,YAAY,GAAGN,WAAW,CAAC;EACtCO,IAAI,EAAEF,kBAAkB;EACxBG,YAAY,EAAEL,mBAAmB;EACjCM,QAAQ,EAAE;IACRC,iBAAiBA,CAACC,MAAM,EAAEC,OAAyC,EAAE,CAErE,CAAC;IACDC,wBAAwBA,CAACC,KAAK,EAAE;MAC9BA,KAAK,CAACV,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDW,oBAAoBA,CAAA,EAAG,CAEvB,CAAC;IACDC,gBAAgBA,CAACF,KAAK,EAAEG,MAAuC,EAAE;MAC/DH,KAAK,CAACI,KAAK,GAAGD,MAAM,CAACE,OAAO,CAACD,KAAK;IACpC;EACF;AACF,CAAC,CAAC;AAEF,OAAO,IAAME,cAAc,GAAGd,YAAY,CAACe,OAAO;AAClD,OAAO,IAAM;EACXC,UAAU,EAAEC,iBAAiB;EAC7BC,aAAa,EAAEC;AACjB,CAAC,GAAGxB,gBAAgB,CAACK,YAAY,EAAEJ,IAAI,CAAC"}
@@ -1,21 +1,14 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.store = void 0;
7
- var _redux = require("@looker/redux");
8
- var _Theme = require("../Theme");
9
- var _slice = require("./slice");
10
- var store = (0, _redux.createStore)({
1
+ import { createStore } from '@looker/redux';
2
+ import { defaultThemesState, themesSlice } from '../Theme';
3
+ import { defaultFactoryState, factorySlice } from './slice';
4
+ export var store = createStore({
11
5
  preloadedState: {
12
- factory: _slice.defaultFactoryState,
13
- themes: _Theme.defaultThemesState
6
+ factory: defaultFactoryState,
7
+ themes: defaultThemesState
14
8
  },
15
9
  reducer: {
16
- factory: _slice.factorySlice.reducer,
17
- themes: _Theme.themesSlice.reducer
10
+ factory: factorySlice.reducer,
11
+ themes: themesSlice.reducer
18
12
  }
19
13
  });
20
- exports.store = store;
21
14
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":["_redux","require","_Theme","_slice","store","createStore","preloadedState","factory","defaultFactoryState","themes","defaultThemesState","reducer","factorySlice","themesSlice","exports"],"sources":["../../../src/GlobalStore/store.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux'\nimport { defaultThemesState, themesSlice } from '../Theme'\nimport type { ThemesState } from '../Theme'\nimport { defaultFactoryState, factorySlice } from './slice'\nimport type { FactoryState } from './slice'\n\nexport const store = createStore({\n preloadedState: {\n factory: defaultFactoryState,\n themes: defaultThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n})\n\nexport interface RootState {\n factory: FactoryState\n themes?: ThemesState\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAGO,IAAMG,KAAK,GAAG,IAAAC,kBAAW,EAAC;EAC/BC,cAAc,EAAE;IACdC,OAAO,EAAEC,0BAAmB;IAC5BC,MAAM,EAAEC;EACV,CAAC;EACDC,OAAO,EAAE;IACPJ,OAAO,EAAEK,mBAAY,CAACD,OAAO;IAC7BF,MAAM,EAAEI,kBAAW,CAACF;EACtB;AACF,CAAC,CAAC;AAAAG,OAAA,CAAAV,KAAA,GAAAA,KAAA"}
1
+ {"version":3,"file":"store.js","names":["createStore","defaultThemesState","themesSlice","defaultFactoryState","factorySlice","store","preloadedState","factory","themes","reducer"],"sources":["../../../src/GlobalStore/store.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux'\nimport { defaultThemesState, themesSlice } from '../Theme'\nimport type { ThemesState } from '../Theme'\nimport { defaultFactoryState, factorySlice } from './slice'\nimport type { FactoryState } from './slice'\n\nexport const store = createStore({\n preloadedState: {\n factory: defaultFactoryState,\n themes: defaultThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n})\n\nexport interface RootState {\n factory: FactoryState\n themes?: ThemesState\n}\n"],"mappings":"AAyBA,SAASA,WAAW,QAAQ,eAAe;AAC3C,SAASC,kBAAkB,EAAEC,WAAW,QAAQ,UAAU;AAE1D,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,SAAS;AAG3D,OAAO,IAAMC,KAAK,GAAGL,WAAW,CAAC;EAC/BM,cAAc,EAAE;IACdC,OAAO,EAAEJ,mBAAmB;IAC5BK,MAAM,EAAEP;EACV,CAAC;EACDQ,OAAO,EAAE;IACPF,OAAO,EAAEH,YAAY,CAACK,OAAO;IAC7BD,MAAM,EAAEN,WAAW,CAACO;EACtB;AACF,CAAC,CAAC"}
@@ -1,30 +1,22 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.QuickEmbed = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _components = require("@looker/components");
9
- var _materialOutlined = require("@styled-icons/material-outlined");
10
- var _embedServices = require("@looker/embed-services");
11
- var _Theme = require("../Theme");
12
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
- var QuickEmbed = _ref => {
1
+ import React, { useEffect, useState } from 'react';
2
+ import { InputText, CopyToClipboard, Space, SpaceVertical, Button, Heading, Label, Span, Section, ButtonOutline, ToggleSwitch } from '@looker/components';
3
+ import { Link } from '@styled-icons/material-outlined';
4
+ import { EmbedUrl } from '@looker/embed-services';
5
+ import { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme';
6
+ export var QuickEmbed = _ref => {
15
7
  var {
16
8
  onClose,
17
9
  onCopy
18
10
  } = _ref;
19
- var service = new _embedServices.EmbedUrl();
20
- var [toggleValue, setToggle] = (0, _react.useState)(false);
21
- var [embedUrl, setEmbedUrl] = (0, _react.useState)(service.embedUrl(false));
11
+ var service = new EmbedUrl();
12
+ var [toggleValue, setToggle] = useState(false);
13
+ var [embedUrl, setEmbedUrl] = useState(service.embedUrl(false));
22
14
  var {
23
15
  selectedTheme
24
- } = (0, _Theme.useThemesStoreState)();
16
+ } = useThemesStoreState();
25
17
  var {
26
18
  selectThemeAction
27
- } = (0, _Theme.useThemeActions)();
19
+ } = useThemeActions();
28
20
  var handleCopy = () => {
29
21
  if (onCopy) {
30
22
  onCopy();
@@ -42,7 +34,7 @@ var QuickEmbed = _ref => {
42
34
  }
43
35
  setToggle(newToggleValue);
44
36
  };
45
- (0, _react.useEffect)(() => {
37
+ useEffect(() => {
46
38
  var overrides;
47
39
  if (service.isThemable) {
48
40
  overrides = {
@@ -52,47 +44,46 @@ var QuickEmbed = _ref => {
52
44
  var newUrl = service.embedUrl(toggleValue, overrides);
53
45
  setEmbedUrl(newUrl);
54
46
  }, [toggleValue, selectedTheme]);
55
- return _react.default.createElement(_components.Section, {
47
+ return React.createElement(Section, {
56
48
  padding: "large"
57
- }, _react.default.createElement(_components.Heading, {
49
+ }, React.createElement(Heading, {
58
50
  as: "h3",
59
51
  fontWeight: "medium"
60
- }, "Get embed URL"), _react.default.createElement(_components.SpaceVertical, {
52
+ }, "Get embed URL"), React.createElement(SpaceVertical, {
61
53
  pt: "medium",
62
54
  pb: "medium",
63
55
  gap: "xsmall"
64
- }, service.isThemable && _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_components.Span, {
56
+ }, service.isThemable && React.createElement(React.Fragment, null, React.createElement(Span, {
65
57
  fontWeight: "normal",
66
58
  fontSize: "xsmall"
67
- }, "Apply theme to ", service.contentType.toLocaleLowerCase(), " URL"), _react.default.createElement(_Theme.SelectTheme, null)), _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_components.Label, {
59
+ }, "Apply theme to ", service.contentType.toLocaleLowerCase(), " URL"), React.createElement(SelectTheme, null)), React.createElement(React.Fragment, null, React.createElement(Label, {
68
60
  htmlFor: "embed-url",
69
61
  fontWeight: "normal",
70
62
  fontSize: "xsmall"
71
- }, "Embed URL"), _react.default.createElement(_components.InputText, {
63
+ }, "Embed URL"), React.createElement(InputText, {
72
64
  id: "embed-url",
73
- iconBefore: _react.default.createElement(_materialOutlined.Link, null),
65
+ iconBefore: React.createElement(Link, null),
74
66
  readOnly: true,
75
67
  value: embedUrl
76
- }))), _react.default.createElement(_components.Space, {
68
+ }))), React.createElement(Space, {
77
69
  gap: "xxsmall",
78
70
  fontWeight: "normal",
79
71
  fontSize: "small"
80
- }, _react.default.createElement(_components.ToggleSwitch, {
72
+ }, React.createElement(ToggleSwitch, {
81
73
  onChange: handleToggle,
82
74
  on: toggleValue
83
- }), "Include current params in URL"), _react.default.createElement(_components.Space, {
75
+ }), "Include current params in URL"), React.createElement(Space, {
84
76
  mt: "large",
85
77
  between: true
86
- }, _react.default.createElement(_components.Space, {
78
+ }, React.createElement(Space, {
87
79
  onClick: handleCopy,
88
80
  width: "fit-content"
89
- }, _react.default.createElement(_components.CopyToClipboard, {
81
+ }, React.createElement(CopyToClipboard, {
90
82
  content: embedUrl
91
- }, _react.default.createElement(_components.ButtonOutline, {
92
- iconBefore: _react.default.createElement(_materialOutlined.Link, null)
93
- }, "Copy Link"))), _react.default.createElement(_components.Button, {
83
+ }, React.createElement(ButtonOutline, {
84
+ iconBefore: React.createElement(Link, null)
85
+ }, "Copy Link"))), React.createElement(Button, {
94
86
  onClick: onClose
95
87
  }, "Close")));
96
88
  };
97
- exports.QuickEmbed = QuickEmbed;
98
89
  //# sourceMappingURL=QuickEmbed.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuickEmbed.js","names":["_react","_interopRequireWildcard","require","_components","_materialOutlined","_embedServices","_Theme","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","QuickEmbed","_ref","onClose","onCopy","service","EmbedUrl","toggleValue","setToggle","useState","embedUrl","setEmbedUrl","selectedTheme","useThemesStoreState","selectThemeAction","useThemeActions","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","useEffect","overrides","isThemable","name","newUrl","createElement","Section","padding","Heading","as","fontWeight","SpaceVertical","pt","pb","gap","Fragment","Span","fontSize","contentType","toLocaleLowerCase","SelectTheme","Label","htmlFor","InputText","id","iconBefore","Link","readOnly","value","Space","ToggleSwitch","onChange","on","mt","between","onClick","width","CopyToClipboard","content","ButtonOutline","Button","exports"],"sources":["../../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport {\n InputText,\n CopyToClipboard,\n Space,\n SpaceVertical,\n Button,\n Heading,\n Label,\n Span,\n Section,\n ButtonOutline,\n ToggleSwitch,\n} from '@looker/components'\nimport { Link } from '@styled-icons/material-outlined'\nimport { EmbedUrl } from '@looker/embed-services'\nimport { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme'\n\ninterface QuickEmbedProps {\n /** A function triggered when close button is clicked. */\n onClose: () => void\n /**\n * An optional callback triggered when the copy button is clicked.\n * The copy to clipboard action is already handled\n */\n onCopy?: () => void\n}\n\nexport const QuickEmbed = ({ onClose, onCopy }: QuickEmbedProps) => {\n const service = new EmbedUrl()\n const [toggleValue, setToggle] = useState(false)\n const [embedUrl, setEmbedUrl] = useState<string>(service.embedUrl(false))\n const { selectedTheme } = useThemesStoreState()\n const { selectThemeAction } = useThemeActions()\n\n const handleCopy = () => {\n if (onCopy) {\n onCopy()\n }\n }\n\n const handleToggle = () => {\n const newToggleValue = !toggleValue\n if (newToggleValue) {\n // Change the selected theme if there's a theme param in the url\n const urlThemeName = service.searchParams.theme\n if (urlThemeName) {\n selectThemeAction({ key: urlThemeName })\n }\n }\n setToggle(newToggleValue)\n }\n\n useEffect(() => {\n let overrides\n if (service.isThemable) {\n overrides = { theme: selectedTheme.name }\n }\n const newUrl = service.embedUrl(toggleValue, overrides)\n setEmbedUrl(newUrl)\n }, [toggleValue, selectedTheme])\n\n return (\n <Section padding=\"large\">\n <Heading as=\"h3\" fontWeight=\"medium\">\n Get embed URL\n </Heading>\n\n <SpaceVertical pt=\"medium\" pb=\"medium\" gap=\"xsmall\">\n {service.isThemable && (\n <>\n <Span fontWeight=\"normal\" fontSize=\"xsmall\">\n Apply theme to {service.contentType.toLocaleLowerCase()} URL\n </Span>\n <SelectTheme />\n </>\n )}\n <>\n <Label htmlFor=\"embed-url\" fontWeight=\"normal\" fontSize=\"xsmall\">\n Embed URL\n </Label>\n <InputText\n id=\"embed-url\"\n iconBefore={<Link />}\n readOnly\n value={embedUrl}\n />\n </>\n </SpaceVertical>\n\n <Space gap=\"xxsmall\" fontWeight=\"normal\" fontSize=\"small\">\n <ToggleSwitch onChange={handleToggle} on={toggleValue} />\n Include current params in URL\n </Space>\n\n <Space mt=\"large\" between>\n <Space onClick={handleCopy} width=\"fit-content\">\n <CopyToClipboard content={embedUrl}>\n <ButtonOutline iconBefore={<Link />}>Copy Link</ButtonOutline>\n </CopyToClipboard>\n </Space>\n <Button onClick={onClose}>Close</Button>\n </Space>\n </Section>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA4E,SAAAK,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,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAA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,CAACpD,WAAA,CAAA4E,KAAK;IAACM,OAAO,EAAEzC,UAAW;IAAC0C,KAAK,EAAC;EAAa,GAC7CtF,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAoF,eAAe;IAACC,OAAO,EAAElD;EAAS,GACjCtC,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAsF,aAAa;IAACd,UAAU,EAAE3E,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACnD,iBAAA,CAAAwE,IAAI;EAAI,GAAC,WAAS,CAAgB,CAC9C,CACZ,EACR5E,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAuF,MAAM;IAACL,OAAO,EAAEtD;EAAQ,GAAC,OAAK,CAAS,CAClC,CACA;AAEd,CAAC;AAAA4D,OAAA,CAAA9D,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"file":"QuickEmbed.js","names":["React","useEffect","useState","InputText","CopyToClipboard","Space","SpaceVertical","Button","Heading","Label","Span","Section","ButtonOutline","ToggleSwitch","Link","EmbedUrl","useThemesStoreState","SelectTheme","useThemeActions","QuickEmbed","_ref","onClose","onCopy","service","toggleValue","setToggle","embedUrl","setEmbedUrl","selectedTheme","selectThemeAction","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","key","overrides","isThemable","name","newUrl","createElement","padding","as","fontWeight","pt","pb","gap","Fragment","fontSize","contentType","toLocaleLowerCase","htmlFor","id","iconBefore","readOnly","value","onChange","on","mt","between","onClick","width","content"],"sources":["../../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport {\n InputText,\n CopyToClipboard,\n Space,\n SpaceVertical,\n Button,\n Heading,\n Label,\n Span,\n Section,\n ButtonOutline,\n ToggleSwitch,\n} from '@looker/components'\nimport { Link } from '@styled-icons/material-outlined'\nimport { EmbedUrl } from '@looker/embed-services'\nimport { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme'\n\ninterface QuickEmbedProps {\n /** A function triggered when close button is clicked. */\n onClose: () => void\n /**\n * An optional callback triggered when the copy button is clicked.\n * The copy to clipboard action is already handled\n */\n onCopy?: () => void\n}\n\nexport const QuickEmbed = ({ onClose, onCopy }: QuickEmbedProps) => {\n const service = new EmbedUrl()\n const [toggleValue, setToggle] = useState(false)\n const [embedUrl, setEmbedUrl] = useState<string>(service.embedUrl(false))\n const { selectedTheme } = useThemesStoreState()\n const { selectThemeAction } = useThemeActions()\n\n const handleCopy = () => {\n if (onCopy) {\n onCopy()\n }\n }\n\n const handleToggle = () => {\n const newToggleValue = !toggleValue\n if (newToggleValue) {\n // Change the selected theme if there's a theme param in the url\n const urlThemeName = service.searchParams.theme\n if (urlThemeName) {\n selectThemeAction({ key: urlThemeName })\n }\n }\n setToggle(newToggleValue)\n }\n\n useEffect(() => {\n let overrides\n if (service.isThemable) {\n overrides = { theme: selectedTheme.name }\n }\n const newUrl = service.embedUrl(toggleValue, overrides)\n setEmbedUrl(newUrl)\n }, [toggleValue, selectedTheme])\n\n return (\n <Section padding=\"large\">\n <Heading as=\"h3\" fontWeight=\"medium\">\n Get embed URL\n </Heading>\n\n <SpaceVertical pt=\"medium\" pb=\"medium\" gap=\"xsmall\">\n {service.isThemable && (\n <>\n <Span fontWeight=\"normal\" fontSize=\"xsmall\">\n Apply theme to {service.contentType.toLocaleLowerCase()} URL\n </Span>\n <SelectTheme />\n </>\n )}\n <>\n <Label htmlFor=\"embed-url\" fontWeight=\"normal\" fontSize=\"xsmall\">\n Embed URL\n </Label>\n <InputText\n id=\"embed-url\"\n iconBefore={<Link />}\n readOnly\n value={embedUrl}\n />\n </>\n </SpaceVertical>\n\n <Space gap=\"xxsmall\" fontWeight=\"normal\" fontSize=\"small\">\n <ToggleSwitch onChange={handleToggle} on={toggleValue} />\n Include current params in URL\n </Space>\n\n <Space mt=\"large\" between>\n <Space onClick={handleCopy} width=\"fit-content\">\n <CopyToClipboard content={embedUrl}>\n <ButtonOutline iconBefore={<Link />}>Copy Link</ButtonOutline>\n </CopyToClipboard>\n </Space>\n <Button onClick={onClose}>Close</Button>\n </Space>\n </Section>\n )\n}\n"],"mappings":"AA0BA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,SAAS,EACTC,eAAe,EACfC,KAAK,EACLC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,KAAK,EACLC,IAAI,EACJC,OAAO,EACPC,aAAa,EACbC,YAAY,QACP,oBAAoB;AAC3B,SAASC,IAAI,QAAQ,iCAAiC;AACtD,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,mBAAmB,EAAEC,WAAW,EAAEC,eAAe,QAAQ,UAAU;AAY5E,OAAO,IAAMC,UAAU,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,OAAO;IAAEC;EAAwB,CAAC,GAAAF,IAAA;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,CAACpC,KAAK;IAACwD,OAAO,EAAE/B,UAAW;IAACgC,KAAK,EAAC;EAAa,GAC7C9D,KAAA,CAAAyC,aAAA,CAACrC,eAAe;IAAC2D,OAAO,EAAErC;EAAS,GACjC1B,KAAA,CAAAyC,aAAA,CAAC7B,aAAa;IAAC0C,UAAU,EAAEtD,KAAA,CAAAyC,aAAA,CAAC3B,IAAI,MAAE;EAAE,GAAC,WAAwB,CAC9C,CACZ,CAAC,EACRd,KAAA,CAAAyC,aAAA,CAAClC,MAAM;IAACsD,OAAO,EAAExC;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC"}
@@ -1,17 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _QuickEmbed = require("./QuickEmbed");
7
- Object.keys(_QuickEmbed).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _QuickEmbed[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return _QuickEmbed[key];
14
- }
15
- });
16
- });
1
+ export * from './QuickEmbed';
17
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_QuickEmbed","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../src/QuickEmbed/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './QuickEmbed'\n"],"mappings":";;;;;AAyBA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/QuickEmbed/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './QuickEmbed'\n"],"mappings":"AAyBA,cAAc,cAAc"}