@interopio/groups-ui-react 2.2.4 → 2.2.5

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.
@@ -29,7 +29,7 @@ import CustomButton from "./defaultComponents/buttons/CustomButton";
29
29
  import { waitForWindow } from "./utils";
30
30
  import useGroupComponentVisibility from "./useGroupComponentVisibility";
31
31
  import { CloseButtonProps, ExtractButtonProps, StickyButtonProps, FeedbackButtonProps, FlatButtonsProps, FlatCaptionEditorProps, FlatCaptionProps, FlatChannelSelectorProps, FlatMoveAreaProps, GroupButtonsProps, GroupCaptionEditorProps, GroupMoveAreaProps, LockButtonProps, MaximizeButtonProps, MinimizeButtonProps, RestoreButtonProps, TabCaptionEditorProps, TabCaptionProps, TabChannelSelectorProps, TabCloseButtonProps, UnlockButtonProps, UseCaptionEditorOptions, UseEditableCaptionOptions, OverflowButtonProps } from "./types/defaultComponents";
32
- import { AboveTabsProps, AboveWindowProps, AfterTabsProps, BeforeTabsProps, BelowTabsProps, BelowWindowProps, FlatCaptionBarProps, FrameLoadingAnimationProps, FrameWindowOverlayProps, GroupCaptionBarProps, GroupComponentVisibilityState, GroupOverlayProps, GroupProps, HtmlButtonsProps, MoveAreaProps, TabElementProps, TabHeaderButtonsProps, TabOverflowPopupProps, WindowContentOverlayProps } from "./types/api";
32
+ import { AboveTabsProps, AboveWindowProps, AfterTabsProps, BeforeTabsProps, BelowTabsProps, BelowWindowProps, FlatCaptionBarProps, FrameLoadingAnimationProps, FrameWindowOverlayProps, GroupCaptionBarProps, GroupComponentVisibilityState, GroupOverlayProps, GroupProps, HtmlButtonsProps, MoveAreaProps, OpenTabOverflowPopupOptions, TabElementProps, TabHeaderButtonsProps, TabOverflowPopupProps, WindowContentOverlayProps } from "./types/api";
33
33
  import GroupCaptionEditor from "./defaultComponents/groupCaptionBar/GroupCaptionEditor";
34
34
  import FlatCaptionEditor from "./defaultComponents/flatCaptionBar/FlatCaptionEditor";
35
35
  import TabCaptionEditor from "./defaultComponents/tabs/TabCaptionEditor";
@@ -46,6 +46,7 @@ export declare const getGroupId: () => string;
46
46
  export declare const requestPageFocus: () => void;
47
47
  export declare const requestFrameFocus: (frameId: string) => void;
48
48
  export declare const requestGroupFocus: () => void;
49
+ export declare const openTabOverflowPopup: (options: OpenTabOverflowPopupOptions) => void;
49
50
  export declare const onCommitGroupCaptionEditingRequested: (targetId: string, cb: () => void) => () => void;
50
51
  export declare const onCommitFlatCaptionEditingRequested: (targetId: string, cb: () => void) => () => void;
51
52
  export declare const onCommitTabCaptionEditingRequested: (targetId: string, cb: () => void) => () => void;
package/dist/cjs/index.js CHANGED
@@ -343,6 +343,13 @@
343
343
  }
344
344
  window.webGroupsManager.externalLibraryFactory.removeTabContainerClass(windowId, className);
345
345
  };
346
+ WebGroupsManagerDecorator.prototype.openTabOverflowPopup = function (frameId, location) {
347
+ if (typeof window.webGroupsManager.externalLibraryFactory.openTabOverflowPopup !== "function") {
348
+ console.warn("The method openTabOverflowPopup is not supported by the current version of the library");
349
+ return;
350
+ }
351
+ window.webGroupsManager.externalLibraryFactory.openTabOverflowPopup(frameId, location);
352
+ };
346
353
  return WebGroupsManagerDecorator;
347
354
  }());
348
355
  var webGroupsManager = new WebGroupsManagerDecorator();
@@ -2493,6 +2500,13 @@
2493
2500
  newState[stateProp] = __assign(__assign({}, s[stateProp]), (_a = {}, _a[targetId] = __assign(__assign({}, s[stateProp][targetId]), { selectedWindow: selectedWindow }), _a));
2494
2501
  }
2495
2502
  };
2503
+ var updateHiddenTabs = function (stateProp, targetId, hiddenTabsToTheLeft, hiddenTabsToTheRight) {
2504
+ var _a;
2505
+ var _b, _c;
2506
+ var oldHiddenToTheLeft = (_b = newState[stateProp][targetId]) === null || _b === void 0 ? void 0 : _b.hiddenTabsToTheLeft;
2507
+ var oldHiddenToTheRight = (_c = newState[stateProp][targetId]) === null || _c === void 0 ? void 0 : _c.hiddenTabsToTheRight;
2508
+ newState[stateProp] = __assign(__assign({}, s[stateProp]), (_a = {}, _a[targetId] = __assign(__assign({}, s[stateProp][targetId]), { hiddenTabsToTheLeft: hiddenTabsToTheLeft || oldHiddenToTheLeft, hiddenTabsToTheRight: hiddenTabsToTheRight || oldHiddenToTheRight }), _a));
2509
+ };
2496
2510
  updateSelectionWindow("frameCaptionBars", options.targetId, options.selectedWindow);
2497
2511
  updateSelectionWindow("frameWindowOverlays", options.targetId, options.selectedWindow);
2498
2512
  updateSelectionWindow("windowContentOverlays", options.targetId, options.selectedWindow);
@@ -2504,6 +2518,8 @@
2504
2518
  updateSelectionWindow("tabHeaderButtons", options.targetId, options.selectedWindow);
2505
2519
  updateSelectionWindow("belowTabsZones", options.targetId, options.selectedWindow);
2506
2520
  updateSelectionWindow("frameLoadingAnimations", options.targetId, options.selectedWindow);
2521
+ updateHiddenTabs("afterTabsZones", options.targetId, options.hiddenTabsToTheLeft, options.hiddenTabsToTheRight);
2522
+ updateHiddenTabs("tabHeaderButtons", options.targetId, options.hiddenTabsToTheLeft, options.hiddenTabsToTheRight);
2507
2523
  return newState;
2508
2524
  });
2509
2525
  };
@@ -3388,7 +3404,10 @@
3388
3404
  React__default["default"].createElement("li", { className: "title" }, title),
3389
3405
  tabs.map(function (tab) { return (React__default["default"].createElement("li", { key: tab.windowId, onClick: function () { return handleTabClick(tab.windowId); } },
3390
3406
  React__default["default"].createElement("span", null, tab.title),
3391
- React__default["default"].createElement("div", { className: "t42-tab-close-button-content", onClick: function () { return handleTabClose(tab.windowId); } }))); })));
3407
+ React__default["default"].createElement("div", { className: "t42-tab-close-button-content", onClick: function (e) {
3408
+ e.stopPropagation();
3409
+ handleTabClose(tab.windowId);
3410
+ } }))); })));
3392
3411
  };
3393
3412
  var handleTabClick = function (windowId) {
3394
3413
  select(windowId);
@@ -3406,6 +3425,10 @@
3406
3425
  var requestPageFocus = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestPageFocus(); };
3407
3426
  var requestFrameFocus = function (frameId) { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestFrameFocus(frameId); };
3408
3427
  var requestGroupFocus = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestGroupFocus(); };
3428
+ var openTabOverflowPopup = function (_a) {
3429
+ var frameId = _a.frameId, location = _a.location;
3430
+ return webGroupsManager.openTabOverflowPopup(frameId, location);
3431
+ };
3409
3432
  var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Group, targetId, cb); };
3410
3433
  var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
3411
3434
  var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
@@ -3447,6 +3470,7 @@
3447
3470
  exports.onCommitFlatCaptionEditingRequested = onCommitFlatCaptionEditingRequested;
3448
3471
  exports.onCommitGroupCaptionEditingRequested = onCommitGroupCaptionEditingRequested;
3449
3472
  exports.onCommitTabCaptionEditingRequested = onCommitTabCaptionEditingRequested;
3473
+ exports.openTabOverflowPopup = openTabOverflowPopup;
3450
3474
  exports.requestFrameFocus = requestFrameFocus;
3451
3475
  exports.requestGroupFocus = requestGroupFocus;
3452
3476
  exports.requestPageFocus = requestPageFocus;