@looker/api-explorer 0.9.22 → 0.9.24

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 (203) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/lib/ApiExplorer.d.ts +4 -39
  3. package/lib/ApiExplorer.js +23 -24
  4. package/lib/ApiExplorer.js.map +1 -1
  5. package/lib/App.d.ts +1 -0
  6. package/lib/App.js +29 -0
  7. package/lib/App.js.map +1 -0
  8. package/lib/StandaloneApiExplorer.js +8 -13
  9. package/lib/StandaloneApiExplorer.js.map +1 -1
  10. package/lib/components/DocMarkdown/DocMarkdown.js +5 -5
  11. package/lib/components/DocMarkdown/DocMarkdown.js.map +1 -1
  12. package/lib/components/DocSdkUsage/DocSdkUsage.js +3 -6
  13. package/lib/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  14. package/lib/components/DocSource/DocSource.js +5 -7
  15. package/lib/components/DocSource/DocSource.js.map +1 -1
  16. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.d.ts +1 -1
  17. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +152 -8
  18. package/lib/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  19. package/lib/components/SelectorContainer/SdkLanguageSelector.js +1 -1
  20. package/lib/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  21. package/lib/components/SideNav/SideNav.js +1 -1
  22. package/lib/components/SideNav/SideNav.js.map +1 -1
  23. package/lib/components/common/Loader.d.ts +1 -1
  24. package/lib/components/common/Loader.js.map +1 -1
  25. package/lib/esm/ApiExplorer.js +25 -26
  26. package/lib/esm/ApiExplorer.js.map +1 -1
  27. package/lib/esm/App.js +19 -0
  28. package/lib/esm/App.js.map +1 -0
  29. package/lib/esm/StandaloneApiExplorer.js +7 -10
  30. package/lib/esm/StandaloneApiExplorer.js.map +1 -1
  31. package/lib/esm/components/DocMarkdown/DocMarkdown.js +3 -3
  32. package/lib/esm/components/DocMarkdown/DocMarkdown.js.map +1 -1
  33. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js +5 -7
  34. package/lib/esm/components/DocSdkUsage/DocSdkUsage.js.map +1 -1
  35. package/lib/esm/components/DocSource/DocSource.js +4 -5
  36. package/lib/esm/components/DocSource/DocSource.js.map +1 -1
  37. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js +153 -6
  38. package/lib/esm/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.js.map +1 -1
  39. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js +2 -2
  40. package/lib/esm/components/SelectorContainer/SdkLanguageSelector.js.map +1 -1
  41. package/lib/esm/components/SideNav/SideNav.js +2 -2
  42. package/lib/esm/components/SideNav/SideNav.js.map +1 -1
  43. package/lib/esm/components/common/Loader.js.map +1 -1
  44. package/lib/esm/index.js +4 -18
  45. package/lib/esm/index.js.map +1 -1
  46. package/lib/esm/routes/AppRouter.js +2 -2
  47. package/lib/esm/routes/AppRouter.js.map +1 -1
  48. package/lib/esm/scenes/MethodScene/MethodScene.js +9 -11
  49. package/lib/esm/scenes/MethodScene/MethodScene.js.map +1 -1
  50. package/lib/esm/state/index.js +1 -0
  51. package/lib/esm/state/index.js.map +1 -1
  52. package/lib/esm/state/lodes/index.js +3 -0
  53. package/lib/{test-utils/envAdaptor.js.map → esm/state/lodes/index.js.map} +1 -1
  54. package/lib/esm/state/lodes/sagas.js +25 -0
  55. package/lib/esm/state/lodes/sagas.js.map +1 -0
  56. package/lib/esm/state/lodes/selectors.js +5 -0
  57. package/lib/esm/state/lodes/selectors.js.map +1 -0
  58. package/lib/esm/state/lodes/slice.js +30 -0
  59. package/lib/esm/state/lodes/slice.js.map +1 -0
  60. package/lib/esm/state/settings/sagas.js +28 -16
  61. package/lib/esm/state/settings/sagas.js.map +1 -1
  62. package/lib/esm/state/settings/selectors.js +5 -5
  63. package/lib/esm/state/settings/selectors.js.map +1 -1
  64. package/lib/esm/state/settings/slice.js +8 -8
  65. package/lib/esm/state/settings/slice.js.map +1 -1
  66. package/lib/esm/state/store.js +6 -3
  67. package/lib/esm/state/store.js.map +1 -1
  68. package/lib/esm/test-utils/index.js +1 -2
  69. package/lib/esm/test-utils/index.js.map +1 -1
  70. package/lib/esm/test-utils/lodes.js +12 -0
  71. package/lib/esm/test-utils/lodes.js.map +1 -0
  72. package/lib/esm/test-utils/redux.js +11 -8
  73. package/lib/esm/test-utils/redux.js.map +1 -1
  74. package/lib/esm/utils/index.js +0 -1
  75. package/lib/esm/utils/index.js.map +1 -1
  76. package/lib/esm/utils/lodeUtils.js +3 -7
  77. package/lib/esm/utils/lodeUtils.js.map +1 -1
  78. package/lib/index.d.ts +4 -1
  79. package/lib/index.js +52 -23
  80. package/lib/index.js.map +1 -1
  81. package/lib/routes/AppRouter.d.ts +2 -2
  82. package/lib/routes/AppRouter.js +2 -2
  83. package/lib/routes/AppRouter.js.map +1 -1
  84. package/lib/scenes/MethodScene/MethodScene.d.ts +2 -2
  85. package/lib/scenes/MethodScene/MethodScene.js +7 -9
  86. package/lib/scenes/MethodScene/MethodScene.js.map +1 -1
  87. package/lib/state/index.d.ts +1 -0
  88. package/lib/state/index.js +13 -0
  89. package/lib/state/index.js.map +1 -1
  90. package/lib/state/lodes/index.d.ts +2 -0
  91. package/lib/state/lodes/index.js +32 -0
  92. package/lib/state/lodes/index.js.map +1 -0
  93. package/lib/state/lodes/sagas.d.ts +1 -0
  94. package/lib/state/lodes/sagas.js +34 -0
  95. package/lib/state/lodes/sagas.js.map +1 -0
  96. package/lib/state/lodes/selectors.d.ts +3 -0
  97. package/lib/state/lodes/selectors.js +17 -0
  98. package/lib/state/lodes/selectors.js.map +1 -0
  99. package/lib/state/lodes/slice.d.ts +29 -0
  100. package/lib/state/lodes/slice.js +45 -0
  101. package/lib/state/lodes/slice.js.map +1 -0
  102. package/lib/state/settings/sagas.js +28 -15
  103. package/lib/state/settings/sagas.js.map +1 -1
  104. package/lib/state/settings/selectors.js +5 -5
  105. package/lib/state/settings/selectors.js.map +1 -1
  106. package/lib/state/settings/slice.d.ts +13 -13
  107. package/lib/state/settings/slice.js +13 -13
  108. package/lib/state/settings/slice.js.map +1 -1
  109. package/lib/state/store.d.ts +3 -0
  110. package/lib/state/store.js +6 -2
  111. package/lib/state/store.js.map +1 -1
  112. package/lib/test-data/declarations.js +24 -0
  113. package/lib/test-data/declarations.js.map +1 -0
  114. package/lib/test-data/index.js +23 -0
  115. package/lib/test-data/index.js.map +1 -1
  116. package/lib/test-utils/index.d.ts +1 -2
  117. package/lib/test-utils/index.js +12 -28
  118. package/lib/test-utils/index.js.map +1 -1
  119. package/lib/test-utils/lodes.d.ts +4 -0
  120. package/lib/test-utils/lodes.js +23 -0
  121. package/lib/test-utils/lodes.js.map +1 -0
  122. package/lib/test-utils/redux.d.ts +3 -1
  123. package/lib/test-utils/redux.js +12 -8
  124. package/lib/test-utils/redux.js.map +1 -1
  125. package/lib/utils/index.d.ts +0 -1
  126. package/lib/utils/index.js +0 -24
  127. package/lib/utils/index.js.map +1 -1
  128. package/lib/utils/lodeUtils.d.ts +2 -2
  129. package/lib/utils/lodeUtils.js +3 -7
  130. package/lib/utils/lodeUtils.js.map +1 -1
  131. package/package.json +11 -10
  132. package/public/Looker.3.1.json +1343 -412
  133. package/public/Looker.4.0.json +3305 -661
  134. package/src/ApiExplorer.tsx +99 -102
  135. package/src/{index.tsx → App.tsx} +0 -0
  136. package/src/StandaloneApiExplorer.tsx +8 -16
  137. package/src/components/DocMarkdown/DocMarkdown.tsx +3 -3
  138. package/src/components/DocSdkUsage/DocSdkUsage.spec.tsx +2 -2
  139. package/src/components/DocSdkUsage/DocSdkUsage.tsx +5 -5
  140. package/src/components/DocSource/DocSource.tsx +4 -3
  141. package/src/components/ErrorBoundary/components/SomethingWentWrong/SomethingWentWrong.spec.tsx +1 -1
  142. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/SomethingWentWrongGraphic.tsx +170 -6
  143. package/src/components/SelectorContainer/SdkLanguageSelector.spec.tsx +3 -5
  144. package/src/components/SelectorContainer/SdkLanguageSelector.tsx +2 -2
  145. package/src/components/SideNav/SideNav.tsx +2 -2
  146. package/src/components/common/Loader.tsx +1 -1
  147. package/src/{context/lode/index.ts → index.ts} +4 -1
  148. package/src/routes/AppRouter.tsx +5 -4
  149. package/src/scenes/MethodScene/MethodScene.tsx +11 -11
  150. package/src/state/index.ts +1 -0
  151. package/src/{context → state/lodes}/index.ts +2 -1
  152. package/src/state/lodes/sagas.spec.ts +92 -0
  153. package/src/state/lodes/sagas.ts +51 -0
  154. package/src/state/lodes/selectors.spec.ts +42 -0
  155. package/src/{test-utils/envAdaptor.ts → state/lodes/selectors.ts} +8 -5
  156. package/src/{test-utils/render_with_lode.tsx → state/lodes/slice.ts} +37 -37
  157. package/src/state/settings/sagas.spec.ts +25 -21
  158. package/src/state/settings/sagas.ts +16 -16
  159. package/src/state/settings/selectors.spec.ts +1 -5
  160. package/src/state/settings/selectors.ts +5 -5
  161. package/src/state/settings/slice.ts +12 -7
  162. package/src/state/store.ts +7 -2
  163. package/src/{context/lode/LodeContext.ts → test-data/declarations.ts} +17 -14
  164. package/src/test-data/index.ts +1 -0
  165. package/src/test-utils/index.ts +1 -5
  166. package/src/test-utils/lodes.tsx +41 -0
  167. package/src/test-utils/redux.tsx +19 -7
  168. package/src/utils/index.ts +0 -1
  169. package/src/utils/lodeUtils.ts +4 -6
  170. package/webpack.dev.config.js +3 -0
  171. package/webpack.prod.config.js +4 -0
  172. package/lib/context/index.d.ts +0 -1
  173. package/lib/context/index.js +0 -20
  174. package/lib/context/index.js.map +0 -1
  175. package/lib/context/lode/LodeContext.d.ts +0 -9
  176. package/lib/context/lode/LodeContext.js +0 -21
  177. package/lib/context/lode/LodeContext.js.map +0 -1
  178. package/lib/context/lode/index.d.ts +0 -1
  179. package/lib/context/lode/index.js +0 -20
  180. package/lib/context/lode/index.js.map +0 -1
  181. package/lib/esm/context/index.js +0 -2
  182. package/lib/esm/context/index.js.map +0 -1
  183. package/lib/esm/context/lode/LodeContext.js +0 -11
  184. package/lib/esm/context/lode/LodeContext.js.map +0 -1
  185. package/lib/esm/context/lode/index.js +0 -2
  186. package/lib/esm/context/lode/index.js.map +0 -1
  187. package/lib/esm/test-utils/envAdaptor.js +0 -5
  188. package/lib/esm/test-utils/envAdaptor.js.map +0 -1
  189. package/lib/esm/test-utils/render_with_lode.js +0 -19
  190. package/lib/esm/test-utils/render_with_lode.js.map +0 -1
  191. package/lib/esm/utils/envAdaptor.js +0 -84
  192. package/lib/esm/utils/envAdaptor.js.map +0 -1
  193. package/lib/test-utils/envAdaptor.d.ts +0 -2
  194. package/lib/test-utils/envAdaptor.js +0 -15
  195. package/lib/test-utils/render_with_lode.d.ts +0 -7
  196. package/lib/test-utils/render_with_lode.js +0 -36
  197. package/lib/test-utils/render_with_lode.js.map +0 -1
  198. package/lib/utils/envAdaptor.d.ts +0 -31
  199. package/lib/utils/envAdaptor.js +0 -106
  200. package/lib/utils/envAdaptor.js.map +0 -1
  201. package/src/components/ErrorBoundary/components/SomethingWentWrong/components/SomethingWentWrongGraphic/somethingWentWrong.svg +0 -45
  202. package/src/utils/envAdaptor.spec.ts +0 -50
  203. package/src/utils/envAdaptor.ts +0 -147
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/state/settings/slice.ts"],"names":["defaultSettings","sdkLanguage","searchPattern","searchCriteria","SearchAll","defaultSettingsState","initialized","slice","name","initialState","reducers","initAction","initSuccessAction","state","action","payload","initFailureAction","error","setSdkLanguageAction","setSearchPatternAction","actions","useActions","useStoreState","useSettingsStoreState","saga"],"mappings":";;;;;;;AAyBA;;AAEA;;AAEA;;AAEA;;;;;;;;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,WAAW,EAAE,QADgB;AAE7BC,EAAAA,aAAa,EAAE,EAFc;AAG7BC,EAAAA,cAAc,EAAE,+BAAcC,qBAAd;AAHa,CAAxB;;;AAMA,IAAMC,oBAAkC,mCAC1CL,eAD0C;AAE7CM,EAAAA,WAAW,EAAE;AAFgC,EAAxC;;;AAUA,IAAMC,KAAK,GAAG,0BAAY;AAC/BC,EAAAA,IAAI,EAAE,UADyB;AAE/BC,EAAAA,YAAY,EAAEJ,oBAFiB;AAG/BK,EAAAA,QAAQ,EAAE;AAERC,IAAAA,UAAU,GAAG,CAAE,CAFP;;AAGRC,IAAAA,iBAAiB,CAACC,KAAD,EAAQC,MAAR,EAAmD;AAClED,MAAAA,KAAK,CAACZ,WAAN,GAAoBa,MAAM,CAACC,OAAP,CAAed,WAAnC;AACAY,MAAAA,KAAK,CAACP,WAAN,GAAoB,IAApB;AACD,KANO;;AAORU,IAAAA,iBAAiB,CAACH,KAAD,EAAQC,MAAR,EAAsC;AACrDD,MAAAA,KAAK,CAACI,KAAN,GAAcH,MAAM,CAACC,OAArB;AACAF,MAAAA,KAAK,CAACP,WAAN,GAAoB,KAApB;AACD,KAVO;;AAWRY,IAAAA,oBAAoB,CAACL,KAAD,EAAQC,MAAR,EAAqD;AACvED,MAAAA,KAAK,CAACZ,WAAN,GAAoBa,MAAM,CAACC,OAAP,CAAed,WAAnC;AACD,KAbO;;AAcRkB,IAAAA,sBAAsB,CACpBN,KADoB,EAEpBC,MAFoB,EAGpB;AACAD,MAAAA,KAAK,CAACX,aAAN,GAAsBY,MAAM,CAACC,OAAP,CAAeb,aAArC;AACD;;AAnBO;AAHqB,CAAZ,CAAd;;AA0BA,IAAMkB,OAAO,GAAGb,KAAK,CAACa,OAAtB;;AACA,IAAM;AAAEC,EAAAA,UAAF;AAAcC,EAAAA,aAAa,EAAEC;AAA7B,IACX,6BAAiBhB,KAAjB,EAAwBiB,WAAxB,CADK","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { SearchCriterionTerm } from '@looker/sdk-codegen'\nimport { SearchAll, setToCriteria } from '@looker/sdk-codegen'\n\nimport { saga } from './sagas'\n\nexport interface UserDefinedSettings {\n sdkLanguage: string\n}\n\nexport interface SettingState extends UserDefinedSettings {\n searchPattern: string\n searchCriteria: SearchCriterionTerm[]\n initialized: boolean\n error?: Error\n}\n\nexport const defaultSettings = {\n sdkLanguage: 'Python',\n searchPattern: '',\n searchCriteria: setToCriteria(SearchAll) as SearchCriterionTerm[],\n}\n\nexport const defaultSettingsState: SettingState = {\n ...defaultSettings,\n initialized: false,\n}\n\ntype SetSearchPatternAction = Pick<SettingState, 'searchPattern'>\ntype SetSdkLanguageAction = Pick<SettingState, 'sdkLanguage'>\n\nexport type InitSuccessPayload = UserDefinedSettings\n\nexport const slice = createSlice({\n name: 'settings',\n initialState: defaultSettingsState,\n reducers: {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initAction() {},\n initSuccessAction(state, action: PayloadAction<InitSuccessPayload>) {\n state.sdkLanguage = action.payload.sdkLanguage\n state.initialized = true\n },\n initFailureAction(state, action: PayloadAction<Error>) {\n state.error = action.payload\n state.initialized = false\n },\n setSdkLanguageAction(state, action: PayloadAction<SetSdkLanguageAction>) {\n state.sdkLanguage = action.payload.sdkLanguage\n },\n setSearchPatternAction(\n state,\n action: PayloadAction<SetSearchPatternAction>\n ) {\n state.searchPattern = action.payload.searchPattern\n },\n },\n})\n\nexport const actions = slice.actions\nexport const { useActions, useStoreState: useSettingsStoreState } =\n createSliceHooks(slice, saga)\n"],"file":"slice.js"}
1
+ {"version":3,"sources":["../../../src/state/settings/slice.ts"],"names":["defaultSettings","sdkLanguage","searchPattern","searchCriteria","SearchAll","defaultSettingsState","initialized","settingsSlice","name","initialState","reducers","initSettingsAction","initSettingsSuccessAction","state","action","payload","initSettingsFailureAction","error","setSdkLanguageAction","setSearchPatternAction","settingActions","actions","useActions","useSettingActions","useStoreState","useSettingStoreState","saga"],"mappings":";;;;;;;AAyBA;;AAEA;;AAEA;;AAEA;;;;;;;;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,WAAW,EAAE,QADgB;AAE7BC,EAAAA,aAAa,EAAE,EAFc;AAG7BC,EAAAA,cAAc,EAAE,+BAAcC,qBAAd;AAHa,CAAxB;;;AAMA,IAAMC,oBAAkC,mCAC1CL,eAD0C;AAE7CM,EAAAA,WAAW,EAAE;AAFgC,EAAxC;;;AAUA,IAAMC,aAAa,GAAG,0BAAY;AACvCC,EAAAA,IAAI,EAAE,UADiC;AAEvCC,EAAAA,YAAY,EAAEJ,oBAFyB;AAGvCK,EAAAA,QAAQ,EAAE;AAERC,IAAAA,kBAAkB,GAAG,CAAE,CAFf;;AAGRC,IAAAA,yBAAyB,CACvBC,KADuB,EAEvBC,MAFuB,EAGvB;AACAD,MAAAA,KAAK,CAACZ,WAAN,GAAoBa,MAAM,CAACC,OAAP,CAAed,WAAnC;AACAY,MAAAA,KAAK,CAACP,WAAN,GAAoB,IAApB;AACD,KATO;;AAURU,IAAAA,yBAAyB,CAACH,KAAD,EAAQC,MAAR,EAAsC;AAC7DD,MAAAA,KAAK,CAACI,KAAN,GAAcH,MAAM,CAACC,OAArB;AACAF,MAAAA,KAAK,CAACP,WAAN,GAAoB,KAApB;AACD,KAbO;;AAcRY,IAAAA,oBAAoB,CAACL,KAAD,EAAQC,MAAR,EAAqD;AACvED,MAAAA,KAAK,CAACZ,WAAN,GAAoBa,MAAM,CAACC,OAAP,CAAed,WAAnC;AACD,KAhBO;;AAiBRkB,IAAAA,sBAAsB,CACpBN,KADoB,EAEpBC,MAFoB,EAGpB;AACAD,MAAAA,KAAK,CAACX,aAAN,GAAsBY,MAAM,CAACC,OAAP,CAAeb,aAArC;AACD;;AAtBO;AAH6B,CAAZ,CAAtB;;AA6BA,IAAMkB,cAAc,GAAGb,aAAa,CAACc,OAArC;;AACA,IAAM;AACXC,EAAAA,UAAU,EAAEC,iBADD;AAEXC,EAAAA,aAAa,EAAEC;AAFJ,IAGT,6BAAiBlB,aAAjB,EAAgCmB,WAAhC,CAHG","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createSlice } from '@reduxjs/toolkit'\nimport type { PayloadAction } from '@reduxjs/toolkit'\nimport { createSliceHooks } from '@looker/redux'\nimport type { SearchCriterionTerm } from '@looker/sdk-codegen'\nimport { SearchAll, setToCriteria } from '@looker/sdk-codegen'\n\nimport { saga } from './sagas'\n\nexport interface UserDefinedSettings {\n sdkLanguage: string\n}\n\nexport interface SettingState extends UserDefinedSettings {\n searchPattern: string\n searchCriteria: SearchCriterionTerm[]\n initialized: boolean\n error?: Error\n}\n\nexport const defaultSettings = {\n sdkLanguage: 'Python',\n searchPattern: '',\n searchCriteria: setToCriteria(SearchAll) as SearchCriterionTerm[],\n}\n\nexport const defaultSettingsState: SettingState = {\n ...defaultSettings,\n initialized: false,\n}\n\ntype SetSearchPatternAction = Pick<SettingState, 'searchPattern'>\ntype SetSdkLanguageAction = Pick<SettingState, 'sdkLanguage'>\n\nexport type InitSuccessPayload = UserDefinedSettings\n\nexport const settingsSlice = createSlice({\n name: 'settings',\n initialState: defaultSettingsState,\n reducers: {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n initSettingsAction() {},\n initSettingsSuccessAction(\n state,\n action: PayloadAction<InitSuccessPayload>\n ) {\n state.sdkLanguage = action.payload.sdkLanguage\n state.initialized = true\n },\n initSettingsFailureAction(state, action: PayloadAction<Error>) {\n state.error = action.payload\n state.initialized = false\n },\n setSdkLanguageAction(state, action: PayloadAction<SetSdkLanguageAction>) {\n state.sdkLanguage = action.payload.sdkLanguage\n },\n setSearchPatternAction(\n state,\n action: PayloadAction<SetSearchPatternAction>\n ) {\n state.searchPattern = action.payload.searchPattern\n },\n },\n})\n\nexport const settingActions = settingsSlice.actions\nexport const {\n useActions: useSettingActions,\n useStoreState: useSettingStoreState,\n} = createSliceHooks(settingsSlice, saga)\n"],"file":"slice.js"}
@@ -1,7 +1,10 @@
1
1
  import type { SettingState } from './settings';
2
+ import type { LodesState } from './lodes';
2
3
  export declare const store: import("@looker/redux").Store<{
3
4
  settings: SettingState;
5
+ lodes: LodesState;
4
6
  }, import("redux").AnyAction>;
5
7
  export interface RootState {
6
8
  settings: SettingState;
9
+ lodes: LodesState;
7
10
  }
@@ -9,12 +9,16 @@ var _redux = require("@looker/redux");
9
9
 
10
10
  var _settings = require("./settings");
11
11
 
12
+ var _lodes = require("./lodes");
13
+
12
14
  var store = (0, _redux.createStore)({
13
15
  preloadedState: {
14
- settings: _settings.defaultSettingsState
16
+ settings: _settings.defaultSettingsState,
17
+ lodes: _lodes.defaultLodesState
15
18
  },
16
19
  reducer: {
17
- settings: _settings.slice.reducer
20
+ settings: _settings.settingsSlice.reducer,
21
+ lodes: _lodes.lodesSlice.reducer
18
22
  }
19
23
  });
20
24
  exports.store = store;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/state/store.ts"],"names":["store","preloadedState","settings","defaultSettingsState","reducer","slice"],"mappings":";;;;;;;AAyBA;;AAGA;;AAEO,IAAMA,KAAK,GAAG,wBAAY;AAC/BC,EAAAA,cAAc,EAAE;AACdC,IAAAA,QAAQ,EAAEC;AADI,GADe;AAI/BC,EAAAA,OAAO,EAAE;AACPF,IAAAA,QAAQ,EAAEG,gBAAMD;AADT;AAJsB,CAAZ,CAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux'\n\nimport type { SettingState } from './settings'\nimport { defaultSettingsState, slice } from './settings'\n\nexport const store = createStore({\n preloadedState: {\n settings: defaultSettingsState,\n },\n reducer: {\n settings: slice.reducer,\n },\n})\n\nexport interface RootState {\n settings: SettingState\n}\n"],"file":"store.js"}
1
+ {"version":3,"sources":["../../src/state/store.ts"],"names":["store","preloadedState","settings","defaultSettingsState","lodes","defaultLodesState","reducer","settingsSlice","lodesSlice"],"mappings":";;;;;;;AAyBA;;AAGA;;AAEA;;AAEO,IAAMA,KAAK,GAAG,wBAAY;AAC/BC,EAAAA,cAAc,EAAE;AACdC,IAAAA,QAAQ,EAAEC,8BADI;AAEdC,IAAAA,KAAK,EAAEC;AAFO,GADe;AAK/BC,EAAAA,OAAO,EAAE;AACPJ,IAAAA,QAAQ,EAAEK,wBAAcD,OADjB;AAEPF,IAAAA,KAAK,EAAEI,kBAAWF;AAFX;AALsB,CAAZ,CAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport { createStore } from '@looker/redux'\n\nimport type { SettingState } from './settings'\nimport { defaultSettingsState, settingsSlice } from './settings'\nimport type { LodesState } from './lodes'\nimport { lodesSlice, defaultLodesState } from './lodes'\n\nexport const store = createStore({\n preloadedState: {\n settings: defaultSettingsState,\n lodes: defaultLodesState,\n },\n reducer: {\n settings: settingsSlice.reducer,\n lodes: lodesSlice.reducer,\n },\n})\n\nexport interface RootState {\n settings: SettingState\n lodes: LodesState\n}\n"],"file":"store.js"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.declarations = void 0;
7
+ var declarations = {
8
+ commitHash: '1e9348b797c2f3760d03c1f94c60f18e534e8298',
9
+ remoteOrigin: 'https://github.com/looker-open-source/sdk-codegen',
10
+ types: {
11
+ FullLode: {
12
+ line: 40,
13
+ sourceFile: 'packages/api-explorer/src/utils/lodeUtils.ts'
14
+ }
15
+ },
16
+ methods: {
17
+ getLoded: {
18
+ line: 45,
19
+ sourceFile: 'packages/api-explorer/src/utils/lodeUtils.ts'
20
+ }
21
+ }
22
+ };
23
+ exports.declarations = declarations;
24
+ //# sourceMappingURL=declarations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/test-data/declarations.ts"],"names":["declarations","commitHash","remoteOrigin","types","FullLode","line","sourceFile","methods","getLoded"],"mappings":";;;;;;AA2BO,IAAMA,YAA8B,GAAG;AAC5CC,EAAAA,UAAU,EAAE,0CADgC;AAE5CC,EAAAA,YAAY,EAAE,mDAF8B;AAG5CC,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAE,EADE;AAERC,MAAAA,UAAU,EAAE;AAFJ;AADL,GAHqC;AAS5CC,EAAAA,OAAO,EAAE;AACPC,IAAAA,QAAQ,EAAE;AACRH,MAAAA,IAAI,EAAE,EADE;AAERC,MAAAA,UAAU,EAAE;AAFJ;AADH;AATmC,CAAvC","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { IDeclarationMine } from '@looker/sdk-codegen'\n\nexport const declarations: IDeclarationMine = {\n commitHash: '1e9348b797c2f3760d03c1f94c60f18e534e8298',\n remoteOrigin: 'https://github.com/looker-open-source/sdk-codegen',\n types: {\n FullLode: {\n line: 40,\n sourceFile: 'packages/api-explorer/src/utils/lodeUtils.ts',\n },\n },\n methods: {\n getLoded: {\n line: 45,\n sourceFile: 'packages/api-explorer/src/utils/lodeUtils.ts',\n },\n },\n}\n"],"file":"declarations.js"}
@@ -3,6 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ api: true,
8
+ api40: true,
9
+ specs: true,
10
+ specState: true,
11
+ getLoadedSpecs: true,
12
+ getLoadedSpecState: true,
13
+ examples: true
14
+ };
6
15
  Object.defineProperty(exports, "api", {
7
16
  enumerable: true,
8
17
  get: function get() {
@@ -49,4 +58,18 @@ Object.defineProperty(exports, "examples", {
49
58
  var _specs = require("./specs");
50
59
 
51
60
  var _examples = require("./examples");
61
+
62
+ var _declarations = require("./declarations");
63
+
64
+ Object.keys(_declarations).forEach(function (key) {
65
+ if (key === "default" || key === "__esModule") return;
66
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
67
+ if (key in exports && exports[key] === _declarations[key]) return;
68
+ Object.defineProperty(exports, key, {
69
+ enumerable: true,
70
+ get: function get() {
71
+ return _declarations[key];
72
+ }
73
+ });
74
+ });
52
75
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test-data/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;AAQA","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport {\n api,\n api40,\n specs,\n specState,\n getLoadedSpecs,\n getLoadedSpecState,\n} from './specs'\nexport { examples } from './examples'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/test-data/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;AAQA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport {\n api,\n api40,\n specs,\n specState,\n getLoadedSpecs,\n getLoadedSpecState,\n} from './specs'\nexport { examples } from './examples'\nexport * from './declarations'\n"],"file":"index.js"}
@@ -1,4 +1,3 @@
1
- export { renderWithLode, renderWithReduxProviderAndLode, } from './render_with_lode';
1
+ export * from './lodes';
2
2
  export * from './router';
3
3
  export * from './redux';
4
- export { registerTestEnvAdaptor } from './envAdaptor';
@@ -3,37 +3,24 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- renderWithLode: true,
8
- renderWithReduxProviderAndLode: true,
9
- registerTestEnvAdaptor: true
10
- };
11
- Object.defineProperty(exports, "renderWithLode", {
12
- enumerable: true,
13
- get: function get() {
14
- return _render_with_lode.renderWithLode;
15
- }
16
- });
17
- Object.defineProperty(exports, "renderWithReduxProviderAndLode", {
18
- enumerable: true,
19
- get: function get() {
20
- return _render_with_lode.renderWithReduxProviderAndLode;
21
- }
22
- });
23
- Object.defineProperty(exports, "registerTestEnvAdaptor", {
24
- enumerable: true,
25
- get: function get() {
26
- return _envAdaptor.registerTestEnvAdaptor;
27
- }
28
- });
29
6
 
30
- var _render_with_lode = require("./render_with_lode");
7
+ var _lodes = require("./lodes");
8
+
9
+ Object.keys(_lodes).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _lodes[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _lodes[key];
16
+ }
17
+ });
18
+ });
31
19
 
32
20
  var _router = require("./router");
33
21
 
34
22
  Object.keys(_router).forEach(function (key) {
35
23
  if (key === "default" || key === "__esModule") return;
36
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
37
24
  if (key in exports && exports[key] === _router[key]) return;
38
25
  Object.defineProperty(exports, key, {
39
26
  enumerable: true,
@@ -47,7 +34,6 @@ var _redux = require("./redux");
47
34
 
48
35
  Object.keys(_redux).forEach(function (key) {
49
36
  if (key === "default" || key === "__esModule") return;
50
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
51
37
  if (key in exports && exports[key] === _redux[key]) return;
52
38
  Object.defineProperty(exports, key, {
53
39
  enumerable: true,
@@ -56,6 +42,4 @@ Object.keys(_redux).forEach(function (key) {
56
42
  }
57
43
  });
58
44
  });
59
-
60
- var _envAdaptor = require("./envAdaptor");
61
45
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test-utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;AAIA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport {\n renderWithLode,\n renderWithReduxProviderAndLode,\n} from './render_with_lode'\nexport * from './router'\nexport * from './redux'\nexport { registerTestEnvAdaptor } from './envAdaptor'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/test-utils/index.ts"],"names":[],"mappings":";;;;;;AAyBA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport * from './lodes'\nexport * from './router'\nexport * from './redux'\n"],"file":"index.js"}
@@ -0,0 +1,4 @@
1
+ import type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen';
2
+ import type { ReactElement } from 'react';
3
+ import type { RenderOptions } from '@testing-library/react';
4
+ export declare const renderWithLode: (consumers: ReactElement<any>, examples: IExampleMine, declarations?: IDeclarationMine | undefined, options?: Omit<RenderOptions<typeof import("@testing-library/dom/types/queries"), HTMLElement>, "queries"> | undefined) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderWithLode = void 0;
7
+
8
+ var _componentsTestUtils = require("@looker/components-test-utils");
9
+
10
+ var _redux = require("./redux");
11
+
12
+ var renderWithLode = (consumers, examples, declarations, options) => {
13
+ var store = (0, _redux.createTestStore)({
14
+ lodes: {
15
+ examples,
16
+ declarations
17
+ }
18
+ });
19
+ return (0, _componentsTestUtils.renderWithTheme)((0, _redux.withReduxProvider)(consumers, store), options);
20
+ };
21
+
22
+ exports.renderWithLode = renderWithLode;
23
+ //# sourceMappingURL=lodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/test-utils/lodes.tsx"],"names":["renderWithLode","consumers","examples","declarations","options","store","lodes"],"mappings":";;;;;;;AA4BA;;AAEA;;AAEO,IAAMA,cAAc,GAAG,CAC5BC,SAD4B,EAE5BC,QAF4B,EAG5BC,YAH4B,EAI5BC,OAJ4B,KAKzB;AACH,MAAMC,KAAK,GAAG,4BAAgB;AAAEC,IAAAA,KAAK,EAAE;AAAEJ,MAAAA,QAAF;AAAYC,MAAAA;AAAZ;AAAT,GAAhB,CAAd;AACA,SAAO,0CAAgB,8BAAkBF,SAAlB,EAA6BI,KAA7B,CAAhB,EAAqDD,OAArD,CAAP;AACD,CARM","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'\nimport type { ReactElement } from 'react'\nimport type { RenderOptions } from '@testing-library/react'\nimport { renderWithTheme } from '@looker/components-test-utils'\n\nimport { createTestStore, withReduxProvider } from './redux'\n\nexport const renderWithLode = (\n consumers: ReactElement<any>,\n examples: IExampleMine,\n declarations?: IDeclarationMine,\n options?: Omit<RenderOptions, 'queries'>\n) => {\n const store = createTestStore({ lodes: { examples, declarations } })\n return renderWithTheme(withReduxProvider(consumers, store), options)\n}\n"],"file":"lodes.js"}
@@ -1,14 +1,16 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { Store } from 'redux';
3
3
  import type { RenderOptions } from '@testing-library/react';
4
- import type { RootState, SettingState } from '../state';
4
+ import type { LodesState, RootState, SettingState } from '../state';
5
5
  export declare const withReduxProvider: (consumers: ReactElement<any>, store?: Store<RootState>) => JSX.Element;
6
6
  export declare const renderWithReduxProvider: (consumers: ReactElement<any>, store?: Store<RootState, import("redux").AnyAction> | undefined, options?: Omit<RenderOptions<typeof import("@testing-library/dom/types/queries"), HTMLElement>, "queries"> | undefined) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement>;
7
7
  export declare const renderWithRouterAndReduxProvider: (consumers: ReactElement<any>, initialEntries?: string[], store?: Store<RootState, import("redux").AnyAction> | undefined, options?: Omit<RenderOptions<typeof import("@testing-library/dom/types/queries"), HTMLElement>, "queries"> | undefined) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement>;
8
+ export declare const preloadedState: RootState;
8
9
  declare type DeepPartial<T> = {
9
10
  [P in keyof T]?: DeepPartial<T[P]>;
10
11
  };
11
12
  export declare const createTestStore: (overrides?: DeepPartial<RootState> | undefined) => import("@looker/redux").Store<{
12
13
  settings: SettingState;
14
+ lodes: LodesState;
13
15
  }, import("redux").AnyAction>;
14
16
  export {};
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createTestStore = exports.renderWithRouterAndReduxProvider = exports.renderWithReduxProvider = exports.withReduxProvider = void 0;
6
+ exports.createTestStore = exports.preloadedState = exports.renderWithRouterAndReduxProvider = exports.renderWithReduxProvider = exports.withReduxProvider = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -13,11 +13,11 @@ var _componentsTestUtils = require("@looker/components-test-utils");
13
13
 
14
14
  var _redux = require("@looker/redux");
15
15
 
16
- var _state = require("../state");
16
+ var _extensionUtils = require("@looker/extension-utils");
17
17
 
18
- var _settings = require("../state/settings");
18
+ var _runIt = require("@looker/run-it");
19
19
 
20
- var _utils = require("../utils");
20
+ var _state = require("../state");
21
21
 
22
22
  var _router = require("./router");
23
23
 
@@ -31,7 +31,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
31
31
 
32
32
  var withReduxProvider = function withReduxProvider(consumers) {
33
33
  var store = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _state.store;
34
- (0, _utils.registerEnvAdaptor)(new _utils.StandaloneEnvAdaptor());
34
+ (0, _extensionUtils.registerEnvAdaptor)(new _extensionUtils.BrowserAdaptor((0, _runIt.initRunItSdk)()));
35
35
  return _react.default.createElement(_reactRedux.Provider, {
36
36
  store: store
37
37
  }, consumers);
@@ -52,15 +52,19 @@ var renderWithRouterAndReduxProvider = function renderWithRouterAndReduxProvider
52
52
 
53
53
  exports.renderWithRouterAndReduxProvider = renderWithRouterAndReduxProvider;
54
54
  var preloadedState = {
55
- settings: _state.defaultSettingsState
55
+ settings: _state.defaultSettingsState,
56
+ lodes: _state.defaultLodesState
56
57
  };
58
+ exports.preloadedState = preloadedState;
57
59
 
58
60
  var createTestStore = overrides => (0, _redux.createStore)({
59
61
  preloadedState: {
60
- settings: _objectSpread(_objectSpread({}, preloadedState.settings), overrides === null || overrides === void 0 ? void 0 : overrides.settings)
62
+ settings: _objectSpread(_objectSpread({}, preloadedState.settings), overrides === null || overrides === void 0 ? void 0 : overrides.settings),
63
+ lodes: _objectSpread(_objectSpread({}, _state.defaultLodesState), overrides === null || overrides === void 0 ? void 0 : overrides.lodes)
61
64
  },
62
65
  reducer: {
63
- settings: _settings.slice.reducer
66
+ settings: _state.settingsSlice.reducer,
67
+ lodes: _state.lodesSlice.reducer
64
68
  }
65
69
  });
66
70
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/test-utils/redux.tsx"],"names":["withReduxProvider","consumers","store","defaultStore","StandaloneEnvAdaptor","renderWithReduxProvider","options","renderWithRouterAndReduxProvider","initialEntries","preloadedState","settings","defaultSettingsState","createTestStore","overrides","reducer","settingsSlice"],"mappings":";;;;;;;AA0BA;;AACA;;AAEA;;AAEA;;AAGA;;AACA;;AACA;;AACA;;;;;;;;;;AAEO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAC/BC,SAD+B,EAG5B;AAAA,MADHC,KACG,uEADuBC,YACvB;AACH,iCAAmB,IAAIC,2BAAJ,EAAnB;AACA,SAAO,6BAAC,oBAAD;AAAU,IAAA,KAAK,EAAEF;AAAjB,KAAyBD,SAAzB,CAAP;AACD,CANM;;;;AAQA,IAAMI,uBAAuB,GAAG,CACrCJ,SADqC,EAErCC,KAFqC,EAGrCI,OAHqC,KAIlC,0CAAgBN,iBAAiB,CAACC,SAAD,EAAYC,KAAZ,CAAjC,EAAqDI,OAArD,CAJE;;;;AAMA,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAmC,CAC9CN,SAD8C;AAAA,MAE9CO,cAF8C,uEAEnB,CAAC,GAAD,CAFmB;AAAA,MAG9CN,KAH8C;AAAA,MAI9CI,OAJ8C;AAAA,SAM9C,8BAAiBN,iBAAiB,CAACC,SAAD,EAAYC,KAAZ,CAAlC,EAAsDM,cAAtD,EAAsEF,OAAtE,CAN8C;AAAA,CAAzC;;;AAQP,IAAMG,cAAyB,GAAG;AAChCC,EAAAA,QAAQ,EAAEC;AADsB,CAAlC;;AAQO,IAAMC,eAAe,GAAIC,SAAD,IAC7B,wBAAY;AACVJ,EAAAA,cAAc,EAAE;AACdC,IAAAA,QAAQ,kCACHD,cAAc,CAACC,QADZ,GAEHG,SAFG,aAEHA,SAFG,uBAEHA,SAAS,CAAEH,QAFR;AADM,GADN;AAOVI,EAAAA,OAAO,EAAE;AAAEJ,IAAAA,QAAQ,EAAEK,gBAAcD;AAA1B;AAPC,CAAZ,CADK","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nimport type { ReactElement } from 'react'\nimport React from 'react'\nimport { Provider } from 'react-redux'\nimport type { Store } from 'redux'\nimport { renderWithTheme } from '@looker/components-test-utils'\nimport type { RenderOptions } from '@testing-library/react'\nimport { createStore } from '@looker/redux'\n\nimport type { RootState, SettingState } from '../state'\nimport { defaultSettingsState, store as defaultStore } from '../state'\nimport { slice as settingsSlice } from '../state/settings'\nimport { registerEnvAdaptor, StandaloneEnvAdaptor } from '../utils'\nimport { renderWithRouter } from './router'\n\nexport const withReduxProvider = (\n consumers: ReactElement<any>,\n store: Store<RootState> = defaultStore\n) => {\n registerEnvAdaptor(new StandaloneEnvAdaptor())\n return <Provider store={store}>{consumers}</Provider>\n}\n\nexport const renderWithReduxProvider = (\n consumers: ReactElement<any>,\n store?: Store<RootState>,\n options?: Omit<RenderOptions, 'queries'>\n) => renderWithTheme(withReduxProvider(consumers, store), options)\n\nexport const renderWithRouterAndReduxProvider = (\n consumers: ReactElement<any>,\n initialEntries: string[] = ['/'],\n store?: Store<RootState>,\n options?: Omit<RenderOptions, 'queries'>\n) =>\n renderWithRouter(withReduxProvider(consumers, store), initialEntries, options)\n\nconst preloadedState: RootState = {\n settings: defaultSettingsState,\n}\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 settings: {\n ...preloadedState.settings,\n ...overrides?.settings,\n } as SettingState,\n },\n reducer: { settings: settingsSlice.reducer },\n })\n"],"file":"redux.js"}
1
+ {"version":3,"sources":["../../src/test-utils/redux.tsx"],"names":["withReduxProvider","consumers","store","defaultStore","BrowserAdaptor","renderWithReduxProvider","options","renderWithRouterAndReduxProvider","initialEntries","preloadedState","settings","defaultSettingsState","lodes","defaultLodesState","createTestStore","overrides","reducer","settingsSlice","lodesSlice"],"mappings":";;;;;;;AA2BA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAGA;;AAOA;;;;;;;;;;AAEO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAC/BC,SAD+B,EAG5B;AAAA,MADHC,KACG,uEADuBC,YACvB;AACH,0CAAmB,IAAIC,8BAAJ,CAAmB,0BAAnB,CAAnB;AACA,SAAO,6BAAC,oBAAD;AAAU,IAAA,KAAK,EAAEF;AAAjB,KAAyBD,SAAzB,CAAP;AACD,CANM;;;;AAQA,IAAMI,uBAAuB,GAAG,CACrCJ,SADqC,EAErCC,KAFqC,EAGrCI,OAHqC,KAIlC,0CAAgBN,iBAAiB,CAACC,SAAD,EAAYC,KAAZ,CAAjC,EAAqDI,OAArD,CAJE;;;;AAMA,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAmC,CAC9CN,SAD8C;AAAA,MAE9CO,cAF8C,uEAEnB,CAAC,GAAD,CAFmB;AAAA,MAG9CN,KAH8C;AAAA,MAI9CI,OAJ8C;AAAA,SAM9C,8BAAiBN,iBAAiB,CAACC,SAAD,EAAYC,KAAZ,CAAlC,EAAsDM,cAAtD,EAAsEF,OAAtE,CAN8C;AAAA,CAAzC;;;AAQA,IAAMG,cAAyB,GAAG;AACvCC,EAAAA,QAAQ,EAAEC,2BAD6B;AAEvCC,EAAAA,KAAK,EAAEC;AAFgC,CAAlC;;;AASA,IAAMC,eAAe,GAAIC,SAAD,IAC7B,wBAAY;AACVN,EAAAA,cAAc,EAAE;AACdC,IAAAA,QAAQ,kCACHD,cAAc,CAACC,QADZ,GAEHK,SAFG,aAEHA,SAFG,uBAEHA,SAAS,CAAEL,QAFR,CADM;AAKdE,IAAAA,KAAK,kCACAC,wBADA,GAEAE,SAFA,aAEAA,SAFA,uBAEAA,SAAS,CAAEH,KAFX;AALS,GADN;AAWVI,EAAAA,OAAO,EAAE;AAAEN,IAAAA,QAAQ,EAAEO,qBAAcD,OAA1B;AAAmCJ,IAAAA,KAAK,EAAEM,kBAAWF;AAArD;AAXC,CAAZ,CADK","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { ReactElement } from 'react'\nimport React from 'react'\nimport { Provider } from 'react-redux'\nimport type { Store } from 'redux'\nimport { renderWithTheme } from '@looker/components-test-utils'\nimport type { RenderOptions } from '@testing-library/react'\nimport { createStore } from '@looker/redux'\nimport { BrowserAdaptor, registerEnvAdaptor } from '@looker/extension-utils'\nimport { initRunItSdk } from '@looker/run-it'\n\nimport type { LodesState, RootState, SettingState } from '../state'\nimport {\n settingsSlice,\n defaultLodesState,\n defaultSettingsState,\n store as defaultStore,\n lodesSlice,\n} from '../state'\nimport { renderWithRouter } from './router'\n\nexport const withReduxProvider = (\n consumers: ReactElement<any>,\n store: Store<RootState> = defaultStore\n) => {\n registerEnvAdaptor(new BrowserAdaptor(initRunItSdk()))\n return <Provider store={store}>{consumers}</Provider>\n}\n\nexport const renderWithReduxProvider = (\n consumers: ReactElement<any>,\n store?: Store<RootState>,\n options?: Omit<RenderOptions, 'queries'>\n) => renderWithTheme(withReduxProvider(consumers, store), options)\n\nexport const renderWithRouterAndReduxProvider = (\n consumers: ReactElement<any>,\n initialEntries: string[] = ['/'],\n store?: Store<RootState>,\n options?: Omit<RenderOptions, 'queries'>\n) =>\n renderWithRouter(withReduxProvider(consumers, store), initialEntries, options)\n\nexport const preloadedState: RootState = {\n settings: defaultSettingsState,\n lodes: defaultLodesState,\n}\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 settings: {\n ...preloadedState.settings,\n ...overrides?.settings,\n } as SettingState,\n lodes: {\n ...defaultLodesState,\n ...overrides?.lodes,\n } as LodesState,\n },\n reducer: { settings: settingsSlice.reducer, lodes: lodesSlice.reducer },\n })\n"],"file":"redux.js"}
@@ -2,4 +2,3 @@ export { highlightHTML } from './highlight';
2
2
  export { buildPath, buildMethodPath, buildTypePath, diffPath, oAuthPath, } from './path';
3
3
  export { getLoded } from './lodeUtils';
4
4
  export { useWindowSize } from './useWindowSize';
5
- export * from './envAdaptor';
@@ -3,16 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- highlightHTML: true,
8
- buildPath: true,
9
- buildMethodPath: true,
10
- buildTypePath: true,
11
- diffPath: true,
12
- oAuthPath: true,
13
- getLoded: true,
14
- useWindowSize: true
15
- };
16
6
  Object.defineProperty(exports, "highlightHTML", {
17
7
  enumerable: true,
18
8
  get: function get() {
@@ -69,18 +59,4 @@ var _path = require("./path");
69
59
  var _lodeUtils = require("./lodeUtils");
70
60
 
71
61
  var _useWindowSize = require("./useWindowSize");
72
-
73
- var _envAdaptor = require("./envAdaptor");
74
-
75
- Object.keys(_envAdaptor).forEach(function (key) {
76
- if (key === "default" || key === "__esModule") return;
77
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
78
- if (key in exports && exports[key] === _envAdaptor[key]) return;
79
- Object.defineProperty(exports, key, {
80
- enumerable: true,
81
- get: function get() {
82
- return _envAdaptor[key];
83
- }
84
- });
85
- });
86
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;AACA;;AAOA;;AACA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { highlightHTML } from './highlight'\nexport {\n buildPath,\n buildMethodPath,\n buildTypePath,\n diffPath,\n oAuthPath,\n} from './path'\nexport { getLoded } from './lodeUtils'\nexport { useWindowSize } from './useWindowSize'\nexport * from './envAdaptor'\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;AACA;;AAOA;;AACA","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nexport { highlightHTML } from './highlight'\nexport {\n buildPath,\n buildMethodPath,\n buildTypePath,\n diffPath,\n oAuthPath,\n} from './path'\nexport { getLoded } from './lodeUtils'\nexport { useWindowSize } from './useWindowSize'\n"],"file":"index.js"}
@@ -1,8 +1,8 @@
1
1
  import type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen';
2
2
  export declare const apixFilesHost = "http://localhost:30000";
3
3
  interface FullLode {
4
- examples: IExampleMine;
4
+ examples?: IExampleMine;
5
5
  declarations?: IDeclarationMine;
6
6
  }
7
- export declare const getLoded: (examplesLodeUrl: string, declarationsLodeUrl?: string | undefined) => Promise<FullLode>;
7
+ export declare const getLoded: (examplesLodeUrl?: string | undefined, declarationsLodeUrl?: string | undefined) => Promise<FullLode>;
8
8
  export {};
@@ -33,7 +33,7 @@ var getLoded = function () {
33
33
  var _ref2 = _asyncToGenerator(function* (examplesLodeUrl, declarationsLodeUrl) {
34
34
  var examples = yield fetchLode("".concat(apixFilesHost, "/examplesIndex.json"));
35
35
 
36
- if (!examples) {
36
+ if (!examples && examplesLodeUrl) {
37
37
  examples = yield fetchLode(examplesLodeUrl);
38
38
  }
39
39
 
@@ -44,12 +44,8 @@ var getLoded = function () {
44
44
  }
45
45
 
46
46
  var lode = {
47
- examples: {
48
- commitHash: '',
49
- nuggets: {},
50
- remoteOrigin: '',
51
- summaries: {}
52
- }
47
+ examples: undefined,
48
+ declarations: undefined
53
49
  };
54
50
 
55
51
  if (examples) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/lodeUtils.ts"],"names":["apixFilesHost","fetchLode","lodeUrl","result","fetch","mode","text","error","getLoded","examplesLodeUrl","declarationsLodeUrl","examples","declarations","lode","commitHash","nuggets","remoteOrigin","summaries","JSON","parse"],"mappings":";;;;;;;;;;;AA4BO,IAAMA,aAAa,GAAG,wBAAtB;;;AAEP,IAAMC,SAAS;AAAA,+BAAG,WAAOC,OAAP,EAA2B;AAC3C,QAAI;AACF,UAAMC,MAAM,SAASC,KAAK,CAACF,OAAD,EAAU;AAAEG,QAAAA,IAAI,EAAE;AAAR,OAAV,CAA1B;AACA,aAAOF,MAAM,CAACG,IAAP,EAAP;AACD,KAHD,CAGE,OAAOC,KAAP,EAAc;AACd,aAAO,EAAP;AACD;AACF,GAPc;;AAAA,kBAATN,SAAS;AAAA;AAAA;AAAA,GAAf;;AAcO,IAAMO,QAAQ;AAAA,gCAAG,WACtBC,eADsB,EAEtBC,mBAFsB,EAGA;AAEtB,QAAIC,QAAQ,SAASV,SAAS,WAAID,aAAJ,yBAA9B;;AACA,QAAI,CAACW,QAAL,EAAe;AACbA,MAAAA,QAAQ,SAASV,SAAS,CAACQ,eAAD,CAA1B;AACD;;AAED,QAAIG,YAAJ;;AACA,QAAIF,mBAAJ,EAAyB;AACvBE,MAAAA,YAAY,SAASX,SAAS,CAACS,mBAAD,CAA9B;AACD;;AAED,QAAMG,IAAc,GAAG;AACrBF,MAAAA,QAAQ,EAAE;AAAEG,QAAAA,UAAU,EAAE,EAAd;AAAkBC,QAAAA,OAAO,EAAE,EAA3B;AAA+BC,QAAAA,YAAY,EAAE,EAA7C;AAAiDC,QAAAA,SAAS,EAAE;AAA5D;AADW,KAAvB;;AAGA,QAAIN,QAAJ,EAAc;AACZE,MAAAA,IAAI,CAACF,QAAL,GAAgBO,IAAI,CAACC,KAAL,CAAWR,QAAX,CAAhB;AACD;;AACD,QAAIC,YAAJ,EAAkB;AAChBC,MAAAA,IAAI,CAACD,YAAL,GAAoBM,IAAI,CAACC,KAAL,CAAWP,YAAX,CAApB;AACD;;AACD,WAAOC,IAAP;AACD,GAzBoB;;AAAA,kBAARL,QAAQ;AAAA;AAAA;AAAA,GAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'\n\nexport const apixFilesHost = 'http://localhost:30000'\n\nconst fetchLode = async (lodeUrl: string) => {\n try {\n const result = await fetch(lodeUrl, { mode: 'cors' })\n return result.text()\n } catch (error) {\n return ''\n }\n}\n\ninterface FullLode {\n examples: IExampleMine\n declarations?: IDeclarationMine\n}\n\nexport const getLoded = async (\n examplesLodeUrl: string,\n declarationsLodeUrl?: string\n): Promise<FullLode> => {\n // First try to load from the apix-files server\n let examples = await fetchLode(`${apixFilesHost}/examplesIndex.json`)\n if (!examples) {\n examples = await fetchLode(examplesLodeUrl)\n }\n\n let declarations\n if (declarationsLodeUrl) {\n declarations = await fetchLode(declarationsLodeUrl)\n }\n\n const lode: FullLode = {\n examples: { commitHash: '', nuggets: {}, remoteOrigin: '', summaries: {} },\n }\n if (examples) {\n lode.examples = JSON.parse(examples)\n }\n if (declarations) {\n lode.declarations = JSON.parse(declarations)\n }\n return lode\n}\n"],"file":"lodeUtils.js"}
1
+ {"version":3,"sources":["../../src/utils/lodeUtils.ts"],"names":["apixFilesHost","fetchLode","lodeUrl","result","fetch","mode","text","error","getLoded","examplesLodeUrl","declarationsLodeUrl","examples","declarations","lode","undefined","JSON","parse"],"mappings":";;;;;;;;;;;AA4BO,IAAMA,aAAa,GAAG,wBAAtB;;;AAEP,IAAMC,SAAS;AAAA,+BAAG,WAAOC,OAAP,EAA2B;AAC3C,QAAI;AACF,UAAMC,MAAM,SAASC,KAAK,CAACF,OAAD,EAAU;AAAEG,QAAAA,IAAI,EAAE;AAAR,OAAV,CAA1B;AACA,aAAOF,MAAM,CAACG,IAAP,EAAP;AACD,KAHD,CAGE,OAAOC,KAAP,EAAc;AACd,aAAO,EAAP;AACD;AACF,GAPc;;AAAA,kBAATN,SAAS;AAAA;AAAA;AAAA,GAAf;;AAcO,IAAMO,QAAQ;AAAA,gCAAG,WACtBC,eADsB,EAEtBC,mBAFsB,EAGA;AAEtB,QAAIC,QAAQ,SAASV,SAAS,WAAID,aAAJ,yBAA9B;;AACA,QAAI,CAACW,QAAD,IAAaF,eAAjB,EAAkC;AAChCE,MAAAA,QAAQ,SAASV,SAAS,CAACQ,eAAD,CAA1B;AACD;;AAED,QAAIG,YAAJ;;AACA,QAAIF,mBAAJ,EAAyB;AACvBE,MAAAA,YAAY,SAASX,SAAS,CAACS,mBAAD,CAA9B;AACD;;AAED,QAAMG,IAAc,GAAG;AAAEF,MAAAA,QAAQ,EAAEG,SAAZ;AAAuBF,MAAAA,YAAY,EAAEE;AAArC,KAAvB;;AACA,QAAIH,QAAJ,EAAc;AACZE,MAAAA,IAAI,CAACF,QAAL,GAAgBI,IAAI,CAACC,KAAL,CAAWL,QAAX,CAAhB;AACD;;AACD,QAAIC,YAAJ,EAAkB;AAChBC,MAAAA,IAAI,CAACD,YAAL,GAAoBG,IAAI,CAACC,KAAL,CAAWJ,YAAX,CAApB;AACD;;AACD,WAAOC,IAAP;AACD,GAvBoB;;AAAA,kBAARL,QAAQ;AAAA;AAAA;AAAA,GAAd","sourcesContent":["/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n\nimport type { IDeclarationMine, IExampleMine } from '@looker/sdk-codegen'\n\nexport const apixFilesHost = 'http://localhost:30000'\n\nconst fetchLode = async (lodeUrl: string) => {\n try {\n const result = await fetch(lodeUrl, { mode: 'cors' })\n return result.text()\n } catch (error) {\n return ''\n }\n}\n\ninterface FullLode {\n examples?: IExampleMine\n declarations?: IDeclarationMine\n}\n\nexport const getLoded = async (\n examplesLodeUrl?: string,\n declarationsLodeUrl?: string\n): Promise<FullLode> => {\n // First try to load from the apix-files server\n let examples = await fetchLode(`${apixFilesHost}/examplesIndex.json`)\n if (!examples && examplesLodeUrl) {\n examples = await fetchLode(examplesLodeUrl)\n }\n\n let declarations\n if (declarationsLodeUrl) {\n declarations = await fetchLode(declarationsLodeUrl)\n }\n\n const lode: FullLode = { examples: undefined, declarations: undefined }\n if (examples) {\n lode.examples = JSON.parse(examples)\n }\n if (declarations) {\n lode.declarations = JSON.parse(declarations)\n }\n return lode\n}\n"],"file":"lodeUtils.js"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@looker/api-explorer",
3
- "version": "0.9.22",
3
+ "version": "0.9.24",
4
4
  "description": "Looker API Explorer",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
7
- "sideEffects": "false",
7
+ "sideEffects": false,
8
8
  "typings": "lib/index.d.ts",
9
9
  "license": "MIT",
10
10
  "author": "Looker",
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@looker/components-test-utils": "^1.5.5",
36
- "@looker/sdk-codegen-scripts": "^21.1.2",
37
- "@looker/sdk-node": "^21.18.1",
36
+ "@looker/sdk-codegen-scripts": "^21.1.4",
37
+ "@looker/sdk-node": "^21.20.0",
38
38
  "@styled-icons/styled-icon": "^10.6.3",
39
39
  "@testing-library/jest-dom": "^5.11.6",
40
40
  "@testing-library/react": "^11.2.2",
@@ -67,16 +67,17 @@
67
67
  "webpack-merge": "^5.7.3"
68
68
  },
69
69
  "dependencies": {
70
- "@looker/code-editor": "^0.1.13",
70
+ "@looker/code-editor": "^0.1.15",
71
71
  "@looker/components": "^2.8.1",
72
72
  "@looker/components-date": "^2.4.1",
73
73
  "@looker/design-tokens": "^2.7.1",
74
+ "@looker/extension-utils": "^0.1.1",
74
75
  "@looker/icons": "^1.5.3",
75
76
  "@looker/redux": "0.0.0",
76
- "@looker/run-it": "^0.9.22",
77
- "@looker/sdk": "^21.18.1",
78
- "@looker/sdk-codegen": "^21.1.1",
79
- "@looker/sdk-rtl": "^21.1.1",
77
+ "@looker/run-it": "^0.9.24",
78
+ "@looker/sdk": "^21.20.0",
79
+ "@looker/sdk-codegen": "^21.2.1",
80
+ "@looker/sdk-rtl": "^21.2.0",
80
81
  "@reduxjs/toolkit": "^1.6.2",
81
82
  "@styled-icons/material": "^10.28.0",
82
83
  "@styled-icons/material-outlined": "^10.28.0",
@@ -95,5 +96,5 @@
95
96
  "ts-jest": "^26.2.0",
96
97
  "typed-redux-saga": "^1.3.1"
97
98
  },
98
- "gitHead": "0895f80066d2655a93f7e43b2b9eda0f40a6f2d5"
99
+ "gitHead": "8dd5e6b5ec8321871167e88081d1fcb39a8182aa"
99
100
  }