@looker/embed-components 23.20.0 → 24.2.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 (49) hide show
  1. package/CHANGELOG.md +92 -57
  2. package/lib/GlobalStore/index.js.map +1 -1
  3. package/lib/GlobalStore/sagas.js.map +1 -1
  4. package/lib/GlobalStore/slice.d.ts +1 -1
  5. package/lib/GlobalStore/slice.js +4 -8
  6. package/lib/GlobalStore/slice.js.map +1 -1
  7. package/lib/GlobalStore/store.js +1 -2
  8. package/lib/GlobalStore/store.js.map +1 -1
  9. package/lib/QuickEmbed/QuickEmbed.d.ts +2 -2
  10. package/lib/QuickEmbed/QuickEmbed.js +2 -2
  11. package/lib/QuickEmbed/QuickEmbed.js.map +1 -1
  12. package/lib/QuickEmbed/index.js.map +1 -1
  13. package/lib/Theme/SelectTheme.d.ts +2 -2
  14. package/lib/Theme/SelectTheme.js +2 -2
  15. package/lib/Theme/SelectTheme.js.map +1 -1
  16. package/lib/Theme/index.js.map +1 -1
  17. package/lib/Theme/state/index.js.map +1 -1
  18. package/lib/Theme/state/sagas.js.map +1 -1
  19. package/lib/Theme/state/slice.d.ts +4 -4
  20. package/lib/Theme/state/slice.js +4 -8
  21. package/lib/Theme/state/slice.js.map +1 -1
  22. package/lib/esm/GlobalStore/index.js.map +1 -1
  23. package/lib/esm/GlobalStore/sagas.js +1 -1
  24. package/lib/esm/GlobalStore/sagas.js.map +1 -1
  25. package/lib/esm/GlobalStore/slice.js.map +1 -1
  26. package/lib/esm/GlobalStore/store.js.map +1 -1
  27. package/lib/esm/QuickEmbed/QuickEmbed.js +2 -2
  28. package/lib/esm/QuickEmbed/QuickEmbed.js.map +1 -1
  29. package/lib/esm/QuickEmbed/index.js.map +1 -1
  30. package/lib/esm/Theme/SelectTheme.js +1 -1
  31. package/lib/esm/Theme/SelectTheme.js.map +1 -1
  32. package/lib/esm/Theme/index.js.map +1 -1
  33. package/lib/esm/Theme/state/index.js.map +1 -1
  34. package/lib/esm/Theme/state/sagas.js +2 -2
  35. package/lib/esm/Theme/state/sagas.js.map +1 -1
  36. package/lib/esm/Theme/state/slice.js.map +1 -1
  37. package/lib/esm/index.js.map +1 -1
  38. package/lib/esm/test-utils/index.js.map +1 -1
  39. package/lib/esm/test-utils/store.js +6 -6
  40. package/lib/esm/test-utils/store.js.map +1 -1
  41. package/lib/esm/test-utils/utils.js.map +1 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib/test-utils/index.js.map +1 -1
  44. package/lib/test-utils/store.d.ts +3 -3
  45. package/lib/test-utils/store.js +4 -4
  46. package/lib/test-utils/store.js.map +1 -1
  47. package/lib/test-utils/utils.js +5 -8
  48. package/lib/test-utils/utils.js.map +1 -1
  49. package/package.json +10 -9
@@ -7,17 +7,15 @@ exports.useThemesStoreState = exports.useThemeActions = exports.themesSlice = ex
7
7
  var _toolkit = require("@reduxjs/toolkit");
8
8
  var _redux = require("@looker/redux");
9
9
  var _sagas = require("./sagas");
10
- var defaultThemesState = {
10
+ var defaultThemesState = exports.defaultThemesState = {
11
11
  initialized: false,
12
12
  defaultTheme: {},
13
13
  selectedTheme: {},
14
14
  themes: [],
15
15
  working: false
16
16
  };
17
- exports.defaultThemesState = defaultThemesState;
18
- var THEMES_SLICE_NAME = 'themes';
19
- exports.THEMES_SLICE_NAME = THEMES_SLICE_NAME;
20
- var themesSlice = (0, _toolkit.createSlice)({
17
+ var THEMES_SLICE_NAME = exports.THEMES_SLICE_NAME = 'themes';
18
+ var themesSlice = exports.themesSlice = (0, _toolkit.createSlice)({
21
19
  name: THEMES_SLICE_NAME,
22
20
  initialState: defaultThemesState,
23
21
  reducers: {
@@ -47,9 +45,7 @@ var themesSlice = (0, _toolkit.createSlice)({
47
45
  }
48
46
  }
49
47
  });
50
- exports.themesSlice = themesSlice;
51
- var themeActions = themesSlice.actions;
52
- exports.themeActions = themeActions;
48
+ var themeActions = exports.themeActions = themesSlice.actions;
53
49
  var {
54
50
  useActions: useThemeActions,
55
51
  useStoreState: useThemesStoreState
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":["_toolkit","require","_redux","_sagas","defaultThemesState","initialized","defaultTheme","selectedTheme","themes","working","exports","THEMES_SLICE_NAME","themesSlice","createSlice","name","initialState","reducers","initAction","initSuccessAction","state","loadThemeDataAction","loadThemeDataSuccessAction","action","payload","selectThemeAction","_action","selectThemeSuccessAction","setFailureAction","error","themeActions","actions","useActions","useThemeActions","useStoreState","useThemesStoreState","createSliceHooks","saga"],"sources":["../../../src/Theme/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { ITheme } from '@looker/sdk'\nimport { saga } from './sagas'\n\nexport interface ThemesState {\n defaultTheme: ITheme\n themes: ITheme[]\n selectedTheme: ITheme\n initialized: boolean\n error?: string\n working: boolean\n}\n\nexport const defaultThemesState: ThemesState = {\n initialized: false,\n defaultTheme: {} as ITheme,\n selectedTheme: {} as ITheme,\n themes: [],\n working: false,\n}\n\nexport type SelectThemeAction = Record<'key', string>\n\ntype SelectThemeSuccessAction = Pick<ThemesState, 'selectedTheme'>\n\ntype SetFailureAction = Record<'error', string>\n\ntype LoadThemeDataSuccessAction = Pick<\n ThemesState,\n 'defaultTheme' | 'themes' | 'selectedTheme'\n>\n\nexport const THEMES_SLICE_NAME = 'themes'\n\nexport const themesSlice = createSlice({\n name: THEMES_SLICE_NAME,\n initialState: defaultThemesState,\n reducers: {\n initAction() {\n // noop\n },\n initSuccessAction(state) {\n state.initialized = true\n },\n loadThemeDataAction(state) {\n state.working = true\n },\n loadThemeDataSuccessAction(\n state,\n action: PayloadAction<LoadThemeDataSuccessAction>\n ) {\n state.themes = action.payload.themes\n state.defaultTheme = action.payload.defaultTheme\n state.selectedTheme = action.payload.selectedTheme\n state.working = false\n },\n selectThemeAction(state, _action: PayloadAction<SelectThemeAction>) {\n state.working = true\n },\n selectThemeSuccessAction(\n state,\n action: PayloadAction<SelectThemeSuccessAction>\n ) {\n state.selectedTheme = action.payload.selectedTheme\n state.working = false\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error\n state.working = false\n },\n },\n})\n\nexport const themeActions = themesSlice.actions\nexport const {\n useActions: useThemeActions,\n useStoreState: useThemesStoreState,\n} = createSliceHooks(themesSlice, saga)\n"],"mappings":";;;;;;AA0BA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAWO,IAAMG,kBAA+B,GAAG;EAC7CC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,CAAC,CAAW;EAC1BC,aAAa,EAAE,CAAC,CAAW;EAC3BC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE;AACX,CAAC;AAAAC,OAAA,CAAAN,kBAA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OAAO;AAAApB,OAAA,CAAAmB,YAAA,GAAAA,YAAA;AACxC,IAAM;EACXE,UAAU,EAAEC,eAAe;EAC3BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACvB,WAAW,EAAEwB,WAAI,CAAC;AAAA1B,OAAA,CAAAwB,mBAAA,GAAAA,mBAAA;AAAAxB,OAAA,CAAAsB,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"slice.js","names":["_toolkit","require","_redux","_sagas","defaultThemesState","exports","initialized","defaultTheme","selectedTheme","themes","working","THEMES_SLICE_NAME","themesSlice","createSlice","name","initialState","reducers","initAction","initSuccessAction","state","loadThemeDataAction","loadThemeDataSuccessAction","action","payload","selectThemeAction","_action","selectThemeSuccessAction","setFailureAction","error","themeActions","actions","useActions","useThemeActions","useStoreState","useThemesStoreState","createSliceHooks","saga"],"sources":["../../../src/Theme/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSliceHooks } from '@looker/redux';\nimport type { ITheme } from '@looker/sdk';\nimport { saga } from './sagas';\n\nexport interface ThemesState {\n defaultTheme: ITheme;\n themes: ITheme[];\n selectedTheme: ITheme;\n initialized: boolean;\n error?: string;\n working: boolean;\n}\n\nexport const defaultThemesState: ThemesState = {\n initialized: false,\n defaultTheme: {} as ITheme,\n selectedTheme: {} as ITheme,\n themes: [],\n working: false,\n};\n\nexport type SelectThemeAction = Record<'key', string>;\n\ntype SelectThemeSuccessAction = Pick<ThemesState, 'selectedTheme'>;\n\ntype SetFailureAction = Record<'error', string>;\n\ntype LoadThemeDataSuccessAction = Pick<\n ThemesState,\n 'defaultTheme' | 'themes' | 'selectedTheme'\n>;\n\nexport const THEMES_SLICE_NAME = 'themes';\n\nexport const themesSlice = createSlice({\n name: THEMES_SLICE_NAME,\n initialState: defaultThemesState,\n reducers: {\n initAction() {\n // noop\n },\n initSuccessAction(state) {\n state.initialized = true;\n },\n loadThemeDataAction(state) {\n state.working = true;\n },\n loadThemeDataSuccessAction(\n state,\n action: PayloadAction<LoadThemeDataSuccessAction>\n ) {\n state.themes = action.payload.themes;\n state.defaultTheme = action.payload.defaultTheme;\n state.selectedTheme = action.payload.selectedTheme;\n state.working = false;\n },\n selectThemeAction(state, _action: PayloadAction<SelectThemeAction>) {\n state.working = true;\n },\n selectThemeSuccessAction(\n state,\n action: PayloadAction<SelectThemeSuccessAction>\n ) {\n state.selectedTheme = action.payload.selectedTheme;\n state.working = false;\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error;\n state.working = false;\n },\n },\n});\n\nexport const themeActions = themesSlice.actions;\nexport const {\n useActions: useThemeActions,\n useStoreState: useThemesStoreState,\n} = createSliceHooks(themesSlice, saga);\n"],"mappings":";;;;;;AA0BA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,MAA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R,KAAK,EAAEG,MAAuC,EAAE;MAC/DH,KAAK,CAACS,KAAK,GAAGN,MAAM,CAACC,OAAO,CAACK,KAAK;MAClCT,KAAK,CAACT,OAAO,GAAG,KAAK;IACvB;EACF;AACF,CAAC,CAAC;AAEK,IAAMmB,YAAY,GAAAxB,OAAA,CAAAwB,YAAA,GAAGjB,WAAW,CAACkB,OAAO;AACxC,IAAM;EACXC,UAAU,EAAEC,eAAe;EAC3BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACvB,WAAW,EAAEwB,WAAI,CAAC;AAAC/B,OAAA,CAAA6B,mBAAA,GAAAA,mBAAA;AAAA7B,OAAA,CAAA2B,eAAA,GAAAA,eAAA"}
@@ -1 +1 @@
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
+ {"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,4 +1,4 @@
1
- import { takeEvery, put } from 'typed-redux-saga';
1
+ import { put, takeEvery } from 'typed-redux-saga';
2
2
  import { createFactory } from '@looker/embed-services';
3
3
  import { factoryActions } from './slice';
4
4
  function* initSaga(action) {
@@ -1 +1 @@
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
+ {"version":3,"file":"sagas.js","names":["put","takeEvery","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 { put, takeEvery } 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,GAAG,EAAEC,SAAS,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,OAAOT,GAAG,CAACM,wBAAwB,CAAC,CAAC,CAAC;EACxC,CAAC,CAAC,OAAOI,KAAU,EAAE;IACnB,OAAOV,GAAG,CAACO,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,OAAOF,SAAS,CAACY,iBAAiB,EAAET,QAAQ,CAAC;AAC/C"}
@@ -1 +1 @@
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
+ {"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 +1 @@
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
+ {"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,8 +1,8 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { InputText, CopyToClipboard, Space, SpaceVertical, Button, Heading, Label, Span, Section, ButtonOutline, ToggleSwitch } from '@looker/components';
2
+ import { Button, ButtonOutline, CopyToClipboard, Heading, InputText, Label, Section, Space, SpaceVertical, Span, ToggleSwitch } from '@looker/components';
3
3
  import { Link } from '@styled-icons/material-outlined';
4
4
  import { EmbedUrl } from '@looker/embed-services';
5
- import { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme';
5
+ import { SelectTheme, useThemeActions, useThemesStoreState } from '../Theme';
6
6
  export var QuickEmbed = _ref => {
7
7
  var {
8
8
  onClose,
@@ -1 +1 @@
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,GAAA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yC,aAAA,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
+ {"version":3,"file":"QuickEmbed.js","names":["React","useEffect","useState","Button","ButtonOutline","CopyToClipboard","Heading","InputText","Label","Section","Space","SpaceVertical","Span","ToggleSwitch","Link","EmbedUrl","SelectTheme","useThemeActions","useThemesStoreState","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 Button,\n ButtonOutline,\n CopyToClipboard,\n Heading,\n InputText,\n Label,\n Section,\n Space,\n SpaceVertical,\n Span,\n ToggleSwitch,\n} from '@looker/components';\nimport { Link } from '@styled-icons/material-outlined';\nimport { EmbedUrl } from '@looker/embed-services';\nimport { SelectTheme, useThemeActions, useThemesStoreState } 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,MAAM,EACNC,aAAa,EACbC,eAAe,EACfC,OAAO,EACPC,SAAS,EACTC,KAAK,EACLC,OAAO,EACPC,KAAK,EACLC,aAAa,EACbC,IAAI,EACJC,YAAY,QACP,oBAAoB;AAC3B,SAASC,IAAI,QAAQ,iCAAiC;AACtD,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,WAAW,EAAEC,eAAe,EAAEC,mBAAmB,QAAQ,UAAU;AAY5E,OAAO,IAAMC,UAAU,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,OAAO;IAAEC;EAAwB,CAAC,GAAAF,IAAA;EAC7D,IAAMG,OAAO,GAAG,IAAIR,QAAQ,CAAC,CAAC;EAC9B,IAAM,CAACS,WAAW,EAAEC,SAAS,CAAC,GAAGvB,QAAQ,CAAC,KAAK,CAAC;EAChD,IAA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ACjC1B,KAAA,CAAAyC,aAAA,CAACrC,aAAa;IAACkD,UAAU,EAAEtD,KAAA,CAAAyC,aAAA,CAAC3B,IAAI,MAAE;EAAE,GAAC,WAAwB,CAC9C,CACZ,CAAC,EACRd,KAAA,CAAAyC,aAAA,CAACtC,MAAM;IAAC0D,OAAO,EAAExC;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC"}
@@ -1 +1 @@
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"}
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"}
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React, { useEffect, useState } from 'react';
2
2
  import { Select, SpaceVertical, ValidationMessage } from '@looker/components';
3
3
  import { useThemeActions, useThemesStoreState } from './state';
4
4
  export var SelectTheme = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTheme.js","names":["React","useState","useEffect","Select","SpaceVertical","ValidationMessage","useThemeActions","useThemesStoreState","SelectTheme","initialized","themes","selectedTheme","error","working","initAction","loadThemeDataAction","selectThemeAction","options","setOptions","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","key","createElement","gap","disabled","length","isLoading","validationType","undefined","onChange","type","message"],"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 </Space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C,aAAA,CAAC5B,aAAa;IAAC6B,GAAG,EAAC;EAAU,GAC3BjC,KAAA,CAAAgC,aAAA,CAAC7B,MAAM;IACL+B,QAAQ,EAAExB,MAAM,CAACyB,MAAM,IAAI,CAAE;IAC7BC,SAAS,EAAE,CAAC3B,WAAW,IAAII,OAAQ;IACnCwB,cAAc,EAAEzB,KAAK,GAAG,OAAO,GAAG0B,SAAU;IAC5ChB,KAAK,EAAEX,aAAa,CAACc,IAAK;IAC1BR,OAAO,EAAEA,OAAQ;IACjBsB,QAAQ,EAAET;EAAa,CACxB,CAAC,EACDlB,KAAK,IAAIZ,KAAA,CAAAgC,aAAA,CAAC3B,iBAAiB;IAACmC,IAAI,EAAC,OAAO;IAACC,OAAO,EAAE7B;EAAM,CAAE,CAC9C,CAAC;AAEpB,CAAC"}
1
+ {"version":3,"file":"SelectTheme.js","names":["React","useEffect","useState","Select","SpaceVertical","ValidationMessage","useThemeActions","useThemesStoreState","SelectTheme","initialized","themes","selectedTheme","error","working","initAction","loadThemeDataAction","selectThemeAction","options","setOptions","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","key","createElement","gap","disabled","length","isLoading","validationType","undefined","onChange","type","message"],"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, { useEffect, useState } 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,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,QAAQ,oBAAoB;AAE7E,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,SAAS;AAE9D,OAAO,IAAMC,WAAW,GAAGA,CAAA,KAAM;EAC/B,IAAM;IAAEC,WAAW;IAAEC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a,CAACc,IAAK;IAC1BR,OAAO,EAAEA,OAAQ;IACjBsB,QAAQ,EAAET;EAAa,CACxB,CAAC,EACDlB,KAAK,IAAIZ,KAAA,CAAAgC,aAAA,CAAC3B,iBAAiB;IAACmC,IAAI,EAAC,OAAO;IAACC,OAAO,EAAE7B;EAAM,CAAE,CAC9C,CAAC;AAEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["SelectTheme"],"sources":["../../../src/Theme/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 { SelectTheme } from './SelectTheme'\nexport * from './state'\n"],"mappings":"AAyBA,SAASA,WAAW,QAAQ,eAAe;AAC3C,cAAc,SAAS"}
1
+ {"version":3,"file":"index.js","names":["SelectTheme"],"sources":["../../../src/Theme/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 { SelectTheme } from './SelectTheme';\nexport * from './state';\n"],"mappings":"AAyBA,SAASA,WAAW,QAAQ,eAAe;AAC3C,cAAc,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/Theme/state/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './slice'\n"],"mappings":"AAyBA,cAAc,SAAS"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/Theme/state/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './slice';\n"],"mappings":"AAyBA,cAAc,SAAS"}
@@ -1,5 +1,5 @@
1
- import { takeEvery, put, call } from 'typed-redux-saga';
2
- import { registerThemeService, getThemeService, EmbedUrl } from '@looker/embed-services';
1
+ import { call, put, takeEvery } from 'typed-redux-saga';
2
+ import { EmbedUrl, getThemeService, registerThemeService } from '@looker/embed-services';
3
3
  import { themeActions } from './slice';
4
4
  function* initSaga() {
5
5
  var {
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","names":["takeEvery","put","call","registerThemeService","getThemeService","EmbedUrl","themeActions","initSaga","initSuccessAction","setFailureAction","error","message","loadThemeDataSaga","loadThemeDataSuccessAction","_urlTheme","service","searchParams","urlThemeName","theme","urlTheme","find","themes","items","defaultTheme","selectedTheme","selectThemeSaga","action","selectThemeSuccessAction","_item","key","payload","item","indexedItems","concat","saga","initAction","loadThemeDataAction","selectThemeAction"],"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,SAASA,SAAS,EAAEC,GAAG,EAAEC,IAAI,QAAQ,kBAAkB;AAGvD,SACEC,oBAAoB,EACpBC,eAAe,EACfC,QAAQ,QACH,wBAAwB;AAC/B,SAASC,YAAY,QAAQ,SAAS;AAMtC,UAAUC,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAE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E,IAAI;IAAA,IAAAsB,KAAA;IACF,IAAMb,OAAO,GAAGX,eAAe,CAAC,CAAC;IACjC,OAAOF,IAAI,CAAC,CAACa,OAAO,EAAE,QAAQ,CAAC,CAAC;IAChC,IAAMc,GAAG,GAAGH,MAAM,CAACI,OAAO,CAACD,GAAG;IAC9B,IAAIE,IAAwB,GAAGhB,OAAO,CAACiB,YAAY,CAACH,GAAG,CAAC;IACxD,IAAI,CAACE,IAAI,EAAE;MACTA,IAAI,GAAGhB,OAAO,CAACK,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAAa,MAAA,CAAMJ,GAAG,MAAG,CAAC;IACjD;IACA,OAAO5B,GAAG,CACR0B,wBAAwB,CAAC;MAAEH,aAAa,GAAAI,KAAA,GAAEG,IAAI,cAAAH,KAAA,cAAAA,KAAA,GAAIb,OAAO,CAACQ;IAAc,CAAC,CAC3E,CAAC;EACH,CAAC,CAAC,OAAOb,KAAU,EAAE;IACnB,OAAOT,GAAG,CACRQ,gBAAgB,CAAC;MACfC,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CACH,CAAC;EACH;AACF;AAEA,OAAO,UAAUuB,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAG/B,YAAY;EAC3E,OAAON,SAAS,CAACmC,UAAU,EAAE5B,QAAQ,CAAC;EACtC,OAAOP,SAAS,CAACoC,mBAAmB,EAAExB,iBAAiB,CAAC;EACxD,OAAOZ,SAAS,CAACqC,iBAAiB,EAAEZ,eAAe,CAAC;AACtD"}
1
+ {"version":3,"file":"sagas.js","names":["call","put","takeEvery","EmbedUrl","getThemeService","registerThemeService","themeActions","initSaga","initSuccessAction","setFailureAction","error","message","loadThemeDataSaga","loadThemeDataSuccessAction","_urlTheme","service","searchParams","urlThemeName","theme","urlTheme","find","themes","items","defaultTheme","selectedTheme","selectThemeSaga","action","selectThemeSuccessAction","_item","key","payload","item","indexedItems","concat","saga","initAction","loadThemeDataAction","selectThemeAction"],"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 { call, put, takeEvery } from 'typed-redux-saga';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport type { ITheme } from '@looker/sdk';\nimport {\n EmbedUrl,\n getThemeService,\n registerThemeService,\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,SAASA,IAAI,EAAEC,GAAG,EAAEC,SAAS,QAAQ,kBAAkB;AAGvD,SACEC,QAAQ,EACRC,eAAe,EACfC,oBAAoB,QACf,wBAAwB;AAC/B,SAASC,YAAY,QAAQ,SAAS;AAMtC,UAAUC,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGH,YAAY;EAC5D,IAAI;IACFD,oBAAoB,CAAC,CAAC;IACtB,OAAOJ,GAAG,CAACO,iBAAiB,CAAC,CAAC,CAAC;EACjC,CAAC,CAAC,OAAOE,KAAU,EAAE;IACnB,OAAOT,GAAG,CAACQ,gBAAgB,CAAC;MAAEC,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAA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AC;IACxD,IAAI,CAACE,IAAI,EAAE;MACTA,IAAI,GAAGhB,OAAO,CAACK,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAAa,MAAA,CAAMJ,GAAG,MAAG,CAAC;IACjD;IACA,OAAO5B,GAAG,CACR0B,wBAAwB,CAAC;MAAEH,aAAa,GAAAI,KAAA,GAAEG,IAAI,cAAAH,KAAA,cAAAA,KAAA,GAAIb,OAAO,CAACQ;IAAc,CAAC,CAC3E,CAAC;EACH,CAAC,CAAC,OAAOb,KAAU,EAAE;IACnB,OAAOT,GAAG,CACRQ,gBAAgB,CAAC;MACfC,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CACH,CAAC;EACH;AACF;AAEA,OAAO,UAAUuB,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAG/B,YAAY;EAC3E,OAAOJ,SAAS,CAACiC,UAAU,EAAE5B,QAAQ,CAAC;EACtC,OAAOL,SAAS,CAACkC,mBAAmB,EAAExB,iBAAiB,CAAC;EACxD,OAAOV,SAAS,CAACmC,iBAAiB,EAAEZ,eAAe,CAAC;AACtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":["createSlice","createSliceHooks","saga","defaultThemesState","initialized","defaultTheme","selectedTheme","themes","working","THEMES_SLICE_NAME","themesSlice","name","initialState","reducers","initAction","initSuccessAction","state","loadThemeDataAction","loadThemeDataSuccessAction","action","payload","selectThemeAction","_action","selectThemeSuccessAction","setFailureAction","error","themeActions","actions","useActions","useThemeActions","useStoreState","useThemesStoreState"],"sources":["../../../../src/Theme/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { ITheme } from '@looker/sdk'\nimport { saga } from './sagas'\n\nexport interface ThemesState {\n defaultTheme: ITheme\n themes: ITheme[]\n selectedTheme: ITheme\n initialized: boolean\n error?: string\n working: boolean\n}\n\nexport const defaultThemesState: ThemesState = {\n initialized: false,\n defaultTheme: {} as ITheme,\n selectedTheme: {} as ITheme,\n themes: [],\n working: false,\n}\n\nexport type SelectThemeAction = Record<'key', string>\n\ntype SelectThemeSuccessAction = Pick<ThemesState, 'selectedTheme'>\n\ntype SetFailureAction = Record<'error', string>\n\ntype LoadThemeDataSuccessAction = Pick<\n ThemesState,\n 'defaultTheme' | 'themes' | 'selectedTheme'\n>\n\nexport const THEMES_SLICE_NAME = 'themes'\n\nexport const themesSlice = createSlice({\n name: THEMES_SLICE_NAME,\n initialState: defaultThemesState,\n reducers: {\n initAction() {\n // noop\n },\n initSuccessAction(state) {\n state.initialized = true\n },\n loadThemeDataAction(state) {\n state.working = true\n },\n loadThemeDataSuccessAction(\n state,\n action: PayloadAction<LoadThemeDataSuccessAction>\n ) {\n state.themes = action.payload.themes\n state.defaultTheme = action.payload.defaultTheme\n state.selectedTheme = action.payload.selectedTheme\n state.working = false\n },\n selectThemeAction(state, _action: PayloadAction<SelectThemeAction>) {\n state.working = true\n },\n selectThemeSuccessAction(\n state,\n action: PayloadAction<SelectThemeSuccessAction>\n ) {\n state.selectedTheme = action.payload.selectedTheme\n state.working = false\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error\n state.working = false\n },\n },\n})\n\nexport const themeActions = themesSlice.actions\nexport const {\n useActions: useThemeActions,\n useStoreState: useThemesStoreState,\n} = createSliceHooks(themesSlice, saga)\n"],"mappings":"AA0BA,SAASA,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,SAASC,IAAI,QAAQ,SAAS;AAW9B,OAAO,IAAMC,kBAA+B,GAAG;EAC7CC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,CAAC,CAAW;EAC1BC,aAAa,EAAE,CAAC,CAAW;EAC3BC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE;AACX,CAAC;AAaD,OAAO,IAAMC,iBAAiB,GAAG,QAAQ;AAEzC,OAAO,IAAMC,WAAW,GAAGV,WAAW,CAAC;EACrCW,IAAI,EAAEF,iBAAiB;EACvBG,YAAY,EAAET,kBAAkB;EAChCU,QAAQ,EAAE;IACRC,UAAUA,CAAA,EAAG,CAEb,CAAC;IACDC,iBAAiBA,CAACC,KAAK,EAAE;MACvBA,KAAK,CAACZ,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDa,mBAAmBA,CAACD,KAAK,EAAE;MACzBA,KAAK,CAACR,OAAO,GAAG,IAAI;IACtB,CAAC;IACDU,0BAA0BA,CACxBF,KAAK,EACLG,MAAiD,EACjD;MACAH,KAAK,CAACT,MAAM,GAAGY,MAAM,CAACC,OAAO,CAACb,MAAM;MACpCS,KAAK,CAACX,YAAY,GAAGc,MAAM,CAACC,OAAO,CAACf,YAAY;MAChDW,KAAK,CAACV,aAAa,GAAGa,MAAM,CAACC,OAAO,CAACd,aAAa;MAClDU,KAAK,CAACR,OAAO,GAAG,KAAK;IACvB,CAAC;IACDa,iBAAiBA,CAACL,KAAK,EAAEM,OAAyC,EAAE;MAClEN,KAAK,CAACR,OAAO,GAAG,IAAI;IACtB,CAAC;IACDe,wBAAwBA,CACtBP,KAAK,EACLG,MAA+C,EAC/C;MACAH,KAAK,CAACV,aAAa,GAAGa,MAAM,CAACC,OAAO,CAACd,aAAa;MAClDU,KAAK,CAACR,OAAO,GAAG,KAAK;IACvB,CAAC;IACDgB,gBAAgBA,CAACR,KAAK,EAAEG,MAAuC,EAAE;MAC/DH,KAAK,CAACS,KAAK,GAAGN,MAAM,CAACC,OAAO,CAACK,KAAK;MAClCT,KAAK,CAACR,OAAO,GAAG,KAAK;IACvB;EACF;AACF,CAAC,CAAC;AAEF,OAAO,IAAMkB,YAAY,GAAGhB,WAAW,CAACiB,OAAO;AAC/C,OAAO,IAAM;EACXC,UAAU,EAAEC,eAAe;EAC3BC,aAAa,EAAEC;AACjB,CAAC,GAAG9B,gBAAgB,CAACS,WAAW,EAAER,IAAI,CAAC"}
1
+ {"version":3,"file":"slice.js","names":["createSlice","createSliceHooks","saga","defaultThemesState","initialized","defaultTheme","selectedTheme","themes","working","THEMES_SLICE_NAME","themesSlice","name","initialState","reducers","initAction","initSuccessAction","state","loadThemeDataAction","loadThemeDataSuccessAction","action","payload","selectThemeAction","_action","selectThemeSuccessAction","setFailureAction","error","themeActions","actions","useActions","useThemeActions","useStoreState","useThemesStoreState"],"sources":["../../../../src/Theme/state/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport { createSlice } from '@reduxjs/toolkit';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { createSliceHooks } from '@looker/redux';\nimport type { ITheme } from '@looker/sdk';\nimport { saga } from './sagas';\n\nexport interface ThemesState {\n defaultTheme: ITheme;\n themes: ITheme[];\n selectedTheme: ITheme;\n initialized: boolean;\n error?: string;\n working: boolean;\n}\n\nexport const defaultThemesState: ThemesState = {\n initialized: false,\n defaultTheme: {} as ITheme,\n selectedTheme: {} as ITheme,\n themes: [],\n working: false,\n};\n\nexport type SelectThemeAction = Record<'key', string>;\n\ntype SelectThemeSuccessAction = Pick<ThemesState, 'selectedTheme'>;\n\ntype SetFailureAction = Record<'error', string>;\n\ntype LoadThemeDataSuccessAction = Pick<\n ThemesState,\n 'defaultTheme' | 'themes' | 'selectedTheme'\n>;\n\nexport const THEMES_SLICE_NAME = 'themes';\n\nexport const themesSlice = createSlice({\n name: THEMES_SLICE_NAME,\n initialState: defaultThemesState,\n reducers: {\n initAction() {\n // noop\n },\n initSuccessAction(state) {\n state.initialized = true;\n },\n loadThemeDataAction(state) {\n state.working = true;\n },\n loadThemeDataSuccessAction(\n state,\n action: PayloadAction<LoadThemeDataSuccessAction>\n ) {\n state.themes = action.payload.themes;\n state.defaultTheme = action.payload.defaultTheme;\n state.selectedTheme = action.payload.selectedTheme;\n state.working = false;\n },\n selectThemeAction(state, _action: PayloadAction<SelectThemeAction>) {\n state.working = true;\n },\n selectThemeSuccessAction(\n state,\n action: PayloadAction<SelectThemeSuccessAction>\n ) {\n state.selectedTheme = action.payload.selectedTheme;\n state.working = false;\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error;\n state.working = false;\n },\n },\n});\n\nexport const themeActions = themesSlice.actions;\nexport const {\n useActions: useThemeActions,\n useStoreState: useThemesStoreState,\n} = createSliceHooks(themesSlice, saga);\n"],"mappings":"AA0BA,SAASA,WAAW,QAAQ,kBAAkB;AAE9C,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,SAASC,IAAI,QAAQ,SAAS;AAW9B,OAAO,IAAMC,kBAA+B,GAAG;EAC7CC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,CAAC,CAAW;EAC1BC,aAAa,EAAE,CAAC,CAAW;EAC3BC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE;AACX,CAAC;AAaD,OAAO,IAAMC,iBAAiB,GAAG,QAAQ;AAEzC,OAAO,IAAMC,WAAW,GAAGV,WAAW,CAAC;EACrCW,IAAI,EAAEF,iBAAiB;EACvBG,YAAY,EAAET,kBAAkB;EAChCU,QAAQ,EAAE;IACRC,UAAUA,CAAA,EAAG,CAEb,CAAC;IACDC,iBAAiBA,CAACC,KAAK,EAAE;MACvBA,KAAK,CAACZ,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDa,mBAAmBA,CAACD,KAAK,EAAE;MACzBA,KAAK,CAACR,OAAO,GAAG,IAAI;IACtB,CAAC;IACDU,0BAA0BA,CACxBF,KAAK,EACLG,MAAiD,EACjD;MACAH,KAAK,CAACT,MAAM,GAAGY,MAAM,CAACC,OAAO,CAACb,MAAM;MACpCS,KAAK,CAACX,YAAY,GAAGc,MAAM,CAACC,OAAO,CAACf,YAAY;MAChDW,KAAK,CAACV,aAAa,GAAGa,MAAM,CAACC,OAAO,CAACd,aAAa;MAClDU,KAAK,CAACR,OAAO,GAAG,KAAK;IACvB,CAAC;IACDa,iBAAiBA,CAACL,KAAK,EAAEM,OAAyC,EAAE;MAClEN,KAAK,CAACR,OAAO,GAAG,IAAI;IACtB,CAAC;IACDe,wBAAwBA,CACtBP,KAAK,EACLG,MAA+C,EAC/C;MACAH,KAAK,CAACV,aAAa,GAAGa,MAAM,CAACC,OAAO,CAACd,aAAa;MAClDU,KAAK,CAACR,OAAO,GAAG,KAAK;IACvB,CAAC;IACDgB,gBAAgBA,CAACR,KAAK,EAAEG,MAAuC,EAAE;MAC/DH,KAAK,CAACS,KAAK,GAAGN,MAAM,CAACC,OAAO,CAACK,KAAK;MAClCT,KAAK,CAACR,OAAO,GAAG,KAAK;IACvB;EACF;AACF,CAAC,CAAC;AAEF,OAAO,IAAMkB,YAAY,GAAGhB,WAAW,CAACiB,OAAO;AAC/C,OAAO,IAAM;EACXC,UAAU,EAAEC,eAAe;EAC3BC,aAAa,EAAEC;AACjB,CAAC,GAAG9B,gBAAgB,CAACS,WAAW,EAAER,IAAI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './GlobalStore'\nexport * from './Theme'\nexport * from './QuickEmbed'\n"],"mappings":"AAyBA,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,cAAc"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './GlobalStore';\nexport * from './Theme';\nexport * from './QuickEmbed';\n"],"mappings":"AAyBA,cAAc,eAAe;AAC7B,cAAc,SAAS;AACvB,cAAc,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/test-utils/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 './utils'\nexport * from './store'\n"],"mappings":"AAyBA,cAAc,SAAS;AACvB,cAAc,SAAS"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/test-utils/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 './utils';\nexport * from './store';\n"],"mappings":"AAyBA,cAAc,SAAS;AACvB,cAAc,SAAS"}
@@ -1,11 +1,11 @@
1
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import { createStore } from '@looker/redux';
7
- import { factorySlice, defaultFactoryState } from '../GlobalStore';
8
- import { themesSlice, defaultThemesState } from '../Theme';
7
+ import { defaultFactoryState, factorySlice } from '../GlobalStore';
8
+ import { defaultThemesState, themesSlice } from '../Theme';
9
9
  export var createTestStore = overrides => createStore({
10
10
  preloadedState: {
11
11
  factory: _objectSpread(_objectSpread({}, defaultFactoryState), overrides === null || overrides === void 0 ? void 0 : overrides.factory),
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":["createStore","factorySlice","defaultFactoryState","themesSlice","defaultThemesState","createTestStore","overrides","preloadedState","factory","_objectSpread","themes","reducer"],"sources":["../../../src/test-utils/store.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 { createStore } from '@looker/redux'\nimport { factorySlice, defaultFactoryState } from '../GlobalStore'\nimport type { RootState, FactoryState } from '../GlobalStore'\nimport { themesSlice, defaultThemesState } from '../Theme'\nimport type { ThemesState } from '../Theme'\n\ntype DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>\n}\n\nexport const createTestStore = (overrides?: DeepPartial<RootState>) =>\n createStore({\n preloadedState: {\n factory: {\n ...defaultFactoryState,\n ...overrides?.factory,\n } as FactoryState,\n themes: { ...defaultThemesState, ...overrides?.themes } as ThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n })\n"],"mappings":";;;;;AAyBA,SAASA,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,EAAEC,mBAAmB,QAAQ,gBAAgB;AAElE,SAASC,WAAW,EAAEC,kBAAkB,QAAQ,UAAU;AAO1D,OAAO,IAAMC,eAAe,GAAIC,SAAkC,IAChEN,WAAW,CAAC;EACVO,cAAc,EAAE;IACdC,OAAO,EAAAC,aAAA,CAAAA,aAAA,KACFP,mBAAmB,GACnBI,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEE,OAAO,CACN;IACjBE,MAAM,EAAAD,aAAA,CAAAA,aAAA,KAAOL,kBAAkB,GAAKE,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEI,MAAM;EACvD,CAAC;EACDC,OAAO,EAAE;IACPH,OAAO,EAAEP,YAAY,CAACU,OAAO;IAC7BD,MAAM,EAAEP,WAAW,CAACQ;EACtB;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"store.js","names":["createStore","defaultFactoryState","factorySlice","defaultThemesState","themesSlice","createTestStore","overrides","preloadedState","factory","_objectSpread","themes","reducer"],"sources":["../../../src/test-utils/store.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 { createStore } from '@looker/redux';\nimport { defaultFactoryState, factorySlice } from '../GlobalStore';\nimport type { FactoryState, RootState } from '../GlobalStore';\nimport { defaultThemesState, themesSlice } from '../Theme';\nimport type { ThemesState } from '../Theme';\n\ntype DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>;\n};\n\nexport const createTestStore = (overrides?: DeepPartial<RootState>) =>\n createStore({\n preloadedState: {\n factory: {\n ...defaultFactoryState,\n ...overrides?.factory,\n } as FactoryState,\n themes: { ...defaultThemesState, ...overrides?.themes } as ThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n });\n"],"mappings":";;;;;AAyBA,SAASA,WAAW,QAAQ,eAAe;AAC3C,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,gBAAgB;AAElE,SAASC,kBAAkB,EAAEC,WAAW,QAAQ,UAAU;AAO1D,OAAO,IAAMC,eAAe,GAAIC,SAAkC,IAChEN,WAAW,CAAC;EACVO,cAAc,EAAE;IACdC,OAAO,EAAAC,aAAA,CAAAA,aAAA,KACFR,mBAAmB,GACnBK,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEE,OAAO,CACN;IACjBE,MAAM,EAAAD,aAAA,CAAAA,aAAA,KAAON,kBAAkB,GAAKG,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEI,MAAM;EACvD,CAAC;EACDC,OAAO,EAAE;IACPH,OAAO,EAAEN,YAAY,CAACS,OAAO;IAC7BD,MAAM,EAAEN,WAAW,CAACO;EACtB;AACF,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["path","fs","environmentPrefix","NodeSession","NodeSettingsIniFile","homeToRoost","getRootPath","join","__dirname","rootFile","fileName","arguments","length","undefined","localIni","process","env","LOOKERSDK_INI","settings","session","timeout","TestConfig","testFile","testPath","dataFile","concat","testData","JSON","parse","readFileSync"],"sources":["../../../src/test-utils/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport path from 'path'\nimport * as fs from 'fs'\nimport { environmentPrefix } from '@looker/sdk'\nimport { NodeSession, NodeSettingsIniFile } from '@looker/sdk-node'\n\nconst homeToRoost = '../../../../'\n\nexport const getRootPath = () => path.join(__dirname, homeToRoost)\nexport const rootFile = (fileName = '') => path.join(getRootPath(), fileName)\nconst localIni = process.env.LOOKERSDK_INI || rootFile('looker.ini')\n\nconst settings = new NodeSettingsIniFile(environmentPrefix, localIni, 'Looker')\nexport const session = new NodeSession(settings)\n\nexport const timeout = 3600000 // 1 hr\n\ninterface ITestConfig {\n testData: any\n}\n\nexport const TestConfig = (): ITestConfig => {\n const testFile = 'data.yml.json'\n const testPath = rootFile('test/')\n const dataFile = `${testPath}${testFile}`\n const testData = JSON.parse(fs.readFileSync(dataFile, 'utf-8'))\n return {\n testData,\n }\n}\n"],"mappings":"AAyBA,OAAOA,IAAI,MAAM,MAAM;AACvB,OAAO,KAAKC,EAAE,MAAM,IAAI;AACxB,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,WAAW,EAAEC,mBAAmB,QAAQ,kBAAkB;AAEnE,IAAMC,WAAW,GAAG,cAAc;AAElC,OAAO,IAAMC,WAAW,GAAGA,CAAA,KAAMN,IAAI,CAACO,IAAI,CAACC,SAAS,EAAEH,WAAW,CAAC;AAClE,OAAO,IAAMI,QAAQ,GAAG,SAAXA,QAAQA,CAAA;EAAA,IAAIC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,OAAKX,IAAI,CAACO,IAAI,CAACD,WAAW,CAAC,CAAC,EAAEI,QAAQ,CAAC;AAAA;AAC7E,IAAMI,QAAQ,GAAGC,OAAO,CAACC,GAAG,CAACC,aAAa,IAAIR,QAAQ,CAAC,YAAY,CAAC;AAEpE,IAAMS,QAAQ,GAAG,IAAId,mBAAmB,CAACF,iBAAiB,EAAEY,QAAQ,EAAE,QAAQ,CAAC;AAC/E,OAAO,IAAMK,OAAO,GAAG,IAAIhB,WAAW,CAACe,QAAQ,CAAC;AAEhD,OAAO,IAAME,OAAO,GAAG,OAAO;AAM9B,OAAO,IAAMC,UAAU,GAAGA,CAAA,KAAmB;EAC3C,IAAMC,QAAQ,GAAG,eAAe;EAChC,IAAMC,QAAQ,GAAGd,QAAQ,CAAC,OAAO,CAAC;EAClC,IAAMe,QAAQ,MAAAC,MAAA,CAAMF,QAAQ,EAAAE,MAAA,CAAGH,QAAQ,CAAE;EACzC,IAAMI,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAC3B,EAAE,CAAC4B,YAAY,CAACL,QAAQ,EAAE,OAAO,CAAC,CAAC;EAC/D,OAAO;IACLE;EACF,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"utils.js","names":["path","fs","environmentPrefix","NodeSession","NodeSettingsIniFile","homeToRoost","getRootPath","join","__dirname","rootFile","fileName","arguments","length","undefined","localIni","process","env","LOOKERSDK_INI","settings","session","timeout","TestConfig","testFile","testPath","dataFile","concat","testData","JSON","parse","readFileSync"],"sources":["../../../src/test-utils/utils.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport path from 'path';\nimport * as fs from 'fs';\nimport { environmentPrefix } from '@looker/sdk';\nimport { NodeSession, NodeSettingsIniFile } from '@looker/sdk-node';\n\nconst homeToRoost = '../../../../';\n\nexport const getRootPath = () => path.join(__dirname, homeToRoost);\nexport const rootFile = (fileName = '') => path.join(getRootPath(), fileName);\nconst localIni = process.env.LOOKERSDK_INI || rootFile('looker.ini');\n\nconst settings = new NodeSettingsIniFile(environmentPrefix, localIni, 'Looker');\nexport const session = new NodeSession(settings);\n\nexport const timeout = 3600000; // 1 hr\n\ninterface ITestConfig {\n testData: any;\n}\n\nexport const TestConfig = (): ITestConfig => {\n const testFile = 'data.yml.json';\n const testPath = rootFile('test/');\n const dataFile = `${testPath}${testFile}`;\n const testData = JSON.parse(fs.readFileSync(dataFile, 'utf-8'));\n return {\n testData,\n };\n};\n"],"mappings":"AAyBA,OAAOA,IAAI,MAAM,MAAM;AACvB,OAAO,KAAKC,EAAE,MAAM,IAAI;AACxB,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,WAAW,EAAEC,mBAAmB,QAAQ,kBAAkB;AAEnE,IAAMC,WAAW,GAAG,cAAc;AAElC,OAAO,IAAMC,WAAW,GAAGA,CAAA,KAAMN,IAAI,CAACO,IAAI,CAACC,SAAS,EAAEH,WAAW,CAAC;AAClE,OAAO,IAAMI,QAAQ,GAAG,SAAXA,QAAQA,CAAA;EAAA,IAAIC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,OAAKX,IAAI,CAACO,IAAI,CAACD,WAAW,CAAC,CAAC,EAAEI,QAAQ,CAAC;AAAA;AAC7E,IAAMI,QAAQ,GAAGC,OAAO,CAACC,GAAG,CAACC,aAAa,IAAIR,QAAQ,CAAC,YAAY,CAAC;AAEpE,IAAMS,QAAQ,GAAG,IAAId,mBAAmB,CAACF,iBAAiB,EAAEY,QAAQ,EAAE,QAAQ,CAAC;AAC/E,OAAO,IAAMK,OAAO,GAAG,IAAIhB,WAAW,CAACe,QAAQ,CAAC;AAEhD,OAAO,IAAME,OAAO,GAAG,OAAO;AAM9B,OAAO,IAAMC,UAAU,GAAGA,CAAA,KAAmB;EAC3C,IAAMC,QAAQ,GAAG,eAAe;EAChC,IAAMC,QAAQ,GAAGd,QAAQ,CAAC,OAAO,CAAC;EAClC,IAAMe,QAAQ,MAAAC,MAAA,CAAMF,QAAQ,EAAAE,MAAA,CAAGH,QAAQ,CAAE;EACzC,IAAMI,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAAC3B,EAAE,CAAC4B,YAAY,CAACL,QAAQ,EAAE,OAAO,CAAC,CAAC;EAC/D,OAAO;IACLE;EACF,CAAC;AACH,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_GlobalStore","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Theme","_QuickEmbed"],"sources":["../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './GlobalStore'\nexport * from './Theme'\nexport * from './QuickEmbed'\n"],"mappings":";;;;;AAyBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,YAAA,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;AACA,IAAAM,WAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,WAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,WAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,WAAA,CAAAN,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_GlobalStore","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Theme","_QuickEmbed"],"sources":["../src/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './GlobalStore';\nexport * from './Theme';\nexport * from './QuickEmbed';\n"],"mappings":";;;;;AAyBA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,YAAA,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;AACA,IAAAM,WAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,WAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,WAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,WAAA,CAAAN,GAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_utils","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_store"],"sources":["../../src/test-utils/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 './utils'\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":["_utils","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_store"],"sources":["../../src/test-utils/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 './utils';\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,9 +1,9 @@
1
- import type { RootState, FactoryState } from '../GlobalStore';
1
+ import type { FactoryState, RootState } from '../GlobalStore';
2
2
  import type { ThemesState } from '../Theme';
3
- declare type DeepPartial<T> = {
3
+ type DeepPartial<T> = {
4
4
  [P in keyof T]?: DeepPartial<T[P]>;
5
5
  };
6
- export declare const createTestStore: (overrides?: DeepPartial<RootState> | undefined) => import("@looker/redux").Store<{
6
+ export declare const createTestStore: (overrides?: DeepPartial<RootState>) => import("@looker/redux").Store<{
7
7
  factory: FactoryState;
8
8
  themes: ThemesState;
9
9
  }, import("redux").AnyAction>;
@@ -7,11 +7,11 @@ exports.createTestStore = void 0;
7
7
  var _redux = require("@looker/redux");
8
8
  var _GlobalStore = require("../GlobalStore");
9
9
  var _Theme = require("../Theme");
10
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
14
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
14
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  var createTestStore = overrides => (0, _redux.createStore)({
16
16
  preloadedState: {
17
17
  factory: _objectSpread(_objectSpread({}, _GlobalStore.defaultFactoryState), overrides === null || overrides === void 0 ? void 0 : overrides.factory),
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":["_redux","require","_GlobalStore","_Theme","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","createTestStore","overrides","createStore","preloadedState","factory","defaultFactoryState","themes","defaultThemesState","reducer","factorySlice","themesSlice","exports"],"sources":["../../src/test-utils/store.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 { createStore } from '@looker/redux'\nimport { factorySlice, defaultFactoryState } from '../GlobalStore'\nimport type { RootState, FactoryState } from '../GlobalStore'\nimport { themesSlice, defaultThemesState } from '../Theme'\nimport type { ThemesState } from '../Theme'\n\ntype DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>\n}\n\nexport const createTestStore = (overrides?: DeepPartial<RootState>) =>\n createStore({\n preloadedState: {\n factory: {\n ...defaultFactoryState,\n ...overrides?.factory,\n } as FactoryState,\n themes: { ...defaultThemesState, ...overrides?.themes } as ThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n })\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA0D,SAAAG,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,IAAAC,eAAA,CAAAP,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,GAAA,SAAAhB,MAAA,C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;IACjBE,MAAM,EAAApC,aAAA,CAAAA,aAAA,KAAOqC,yBAAkB,GAAKN,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEK,MAAM;EACvD,CAAC;EACDE,OAAO,EAAE;IACPJ,OAAO,EAAEK,yBAAY,CAACD,OAAO;IAC7BF,MAAM,EAAEI,kBAAW,CAACF;EACtB;AACF,CAAC,CAAC;AAAAG,OAAA,CAAAX,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"file":"store.js","names":["_redux","require","_GlobalStore","_Theme","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","i","_toPrimitive","String","Symbol","toPrimitive","call","TypeError","Number","createTestStore","overrides","createStore","preloadedState","factory","defaultFactoryState","themes","defaultThemesState","reducer","factorySlice","themesSlice","exports"],"sources":["../../src/test-utils/store.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 { createStore } from '@looker/redux';\nimport { defaultFactoryState, factorySlice } from '../GlobalStore';\nimport type { FactoryState, RootState } from '../GlobalStore';\nimport { defaultThemesState, themesSlice } from '../Theme';\nimport type { ThemesState } from '../Theme';\n\ntype DeepPartial<T> = {\n [P in keyof T]?: DeepPartial<T[P]>;\n};\n\nexport const createTestStore = (overrides?: DeepPartial<RootState>) =>\n createStore({\n preloadedState: {\n factory: {\n ...defaultFactoryState,\n ...overrides?.factory,\n } as FactoryState,\n themes: { ...defaultThemesState, ...overrides?.themes } as ThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n });\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA2D,SAAAG,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eA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