profoundjs 7.5.0 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +27 -25
- package/htdocs/jszip/FileSaver.min.js +2 -2
- package/htdocs/profoundui/proddata/css/atrium.css +201 -201
- package/htdocs/profoundui/proddata/css/designer_respeditor.css +91 -91
- package/htdocs/profoundui/proddata/css/ipademulator.css +38 -38
- package/htdocs/profoundui/proddata/css/iphoneemulator.css +29 -29
- package/htdocs/profoundui/proddata/css/jumpstart.css +442 -442
- package/htdocs/profoundui/proddata/css/key_management.css +122 -122
- package/htdocs/profoundui/proddata/css/logic.css +1669 -1669
- package/htdocs/profoundui/proddata/css/markdown.css +754 -754
- package/htdocs/profoundui/proddata/css/profoundai.css +42 -0
- package/htdocs/profoundui/proddata/css/puisplash.css +186 -186
- package/htdocs/profoundui/proddata/css/qtips.css +32 -32
- package/htdocs/profoundui/proddata/html/genieframe.html +25 -25
- package/htdocs/profoundui/proddata/js/designer.js +3794 -3782
- package/htdocs/profoundui/proddata/js/key_management.js +34 -34
- package/htdocs/profoundui/proddata/js/profoundai.js +26 -0
- package/htdocs/profoundui/proddata/js/rich-display-react-component.js +45 -45
- package/htdocs/profoundui/proddata/js/rich-display-vue-component.js +28 -28
- package/htdocs/profoundui/proddata/js/runtime.js +1404 -1401
- package/htdocs/profoundui/proddata/js/soapclient.js +419 -419
- package/htdocs/profoundui/proddata/typings/profoundjs.d.ts +881 -881
- package/htdocs/profoundui/proddata/typings/profoundui.d.ts +388 -388
- package/htdocs/profoundui/userdata/atrium themes/css/xtheme-gray.css +414 -414
- package/htdocs/profoundui/userdata/atrium themes/css/xtheme-olive.css +623 -623
- package/htdocs/profoundui/userdata/atrium themes/css/xtheme-slate.css +672 -672
- package/htdocs/profoundui/userdata/atrium themes/css/xtheme-steel.css +10437 -10437
- package/htdocs/profoundui/userdata/css/atrium_banner.css +13 -13
- package/htdocs/profoundui/userdata/css/atrium_home.css +37 -37
- package/htdocs/profoundui/userdata/custom/themes/enhanced.js +104 -104
- package/htdocs/profoundui/userdata/custom/themes/hybrid.js +109 -109
- package/htdocs/profoundui/userdata/custom/themes/standard.js +68 -68
- package/htdocs/profoundui/userdata/custom/widgets/googlemaps.js +139 -139
- package/htdocs/profoundui/userdata/custom/widgets/listbox.js +37 -37
- package/htdocs/profoundui/userdata/custom/widgets/panel.js +74 -74
- package/htdocs/profoundui/userdata/custom/widgets/styled_button.js +71 -71
- package/htdocs/profoundui/userdata/custom/widgets/tabpanel.js +61 -61
- package/htdocs/profoundui/userdata/genie skins/Classic/Classic.css +562 -562
- package/htdocs/profoundui/userdata/genie skins/Classic/custom.js +3 -3
- package/htdocs/profoundui/userdata/genie skins/Gradient/Gradient.css +616 -616
- package/htdocs/profoundui/userdata/genie skins/Gradient/adjusted columns custom.js +83 -83
- package/htdocs/profoundui/userdata/genie skins/Gradient/custom.js +83 -83
- package/htdocs/profoundui/userdata/genie skins/Hybrid/Hybrid.css +616 -616
- package/htdocs/profoundui/userdata/genie skins/Hybrid/custom.js +330 -330
- package/htdocs/profoundui/userdata/genie skins/Plain/Plain.css +546 -546
- package/htdocs/profoundui/userdata/genie skins/Plain/custom.js +6 -6
- package/htdocs/profoundui/userdata/genie skins/Skyline/Skyline.css +753 -753
- package/htdocs/profoundui/userdata/genie skins/Skyline/adjusted columns custom.js +97 -97
- package/htdocs/profoundui/userdata/genie skins/Skyline/custom.js +97 -97
- package/htdocs/profoundui/userdata/genie skins/Tablet/Tablet.css +743 -743
- package/htdocs/profoundui/userdata/genie skins/Tablet/custom.js +153 -153
- package/htdocs/profoundui/userdata/samples/ordentry/OrdEntry.js +92 -92
- package/package.json +2 -2
- package/profound.jse +1 -1
- package/setup/pjsdist.savf +0 -0
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
|
|
4
|
-
This file is not updated by the BUILD program.
|
|
5
|
-
To deploy changes, manually copy to /puidev/dist/profoundui/proddata/js
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
|
|
4
|
+
This file is not updated by the BUILD program.
|
|
5
|
+
To deploy changes, manually copy to /puidev/dist/profoundui/proddata/js
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
9
|
function init() {
|
|
10
10
|
if (LOADMSG != "") {
|
|
11
|
-
// For IE8 running in compatability view or IE7 mode,
|
|
12
|
-
// the main background image disappears when alert is run
|
|
13
|
-
// directly onload.
|
|
14
|
-
|
|
15
|
-
setTimeout(function() {
|
|
16
|
-
alert(LOADMSG);
|
|
17
|
-
if (REDIRECT) {
|
|
18
|
-
location.href = "/profoundui/welcome";
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
document.keyForm.key.focus();
|
|
22
|
-
}
|
|
11
|
+
// For IE8 running in compatability view or IE7 mode,
|
|
12
|
+
// the main background image disappears when alert is run
|
|
13
|
+
// directly onload.
|
|
14
|
+
|
|
15
|
+
setTimeout(function() {
|
|
16
|
+
alert(LOADMSG);
|
|
17
|
+
if (REDIRECT) {
|
|
18
|
+
location.href = "/profoundui/welcome";
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
document.keyForm.key.focus();
|
|
22
|
+
}
|
|
23
23
|
}, 1);
|
|
24
24
|
}
|
|
25
|
-
}
|
|
26
|
-
|
|
25
|
+
}
|
|
26
|
+
|
|
27
27
|
function requestKey() {
|
|
28
|
-
var url = "https://www.profoundlogic.com/activation?";
|
|
29
|
-
|
|
30
|
-
url += "prod=profoundui" +
|
|
31
|
-
"&sysname=" + encodeURIComponent(SYSNAME) +
|
|
32
|
-
"&serial=" + encodeURIComponent(SERIAL) +
|
|
33
|
-
"&pgroup=" + encodeURIComponent(PGROUP) +
|
|
34
|
-
"&osrelease=" + encodeURIComponent(OSRELEASE) +
|
|
35
|
-
"&model=" + encodeURIComponent(MODEL);
|
|
36
|
-
if (KEY != "") {
|
|
37
|
-
url += "&key=" + encodeURIComponent(KEY);
|
|
38
|
-
}
|
|
39
|
-
|
|
28
|
+
var url = "https://www.profoundlogic.com/activation?";
|
|
29
|
+
|
|
30
|
+
url += "prod=profoundui" +
|
|
31
|
+
"&sysname=" + encodeURIComponent(SYSNAME) +
|
|
32
|
+
"&serial=" + encodeURIComponent(SERIAL) +
|
|
33
|
+
"&pgroup=" + encodeURIComponent(PGROUP) +
|
|
34
|
+
"&osrelease=" + encodeURIComponent(OSRELEASE) +
|
|
35
|
+
"&model=" + encodeURIComponent(MODEL);
|
|
36
|
+
if (KEY != "") {
|
|
37
|
+
url += "&key=" + encodeURIComponent(KEY);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
40
|
window.open(url, "_blank");
|
|
41
41
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
if(!window.profound)window.profound={};window.profound.ai||(window.profound.ai={});
|
|
2
|
+
profound.ai.Chat=function(){function g(){if(window.pui&&window.pui.ide&&window.pui.ide.designerId)return true;return false}function o(){var a=Ext.e("centerPanel").d(),f={};if(a.isAIAgent&&a.aiAgent)f.aiAgent=a.aiAgent;if(a.isAIAgent&&a.dataAccess)f.dataAccess=a.dataAccess;Object.assign(f,Object.fromEntries(Object.entries(a.pjsModule).filter(function(c){return typeof c[1]!=="function"})));return f}function l(){function a(){var c=j.lastChild.querySelectorAll(".pai-chart");if(c.length!==0)if(profound.ai.a){for(var d=
|
|
3
|
+
0;d<c.length;d++){var e=c[d],n=JSON.parse(e.getAttribute("data-config"));e.removeAttribute("data-config");e.chart=new window.Chart(e.querySelector("canvas"),n);e=e.querySelector("span");e.parentNode.removeChild(e)}j.scrollTop=j.scrollHeight}else{f++;f<20&&setTimeout(a,1E3)}}var f=0;a()}function m(a){function f(){a.h().then(function(n){var h=n.value;if(n.done){b.hideLoader();l()}else{n=c.g(h).split("\n");for(h=0;h<n.length-1;h++){var i=n[h];if(i){i=JSON.parse(i);if(i.f)s=i.f;if(i.status==="error"){b.hideLoader();
|
|
4
|
+
b.add({message:"Error: "+i.message,type:"error"});return}if(i.status==="calling"){var w=j.lastChild;i=w.innerHTML.replace(t,"")+'<p>Calling <span class="pai-function-name">'+i["function"]+"</span>.</p>";b.add({message:i+t,type:"agent-response",replace:true})}else if(i.status==="calls completed"){w=j.lastChild;var y="<p>";y+=i.count===1?"Call completed.":i.count+" calls completed.";y+="</p>";y=w.innerHTML.replace(t,"")+y;b.add({message:y+t,type:"agent-response",replace:true})}else{d+=i.text;if(i.charts){if(!profound.ai.a){var M=
|
|
5
|
+
window.define;window.define=undefined;profound.ai.b(H,function(){window.define=M;profound.ai.a=true})}e=i.charts}if(e)for(var I in e)d=d.replace(I,'<div class="pai-chart" data-config="'+JSON.stringify(e[I]).replace(/"/g,""")+'"><span>Loading chart...</span><canvas></canvas></div>');i=d&&typeof window.marked==="function"?window.marked(d+t):d+t;b.add({message:i,type:"agent-response",replace:true})}}}f()}})}var c=new TextDecoder("utf-8"),d="",e;f()}function x(a){var f=a.status;if(a.threadId)s=a.threadId;
|
|
6
|
+
if(a.runId)C=a.runId;if(a.modelKey)F=a.modelKey;if(a.message){var c=a.message,d="agent-response";if(a.status==="error"){c="Error: "+c;d="error"}if(a.status==="failed"){c="Failed: "+c;d="error"}if(a.status==="cancelled"){c="Cancelled";d="error"}if(a.status==="expired"){c="Chat Expired";d="error"}if(a.charts){if(!profound.ai.a){var e=window.define;window.define=undefined;profound.ai.b(H,function(){window.define=e;profound.ai.a=true})}var n=a.charts;for(var h in n)c=c.replace(h,'<div class="pai-chart" data-config="'+
|
|
7
|
+
JSON.stringify(n[h]).replace(/"/g,""")+'"><span>Loading chart...</span><canvas></canvas></div>')}b.add({message:c,type:d});a.charts&&l()}f==="queued"||f==="in_progress"?setTimeout(function(){b.poll()},J):b.hideLoader()}function D(){k.value===""||b.isLoading()?p.classList.remove("pai-send-button-active"):p.classList.add("pai-send-button-active")}function K(){k.style.height="1px";var a=k.scrollHeight;if(a>100)a=100;j.style.height="calc(100% - "+(a+54)+"px)";k.style.height=a+"px"}function N(a,f){if(typeof a!==
|
|
8
|
+
"string")return a;if(a.length!==7)return a;if(a.substring(0,1)!=="#")return a;var c=parseInt(a.substring(1,3),16),d=parseInt(a.substring(3,5),16),e=parseInt(a.substring(5,7),16);c=parseInt(c*(100+f)/100);d=parseInt(d*(100+f)/100);e=parseInt(e*(100+f)/100);c=c<255?c:255;d=d<255?d:255;e=e<255?e:255;return"#"+(c.toString(16).length==1?"0"+c.toString(16):c.toString(16))+(d.toString(16).length==1?"0"+d.toString(16):d.toString(16))+(e.toString(16).length==1?"0"+e.toString(16):e.toString(16))}var b=this,
|
|
9
|
+
q=null,j=null,z=null,k=null,p=null,s=null,C=null,F=null,J=1E3,u=null,E=null,L="Thinking",A="",B="light",v=null,r=false,t='<span class="pai-loader-dot pai-inline-loader"></span>',H="https://cdn.jsdelivr.net/npm/chart.js@4/dist/chart.umd.min.js",G=null;this.init=function(a){a||(a={});if(!a.container)a.container=document.body;a.closeButton||(a.closeButton=true);a.closeTitle||(a.closeTitle="Close this conversation");a.sendTitle||(a.sendTitle="Send this message");a.promptPlaceHolder||(a.promptPlaceHolder=
|
|
10
|
+
"Send a message...");if(a.heading)b.heading=a.heading;if(a.greeting)b.greeting=a.greeting;if(a.agent)b.agent=a.agent;if(a.pollInterval)J=a.pollInterval;if(a.loaderMessage)L=a.defaultLoaderMessage;if(a.server)A=a.server;if(a.data)b.data=a.data;if(a.stream)r=a.stream;if(a.jwt)G=a.jwt;b.dom=document.createElement("div");b.dom.classList.add("pai-chat");b.dom.classList.add("pai-hidden");a.container.appendChild(b.dom);if(a.closeButton){q=document.createElement("div");q.classList.add("pai-close-button");
|
|
11
|
+
q.title=a.closeTitle;q.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>';q.addEventListener("click",function(){b.onClose&&b.onClose();g()?b.clear():b.hide()});b.dom.appendChild(q)}j=document.createElement("div");j.classList.add("pai-messages");b.dom.appendChild(j);z=document.createElement("div");
|
|
12
|
+
z.classList.add("pai-prompt-area");k=document.createElement("textarea");k.classList.add("pai-prompt-box");k.setAttribute("placeholder",a.promptPlaceHolder);k.addEventListener("keydown",function(d){if(d.key==="Enter"){d.shiftKey||d.preventDefault();d.stopPropagation();d.shiftKey||b.send()}D()});k.addEventListener("input",function(){K();D()});z.appendChild(k);p=document.createElement("div");p.classList.add("pai-send-button");p.title=a.sendTitle;p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>';
|
|
13
|
+
p.addEventListener("click",function(){b.send()});z.appendChild(p);b.dom.appendChild(z);u=document.createElement("div");u.classList.add("pai-loader");E=document.createElement("span");E.classList.add("pai-loader-message");u.appendChild(E);for(var f=1;f<=3;f++){var c=document.createElement("div");c.classList.add("pai-loader-dot");u.appendChild(c)}b.clear();a.theme&&b.setTheme(a.theme);a.brandColor&&b.setBrandColor(a.brandColor)};this.show=function(){b.dom.classList.remove("pai-hidden");k.focus()};this.hide=
|
|
14
|
+
function(){b.dom.classList.add("pai-hidden")};this.add=function(a){var f=a.message,c=document.createElement("div");c.classList.add("pai-message");var d=a.type;d||(d="user-message");c.classList.add("pai-"+d);if(d==="agent-response"){c.classList.add("markdown-body");if(A)f=f.replace(/<img src="\/profound-ai\/image\?file=/g,'<img src="'+A+"/profound-ai/image?file=");c.innerHTML=f;c.querySelectorAll("span.pai-citation").forEach(function(e){function n(){if(h&&!h.matches(":hover")){e.removeChild(h);h=null}}
|
|
15
|
+
var h,i;e.addEventListener("mouseenter",function(){if(!h)if(e.getAttribute("data-citation")){h=document.createElement("div");h.classList.add("pai-tooltip-content");h.innerHTML=e.getAttribute("data-citation");e.appendChild(h);var w=e.getBoundingClientRect();h.style.left=w.left+"px";h.style.top=w.top-h.offsetHeight-5+"px";h.addEventListener("mouseenter",function(){clearTimeout(i)});h.addEventListener("mouseleave",function(){n()})}});e.addEventListener("mouseleave",function(){i=setTimeout(n,100)})});
|
|
16
|
+
if(a.replace)(a=j.lastChild)&&a.classList.contains("pai-agent-response")&&a.parentNode.removeChild(a)}else c.innerText=f;j.appendChild(c);j.scrollTop=j.scrollHeight};this.clear=function(){j.innerHTML="";b.heading&&b.add({message:b.heading,type:"heading"});b.greeting&&b.add({message:b.greeting,type:"greeting"});b.setBrandColor(v);C=s=null};this.setTheme=function(a){B=a;B=typeof B!=="string"?"light":B.toLowerCase();B==="dark"?b.dom.classList.add("pai-dark"):b.dom.classList.remove("pai-dark")};this.setBrandColor=
|
|
17
|
+
function(a){v=a;if(a=b.dom.querySelector(".pai-heading")){a.style.backgroundColor=null;a.style.backgroundImage=null;a.classList.remove("pai-branded")}q&&q.classList.remove("pai-branded");p.style.backgroundColor=null;if(v){var f=N(v,-30);if(a){a.style.backgroundColor=v;a.style.backgroundImage="linear-gradient(to right, "+v+", "+f+")";a.classList.add("pai-branded")}q&&a&&q.classList.add("pai-branded");p.style.backgroundColor=v}};this.send=function(){if(k.value!=="")if(!b.isLoading()){b.onSend&&b.onSend(k.value);
|
|
18
|
+
b.add({message:k.value});var a={};a.message=k.value;if(s)a.threadId=s;var f="/profound-ai/chat";if(g()){a.agentData=o();a.agentFile=Ext.e("centerPanel").d().title.replace(/\*/g,"").trim();r=pui.streamingModelList.includes(a.agentData.aiAgent.model);f="/ide/profound-ai/chat"}else a.agent=b.agent;var c=b.data;if(typeof c==="function")c=c();if(b.data)a.data=c;k.value="";K();k.focus();b.showLoader();c={"Content-Type":"application/json"};if(r){c.Connection="keep-alive";c["Response-Type"]="stream"}if(G){var d=
|
|
19
|
+
G;if(typeof d==="function")d=d();c.Authorization="Bearer "+d}fetch(A+f,{method:"POST",headers:c,body:JSON.stringify(a)}).then(function(e){return r?e.body.getReader():e.json()}).then(function(e){r?m(e):x(e)})["catch"](function(e){b.hideLoader();b.add({message:"Error: "+e.message,type:"error"})})}};this.poll=function(){if(!(!s||!C||!F)){var a={};a.threadId=s;a.runId=C;a.modelKey=F;var f="/profound-ai/poll";if(g())f="/ide/profound-ai/poll";fetch(A+f,{method:"POST",headers:{"Content-Type":"application/json"},
|
|
20
|
+
body:JSON.stringify(a)}).then(function(c){return c.json()}).then(function(c){x(c)})["catch"](function(c){b.hideLoader();b.add({message:"Error: "+c.message,type:"error"})})}};this.showLoader=function(a){a||(a=L);E.innerText=a;if(!b.isLoading()){r?b.add({message:t,type:"agent-response"}):j.appendChild(u);D()}j.scrollTop=j.scrollHeight};this.hideLoader=function(){if(b.isLoading()){if(r)for(var a=j.querySelectorAll(".pai-inline-loader"),f=a.length-1;f>=0;f--)a[f].parentNode.removeChild(a[f]);else j.removeChild(u);
|
|
21
|
+
D()}};this.isLoading=function(){if(r)return j.querySelectorAll(".pai-inline-loader").length>0;return u.parentNode===j};this.destroy=function(){if(b.dom){b.dom.parentNode.removeChild(b.dom);b.dom=null}};this.removeEmbedIcon=function(){profound.ai.removeEmbedIcon()}};profound.ai.c=function(g){if(!document.querySelector('link[href="'+g+'"]')){var o=document.createElement("link");o.rel="stylesheet";o.href=g;document.head.appendChild(o)}};
|
|
22
|
+
profound.ai.b=function(g,o){if(document.querySelector('script[src="'+g+'"]'))typeof o==="function"&&o();else{var l=document.createElement("script");l.type="text/javascript";l.src=g;l.onload=function(){typeof o==="function"&&o()};document.head.appendChild(l)}};
|
|
23
|
+
profound.ai.startAgent=function(g,o){g||(g={});var l="";if(g.server)l=g.server;if(!o&&g.agent)fetch(l+"/profound-ai/attributes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent:g.agent})}).then(function(m){return m.json()}).then(function(m){if(m.status==="error")throw Error(m.message);m=m.attributes;for(var x in m)if(g[x]===undefined)g[x]=m[x];profound.ai.startAgent(g,true)})["catch"](function(m){throw Error("Unable to start AI Agent: "+m.message);});else{if(!g.container)g.container=
|
|
24
|
+
document.body;g.stream&&profound.ai.b(l+"/marked/marked.min.js");profound.ai.c(l+"/profoundui/proddata/css/markdown.css");profound.ai.c(l+"/profoundui/proddata/css/profoundai.css");profound.ai.agent&&profound.ai.agent.destroy();if(g.embed){if(!profound.ai.embedIcon){profound.ai.embedIcon=document.createElement("div");profound.ai.embedIcon.classList.add("pai-embed-icon");profound.ai.embedIcon.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/></svg>';
|
|
25
|
+
g.container.appendChild(profound.ai.embedIcon);l="Ask AI Agent";if(g.embedIconTitle)l=g.embedIconTitle;profound.ai.embedIcon.title=l;profound.ai.embedIcon.addEventListener("click",function(){var m=Object.assign({},g);delete m.embed;profound.ai.startAgent(m)})}}else{profound.ai.agent=new profound.ai.Chat;profound.ai.agent.init(g);profound.ai.agent.show();return profound.ai.agent}}};
|
|
26
|
+
profound.ai.removeEmbedIcon=function(){if(profound.ai.embedIcon){profound.ai.embedIcon.parentNode.removeChild(profound.ai.embedIcon);profound.ai.embedIcon=null}};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
class RichDisplay extends React.Component {
|
|
3
|
-
constructor(props) {
|
|
4
|
-
super(props);
|
|
5
|
-
this.div = React.createRef();
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
renderRichDisplay() {
|
|
9
|
-
var div = this.div.current;
|
|
10
|
-
var config = {
|
|
11
|
-
"container": div,
|
|
12
|
-
"method": "GET",
|
|
13
|
-
"setDims": true
|
|
14
|
-
};
|
|
15
|
-
Object.assign(config, this.props);
|
|
16
|
-
if (typeof config.path !== "string") return;
|
|
17
|
-
if (config.style) delete config.style;
|
|
18
|
-
if (config.className) delete config.className;
|
|
19
|
-
pui.show(config);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
componentDidMount() {
|
|
23
|
-
this.renderRichDisplay();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
componentDidUpdate() {
|
|
27
|
-
this.renderRichDisplay();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
render() {
|
|
31
|
-
var css = {
|
|
32
|
-
position: "relative"
|
|
33
|
-
};
|
|
34
|
-
if (typeof this.props.style === "object") {
|
|
35
|
-
Object.assign(css, this.props.style);
|
|
36
|
-
}
|
|
37
|
-
var divProps = {
|
|
38
|
-
style: css,
|
|
39
|
-
ref: this.div
|
|
40
|
-
};
|
|
41
|
-
if (this.props.className) {
|
|
42
|
-
divProps.className = this.props.className;
|
|
43
|
-
}
|
|
44
|
-
return React.createElement("div", divProps);
|
|
45
|
-
}
|
|
1
|
+
|
|
2
|
+
class RichDisplay extends React.Component {
|
|
3
|
+
constructor(props) {
|
|
4
|
+
super(props);
|
|
5
|
+
this.div = React.createRef();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
renderRichDisplay() {
|
|
9
|
+
var div = this.div.current;
|
|
10
|
+
var config = {
|
|
11
|
+
"container": div,
|
|
12
|
+
"method": "GET",
|
|
13
|
+
"setDims": true
|
|
14
|
+
};
|
|
15
|
+
Object.assign(config, this.props);
|
|
16
|
+
if (typeof config.path !== "string") return;
|
|
17
|
+
if (config.style) delete config.style;
|
|
18
|
+
if (config.className) delete config.className;
|
|
19
|
+
pui.show(config);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
componentDidMount() {
|
|
23
|
+
this.renderRichDisplay();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
componentDidUpdate() {
|
|
27
|
+
this.renderRichDisplay();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
render() {
|
|
31
|
+
var css = {
|
|
32
|
+
position: "relative"
|
|
33
|
+
};
|
|
34
|
+
if (typeof this.props.style === "object") {
|
|
35
|
+
Object.assign(css, this.props.style);
|
|
36
|
+
}
|
|
37
|
+
var divProps = {
|
|
38
|
+
style: css,
|
|
39
|
+
ref: this.div
|
|
40
|
+
};
|
|
41
|
+
if (this.props.className) {
|
|
42
|
+
divProps.className = this.props.className;
|
|
43
|
+
}
|
|
44
|
+
return React.createElement("div", divProps);
|
|
45
|
+
}
|
|
46
46
|
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
Vue.component("rich-display", {
|
|
3
|
-
props: ["path", "screen", "data", "className"],
|
|
4
|
-
template: '<div style="position: relative;"></div>',
|
|
5
|
-
mounted() {
|
|
6
|
-
this.renderRichDisplay();
|
|
7
|
-
},
|
|
8
|
-
updated() {
|
|
9
|
-
this.renderRichDisplay();
|
|
10
|
-
},
|
|
11
|
-
methods: {
|
|
12
|
-
renderRichDisplay() {
|
|
13
|
-
var div = this.$el;
|
|
14
|
-
var config = {
|
|
15
|
-
"container": div,
|
|
16
|
-
"method": "GET",
|
|
17
|
-
"setDims": true
|
|
18
|
-
};
|
|
19
|
-
if (typeof this.path !== "string") return;
|
|
20
|
-
config.path = this.path;
|
|
21
|
-
config.screen = this.screen;
|
|
22
|
-
config.data = this.data;
|
|
23
|
-
if (typeof config.data !== "object") config.data = {};
|
|
24
|
-
if (this.className) div.className = this.className;
|
|
25
|
-
else div.className = "";
|
|
26
|
-
pui.show(config);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
|
|
2
|
+
Vue.component("rich-display", {
|
|
3
|
+
props: ["path", "screen", "data", "className"],
|
|
4
|
+
template: '<div style="position: relative;"></div>',
|
|
5
|
+
mounted() {
|
|
6
|
+
this.renderRichDisplay();
|
|
7
|
+
},
|
|
8
|
+
updated() {
|
|
9
|
+
this.renderRichDisplay();
|
|
10
|
+
},
|
|
11
|
+
methods: {
|
|
12
|
+
renderRichDisplay() {
|
|
13
|
+
var div = this.$el;
|
|
14
|
+
var config = {
|
|
15
|
+
"container": div,
|
|
16
|
+
"method": "GET",
|
|
17
|
+
"setDims": true
|
|
18
|
+
};
|
|
19
|
+
if (typeof this.path !== "string") return;
|
|
20
|
+
config.path = this.path;
|
|
21
|
+
config.screen = this.screen;
|
|
22
|
+
config.data = this.data;
|
|
23
|
+
if (typeof config.data !== "object") config.data = {};
|
|
24
|
+
if (this.className) div.className = this.className;
|
|
25
|
+
else div.className = "";
|
|
26
|
+
pui.show(config);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
29
|
});
|