@interopio/groups-ui-react 2.2.3 → 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.
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +46 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/api.d.ts +16 -3
- package/dist/cjs/types/internal.d.ts +10 -2
- package/dist/cjs/webGroupsManager.d.ts +4 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +46 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api.d.ts +16 -3
- package/dist/esm/types/internal.d.ts +10 -2
- package/dist/esm/webGroupsManager.d.ts +4 -1
- package/dist/styles/groups.css +159 -110
- package/dist/styles/vars.css +57 -40
- package/package.json +1 -1
package/dist/cjs/index.d.ts
CHANGED
|
@@ -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
|
@@ -329,6 +329,27 @@
|
|
|
329
329
|
WebGroupsManagerDecorator.prototype.selectTab = function (windowId) {
|
|
330
330
|
window.webGroupsManager.externalLibraryFactory.selectTab(windowId);
|
|
331
331
|
};
|
|
332
|
+
WebGroupsManagerDecorator.prototype.addTabContainerClass = function (windowId, className) {
|
|
333
|
+
if (typeof window.webGroupsManager.externalLibraryFactory.addTabContainerClass !== "function") {
|
|
334
|
+
console.warn("The method addTabContainerClass is not supported by the current version of the library");
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
window.webGroupsManager.externalLibraryFactory.addTabContainerClass(windowId, className);
|
|
338
|
+
};
|
|
339
|
+
WebGroupsManagerDecorator.prototype.removeTabContainerClass = function (windowId, className) {
|
|
340
|
+
if (typeof window.webGroupsManager.externalLibraryFactory.removeTabContainerClass !== "function") {
|
|
341
|
+
console.warn("The method removeTabContainerClass is not supported by the current version of the library");
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
window.webGroupsManager.externalLibraryFactory.removeTabContainerClass(windowId, className);
|
|
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
|
+
};
|
|
332
353
|
return WebGroupsManagerDecorator;
|
|
333
354
|
}());
|
|
334
355
|
var webGroupsManager = new WebGroupsManagerDecorator();
|
|
@@ -2479,6 +2500,13 @@
|
|
|
2479
2500
|
newState[stateProp] = __assign(__assign({}, s[stateProp]), (_a = {}, _a[targetId] = __assign(__assign({}, s[stateProp][targetId]), { selectedWindow: selectedWindow }), _a));
|
|
2480
2501
|
}
|
|
2481
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
|
+
};
|
|
2482
2510
|
updateSelectionWindow("frameCaptionBars", options.targetId, options.selectedWindow);
|
|
2483
2511
|
updateSelectionWindow("frameWindowOverlays", options.targetId, options.selectedWindow);
|
|
2484
2512
|
updateSelectionWindow("windowContentOverlays", options.targetId, options.selectedWindow);
|
|
@@ -2490,6 +2518,8 @@
|
|
|
2490
2518
|
updateSelectionWindow("tabHeaderButtons", options.targetId, options.selectedWindow);
|
|
2491
2519
|
updateSelectionWindow("belowTabsZones", options.targetId, options.selectedWindow);
|
|
2492
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);
|
|
2493
2523
|
return newState;
|
|
2494
2524
|
});
|
|
2495
2525
|
};
|
|
@@ -3118,8 +3148,14 @@
|
|
|
3118
3148
|
webGroupsManager.onCaptionEditorVisibleChanged(TargetType.Tab, options.targetId, visible);
|
|
3119
3149
|
} });
|
|
3120
3150
|
var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Tab, options.targetId, bounds); };
|
|
3151
|
+
var addContainerClass = function (className) {
|
|
3152
|
+
webGroupsManager.addTabContainerClass(options.targetId, className);
|
|
3153
|
+
};
|
|
3154
|
+
var removeContainerClass = function (className) {
|
|
3155
|
+
webGroupsManager.removeTabContainerClass(options.targetId, className);
|
|
3156
|
+
};
|
|
3121
3157
|
return React__default["default"].createElement(Portal, { key: options.targetId, parentElement: parentElement },
|
|
3122
|
-
React__default["default"].createElement(TabCustomElement, __assign({}, options, { close: onCloseClick, channels: channels, windowId: options.targetId, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged })));
|
|
3158
|
+
React__default["default"].createElement(TabCustomElement, __assign({}, options, { close: onCloseClick, channels: channels, windowId: options.targetId, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged, addContainerClass: addContainerClass, removeContainerClass: removeContainerClass })));
|
|
3123
3159
|
});
|
|
3124
3160
|
};
|
|
3125
3161
|
var renderAfterTabsZones = function () {
|
|
@@ -3368,7 +3404,10 @@
|
|
|
3368
3404
|
React__default["default"].createElement("li", { className: "title" }, title),
|
|
3369
3405
|
tabs.map(function (tab) { return (React__default["default"].createElement("li", { key: tab.windowId, onClick: function () { return handleTabClick(tab.windowId); } },
|
|
3370
3406
|
React__default["default"].createElement("span", null, tab.title),
|
|
3371
|
-
React__default["default"].createElement("div", { className: "t42-tab-close-button-content", onClick: function () {
|
|
3407
|
+
React__default["default"].createElement("div", { className: "t42-tab-close-button-content", onClick: function (e) {
|
|
3408
|
+
e.stopPropagation();
|
|
3409
|
+
handleTabClose(tab.windowId);
|
|
3410
|
+
} }))); })));
|
|
3372
3411
|
};
|
|
3373
3412
|
var handleTabClick = function (windowId) {
|
|
3374
3413
|
select(windowId);
|
|
@@ -3386,6 +3425,10 @@
|
|
|
3386
3425
|
var requestPageFocus = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestPageFocus(); };
|
|
3387
3426
|
var requestFrameFocus = function (frameId) { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestFrameFocus(frameId); };
|
|
3388
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
|
+
};
|
|
3389
3432
|
var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Group, targetId, cb); };
|
|
3390
3433
|
var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
|
|
3391
3434
|
var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
|
|
@@ -3427,6 +3470,7 @@
|
|
|
3427
3470
|
exports.onCommitFlatCaptionEditingRequested = onCommitFlatCaptionEditingRequested;
|
|
3428
3471
|
exports.onCommitGroupCaptionEditingRequested = onCommitGroupCaptionEditingRequested;
|
|
3429
3472
|
exports.onCommitTabCaptionEditingRequested = onCommitTabCaptionEditingRequested;
|
|
3473
|
+
exports.openTabOverflowPopup = openTabOverflowPopup;
|
|
3430
3474
|
exports.requestFrameFocus = requestFrameFocus;
|
|
3431
3475
|
exports.requestGroupFocus = requestGroupFocus;
|
|
3432
3476
|
exports.requestPageFocus = requestPageFocus;
|