docusaurus-theme-openapi-docs 0.0.0-619 → 0.0.0-685

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 (390) hide show
  1. package/lib/index.d.ts +2 -0
  2. package/lib/index.js +53 -27
  3. package/lib/markdown/createDescription.d.ts +1 -0
  4. package/lib/markdown/createDescription.js +8 -11
  5. package/lib/markdown/schema.d.ts +3 -0
  6. package/lib/markdown/schema.js +138 -139
  7. package/lib/markdown/utils.d.ts +8 -0
  8. package/lib/markdown/utils.js +36 -42
  9. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
  10. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
  11. package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
  12. package/lib/theme/ApiExplorer/Accept/index.js +38 -0
  13. package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
  14. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Accept/slice.js +7 -5
  15. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  16. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
  17. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
  18. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -0
  19. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  20. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  21. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +74 -0
  22. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  23. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
  24. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  25. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
  26. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
  27. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
  28. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  29. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
  30. package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
  31. package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
  32. package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.js +4 -10
  33. package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
  34. package/lib/theme/ApiExplorer/Authorization/index.js +157 -0
  35. package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
  36. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Authorization/slice.js +23 -16
  37. package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
  38. package/lib/theme/ApiExplorer/Body/index.js +363 -0
  39. package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
  40. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/slice.js +21 -12
  41. package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +20 -0
  42. package/lib/theme/ApiExplorer/CodeSnippets/index.js +406 -0
  43. package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
  44. package/lib/theme/ApiExplorer/CodeTabs/index.js +174 -0
  45. package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
  46. package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
  47. package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
  48. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ContentType/slice.js +7 -5
  49. package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
  50. package/lib/theme/ApiExplorer/Export/index.js +57 -0
  51. package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
  52. package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
  53. package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
  54. package/{lib-next/theme/ApiDemoPanel/FormFileUpload/styles.module.css → lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
  55. package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
  56. package/lib/theme/ApiExplorer/FormFileUpload/index.js +161 -0
  57. package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  58. package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
  59. package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
  60. package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  61. package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
  62. package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
  63. package/{src/theme/ApiDemoPanel/FormSelect/styles.module.css → lib/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
  64. package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
  65. package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
  66. package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  67. package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
  68. package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
  69. package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  70. package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
  71. package/lib/theme/ApiExplorer/LiveEditor/index.js +154 -0
  72. package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  73. package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +7 -0
  74. package/lib/theme/ApiExplorer/MethodEndpoint/index.js +83 -0
  75. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
  76. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +194 -0
  77. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
  78. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
  79. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
  80. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
  81. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
  82. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
  83. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
  84. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
  85. package/{src/theme/ApiDemoPanel/ParamOptions/styles.module.css → lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
  86. package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
  87. package/lib/theme/ApiExplorer/ParamOptions/index.js +210 -0
  88. package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
  89. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ParamOptions/slice.js +7 -5
  90. package/lib/theme/ApiExplorer/Request/_Request.scss +122 -0
  91. package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
  92. package/lib/theme/ApiExplorer/Request/index.js +365 -0
  93. package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
  94. package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiExplorer/Request}/makeRequest.js +10 -9
  95. package/lib/theme/ApiExplorer/Response/_Response.scss +119 -0
  96. package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
  97. package/lib/theme/ApiExplorer/Response/index.js +190 -0
  98. package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
  99. package/lib/theme/ApiExplorer/Response/slice.js +51 -0
  100. package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
  101. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
  102. package/{src/theme/ApiDemoPanel/Request/styles.module.css → lib/theme/ApiExplorer/Server/_Server.scss} +15 -7
  103. package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
  104. package/lib/theme/ApiExplorer/Server/index.js +187 -0
  105. package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
  106. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Server/slice.js +10 -5
  107. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
  108. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/buildPostmanRequest.js +27 -40
  109. package/lib/theme/ApiExplorer/index.d.ts +7 -0
  110. package/lib/theme/ApiExplorer/index.js +37 -0
  111. package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
  112. package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/persistanceMiddleware.js +11 -14
  113. package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
  114. package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.js +14 -13
  115. package/lib/theme/ApiItem/Layout/index.d.ts +4 -0
  116. package/lib/theme/ApiItem/Layout/index.js +78 -56
  117. package/lib/theme/ApiItem/hooks.d.ts +12 -0
  118. package/lib/theme/ApiItem/hooks.js +5 -10
  119. package/lib/theme/ApiItem/index.d.ts +4 -0
  120. package/lib/theme/ApiItem/index.js +141 -118
  121. package/lib/theme/ApiItem/store.d.ts +46 -0
  122. package/lib/theme/ApiItem/store.js +44 -34
  123. package/lib/theme/ApiLogo/index.d.ts +2 -0
  124. package/lib/theme/ApiLogo/index.js +34 -32
  125. package/lib/theme/ApiTabs/_ApiTabs.scss +140 -0
  126. package/lib/theme/ApiTabs/index.js +105 -190
  127. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
  128. package/lib/theme/DiscriminatorTabs/index.js +102 -189
  129. package/lib/theme/Markdown/Details/_Details.scss +119 -0
  130. package/lib/theme/MimeTabs/_MimeTabs.scss +69 -0
  131. package/lib/theme/MimeTabs/index.js +125 -199
  132. package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
  133. package/lib/theme/ParamsItem/index.js +9 -8
  134. package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  135. package/lib/theme/ResponseSamples/index.js +2 -7
  136. package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
  137. package/lib/theme/SchemaItem/index.js +31 -22
  138. package/lib/theme/SchemaTabs/_SchemaTabs.scss +64 -0
  139. package/lib/theme/SchemaTabs/index.js +97 -185
  140. package/lib/theme/styles.scss +160 -0
  141. package/lib/types.d.ts +157 -0
  142. package/lib/types.js +8 -1
  143. package/package.json +17 -23
  144. package/src/index.ts +33 -3
  145. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
  146. package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
  147. package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.tsx +2 -2
  148. package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  149. package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
  150. package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
  151. package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -0
  152. package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  153. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  154. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +74 -0
  155. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  156. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
  157. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  158. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
  159. package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
  160. package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
  161. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  162. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
  163. package/src/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
  164. package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.tsx +3 -3
  165. package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.ts +1 -1
  166. package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/index.tsx +64 -41
  167. package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +94 -34
  168. package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
  169. package/src/theme/ApiExplorer/CodeTabs/index.js +174 -0
  170. package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
  171. package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
  172. package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -3
  173. package/src/theme/{ApiDemoPanel/FormFileUpload/styles.module.css → ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
  174. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +10 -6
  175. package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  176. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +8 -12
  177. package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  178. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +6 -3
  179. package/{lib/theme/ApiDemoPanel/FormSelect/styles.module.css → src/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
  180. package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +5 -3
  181. package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  182. package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
  183. package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  184. package/src/theme/ApiExplorer/LiveEditor/index.tsx +112 -0
  185. package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  186. package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +87 -0
  187. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +156 -0
  188. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
  189. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
  190. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
  191. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
  192. package/{lib-next/theme/ApiDemoPanel/ParamOptions/styles.module.css → src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
  193. package/src/theme/ApiExplorer/ParamOptions/index.tsx +145 -0
  194. package/src/theme/ApiExplorer/Request/_Request.scss +122 -0
  195. package/src/theme/ApiExplorer/Request/index.tsx +286 -0
  196. package/src/theme/{ApiDemoPanel/Execute → ApiExplorer/Request}/makeRequest.ts +9 -6
  197. package/src/theme/ApiExplorer/Response/_Response.scss +119 -0
  198. package/src/theme/ApiExplorer/Response/index.tsx +154 -0
  199. package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.ts +22 -1
  200. package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +5 -3
  201. package/{lib/theme/ApiDemoPanel/Request/styles.module.css → src/theme/ApiExplorer/Server/_Server.scss} +15 -7
  202. package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +13 -17
  203. package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
  204. package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +14 -17
  205. package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
  206. package/src/theme/ApiItem/index.tsx +7 -7
  207. package/src/theme/ApiItem/store.ts +7 -7
  208. package/src/theme/ApiTabs/_ApiTabs.scss +140 -0
  209. package/src/theme/ApiTabs/index.js +105 -190
  210. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
  211. package/src/theme/DiscriminatorTabs/index.js +102 -189
  212. package/src/theme/Markdown/Details/_Details.scss +119 -0
  213. package/src/theme/MimeTabs/_MimeTabs.scss +69 -0
  214. package/src/theme/MimeTabs/index.js +125 -199
  215. package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
  216. package/src/theme/ParamsItem/index.js +9 -8
  217. package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
  218. package/src/theme/ResponseSamples/index.js +2 -7
  219. package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
  220. package/src/theme/SchemaItem/index.js +31 -22
  221. package/src/theme/SchemaTabs/_SchemaTabs.scss +64 -0
  222. package/src/theme/SchemaTabs/index.js +97 -185
  223. package/src/theme/styles.scss +160 -0
  224. package/src/theme-openapi.d.ts +90 -47
  225. package/tsconfig.json +6 -3
  226. package/lib/postman-code-generators.d.ts +0 -9
  227. package/lib/react-magic-dropzone.d.ts +0 -9
  228. package/lib/theme/ApiDemoPanel/Accept/index.js +0 -32
  229. package/lib/theme/ApiDemoPanel/Accept/slice.js +0 -31
  230. package/lib/theme/ApiDemoPanel/Authorization/index.js +0 -107
  231. package/lib/theme/ApiDemoPanel/Authorization/slice.js +0 -123
  232. package/lib/theme/ApiDemoPanel/Body/index.js +0 -256
  233. package/lib/theme/ApiDemoPanel/Body/slice.js +0 -102
  234. package/lib/theme/ApiDemoPanel/CodeTabs/index.js +0 -161
  235. package/lib/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
  236. package/lib/theme/ApiDemoPanel/ContentType/index.js +0 -32
  237. package/lib/theme/ApiDemoPanel/ContentType/slice.js +0 -31
  238. package/lib/theme/ApiDemoPanel/Curl/index.js +0 -240
  239. package/lib/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
  240. package/lib/theme/ApiDemoPanel/Execute/index.js +0 -151
  241. package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +0 -181
  242. package/lib/theme/ApiDemoPanel/Export/index.js +0 -47
  243. package/lib/theme/ApiDemoPanel/FloatingButton/index.js +0 -30
  244. package/lib/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
  245. package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +0 -83
  246. package/lib/theme/ApiDemoPanel/FormFileUpload/styles.module.css +0 -75
  247. package/lib/theme/ApiDemoPanel/FormItem/index.js +0 -38
  248. package/lib/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
  249. package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
  250. package/lib/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
  251. package/lib/theme/ApiDemoPanel/FormSelect/index.js +0 -34
  252. package/lib/theme/ApiDemoPanel/FormTextInput/index.js +0 -28
  253. package/lib/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
  254. package/lib/theme/ApiDemoPanel/LiveEditor/index.js +0 -62
  255. package/lib/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
  256. package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -56
  257. package/lib/theme/ApiDemoPanel/ParamOptions/index.js +0 -216
  258. package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +0 -34
  259. package/lib/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -176
  260. package/lib/theme/ApiDemoPanel/Request/index.js +0 -67
  261. package/lib/theme/ApiDemoPanel/Response/index.js +0 -66
  262. package/lib/theme/ApiDemoPanel/Response/slice.js +0 -36
  263. package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -257
  264. package/lib/theme/ApiDemoPanel/Server/index.js +0 -104
  265. package/lib/theme/ApiDemoPanel/Server/slice.js +0 -40
  266. package/lib/theme/ApiDemoPanel/Server/styles.module.css +0 -56
  267. package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +0 -303
  268. package/lib/theme/ApiDemoPanel/index.js +0 -41
  269. package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +0 -59
  270. package/lib/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
  271. package/lib/theme/ApiDemoPanel/react-modal.d.ts +0 -8
  272. package/lib/theme/ApiTabs/styles.module.css +0 -120
  273. package/lib/theme/DiscriminatorTabs/styles.module.css +0 -119
  274. package/lib/theme/MimeTabs/styles.module.css +0 -126
  275. package/lib/theme/ParamsItem/styles.module.css +0 -24
  276. package/lib/theme/ResponseSamples/styles.module.css +0 -7
  277. package/lib/theme/SchemaItem/styles.module.css +0 -38
  278. package/lib/theme/SchemaTabs/styles.module.css +0 -110
  279. package/lib/theme/styles.css +0 -520
  280. package/lib/theme-classic.d.ts +0 -13
  281. package/lib/theme-openapi.d.ts +0 -234
  282. package/lib/theme-translations.d.ts +0 -9
  283. package/lib-next/index.js +0 -29
  284. package/lib-next/markdown/createDescription.js +0 -13
  285. package/lib-next/markdown/schema.js +0 -153
  286. package/lib-next/markdown/utils.js +0 -44
  287. package/lib-next/postman-code-generators.d.ts +0 -9
  288. package/lib-next/react-magic-dropzone.d.ts +0 -9
  289. package/lib-next/theme/ApiDemoPanel/Accept/index.js +0 -30
  290. package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +0 -29
  291. package/lib-next/theme/ApiDemoPanel/Authorization/index.js +0 -142
  292. package/lib-next/theme/ApiDemoPanel/Body/index.js +0 -324
  293. package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +0 -201
  294. package/lib-next/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
  295. package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
  296. package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -283
  297. package/lib-next/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
  298. package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -167
  299. package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
  300. package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -22
  301. package/lib-next/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
  302. package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -106
  303. package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -36
  304. package/lib-next/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
  305. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
  306. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
  307. package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -26
  308. package/lib-next/theme/ApiDemoPanel/FormSelect/styles.module.css +0 -51
  309. package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -24
  310. package/lib-next/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
  311. package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -59
  312. package/lib-next/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
  313. package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -53
  314. package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -292
  315. package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -60
  316. package/lib-next/theme/ApiDemoPanel/Request/styles.module.css +0 -18
  317. package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -67
  318. package/lib-next/theme/ApiDemoPanel/Response/slice.js +0 -23
  319. package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
  320. package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -132
  321. package/lib-next/theme/ApiDemoPanel/Server/styles.module.css +0 -56
  322. package/lib-next/theme/ApiDemoPanel/index.js +0 -28
  323. package/lib-next/theme/ApiDemoPanel/storage-utils.js +0 -33
  324. package/lib-next/theme/ApiItem/Layout/index.js +0 -68
  325. package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -17
  326. package/lib-next/theme/ApiItem/hooks.js +0 -10
  327. package/lib-next/theme/ApiItem/index.js +0 -155
  328. package/lib-next/theme/ApiItem/store.js +0 -38
  329. package/lib-next/theme/ApiLogo/index.js +0 -48
  330. package/lib-next/theme/ApiTabs/index.js +0 -277
  331. package/lib-next/theme/ApiTabs/styles.module.css +0 -120
  332. package/lib-next/theme/DiscriminatorTabs/index.js +0 -272
  333. package/lib-next/theme/DiscriminatorTabs/styles.module.css +0 -119
  334. package/lib-next/theme/MimeTabs/index.js +0 -295
  335. package/lib-next/theme/MimeTabs/styles.module.css +0 -126
  336. package/lib-next/theme/ParamsItem/index.js +0 -135
  337. package/lib-next/theme/ParamsItem/styles.module.css +0 -24
  338. package/lib-next/theme/ResponseSamples/index.js +0 -27
  339. package/lib-next/theme/ResponseSamples/styles.module.css +0 -7
  340. package/lib-next/theme/SchemaItem/index.js +0 -114
  341. package/lib-next/theme/SchemaItem/styles.module.css +0 -38
  342. package/lib-next/theme/SchemaTabs/index.js +0 -270
  343. package/lib-next/theme/SchemaTabs/styles.module.css +0 -110
  344. package/lib-next/theme/styles.css +0 -520
  345. package/lib-next/theme-classic.d.ts +0 -13
  346. package/lib-next/theme-openapi.d.ts +0 -234
  347. package/lib-next/theme-translations.d.ts +0 -9
  348. package/lib-next/types.js +0 -1
  349. package/src/theme/ApiDemoPanel/Body/json2xml.js +0 -43
  350. package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +0 -239
  351. package/src/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
  352. package/src/theme/ApiDemoPanel/Curl/languages.json +0 -1386
  353. package/src/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
  354. package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -189
  355. package/src/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
  356. package/src/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
  357. package/src/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
  358. package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +0 -34
  359. package/src/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
  360. package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +0 -75
  361. package/src/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
  362. package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +0 -62
  363. package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +0 -326
  364. package/src/theme/ApiDemoPanel/Request/index.tsx +0 -71
  365. package/src/theme/ApiDemoPanel/Response/index.tsx +0 -75
  366. package/src/theme/ApiDemoPanel/Server/styles.module.css +0 -56
  367. package/src/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
  368. package/src/theme/ApiDemoPanel/react-modal.d.ts +0 -8
  369. package/src/theme/ApiTabs/styles.module.css +0 -120
  370. package/src/theme/DiscriminatorTabs/styles.module.css +0 -119
  371. package/src/theme/MimeTabs/styles.module.css +0 -126
  372. package/src/theme/ParamsItem/styles.module.css +0 -24
  373. package/src/theme/ResponseSamples/styles.module.css +0 -7
  374. package/src/theme/SchemaItem/styles.module.css +0 -38
  375. package/src/theme/SchemaTabs/styles.module.css +0 -110
  376. package/src/theme/styles.css +0 -520
  377. /package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/json2xml.js +0 -0
  378. /package/{lib-next/theme/ApiDemoPanel/Curl → lib/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
  379. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.ts +0 -0
  380. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.ts +0 -0
  381. /package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/Body/json2xml.js +0 -0
  382. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.ts +0 -0
  383. /package/{lib/theme/ApiDemoPanel/Curl → src/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
  384. /package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.ts +0 -0
  385. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Export/index.tsx +0 -0
  386. /package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.ts +0 -0
  387. /package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.ts +0 -0
  388. /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/postman-collection.d.ts +0 -0
  389. /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/react-modal.d.ts +0 -0
  390. /package/src/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.ts +0 -0
@@ -1,326 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- * ========================================================================== */
7
-
8
- import React, { useState, useEffect } from "react";
9
-
10
- import { nanoid } from "@reduxjs/toolkit";
11
- import FormItem from "@theme/ApiDemoPanel/FormItem";
12
- import FormMultiSelect from "@theme/ApiDemoPanel/FormMultiSelect";
13
- import FormSelect from "@theme/ApiDemoPanel/FormSelect";
14
- import FormTextInput from "@theme/ApiDemoPanel/FormTextInput";
15
- import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
16
-
17
- import { Param, setParam } from "./slice";
18
- import styles from "./styles.module.css";
19
-
20
- export interface ParamProps {
21
- param: Param;
22
- }
23
-
24
- function ParamOption({ param }: ParamProps) {
25
- if (param.schema?.type === "array" && param.schema.items?.enum) {
26
- return <ParamMultiSelectFormItem param={param} />;
27
- }
28
-
29
- if (param.schema?.type === "array") {
30
- return <ParamArrayFormItem param={param} />;
31
- }
32
-
33
- if (param.schema?.enum) {
34
- return <ParamSelectFormItem param={param} />;
35
- }
36
-
37
- if (param.schema?.type === "boolean") {
38
- return <ParamBooleanFormItem param={param} />;
39
- }
40
-
41
- // integer, number, string, int32, int64, float, double, object, byte, binary,
42
- // date-time, date, password
43
- return <ParamTextFormItem param={param} />;
44
- }
45
-
46
- function ParamOptionWrapper({ param }: ParamProps) {
47
- return (
48
- <FormItem label={param.name} type={param.in} required={param.required}>
49
- <ParamOption param={param} />
50
- </FormItem>
51
- );
52
- }
53
-
54
- function ParamOptions() {
55
- const [showOptional, setShowOptional] = useState(false);
56
-
57
- const pathParams = useTypedSelector((state: any) => state.params.path);
58
- const queryParams = useTypedSelector((state: any) => state.params.query);
59
- const cookieParams = useTypedSelector((state: any) => state.params.cookie);
60
- const headerParams = useTypedSelector((state: any) => state.params.header);
61
-
62
- const allParams = [
63
- ...pathParams,
64
- ...queryParams,
65
- ...cookieParams,
66
- ...headerParams,
67
- ];
68
-
69
- const requiredParams = allParams.filter((p) => p.required);
70
- const optionalParams = allParams.filter((p) => !p.required);
71
-
72
- return (
73
- <>
74
- {/* Required Parameters */}
75
- {requiredParams.map((param) => (
76
- <ParamOptionWrapper key={`${param.in}-${param.name}`} param={param} />
77
- ))}
78
-
79
- {/* Optional Parameters */}
80
- {optionalParams.length > 0 && (
81
- <>
82
- <button
83
- className={styles.showMoreButton}
84
- onClick={() => setShowOptional((prev) => !prev)}
85
- >
86
- <span
87
- style={{
88
- width: "1.5em",
89
- display: "inline-block",
90
- textAlign: "center",
91
- }}
92
- >
93
- <span
94
- className={showOptional ? styles.plusExpanded : styles.plus}
95
- >
96
- <div>
97
- <svg
98
- style={{
99
- fill: "currentColor",
100
- width: "10px",
101
- height: "10px",
102
- }}
103
- height="16"
104
- viewBox="0 0 16 16"
105
- width="16"
106
- xmlns="http://www.w3.org/2000/svg"
107
- >
108
- <path
109
- d="M9 7h6a1 1 0 0 1 0 2H9v6a1 1 0 0 1-2 0V9H1a1 1 0 1 1 0-2h6V1a1 1 0 1 1 2 0z"
110
- fillRule="evenodd"
111
- ></path>
112
- </svg>
113
- </div>
114
- </span>
115
- </span>
116
- {showOptional
117
- ? "Hide optional parameters"
118
- : "Show optional parameters"}
119
- </button>
120
-
121
- <div
122
- className={showOptional ? styles.showOptions : styles.hideOptions}
123
- >
124
- {optionalParams.map((param) => (
125
- <ParamOptionWrapper
126
- key={`${param.in}-${param.name}`}
127
- param={param}
128
- />
129
- ))}
130
- </div>
131
- </>
132
- )}
133
- </>
134
- );
135
- }
136
-
137
- function ArrayItem({
138
- param,
139
- onChange,
140
- }: ParamProps & { onChange(value?: string): any }) {
141
- if (param.schema?.items?.type === "boolean") {
142
- return (
143
- <FormSelect
144
- options={["---", "true", "false"]}
145
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
146
- const val = e.target.value;
147
- onChange(val === "---" ? undefined : val);
148
- }}
149
- />
150
- );
151
- }
152
-
153
- return (
154
- <FormTextInput
155
- placeholder={param.description || param.name}
156
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
157
- onChange(e.target.value);
158
- }}
159
- />
160
- );
161
- }
162
-
163
- function ParamArrayFormItem({ param }: ParamProps) {
164
- const [items, setItems] = useState<{ id: string; value?: string }[]>([]);
165
- const dispatch = useTypedDispatch();
166
-
167
- function handleAddItem() {
168
- setItems((i) => [
169
- ...i,
170
- {
171
- id: nanoid(),
172
- },
173
- ]);
174
- }
175
-
176
- useEffect(() => {
177
- const values = items
178
- .map((item) => item.value)
179
- .filter((item): item is string => !!item);
180
-
181
- dispatch(
182
- setParam({
183
- ...param,
184
- value: values.length > 0 ? values : undefined,
185
- })
186
- );
187
- // eslint-disable-next-line react-hooks/exhaustive-deps
188
- }, [items]);
189
-
190
- function handleDeleteItem(itemToDelete: { id: string }) {
191
- return () => {
192
- const newItems = items.filter((i) => i.id !== itemToDelete.id);
193
- setItems(newItems);
194
- };
195
- }
196
-
197
- function handleChangeItem(itemToUpdate: { id: string }) {
198
- return (value: string) => {
199
- const newItems = items.map((i) => {
200
- if (i.id === itemToUpdate.id) {
201
- return { ...i, value: value };
202
- }
203
- return i;
204
- });
205
- setItems(newItems);
206
- };
207
- }
208
-
209
- return (
210
- <>
211
- {items.map((item) => (
212
- <div key={item.id} style={{ display: "flex" }}>
213
- <ArrayItem param={param} onChange={handleChangeItem(item)} />
214
- <button
215
- className={styles.buttonDelete}
216
- onClick={handleDeleteItem(item)}
217
- >
218
- <svg
219
- focusable="false"
220
- preserveAspectRatio="xMidYMid meet"
221
- xmlns="http://www.w3.org/2000/svg"
222
- fill="currentColor"
223
- width="16"
224
- height="16"
225
- viewBox="0 0 32 32"
226
- aria-hidden="true"
227
- >
228
- <path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>
229
- <title>Delete</title>
230
- </svg>
231
- </button>
232
- </div>
233
- ))}
234
- <button className={styles.buttonThin} onClick={handleAddItem}>
235
- Add item
236
- </button>
237
- </>
238
- );
239
- }
240
-
241
- function ParamSelectFormItem({ param }: ParamProps) {
242
- const dispatch = useTypedDispatch();
243
-
244
- const options = param.schema?.enum ?? [];
245
-
246
- return (
247
- <FormSelect
248
- options={["---", ...(options as string[])]}
249
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
250
- const val = e.target.value;
251
- dispatch(
252
- setParam({
253
- ...param,
254
- value: val === "---" ? undefined : val,
255
- })
256
- );
257
- }}
258
- />
259
- );
260
- }
261
-
262
- function ParamBooleanFormItem({ param }: ParamProps) {
263
- const dispatch = useTypedDispatch();
264
-
265
- return (
266
- <FormSelect
267
- options={["---", "true", "false"]}
268
- onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
269
- const val = e.target.value;
270
- dispatch(
271
- setParam({
272
- ...param,
273
- value: val === "---" ? undefined : val,
274
- })
275
- );
276
- }}
277
- />
278
- );
279
- }
280
-
281
- function ParamMultiSelectFormItem({ param }: ParamProps) {
282
- const dispatch = useTypedDispatch();
283
-
284
- const options = param.schema?.items?.enum ?? [];
285
-
286
- return (
287
- <FormMultiSelect
288
- options={options as string[]}
289
- onChange={(e: any) => {
290
- const values = Array.prototype.filter
291
- .call(e.target.options, (o) => o.selected)
292
- .map((o) => o.value);
293
-
294
- dispatch(
295
- setParam({
296
- ...param,
297
- value: values.length > 0 ? values : undefined,
298
- })
299
- );
300
- }}
301
- />
302
- );
303
- }
304
-
305
- function ParamTextFormItem({ param }: ParamProps) {
306
- const dispatch = useTypedDispatch();
307
-
308
- return (
309
- <FormTextInput
310
- placeholder={param.description || param.name}
311
- onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
312
- dispatch(
313
- setParam({
314
- ...param,
315
- value:
316
- param.in === "path" || param.in === "query"
317
- ? e.target.value.replace(/\s/g, "%20")
318
- : e.target.value,
319
- })
320
- )
321
- }
322
- />
323
- );
324
- }
325
-
326
- export default ParamOptions;
@@ -1,71 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- * ========================================================================== */
7
-
8
- import React from "react";
9
-
10
- import { useDoc } from "@docusaurus/theme-common/internal";
11
- import sdk from "@paloaltonetworks/postman-collection";
12
- import Accept from "@theme/ApiDemoPanel/Accept";
13
- import Authorization from "@theme/ApiDemoPanel/Authorization";
14
- import Body from "@theme/ApiDemoPanel/Body";
15
- import Execute from "@theme/ApiDemoPanel/Execute";
16
- import ParamOptions from "@theme/ApiDemoPanel/ParamOptions";
17
- import Server from "@theme/ApiDemoPanel/Server";
18
- import { useTypedSelector } from "@theme/ApiItem/hooks";
19
- import { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
20
- import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
21
-
22
- import styles from "./styles.module.css";
23
-
24
- function Request({ item }: { item: NonNullable<ApiItem> }) {
25
- const response = useTypedSelector((state: any) => state.response.value);
26
- const postman = new sdk.Request(item.postman);
27
- const metadata = useDoc();
28
- const { proxy, hide_send_button } = metadata.frontMatter;
29
-
30
- const params = {
31
- path: [] as ParameterObject[],
32
- query: [] as ParameterObject[],
33
- header: [] as ParameterObject[],
34
- cookie: [] as ParameterObject[],
35
- };
36
-
37
- item.parameters?.forEach(
38
- (param: { in: "path" | "query" | "header" | "cookie" }) => {
39
- const paramType = param.in;
40
- const paramsArray: ParameterObject[] = params[paramType];
41
- paramsArray.push(param as ParameterObject);
42
- }
43
- );
44
-
45
- return (
46
- <div>
47
- <details className={`details__demo-panel`} open={response ? false : true}>
48
- <summary>
49
- <div className={`details__request-summary`}>
50
- <h4>Request</h4>
51
- {item.servers && !hide_send_button && (
52
- <Execute postman={postman} proxy={proxy} />
53
- )}
54
- </div>
55
- </summary>
56
- <div className={styles.optionsPanel}>
57
- <Server />
58
- <Authorization />
59
- <ParamOptions />
60
- <Body
61
- jsonRequestBodyExample={item.jsonRequestBodyExample}
62
- requestBodyMetadata={item.requestBody}
63
- />
64
- <Accept />
65
- </div>
66
- </details>
67
- </div>
68
- );
69
- }
70
-
71
- export default Request;
@@ -1,75 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- * ========================================================================== */
7
-
8
- import React from "react";
9
-
10
- import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
11
- import CodeBlock from "@theme/CodeBlock";
12
-
13
- import { clearResponse } from "./slice";
14
-
15
- // TODO: We probably shouldn't attempt to format XML...
16
- function formatXml(xml: string) {
17
- const tab = " ";
18
- let formatted = "";
19
- let indent = "";
20
-
21
- xml.split(/>\s*</).forEach((node) => {
22
- if (node.match(/^\/\w/)) {
23
- // decrease indent by one 'tab'
24
- indent = indent.substring(tab.length);
25
- }
26
- formatted += indent + "<" + node + ">\r\n";
27
- if (node.match(/^<?\w[^>]*[^/]$/)) {
28
- // increase indent
29
- indent += tab;
30
- }
31
- });
32
- return formatted.substring(1, formatted.length - 3);
33
- }
34
-
35
- function Response() {
36
- const response = useTypedSelector((state: any) => state.response.value);
37
- const dispatch = useTypedDispatch();
38
-
39
- if (response === undefined) {
40
- return null;
41
- }
42
-
43
- let prettyResponse: string = response;
44
- try {
45
- prettyResponse = JSON.stringify(JSON.parse(response), null, 2);
46
- } catch {
47
- if (response.startsWith("<")) {
48
- prettyResponse = formatXml(response);
49
- }
50
- }
51
-
52
- return (
53
- <details className={`details__demo-panel`} open={true}>
54
- <summary>
55
- <div className={`details__response-summary`}>
56
- <h4>Response</h4>
57
- <button
58
- className="button button--sm button--secondary"
59
- onClick={() => dispatch(clearResponse())}
60
- >
61
- Clear
62
- </button>
63
- </div>
64
- </summary>
65
- <CodeBlock
66
- language={response.startsWith("<") ? `xml` : `json`}
67
- className="openapi-demo__code-block"
68
- >
69
- {prettyResponse || "No Response"}
70
- </CodeBlock>
71
- </details>
72
- );
73
- }
74
-
75
- export default Response;
@@ -1,56 +0,0 @@
1
- .showMoreButton {
2
- -webkit-appearance: none;
3
- -moz-appearance: none;
4
- appearance: none;
5
-
6
- cursor: pointer;
7
- font-size: var(--ifm-code-font-size);
8
- /* font-weight: var(--ifm-button-font-weight); */
9
- /* line-height: 1.5; */
10
-
11
- padding: 0;
12
-
13
- user-select: none;
14
- white-space: nowrap;
15
-
16
- border: 0px solid transparent;
17
-
18
- display: block;
19
- /* width: 100%; */
20
-
21
- background-color: transparent;
22
-
23
- color: var(--ifm-color-primary);
24
- cursor: pointer;
25
- margin-top: var(--ifm-pre-padding);
26
- margin-bottom: 0;
27
- text-align: left;
28
- display: block;
29
- }
30
-
31
- .showMoreButton:hover {
32
- /* text-decoration: underline; */
33
- /* background-color: red; */
34
- color: var(--ifm-color-primary-hover);
35
- }
36
-
37
- .showMoreButton:first-child {
38
- margin-top: 0;
39
- }
40
-
41
- .optionsPanel:empty {
42
- display: none;
43
- }
44
-
45
- .optionsPanel {
46
- background: var(--openapi-card-background-color);
47
- border-radius: var(--openapi-card-border-radius);
48
- color: var(--ifm-pre-color);
49
- line-height: var(--ifm-pre-line-height);
50
- margin-bottom: var(--ifm-spacing-vertical);
51
- margin-top: 0;
52
- overflow: auto;
53
-
54
- /* hack for view calculation when monaco is hidden */
55
- position: relative;
56
- }
@@ -1,10 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- * ========================================================================== */
7
-
8
- declare module "@paloaltonetworks/postman-collection" {
9
- export = Request.sdk;
10
- }
@@ -1,8 +0,0 @@
1
- /* ============================================================================
2
- * Copyright (c) Palo Alto Networks
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- * ========================================================================== */
7
-
8
- declare module "react-modal";
@@ -1,120 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- .tabItem {
9
- display: flex;
10
- align-items: center;
11
- justify-content: center;
12
- height: 2.5rem;
13
- margin-top: 0 !important;
14
- margin-right: 0.5rem;
15
- border: 1px solid var(--ifm-color-primary);
16
- border-radius: var(--ifm-global-radius);
17
- color: var(--ifm-color-primary);
18
- font-weight: var(--ifm-font-weight-normal);
19
- }
20
-
21
- .tabItem:not(.active) {
22
- opacity: 0.65;
23
- }
24
-
25
- .tabItem:hover {
26
- opacity: 1;
27
- }
28
-
29
- .tabItem:last-child {
30
- margin-right: 0 !important;
31
- }
32
-
33
- /* Open API Response Code Tabs */
34
- .responseTabsTopSection {
35
- margin-top: 2rem;
36
- display: flex;
37
- justify-content: space-between;
38
- align-items: center;
39
- }
40
-
41
- .responseTabsContainer {
42
- display: flex;
43
- align-items: center;
44
- max-width: 390px;
45
- padding-left: 1rem;
46
- overflow: hidden;
47
- }
48
-
49
- .responseTabsListContainer {
50
- padding: 0 0.25rem;
51
- overflow-y: hidden;
52
- overflow-x: scroll;
53
- scroll-behavior: smooth;
54
- }
55
-
56
- .responseTabsListContainer::-webkit-scrollbar {
57
- display: none;
58
- }
59
-
60
- /* Response Code Tabs - Colored Dots */
61
- .responseTabDot {
62
- width: 12.5px;
63
- height: 12.5px;
64
- margin-right: 5px;
65
- border-radius: 50%;
66
- }
67
-
68
- .responseStatusSuccess > .responseTabDot {
69
- background-color: var(--ifm-color-success);
70
- }
71
-
72
- .responseStatusDanger > .responseTabDot {
73
- background-color: var(--ifm-color-danger);
74
- }
75
-
76
- .responseStatusInfo > .responseTabDot {
77
- background-color: var(--ifm-color-info);
78
- }
79
-
80
- .active {
81
- background-color: var(--ifm-color-emphasis-100);
82
- }
83
-
84
- .responseSchemaContainer {
85
- max-width: 600px;
86
- }
87
-
88
- /* Tab Arrows */
89
- .tabArrow {
90
- content: "";
91
- height: 1.25rem;
92
- width: 1.25rem;
93
- border: none;
94
- min-width: 1.25rem;
95
- background: var(--ifm-menu-link-sublist-icon) 50% / 2rem 2rem;
96
- filter: var(--ifm-menu-link-sublist-icon-filter);
97
- }
98
-
99
- .tabArrow:hover {
100
- cursor: pointer;
101
- }
102
- .tabArrowLeft {
103
- transform: rotate(270deg);
104
- }
105
- .tabArrowRight {
106
- transform: rotate(90deg);
107
- }
108
-
109
- @media screen and (max-width: 500px) {
110
- .responseTabsTopSection {
111
- flex-direction: column;
112
- align-items: flex-start;
113
- }
114
-
115
- .responseTabsContainer {
116
- width: 100%;
117
- margin-top: var(--ifm-spacing-vertical);
118
- padding: 0;
119
- }
120
- }