iobroker.webui 1.34.2 → 1.35.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/README.md +4 -0
- package/io-package.json +14 -14
- package/package.json +5 -5
- package/www/dist/frontend/common/IobrokerHandler.d.ts +2 -2
- package/www/dist/frontend/common/IobrokerHandler.js +6 -1
- package/www/dist/frontend/config/IobrokerWebuiSolutionExplorer.js +4 -4
- package/www/dist/frontend/generated/Properties.json +4 -4
- package/www/dist/frontend/generated/ScriptCommands.json +2 -0
- package/www/dist/frontend/runtime/CustomControls.js +12 -0
- package/www/dist/frontend/runtime/ScreenViewer.js +2 -2
- package/www/index.html +1 -1
- package/www/node_modules/@node-projects/web-component-designer/dist/elements/helper/getBoxQuads.js +48 -19
- package/www/node_modules/@node-projects/web-component-designer/dist/elements/services/dragDropService/DragDropService.js +5 -2
- package/www/node_modules/@node-projects/web-component-designer-visualization-addons/dist/components/SimpleScriptEditor.js +4 -1
- package/www/node_modules/@node-projects/web-component-designer-visualization-addons/dist/helpers/BindingsHelper.js +38 -6
- package/www/node_modules/blockly/blockly_compressed.js +28 -27
- package/www/node_modules/blockly/msg/en.js +5 -6
- package/www/node_modules/dock-spawn-ts/lib/es5/dock-spawn-ts.js +1 -1
- package/www/node_modules/dock-spawn-ts/lib/js/BrowserDialogHelper.js +4 -1
- package/www/node_modules/dock-spawn-ts/lib/js/DockManager.js +8 -0
- package/www/node_modules/dock-spawn-ts/lib/js/PanelContainer.js +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export function moveElementToNewBrowserWindow(
|
|
1
|
+
export function moveElementToNewBrowserWindow(panelContainer, params) {
|
|
2
|
+
const element = panelContainer.resolvedElementContent;
|
|
2
3
|
const rect = element.getBoundingClientRect();
|
|
3
4
|
const newWindowBounds = { x: rect.x + 24, y: rect.y + 60, width: rect.width, height: rect.height };
|
|
4
5
|
const win = window.open('about:blank', undefined, `popup=yes,left=${newWindowBounds.x},top=${newWindowBounds.y},width=${newWindowBounds.width},height=${newWindowBounds.height}`);
|
|
@@ -48,6 +49,8 @@ export function moveElementToNewBrowserWindow(element, params) {
|
|
|
48
49
|
e[0].shadowRoot.adoptedStyleSheets = e[1];
|
|
49
50
|
}
|
|
50
51
|
params.closeCallback();
|
|
52
|
+
panelContainer.dockManager.notifyOnNewWindow(panelContainer, win);
|
|
53
|
+
return win;
|
|
51
54
|
}
|
|
52
55
|
function cloneStyleSheet(window, stylesheet, cache) {
|
|
53
56
|
const existingCopy = cache.get(stylesheet);
|
|
@@ -650,6 +650,14 @@ export class DockManager {
|
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
+
notifyOnNewWindow(panel, win) {
|
|
654
|
+
this._checkShowBackgroundContext();
|
|
655
|
+
this.layoutEventListeners.forEach((listener) => {
|
|
656
|
+
if (listener.onNewWindow) {
|
|
657
|
+
listener.onNewWindow(this, panel, win);
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
}
|
|
653
661
|
saveState() {
|
|
654
662
|
let serializer = new DockGraphSerializer();
|
|
655
663
|
return serializer.serialize(this.context.model);
|
|
@@ -475,7 +475,7 @@ export class PanelContainer {
|
|
|
475
475
|
this.close();
|
|
476
476
|
}
|
|
477
477
|
undockToBrowserDialog() {
|
|
478
|
-
moveElementToNewBrowserWindow(this
|
|
478
|
+
moveElementToNewBrowserWindow(this, {
|
|
479
479
|
title: this.elementTitleText.textContent,
|
|
480
480
|
closeCallback: () => {
|
|
481
481
|
this.undockedToNewBrowserWindow = true;
|