@digi-frontend/dgate-api-documentation 1.0.39 → 1.0.47
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/.editorconfig +12 -12
- package/.prettierignore +7 -7
- package/.prettierrc +15 -15
- package/dist/{a7568b270e175038.svg → 070dc6ecd197bc80.svg} +8 -8
- package/dist/16702d92fd6d1730.svg +6 -0
- package/dist/2b546d6e9fdf604a.svg +3 -0
- package/dist/2c3c6c2c3b835504.svg +5 -0
- package/dist/{43595976d1fdccbf.svg → 2e10bbdb265df50e.svg} +4 -4
- package/dist/55b5994c5781482b.svg +5 -0
- package/dist/60bef8083c55f46b.svg +6 -0
- package/dist/68c710e0583e19e6.svg +5 -0
- package/dist/731221b3f242672d.svg +4 -0
- package/dist/{b82c7612e73342f3.svg → 7f54eeb0bb2d1150.svg} +3 -3
- package/dist/8520b6792278d9df.svg +6 -0
- package/dist/{56dc416b683db280.svg → 8789eb84283ea95b.svg} +5 -5
- package/dist/9506ef7a26a74147.svg +12 -0
- package/dist/9b7aee27757b5036.svg +3 -0
- package/dist/{af16a554be8c4d69.svg → 9bdff13f8d8fa48a.svg} +3 -3
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index4.js +1 -1
- package/dist/_virtual/index5.js +1 -1
- package/dist/{64efc2716808c4a4.svg → bb8b87cace25e052.svg} +3 -3
- package/dist/cceb1e5dc06b0b85.svg +4 -0
- package/dist/d140a601c85bac25.svg +3 -0
- package/dist/{72db3b05a96dd600.svg → d32ce84bbd78babd.svg} +3 -3
- package/dist/{844eba3f2e42a9eb.svg → d501922060662842.svg} +3 -3
- package/dist/d6d0a98ec38e6b77.svg +3 -0
- package/dist/e04479ad425e7d58.svg +4 -0
- package/dist/f4a32992f02af522.svg +5 -0
- package/dist/node_modules/dom-serializer/lib/foreignNames.js +2 -0
- package/dist/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
- package/dist/node_modules/dom-serializer/lib/index.js +2 -0
- package/dist/node_modules/dom-serializer/lib/index.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +1 -0
- package/dist/node_modules/domhandler/lib/index.js +2 -0
- package/dist/node_modules/domhandler/lib/index.js.map +1 -0
- package/dist/node_modules/domhandler/lib/node.js +2 -0
- package/dist/node_modules/domhandler/lib/node.js.map +1 -0
- package/dist/node_modules/domutils/lib/feeds.js +2 -0
- package/dist/node_modules/domutils/lib/feeds.js.map +1 -0
- package/dist/node_modules/domutils/lib/helpers.js +2 -0
- package/dist/node_modules/domutils/lib/helpers.js.map +1 -0
- package/dist/node_modules/domutils/lib/index.js +2 -0
- package/dist/node_modules/domutils/lib/index.js.map +1 -0
- package/dist/node_modules/domutils/lib/legacy.js +2 -0
- package/dist/node_modules/domutils/lib/legacy.js.map +1 -0
- package/dist/node_modules/domutils/lib/manipulation.js +2 -0
- package/dist/node_modules/domutils/lib/manipulation.js.map +1 -0
- package/dist/node_modules/domutils/lib/querying.js +2 -0
- package/dist/node_modules/domutils/lib/querying.js.map +1 -0
- package/dist/node_modules/domutils/lib/stringify.js +2 -0
- package/dist/node_modules/domutils/lib/stringify.js.map +1 -0
- package/dist/node_modules/domutils/lib/traversal.js +2 -0
- package/dist/node_modules/domutils/lib/traversal.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/decode.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js +1 -1
- package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -1
- package/dist/node_modules/html-react-parser/lib/index.js +1 -1
- package/dist/node_modules/html-react-parser/lib/index.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/toposort/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/src/assets/icons/AddRow.svg.js +1 -1
- package/dist/src/assets/icons/AddRow.svg.js.map +1 -1
- package/dist/src/assets/icons/ApiIcon.svg.js +2 -0
- package/dist/src/assets/icons/ApiIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/ArrowBack.svg.js +2 -0
- package/dist/src/assets/icons/ArrowBack.svg.js.map +1 -0
- package/dist/src/assets/icons/BookIcon.svg.js +2 -0
- package/dist/src/assets/icons/BookIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/CopySticker.svg.js +2 -0
- package/dist/src/assets/icons/CopySticker.svg.js.map +1 -0
- package/dist/src/assets/icons/DeleteIcon.svg.js +1 -1
- package/dist/src/assets/icons/DeleteIcon.svg.js.map +1 -1
- package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js +2 -0
- package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/DownArrow.svg.js +1 -1
- package/dist/src/assets/icons/DownArrow.svg.js.map +1 -1
- package/dist/src/assets/icons/EditIcon.svg.js +1 -1
- package/dist/src/assets/icons/EditIcon.svg.js.map +1 -1
- package/dist/src/assets/icons/FilterIcon.svg.js +2 -0
- package/dist/src/assets/icons/FilterIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/Plus.svg.js +2 -0
- package/dist/src/assets/icons/Plus.svg.js.map +1 -0
- package/dist/src/assets/icons/PlusSquare.svg.js +2 -0
- package/dist/src/assets/icons/PlusSquare.svg.js.map +1 -0
- package/dist/src/assets/icons/RequestOption.svg.js +2 -0
- package/dist/src/assets/icons/RequestOption.svg.js.map +1 -0
- package/dist/src/assets/icons/arrowDownGray.svg.js +2 -0
- package/dist/src/assets/icons/arrowDownGray.svg.js.map +1 -0
- package/dist/src/assets/icons/arrowRightGray.svg.js +2 -0
- package/dist/src/assets/icons/arrowRightGray.svg.js.map +1 -0
- package/dist/src/assets/icons/close-circle.svg.js +2 -0
- package/dist/src/assets/icons/close-circle.svg.js.map +1 -0
- package/dist/src/assets/icons/document.svg.js +2 -0
- package/dist/src/assets/icons/document.svg.js.map +1 -0
- package/dist/src/assets/icons/eye.svg.js +2 -0
- package/dist/src/assets/icons/eye.svg.js.map +1 -0
- package/dist/src/assets/icons/infoIcon.svg.js +2 -0
- package/dist/src/assets/icons/infoIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/searchIcon.svg.js +2 -0
- package/dist/src/assets/icons/searchIcon.svg.js.map +1 -0
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/src/components/JsonInput/JsonInput.js.map +1 -1
- package/dist/src/components/LivePreview/LivePreview.js +1 -1
- package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
- package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
- package/dist/src/components/SectionHead/SectionHead.js.map +1 -1
- package/dist/src/components/SimpleLabelValue/SimpleLabelValue.js.map +1 -1
- package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/src/components/dialog/index.js +1 -1
- package/dist/src/components/dialog/index.js.map +1 -1
- package/dist/src/components/table/table.js +1 -1
- package/dist/src/components/table/table.js.map +1 -1
- package/dist/src/components/table/tags-table.js.map +1 -1
- package/dist/src/constants/index.js +1 -1
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/constants/methods.constant.js +2 -0
- package/dist/src/constants/methods.constant.js.map +1 -0
- package/dist/src/constants/regex.js.map +1 -1
- package/dist/src/helpers/layout.helper.js +1 -1
- package/dist/src/helpers/layout.helper.js.map +1 -1
- package/dist/src/helpers/methodAccordion.helper.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/layout/docsComponents/DocsAside/DocsAside.js +2 -0
- package/dist/src/layout/docsComponents/DocsAside/DocsAside.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js +2 -0
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js +2 -0
- package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js +2 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js +2 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js +2 -0
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js.map +1 -0
- package/dist/src/layout/docsComponents/index.js +2 -0
- package/dist/src/layout/docsComponents/index.js.map +1 -0
- package/dist/src/layout/docsLayout.js +2 -0
- package/dist/src/layout/docsLayout.js.map +1 -0
- package/dist/src/layout/layout.js +1 -1
- package/dist/src/layout/layout.js.map +1 -1
- package/dist/src/validator/form.scheme.js +1 -1
- package/dist/src/validator/form.scheme.js.map +1 -1
- package/dist/styles.css +1436 -368
- package/dist/types/assets/icons/index.d.ts +16 -1
- package/dist/types/components/LivePreview/LivePreview.d.ts +1 -0
- package/dist/types/components/MethodAccordion/MethodAccordion.d.ts +2 -1
- package/dist/types/components/dialog/dialog.d.ts +3 -0
- package/dist/types/components/table/table.d.ts +2 -1
- package/dist/types/constants/methods.constant.d.ts +16 -0
- package/dist/types/helpers/docs.helper.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layout/docsComponents/DocsAside/DocsAside.d.ts +3 -0
- package/dist/types/layout/docsComponents/DocsContent/DocsContent.d.ts +3 -0
- package/dist/types/layout/docsComponents/DocsContent/EndpointPage/index.d.ts +2 -0
- package/dist/types/layout/docsComponents/DocsContent/TagPage/index.d.ts +2 -0
- package/dist/types/layout/docsComponents/DocsHeader/DocsHeader.d.ts +3 -0
- package/dist/types/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +8 -0
- package/dist/types/layout/docsComponents/index.d.ts +17 -0
- package/dist/types/layout/docsLayout.d.ts +33 -0
- package/dist/types/layout/layout.d.ts +2 -1
- package/dist/types/types/layout.type.d.ts +1 -0
- package/dist/types/types/openApi.d.ts +4 -4
- package/dist/types/validator/form.scheme.d.ts +10 -2
- package/package.json +45 -43
- package/rollup.config.js +35 -35
- package/src/assets/icons/AddRow.svg +3 -3
- package/src/assets/icons/ApiIcon.svg +12 -0
- package/src/assets/icons/ArrowBack.svg +3 -0
- package/src/assets/icons/BookIcon.svg +6 -0
- package/src/assets/icons/CheckMarkSquare.svg +5 -5
- package/src/assets/icons/CloseIcon.svg +4 -4
- package/src/assets/icons/CopySticker.svg +6 -0
- package/src/assets/icons/DeleteIcon.svg +3 -3
- package/src/assets/icons/DeleteOutlinedIcon.svg +8 -0
- package/src/assets/icons/DownArrow.svg +3 -3
- package/src/assets/icons/EditIcon.svg +3 -3
- package/src/assets/icons/FilterIcon.svg +4 -0
- package/src/assets/icons/Plus.svg +5 -0
- package/src/assets/icons/PlusSquare.svg +3 -0
- package/src/assets/icons/RequestOption.svg +5 -0
- package/src/assets/icons/UpArrow.svg +3 -3
- package/src/assets/icons/arrowDownGray.svg +3 -0
- package/src/assets/icons/arrowRightGray.svg +3 -0
- package/src/assets/icons/close-circle.svg +5 -0
- package/src/assets/icons/deleteOutlinedIcon.svg +8 -8
- package/src/assets/icons/document.svg +6 -0
- package/src/assets/icons/eye.svg +4 -0
- package/src/assets/icons/index.ts +23 -8
- package/src/assets/icons/infoIcon.svg +5 -0
- package/src/assets/icons/searchIcon.svg +4 -0
- package/src/components/Chips/Chips.tsx +87 -87
- package/src/components/Chips/style.scss +147 -147
- package/src/components/InfoForm/InfoForm.module.scss +165 -165
- package/src/components/InfoForm/InfoForm.tsx +423 -428
- package/src/components/JsonInput/JsonInput.tsx +149 -149
- package/src/components/JsonInput/style.module.scss +133 -133
- package/src/components/LivePreview/LivePreview.module.scss +180 -24
- package/src/components/LivePreview/LivePreview.tsx +226 -191
- package/src/components/MethodAccordion/MethodAccordion.module.scss +386 -338
- package/src/components/MethodAccordion/MethodAccordion.tsx +670 -514
- package/src/components/SVGLoader/SVGLoader.tsx +96 -94
- package/src/components/SectionHead/SectionHead.scss +29 -29
- package/src/components/SectionHead/SectionHead.tsx +22 -22
- package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -31
- package/src/components/SimpleLabelValue/index.ts +1 -1
- package/src/components/SimpleLabelValue/style.scss +30 -30
- package/src/components/Tooltip/Tooltip.scss +133 -133
- package/src/components/Tooltip/Tooltip.tsx +85 -85
- package/src/components/_global.scss +337 -337
- package/src/components/dialog/dialog.ts +57 -54
- package/src/components/dialog/index.tsx +86 -85
- package/src/components/dialog/style.scss +188 -104
- package/src/components/table/style.scss +217 -190
- package/src/components/table/table.tsx +489 -327
- package/src/components/table/tags-table.tsx +348 -348
- package/src/constants/index.ts +95 -93
- package/src/constants/methods.constant.ts +26 -0
- package/src/constants/regex.ts +7 -7
- package/src/global.d.ts +13 -13
- package/src/helpers/docs.helper.ts +28 -0
- package/src/helpers/layout.helper.ts +176 -174
- package/src/helpers/methodAccordion.helper.ts +19 -19
- package/src/index.ts +2 -1
- package/src/layout/docsComponents/DocsAside/DocsAside.tsx +8 -0
- package/src/layout/docsComponents/DocsAside/style.scss +3 -0
- package/src/layout/docsComponents/DocsContent/DocsContent.tsx +13 -0
- package/src/layout/docsComponents/DocsContent/EndpointPage/index.tsx +183 -0
- package/src/layout/docsComponents/DocsContent/EndpointPage/style.scss +230 -0
- package/src/layout/docsComponents/DocsContent/TagPage/index.tsx +111 -0
- package/src/layout/docsComponents/DocsContent/TagPage/style.scss +246 -0
- package/src/layout/docsComponents/DocsContent/style.scss +0 -0
- package/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss +198 -0
- package/src/layout/docsComponents/DocsHeader/DocsHeader.tsx +119 -0
- package/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.tsx +183 -0
- package/src/layout/docsComponents/DocsSideMenuTree/style.scss +195 -0
- package/src/layout/docsComponents/index.scss +47 -0
- package/src/layout/docsComponents/index.tsx +28 -0
- package/src/layout/docsLayout.tsx +69 -0
- package/src/layout/layout.module.css +61 -61
- package/src/layout/layout.tsx +162 -150
- package/src/types/layout.type.ts +31 -30
- package/src/types/openApi.ts +108 -108
- package/src/types/transformedOpenApi.ts +52 -52
- package/src/validator/form.scheme.ts +88 -70
- package/tsconfig.json +33 -33
- package/dist/_virtual/index20.js +0 -2
- package/dist/_virtual/index20.js.map +0 -1
- package/dist/_virtual/index21.js +0 -2
- package/dist/_virtual/index21.js.map +0 -1
- package/dist/_virtual/node2.js +0 -2
- package/dist/_virtual/node2.js.map +0 -1
- package/dist/_virtual/node3.js +0 -2
- package/dist/_virtual/node3.js.map +0 -1
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js +0 -2
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js.map +0 -1
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js +0 -2
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js.map +0 -1
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js +0 -2
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js.map +0 -1
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js +0 -2
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
- package/dist/src/assets/icons/CheckMarkSquare.svg.js +0 -2
- package/dist/src/assets/icons/CheckMarkSquare.svg.js.map +0 -1
- package/dist/src/assets/icons/CloseIcon.svg.js +0 -2
- package/dist/src/assets/icons/CloseIcon.svg.js.map +0 -1
- package/dist/src/assets/icons/UpArrow.svg.js +0 -2
- package/dist/src/assets/icons/UpArrow.svg.js.map +0 -1
- package/dist/src/assets/icons/deleteOutlinedIcon.svg.js +0 -2
- package/dist/src/assets/icons/deleteOutlinedIcon.svg.js.map +0 -1
- package/dist/src/components/Chips/Chips.js +0 -2
- package/dist/src/components/Chips/Chips.js.map +0 -1
- package/dist/types/types/index.d.ts +0 -18
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import './style.scss'
|
|
2
|
+
import React, { useState } from 'react'
|
|
3
|
+
import SVGLoader from '../../../components/SVGLoader/SVGLoader'
|
|
4
|
+
import { arrowDownGray, arrowRightGray, document, eye } from '../../../assets/icons'
|
|
5
|
+
|
|
6
|
+
const DocsSideMenuTree = ({
|
|
7
|
+
apis,
|
|
8
|
+
setActiveItemData,
|
|
9
|
+
isFirstApiExpanded,
|
|
10
|
+
setIsFirstApiExpanded,
|
|
11
|
+
}) => {
|
|
12
|
+
const [expandedSections, setExpandedSections] = useState({})
|
|
13
|
+
|
|
14
|
+
const toggleSection = (apiId, sectionId: string, resetOthers?: boolean, key?: string[]) => {
|
|
15
|
+
isFirstApiExpanded && setIsFirstApiExpanded(false)
|
|
16
|
+
if (resetOthers && key) {
|
|
17
|
+
const filteredExpandedSections = Object.fromEntries(
|
|
18
|
+
Object.entries({ ...expandedSections }).filter(([expandKey, _]) => {
|
|
19
|
+
// Close other APIs sections
|
|
20
|
+
if (!expandKey.includes(apiId)) return false
|
|
21
|
+
// always return the clicked on section
|
|
22
|
+
else if (expandKey === sectionId) return true
|
|
23
|
+
// filter all sections containing the key
|
|
24
|
+
else if (key.some((k) => expandKey.includes(k))) return false
|
|
25
|
+
else return true
|
|
26
|
+
})
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
setExpandedSections({
|
|
30
|
+
...filteredExpandedSections,
|
|
31
|
+
[sectionId]: !expandedSections[sectionId],
|
|
32
|
+
})
|
|
33
|
+
} else {
|
|
34
|
+
setExpandedSections((prev) => ({
|
|
35
|
+
...prev,
|
|
36
|
+
[sectionId]: !prev[sectionId],
|
|
37
|
+
}))
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const renderEndpoints = (endpoints, api) => {
|
|
42
|
+
return endpoints.map((endpoint, index) => {
|
|
43
|
+
const isResourceExpanded = expandedSections[`api-${api.id}-resource-${endpoint.id}`]
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
key={index}
|
|
48
|
+
className={`api-docs-api-tree__endpoint api-docs-api-tree__endpoint--${endpoint.method.toLowerCase()}`}
|
|
49
|
+
onClick={() => {
|
|
50
|
+
setActiveItemData({
|
|
51
|
+
...endpoint,
|
|
52
|
+
api: {
|
|
53
|
+
id: api.id,
|
|
54
|
+
title: api.title,
|
|
55
|
+
description: api.description,
|
|
56
|
+
version: api.version,
|
|
57
|
+
},
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
if (!isResourceExpanded) {
|
|
61
|
+
toggleSection(api.id, `api-${api.id}-resource-${endpoint.id}`, true, [
|
|
62
|
+
'resource',
|
|
63
|
+
'overview',
|
|
64
|
+
])
|
|
65
|
+
}
|
|
66
|
+
}}
|
|
67
|
+
data-active={isResourceExpanded}
|
|
68
|
+
>
|
|
69
|
+
<span className="api-docs-api-tree__endpoint-method">{endpoint.method}</span>
|
|
70
|
+
<span className="api-docs-api-tree__endpoint-name">{endpoint.path}</span>
|
|
71
|
+
</div>
|
|
72
|
+
)
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const renderApiSection = (api, index) => {
|
|
77
|
+
const isApiExpanded = expandedSections[`api-${api.id}-section`]
|
|
78
|
+
const isEndpointActive = Object.keys(expandedSections).some((k) =>
|
|
79
|
+
k.includes(`api-${api.id}-resource`)
|
|
80
|
+
)
|
|
81
|
+
const isEndpointsExpanded = expandedSections[`api-${api.id}-endpoints`]
|
|
82
|
+
const isOverviewExpanded = expandedSections[`api-${api.id}-overview`]
|
|
83
|
+
|
|
84
|
+
if (isFirstApiExpanded && index === 0 && !isApiExpanded) {
|
|
85
|
+
toggleSection(api.id, `api-${api.id}-section`)
|
|
86
|
+
toggleSection(api.id, `api-${api.id}-overview`)
|
|
87
|
+
setActiveItemData(api)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<div
|
|
92
|
+
key={api.id}
|
|
93
|
+
className="api-docs-api-tree__section"
|
|
94
|
+
data-active={isEndpointActive || isOverviewExpanded}
|
|
95
|
+
>
|
|
96
|
+
<div
|
|
97
|
+
className="api-docs-api-tree__section-header"
|
|
98
|
+
onClick={() => toggleSection(api.id, `api-${api.id}-section`)}
|
|
99
|
+
>
|
|
100
|
+
{isApiExpanded ? <SVGLoader src={arrowDownGray} /> : <SVGLoader src={arrowRightGray} />}
|
|
101
|
+
<SVGLoader src={document} />
|
|
102
|
+
<span className="api-docs-api-tree__section-title">{api.title}</span>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
{isApiExpanded && (
|
|
106
|
+
<>
|
|
107
|
+
<div
|
|
108
|
+
className={`api-docs-api-tree__section__overview`}
|
|
109
|
+
onClick={() => {
|
|
110
|
+
toggleSection(api.id, `api-${api.id}-overview`, true, ['resource'])
|
|
111
|
+
setActiveItemData(api)
|
|
112
|
+
}}
|
|
113
|
+
data-active={isOverviewExpanded}
|
|
114
|
+
>
|
|
115
|
+
{<SVGLoader src={eye} />}
|
|
116
|
+
<span>Overview</span>
|
|
117
|
+
</div>
|
|
118
|
+
<div
|
|
119
|
+
className="api-docs-api-tree__section__endpoints"
|
|
120
|
+
onClick={() => {
|
|
121
|
+
toggleSection(api.id, `api-${api.id}-endpoints`)
|
|
122
|
+
}}
|
|
123
|
+
data-active={isEndpointActive && !isOverviewExpanded}
|
|
124
|
+
>
|
|
125
|
+
{isEndpointsExpanded ? (
|
|
126
|
+
<SVGLoader src={arrowDownGray} />
|
|
127
|
+
) : (
|
|
128
|
+
<SVGLoader src={arrowRightGray} />
|
|
129
|
+
)}
|
|
130
|
+
<span>Endpoints</span>
|
|
131
|
+
</div>
|
|
132
|
+
{isEndpointsExpanded && (
|
|
133
|
+
<div className="api-docs-api-tree__subsections">
|
|
134
|
+
{Object.entries(api.tags)
|
|
135
|
+
.sort(([a], [b]) => {
|
|
136
|
+
if (a === 'default') return 1
|
|
137
|
+
if (b === 'default') return -1
|
|
138
|
+
return a.localeCompare(b)
|
|
139
|
+
})
|
|
140
|
+
.map(([tagName, data], index) => renderSubSection(tagName, data, api, index))}
|
|
141
|
+
</div>
|
|
142
|
+
)}
|
|
143
|
+
</>
|
|
144
|
+
)}
|
|
145
|
+
</div>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const renderSubSection = (tagName, data, api, sectionIndex) => {
|
|
150
|
+
const sectionKey = `api-${api.id}-section-${sectionIndex}`
|
|
151
|
+
const isSectionExpanded = expandedSections[sectionKey]
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<div key={sectionKey} className="api-docs-api-tree__subsection">
|
|
155
|
+
<>
|
|
156
|
+
<div
|
|
157
|
+
className="api-docs-api-tree__subsection-header"
|
|
158
|
+
onClick={() => toggleSection(api.id, sectionKey)}
|
|
159
|
+
>
|
|
160
|
+
{isSectionExpanded ? (
|
|
161
|
+
<SVGLoader src={arrowDownGray} />
|
|
162
|
+
) : (
|
|
163
|
+
<SVGLoader src={arrowRightGray} />
|
|
164
|
+
)}
|
|
165
|
+
<span className="api-docs-api-tree__subsection-title">{tagName}</span>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
{isSectionExpanded && (
|
|
169
|
+
<div className="api-docs-api-tree__endpoints">{renderEndpoints(data, api)}</div>
|
|
170
|
+
)}
|
|
171
|
+
</>
|
|
172
|
+
</div>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<aside className="api-docs-api-tree">
|
|
178
|
+
{apis.map((api, index) => renderApiSection(api, index))}
|
|
179
|
+
</aside>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default DocsSideMenuTree
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
.api-docs-api-tree {
|
|
2
|
+
width: 100%;
|
|
3
|
+
max-width: 12.5rem;
|
|
4
|
+
padding: 3rem 1.25rem;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
> * {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&__section {
|
|
12
|
+
&-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 0.25rem;
|
|
16
|
+
padding-inline: 0.5rem;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
user-select: none;
|
|
19
|
+
height: 2.5rem;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background-color: #f3f4f6;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
svg:first-child {
|
|
26
|
+
path {
|
|
27
|
+
stroke: #bbbec5;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-title {
|
|
33
|
+
font-size: 0.75rem;
|
|
34
|
+
line-height: 0.875rem;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
color: #000;
|
|
37
|
+
margin-left: 0.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__overview {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 0.5rem;
|
|
44
|
+
padding: 0.5rem 1.75rem;
|
|
45
|
+
border-radius: 0.25rem;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background-color: #f3f4f6;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
span {
|
|
53
|
+
font-size: 0.75rem;
|
|
54
|
+
line-height: 0.875rem;
|
|
55
|
+
color: #000000;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-active='true'] {
|
|
59
|
+
background-color: #f0f1f2;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&__endpoints {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
height: 1.5rem;
|
|
67
|
+
gap: 0.5rem;
|
|
68
|
+
border-radius: 0.25rem;
|
|
69
|
+
padding-inline: 1.75rem;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
|
|
72
|
+
span {
|
|
73
|
+
font-size: 0.75rem;
|
|
74
|
+
line-height: 0.875rem;
|
|
75
|
+
color: #000000;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[data-active='true'] {
|
|
79
|
+
background-color: #f0f1f2;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[data-active='true'] {
|
|
84
|
+
.api-docs-api-tree__section-title {
|
|
85
|
+
color: #616874;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__endpoints {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
align-items: start;
|
|
94
|
+
gap: 0.5rem;
|
|
95
|
+
border-radius: 0.25rem;
|
|
96
|
+
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
|
|
99
|
+
span {
|
|
100
|
+
font-size: 0.75rem;
|
|
101
|
+
line-height: 0.875rem;
|
|
102
|
+
color: #000000;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[data-active='true'] {
|
|
106
|
+
background-color: #f0f1f2;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&__subsection {
|
|
111
|
+
&-header {
|
|
112
|
+
height: 2rem;
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
gap: 0.875rem;
|
|
116
|
+
padding-inline: 0.5rem;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
user-select: none;
|
|
119
|
+
|
|
120
|
+
svg {
|
|
121
|
+
color: #6b7280;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&-title {
|
|
126
|
+
font-size: 0.75rem;
|
|
127
|
+
line-height: 0.875rem;
|
|
128
|
+
color: #616874;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&__endpoint {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 0.25rem;
|
|
136
|
+
padding: 0.5rem 0.75rem;
|
|
137
|
+
text-transform: capitalize;
|
|
138
|
+
width: 100%;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
|
|
141
|
+
&[data-active='true'] {
|
|
142
|
+
background-color: #f0f1f2;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:hover {
|
|
146
|
+
background-color: #f3f4f6;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&-method {
|
|
150
|
+
font-size: 0.75rem;
|
|
151
|
+
line-height: 0.875rem;
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
text-align: start;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&-name {
|
|
157
|
+
font-size: 0.75rem;
|
|
158
|
+
line-height: 0.875rem;
|
|
159
|
+
color: #3b3f46;
|
|
160
|
+
display: -webkit-box;
|
|
161
|
+
-webkit-box-orient: vertical;
|
|
162
|
+
-webkit-line-clamp: 1;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
text-overflow: ellipsis;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&--get .api-docs-api-tree__endpoint-method {
|
|
168
|
+
color: #3a6cd1;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&--post .api-docs-api-tree__endpoint-method {
|
|
172
|
+
color: #3aaa35;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&--put .api-docs-api-tree__endpoint-method {
|
|
176
|
+
color: #faad14;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&--delete .api-docs-api-tree__endpoint-method {
|
|
180
|
+
color: #da3f3f;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&--option .api-docs-api-tree__endpoint-method {
|
|
184
|
+
color: #495d97;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&--head .api-docs-api-tree__endpoint-method {
|
|
188
|
+
color: #9461c9;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&--patch .api-docs-api-tree__endpoint-method {
|
|
192
|
+
color: #58e2c2;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.api-docs-layout {
|
|
2
|
+
display: grid;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
max-height: 100%;
|
|
5
|
+
width: 100%;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
grid-template: 3.125rem auto / 12.5rem 1fr auto;
|
|
8
|
+
padding: 0 !important;
|
|
9
|
+
|
|
10
|
+
* {
|
|
11
|
+
scrollbar-width: thin;
|
|
12
|
+
scrollbar-color: #bbbec5 #d1d3d8;
|
|
13
|
+
scroll-behavior: smooth;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
aside.api-docs-api-tree {
|
|
17
|
+
grid-row: 2;
|
|
18
|
+
grid-column: 1;
|
|
19
|
+
border-right: 1px solid #bbbec5;
|
|
20
|
+
background-color: white;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
aside.api-docs-aside {
|
|
24
|
+
grid-row: 2;
|
|
25
|
+
grid-column: 3;
|
|
26
|
+
width: 22.5rem;
|
|
27
|
+
max-width: 22.5rem;
|
|
28
|
+
overflow-x: clip;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
aside,
|
|
32
|
+
main {
|
|
33
|
+
max-height: 100%;
|
|
34
|
+
overflow: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
header {
|
|
38
|
+
grid-column: 1 / -1;
|
|
39
|
+
border-bottom: 1px solid #bbbec5;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
main {
|
|
43
|
+
grid-row: 2;
|
|
44
|
+
grid-column: 2;
|
|
45
|
+
background-color: white;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import DocsHeader from './DocsHeader/DocsHeader'
|
|
3
|
+
import DocsSideMenuTree from './DocsSideMenuTree/DocsSideMenuTree'
|
|
4
|
+
import DocsContent from './DocsContent/DocsContent'
|
|
5
|
+
import DocsAside from './DocsAside/DocsAside'
|
|
6
|
+
import './index.scss'
|
|
7
|
+
|
|
8
|
+
type LayoutProps = {
|
|
9
|
+
children: React.ReactNode
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type CompoundLayout = React.FC<LayoutProps> & {
|
|
13
|
+
DocsHeader: typeof DocsHeader
|
|
14
|
+
DocsSideMenuTree: typeof DocsSideMenuTree
|
|
15
|
+
DocsContent: typeof DocsContent
|
|
16
|
+
DocsAside: typeof DocsAside
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const Layout = (({ children }: LayoutProps) => {
|
|
20
|
+
return <div className="api-docs-layout">{children}</div>
|
|
21
|
+
}) as CompoundLayout
|
|
22
|
+
|
|
23
|
+
Layout.DocsHeader = DocsHeader
|
|
24
|
+
Layout.DocsSideMenuTree = DocsSideMenuTree
|
|
25
|
+
Layout.DocsContent = DocsContent
|
|
26
|
+
Layout.DocsAside = DocsAside
|
|
27
|
+
|
|
28
|
+
export default Layout
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React, { JSX, useEffect, useState } from 'react'
|
|
2
|
+
import Layout from './docsComponents'
|
|
3
|
+
import { HTTPMethod, OpenAPIFile, Parameter, RequestBody, Responses } from '@entities/openApi'
|
|
4
|
+
import { transformOpenApiToDocs } from '../helpers/docs.helper'
|
|
5
|
+
|
|
6
|
+
interface ILayoutProps {
|
|
7
|
+
openApiJson?: OpenAPIFile[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface TagData {
|
|
11
|
+
id: string
|
|
12
|
+
method: HTTPMethod
|
|
13
|
+
path: string
|
|
14
|
+
tags: string[]
|
|
15
|
+
responses: Responses
|
|
16
|
+
summary?: string
|
|
17
|
+
description: string
|
|
18
|
+
parameters?: Parameter[]
|
|
19
|
+
requestBody?: RequestBody
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface EndpointData extends TagData {
|
|
23
|
+
api: {
|
|
24
|
+
id: string
|
|
25
|
+
description: string
|
|
26
|
+
title: string
|
|
27
|
+
version: string
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface OverviewData {
|
|
32
|
+
id: string
|
|
33
|
+
description: string
|
|
34
|
+
title: string
|
|
35
|
+
version: string
|
|
36
|
+
tags: Record<string, TagData[]>
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const DocsLayout = ({ openApiJson }: ILayoutProps): JSX.Element => {
|
|
40
|
+
const [transformedOpenApis, setTransformedOpenApis] = useState([])
|
|
41
|
+
const [isFirstApiExpanded, setIsFirstApiExpanded] = useState(true)
|
|
42
|
+
const [activeItemData, setActiveItemData] = useState<OverviewData | EndpointData>()
|
|
43
|
+
|
|
44
|
+
// useEffect(() => {
|
|
45
|
+
// if (transformedOpenApis.length === 0) {
|
|
46
|
+
// setTransformedOpenApis(
|
|
47
|
+
// structuredClone(openApiJson)
|
|
48
|
+
// ?.map((o3) => transformOpenApiToDocs(o3))
|
|
49
|
+
// .sort((a, b) => a.title.toLowerCase().localeCompare(b.title.toLowerCase()))
|
|
50
|
+
// )
|
|
51
|
+
// }
|
|
52
|
+
// }, [openApiJson])
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Layout>
|
|
56
|
+
<Layout.DocsHeader />
|
|
57
|
+
<Layout.DocsSideMenuTree
|
|
58
|
+
apis={transformedOpenApis}
|
|
59
|
+
setActiveItemData={setActiveItemData}
|
|
60
|
+
isFirstApiExpanded={isFirstApiExpanded}
|
|
61
|
+
setIsFirstApiExpanded={setIsFirstApiExpanded}
|
|
62
|
+
/>
|
|
63
|
+
<Layout.DocsContent data={activeItemData} />
|
|
64
|
+
<Layout.DocsAside />
|
|
65
|
+
</Layout>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default DocsLayout
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
.docsLayout {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
overflow: hidden;
|
|
5
|
-
height: 100vh;
|
|
6
|
-
max-height: 100%;
|
|
7
|
-
|
|
8
|
-
.apiDocAlert {
|
|
9
|
-
border-radius: 0;
|
|
10
|
-
z-index: 3;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.layoutContainer {
|
|
14
|
-
display: grid;
|
|
15
|
-
grid-template-columns: 60% 40%;
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
max-width: 100%;
|
|
19
|
-
max-height: 100%;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
|
|
22
|
-
.editorSide {
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
padding-bottom: 1.25rem;
|
|
25
|
-
|
|
26
|
-
.editorSectionHead {
|
|
27
|
-
|
|
28
|
-
span {
|
|
29
|
-
width: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.editorSectionHead_content {
|
|
33
|
-
display: flex;
|
|
34
|
-
justify-content: space-between;
|
|
35
|
-
align-items: center;
|
|
36
|
-
|
|
37
|
-
button {
|
|
38
|
-
width: 6.25rem;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.livePreviewSide {
|
|
46
|
-
background-color: #f8f9fb;
|
|
47
|
-
padding: 1.25rem 1.875rem;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.docSide {
|
|
51
|
-
max-height: 100%;
|
|
52
|
-
overflow-y: overlay;
|
|
53
|
-
overflow-x: clip;
|
|
54
|
-
scroll-behavior: smooth;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:global(.textArea .inputField),
|
|
59
|
-
:global(.inputContainer .inputWrapper .innerInputContainer .input) {
|
|
60
|
-
padding-inline-end: 2.5rem;
|
|
61
|
-
}
|
|
1
|
+
.docsLayout {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
max-height: 100%;
|
|
7
|
+
|
|
8
|
+
.apiDocAlert {
|
|
9
|
+
border-radius: 0;
|
|
10
|
+
z-index: 3;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.layoutContainer {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: 60% 40%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
max-width: 100%;
|
|
19
|
+
max-height: 100%;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
|
|
22
|
+
.editorSide {
|
|
23
|
+
background-color: #fff;
|
|
24
|
+
padding-bottom: 1.25rem;
|
|
25
|
+
|
|
26
|
+
.editorSectionHead {
|
|
27
|
+
|
|
28
|
+
span {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.editorSectionHead_content {
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
align-items: center;
|
|
36
|
+
|
|
37
|
+
button {
|
|
38
|
+
width: 6.25rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.livePreviewSide {
|
|
46
|
+
background-color: #f8f9fb;
|
|
47
|
+
padding: 1.25rem 1.875rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.docSide {
|
|
51
|
+
max-height: 100%;
|
|
52
|
+
overflow-y: overlay;
|
|
53
|
+
overflow-x: clip;
|
|
54
|
+
scroll-behavior: smooth;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:global(.textArea .inputField),
|
|
59
|
+
:global(.inputContainer .inputWrapper .innerInputContainer .input) {
|
|
60
|
+
padding-inline-end: 2.5rem;
|
|
61
|
+
}
|
|
62
62
|
}
|