docusaurus-theme-openapi-docs 2.0.0-beta.2 → 2.0.0-beta.3

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 (288) hide show
  1. package/lib/index.d.ts +2 -0
  2. package/lib/index.js +53 -55
  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/Accept/index.d.ts +3 -0
  10. package/lib/theme/ApiDemoPanel/Accept/index.js +26 -20
  11. package/lib/theme/ApiDemoPanel/Accept/slice.d.ts +11 -0
  12. package/lib/theme/ApiDemoPanel/Accept/slice.js +8 -17
  13. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Container/_Container.scss +7 -0
  14. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Container/index.js +29 -0
  15. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Content/Element.js +30 -0
  16. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Content/String.js +131 -0
  17. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Content/_Content.scss +91 -0
  18. package/lib/theme/ApiDemoPanel/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  19. package/lib/theme/ApiDemoPanel/ApiCodeBlock/CopyButton/index.js +74 -0
  20. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  21. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExitButton/index.js +47 -0
  22. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  23. package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
  24. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
  25. package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/index.js +47 -0
  26. package/lib/theme/ApiDemoPanel/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  27. package/lib/theme/ApiDemoPanel/ApiCodeBlock/WordWrapButton/index.js +44 -0
  28. package/lib/theme/ApiDemoPanel/ApiCodeBlock/index.js +40 -0
  29. package/lib/theme/ApiDemoPanel/Authorization/auth-types.d.ts +3 -0
  30. package/lib/theme/ApiDemoPanel/Authorization/auth-types.js +4 -10
  31. package/lib/theme/ApiDemoPanel/Authorization/index.d.ts +3 -0
  32. package/lib/theme/ApiDemoPanel/Authorization/index.js +134 -84
  33. package/lib/theme/ApiDemoPanel/Authorization/slice.d.ts +40 -0
  34. package/lib/theme/ApiDemoPanel/Authorization/slice.js +30 -47
  35. package/lib/theme/ApiDemoPanel/Body/index.d.ts +10 -0
  36. package/lib/theme/ApiDemoPanel/Body/index.js +250 -158
  37. package/lib/theme/ApiDemoPanel/Body/slice.d.ts +82 -0
  38. package/lib/theme/ApiDemoPanel/Body/slice.js +39 -44
  39. package/lib/theme/ApiDemoPanel/CodeTabs/_CodeTabs.scss +158 -105
  40. package/lib/theme/ApiDemoPanel/CodeTabs/index.js +25 -7
  41. package/lib/theme/ApiDemoPanel/ContentType/index.d.ts +3 -0
  42. package/lib/theme/ApiDemoPanel/ContentType/index.js +28 -20
  43. package/lib/theme/ApiDemoPanel/ContentType/slice.d.ts +11 -0
  44. package/lib/theme/ApiDemoPanel/ContentType/slice.js +8 -17
  45. package/lib/theme/ApiDemoPanel/Curl/index.d.ts +20 -0
  46. package/lib/theme/ApiDemoPanel/Curl/index.js +340 -172
  47. package/lib/theme/ApiDemoPanel/Export/index.d.ts +3 -0
  48. package/lib/theme/ApiDemoPanel/Export/index.js +44 -34
  49. package/lib/theme/ApiDemoPanel/FloatingButton/index.d.ts +8 -0
  50. package/lib/theme/ApiDemoPanel/FloatingButton/index.js +20 -21
  51. package/lib/theme/ApiDemoPanel/FormFileUpload/index.d.ts +7 -0
  52. package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +137 -58
  53. package/lib/theme/ApiDemoPanel/FormItem/_FormItem.scss +11 -2
  54. package/lib/theme/ApiDemoPanel/FormItem/index.d.ts +10 -0
  55. package/lib/theme/ApiDemoPanel/FormItem/index.js +34 -29
  56. package/lib/theme/ApiDemoPanel/FormMultiSelect/_FormMultiSelect.scss +8 -4
  57. package/lib/theme/ApiDemoPanel/FormMultiSelect/index.d.ts +9 -0
  58. package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +32 -25
  59. package/lib/theme/ApiDemoPanel/FormSelect/_FormSelect.scss +3 -3
  60. package/lib/theme/ApiDemoPanel/FormSelect/index.d.ts +8 -0
  61. package/lib/theme/ApiDemoPanel/FormSelect/index.js +24 -22
  62. package/lib/theme/ApiDemoPanel/FormTextInput/_FormTextInput.scss +24 -5
  63. package/lib/theme/ApiDemoPanel/FormTextInput/index.d.ts +9 -0
  64. package/lib/theme/ApiDemoPanel/FormTextInput/index.js +60 -14
  65. package/lib/theme/ApiDemoPanel/LiveEditor/index.d.ts +6 -0
  66. package/lib/theme/ApiDemoPanel/LiveEditor/index.js +135 -42
  67. package/lib/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +16 -0
  68. package/lib/theme/ApiDemoPanel/MethodEndpoint/index.d.ts +7 -0
  69. package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +47 -38
  70. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
  71. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamArrayFormItem.js +194 -0
  72. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
  73. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
  74. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
  75. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
  76. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
  77. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
  78. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
  79. package/lib/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
  80. package/lib/theme/ApiDemoPanel/ParamOptions/_ParamOptions.scss +9 -28
  81. package/lib/theme/ApiDemoPanel/ParamOptions/index.d.ts +7 -0
  82. package/lib/theme/ApiDemoPanel/ParamOptions/index.js +193 -198
  83. package/lib/theme/ApiDemoPanel/ParamOptions/slice.d.ts +17 -0
  84. package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +9 -18
  85. package/lib/theme/ApiDemoPanel/Request/_Request.scss +93 -20
  86. package/lib/theme/ApiDemoPanel/Request/index.d.ts +6 -0
  87. package/lib/theme/ApiDemoPanel/Request/index.js +342 -51
  88. package/lib/theme/ApiDemoPanel/Request/makeRequest.d.ts +4 -0
  89. package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiDemoPanel/Request}/makeRequest.js +3 -4
  90. package/lib/theme/ApiDemoPanel/Response/_Response.scss +54 -0
  91. package/lib/theme/ApiDemoPanel/Response/index.d.ts +6 -0
  92. package/lib/theme/ApiDemoPanel/Response/index.js +151 -70
  93. package/lib/theme/ApiDemoPanel/Response/slice.d.ts +17 -0
  94. package/lib/theme/ApiDemoPanel/Response/slice.js +25 -30
  95. package/lib/theme/ApiDemoPanel/SecuritySchemes/index.d.ts +3 -0
  96. package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +349 -226
  97. package/lib/theme/ApiDemoPanel/Server/_Server.scss +10 -0
  98. package/lib/theme/ApiDemoPanel/Server/index.d.ts +3 -0
  99. package/lib/theme/ApiDemoPanel/Server/index.js +155 -71
  100. package/lib/theme/ApiDemoPanel/Server/slice.d.ts +13 -0
  101. package/lib/theme/ApiDemoPanel/Server/slice.js +15 -22
  102. package/lib/theme/ApiDemoPanel/buildPostmanRequest.d.ts +20 -0
  103. package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +136 -154
  104. package/lib/theme/ApiDemoPanel/index.d.ts +7 -0
  105. package/lib/theme/ApiDemoPanel/index.js +26 -27
  106. package/lib/theme/ApiDemoPanel/persistanceMiddleware.d.ts +3 -0
  107. package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +15 -19
  108. package/lib/theme/ApiDemoPanel/storage-utils.d.ts +4 -0
  109. package/lib/theme/ApiDemoPanel/storage-utils.js +14 -13
  110. package/lib/theme/ApiItem/Layout/index.d.ts +4 -0
  111. package/lib/theme/ApiItem/Layout/index.js +78 -56
  112. package/lib/theme/ApiItem/hooks.d.ts +12 -0
  113. package/lib/theme/ApiItem/hooks.js +5 -10
  114. package/lib/theme/ApiItem/index.d.ts +4 -0
  115. package/lib/theme/ApiItem/index.js +136 -115
  116. package/lib/theme/ApiItem/store.d.ts +46 -0
  117. package/lib/theme/ApiItem/store.js +44 -34
  118. package/lib/theme/ApiLogo/index.d.ts +2 -0
  119. package/lib/theme/ApiLogo/index.js +34 -32
  120. package/lib/theme/ApiTabs/_ApiTabs.scss +29 -22
  121. package/lib/theme/ApiTabs/index.js +4 -3
  122. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +16 -13
  123. package/lib/theme/Markdown/Details/_Details.scss +82 -3
  124. package/lib/theme/MimeTabs/_MimeTabs.scss +13 -8
  125. package/lib/theme/ParamsItem/_ParamsItem.scss +23 -8
  126. package/lib/theme/ParamsItem/index.js +9 -6
  127. package/lib/theme/SchemaItem/_SchemaItem.scss +46 -11
  128. package/lib/theme/SchemaItem/index.js +23 -12
  129. package/lib/theme/SchemaTabs/_SchemaTabs.scss +23 -17
  130. package/lib/theme/SchemaTabs/index.js +50 -54
  131. package/lib/theme/styles.scss +41 -4
  132. package/lib/types.d.ts +157 -0
  133. package/lib/types.js +8 -1
  134. package/package.json +13 -21
  135. package/src/index.ts +31 -40
  136. package/src/theme/ApiDemoPanel/ApiCodeBlock/Container/_Container.scss +7 -0
  137. package/src/theme/ApiDemoPanel/ApiCodeBlock/Container/index.js +29 -0
  138. package/src/theme/ApiDemoPanel/ApiCodeBlock/Content/Element.js +30 -0
  139. package/src/theme/ApiDemoPanel/ApiCodeBlock/Content/String.js +131 -0
  140. package/src/theme/ApiDemoPanel/ApiCodeBlock/Content/_Content.scss +91 -0
  141. package/src/theme/ApiDemoPanel/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  142. package/src/theme/ApiDemoPanel/ApiCodeBlock/CopyButton/index.js +74 -0
  143. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  144. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExitButton/index.js +47 -0
  145. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  146. package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
  147. package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
  148. package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/index.js +47 -0
  149. package/src/theme/ApiDemoPanel/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  150. package/src/theme/ApiDemoPanel/ApiCodeBlock/WordWrapButton/index.js +44 -0
  151. package/src/theme/ApiDemoPanel/ApiCodeBlock/index.js +40 -0
  152. package/src/theme/ApiDemoPanel/Body/index.tsx +38 -29
  153. package/src/theme/ApiDemoPanel/CodeTabs/_CodeTabs.scss +158 -105
  154. package/src/theme/ApiDemoPanel/CodeTabs/index.js +25 -7
  155. package/src/theme/ApiDemoPanel/Curl/index.tsx +86 -21
  156. package/src/theme/ApiDemoPanel/FormItem/_FormItem.scss +11 -2
  157. package/src/theme/ApiDemoPanel/FormItem/index.tsx +9 -11
  158. package/src/theme/ApiDemoPanel/FormMultiSelect/_FormMultiSelect.scss +8 -4
  159. package/src/theme/ApiDemoPanel/FormMultiSelect/index.tsx +7 -2
  160. package/src/theme/ApiDemoPanel/FormSelect/_FormSelect.scss +3 -3
  161. package/src/theme/ApiDemoPanel/FormTextInput/_FormTextInput.scss +24 -5
  162. package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +58 -10
  163. package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +53 -14
  164. package/src/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +16 -0
  165. package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +12 -9
  166. package/src/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +153 -0
  167. package/src/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
  168. package/src/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
  169. package/src/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
  170. package/src/theme/ApiDemoPanel/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
  171. package/src/theme/ApiDemoPanel/ParamOptions/_ParamOptions.scss +9 -28
  172. package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +8 -196
  173. package/src/theme/ApiDemoPanel/Request/_Request.scss +93 -20
  174. package/src/theme/ApiDemoPanel/Request/index.tsx +245 -28
  175. package/src/theme/ApiDemoPanel/Response/_Response.scss +54 -0
  176. package/src/theme/ApiDemoPanel/Response/index.tsx +51 -31
  177. package/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx +5 -3
  178. package/src/theme/ApiDemoPanel/Server/_Server.scss +10 -0
  179. package/src/theme/ApiDemoPanel/Server/index.tsx +8 -11
  180. package/src/theme/ApiDemoPanel/index.tsx +4 -6
  181. package/src/theme/ApiItem/index.tsx +2 -2
  182. package/src/theme/ApiTabs/_ApiTabs.scss +29 -22
  183. package/src/theme/ApiTabs/index.js +4 -3
  184. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +16 -13
  185. package/src/theme/Markdown/Details/_Details.scss +82 -3
  186. package/src/theme/MimeTabs/_MimeTabs.scss +13 -8
  187. package/src/theme/ParamsItem/_ParamsItem.scss +23 -8
  188. package/src/theme/ParamsItem/index.js +9 -6
  189. package/src/theme/SchemaItem/_SchemaItem.scss +46 -11
  190. package/src/theme/SchemaItem/index.js +23 -12
  191. package/src/theme/SchemaTabs/_SchemaTabs.scss +23 -17
  192. package/src/theme/SchemaTabs/index.js +50 -54
  193. package/src/theme/styles.scss +41 -4
  194. package/src/theme-openapi.d.ts +44 -1
  195. package/tsconfig.json +6 -3
  196. package/lib/postman-code-generators.d.ts +0 -9
  197. package/lib/react-magic-dropzone.d.ts +0 -9
  198. package/lib/theme/ApiDemoPanel/Execute/index.js +0 -155
  199. package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +0 -181
  200. package/lib/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
  201. package/lib/theme/ApiDemoPanel/react-modal.d.ts +0 -8
  202. package/lib/theme-classic.d.ts +0 -13
  203. package/lib/theme-openapi.d.ts +0 -234
  204. package/lib/theme-translations.d.ts +0 -9
  205. package/lib-next/index.js +0 -68
  206. package/lib-next/markdown/createDescription.js +0 -13
  207. package/lib-next/markdown/schema.js +0 -153
  208. package/lib-next/markdown/utils.js +0 -44
  209. package/lib-next/postman-code-generators.d.ts +0 -9
  210. package/lib-next/react-magic-dropzone.d.ts +0 -9
  211. package/lib-next/theme/ApiDemoPanel/Accept/index.js +0 -30
  212. package/lib-next/theme/ApiDemoPanel/Accept/slice.js +0 -20
  213. package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +0 -29
  214. package/lib-next/theme/ApiDemoPanel/Authorization/index.js +0 -142
  215. package/lib-next/theme/ApiDemoPanel/Authorization/slice.js +0 -99
  216. package/lib-next/theme/ApiDemoPanel/Body/index.js +0 -328
  217. package/lib-next/theme/ApiDemoPanel/Body/json2xml.js +0 -43
  218. package/lib-next/theme/ApiDemoPanel/Body/slice.js +0 -88
  219. package/lib-next/theme/ApiDemoPanel/CodeTabs/_CodeTabs.scss +0 -238
  220. package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +0 -156
  221. package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
  222. package/lib-next/theme/ApiDemoPanel/ContentType/slice.js +0 -20
  223. package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -281
  224. package/lib-next/theme/ApiDemoPanel/Curl/languages.json +0 -1386
  225. package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -178
  226. package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
  227. package/lib-next/theme/ApiDemoPanel/FloatingButton/_FloatingButton.scss +0 -25
  228. package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -21
  229. package/lib-next/theme/ApiDemoPanel/FormFileUpload/_FormFileUpload.scss +0 -72
  230. package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -107
  231. package/lib-next/theme/ApiDemoPanel/FormItem/_FormItem.scss +0 -12
  232. package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -35
  233. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/_FormMultiSelect.scss +0 -26
  234. package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -44
  235. package/lib-next/theme/ApiDemoPanel/FormSelect/_FormSelect.scss +0 -43
  236. package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -29
  237. package/lib-next/theme/ApiDemoPanel/FormTextInput/_FormTextInput.scss +0 -15
  238. package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -23
  239. package/lib-next/theme/ApiDemoPanel/LiveEditor/_LiveEditor.scss +0 -15
  240. package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -58
  241. package/lib-next/theme/ApiDemoPanel/MethodEndpoint/_MethodEndpoint.scss +0 -6
  242. package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -68
  243. package/lib-next/theme/ApiDemoPanel/ParamOptions/_ParamOptions.scss +0 -141
  244. package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -299
  245. package/lib-next/theme/ApiDemoPanel/ParamOptions/slice.js +0 -23
  246. package/lib-next/theme/ApiDemoPanel/Request/_Request.scss +0 -48
  247. package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -59
  248. package/lib-next/theme/ApiDemoPanel/Response/_Response.scss +0 -27
  249. package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -122
  250. package/lib-next/theme/ApiDemoPanel/Response/slice.js +0 -42
  251. package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
  252. package/lib-next/theme/ApiDemoPanel/Server/_Server.scss +0 -16
  253. package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -131
  254. package/lib-next/theme/ApiDemoPanel/Server/slice.js +0 -28
  255. package/lib-next/theme/ApiDemoPanel/buildPostmanRequest.js +0 -298
  256. package/lib-next/theme/ApiDemoPanel/index.js +0 -25
  257. package/lib-next/theme/ApiDemoPanel/persistanceMiddleware.js +0 -58
  258. package/lib-next/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
  259. package/lib-next/theme/ApiDemoPanel/react-modal.d.ts +0 -8
  260. package/lib-next/theme/ApiDemoPanel/storage-utils.js +0 -33
  261. package/lib-next/theme/ApiItem/Layout/index.js +0 -68
  262. package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -17
  263. package/lib-next/theme/ApiItem/hooks.js +0 -10
  264. package/lib-next/theme/ApiItem/index.js +0 -150
  265. package/lib-next/theme/ApiItem/store.js +0 -38
  266. package/lib-next/theme/ApiLogo/index.js +0 -48
  267. package/lib-next/theme/ApiTabs/_ApiTabs.scss +0 -133
  268. package/lib-next/theme/ApiTabs/index.js +0 -191
  269. package/lib-next/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +0 -94
  270. package/lib-next/theme/DiscriminatorTabs/index.js +0 -185
  271. package/lib-next/theme/Markdown/Details/_Details.scss +0 -40
  272. package/lib-next/theme/MimeTabs/_MimeTabs.scss +0 -64
  273. package/lib-next/theme/MimeTabs/index.js +0 -221
  274. package/lib-next/theme/ParamsItem/_ParamsItem.scss +0 -39
  275. package/lib-next/theme/ParamsItem/index.js +0 -133
  276. package/lib-next/theme/ResponseSamples/_ResponseSamples.scss +0 -3
  277. package/lib-next/theme/ResponseSamples/index.js +0 -22
  278. package/lib-next/theme/SchemaItem/_SchemaItem.scss +0 -53
  279. package/lib-next/theme/SchemaItem/index.js +0 -112
  280. package/lib-next/theme/SchemaTabs/_SchemaTabs.scss +0 -58
  281. package/lib-next/theme/SchemaTabs/index.js +0 -186
  282. package/lib-next/theme/styles.scss +0 -123
  283. package/lib-next/theme-classic.d.ts +0 -13
  284. package/lib-next/theme-openapi.d.ts +0 -234
  285. package/lib-next/theme-translations.d.ts +0 -9
  286. package/lib-next/types.js +0 -1
  287. package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -200
  288. /package/src/theme/ApiDemoPanel/{Execute → Request}/makeRequest.ts +0 -0
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { Plugin } from "@docusaurus/types";
2
+ export default function docusaurusThemeOpenAPI(): Plugin<void>;
package/lib/index.js CHANGED
@@ -1,64 +1,62 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = docusaurusThemeOpenAPI;
7
- var _path = _interopRequireDefault(require("path"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
2
  /* ============================================================================
10
3
  * Copyright (c) Palo Alto Networks
11
4
  *
12
5
  * This source code is licensed under the MIT license found in the
13
6
  * LICENSE file in the root directory of this source tree.
14
7
  * ========================================================================== */
15
-
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const path_1 = __importDefault(require("path"));
16
13
  const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
17
14
  function docusaurusThemeOpenAPI() {
18
- return {
19
- name: "docusaurus-theme-openapi",
20
- getClientModules() {
21
- const modules = [require.resolve("./theme/styles.scss")];
22
- return modules;
23
- },
24
- getThemePath() {
25
- return _path.default.join(__dirname, "..", "lib-next", "theme");
26
- },
27
- getTypeScriptThemePath() {
28
- return _path.default.resolve(__dirname, "..", "src", "theme");
29
- },
30
- configureWebpack(_, isServer, utils) {
31
- const {
32
- getStyleLoaders
33
- } = utils;
34
- const isProd = process.env.NODE_ENV === "production";
35
- return {
36
- plugins: [new NodePolyfillPlugin()],
37
- module: {
38
- rules: [{
39
- test: /\.s[ca]ss$/,
40
- oneOf: [{
41
- test: /\.module\.s[ca]ss$/,
42
- use: [...getStyleLoaders(isServer, {
43
- modules: {
44
- localIdentName: isProd ? `[local]_[hash:base64:4]` : `[local]_[path][name]`,
45
- exportOnlyLocals: isServer
46
- },
47
- importLoaders: 2,
48
- sourceMap: !isProd
49
- }), {
50
- loader: require.resolve("sass-loader"),
51
- options: {}
52
- }]
53
- }, {
54
- use: [...getStyleLoaders(isServer, {}), {
55
- loader: require.resolve("sass-loader"),
56
- options: {}
57
- }]
58
- }]
59
- }]
60
- }
61
- };
62
- }
63
- };
64
- }
15
+ return {
16
+ name: "docusaurus-theme-openapi",
17
+ getClientModules() {
18
+ const modules = [
19
+ require.resolve(path_1.default.join(__dirname, "..", "lib", "theme", "styles.scss")),
20
+ ];
21
+ return modules;
22
+ },
23
+ getThemePath() {
24
+ return path_1.default.join(__dirname, "..", "lib", "theme");
25
+ },
26
+ getTypeScriptThemePath() {
27
+ return path_1.default.resolve(__dirname, "..", "src", "theme");
28
+ },
29
+ configureWebpack(_, isServer, utils) {
30
+ const rules = _.module?.rules ?? [];
31
+ const sassLoaderRule = rules.filter((r) => {
32
+ return String(r.test) === String(/\.s[ca]ss$/);
33
+ });
34
+ const { getStyleLoaders } = utils;
35
+ // Avoid conflicts with docusaurus-plugin-sass
36
+ if (sassLoaderRule.length === 0) {
37
+ return {
38
+ plugins: [new NodePolyfillPlugin()],
39
+ module: {
40
+ rules: [
41
+ {
42
+ test: /\.s[ac]ss$/,
43
+ include: path_1.default.resolve(__dirname, "..", "lib", "theme"),
44
+ use: [
45
+ ...getStyleLoaders(isServer, {}),
46
+ {
47
+ loader: require.resolve("sass-loader"),
48
+ options: {},
49
+ },
50
+ ],
51
+ },
52
+ ],
53
+ },
54
+ };
55
+ }
56
+ return {
57
+ plugins: [new NodePolyfillPlugin()],
58
+ };
59
+ },
60
+ };
61
+ }
62
+ exports.default = docusaurusThemeOpenAPI;
@@ -0,0 +1 @@
1
+ export declare function createDescription(description: string | undefined): string;
@@ -1,19 +1,16 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createDescription = createDescription;
7
2
  /* ============================================================================
8
3
  * Copyright (c) Palo Alto Networks
9
4
  *
10
5
  * This source code is licensed under the MIT license found in the
11
6
  * LICENSE file in the root directory of this source tree.
12
7
  * ========================================================================== */
13
-
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.createDescription = void 0;
14
10
  function createDescription(description) {
15
- if (!description) {
16
- return "";
17
- }
18
- return `\n\n${description}\n\n`;
19
- }
11
+ if (!description) {
12
+ return "";
13
+ }
14
+ return `\n\n${description}\n\n`;
15
+ }
16
+ exports.createDescription = createDescription;
@@ -0,0 +1,3 @@
1
+ import { SchemaObject } from "../types";
2
+ export declare function getSchemaName(schema: SchemaObject, circular?: boolean): string;
3
+ export declare function getQualifierMessage(schema?: SchemaObject): string | undefined;
@@ -1,151 +1,150 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getQualifierMessage = getQualifierMessage;
7
- exports.getSchemaName = getSchemaName;
8
2
  /* ============================================================================
9
3
  * Copyright (c) Palo Alto Networks
10
4
  *
11
5
  * This source code is licensed under the MIT license found in the
12
6
  * LICENSE file in the root directory of this source tree.
13
7
  * ========================================================================== */
14
-
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.getQualifierMessage = exports.getSchemaName = void 0;
15
10
  function prettyName(schema, circular) {
16
- var _schema$title;
17
- if (schema.format) {
18
- return schema.format;
19
- }
20
- if (schema.allOf) {
21
- if (typeof schema.allOf[0] === "string") {
22
- // @ts-ignore
23
- if (schema.allOf[0].includes("circular")) {
24
- return schema.allOf[0];
25
- }
26
- }
27
- return "object";
28
- }
29
- if (schema.oneOf) {
30
- return "object";
31
- }
32
- if (schema.anyOf) {
33
- return "object";
34
- }
35
- if (schema.type === "object") {
36
- var _schema$xml$name, _schema$xml;
37
- return (_schema$xml$name = (_schema$xml = schema.xml) === null || _schema$xml === void 0 ? void 0 : _schema$xml.name) !== null && _schema$xml$name !== void 0 ? _schema$xml$name : schema.type;
38
- // return schema.type;
39
- }
40
-
41
- if (schema.type === "array") {
42
- var _schema$xml$name2, _schema$xml2;
43
- return (_schema$xml$name2 = (_schema$xml2 = schema.xml) === null || _schema$xml2 === void 0 ? void 0 : _schema$xml2.name) !== null && _schema$xml$name2 !== void 0 ? _schema$xml$name2 : schema.type;
44
- // return schema.type;
45
- }
46
-
47
- return (_schema$title = schema.title) !== null && _schema$title !== void 0 ? _schema$title : schema.type;
11
+ if (schema.format) {
12
+ return schema.format;
13
+ }
14
+ if (schema.allOf) {
15
+ if (typeof schema.allOf[0] === "string") {
16
+ // @ts-ignore
17
+ if (schema.allOf[0].includes("circular")) {
18
+ return schema.allOf[0];
19
+ }
20
+ }
21
+ return "object";
22
+ }
23
+ if (schema.oneOf) {
24
+ return "object";
25
+ }
26
+ if (schema.anyOf) {
27
+ return "object";
28
+ }
29
+ if (schema.type === "object") {
30
+ return schema.xml?.name ?? schema.type;
31
+ // return schema.type;
32
+ }
33
+ if (schema.type === "array") {
34
+ return schema.xml?.name ?? schema.type;
35
+ // return schema.type;
36
+ }
37
+ return schema.title ?? schema.type;
48
38
  }
49
39
  function getSchemaName(schema, circular) {
50
- var _prettyName;
51
- if (schema.items) {
52
- return prettyName(schema.items, circular) + "[]";
53
- }
54
- return (_prettyName = prettyName(schema, circular)) !== null && _prettyName !== void 0 ? _prettyName : "";
40
+ if (schema.items) {
41
+ return prettyName(schema.items, circular) + "[]";
42
+ }
43
+ return prettyName(schema, circular) ?? "";
55
44
  }
45
+ exports.getSchemaName = getSchemaName;
56
46
  function getQualifierMessage(schema) {
57
- // TODO:
58
- // - uniqueItems
59
- // - maxProperties
60
- // - minProperties
61
- // - multipleOf
62
- if (!schema) {
63
- return undefined;
64
- }
65
- if (schema.items && schema.minItems === undefined && schema.maxItems === undefined) {
66
- return getQualifierMessage(schema.items);
67
- }
68
- let message = "**Possible values:** ";
69
- let qualifierGroups = [];
70
- if (schema.items && schema.items.enum) {
71
- if (schema.items.enum) {
72
- qualifierGroups.push(`[${schema.items.enum.map(e => `\`${e}\``).join(", ")}]`);
73
- }
74
- }
75
- if (schema.minLength || schema.maxLength) {
76
- let lengthQualifier = "";
77
- let minLength;
78
- let maxLength;
79
- if (schema.minLength && schema.minLength > 1) {
80
- minLength = `\`>= ${schema.minLength} characters\``;
81
- }
82
- if (schema.minLength && schema.minLength === 1) {
83
- minLength = `\`non-empty\``;
84
- }
85
- if (schema.maxLength) {
86
- maxLength = `\`<= ${schema.maxLength} characters\``;
87
- }
88
- if (minLength && !maxLength) {
89
- lengthQualifier += minLength;
90
- }
91
- if (maxLength && !minLength) {
92
- lengthQualifier += maxLength;
93
- }
94
- if (minLength && maxLength) {
95
- lengthQualifier += `${minLength} and ${maxLength}`;
96
- }
97
- qualifierGroups.push(lengthQualifier);
98
- }
99
- if (schema.minimum || schema.maximum || typeof schema.exclusiveMinimum === "number" || typeof schema.exclusiveMaximum === "number") {
100
- let minmaxQualifier = "";
101
- let minimum;
102
- let maximum;
103
- if (typeof schema.exclusiveMinimum === "number") {
104
- minimum = `\`> ${schema.exclusiveMinimum}\``;
105
- } else if (schema.minimum && !schema.exclusiveMinimum) {
106
- minimum = `\`>= ${schema.minimum}\``;
107
- } else if (schema.minimum && schema.exclusiveMinimum === true) {
108
- minimum = `\`> ${schema.minimum}\``;
109
- }
110
- if (typeof schema.exclusiveMaximum === "number") {
111
- maximum = `\`< ${schema.exclusiveMaximum}\``;
112
- } else if (schema.maximum && !schema.exclusiveMaximum) {
113
- maximum = `\`<= ${schema.maximum}\``;
114
- } else if (schema.maximum && schema.exclusiveMaximum === true) {
115
- maximum = `\`< ${schema.maximum}\``;
116
- }
117
- if (minimum && !maximum) {
118
- minmaxQualifier += minimum;
119
- }
120
- if (maximum && !minimum) {
121
- minmaxQualifier += maximum;
122
- }
123
- if (minimum && maximum) {
124
- minmaxQualifier += `${minimum} and ${maximum}`;
125
- }
126
- qualifierGroups.push(minmaxQualifier);
127
- }
128
- if (schema.pattern) {
129
- qualifierGroups.push(`Value must match regular expression \`${schema.pattern}\``);
130
- }
131
-
132
- // Check if discriminator mapping
133
- const discriminator = schema;
134
- if (discriminator.mapping) {
135
- const values = Object.keys(discriminator.mapping);
136
- qualifierGroups.push(`[${values.map(e => `\`${e}\``).join(", ")}]`);
137
- }
138
- if (schema.enum) {
139
- qualifierGroups.push(`[${schema.enum.map(e => `\`${e}\``).join(", ")}]`);
140
- }
141
- if (schema.minItems) {
142
- qualifierGroups.push(`\`>= ${schema.minItems}\``);
143
- }
144
- if (schema.maxItems) {
145
- qualifierGroups.push(`\`<= ${schema.maxItems}\``);
146
- }
147
- if (qualifierGroups.length === 0) {
148
- return undefined;
149
- }
150
- return message + qualifierGroups.join(", ");
151
- }
47
+ // TODO:
48
+ // - uniqueItems
49
+ // - maxProperties
50
+ // - minProperties
51
+ // - multipleOf
52
+ if (!schema) {
53
+ return undefined;
54
+ }
55
+ if (schema.items &&
56
+ schema.minItems === undefined &&
57
+ schema.maxItems === undefined) {
58
+ return getQualifierMessage(schema.items);
59
+ }
60
+ let message = "**Possible values:** ";
61
+ let qualifierGroups = [];
62
+ if (schema.items && schema.items.enum) {
63
+ if (schema.items.enum) {
64
+ qualifierGroups.push(`[${schema.items.enum.map((e) => `\`${e}\``).join(", ")}]`);
65
+ }
66
+ }
67
+ if (schema.minLength || schema.maxLength) {
68
+ let lengthQualifier = "";
69
+ let minLength;
70
+ let maxLength;
71
+ if (schema.minLength && schema.minLength > 1) {
72
+ minLength = `\`>= ${schema.minLength} characters\``;
73
+ }
74
+ if (schema.minLength && schema.minLength === 1) {
75
+ minLength = `\`non-empty\``;
76
+ }
77
+ if (schema.maxLength) {
78
+ maxLength = `\`<= ${schema.maxLength} characters\``;
79
+ }
80
+ if (minLength && !maxLength) {
81
+ lengthQualifier += minLength;
82
+ }
83
+ if (maxLength && !minLength) {
84
+ lengthQualifier += maxLength;
85
+ }
86
+ if (minLength && maxLength) {
87
+ lengthQualifier += `${minLength} and ${maxLength}`;
88
+ }
89
+ qualifierGroups.push(lengthQualifier);
90
+ }
91
+ if (schema.minimum ||
92
+ schema.maximum ||
93
+ typeof schema.exclusiveMinimum === "number" ||
94
+ typeof schema.exclusiveMaximum === "number") {
95
+ let minmaxQualifier = "";
96
+ let minimum;
97
+ let maximum;
98
+ if (typeof schema.exclusiveMinimum === "number") {
99
+ minimum = `\`> ${schema.exclusiveMinimum}\``;
100
+ }
101
+ else if (schema.minimum && !schema.exclusiveMinimum) {
102
+ minimum = `\`>= ${schema.minimum}\``;
103
+ }
104
+ else if (schema.minimum && schema.exclusiveMinimum === true) {
105
+ minimum = `\`> ${schema.minimum}\``;
106
+ }
107
+ if (typeof schema.exclusiveMaximum === "number") {
108
+ maximum = `\`< ${schema.exclusiveMaximum}\``;
109
+ }
110
+ else if (schema.maximum && !schema.exclusiveMaximum) {
111
+ maximum = `\`<= ${schema.maximum}\``;
112
+ }
113
+ else if (schema.maximum && schema.exclusiveMaximum === true) {
114
+ maximum = `\`< ${schema.maximum}\``;
115
+ }
116
+ if (minimum && !maximum) {
117
+ minmaxQualifier += minimum;
118
+ }
119
+ if (maximum && !minimum) {
120
+ minmaxQualifier += maximum;
121
+ }
122
+ if (minimum && maximum) {
123
+ minmaxQualifier += `${minimum} and ${maximum}`;
124
+ }
125
+ qualifierGroups.push(minmaxQualifier);
126
+ }
127
+ if (schema.pattern) {
128
+ qualifierGroups.push(`Value must match regular expression \`${schema.pattern}\``);
129
+ }
130
+ // Check if discriminator mapping
131
+ const discriminator = schema;
132
+ if (discriminator.mapping) {
133
+ const values = Object.keys(discriminator.mapping);
134
+ qualifierGroups.push(`[${values.map((e) => `\`${e}\``).join(", ")}]`);
135
+ }
136
+ if (schema.enum) {
137
+ qualifierGroups.push(`[${schema.enum.map((e) => `\`${e}\``).join(", ")}]`);
138
+ }
139
+ if (schema.minItems) {
140
+ qualifierGroups.push(`\`>= ${schema.minItems}\``);
141
+ }
142
+ if (schema.maxItems) {
143
+ qualifierGroups.push(`\`<= ${schema.maxItems}\``);
144
+ }
145
+ if (qualifierGroups.length === 0) {
146
+ return undefined;
147
+ }
148
+ return message + qualifierGroups.join(", ");
149
+ }
150
+ exports.getQualifierMessage = getQualifierMessage;
@@ -0,0 +1,8 @@
1
+ export declare type Children = string | undefined | (string | undefined)[];
2
+ export declare type Props = Record<string, any> & {
3
+ children?: Children;
4
+ };
5
+ export declare function create(tag: string, props: Props): string;
6
+ export declare function guard<T>(value: T | undefined | string, cb: (value: T) => Children): string;
7
+ export declare function render(children: Children): string;
8
+ export declare function toString(value: any): string | undefined;
@@ -1,56 +1,50 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.create = create;
7
- exports.guard = guard;
8
- exports.render = render;
9
- exports.toString = toString;
10
2
  /* ============================================================================
11
3
  * Copyright (c) Palo Alto Networks
12
4
  *
13
5
  * This source code is licensed under the MIT license found in the
14
6
  * LICENSE file in the root directory of this source tree.
15
7
  * ========================================================================== */
16
-
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.toString = exports.render = exports.guard = exports.create = void 0;
17
10
  function create(tag, props) {
18
- const {
19
- children,
20
- ...rest
21
- } = props;
22
- let propString = "";
23
- for (const [key, value] of Object.entries(rest)) {
24
- propString += ` ${key}={${JSON.stringify(value)}}`;
25
- }
26
- return `<${tag}${propString}>${render(children)}</${tag}>`;
11
+ const { children, ...rest } = props;
12
+ let propString = "";
13
+ for (const [key, value] of Object.entries(rest)) {
14
+ propString += ` ${key}={${JSON.stringify(value)}}`;
15
+ }
16
+ return `<${tag}${propString}>${render(children)}</${tag}>`;
27
17
  }
18
+ exports.create = create;
28
19
  function guard(value, cb) {
29
- if (!!value) {
30
- const children = cb(value);
31
- return render(children);
32
- }
33
- return "";
20
+ if (!!value) {
21
+ const children = cb(value);
22
+ return render(children);
23
+ }
24
+ return "";
34
25
  }
26
+ exports.guard = guard;
35
27
  function render(children) {
36
- if (Array.isArray(children)) {
37
- return children.filter(c => c !== undefined).join("");
38
- }
39
- return children !== null && children !== void 0 ? children : "";
28
+ if (Array.isArray(children)) {
29
+ return children.filter((c) => c !== undefined).join("");
30
+ }
31
+ return children ?? "";
40
32
  }
33
+ exports.render = render;
41
34
  function toString(value) {
42
- // Return as-is if already string
43
- if (typeof value === "string") {
44
- return value;
45
- }
46
- // Return undefined if null or undefined
47
- if (value == null) {
48
- return undefined;
49
- }
50
- // Return formatted array if Array
51
- if (Array.isArray(value)) {
52
- return `[${value.join(", ")}]`;
53
- }
54
- // Coerce to string in all other cases,
55
- return value + "";
56
- }
35
+ // Return as-is if already string
36
+ if (typeof value === "string") {
37
+ return value;
38
+ }
39
+ // Return undefined if null or undefined
40
+ if (value == null) {
41
+ return undefined;
42
+ }
43
+ // Return formatted array if Array
44
+ if (Array.isArray(value)) {
45
+ return `[${value.join(", ")}]`;
46
+ }
47
+ // Coerce to string in all other cases,
48
+ return value + "";
49
+ }
50
+ exports.toString = toString;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function Accept(): JSX.Element | null;
3
+ export default Accept;
@@ -1,32 +1,38 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _FormItem = _interopRequireDefault(require("@theme/ApiDemoPanel/FormItem"));
9
- var _FormSelect = _interopRequireDefault(require("@theme/ApiDemoPanel/FormSelect"));
10
- var _hooks = require("@theme/ApiItem/hooks");
11
- var _slice = require("./slice");
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
2
  /* ============================================================================
14
3
  * Copyright (c) Palo Alto Networks
15
4
  *
16
5
  * This source code is licensed under the MIT license found in the
17
6
  * LICENSE file in the root directory of this source tree.
18
7
  * ========================================================================== */
19
-
8
+ var __importDefault =
9
+ (this && this.__importDefault) ||
10
+ function (mod) {
11
+ return mod && mod.__esModule ? mod : { default: mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ const react_1 = __importDefault(require("react"));
15
+ const FormItem_1 = __importDefault(require("@theme/ApiDemoPanel/FormItem"));
16
+ const FormSelect_1 = __importDefault(require("@theme/ApiDemoPanel/FormSelect"));
17
+ const hooks_1 = require("@theme/ApiItem/hooks");
18
+ const slice_1 = require("./slice");
20
19
  function Accept() {
21
- const value = (0, _hooks.useTypedSelector)(state => state.accept.value);
22
- const options = (0, _hooks.useTypedSelector)(state => state.accept.options);
23
- const dispatch = (0, _hooks.useTypedDispatch)();
20
+ const value = (0, hooks_1.useTypedSelector)((state) => state.accept.value);
21
+ const options = (0, hooks_1.useTypedSelector)(
22
+ (state) => state.accept.options
23
+ );
24
+ const dispatch = (0, hooks_1.useTypedDispatch)();
24
25
  if (options.length <= 1) {
25
26
  return null;
26
27
  }
27
- return <_FormItem.default label="Accept">
28
- <_FormSelect.default value={value} options={options} onChange={e => dispatch((0, _slice.setAccept)(e.target.value))} />
29
- </_FormItem.default>;
28
+ return react_1.default.createElement(
29
+ FormItem_1.default,
30
+ { label: "Accept" },
31
+ react_1.default.createElement(FormSelect_1.default, {
32
+ value: value,
33
+ options: options,
34
+ onChange: (e) => dispatch((0, slice_1.setAccept)(e.target.value)),
35
+ })
36
+ );
30
37
  }
31
- var _default = Accept;
32
- exports.default = _default;
38
+ exports.default = Accept;
@@ -0,0 +1,11 @@
1
+ import { PayloadAction } from "@reduxjs/toolkit";
2
+ export interface State {
3
+ value: string;
4
+ options: string[];
5
+ }
6
+ export declare const slice: import("@reduxjs/toolkit").Slice<State, {
7
+ setAccept: (state: import("immer/dist/internal").WritableDraft<State>, action: PayloadAction<string>) => void;
8
+ }, "accept">;
9
+ export declare const setAccept: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "accept/setAccept">;
10
+ declare const _default: import("redux").Reducer<State, import("redux").AnyAction>;
11
+ export default _default;