@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.
@@ -792,8 +792,7 @@ const modeDecoder = oneOf(constant("default"), constant("compact"));
792
792
  const configDecoder = object({
793
793
  channelSelector: optional(channelSelectorDecoder),
794
794
  position: optional(positionDecoder),
795
- mode: optional(modeDecoder),
796
- displayInWorkspace: optional(boolean())
795
+ mode: optional(modeDecoder)
797
796
  });
798
797
 
799
798
  const defaultConfig = {
@@ -802,8 +801,7 @@ const defaultConfig = {
802
801
  type: "default"
803
802
  },
804
803
  position: "bottom",
805
- mode: "default",
806
- displayInWorkspace: false
804
+ mode: "default"
807
805
  };
808
806
 
809
807
  const browserPlatformMethodName = "T42.Web.Platform.Control";
@@ -1206,9 +1204,6 @@ const ChannelSelectorWrapper = ({ mode }) => {
1206
1204
  }));
1207
1205
  setChannelsInfo(channelsInfo);
1208
1206
  }, [glueController]);
1209
- useEffect(() => {
1210
- getChannels();
1211
- }, [getChannels]);
1212
1207
  useEffect(() => {
1213
1208
  const subscribeForChannelChanged = () => {
1214
1209
  glueController.io.channels.onChanged(async (name) => {
@@ -1240,7 +1235,7 @@ const ChannelSelectorWrapper = ({ mode }) => {
1240
1235
  handleBtnBackgroundChange();
1241
1236
  }, [channelsInfo]);
1242
1237
  return (React.createElement(L, { onClick: getChannels },
1243
- 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 })),
1238
+ 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 })),
1244
1239
  React.createElement(L.Content, null,
1245
1240
  React.createElement(ChannelSelector, { className: "io-list-channels", variant: type, channels: channelsInfo, onChannelSelect: type === "single" ? handleSingleChannelSelect : handleDirectionalChannelSelect, variantToggle: variantToggle, onVariantChange: onTypeChange }))));
1246
1241
  };
@@ -1280,9 +1275,9 @@ const CompactWidget = ({ position, positionClickHandler, mode, modeClickHandler,
1280
1275
  return (React.createElement(L, null,
1281
1276
  React.createElement(L.ButtonIcon, { className: "io-btn-icon", iconSize: "16", size: "32", variant: "circle" }),
1282
1277
  React.createElement(L.Content, null,
1283
- React.createElement(L.ItemSection, null, "App"),
1278
+ React.createElement(L.ItemSection, null, "Application"),
1284
1279
  React.createElement(L.List, null,
1285
- showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop In")) : null,
1280
+ showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop in")) : null,
1286
1281
  showChannelSelectorBtn ? React.createElement(ChannelSelectorWrapper, { mode: mode }) : null),
1287
1282
  React.createElement(PositionDropdown, { position: position, positionClickHandler: positionClickHandler }),
1288
1283
  React.createElement(ModeDropdown, { mode: mode, modeClickHandler: modeClickHandler }))));
@@ -1401,9 +1396,6 @@ class GlueController {
1401
1396
  }
1402
1397
  async checkShowWidget() {
1403
1398
  const errorMsg = `Current window is in workspace`;
1404
- if (window.iobrowser?.isPlatformFrame) {
1405
- return { show: false, reason: `Current window is a Platform in a Workspaces Frame` };
1406
- }
1407
1399
  if (this.io.workspaces && await this.io.workspaces.inWorkspace()) {
1408
1400
  return { show: false, reason: errorMsg };
1409
1401
  }
@@ -1506,12 +1498,10 @@ const IOBrowserWidgetFactory = async (io, config) => {
1506
1498
  return;
1507
1499
  }
1508
1500
  logger.trace(`Bridge initiated successfully`);
1509
- if (!widgetConfig.displayInWorkspace) {
1510
- const showWidgetRes = await ioc.glueController.checkShowWidget();
1511
- if (!showWidgetRes.show) {
1512
- logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
1513
- return;
1514
- }
1501
+ const showWidgetRes = await ioc.glueController.checkShowWidget();
1502
+ if (!showWidgetRes.show) {
1503
+ logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
1504
+ return;
1515
1505
  }
1516
1506
  logger.trace(`Widget will be attached to DOM`);
1517
1507
  await ioc.domController.attachWidget();