@nocobase/plugin-public-forms 2.3.0-alpha.1 → 2.3.0-beta.11

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_public_forms=self.webpackChunk_nocobase_plugin_public_forms||[]).push([["64"],{4043:function(e,t,n){n.r(t),n.d(t,{PublicFormSubmitActionModel:function(){return a}});var r=n(3485),o=n(8401),u=n(9488);function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}var a=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=c(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,l()?Reflect.construct(e,t||[],c(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&i(n,e),t=[{key:"getInputArgs",value:function(){var e,t,n=null==(t=this.context.resource)||null==(e=t.getSourceId)?void 0:e.call(t);return n?{sourceId:n,defaultInputKeys:["sourceId"]}:{}}},{key:"onClick",value:function(e){this.dispatchEvent("click",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:e},this.getInputArgs()),{debounce:!0,sequential:!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}(r.FormSubmitActionModel);a.define({label:(0,u.MZ)("Submit"),hide:function(e){return!Array.isArray(e.allowedFormActionModelNames)||!e.allowedFormActionModelNames.includes(o.BQ)}}),a.registerFlow({key:"publicFormSubmission",on:{eventName:"click",phase:"afterAllFlows"},steps:{showSuccessMessage:{handler:function(e){var t,n,r;e.publicFormRuntime&&(null==(n=e.publicFormPageModel)||null==(t=n.setPublicFormSubmitted)||t.call(n,!0),null==(r=e.setPublicFormSubmitted)||r.call(e,!0))}}}}),t.default=a},9488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(7694),o=n(5953),u=n(8401).gr;function c(e){return(0,r.tExpr)(e,{ns:u})}function i(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"}).t}}}]);
@@ -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("@emotion/css"),require("react-router-dom"),require("@formily/antd-v5"),require("@formily/reactive"),require("@formily/react"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("ahooks"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/core"),require("@formily/shared"),require("react"),require("antd"),require("@nocobase/client"),require("react-router")):"function"==typeof define&&define.amd?define("@nocobase/plugin-public-forms",["react-i18next","@emotion/css","react-router-dom","@formily/antd-v5","@formily/reactive","@formily/react","@ant-design/icons","@nocobase/flow-engine","ahooks","@nocobase/client-v2","dayjs","@formily/core","@formily/shared","react","antd","@nocobase/client","react-router"],t):"object"==typeof exports?exports["@nocobase/plugin-public-forms"]=t(require("react-i18next"),require("@emotion/css"),require("react-router-dom"),require("@formily/antd-v5"),require("@formily/reactive"),require("@formily/react"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("ahooks"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/core"),require("@formily/shared"),require("react"),require("antd"),require("@nocobase/client"),require("react-router")):e["@nocobase/plugin-public-forms"]=t(e["react-i18next"],e["@emotion/css"],e["react-router-dom"],e["@formily/antd-v5"],e["@formily/reactive"],e["@formily/react"],e["@ant-design/icons"],e["@nocobase/flow-engine"],e.ahooks,e["@nocobase/client-v2"],e.dayjs,e["@formily/core"],e["@formily/shared"],e.react,e.antd,e["@nocobase/client"],e["react-router"])}(self,function(e,t,r,n,o,i,u,c,a,l,s,f,p,d,m,b,y){return function(){"use strict";var h,g,v,x={1214:function(e,t,r){r.r(t),r.d(t,{PluginPublicFormsClient:function(){return S},default:function(){return P}});var n=r(3342),o=function(e){return{type:"void","x-toolbar":"BlockSchemaToolbar","x-toolbar-props":{draggable:!1},"x-settings":"blockSettings:publicForm","x-component":"CardItem","x-decorator":"FormBlockProvider","x-decorator-props":{collection:e.collection,dataSource:e.dataSource,type:"publicForm"},"x-use-decorator-props":"useCreateFormBlockDecoratorProps",properties:{a69vmspkv8h:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{grid:{type:"void","x-component":"Grid","x-initializer":"form:configureFields"},l9xfwp6cfh1:{type:"void","x-component":"ActionBar","x-initializer":"createForm:configureActions","x-component-props":{layout:"one-column"}}}}}}},i=r(5230),u=r(5953),c=new n.SchemaSettings({name:"blockSettings:publicForm",items:[{name:"title",Component:n.SchemaSettingsBlockTitleItem},{name:"linkageRules",Component:n.SchemaSettingsLinkageRules,useComponentProps:function(){return{collectionName:(0,n.useCollection)().name}}}]}),a=new n.SchemaSettings({name:"blockSettings:publicMarkdown",items:[{name:"EditMarkdown",type:"item",useComponentProps:function(){var e=(0,i.useField)();return{title:(0,(0,u.useTranslation)().t)("Edit markdown"),onClick:function(){e.editable=!0}}}},{name:"setBlockTemplate",Component:n.SchemaSettingsRenderEngine}]}),l=r(5375),s=r(8401);function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){r(e);return}c.done?t(a):Promise.resolve(a).then(n,o)}function m(e,t,r){return(m=g()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&y(o,r.prototype),o}).apply(null,arguments)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=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,r)}function r(){return m(e,arguments,b(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)})(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var v=(0,n.lazy)(function(){return Promise.all([r.e("755"),r.e("595"),r.e("397")]).then(r.bind(r,1636))},"AdminPublicFormList").AdminPublicFormList,x=(0,n.lazy)(function(){return Promise.all([r.e("755"),r.e("198"),r.e("595"),r.e("594"),r.e("634")]).then(r.bind(r,9369))},"AdminPublicFormPage").AdminPublicFormPage,w=(0,n.lazy)(function(){return Promise.all([r.e("755"),r.e("595")]).then(r.bind(r,3170))},"PublicFormPage").PublicFormPage,S=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,r,o,i,u;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=b(t),o=e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,g()?Reflect.construct(t,r||[],b(this).constructor):t.apply(this,r)),i="formTypes",u=new Map,i in o?Object.defineProperty(o,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[i]=u,e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&y(n,e),t=[{key:"registerFormType",value:function(e,t){this.formTypes.set(e,t)}},{key:"getFormSchemaByType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"form";return this.formTypes.get(e)?this.formTypes.get(e).uiSchema:function(){return null}}},{key:"getFormTypeOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.formTypes[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var u,c=(u=o.value,function(e){if(Array.isArray(e))return e}(u)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(u)||function(e){if(e){if("string"==typeof e)return p(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 p(e,2)}}(u)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=c[0],l=c[1].label;e.push({value:a,label:l})}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"load",value:function(){var e;return(e=function(){return function(e,t){var r,n,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(r)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){var t;return this.app.flowEngine.registerModelLoaders((f(t={},s.rl,{loader:function(){return Promise.all([r.e("594"),r.e("966")]).then(r.bind(r,913))}}),f(t,s.oh,{loader:function(){return r.e("224").then(r.bind(r,283))}}),f(t,s.B4,{loader:function(){return r.e("599").then(r.bind(r,1826))}}),f(t,s.BQ,{loader:function(){return r.e("64").then(r.bind(r,4043))}}),t)),this.app.schemaSettingsManager.add(c),this.app.schemaSettingsManager.add(a),this.registerFormType("form",{label:"Form",uiSchema:o}),this.app.router.add("public-forms",{path:"/public-forms/:name",Component:w,skipAuthCheck:!0}),this.app.pluginSettingsManager.add("public-forms",{title:'{{t("Public forms", { ns: "'.concat(l.CU,'" })}}'),icon:"TableOutlined",Component:v}),this.app.pluginSettingsManager.add("public-forms/:name",{title:!1,pluginKey:"public-forms",isTopLevel:!1,Component:x}),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function u(e){d(i,n,o,u,c,"next",e)}function c(e){d(i,n,o,u,c,"throw",e)}u(void 0)})}).call(this)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,t),n}(h(n.Plugin)),P=S},8401:function(e,t,r){r.d(t,{AU:function(){return s},B4:function(){return c},BQ:function(){return a},ND:function(){return i},gr:function(){return n},l_:function(){return l},oh:function(){return u},rl:function(){return o}});var n="public-forms",o="PublicFormsSettingsLayoutModel",i="public-form-layout-model",u="PublicFormLayoutModel",c="PublicFormPageModel",a="PublicFormSubmitActionModel",l="NOCOBASE_FORM_TOKEN",s="# Submitted successfully!\nThis is a demo text, **supports Markdown syntax**."},5375:function(e,t,r){r.d(t,{CU:function(){return u},kO:function(){return a},kj:function(){return c}});var n=r(3342),o=r(5953),i=JSON.parse('{"UU":"@nocobase/plugin-public-forms"}'),u="public-forms";function c(){var e=(0,n.useApp)();return function(t){return e.i18n.t(t,{ns:[i.UU,"client"]})}}function a(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"})}},7375:function(e){e.exports=u},5477:function(e){e.exports=t},418:function(e){e.exports=n},9452:function(e){e.exports=f},5230:function(e){e.exports=i},7992:function(e){e.exports=o},166:function(e){e.exports=p},3342:function(e){e.exports=b},3485:function(e){e.exports=l},7694:function(e){e.exports=c},2625:function(e){e.exports=a},2059:function(e){e.exports=m},9185:function(e){e.exports=s},9155:function(e){e.exports=d},5953:function(t){t.exports=e},2707:function(e){e.exports=y},4442:function(e){e.exports=r},4258:function(e,t,r){var n="",o="u">typeof document?document.currentScript:null;if(o&&o.src){var i=o.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");i.indexOf("/static/plugins/@nocobase/plugin-public-forms/dist/client/")>=0&&(n=i.replace(/\/[^\/]+$/,"/"))}if(!n){var u=window.__webpack_public_path__||"";u&&("/"!==u.charAt(u.length-1)&&(u+="/"),n=u+"static/plugins/@nocobase/plugin-public-forms/dist/client/")}if(!n){var c=window.__nocobase_modern_client_prefix__||"v",a="/"+(c=String(c).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(n=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var l=window.location.pathname||"/",s=l.indexOf(a);n=s>=0?l.slice(0,s+1):"/"}n&&(n=n.replace(RegExp("/"+c+"/?$"),"/")),n||(n="/"),"/"!==n.charAt(n.length-1)&&(n+="/"),n+="static/plugins/@nocobase/plugin-public-forms/dist/client/"}r.p=n}},w={};function S(e){var t=w[e];if(void 0!==t)return t.exports;var r=w[e]={id:e,exports:{}};return x[e].call(r.exports,r,r.exports,S),r.exports}S.m=x,S.amdO={},S.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return S.d(t,{a:t}),t},_=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},S.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);S.r(r);var n={};P=P||[null,_({}),_([]),_(_)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~P.indexOf(o);o=_(o))Object.getOwnPropertyNames(o).forEach(function(t){n[t]=function(){return e[t]}});return n.default=function(){return e},S.d(r,n),r},S.d=function(e,t){for(var r in t)S.o(t,r)&&!S.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},S.f={},S.e=function(e){return Promise.all(Object.keys(S.f).reduce(function(t,r){return S.f[r](e,t),t},[]))},S.u=function(e){return""+e+"."+({198:"780dab97e4ef08bf",224:"5536c33a162f55b3",397:"3f67c86613025a0e",594:"43db6c29093027e8",595:"eeb0d3acf81baf05",599:"5b805a5c7f2d27c9",634:"6f0d8f6bd9082579",64:"87bced51d952fd71",755:"54e2c6a5fba42eb6",966:"2fd2224ac56adc7e"})[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)},k={},S.l=function(e,t,r,n){if(k[e])return void k[e].push(t);if(void 0!==r)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:"+r){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,S.nc&&o.setAttribute("nonce",S.nc),o.setAttribute("data-rspack","@nocobase/plugin-public-forms:"+r),o.src=e),k[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=k[e];if(delete k[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},s=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&&(O=S.g.location+"");var P,_,k,O,j=S.g.document;if(!O&&j&&(j.currentScript&&"SCRIPT"===j.currentScript.tagName.toUpperCase()&&(O=j.currentScript.src),!O)){var q=j.getElementsByTagName("script");if(q.length)for(var T=q.length-1;T>-1&&(!O||!/^http(s?):/.test(O));)O=q[T--].src}if(!O)throw Error("Automatic publicPath is not supported in this browser");return S.p=O.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h={889:0},S.f.j=function(e,t){var r=S.o(h,e)?h[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var n=new Promise(function(t,n){r=h[e]=[t,n]});t.push(r[2]=n);var o=S.p+S.u(e),i=Error();S.l(o,function(t){if(S.o(h,e)&&(0!==(r=h[e])&&(h[e]=void 0),r)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}},"chunk-"+e,e)}},g=function(e,t){var r,n,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==h[e]})){for(r in i)S.o(i,r)&&(S.m[r]=i[r]);u&&u(S)}for(e&&e(t);c<o.length;c++)n=o[c],S.o(h,n)&&h[n]&&h[n][0](),h[n]=0},(v=self.webpackChunk_nocobase_plugin_public_forms=self.webpackChunk_nocobase_plugin_public_forms||[]).forEach(g.bind(null,0)),v.push=g.bind(null,v.push.bind(v)),S(4258),S(1214)}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@emotion/css"),require("react-router-dom"),require("@formily/antd-v5"),require("@formily/reactive"),require("@formily/react"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("ahooks"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/core"),require("@formily/shared"),require("react"),require("antd"),require("@nocobase/client"),require("react-router")):"function"==typeof define&&define.amd?define("@nocobase/plugin-public-forms",["react-i18next","@emotion/css","react-router-dom","@formily/antd-v5","@formily/reactive","@formily/react","@ant-design/icons","@nocobase/flow-engine","ahooks","@nocobase/client-v2","dayjs","@formily/core","@formily/shared","react","antd","@nocobase/client","react-router"],t):"object"==typeof exports?exports["@nocobase/plugin-public-forms"]=t(require("react-i18next"),require("@emotion/css"),require("react-router-dom"),require("@formily/antd-v5"),require("@formily/reactive"),require("@formily/react"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("ahooks"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/core"),require("@formily/shared"),require("react"),require("antd"),require("@nocobase/client"),require("react-router")):e["@nocobase/plugin-public-forms"]=t(e["react-i18next"],e["@emotion/css"],e["react-router-dom"],e["@formily/antd-v5"],e["@formily/reactive"],e["@formily/react"],e["@ant-design/icons"],e["@nocobase/flow-engine"],e.ahooks,e["@nocobase/client-v2"],e.dayjs,e["@formily/core"],e["@formily/shared"],e.react,e.antd,e["@nocobase/client"],e["react-router"])}(self,function(e,t,r,n,o,i,u,c,a,l,s,f,p,d,m,b,y){return function(){"use strict";var h,g,v,x={1214:function(e,t,r){r.r(t),r.d(t,{PluginPublicFormsClient:function(){return S},default:function(){return P}});var n=r(3342),o=function(e){return{type:"void","x-toolbar":"BlockSchemaToolbar","x-toolbar-props":{draggable:!1},"x-settings":"blockSettings:publicForm","x-component":"CardItem","x-decorator":"FormBlockProvider","x-decorator-props":{collection:e.collection,dataSource:e.dataSource,type:"publicForm"},"x-use-decorator-props":"useCreateFormBlockDecoratorProps",properties:{a69vmspkv8h:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:{grid:{type:"void","x-component":"Grid","x-initializer":"form:configureFields"},l9xfwp6cfh1:{type:"void","x-component":"ActionBar","x-initializer":"createForm:configureActions","x-component-props":{layout:"one-column"}}}}}}},i=r(5230),u=r(5953),c=new n.SchemaSettings({name:"blockSettings:publicForm",items:[{name:"title",Component:n.SchemaSettingsBlockTitleItem},{name:"linkageRules",Component:n.SchemaSettingsLinkageRules,useComponentProps:function(){return{collectionName:(0,n.useCollection)().name}}}]}),a=new n.SchemaSettings({name:"blockSettings:publicMarkdown",items:[{name:"EditMarkdown",type:"item",useComponentProps:function(){var e=(0,i.useField)();return{title:(0,(0,u.useTranslation)().t)("Edit markdown"),onClick:function(){e.editable=!0}}}},{name:"setBlockTemplate",Component:n.SchemaSettingsRenderEngine}]}),l=r(5375),s=r(8401);function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){r(e);return}c.done?t(a):Promise.resolve(a).then(n,o)}function m(e,t,r){return(m=g()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&y(o,r.prototype),o}).apply(null,arguments)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=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,r)}function r(){return m(e,arguments,b(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),y(r,e)})(e)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}var v=(0,n.lazy)(function(){return Promise.all([r.e("755"),r.e("595"),r.e("397")]).then(r.bind(r,1636))},"AdminPublicFormList").AdminPublicFormList,x=(0,n.lazy)(function(){return Promise.all([r.e("755"),r.e("198"),r.e("595"),r.e("594"),r.e("634")]).then(r.bind(r,9369))},"AdminPublicFormPage").AdminPublicFormPage,w=(0,n.lazy)(function(){return Promise.all([r.e("755"),r.e("595")]).then(r.bind(r,3170))},"PublicFormPage").PublicFormPage,S=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,r,o,i,u;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=b(t),o=e=function(e,t){var r;if(t&&("object"==((r=t)&&"u">typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,g()?Reflect.construct(t,r||[],b(this).constructor):t.apply(this,r)),i="formTypes",u=new Map,i in o?Object.defineProperty(o,i,{value:u,enumerable:!0,configurable:!0,writable:!0}):o[i]=u,e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&y(n,e),t=[{key:"registerFormType",value:function(e,t){this.formTypes.set(e,t)}},{key:"getFormSchemaByType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"form";return this.formTypes.get(e)?this.formTypes.get(e).uiSchema:function(){return null}}},{key:"getFormTypeOptions",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var o,i=this.formTypes[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var u,c=(u=o.value,function(e){if(Array.isArray(e))return e}(u)||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){u=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(u)throw r}}return o}}(u)||function(e){if(e){if("string"==typeof e)return p(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 p(e,2)}}(u)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=c[0],l=c[1].label;e.push({value:a,label:l})}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}return e}},{key:"load",value:function(){var e;return(e=function(){return function(e,t){var r,n,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(r)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){var t;return this.app.flowEngine.registerModelLoaders((f(t={},s.rl,{loader:function(){return Promise.all([r.e("594"),r.e("966")]).then(r.bind(r,913))}}),f(t,s.oh,{loader:function(){return r.e("224").then(r.bind(r,283))}}),f(t,s.B4,{loader:function(){return r.e("599").then(r.bind(r,1826))}}),f(t,s.BQ,{loader:function(){return r.e("64").then(r.bind(r,4043))}}),t)),this.app.schemaSettingsManager.add(c),this.app.schemaSettingsManager.add(a),this.registerFormType("form",{label:"Form",uiSchema:o}),this.app.router.add("public-forms",{path:"/public-forms/:name",Component:w,skipAuthCheck:!0}),this.app.pluginSettingsManager.add("public-forms",{title:'{{t("Public forms", { ns: "'.concat(l.CU,'" })}}'),icon:"TableOutlined",Component:v}),this.app.pluginSettingsManager.add("public-forms/:name",{title:!1,pluginKey:"public-forms",isTopLevel:!1,Component:x}),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function u(e){d(i,n,o,u,c,"next",e)}function c(e){d(i,n,o,u,c,"throw",e)}u(void 0)})}).call(this)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,t),n}(h(n.Plugin)),P=S},8401:function(e,t,r){r.d(t,{AU:function(){return s},B4:function(){return c},BQ:function(){return a},ND:function(){return i},gr:function(){return n},l_:function(){return l},oh:function(){return u},rl:function(){return o}});var n="public-forms",o="PublicFormsSettingsLayoutModel",i="public-form-layout-model",u="PublicFormLayoutModel",c="PublicFormPageModel",a="PublicFormSubmitActionModel",l="NOCOBASE_FORM_TOKEN",s="# Submitted successfully!\nThis is a demo text, **supports Markdown syntax**."},5375:function(e,t,r){r.d(t,{CU:function(){return u},kO:function(){return a},kj:function(){return c}});var n=r(3342),o=r(5953),i=JSON.parse('{"UU":"@nocobase/plugin-public-forms"}'),u="public-forms";function c(){var e=(0,n.useApp)();return function(t){return e.i18n.t(t,{ns:[i.UU,"client"]})}}function a(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"})}},7375:function(e){e.exports=u},5477:function(e){e.exports=t},418:function(e){e.exports=n},9452:function(e){e.exports=f},5230:function(e){e.exports=i},7992:function(e){e.exports=o},166:function(e){e.exports=p},3342:function(e){e.exports=b},3485:function(e){e.exports=l},7694:function(e){e.exports=c},2625:function(e){e.exports=a},2059:function(e){e.exports=m},9185:function(e){e.exports=s},9155:function(e){e.exports=d},5953:function(t){t.exports=e},2707:function(e){e.exports=y},4442:function(e){e.exports=r},4258:function(e,t,r){var n="",o="u">typeof document?document.currentScript:null;if(o&&o.src){var i=o.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");i.indexOf("/static/plugins/@nocobase/plugin-public-forms/dist/client/")>=0&&(n=i.replace(/\/[^\/]+$/,"/"))}if(!n){var u=window.__webpack_public_path__||"";u&&("/"!==u.charAt(u.length-1)&&(u+="/"),n=u+"static/plugins/@nocobase/plugin-public-forms/dist/client/")}if(!n){var c=window.__nocobase_modern_client_prefix__||"v",a="/"+(c=String(c).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(n=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var l=window.location.pathname||"/",s=l.indexOf(a);n=s>=0?l.slice(0,s+1):"/"}n&&(n=n.replace(RegExp("/"+c+"/?$"),"/")),n||(n="/"),"/"!==n.charAt(n.length-1)&&(n+="/"),n+="static/plugins/@nocobase/plugin-public-forms/dist/client/"}r.p=n}},w={};function S(e){var t=w[e];if(void 0!==t)return t.exports;var r=w[e]={id:e,exports:{}};return x[e].call(r.exports,r,r.exports,S),r.exports}S.m=x,S.amdO={},S.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return S.d(t,{a:t}),t},_=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},S.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var r=Object.create(null);S.r(r);var n={};P=P||[null,_({}),_([]),_(_)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~P.indexOf(o);o=_(o))Object.getOwnPropertyNames(o).forEach(function(t){n[t]=function(){return e[t]}});return n.default=function(){return e},S.d(r,n),r},S.d=function(e,t){for(var r in t)S.o(t,r)&&!S.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},S.f={},S.e=function(e){return Promise.all(Object.keys(S.f).reduce(function(t,r){return S.f[r](e,t),t},[]))},S.u=function(e){return""+e+"."+({198:"780dab97e4ef08bf",224:"5536c33a162f55b3",397:"3f67c86613025a0e",594:"43db6c29093027e8",595:"eeb0d3acf81baf05",599:"5b805a5c7f2d27c9",634:"6f0d8f6bd9082579",64:"1755971df553d16a",755:"54e2c6a5fba42eb6",966:"2fd2224ac56adc7e"})[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)},k={},S.l=function(e,t,r,n){if(k[e])return void k[e].push(t);if(void 0!==r)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:"+r){o=a;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,S.nc&&o.setAttribute("nonce",S.nc),o.setAttribute("data-rspack","@nocobase/plugin-public-forms:"+r),o.src=e),k[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=k[e];if(delete k[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach(function(e){return e(r)}),t)return t(r)},s=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&&(O=S.g.location+"");var P,_,k,O,j=S.g.document;if(!O&&j&&(j.currentScript&&"SCRIPT"===j.currentScript.tagName.toUpperCase()&&(O=j.currentScript.src),!O)){var q=j.getElementsByTagName("script");if(q.length)for(var T=q.length-1;T>-1&&(!O||!/^http(s?):/.test(O));)O=q[T--].src}if(!O)throw Error("Automatic publicPath is not supported in this browser");return S.p=O.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h={889:0},S.f.j=function(e,t){var r=S.o(h,e)?h[e]:void 0;if(0!==r)if(r)t.push(r[2]);else{var n=new Promise(function(t,n){r=h[e]=[t,n]});t.push(r[2]=n);var o=S.p+S.u(e),i=Error();S.l(o,function(t){if(S.o(h,e)&&(0!==(r=h[e])&&(h[e]=void 0),r)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",i.name="ChunkLoadError",i.type=n,i.request=o,r[1](i)}},"chunk-"+e,e)}},g=function(e,t){var r,n,o=t[0],i=t[1],u=t[2],c=0;if(o.some(function(e){return 0!==h[e]})){for(r in i)S.o(i,r)&&(S.m[r]=i[r]);u&&u(S)}for(e&&e(t);c<o.length;c++)n=o[c],S.o(h,n)&&h[n]&&h[n][0](),h[n]=0},(v=self.webpackChunk_nocobase_plugin_public_forms=self.webpackChunk_nocobase_plugin_public_forms||[]).forEach(g.bind(null,0)),v.push=g.bind(null,v.push.bind(v)),S(4258),S(1214)}()});
@@ -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_public_forms_client_v2=self.webpackChunk_nocobase_plugin_public_forms_client_v2||[]).push([["64"],{43:function(e,t,n){n.r(t),n.d(t,{PublicFormSubmitActionModel:function(){return a}});var r=n(485),o=n(401),u=n(488);function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}var a=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=c(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,l()?Reflect.construct(e,t||[],c(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&i(n,e),t=[{key:"getInputArgs",value:function(){var e,t,n=null==(t=this.context.resource)||null==(e=t.getSourceId)?void 0:e.call(t);return n?{sourceId:n,defaultInputKeys:["sourceId"]}:{}}},{key:"onClick",value:function(e){this.dispatchEvent("click",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:e},this.getInputArgs()),{debounce:!0,sequential:!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}(r.FormSubmitActionModel);a.define({label:(0,u.MZ)("Submit"),hide:function(e){return!Array.isArray(e.allowedFormActionModelNames)||!e.allowedFormActionModelNames.includes(o.BQ)}}),a.registerFlow({key:"publicFormSubmission",on:{eventName:"click",phase:"afterAllFlows"},steps:{showSuccessMessage:{handler:function(e){var t,n,r;e.publicFormRuntime&&(null==(n=e.publicFormPageModel)||null==(t=n.setPublicFormSubmitted)||t.call(n,!0),null==(r=e.setPublicFormSubmitted)||r.call(e,!0))}}}}),t.default=a},488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(694),o=n(953),u=n(401).gr;function c(e){return(0,r.tExpr)(e,{ns:u})}function i(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"}).t}}}]);
@@ -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:"c3c0b4b8c94d6588",208:"e01457b6cdac5436",594:"823197edcbcf8961",599:"740e22df9906f9ab",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){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(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 o(e,t,n){return(o=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 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 o(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 o;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),o=[{key:"load",value:function(){var e;return(e=function(){var e;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){var o;return e=this.app.i18n.t("Public forms",{ns:t.gr}),this.flowEngine.registerModelLoaders((n(o={},t.rl,{loader:function(){return m.e("594").then(m.bind(m,913))}}),n(o,t.oh,{loader:function(){return m.e("610").then(m.bind(m,57))}}),n(o,t.B4,{loader:function(){return m.e("599").then(m.bind(m,826))}}),n(o,t.BQ,{loader:function(){return m.e("64").then(m.bind(m,43))}}),o)),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,n=arguments;return new Promise(function(o,i){var u=e.apply(t,n);function c(e){r(u,o,i,c,a,"next",e)}function a(e){r(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,o),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:"c3c0b4b8c94d6588",208:"e01457b6cdac5436",594:"823197edcbcf8961",599:"740e22df9906f9ab",610:"934e0e89291812bf",64:"ff99d2ce4ec98c3f"})[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){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(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 o(e,t,n){return(o=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 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 o(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 o;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),o=[{key:"load",value:function(){var e;return(e=function(){var e;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){var o;return e=this.app.i18n.t("Public forms",{ns:t.gr}),this.flowEngine.registerModelLoaders((n(o={},t.rl,{loader:function(){return m.e("594").then(m.bind(m,913))}}),n(o,t.oh,{loader:function(){return m.e("610").then(m.bind(m,57))}}),n(o,t.B4,{loader:function(){return m.e("599").then(m.bind(m,826))}}),n(o,t.BQ,{loader:function(){return m.e("64").then(m.bind(m,43))}}),o)),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,n=arguments;return new Promise(function(o,i){var u=e.apply(t,n);function c(e){r(u,o,i,c,a,"next",e)}function a(e){r(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,o),c}(c(e.Plugin)),f=l}(),_}()});
@@ -8,13 +8,13 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.3.0-alpha.1",
11
+ "@nocobase/client": "2.3.0-beta.11",
12
12
  "react-i18next": "11.18.6",
13
- "@nocobase/flow-engine": "2.3.0-alpha.1",
14
- "@nocobase/client-v2": "2.3.0-alpha.1",
15
- "@nocobase/plugin-ui-schema-storage": "2.3.0-alpha.1",
16
- "@nocobase/server": "2.3.0-alpha.1",
17
- "@nocobase/utils": "2.3.0-alpha.1",
13
+ "@nocobase/flow-engine": "2.3.0-beta.11",
14
+ "@nocobase/client-v2": "2.3.0-beta.11",
15
+ "@nocobase/plugin-ui-schema-storage": "2.3.0-beta.11",
16
+ "@nocobase/server": "2.3.0-beta.11",
17
+ "@nocobase/utils": "2.3.0-beta.11",
18
18
  "react": "18.2.0",
19
19
  "@ant-design/icons": "5.6.1",
20
20
  "antd": "5.24.2",
@@ -27,6 +27,6 @@ module.exports = {
27
27
  "@formily/core": "2.3.7",
28
28
  "@formily/shared": "2.3.7",
29
29
  "@formily/reactive": "2.3.7",
30
- "@nocobase/database": "2.3.0-alpha.1",
30
+ "@nocobase/database": "2.3.0-beta.11",
31
31
  "dayjs": "1.11.13"
32
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-public-forms",
3
- "version": "2.3.0-alpha.1",
3
+ "version": "2.3.0-beta.11",
4
4
  "main": "dist/server/index.js",
5
5
  "displayName": "Public forms",
6
6
  "displayName.ru-RU": "Публичные формы",
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "react-device-detect": "2.2.3"
28
28
  },
29
- "gitHead": "2377df8ceb12549149017f7f14a61207bf6e49a2"
29
+ "gitHead": "e81c2c69d55f13e4d237c420a51ebad1e9dae515"
30
30
  }
@@ -1,10 +0,0 @@
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_public_forms=self.webpackChunk_nocobase_plugin_public_forms||[]).push([["64"],{4043:function(e,t,n){n.r(t),n.d(t,{PublicFormSubmitActionModel:function(){return l}});var r=n(3485),o=n(9488);function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i=function(){return!!e})()}var l=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=u(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,i()?Reflect.construct(e,t||[],u(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&c(n,e),t=[{key:"getInputArgs",value:function(){var e,t,n=null==(t=this.context.resource)||null==(e=t.getSourceId)?void 0:e.call(t);return n?{sourceId:n,defaultInputKeys:["sourceId"]}:{}}},{key:"onClick",value:function(e){this.dispatchEvent("click",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:e},this.getInputArgs()),{debounce:!0,sequential:!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}(r.FormSubmitActionModel);l.define({label:(0,o.MZ)("Submit")}),l.registerFlow({key:"publicFormSubmission",on:{eventName:"click",phase:"afterAllFlows"},steps:{showSuccessMessage:{handler:function(e){var t,n,r;e.publicFormRuntime&&(null==(n=e.publicFormPageModel)||null==(t=n.setPublicFormSubmitted)||t.call(n,!0),null==(r=e.setPublicFormSubmitted)||r.call(e,!0))}}}}),t.default=l},9488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(7694),o=n(5953),u=n(8401).gr;function c(e){return(0,r.tExpr)(e,{ns:u})}function i(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"}).t}}}]);
@@ -1,10 +0,0 @@
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_public_forms_client_v2=self.webpackChunk_nocobase_plugin_public_forms_client_v2||[]).push([["64"],{43:function(e,t,n){n.r(t),n.d(t,{PublicFormSubmitActionModel:function(){return l}});var r=n(485),o=n(488);function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(i=function(){return!!e})()}var l=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=u(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,i()?Reflect.construct(e,t||[],u(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&c(n,e),t=[{key:"getInputArgs",value:function(){var e,t,n=null==(t=this.context.resource)||null==(e=t.getSourceId)?void 0:e.call(t);return n?{sourceId:n,defaultInputKeys:["sourceId"]}:{}}},{key:"onClick",value:function(e){this.dispatchEvent("click",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({event:e},this.getInputArgs()),{debounce:!0,sequential:!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}(r.FormSubmitActionModel);l.define({label:(0,o.MZ)("Submit")}),l.registerFlow({key:"publicFormSubmission",on:{eventName:"click",phase:"afterAllFlows"},steps:{showSuccessMessage:{handler:function(e){var t,n,r;e.publicFormRuntime&&(null==(n=e.publicFormPageModel)||null==(t=n.setPublicFormSubmitted)||t.call(n,!0),null==(r=e.setPublicFormSubmitted)||r.call(e,!0))}}}}),t.default=l},488:function(e,t,n){n.d(t,{MZ:function(){return c},kj:function(){return i}});var r=n(694),o=n(953),u=n(401).gr;function c(e){return(0,r.tExpr)(e,{ns:u})}function i(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"}).t}}}]);