@looker/embed-components 23.20.1 → 24.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +84 -66
  2. package/lib/GlobalStore/index.js.map +1 -1
  3. package/lib/GlobalStore/sagas.js.map +1 -1
  4. package/lib/GlobalStore/slice.d.ts +1 -1
  5. package/lib/GlobalStore/slice.js +4 -8
  6. package/lib/GlobalStore/slice.js.map +1 -1
  7. package/lib/GlobalStore/store.js +1 -2
  8. package/lib/GlobalStore/store.js.map +1 -1
  9. package/lib/QuickEmbed/QuickEmbed.d.ts +2 -2
  10. package/lib/QuickEmbed/QuickEmbed.js +2 -2
  11. package/lib/QuickEmbed/QuickEmbed.js.map +1 -1
  12. package/lib/QuickEmbed/index.js.map +1 -1
  13. package/lib/Theme/SelectTheme.d.ts +2 -2
  14. package/lib/Theme/SelectTheme.js +2 -2
  15. package/lib/Theme/SelectTheme.js.map +1 -1
  16. package/lib/Theme/index.js.map +1 -1
  17. package/lib/Theme/state/index.js.map +1 -1
  18. package/lib/Theme/state/sagas.js.map +1 -1
  19. package/lib/Theme/state/slice.d.ts +4 -4
  20. package/lib/Theme/state/slice.js +4 -8
  21. package/lib/Theme/state/slice.js.map +1 -1
  22. package/lib/esm/GlobalStore/index.js.map +1 -1
  23. package/lib/esm/GlobalStore/sagas.js +1 -1
  24. package/lib/esm/GlobalStore/sagas.js.map +1 -1
  25. package/lib/esm/GlobalStore/slice.js.map +1 -1
  26. package/lib/esm/GlobalStore/store.js.map +1 -1
  27. package/lib/esm/QuickEmbed/QuickEmbed.js +2 -2
  28. package/lib/esm/QuickEmbed/QuickEmbed.js.map +1 -1
  29. package/lib/esm/QuickEmbed/index.js.map +1 -1
  30. package/lib/esm/Theme/SelectTheme.js +1 -1
  31. package/lib/esm/Theme/SelectTheme.js.map +1 -1
  32. package/lib/esm/Theme/index.js.map +1 -1
  33. package/lib/esm/Theme/state/index.js.map +1 -1
  34. package/lib/esm/Theme/state/sagas.js +2 -2
  35. package/lib/esm/Theme/state/sagas.js.map +1 -1
  36. package/lib/esm/Theme/state/slice.js.map +1 -1
  37. package/lib/esm/index.js.map +1 -1
  38. package/lib/esm/test-utils/index.js.map +1 -1
  39. package/lib/esm/test-utils/store.js +6 -6
  40. package/lib/esm/test-utils/store.js.map +1 -1
  41. package/lib/esm/test-utils/utils.js.map +1 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib/test-utils/index.js.map +1 -1
  44. package/lib/test-utils/store.d.ts +3 -3
  45. package/lib/test-utils/store.js +4 -4
  46. package/lib/test-utils/store.js.map +1 -1
  47. package/lib/test-utils/utils.js +5 -8
  48. package/lib/test-utils/utils.js.map +1 -1
  49. package/package.json +10 -9
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## [23.20.1](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.20.0...embed-components-v23.20.1) (2023-12-19)
3
+ ## [24.2.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v24.0.0...embed-components-v24.2.0) (2024-02-21)
4
4
 
5
5
 
6
6
  ### Miscellaneous Chores
@@ -12,12 +12,12 @@
12
12
 
13
13
  * The following workspace dependencies were updated
14
14
  * dependencies
15
- * @looker/embed-services bumped from 23.20.0 to 23.20.1
16
- * @looker/sdk bumped from 23.20.0 to 23.20.1
15
+ * @looker/embed-services bumped from 24.0.0 to 24.2.0
16
+ * @looker/sdk bumped from 24.0.0 to 24.2.0
17
17
  * devDependencies
18
- * @looker/sdk-node bumped from 23.20.0 to 23.20.1
18
+ * @looker/sdk-node bumped from 24.0.0 to 24.2.0
19
19
 
20
- ## [23.20.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.18.0...embed-components-v23.20.0) (2023-11-30)
20
+ ## [24.0.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.20.1...embed-components-v24.0.0) (2024-02-03)
21
21
 
22
22
 
23
23
  ### Miscellaneous Chores
@@ -29,114 +29,132 @@
29
29
 
30
30
  * The following workspace dependencies were updated
31
31
  * dependencies
32
- * @looker/embed-services bumped from 23.18.0 to 23.20.0
33
- * @looker/sdk bumped from 23.18.0 to 23.20.0
32
+ * @looker/embed-services bumped from 23.20.1 to 24.0.0
33
+ * @looker/sdk bumped from 23.20.1 to 24.0.0
34
34
  * devDependencies
35
- * @looker/sdk-node bumped from 23.18.0 to 23.20.0
35
+ * @looker/sdk-node bumped from 23.20.1 to 24.0.0
36
36
 
37
- ## [23.18.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.16.0...embed-components-v23.18.0) (2023-11-22)
37
+ ## [23.20.1](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.20.0...embed-components-v23.20.1) (2023-12-19)
38
38
 
39
+ ### Miscellaneous Chores
40
+
41
+ - **embed-components:** Synchronize undefined versions
42
+
43
+ ### Dependencies
44
+
45
+ - The following workspace dependencies were updated
46
+ - dependencies
47
+ - @looker/embed-services bumped from 23.20.0 to 23.20.1
48
+ - @looker/sdk bumped from 23.20.0 to 23.20.1
49
+ - devDependencies
50
+ - @looker/sdk-node bumped from 23.20.0 to 23.20.1
51
+
52
+ ## [23.20.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.18.0...embed-components-v23.20.0) (2023-11-30)
39
53
 
40
54
  ### Miscellaneous Chores
41
55
 
42
- * **embed-components:** Synchronize undefined versions
56
+ - **embed-components:** Synchronize undefined versions
43
57
 
58
+ ### Dependencies
59
+
60
+ - The following workspace dependencies were updated
61
+ - dependencies
62
+ - @looker/embed-services bumped from 23.18.0 to 23.20.0
63
+ - @looker/sdk bumped from 23.18.0 to 23.20.0
64
+ - devDependencies
65
+ - @looker/sdk-node bumped from 23.18.0 to 23.20.0
66
+
67
+ ## [23.18.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.16.0...embed-components-v23.18.0) (2023-11-22)
68
+
69
+ ### Miscellaneous Chores
70
+
71
+ - **embed-components:** Synchronize undefined versions
44
72
 
45
73
  ### Dependencies
46
74
 
47
- * The following workspace dependencies were updated
48
- * dependencies
49
- * @looker/embed-services bumped from 23.16.0 to 23.18.0
50
- * @looker/sdk bumped from 23.16.0 to 23.18.0
51
- * devDependencies
52
- * @looker/sdk-node bumped from 23.16.0 to 23.18.0
75
+ - The following workspace dependencies were updated
76
+ - dependencies
77
+ - @looker/embed-services bumped from 23.16.0 to 23.18.0
78
+ - @looker/sdk bumped from 23.16.0 to 23.18.0
79
+ - devDependencies
80
+ - @looker/sdk-node bumped from 23.16.0 to 23.18.0
53
81
 
54
82
  ## [23.16.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.14.1...embed-components-v23.16.0) (2023-09-21)
55
83
 
56
-
57
84
  ### Miscellaneous Chores
58
85
 
59
- * **embed-components:** Synchronize undefined versions
60
-
86
+ - **embed-components:** Synchronize undefined versions
61
87
 
62
88
  ### Dependencies
63
89
 
64
- * The following workspace dependencies were updated
65
- * dependencies
66
- * @looker/embed-services bumped from 23.14.1 to 23.16.0
67
- * @looker/sdk bumped from 23.14.1 to 23.16.0
68
- * devDependencies
69
- * @looker/sdk-node bumped from 23.14.1 to 23.16.0
90
+ - The following workspace dependencies were updated
91
+ - dependencies
92
+ - @looker/embed-services bumped from 23.14.1 to 23.16.0
93
+ - @looker/sdk bumped from 23.14.1 to 23.16.0
94
+ - devDependencies
95
+ - @looker/sdk-node bumped from 23.14.1 to 23.16.0
70
96
 
71
97
  ## [23.14.1](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.12.0...embed-components-v23.14.1) (2023-08-15)
72
98
 
73
-
74
99
  ### Miscellaneous Chores
75
100
 
76
- * **embed-components:** Synchronize undefined versions
77
-
101
+ - **embed-components:** Synchronize undefined versions
78
102
 
79
103
  ### Dependencies
80
104
 
81
- * The following workspace dependencies were updated
82
- * dependencies
83
- * @looker/embed-services bumped from 23.12.0 to 23.14.1
84
- * @looker/sdk bumped from 23.12.0 to 23.14.1
85
- * devDependencies
86
- * @looker/sdk-node bumped from 23.12.0 to 23.14.1
105
+ - The following workspace dependencies were updated
106
+ - dependencies
107
+ - @looker/embed-services bumped from 23.12.0 to 23.14.1
108
+ - @looker/sdk bumped from 23.12.0 to 23.14.1
109
+ - devDependencies
110
+ - @looker/sdk-node bumped from 23.12.0 to 23.14.1
87
111
 
88
112
  ## [23.12.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.10.0...embed-components-v23.12.0) (2023-07-17)
89
113
 
90
-
91
114
  ### Miscellaneous Chores
92
115
 
93
- * **embed-components:** Synchronize undefined versions
94
-
116
+ - **embed-components:** Synchronize undefined versions
95
117
 
96
118
  ### Dependencies
97
119
 
98
- * The following workspace dependencies were updated
99
- * dependencies
100
- * @looker/embed-services bumped from 23.10.0 to 23.12.0
101
- * @looker/sdk bumped from 23.10.0 to 23.12.0
102
- * devDependencies
103
- * @looker/sdk-node bumped from 23.10.0 to 23.12.0
120
+ - The following workspace dependencies were updated
121
+ - dependencies
122
+ - @looker/embed-services bumped from 23.10.0 to 23.12.0
123
+ - @looker/sdk bumped from 23.10.0 to 23.12.0
124
+ - devDependencies
125
+ - @looker/sdk-node bumped from 23.10.0 to 23.12.0
104
126
 
105
127
  ## [23.10.0](https://github.com/looker-open-source/sdk-codegen/compare/embed-components-v23.8.1...embed-components-v23.10.0) (2023-06-15)
106
128
 
107
-
108
129
  ### Features
109
130
 
110
- * change "Cancel" to "Close" in QuickEmbed component ([#1317](https://github.com/looker-open-source/sdk-codegen/issues/1317)) ([6eedf6f](https://github.com/looker-open-source/sdk-codegen/commit/6eedf6ffaf0e3487152bc283d925c86058cd9f59))
111
- * minor tweaks to embed-components and embed-services ([#1315](https://github.com/looker-open-source/sdk-codegen/issues/1315)) ([f3c5fc4](https://github.com/looker-open-source/sdk-codegen/commit/f3c5fc44a6161c0aab519527a4feb68e1f826bce))
112
-
131
+ - change "Cancel" to "Close" in QuickEmbed component ([#1317](https://github.com/looker-open-source/sdk-codegen/issues/1317)) ([6eedf6f](https://github.com/looker-open-source/sdk-codegen/commit/6eedf6ffaf0e3487152bc283d925c86058cd9f59))
132
+ - minor tweaks to embed-components and embed-services ([#1315](https://github.com/looker-open-source/sdk-codegen/issues/1315)) ([f3c5fc4](https://github.com/looker-open-source/sdk-codegen/commit/f3c5fc44a6161c0aab519527a4feb68e1f826bce))
113
133
 
114
134
  ### Dependencies
115
135
 
116
- * The following workspace dependencies were updated
117
- * dependencies
118
- * @looker/embed-services bumped from * to 23.10.0
119
- * @looker/sdk bumped from * to 23.10.0
120
- * @looker/sdk-rtl bumped from * to 21.6.1
121
- * devDependencies
122
- * @looker/sdk-node bumped from * to 23.10.0
136
+ - The following workspace dependencies were updated
137
+ - dependencies
138
+ - @looker/embed-services bumped from \* to 23.10.0
139
+ - @looker/sdk bumped from \* to 23.10.0
140
+ - @looker/sdk-rtl bumped from \* to 21.6.1
141
+ - devDependencies
142
+ - @looker/sdk-node bumped from \* to 23.10.0
123
143
 
124
144
  ## 23.8.1 (2023-05-11)
125
145
 
126
-
127
146
  ### Features
128
147
 
129
- * embed playground ([#1280](https://github.com/looker-open-source/sdk-codegen/issues/1280)) ([28f1218](https://github.com/looker-open-source/sdk-codegen/commit/28f121830f116da59b7f1cd248433c15c98cc56e))
130
- * QuickEmbed component ([#1306](https://github.com/looker-open-source/sdk-codegen/issues/1306)) ([4c78712](https://github.com/looker-open-source/sdk-codegen/commit/4c78712d44fb32dbdc0690a6121bc35086dec44a))
131
- * replace @looker/redux for with npm dependency ([#1307](https://github.com/looker-open-source/sdk-codegen/issues/1307)) ([baa58db](https://github.com/looker-open-source/sdk-codegen/commit/baa58db1bce9d974384c63a0e11301f38774a7b2))
132
- * SelectTheme component ([#1300](https://github.com/looker-open-source/sdk-codegen/issues/1300)) ([95c0da6](https://github.com/looker-open-source/sdk-codegen/commit/95c0da628d1d22fae2c6968f988047bfacc5fd01))
133
-
148
+ - embed playground ([#1280](https://github.com/looker-open-source/sdk-codegen/issues/1280)) ([28f1218](https://github.com/looker-open-source/sdk-codegen/commit/28f121830f116da59b7f1cd248433c15c98cc56e))
149
+ - QuickEmbed component ([#1306](https://github.com/looker-open-source/sdk-codegen/issues/1306)) ([4c78712](https://github.com/looker-open-source/sdk-codegen/commit/4c78712d44fb32dbdc0690a6121bc35086dec44a))
150
+ - replace @looker/redux for with npm dependency ([#1307](https://github.com/looker-open-source/sdk-codegen/issues/1307)) ([baa58db](https://github.com/looker-open-source/sdk-codegen/commit/baa58db1bce9d974384c63a0e11301f38774a7b2))
151
+ - SelectTheme component ([#1300](https://github.com/looker-open-source/sdk-codegen/issues/1300)) ([95c0da6](https://github.com/looker-open-source/sdk-codegen/commit/95c0da628d1d22fae2c6968f988047bfacc5fd01))
134
152
 
135
153
  ### Dependencies
136
154
 
137
- * The following workspace dependencies were updated
138
- * dependencies
139
- * @looker/embed-services bumped from * to 23.8.1
140
- * @looker/sdk bumped from ^23.2.0 to ^23.8.1
141
- * devDependencies
142
- * @looker/sdk-node bumped from ^23.4.0 to ^23.8.1
155
+ - The following workspace dependencies were updated
156
+ - dependencies
157
+ - @looker/embed-services bumped from \* to 23.8.1
158
+ - @looker/sdk bumped from ^23.2.0 to ^23.8.1
159
+ - devDependencies
160
+ - @looker/sdk-node bumped from ^23.4.0 to ^23.8.1
@@ -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"}
@@ -1 +1 @@
1
- {"version":3,"file":"sagas.js","names":["_typedReduxSaga","require","_embedServices","_slice","initSaga","action","initFactorySuccessAction","setFailureAction","factoryActions","createFactory","payload","sdk","put","error","message","saga","initFactoryAction","takeEvery"],"sources":["../../src/GlobalStore/sagas.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { takeEvery, put } from 'typed-redux-saga'\nimport { createFactory } from '@looker/embed-services'\nimport type { PayloadAction } from '@reduxjs/toolkit'\n\nimport { factoryActions } from './slice'\nimport type { InitFactoryAction } from './slice'\n\nfunction* initSaga(action: PayloadAction<InitFactoryAction>) {\n const { initFactorySuccessAction, setFailureAction } = factoryActions\n try {\n createFactory(action.payload.sdk)\n yield* put(initFactorySuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\nexport function* saga() {\n const { initFactoryAction } = factoryActions\n yield* takeEvery(initFactoryAction, initSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAGA,UAAUG,QAAQA,CAACC,MAAwC,EAAE;EAC3D,IAAM;IAAEC,wBAAwB;IAAEC;EAAiB,CAAC,GAAGC,qBAAc;EACrE,IAAI;IACF,IAAAC,4BAAa,EAACJ,MAAM,CAACK,OAAO,CAACC,GAAG,CAAC;IACjC,OAAO,IAAAC,mBAAG,EAACN,wBAAwB,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"}
@@ -8,7 +8,7 @@ export declare const defaultFactoryState: FactoryState;
8
8
  export interface InitFactoryAction {
9
9
  sdk: IAPIMethods;
10
10
  }
11
- declare type SetFailureAction = Record<'error', string>;
11
+ type SetFailureAction = Record<'error', string>;
12
12
  export declare const FACTORY_SLICE_NAME = "factory";
13
13
  export declare const factorySlice: import("@reduxjs/toolkit").Slice<FactoryState, {
14
14
  initFactoryAction(_state: import("immer/dist/internal").WritableDraft<FactoryState>, _action: PayloadAction<InitFactoryAction>): void;
@@ -7,13 +7,11 @@ exports.useFactoryStoreState = exports.useFactoryActions = exports.factorySlice
7
7
  var _toolkit = require("@reduxjs/toolkit");
8
8
  var _redux = require("@looker/redux");
9
9
  var _sagas = require("./sagas");
10
- var defaultFactoryState = {
10
+ var defaultFactoryState = exports.defaultFactoryState = {
11
11
  initialized: false
12
12
  };
13
- exports.defaultFactoryState = defaultFactoryState;
14
- var FACTORY_SLICE_NAME = 'factory';
15
- exports.FACTORY_SLICE_NAME = FACTORY_SLICE_NAME;
16
- var factorySlice = (0, _toolkit.createSlice)({
13
+ var FACTORY_SLICE_NAME = exports.FACTORY_SLICE_NAME = 'factory';
14
+ var factorySlice = exports.factorySlice = (0, _toolkit.createSlice)({
17
15
  name: FACTORY_SLICE_NAME,
18
16
  initialState: defaultFactoryState,
19
17
  reducers: {
@@ -27,9 +25,7 @@ var factorySlice = (0, _toolkit.createSlice)({
27
25
  }
28
26
  }
29
27
  });
30
- exports.factorySlice = factorySlice;
31
- var factoryActions = factorySlice.actions;
32
- exports.factoryActions = factoryActions;
28
+ var factoryActions = exports.factoryActions = factorySlice.actions;
33
29
  var {
34
30
  useActions: useFactoryActions,
35
31
  useStoreState: useFactoryStoreState
@@ -1 +1 @@
1
- {"version":3,"file":"slice.js","names":["_toolkit","require","_redux","_sagas","defaultFactoryState","initialized","exports","FACTORY_SLICE_NAME","factorySlice","createSlice","name","initialState","reducers","initFactoryAction","_state","_action","initFactorySuccessAction","state","destroyFactoryAction","setFailureAction","action","error","payload","factoryActions","actions","useActions","useFactoryActions","useStoreState","useFactoryStoreState","createSliceHooks","saga"],"sources":["../../src/GlobalStore/slice.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { IAPIMethods } from '@looker/sdk-rtl'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { saga } from './sagas'\n\nexport interface FactoryState {\n initialized: boolean\n error?: string\n}\n\nexport const defaultFactoryState: FactoryState = {\n initialized: false,\n}\n\nexport interface InitFactoryAction {\n sdk: IAPIMethods\n}\n\ntype SetFailureAction = Record<'error', string>\n\nexport const FACTORY_SLICE_NAME = 'factory'\n\nexport const factorySlice = createSlice({\n name: FACTORY_SLICE_NAME,\n initialState: defaultFactoryState,\n reducers: {\n initFactoryAction(_state, _action: PayloadAction<InitFactoryAction>) {\n // noop\n },\n initFactorySuccessAction(state) {\n state.initialized = true\n },\n destroyFactoryAction() {\n // noop\n },\n setFailureAction(state, action: PayloadAction<SetFailureAction>) {\n state.error = action.payload.error\n },\n },\n})\n\nexport const factoryActions = factorySlice.actions\nexport const {\n useActions: useFactoryActions,\n useStoreState: useFactoryStoreState,\n} = createSliceHooks(factorySlice, saga)\n"],"mappings":";;;;;;AAyBA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,MAAA,GAAAF,OAAA;AAOO,IAAMG,mBAAiC,GAAG;EAC/CC,WAAW,EAAE;AACf,CAAC;AAAAC,OAAA,CAAAF,mBAAA,GAAAA,mBAAA;AAQM,IAAMG,kBAAkB,GAAG,SAAS;AAAAD,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEpC,IAAMC,YAAY,GAAG,IAAAC,oBAAW,EAAC;EACtCC,IAAI,EAAEH,kBAAkB;EACxBI,YAAY,EAAEP,mBAAmB;EACjCQ,QAAQ,EAAE;IACRC,iBAAiBA,CAACC,MAAM,EAAEC,OAAyC,EAAE,CAErE,CAAC;IACDC,wBAAwBA,CAACC,KAAK,EAAE;MAC9BA,KAAK,CAACZ,WAAW,GAAG,IAAI;IAC1B,CAAC;IACDa,oBAAoBA,CAAA,EAAG,CAEvB,CAAC;IACDC,gBAAgBA,CAACF,KAAK,EAAEG,MAAuC,EAAE;MAC/DH,KAAK,CAACI,KAAK,GAAGD,MAAM,CAACE,OAAO,CAACD,KAAK;IACpC;EACF;AACF,CAAC,CAAC;AAAAf,OAAA,CAAAE,YAAA,GAAAA,YAAA;AAEK,IAAMe,cAAc,GAAGf,YAAY,CAACgB,OAAO;AAAAlB,OAAA,CAAAiB,cAAA,GAAAA,cAAA;AAC3C,IAAM;EACXE,UAAU,EAAEC,iBAAiB;EAC7BC,aAAa,EAAEC;AACjB,CAAC,GAAG,IAAAC,uBAAgB,EAACrB,YAAY,EAAEsB,WAAI,CAAC;AAAAxB,OAAA,CAAAsB,oBAAA,GAAAA,oBAAA;AAAAtB,OAAA,CAAAoB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"slice.js","names":["_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"}
@@ -7,7 +7,7 @@ exports.store = void 0;
7
7
  var _redux = require("@looker/redux");
8
8
  var _Theme = require("../Theme");
9
9
  var _slice = require("./slice");
10
- var store = (0, _redux.createStore)({
10
+ var store = exports.store = (0, _redux.createStore)({
11
11
  preloadedState: {
12
12
  factory: _slice.defaultFactoryState,
13
13
  themes: _Theme.defaultThemesState
@@ -17,5 +17,4 @@ var store = (0, _redux.createStore)({
17
17
  themes: _Theme.themesSlice.reducer
18
18
  }
19
19
  });
20
- exports.store = store;
21
20
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","names":["_redux","require","_Theme","_slice","store","createStore","preloadedState","factory","defaultFactoryState","themes","defaultThemesState","reducer","factorySlice","themesSlice","exports"],"sources":["../../src/GlobalStore/store.ts"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux'\nimport { defaultThemesState, themesSlice } from '../Theme'\nimport type { ThemesState } from '../Theme'\nimport { defaultFactoryState, factorySlice } from './slice'\nimport type { FactoryState } from './slice'\n\nexport const store = createStore({\n preloadedState: {\n factory: defaultFactoryState,\n themes: defaultThemesState,\n },\n reducer: {\n factory: factorySlice.reducer,\n themes: themesSlice.reducer,\n },\n})\n\nexport interface RootState {\n factory: FactoryState\n themes?: ThemesState\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAGO,IAAMG,KAAK,GAAG,IAAAC,kBAAW,EAAC;EAC/BC,cAAc,EAAE;IACdC,OAAO,EAAEC,0BAAmB;IAC5BC,MAAM,EAAEC;EACV,CAAC;EACDC,OAAO,EAAE;IACPJ,OAAO,EAAEK,mBAAY,CAACD,OAAO;IAC7BF,MAAM,EAAEI,kBAAW,CAACF;EACtB;AACF,CAAC,CAAC;AAAAG,OAAA,CAAAV,KAAA,GAAAA,KAAA"}
1
+ {"version":3,"file":"store.js","names":["_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,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface QuickEmbedProps {
3
3
  onClose: () => void;
4
4
  onCopy?: () => void;
5
5
  }
6
- export declare const QuickEmbed: ({ onClose, onCopy }: QuickEmbedProps) => JSX.Element;
6
+ export declare const QuickEmbed: ({ onClose, onCopy }: QuickEmbedProps) => React.JSX.Element;
7
7
  export {};
@@ -9,8 +9,8 @@ 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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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; }
14
14
  var QuickEmbed = _ref => {
15
15
  var {
16
16
  onClose,
@@ -1 +1 @@
1
- {"version":3,"file":"QuickEmbed.js","names":["_react","_interopRequireWildcard","require","_components","_materialOutlined","_embedServices","_Theme","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","QuickEmbed","_ref","onClose","onCopy","service","EmbedUrl","toggleValue","setToggle","useState","embedUrl","setEmbedUrl","selectedTheme","useThemesStoreState","selectThemeAction","useThemeActions","handleCopy","handleToggle","newToggleValue","urlThemeName","searchParams","theme","useEffect","overrides","isThemable","name","newUrl","createElement","Section","padding","Heading","as","fontWeight","SpaceVertical","pt","pb","gap","Fragment","Span","fontSize","contentType","toLocaleLowerCase","SelectTheme","Label","htmlFor","InputText","id","iconBefore","Link","readOnly","value","Space","ToggleSwitch","onChange","on","mt","between","onClick","width","CopyToClipboard","content","ButtonOutline","Button","exports"],"sources":["../../src/QuickEmbed/QuickEmbed.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport React, { useEffect, useState } from 'react'\nimport {\n InputText,\n CopyToClipboard,\n Space,\n SpaceVertical,\n Button,\n Heading,\n Label,\n Span,\n Section,\n ButtonOutline,\n ToggleSwitch,\n} from '@looker/components'\nimport { Link } from '@styled-icons/material-outlined'\nimport { EmbedUrl } from '@looker/embed-services'\nimport { useThemesStoreState, SelectTheme, useThemeActions } from '../Theme'\n\ninterface QuickEmbedProps {\n /** A function triggered when close button is clicked. */\n onClose: () => void\n /**\n * An optional callback triggered when the copy button is clicked.\n * The copy to clipboard action is already handled\n */\n onCopy?: () => void\n}\n\nexport const QuickEmbed = ({ onClose, onCopy }: QuickEmbedProps) => {\n const service = new EmbedUrl()\n const [toggleValue, setToggle] = useState(false)\n const [embedUrl, setEmbedUrl] = useState<string>(service.embedUrl(false))\n const { selectedTheme } = useThemesStoreState()\n const { selectThemeAction } = useThemeActions()\n\n const handleCopy = () => {\n if (onCopy) {\n onCopy()\n }\n }\n\n const handleToggle = () => {\n const newToggleValue = !toggleValue\n if (newToggleValue) {\n // Change the selected theme if there's a theme param in the url\n const urlThemeName = service.searchParams.theme\n if (urlThemeName) {\n selectThemeAction({ key: urlThemeName })\n }\n }\n setToggle(newToggleValue)\n }\n\n useEffect(() => {\n let overrides\n if (service.isThemable) {\n overrides = { theme: selectedTheme.name }\n }\n const newUrl = service.embedUrl(toggleValue, overrides)\n setEmbedUrl(newUrl)\n }, [toggleValue, selectedTheme])\n\n return (\n <Section padding=\"large\">\n <Heading as=\"h3\" fontWeight=\"medium\">\n Get embed URL\n </Heading>\n\n <SpaceVertical pt=\"medium\" pb=\"medium\" gap=\"xsmall\">\n {service.isThemable && (\n <>\n <Span fontWeight=\"normal\" fontSize=\"xsmall\">\n Apply theme to {service.contentType.toLocaleLowerCase()} URL\n </Span>\n <SelectTheme />\n </>\n )}\n <>\n <Label htmlFor=\"embed-url\" fontWeight=\"normal\" fontSize=\"xsmall\">\n Embed URL\n </Label>\n <InputText\n id=\"embed-url\"\n iconBefore={<Link />}\n readOnly\n value={embedUrl}\n />\n </>\n </SpaceVertical>\n\n <Space gap=\"xxsmall\" fontWeight=\"normal\" fontSize=\"small\">\n <ToggleSwitch onChange={handleToggle} on={toggleValue} />\n Include current params in URL\n </Space>\n\n <Space mt=\"large\" between>\n <Space onClick={handleCopy} width=\"fit-content\">\n <CopyToClipboard content={embedUrl}>\n <ButtonOutline iconBefore={<Link />}>Copy Link</ButtonOutline>\n </CopyToClipboard>\n </Space>\n <Button onClick={onClose}>Close</Button>\n </Space>\n </Section>\n )\n}\n"],"mappings":";;;;;;AA0BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAaA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAA4E,SAAAK,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,S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,CAACpD,WAAA,CAAA4E,KAAK;IAACI,EAAE,EAAC,OAAO;IAACC,OAAO;EAAA,GACvBpF,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAA4E,KAAK;IAACM,OAAO,EAAEzC,UAAW;IAAC0C,KAAK,EAAC;EAAa,GAC7CtF,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAoF,eAAe;IAACC,OAAO,EAAElD;EAAS,GACjCtC,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAsF,aAAa;IAACd,UAAU,EAAE3E,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACnD,iBAAA,CAAAwE,IAAI,MAAE;EAAE,GAAC,WAAwB,CAC9C,CACZ,CAAC,EACR5E,MAAA,CAAAc,OAAA,CAAAyC,aAAA,CAACpD,WAAA,CAAAuF,MAAM;IAACL,OAAO,EAAEtD;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC;AAAA4D,OAAA,CAAA9D,UAAA,GAAAA,UAAA"}
1
+ {"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,GAAA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AAC,SAAS;IAACJ,UAAU,EAAC,QAAQ;IAACO,QAAQ,EAAC;EAAO,GACvDnE,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACpD,WAAA,CAAA6E,YAAY;IAACC,QAAQ,EAAErC,YAAa;IAACsC,EAAE,EAAEhD;EAAY,CAAE,CAAC,iCAEpD,CAAC,EAERlC,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACpD,WAAA,CAAA4E,KAAK;IAACI,EAAE,EAAC,OAAO;IAACC,OAAO;EAAA,GACvBpF,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACpD,WAAA,CAAA4E,KAAK;IAACM,OAAO,EAAE1C,UAAW;IAAC2C,KAAK,EAAC;EAAa,GAC7CtF,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACpD,WAAA,CAAAoF,eAAe;IAACC,OAAO,EAAEnD;EAAS,GACjCrC,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACpD,WAAA,CAAAsF,aAAa;IAACd,UAAU,EAAE3E,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACnD,iBAAA,CAAAwE,IAAI,MAAE;EAAE,GAAC,WAAwB,CAC9C,CACZ,CAAC,EACR5E,MAAA,CAAAa,OAAA,CAAA0C,aAAA,CAACpD,WAAA,CAAAuF,MAAM;IAACL,OAAO,EAAEvD;EAAQ,GAAC,OAAa,CAClC,CACA,CAAC;AAEd,CAAC;AAAC6D,OAAA,CAAA/D,UAAA,GAAAA,UAAA"}
@@ -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"}
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const SelectTheme: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const SelectTheme: () => React.JSX.Element;
@@ -7,8 +7,8 @@ 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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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; }
12
12
  var SelectTheme = () => {
13
13
  var {
14
14
  initialized,
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTheme.js","names":["_react","_interopRequireWildcard","require","_components","_state","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","SelectTheme","initialized","themes","selectedTheme","error","working","useThemesStoreState","initAction","loadThemeDataAction","selectThemeAction","useThemeActions","options","setOptions","useState","useEffect","themeOptions","map","theme","value","id","label","name","sort","x","y","localeCompare","handleChange","createElement","SpaceVertical","gap","Select","disabled","length","isLoading","validationType","undefined","onChange","ValidationMessage","type","message","exports"],"sources":["../../src/Theme/SelectTheme.tsx"],"sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2023 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport React, { useState, useEffect } from 'react'\nimport { Select, SpaceVertical, ValidationMessage } from '@looker/components'\nimport type { SelectOptionObject } from '@looker/components'\nimport { useThemeActions, useThemesStoreState } from './state'\n\nexport const SelectTheme = () => {\n const { initialized, themes, selectedTheme, error, working } =\n useThemesStoreState()\n const { initAction, loadThemeDataAction, selectThemeAction } =\n useThemeActions()\n const [options, setOptions] = useState<SelectOptionObject[]>([])\n\n useEffect(() => {\n /** initialize theme service */\n initAction()\n }, [])\n\n useEffect(() => {\n if (initialized) {\n /** If theme service is initialized, load all theme data */\n loadThemeDataAction()\n }\n }, [initialized])\n\n useEffect(() => {\n const themeOptions: SelectOptionObject[] = themes\n .map((theme) => ({\n value: theme.id!,\n label: theme.name,\n }))\n .sort((x, y) => x.label!.localeCompare(y.label!))\n setOptions(themeOptions)\n }, [themes])\n\n const handleChange = (key: string) => {\n selectThemeAction({ key })\n }\n\n return (\n <SpaceVertical gap=\"xxxsmall\">\n <Select\n disabled={themes.length <= 1}\n isLoading={!initialized || working}\n validationType={error ? 'error' : undefined}\n value={selectedTheme.name}\n options={options}\n onChange={handleChange}\n />\n {error && <ValidationMessage type=\"error\" message={error} />}\n </SpaceVertical>\n )\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AAA8D,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBA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CAAC;EAC1B,CAAC,EAAE,CAACb,MAAM,CAAC,CAAC;EAEZ,IAAMwB,YAAY,GAAIhC,GAAW,IAAK;IACpCe,iBAAiB,CAAC;MAAEf;IAAI,CAAC,CAAC;EAC5B,CAAC;EAED,OACErB,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACnD,WAAA,CAAAoD,aAAa;IAACC,GAAG,EAAC;EAAU,GAC3BxD,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACnD,WAAA,CAAAsD,MAAM;IACLC,QAAQ,EAAE7B,MAAM,CAAC8B,MAAM,IAAI,CAAE;IAC7BC,SAAS,EAAE,CAAChC,WAAW,IAAII,OAAQ;IACnC6B,cAAc,EAAE9B,KAAK,GAAG,OAAO,GAAG+B,SAAU;IAC5CjB,KAAK,EAAEf,aAAa,CAACkB,IAAK;IAC1BV,OAAO,EAAEA,OAAQ;IACjByB,QAAQ,EAAEV;EAAa,CACxB,CAAC,EACDtB,KAAK,IAAI/B,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACnD,WAAA,CAAA6D,iBAAiB;IAACC,IAAI,EAAC,OAAO;IAACC,OAAO,EAAEnC;EAAM,CAAE,CAC9C,CAAC;AAEpB,CAAC;AAAAoC,OAAA,CAAAxC,WAAA,GAAAA,WAAA"}
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,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,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CA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AW,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 +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"}
@@ -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"}
@@ -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 { takeEvery, put, call } from 'typed-redux-saga'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport type { ITheme } from '@looker/sdk'\nimport {\n registerThemeService,\n getThemeService,\n EmbedUrl,\n} from '@looker/embed-services'\nimport { themeActions } from './slice'\nimport type { SelectThemeAction } from './slice'\n\n/**\n * Registers theme service with factory\n */\nfunction* initSaga() {\n const { initSuccessAction, setFailureAction } = themeActions\n try {\n registerThemeService()\n yield* put(initSuccessAction())\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\n/**\n * Gets all themes, default and url themes, and sets the selected theme\n */\nfunction* loadThemeDataSaga() {\n const { loadThemeDataSuccessAction, setFailureAction } = themeActions\n try {\n const service = getThemeService()\n yield* call([service, 'load'])\n const searchParams = new EmbedUrl().searchParams\n const urlThemeName = searchParams.theme\n let urlTheme: ITheme | undefined\n if (urlThemeName) {\n urlTheme = service.find('name', urlThemeName)\n }\n yield* put(\n loadThemeDataSuccessAction({\n themes: service.items,\n defaultTheme: service.defaultTheme!,\n selectedTheme: (urlTheme ?? service.defaultTheme!)!,\n })\n )\n } catch (error: any) {\n yield* put(setFailureAction({ error: error.message }))\n }\n}\n\n/**\n * Sets the selected theme by id or name\n * @param action containing id or name of theme to select\n */\nfunction* selectThemeSaga(action: PayloadAction<SelectThemeAction>) {\n const { selectThemeSuccessAction, setFailureAction } = themeActions\n try {\n const service = getThemeService()\n yield* call([service, 'getAll'])\n const key = action.payload.key\n let item: ITheme | undefined = service.indexedItems[key]\n if (!item) {\n item = service.find(['id', 'name'], `^${key}$`)\n }\n yield* put(\n selectThemeSuccessAction({ selectedTheme: item ?? service.defaultTheme! })\n )\n } catch (error: any) {\n yield* put(\n setFailureAction({\n error: error.message,\n })\n )\n }\n}\n\nexport function* saga() {\n const { initAction, loadThemeDataAction, selectThemeAction } = themeActions\n yield* takeEvery(initAction, initSaga)\n yield* takeEvery(loadThemeDataAction, loadThemeDataSaga)\n yield* takeEvery(selectThemeAction, selectThemeSaga)\n}\n"],"mappings":";;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAMA,UAAUG,QAAQA,CAAA,EAAG;EACnB,IAAM;IAAEC,iBAAiB;IAAEC;EAAiB,CAAC,GAAGC,mBAAY;EAC5D,IAAI;IACF,IAAAC,mCAAoB,EAAC,CAAC;IACtB,OAAO,IAAAC,mBAAG,EAACJ,iBAAiB,CAAC,CAAC,CAAC;EACjC,CAAC,CAAC,OAAOK,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EAACH,gBAAgB,CAAC;MAAEI,KAAK,EAAEA,KAAK,CAACC;IAAQ,CAAC,CAAC,CAAC;EACxD;AACF;AAKA,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,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MAAEH,aAAa,GAAAI,KAAA,GAAEG,IAAI,cAAAH,KAAA,cAAAA,KAAA,GAAIhB,OAAO,CAACW;IAAc,CAAC,CAC3E,CAAC;EACH,CAAC,CAAC,OAAOhB,KAAU,EAAE;IACnB,OAAO,IAAAD,mBAAG,EACRH,gBAAgB,CAAC;MACfI,KAAK,EAAEA,KAAK,CAACC;IACf,CAAC,CACH,CAAC;EACH;AACF;AAEO,UAAU0B,IAAIA,CAAA,EAAG;EACtB,IAAM;IAAEC,UAAU;IAAEC,mBAAmB;IAAEC;EAAkB,CAAC,GAAGjC,mBAAY;EAC3E,OAAO,IAAAkC,yBAAS,EAACH,UAAU,EAAElC,QAAQ,CAAC;EACtC,OAAO,IAAAqC,yBAAS,EAACF,mBAAmB,EAAE3B,iBAAiB,CAAC;EACxD,OAAO,IAAA6B,yBAAS,EAACD,iBAAiB,EAAEZ,eAAe,CAAC;AACtD"}
1
+ {"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;M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gB,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"}
@@ -9,10 +9,10 @@ export interface ThemesState {
9
9
  working: boolean;
10
10
  }
11
11
  export declare const defaultThemesState: ThemesState;
12
- export declare type SelectThemeAction = Record<'key', string>;
13
- declare type SelectThemeSuccessAction = Pick<ThemesState, 'selectedTheme'>;
14
- declare type SetFailureAction = Record<'error', string>;
15
- declare type LoadThemeDataSuccessAction = Pick<ThemesState, 'defaultTheme' | 'themes' | 'selectedTheme'>;
12
+ export type SelectThemeAction = Record<'key', string>;
13
+ type SelectThemeSuccessAction = Pick<ThemesState, 'selectedTheme'>;
14
+ type SetFailureAction = Record<'error', string>;
15
+ type LoadThemeDataSuccessAction = Pick<ThemesState, 'defaultTheme' | 'themes' | 'selectedTheme'>;
16
16
  export declare const THEMES_SLICE_NAME = "themes";
17
17
  export declare const themesSlice: import("@reduxjs/toolkit").Slice<ThemesState, {
18
18
  initAction(): void;