@lvce-editor/panel-worker 2.3.0 → 2.3.2
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/panelWorkerMain.js +8 -8
- package/package.json +1 -1
package/dist/panelWorkerMain.js
CHANGED
|
@@ -1565,8 +1565,8 @@ const getSavedViewletId = savedState => {
|
|
|
1565
1565
|
return Problems;
|
|
1566
1566
|
};
|
|
1567
1567
|
|
|
1568
|
-
const createViewlet = async (viewletModuleId, editorUid, tabId, actionsUid, bounds, uri) => {
|
|
1569
|
-
await invoke('Layout.createPanelViewlet', viewletModuleId, editorUid, tabId, actionsUid, bounds, uri);
|
|
1568
|
+
const createViewlet = async (viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus) => {
|
|
1569
|
+
await invoke('Layout.createPanelViewlet', viewletModuleId, editorUid, tabId, actionsUid, bounds, uri, focus);
|
|
1570
1570
|
};
|
|
1571
1571
|
|
|
1572
1572
|
const getContentDimensions = dimensions => {
|
|
@@ -1582,7 +1582,7 @@ const getUid = () => {
|
|
|
1582
1582
|
return Math.random();
|
|
1583
1583
|
};
|
|
1584
1584
|
|
|
1585
|
-
const openViewlet = async (state, id, focus = false) => {
|
|
1585
|
+
const openViewlet = async (state, id, focus = false, uri = '') => {
|
|
1586
1586
|
const {
|
|
1587
1587
|
views
|
|
1588
1588
|
} = state;
|
|
@@ -1591,7 +1591,7 @@ const openViewlet = async (state, id, focus = false) => {
|
|
|
1591
1591
|
const tabId = getUid();
|
|
1592
1592
|
const actionsUid = getUid();
|
|
1593
1593
|
const index = views.indexOf(id);
|
|
1594
|
-
await createViewlet(id, childUid, tabId, actionsUid, childDimensions,
|
|
1594
|
+
await createViewlet(id, childUid, tabId, actionsUid, childDimensions, uri, focus);
|
|
1595
1595
|
return {
|
|
1596
1596
|
...state,
|
|
1597
1597
|
actionsUid,
|
|
@@ -1613,11 +1613,11 @@ const loadContent = (state, savedState) => {
|
|
|
1613
1613
|
return openViewlet(loaded, savedViewletId);
|
|
1614
1614
|
};
|
|
1615
1615
|
|
|
1616
|
-
const selectIndex = async (state, index) => {
|
|
1616
|
+
const selectIndex = async (state, index, uri = '') => {
|
|
1617
1617
|
const {
|
|
1618
1618
|
views
|
|
1619
1619
|
} = state;
|
|
1620
|
-
return openViewlet(state, views[index]);
|
|
1620
|
+
return openViewlet(state, views[index], true, uri);
|
|
1621
1621
|
};
|
|
1622
1622
|
|
|
1623
1623
|
const selectRaw = async (state, rawIndex) => {
|
|
@@ -1637,7 +1637,7 @@ const setBadgeCount = (state, id, count) => {
|
|
|
1637
1637
|
};
|
|
1638
1638
|
};
|
|
1639
1639
|
|
|
1640
|
-
const toggleView = async (state, name) => {
|
|
1640
|
+
const toggleView = async (state, name, uri = '') => {
|
|
1641
1641
|
const {
|
|
1642
1642
|
currentViewletId,
|
|
1643
1643
|
views
|
|
@@ -1649,7 +1649,7 @@ const toggleView = async (state, name) => {
|
|
|
1649
1649
|
if (name === currentViewletId) {
|
|
1650
1650
|
return state;
|
|
1651
1651
|
}
|
|
1652
|
-
return selectIndex(state, index);
|
|
1652
|
+
return selectIndex(state, index, uri);
|
|
1653
1653
|
};
|
|
1654
1654
|
|
|
1655
1655
|
const renderActionsUid = (oldState, newState) => {
|