@interopio/groups-ui-react 2.4.0 → 2.5.0
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/GroupElementCreationWrapper.d.ts +49 -0
- package/dist/GroupWrapper.d.ts +9 -0
- package/dist/Portal.d.ts +6 -0
- package/dist/cjs/defaultComponents/channelSelector/multi/BaseMultiChannelSelector.d.ts +4 -0
- package/dist/cjs/defaultComponents/channelSelector/multi/ColorRectangle.d.ts +7 -0
- package/dist/cjs/defaultComponents/channelSelector/multi/FlatMultiChannelSelector.d.ts +4 -0
- package/dist/cjs/defaultComponents/channelSelector/multi/TabMultiChannelSelector.d.ts +4 -0
- package/dist/cjs/defaultComponents/channelSelector/utils.d.ts +4 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +112 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/api.d.ts +10 -0
- package/dist/cjs/types/defaultComponents.d.ts +50 -0
- package/dist/cjs/types/internal.d.ts +22 -0
- package/dist/defaultComponents/BaseButton.d.ts +4 -0
- package/dist/defaultComponents/CloseButton.d.ts +4 -0
- package/dist/defaultComponents/ExtractButton.d.ts +4 -0
- package/dist/defaultComponents/MaximizeButton.d.ts +4 -0
- package/dist/defaultComponents/MinimizeButton.d.ts +4 -0
- package/dist/defaultComponents/RestoreButton.d.ts +4 -0
- package/dist/defaultComponents/Tab.d.ts +4 -0
- package/dist/defaultComponents/TabCaption.d.ts +4 -0
- package/dist/defaultComponents/TabCloseButton.d.ts +4 -0
- package/dist/defaultComponents/TabHeaderButtons.d.ts +4 -0
- package/dist/defaultComponents/channelSelector/BaseChannelSelector.d.ts +4 -0
- package/dist/defaultComponents/channelSelector/FrameChannelSelector.d.ts +4 -0
- package/dist/defaultComponents/channelSelector/TabChannelSelector.d.ts +4 -0
- package/dist/defaultComponents/channelSelector/utils.d.ts +1 -0
- package/dist/defaultComponents/frameCaptionBar/FrameButtons.d.ts +4 -0
- package/dist/defaultComponents/frameCaptionBar/FrameCaption.d.ts +4 -0
- package/dist/defaultComponents/frameCaptionBar/FrameCaptionBar.d.ts +4 -0
- package/dist/defaultComponents/frameCaptionBar/FrameMoveArea.d.ts +4 -0
- package/dist/defaultComponents/groupCaptionBar/GroupButtons.d.ts +4 -0
- package/dist/defaultComponents/groupCaptionBar/GroupCaption.d.ts +4 -0
- package/dist/defaultComponents/groupCaptionBar/GroupCaptionBar.d.ts +4 -0
- package/dist/defaultComponents/groupCaptionBar/GroupMoveArea.d.ts +4 -0
- package/dist/esm/defaultComponents/channelSelector/multi/BaseMultiChannelSelector.d.ts +4 -0
- package/dist/esm/defaultComponents/channelSelector/multi/ColorRectangle.d.ts +7 -0
- package/dist/esm/defaultComponents/channelSelector/multi/FlatMultiChannelSelector.d.ts +4 -0
- package/dist/esm/defaultComponents/channelSelector/multi/TabMultiChannelSelector.d.ts +4 -0
- package/dist/esm/defaultComponents/channelSelector/utils.d.ts +4 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +111 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api.d.ts +10 -0
- package/dist/esm/types/defaultComponents.d.ts +50 -0
- package/dist/esm/types/internal.d.ts +22 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/fonts.css +2 -0
- package/dist/styles/groups.css +75 -10
- package/dist/styles/styles.css +574 -0
- package/dist/styles/themes.css +155 -0
- package/dist/styles/vars.css +22 -5
- package/dist/types/internal.d.ts +373 -0
- package/dist/webGroupsManager.d.ts +35 -0
- package/package.json +1 -1
package/dist/cjs/types/api.d.ts
CHANGED
|
@@ -6,6 +6,16 @@ export interface ChannelProps {
|
|
|
6
6
|
selectedChannel: string;
|
|
7
7
|
showSelector: (bounds: Bounds) => void;
|
|
8
8
|
selectedChannelColor: string;
|
|
9
|
+
channelsMode: "single" | "multi";
|
|
10
|
+
selectedChannels: {
|
|
11
|
+
name: string;
|
|
12
|
+
color: string;
|
|
13
|
+
}[];
|
|
14
|
+
channelRestrictions: {
|
|
15
|
+
read: boolean;
|
|
16
|
+
write: boolean;
|
|
17
|
+
};
|
|
18
|
+
channelLabel: string;
|
|
9
19
|
}
|
|
10
20
|
export interface FrameWindowOverlayProps {
|
|
11
21
|
frameId: string;
|
|
@@ -54,16 +54,66 @@ export interface BaseChannelSelectorProps {
|
|
|
54
54
|
contentClass: string;
|
|
55
55
|
selectedChannel: string;
|
|
56
56
|
selectedChannelColor: string;
|
|
57
|
+
direction: string;
|
|
58
|
+
channelLabel: string;
|
|
59
|
+
}
|
|
60
|
+
export interface BaseMultiChannelSelectorProps {
|
|
61
|
+
showSelector: (bounds: Bounds) => void;
|
|
62
|
+
outsideClass: string;
|
|
63
|
+
contentClass: string;
|
|
64
|
+
selectedChannels: {
|
|
65
|
+
name: string;
|
|
66
|
+
color: string;
|
|
67
|
+
}[];
|
|
68
|
+
channelRestrictions: {
|
|
69
|
+
read: boolean;
|
|
70
|
+
write: boolean;
|
|
71
|
+
};
|
|
72
|
+
channelLabel: string;
|
|
57
73
|
}
|
|
58
74
|
export interface FlatChannelSelectorProps {
|
|
59
75
|
showSelector: (bounds: Bounds) => void;
|
|
60
76
|
selectedChannel: string;
|
|
61
77
|
selectedChannelColor: string;
|
|
78
|
+
channelRestrictions: {
|
|
79
|
+
read: boolean;
|
|
80
|
+
write: boolean;
|
|
81
|
+
};
|
|
82
|
+
channelLabel: string;
|
|
83
|
+
}
|
|
84
|
+
export interface FlatMultiChannelSelectorProps {
|
|
85
|
+
showSelector: (bounds: Bounds) => void;
|
|
86
|
+
selectedChannels: {
|
|
87
|
+
name: string;
|
|
88
|
+
color: string;
|
|
89
|
+
}[];
|
|
90
|
+
channelRestrictions: {
|
|
91
|
+
read: boolean;
|
|
92
|
+
write: boolean;
|
|
93
|
+
};
|
|
94
|
+
channelLabel: string;
|
|
62
95
|
}
|
|
63
96
|
export interface TabChannelSelectorProps {
|
|
64
97
|
showSelector: (bounds: Bounds) => void;
|
|
65
98
|
selectedChannel: string;
|
|
66
99
|
selectedChannelColor: string;
|
|
100
|
+
channelRestrictions: {
|
|
101
|
+
read: boolean;
|
|
102
|
+
write: boolean;
|
|
103
|
+
};
|
|
104
|
+
channelLabel: string;
|
|
105
|
+
}
|
|
106
|
+
export interface TabMultiChannelSelectorProps {
|
|
107
|
+
showSelector: (bounds: Bounds) => void;
|
|
108
|
+
selectedChannels: {
|
|
109
|
+
name: string;
|
|
110
|
+
color: string;
|
|
111
|
+
}[];
|
|
112
|
+
channelRestrictions: {
|
|
113
|
+
read: boolean;
|
|
114
|
+
write: boolean;
|
|
115
|
+
};
|
|
116
|
+
channelLabel: string;
|
|
67
117
|
}
|
|
68
118
|
export interface FlatCaptionEditorProps {
|
|
69
119
|
frameId: string;
|
|
@@ -102,6 +102,16 @@ export interface CreateFrameCaptionBarRequestOptions extends CreateButtonsOption
|
|
|
102
102
|
show: boolean;
|
|
103
103
|
text?: string;
|
|
104
104
|
};
|
|
105
|
+
channelsMode: "single" | "multi";
|
|
106
|
+
selectedChannels: {
|
|
107
|
+
name: string;
|
|
108
|
+
color: string;
|
|
109
|
+
}[];
|
|
110
|
+
channelRestrictions: {
|
|
111
|
+
read: boolean;
|
|
112
|
+
write: boolean;
|
|
113
|
+
};
|
|
114
|
+
channelLabel: string;
|
|
105
115
|
}
|
|
106
116
|
export interface CreateTabRequestOptions extends CreateElementRequestOptions {
|
|
107
117
|
caption: string;
|
|
@@ -115,6 +125,16 @@ export interface CreateTabRequestOptions extends CreateElementRequestOptions {
|
|
|
115
125
|
show: boolean;
|
|
116
126
|
text?: string;
|
|
117
127
|
};
|
|
128
|
+
channelsMode: "single" | "multi";
|
|
129
|
+
selectedChannels: {
|
|
130
|
+
name: string;
|
|
131
|
+
color: string;
|
|
132
|
+
}[];
|
|
133
|
+
channelRestrictions: {
|
|
134
|
+
read: boolean;
|
|
135
|
+
write: boolean;
|
|
136
|
+
};
|
|
137
|
+
channelLabel: string;
|
|
118
138
|
}
|
|
119
139
|
export interface UpdateStandardButtonRequestOptions extends CreateElementRequestOptions {
|
|
120
140
|
buttonId: StandardButtons;
|
|
@@ -177,6 +197,8 @@ export interface CreateButtonsOptions extends CreateFrameElementRequestOptions {
|
|
|
177
197
|
visible: boolean;
|
|
178
198
|
};
|
|
179
199
|
customButtons: UpdateCustomButtonOptions[];
|
|
200
|
+
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
201
|
+
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
180
202
|
}
|
|
181
203
|
export interface RemoveRequestOptions {
|
|
182
204
|
targetId: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function IsBlackReadable(color: string): boolean;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -41,7 +41,9 @@ import useCaptionEditor from "./defaultComponents/captionEditor/useCaptionEditor
|
|
|
41
41
|
import FrameLoadingAnimation from "./defaultComponents/loadingAnimation/FrameLoadingAnimation";
|
|
42
42
|
import HtmlButtons from "./defaultComponents/htmlButtonsBar/buttons";
|
|
43
43
|
import TabOverflowPopup from "./defaultComponents/popups/TabOverflowPopup";
|
|
44
|
-
|
|
44
|
+
import TabMultiChannelSelector from "./defaultComponents/channelSelector/multi/TabMultiChannelSelector";
|
|
45
|
+
import FlatMultiChannelSelector from "./defaultComponents/channelSelector/multi/FlatMultiChannelSelector";
|
|
46
|
+
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, useCommitGroupCaptionEditingRequested, useCommitFlatCaptionEditingRequested, useCommitTabCaptionEditingRequested, };
|
|
45
47
|
export declare const getGroupId: () => string;
|
|
46
48
|
export declare const requestPageFocus: () => void;
|
|
47
49
|
export declare const requestFrameFocus: (frameId: string) => void;
|
package/dist/esm/index.js
CHANGED
|
@@ -570,10 +570,30 @@ function IsBlackReadable(color) {
|
|
|
570
570
|
console.error("Error while checking readable color for '" + color + "'", error);
|
|
571
571
|
}
|
|
572
572
|
return false;
|
|
573
|
+
}
|
|
574
|
+
function getChannelDirection(channelRestrictions) {
|
|
575
|
+
if (!channelRestrictions) {
|
|
576
|
+
return "";
|
|
577
|
+
}
|
|
578
|
+
if (typeof channelRestrictions.read === "boolean" && typeof channelRestrictions.write === "boolean") {
|
|
579
|
+
if (channelRestrictions.read && channelRestrictions.write) {
|
|
580
|
+
return "";
|
|
581
|
+
}
|
|
582
|
+
if (channelRestrictions.read) {
|
|
583
|
+
return "subscribe";
|
|
584
|
+
}
|
|
585
|
+
if (channelRestrictions.write) {
|
|
586
|
+
return "publish";
|
|
587
|
+
}
|
|
588
|
+
return "";
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
return "";
|
|
592
|
+
}
|
|
573
593
|
}
|
|
574
594
|
|
|
575
595
|
var BaseChannelSelector = function (_a) {
|
|
576
|
-
var outsideClass = _a.outsideClass, contentClass = _a.contentClass, showSelector = _a.showSelector, selectedChannel = _a.selectedChannel, selectedChannelColor = _a.selectedChannelColor;
|
|
596
|
+
var outsideClass = _a.outsideClass, contentClass = _a.contentClass, showSelector = _a.showSelector, selectedChannel = _a.selectedChannel, selectedChannelColor = _a.selectedChannelColor, direction = _a.direction, channelLabel = _a.channelLabel;
|
|
577
597
|
var ref = useRef(null);
|
|
578
598
|
var wrappedOnClick = function () {
|
|
579
599
|
if (!ref.current) {
|
|
@@ -588,10 +608,14 @@ var BaseChannelSelector = function (_a) {
|
|
|
588
608
|
});
|
|
589
609
|
};
|
|
590
610
|
useEffect(function () {
|
|
591
|
-
var
|
|
592
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener("mousedown", function (e) {
|
|
611
|
+
var handler = function (e) {
|
|
593
612
|
e.stopPropagation();
|
|
594
|
-
}
|
|
613
|
+
};
|
|
614
|
+
var current = ref.current;
|
|
615
|
+
current === null || current === void 0 ? void 0 : current.addEventListener("mousedown", handler);
|
|
616
|
+
return function () {
|
|
617
|
+
current === null || current === void 0 ? void 0 : current.removeEventListener("mousedown", handler);
|
|
618
|
+
};
|
|
595
619
|
}, [ref]);
|
|
596
620
|
var className = contentClass;
|
|
597
621
|
if (selectedChannel && selectedChannelColor) {
|
|
@@ -600,13 +624,15 @@ var BaseChannelSelector = function (_a) {
|
|
|
600
624
|
var style = {
|
|
601
625
|
background: selectedChannelColor
|
|
602
626
|
};
|
|
603
|
-
return React.createElement("div", { title: selectedChannel !== null && selectedChannel !== void 0 ? selectedChannel : "", ref: ref, style: style, onClick: wrappedOnClick, className: "t42-buttons " + outsideClass },
|
|
604
|
-
React.createElement("div", { className: className }
|
|
627
|
+
return React.createElement("div", { title: selectedChannel !== null && selectedChannel !== void 0 ? selectedChannel : "", ref: ref, style: style, onClick: wrappedOnClick, className: "t42-buttons " + outsideClass }, channelLabel ?
|
|
628
|
+
React.createElement("div", { className: className + " " + (direction ? "icon" : "") },
|
|
629
|
+
channelLabel,
|
|
630
|
+
direction && React.createElement("i", { className: "icon-" + direction })) : React.createElement("div", { className: className }));
|
|
605
631
|
};
|
|
606
632
|
|
|
607
633
|
var FlatChannelSelector = function (_a) {
|
|
608
|
-
var showSelector = _a.showSelector, selectedChannel = _a.selectedChannel, selectedChannelColor = _a.selectedChannelColor;
|
|
609
|
-
return React.createElement(BaseChannelSelector, { outsideClass: "t42-frame-caption-bar-element t42-frame-channel-selector", contentClass: "t42-frame-channel-selector-content", showSelector: showSelector, selectedChannel: selectedChannel, selectedChannelColor: selectedChannelColor });
|
|
634
|
+
var showSelector = _a.showSelector, selectedChannel = _a.selectedChannel, selectedChannelColor = _a.selectedChannelColor, channelRestrictions = _a.channelRestrictions, channelLabel = _a.channelLabel;
|
|
635
|
+
return React.createElement(BaseChannelSelector, { outsideClass: channelLabel ? "t42-frame-caption-bar-element t42-frame-channel-selector t42-channel-selector-direction" : "t42-frame-caption-bar-element t42-frame-channel-selector", contentClass: !channelLabel ? "t42-frame-channel-selector-content" : "", showSelector: showSelector, selectedChannel: selectedChannel, selectedChannelColor: selectedChannelColor, direction: getChannelDirection(channelRestrictions), channelLabel: channelLabel });
|
|
610
636
|
};
|
|
611
637
|
|
|
612
638
|
var ExtractButton = function (_a) {
|
|
@@ -1761,10 +1787,64 @@ var FlatMoveArea = function (_a) {
|
|
|
1761
1787
|
return React.createElement("div", { id: moveAreaId, className: "t42-move-area t42-frame-caption-bar-element" }, children);
|
|
1762
1788
|
};
|
|
1763
1789
|
|
|
1790
|
+
var BaseMultiChannelSelector = function (_a) {
|
|
1791
|
+
var _b, _c, _d;
|
|
1792
|
+
var outsideClass = _a.outsideClass, contentClass = _a.contentClass, showSelector = _a.showSelector, selectedChannels = _a.selectedChannels, channelLabel = _a.channelLabel, channelRestrictions = _a.channelRestrictions;
|
|
1793
|
+
var ref = useRef(null);
|
|
1794
|
+
var len = selectedChannels.length;
|
|
1795
|
+
var showBaseChannelSelector = len < 2;
|
|
1796
|
+
var wrappedOnClick = function () {
|
|
1797
|
+
if (!ref.current) {
|
|
1798
|
+
return;
|
|
1799
|
+
}
|
|
1800
|
+
var bounds = ref.current.getBoundingClientRect();
|
|
1801
|
+
showSelector({
|
|
1802
|
+
left: bounds.left,
|
|
1803
|
+
top: bounds.top,
|
|
1804
|
+
width: bounds.width,
|
|
1805
|
+
height: bounds.height,
|
|
1806
|
+
});
|
|
1807
|
+
};
|
|
1808
|
+
useEffect(function () {
|
|
1809
|
+
var _a;
|
|
1810
|
+
if (showBaseChannelSelector) {
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
var handler = function (e) {
|
|
1814
|
+
e.stopPropagation();
|
|
1815
|
+
};
|
|
1816
|
+
var current = ref.current;
|
|
1817
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener("mousedown", handler);
|
|
1818
|
+
return function () {
|
|
1819
|
+
current === null || current === void 0 ? void 0 : current.removeEventListener("mousedown", handler);
|
|
1820
|
+
};
|
|
1821
|
+
}, [ref, showBaseChannelSelector]);
|
|
1822
|
+
if (showBaseChannelSelector) {
|
|
1823
|
+
return React.createElement(BaseChannelSelector, { showSelector: showSelector, selectedChannel: (_b = selectedChannels[0]) === null || _b === void 0 ? void 0 : _b.name, selectedChannelColor: (_c = selectedChannels[0]) === null || _c === void 0 ? void 0 : _c.color, outsideClass: outsideClass, contentClass: contentClass, channelLabel: channelLabel, direction: getChannelDirection(channelRestrictions) });
|
|
1824
|
+
}
|
|
1825
|
+
var colors = (_d = selectedChannels.map(function (channel) { return channel.color; })) !== null && _d !== void 0 ? _d : [];
|
|
1826
|
+
var title = colors.join(", ");
|
|
1827
|
+
var lenMax4 = Math.min(len, 4);
|
|
1828
|
+
var cssClass = "t42-multi-channel-selector-content t42-multi-channel-selector-" + lenMax4;
|
|
1829
|
+
var style = {};
|
|
1830
|
+
colors.forEach(function (color, index) {
|
|
1831
|
+
var colorVarName = "--t42-multi-channel-selector-" + lenMax4 + "-color-" + (index + 1);
|
|
1832
|
+
style[colorVarName] = color;
|
|
1833
|
+
});
|
|
1834
|
+
return (React.createElement("div", { id: "basem", title: title, ref: ref, onClick: wrappedOnClick, className: "t42-buttons " + outsideClass },
|
|
1835
|
+
React.createElement("div", { className: cssClass, style: style })));
|
|
1836
|
+
};
|
|
1837
|
+
|
|
1838
|
+
var FlatMultiChannelSelector = function (_a) {
|
|
1839
|
+
var showSelector = _a.showSelector, selectedChannels = _a.selectedChannels, channelRestrictions = _a.channelRestrictions, channelLabel = _a.channelLabel;
|
|
1840
|
+
return React.createElement(BaseMultiChannelSelector, { outsideClass: channelLabel ? "t42-frame-caption-bar-element t42-frame-channel-selector t42-channel-selector-direction" : "t42-frame-caption-bar-element t42-frame-channel-selector", contentClass: !channelLabel ? "t42-frame-channel-selector-content" : "", showSelector: showSelector, selectedChannels: selectedChannels, channelRestrictions: channelRestrictions, channelLabel: channelLabel });
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1764
1843
|
var FlatCaptionBar = function (_a) {
|
|
1765
1844
|
var moveAreaId = _a.moveAreaId, caption = _a.caption, channels = _a.channels, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "caption", "channels", "captionEditor", "notifyCaptionBoundsChanged"]);
|
|
1766
1845
|
return (React.createElement("div", { className: "t42-react-caption-bar" },
|
|
1767
|
-
(channels === null || channels === void 0 ? void 0 : channels.visible) && React.createElement(FlatChannelSelector, { showSelector: channels === null || channels === void 0 ? void 0 : channels.showSelector, selectedChannel: channels === null || channels === void 0 ? void 0 : channels.selectedChannel, selectedChannelColor: channels === null || channels === void 0 ? void 0 : channels.selectedChannelColor }),
|
|
1846
|
+
(channels === null || channels === void 0 ? void 0 : channels.visible) && channels.channelsMode !== "multi" && React.createElement(FlatChannelSelector, { showSelector: channels === null || channels === void 0 ? void 0 : channels.showSelector, selectedChannel: channels === null || channels === void 0 ? void 0 : channels.selectedChannel, selectedChannelColor: channels === null || channels === void 0 ? void 0 : channels.selectedChannelColor, channelRestrictions: channels === null || channels === void 0 ? void 0 : channels.channelRestrictions, channelLabel: channels === null || channels === void 0 ? void 0 : channels.channelLabel }),
|
|
1847
|
+
(channels === null || channels === void 0 ? void 0 : channels.visible) && channels.channelsMode === "multi" && React.createElement(FlatMultiChannelSelector, { showSelector: channels === null || channels === void 0 ? void 0 : channels.showSelector, selectedChannels: channels === null || channels === void 0 ? void 0 : channels.selectedChannels, channelRestrictions: channels === null || channels === void 0 ? void 0 : channels.channelRestrictions, channelLabel: channels === null || channels === void 0 ? void 0 : channels.channelLabel }),
|
|
1768
1848
|
React.createElement(FlatMoveArea, { moveAreaId: moveAreaId }, captionEditor.show ? React.createElement(FlatCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, frameId: rest.frameId })) : React.createElement(FlatCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
|
|
1769
1849
|
React.createElement(FlatButtons, __assign({}, rest))));
|
|
1770
1850
|
};
|
|
@@ -1805,8 +1885,13 @@ var GroupCaptionBar = function (_a) {
|
|
|
1805
1885
|
};
|
|
1806
1886
|
|
|
1807
1887
|
var TabChannelSelector = function (_a) {
|
|
1808
|
-
var showSelector = _a.showSelector, selectedChannel = _a.selectedChannel, selectedChannelColor = _a.selectedChannelColor;
|
|
1809
|
-
return React.createElement(BaseChannelSelector, { outsideClass: "t42-tab-bar-element t42-tab-channel-selector", contentClass: "t42-tab-channel-selector-content", showSelector: showSelector, selectedChannel: selectedChannel, selectedChannelColor: selectedChannelColor });
|
|
1888
|
+
var showSelector = _a.showSelector, selectedChannel = _a.selectedChannel, selectedChannelColor = _a.selectedChannelColor, channelRestrictions = _a.channelRestrictions, channelLabel = _a.channelLabel;
|
|
1889
|
+
return React.createElement(BaseChannelSelector, { outsideClass: channelLabel ? "t42-tab-bar-element t42-tab-channel-selector t42-channel-selector-direction" : "t42-tab-bar-element t42-tab-channel-selector", contentClass: !channelLabel ? "t42-tab-channel-selector-content" : "", showSelector: showSelector, selectedChannel: selectedChannel, selectedChannelColor: selectedChannelColor, direction: getChannelDirection(channelRestrictions), channelLabel: channelLabel });
|
|
1890
|
+
};
|
|
1891
|
+
|
|
1892
|
+
var TabMultiChannelSelector = function (_a) {
|
|
1893
|
+
var showSelector = _a.showSelector, selectedChannels = _a.selectedChannels, channelRestrictions = _a.channelRestrictions, channelLabel = _a.channelLabel;
|
|
1894
|
+
return React.createElement(BaseMultiChannelSelector, { outsideClass: channelLabel ? "t42-tab-bar-element t42-tab-channel-selector t42-channel-selector-direction" : "t42-tab-bar-element t42-tab-channel-selector", contentClass: !channelLabel ? "t42-tab-channel-selector-content" : "", showSelector: showSelector, selectedChannels: selectedChannels, channelRestrictions: channelRestrictions, channelLabel: channelLabel });
|
|
1810
1895
|
};
|
|
1811
1896
|
|
|
1812
1897
|
var TabCaption = function (_a) {
|
|
@@ -1844,7 +1929,8 @@ var TabCloseButton = function (_a) {
|
|
|
1844
1929
|
var Tab = function (_a) {
|
|
1845
1930
|
var caption = _a.caption, selected = _a.selected, close = _a.close, channels = _a.channels, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, windowId = _a.windowId, pinned = _a.pinned;
|
|
1846
1931
|
return React.createElement("div", { className: "t42-react-tab" },
|
|
1847
|
-
channels.visible && React.createElement(TabChannelSelector, __assign({}, channels)),
|
|
1932
|
+
channels.visible && channels.channelsMode !== "multi" && React.createElement(TabChannelSelector, __assign({}, channels)),
|
|
1933
|
+
channels.visible && channels.channelsMode === "multi" && React.createElement(TabMultiChannelSelector, __assign({}, channels)),
|
|
1848
1934
|
captionEditor.show ?
|
|
1849
1935
|
React.createElement(TabCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, selected: selected, windowId: windowId })) :
|
|
1850
1936
|
React.createElement(TabCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption, selected: selected }),
|
|
@@ -2961,6 +3047,7 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
2961
3047
|
var _a;
|
|
2962
3048
|
var FrameCaptionBarCustomElement = (_a = components === null || components === void 0 ? void 0 : components.flat) === null || _a === void 0 ? void 0 : _a.CaptionBar;
|
|
2963
3049
|
return Object.values(state.frameCaptionBars).map(function (fcb) {
|
|
3050
|
+
var _a;
|
|
2964
3051
|
if (!FrameCaptionBarCustomElement || !fcb.parentElement) {
|
|
2965
3052
|
return;
|
|
2966
3053
|
}
|
|
@@ -3016,7 +3103,11 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3016
3103
|
showSelector: showSelector,
|
|
3017
3104
|
visible: options.channelSelectorVisible,
|
|
3018
3105
|
selectedChannel: options.selectedChannel,
|
|
3019
|
-
selectedChannelColor: options.selectedChannelColor
|
|
3106
|
+
selectedChannelColor: options.selectedChannelColor,
|
|
3107
|
+
channelRestrictions: options.channelRestrictions,
|
|
3108
|
+
channelLabel: options.channelLabel,
|
|
3109
|
+
channelsMode: (_a = options.channelsMode) !== null && _a !== void 0 ? _a : "single",
|
|
3110
|
+
selectedChannels: options.selectedChannels
|
|
3020
3111
|
};
|
|
3021
3112
|
var captionEditor = __assign(__assign({}, options.captionEditor), { commitChanges: function (text) {
|
|
3022
3113
|
webGroupsManager.commitCaptionEditing(TargetType.Frame, options.targetId, text);
|
|
@@ -3119,7 +3210,7 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3119
3210
|
var _a;
|
|
3120
3211
|
var TabCustomElement = (_a = components === null || components === void 0 ? void 0 : components.tabs) === null || _a === void 0 ? void 0 : _a.Element;
|
|
3121
3212
|
return Object.values(state.tabElements).map(function (te) {
|
|
3122
|
-
var _a;
|
|
3213
|
+
var _a, _b;
|
|
3123
3214
|
if (!TabCustomElement || !te.parentElement) {
|
|
3124
3215
|
return;
|
|
3125
3216
|
}
|
|
@@ -3134,7 +3225,11 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3134
3225
|
showSelector: showSelector,
|
|
3135
3226
|
visible: options.channelSelectorVisible,
|
|
3136
3227
|
selectedChannel: options.selectedChannel,
|
|
3137
|
-
selectedChannelColor: (_a = options.selectedChannelColor) !== null && _a !== void 0 ? _a : options.selectedChannel
|
|
3228
|
+
selectedChannelColor: (_a = options.selectedChannelColor) !== null && _a !== void 0 ? _a : options.selectedChannel,
|
|
3229
|
+
channelRestrictions: options.channelRestrictions,
|
|
3230
|
+
channelLabel: options.channelLabel,
|
|
3231
|
+
channelsMode: (_b = options.channelsMode) !== null && _b !== void 0 ? _b : "single",
|
|
3232
|
+
selectedChannels: options.selectedChannels
|
|
3138
3233
|
};
|
|
3139
3234
|
var captionEditor = __assign(__assign({}, options.captionEditor), { commitChanges: function (text) {
|
|
3140
3235
|
webGroupsManager.commitCaptionEditing(TargetType.Tab, options.targetId, text);
|
|
@@ -3431,5 +3526,5 @@ var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webG
|
|
|
3431
3526
|
var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
|
|
3432
3527
|
var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
|
|
3433
3528
|
|
|
3434
|
-
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 };
|
|
3529
|
+
export { CloneButton, CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FlatMultiChannelSelector, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, HtmlButtons, LockButton, MaximizeButton, MinimizeButton, OverflowButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, TabMultiChannelSelector, TabOverflowPopup, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, openTabOverflowPopup, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
|
|
3435
3530
|
//# sourceMappingURL=index.js.map
|