@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.
@@ -789,8 +789,7 @@ const modeDecoder = oneOf(constant("default"), constant("compact"));
789
789
  const configDecoder = object({
790
790
  channelSelector: optional(channelSelectorDecoder),
791
791
  position: optional(positionDecoder),
792
- mode: optional(modeDecoder),
793
- displayInWorkspace: optional(boolean())
792
+ mode: optional(modeDecoder)
794
793
  });
795
794
 
796
795
  const defaultConfig = {
@@ -799,8 +798,7 @@ const defaultConfig = {
799
798
  type: "default"
800
799
  },
801
800
  position: "bottom",
802
- mode: "default",
803
- displayInWorkspace: false
801
+ mode: "default"
804
802
  };
805
803
 
806
804
  const browserPlatformMethodName = "T42.Web.Platform.Control";
@@ -1628,9 +1626,6 @@ const ChannelSelectorWrapper = ({ mode }) => {
1628
1626
  }));
1629
1627
  setChannelsInfo(channelsInfo);
1630
1628
  }, [glueController]);
1631
- reactExports.useEffect(() => {
1632
- getChannels();
1633
- }, [getChannels]);
1634
1629
  reactExports.useEffect(() => {
1635
1630
  const subscribeForChannelChanged = () => {
1636
1631
  glueController.io.channels.onChanged(async (name) => {
@@ -1662,7 +1657,7 @@ const ChannelSelectorWrapper = ({ mode }) => {
1662
1657
  handleBtnBackgroundChange();
1663
1658
  }, [channelsInfo]);
1664
1659
  return (React.createElement(L, { onClick: getChannels },
1665
- 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 })),
1660
+ 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 })),
1666
1661
  React.createElement(L.Content, null,
1667
1662
  React.createElement(ChannelSelector, { className: "io-list-channels", variant: type, channels: channelsInfo, onChannelSelect: type === "single" ? handleSingleChannelSelect : handleDirectionalChannelSelect, variantToggle: variantToggle, onVariantChange: onTypeChange }))));
1668
1663
  };
@@ -1702,9 +1697,9 @@ const CompactWidget = ({ position, positionClickHandler, mode, modeClickHandler,
1702
1697
  return (React.createElement(L, null,
1703
1698
  React.createElement(L.ButtonIcon, { className: "io-btn-icon", iconSize: "16", size: "32", variant: "circle" }),
1704
1699
  React.createElement(L.Content, null,
1705
- React.createElement(L.ItemSection, null, "App"),
1700
+ React.createElement(L.ItemSection, null, "Application"),
1706
1701
  React.createElement(L.List, null,
1707
- showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop In")) : null,
1702
+ showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop in")) : null,
1708
1703
  showChannelSelectorBtn ? React.createElement(ChannelSelectorWrapper, { mode: mode }) : null),
1709
1704
  React.createElement(PositionDropdown, { position: position, positionClickHandler: positionClickHandler }),
1710
1705
  React.createElement(ModeDropdown, { mode: mode, modeClickHandler: modeClickHandler }))));
@@ -1823,9 +1818,6 @@ class GlueController {
1823
1818
  }
1824
1819
  async checkShowWidget() {
1825
1820
  const errorMsg = `Current window is in workspace`;
1826
- if (window.iobrowser?.isPlatformFrame) {
1827
- return { show: false, reason: `Current window is a Platform in a Workspaces Frame` };
1828
- }
1829
1821
  if (this.io.workspaces && await this.io.workspaces.inWorkspace()) {
1830
1822
  return { show: false, reason: errorMsg };
1831
1823
  }
@@ -1928,12 +1920,10 @@ const IOBrowserWidgetFactory = async (io, config) => {
1928
1920
  return;
1929
1921
  }
1930
1922
  logger.trace(`Bridge initiated successfully`);
1931
- if (!widgetConfig.displayInWorkspace) {
1932
- const showWidgetRes = await ioc.glueController.checkShowWidget();
1933
- if (!showWidgetRes.show) {
1934
- logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
1935
- return;
1936
- }
1923
+ const showWidgetRes = await ioc.glueController.checkShowWidget();
1924
+ if (!showWidgetRes.show) {
1925
+ logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
1926
+ return;
1937
1927
  }
1938
1928
  logger.trace(`Widget will be attached to DOM`);
1939
1929
  await ioc.domController.attachWidget();