@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/types/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Bounds, ButtonProps, OverflowedTabInfo, ToggleButtonProps } from "./internal";
|
|
2
|
+
import { Bounds, ButtonProps, Location, OverflowedTabInfo, ToggleButtonProps } from "./internal";
|
|
3
3
|
import { CustomButtonProps } from "./defaultComponents";
|
|
4
4
|
export interface ChannelProps {
|
|
5
5
|
visible: boolean;
|
|
@@ -100,12 +100,16 @@ export interface TabElementProps {
|
|
|
100
100
|
channels: ChannelProps;
|
|
101
101
|
notifyCaptionBoundsChanged: (bounds: Bounds) => void;
|
|
102
102
|
captionEditor: CaptionEditorProps;
|
|
103
|
+
addContainerClass: (className: string) => void;
|
|
104
|
+
removeContainerClass: (className: string) => void;
|
|
103
105
|
}
|
|
104
106
|
export interface AfterTabsProps {
|
|
105
107
|
frameId: string;
|
|
106
108
|
selectedWindow: string;
|
|
109
|
+
hiddenTabsToTheLeft?: OverflowedTabInfo[];
|
|
110
|
+
hiddenTabsToTheRight?: OverflowedTabInfo[];
|
|
107
111
|
}
|
|
108
|
-
|
|
112
|
+
interface FrameButtonsProps {
|
|
109
113
|
overflow?: ButtonProps;
|
|
110
114
|
feedback?: ButtonProps;
|
|
111
115
|
clone?: ButtonProps;
|
|
@@ -121,7 +125,11 @@ export interface TabHeaderButtonsProps {
|
|
|
121
125
|
frameId: string;
|
|
122
126
|
selectedWindow: string;
|
|
123
127
|
}
|
|
124
|
-
export interface
|
|
128
|
+
export interface TabHeaderButtonsProps extends FrameButtonsProps {
|
|
129
|
+
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
130
|
+
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
131
|
+
}
|
|
132
|
+
export interface HtmlButtonsProps extends FrameButtonsProps {
|
|
125
133
|
}
|
|
126
134
|
export interface GroupProps {
|
|
127
135
|
components?: {
|
|
@@ -159,3 +167,8 @@ export interface MoveAreaProps {
|
|
|
159
167
|
export interface GroupComponentVisibilityState {
|
|
160
168
|
groupCaptionBarVisible?: boolean;
|
|
161
169
|
}
|
|
170
|
+
export interface OpenTabOverflowPopupOptions {
|
|
171
|
+
frameId: string;
|
|
172
|
+
location: Location;
|
|
173
|
+
}
|
|
174
|
+
export {};
|
|
@@ -202,7 +202,10 @@ export interface CreateTabOverflowPopupRequestOptions extends CreateElementReque
|
|
|
202
202
|
export interface CreateFrameLoadingAnimationRequestOptions extends CreateFrameElementRequestOptions {
|
|
203
203
|
show: boolean;
|
|
204
204
|
}
|
|
205
|
-
export
|
|
205
|
+
export interface UpdateFrameRequestOptions extends CreateFrameElementRequestOptions {
|
|
206
|
+
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
207
|
+
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
208
|
+
}
|
|
206
209
|
export declare enum TargetType {
|
|
207
210
|
Group = "group",
|
|
208
211
|
Frame = "frame",
|
|
@@ -285,6 +288,9 @@ export interface ExternalLibraryFactory {
|
|
|
285
288
|
onCaptionEditorBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
|
|
286
289
|
commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
|
|
287
290
|
selectTab(windowId: string): void;
|
|
291
|
+
openTabOverflowPopup(frameId: string, location: Location): void;
|
|
292
|
+
addTabContainerClass(windowId: string, className: string): void;
|
|
293
|
+
removeTabContainerClass(windowId: string, className: string): void;
|
|
288
294
|
}
|
|
289
295
|
export interface WebGroupsManager {
|
|
290
296
|
init: (factory?: any) => void;
|
|
@@ -300,7 +306,9 @@ export interface Size {
|
|
|
300
306
|
width: number;
|
|
301
307
|
height: number;
|
|
302
308
|
}
|
|
303
|
-
export interface
|
|
309
|
+
export interface Location {
|
|
304
310
|
left: number;
|
|
305
311
|
top: number;
|
|
306
312
|
}
|
|
313
|
+
export interface Bounds extends Size, Location {
|
|
314
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bounds, TargetType } from "./types/internal";
|
|
1
|
+
import { Bounds, Location, TargetType } from "./types/internal";
|
|
2
2
|
declare class WebGroupsManagerDecorator {
|
|
3
3
|
private readonly registry;
|
|
4
4
|
readonly skipFocusStyle = "t42-skip-focus";
|
|
@@ -36,6 +36,9 @@ declare class WebGroupsManagerDecorator {
|
|
|
36
36
|
onCommitCaptionEditingRequested(targetType: TargetType, targetId: string, callback: () => void): () => void;
|
|
37
37
|
requestCommitCaptionEditing(targetType: TargetType, targetId: string): void;
|
|
38
38
|
selectTab(windowId: string): void;
|
|
39
|
+
addTabContainerClass(windowId: string, className: string): void;
|
|
40
|
+
removeTabContainerClass(windowId: string, className: string): void;
|
|
41
|
+
openTabOverflowPopup(frameId: string, location: Location): void;
|
|
39
42
|
}
|
|
40
43
|
declare const _default: WebGroupsManagerDecorator;
|
|
41
44
|
export default _default;
|
package/dist/esm/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/esm/index.js
CHANGED
|
@@ -322,6 +322,27 @@ var WebGroupsManagerDecorator = /** @class */ (function () {
|
|
|
322
322
|
WebGroupsManagerDecorator.prototype.selectTab = function (windowId) {
|
|
323
323
|
window.webGroupsManager.externalLibraryFactory.selectTab(windowId);
|
|
324
324
|
};
|
|
325
|
+
WebGroupsManagerDecorator.prototype.addTabContainerClass = function (windowId, className) {
|
|
326
|
+
if (typeof window.webGroupsManager.externalLibraryFactory.addTabContainerClass !== "function") {
|
|
327
|
+
console.warn("The method addTabContainerClass is not supported by the current version of the library");
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
window.webGroupsManager.externalLibraryFactory.addTabContainerClass(windowId, className);
|
|
331
|
+
};
|
|
332
|
+
WebGroupsManagerDecorator.prototype.removeTabContainerClass = function (windowId, className) {
|
|
333
|
+
if (typeof window.webGroupsManager.externalLibraryFactory.removeTabContainerClass !== "function") {
|
|
334
|
+
console.warn("The method removeTabContainerClass is not supported by the current version of the library");
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
window.webGroupsManager.externalLibraryFactory.removeTabContainerClass(windowId, className);
|
|
338
|
+
};
|
|
339
|
+
WebGroupsManagerDecorator.prototype.openTabOverflowPopup = function (frameId, location) {
|
|
340
|
+
if (typeof window.webGroupsManager.externalLibraryFactory.openTabOverflowPopup !== "function") {
|
|
341
|
+
console.warn("The method openTabOverflowPopup is not supported by the current version of the library");
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
window.webGroupsManager.externalLibraryFactory.openTabOverflowPopup(frameId, location);
|
|
345
|
+
};
|
|
325
346
|
return WebGroupsManagerDecorator;
|
|
326
347
|
}());
|
|
327
348
|
var webGroupsManager = new WebGroupsManagerDecorator();
|
|
@@ -2472,6 +2493,13 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2472
2493
|
newState[stateProp] = __assign(__assign({}, s[stateProp]), (_a = {}, _a[targetId] = __assign(__assign({}, s[stateProp][targetId]), { selectedWindow: selectedWindow }), _a));
|
|
2473
2494
|
}
|
|
2474
2495
|
};
|
|
2496
|
+
var updateHiddenTabs = function (stateProp, targetId, hiddenTabsToTheLeft, hiddenTabsToTheRight) {
|
|
2497
|
+
var _a;
|
|
2498
|
+
var _b, _c;
|
|
2499
|
+
var oldHiddenToTheLeft = (_b = newState[stateProp][targetId]) === null || _b === void 0 ? void 0 : _b.hiddenTabsToTheLeft;
|
|
2500
|
+
var oldHiddenToTheRight = (_c = newState[stateProp][targetId]) === null || _c === void 0 ? void 0 : _c.hiddenTabsToTheRight;
|
|
2501
|
+
newState[stateProp] = __assign(__assign({}, s[stateProp]), (_a = {}, _a[targetId] = __assign(__assign({}, s[stateProp][targetId]), { hiddenTabsToTheLeft: hiddenTabsToTheLeft || oldHiddenToTheLeft, hiddenTabsToTheRight: hiddenTabsToTheRight || oldHiddenToTheRight }), _a));
|
|
2502
|
+
};
|
|
2475
2503
|
updateSelectionWindow("frameCaptionBars", options.targetId, options.selectedWindow);
|
|
2476
2504
|
updateSelectionWindow("frameWindowOverlays", options.targetId, options.selectedWindow);
|
|
2477
2505
|
updateSelectionWindow("windowContentOverlays", options.targetId, options.selectedWindow);
|
|
@@ -2483,6 +2511,8 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2483
2511
|
updateSelectionWindow("tabHeaderButtons", options.targetId, options.selectedWindow);
|
|
2484
2512
|
updateSelectionWindow("belowTabsZones", options.targetId, options.selectedWindow);
|
|
2485
2513
|
updateSelectionWindow("frameLoadingAnimations", options.targetId, options.selectedWindow);
|
|
2514
|
+
updateHiddenTabs("afterTabsZones", options.targetId, options.hiddenTabsToTheLeft, options.hiddenTabsToTheRight);
|
|
2515
|
+
updateHiddenTabs("tabHeaderButtons", options.targetId, options.hiddenTabsToTheLeft, options.hiddenTabsToTheRight);
|
|
2486
2516
|
return newState;
|
|
2487
2517
|
});
|
|
2488
2518
|
};
|
|
@@ -3111,8 +3141,14 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3111
3141
|
webGroupsManager.onCaptionEditorVisibleChanged(TargetType.Tab, options.targetId, visible);
|
|
3112
3142
|
} });
|
|
3113
3143
|
var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Tab, options.targetId, bounds); };
|
|
3144
|
+
var addContainerClass = function (className) {
|
|
3145
|
+
webGroupsManager.addTabContainerClass(options.targetId, className);
|
|
3146
|
+
};
|
|
3147
|
+
var removeContainerClass = function (className) {
|
|
3148
|
+
webGroupsManager.removeTabContainerClass(options.targetId, className);
|
|
3149
|
+
};
|
|
3114
3150
|
return React.createElement(Portal, { key: options.targetId, parentElement: parentElement },
|
|
3115
|
-
React.createElement(TabCustomElement, __assign({}, options, { close: onCloseClick, channels: channels, windowId: options.targetId, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged })));
|
|
3151
|
+
React.createElement(TabCustomElement, __assign({}, options, { close: onCloseClick, channels: channels, windowId: options.targetId, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged, addContainerClass: addContainerClass, removeContainerClass: removeContainerClass })));
|
|
3116
3152
|
});
|
|
3117
3153
|
};
|
|
3118
3154
|
var renderAfterTabsZones = function () {
|
|
@@ -3361,7 +3397,10 @@ var TabOverflowPopup = function (_a) {
|
|
|
3361
3397
|
React.createElement("li", { className: "title" }, title),
|
|
3362
3398
|
tabs.map(function (tab) { return (React.createElement("li", { key: tab.windowId, onClick: function () { return handleTabClick(tab.windowId); } },
|
|
3363
3399
|
React.createElement("span", null, tab.title),
|
|
3364
|
-
React.createElement("div", { className: "t42-tab-close-button-content", onClick: function () {
|
|
3400
|
+
React.createElement("div", { className: "t42-tab-close-button-content", onClick: function (e) {
|
|
3401
|
+
e.stopPropagation();
|
|
3402
|
+
handleTabClose(tab.windowId);
|
|
3403
|
+
} }))); })));
|
|
3365
3404
|
};
|
|
3366
3405
|
var handleTabClick = function (windowId) {
|
|
3367
3406
|
select(windowId);
|
|
@@ -3379,9 +3418,13 @@ var getGroupId = function () { return webGroupsManager === null || webGroupsMana
|
|
|
3379
3418
|
var requestPageFocus = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestPageFocus(); };
|
|
3380
3419
|
var requestFrameFocus = function (frameId) { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestFrameFocus(frameId); };
|
|
3381
3420
|
var requestGroupFocus = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestGroupFocus(); };
|
|
3421
|
+
var openTabOverflowPopup = function (_a) {
|
|
3422
|
+
var frameId = _a.frameId, location = _a.location;
|
|
3423
|
+
return webGroupsManager.openTabOverflowPopup(frameId, location);
|
|
3424
|
+
};
|
|
3382
3425
|
var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Group, targetId, cb); };
|
|
3383
3426
|
var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
|
|
3384
3427
|
var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
|
|
3385
3428
|
|
|
3386
|
-
export { CloneButton, CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, HtmlButtons, LockButton, MaximizeButton, MinimizeButton, OverflowButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, TabOverflowPopup, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
|
|
3429
|
+
export { CloneButton, CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, HtmlButtons, LockButton, MaximizeButton, MinimizeButton, OverflowButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, TabOverflowPopup, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, openTabOverflowPopup, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
|
|
3387
3430
|
//# sourceMappingURL=index.js.map
|