@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.
@@ -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";
@@ -1209,9 +1207,6 @@
1209
1207
  }));
1210
1208
  setChannelsInfo(channelsInfo);
1211
1209
  }, [glueController]);
1212
- React.useEffect(() => {
1213
- getChannels();
1214
- }, [getChannels]);
1215
1210
  React.useEffect(() => {
1216
1211
  const subscribeForChannelChanged = () => {
1217
1212
  glueController.io.channels.onChanged(async (name) => {
@@ -1243,7 +1238,7 @@
1243
1238
  handleBtnBackgroundChange();
1244
1239
  }, [channelsInfo]);
1245
1240
  return (React.createElement(L, { onClick: getChannels },
1246
- 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 })),
1241
+ 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 })),
1247
1242
  React.createElement(L.Content, null,
1248
1243
  React.createElement(ChannelSelector, { className: "io-list-channels", variant: type, channels: channelsInfo, onChannelSelect: type === "single" ? handleSingleChannelSelect : handleDirectionalChannelSelect, variantToggle: variantToggle, onVariantChange: onTypeChange }))));
1249
1244
  };
@@ -1283,9 +1278,9 @@
1283
1278
  return (React.createElement(L, null,
1284
1279
  React.createElement(L.ButtonIcon, { className: "io-btn-icon", iconSize: "16", size: "32", variant: "circle" }),
1285
1280
  React.createElement(L.Content, null,
1286
- React.createElement(L.ItemSection, null, "App"),
1281
+ React.createElement(L.ItemSection, null, "Application"),
1287
1282
  React.createElement(L.List, null,
1288
- showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop In")) : null,
1283
+ showBringBackToWspBtn ? (React.createElement(L.Item, { onClick: handleBringBackToWspClick, prepend: React.createElement(y, { variant: "pop-in-widget" }) }, "Pop in")) : null,
1289
1284
  showChannelSelectorBtn ? React.createElement(ChannelSelectorWrapper, { mode: mode }) : null),
1290
1285
  React.createElement(PositionDropdown, { position: position, positionClickHandler: positionClickHandler }),
1291
1286
  React.createElement(ModeDropdown, { mode: mode, modeClickHandler: modeClickHandler }))));
@@ -1404,9 +1399,6 @@
1404
1399
  }
1405
1400
  async checkShowWidget() {
1406
1401
  const errorMsg = `Current window is in workspace`;
1407
- if (window.iobrowser?.isPlatformFrame) {
1408
- return { show: false, reason: `Current window is a Platform in a Workspaces Frame` };
1409
- }
1410
1402
  if (this.io.workspaces && await this.io.workspaces.inWorkspace()) {
1411
1403
  return { show: false, reason: errorMsg };
1412
1404
  }
@@ -1509,12 +1501,10 @@
1509
1501
  return;
1510
1502
  }
1511
1503
  logger.trace(`Bridge initiated successfully`);
1512
- if (!widgetConfig.displayInWorkspace) {
1513
- const showWidgetRes = await ioc.glueController.checkShowWidget();
1514
- if (!showWidgetRes.show) {
1515
- logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
1516
- return;
1517
- }
1504
+ const showWidgetRes = await ioc.glueController.checkShowWidget();
1505
+ if (!showWidgetRes.show) {
1506
+ logger.error(`${baseErrorMessage} ${showWidgetRes.reason}`);
1507
+ return;
1518
1508
  }
1519
1509
  logger.trace(`Widget will be attached to DOM`);
1520
1510
  await ioc.domController.attachWidget();