@nocobase/plugin-public-forms 2.2.0-alpha.6 → 2.2.0-alpha.7
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.
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_public_forms_client_v2=self.webpackChunk_nocobase_plugin_public_forms_client_v2||[]).push([["169"],{648:function(e,t,n){n.r(t),n.d(t,{default:function(){return
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_public_forms_client_v2=self.webpackChunk_nocobase_plugin_public_forms_client_v2||[]).push([["169"],{648:function(e,t,n){n.r(t),n.d(t,{default:function(){return d}});var r=n(694),o=n(59),l=n(155),u=n.n(l),a=n(442),i=n(913);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,l,u){try{var a=e[l](u),i=a.value}catch(e){n(e);return}a.done?t(i):Promise.resolve(i).then(r,o)}function s(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function p(e){var t,n=e.model,a=(0,r.useFlowContext)(),i=function(e){if(Array.isArray(e))return e}(t=(0,l.useState)(null))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],l=!0,u=!1;try{for(r=r.call(e);!(l=(t=r.next()).done)&&(o.push(t.value),2!==o.length);l=!0);}catch(e){u=!0,n=e}finally{try{l||null==r.return||r.return()}finally{if(u)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return c(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 c(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=i[0],d=i[1],y=(0,l.useMemo)(function(){var e=new r.FlowContext;return s(a,r.FlowContext)&&e.addDelegate(a),e.defineProperty("view",{value:{type:"embed",inputArgs:{},Header:null,Footer:null,close:function(){var e;return(e=function(){return function(e,t){var n,r,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(u,"next",{value:i(0)}),a(u,"throw",{value:i(1)}),a(u,"return",{value:i(2)}),"function"==typeof Symbol&&a(u,Symbol.iterator,{value:function(){return this}}),u;function i(a){return function(i){var c=[a,i];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(l=0)),l;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return l.label++,{value:c[1],done:!1};case 5:l.label++,r=c[1],c=[0];continue;case 7:c=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){l=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){l.label=c[1];break}if(6===c[0]&&l.label<o[1]){l.label=o[1],o=c;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(c);break}o[2]&&l.ops.pop(),l.trys.pop();continue}c=t.call(e,l)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(e){return[2,void 0]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function u(e){f(l,r,o,u,a,"next",e)}function a(e){f(l,r,o,u,a,"throw",e)}u(void 0)})})()},update:function(){}}}),e.defineProperty("flowSettingsEnabled",{get:function(){return!!(null==a?void 0:a.flowSettingsEnabled)},cache:!1}),e},[a]),b=(0,l.useMemo)(function(){return!!(s(n.context,r.FlowContext)&&s(y,r.FlowContext))},[n.context,y]);return((0,l.useLayoutEffect)(function(){return s(n.context,r.FlowContext)&&s(y,r.FlowContext)?(n.context.addDelegate(y),d({model:n,context:y}),function(){s(n.context,r.FlowContext)&&n.context.removeDelegate(y)}):void d(null)},[n,n.context,y]),b&&((null==p?void 0:p.model)!==n||p.context!==y))?u().createElement(o.Spin,null):u().createElement(r.FlowViewContextProvider,{context:y},u().createElement(r.FlowModelRenderer,{model:n,showFlowSettings:!1}))}function d(){var e=(0,a.useParams)().name;return u().createElement(i.PublicFormsSettingsDetailView,{pageUid:e},function(e){var t,n,r=Array.isArray(n=null==(t=e.subModels)?void 0:t.page)?n[0]:n;return r?u().createElement(p,{model:r}):u().createElement(o.Spin,null)})}}}]);
|
package/dist/client-v2/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("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/client-v2"),require("react-router-dom"),require("@formily/reactive"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-public-forms/client-v2",["ahooks","react-i18next","@emotion/css","@nocobase/client-v2","react-router-dom","@formily/reactive","react","antd","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-public-forms/client-v2"]=t(require("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/client-v2"),require("react-router-dom"),require("@formily/reactive"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-public-forms/client-v2"]=t(e.ahooks,e["react-i18next"],e["@emotion/css"],e["@nocobase/client-v2"],e["react-router-dom"],e["@formily/reactive"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,u,c,a,l){return function(){"use strict";var f,s,p,b={401:function(e,t,n){n.d(t,{$x:function(){return i},AU:function(){return s},B4:function(){return a},BQ:function(){return l},ND:function(){return u},gr:function(){return r},l_:function(){return f},oh:function(){return c},rl:function(){return o}});var r="public-forms",o="PublicFormsSettingsLayoutModel",i="public-forms",u="public-form-layout-model",c="PublicFormLayoutModel",a="PublicFormPageModel",l="PublicFormSubmitActionModel",f="NOCOBASE_FORM_TOKEN",s="# Submitted successfully!\nThis is a demo text, **supports Markdown syntax**."},375:function(e){e.exports=a},477:function(e){e.exports=n},992:function(e){e.exports=i},485:function(e){e.exports=r},694:function(e){e.exports=l},625:function(t){t.exports=e},59:function(e){e.exports=c},155:function(e){e.exports=u},953:function(e){e.exports=t},442:function(e){e.exports=o}},d={};function m(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return b[e](n,n.exports,m),n.exports}m.m=b,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.f={},m.e=function(e){return Promise.all(Object.keys(m.f).reduce(function(t,n){return m.f[n](e,t),t},[]))},m.u=function(e){return""+e+"."+({169:"1e3673c278f5018a",208:"e01457b6cdac5436",594:"823197edcbcf8961",599:"a08c3f5302e65d16",610:"934e0e89291812bf",64:"14dd13ceb37723c5"})[e]+".js"},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h={},m.l=function(e,t,n,r){if(h[e])return void h[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-public-forms/client-v2:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,m.nc&&o.setAttribute("nonce",m.nc),o.setAttribute("data-rspack","@nocobase/plugin-public-forms/client-v2:"+n),o.src=e),h[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=h[e];if(delete h[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=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)},m.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.g.importScripts&&(v=m.g.location+"");var h,v,g=m.g.document;if(!v&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(v=g.currentScript.src),!v)){var y=g.getElementsByTagName("script");if(y.length)for(var w=y.length-1;w>-1&&(!v||!/^http(s?):/.test(v));)v=y[w--].src}if(!v)throw Error("Automatic publicPath is not supported in this browser");m.p=v.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},m.f.j=function(e,t){var n=m.o(f,e)?f[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=m.p+m.u(e),i=Error();m.l(o,function(t){if(m.o(f,e)&&(0!==(n=f[e])&&(f[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)}},s=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==f[e]})){for(n in i)m.o(i,n)&&(m.m[n]=i[n]);u&&u(m)}for(e&&e(t);c<o.length;c++)r=o[c],m.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(p=self.webpackChunk_nocobase_plugin_public_forms_client_v2=self.webpackChunk_nocobase_plugin_public_forms_client_v2||[]).forEach(s.bind(null,0)),p.push=s.bind(null,p.push.bind(p));var _={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-public-forms/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-public-forms/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var u=window.location.pathname||"/",c=u.indexOf(i);e=c>=0?u.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-public-forms/dist/client-v2/"}m.p=e}(),!function(){m.r(_),m.d(_,{default:function(){return f},PluginPublicFormsClientV2:function(){return l}});var e=m(485),t=m(401);function n(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 r(e,t,n){return(r=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=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 r(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var l=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function c(){var e,t;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return e=c,t=arguments,e=i(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,a()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),e&&u(c,e),r=[{key:"load",value:function(){var e;return(e=function(){var e,n;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:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=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(r){return e=this.app.i18n.t("Public forms",{ns:t.gr}),this.flowEngine.registerModelLoaders((o(n={},t.rl,{loader:function(){return m.e("594").then(m.bind(m,913))}}),o(n,t.oh,{loader:function(){return m.e("610").then(m.bind(m,57))}}),o(n,t.B4,{loader:function(){return m.e("599").then(m.bind(m,826))}}),o(n,t.BQ,{loader:function(){return m.e("64").then(m.bind(m,43))}}),n)),this.pluginSettingsManager.addMenuItem({key:t.gr,title:e,icon:"TableOutlined",aclSnippet:"pm.public-forms"}),this.pluginSettingsManager.addPageTabItem({menuKey:t.gr,key:"index",title:e,componentLoader:function(){return m.e("208").then(m.bind(m,483))}}),this.pluginSettingsManager.addPageTabItem({menuKey:t.gr,key:":name",title:!1,hidden:!0,componentLoader:function(){return Promise.all([m.e("594"),m.e("169")]).then(m.bind(m,648))}}),this.app.layoutManager.registerLayout({routeName:t.$x,routePath:"/public-forms",uid:t.ND,layoutModelClass:t.oh,rootPageModelClass:t.B4,authCheck:!1}),[2]})},function(){var t=this,r=arguments;return new Promise(function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"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)}}(c.prototype,r),c}(c(e.Plugin)),f=l}(),_}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/client-v2"),require("react-router-dom"),require("@formily/reactive"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):"function"==typeof define&&define.amd?define("@nocobase/plugin-public-forms/client-v2",["ahooks","react-i18next","@emotion/css","@nocobase/client-v2","react-router-dom","@formily/reactive","react","antd","@ant-design/icons","@nocobase/flow-engine"],t):"object"==typeof exports?exports["@nocobase/plugin-public-forms/client-v2"]=t(require("ahooks"),require("react-i18next"),require("@emotion/css"),require("@nocobase/client-v2"),require("react-router-dom"),require("@formily/reactive"),require("react"),require("antd"),require("@ant-design/icons"),require("@nocobase/flow-engine")):e["@nocobase/plugin-public-forms/client-v2"]=t(e.ahooks,e["react-i18next"],e["@emotion/css"],e["@nocobase/client-v2"],e["react-router-dom"],e["@formily/reactive"],e.react,e.antd,e["@ant-design/icons"],e["@nocobase/flow-engine"])}(self,function(e,t,n,r,o,i,u,c,a,l){return function(){"use strict";var f,s,p,b={401:function(e,t,n){n.d(t,{$x:function(){return i},AU:function(){return s},B4:function(){return a},BQ:function(){return l},ND:function(){return u},gr:function(){return r},l_:function(){return f},oh:function(){return c},rl:function(){return o}});var r="public-forms",o="PublicFormsSettingsLayoutModel",i="public-forms",u="public-form-layout-model",c="PublicFormLayoutModel",a="PublicFormPageModel",l="PublicFormSubmitActionModel",f="NOCOBASE_FORM_TOKEN",s="# Submitted successfully!\nThis is a demo text, **supports Markdown syntax**."},375:function(e){e.exports=a},477:function(e){e.exports=n},992:function(e){e.exports=i},485:function(e){e.exports=r},694:function(e){e.exports=l},625:function(t){t.exports=e},59:function(e){e.exports=c},155:function(e){e.exports=u},953:function(e){e.exports=t},442:function(e){e.exports=o}},d={};function m(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return b[e](n,n.exports,m),n.exports}m.m=b,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.f={},m.e=function(e){return Promise.all(Object.keys(m.f).reduce(function(t,n){return m.f[n](e,t),t},[]))},m.u=function(e){return""+e+"."+({169:"4ba953fe19b5f740",208:"e01457b6cdac5436",594:"823197edcbcf8961",599:"a08c3f5302e65d16",610:"934e0e89291812bf",64:"14dd13ceb37723c5"})[e]+".js"},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h={},m.l=function(e,t,n,r){if(h[e])return void h[e].push(t);if(void 0!==n)for(var o,i,u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var a=u[c];if(a.getAttribute("src")==e||a.getAttribute("data-rspack")=="@nocobase/plugin-public-forms/client-v2:"+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,m.nc&&o.setAttribute("nonce",m.nc),o.setAttribute("data-rspack","@nocobase/plugin-public-forms/client-v2:"+n),o.src=e),h[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=h[e];if(delete h[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=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)},m.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.g.importScripts&&(v=m.g.location+"");var h,v,g=m.g.document;if(!v&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(v=g.currentScript.src),!v)){var y=g.getElementsByTagName("script");if(y.length)for(var w=y.length-1;w>-1&&(!v||!/^http(s?):/.test(v));)v=y[w--].src}if(!v)throw Error("Automatic publicPath is not supported in this browser");m.p=v.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},m.f.j=function(e,t){var n=m.o(f,e)?f[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=m.p+m.u(e),i=Error();m.l(o,function(t){if(m.o(f,e)&&(0!==(n=f[e])&&(f[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)}},s=function(e,t){var n,r,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==f[e]})){for(n in i)m.o(i,n)&&(m.m[n]=i[n]);u&&u(m)}for(e&&e(t);c<o.length;c++)r=o[c],m.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(p=self.webpackChunk_nocobase_plugin_public_forms_client_v2=self.webpackChunk_nocobase_plugin_public_forms_client_v2||[]).forEach(s.bind(null,0)),p.push=s.bind(null,p.push.bind(p));var _={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-public-forms/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-public-forms/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var u=window.location.pathname||"/",c=u.indexOf(i);e=c>=0?u.slice(0,c+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-public-forms/dist/client-v2/"}m.p=e}(),!function(){m.r(_),m.d(_,{default:function(){return f},PluginPublicFormsClientV2:function(){return l}});var e=m(485),t=m(401);function n(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 r(e,t,n){return(r=a()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=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 r(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function a(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(a=function(){return!!e})()}var l=function(e){var r;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function c(){var e,t;if(!(this instanceof c))throw TypeError("Cannot call a class as a function");return e=c,t=arguments,e=i(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,a()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return c.prototype=Object.create(e&&e.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),e&&u(c,e),r=[{key:"load",value:function(){var e;return(e=function(){var e,n;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:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=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(r){return e=this.app.i18n.t("Public forms",{ns:t.gr}),this.flowEngine.registerModelLoaders((o(n={},t.rl,{loader:function(){return m.e("594").then(m.bind(m,913))}}),o(n,t.oh,{loader:function(){return m.e("610").then(m.bind(m,57))}}),o(n,t.B4,{loader:function(){return m.e("599").then(m.bind(m,826))}}),o(n,t.BQ,{loader:function(){return m.e("64").then(m.bind(m,43))}}),n)),this.pluginSettingsManager.addMenuItem({key:t.gr,title:e,icon:"TableOutlined",aclSnippet:"pm.public-forms"}),this.pluginSettingsManager.addPageTabItem({menuKey:t.gr,key:"index",title:e,componentLoader:function(){return m.e("208").then(m.bind(m,483))}}),this.pluginSettingsManager.addPageTabItem({menuKey:t.gr,key:":name",title:!1,hidden:!0,componentLoader:function(){return Promise.all([m.e("594"),m.e("169")]).then(m.bind(m,648))}}),this.app.layoutManager.registerLayout({routeName:t.$x,routePath:"/public-forms",uid:t.ND,layoutModelClass:t.oh,rootPageModelClass:t.B4,authCheck:!1}),[2]})},function(){var t=this,r=arguments;return new Promise(function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"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)}}(c.prototype,r),c}(c(e.Plugin)),f=l}(),_}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.2.0-alpha.
|
|
11
|
+
"@nocobase/client": "2.2.0-alpha.7",
|
|
12
12
|
"react-i18next": "11.18.6",
|
|
13
|
-
"@nocobase/flow-engine": "2.2.0-alpha.
|
|
14
|
-
"@nocobase/client-v2": "2.2.0-alpha.
|
|
15
|
-
"@nocobase/plugin-ui-schema-storage": "2.2.0-alpha.
|
|
16
|
-
"@nocobase/server": "2.2.0-alpha.
|
|
13
|
+
"@nocobase/flow-engine": "2.2.0-alpha.7",
|
|
14
|
+
"@nocobase/client-v2": "2.2.0-alpha.7",
|
|
15
|
+
"@nocobase/plugin-ui-schema-storage": "2.2.0-alpha.7",
|
|
16
|
+
"@nocobase/server": "2.2.0-alpha.7",
|
|
17
17
|
"react": "18.2.0",
|
|
18
18
|
"@ant-design/icons": "5.6.1",
|
|
19
19
|
"antd": "5.24.2",
|
|
@@ -26,6 +26,6 @@ module.exports = {
|
|
|
26
26
|
"@formily/core": "2.3.7",
|
|
27
27
|
"@formily/shared": "2.3.7",
|
|
28
28
|
"@formily/reactive": "2.3.7",
|
|
29
|
-
"@nocobase/database": "2.2.0-alpha.
|
|
29
|
+
"@nocobase/database": "2.2.0-alpha.7",
|
|
30
30
|
"dayjs": "1.11.13"
|
|
31
31
|
};
|
package/dist/server/plugin.js
CHANGED
|
@@ -320,7 +320,7 @@ class PluginPublicFormsServer extends import_server.Plugin {
|
|
|
320
320
|
ctx.permission = {
|
|
321
321
|
skip: true
|
|
322
322
|
};
|
|
323
|
-
} else if (["list", "get"].includes(actionName) && ctx.PublicForm["targetCollections"].includes(resourceName) || (collection == null ? void 0 : collection.options.template) === "file" && actionName === "create" || resourceName === "storages" && ["getBasicInfo", "createPresignedUrl"].includes(actionName) || resourceName === "vditor" && ["check"].includes(actionName) || resourceName === "map-configuration" && actionName === "get") {
|
|
323
|
+
} else if (["list", "get"].includes(actionName) && ctx.PublicForm["targetCollections"].includes(resourceName) || (collection == null ? void 0 : collection.options.template) === "file" && actionName === "create" || resourceName === "storages" && ["getBasicInfo", "createPresignedUrl", "check"].includes(actionName) || resourceName === "vditor" && ["check"].includes(actionName) || resourceName === "map-configuration" && actionName === "get") {
|
|
324
324
|
ctx.permission = {
|
|
325
325
|
skip: true
|
|
326
326
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-public-forms",
|
|
3
|
-
"version": "2.2.0-alpha.
|
|
3
|
+
"version": "2.2.0-alpha.7",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"displayName": "Public forms",
|
|
6
6
|
"displayName.ru-RU": "Публичные формы",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"react-device-detect": "2.2.3"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "34ba02960fca9ab0b6881d3db7040a8a64067bba"
|
|
29
29
|
}
|