@lvce-editor/panel-worker 2.14.2 → 2.14.3

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.
@@ -1472,8 +1472,11 @@ const {
1472
1472
  wrapGetter
1473
1473
  } = create$1();
1474
1474
 
1475
- const create = (uid, uri, x, y, width, height, platform, assetDir) => {
1475
+ const create = (uid, uri, x, y, width, height, platform, assetDir, applicationId) => {
1476
1476
  const state = {
1477
+ ...(applicationId !== undefined && {
1478
+ applicationId
1479
+ }),
1477
1480
  actionsUid: 0,
1478
1481
  assetDir,
1479
1482
  availableViews: [],
@@ -1764,8 +1767,12 @@ const getSavedViewletId = savedState => {
1764
1767
  return Problems;
1765
1768
  };
1766
1769
 
1767
- const createViewlet = async (viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus) => {
1768
- await invoke$1('Layout.createPanelViewlet', viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus);
1770
+ const createViewlet = async (viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus, applicationId) => {
1771
+ if (applicationId === undefined) {
1772
+ await invoke$1('Layout.createPanelViewlet', viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus);
1773
+ } else {
1774
+ await invoke$1('Application.execute', applicationId, 'Layout.createPanelViewlet', viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus);
1775
+ }
1769
1776
  };
1770
1777
 
1771
1778
  const getContentDimensions = dimensions => {
@@ -1819,6 +1826,7 @@ const saveViewletState = async (childUid, viewletId) => {
1819
1826
 
1820
1827
  const openViewlet = async (state, id, focus = false, uri = '') => {
1821
1828
  const {
1829
+ applicationId,
1822
1830
  childUid: currentChildUid,
1823
1831
  currentViewletId,
1824
1832
  uid,
@@ -1833,7 +1841,7 @@ const openViewlet = async (state, id, focus = false, uri = '') => {
1833
1841
  const tabId = getUid();
1834
1842
  const actionsUid = getUid();
1835
1843
  const index = views.indexOf(id);
1836
- await createViewlet(id, childUid, tabId, actionsUid, childDimensions, uri, focus);
1844
+ await createViewlet(id, childUid, tabId, actionsUid, childDimensions, uri, focus, applicationId);
1837
1845
  if (currentChildUid > 0) {
1838
1846
  add(uid, currentChildUid);
1839
1847
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/panel-worker",
3
- "version": "2.14.2",
3
+ "version": "2.14.3",
4
4
  "description": "Panel Worker",
5
5
  "repository": {
6
6
  "type": "git",