@nocobase/plugin-block-iframe 1.5.0-beta.3 → 1.5.0-beta.5
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/index.js +1 -5
- package/dist/externalVersion.js +5 -5
- package/package.json +2 -2
package/dist/client/index.js
CHANGED
|
@@ -7,8 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
(function(r,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("@formily/antd-v5"),require("@formily/react"),require("antd"),require("react"),require("react-i18next"),require("@formily/shared"),require("@ant-design/icons")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","@formily/antd-v5","@formily/react","antd","react","react-i18next","@formily/shared","@ant-design/icons"],e):(r=typeof globalThis!="undefined"?globalThis:r||self,e(r["@nocobase/plugin-block-iframe"]={},r["@nocobase/client"],r.jsxRuntime,r["@formily/antd-v5"],r["@formily/react"],r.antd,r.react,r["react-i18next"],r["@formily/shared"],r["@ant-design/icons"]))})(this,function(r,e,n,S,O,$,z,q,j,L){"use strict";var he=Object.defineProperty,ge=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var J=(r,e,n)=>e in r?he(r,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[e]=n,w=(r,e)=>{for(var n in e||(e={}))K.call(e,n)&&J(r,n,e[n]);if(U)for(var n of U(e))Q.call(e,n)&&J(r,n,e[n]);return r},N=(r,e)=>ge(r,ye(e));var X=(r,e)=>{var n={};for(var S in r)K.call(r,S)&&e.indexOf(S)<0&&(n[S]=r[S]);if(r!=null&&U)for(var S of U(r))e.indexOf(S)<0&&Q.call(r,S)&&(n[S]=r[S]);return n};var H=(r,e,n)=>new Promise((S,O)=>{var $=j=>{try{q(n.next(j))}catch(L){O(L)}},z=j=>{try{q(n.throw(j))}catch(L){O(L)}},q=j=>j.done?S(j.value):Promise.resolve(j.value).then($,z);q((n=n.apply(r,e)).next())});function Y(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}/*
|
|
11
|
-
object-assign
|
|
12
|
-
(c) Sindre Sorhus
|
|
13
|
-
@license MIT
|
|
14
|
-
*/var G=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;function te(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function re(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},t=0;t<10;t++)a["_"+String.fromCharCode(t)]=t;var i=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(i.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(f){s[f]=f}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch(f){return!1}}var ne=re()?Object.assign:function(o,a){for(var t,i=te(o),s,f=1;f<arguments.length;f++){t=Object(arguments[f]);for(var k in t)Z.call(t,k)&&(i[k]=t[k]);if(G){s=G(t);for(var g=0;g<s.length;g++)ee.call(t,s[g])&&(i[s[g]]=t[s[g]])}}return i};const oe=Y(ne),ae=({url:o,allowFullScreen:a,position:t,display:i,height:s,width:f,overflow:k,styles:g,onLoad:T,onMouseOver:B,onMouseOut:M,scrolling:y,id:F,frameBorder:C,ariaHidden:P,sandbox:x,allow:b,className:l,title:d,ariaLabel:u,ariaLabelledby:I,name:c,target:m,loading:A,importance:p,referrerpolicy:E,allowpaymentrequest:ue,src:pe,key:fe})=>{const D=oe({src:pe||o,target:m||null,style:{position:t||null,display:i||"initial",overflow:k||null},scrolling:y||null,allowpaymentrequest:ue||null,importance:p||null,sandbox:x&&[...x].join(" ")||null,loading:A||null,styles:g||null,name:c||null,className:l||null,allowFullScreen:"allowFullScreen",referrerpolicy:E||null,title:d||null,allow:b||null,id:F||null,"aria-labelledby":I||null,"aria-hidden":P||null,"aria-label":u||null,width:f||null,height:s||null,onLoad:T||null,onMouseOver:B||null,onMouseOut:M||null,key:fe||"iframe"});let h=Object.create(null);for(let v of Object.keys(D))D[v]!=null&&(h[v]=D[v]);for(let v of Object.keys(h.style))h.style[v]==null&&delete h.style[v];if(h.styles)for(let v of Object.keys(h.styles))h.styles.hasOwnProperty(v)&&(h.style[v]=h.styles[v]),Object.keys(h.styles).pop()==v&&delete h.styles;if(a)if("allow"in h){const v=h.allow.replace("fullscreen","");h.allow=`fullscreen ${v.trim()}`.trim()}else h.allow="fullscreen";return C>=0&&(h.style.hasOwnProperty("border")||(h.style.border=C)),z.createElement("iframe",Object.assign({},h))},se=()=>{const o=O.useField(),a=O.useFieldSchema(),{t}=q.useTranslation(),{dn:i}=e.useDesignable(),s=e.useAPIClient(),{mode:f,url:k,htmlId:g,height:T="60vh",engine:B}=a["x-component-props"]||{},M=x=>H(this,null,function*(){var l,d,u,I,c;const b={values:{html:x}};if(g){const{data:m}=yield(d=(l=s.resource("iframeHtml")).update)==null?void 0:d.call(l,N(w({},b),{filterByTk:g}));return((u=m==null?void 0:m.data)==null?void 0:u[0])||{id:g}}else{const{data:m}=yield(c=(I=s.resource("iframeHtml")).create)==null?void 0:c.call(I,b);return m==null?void 0:m.data}}),y=I=>H(this,[I],function*({mode:x,url:b,html:l,height:d,engine:u}){const c=a["x-component-props"]||{};if(c.mode=x,c.height=d,c.url=b,c.engine=u||"string",x==="html"){const m=yield M(l);c.htmlId=m.id}a["x-component-props"]=c,o.componentProps=w({},c),o.data={v:j.uid()},i.emit("patch",{schema:{"x-uid":a["x-uid"],"x-component-props":c}})}),{form:F}=e.useFormBlockContext(),C=e.useRecord(),P=e.useVariableOptions({collectionField:{uiSchema:a},form:F,record:C,uiSchema:a,noDisabled:!0});return n.jsxs(e.GeneralSchemaDesigner,{children:[n.jsx(e.SchemaSettingsModalItem,{title:t("Edit iframe"),asyncGetInitialValues:()=>H(this,null,function*(){var b,l,d;const x={mode:f,url:k,height:T};if(g){const{data:u}=yield(l=(b=s.resource("iframeHtml")).get)==null?void 0:l.call(b,{filterByTk:g});x.html=((d=u==null?void 0:u.data)==null?void 0:d.html)||""}return x}),schema:{type:"object",title:t("Edit iframe"),properties:{mode:{title:'{{t("Mode")}}',"x-component":"Radio.Group","x-decorator":"FormItem",required:!0,default:"url",enum:[{value:"url",label:t("URL")},{value:"html",label:t("HTML")}]},url:{title:t("URL"),type:"string","x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:P},required:!0,"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}}},engine:{title:'{{t("Template engine")}}',"x-component":"Radio.Group","x-decorator":"FormItem",enum:[{value:"string",label:t("String template")},{value:"handlebars",label:t("Handlebars")}],"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}},html:{title:t("html"),type:"string","x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:P,style:{minHeight:"200px"}},required:!0,"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}},height:{title:t("Height"),type:"string","x-decorator":"FormItem","x-component":"Input",required:!0}}},onSubmit:y}),n.jsx(e.SchemaSettingsDivider,{}),n.jsx(e.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};function V(o){return typeof o!="string"?!1:!isNaN(o)&&!isNaN(parseFloat(o))}const R=O.observer(o=>{const I=o,{url:a,htmlId:t,mode:i="url",height:s,html:f,params:k,engine:g}=I,T=X(I,["url","htmlId","mode","height","html","params","engine"]),B=O.useField(),{t:M}=q.useTranslation(),y=e.useBlockHeight()||s,F=e.useVariables(),C=e.useLocalVariables(),P=e.useCompile(),{loading:x,data:b}=e.useRequest({url:`iframeHtml:getHtml/${t}`},{refreshDeps:[t,B.data],ready:i==="html"&&!!t}),{parseURLAndParams:l}=e.useParseURLAndParams(),[d,u]=z.useState(null);return z.useEffect(()=>{H(this,null,function*(){if(i==="html"){const m=yield e.getRenderContent(g,b,P(F),P(C),E=>E);if(m===void 0)return;const p="data:text/html;charset=utf-8,"+encodeURIComponent(m);u(p)}else try{const m=yield l(a,k||[]);u(m)}catch(m){console.error("Error fetching target URL:",m),u("fallback-url")}})},[b,i,a,F,C,k]),i==="url"&&!a||i==="html"&&!t?n.jsx($.Card,{style:{marginBottom:24,height:V(y)?`${y}px`:y},children:M("Please fill in the iframe URL")}):x&&!d?n.jsx("div",{style:{height:V(y)?`${y}px`:y||"60vh",marginBottom:"24px",border:0},children:n.jsx($.Spin,{})}):n.jsx(ae,w({url:d,width:"100%",display:"block",position:"relative",styles:{height:V(y)?`${y}px`:y||"60vh",marginBottom:"24px",border:0}},T))},{displayName:"Iframe"});R.Designer=se;const ie=()=>{const{insert:o}=e.useSchemaInitializer(),a=e.useSchemaInitializerItem();return n.jsx(e.SchemaInitializerItem,N(w({},a),{icon:n.jsx(L.PicRightOutlined,{}),onClick:()=>{o({type:"void","x-settings":"blockSettings:iframe","x-decorator":"BlockItem","x-decorator-props":{name:"iframe"},"x-component":"Iframe","x-component-props":{}})}}))},le=o=>n.jsx(e.SchemaComponentOptions,{components:{Iframe:R,IframeBlockInitializer:ie,ArrayItems:S.ArrayItems},children:o.children}),ce=o=>a=>{const t=O.useFieldSchema(),{form:i}=e.useFormBlockContext(),s=e.useRecord(),f=e.useVariableOptions({collectionField:{uiSchema:t},form:i,record:s,uiSchema:t,noDisabled:!0});return n.jsx(o,N(w({},a),{scope:f}))},_={items:[{name:"EditIframe",type:"modal",useComponentProps(){const o=O.useField(),a=O.useFieldSchema(),{t,i18n:i}=q.useTranslation(),{dn:s}=e.useDesignable(),f=e.useAPIClient(),{mode:k,url:g,params:T,htmlId:B,height:M="60vh",engine:y}=a["x-component-props"]||{},F=l=>H(this,null,function*(){var u,I,c,m,A;const d={values:{html:l}};if(B){const{data:p}=yield(I=(u=f.resource("iframeHtml")).update)==null?void 0:I.call(u,N(w({},d),{filterByTk:B}));return((c=p==null?void 0:p.data)==null?void 0:c[0])||{id:B}}else{const{data:p}=yield(A=(m=f.resource("iframeHtml")).create)==null?void 0:A.call(m,d);return p==null?void 0:p.data}}),{urlSchema:C,paramsSchema:P}=e.useURLAndHTMLSchema(),x=A=>H(this,[A],function*({mode:l,url:d,html:u,height:I,params:c,engine:m}){const p=a["x-component-props"]||{};if(p.mode=l,p.height=I,p.engine=m||"string",p.params=c,p.url=d,l==="html"){const E=yield F(u);p.htmlId=E.id}a["x-component-props"]=p,o.componentProps=w({},p),o.data={v:j.uid()},s.emit("patch",{schema:{"x-uid":a["x-uid"],"x-component-props":p}})}),b=n.jsxs(n.Fragment,{children:[n.jsxs("span",{style:{marginLeft:".25em"},className:"ant-formily-item-extra",children:[t("Syntax references"),":"]})," ",n.jsx("a",{href:`https://${i.language==="zh-CN"?"docs-cn":"docs"}.nocobase.com/handbook/template-handlebars`,target:"_blank",rel:"noreferrer",children:"Handlebars.js"})]});return{title:t("Edit iframe"),asyncGetInitialValues:()=>H(this,null,function*(){var d,u,I;const l={mode:k,url:g,height:M,engine:y,params:T};if(B){const{data:c}=yield(u=(d=f.resource("iframeHtml")).get)==null?void 0:u.call(d,{filterByTk:B});l.html=((I=c==null?void 0:c.data)==null?void 0:I.html)||""}return l}),schema:{type:"object",title:t("Edit iframe"),properties:{mode:{title:'{{t("Mode")}}',"x-component":"Radio.Group","x-decorator":"FormItem",required:!0,default:"url",enum:[{value:"url",label:t("URL")},{value:"html",label:t("HTML")}]},url:N(w({},C),{required:!0}),params:P,engine:{title:'{{t("Template engine")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"string",enum:[{value:"string",label:t("String template")},{value:"handlebars",label:t("Handlebars")}],"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}},html:{title:t("html"),type:"string","x-decorator":"FormItem","x-component":ce(e.Variable.RawTextArea),"x-component-props":{rows:10},required:!0,description:b,"x-reactions":[{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}},l=>{const{engine:d}=l.form.values;d==="handlebars"?l.description=b:l.description=null}]}}},onSubmit:x,noRecord:!0}}},{name:"setTheBlockHeight",Component:e.SchemaSettingsBlockHeightItem},{name:"divider",type:"divider"},{name:"delete",type:"remove",useComponentProps(){return{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}}]},me=new e.SchemaSettings(w({name:"iframeBlockSchemaSettings"},_)),de=new e.SchemaSettings(w({name:"blockSettings:iframe"},_));class W extends e.Plugin{load(){return H(this,null,function*(){this.app.schemaSettingsManager.add(me),this.app.schemaSettingsManager.add(de),this.app.use(le);const a=this.app.schemaInitializerManager.get("page:addBlock");a==null||a.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"});const t=this.app.schemaInitializerManager.get("popup:addNew:addBlock");t==null||t.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"});const i=this.app.schemaInitializerManager.get("popup:common:addBlock");i==null||i.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"});const s=this.app.schemaInitializerManager.get("RecordFormBlockInitializers");s==null||s.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),this.app.schemaInitializerManager.addItem("mobilePage:addBlock","otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),this.app.schemaInitializerManager.addItem("mobile:addBlock","otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"})})}}r.PluginBlockIframeClient=W,r.default=W,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("react"),require("@formily/antd-v5"),require("@formily/shared"),require("@nocobase/client"),require("antd"),require("@ant-design/icons"),require("@formily/react")):"function"==typeof define&&define.amd?define("@nocobase/plugin-block-iframe",["react-i18next","react","@formily/antd-v5","@formily/shared","@nocobase/client","antd","@ant-design/icons","@formily/react"],t):"object"==typeof exports?exports["@nocobase/plugin-block-iframe"]=t(require("react-i18next"),require("react"),require("@formily/antd-v5"),require("@formily/shared"),require("@nocobase/client"),require("antd"),require("@ant-design/icons"),require("@formily/react")):e["@nocobase/plugin-block-iframe"]=t(e["react-i18next"],e.react,e["@formily/antd-v5"],e["@formily/shared"],e["@nocobase/client"],e.antd,e["@ant-design/icons"],e["@formily/react"])}(self,function(e,t,r,n,o,a,i,l){return function(){"use strict";var c={753:function(e){var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var o={};if("abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},o)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,o){for(var a,i,l=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]),a)r.call(a,u)&&(l[u]=a[u]);if(t){i=t(a);for(var s=0;s<i.length;s++)n.call(a,i[s])&&(l[i[s]]=a[i[s]])}}return l}:Object.assign},482:function(e){e.exports=i},632:function(e){e.exports=r},505:function(e){e.exports=l},875:function(e){e.exports=n},772:function(e){e.exports=o},721:function(e){e.exports=a},156:function(e){e.exports=t},238:function(t){t.exports=e}},u={};function s(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return c[e](r,r.exports,s),r.exports}s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var f={};s.r(f),s.d(f,{default:function(){return W},PluginBlockIframeClient:function(){return Q}});var p=s("772"),m=s("156"),d=s.n(m),b=s("632"),h=s("505"),y=s("721"),v=s("238"),g=s("753"),O=s.n(g),w=({url:e,allowFullScreen:t,position:r,display:n,height:o,width:a,overflow:i,styles:l,onLoad:c,onMouseOver:u,onMouseOut:s,scrolling:f,id:p,frameBorder:m,ariaHidden:b,sandbox:h,allow:y,className:v,title:g,ariaLabel:w,ariaLabelledby:x,name:j,target:S,loading:P,importance:k,referrerpolicy:I,allowpaymentrequest:E,src:B,key:R})=>{let q=O()({src:B||e,target:S||null,style:{position:r||null,display:n||"initial",overflow:i||null},scrolling:f||null,allowpaymentrequest:E||null,importance:k||null,sandbox:h&&[...h].join(" ")||null,loading:P||null,styles:l||null,name:j||null,className:v||null,allowFullScreen:"allowFullScreen",referrerpolicy:I||null,title:g||null,allow:y||null,id:p||null,"aria-labelledby":x||null,"aria-hidden":b||null,"aria-label":w||null,width:a||null,height:o||null,onLoad:c||null,onMouseOver:u||null,onMouseOut:s||null,key:R||"iframe"}),C=Object.create(null);for(let e of Object.keys(q))null!=q[e]&&(C[e]=q[e]);for(let e of Object.keys(C.style))null==C.style[e]&&delete C.style[e];if(C.styles)for(let e of Object.keys(C.styles))C.styles.hasOwnProperty(e)&&(C.style[e]=C.styles[e]),Object.keys(C.styles).pop()==e&&delete C.styles;if(t){if("allow"in C){let e=C.allow.replace("fullscreen","");C.allow=`fullscreen ${e.trim()}`.trim()}else C.allow="fullscreen"}return m>=0&&!C.style.hasOwnProperty("border")&&(C.style.border=m),d().createElement("iframe",Object.assign({},C))},x=s("875");function j(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){j(a,n,o,i,l,"next",e)}function l(e){j(a,n,o,i,l,"throw",e)}i(void 0)})}}function P(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}function k(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,l])}}}function I(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 E(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function B(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}var R=(0,h.observer)(function(e){var t,r,n=e.url,o=e.htmlId,a=e.mode,i=void 0===a?"url":a,l=e.height,c=(e.html,e.params),u=e.engine,s=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++){if(r=a[n],!(t.indexOf(r)>=0))Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}}return o}(e,["url","htmlId","mode","height","html","params","engine"]),f=(0,h.useField)(),b=(0,v.useTranslation)().t,g=(0,p.useBlockHeight)()||l,O=(0,p.useVariables)(),x=(0,p.useLocalVariables)(),j=(0,p.useCompile)(),S=(0,p.useRequest)({url:"iframeHtml:getHtml/".concat(o)},{refreshDeps:[o,f.data],ready:"html"===i&&!!o}),P=S.loading,k=S.data,R=(0,p.useParseURLAndParams)().parseURLAndParams;var q=(t=(0,m.useState)(null),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,l=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){l=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(l)throw n}}return a}}(t,2)||function(e,t){if(e){if("string"==typeof e)return I(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 I(e,t)}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=q[0],T=q[1];return((0,m.useEffect)(function(){var e,t;(t=(e=function(){var e;return function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,l])}}}(this,function(t){switch(t.label){case 0:if("html"!==i)return[3,2];return[4,(0,p.getRenderContent)(u,k,j(O),j(x),function(e){return e})];case 1:if(void 0===(e=t.sent()))return[2];return T("data:text/html;charset=utf-8,"+encodeURIComponent(e)),[3,5];case 2:return t.trys.push([2,4,,5]),[4,R(n,c||[])];case 3:return T(t.sent()),[3,5];case 4:return console.error("Error fetching target URL:",t.sent()),T("fallback-url"),[3,5];case 5:return[2]}})},function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){E(a,n,o,i,l,"next",e)}function l(e){E(a,n,o,i,l,"throw",e)}i(void 0)})}),function(){return t.apply(this,arguments)})()},[k,i,n,O,x,c]),("url"!==i||n)&&("html"!==i||o))?P&&!C?d().createElement("div",{style:{height:B(g)?"".concat(g,"px"):g||"60vh",marginBottom:"24px",border:0}},d().createElement(y.Spin,null)):d().createElement(w,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}({url:C,width:"100%",display:"block",position:"relative",styles:{height:B(g)?"".concat(g,"px"):g||"60vh",marginBottom:"24px",border:0}},s)):d().createElement(y.Card,{style:{marginBottom:24,height:B(g)?"".concat(g,"px"):g}},b("Please fill in the iframe URL"))},{displayName:"Iframe"});R.Designer=function(){var e,t,r=(0,h.useField)(),n=(0,h.useFieldSchema)(),o=(0,v.useTranslation)().t,a=(0,p.useDesignable)().dn,i=(0,p.useAPIClient)(),l=n["x-component-props"]||{},c=l.mode,u=l.url,s=l.htmlId,f=l.height,m=void 0===f?"60vh":f;l.engine;var b=(e=S(function(e){var t,r,n,o,a,l,c,u;return k(this,function(f){switch(f.label){case 0:var p,m;if(t={values:{html:e}},!s)return[3,2];return[4,null===(r=(n=i.resource("iframeHtml")).update)||void 0===r?void 0:r.call(n,(p=P({},t),m=(m={filterByTk:s},m),Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(m)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(m)).forEach(function(e){Object.defineProperty(p,e,Object.getOwnPropertyDescriptor(m,e))}),p))];case 1:return[2,(null==(a=f.sent().data)?void 0:null===(o=a.data)||void 0===o?void 0:o[0])||{id:s}];case 2:return[4,null===(l=(c=i.resource("iframeHtml")).create)||void 0===l?void 0:l.call(c,t)];case 3:return[2,null==(u=f.sent().data)?void 0:u.data];case 4:return[2]}})}),function(t){return e.apply(this,arguments)});var y=(t=S(function(e){var t,o,i,l,c,u,s;return k(this,function(f){switch(f.label){case 0:if(t=e.mode,o=e.url,i=e.html,l=e.height,c=e.engine,(u=n["x-component-props"]||{}).mode=t,u.height=l,u.url=o,u.engine=c||"string","html"!==t)return[3,2];return[4,b(i)];case 1:s=f.sent(),u.htmlId=s.id,f.label=2;case 2:return n["x-component-props"]=u,r.componentProps=P({},u),r.data={v:(0,x.uid)()},a.emit("patch",{schema:{"x-uid":n["x-uid"],"x-component-props":u}}),[2]}})}),function(e){return t.apply(this,arguments)}),g=(0,p.useFormBlockContext)().form,O=(0,p.useRecord)(),w=(0,p.useVariableOptions)({collectionField:{uiSchema:n},form:g,record:O,uiSchema:n,noDisabled:!0});return d().createElement(p.GeneralSchemaDesigner,null,d().createElement(p.SchemaSettingsModalItem,{title:o("Edit iframe"),asyncGetInitialValues:S(function(){var e,t,r,n,o;return k(this,function(a){switch(a.label){case 0:if(e={mode:c,url:u,height:m},!s)return[3,2];return[4,null===(t=(r=i.resource("iframeHtml")).get)||void 0===t?void 0:t.call(r,{filterByTk:s})];case 1:o=a.sent().data,e.html=(null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.html)||"",a.label=2;case 2:return[2,e]}})}),schema:{type:"object",title:o("Edit iframe"),properties:{mode:{title:'{{t("Mode")}}',"x-component":"Radio.Group","x-decorator":"FormItem",required:!0,default:"url",enum:[{value:"url",label:o("URL")},{value:"html",label:o("HTML")}]},url:{title:o("URL"),type:"string","x-decorator":"FormItem","x-component":"Variable.TextArea","x-component-props":{scope:w},required:!0,"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "html"}}'}}}},engine:{title:'{{t("Template engine")}}',"x-component":"Radio.Group","x-decorator":"FormItem",enum:[{value:"string",label:o("String template")},{value:"handlebars",label:o("Handlebars")}],"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}},html:{title:o("html"),type:"string","x-decorator":"FormItem","x-component":"Variable.RawTextArea","x-component-props":{scope:w,style:{minHeight:"200px"}},required:!0,"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}},height:{title:o("Height"),type:"string","x-decorator":"FormItem","x-component":"Input",required:!0}}},onSubmit:y}),d().createElement(p.SchemaSettingsDivider,null),d().createElement(p.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}))};var q=s("482"),C=function(){var e,t,r=(0,p.useSchemaInitializer)().insert,n=(0,p.useSchemaInitializerItem)();return d().createElement(p.SchemaInitializerItem,(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}({},n),t=(t={icon:d().createElement(q.PicRightOutlined,null),onClick:function(){r({type:"void","x-settings":"blockSettings:iframe","x-decorator":"BlockItem","x-decorator-props":{name:"iframe"},"x-component":"Iframe","x-component-props":{}})}},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))},T=function(e){return d().createElement(p.SchemaComponentOptions,{components:{Iframe:R,IframeBlockInitializer:C,ArrayItems:b.ArrayItems}},e.children)};function F(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function M(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){F(a,n,o,i,l,"next",e)}function l(e){F(a,n,o,i,l,"throw",e)}i(void 0)})}}function D(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}function H(e,t){return t=null!=t?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}function z(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,l])}}}var A={items:[{name:"EditIframe",type:"modal",useComponentProps:function(){var e,t,r,n=(0,h.useField)(),o=(0,h.useFieldSchema)(),a=(0,v.useTranslation)(),i=a.t,l=a.i18n,c=(0,p.useDesignable)().dn,u=(0,p.useAPIClient)(),s=o["x-component-props"]||{},f=s.mode,m=s.url,b=s.params,y=s.htmlId,g=s.height,O=void 0===g?"60vh":g,w=s.engine;var j=(e=M(function(e){var t,r,n,o,a,i,l,c;return z(this,function(s){switch(s.label){case 0:if(t={values:{html:e}},!y)return[3,2];return[4,null===(r=(n=u.resource("iframeHtml")).update)||void 0===r?void 0:r.call(n,H(D({},t),{filterByTk:y}))];case 1:return[2,(null==(a=s.sent().data)?void 0:null===(o=a.data)||void 0===o?void 0:o[0])||{id:y}];case 2:return[4,null===(i=(l=u.resource("iframeHtml")).create)||void 0===i?void 0:i.call(l,t)];case 3:return[2,null==(c=s.sent().data)?void 0:c.data];case 4:return[2]}})}),function(t){return e.apply(this,arguments)}),S=(0,p.useURLAndHTMLSchema)(),P=S.urlSchema,k=S.paramsSchema;var I=(t=M(function(e){var t,r,a,i,l,u,s,f;return z(this,function(p){switch(p.label){case 0:if(t=e.mode,r=e.url,a=e.html,i=e.height,l=e.params,u=e.engine,(s=o["x-component-props"]||{}).mode=t,s.height=i,s.engine=u||"string",s.params=l,s.url=r,"html"!==t)return[3,2];return[4,j(a)];case 1:f=p.sent(),s.htmlId=f.id,p.label=2;case 2:return o["x-component-props"]=s,n.componentProps=D({},s),n.data={v:(0,x.uid)()},c.emit("patch",{schema:{"x-uid":o["x-uid"],"x-component-props":s}}),[2]}})}),function(e){return t.apply(this,arguments)}),E=d().createElement(d().Fragment,null,d().createElement("span",{style:{marginLeft:".25em"},className:"ant-formily-item-extra"},i("Syntax references"),":")," ",d().createElement("a",{href:"https://".concat("zh-CN"===l.language?"docs-cn":"docs",".nocobase.com/handbook/template-handlebars"),target:"_blank",rel:"noreferrer"},"Handlebars.js"));return{title:i("Edit iframe"),asyncGetInitialValues:M(function(){var e,t,r,n,o;return z(this,function(a){switch(a.label){case 0:if(e={mode:f,url:m,height:O,engine:w,params:b},!y)return[3,2];return[4,null===(t=(r=u.resource("iframeHtml")).get)||void 0===t?void 0:t.call(r,{filterByTk:y})];case 1:o=a.sent().data,e.html=(null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.html)||"",a.label=2;case 2:return[2,e]}})}),schema:{type:"object",title:i("Edit iframe"),properties:{mode:{title:'{{t("Mode")}}',"x-component":"Radio.Group","x-decorator":"FormItem",required:!0,default:"url",enum:[{value:"url",label:i("URL")},{value:"html",label:i("HTML")}]},url:H(D({},P),{required:!0}),params:k,engine:{title:'{{t("Template engine")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"string",enum:[{value:"string",label:i("String template")},{value:"handlebars",label:i("Handlebars")}],"x-reactions":{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}}},html:{title:i("html"),type:"string","x-decorator":"FormItem","x-component":(r=p.Variable.RawTextArea,function(e){var t=(0,h.useFieldSchema)(),n=(0,p.useFormBlockContext)().form,o=(0,p.useRecord)(),a=(0,p.useVariableOptions)({collectionField:{uiSchema:t},form:n,record:o,uiSchema:t,noDisabled:!0});return d().createElement(r,H(D({},e),{scope:a}))}),"x-component-props":{rows:10},required:!0,description:E,"x-reactions":[{dependencies:["mode"],fulfill:{state:{hidden:'{{$deps[0] === "url"}}'}}},function(e){"handlebars"===e.form.values.engine?e.description=E:e.description=null}]}}},onSubmit:I,noRecord:!0}}},{name:"setTheBlockHeight",Component:p.SchemaSettingsBlockHeightItem},{name:"divider",type:"divider"},{name:"delete",type:"remove",useComponentProps:function(){return{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}}]},L=new p.SchemaSettings(D({name:"iframeBlockSchemaSettings"},A)),_=new p.SchemaSettings(D({name:"blockSettings:iframe"},A));function G(e,t,r,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){r(e);return}l.done?t(c):Promise.resolve(c).then(n,o)}function N(e,t,r){return(N=K()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&$(o,r.prototype),o}).apply(null,arguments)}function U(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 V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){var t="function"==typeof Map?new Map:void 0;return(J=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 N(e,arguments,V(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),$(n,e)})(e)}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}var Q=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=V(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,K()?Reflect.construct(t,r||[],V(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&&$(e,t)}(o,e),t=o,r=[{key:"load",value:function(){var e,t=this;return(e=function(){var e,r,n,o;return function(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(a){return function(l){return function(a){if(r)throw TypeError("Generator is already executing.");for(;i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,l])}}}(this,function(a){return t.app.schemaSettingsManager.add(L),t.app.schemaSettingsManager.add(_),t.app.use(T),null==(e=t.app.schemaInitializerManager.get("page:addBlock"))||e.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),null==(r=t.app.schemaInitializerManager.get("popup:addNew:addBlock"))||r.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),null==(n=t.app.schemaInitializerManager.get("popup:common:addBlock"))||n.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),null==(o=t.app.schemaInitializerManager.get("RecordFormBlockInitializers"))||o.add("otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),t.app.schemaInitializerManager.addItem("mobilePage:addBlock","otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),t.app.schemaInitializerManager.addItem("mobile:addBlock","otherBlocks.iframe",{title:'{{t("Iframe")}}',Component:"IframeBlockInitializer"}),[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){G(a,n,o,i,l,"next",e)}function l(e){G(a,n,o,i,l,"throw",e)}i(void 0)})})()}}],U(t.prototype,r),o}(J(p.Plugin)),W=Q;return f}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@formily/react": "2.3.0",
|
|
12
12
|
"@formily/shared": "2.3.2",
|
|
13
|
-
"@nocobase/client": "1.5.0-beta.
|
|
13
|
+
"@nocobase/client": "1.5.0-beta.5",
|
|
14
14
|
"react": "18.2.0",
|
|
15
15
|
"react-i18next": "11.18.6",
|
|
16
16
|
"antd": "5.12.8",
|
|
17
17
|
"@ant-design/icons": "5.2.6",
|
|
18
18
|
"@formily/antd-v5": "1.1.9",
|
|
19
|
-
"@nocobase/server": "1.5.0-beta.
|
|
20
|
-
"@nocobase/test": "1.5.0-beta.
|
|
21
|
-
"@nocobase/actions": "1.5.0-beta.
|
|
22
|
-
"@nocobase/database": "1.5.0-beta.
|
|
19
|
+
"@nocobase/server": "1.5.0-beta.5",
|
|
20
|
+
"@nocobase/test": "1.5.0-beta.5",
|
|
21
|
+
"@nocobase/actions": "1.5.0-beta.5",
|
|
22
|
+
"@nocobase/database": "1.5.0-beta.5"
|
|
23
23
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "区块:iframe",
|
|
5
5
|
"description": "Create an iframe block on the page to embed and display external web pages or content.",
|
|
6
6
|
"description.zh-CN": "在页面上创建和管理iframe,用于嵌入和展示外部网页或内容。",
|
|
7
|
-
"version": "1.5.0-beta.
|
|
7
|
+
"version": "1.5.0-beta.5",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/block-iframe",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@nocobase/server": "1.x",
|
|
26
26
|
"@nocobase/test": "1.x"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "426cd181b72dd3a62632603ddb313706172b064b",
|
|
29
29
|
"keywords": [
|
|
30
30
|
"Blocks"
|
|
31
31
|
]
|