@interopio/groups-ui-react 2.0.0 → 2.0.2
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/htmlButtonsBar/buttons.d.ts +4 -0
- package/dist/cjs/index.d.ts +4 -3
- package/dist/cjs/index.js +190 -110
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/api.d.ts +5 -0
- package/dist/cjs/types/internal.d.ts +11 -43
- package/dist/cjs/webGroupsManager.d.ts +9 -22
- package/dist/cjs/webGroupsStore.d.ts +6 -3
- package/dist/esm/defaultComponents/htmlButtonsBar/buttons.d.ts +4 -0
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +190 -111
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api.d.ts +5 -0
- package/dist/esm/types/internal.d.ts +11 -43
- package/dist/esm/webGroupsManager.d.ts +9 -22
- package/dist/esm/webGroupsStore.d.ts +6 -3
- package/dist/styles/groups.css +16 -0
- package/dist/styles/vars.css +2 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -60,6 +60,7 @@ var TargetType;
|
|
|
60
60
|
TargetType["Frame"] = "frame";
|
|
61
61
|
TargetType["TabBar"] = "tabBar";
|
|
62
62
|
TargetType["Tab"] = "tab";
|
|
63
|
+
TargetType["HtmlButtons"] = "html";
|
|
63
64
|
})(TargetType || (TargetType = {}));
|
|
64
65
|
var StandardButtons;
|
|
65
66
|
(function (StandardButtons) {
|
|
@@ -234,71 +235,32 @@ var WebGroupsManagerDecorator = /** @class */ (function () {
|
|
|
234
235
|
WebGroupsManagerDecorator.prototype.requestGroupFocus = function () {
|
|
235
236
|
return window.webGroupsManager.externalLibraryFactory.focusGroup();
|
|
236
237
|
};
|
|
237
|
-
WebGroupsManagerDecorator.prototype.
|
|
238
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
238
|
+
WebGroupsManagerDecorator.prototype.onCloseButtonClick = function (targetType, targetId) {
|
|
239
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Close);
|
|
239
240
|
};
|
|
240
|
-
WebGroupsManagerDecorator.prototype.
|
|
241
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
241
|
+
WebGroupsManagerDecorator.prototype.onRestoreButtonClick = function (targetType, targetId) {
|
|
242
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Restore);
|
|
242
243
|
};
|
|
243
|
-
WebGroupsManagerDecorator.prototype.
|
|
244
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
244
|
+
WebGroupsManagerDecorator.prototype.onMaximizeButtonClick = function (targetType, targetId) {
|
|
245
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Maximize);
|
|
245
246
|
};
|
|
246
|
-
WebGroupsManagerDecorator.prototype.
|
|
247
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
247
|
+
WebGroupsManagerDecorator.prototype.onMinimizeButtonClick = function (targetType, targetId) {
|
|
248
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Minimize);
|
|
248
249
|
};
|
|
249
|
-
WebGroupsManagerDecorator.prototype.
|
|
250
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
250
|
+
WebGroupsManagerDecorator.prototype.onLockButtonClick = function (targetType, targetId) {
|
|
251
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Lock);
|
|
251
252
|
};
|
|
252
|
-
WebGroupsManagerDecorator.prototype.
|
|
253
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
253
|
+
WebGroupsManagerDecorator.prototype.onUnlockButtonClick = function (targetType, targetId) {
|
|
254
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Unlock);
|
|
254
255
|
};
|
|
255
|
-
WebGroupsManagerDecorator.prototype.
|
|
256
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
256
|
+
WebGroupsManagerDecorator.prototype.onFeedbackButtonClick = function (targetType, targetId) {
|
|
257
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Feedback);
|
|
257
258
|
};
|
|
258
|
-
WebGroupsManagerDecorator.prototype.
|
|
259
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
259
|
+
WebGroupsManagerDecorator.prototype.onStickyButtonClick = function (targetType, targetId) {
|
|
260
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Sticky);
|
|
260
261
|
};
|
|
261
|
-
WebGroupsManagerDecorator.prototype.
|
|
262
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(
|
|
263
|
-
};
|
|
264
|
-
WebGroupsManagerDecorator.prototype.closeTabBar = function (targetId) {
|
|
265
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Close);
|
|
266
|
-
};
|
|
267
|
-
WebGroupsManagerDecorator.prototype.restoreTabBar = function (targetId) {
|
|
268
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Restore);
|
|
269
|
-
};
|
|
270
|
-
WebGroupsManagerDecorator.prototype.maximizeTabBar = function (targetId) {
|
|
271
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Maximize);
|
|
272
|
-
};
|
|
273
|
-
WebGroupsManagerDecorator.prototype.minimizeTabBar = function (targetId) {
|
|
274
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Minimize);
|
|
275
|
-
};
|
|
276
|
-
WebGroupsManagerDecorator.prototype.lockTabBar = function (targetId) {
|
|
277
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Lock);
|
|
278
|
-
};
|
|
279
|
-
WebGroupsManagerDecorator.prototype.unlockTabBar = function (targetId) {
|
|
280
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Unlock);
|
|
281
|
-
};
|
|
282
|
-
WebGroupsManagerDecorator.prototype.feedbackTabBar = function (targetId) {
|
|
283
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Feedback);
|
|
284
|
-
};
|
|
285
|
-
WebGroupsManagerDecorator.prototype.stickyTabBar = function (targetId) {
|
|
286
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Sticky);
|
|
287
|
-
};
|
|
288
|
-
WebGroupsManagerDecorator.prototype.extractTabBar = function (targetId) {
|
|
289
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.TabBar, targetId, StandardButtons.Extract);
|
|
290
|
-
};
|
|
291
|
-
WebGroupsManagerDecorator.prototype.closeGroup = function (targetId) {
|
|
292
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.Group, targetId, StandardButtons.Close);
|
|
293
|
-
};
|
|
294
|
-
WebGroupsManagerDecorator.prototype.restoreGroup = function (targetId) {
|
|
295
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.Group, targetId, StandardButtons.Restore);
|
|
296
|
-
};
|
|
297
|
-
WebGroupsManagerDecorator.prototype.maximizeGroup = function (targetId) {
|
|
298
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.Group, targetId, StandardButtons.Maximize);
|
|
299
|
-
};
|
|
300
|
-
WebGroupsManagerDecorator.prototype.minimizeGroup = function (targetId) {
|
|
301
|
-
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(TargetType.Group, targetId, StandardButtons.Minimize);
|
|
262
|
+
WebGroupsManagerDecorator.prototype.onExtractButtonClick = function (targetType, targetId) {
|
|
263
|
+
window.webGroupsManager.externalLibraryFactory.onStandardButtonClick(targetType, targetId, StandardButtons.Extract);
|
|
302
264
|
};
|
|
303
265
|
WebGroupsManagerDecorator.prototype.closeTab = function (targetId) {
|
|
304
266
|
window.webGroupsManager.externalLibraryFactory.onTabCloseButtonClick(targetId);
|
|
@@ -2161,6 +2123,8 @@ var GroupWrapper = /** @class */ (function (_super) {
|
|
|
2161
2123
|
createTabBarButtonsContainerElement: this.props.onCreateTabHeaderButtonsRequested,
|
|
2162
2124
|
createBelowTabs: this.props.onCreateBelowTabsRequested,
|
|
2163
2125
|
updateBelowTabs: this.props.onUpdateBelowTabsRequested,
|
|
2126
|
+
createHtmlButtonsContainerElement: this.props.onCreateHtmlButtonsRequested,
|
|
2127
|
+
destroyHtmlButtonsContainerElement: this.props.onRemoveHtmlButtonsRequested,
|
|
2164
2128
|
updateFrame: this.props.onUpdateFrameRequested,
|
|
2165
2129
|
updateStandardButton: this.props.onUpdateStandardButtonRequested,
|
|
2166
2130
|
updateCustomButtons: this.props.onUpdateCustomButtonsRequested,
|
|
@@ -2221,6 +2185,7 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2221
2185
|
tabHeaderButtons: {},
|
|
2222
2186
|
belowTabsZones: {},
|
|
2223
2187
|
frameLoadingAnimations: {},
|
|
2188
|
+
htmlButtons: {},
|
|
2224
2189
|
};
|
|
2225
2190
|
this.subscribe = function (cb) {
|
|
2226
2191
|
_this.listeners.add(cb);
|
|
@@ -2360,6 +2325,24 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2360
2325
|
return __assign(__assign({}, s), { belowTabsZones: __assign(__assign({}, s.belowTabsZones), (_a = {}, _a[options.targetId] = options, _a)) });
|
|
2361
2326
|
});
|
|
2362
2327
|
};
|
|
2328
|
+
this.onCreateHtmlButtonsRequested = function (options) {
|
|
2329
|
+
if (options === _this.state.htmlButtons[options.targetId] || !options) {
|
|
2330
|
+
return;
|
|
2331
|
+
}
|
|
2332
|
+
_this.setState(function (s) {
|
|
2333
|
+
var _a;
|
|
2334
|
+
return __assign(__assign({}, s), { htmlButtons: __assign(__assign({}, s.htmlButtons), (_a = {}, _a[options.targetId] = options, _a)) });
|
|
2335
|
+
});
|
|
2336
|
+
};
|
|
2337
|
+
this.onUpdateHtmlButtonsRequested = function (options) {
|
|
2338
|
+
if (options === _this.state.htmlButtons[options.targetId] || !options) {
|
|
2339
|
+
return;
|
|
2340
|
+
}
|
|
2341
|
+
_this.setState(function (s) {
|
|
2342
|
+
var _a;
|
|
2343
|
+
return __assign(__assign({}, s), { htmlButtons: __assign(__assign({}, s.htmlButtons), (_a = {}, _a[options.targetId] = __assign(__assign({}, s.htmlButtons[options.targetId]), options), _a)) });
|
|
2344
|
+
});
|
|
2345
|
+
};
|
|
2363
2346
|
this.onUpdateGroupCaptionBarRequested = function (options) {
|
|
2364
2347
|
if (options === _this.state.groupCaptionBar) {
|
|
2365
2348
|
return;
|
|
@@ -2468,38 +2451,48 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2468
2451
|
});
|
|
2469
2452
|
};
|
|
2470
2453
|
this.onUpdateStandardButton = function (options) {
|
|
2471
|
-
var _a, _b, _c;
|
|
2472
|
-
var
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2454
|
+
var _a, _b, _c, _d;
|
|
2455
|
+
var targetState = { targetId: options.targetId };
|
|
2456
|
+
switch (options.targetType) {
|
|
2457
|
+
case TargetType.Group:
|
|
2458
|
+
var currentGroupState = _this.state.groupCaptionBar || targetState;
|
|
2459
|
+
var newGroupOptions = __assign(__assign({}, currentGroupState), (_a = {}, _a[options.buttonId] = __assign({}, options), _a));
|
|
2460
|
+
_this.onUpdateGroupCaptionBarRequested(newGroupOptions);
|
|
2461
|
+
break;
|
|
2462
|
+
case TargetType.Frame:
|
|
2463
|
+
var currentFrameState = _this.state.frameCaptionBars[options.targetId] || targetState;
|
|
2464
|
+
var newFrameOptions = __assign(__assign({}, currentFrameState), (_b = {}, _b[options.buttonId] = __assign({}, options), _b));
|
|
2465
|
+
_this.onUpdateFrameCaptionBarRequested(newFrameOptions);
|
|
2466
|
+
break;
|
|
2467
|
+
case TargetType.TabBar:
|
|
2468
|
+
var currentTabButtonsState = _this.state.tabHeaderButtons[options.targetId] || targetState;
|
|
2469
|
+
var newTabButtonsOptions = __assign(__assign({}, currentTabButtonsState), (_c = {}, _c[options.buttonId] = __assign({}, options), _c));
|
|
2470
|
+
_this.onUpdateTabHeaderButtonsRequested(newTabButtonsOptions);
|
|
2471
|
+
break;
|
|
2472
|
+
case TargetType.HtmlButtons:
|
|
2473
|
+
var currentHtmlButtonsState = _this.state.htmlButtons[options.targetId] || targetState;
|
|
2474
|
+
var newHtmlButtonsOptions = __assign(__assign({}, currentHtmlButtonsState), (_d = {}, _d[options.buttonId] = __assign({}, options), _d));
|
|
2475
|
+
_this.onUpdateHtmlButtonsRequested(newHtmlButtonsOptions);
|
|
2476
|
+
break;
|
|
2489
2477
|
}
|
|
2490
2478
|
};
|
|
2491
2479
|
this.onUpdateCustomButtons = function (options) {
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2480
|
+
switch (options.targetType) {
|
|
2481
|
+
case TargetType.Frame:
|
|
2482
|
+
var currentFrameState = _this.state.frameCaptionBars[options.targetId] || { targetId: options.targetId };
|
|
2483
|
+
var newFrameOptions = __assign(__assign({}, currentFrameState), options);
|
|
2484
|
+
_this.onUpdateFrameCaptionBarRequested(newFrameOptions);
|
|
2485
|
+
break;
|
|
2486
|
+
case TargetType.TabBar:
|
|
2487
|
+
var currentTabBarState = _this.state.tabHeaderButtons.customButtons || { customButtons: options.customButtons };
|
|
2488
|
+
var newTabBarOptions = __assign(__assign({}, currentTabBarState), options);
|
|
2489
|
+
_this.onUpdateTabHeaderButtonsRequested(newTabBarOptions);
|
|
2490
|
+
break;
|
|
2491
|
+
case TargetType.HtmlButtons:
|
|
2492
|
+
var currentHtmlButtonsState = _this.state.htmlButtons.customButtons || { customButtons: options.customButtons };
|
|
2493
|
+
var newHtmlButtonsOptions = __assign(__assign({}, currentHtmlButtonsState), options);
|
|
2494
|
+
_this.onUpdateHtmlButtonsRequested(newHtmlButtonsOptions);
|
|
2495
|
+
break;
|
|
2503
2496
|
}
|
|
2504
2497
|
};
|
|
2505
2498
|
this.onRemoveFrameCaptionBarRequested = function (options) {
|
|
@@ -2670,6 +2663,20 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2670
2663
|
return __assign(__assign({}, s), { belowTabsZones: newTabElementsObj });
|
|
2671
2664
|
});
|
|
2672
2665
|
};
|
|
2666
|
+
this.onRemoveHtmlButtonsRequested = function (options) {
|
|
2667
|
+
if (!_this.state.htmlButtons[options.targetId]) {
|
|
2668
|
+
return;
|
|
2669
|
+
}
|
|
2670
|
+
_this.setState(function (s) {
|
|
2671
|
+
var newHtmlObj = Object.keys(s.htmlButtons).reduce(function (acc, targetId) {
|
|
2672
|
+
if (targetId != options.targetId) {
|
|
2673
|
+
acc[targetId] = s.htmlButtons[targetId];
|
|
2674
|
+
}
|
|
2675
|
+
return acc;
|
|
2676
|
+
}, {});
|
|
2677
|
+
return __assign(__assign({}, s), { htmlButtons: newHtmlObj });
|
|
2678
|
+
});
|
|
2679
|
+
};
|
|
2673
2680
|
this.onShowCaptionEditorRequested = function (targetType, targetId, text) {
|
|
2674
2681
|
if (targetType === TargetType.Group) {
|
|
2675
2682
|
_this.onShowGroupCaptionEditorRequested(targetId, text);
|
|
@@ -2811,7 +2818,7 @@ var WebGroupsStore = /** @class */ (function () {
|
|
|
2811
2818
|
var webGroupsStore = new WebGroupsStore();
|
|
2812
2819
|
|
|
2813
2820
|
var GroupElementCreationWrapper = function (_a) {
|
|
2814
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
2821
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
2815
2822
|
var components = _a.components;
|
|
2816
2823
|
var state = shim.useSyncExternalStore(webGroupsStore.subscribe, webGroupsStore.getSnapshot);
|
|
2817
2824
|
var renderGroupCaptionBar = function () {
|
|
@@ -2822,16 +2829,16 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
2822
2829
|
}
|
|
2823
2830
|
var _b = state.groupCaptionBar, parentElement = _b.parentElement, options = __rest(_b, ["parentElement"]);
|
|
2824
2831
|
var minimize = __assign({ onClick: function () {
|
|
2825
|
-
webGroupsManager.
|
|
2832
|
+
webGroupsManager.onMinimizeButtonClick(TargetType.Group, options.targetId);
|
|
2826
2833
|
} }, options.minimize);
|
|
2827
2834
|
var restore = __assign({ onClick: function () {
|
|
2828
|
-
webGroupsManager.
|
|
2835
|
+
webGroupsManager.onRestoreButtonClick(TargetType.Group, options.targetId);
|
|
2829
2836
|
} }, options.restore);
|
|
2830
2837
|
var maximize = __assign({ onClick: function () {
|
|
2831
|
-
webGroupsManager.
|
|
2838
|
+
webGroupsManager.onMaximizeButtonClick(TargetType.Group, options.targetId);
|
|
2832
2839
|
} }, options.maximize);
|
|
2833
2840
|
var close = __assign({ onClick: function () {
|
|
2834
|
-
webGroupsManager.
|
|
2841
|
+
webGroupsManager.onCloseButtonClick(TargetType.Group, options.targetId);
|
|
2835
2842
|
} }, options.close);
|
|
2836
2843
|
var captionEditor = __assign(__assign({}, options.captionEditor), { commitChanges: function (text) {
|
|
2837
2844
|
webGroupsManager.commitCaptionEditing(TargetType.Group, options.targetId, text);
|
|
@@ -2865,31 +2872,31 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
2865
2872
|
}
|
|
2866
2873
|
var parentElement = fcb.parentElement, options = __rest(fcb, ["parentElement"]);
|
|
2867
2874
|
var feedback = __assign({ onClick: function () {
|
|
2868
|
-
webGroupsManager.
|
|
2875
|
+
webGroupsManager.onFeedbackButtonClick(TargetType.Frame, options.targetId);
|
|
2869
2876
|
} }, options.feedback);
|
|
2870
2877
|
var sticky = __assign({ onClick: function () {
|
|
2871
|
-
webGroupsManager.
|
|
2878
|
+
webGroupsManager.onStickyButtonClick(TargetType.Frame, options.targetId);
|
|
2872
2879
|
} }, options.sticky);
|
|
2873
2880
|
var extract = __assign({ onClick: function () {
|
|
2874
|
-
webGroupsManager.
|
|
2881
|
+
webGroupsManager.onExtractButtonClick(TargetType.Frame, options.targetId);
|
|
2875
2882
|
} }, options.extract);
|
|
2876
2883
|
var lock = __assign({ onClick: function () {
|
|
2877
|
-
webGroupsManager.
|
|
2884
|
+
webGroupsManager.onLockButtonClick(TargetType.Frame, options.targetId);
|
|
2878
2885
|
} }, options.lock);
|
|
2879
2886
|
var unlock = __assign({ onClick: function () {
|
|
2880
|
-
webGroupsManager.
|
|
2887
|
+
webGroupsManager.onUnlockButtonClick(TargetType.Frame, options.targetId);
|
|
2881
2888
|
} }, options.unlock);
|
|
2882
2889
|
var minimize = __assign({ onClick: function () {
|
|
2883
|
-
webGroupsManager.
|
|
2890
|
+
webGroupsManager.onMinimizeButtonClick(TargetType.Frame, options.targetId);
|
|
2884
2891
|
} }, options.minimize);
|
|
2885
2892
|
var restore = __assign({ onClick: function () {
|
|
2886
|
-
webGroupsManager.
|
|
2893
|
+
webGroupsManager.onRestoreButtonClick(TargetType.Frame, options.targetId);
|
|
2887
2894
|
} }, options.restore);
|
|
2888
2895
|
var maximize = __assign({ onClick: function () {
|
|
2889
|
-
webGroupsManager.
|
|
2896
|
+
webGroupsManager.onMaximizeButtonClick(TargetType.Frame, options.targetId);
|
|
2890
2897
|
} }, options.maximize);
|
|
2891
2898
|
var close = __assign({ onClick: function () {
|
|
2892
|
-
webGroupsManager.
|
|
2899
|
+
webGroupsManager.onCloseButtonClick(TargetType.Frame, options.targetId);
|
|
2893
2900
|
} }, options.close);
|
|
2894
2901
|
var customButtonsProps = new Array();
|
|
2895
2902
|
if (options.customButtons) {
|
|
@@ -3068,31 +3075,31 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3068
3075
|
}
|
|
3069
3076
|
var parentElement = te.parentElement, options = __rest(te, ["parentElement"]);
|
|
3070
3077
|
var feedback = __assign({ onClick: function () {
|
|
3071
|
-
webGroupsManager.
|
|
3078
|
+
webGroupsManager.onFeedbackButtonClick(TargetType.TabBar, options.targetId);
|
|
3072
3079
|
} }, options.feedback);
|
|
3073
3080
|
var sticky = __assign({ onClick: function () {
|
|
3074
|
-
webGroupsManager.
|
|
3081
|
+
webGroupsManager.onStickyButtonClick(TargetType.TabBar, options.targetId);
|
|
3075
3082
|
} }, options.sticky);
|
|
3076
3083
|
var extract = __assign({ onClick: function () {
|
|
3077
|
-
webGroupsManager.
|
|
3084
|
+
webGroupsManager.onExtractButtonClick(TargetType.TabBar, options.targetId);
|
|
3078
3085
|
} }, options.extract);
|
|
3079
3086
|
var lock = __assign({ onClick: function () {
|
|
3080
|
-
webGroupsManager.
|
|
3087
|
+
webGroupsManager.onLockButtonClick(TargetType.TabBar, options.targetId);
|
|
3081
3088
|
} }, options.lock);
|
|
3082
3089
|
var unlock = __assign({ onClick: function () {
|
|
3083
|
-
webGroupsManager.
|
|
3090
|
+
webGroupsManager.onUnlockButtonClick(TargetType.TabBar, options.targetId);
|
|
3084
3091
|
} }, options.unlock);
|
|
3085
3092
|
var minimize = __assign({ onClick: function () {
|
|
3086
|
-
webGroupsManager.
|
|
3093
|
+
webGroupsManager.onMinimizeButtonClick(TargetType.TabBar, options.targetId);
|
|
3087
3094
|
} }, options.minimize);
|
|
3088
3095
|
var restore = __assign({ onClick: function () {
|
|
3089
|
-
webGroupsManager.
|
|
3096
|
+
webGroupsManager.onRestoreButtonClick(TargetType.TabBar, options.targetId);
|
|
3090
3097
|
} }, options.restore);
|
|
3091
3098
|
var maximize = __assign({ onClick: function () {
|
|
3092
|
-
webGroupsManager.
|
|
3099
|
+
webGroupsManager.onMaximizeButtonClick(TargetType.TabBar, options.targetId);
|
|
3093
3100
|
} }, options.maximize);
|
|
3094
3101
|
var close = __assign({ onClick: function () {
|
|
3095
|
-
webGroupsManager.
|
|
3102
|
+
webGroupsManager.onCloseButtonClick(TargetType.TabBar, options.targetId);
|
|
3096
3103
|
} }, options.close);
|
|
3097
3104
|
var customButtonsProps = new Array();
|
|
3098
3105
|
if (options.customButtons) {
|
|
@@ -3124,6 +3131,59 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3124
3131
|
React.createElement(BelowTabsCustomElement, __assign({}, options, { frameId: options.targetId })));
|
|
3125
3132
|
});
|
|
3126
3133
|
};
|
|
3134
|
+
var renderHtmlButtons = function () {
|
|
3135
|
+
var _a;
|
|
3136
|
+
var HtmlButtonsCustomElement = (_a = components === null || components === void 0 ? void 0 : components.html) === null || _a === void 0 ? void 0 : _a.Buttons;
|
|
3137
|
+
return Object.values(state.htmlButtons).map(function (te) {
|
|
3138
|
+
if (!HtmlButtonsCustomElement || !te.parentElement) {
|
|
3139
|
+
return;
|
|
3140
|
+
}
|
|
3141
|
+
var parentElement = te.parentElement, options = __rest(te, ["parentElement"]);
|
|
3142
|
+
var feedback = __assign({ onClick: function () {
|
|
3143
|
+
webGroupsManager.onFeedbackButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3144
|
+
} }, options.feedback);
|
|
3145
|
+
var sticky = __assign({ onClick: function () {
|
|
3146
|
+
webGroupsManager.onStickyButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3147
|
+
} }, options.sticky);
|
|
3148
|
+
var extract = __assign({ onClick: function () {
|
|
3149
|
+
webGroupsManager.onExtractButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3150
|
+
} }, options.extract);
|
|
3151
|
+
var lock = __assign({ onClick: function () {
|
|
3152
|
+
webGroupsManager.onLockButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3153
|
+
} }, options.lock);
|
|
3154
|
+
var unlock = __assign({ onClick: function () {
|
|
3155
|
+
webGroupsManager.onUnlockButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3156
|
+
} }, options.unlock);
|
|
3157
|
+
var minimize = __assign({ onClick: function () {
|
|
3158
|
+
webGroupsManager.onMinimizeButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3159
|
+
} }, options.minimize);
|
|
3160
|
+
var restore = __assign({ onClick: function () {
|
|
3161
|
+
webGroupsManager.onRestoreButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3162
|
+
} }, options.restore);
|
|
3163
|
+
var maximize = __assign({ onClick: function () {
|
|
3164
|
+
webGroupsManager.onMaximizeButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3165
|
+
} }, options.maximize);
|
|
3166
|
+
var close = __assign({ onClick: function () {
|
|
3167
|
+
webGroupsManager.onCloseButtonClick(TargetType.HtmlButtons, options.targetId);
|
|
3168
|
+
} }, options.close);
|
|
3169
|
+
var customButtonsProps = new Array();
|
|
3170
|
+
if (options.customButtons) {
|
|
3171
|
+
customButtonsProps = options.customButtons.map(function (cButton) {
|
|
3172
|
+
return {
|
|
3173
|
+
onClick: function () {
|
|
3174
|
+
webGroupsManager.clickCustomButton(options.targetId, cButton.buttonId);
|
|
3175
|
+
},
|
|
3176
|
+
visible: true,
|
|
3177
|
+
imageData: cButton.imageData,
|
|
3178
|
+
tooltip: cButton.tooltip,
|
|
3179
|
+
buttonId: cButton.buttonId
|
|
3180
|
+
};
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
return React.createElement(Portal, { key: options.targetId, parentElement: parentElement },
|
|
3184
|
+
React.createElement(HtmlButtonsCustomElement, __assign({}, options, { feedback: feedback, sticky: sticky, extract: extract, lock: lock, unlock: unlock, minimize: minimize, maximize: maximize, restore: restore, close: close, customButtons: customButtonsProps, frameId: options.targetId })));
|
|
3185
|
+
});
|
|
3186
|
+
};
|
|
3127
3187
|
return React.createElement(React.Fragment, null,
|
|
3128
3188
|
renderGroupCaptionBar(),
|
|
3129
3189
|
renderGroupOverlay(),
|
|
@@ -3139,7 +3199,8 @@ var GroupElementCreationWrapper = function (_a) {
|
|
|
3139
3199
|
renderAfterTabsZones(),
|
|
3140
3200
|
renderTabHeaderButtons(),
|
|
3141
3201
|
renderBelowTabs(),
|
|
3142
|
-
|
|
3202
|
+
renderHtmlButtons(),
|
|
3203
|
+
React.createElement(GroupWrapper, { onCreateGroupCaptionBarRequested: ((_b = components === null || components === void 0 ? void 0 : components.group) === null || _b === void 0 ? void 0 : _b.CaptionBar) ? webGroupsStore.onCreateGroupCaptionBarRequested : undefined, onCreateGroupOverlayRequested: ((_c = components === null || components === void 0 ? void 0 : components.group) === null || _c === void 0 ? void 0 : _c.Overlay) ? webGroupsStore.onCreateGroupOverlayRequested : undefined, onCreateFrameCaptionBarRequested: ((_d = components === null || components === void 0 ? void 0 : components.flat) === null || _d === void 0 ? void 0 : _d.CaptionBar) ? webGroupsStore.onCreateFrameCaptionBarRequested : undefined, onCreateFrameWindowOverlayRequested: ((_e = components === null || components === void 0 ? void 0 : components.frame) === null || _e === void 0 ? void 0 : _e.Overlay) ? webGroupsStore.onCreateFrameWindowOverlayRequested : undefined, onCreateAboveWindowRequested: ((_f = components === null || components === void 0 ? void 0 : components.frame) === null || _f === void 0 ? void 0 : _f.AboveWindow) ? webGroupsStore.onCreateAboveWindowRequested : undefined, onCreateWindowContentOverlayRequested: ((_g = components === null || components === void 0 ? void 0 : components.frame) === null || _g === void 0 ? void 0 : _g.WindowContentOverlay) ? webGroupsStore.onCreateWindowContentOverlayRequested : undefined, onCreateFrameLoadingAnimationRequested: ((_h = components === null || components === void 0 ? void 0 : components.frame) === null || _h === void 0 ? void 0 : _h.LoadingAnimation) ? webGroupsStore.onCreateFrameLoadingAnimationRequested : undefined, onCreateBelowWindowRequested: ((_j = components === null || components === void 0 ? void 0 : components.frame) === null || _j === void 0 ? void 0 : _j.BelowWindow) ? webGroupsStore.onCreateBelowWindowRequested : undefined, onCreateAboveTabsRequested: ((_k = components === null || components === void 0 ? void 0 : components.tabs) === null || _k === void 0 ? void 0 : _k.Above) ? webGroupsStore.onCreateAboveTabsComponentRequested : undefined, onCreateBeforeTabsComponentRequested: ((_l = components === null || components === void 0 ? void 0 : components.tabs) === null || _l === void 0 ? void 0 : _l.Before) ? webGroupsStore.onCreateBeforeTabsComponentRequested : undefined, onCreateTabRequested: ((_m = components === null || components === void 0 ? void 0 : components.tabs) === null || _m === void 0 ? void 0 : _m.Element) ? webGroupsStore.onCreateTabElementRequested : undefined, onCreateAfterTabsComponentRequested: ((_o = components === null || components === void 0 ? void 0 : components.tabs) === null || _o === void 0 ? void 0 : _o.After) ? webGroupsStore.onCreateAfterTabsComponentRequested : undefined, onCreateTabHeaderButtonsRequested: ((_p = components === null || components === void 0 ? void 0 : components.tabs) === null || _p === void 0 ? void 0 : _p.Buttons) ? webGroupsStore.onCreateTabHeaderButtonsRequested : undefined, onCreateBelowTabsRequested: ((_q = components === null || components === void 0 ? void 0 : components.tabs) === null || _q === void 0 ? void 0 : _q.Below) ? webGroupsStore.onCreateBelowTabsComponentRequested : undefined, onCreateHtmlButtonsRequested: ((_r = components === null || components === void 0 ? void 0 : components.html) === null || _r === void 0 ? void 0 : _r.Buttons) ? webGroupsStore.onCreateHtmlButtonsRequested : undefined, onUpdateGroupCaptionBarRequested: ((_s = components === null || components === void 0 ? void 0 : components.group) === null || _s === void 0 ? void 0 : _s.CaptionBar) ? webGroupsStore.onUpdateGroupCaptionBarRequested : undefined, onUpdateFrameWindowOverlayRequested: ((_t = components === null || components === void 0 ? void 0 : components.group) === null || _t === void 0 ? void 0 : _t.Overlay) ? webGroupsStore.onUpdateFrameWindowOverlayRequested : undefined, onUpdateFrameCaptionBarRequested: ((_u = components === null || components === void 0 ? void 0 : components.flat) === null || _u === void 0 ? void 0 : _u.CaptionBar) ? webGroupsStore.onUpdateFrameCaptionBarRequested : undefined, onUpdateFrameRequested: webGroupsStore.onUpdateFrame, onUpdateStandardButtonRequested: webGroupsStore.onUpdateStandardButton, onUpdateCustomButtonsRequested: webGroupsStore.onUpdateCustomButtons, onUpdateAboveTabsRequested: ((_v = components === null || components === void 0 ? void 0 : components.tabs) === null || _v === void 0 ? void 0 : _v.Above) ? webGroupsStore.onUpdateAboveTabsRequested : undefined, onUpdateBeforeTabsComponentRequested: ((_w = components === null || components === void 0 ? void 0 : components.tabs) === null || _w === void 0 ? void 0 : _w.Before) ? webGroupsStore.onUpdateBeforeTabsRequested : undefined, onUpdateTabRequested: ((_x = components === null || components === void 0 ? void 0 : components.tabs) === null || _x === void 0 ? void 0 : _x.Element) ? webGroupsStore.onUpdateTabElementRequested : undefined, onUpdateAfterTabsComponentRequested: ((_y = components === null || components === void 0 ? void 0 : components.tabs) === null || _y === void 0 ? void 0 : _y.After) ? webGroupsStore.onUpdateAfterTabsRequested : undefined, onUpdateBelowTabsRequested: ((_z = components === null || components === void 0 ? void 0 : components.tabs) === null || _z === void 0 ? void 0 : _z.Below) ? webGroupsStore.onUpdateBelowTabsRequested : undefined, onRemoveFrameCaptionBarRequested: webGroupsStore.onRemoveFrameCaptionBarRequested, onRemoveFrameWindowOverlayRequested: webGroupsStore.onRemoveFrameWindowOverlayRequested, onRemoveAboveWindowRequested: webGroupsStore.onRemoveAboveWindowRequested, onRemoveWindowContentOverlayRequested: webGroupsStore.onRemoveWindowContentOverlayRequested, onRemoveFrameLoadingAnimationRequested: webGroupsStore.onRemoveFrameLoadingAnimationRequested, onRemoveBelowWindowRequested: webGroupsStore.onRemoveBelowWindowRequested, onRemoveAboveTabsRequested: webGroupsStore.onRemoveAboveTabsRequested, onRemoveBeforeTabsComponentRequested: webGroupsStore.onRemoveBeforeTabsComponentRequested, onRemoveTabRequested: webGroupsStore.onRemoveTabElementRequested, onRemoveAfterTabsComponentRequested: webGroupsStore.onRemoveAfterTabsComponentRequested, onRemoveTabHeaderButtonsRequested: webGroupsStore.onRemoveTabHeaderButtonsRequested, onRemoveBelowTabsRequested: webGroupsStore.onRemoveBelowTabsRequested, onRemoveHtmlButtonsRequested: webGroupsStore.onRemoveHtmlButtonsRequested, onShowCaptionEditorRequested: webGroupsStore.onShowCaptionEditorRequested, onCommitCaptionEditingRequested: webGroupsStore.onCommitCaptionEditingRequested, onHideCaptionEditorRequested: webGroupsStore.onHideCaptionEditorRequested, onShowLoadingAnimationRequested: webGroupsStore.onShowLoadingAnimationRequested, onHideLoadingAnimationRequested: webGroupsStore.onHideLoadingAnimationRequested }));
|
|
3143
3204
|
};
|
|
3144
3205
|
|
|
3145
3206
|
function useIOConnectWindow(windowId) {
|
|
@@ -3190,6 +3251,24 @@ var FrameLoadingAnimation = function (_a) {
|
|
|
3190
3251
|
React.createElement("div", { className: "loader-text" }, "Loading..."))) : React.createElement(React.Fragment, null));
|
|
3191
3252
|
};
|
|
3192
3253
|
|
|
3254
|
+
var HtmlButtons = function (_a) {
|
|
3255
|
+
var extract = _a.extract, minimize = _a.minimize, maximize = _a.maximize, restore = _a.restore, close = _a.close, lock = _a.lock, unlock = _a.unlock, feedback = _a.feedback, sticky = _a.sticky, customButtons = _a.customButtons;
|
|
3256
|
+
return React.createElement("div", { className: "t42-buttons-container t42-html-buttons-bar-element" },
|
|
3257
|
+
React.createElement("ul", { className: "t42-buttons t42-html-buttons-bar-element" }, customButtons.map(function (customButton) {
|
|
3258
|
+
return customButton.visible && React.createElement(CustomButton, __assign({ key: customButton.buttonId }, customButton));
|
|
3259
|
+
})),
|
|
3260
|
+
React.createElement("ul", { className: "t42-buttons t42-html-buttons-bar-element" },
|
|
3261
|
+
(feedback === null || feedback === void 0 ? void 0 : feedback.visible) && React.createElement(FeedbackButton, __assign({}, feedback)),
|
|
3262
|
+
(sticky === null || sticky === void 0 ? void 0 : sticky.visible) && React.createElement(StickyButton, __assign({}, sticky)),
|
|
3263
|
+
(extract === null || extract === void 0 ? void 0 : extract.visible) && React.createElement(ExtractButton, __assign({}, extract)),
|
|
3264
|
+
(lock === null || lock === void 0 ? void 0 : lock.visible) && React.createElement(LockButton, __assign({}, lock)),
|
|
3265
|
+
(unlock === null || unlock === void 0 ? void 0 : unlock.visible) && React.createElement(UnlockButton, __assign({}, unlock)),
|
|
3266
|
+
(minimize === null || minimize === void 0 ? void 0 : minimize.visible) && React.createElement(MinimizeButton, __assign({}, minimize)),
|
|
3267
|
+
(restore === null || restore === void 0 ? void 0 : restore.visible) && React.createElement(RestoreButton, __assign({}, restore)),
|
|
3268
|
+
(maximize === null || maximize === void 0 ? void 0 : maximize.visible) && React.createElement(MaximizeButton, __assign({}, maximize)),
|
|
3269
|
+
(close === null || close === void 0 ? void 0 : close.visible) && React.createElement(CloseButton, __assign({}, close))));
|
|
3270
|
+
};
|
|
3271
|
+
|
|
3193
3272
|
var getGroupId = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.getGroupId(); };
|
|
3194
3273
|
var requestPageFocus = function () { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestPageFocus(); };
|
|
3195
3274
|
var requestFrameFocus = function (frameId) { return webGroupsManager === null || webGroupsManager === void 0 ? void 0 : webGroupsManager.requestFrameFocus(frameId); };
|
|
@@ -3198,5 +3277,5 @@ var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webG
|
|
|
3198
3277
|
var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
|
|
3199
3278
|
var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
|
|
3200
3279
|
|
|
3201
|
-
export { CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, LockButton, MaximizeButton, MinimizeButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
|
|
3280
|
+
export { CloseButton, CustomButton, ExtractButton, FeedbackButton, FlatButtons, FlatCaption, FlatCaptionBar, FlatCaptionEditor, FlatChannelSelector, FlatMoveArea, FrameLoadingAnimation, GroupButtons, GroupCaption, GroupCaptionBar, GroupCaptionEditor, GroupMoveArea, HtmlButtons, LockButton, MaximizeButton, MinimizeButton, RestoreButton, StickyButton, Tab, TabCaption, TabCaptionEditor, TabChannelSelector, TabCloseButton, TabHeaderButtons, UnlockButton, GroupElementCreationWrapper as default, getGroupId, onCommitFlatCaptionEditingRequested, onCommitGroupCaptionEditingRequested, onCommitTabCaptionEditingRequested, requestFrameFocus, requestGroupFocus, requestPageFocus, useCaptionEditor, useCommitFlatCaptionEditingRequested, useCommitGroupCaptionEditingRequested, useCommitTabCaptionEditingRequested, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
|
|
3202
3281
|
//# sourceMappingURL=index.js.map
|