@nocobase/plugin-public-forms 1.6.0-alpha.2 → 1.6.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/234f129c7fa34eb7.js +10 -0
- package/dist/client/c145ca474b2ebbed.js +10 -0
- package/dist/client/caac027bbb77d305.js +10 -0
- package/dist/client/cda99c1ab9bad776.js +10 -0
- package/dist/client/collections/publicForms.d.ts +1 -0
- package/dist/client/components/components/MobileDatePicker.d.ts +11 -0
- package/dist/client/components/components/MobilePicker.d.ts +11 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +5 -5
- package/dist/server/collections/publicForms.js +1 -0
- package/dist/server/plugin.js +2 -2
- package/package.json +2 -2
- package/dist/client/300.index.js +0 -10
- package/dist/client/301.index.js +0 -10
- package/dist/client/433.index.js +0 -10
- package/dist/client/592.index.js +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import React from 'react';
|
|
10
|
+
declare const MobileDateTimePicker: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
11
|
+
export { MobileDateTimePicker };
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import React from 'react';
|
|
10
|
+
declare const MobilePicker: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
11
|
+
export { MobilePicker };
|
package/dist/client/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@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("@formily/antd-v5"),require("react")):"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","@formily/antd-v5","react"],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("@formily/antd-v5"),require("react")):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["@formily/antd-v5"],e.react)}(self,function(e,t,r,n,o,i,u,c,a,l,s,f){return function(){var p,m,d,b,y,h={712:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return P},PluginPublicFormsClient:function(){return k}});var n=r("772"),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("505"),u=r("238"),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("903"),s=r(581);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("301"),r.e("433"),r.e("592")]).then(r.bind(r,97)))},"AdminPublicFormList").AdminPublicFormList,x=(0,n.lazy)(function(){return s("imported_7lbes3_component",Promise.all([r.e("301"),r.e("433"),r.e("300")]).then(r.bind(r,402)))},"AdminPublicFormPage").AdminPublicFormPage,S=(0,n.lazy)(function(){return s("imported_17kipkb_component",Promise.all([r.e("301"),r.e("433")]).then(r.bind(r,805)))},"PublicFormPage").PublicFormPage,k=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:S}),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)),P=k},903:function(e,t,r){"use strict";r.d(t,{A7:function(){return u},NY:function(){return a},NT:function(){return c}});var n=r("772"),o=r("238"),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"})}},581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=u},964:function(e){"use strict";e.exports=t},632:function(e){"use strict";e.exports=s},563:function(e){"use strict";e.exports=n},505:function(e){"use strict";e.exports=c},875:function(e){"use strict";e.exports=r},772:function(e){"use strict";e.exports=o},721:function(e){"use strict";e.exports=i},156:function(e){"use strict";e.exports=f},238:function(t){"use strict";t.exports=e},432:function(e){"use strict";e.exports=l},128:function(e){"use strict";e.exports=a}},g={};function v(e){var t=g[e];if(void 0!==t)return t.exports;var r=g[e]={exports:{}};return h[e].call(r.exports,r,r.exports,v),r.exports}return v.m=h,v.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(t,{a:t}),t},v.d=function(e,t){for(var r in t)v.o(t,r)&&!v.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},v.f={},v.e=function(e){return Promise.all(Object.keys(v.f).reduce(function(t,r){return v.f[r](e,t),t},[]))},v.u=function(e){return""+e+".index.js"},v.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p={},m="@nocobase/plugin-public-forms:",v.l=function(e,t,r,n){if(p[e]){p[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")==m+r){o=a;break}}}!o&&(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,v.nc&&o.setAttribute("nonce",v.nc),o.setAttribute("data-webpack",m+r),o.src=e),p[e]=[t];var l=function(t,r){o.onerror=o.onload=null,clearTimeout(s);var n=p[e];if(delete p[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)},v.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v.p="/static/plugins/@nocobase/plugin-public-forms/dist/client/",d={909:0},v.f.j=function(e,t){var r=v.o(d,e)?d[e]:void 0;if(0!==r){if(r)t.push(r[2]);else{var n=new Promise(function(t,n){r=d[e]=[t,n]});t.push(r[2]=n);var o=v.p+v.u(e),i=Error();v.l(o,function(t){if(v.o(d,e)&&(0!==(r=d[e])&&(d[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)}}},b=function(e,t){var r=t[0],n=t[1],o=t[2],i,u,c=0;if(r.some(function(e){return 0!==d[e]})){for(i in n)v.o(n,i)&&(v.m[i]=n[i]);o&&o(v)}for(e&&e(t);c<r.length;c++)u=r[c],v.o(d,u)&&d[u]&&d[u][0](),d[u]=0},(y=self.webpackChunk_nocobase_plugin_public_forms=self.webpackChunk_nocobase_plugin_public_forms||[]).forEach(b.bind(null,0)),y.push=b.bind(null,y.push.bind(y)),v("712")}()});
|
|
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:"c145ca474b2ebbed",592:"234f129c7fa34eb7",978:"caac027bbb77d305"})[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")}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.6.0-alpha.
|
|
11
|
+
"@nocobase/client": "1.6.0-alpha.20",
|
|
12
12
|
"react-i18next": "11.18.6",
|
|
13
|
-
"@nocobase/plugin-ui-schema-storage": "1.6.0-alpha.
|
|
14
|
-
"@nocobase/server": "1.6.0-alpha.
|
|
13
|
+
"@nocobase/plugin-ui-schema-storage": "1.6.0-alpha.20",
|
|
14
|
+
"@nocobase/server": "1.6.0-alpha.20",
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"@ant-design/icons": "5.2.6",
|
|
17
17
|
"antd": "5.12.8",
|
|
18
|
-
"react-router": "6.28.
|
|
18
|
+
"react-router": "6.28.1",
|
|
19
19
|
"react-router-dom": "6.21.0",
|
|
20
20
|
"@formily/antd-v5": "1.1.9",
|
|
21
21
|
"@emotion/css": "11.13.0",
|
|
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-alpha.
|
|
25
|
+
"@nocobase/database": "1.6.0-alpha.20"
|
|
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: [
|
package/dist/server/plugin.js
CHANGED
|
@@ -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
|
}
|
|
@@ -181,7 +181,7 @@ class PluginPublicFormsServer extends import_server.Plugin {
|
|
|
181
181
|
ctx.permission = {
|
|
182
182
|
skip: true
|
|
183
183
|
};
|
|
184
|
-
} else if (actionName === "list" && ctx.PublicForm["targetCollections"].includes(resourceName) || collection.options.template === "file" && actionName === "create" || resourceName === "storages" && actionName === "
|
|
184
|
+
} else if (actionName === "list" && ctx.PublicForm["targetCollections"].includes(resourceName) || collection.options.template === "file" && actionName === "create" || resourceName === "storages" && actionName === "getBasicInfo" || resourceName === "map-configuration" && actionName === "get") {
|
|
185
185
|
ctx.permission = {
|
|
186
186
|
skip: true
|
|
187
187
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-public-forms",
|
|
3
|
-
"version": "1.6.0-alpha.
|
|
3
|
+
"version": "1.6.0-alpha.20",
|
|
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": "
|
|
19
|
+
"gitHead": "c127664eb2b900edd5c18c9344046cd663a06c3b"
|
|
20
20
|
}
|
package/dist/client/300.index.js
DELETED
|
@@ -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"],{402:function(e,t,n){n.r(t),n.d(t,{AdminPublicFormPage:function(){return g}});var r=n(482),o=n(772),a=n(721),l=n(156),i=n.n(l),c=n(432),u=n(128),s=n(632),m=n(163),f=n(903);function p(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=(0,c.useParams)();var r=(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 p(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 p(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.")}()),o=r[0],u=r[1],s=window.location.origin,m=(0,f.NY)().t,b="".concat(s,"/public-forms/").concat(n.name);return i().createElement(a.Popover,{trigger:"hover",open:o,onOpenChange:function(e){u(e)},content:o?i().createElement(a.QRCode,{value:b,bordered:!1}):" "},i().createElement("a",null,m("QR code",{ns:f.A7})))};function g(){var e,t,n=(0,c.useParams)(),l=(0,f.NY)().t,p=(0,o.useGlobalTheme)().theme,b=(0,o.useAPIClient)(),g=(0,o.useRequest)({url:"publicForms:get/".concat(n.name)}),w=g.data,E=g.loading,k=g.refresh,O=(null==w?void 0:w.data)||{},P=O.enabled,S=O.title,x=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}(O,["enabled","title"]);if(E)return i().createElement(a.Spin,null);var C=(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,k()];case 2:return t.sent(),[2]}})}),function(t){return e.apply(this,arguments)});var j=(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"}}}})))},p).open({initialValues:y({},x)})];case 1:return[4,C({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",background:"#fff",display:"flex",alignItems:"center",justifyContent:"space-between"}},i().createElement(a.Breadcrumb,{items:[{title:i().createElement(u.Link,{to:"/admin/settings/public-forms"},l("Public forms",{ns:f.A7}))},{title:S}]}),i().createElement(a.Space,null,i().createElement(u.Link,{target:"_blank",to:"/public-forms/".concat(n.name)},i().createElement(a.Button,{disabled:!P,icon:i().createElement(r.EyeOutlined,null)},l("Open form",{ns:f.A7}))),i().createElement(a.Dropdown,{menu:{items:[{key:"enabled",label:i().createElement("a",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},onClick:function(){return C({enabled:!P})}},i().createElement("span",{style:{marginRight:"10px"}},l("Enable form",{ns:f.A7})),i().createElement(a.Switch,{size:"small",checked:P}))},{key:"password",label:i().createElement("a",{onClick:j}," ",l("Set password"))},{key:"divider1",type:"divider"},{key:"copyLink",label:i().createElement("a",{onClick:function(){var e=window.location.origin,t="".concat(e,"/public-forms/").concat(n.name);navigator.clipboard.writeText(t),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"}},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)))}}}]);
|
package/dist/client/301.index.js
DELETED
|
@@ -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
|
-
(self.webpackChunk_nocobase_plugin_public_forms=self.webpackChunk_nocobase_plugin_public_forms||[]).push([["301"],{135:function(e,i,r){"use strict";var o,n,t=r(156);var a=(o=t)&&"object"==typeof o&&"default"in o?o.default:o,s=r(412),u=new s,b=u.getBrowser(),c=u.getCPU(),l=u.getDevice(),w=u.getEngine(),d=u.getOS(),f=u.getUA(),m=function(e){return u.setUA(e)},p=function(e){if(!e){console.error("No userAgent string was provided");return}var i=new s(e);return{UA:i,browser:i.getBrowser(),cpu:i.getCPU(),device:i.getDevice(),engine:i.getEngine(),os:i.getOS(),ua:i.getUA(),setUserAgent:function(e){return i.setUA(e)}}},g=Object.freeze({ClientUAInstance:u,browser:b,cpu:c,device:l,engine:w,os:d,ua:f,setUa:m,parseUserAgent:p});function h(e,i){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);i&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function v(e){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,i){for(var r=0;r<i.length;r++){var o=i[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function x(){return(x=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var r=arguments[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function O(e,i){return(O=Object.setPrototypeOf||function(e,i){return e.__proto__=i,e})(e,i)}function S(e,i){if(null==e)return{};var r,o,n=function(e,i){if(null==e)return{};var r,o,n={},t=Object.keys(e);for(o=0;o<t.length;o++)r=t[o],!(i.indexOf(r)>=0)&&(n[r]=e[r]);return n}(e,i);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);for(o=0;o<t.length;o++){if(r=t[o],!(i.indexOf(r)>=0))Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}}return n}function _(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function P(e,i){(null==i||i>e.length)&&(i=e.length);for(var r=0,o=Array(i);r<i;r++)o[r]=e[r];return o}var T={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},E={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},A={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},C={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},j=function(e){switch(e){case T.Mobile:return{isMobile:!0};case T.Tablet:return{isTablet:!0};case T.SmartTv:return{isSmartTV:!0};case T.Console:return{isConsole:!0};case T.Wearable:return{isWearable:!0};case T.Browser:return{isBrowser:!0};case T.Embedded:return{isEmbedded:!0};default:return C}},M=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||i},I=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},U=function(e){var i=I();return i&&i.platform&&(-1!==i.platform.indexOf(e)||"MacIntel"===i.platform&&i.maxTouchPoints>1&&!window.MSStream)},N=function(e,i,r,o){return function(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?h(Object(r),!0).forEach(function(i){(function(e,i,r){i in e?Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[i]=r})(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}({},e,{vendor:M(i.vendor),model:M(i.model),os:M(r.name),osVersion:M(r.version),ua:M(o)})},B=function(e){return e.type===T.Mobile},q=function(e){return e.type===T.Tablet},z=function(e){var i=e.type;return i===T.Mobile||i===T.Tablet},V=function(e){return e.type===T.SmartTv},D=function(e){return e.type===T.Browser},W=function(e){return e.type===T.Wearable},R=function(e){return e.type===T.Console},L=function(e){return e.type===T.Embedded},F=function(e){return M(e.vendor)},G=function(e){return M(e.model)},H=function(e){return M(e.type,"browser")},Y=function(e){return e.name===A.Android},Z=function(e){return e.name===A.Windows},X=function(e){return e.name===A.MAC_OS},$=function(e){return e.name===A.WindowsPhone},K=function(e){return e.name===A.IOS},Q=function(e){return M(e.version)},J=function(e){return M(e.name)},ee=function(e){return e.name===E.Chrome},ei=function(e){return e.name===E.Firefox},er=function(e){return e.name===E.Chromium},eo=function(e){return e.name===E.Edge},en=function(e){return e.name===E.Yandex},et=function(e){var i=e.name;return i===E.Safari||i===E.MobileSafari},ea=function(e){return e.name===E.MobileSafari},es=function(e){return e.name===E.Opera},eu=function(e){var i=e.name;return i===E.InternetExplorer||i===E.Ie},eb=function(e){return e.name===E.MIUI},ec=function(e){return e.name===E.SamsungBrowser},el=function(e){return M(e.version)},ew=function(e){return M(e.major)},ed=function(e){return M(e.name)},ef=function(e){return M(e.name)},em=function(e){return M(e.version)},ep=function(){var e=I(),i=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof i&&/electron/.test(i)},eg=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},eh=function(){var e=I();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},ev=function(){return U("iPad")},ey=function(){return U("iPhone")},ex=function(){return U("iPod")},ek=function(e){return M(e)};function eO(e){var i=e||g,r=i.device,o=i.browser,n=i.os,t=i.engine,a=i.ua;return{isSmartTV:V(r),isConsole:R(r),isWearable:W(r),isEmbedded:L(r),isMobileSafari:ea(o)||ev(),isChromium:er(o),isMobile:z(r)||ev(),isMobileOnly:B(r),isTablet:q(r)||ev(),isBrowser:D(r),isDesktop:D(r),isAndroid:Y(n),isWinPhone:$(n),isIOS:K(n)||ev(),isChrome:ee(o),isFirefox:ei(o),isSafari:et(o),isOpera:es(o),isIE:eu(o),osVersion:Q(n),osName:J(n),fullBrowserVersion:el(o),browserVersion:ew(o),browserName:ed(o),mobileVendor:F(r),mobileModel:G(r),engineName:ef(t),engineVersion:em(t),getUA:ek(a),isEdge:eo(o)||eg(a),isYandex:en(o),deviceType:H(r),isIOS13:eh(),isIPad13:ev(),isIPhone13:ey(),isIPod13:ex(),isElectron:ep(),isEdgeChromium:eg(a),isLegacyEdge:eo(o)&&!eg(a),isWindows:Z(n),isMacOs:X(n),isMIUI:eb(o),isSamsungBrowser:ec(o)}}var eS=V(l),e_=R(l),eP=W(l),eT=L(l),eE=ea(b)||ev(),eA=er(b),eC=z(l)||ev(),ej=B(l),eM=q(l)||ev(),eI=D(l),eU=D(l),eN=Y(d),eB=$(d),eq=K(d)||ev(),ez=ee(b),eV=ei(b),eD=et(b),eW=es(b),eR=eu(b),eL=Q(d),eF=J(d),eG=el(b),eH=ew(b),eY=ed(b),eZ=F(l),eX=G(l),e$=ef(w),eK=em(w),eQ=ek(f),eJ=eo(b)||eg(f),e0=en(b),e1=H(l),e2=eh(),e3=ev(),e6=ey(),e4=ex(),e5=ep(),e9=eg(f),e8=eo(b)&&!eg(f),e7=Z(d),ie=X(d),ii=eb(b),ir=ec(b);function io(e){return p(e||window.navigator.userAgent)}i.isDesktop=eU},412:function(e,i){!function(r,o){"use strict";var n="function",t="undefined",a="object",s="string",u="major",b="model",c="name",l="type",w="vendor",d="version",f="architecture",m="console",p="mobile",g="tablet",h="smarttv",v="wearable",y="embedded",x="Amazon",k="Apple",O="ASUS",S="BlackBerry",_="Browser",P="Chrome",T="Firefox",E="Google",A="Huawei",C="Microsoft",j="Motorola",M="Opera",I="Samsung",U="Sharp",N="Sony",B="Xiaomi",q="Zebra",z="Facebook",V="Chromium OS",D="Mac OS",W=function(e,i){var r={};for(var o in e)i[o]&&i[o].length%2==0?r[o]=i[o].concat(e[o]):r[o]=e[o];return r},R=function(e){for(var i={},r=0;r<e.length;r++)i[e[r].toUpperCase()]=e[r];return i},L=function(e,i){return typeof e===s&&-1!==F(i).indexOf(F(e))},F=function(e){return e.toLowerCase()},G=function(e,i){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof i===t?e:e.substring(0,500)},H=function(e,i){for(var r,t,s,u,b,c,l=0;l<i.length&&!b;){var w=i[l],d=i[l+1];for(r=t=0;r<w.length&&!b&&w[r];){;if(b=w[r++].exec(e))for(s=0;s<d.length;s++)c=b[++t],typeof(u=d[s])===a&&u.length>0?2===u.length?typeof u[1]==n?this[u[0]]=u[1].call(this,c):this[u[0]]=u[1]:3===u.length?typeof u[1]!==n||u[1].exec&&u[1].test?this[u[0]]=c?c.replace(u[1],u[2]):void 0:this[u[0]]=c?u[1].call(this,c,u[2]):o:4===u.length&&(this[u[0]]=c?u[3].call(this,c.replace(u[1],u[2])):o):this[u]=c||o}l+=2}},Y=function(e,i){for(var r in i)if(typeof i[r]===a&&i[r].length>0){for(var n=0;n<i[r].length;n++)if(L(i[r][n],e))return"?"===r?o:r}else if(L(i[r],e))return"?"===r?o:r;return e},Z={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,d],[/opios[\/ ]+([\w\.]+)/i],[d,[c,M+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[d,[c,M+" GX"]],[/\bopr\/([\w\.]+)/i],[d,[c,M]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[d,[c,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,d],[/\bddg\/([\w\.]+)/i],[d,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[d,[c,"UC"+_]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[d,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[d,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[d,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[d,[c,"Smart Lenovo "+_]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+_],d],[/\bfocus\/([\w\.]+)/i],[d,[c,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[d,[c,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[d,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[c,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[d,[c,"MIUI "+_]],[/fxios\/([-\w\.]+)/i],[d,[c,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+_]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1 "+_],d],[/samsungbrowser\/([\w\.]+)/i],[d,[c,I+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[c,/_/g," "],d],[/metasr[\/ ]?([\d\.]+)/i],[d,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],d],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[c,d],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,z],d],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,d],[/\bgsa\/([\w\.]+) .*safari\//i],[d,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[d,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[d,[c,P+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,P+" WebView"],d],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[d,[c,"Android "+_]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,d],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[d,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[d,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[d,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,d],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],d],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[d,[c,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c,d],[/(cobalt)\/([\w\.]+)/i],[c,[d,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,F]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",F]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,F]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[b,[w,I],[l,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[b,[w,I],[l,p]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[b,[w,k],[l,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[b,[w,k],[l,g]],[/(macintosh);/i],[b,[w,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[b,[w,U],[l,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[b,[w,A],[l,g]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[b,[w,A],[l,p]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[b,/_/g," "],[w,B],[l,p]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[b,/_/g," "],[w,B],[l,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[b,[w,"OPPO"],[l,p]],[/\b(opd2\d{3}a?) bui/i],[b,[w,"OPPO"],[l,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[b,[w,"Vivo"],[l,p]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[b,[w,"Realme"],[l,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[b,[w,j],[l,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[b,[w,j],[l,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[b,[w,"LG"],[l,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[b,[w,"LG"],[l,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[b,[w,"Lenovo"],[l,g]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[b,/_/g," "],[w,"Nokia"],[l,p]],[/(pixel c)\b/i],[b,[w,E],[l,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[b,[w,E],[l,p]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[b,[w,N],[l,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[b,"Xperia Tablet"],[w,N],[l,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[b,[w,"OnePlus"],[l,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[b,[w,x],[l,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[b,/(.+)/g,"Fire Phone $1"],[w,x],[l,p]],[/(playbook);[-\w\),; ]+(rim)/i],[b,w,[l,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[b,[w,S],[l,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[b,[w,O],[l,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[b,[w,O],[l,p]],[/(nexus 9)/i],[b,[w,"HTC"],[l,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[w,[b,/_/g," "],[l,p]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[b,[w,"Acer"],[l,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[b,[w,"Meizu"],[l,p]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[b,[w,"Ulefone"],[l,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[w,b,[l,p]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[w,b,[l,g]],[/(surface duo)/i],[b,[w,C],[l,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[b,[w,"Fairphone"],[l,p]],[/(u304aa)/i],[b,[w,"AT&T"],[l,p]],[/\bsie-(\w*)/i],[b,[w,"Siemens"],[l,p]],[/\b(rct\w+) b/i],[b,[w,"RCA"],[l,g]],[/\b(venue[\d ]{2,7}) b/i],[b,[w,"Dell"],[l,g]],[/\b(q(?:mv|ta)\w+) b/i],[b,[w,"Verizon"],[l,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[b,[w,"Barnes & Noble"],[l,g]],[/\b(tm\d{3}\w+) b/i],[b,[w,"NuVision"],[l,g]],[/\b(k88) b/i],[b,[w,"ZTE"],[l,g]],[/\b(nx\d{3}j) b/i],[b,[w,"ZTE"],[l,p]],[/\b(gen\d{3}) b.+49h/i],[b,[w,"Swiss"],[l,p]],[/\b(zur\d{3}) b/i],[b,[w,"Swiss"],[l,g]],[/\b((zeki)?tb.*\b) b/i],[b,[w,"Zeki"],[l,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[w,"Dragon Touch"],b,[l,g]],[/\b(ns-?\w{0,9}) b/i],[b,[w,"Insignia"],[l,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[b,[w,"NextBook"],[l,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[w,"Voice"],b,[l,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[w,"LvTel"],b,[l,p]],[/\b(ph-1) /i],[b,[w,"Essential"],[l,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[b,[w,"Envizen"],[l,g]],[/\b(trio[-\w\. ]+) b/i],[b,[w,"MachSpeed"],[l,g]],[/\btu_(1491) b/i],[b,[w,"Rotor"],[l,g]],[/(shield[\w ]+) b/i],[b,[w,"Nvidia"],[l,g]],[/(sprint) (\w+)/i],[w,b,[l,p]],[/(kin\.[onetw]{3})/i],[[b,/\./g," "],[w,C],[l,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[b,[w,q],[l,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[b,[w,q],[l,p]],[/smart-tv.+(samsung)/i],[w,[l,h]],[/hbbtv.+maple;(\d+)/i],[[b,/^/,"SmartTV"],[w,I],[l,h]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[w,"LG"],[l,h]],[/(apple) ?tv/i],[w,[b,k+" TV"],[l,h]],[/crkey/i],[[b,P+"cast"],[w,E],[l,h]],[/droid.+aft(\w+)( bui|\))/i],[b,[w,x],[l,h]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[b,[w,U],[l,h]],[/(bravia[\w ]+)( bui|\))/i],[b,[w,N],[l,h]],[/(mitv-\w{5}) bui/i],[b,[w,B],[l,h]],[/Hbbtv.*(technisat) (.*);/i],[w,b,[l,h]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[w,G],[b,G],[l,h]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,h]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[w,b,[l,m]],[/droid.+; (shield) bui/i],[b,[w,"Nvidia"],[l,m]],[/(playstation [345portablevi]+)/i],[b,[w,N],[l,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[b,[w,C],[l,m]],[/((pebble))app/i],[w,b,[l,v]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[b,[w,k],[l,v]],[/droid.+; (glass) \d/i],[b,[w,E],[l,v]],[/droid.+; (wt63?0{2,3})\)/i],[b,[w,q],[l,v]],[/(quest( \d| pro)?)/i],[b,[w,z],[l,v]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[w,[l,y]],[/(aeobc)\b/i],[b,[w,x],[l,y]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[b,[l,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[b,[l,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[l,p]],[/(android[-\w\. ]{0,9});.+buil/i],[b,[w,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[d,[c,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,d],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[c,[d,Y,Z]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,Y,Z],[c,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,D],[d,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[d,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c,d],[/\(bb(10);/i],[d,[c,S]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[d,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[d,[c,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[d,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[d,[c,P+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,V],d],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,d],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],d],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,d]]},$=function(e,i){if(typeof e===a&&(i=e,e=o),!(this instanceof $))return new $(e,i).getResult();var m=typeof r!==t&&r.navigator?r.navigator:o,h=e||(m&&m.userAgent?m.userAgent:""),v=m&&m.userAgentData?m.userAgentData:o,y=i?W(X,i):X,x=m&&m.userAgent==h;return this.getBrowser=function(){var e,i={};return i[c]=o,i[d]=o,H.call(i,h,y.browser),i[u]=typeof(e=i[d])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:o,x&&m&&m.brave&&typeof m.brave.isBrave==n&&(i[c]="Brave"),i},this.getCPU=function(){var e={};return e[f]=o,H.call(e,h,y.cpu),e},this.getDevice=function(){var e={};return e[w]=o,e[b]=o,e[l]=o,H.call(e,h,y.device),x&&!e[l]&&v&&v.mobile&&(e[l]=p),x&&"Macintosh"==e[b]&&m&&typeof m.standalone!==t&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[b]="iPad",e[l]=g),e},this.getEngine=function(){var e={};return e[c]=o,e[d]=o,H.call(e,h,y.engine),e},this.getOS=function(){var e={};return e[c]=o,e[d]=o,H.call(e,h,y.os),x&&!e[c]&&v&&v.platform&&"Unknown"!=v.platform&&(e[c]=v.platform.replace(/chrome os/i,V).replace(/macos/i,D)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return h},this.setUA=function(e){return h=typeof e===s&&e.length>500?G(e,500):e,this},this.setUA(h),this};$.VERSION="1.0.38",$.BROWSER=R([c,d,u]),$.CPU=R([f]),$.DEVICE=R([b,w,l,m,p,h,g,v,y]),$.ENGINE=$.OS=R([c,d]),typeof i!==t?(e.exports&&(i=e.exports=$),i.UAParser=$):typeof define===n&&define.amd?define(function(){return $}):typeof r!==t&&(r.UAParser=$);var K=typeof r!==t&&(r.jQuery||r.Zepto);if(K&&!K.ua){var Q=new $;K.ua=Q.getResult(),K.ua.get=function(){return Q.getUA()},K.ua.set=function(e){Q.setUA(e);var i=Q.getResult();for(var r in i)K.ua[r]=i[r]}}}("object"==typeof window?window:this)}}]);
|
package/dist/client/433.index.js
DELETED
|
@@ -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([["433"],{805:function(e,t,r){r.r(t),r.d(t,{PageBackgroundColor:function(){return E},PublicFormPage:function(){return M},PublicFormMessageContext:function(){return C}});var n=r("772"),o=r("964"),a=r("135"),u=r("505"),i=r("721"),c=r("156"),l=r.n(c),s=r("432"),f=r("163"),p=r("903"),d=function(){var e=(0,p.NY)().t;return l().createElement(n.BlockItemCard,{style:{boxShadow:"unset"}},l().createElement(i.Result,{status:"403",subTitle:e("The form is not enabled and cannot be accessed",{ns:p.A7})}))},b=function(){return(0,p.NY)().t,l().createElement(n.BlockItemCard,{style:{boxShadow:"unset"}},l().createElement(i.Result,{status:"404"}))};function m(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 v(e,t,r,n,o,a,u){try{var i=e[a](u),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function y(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 h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],u=!0,i=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);u=!0);}catch(e){i=!0,n=e}finally{try{!u&&null!=o.return&&o.return()}finally{if(i)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(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 m(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.")}()}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function P(){var e,t,r=(e=["\n @media (min-width: 1025px) {\n padding-top: 10vh;\n }\n padding-top: 0px;\n "],!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return P=function(){return r},r}var k=function(e){var t,r,n;function o(){var e,t,r;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e=this,t=o,r=arguments,t=h(t),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)}(e,O()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}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&&g(e,t)}(o,e),t=o,r=[{key:"getDataSource",value:function(){var e;return(e=function(){return function(e,t){var r,n,o,a,u={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(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,function(e){return[2,{}]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function u(e){v(a,n,o,u,i,"next",e)}function i(e){v(a,n,o,u,i,"throw",e)}u(void 0)})})()}}],y(t.prototype,r),o}(n.DataSource);function S(e){var t=e.dataSource,r=(0,n.useApp)(),o=w((0,c.useMemo)(function(){var e=new n.DataSourceManager({},r),o=e.addDataSource(k,t);return[e,new n.CollectionManager([],o)]},[r,t]),2),a=o[0],u=o[1];return l().createElement("div",null,l().createElement(n.DataSourceApplicationProvider,{dataSource:t.key,dataSourceManager:a,instance:u},e.children))}function x(e){var t=e.children,r=(0,n.useApp)(),o=(0,c.useMemo)(function(){var e=new n.APIClient(r.getOptions().apiClient);return e.app=r,e.axios.interceptors.request.use(function(e){return e.headers&&(e.headers["X-Form-Token"]=localStorage.getItem("NOCOBASE_FORM_TOKEN")||""),e}),e},[r]);return l().createElement(n.APIClientProvider,{apiClient:o},t)}var C=(0,c.createContext)({}),E="#f5f5f5",j=function(e){var t=e.children,r=w((0,c.useState)(!1),2),n=r[0],o=r[1],a=(0,u.useField)(),i=function(e,t){a.form.query(e).take(function(e){e&&(e.visible=t,e.hidden=!t)})};return(0,c.useEffect)(function(){i("success",n),i("form",!n),!n&&a.form.query("promptMessage").take(function(e){e&&(e.visible=!1,e.hidden=!0)})},[n]),l().createElement(C.Provider,{value:{showMessage:n,setShowMessage:o}},t)};function A(){var e,t,r,u,p,m,v,y=(0,s.useParams)(),h=(0,n.useAPIClient)(),g=(0,n.useRequest)({url:"publicForms:getMeta/".concat(y.name)},{onSuccess:function(e){var t;localStorage.setItem("NOCOBASE_FORM_TOKEN",null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.token),h.axios.interceptors.request.use(function(t){if(t.headers){var r;t.headers["X-Form-Token"]=(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.token)||""}return t})}}),O=g.error,k=g.data,C=g.loading,A=g.run,M=w((0,c.useState)(""),2),D=M[0],T=M[1],B=(0,c.useContext)(n.SchemaComponentContext);if((0,c.useEffect)(function(){if(!a.isDesktop){var e=document.querySelector('meta[name="viewport"]');!e&&((e=document.createElement("meta")).setAttribute("name","viewport"),document.head.appendChild(e)),e.setAttribute("content","width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"),document.body.style.backgroundColor=E,document.body.style.overflow="hidden";var t=document.createElement("div");document.body.appendChild(t),document.body.removeChild(t)}},[]),(null==O?void 0:null===(r=O.response)||void 0===r?void 0:r.status)===401||(null==k?void 0:null===(u=k.data)||void 0===u?void 0:u.passwordRequired))return l().createElement("div",null,l().createElement(i.Modal,{centered:!0,title:"Password",open:!0,cancelButtonProps:{hidden:!0},onOk:function(){A({password:D})}},l().createElement(i.Input.Password,{onChange:function(e){T(e.target.value)}})));if((null==O?void 0:null===(p=O.response)||void 0===p?void 0:p.status)===500)return l().createElement(b,null);if(C)return l().createElement(i.Spin,null);if(!(null==k?void 0:k.data))return l().createElement(d,null);return l().createElement(n.ACLCustomContext.Provider,{value:{allowAll:!0}},l().createElement(x,null,l().createElement("div",{style:{minHeight:"100vh",background:E,height:"100%",overflow:"auto"}},l().createElement("div",{style:{maxWidth:800,margin:"0 auto"},className:(0,o.css)(P())},l().createElement(S,{dataSource:null==k?void 0:null===(m=k.data)||void 0===m?void 0:m.dataSource},l().createElement(n.VariablesProvider,null,l().createElement(n.SchemaComponentContext.Provider,{value:(e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},B),t=(t={designable:!1},t),Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e)},l().createElement(n.SchemaComponent,{schema:null==k?void 0:null===(v=k.data)||void 0===v?void 0:v.schema,scope:{useCreateActionProps:f.hG},components:{PublicFormMessageProvider:j}})))),l().createElement("div",{style:{marginBottom:"20px"}},l().createElement(n.PoweredBy,null))))))}function M(){return l().createElement(A,null)}},163:function(e,t,r){r.d(t,{j1:function(){return y},Dq:function(){return u},fC:function(){return l},hG:function(){return d}});var n=r("772"),o=r("721");function a(e,t,r,n,o,a,u){try{var i=e[a](u),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}function u(){var e=o.App.useApp().message,t=(0,n.useCollectionRecordData)(),r=(0,n.useDataBlockResource)(),u=(0,n.useBlockRequestContext)().service,i=(0,n.useCollection)();return{confirm:{title:"Delete",content:"Are you sure you want to delete it?"},onClick:function(){var n;return(n=function(){return function(e,t){var r,n,o,a,u={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(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,function(n){switch(n.label){case 0:if(!i)throw Error("collection does not exist");return[4,r.destroy({filterByTk:t[i.filterTargetKey]})];case 1:return n.sent(),[4,u.refresh()];case 2:return n.sent(),e.success("Deleted!"),[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var u=n.apply(e,t);function i(e){a(u,r,o,i,c,"next",e)}function c(e){a(u,r,o,i,c,"throw",e)}i(void 0)})})()}}}var i=r("563"),c=r("156"),l=function(){var e=(0,n.useCollectionRecordData)();return{form:(0,c.useMemo)(function(){return(0,i.createForm)({initialValues:e})},[e])}},s=r("505"),f=r("805");function p(e,t,r,n,o,a,u){try{var i=e[a](u),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}var d=function(){var e=(0,s.useForm)(),t=(0,n.useDataBlockResource)(),r=(0,s.useField)(),o=(0,n.useCollectValuesToSubmit)(),a=(0,s.useFieldSchema)(),u=(0,n.useFormBlockContext)().updateAssociationValues,i=(0,c.useContext)(f.PublicFormMessageContext).setShowMessage;return{type:"primary",onClick:function(){var n;return(n=function(){var n,c,l,s,f,p;return function(e,t){var r,n,o,a,u={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(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,function(p){switch(p.label){case 0:if(l=(c=null!==(n=null==a?void 0:a["x-action-settings"])&&void 0!==n?n:{}).skipValidator,s=c.triggerWorkflows,l)return[3,2];return[4,e.submit()];case 1:p.sent(),p.label=2;case 2:return[4,o()];case 3:f=p.sent(),r.data=r.data||{},r.data.loading=!0,p.label=4;case 4:return p.trys.push([4,8,,9]),[4,e.submit()];case 5:return p.sent(),[4,t.publicSubmit({values:f,triggerWorkflows:(null==s?void 0:s.length)?s.map(function(e){return[e.workflowKey,e.context].filter(Boolean).join("!")}).join(","):void 0,updateAssociationValues:u})];case 6:return p.sent(),[4,e.reset()];case 7:return p.sent(),r.data.loading=!1,i(!0),[3,9];case 8:return p.sent(),r.data.loading=!1,[3,9];case 9:return[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var a=n.apply(e,t);function u(e){p(a,r,o,u,i,"next",e)}function i(e){p(a,r,o,u,i,"throw",e)}u(void 0)})})()}}},b=r("875"),m=r("712");function v(e,t,r,n,o,a,u){try{var i=e[a](u),c=i.value}catch(e){r(e);return}i.done?t(c):Promise.resolve(c).then(n,o)}var y=function(){var e=(0,n.useActionContext)().setVisible,t=o.App.useApp().message,r=(0,s.useForm)(),a=(0,n.useDataBlockResource)(),u=(0,n.useCollection)(),i=(0,n.useAPIClient)(),c=(0,n.usePlugin)(m.default),l=(0,n.useBlockRequestContext)().service;return{type:"primary",onClick:function(){var n;return(n=function(){var n,o,s,f,p,d;return function(e,t){var r,n,o,a,u={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(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,n=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=t.call(e,u)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}}(this,function(m){switch(m.label){case 0:return[4,r.submit()];case 1:if(m.sent(),!(n=r.values)[u.filterTargetKey])return[3,3];return[4,a.update({values:n,filterByTk:n[u.filterTargetKey]})];case 2:return m.sent(),[3,6];case 3:var v,y,h,g,w;return o=(0,b.uid)(),s=c.getFormSchemaByType(n.type),p=(f=n.collection.split(":")).pop(),v=0,y=s({collection:p,dataSource:f.pop()||"main"}),h=c.t.bind(c),(d={type:"void",name:(0,b.uid)(),"x-decorator":"PublicFormMessageProvider",properties:{form:y,promptMessage:{type:"void","x-component":"h3","x-component-props":{style:{margin:"10px 0px 10px"},children:'{{ t("Prompt after successful submission",{ns:"public-forms"})}}'}},success:{type:"void","x-editable":!1,"x-toolbar-props":{draggable:!1},"x-settings":"blockSettings:publicMarkdown","x-component":"Markdown.Void","x-decorator":"CardItem","x-component-props":{content:h("# Submitted successfully!\nThis is a demo text, **supports Markdown syntax**.")},"x-decorator-props":{name:"markdown",engine:"handlebars"}}}})["x-uid"]=o,[4,a.create({values:(g=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},n),w=null!=(w={key:o})?w:{},Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(w)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(w)).forEach(function(e){Object.defineProperty(g,e,Object.getOwnPropertyDescriptor(w,e))}),g)})];case 4:return m.sent(),[4,i.resource("uiSchemas").insert({values:d})];case 5:m.sent(),m.label=6;case 6:return r.reset(),[4,l.refresh()];case 7:return m.sent(),t.success("Saved successfully!"),e(!1),[2]}})},function(){var e=this,t=arguments;return new Promise(function(r,o){var a=n.apply(e,t);function u(e){v(a,r,o,u,i,"next",e)}function i(e){v(a,r,o,u,i,"throw",e)}u(void 0)})})()}}}}}]);
|
package/dist/client/592.index.js
DELETED
|
@@ -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"],{97:function(e,t,o){o.r(t),o.d(t,{AdminPublicFormList:function(){return y}});var n=o("772"),r=o("156"),i=o.n(r),p=o("712"),c=o("903"),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("163"),m=o("875"),a=o("128"),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}})))}}}]);
|