zudoku 0.64.2 → 0.65.1
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.
- package/dist/app/main.d.ts +91 -1
- package/dist/app/main.js +5 -1
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +16 -16
- package/dist/config/validators/NavigationSchema.js +2 -4
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +53 -1
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +43 -0
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +6 -0
- package/dist/lib/authentication/providers/auth0.js +6 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +6 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +7 -4
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +4 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +1 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +15 -6
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -2
- package/dist/lib/plugins/openapi/Sidecar.js +39 -15
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +15 -16
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +13 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +56 -28
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -7
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +20 -9
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +3 -3
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Button.js +1 -0
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/readFrontmatter.d.ts +6 -0
- package/dist/lib/util/readFrontmatter.js +12 -0
- package/dist/lib/util/readFrontmatter.js.map +1 -0
- package/dist/vite/mdx/remark-last-modified.js +57 -3
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +3 -5
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +3 -4
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/lib/{Button-DmS4u8Lj.js → Button-B3ucvvQw.js} +7 -6
- package/lib/Button-B3ucvvQw.js.map +1 -0
- package/lib/{ErrorAlert--3alJ_-b.js → ErrorAlert-D5LKLFOd.js} +1100 -1112
- package/lib/ErrorAlert-D5LKLFOd.js.map +1 -0
- package/lib/{MdxPage-Bpa9tL63.js → MdxPage-hOCN-u-L.js} +6 -6
- package/lib/{MdxPage-Bpa9tL63.js.map → MdxPage-hOCN-u-L.js.map} +1 -1
- package/lib/{OAuthErrorPage-B79J86Fo.js → OAuthErrorPage-oXnxcJg4.js} +4 -4
- package/lib/{OAuthErrorPage-B79J86Fo.js.map → OAuthErrorPage-oXnxcJg4.js.map} +1 -1
- package/lib/{OasProvider-jr0oDSFy.js → OasProvider-BuBeRIHB.js} +2 -2
- package/lib/{OasProvider-jr0oDSFy.js.map → OasProvider-BuBeRIHB.js.map} +1 -1
- package/lib/{OperationList-DLEAg4qw.js → OperationList-Cx8TGKhB.js} +2053 -1830
- package/lib/OperationList-Cx8TGKhB.js.map +1 -0
- package/lib/{Pagination-H2HW9-Er.js → Pagination-lLSoHnxa.js} +2 -2
- package/lib/{Pagination-H2HW9-Er.js.map → Pagination-lLSoHnxa.js.map} +1 -1
- package/lib/{RouteGuard-CjzxosTf.js → RouteGuard-Brz95MSt.js} +2 -2
- package/lib/{RouteGuard-CjzxosTf.js.map → RouteGuard-Brz95MSt.js.map} +1 -1
- package/lib/RouterError-VGZB_wg4.js +42 -0
- package/lib/RouterError-VGZB_wg4.js.map +1 -0
- package/lib/{SchemaList-CSDSazqV.js → SchemaList-rBWXYJEb.js} +7 -7
- package/lib/{SchemaList-CSDSazqV.js.map → SchemaList-rBWXYJEb.js.map} +1 -1
- package/lib/SchemaView-jouS_xvc.js +586 -0
- package/lib/SchemaView-jouS_xvc.js.map +1 -0
- package/lib/Select-DFRCS31-.js +399 -0
- package/lib/Select-DFRCS31-.js.map +1 -0
- package/lib/{SignUp-Fycafbyg.js → SignUp-D2mmQOkg.js} +2 -2
- package/lib/{SignUp-Fycafbyg.js.map → SignUp-D2mmQOkg.js.map} +1 -1
- package/lib/{Toc-ChkOg2UU.js → Toc-CBWfFCVf.js} +2 -2
- package/lib/{Toc-ChkOg2UU.js.map → Toc-CBWfFCVf.js.map} +1 -1
- package/lib/{circular-DGfd8SGc.js → circular-CGkbVs2O.js} +6360 -5953
- package/lib/circular-CGkbVs2O.js.map +1 -0
- package/lib/{createServer-DGD8hEzT.js → createServer-CcV_75PW.js} +770 -735
- package/lib/createServer-CcV_75PW.js.map +1 -0
- package/lib/{errors-BTpjwHS6.js → errors-D7xzOd8X.js} +2 -2
- package/lib/{errors-BTpjwHS6.js.map → errors-D7xzOd8X.js.map} +1 -1
- package/lib/{index-Bvas0H4x.js → index-CF7_erXq.js} +2 -2
- package/lib/{index-Bvas0H4x.js.map → index-CF7_erXq.js.map} +1 -1
- package/lib/{index-FNRZUtwo.js → index-CPws05Tb.js} +3 -3
- package/lib/{index-FNRZUtwo.js.map → index-CPws05Tb.js.map} +1 -1
- package/lib/index-I4zC7Yht.js +3680 -0
- package/lib/index-I4zC7Yht.js.map +1 -0
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Badge.js +27 -13
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Button.js +6 -5
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +7 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +19 -18
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Tabs.js +10 -10
- package/lib/zudoku.__internal.js +345 -345
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +7 -7
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +3 -3
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.auth-supabase.js +3 -3
- package/lib/zudoku.components.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/package.json +4 -4
- package/src/app/main.tsx +5 -1
- package/src/lib/authentication/providers/auth0.tsx +6 -1
- package/src/lib/components/Autocomplete.tsx +11 -2
- package/src/lib/components/Layout.tsx +3 -2
- package/src/lib/components/navigation/NavigationItem.tsx +7 -20
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +3 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -7
- package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
- package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +36 -13
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +67 -44
- package/src/lib/plugins/openapi/Sidecar.tsx +84 -41
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +59 -37
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/interfaces.ts +12 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
- package/src/lib/plugins/openapi/playground/Playground.tsx +73 -35
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -52
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +82 -48
- package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Button.tsx +1 -0
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +3 -3
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -18
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/util/readFrontmatter.ts +13 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
- package/lib/Button-DmS4u8Lj.js.map +0 -1
- package/lib/ErrorAlert--3alJ_-b.js.map +0 -1
- package/lib/OperationList-DLEAg4qw.js.map +0 -1
- package/lib/RouterError-DZS2d6Sc.js +0 -41
- package/lib/RouterError-DZS2d6Sc.js.map +0 -1
- package/lib/SchemaView-DJiBd0_5.js +0 -397
- package/lib/SchemaView-DJiBd0_5.js.map +0 -1
- package/lib/Select-C1DeCqKv.js +0 -372
- package/lib/Select-C1DeCqKv.js.map +0 -1
- package/lib/circular-DGfd8SGc.js.map +0 -1
- package/lib/createServer-DGD8hEzT.js.map +0 -1
- package/lib/index-DP1xZgfJ.js +0 -3364
- package/lib/index-DP1xZgfJ.js.map +0 -1
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ComponentPropsWithoutRef,
|
|
3
|
+
type KeyboardEvent,
|
|
4
|
+
startTransition,
|
|
5
|
+
useCallback,
|
|
6
|
+
useEffect,
|
|
7
|
+
useRef,
|
|
8
|
+
} from "react";
|
|
9
|
+
import type {
|
|
10
|
+
Control,
|
|
11
|
+
FieldArrayPath,
|
|
12
|
+
FieldArrayWithId,
|
|
13
|
+
FieldValues,
|
|
14
|
+
PathValue,
|
|
15
|
+
} from "react-hook-form";
|
|
16
|
+
import { useFieldArray, useFormContext } from "react-hook-form";
|
|
17
|
+
|
|
18
|
+
export type Value =
|
|
19
|
+
| string
|
|
20
|
+
| number
|
|
21
|
+
| readonly string[]
|
|
22
|
+
| File
|
|
23
|
+
| boolean
|
|
24
|
+
| undefined;
|
|
25
|
+
|
|
26
|
+
export type KeyValueField = {
|
|
27
|
+
name: string;
|
|
28
|
+
value: Value;
|
|
29
|
+
active: boolean;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type KeyValueFieldManagerOptions<
|
|
33
|
+
TFormData extends FieldValues,
|
|
34
|
+
TName extends FieldArrayPath<TFormData>,
|
|
35
|
+
T extends KeyValueField = PathValue<TFormData, TName>[number],
|
|
36
|
+
> = {
|
|
37
|
+
control: Control<TFormData>;
|
|
38
|
+
name: TName;
|
|
39
|
+
defaultValue: T;
|
|
40
|
+
isEmpty?: (item: T) => boolean;
|
|
41
|
+
shouldSetActive?: (item: T) => boolean;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type CheckboxProps = {
|
|
45
|
+
checked: boolean;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
onCheckedChange: (checked: boolean) => void;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type RemoveButtonProps = { onClick: () => void; disabled?: boolean };
|
|
51
|
+
|
|
52
|
+
type SetValueFn = (
|
|
53
|
+
index: number,
|
|
54
|
+
field: keyof KeyValueField,
|
|
55
|
+
value: Value,
|
|
56
|
+
options?: { focus?: "next" | "previous" },
|
|
57
|
+
) => void;
|
|
58
|
+
|
|
59
|
+
type GetValueFn = (index: number, field: keyof KeyValueField) => Value;
|
|
60
|
+
|
|
61
|
+
export type UseKeyValueFieldManagerReturn<TFormData extends FieldValues> = {
|
|
62
|
+
fields: FieldArrayWithId<TFormData>[];
|
|
63
|
+
getNameInputProps: GetInputPropsFn;
|
|
64
|
+
getValueInputProps: GetInputPropsFn;
|
|
65
|
+
getCheckboxProps: (index: number) => CheckboxProps;
|
|
66
|
+
getRemoveButtonProps: (index: number) => RemoveButtonProps;
|
|
67
|
+
setValue: SetValueFn;
|
|
68
|
+
getValue: GetValueFn;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type GetInputPropsFn = (index: number) => ComponentPropsWithoutRef<"input">;
|
|
72
|
+
|
|
73
|
+
export const useKeyValueFieldManager = <
|
|
74
|
+
TFormData extends FieldValues,
|
|
75
|
+
TName extends FieldArrayPath<TFormData>,
|
|
76
|
+
T extends KeyValueField = PathValue<TFormData, TName>[number],
|
|
77
|
+
>(
|
|
78
|
+
options: KeyValueFieldManagerOptions<TFormData, TName>,
|
|
79
|
+
): UseKeyValueFieldManagerReturn<TFormData> => {
|
|
80
|
+
const {
|
|
81
|
+
control,
|
|
82
|
+
name,
|
|
83
|
+
defaultValue,
|
|
84
|
+
isEmpty: customIsEmpty,
|
|
85
|
+
shouldSetActive: customShouldSetActive,
|
|
86
|
+
} = options;
|
|
87
|
+
const {
|
|
88
|
+
setValue: internalSetValue,
|
|
89
|
+
watch,
|
|
90
|
+
setFocus,
|
|
91
|
+
register,
|
|
92
|
+
} = useFormContext();
|
|
93
|
+
const { fields, append, remove } = useFieldArray({ control, name });
|
|
94
|
+
const watchedFields = watch(name) as T[];
|
|
95
|
+
const lastEditedIndexRef = useRef(-1);
|
|
96
|
+
const prevLengthRef = useRef(-1);
|
|
97
|
+
|
|
98
|
+
const setValue = useCallback<SetValueFn>(
|
|
99
|
+
(index, field, value, options) => {
|
|
100
|
+
if (field === "value" || field === "name") {
|
|
101
|
+
lastEditedIndexRef.current = index;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// biome-ignore lint/suspicious/noExplicitAny: Can't infer the type of the value here
|
|
105
|
+
internalSetValue(`${name}.${index}.${field}`, value as any);
|
|
106
|
+
|
|
107
|
+
if (options?.focus === "next") {
|
|
108
|
+
setFocus(
|
|
109
|
+
field === "name"
|
|
110
|
+
? `${name}.${index}.value`
|
|
111
|
+
: `${name}.${index + 1}.name`,
|
|
112
|
+
);
|
|
113
|
+
} else if (options?.focus === "previous") {
|
|
114
|
+
setFocus(
|
|
115
|
+
field === "name"
|
|
116
|
+
? `${name}.${index - 1}.value`
|
|
117
|
+
: `${name}.${index}.name`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
[name, internalSetValue, setFocus],
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const isEmpty = useCallback(
|
|
125
|
+
(item: T) => {
|
|
126
|
+
if (customIsEmpty) return customIsEmpty(item);
|
|
127
|
+
return !item.name && !item.value;
|
|
128
|
+
},
|
|
129
|
+
[customIsEmpty],
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
const shouldSetActive = useCallback(
|
|
133
|
+
(item: T) => {
|
|
134
|
+
if (customShouldSetActive) return customShouldSetActive(item);
|
|
135
|
+
return Boolean(item.name || item.value);
|
|
136
|
+
},
|
|
137
|
+
[customShouldSetActive],
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
// Handle auto append/remove of rows
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (!watchedFields) return;
|
|
143
|
+
|
|
144
|
+
// Prevents double-appending in Strict Mode
|
|
145
|
+
if (prevLengthRef.current === -1) {
|
|
146
|
+
prevLengthRef.current = watchedFields.length;
|
|
147
|
+
|
|
148
|
+
if (watchedFields.length === 0) {
|
|
149
|
+
// biome-ignore lint/suspicious/noExplicitAny: Generic field array type
|
|
150
|
+
append(defaultValue as any, {
|
|
151
|
+
shouldFocus: false,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
prevLengthRef.current = watchedFields.length;
|
|
158
|
+
|
|
159
|
+
// If no fields, append one
|
|
160
|
+
if (watchedFields.length === 0) {
|
|
161
|
+
// biome-ignore lint/suspicious/noExplicitAny: Generic field array type
|
|
162
|
+
append(defaultValue as any, {
|
|
163
|
+
shouldFocus: false,
|
|
164
|
+
});
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Auto-remove empty fields (except the last one, keep at least one)
|
|
169
|
+
if (watchedFields.length > 1) {
|
|
170
|
+
const emptyIndices: number[] = [];
|
|
171
|
+
|
|
172
|
+
// Check all fields except the last one
|
|
173
|
+
for (let i = 0; i < watchedFields.length - 1; i++) {
|
|
174
|
+
const field = watchedFields[i];
|
|
175
|
+
if (field && isEmpty(field) && !shouldSetActive(field)) {
|
|
176
|
+
emptyIndices.push(i);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Remove from highest index to lowest to avoid index shifting
|
|
181
|
+
if (emptyIndices.length > 0) {
|
|
182
|
+
const lowestRemovedIndex = emptyIndices[0];
|
|
183
|
+
|
|
184
|
+
if (lowestRemovedIndex === undefined) return;
|
|
185
|
+
|
|
186
|
+
for (let i = emptyIndices.length - 1; i >= 0; i--) {
|
|
187
|
+
const indexToRemove = emptyIndices[i];
|
|
188
|
+
if (indexToRemove !== undefined) {
|
|
189
|
+
remove(indexToRemove);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// If we just edited this field, focus the name field at the same index
|
|
194
|
+
// (which now contains what was the next row), or previous row if needed
|
|
195
|
+
if (lastEditedIndexRef.current === lowestRemovedIndex) {
|
|
196
|
+
const newLength = watchedFields.length - emptyIndices.length;
|
|
197
|
+
|
|
198
|
+
if (lowestRemovedIndex < newLength) {
|
|
199
|
+
// Next row moved into this position, focus its name field
|
|
200
|
+
setFocus(`${name}.${lowestRemovedIndex}.name`);
|
|
201
|
+
} else if (lowestRemovedIndex > 0) {
|
|
202
|
+
// Removed row was at the end, focus previous row's name
|
|
203
|
+
setFocus(`${name}.${lowestRemovedIndex - 1}.name`);
|
|
204
|
+
} else {
|
|
205
|
+
setFocus(`${name}.0.name`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
lastEditedIndexRef.current = -1;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// If last field has content, append empty one
|
|
213
|
+
const lastField = watchedFields[watchedFields.length - 1];
|
|
214
|
+
if (lastField && !isEmpty(lastField)) {
|
|
215
|
+
// biome-ignore lint/suspicious/noExplicitAny: Generic field array type
|
|
216
|
+
append(defaultValue as any, {
|
|
217
|
+
shouldFocus: false,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}, [
|
|
221
|
+
watchedFields,
|
|
222
|
+
append,
|
|
223
|
+
remove,
|
|
224
|
+
defaultValue,
|
|
225
|
+
isEmpty,
|
|
226
|
+
name,
|
|
227
|
+
setFocus,
|
|
228
|
+
shouldSetActive,
|
|
229
|
+
]);
|
|
230
|
+
|
|
231
|
+
// Auto set active state of row checkbox
|
|
232
|
+
useEffect(() => {
|
|
233
|
+
if (!watchedFields) return;
|
|
234
|
+
|
|
235
|
+
const updates: Array<() => void> = [];
|
|
236
|
+
|
|
237
|
+
for (let i = 0; i < watchedFields.length; i++) {
|
|
238
|
+
const field = watchedFields[i];
|
|
239
|
+
if (!field) continue;
|
|
240
|
+
|
|
241
|
+
const shouldBeActive = shouldSetActive(field);
|
|
242
|
+
if (field.active === shouldBeActive) continue;
|
|
243
|
+
|
|
244
|
+
updates.push(() => setValue(i, "active", shouldBeActive));
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (updates.length === 0) return;
|
|
248
|
+
|
|
249
|
+
startTransition(() => updates.forEach((update) => update()));
|
|
250
|
+
}, [watchedFields, shouldSetActive, setValue]);
|
|
251
|
+
|
|
252
|
+
const isFieldEmpty = useCallback(
|
|
253
|
+
(index: number) => {
|
|
254
|
+
const field = watchedFields?.[index];
|
|
255
|
+
return field ? isEmpty(field) : true;
|
|
256
|
+
},
|
|
257
|
+
[watchedFields, isEmpty],
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
const createKeyDownHandler = useCallback(
|
|
261
|
+
(index: number, field: "name" | "value") => {
|
|
262
|
+
const next =
|
|
263
|
+
field === "name"
|
|
264
|
+
? `${name}.${index}.value`
|
|
265
|
+
: `${name}.${index + 1}.name`;
|
|
266
|
+
|
|
267
|
+
const previous =
|
|
268
|
+
field === "name"
|
|
269
|
+
? `${name}.${index - 1}.value`
|
|
270
|
+
: `${name}.${index}.name`;
|
|
271
|
+
const canNavigatePrevious = field === "value" || index > 0;
|
|
272
|
+
|
|
273
|
+
return (e: KeyboardEvent<HTMLInputElement>) => {
|
|
274
|
+
if (!(e.target instanceof HTMLInputElement)) return;
|
|
275
|
+
|
|
276
|
+
const isAtStart = e.target.selectionStart === 0;
|
|
277
|
+
const isAtEnd = e.target.selectionStart === e.target.value.length;
|
|
278
|
+
const isEmpty = !e.target.value;
|
|
279
|
+
|
|
280
|
+
if (e.key === "Enter") {
|
|
281
|
+
setFocus(next);
|
|
282
|
+
} else if (e.key === "Backspace" && isEmpty && canNavigatePrevious) {
|
|
283
|
+
e.preventDefault();
|
|
284
|
+
setFocus(previous);
|
|
285
|
+
} else if (e.key === "ArrowLeft" && isAtStart && canNavigatePrevious) {
|
|
286
|
+
e.preventDefault();
|
|
287
|
+
setFocus(previous);
|
|
288
|
+
} else if (e.key === "ArrowRight" && isAtEnd) {
|
|
289
|
+
e.preventDefault();
|
|
290
|
+
setFocus(next);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
},
|
|
294
|
+
[name, setFocus],
|
|
295
|
+
);
|
|
296
|
+
|
|
297
|
+
const getNameInputProps = useCallback<GetInputPropsFn>(
|
|
298
|
+
(index) => ({
|
|
299
|
+
...register(`${name}.${index}.name`),
|
|
300
|
+
onChange: (e) => setValue(index, "name", e.target.value),
|
|
301
|
+
onKeyDown: createKeyDownHandler(index, "name"),
|
|
302
|
+
}),
|
|
303
|
+
[register, name, setValue, createKeyDownHandler],
|
|
304
|
+
);
|
|
305
|
+
|
|
306
|
+
const getValueInputProps = useCallback<GetInputPropsFn>(
|
|
307
|
+
(index) => ({
|
|
308
|
+
...register(`${name}.${index}.value`),
|
|
309
|
+
onChange: (e) => setValue(index, "value", e.target.value),
|
|
310
|
+
onKeyDown: createKeyDownHandler(index, "value"),
|
|
311
|
+
}),
|
|
312
|
+
[register, name, setValue, createKeyDownHandler],
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
const getCheckboxProps = useCallback<(index: number) => CheckboxProps>(
|
|
316
|
+
(index) => ({
|
|
317
|
+
...register(`${name}.${index}.active`),
|
|
318
|
+
checked: watch(`${name}.${index}.active`) ?? false,
|
|
319
|
+
disabled: isFieldEmpty(index),
|
|
320
|
+
onCheckedChange: (checked: boolean) => {
|
|
321
|
+
setValue(index, "active", checked === true);
|
|
322
|
+
},
|
|
323
|
+
}),
|
|
324
|
+
[name, register, isFieldEmpty, watch, setValue],
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
const getValue = useCallback<GetValueFn>(
|
|
328
|
+
(index, field) => watchedFields?.[index]?.[field],
|
|
329
|
+
[watchedFields],
|
|
330
|
+
);
|
|
331
|
+
|
|
332
|
+
const getRemoveButtonProps = useCallback(
|
|
333
|
+
(index: number) => ({
|
|
334
|
+
onClick: () => remove(index),
|
|
335
|
+
disabled: index === fields.length - 1,
|
|
336
|
+
}),
|
|
337
|
+
[remove, fields.length],
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
return {
|
|
341
|
+
fields,
|
|
342
|
+
getNameInputProps,
|
|
343
|
+
getValueInputProps,
|
|
344
|
+
getCheckboxProps,
|
|
345
|
+
getRemoveButtonProps,
|
|
346
|
+
setValue,
|
|
347
|
+
getValue,
|
|
348
|
+
};
|
|
349
|
+
};
|
|
@@ -184,9 +184,7 @@ export const ResponseTab = ({
|
|
|
184
184
|
<Collapsible defaultOpen>
|
|
185
185
|
<CollapsibleHeaderTrigger>
|
|
186
186
|
<CornerDownRightIcon size={14} />
|
|
187
|
-
<CollapsibleHeader
|
|
188
|
-
Request Headers
|
|
189
|
-
</CollapsibleHeader>
|
|
187
|
+
<CollapsibleHeader>Request Headers</CollapsibleHeader>
|
|
190
188
|
</CollapsibleHeaderTrigger>
|
|
191
189
|
<CollapsibleContent>
|
|
192
190
|
<div className="grid grid-cols-[2fr_3fr] gap-x-6 text-sm">
|
|
@@ -231,9 +229,7 @@ export const ResponseTab = ({
|
|
|
231
229
|
<Collapsible defaultOpen>
|
|
232
230
|
<CollapsibleHeaderTrigger>
|
|
233
231
|
<CornerDownLeftIcon size={14} />
|
|
234
|
-
<CollapsibleHeader
|
|
235
|
-
Response Headers
|
|
236
|
-
</CollapsibleHeader>
|
|
232
|
+
<CollapsibleHeader>Response Headers</CollapsibleHeader>
|
|
237
233
|
</CollapsibleHeaderTrigger>
|
|
238
234
|
<CollapsibleContent>
|
|
239
235
|
<div className="grid grid-cols-[2fr_3fr] gap-x-6 text-sm">
|
|
@@ -12,7 +12,7 @@ export const SchemaExampleAndDefault = ({
|
|
|
12
12
|
if (example === undefined && defaultValue === undefined) return null;
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<div className="flex flex-col gap-1
|
|
15
|
+
<div className="flex flex-col gap-1">
|
|
16
16
|
{example !== undefined && (
|
|
17
17
|
<div>
|
|
18
18
|
<span className="text-muted-foreground">Example: </span>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
2
|
import { MinusIcon, PlusIcon, RefreshCcwDotIcon } from "lucide-react";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
+
import { Item, ItemActions, ItemContent, ItemTitle } from "zudoku/ui/Item.js";
|
|
4
5
|
import { InlineCode } from "../../../components/InlineCode.js";
|
|
5
6
|
import { Markdown } from "../../../components/Markdown.js";
|
|
6
7
|
import type { SchemaObject } from "../../../oas/parser/index.js";
|
|
7
8
|
import { Button } from "../../../ui/Button.js";
|
|
9
|
+
import { cn } from "../../../util/cn.js";
|
|
8
10
|
import { ConstValue } from "../components/ConstValue.js";
|
|
9
11
|
import { EnumValues } from "../components/EnumValues.js";
|
|
10
|
-
import { SelectOnClick } from "../components/SelectOnClick.js";
|
|
11
12
|
import { ParamInfos } from "../ParamInfos.js";
|
|
12
13
|
import { SchemaExampleAndDefault } from "./SchemaExampleAndDefault.js";
|
|
13
14
|
import { SchemaView } from "./SchemaView.js";
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
|
|
22
23
|
const RecursiveIndicator = ({ circularProp }: { circularProp?: string }) => (
|
|
23
24
|
<InlineCode
|
|
24
|
-
className="inline-flex items-center gap-1.5
|
|
25
|
+
className="inline-flex items-center gap-1.5 text-xs translate-y-0.5"
|
|
25
26
|
selectOnClick={false}
|
|
26
27
|
>
|
|
27
28
|
<RefreshCcwDotIcon size={13} />
|
|
@@ -46,18 +47,26 @@ export const SchemaPropertyItem = ({
|
|
|
46
47
|
|
|
47
48
|
if (isCircularRef(schema)) {
|
|
48
49
|
return (
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
<div
|
|
52
|
-
<
|
|
50
|
+
<Item>
|
|
51
|
+
<ItemContent className="gap-y-2">
|
|
52
|
+
<div>
|
|
53
|
+
<ItemTitle className="inline me-2">
|
|
54
|
+
<code>{name}</code>
|
|
55
|
+
</ItemTitle>
|
|
53
56
|
<ParamInfos
|
|
57
|
+
className="inline"
|
|
54
58
|
schema={schema}
|
|
55
|
-
extraItems={[
|
|
59
|
+
extraItems={[
|
|
60
|
+
group !== "optional" && (
|
|
61
|
+
<span className="text-primary">required</span>
|
|
62
|
+
),
|
|
63
|
+
<RecursiveIndicator key="circular-ref" />,
|
|
64
|
+
]}
|
|
56
65
|
/>
|
|
57
66
|
</div>
|
|
58
67
|
<SchemaExampleAndDefault schema={schema} />
|
|
59
|
-
</
|
|
60
|
-
</
|
|
68
|
+
</ItemContent>
|
|
69
|
+
</Item>
|
|
61
70
|
);
|
|
62
71
|
}
|
|
63
72
|
|
|
@@ -73,14 +82,34 @@ export const SchemaPropertyItem = ({
|
|
|
73
82
|
!isArrayCircularRef(schema),
|
|
74
83
|
);
|
|
75
84
|
|
|
85
|
+
const shouldRenderDescription = Boolean(
|
|
86
|
+
schema.description ||
|
|
87
|
+
("items" in schema && schema.items?.enum) ||
|
|
88
|
+
schema.const ||
|
|
89
|
+
schema.enum ||
|
|
90
|
+
schema.example !== undefined ||
|
|
91
|
+
schema.default !== undefined,
|
|
92
|
+
);
|
|
93
|
+
|
|
76
94
|
return (
|
|
77
|
-
<
|
|
78
|
-
<
|
|
79
|
-
<div
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
<Item>
|
|
96
|
+
<ItemContent className="gap-y-2">
|
|
97
|
+
<div>
|
|
98
|
+
<ItemTitle className="inline me-2">
|
|
99
|
+
{isCollapsible ? (
|
|
100
|
+
<button
|
|
101
|
+
onClick={() => setIsOpen(!isOpen)}
|
|
102
|
+
type="button"
|
|
103
|
+
className="hover:underline"
|
|
104
|
+
>
|
|
105
|
+
<code>{name}</code>
|
|
106
|
+
</button>
|
|
107
|
+
) : (
|
|
108
|
+
<code>{name}</code>
|
|
109
|
+
)}
|
|
110
|
+
</ItemTitle>
|
|
83
111
|
<ParamInfos
|
|
112
|
+
className="inline"
|
|
84
113
|
schema={schema}
|
|
85
114
|
extraItems={[
|
|
86
115
|
group !== "optional" && (
|
|
@@ -94,45 +123,53 @@ export const SchemaPropertyItem = ({
|
|
|
94
123
|
]}
|
|
95
124
|
/>
|
|
96
125
|
</div>
|
|
97
|
-
{
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
126
|
+
{shouldRenderDescription && (
|
|
127
|
+
<div className="flex flex-col gap-1.5">
|
|
128
|
+
{schema.description && (
|
|
129
|
+
<Markdown className="prose-sm" content={schema.description} />
|
|
130
|
+
)}
|
|
131
|
+
{"items" in schema && schema.items?.enum && (
|
|
132
|
+
<EnumValues values={schema.items.enum} />
|
|
133
|
+
)}
|
|
134
|
+
{schema.const && <ConstValue schema={schema} hideDescription />}
|
|
135
|
+
{schema.enum && <EnumValues values={schema.enum} />}
|
|
136
|
+
<SchemaExampleAndDefault schema={schema} />
|
|
137
|
+
</div>
|
|
105
138
|
)}
|
|
106
|
-
|
|
107
|
-
{schema.enum && <EnumValues values={schema.enum} />}
|
|
108
|
-
<SchemaExampleAndDefault schema={schema} />
|
|
139
|
+
</ItemContent>
|
|
109
140
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
141
|
+
{isCollapsible && showCollapseButton && (
|
|
142
|
+
<ItemActions className="self-start">
|
|
143
|
+
<Button
|
|
144
|
+
variant="ghost"
|
|
145
|
+
size="icon"
|
|
146
|
+
className="rounded-full"
|
|
147
|
+
onClick={() => setIsOpen(!isOpen)}
|
|
148
|
+
aria-label="Toggle properties"
|
|
115
149
|
>
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
150
|
+
{isOpen ? <MinusIcon size={16} /> : <PlusIcon size={16} />}
|
|
151
|
+
</Button>
|
|
152
|
+
</ItemActions>
|
|
153
|
+
)}
|
|
154
|
+
|
|
155
|
+
{isCollapsible && (
|
|
156
|
+
<Collapsible.Root
|
|
157
|
+
defaultOpen={defaultOpen}
|
|
158
|
+
open={isOpen}
|
|
159
|
+
onOpenChange={setIsOpen}
|
|
160
|
+
className={cn("w-full", !isOpen && "contents")}
|
|
161
|
+
>
|
|
162
|
+
<Collapsible.Content asChild>
|
|
163
|
+
<ItemContent>
|
|
164
|
+
{schema.anyOf || schema.oneOf || schema.type === "object" ? (
|
|
165
|
+
<SchemaView schema={schema} />
|
|
166
|
+
) : isArrayType(schema) && "items" in schema ? (
|
|
167
|
+
<SchemaView schema={schema.items} />
|
|
168
|
+
) : null}
|
|
169
|
+
</ItemContent>
|
|
170
|
+
</Collapsible.Content>
|
|
171
|
+
</Collapsible.Root>
|
|
172
|
+
)}
|
|
173
|
+
</Item>
|
|
137
174
|
);
|
|
138
175
|
};
|