super-page-runtime 2.3.34-cdnTmp1 → 2.3.34-cdnTmp2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as P, ref as p, onMounted as v, nextTick as b, createElementBlock as k, openBlock as x, normalizeStyle as C, normalizeClass as S, unref as u } from "vue";
|
|
2
2
|
import { handleAfterInitEvent as I } from "../../../../utils/events/event-util.mjs";
|
|
3
|
-
import { getSystemFrontendUrl as A } from "agilebuilder-ui
|
|
3
|
+
import { getSystemFrontendUrl as A } from "agilebuilder-ui";
|
|
4
4
|
const B = ["src"], E = P({ __name: "iframe-runtime", props: { pageContext: {}, configure: {}, indexObj: {}, selectWidget: {} }, setup(m, { expose: d }) {
|
|
5
5
|
const a = m, s = p(null), t = a.configure.runtime ? a.configure.runtime : {}, y = t.style, w = t.class, l = p();
|
|
6
6
|
t.linkType === "address" ? l.value = t.src : t.linkType === "page" && c(t.linkPage.code, t.linkPage.systemCode);
|
package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),h=require("../../../../utils/events/event-util.cjs"),P=require("agilebuilder-ui
|
|
1
|
+
"use strict";const e=require("vue"),h=require("../../../../utils/events/event-util.cjs"),P=require("agilebuilder-ui"),k=["src"],v=e.defineComponent({__name:"iframe-runtime",props:{pageContext:{},configure:{},indexObj:{},selectWidget:{}},setup(p,{expose:d}){const a=p,s=e.ref(null),n=a.configure.runtime?a.configure.runtime:{},m=n.style,y=n.class,c=e.ref();n.linkType==="address"?c.value=n.src:n.linkType==="page"&&f(n.linkPage.code,n.linkPage.systemCode);function f(t,o){u(t).then(r=>{if(o&&typeof o=="object"&&Object.keys(o).length>0){r.indexOf("?")===-1&&(r+="?");const l=t+"_"+Date.now();window.sessionStorage.setItem(l,JSON.stringify(o)),r+="¶mStoreId="+l}g(r)})}function u(t){return new Promise((o,r)=>{const l=window.$vueApp.config.globalProperties.baseAPI+"/component/business-systems/with-page-codes/"+t+"?isNewPage=true";window.$vueApp.config.globalProperties.$http.get(l).then(i=>{if(i){let w=P.getSystemFrontendUrl(i.frontendUrl)+"/#/dsc-full-screen/page?isNewPage=true&customSystem="+i.code+"&pageCode="+t;o(w)}else r(new Error("System not found"))}).catch(i=>{console.error("Failed to load page for iframe:",i),r(i)})})}function g(t){c.value=t}return e.onMounted(()=>{e.nextTick(()=>{h.handleAfterInitEvent(null,a.pageContext,a.configure,{componentRef:s.value,entity:a.pageContext.entity.data,pageData:a.pageContext.entity.page})})}),d({changeIframeSrc:g,changeIframeSrcByPage:f,getPagePathByCode:u,refreshIframe:function(){s.value&&s.value.contentWindow.location.reload()}}),(t,o)=>(e.openBlock(),e.createElementBlock("iframe",{ref_key:"thisRef",ref:s,src:c.value,class:e.normalizeClass(["amb-widget-container-iframe",e.unref(y)]),style:e.normalizeStyle(e.unref(m))},null,14,k))}});module.exports=v;
|