@interopio/widget 1.0.4-next.0 → 1.0.4
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/io-browser-widget-react.es.js +9 -19
- package/dist/io-browser-widget-react.es.js.map +1 -1
- package/dist/io-browser-widget-react.umd.js +9 -19
- package/dist/io-browser-widget-react.umd.js.map +1 -1
- package/dist/io-browser-widget.es.js +9 -19
- package/dist/io-browser-widget.es.js.map +1 -1
- package/dist/io-browser-widget.umd.js +9 -19
- package/dist/io-browser-widget.umd.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/widget.d.ts +1 -9
|
@@ -795,8 +795,7 @@
|
|
|
795
795
|
const configDecoder = object({
|
|
796
796
|
channelSelector: optional(channelSelectorDecoder),
|
|
797
797
|
position: optional(positionDecoder),
|
|
798
|
-
mode: optional(modeDecoder)
|
|
799
|
-
displayInWorkspace: optional(boolean())
|
|
798
|
+
mode: optional(modeDecoder)
|
|
800
799
|
});
|
|
801
800
|
|
|
802
801
|
const defaultConfig = {
|
|
@@ -805,8 +804,7 @@
|
|
|
805
804
|
type: "default"
|
|
806
805
|
},
|
|
807
806
|
position: "bottom",
|
|
808
|
-
mode: "default"
|
|
809
|
-
displayInWorkspace: false
|
|
807
|
+
mode: "default"
|
|
810
808
|
};
|
|
811
809
|
|
|
812
810
|
const browserPlatformMethodName = "T42.Web.Platform.Control";
|
|
@@ -1634,9 +1632,6 @@
|
|
|
1634
1632
|
}));
|
|
1635
1633
|
setChannelsInfo(channelsInfo);
|
|
1636
1634
|
}, [glueController]);
|
|
1637
|
-
reactExports.useEffect(() => {
|
|
1638
|
-
getChannels();
|
|
1639
|
-
}, [getChannels]);
|
|
1640
1635
|
reactExports.useEffect(() => {
|
|
1641
1636
|
const subscribeForChannelChanged = () => {
|
|
1642
1637
|
glueController.io.channels.onChanged(async (name) => {
|
|
@@ -1668,7 +1663,7 @@
|
|
|
1668
1663
|
handleBtnBackgroundChange();
|
|
1669
1664
|
}, [channelsInfo]);
|
|
1670
1665
|
return (React.createElement(L, { onClick: getChannels },
|
|
1671
|
-
mode === "default" ? (React.createElement(L.ButtonIcon, { className: "io-btn-icon", icon: "link", iconSize: "16", size: "32", variant: "circle" })) : (React.createElement(L.Button, { icon: "link", text: "Select
|
|
1666
|
+
mode === "default" ? (React.createElement(L.ButtonIcon, { className: "io-btn-icon", icon: "link", iconSize: "16", size: "32", variant: "circle" })) : (React.createElement(L.Button, { icon: "link", text: "Select channel", iconRight: false })),
|
|
1672
1667
|
React.createElement(L.Content, null,
|
|
1673
1668
|
React.createElement(ChannelSelector, { className: "io-list-channels", variant: type, channels: channelsInfo, onChannelSelect: type === "single" ? handleSingleChannelSelect : handleDirectionalChannelSelect, variantToggle: variantToggle, onVariantChange: onTypeChange }))));
|
|
1674
1669
|
};
|
|
@@ -1708,9 +1703,9 @@
|
|
|
1708
1703
|
return (React.createElement(L, null,
|
|
1709
1704
|
React.createElement(L.ButtonIcon, { className: "io-btn-icon", iconSize: "16", size: "32", variant: "circle" }),
|
|
1710
1705
|
React.createElement(L.Content, null,
|
|
1711
|
-
React.createElement(L.ItemSection, null, "
|
|
1706
|
+
React.createElement(L.ItemSection, null, "Application"),
|
|
1712
1707
|
React.createElement(L.List, null,
|
|
1713
|
-
showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop
|
|
1708
|
+
showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop in")) : null,
|
|
1714
1709
|
showChannelSelectorBtn ? React.createElement(ChannelSelectorWrapper, { mode: mode }) : null),
|
|
1715
1710
|
React.createElement(PositionDropdown, { position: position, positionClickHandler: positionClickHandler }),
|
|
1716
1711
|
React.createElement(ModeDropdown, { mode: mode, modeClickHandler: modeClickHandler }))));
|
|
@@ -1829,9 +1824,6 @@
|
|
|
1829
1824
|
}
|
|
1830
1825
|
async checkShowWidget() {
|
|
1831
1826
|
const errorMsg = `Current window is in workspace`;
|
|
1832
|
-
if (window.iobrowser?.isPlatformFrame) {
|
|
1833
|
-
return { show: false, reason: `Current window is a Platform in a Workspaces Frame` };
|
|
1834
|
-
}
|
|
1835
1827
|
if (this.io.workspaces && await this.io.workspaces.inWorkspace()) {
|
|
1836
1828
|
return { show: false, reason: errorMsg };
|
|
1837
1829
|
}
|
|
@@ -1934,12 +1926,10 @@
|
|
|
1934
1926
|
return;
|
|
1935
1927
|
}
|
|
1936
1928
|
logger.trace(`Bridge initiated successfully`);
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
return;
|
|
1942
|
-
}
|
|
1929
|
+
const showWidgetRes = await ioc.glueController.checkShowWidget();
|
|
1930
|
+
if (!showWidgetRes.show) {
|
|
1931
|
+
logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
|
|
1932
|
+
return;
|
|
1943
1933
|
}
|
|
1944
1934
|
logger.trace(`Widget will be attached to DOM`);
|
|
1945
1935
|
await ioc.domController.attachWidget();
|