@looker/embed-components 26.6.1 → 26.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/lib/GlobalStore/index.js.map +1 -1
  3. package/lib/GlobalStore/sagas.js.map +1 -1
  4. package/lib/GlobalStore/slice.js.map +1 -1
  5. package/lib/GlobalStore/store.js.map +1 -1
  6. package/lib/QuickEmbed/QuickEmbed.js +1 -2
  7. package/lib/QuickEmbed/QuickEmbed.js.map +1 -1
  8. package/lib/QuickEmbed/index.js.map +1 -1
  9. package/lib/Theme/SelectTheme.js +1 -2
  10. package/lib/Theme/SelectTheme.js.map +1 -1
  11. package/lib/Theme/index.js.map +1 -1
  12. package/lib/Theme/state/index.js.map +1 -1
  13. package/lib/Theme/state/sagas.js.map +1 -1
  14. package/lib/Theme/state/slice.js.map +1 -1
  15. package/lib/esm/GlobalStore/index.js.map +1 -1
  16. package/lib/esm/GlobalStore/sagas.js.map +1 -1
  17. package/lib/esm/GlobalStore/slice.js.map +1 -1
  18. package/lib/esm/GlobalStore/store.js.map +1 -1
  19. package/lib/esm/QuickEmbed/QuickEmbed.js.map +1 -1
  20. package/lib/esm/QuickEmbed/index.js.map +1 -1
  21. package/lib/esm/Theme/SelectTheme.js.map +1 -1
  22. package/lib/esm/Theme/index.js.map +1 -1
  23. package/lib/esm/Theme/state/index.js.map +1 -1
  24. package/lib/esm/Theme/state/sagas.js.map +1 -1
  25. package/lib/esm/Theme/state/slice.js.map +1 -1
  26. package/lib/esm/index.js.map +1 -1
  27. package/lib/esm/test-utils/index.js.map +1 -1
  28. package/lib/esm/test-utils/store.js +2 -2
  29. package/lib/esm/test-utils/store.js.map +1 -1
  30. package/lib/esm/test-utils/utils.js.map +1 -1
  31. package/lib/index.js.map +1 -1
  32. package/lib/test-utils/index.js.map +1 -1
  33. package/lib/test-utils/store.js +2 -2
  34. package/lib/test-utils/store.js.map +1 -1
  35. package/lib/test-utils/utils.js +2 -3
  36. package/lib/test-utils/utils.js.map +1 -1
  37. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## [26.10.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v26.8.0...embed-components-v26.10.0) (2026-06-08)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **embed-components:** Synchronize undefined versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @looker/embed-services bumped from 26.8.0 to 26.10.0
16
+ * @looker/sdk bumped from 26.8.0 to 26.10.0
17
+ * devDependencies
18
+ * @looker/sdk-node bumped from 26.8.0 to 26.10.0
19
+
20
+ ## [26.8.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v26.6.1...embed-components-v26.8.0) (2026-05-11)
21
+
22
+
23
+ ### Miscellaneous Chores
24
+
25
+ * **embed-components:** Synchronize undefined versions
26
+
27
+
28
+ ### Dependencies
29
+
30
+ * The following workspace dependencies were updated
31
+ * dependencies
32
+ * @looker/embed-services bumped from 26.6.1 to 26.8.0
33
+ * @looker/sdk bumped from 26.6.1 to 26.8.0
34
+ * devDependencies
35
+ * @looker/sdk-node bumped from 26.6.1 to 26.8.0
36
+
3
37
  ## [26.6.1](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v26.6.0...embed-components-v26.6.1) (2026-03-25)
4
38
 
5
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_slice","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_store"],"sources":["../../src/GlobalStore/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './slice';\nexport * from './store';\n"],"mappings":";;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_slice","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_store"],"sources":["../../src/GlobalStore/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './slice';\nexport * from './store';\n"],"mappings":";;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","action","initFactorySuccessAction","setFailureAction","factoryActions","createFactory","payload","sdk","put","error","message","saga","initFactoryAction","takeEvery"],"sources":["../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { 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,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,UAAUG,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGC,qBAAc;EACrE,IAAI;IACF,IAAAC,4BAAa,EAACJ,MAAM,CAACK,OAAO,CAACC,GAAG,CAAC;IACjC,OAAO,IAAAC,mBAAG,EAACN,wBAAwB,CAAC,CAAC,CAAC;EACxC,CAAC,CAAC,OAAOO,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACL,gBAAgB,CAAC;MAAEM,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAEO,UAAUC,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC;EAAkB,CAAC,GAAGR,qBAAc;EAC5C,OAAO,IAAAS,yBAAS,EAACD,iBAAiB,EAAEZ,QAAQ,CAAC;AAC/C"}
1
+ {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","action","initFactorySuccessAction","setFailureAction","factoryActions","createFactory","payload","sdk","put","error","message","saga","initFactoryAction","takeEvery"],"sources":["../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { 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,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,UAAUG,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGC,qBAAc;EACrE,IAAI;IACF,IAAAC,4BAAa,EAACJ,MAAM,CAACK,OAAO,CAACC,GAAG,CAAC;IACjC,OAAO,IAAAC,mBAAG,EAACN,wBAAwB,CAAC,CAAC,CAAC;EACxC,CAAC,CAAC,OAAOO,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACL,gBAAgB,CAAC;MAAEM,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAEO,UAAUC,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC;EAAkB,CAAC,GAAGR,qBAAc;EAC5C,OAAO,IAAAS,yBAAS,EAACD,iBAAiB,EAAEZ,QAAQ,CAAC;AAC/C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":["_toolkit","require","_redux","_sagas","defaultFactoryState","exports","initialized","FACTORY_SLICE_NAME","factorySlice","createSlice","name","initialState","reducers","initFactoryAction","_state","_action","initFactorySuccessAction","state","destroyFactoryAction","setFailureAction","action","error","payload","factoryActions","actions","useActions","useFactoryActions","useStoreState","useFactoryStoreState","createSliceHooks","saga"],"sources":["../../src/GlobalStore/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit';\nimport { createSliceHooks } from '@looker/redux';\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { saga } from './sagas';\n\nexport interface FactoryState {\n initialized: boolean;\n error?: string;\n}\n\nexport const defaultFactoryState: FactoryState = {\n initialized: false,\n};\n\nexport interface InitFactoryAction {\n sdk: IAPIMethods;\n}\n\ntype SetFailureAction = Record<'error', string>;\n\nexport const FACTORY_SLICE_NAME = 'factory';\n\nexport const factorySlice = createSlice({\n name: FACTORY_SLICE_NAME,\n initialState: defaultFactoryState,\n reducers: {\n initFactoryAction(_state, _action: PayloadAction<InitFactoryAction>) {\n // noop\n },\n initFactorySuccessAction(state) {\n state.initialized = true;\n },\n destroyFactoryAction() {\n // noop\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error;\n },\n },\n});\n\nexport const factoryActions = factorySlice.actions;\nexport const {\n useActions: useFactoryActions,\n useStoreState: useFactoryStoreState,\n} = createSliceHooks(factorySlice, saga);\n"],"mappings":";;;;;;AAyBA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAOO,IAAMG,mBAAiC,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EAC/CE,WAAW,EAAE;AACf,CAAC;AAQM,IAAMC,kBAAkB,GAAAF,OAAA,CAAAE,kBAAA,GAAG,SAAS;AAEpC,IAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAG,IAAAC,oBAAW,EAAC;EACtCC,IAAI,EAAEH,kBAAkB;EACxBI,YAAY,EAAEP,mBAAmB;EACjCQ,QAAQ,EAAE;IACRC,iBAAiBA,CAACC,MAAM,EAAEC,OAAyC,EAAE,CAErE,CAAC;IACDC,wBAAwBA,CAACC,KAAK,EAAE;MAC9BA,KAAK,CAACX,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDY,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;AAEK,IAAME,cAAc,GAAAlB,OAAA,CAAAkB,cAAA,GAAGf,YAAY,CAACgB,OAAO;AAC3C,IAAM;EACXC,UAAU,EAAEC,iBAAiB;EAC7BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACrB,YAAY,EAAEsB,WAAI,CAAC;AAACzB,OAAA,CAAAuB,oBAAA,GAAAA,oBAAA;AAAAvB,OAAA,CAAAqB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"slice.js","names":["_toolkit","require","_redux","_sagas","defaultFactoryState","exports","initialized","FACTORY_SLICE_NAME","factorySlice","createSlice","name","initialState","reducers","initFactoryAction","_state","_action","initFactorySuccessAction","state","destroyFactoryAction","setFailureAction","action","error","payload","factoryActions","actions","useActions","useFactoryActions","useStoreState","useFactoryStoreState","createSliceHooks","saga"],"sources":["../../src/GlobalStore/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit';\nimport { createSliceHooks } from '@looker/redux';\nimport type { IAPIMethods } from '@looker/sdk-rtl';\nimport type { PayloadAction } from '@reduxjs/toolkit';\nimport { saga } from './sagas';\n\nexport interface FactoryState {\n initialized: boolean;\n error?: string;\n}\n\nexport const defaultFactoryState: FactoryState = {\n initialized: false,\n};\n\nexport interface InitFactoryAction {\n sdk: IAPIMethods;\n}\n\ntype SetFailureAction = Record<'error', string>;\n\nexport const FACTORY_SLICE_NAME = 'factory';\n\nexport const factorySlice = createSlice({\n name: FACTORY_SLICE_NAME,\n initialState: defaultFactoryState,\n reducers: {\n initFactoryAction(_state, _action: PayloadAction<InitFactoryAction>) {\n // noop\n },\n initFactorySuccessAction(state) {\n state.initialized = true;\n },\n destroyFactoryAction() {\n // noop\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error;\n },\n },\n});\n\nexport const factoryActions = factorySlice.actions;\nexport const {\n useActions: useFactoryActions,\n useStoreState: useFactoryStoreState,\n} = createSliceHooks(factorySlice, saga);\n"],"mappings":";;;;;;AAyBA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAOO,IAAMG,mBAAiC,GAAAC,OAAA,CAAAD,mBAAA,GAAG;EAC/CE,WAAW,EAAE;AACf,CAAC;AAQM,IAAMC,kBAAkB,GAAAF,OAAA,CAAAE,kBAAA,GAAG,SAAS;AAEpC,IAAMC,YAAY,GAAAH,OAAA,CAAAG,YAAA,GAAG,IAAAC,oBAAW,EAAC;EACtCC,IAAI,EAAEH,kBAAkB;EACxBI,YAAY,EAAEP,mBAAmB;EACjCQ,QAAQ,EAAE;IACRC,iBAAiBA,CAACC,MAAM,EAAEC,OAAyC,EAAE,CAErE,CAAC;IACDC,wBAAwBA,CAACC,KAAK,EAAE;MAC9BA,KAAK,CAACX,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDY,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;AAEK,IAAME,cAAc,GAAAlB,OAAA,CAAAkB,cAAA,GAAGf,YAAY,CAACgB,OAAO;AAC3C,IAAM;EACXC,UAAU,EAAEC,iBAAiB;EAC7BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACrB,YAAY,EAAEsB,WAAI,CAAC;AAACzB,OAAA,CAAAuB,oBAAA,GAAAA,oBAAA;AAAAvB,OAAA,CAAAqB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":["_redux","require","_Theme","_slice","store","exports","createStore","preloadedState","factory","defaultFactoryState","themes","defaultThemesState","reducer","factorySlice","themesSlice"],"sources":["../../src/GlobalStore/store.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux';\nimport { defaultThemesState, themesSlice } from '../Theme';\nimport type { ThemesState } from '../Theme';\nimport { defaultFactoryState, factorySlice } from './slice';\nimport type { FactoryState } from './slice';\n\nexport const store = createStore({\n preloadedState: {\n factory: defaultFactoryState,\n themes: defaultThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n});\n\nexport interface RootState {\n factory: FactoryState;\n themes?: ThemesState;\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAGO,IAAMG,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,kBAAW,EAAC;EAC/BC,cAAc,EAAE;IACdC,OAAO,EAAEC,0BAAmB;IAC5BC,MAAM,EAAEC;EACV,CAAC;EACDC,OAAO,EAAE;IACPJ,OAAO,EAAEK,mBAAY,CAACD,OAAO;IAC7BF,MAAM,EAAEI,kBAAW,CAACF;EACtB;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"store.js","names":["_redux","require","_Theme","_slice","store","exports","createStore","preloadedState","factory","defaultFactoryState","themes","defaultThemesState","reducer","factorySlice","themesSlice"],"sources":["../../src/GlobalStore/store.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux';\nimport { defaultThemesState, themesSlice } from '../Theme';\nimport type { ThemesState } from '../Theme';\nimport { defaultFactoryState, factorySlice } from './slice';\nimport type { FactoryState } from './slice';\n\nexport const store = createStore({\n preloadedState: {\n factory: defaultFactoryState,\n themes: defaultThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n});\n\nexport interface RootState {\n factory: FactoryState;\n themes?: ThemesState;\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAGO,IAAMG,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,kBAAW,EAAC;EAC/BC,cAAc,EAAE;IACdC,OAAO,EAAEC,0BAAmB;IAC5BC,MAAM,EAAEC;EACV,CAAC;EACDC,OAAO,EAAE;IACPJ,OAAO,EAAEK,mBAAY,CAACD,OAAO;IAC7BF,MAAM,EAAEI,kBAAW,CAACF;EACtB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -9,8 +9,7 @@ var _components = require("@looker/components");
9
9
  var _materialOutlined = require("@styled-icons/material-outlined");
10
10
  var _embedServices = require("@looker/embed-services");
11
11
  var _Theme = require("../Theme");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
13
  var QuickEmbed = _ref => {
15
14
  var {
16
15
  onClose,
@@ -1 +1 @@
1
- {"version":3,"file":"QuickEmbed.js","names":["_react","_interopRequireWildcard","require","_components","_materialOutlined","_embedServices","_Theme","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","QuickEmbed","_ref","onClose","onCopy","service","EmbedUrl","toggleValue","setToggle","useState","embedUrl","setEmbedUrl","selectedTheme","useThemesStoreState","selectThemeAction","useThemeActions","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","key","useEffect","overrides","isThemable","name","newUrl","createElement","Section","padding","Heading","as","fontWeight","SpaceVertical","pt","pb","gap","Fragment","Span","fontSize","contentType","toLocaleLowerCase","SelectTheme","Label","htmlFor","InputText","id","iconBefore","Link","readOnly","value","Space","ToggleSwitch","onChange","on","mt","between","onClick","width","CopyToClipboard","content","ButtonOutline","Button","exports"],"sources":["../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react';\nimport {\n 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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA6E,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAc,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CA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,CACA,CAAC;AAEd,CAAC;AAAC6D,OAAA,CAAA/D,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"file":"QuickEmbed.js","names":["_react","_interopRequireWildcard","require","_components","_materialOutlined","_embedServices","_Theme","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","QuickEmbed","_ref","onClose","onCopy","service","EmbedUrl","toggleValue","setToggle","useState","embedUrl","setEmbedUrl","selectedTheme","useThemesStoreState","selectThemeAction","useThemeActions","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","key","useEffect","overrides","isThemable","name","newUrl","createElement","Section","padding","Heading","as","fontWeight","SpaceVertical","pt","pb","gap","Fragment","Span","fontSize","contentType","toLocaleLowerCase","SelectTheme","Label","htmlFor","InputText","id","iconBefore","Link","readOnly","value","Space","ToggleSwitch","onChange","on","mt","between","onClick","width","CopyToClipboard","content","ButtonOutline","Button","exports"],"sources":["../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react';\nimport {\n 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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA6E,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,wBAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CA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3E,MAAA,CAAAiB,OAAA,CAAAqC,aAAA,CAACnD,WAAA,CAAAsF,MAAM;IAACL,OAAO,EAAEvD;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC;AAAC6D,OAAA,CAAA/D,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_QuickEmbed","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../src/QuickEmbed/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './QuickEmbed';\n"],"mappings":";;;;;AAyBA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_QuickEmbed","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../src/QuickEmbed/index.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './QuickEmbed';\n"],"mappings":";;;;;AAyBA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -7,8 +7,7 @@ exports.SelectTheme = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _components = require("@looker/components");
9
9
  var _state = require("./state");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
11
  var SelectTheme = () => {
13
12
  var {
14
13
  initialized,
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTheme.js","names":["_react","_interopRequireWildcard","require","_components","_state","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","SelectTheme","initialized","themes","selectedTheme","error","working","useThemesStoreState","initAction","loadThemeDataAction","selectThemeAction","useThemeActions","options","setOptions","useState","useEffect","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","key","createElement","SpaceVertical","gap","Select","disabled","length","isLoading","validationType","undefined","onChange","ValidationMessage","type","message","exports"],"sources":["../../src/Theme/SelectTheme.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { 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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA+D,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CA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,EAAEC,CAAC,KAAKD,CAAC,CAACH,KAAK,CAAEK,aAAa,CAACD,CAAC,CAACJ,KAAM,CAAC,CAAC;IACnDR,UAAU,CAACG,YAAY,CAAC;EAC1B,CAAC,EAAE,CAACb,MAAM,CAAC,CAAC;EAEZ,IAAMwB,YAAY,GAAIC,GAAW,IAAK;IACpClB,iBAAiB,CAAC;MAAEkB;IAAI,CAAC,CAAC;EAC5B,CAAC;EAED,OACErD,MAAA,CAAAW,OAAA,CAAA2C,aAAA,CAACnD,WAAA,CAAAoD,aAAa;IAACC,GAAG,EAAC;EAAU,GAC3BxD,MAAA,CAAAW,OAAA,CAAA2C,aAAA,CAACnD,WAAA,CAAAsD,MAAM;IACLC,QAAQ,EAAE9B,MAAM,CAAC+B,MAAM,IAAI,CAAE;IAC7BC,SAAS,EAAE,CAACjC,WAAW,IAAII,OAAQ;IACnC8B,cAAc,EAAE/B,KAAK,GAAG,OAAO,GAAGgC,SAAU;IAC5ClB,KAAK,EAAEf,aAAa,CAACkB,IAAK;IAC1BV,OAAO,EAAEA,OAAQ;IACjB0B,QAAQ,EAAEX;EAAa,CACxB,CAAC,EACDtB,KAAK,IAAI9B,MAAA,CAAAW,OAAA,CAAA2C,aAAA,CAACnD,WAAA,CAAA6D,iBAAiB;IAACC,IAAI,EAAC,OAAO;IAACC,OAAO,EAAEpC;EAAM,CAAE,CAC9C,CAAC;AAEpB,CAAC;AAACqC,OAAA,CAAAzC,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"file":"SelectTheme.js","names":["_react","_interopRequireWildcard","require","_components","_state","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SelectTheme","initialized","themes","selectedTheme","error","working","useThemesStoreState","initAction","loadThemeDataAction","selectThemeAction","useThemeActions","options","setOptions","useState","useEffect","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","key","createElement","SpaceVertical","gap","Select","disabled","length","isLoading","validationType","undefined","onChange","ValidationMessage","type","message","exports"],"sources":["../../src/Theme/SelectTheme.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { 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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA+D,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,OAAAP,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAM,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AACC,GAAG,EAAC;EAAU,GAC3BvD,MAAA,CAAAe,OAAA,CAAAsC,aAAA,CAAClD,WAAA,CAAAqD,MAAM;IACLC,QAAQ,EAAE9B,MAAM,CAAC+B,MAAM,IAAI,CAAE;IAC7BC,SAAS,EAAE,CAACjC,WAAW,IAAII,OAAQ;IACnC8B,cAAc,EAAE/B,KAAK,GAAG,OAAO,GAAGgC,SAAU;IAC5ClB,KAAK,EAAEf,aAAa,CAACkB,IAAK;IAC1BV,OAAO,EAAEA,OAAQ;IACjB0B,QAAQ,EAAEX;EAAa,CACxB,CAAC,EACDtB,KAAK,IAAI7B,MAAA,CAAAe,OAAA,CAAAsC,aAAA,CAAClD,WAAA,CAAA4D,iBAAiB;IAACC,IAAI,EAAC,OAAO;IAACC,OAAO,EAAEpC;EAAM,CAAE,CAC9C,CAAC;AAEpB,CAAC;AAACqC,OAAA,CAAAzC,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_SelectTheme","require","_state","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"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,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_SelectTheme","require","_state","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"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,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_slice","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"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,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"}
1
+ {"version":3,"file":"index.js","names":["_slice","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"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,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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","initSuccessAction","setFailureAction","themeActions","registerThemeService","put","error","message","loadThemeDataSaga","loadThemeDataSuccessAction","_urlTheme","service","getThemeService","call","searchParams","EmbedUrl","urlThemeName","theme","urlTheme","find","themes","items","defaultTheme","selectedTheme","selectThemeSaga","action","selectThemeSuccessAction","_item","key","payload","item","indexedItems","concat","saga","initAction","loadThemeDataAction","selectThemeAction","takeEvery"],"sources":["../../../src/Theme/state/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { 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,IAAAA,eAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAMA,UAAUG,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGC,mBAAY;EAC5D,IAAI;IACF,IAAAC,mCAAoB,EAAC,CAAC;IACtB,OAAO,IAAAC,mBAAG,EAACJ,iBAAiB,CAAC,CAAC,CAAC;EACjC,CAAC,CAAC,OAAOK,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACH,gBAAgB,CAAC;MAAEI,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAKA,UAAUC,iBAAiBA,CAAA,EAAG;EAC5B,IAAM;IAAEC,0BAA0B;IAAEP;EAAiB,CAAC,GAAGC,mBAAY;EACrE,IAAI;IAAA,IAAAO,SAAA;IACF,IAAMC,OAAO,GAAG,IAAAC,8BAAe,EAAC,CAAC;IACjC,OAAO,IAAAC,oBAAI,EAAC,CAACF,OAAO,EAAE,MA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AAAI,KAAA,GAAEG,IAAI,cAAAH,KAAA,cAAAA,KAAA,GAAIhB,OAAO,CAACW;IAAc,CAAC,CAC3E,CAAC;EACH,CAAC,CAAC,OAAOhB,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EACRH,gBAAgB,CAAC;MACfI,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CACH,CAAC;EACH;AACF;AAEO,UAAU0B,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAGjC,mBAAY;EAC3E,OAAO,IAAAkC,yBAAS,EAACH,UAAU,EAAElC,QAAQ,CAAC;EACtC,OAAO,IAAAqC,yBAAS,EAACF,mBAAmB,EAAE3B,iBAAiB,CAAC;EACxD,OAAO,IAAA6B,yBAAS,EAACD,iBAAiB,EAAEZ,eAAe,CAAC;AACtD"}
1
+ {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","initSuccessAction","setFailureAction","themeActions","registerThemeService","put","error","message","loadThemeDataSaga","loadThemeDataSuccessAction","_urlTheme","service","getThemeService","call","searchParams","EmbedUrl","urlThemeName","theme","urlTheme","find","themes","items","defaultTheme","selectedTheme","selectThemeSaga","action","selectThemeSuccessAction","_item","key","payload","item","indexedItems","concat","saga","initAction","loadThemeDataAction","selectThemeAction","takeEvery"],"sources":["../../../src/Theme/state/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { 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,IAAAA,eAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAMA,UAAUG,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGC,mBAAY;EAC5D,IAAI;IACF,IAAAC,mCAAoB,EAAC,CAAC;IACtB,OAAO,IAAAC,mBAAG,EAACJ,iBAAiB,CAAC,CAAC,CAAC;EACjC,CAAC,CAAC,OAAOK,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACH,gBAAgB,CAAC;MAAEI,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAKA,UAAUC,iBAAiBA,CAAA,EAAG;EAC5B,IAAM;IAAEC,0BAA0B;IAAEP;EAAiB,CAAC,GAAGC,mBAAY;EACrE,IAAI;IAAA,IAAAO,SAAA;IACF,IAAMC,OAAO,GAAG,IAAAC,8BAAe,EAAC,CAAC;IACjC,OAAO,IAAAC,oBAAI,EAAC,CAACF,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9B,IAAMG,YAAY,GAAG,IAAIC,uBAAQ,CAAC,CAAC,CAACD,YAAY;IAChD,IAAME,YAAY,GAAGF,YAAY,CAACG,KAAK;IACvC,IAAIC,QAA4B;IAChC,IAAIF,YAAY,EAAE;MAChBE,QAAQ,G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,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CACH,CAAC;EACH;AACF;AAEO,UAAU0B,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAGjC,mBAAY;EAC3E,OAAO,IAAAkC,yBAAS,EAACH,UAAU,EAAElC,QAAQ,CAAC;EACtC,OAAO,IAAAqC,yBAAS,EAACF,mBAAmB,EAAE3B,iBAAiB,CAAC;EACxD,OAAO,IAAA6B,yBAAS,EAACD,iBAAiB,EAAEZ,eAAe,CAAC;AACtD","ignoreList":[]}
@@ -1 +1 @@
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,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAWO,IAAMG,kBAA+B,GAAAC,OAAA,CAAAD,kBAAA,GAAG;EAC7CE,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,CAAC,CAAW;EAC1BC,aAAa,EAAE,CAAC,CAAW;EAC3BC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE;AACX,CAAC;AAaM,IAAMC,iBAAiB,GAAAN,OAAA,CAAAM,iBAAA,GAAG,QAAQ;AAElC,IAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG,IAAAC,oBAAW,EAAC;EACrCC,IAAI,EAAEH,iBAAiB;EACvBI,YAAY,EAAEX,kBAAkB;EAChCY,QAAQ,EAAE;IACRC,UAAUA,CAAA,EAAG,CAEb,CAAC;IACDC,iBAAiBA,CAACC,KAAK,EAAE;MACvBA,KAAK,CAACb,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDc,mBAAmBA,CAACD,KAAK,EAAE;MACzBA,KAAK,CAACT,OAAO,GAAG,IAAI;IACtB,CAAC;IACDW,0BAA0BA,CACxBF,KAAK,EACLG,MAAiD,EACjD;MACAH,KAAK,CAACV,MAAM,GAAGa,MAAM,CAACC,OAAO,CAACd,MAAM;MACpCU,KAAK,CAACZ,YAAY,GAAGe,MAAM,CAACC,OAAO,CAAChB,YAAY;MAChDY,KAAK,CAACX,aAAa,GAAGc,MAAM,CAACC,OAAO,CAACf,aAAa;MAClDW,KAAK,CAACT,OAAO,GAAG,KAAK;IACvB,CAAC;IACDc,iBAAiBA,CAACL,KAAK,EAAEM,OAAyC,EAAE;MAClEN,KAAK,CAACT,OAAO,GAAG,IAAI;IACtB,CAAC;IACDgB,wBAAwBA,CACtBP,KAAK,EACLG,MAA+C,EAC/C;MACAH,KAAK,CAACX,aAAa,GAAGc,MAAM,CAACC,OAAO,CAACf,aAAa;MAClDW,KAAK,CAACT,OAAO,GAAG,KAAK;IACvB,CAAC;IACDiB,gBAAgBA,CAACR,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
+ {"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,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAWO,IAAMG,kBAA+B,GAAAC,OAAA,CAAAD,kBAAA,GAAG;EAC7CE,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,CAAC,CAAW;EAC1BC,aAAa,EAAE,CAAC,CAAW;EAC3BC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE;AACX,CAAC;AAaM,IAAMC,iBAAiB,GAAAN,OAAA,CAAAM,iBAAA,GAAG,QAAQ;AAElC,IAAMC,WAAW,GAAAP,OAAA,CAAAO,WAAA,GAAG,IAAAC,oBAAW,EAAC;EACrCC,IAAI,EAAEH,iBAAiB;EACvBI,YAAY,EAAEX,kBAAkB;EAChCY,QAAQ,EAAE;IACRC,UAAUA,CAAA,EAAG,CAEb,CAAC;IACDC,iBAAiBA,CAACC,KAAK,EAAE;MACvBA,KAAK,CAACb,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDc,mBAAmBA,CAACD,KAAK,EAAE;MACzBA,KAAK,CAACT,OAAO,GAAG,IAAI;IACtB,CAAC;IACDW,0BAA0BA,CACxBF,KAAK,EACLG,MAAiD,EACjD;MACAH,KAAK,CAACV,MAAM,GAAGa,MAAM,CAACC,OAAO,CAACd,MAAM;MACpCU,KAAK,CAACZ,YAAY,GAAGe,MAAM,CAACC,OAAO,CAAChB,YAAY;MAChDY,KAAK,CAACX,aAAa,GAAGc,MAAM,CAACC,OAAO,CAACf,aAAa;MAClDW,KAAK,CAACT,OAAO,GAAG,KAAK;IACvB,CAAC;IACDc,iBAAiBA,CAACL,KAAK,EAAEM,OAAyC,EAAE;MAClEN,KAAK,CAACT,OAAO,GAAG,IAAI;IACtB,CAAC;IACDgB,wBAAwBA,CACtBP,KAAK,EACLG,MAA+C,EAC/C;MACAH,KAAK,CAACX,aAAa,GAAGc,MAAM,CAACC,OAAO,CAACf,aAAa;MAClDW,KAAK,CAACT,OAAO,GAAG,KAAK;IACvB,CAAC;IACDiB,gBAAgBA,CAACR,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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -1 +1 @@
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
+ {"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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -1 +1 @@
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,IAAM,CAACwB,QAAQ,EAAEC,WAAW,CAAC,GAA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;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
+ {"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,IAAM,CAACwB,QAAQ,EAAEC,WAAW,CAAC,GAAGzB,QAAQ,CAASqB,OAAO,CAACG,QAAQ,CAAC,KAAK,CAAC,CAAC;EACzE,IAAM;IAAEE;EAAc,CAAC,GAAGV,mBAAmB,CAAC,CAAC;EAC/C,IAAM;IAAEW;EAAkB,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,OAAO,EAAExC;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -1 +1 @@
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,MAAM;IAAEC,aAAa;IAAEC,KAAK;IAAEC;EAAQ,CAAC,GAC1DN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ET;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,MAAM;IAAEC,aAAa;IAAEC,KAAK;IAAEC;EAAQ,CAAC,GAC1DN,mBAAmB,CAAC,CAAC;EACvB,IAAM;IAAEO,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAC1DV,eAAe,CAAC,CAAC;EACnB,IAAM,CAACW,OAAO,EAAEC,UAAU,CAAC,GAAGhB,QAAQ,CAAuB,EAAE,CAAC;EAEhED,SAAS,CAAC,MAAM;IAEda,UAAU,CAAC,CAAC;EACd,CAAC,EAAE,EAAE,CAAC;EAENb,SAAS,CAAC,MAAM;IACd,IAAIQ,WAAW,EAAE;MAEfM,mBAAmB,CAAC,CAAC;IACvB;EACF,CAAC,EAAE,CAACN,WAAW,CAAC,CAAC;EAEjBR,SAAS,CAAC,MAAM;IACd,IAAMkB,YAAkC,GAAGT,MAAM,CAC9CU,GAAG,CAACC,KAAK,KAAK;MACbC,KAAK,EAAED,KAAK,CAACE,EAAG;MAChBC,KAAK,EAAEH,KAAK,CAACI;IACf,CAAC,CAAC,CAAC,CACFC,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACH,KAAK,CAAEK,aAAa,CAACD,CAAC,CAACJ,KAAM,CAAC,CAAC;IACnDN,UAAU,CAACC,YAAY,CAAC;EAC1B,CAAC,EAAE,CAACT,MAAM,CAAC,CAAC;EAEZ,IAAMoB,YAAY,GAAIC,GAAW,IAAK;IACpCf,iBAAiB,CAAC;MAAEe;IAAI,CAAC,CAAC;EAC5B,CAAC;EAED,OACE/B,KAAA,CAAAgC,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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -1 +1 @@
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,CAAC,CAAC,CAAC;EACxD;AACF;AAKA,UAAUC,iBAAiBA,CAAA,EAAG;EAC5B,IAAM;IAAEC,0BAA0B;IAAEJ;EAAiB,CAAC,GAAGH,YAAY;EACrE,IAAI;IAAA,IAAAQ,SAAA;IACF,IAAMC,OAAO,GAAGX,eAAe,CAAC,CAAC;IACjC,OAAOJ,IAAI,CAAC,CAACe,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9B,IAAM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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
+ {"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,CAAC,CAAC,CAAC;EACxD;AACF;AAKA,UAAUC,iBAAiBA,CAAA,EAAG;EAC5B,IAAM;IAAEC,0BAA0B;IAAEJ;EAAiB,CAAC,GAAGH,YAAY;EACrE,IAAI;IAAA,IAAAQ,SAAA;IACF,IAAMC,OAAO,GAAGX,eAAe,CAAC,CAAC;IACjC,OAAOJ,IAAI,CAAC,CAACe,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9B,IAAMC,YAAY,GAAG,IAAIb,QAAQ,CAAC,CAAC,CAACa,YAAY;IAChD,IAAMC,YAAY,GAAGD,YAAY,CAACE,KAAK;IACvC,IAAIC,QAA4B;IAChC,IAAIF,YAAY,EAAE;MAChBE,QAAQ,GAAGJ,OAAO,CAACK,IAAI,CAAC,MAAM,EAAEH,YAAY,CAAC;IAC/C;IACA,OAAOhB,GAAG,CACRY,0BAA0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AAEC;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","ignoreList":[]}
@@ -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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AK;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+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AAC,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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -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","ignoreList":[]}
@@ -1,7 +1,7 @@
1
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
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
- 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(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
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
7
  import { defaultFactoryState, factorySlice } from '../GlobalStore';
@@ -1 +1 @@
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
+ {"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","ignoreList":[]}
@@ -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","ignoreList":[]}
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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
@@ -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","ignoreList":[]}
@@ -9,8 +9,8 @@ var _GlobalStore = require("../GlobalStore");
9
9
  var _Theme = require("../Theme");
10
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
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
- 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(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
12
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
13
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
14
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: {
@@ -1 +1 @@
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,GA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,SAAA,yEAAA/B,CAAA,GAAA2B,MAAA,GAAAK,MAAA,EAAA/B,CAAA;AAOpD,IAAMgC,eAAe,GAAIC,SAAkC,IAChE,IAAAC,kBAAW,EAAC;EACVC,cAAc,EAAE;IACdC,OAAO,EAAA1B,aAAA,CAAAA,aAAA,KACF2B,gCAAmB,GACnBJ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEG,OAAO,CACN;IACjBE,MAAM,EAAA5B,aAAA,CAAAA,aAAA,KAAO6B,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;AAACG,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","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","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;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AA,uCAAAuB,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAA5B,CAAA,GAAA6B,MAAA,GAAAC,MAAA,EAAA7B,CAAA;AAOpD,IAAM8B,eAAe,GAAIC,SAAkC,IAChE,IAAAC,kBAAW,EAAC;EACVC,cAAc,EAAE;IACdC,OAAO,EAAAxB,aAAA,CAAAA,aAAA,KACFyB,gCAAmB,GACnBJ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEG,OAAO,CACN;IACjBE,MAAM,EAAA1B,aAAA,CAAAA,aAAA,KAAO2B,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;AAACG,OAAA,CAAAX,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -8,9 +8,8 @@ var _path = _interopRequireDefault(require("path"));
8
8
  var fs = _interopRequireWildcard(require("fs"));
9
9
  var _sdk = require("@looker/sdk");
10
10
  var _sdkNode = require("@looker/sdk-node");
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
13
  var homeToRoost = '../../../../';
15
14
  var getRootPath = () => _path.default.join(__dirname, homeToRoost);
16
15
  exports.getRootPath = getRootPath;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["_path","_interopRequireDefault","require","fs","_interopRequireWildcard","_sdk","_sdkNode","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","homeToRoost","getRootPath","path","join","__dirname","exports","rootFile","fileName","arguments","length","undefined","localIni","process","env","LOOKERSDK_INI","settings","NodeSettingsIniFile","environmentPrefix","session","NodeSession","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,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,EAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAoE,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI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,QAAQA,CAAA;EAAA,IAAIC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,OAAKN,aAAI,CAACC,IAAI,CAACF,WAAW,CAAC,CAAC,EAAEM,QAAQ,CAAC;AAAA;AAC7E,IAAMI,QAAQ,GAAGC,OAAO,CAACC,GAAG,CAACC,aAAa,IAAIR,QAAQ,CAAC,YAAY,CAAC;AAEpE,IAAMS,QAAQ,GAAG,IAAIC,4BAAmB,CAACC,sBAAiB,EAAEN,QAAQ,EAAE,QAAQ,CAAC;AACxE,IAAMO,OAAO,GAAAb,OAAA,CAAAa,OAAA,GAAG,IAAIC,oBAAW,CAACJ,QAAQ,CAAC;AAEzC,IAAMK,OAAO,GAAAf,OAAA,CAAAe,OAAA,GAAG,OAAO;AAMvB,IAAMC,UAAU,GAAGA,CAAA,KAAmB;EAC3C,IAAMC,QAAQ,GAAG,eAAe;EAChC,IAAMC,QAAQ,GAAGjB,QAAQ,CAAC,OAAO,CAAC;EAClC,IAAMkB,QAAQ,MAAAC,MAAA,CAAMF,QAAQ,EAAAE,MAAA,CAAGH,QAAQ,CAAE;EACzC,IAAMI,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACtD,EAAE,CAACuD,YAAY,CAACL,QAAQ,EAAE,OAAO,CAAC,CAAC;EAC/D,OAAO;IACLE;EACF,CAAC;AACH,CAAC;AAACrB,OAAA,CAAAgB,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"file":"utils.js","names":["_path","_interopRequireDefault","require","fs","_interopRequireWildcard","_sdk","_sdkNode","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","homeToRoost","getRootPath","path","join","__dirname","exports","rootFile","fileName","arguments","length","undefined","localIni","process","env","LOOKERSDK_INI","settings","NodeSettingsIniFile","environmentPrefix","session","NodeSession","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 {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looker/embed-components",
3
- "version": "26.6.1",
3
+ "version": "26.10.0",
4
4
  "description": "Looker Embed Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -35,7 +35,7 @@
35
35
  "homepage": "https://github.com/looker-open-source/sdk-codegen/tree/master/packages/embed-components",
36
36
  "devDependencies": {
37
37
  "@looker/components-test-utils": "^1.5.27",
38
- "@looker/sdk-node": "26.6.1",
38
+ "@looker/sdk-node": "26.10.0",
39
39
  "@testing-library/jest-dom": "5.16.5",
40
40
  "@testing-library/react": "12.1.5",
41
41
  "@testing-library/user-event": "13.1.5",
@@ -45,9 +45,9 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@looker/components": "^5.0.3",
48
- "@looker/embed-services": "26.6.1",
48
+ "@looker/embed-services": "26.10.0",
49
49
  "@looker/redux": "^0.0.1",
50
- "@looker/sdk": "26.6.1",
50
+ "@looker/sdk": "26.10.0",
51
51
  "@looker/sdk-rtl": "21.6.5",
52
52
  "@reduxjs/toolkit": "^1.9.3",
53
53
  "@styled-icons/material-outlined": "^10.47.0",
@@ -61,5 +61,5 @@
61
61
  "Embed",
62
62
  "Embed Components"
63
63
  ],
64
- "gitHead": "77fc3b4d67ce3c1f12a0a0670f3d04f4b07d9d63"
64
+ "gitHead": "f6ce5284341b7a0da6651f8f8122e69e96e28acc"
65
65
  }