@nocobase/plugin-public-forms 1.6.0-beta.1 → 1.6.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.
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Updated Date: October 15, 2024
1
+ Updated Date: February 20, 2025
2
2
 
3
3
  NocoBase License Agreement
4
4
 
@@ -78,7 +78,7 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
78
78
 
79
79
  6.1 Obtain a permanent commercial license of the Software.
80
80
 
81
- 6.2 Get 12 months of upgrade and exclusive technical support.
81
+ 6.2 Get software upgrades and exclusive technical support during the upgrade validity period.
82
82
 
83
83
  6.3 The licensed Software can be used for commercial purposes with no restrictions on the number of applications and users.
84
84
 
@@ -88,7 +88,7 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
88
88
 
89
89
  6.6 Can sell plugins developed for Software in the Marketplace.
90
90
 
91
- 6.7 The User with a Professional or Enterprise Edition License can sell Upper Layer Application to their clients.
91
+ 6.7 The User with an Enterprise Edition License can sell Upper Layer Application to their clients.
92
92
 
93
93
  6.8 Not restricted by the AGPL-3.0 agreement.
94
94
 
@@ -106,13 +106,15 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
106
106
 
107
107
  7.4 It is not allowed to provide any form of no-code, zero-code, low-code platform SaaS products to the public using the original or modified Software.
108
108
 
109
- 7.5 It is not allowed for the User with a Standard Edition license to sell Upper Layer Application to clients without a Commercial license.
109
+ 7.5 It is not allowed for the User withot an Enterprise Edition license to sell Upper Layer Application to clients without a Commercial license.
110
110
 
111
- 7.6 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
111
+ 7.6 It is not allowed for the User with an Enterprise Edition license to sell Upper Layer Application to clients without a Commercial license with access to further development and configuration.
112
112
 
113
- 7.7 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
113
+ 7.7 It is not allowed to publicly sell plugins developed for Software outside of the Marketplace.
114
114
 
115
- 7.8 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
115
+ 7.8 If there is a violation of the above obligations or the terms of this Agreement, the rights owned by the User will be immediately terminated, the paid fees will not be refunded, and the Company reserves the right to pursue the User's legal responsibility.
116
+
117
+ 7.9 If there are other agreements in the contract for the above obligations, the contract agreement shall prevail.
116
118
 
117
119
  ======================================
118
120
  8. Rights of Commercial Plugin License
@@ -120,11 +122,11 @@ Except for Third-Party Open Source Software, the Company owns all copyrights, tr
120
122
 
121
123
  8.1 Obtain a permanent Commercial Plugin License for the Commercial Plugin.
122
124
 
123
- 8.2 Receive 12 months of upgrades and exclusive technical support.
125
+ 8.2 Get plugins upgrades and exclusive technical support during the upgrade validity period.
124
126
 
125
127
  8.3 Can be used for commercial purposes without restrictions on the number of applications or users.
126
128
 
127
- 8.4 The User with a Professional or Enterprise Edition License can use the Commercial Plugin in Upper Layer Applications sold to their customers.
129
+ 8.4 The User with an Enterprise Edition License can use the Commercial Plugin in Upper Layer Applications sold to their customers.
128
130
 
129
131
  8.5 Not restricted by the AGPL-3.0 agreement.
130
132
 
@@ -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([["592"],{8097:function(e,t,o){o.r(t),o.d(t,{AdminPublicFormList:function(){return y}});var n=o("3772"),r=o("8156"),i=o.n(r),p=o("7712"),c=o("6903"),l={name:"publicForms",filterTargetKey:"key",fields:[{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:"{{t('Title')}}",required:!0,"x-component":"Input"}},{type:"text",name:"description",interface:"textarea",uiSchema:{type:"string",title:"{{t('Description')}}","x-component":"Input.TextArea"}},{type:"string",name:"type",interface:"radioGroup",uiSchema:{type:"string",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"Radio.Group",enum:"{{ formTypes }}"}},{type:"string",name:"collection",interface:"collection",uiSchema:{type:"string",title:"{{t('Collection')}}",required:!0,"x-component":"DataSourceCollectionCascader"}},{type:"password",name:"password",interface:"password",uiSchema:{type:"string",title:"{{t('Password')}}","x-component":"TextAreaWithGlobalScope","x-component-props":{autocomplete:"new-password",password:!0}}},{type:"boolean",name:"enabled",interface:"checkbox",uiSchema:{type:"string",title:'{{t("Enable form",{ns:"'.concat(c.A7,'"})}}'),"x-component":"Checkbox",default:!0}}]},s=o("4163"),m=o("8875"),a=o("6128"),d={type:"void","x-component":"Action",title:'{{t("Add New", { ns: "'.concat(c.A7,'" })}}'),"x-align":"right","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer",title:"{{t('Add New')}}","x-decorator":"Form",properties:{form:{type:"void",properties:{title:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},collection:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},type:{type:"string","x-decorator":"FormItem",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"CollectionField",default:"form",enum:"{{ formTypes }}"},description:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},password:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},enabled:{type:"string","x-decorator":"FormItem","x-component":"CollectionField",default:!0}}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{submit:{title:"Submit","x-component":"Action","x-use-component-props":"useSubmitActionProps"}}}}}}},u={type:"void",name:(0,m.uid)(),"x-component":"CardItem","x-decorator":"TableBlockProvider","x-decorator-props":{collection:l.name,action:"list",params:{sort:"-createdAt",appends:["createdBy","updatedBy"]},showIndex:!0,dragSort:!1,rowKey:"key"},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:20}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',default:{$and:[{title:{$includes:""}}]},"x-action":"filter","x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},createActionSchema:d}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:l.filterTargetKey,rowSelection:{type:"checkbox"}},properties:{title:{type:"void",title:'{{ t("Title") }}',"x-component":"TableV2.Column","x-component-props":{width:170},properties:{title:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},collection:{type:"void",title:'{{ t("Collection") }}',"x-component":"TableV2.Column","x-component-props":{width:160},properties:{collection:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},column2:{type:"void",title:'{{t("Type", { ns: "'.concat(c.A7,'" })}}'),"x-component":"TableV2.Column","x-component-props":{width:100},properties:{type:{type:"string","x-component":"Radio.Group","x-pattern":"readPretty",enum:"{{ formTypes }}"}}},column3:{type:"void",title:'{{ t("Enabled") }}',"x-component":"TableV2.Column","x-component-props":{width:80},properties:{enabled:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},description:{type:"void",title:'{{ t("Description") }}',"x-component":"TableV2.Column",properties:{description:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},actions:{type:"void",title:'{{ t("Actions") }}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{configure:{type:"void",title:"Configure","x-component":function(){var e=(0,n.useFilterByTk)(),t=(0,c.NT)();return i().createElement(a.Link,{to:"/admin/settings/public-forms/".concat(e)},t("Configure"))}},editActionSchema:{type:"void",title:"Edit","x-component":"Action.Link","x-component-props":{openMode:"drawer",icon:"EditOutlined"},properties:{drawer:{type:"void",title:"Edit","x-component":"Action.Drawer","x-decorator":"FormV2","x-use-decorator-props":"useEditFormProps",properties:{form:{type:"void",properties:{title:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},collection:{type:"string","x-decorator":"FormItem","x-component":"CollectionField","x-component-props":{disabled:!0}},type:{type:"string","x-decorator":"FormItem",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"Radio.Group",default:"form",enum:"{{ formTypes }}"},description:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},password:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},enabled:{type:"string","x-decorator":"FormItem","x-component":"CollectionField",default:!0}}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{submit:{title:"Submit","x-component":"Action","x-use-component-props":"useSubmitActionProps"}}}}}}},delete:{type:"void",title:"Delete","x-component":"Action.Link","x-use-component-props":"useDeleteActionProps"}}}}}}}}},y=function(){var e,t,o=(0,n.usePlugin)(p.default),c=(0,n.useSchemaComponentContext)(),m=(0,r.useMemo)(function(){return o.getFormTypeOptions()},[o]);return i().createElement(n.ExtendCollectionsProvider,{collections:[l]},i().createElement(n.SchemaComponentContext.Provider,{value:(e=function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),n.forEach(function(t){var n,r,i;n=e,r=t,i=o[t],r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i})}return e}({},c),t=(t={designable:!1},t),Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o.push.apply(o,n)}return o})(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}),e)},i().createElement(n.SchemaComponent,{schema:u,scope:{formTypes:m,useSubmitActionProps:s.j1,useEditFormProps:s.fC,useDeleteActionProps:s.Dq}})))}}}]);
@@ -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([["300"],{7402:function(e,t,n){n.r(t),n.d(t,{AdminPublicFormPage:function(){return g}});var r=n(482),o=n(3772),a=n(2721),l=n(8156),i=n.n(l),c=n(5432),u=n(6128),s=n(4632),p=n(4163),m=n(6903);function f(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 b(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){b(a,r,o,l,i,"next",e)}function i(e){b(a,r,o,l,i,"throw",e)}l(void 0)})}}function y(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,o,a;r=e,o=t,a=n[t],o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})}return e}function h(e,t){var n,r,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}var v=function(){var e,t,n=(e=(0,l.useState)(!1),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{!l&&null!=o.return&&o.return()}finally{if(i)throw r}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}}(e,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.")}()),r=n[0],u=n[1],s=(0,m.NY)().t,p=(0,c.useParams)(),b=(0,o.useApp)(),d=window.location.origin+b.getHref("public-forms/".concat(p.name));return i().createElement(a.Popover,{trigger:"hover",open:r,onOpenChange:function(e){u(e)},content:r?i().createElement(a.QRCode,{value:d,bordered:!1}):" "},i().createElement("a",null,s("QR code",{ns:m.A7})))};function g(){var e,t,n=(0,c.useParams)(),l=(0,m.NY)().t,f=(0,o.useGlobalTheme)().theme,b=(0,o.useAPIClient)(),g=a.theme.useToken().token,w=(0,o.useApp)(),E=(0,o.useGlobalVariable)("$env"),k=(0,o.useRequest)({url:"publicForms:get/".concat(n.name)}),x=k.data,S=k.loading,O=k.refresh,P=(null==x?void 0:x.data)||{},C=P.enabled,A=P.title,j=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++){if(n=a[r],!(t.indexOf(n)>=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}(P,["enabled","title"]);if(S)return i().createElement(a.Spin,null);var I=(e=d(function(e){return h(this,function(t){switch(t.label){case 0:return[4,b.resource("publicForms").update({filterByTk:n.name,values:y({},e)})];case 1:return t.sent(),[4,O()];case 2:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)});var T=(t=d(function(){return h(this,function(e){switch(e.label){case 0:return[4,(0,o.FormDialog)(l("Password"),function(){return i().createElement(o.ApplicationContext.Provider,{value:w},i().createElement(o.SchemaComponentOptions,{components:{Checkbox:o.Checkbox,TextAreaWithGlobalScope:o.TextAreaWithGlobalScope,FormItem:o.FormItem}},i().createElement(s.FormLayout,{layout:"vertical"},i().createElement(o.SchemaComponent,{schema:{properties:{password:{type:"string","x-decorator":"FormItem","x-component":"TextAreaWithGlobalScope","x-component-props":{password:!0,scope:[E]}}}}}))))},f).open({initialValues:y({},j)})];case 1:return[4,I({password:e.sent().password})];case 2:return e.sent(),[2]}})}),function(){return t.apply(this,arguments)});return i().createElement("div",null,i().createElement("div",{style:{margin:"-24px",padding:"10px",display:"flex",alignItems:"center",justifyContent:"space-between",background:"".concat(g.colorBgContainer),borderBottom:"1px solid ".concat(g.colorBorderSecondary)}},i().createElement(a.Breadcrumb,{items:[{title:i().createElement(u.Link,{to:"/admin/settings/public-forms"},l("Public forms",{ns:m.A7}))},{title:A}]}),i().createElement(a.Space,null,i().createElement(u.Link,{target:"_blank",to:"/public-forms/".concat(n.name)},i().createElement(a.Button,{disabled:!C,icon:i().createElement(r.EyeOutlined,null)},l("Open form",{ns:m.A7}))),i().createElement(a.Dropdown,{menu:{items:[{key:"enabled",label:i().createElement("a",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},onClick:function(){return I({enabled:!C})}},i().createElement("span",{style:{marginRight:"10px"}},l("Enable form",{ns:m.A7})),i().createElement(a.Switch,{size:"small",checked:C}))},{key:"password",label:i().createElement("a",{onClick:T}," ",l("Set password"))},{key:"divider1",type:"divider"},{key:"copyLink",label:i().createElement("a",{onClick:function(){var e=window.location.origin+w.getHref("public-forms/".concat(n.name));navigator.clipboard.writeText(e),a.message.success(l("Link copied successfully"))}},l("Copy link"))},{key:"qrcode",label:i().createElement(v,null)}]}},i().createElement(a.Button,{icon:i().createElement(r.SettingOutlined,null)},l("Settings"))))),i().createElement("div",{style:{maxWidth:800,margin:"100px auto",position:"relative",zIndex:0}},i().createElement(o.VariablesProvider,{filterVariables:function(e){return!["$user","$nRole","$nToken","$nURLSearchParams"].includes(e.key)}},i().createElement(o.RemoteSchemaComponent,{uid:n.name,scope:{useCreateActionProps:p.hG},components:{PublicFormMessageProvider:function(e){return e.children}}})),i().createElement(o.PoweredBy,null)))}}}]);
@@ -50,6 +50,7 @@ export declare const publicFormsCollection: {
50
50
  'x-component': string;
51
51
  'x-component-props': {
52
52
  autocomplete: string;
53
+ password: boolean;
53
54
  };
54
55
  required?: undefined;
55
56
  enum?: undefined;
@@ -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("@formily/shared"),require("@formily/core"),require("@nocobase/client"),require("antd"),require("@ant-design/icons"),require("@formily/react"),require("react-router-dom"),require("react-router"),require("react"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-public-forms",["react-i18next","@emotion/css","@formily/shared","@formily/core","@nocobase/client","antd","@ant-design/icons","@formily/react","react-router-dom","react-router","react","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-public-forms"]=t(require("react-i18next"),require("@emotion/css"),require("@formily/shared"),require("@formily/core"),require("@nocobase/client"),require("antd"),require("@ant-design/icons"),require("@formily/react"),require("react-router-dom"),require("react-router"),require("react"),require("@formily/antd-v5")):e["@nocobase/plugin-public-forms"]=t(e["react-i18next"],e["@emotion/css"],e["@formily/shared"],e["@formily/core"],e["@nocobase/client"],e.antd,e["@ant-design/icons"],e["@formily/react"],e["react-router-dom"],e["react-router"],e.react,e["@formily/antd-v5"])}(self,function(e,t,r,n,o,i,u,c,a,l,s,f){return function(){var p,m,d,b,y,h,g,v,x={7712:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return w},PluginPublicFormsClient:function(){return S}});var n=r("3772"),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("3505"),u=r("3238"),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("6903"),s=r(3581);function f(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 p(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 d(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)}}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){var r;if(null===e||(r=e,-1===Function.toString.call(r).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 m(e,arguments,b(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,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 s("imported_1fpftdr_component",Promise.all([r.e("112"),r.e("978"),r.e("592")]).then(r.bind(r,8097)))},"AdminPublicFormList").AdminPublicFormList,x=(0,n.lazy)(function(){return s("imported_7lbes3_component",Promise.all([r.e("112"),r.e("978"),r.e("300")]).then(r.bind(r,7402)))},"AdminPublicFormPage").AdminPublicFormPage,_=(0,n.lazy)(function(){return s("imported_17kipkb_component",Promise.all([r.e("112"),r.e("978")]).then(r.bind(r,5223)))},"PublicFormPage").PublicFormPage,S=function(e){var t,r,n;function i(){var e,t,r,n,o,u,c;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),t=this,r=i,n=arguments,r=b(r),o=e=function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,g()?Reflect.construct(r,n||[],b(t).constructor):r.apply(t,n)),u="formTypes",c=new Map,u in o?Object.defineProperty(o,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[u]=c,e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(i,e),t=i,r=[{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,a=(u=o.value,c=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],u=!0,c=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(e){c=!0,n=e}finally{try{!u&&null!=o.return&&o.return()}finally{if(c)throw n}}return i}}(u,2)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}(u,c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],s=a[1].label;e.push({value:l,label:s})}}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,t=this;return(e=function(){return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,function(e){return t.app.schemaSettingsManager.add(c),t.app.schemaSettingsManager.add(a),t.registerFormType("form",{label:"Form",uiSchema:o}),t.app.router.add("public-forms",{path:"/public-forms/:name",Component:_}),t.app.pluginSettingsManager.add("public-forms",{title:'{{t("Public forms", { ns: "'.concat(l.A7,'" })}}'),icon:"TableOutlined",Component:v}),t.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){p(i,n,o,u,c,"next",e)}function c(e){p(i,n,o,u,c,"throw",e)}u(void 0)})})()}}],d(t.prototype,r),i}(h(n.Plugin)),w=S},6903:function(e,t,r){"use strict";r.d(t,{A7:function(){return u},NY:function(){return a},NT:function(){return c}});var n=r("3772"),o=r("3238"),i=JSON.parse('{"u2":"@nocobase/plugin-public-forms"}'),u="public-forms";function c(){var e=(0,n.useApp)();return function(t){return e.i18n.t(t,{ns:[i.u2,"client"]})}}function a(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"})}},3581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=u},4964:function(e){"use strict";e.exports=t},4632:function(e){"use strict";e.exports=f},8563:function(e){"use strict";e.exports=n},3505:function(e){"use strict";e.exports=c},8875:function(e){"use strict";e.exports=r},3772:function(e){"use strict";e.exports=o},2721:function(e){"use strict";e.exports=i},8156:function(e){"use strict";e.exports=s},3238:function(t){"use strict";t.exports=e},5432:function(e){"use strict";e.exports=l},6128:function(e){"use strict";e.exports=a}},_={};function S(e){var t=_[e];if(void 0!==t)return t.exports;var r=_[e]={id:e,exports:{}};return x[e].call(r.exports,r,r.exports,S),r.exports}return S.m=x,S.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return S.d(t,{a:t}),t},m=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,m({}),m([]),m(m)];for(var o=2&t&&e;"object"==typeof o&&!~p.indexOf(o);o=m(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""+({112:"cda99c1ab9bad776",300:"b64f7fb65ede632e",592:"2352fc37930072dc",978:"d9496c01cb2f5ec9"})[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)},d={},b="@nocobase/plugin-public-forms:",S.l=function(e,t,r,n){if(d[e]){d[e].push(t);return}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-webpack")==b+r){o=a;break}}}!o&&(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,S.nc&&o.setAttribute("nonce",S.nc),o.setAttribute("data-webpack",b+r),o.src=e),d[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=d[e];if(delete d[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){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nc=void 0,S.p=(!(y=window.__nocobase_public_path__||"/").endsWith("/")&&(y+="/"),y+"static/plugins/@nocobase/plugin-public-forms/dist/client/"),h={909: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=t[0],n=t[1],o=t[2],i,u,c=0;if(r.some(function(e){return 0!==h[e]})){for(i in n)S.o(n,i)&&(S.m[i]=n[i]);o&&o(S)}for(e&&e(t);c<r.length;c++)u=r[c],S.o(h,u)&&h[u]&&h[u][0](),h[u]=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("7712")}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@emotion/css"),require("@formily/shared"),require("@formily/core"),require("@nocobase/client"),require("antd"),require("@ant-design/icons"),require("@formily/react"),require("react-router-dom"),require("react-router"),require("react"),require("@formily/antd-v5")):"function"==typeof define&&define.amd?define("@nocobase/plugin-public-forms",["react-i18next","@emotion/css","@formily/shared","@formily/core","@nocobase/client","antd","@ant-design/icons","@formily/react","react-router-dom","react-router","react","@formily/antd-v5"],t):"object"==typeof exports?exports["@nocobase/plugin-public-forms"]=t(require("react-i18next"),require("@emotion/css"),require("@formily/shared"),require("@formily/core"),require("@nocobase/client"),require("antd"),require("@ant-design/icons"),require("@formily/react"),require("react-router-dom"),require("react-router"),require("react"),require("@formily/antd-v5")):e["@nocobase/plugin-public-forms"]=t(e["react-i18next"],e["@emotion/css"],e["@formily/shared"],e["@formily/core"],e["@nocobase/client"],e.antd,e["@ant-design/icons"],e["@formily/react"],e["react-router-dom"],e["react-router"],e.react,e["@formily/antd-v5"])}(self,function(e,t,r,n,o,i,u,c,a,l,s,f){return function(){var p,m,d,b,y,h,g,v,x={7712:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return w},PluginPublicFormsClient:function(){return S}});var n=r("3772"),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("3505"),u=r("3238"),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("6903"),s=r(3581);function f(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 p(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 d(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)}}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){var r;if(null===e||(r=e,-1===Function.toString.call(r).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 m(e,arguments,b(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,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 s("imported_1fpftdr_component",Promise.all([r.e("112"),r.e("978"),r.e("592")]).then(r.bind(r,8097)))},"AdminPublicFormList").AdminPublicFormList,x=(0,n.lazy)(function(){return s("imported_7lbes3_component",Promise.all([r.e("112"),r.e("978"),r.e("300")]).then(r.bind(r,7402)))},"AdminPublicFormPage").AdminPublicFormPage,_=(0,n.lazy)(function(){return s("imported_17kipkb_component",Promise.all([r.e("112"),r.e("978")]).then(r.bind(r,5223)))},"PublicFormPage").PublicFormPage,S=function(e){var t,r,n;function i(){var e,t,r,n,o,u,c;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),t=this,r=i,n=arguments,r=b(r),o=e=function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,g()?Reflect.construct(r,n||[],b(t).constructor):r.apply(t,n)),u="formTypes",c=new Map,u in o?Object.defineProperty(o,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):o[u]=c,e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(i,e),t=i,r=[{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,a=(u=o.value,c=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],u=!0,c=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(e){c=!0,n=e}finally{try{!u&&null!=o.return&&o.return()}finally{if(c)throw n}}return i}}(u,2)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}}(u,c)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],s=a[1].label;e.push({value:l,label:s})}}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,t=this;return(e=function(){return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,function(e){return t.app.schemaSettingsManager.add(c),t.app.schemaSettingsManager.add(a),t.registerFormType("form",{label:"Form",uiSchema:o}),t.app.router.add("public-forms",{path:"/public-forms/:name",Component:_}),t.app.pluginSettingsManager.add("public-forms",{title:'{{t("Public forms", { ns: "'.concat(l.A7,'" })}}'),icon:"TableOutlined",Component:v}),t.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){p(i,n,o,u,c,"next",e)}function c(e){p(i,n,o,u,c,"throw",e)}u(void 0)})})()}}],d(t.prototype,r),i}(h(n.Plugin)),w=S},6903:function(e,t,r){"use strict";r.d(t,{A7:function(){return u},NY:function(){return a},NT:function(){return c}});var n=r("3772"),o=r("3238"),i=JSON.parse('{"u2":"@nocobase/plugin-public-forms"}'),u="public-forms";function c(){var e=(0,n.useApp)();return function(t){return e.i18n.t(t,{ns:[i.u2,"client"]})}}function a(){return(0,o.useTranslation)([u,"client"],{nsMode:"fallback"})}},3581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=u},4964:function(e){"use strict";e.exports=t},4632:function(e){"use strict";e.exports=f},8563:function(e){"use strict";e.exports=n},3505:function(e){"use strict";e.exports=c},8875:function(e){"use strict";e.exports=r},3772:function(e){"use strict";e.exports=o},2721:function(e){"use strict";e.exports=i},8156:function(e){"use strict";e.exports=s},3238:function(t){"use strict";t.exports=e},5432:function(e){"use strict";e.exports=l},6128:function(e){"use strict";e.exports=a}},_={};function S(e){var t=_[e];if(void 0!==t)return t.exports;var r=_[e]={id:e,exports:{}};return x[e].call(r.exports,r,r.exports,S),r.exports}return S.m=x,S.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return S.d(t,{a:t}),t},m=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,m({}),m([]),m(m)];for(var o=2&t&&e;"object"==typeof o&&!~p.indexOf(o);o=m(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""+({112:"cda99c1ab9bad776",300:"a014f34d08e12341",592:"234f129c7fa34eb7",978:"d9496c01cb2f5ec9"})[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)},d={},b="@nocobase/plugin-public-forms:",S.l=function(e,t,r,n){if(d[e]){d[e].push(t);return}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-webpack")==b+r){o=a;break}}}!o&&(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,S.nc&&o.setAttribute("nonce",S.nc),o.setAttribute("data-webpack",b+r),o.src=e),d[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=d[e];if(delete d[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){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},S.nc=void 0,S.p=(!(y=window.__nocobase_public_path__||"/").endsWith("/")&&(y+="/"),y+"static/plugins/@nocobase/plugin-public-forms/dist/client/"),h={909: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=t[0],n=t[1],o=t[2],i,u,c=0;if(r.some(function(e){return 0!==h[e]})){for(i in n)S.o(n,i)&&(S.m[i]=n[i]);o&&o(S)}for(e&&e(t);c<r.length;c++)u=r[c],S.o(h,u)&&h[u]&&h[u][0](),h[u]=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("7712")}()});
@@ -8,10 +8,10 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.6.0-beta.1",
11
+ "@nocobase/client": "1.6.0-beta.11",
12
12
  "react-i18next": "11.18.6",
13
- "@nocobase/plugin-ui-schema-storage": "1.6.0-beta.1",
14
- "@nocobase/server": "1.6.0-beta.1",
13
+ "@nocobase/plugin-ui-schema-storage": "1.6.0-beta.11",
14
+ "@nocobase/server": "1.6.0-beta.11",
15
15
  "react": "18.2.0",
16
16
  "@ant-design/icons": "5.2.6",
17
17
  "antd": "5.12.8",
@@ -22,5 +22,5 @@ module.exports = {
22
22
  "@formily/react": "2.3.0",
23
23
  "@formily/core": "2.3.0",
24
24
  "@formily/shared": "2.3.2",
25
- "@nocobase/database": "1.6.0-beta.1"
25
+ "@nocobase/database": "1.6.0-beta.11"
26
26
  };
@@ -33,6 +33,7 @@ var import_database = require("@nocobase/database");
33
33
  var publicForms_default = (0, import_database.defineCollection)({
34
34
  name: "publicForms",
35
35
  filterTargetKey: "key",
36
+ migrationRules: ["overwrite", "schema-only"],
36
37
  createdBy: true,
37
38
  updatedBy: true,
38
39
  fields: [
@@ -85,7 +85,7 @@ class PluginPublicFormsServer extends import_server.Plugin {
85
85
  passwordRequired: true
86
86
  };
87
87
  }
88
- if (instance.get("password") !== password) {
88
+ if (this.app.environment.renderJsonTemplate(instance.get("password")) !== password) {
89
89
  throw new PasswordError("Please enter your password");
90
90
  }
91
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-public-forms",
3
- "version": "1.6.0-beta.1",
3
+ "version": "1.6.0-beta.11",
4
4
  "main": "dist/server/index.js",
5
5
  "displayName": "Public forms",
6
6
  "displayName.zh-CN": "公开表单",
@@ -16,5 +16,5 @@
16
16
  "@nocobase/server": "1.x",
17
17
  "@nocobase/test": "1.x"
18
18
  },
19
- "gitHead": "69a79d1ed9660beb14ee956ec634f0c6d142acfa"
19
+ "gitHead": "6cff97cdc31b9f191aaecb0f0d358c29e87ebde0"
20
20
  }
@@ -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([["592"],{8097:function(e,t,o){o.r(t),o.d(t,{AdminPublicFormList:function(){return y}});var n=o("3772"),r=o("8156"),i=o.n(r),p=o("7712"),c=o("6903"),l={name:"publicForms",filterTargetKey:"key",fields:[{type:"string",name:"title",interface:"input",uiSchema:{type:"string",title:"{{t('Title')}}",required:!0,"x-component":"Input"}},{type:"text",name:"description",interface:"textarea",uiSchema:{type:"string",title:"{{t('Description')}}","x-component":"Input.TextArea"}},{type:"string",name:"type",interface:"radioGroup",uiSchema:{type:"string",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"Radio.Group",enum:"{{ formTypes }}"}},{type:"string",name:"collection",interface:"collection",uiSchema:{type:"string",title:"{{t('Collection')}}",required:!0,"x-component":"DataSourceCollectionCascader"}},{type:"password",name:"password",interface:"password",uiSchema:{type:"string",title:"{{t('Password')}}","x-component":"Password","x-component-props":{autocomplete:"new-password"}}},{type:"boolean",name:"enabled",interface:"checkbox",uiSchema:{type:"string",title:'{{t("Enable form",{ns:"'.concat(c.A7,'"})}}'),"x-component":"Checkbox",default:!0}}]},s=o("4163"),m=o("8875"),a=o("6128"),d={type:"void","x-component":"Action",title:'{{t("Add New", { ns: "'.concat(c.A7,'" })}}'),"x-align":"right","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer",title:"{{t('Add New')}}","x-decorator":"Form",properties:{form:{type:"void",properties:{title:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},collection:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},type:{type:"string","x-decorator":"FormItem",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"CollectionField",default:"form",enum:"{{ formTypes }}"},description:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},password:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},enabled:{type:"string","x-decorator":"FormItem","x-component":"CollectionField",default:!0}}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{submit:{title:"Submit","x-component":"Action","x-use-component-props":"useSubmitActionProps"}}}}}}},u={type:"void",name:(0,m.uid)(),"x-component":"CardItem","x-decorator":"TableBlockProvider","x-decorator-props":{collection:l.name,action:"list",params:{sort:"-createdAt",appends:["createdBy","updatedBy"]},showIndex:!0,dragSort:!1,rowKey:"key"},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:20}},properties:{filter:{type:"void",title:'{{ t("Filter") }}',default:{$and:[{title:{$includes:""}}]},"x-action":"filter","x-component":"Filter.Action","x-use-component-props":"useFilterActionProps","x-component-props":{icon:"FilterOutlined"},"x-align":"left"},refresh:{type:"void",title:'{{ t("Refresh") }}',"x-component":"Action","x-use-component-props":"useRefreshActionProps","x-component-props":{icon:"ReloadOutlined"}},destroy:{title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},createActionSchema:d}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:l.filterTargetKey,rowSelection:{type:"checkbox"}},properties:{title:{type:"void",title:'{{ t("Title") }}',"x-component":"TableV2.Column","x-component-props":{width:170},properties:{title:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},collection:{type:"void",title:'{{ t("Collection") }}',"x-component":"TableV2.Column","x-component-props":{width:160},properties:{collection:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},column2:{type:"void",title:'{{t("Type", { ns: "'.concat(c.A7,'" })}}'),"x-component":"TableV2.Column","x-component-props":{width:100},properties:{type:{type:"string","x-component":"Radio.Group","x-pattern":"readPretty",enum:"{{ formTypes }}"}}},column3:{type:"void",title:'{{ t("Enabled") }}',"x-component":"TableV2.Column","x-component-props":{width:80},properties:{enabled:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},description:{type:"void",title:'{{ t("Description") }}',"x-component":"TableV2.Column",properties:{description:{type:"string","x-component":"CollectionField","x-pattern":"readPretty"}}},actions:{type:"void",title:'{{ t("Actions") }}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{configure:{type:"void",title:"Configure","x-component":function(){var e=(0,n.useFilterByTk)(),t=(0,c.NT)();return i().createElement(a.Link,{to:"/admin/settings/public-forms/".concat(e)},t("Configure"))}},editActionSchema:{type:"void",title:"Edit","x-component":"Action.Link","x-component-props":{openMode:"drawer",icon:"EditOutlined"},properties:{drawer:{type:"void",title:"Edit","x-component":"Action.Drawer","x-decorator":"FormV2","x-use-decorator-props":"useEditFormProps",properties:{form:{type:"void",properties:{title:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},collection:{type:"string","x-decorator":"FormItem","x-component":"CollectionField","x-component-props":{disabled:!0}},type:{type:"string","x-decorator":"FormItem",title:'{{t("Type",{ns:"public-forms"})}}',"x-component":"Radio.Group",default:"form",enum:"{{ formTypes }}"},description:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},password:{type:"string","x-decorator":"FormItem","x-component":"CollectionField"},enabled:{type:"string","x-decorator":"FormItem","x-component":"CollectionField",default:!0}}},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{submit:{title:"Submit","x-component":"Action","x-use-component-props":"useSubmitActionProps"}}}}}}},delete:{type:"void",title:"Delete","x-component":"Action.Link","x-use-component-props":"useDeleteActionProps"}}}}}}}}},y=function(){var e,t,o=(0,n.usePlugin)(p.default),c=(0,n.useSchemaComponentContext)(),m=(0,r.useMemo)(function(){return o.getFormTypeOptions()},[o]);return i().createElement(n.ExtendCollectionsProvider,{collections:[l]},i().createElement(n.SchemaComponentContext.Provider,{value:(e=function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},n=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(o).filter(function(e){return Object.getOwnPropertyDescriptor(o,e).enumerable}))),n.forEach(function(t){var n,r,i;n=e,r=t,i=o[t],r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i})}return e}({},c),t=(t={designable:!1},t),Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);o.push.apply(o,n)}return o})(Object(t)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(t,o))}),e)},i().createElement(n.SchemaComponent,{schema:u,scope:{formTypes:m,useSubmitActionProps:s.j1,useEditFormProps:s.fC,useDeleteActionProps:s.Dq}})))}}}]);
@@ -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([["300"],{7402:function(e,t,n){n.r(t),n.d(t,{AdminPublicFormPage:function(){return v}});var r=n(482),o=n(3772),a=n(2721),l=n(8156),i=n.n(l),c=n(5432),u=n(6128),s=n(4632),m=n(4163),p=n(6903);function f(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 b(e,t,n,r,o,a,l){try{var i=e[a](l),c=i.value}catch(e){n(e);return}i.done?t(c):Promise.resolve(c).then(r,o)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){b(a,r,o,l,i,"next",e)}function i(e){b(a,r,o,l,i,"throw",e)}l(void 0)})}}function y(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,o,a;r=e,o=t,a=n[t],o in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})}return e}function h(e,t){var n,r,o,a,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(n)throw TypeError("Generator is already executing.");for(;l;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return l.label++,{value:a[1],done:!1};case 5:l.label++,r=a[1],a=[0];continue;case 7:a=l.ops.pop(),l.trys.pop();continue;default:if(!(o=(o=l.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){l=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){l.label=a[1];break}if(6===a[0]&&l.label<o[1]){l.label=o[1],o=a;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(a);break}o[2]&&l.ops.pop(),l.trys.pop();continue}a=t.call(e,l)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}var g=function(){var e,t,n=(e=(0,l.useState)(!1),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],l=!0,i=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){i=!0,r=e}finally{try{!l&&null!=o.return&&o.return()}finally{if(i)throw r}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}}(e,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.")}()),r=n[0],u=n[1],s=(0,p.NY)().t,m=(0,c.useParams)(),b=(0,o.useApp)(),d=window.location.origin+b.getHref("public-forms/".concat(m.name));return i().createElement(a.Popover,{trigger:"hover",open:r,onOpenChange:function(e){u(e)},content:r?i().createElement(a.QRCode,{value:d,bordered:!1}):" "},i().createElement("a",null,s("QR code",{ns:p.A7})))};function v(){var e,t,n=(0,c.useParams)(),l=(0,p.NY)().t,f=(0,o.useGlobalTheme)().theme,b=(0,o.useAPIClient)(),v=a.theme.useToken().token,w=(0,o.useApp)(),E=(0,o.useRequest)({url:"publicForms:get/".concat(n.name)}),k=E.data,O=E.loading,P=E.refresh,S=(null==k?void 0:k.data)||{},x=S.enabled,C=S.title,A=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++){if(n=a[r],!(t.indexOf(n)>=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}(S,["enabled","title"]);if(O)return i().createElement(a.Spin,null);var j=(e=d(function(e){return h(this,function(t){switch(t.label){case 0:return[4,b.resource("publicForms").update({filterByTk:n.name,values:y({},e)})];case 1:return t.sent(),[4,P()];case 2:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)});var I=(t=d(function(){return h(this,function(e){switch(e.label){case 0:return[4,(0,o.FormDialog)(l("Password"),function(){return i().createElement(o.SchemaComponentOptions,{components:{Checkbox:o.Checkbox,Input:a.Input,FormItem:o.FormItem}},i().createElement(s.FormLayout,{layout:"vertical"},i().createElement(o.SchemaComponent,{schema:{properties:{password:{type:"string","x-decorator":"FormItem","x-component":"Input.Password"}}}})))},f).open({initialValues:y({},A)})];case 1:return[4,j({password:e.sent().password})];case 2:return e.sent(),[2]}})}),function(){return t.apply(this,arguments)});return i().createElement("div",null,i().createElement("div",{style:{margin:"-24px",padding:"10px",display:"flex",alignItems:"center",justifyContent:"space-between",background:"".concat(v.colorBgContainer),borderBottom:"1px solid ".concat(v.colorBorderSecondary)}},i().createElement(a.Breadcrumb,{items:[{title:i().createElement(u.Link,{to:"/admin/settings/public-forms"},l("Public forms",{ns:p.A7}))},{title:C}]}),i().createElement(a.Space,null,i().createElement(u.Link,{target:"_blank",to:"/public-forms/".concat(n.name)},i().createElement(a.Button,{disabled:!x,icon:i().createElement(r.EyeOutlined,null)},l("Open form",{ns:p.A7}))),i().createElement(a.Dropdown,{menu:{items:[{key:"enabled",label:i().createElement("a",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},onClick:function(){return j({enabled:!x})}},i().createElement("span",{style:{marginRight:"10px"}},l("Enable form",{ns:p.A7})),i().createElement(a.Switch,{size:"small",checked:x}))},{key:"password",label:i().createElement("a",{onClick:I}," ",l("Set password"))},{key:"divider1",type:"divider"},{key:"copyLink",label:i().createElement("a",{onClick:function(){var e=window.location.origin+w.getHref("public-forms/".concat(n.name));navigator.clipboard.writeText(e),a.message.success(l("Link copied successfully"))}},l("Copy link"))},{key:"qrcode",label:i().createElement(g,null)}]}},i().createElement(a.Button,{icon:i().createElement(r.SettingOutlined,null)},l("Settings"))))),i().createElement("div",{style:{maxWidth:800,margin:"100px auto",position:"relative",zIndex:0}},i().createElement(o.VariablesProvider,{filterVariables:function(e){return!["$user","$nRole","$nToken","$nURLSearchParams"].includes(e.key)}},i().createElement(o.RemoteSchemaComponent,{uid:n.name,scope:{useCreateActionProps:m.hG},components:{PublicFormMessageProvider:function(e){return e.children}}})),i().createElement(o.PoweredBy,null)))}}}]);