@nocobase/plugin-api-doc 2.1.0-beta.15 → 2.1.0-beta.17

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.
@@ -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([["758"],{712:function(A){A.exports="data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAAAAD/4QMxaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzExMSA3OS4xNTgzMjUsIDIwMTUvMDkvMTAtMDE6MTA6MjAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9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jhERDU2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODYyRjhERDQ2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3QTY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3QjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCS01IAAABMSURBVHjaYmR4/5+BFPBfAMFm/MBgx8RAGWCn1AAmSg34Q6kBDKMGMDCwICeMIemF/5QawEipAWwUhwEjMDvbAWlWkvVBwu8vQIABAEwBCph8U6c0AAAAAElFTkSuQmCC"},234:function(A){A.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(A){A.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(A){A.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(A){A.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>'},40:function(A,e,t){t.r(e);var i=t(342),n=t(59),c=t(155),l=t.n(c),a=t(716),I=t.n(a);t(89);var M=t(944);function h(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,i=Array(e);t<e;t++)i[t]=A[t];return i}function d(){var A,e,t=(A=["\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 1460px;\n width: 100%;\n padding: 16px 20px;\n "],e||(e=A.slice(0)),Object.freeze(Object.defineProperties(A,{raw:{value:Object.freeze(e)}})));return d=function(){return t},t}var g="API_DOC:DESTINATION_URL_KEY",r=function(){return localStorage.getItem(g)};e.default=function(){var A,e=(0,i.useAPIClient)(),t=(0,i.useCurrentAppInfo)();console.log("appInfo",t);var a=(0,M.Bd)().t,R=(0,c.useRef)(),v=(0,i.useRequest)({url:"swagger:getUrls"}).data,G=function(A){if(!A.headers.Authorization){var i;Object.assign(A.headers,e.getHeaders()),(null==t||null==(i=t.data)?void 0:i.name)&&(A.headers["X-App"]=t.data.name),A.headers.Authorization="Bearer ".concat(e.auth.getToken())}return A},u=function(A){if(Array.isArray(A))return A}(A=(0,c.useState)(r()))||function(A){var e,t,i=null==A?null:"u">typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=i){var n=[],c=!0,l=!1;try{for(i=i.call(A);!(c=(e=i.next()).done)&&(n.push(e.value),2!==n.length);c=!0);}catch(A){l=!0,t=A}finally{try{c||null==i.return||i.return()}finally{if(l)throw t}}return n}}(A)||function(A){if(A){if("string"==typeof A)return h(A,2);var e=Object.prototype.toString.call(A).slice(8,-1);if("Object"===e&&A.constructor&&(e=A.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return h(A,2)}}(A)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=u[0],w=u[1];return((0,c.useEffect)(function(){o&&localStorage.setItem(g,o)},[o]),(0,c.useEffect)(function(){var A;(null==v||null==(A=v.data)?void 0:A.length)&&(o&&v.data.find(function(A){return A.url===r()})||w(v.data[0].url))},[o,v]),(0,c.useEffect)(function(){I()({requestInterceptor:G,url:o,domNode:R.current})},[o]),o)?l().createElement(n.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,i.css)(d())},l().createElement(n.Typography.Text,{style:{whiteSpace:"nowrap"},strong:!0},a("Select a definition")),l().createElement(n.Select,{showSearch:!0,value:o,options:null==v?void 0:v.data,style:{width:"100%"},fieldNames:{label:"name",value:"url"},onChange:w}))),l().createElement("div",{ref:R})):l().createElement(n.Spin,null)}}}]);
@@ -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("@nocobase/client"),require("react"),require("@ant-design/icons"),require("antd"),require("antd-style")):"function"==typeof define&&define.amd?define("@nocobase/plugin-api-doc",["react-i18next","@nocobase/client","react","@ant-design/icons","antd","antd-style"],t):"object"==typeof exports?exports["@nocobase/plugin-api-doc"]=t(require("react-i18next"),require("@nocobase/client"),require("react"),require("@ant-design/icons"),require("antd"),require("antd-style")):e["@nocobase/plugin-api-doc"]=t(e["react-i18next"],e["@nocobase/client"],e.react,e["@ant-design/icons"],e.antd,e["antd-style"])}(self,function(e,t,n,r,o,i){return function(){var u,c,a,l,f,s,p={784:function(e,t,n){"use strict";n.d(t,{$G:function(){return i},A7:function(){return o}}),n(772);var r=n(238),o="api-doc";function i(){return(0,r.useTranslation)(o)}},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=r},772:function(e){"use strict";e.exports=t},721:function(e){"use strict";e.exports=o},202:function(e){"use strict";e.exports=i},156:function(e){"use strict";e.exports=n},238:function(t){"use strict";t.exports=e}},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={id:e,exports:{}};return p[e].call(n.exports,n,n.exports,b),n.exports}b.m=p,b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return""+e+"."+({737:"21b07dded912f105",940:"89b0852a6d3bc228"})[e]+".js"},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u={},c="@nocobase/plugin-api-doc:",b.l=function(e,t,n,r){if(u[e])return void u[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var f=a[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==c+n){o=f;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,b.nc&&o.setAttribute("nonce",b.nc),o.setAttribute("data-webpack",c+n),o.src=e),u[e]=[t];var s=function(t,n){o.onerror=o.onload=null,clearTimeout(p);var r=u[e];if(delete u[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=s.bind(null,o.onerror),o.onload=s.bind(null,o.onload),i&&document.head.appendChild(o)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nc=void 0,(a=window.__webpack_public_path__||"/").endsWith("/")||(a+="/"),b.p=a+"static/plugins/@nocobase/plugin-api-doc/dist/client/",b.b=document.baseURI||self.location.href,l={909:0},b.f.j=function(e,t){var n=b.o(l,e)?l[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=l[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),i=Error();b.l(o,function(t){if(b.o(l,e)&&(0!==(n=l[e])&&(l[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)}},f=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==l[e]})){for(n in i)b.o(i,n)&&(b.m[n]=i[n]);u&&u(b)}for(e&&e(t);c<o.length;c++)r=o[c],b.o(l,r)&&l[r]&&l[r][0](),l[r]=0},(s=self.webpackChunk_nocobase_plugin_api_doc=self.webpackChunk_nocobase_plugin_api_doc||[]).forEach(f.bind(null,0)),s.push=f.bind(null,s.push.bind(s));var y={};return!function(){"use strict";b.r(y),b.d(y,{PluginAPIDocClient:function(){return w},useStyles:function(){return g}});var e=b(482),t=b(772),n=b(721),r=b(202),o=b(156),i=b.n(o),u=b(784),c=b(581);function a(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function l(e,t,n){return(l=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&&s(o,n.prototype),o}).apply(null,arguments)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t="function"==typeof Map?new Map:void 0;return(p=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 l(e,arguments,f(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,e)})(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function h(){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 h=function(){return n},n}var v="/api-documentation",m=(0,o.lazy)(function(){return c("imported_1qf4hs9_component",Promise.all([b.e("737"),b.e("940")]).then(b.bind(b,920)))}),g=(0,r.createStyles)(function(e){var t=e.css,n=e.token;return t(h(),n.colorBgContainer,n.paddingMD)}),_=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:v,target:"_blank",rel:"noreferrer"},i().createElement(n.Button,{size:"small",icon:i().createElement(e.RightOutlined,null)})))),i().createElement(m,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=f(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=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||[],f(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&s(n,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){return function(e,t){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){var a=[i,c];if(n)throw TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(e){return t.app.pluginSettingsManager.add(u.A7,{title:'{{t("API documentation", { ns: "'.concat(u.A7,'" })}}'),icon:"BookOutlined",Component:_,aclSnippet:"pm.api-doc.documentation"}),t.app.router.add("api-documentation",{path:v,Component:m}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,c,"next",e)}function c(e){a(i,r,o,u,c,"throw",e)}u(void 0)})})()}}],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}(p(t.Plugin));y.default=w}(),y}()});
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 a,c,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",758:"fe46fbae2c7c8f6f"})[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,a=document.getElementsByTagName("script"),c=0;c<a.length;c++){var u=a[c];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,a={889:0},s.f.j=function(e,t){var n=s.o(a,e)?a[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=a[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(a,e)&&(0!==(n=a[e])&&(a[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)}},c=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],u=0;if(o.some(function(e){return 0!==a[e]})){for(n in i)s.o(i,n)&&(s.m[n]=i[n]);c&&c(s)}for(e&&e(t);u<o.length;u++)r=o[u],s.o(a,r)&&a[r]&&a[r][0](),a[r]=0},(u=self.webpackChunk_nocobase_plugin_api_doc=self.webpackChunk_nocobase_plugin_api_doc||[]).forEach(c.bind(null,0)),u.push=c.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){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),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),a=s(944);function c(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){n(e);return}c.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("758")]).then(s.bind(s,40))}),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:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:u(0)}),c(a,"throw",{value:u(1)}),c(a,"return",{value:u(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function u(c){return function(u){var l=[c,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=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(a.CU,{title:'{{t("API documentation", { ns: "'.concat(a.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 a(e){c(i,r,o,a,u,"next",e)}function u(e){c(i,r,o,a,u,"throw",e)}a(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}()});
@@ -8,15 +8,15 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-beta.15",
12
- "@nocobase/sdk": "2.1.0-beta.15",
11
+ "@nocobase/client": "2.1.0-beta.17",
12
+ "@nocobase/sdk": "2.1.0-beta.17",
13
13
  "antd": "5.24.2",
14
14
  "react": "18.2.0",
15
15
  "@ant-design/icons": "5.6.1",
16
16
  "antd-style": "3.7.1",
17
17
  "react-i18next": "11.18.6",
18
- "@nocobase/actions": "2.1.0-beta.15",
19
- "@nocobase/server": "2.1.0-beta.15",
20
- "@nocobase/utils": "2.1.0-beta.15",
21
- "@nocobase/database": "2.1.0-beta.15"
18
+ "@nocobase/actions": "2.1.0-beta.17",
19
+ "@nocobase/server": "2.1.0-beta.17",
20
+ "@nocobase/utils": "2.1.0-beta.17",
21
+ "@nocobase/database": "2.1.0-beta.17"
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-api-doc",
3
- "version": "2.1.0-beta.15",
3
+ "version": "2.1.0-beta.17",
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": "dc1aceea6357e6ab149976c2a236fc4b6bee1370"
29
+ "gitHead": "227d625e47174ab7b3a90170e7c6c67bbdf36e23"
30
30
  }