@interopio/groups-ui-react 2.7.1 → 3.0.1
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/defaultComponents/buttons/StandardButton.d.ts +4 -0
- package/dist/cjs/defaultComponents/hooks/useExternalWindowPopup.d.ts +2 -0
- package/dist/cjs/defaultComponents/hooks/useExternalWindowPopupClosed.d.ts +1 -0
- package/dist/cjs/defaultComponents/hooks/useExternalWindowPopupHidden.d.ts +1 -0
- package/dist/cjs/defaultComponents/hooks/useMoveResizeWindow.d.ts +2 -0
- package/dist/cjs/defaultComponents/hooks/useShowPopupWindow.d.ts +2 -0
- package/dist/cjs/defaultComponents/utils/common.d.ts +3 -0
- package/dist/cjs/defaultComponents/utils/useDragMove.d.ts +6 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +494 -622
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/api.d.ts +38 -1
- package/dist/cjs/types/defaultComponents.d.ts +10 -1
- package/dist/cjs/types/internal.d.ts +39 -45
- package/dist/cjs/webGroupsManager.d.ts +4 -1
- package/dist/cjs/webGroupsStore.d.ts +3 -0
- package/dist/esm/defaultComponents/buttons/StandardButton.d.ts +4 -0
- package/dist/esm/defaultComponents/hooks/useExternalWindowPopup.d.ts +2 -0
- package/dist/esm/defaultComponents/hooks/useExternalWindowPopupClosed.d.ts +1 -0
- package/dist/esm/defaultComponents/hooks/useExternalWindowPopupHidden.d.ts +1 -0
- package/dist/esm/defaultComponents/hooks/useMoveResizeWindow.d.ts +2 -0
- package/dist/esm/defaultComponents/hooks/useShowPopupWindow.d.ts +2 -0
- package/dist/esm/defaultComponents/utils/common.d.ts +3 -0
- package/dist/esm/defaultComponents/utils/useDragMove.d.ts +6 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +618 -765
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api.d.ts +38 -1
- package/dist/esm/types/defaultComponents.d.ts +10 -1
- package/dist/esm/types/internal.d.ts +39 -45
- package/dist/esm/webGroupsManager.d.ts +4 -1
- package/dist/esm/webGroupsStore.d.ts +3 -0
- package/dist/styles/groups.css +195 -101
- package/dist/styles/vars.css +865 -78
- package/package.json +6 -5
package/dist/cjs/types/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Bounds, ButtonProps, Location, OverflowedTabInfo, StylesOptions, ToggleButtonProps } from "./internal";
|
|
2
|
+
import { Bounds, ButtonProps, Location, OverflowedTabInfo, PopupTargetLocation, Size, StylesOptions, ToggleButtonProps } from "./internal";
|
|
3
3
|
import { CustomButtonProps } from "./defaultComponents";
|
|
4
4
|
export interface ChannelProps {
|
|
5
5
|
visible: boolean;
|
|
@@ -54,6 +54,7 @@ export interface TabOverflowPopupProps {
|
|
|
54
54
|
frameId: string;
|
|
55
55
|
select: (windowId: string) => void;
|
|
56
56
|
close: (windowId: string) => void;
|
|
57
|
+
resize?: (size: Size) => void;
|
|
57
58
|
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
58
59
|
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
59
60
|
}
|
|
@@ -72,6 +73,7 @@ export interface GroupCaptionBarProps {
|
|
|
72
73
|
caption: string;
|
|
73
74
|
captionEditor?: CaptionEditorProps;
|
|
74
75
|
visible: boolean;
|
|
76
|
+
showCaptionEditor: (text: string) => void;
|
|
75
77
|
notifyCaptionBoundsChanged: (bounds: Bounds) => void;
|
|
76
78
|
minimize: ButtonProps;
|
|
77
79
|
maximize: ButtonProps;
|
|
@@ -81,6 +83,7 @@ export interface GroupCaptionBarProps {
|
|
|
81
83
|
export interface GroupOverlayProps {
|
|
82
84
|
}
|
|
83
85
|
export interface FlatCaptionBarProps {
|
|
86
|
+
showCaptionEditor: (text: string) => void;
|
|
84
87
|
frameId: string;
|
|
85
88
|
moveAreaId: string;
|
|
86
89
|
caption: string;
|
|
@@ -191,4 +194,38 @@ export interface OpenTabOverflowPopupOptions {
|
|
|
191
194
|
frameId: string;
|
|
192
195
|
location: Location;
|
|
193
196
|
}
|
|
197
|
+
export interface CreatePopupOptions {
|
|
198
|
+
left?: number;
|
|
199
|
+
top?: number;
|
|
200
|
+
width?: number;
|
|
201
|
+
height?: number;
|
|
202
|
+
roundedCorners?: boolean;
|
|
203
|
+
hasSizeAreas?: boolean;
|
|
204
|
+
hasMoveAreas?: boolean;
|
|
205
|
+
transparent?: boolean;
|
|
206
|
+
copyStyles?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export interface PopupShowOptions {
|
|
209
|
+
targetBounds?: Bounds;
|
|
210
|
+
size?: Size;
|
|
211
|
+
targetLocation?: PopupTargetLocation;
|
|
212
|
+
focus?: boolean;
|
|
213
|
+
horizontalOffset?: number;
|
|
214
|
+
verticalOffset?: number;
|
|
215
|
+
}
|
|
216
|
+
export interface PopupWindow {
|
|
217
|
+
ioConnectWindow: any;
|
|
218
|
+
browserWindow: Window;
|
|
219
|
+
}
|
|
220
|
+
export interface ExternalWindowPopupResult {
|
|
221
|
+
getContainer: () => HTMLElement | null;
|
|
222
|
+
createPopup: (options?: CreatePopupOptions) => Promise<PopupWindow | null>;
|
|
223
|
+
showPopup: (options?: PopupShowOptions) => Promise<void>;
|
|
224
|
+
resizePopup: (size: Size) => Promise<void>;
|
|
225
|
+
hidePopup: () => Promise<void>;
|
|
226
|
+
closePopup: () => Promise<void>;
|
|
227
|
+
isOpen: boolean;
|
|
228
|
+
isVisible: boolean;
|
|
229
|
+
popup: PopupWindow | null;
|
|
230
|
+
}
|
|
194
231
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bounds, ButtonProps, TargetType, ToggleButtonProps } from "./internal";
|
|
1
|
+
import { Bounds, ButtonProps, StandardButtons, StandardButtonTarget, TargetType, ToggleButtonProps } from "./internal";
|
|
2
2
|
export interface CaptionEditorProps {
|
|
3
3
|
targetId: string;
|
|
4
4
|
targetType: TargetType;
|
|
@@ -17,6 +17,13 @@ export interface GroupCaptionEditorProps {
|
|
|
17
17
|
hideEditor: () => void;
|
|
18
18
|
caption: string;
|
|
19
19
|
}
|
|
20
|
+
export interface StandardButtonProps {
|
|
21
|
+
buttonId: StandardButtons;
|
|
22
|
+
tooltip: string;
|
|
23
|
+
target?: StandardButtonTarget;
|
|
24
|
+
isPressed?: boolean;
|
|
25
|
+
onClick: () => void;
|
|
26
|
+
}
|
|
20
27
|
export interface StickyButtonProps extends ToggleButtonProps {
|
|
21
28
|
}
|
|
22
29
|
export interface FeedbackButtonProps extends ButtonProps {
|
|
@@ -141,6 +148,7 @@ export interface FlatButtonsProps {
|
|
|
141
148
|
}
|
|
142
149
|
export interface FlatCaptionProps {
|
|
143
150
|
caption: string;
|
|
151
|
+
showCaptionEditor: (text: string) => void;
|
|
144
152
|
notifyBoundsChanged?: (bounds: Bounds) => void;
|
|
145
153
|
}
|
|
146
154
|
export interface GroupMoveAreaProps {
|
|
@@ -155,6 +163,7 @@ export interface GroupButtonsProps {
|
|
|
155
163
|
}
|
|
156
164
|
export interface GroupCaptionProps {
|
|
157
165
|
caption: string;
|
|
166
|
+
showCaptionEditor: (text: string) => void;
|
|
158
167
|
notifyBoundsChanged?: (bounds: Bounds) => void;
|
|
159
168
|
}
|
|
160
169
|
export interface TabCaptionProps {
|
|
@@ -7,10 +7,15 @@ export interface PortalProps {
|
|
|
7
7
|
parentElement: HTMLElement;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
+
export declare enum StandardButtonTarget {
|
|
11
|
+
Default = "default",
|
|
12
|
+
Frame = "frame"
|
|
13
|
+
}
|
|
10
14
|
export interface ButtonProps {
|
|
11
15
|
onClick: () => void;
|
|
12
16
|
tooltip: string;
|
|
13
17
|
visible: boolean;
|
|
18
|
+
target?: StandardButtonTarget;
|
|
14
19
|
}
|
|
15
20
|
export interface ToggleButtonProps extends ButtonProps {
|
|
16
21
|
isPressed: boolean;
|
|
@@ -151,6 +156,7 @@ export interface CreateTabRequestOptions extends CreateElementRequestOptions {
|
|
|
151
156
|
}
|
|
152
157
|
export interface UpdateStandardButtonRequestOptions extends CreateElementRequestOptions {
|
|
153
158
|
buttonId: StandardButtons;
|
|
159
|
+
buttonTarget: StandardButtonTarget;
|
|
154
160
|
visible: boolean;
|
|
155
161
|
tooltip: string;
|
|
156
162
|
isPressed: boolean;
|
|
@@ -163,52 +169,26 @@ export interface UpdateCustomButtonOptions {
|
|
|
163
169
|
tooltip: string;
|
|
164
170
|
imageData: string;
|
|
165
171
|
}
|
|
172
|
+
export interface CreateStandardButtonsOptions {
|
|
173
|
+
tooltip: string;
|
|
174
|
+
visible: boolean;
|
|
175
|
+
target: StandardButtonTarget;
|
|
176
|
+
}
|
|
177
|
+
export interface CreateStandardToggleButtonsOptions extends CreateStandardButtonsOptions {
|
|
178
|
+
isPressed: boolean;
|
|
179
|
+
}
|
|
166
180
|
export interface CreateButtonsOptions extends CreateFrameElementRequestOptions {
|
|
167
|
-
overflow:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
};
|
|
179
|
-
sticky: {
|
|
180
|
-
tooltip: string;
|
|
181
|
-
visible: boolean;
|
|
182
|
-
isPressed: boolean;
|
|
183
|
-
};
|
|
184
|
-
extract: {
|
|
185
|
-
tooltip: string;
|
|
186
|
-
visible: boolean;
|
|
187
|
-
};
|
|
188
|
-
lock: {
|
|
189
|
-
tooltip: string;
|
|
190
|
-
visible: boolean;
|
|
191
|
-
};
|
|
192
|
-
unlock: {
|
|
193
|
-
tooltip: string;
|
|
194
|
-
visible: boolean;
|
|
195
|
-
};
|
|
196
|
-
minimize: {
|
|
197
|
-
tooltip: string;
|
|
198
|
-
visible: boolean;
|
|
199
|
-
};
|
|
200
|
-
restore: {
|
|
201
|
-
tooltip: string;
|
|
202
|
-
visible: boolean;
|
|
203
|
-
};
|
|
204
|
-
maximize: {
|
|
205
|
-
tooltip: string;
|
|
206
|
-
visible: boolean;
|
|
207
|
-
};
|
|
208
|
-
close: {
|
|
209
|
-
tooltip: string;
|
|
210
|
-
visible: boolean;
|
|
211
|
-
};
|
|
181
|
+
overflow: CreateStandardButtonsOptions;
|
|
182
|
+
feedback: CreateStandardButtonsOptions;
|
|
183
|
+
clone: CreateStandardButtonsOptions;
|
|
184
|
+
sticky: CreateStandardToggleButtonsOptions;
|
|
185
|
+
extract: CreateStandardButtonsOptions;
|
|
186
|
+
lock: CreateStandardButtonsOptions;
|
|
187
|
+
unlock: CreateStandardButtonsOptions;
|
|
188
|
+
minimize: CreateStandardButtonsOptions;
|
|
189
|
+
restore: CreateStandardButtonsOptions;
|
|
190
|
+
maximize: CreateStandardButtonsOptions;
|
|
191
|
+
close: CreateStandardButtonsOptions;
|
|
212
192
|
customButtons: UpdateCustomButtonOptions[];
|
|
213
193
|
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
214
194
|
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
@@ -308,6 +288,7 @@ export interface ElementCreationWrapperState {
|
|
|
308
288
|
[targetId: string]: CreateButtonsOptions;
|
|
309
289
|
};
|
|
310
290
|
}
|
|
291
|
+
export declare type IndexableElementCreationWrapperState = Omit<Omit<ElementCreationWrapperState, "groupCaptionBar">, "groupOverlay">;
|
|
311
292
|
export interface ExternalLibraryFactory {
|
|
312
293
|
readonly groupId: string;
|
|
313
294
|
focusPage(): void;
|
|
@@ -320,6 +301,8 @@ export interface ExternalLibraryFactory {
|
|
|
320
301
|
onFrameChannelSelectorClick(targetId: string, channelSelectorBounds: Bounds): void;
|
|
321
302
|
onMoveAreaChanged(targetType: TargetType, targetId: string): void;
|
|
322
303
|
onCaptionTextBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
|
|
304
|
+
showCaptionEditor(targetType: TargetType, targetId: string, text: string): void;
|
|
305
|
+
startDragMove(): void;
|
|
323
306
|
onCaptionEditorVisibleChanged(targetType: TargetType, targetId: string, visible: boolean): void;
|
|
324
307
|
onCaptionEditorBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
|
|
325
308
|
commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
|
|
@@ -328,6 +311,7 @@ export interface ExternalLibraryFactory {
|
|
|
328
311
|
updateFrameStyles(styles: StylesOptions): void;
|
|
329
312
|
selectTab(windowId: string): void;
|
|
330
313
|
openTabOverflowPopup(frameId: string, location: Location): void;
|
|
314
|
+
resizeTabOverflowPopup(frameId: string, size: Size): void;
|
|
331
315
|
addTabContainerClass(windowId: string, className: string): void;
|
|
332
316
|
removeTabContainerClass(windowId: string, className: string): void;
|
|
333
317
|
}
|
|
@@ -355,4 +339,14 @@ export interface StylesOptions {
|
|
|
355
339
|
}
|
|
356
340
|
export interface Bounds extends Size, Location {
|
|
357
341
|
}
|
|
342
|
+
export declare type PopupTargetLocation = "top" | "bottom" | "left" | "right" | "none";
|
|
343
|
+
export interface ExternalWindowPopup {
|
|
344
|
+
browserWindow?: Window;
|
|
345
|
+
ioConnectWindow?: any;
|
|
346
|
+
}
|
|
347
|
+
export interface ShowExternalWindowPopupConfig {
|
|
348
|
+
targetBounds: Bounds;
|
|
349
|
+
size: Size;
|
|
350
|
+
targetLocation: PopupTargetLocation;
|
|
351
|
+
}
|
|
358
352
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bounds, Location, StylesOptions, TargetType } from "./types/internal";
|
|
1
|
+
import { Bounds, Location, Size, StylesOptions, TargetType } from "./types/internal";
|
|
2
2
|
declare class WebGroupsManagerDecorator {
|
|
3
3
|
private readonly registry;
|
|
4
4
|
readonly skipFocusStyle = "t42-skip-focus";
|
|
@@ -30,6 +30,8 @@ declare class WebGroupsManagerDecorator {
|
|
|
30
30
|
onTabChannelSelectorClick(targetId: string, selectorBounds: Bounds): void;
|
|
31
31
|
onFrameChannelSelectorClick(targetId: string, selectorBounds: Bounds): void;
|
|
32
32
|
onCaptionTextBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
|
|
33
|
+
startDragMove(): void;
|
|
34
|
+
showCaptionEditor(targetType: TargetType, targetId: string, text: string): void;
|
|
33
35
|
onCaptionEditorVisibleChanged(targetType: TargetType, targetId: string, visible: boolean): void;
|
|
34
36
|
onCaptionEditorBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
|
|
35
37
|
commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
|
|
@@ -42,6 +44,7 @@ declare class WebGroupsManagerDecorator {
|
|
|
42
44
|
addTabContainerClass(windowId: string, className: string): void;
|
|
43
45
|
removeTabContainerClass(windowId: string, className: string): void;
|
|
44
46
|
openTabOverflowPopup(frameId: string, location: Location): void;
|
|
47
|
+
resizeTabOverflowPopup(frameId: string, size: Size): void;
|
|
45
48
|
}
|
|
46
49
|
declare const _default: WebGroupsManagerDecorator;
|
|
47
50
|
export default _default;
|
|
@@ -60,6 +60,9 @@ declare class WebGroupsStore {
|
|
|
60
60
|
private onHideTabCaptionEditorRequested;
|
|
61
61
|
private onShowLoadingAnimation;
|
|
62
62
|
private onHideLoadingAnimation;
|
|
63
|
+
private onCreateElementRequested;
|
|
64
|
+
private onUpdateElementRequested;
|
|
65
|
+
private onRemoveElementRequested;
|
|
63
66
|
private setState;
|
|
64
67
|
}
|
|
65
68
|
declare const _default: WebGroupsStore;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useExternalWindowPopupClosed(io: any, ioConnectWindowPopup: any): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useExternalWindowPopupHidden(io: any, ioConnectWindowPopup: any): boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StandardButtons, StandardButtonTarget } from "../../types/internal";
|
|
2
|
+
export declare function getStandardButtonInnerClassName(buttonId: StandardButtons, target?: StandardButtonTarget): string;
|
|
3
|
+
export declare function getStandardButtonOuterClassName(buttonId: StandardButtons, target?: StandardButtonTarget, isPressed?: boolean): string;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -43,7 +43,9 @@ import HtmlButtons from "./defaultComponents/htmlButtonsBar/buttons";
|
|
|
43
43
|
import TabOverflowPopup from "./defaultComponents/popups/TabOverflowPopup";
|
|
44
44
|
import TabMultiChannelSelector from "./defaultComponents/channelSelector/multi/TabMultiChannelSelector";
|
|
45
45
|
import FlatMultiChannelSelector from "./defaultComponents/channelSelector/multi/FlatMultiChannelSelector";
|
|
46
|
-
|
|
46
|
+
import { useDragMove } from "./defaultComponents/utils/useDragMove";
|
|
47
|
+
import useExternalWindowPopup from "./defaultComponents/hooks/useExternalWindowPopup";
|
|
48
|
+
export { GroupCaptionBar, GroupMoveArea, GroupButtons, GroupCaptionEditor, Tab, TabChannelSelector, TabCaption, TabCloseButton, TabCaptionEditor, FeedbackButton, CloneButton, StickyButton, ExtractButton, LockButton, UnlockButton, MinimizeButton, RestoreButton, MaximizeButton, CustomButton, CloseButton, FlatCaptionBar, FlatChannelSelector, FlatCaption, FlatMoveArea, FlatButtons, FlatCaptionEditor, TabHeaderButtons, FrameLoadingAnimation, HtmlButtons, TabOverflowPopup, OverflowButton, GroupComponentVisibilityState, TabMultiChannelSelector, FlatMultiChannelSelector, useIOConnectWindow, useGroupComponentVisibility, waitForWindow, useEditableCaption, useCaptionEditor, useDragMove, useCommitGroupCaptionEditingRequested, useCommitFlatCaptionEditingRequested, useCommitTabCaptionEditingRequested, useExternalWindowPopup, };
|
|
47
49
|
export declare const getGroupId: () => string;
|
|
48
50
|
export declare const requestPageFocus: () => void;
|
|
49
51
|
export declare const requestFrameFocus: (frameId: string) => void;
|