@nocobase/plugin-api-doc 2.1.0-beta.8 → 2.2.0-alpha.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/client/645.078fa352fe15069a.js +21 -0
- package/dist/client/781.8cf9b3ac314520db.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client/swaggerParameterValuePlugin.d.ts +30 -0
- package/dist/externalVersion.js +5 -6
- package/package.json +2 -2
- package/dist/client/17d36a5c457cfa91.js +0 -21
- package/dist/client/e7d6e4c0ab22d331.js +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_api_doc=self.webpackChunk_nocobase_plugin_api_doc||[]).push([["781"],{712:function(e){e.exports="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAAAAD/4QMxaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzExMSA3OS4xNTgzMjUsIDIwMTUvMDkvMTAtMDE6MTA6MjAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4L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mlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODYyRjhERDU2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODYyRjhERDQ2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3QTY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3QjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCS01IAAABMSURBVHjaYmR4/5+BFPBfAMFm/MBgx8RAGWCn1AAmSg34Q6kBDKMGMDCwICeMIemF/5QawEipAWwUhwEjMDvbAWlWkvVBwu8vQIABAEwBCph8U6c0AAAAAElFTkSuQmCC"},234:function(e){e.exports='data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M13.418 7.859a.695.695 0 0 1 .978 0 .68.68 0 0 1 0 .969l-3.908 3.83a.697.697 0 0 1-.979 0l-3.908-3.83a.68.68 0 0 1 0-.969.695.695 0 0 1 .978 0L10 11l3.418-3.141z"/></svg>'},779:function(e){e.exports='data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="8" viewBox="3 7 10 8"><path fill="%2341474E" fill-rule="evenodd" d="M6.333 15 3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z"/></svg>'},153:function(e){e.exports='data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" aria-hidden="true"><path fill="%23fff" fill-rule="evenodd" d="M4 12h4v1H4v-1zm5-6H4v1h5V6zm2 3V7l-3 3 3 3v-2h5V9h-5zM6.5 8H4v1h2.5V8zM4 11h2.5v-1H4v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V5H3v9h10v-2zM4 4h8c0-.55-.45-1-1-1h-1c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H5c-.55 0-1 .45-1 1z"/></svg>'},294:function(e){e.exports='data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>'},383:function(e,t,A){A.r(t),A.d(t,{default:function(){return M}});var n=A(342),a=A(59),i=A(155),l=A.n(i),c=A(716),r=A.n(c);A(89);var u=A(944);function o(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function d(e){var t=e.closest("tr[data-param-name][data-param-in]"),A=null==t?void 0:t.getAttribute("data-param-name"),n=null==t?void 0:t.getAttribute("data-param-in");return A&&n?{paramName:A,paramIn:n}:null}function g(e){return null==e?"":String(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var A=0,n=Array(t);A<t;A++)n[A]=e[A];return n}function m(){var e,t,A=(e=["\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 1460px;\n width: 100%;\n padding: 16px 20px;\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return m=function(){return A},A}var h="API_DOC:DESTINATION_URL_KEY",v=function(){return localStorage.getItem(h)},M=function(){var e,t,A=(0,n.useAPIClient)(),c=(0,n.useCurrentAppInfo)(),M=(0,u.Bd)().t,b=(0,i.useRef)(null),p=(0,n.useRequest)({url:"swagger:getUrls"}).data,s=(0,i.useCallback)(function(e){if(!e.headers.Authorization){var t;Object.assign(e.headers,A.getHeaders()),(null==c||null==(t=c.data)?void 0:t.name)&&(e.headers["X-App"]=c.data.name),e.headers.Authorization="Bearer ".concat(A.auth.getToken())}return e},[A,null==c||null==(t=c.data)?void 0:t.name]),w=function(e){if(Array.isArray(e))return e}(e=(0,i.useState)(v()))||function(e){var t,A,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(a.push(t.value),2!==a.length);i=!0);}catch(e){l=!0,A=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw A}}return a}}(e)||function(e){if(e){if("string"==typeof e)return I(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return I(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),R=w[0],j=w[1];return((0,i.useEffect)(function(){R&&localStorage.setItem(h,R)},[R]),(0,i.useEffect)(function(){var e;(null==p||null==(e=p.data)?void 0:e.length)&&(R&&p.data.find(function(e){return e.url===v()})||j(p.data[0].url))},[R,p]),(0,i.useEffect)(function(){if(b.current){var e,t,A,n=document.createElement("div");b.current.appendChild(n);var a=(e=null,t=function(t){var A,n,a=t.target;if(o(a,HTMLInputElement)||o(a,HTMLTextAreaElement)){var i=d(a);i&&(A=function(e){for(var t=1;t<arguments.length;t++){var A=null!=arguments[t]?arguments[t]:{},n=Object.keys(A);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(A).filter(function(e){return Object.getOwnPropertyDescriptor(A,e).enumerable}))),n.forEach(function(t){var n;n=A[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},i),n=n={value:a.value,updatedAt:Date.now()},Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(n)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(e);t.push.apply(t,A)}return t})(Object(n)).forEach(function(e){Object.defineProperty(A,e,Object.getOwnPropertyDescriptor(n,e))}),e=A)}},A=function(e){var t=document.activeElement;return(o(t,HTMLInputElement)||o(t,HTMLTextAreaElement))&&n.contains(t)&&t.value===g(e)?d(t):null},n.addEventListener("input",t,!0),n.addEventListener("change",t,!0),{plugin:function(){return{statePlugins:{spec:{wrapActions:{changeParamByIdentity:function(t,n){return function(a,i,l,c){var r,u,o,d,I,m=A(l)||(!e||Date.now()-e.updatedAt>2e3||e.value!==g(l)?null:{paramName:e.paramName,paramIn:e.paramIn})||(o=null==i||null==(r=i.get)?void 0:r.call(i,"name"),d=null==i||null==(u=i.get)?void 0:u.call(i,"in"),"string"!=typeof o||"string"!=typeof d?null:{paramName:o,paramIn:d});return m&&(null==n||null==(I=n.specActions)?void 0:I.changeParam)?n.specActions.changeParam(a,m.paramName,m.paramIn,l,c):t(a,i,l,c)}}}}}}},dispose:function(){n.removeEventListener("input",t,!0),n.removeEventListener("change",t,!0)}});return r()({requestInterceptor:s,url:R,domNode:n,plugins:[a.plugin]}),function(){a.dispose(),n.remove()}}},[R,s]),R)?l().createElement(a.Space,{direction:"vertical",style:{width:"100%",height:"100%",overflowY:"auto"}},l().createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}},l().createElement("div",{className:(0,n.css)(m())},l().createElement(a.Typography.Text,{style:{whiteSpace:"nowrap"},strong:!0},M("Select a definition")),l().createElement(a.Select,{showSearch:!0,value:R,options:null==p?void 0:p.data,style:{width:"100%"},fieldNames:{label:"name",value:"url"},onChange:j}))),l().createElement("div",{ref:b})):l().createElement(a.Spin,null)}}}]);
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons"),require("antd-style")):"function"==typeof define&&define.amd?define("@nocobase/plugin-api-doc",["react-i18next","react","antd","@nocobase/client","@ant-design/icons","antd-style"],t):"object"==typeof exports?exports["@nocobase/plugin-api-doc"]=t(require("react-i18next"),require("react"),require("antd"),require("@nocobase/client"),require("@ant-design/icons"),require("antd-style")):e["@nocobase/plugin-api-doc"]=t(e["react-i18next"],e.react,e.antd,e["@nocobase/client"],e["@ant-design/icons"],e["antd-style"])}(self,function(e,t,n,r,o,i){return function(){"use strict";var c,a,u,l={944:function(e,t,n){n.d(t,{Bd:function(){return i},CU:function(){return o}}),n(342);var r=n(953),o="api-doc";function i(){return(0,r.useTranslation)(o)}},375:function(e){e.exports=o},342:function(e){e.exports=r},59:function(e){e.exports=n},235:function(e){e.exports=i},155:function(e){e.exports=t},953:function(t){t.exports=e}},p={};function s(e){var t=p[e];if(void 0!==t)return t.exports;var n=p[e]={id:e,exports:{}};return l[e].call(n.exports,n,n.exports,s),n.exports}s.m=l,s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=function(e){return Promise.all(Object.keys(s.f).reduce(function(t,n){return s.f[n](e,t),t},[]))},s.u=function(e){return""+e+"."+({645:"078fa352fe15069a",781:"8cf9b3ac314520db"})[e]+".js"},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f={},s.l=function(e,t,n,r){if(f[e])return void f[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),a=0;a<c.length;a++){var u=c[a];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-api-doc:"+n){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-rspack","@nocobase/plugin-api-doc:"+n),o.src=e),f[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(p);var r=f[e];if(delete f[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},s.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nc=void 0,s.g.importScripts&&(d=s.g.location+"");var f,d,b=s.g.document;if(!d&&b&&(b.currentScript&&"SCRIPT"===b.currentScript.tagName.toUpperCase()&&(d=b.currentScript.src),!d)){var h=b.getElementsByTagName("script");if(h.length)for(var v=h.length-1;v>-1&&(!d||!/^http(s?):/.test(d));)d=h[v--].src}if(!d)throw Error("Automatic publicPath is not supported in this browser");s.p=d.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.b=document.baseURI||self.location.href,c={889:0},s.f.j=function(e,t){var n=s.o(c,e)?c[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=c[e]=[t,r]});t.push(n[2]=r);var o=s.p+s.u(e),i=Error();s.l(o,function(t){if(s.o(c,e)&&(0!==(n=c[e])&&(c[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},a=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],u=0;if(o.some(function(e){return 0!==c[e]})){for(n in i)s.o(i,n)&&(s.m[n]=i[n]);a&&a(s)}for(e&&e(t);u<o.length;u++)r=o[u],s.o(c,r)&&c[r]&&c[r][0](),c[r]=0},(u=self.webpackChunk_nocobase_plugin_api_doc=self.webpackChunk_nocobase_plugin_api_doc||[]).forEach(a.bind(null,0)),u.push=a.bind(null,u.push.bind(u));var y={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-api-doc/dist/client/")}if(!e){var r=window.__nocobase_modern_client_prefix__||"v",o="/"+(r=String(r).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var i=window.location.pathname||"/",c=i.indexOf(o);e=c>=0?i.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+r+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-api-doc/dist/client/"}s.p=e}(),!function(){s.r(y),s.d(y,{PluginAPIDocClient:function(){return w},useStyles:function(){return g}});var e=s(375),t=s(342),n=s(59),r=s(235),o=s(155),i=s.n(o),c=s(944);function a(e,t,n,r,o,i,c){try{var a=e[i](c),u=a.value}catch(e){n(e);return}a.done?t(u):Promise.resolve(u).then(r,o)}function u(e,t,n){return(u=d()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&p(o,n.prototype),o}).apply(null,arguments)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t="function"==typeof Map?new Map:void 0;return(f=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return u(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p(n,e)})(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function b(){var e,t,n=(e=["\n position: relative;\n background: ",";\n padding: ","px;\n .open-tab {\n position: absolute;\n right: 0;\n top: 0;\n }\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return b=function(){return n},n}var h="/api-documentation",v=(0,o.lazy)(function(){return Promise.all([s.e("645"),s.e("781")]).then(s.bind(s,383))}),g=(0,r.createStyles)(function(e){var t=e.css,n=e.token;return t(b(),n.colorBgContainer,n.paddingMD)}),m=function(){var t=g().styles;return i().createElement("div",{className:t},i().createElement("div",{className:"open-tab"},i().createElement(n.Tooltip,{title:"Preview"},i().createElement("a",{href:h,target:"_blank",rel:"noreferrer"},i().createElement(n.Button,{size:"small",icon:i().createElement(e.RightOutlined,null)})))),i().createElement(v,null))},w=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=l(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,d()?Reflect.construct(e,t||[],l(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&p(n,e),t=[{key:"load",value:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(c,"next",{value:u(0)}),a(c,"throw",{value:u(1)}),a(c,"return",{value:u(2)}),"function"==typeof Symbol&&a(c,Symbol.iterator,{value:function(){return this}}),c;function u(a){return function(u){var l=[a,u];if(n)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.app.pluginSettingsManager.add(c.CU,{title:'{{t("API documentation", { ns: "'.concat(c.CU,'" })}}'),icon:"BookOutlined",Component:m,aclSnippet:"pm.api-doc.documentation"}),this.app.router.add("api-documentation",{path:h,Component:v}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){a(i,r,o,c,u,"next",e)}function u(e){a(i,r,o,c,u,"throw",e)}c(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(f(t.Plugin));y.default=w}(),y}()});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
type SwaggerParameter = {
|
|
10
|
+
get?: (key: string) => unknown;
|
|
11
|
+
};
|
|
12
|
+
type SwaggerSystem = {
|
|
13
|
+
specActions?: {
|
|
14
|
+
changeParam?: (path: unknown, paramName: string, paramIn: string, value: unknown, isXml?: boolean) => unknown;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type ChangeParamByIdentityAction = (path: unknown, param: SwaggerParameter, value: unknown, isXml?: boolean) => unknown;
|
|
18
|
+
export declare function createSwaggerParameterValuePlugin(root: HTMLElement): {
|
|
19
|
+
plugin: () => {
|
|
20
|
+
statePlugins: {
|
|
21
|
+
spec: {
|
|
22
|
+
wrapActions: {
|
|
23
|
+
changeParamByIdentity: (originalAction: ChangeParamByIdentityAction, system: SwaggerSystem) => (path: unknown, param: SwaggerParameter, value: unknown, isXml?: boolean) => unknown;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
dispose: () => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,15 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.
|
|
12
|
-
"@nocobase/sdk": "2.1.0-beta.8",
|
|
11
|
+
"@nocobase/client": "2.2.0-alpha.1",
|
|
13
12
|
"antd": "5.24.2",
|
|
14
13
|
"react": "18.2.0",
|
|
15
14
|
"@ant-design/icons": "5.6.1",
|
|
16
15
|
"antd-style": "3.7.1",
|
|
17
16
|
"react-i18next": "11.18.6",
|
|
18
|
-
"@nocobase/actions": "2.
|
|
19
|
-
"@nocobase/server": "2.
|
|
20
|
-
"@nocobase/utils": "2.
|
|
21
|
-
"@nocobase/database": "2.
|
|
17
|
+
"@nocobase/actions": "2.2.0-alpha.1",
|
|
18
|
+
"@nocobase/server": "2.2.0-alpha.1",
|
|
19
|
+
"@nocobase/utils": "2.2.0-alpha.1",
|
|
20
|
+
"@nocobase/database": "2.2.0-alpha.1"
|
|
22
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-api-doc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-alpha.1",
|
|
4
4
|
"displayName": "API documentation",
|
|
5
5
|
"displayName.ru-RU": "Документация API",
|
|
6
6
|
"displayName.zh-CN": "API 文档",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
27
27
|
"directory": "packages/plugins/api-doc"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "303663aba6c6eefa27e6a6435b4c0352074ec40f"
|
|
30
30
|
}
|