@interopio/groups-ui-react 2.7.0 → 3.0.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.
Files changed (70) hide show
  1. package/dist/cjs/GroupWrapper.d.ts +2 -1
  2. package/dist/cjs/defaultComponents/buttons/StandardButton.d.ts +4 -0
  3. package/dist/cjs/defaultComponents/utils/common.d.ts +3 -0
  4. package/dist/cjs/defaultComponents/utils/useDragMove.d.ts +6 -0
  5. package/dist/cjs/index.d.ts +2 -1
  6. package/dist/cjs/index.js +207 -92
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/tests/buttons/BaseButton.test.d.ts +1 -0
  9. package/dist/cjs/tests/buttons/CloneButton.test.d.ts +1 -0
  10. package/dist/cjs/tests/buttons/CloseButton.test.d.ts +1 -0
  11. package/dist/cjs/tests/buttons/CustomButton.test.d.ts +1 -0
  12. package/dist/cjs/tests/buttons/ExtractButton.test.d.ts +1 -0
  13. package/dist/cjs/tests/buttons/FeedbackButton.test.d.ts +1 -0
  14. package/dist/cjs/tests/buttons/LockButtons.test.d.ts +1 -0
  15. package/dist/cjs/tests/buttons/MaximizeButton.test.d.ts +1 -0
  16. package/dist/cjs/tests/buttons/MinimizeButton.test.d.ts +1 -0
  17. package/dist/cjs/tests/buttons/OverflowButton.test.d.ts +1 -0
  18. package/dist/cjs/tests/buttons/RestoreButton.test.d.ts +1 -0
  19. package/dist/cjs/tests/buttons/StickyButton.test.d.ts +1 -0
  20. package/dist/cjs/tests/buttons/UnlockButton.test.d.ts +1 -0
  21. package/dist/cjs/tests/captionEditor/CaptionEditor.test.d.ts +1 -0
  22. package/dist/cjs/tests/channelSelector/BaseChannelSelector.test.d.ts +1 -0
  23. package/dist/cjs/tests/flatCaptionBar/FlatCaptionBar.test.d.ts +1 -0
  24. package/dist/cjs/tests/groupCaptionBar/GroupCaptionBar.test.d.ts +1 -0
  25. package/dist/cjs/tests/htmlButtonBar/HtmlButtonBar.test.d.ts +1 -0
  26. package/dist/cjs/tests/popups/TabOverflowPopup.test.d.ts +1 -0
  27. package/dist/cjs/tests/tabs/Tab.test.d.ts +1 -0
  28. package/dist/cjs/types/api.d.ts +12 -1
  29. package/dist/cjs/types/defaultComponents.d.ts +10 -2
  30. package/dist/cjs/types/internal.d.ts +48 -45
  31. package/dist/cjs/webGroupsManager.d.ts +6 -1
  32. package/dist/esm/GroupWrapper.d.ts +2 -1
  33. package/dist/esm/defaultComponents/buttons/StandardButton.d.ts +4 -0
  34. package/dist/esm/defaultComponents/utils/common.d.ts +3 -0
  35. package/dist/esm/defaultComponents/utils/useDragMove.d.ts +6 -0
  36. package/dist/esm/index.d.ts +2 -1
  37. package/dist/esm/index.js +207 -93
  38. package/dist/esm/index.js.map +1 -1
  39. package/dist/esm/tests/buttons/BaseButton.test.d.ts +1 -0
  40. package/dist/esm/tests/buttons/CloneButton.test.d.ts +1 -0
  41. package/dist/esm/tests/buttons/CloseButton.test.d.ts +1 -0
  42. package/dist/esm/tests/buttons/CustomButton.test.d.ts +1 -0
  43. package/dist/esm/tests/buttons/ExtractButton.test.d.ts +1 -0
  44. package/dist/esm/tests/buttons/FeedbackButton.test.d.ts +1 -0
  45. package/dist/esm/tests/buttons/LockButtons.test.d.ts +1 -0
  46. package/dist/esm/tests/buttons/MaximizeButton.test.d.ts +1 -0
  47. package/dist/esm/tests/buttons/MinimizeButton.test.d.ts +1 -0
  48. package/dist/esm/tests/buttons/OverflowButton.test.d.ts +1 -0
  49. package/dist/esm/tests/buttons/RestoreButton.test.d.ts +1 -0
  50. package/dist/esm/tests/buttons/StickyButton.test.d.ts +1 -0
  51. package/dist/esm/tests/buttons/UnlockButton.test.d.ts +1 -0
  52. package/dist/esm/tests/captionEditor/CaptionEditor.test.d.ts +1 -0
  53. package/dist/esm/tests/channelSelector/BaseChannelSelector.test.d.ts +1 -0
  54. package/dist/esm/tests/flatCaptionBar/FlatCaptionBar.test.d.ts +1 -0
  55. package/dist/esm/tests/groupCaptionBar/GroupCaptionBar.test.d.ts +1 -0
  56. package/dist/esm/tests/htmlButtonBar/HtmlButtonBar.test.d.ts +1 -0
  57. package/dist/esm/tests/popups/TabOverflowPopup.test.d.ts +1 -0
  58. package/dist/esm/tests/tabs/Tab.test.d.ts +1 -0
  59. package/dist/esm/types/api.d.ts +12 -1
  60. package/dist/esm/types/defaultComponents.d.ts +10 -2
  61. package/dist/esm/types/internal.d.ts +48 -45
  62. package/dist/esm/webGroupsManager.d.ts +6 -1
  63. package/dist/styles/groups.css +156 -76
  64. package/dist/styles/vars.css +865 -78
  65. package/package.json +36 -28
  66. package/dist/cjs/useGDWindow.d.ts +0 -2
  67. package/dist/esm/useGDWindow.d.ts +0 -2
  68. package/dist/styles/fonts.css +0 -2
  69. package/dist/styles/styles.css +0 -679
  70. package/dist/styles/themes.css +0 -155
package/dist/esm/index.js CHANGED
@@ -2,7 +2,7 @@ import React, { useRef, useEffect as useEffect$1, useLayoutEffect as useLayoutEf
2
2
  import ReactDOM from 'react-dom';
3
3
  import { IOConnectContext } from '@interopio/react-hooks';
4
4
 
5
- /*! *****************************************************************************
5
+ /******************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
7
7
 
8
8
  Permission to use, copy, modify, and/or distribute this software for any
@@ -16,16 +16,18 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
16
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
17
  PERFORMANCE OF THIS SOFTWARE.
18
18
  ***************************************************************************** */
19
- /* global Reflect, Promise */
19
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
20
20
 
21
21
  var extendStatics = function(d, b) {
22
22
  extendStatics = Object.setPrototypeOf ||
23
23
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
24
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25
25
  return extendStatics(d, b);
26
26
  };
27
27
 
28
28
  function __extends(d, b) {
29
+ if (typeof b !== "function" && b !== null)
30
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
29
31
  extendStatics(d, b);
30
32
  function __() { this.constructor = d; }
31
33
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -52,8 +54,18 @@ function __rest(s, e) {
52
54
  t[p[i]] = s[p[i]];
53
55
  }
54
56
  return t;
55
- }
57
+ }
58
+
59
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
60
+ var e = new Error(message);
61
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
62
+ };
56
63
 
64
+ var StandardButtonTarget;
65
+ (function (StandardButtonTarget) {
66
+ StandardButtonTarget["Default"] = "default";
67
+ StandardButtonTarget["Frame"] = "frame";
68
+ })(StandardButtonTarget || (StandardButtonTarget = {}));
57
69
  var TargetType;
58
70
  (function (TargetType) {
59
71
  TargetType["Group"] = "group";
@@ -292,6 +304,20 @@ var WebGroupsManagerDecorator = /** @class */ (function () {
292
304
  }
293
305
  window.webGroupsManager.externalLibraryFactory.onCaptionTextBoundsChanged(targetType, targetId, bounds);
294
306
  };
307
+ WebGroupsManagerDecorator.prototype.startDragMove = function () {
308
+ if (typeof window.webGroupsManager.externalLibraryFactory.startDragMove !== "function") {
309
+ // Handling the case when a new library is used with an older version of io.Connect Desktop
310
+ return;
311
+ }
312
+ window.webGroupsManager.externalLibraryFactory.startDragMove();
313
+ };
314
+ WebGroupsManagerDecorator.prototype.showCaptionEditor = function (targetType, targetId, text) {
315
+ if (typeof window.webGroupsManager.externalLibraryFactory.showCaptionEditor !== "function") {
316
+ // Handling the case when a new library is used with an older version of io.Connect Desktop
317
+ return;
318
+ }
319
+ window.webGroupsManager.externalLibraryFactory.showCaptionEditor(targetType, targetId, text);
320
+ };
295
321
  WebGroupsManagerDecorator.prototype.onCaptionEditorVisibleChanged = function (targetType, targetId, visible) {
296
322
  if (typeof window.webGroupsManager.externalLibraryFactory.onCaptionEditorVisibleChanged !== "function") {
297
323
  // Handling the case when a new library is used with an older version of io.Connect Desktop
@@ -319,6 +345,15 @@ var WebGroupsManagerDecorator = /** @class */ (function () {
319
345
  WebGroupsManagerDecorator.prototype.requestCommitCaptionEditing = function (targetType, targetId) {
320
346
  this.registry.execute(targetType + "-" + targetId);
321
347
  };
348
+ WebGroupsManagerDecorator.prototype.updateTabHeaderStyles = function (styles) {
349
+ window.webGroupsManager.externalLibraryFactory.updateTabHeaderStyles(styles);
350
+ };
351
+ WebGroupsManagerDecorator.prototype.updateTabMoveAreaStyles = function (styles) {
352
+ window.webGroupsManager.externalLibraryFactory.updateTabMoveAreaStyles(styles);
353
+ };
354
+ WebGroupsManagerDecorator.prototype.updateFrameStyles = function (styles) {
355
+ window.webGroupsManager.externalLibraryFactory.updateFrameStyles(styles);
356
+ };
322
357
  WebGroupsManagerDecorator.prototype.selectTab = function (windowId) {
323
358
  window.webGroupsManager.externalLibraryFactory.selectTab(windowId);
324
359
  };
@@ -349,13 +384,35 @@ var webGroupsManager = new WebGroupsManagerDecorator();
349
384
 
350
385
  var BaseButton = function (_a) {
351
386
  var outerElement = _a.outerElement, innerElement = _a.innerElement;
352
- return React.createElement("li", __assign({}, outerElement, { className: webGroupsManager.skipFocusStyle + " " + outerElement.className }),
387
+ return React.createElement("li", __assign({}, outerElement, { "data-testid": "outer-element", className: webGroupsManager.skipFocusStyle + " " + outerElement.className }),
353
388
  React.createElement("div", __assign({}, innerElement)));
354
389
  };
355
390
 
356
- var CloseButton = function (_a) {
357
- var onClick = _a.onClick, tooltip = _a.tooltip;
358
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-close" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-close", title: tooltip, onClick: onClick } });
391
+ function getStandardButtonInnerClassName(buttonId, target) {
392
+ var classNames = "t42-standard-button t42-standard-button-" + buttonId;
393
+ if (target && target !== StandardButtonTarget.Default) {
394
+ classNames = classNames.concat(" t42-standard-button-" + target + "-" + buttonId);
395
+ }
396
+ return classNames;
397
+ }
398
+ function getStandardButtonOuterClassName(buttonId, target, isPressed) {
399
+ var classNames = "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-" + buttonId;
400
+ if (isPressed === true) {
401
+ classNames = classNames.concat(" active");
402
+ }
403
+ if (target && target !== StandardButtonTarget.Default) {
404
+ classNames = classNames.concat(" t42-caption-bar-button-" + target + "-" + buttonId);
405
+ }
406
+ return classNames;
407
+ }
408
+
409
+ var StandardButton = function (_a) {
410
+ var buttonId = _a.buttonId, target = _a.target, isPressed = _a.isPressed, tooltip = _a.tooltip, onClick = _a.onClick;
411
+ return React.createElement(BaseButton, { innerElement: { className: getStandardButtonInnerClassName(buttonId, target) }, outerElement: { className: getStandardButtonOuterClassName(buttonId, target, isPressed), title: tooltip, onClick: onClick } });
412
+ };
413
+
414
+ var CloseButton = function (props) {
415
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Close }, props));
359
416
  };
360
417
 
361
418
  /**
@@ -373,9 +430,7 @@ class ColorError extends Error {
373
430
  constructor(color) {
374
431
  super(`Failed to parse color: "${color}"`);
375
432
  }
376
-
377
433
  }
378
-
379
434
  var ColorError$1 = ColorError;
380
435
 
381
436
  /**
@@ -383,115 +438,94 @@ var ColorError$1 = ColorError;
383
438
  *
384
439
  * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color
385
440
  */
386
-
387
441
  function parseToRgba(color) {
388
442
  if (typeof color !== 'string') throw new ColorError$1(color);
389
443
  if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];
390
444
  let normalizedColor = color.trim();
391
445
  normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;
392
446
  const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
393
-
394
447
  if (reducedHexMatch) {
395
448
  const arr = Array.from(reducedHexMatch).slice(1);
396
449
  return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];
397
450
  }
398
-
399
451
  const hexMatch = hexRegex.exec(normalizedColor);
400
-
401
452
  if (hexMatch) {
402
453
  const arr = Array.from(hexMatch).slice(1);
403
454
  return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];
404
455
  }
405
-
406
456
  const rgbaMatch = rgbaRegex.exec(normalizedColor);
407
-
408
457
  if (rgbaMatch) {
409
458
  const arr = Array.from(rgbaMatch).slice(1);
410
459
  return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];
411
460
  }
412
-
413
461
  const hslaMatch = hslaRegex.exec(normalizedColor);
414
-
415
462
  if (hslaMatch) {
416
463
  const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
417
464
  if (guard(0, 100, s) !== s) throw new ColorError$1(color);
418
465
  if (guard(0, 100, l) !== l) throw new ColorError$1(color);
419
- return [...hslToRgb(h, s, l), a || 1];
466
+ return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];
420
467
  }
421
-
422
468
  throw new ColorError$1(color);
423
469
  }
424
-
425
470
  function hash(str) {
426
471
  let hash = 5381;
427
472
  let i = str.length;
428
-
429
473
  while (i) {
430
474
  hash = hash * 33 ^ str.charCodeAt(--i);
431
475
  }
476
+
432
477
  /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
433
478
  * integers. Since we want the results to be always positive, convert the
434
479
  * signed int to an unsigned by doing an unsigned bitshift. */
435
-
436
-
437
480
  return (hash >>> 0) % 2341;
438
481
  }
439
-
440
482
  const colorToInt = x => parseInt(x.replace(/_/g, ''), 36);
441
-
442
483
  const compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {
443
484
  const key = colorToInt(next.substring(0, 3));
444
- const hex = colorToInt(next.substring(3)).toString(16); // NOTE: padStart could be used here but it breaks Node 6 compat
445
- // https://github.com/ricokahler/color2k/issues/351
485
+ const hex = colorToInt(next.substring(3)).toString(16);
446
486
 
487
+ // NOTE: padStart could be used here but it breaks Node 6 compat
488
+ // https://github.com/ricokahler/color2k/issues/351
447
489
  let prefix = '';
448
-
449
490
  for (let i = 0; i < 6 - hex.length; i++) {
450
491
  prefix += '0';
451
492
  }
452
-
453
493
  acc[key] = `${prefix}${hex}`;
454
494
  return acc;
455
495
  }, {});
496
+
456
497
  /**
457
498
  * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
458
499
  */
459
-
460
500
  function nameToHex(color) {
461
501
  const normalizedColorName = color.toLowerCase().trim();
462
502
  const result = compressedColorMap[hash(normalizedColorName)];
463
503
  if (!result) throw new ColorError$1(color);
464
504
  return `#${result}`;
465
505
  }
466
-
467
506
  const r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');
468
-
469
507
  const reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');
470
508
  const hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');
471
509
  const rgbaRegex = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(',\\s*(\\d+)\\s*', 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, 'i');
472
510
  const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
473
511
  const namedColorRegex = /^[a-z]+$/i;
474
-
475
512
  const roundColor = color => {
476
513
  return Math.round(color * 255);
477
514
  };
478
-
479
515
  const hslToRgb = (hue, saturation, lightness) => {
480
516
  let l = lightness / 100;
481
-
482
517
  if (saturation === 0) {
483
518
  // achromatic
484
519
  return [l, l, l].map(roundColor);
485
- } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
486
-
520
+ }
487
521
 
522
+ // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
488
523
  const huePrime = (hue % 360 + 360) % 360 / 60;
489
524
  const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);
490
525
  const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
491
526
  let red = 0;
492
527
  let green = 0;
493
528
  let blue = 0;
494
-
495
529
  if (huePrime >= 0 && huePrime < 1) {
496
530
  red = chroma;
497
531
  green = secondComponent;
@@ -511,7 +545,6 @@ const hslToRgb = (hue, saturation, lightness) => {
511
545
  red = chroma;
512
546
  blue = secondComponent;
513
547
  }
514
-
515
548
  const lightnessModification = l - chroma / 2;
516
549
  const finalRed = red + lightnessModification;
517
550
  const finalGreen = green + lightnessModification;
@@ -519,20 +552,18 @@ const hslToRgb = (hue, saturation, lightness) => {
519
552
  return [finalRed, finalGreen, finalBlue].map(roundColor);
520
553
  };
521
554
 
555
+ // taken from:
522
556
  // https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js
523
557
 
524
558
  /**
525
559
  * Returns a number (float) representing the luminance of a color.
526
560
  */
527
-
528
561
  function getLuminance(color) {
529
562
  if (color === 'transparent') return 0;
530
-
531
563
  function f(x) {
532
564
  const channel = x / 255;
533
- return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
565
+ return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
534
566
  }
535
-
536
567
  const [r, g, b] = parseToRgba(color);
537
568
  return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
538
569
  }
@@ -542,7 +573,6 @@ function getLuminance(color) {
542
573
  * readable color (i.e. the color to be place on top the input color) should be
543
574
  * black.
544
575
  */
545
-
546
576
  function readableColorIsBlack(color) {
547
577
  return getLuminance(color) > 0.179;
548
578
  }
@@ -553,11 +583,8 @@ function IsBlackReadable(color) {
553
583
  var r = rgba[0];
554
584
  var g = rgba[1];
555
585
  var b = rgba[2];
556
- var displayGamma = 2.2;
557
- var backgroundWeight = 0.2126 * Math.pow(r / 255.0, displayGamma) +
558
- 0.7152 * Math.pow(g / 255.0, displayGamma) +
559
- 0.0722 * Math.pow(b / 255.0, displayGamma);
560
- return backgroundWeight > Math.pow(0.5, displayGamma);
586
+ var backgroundWeight = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
587
+ return backgroundWeight > 0.5;
561
588
  }
562
589
  catch (_a) {
563
590
  // Fallback to other implementation
@@ -635,50 +662,40 @@ var FlatChannelSelector = function (_a) {
635
662
  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 });
636
663
  };
637
664
 
638
- var ExtractButton = function (_a) {
639
- var onClick = _a.onClick, tooltip = _a.tooltip;
640
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-extract" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-extract", title: tooltip, onClick: onClick } });
665
+ var ExtractButton = function (props) {
666
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Extract }, props));
641
667
  };
642
668
 
643
- var FeedbackButton = function (_a) {
644
- var onClick = _a.onClick, tooltip = _a.tooltip;
645
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-feedback" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-feedback", title: tooltip, onClick: onClick } });
669
+ var FeedbackButton = function (props) {
670
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Feedback }, props));
646
671
  };
647
672
 
648
- var CloneButton = function (_a) {
649
- var onClick = _a.onClick, tooltip = _a.tooltip;
650
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-clone" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-clone", title: tooltip, onClick: onClick } });
673
+ var CloneButton = function (props) {
674
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Clone }, props));
651
675
  };
652
676
 
653
- var StickyButton = function (_a) {
654
- var onClick = _a.onClick, tooltip = _a.tooltip, isPressed = _a.isPressed;
655
- var outerElementClassName = "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-sticky";
656
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-sticky" }, outerElement: { className: isPressed ? outerElementClassName + " active" : outerElementClassName, title: tooltip, onClick: onClick } });
677
+ var StickyButton = function (props) {
678
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Sticky }, props));
657
679
  };
658
680
 
659
- var LockButton = function (_a) {
660
- var tooltip = _a.tooltip, onClick = _a.onClick;
661
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-lock" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-lock", title: tooltip, onClick: onClick } });
681
+ var LockButton = function (props) {
682
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Lock }, props));
662
683
  };
663
684
 
664
- var MaximizeButton = function (_a) {
665
- var tooltip = _a.tooltip, onClick = _a.onClick;
666
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-maximize" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-maximize", title: tooltip, onClick: onClick } });
685
+ var MaximizeButton = function (props) {
686
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Maximize }, props));
667
687
  };
668
688
 
669
- var MinimizeButton = function (_a) {
670
- var onClick = _a.onClick, tooltip = _a.tooltip;
671
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-minimize" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-minimize", title: tooltip, onClick: onClick } });
689
+ var MinimizeButton = function (props) {
690
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Minimize }, props));
672
691
  };
673
692
 
674
- var RestoreButton = function (_a) {
675
- var tooltip = _a.tooltip, onClick = _a.onClick;
676
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-restore" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-restore", title: tooltip, onClick: onClick } });
693
+ var RestoreButton = function (props) {
694
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Restore }, props));
677
695
  };
678
696
 
679
- var UnlockButton = function (_a) {
680
- var tooltip = _a.tooltip, onClick = _a.onClick;
681
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-unlock" }, outerElement: { className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-unlock", title: tooltip, onClick: onClick } });
697
+ var UnlockButton = function (props) {
698
+ return React.createElement(StandardButton, __assign({ buttonId: StandardButtons.Unlock }, props));
682
699
  };
683
700
 
684
701
  var CustomButton = function (_a) {
@@ -1677,11 +1694,76 @@ function useEditableCaption(ref, options) {
1677
1694
  }, [ref]);
1678
1695
  }
1679
1696
 
1697
+ function useDragMove(option) {
1698
+ var _a = (option || {}).threshold, threshold = _a === void 0 ? 3 : _a;
1699
+ var initialPos = useRef(null);
1700
+ var onMoveRef = useRef();
1701
+ var onUpRef = useRef();
1702
+ var cleanup = function () {
1703
+ document.removeEventListener("mousemove", onMoveRef.current, true);
1704
+ document.removeEventListener("mouseup", onUpRef.current, true);
1705
+ initialPos.current = null;
1706
+ document.body.style.pointerEvents = "auto";
1707
+ };
1708
+ if (!onMoveRef.current) {
1709
+ onMoveRef.current = function (ev) {
1710
+ if (!initialPos.current)
1711
+ return;
1712
+ var dx = ev.pageX - initialPos.current.x;
1713
+ var dy = ev.pageY - initialPos.current.y;
1714
+ if (Math.abs(dx) >= threshold || Math.abs(dy) >= threshold) {
1715
+ document.body.style.pointerEvents = "none";
1716
+ cleanup();
1717
+ webGroupsManager.startDragMove();
1718
+ }
1719
+ ev.stopPropagation();
1720
+ ev.preventDefault();
1721
+ };
1722
+ }
1723
+ if (!onUpRef.current) {
1724
+ onUpRef.current = function (ev) {
1725
+ cleanup();
1726
+ ev.stopPropagation();
1727
+ ev.preventDefault();
1728
+ };
1729
+ }
1730
+ var startDrag = function (ev) {
1731
+ if (ev.button !== 0)
1732
+ return;
1733
+ initialPos.current = { x: ev.pageX, y: ev.pageY };
1734
+ document.addEventListener("mousemove", onMoveRef.current, true);
1735
+ document.addEventListener("mouseup", onUpRef.current, true);
1736
+ ev.stopPropagation();
1737
+ ev.preventDefault();
1738
+ };
1739
+ useEffect$1(function () {
1740
+ return function () {
1741
+ if (onMoveRef.current)
1742
+ document.removeEventListener("mousemove", onMoveRef.current, true);
1743
+ if (onUpRef.current)
1744
+ document.removeEventListener("mouseup", onUpRef.current, true);
1745
+ document.body.style.pointerEvents = "auto";
1746
+ initialPos.current = null;
1747
+ };
1748
+ }, []);
1749
+ return { startDrag: startDrag };
1750
+ }
1751
+
1680
1752
  var FlatCaption = function (_a) {
1681
- var caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1753
+ var showCaptionEditor = _a.showCaptionEditor, caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1682
1754
  var ref = useRef(null);
1683
1755
  useEditableCaption(ref, { notifyBoundsChanged: notifyBoundsChanged });
1684
- return React.createElement("div", { ref: ref, className: "t42-caption t42-title t42-frame-caption-bar-element" }, caption);
1756
+ var startDrag = useDragMove().startDrag;
1757
+ var handleMouseDown = function (e) {
1758
+ if (e.button !== 0)
1759
+ return;
1760
+ startDrag(e);
1761
+ };
1762
+ var handleDoubleClick = function (e) {
1763
+ showCaptionEditor(caption);
1764
+ e.stopPropagation();
1765
+ };
1766
+ return (React.createElement("div", { ref: ref, className: "t42-caption t42-title t42-frame-caption-bar-element", onMouseDown: handleMouseDown, onDoubleClick: handleDoubleClick }, caption));
1685
1767
  };
1686
1768
 
1687
1769
  function useCaptionEditor(ref, options) {
@@ -1841,11 +1923,11 @@ var FlatMultiChannelSelector = function (_a) {
1841
1923
  };
1842
1924
 
1843
1925
  var FlatCaptionBar = function (_a) {
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"]);
1926
+ var moveAreaId = _a.moveAreaId, caption = _a.caption, showCaptionEditor = _a.showCaptionEditor, channels = _a.channels, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "caption", "showCaptionEditor", "channels", "captionEditor", "notifyCaptionBoundsChanged"]);
1845
1927
  return (React.createElement("div", { className: "t42-react-caption-bar" },
1846
1928
  (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
1929
  (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 }),
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 })),
1930
+ React.createElement(FlatMoveArea, { moveAreaId: moveAreaId }, captionEditor.show ? React.createElement(FlatCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, frameId: rest.frameId })) : React.createElement(FlatCaption, { showCaptionEditor: showCaptionEditor, notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1849
1931
  React.createElement(FlatButtons, __assign({}, rest))));
1850
1932
  };
1851
1933
 
@@ -1865,10 +1947,20 @@ var GroupButtons = function (_a) {
1865
1947
  };
1866
1948
 
1867
1949
  var GroupCaption = function (_a) {
1868
- var caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1950
+ var showCaptionEditor = _a.showCaptionEditor, caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1869
1951
  var ref = useRef(null);
1870
1952
  useEditableCaption(ref, { notifyBoundsChanged: notifyBoundsChanged });
1871
- return React.createElement("div", { ref: ref, className: "t42-caption t42-title t42-group-caption-bar-element" }, caption);
1953
+ var startDrag = useDragMove().startDrag;
1954
+ var handleMouseDown = function (e) {
1955
+ if (e.button !== 0)
1956
+ return;
1957
+ startDrag(e);
1958
+ };
1959
+ var handleDoubleClick = function (e) {
1960
+ showCaptionEditor(caption);
1961
+ e.stopPropagation();
1962
+ };
1963
+ return (React.createElement("div", { ref: ref, onMouseDown: handleMouseDown, onDoubleClick: handleDoubleClick, className: "t42-caption t42-title t42-group-caption-bar-element" }, caption));
1872
1964
  };
1873
1965
 
1874
1966
  var GroupCaptionEditor = function (props) {
@@ -1876,11 +1968,11 @@ var GroupCaptionEditor = function (props) {
1876
1968
  };
1877
1969
 
1878
1970
  var GroupCaptionBar = function (_a) {
1879
- var moveAreaId = _a.moveAreaId; _a.targetType; var targetId = _a.targetId, caption = _a.caption, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "targetType", "targetId", "caption", "captionEditor", "notifyCaptionBoundsChanged"]);
1971
+ var moveAreaId = _a.moveAreaId, showCaptionEditor = _a.showCaptionEditor; _a.targetType; var targetId = _a.targetId, caption = _a.caption, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "showCaptionEditor", "targetType", "targetId", "caption", "captionEditor", "notifyCaptionBoundsChanged"]);
1880
1972
  return React.createElement("div", { className: "t42-react-caption-bar" },
1881
1973
  React.createElement(GroupMoveArea, { moveAreaId: moveAreaId }, (captionEditor === null || captionEditor === void 0 ? void 0 : captionEditor.show) ?
1882
1974
  React.createElement(GroupCaptionEditor, __assign({}, captionEditor, { groupId: targetId, caption: captionEditor.text })) :
1883
- React.createElement(GroupCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1975
+ React.createElement(GroupCaption, { showCaptionEditor: showCaptionEditor, notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1884
1976
  React.createElement(GroupButtons, __assign({}, rest)));
1885
1977
  };
1886
1978
 
@@ -1939,10 +2031,10 @@ var Tab = function (_a) {
1939
2031
 
1940
2032
  var OverflowButton = function (_a) {
1941
2033
  var onClick = _a.onClick, tooltip = _a.tooltip;
1942
- return React.createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-overflow" }, outerElement: {
2034
+ return React.createElement(BaseButton, { innerElement: { className: getStandardButtonInnerClassName(StandardButtons.Overflow) }, outerElement: {
1943
2035
  onMouseDown: function (e) { return e.stopPropagation(); },
1944
2036
  onPointerDown: function (e) { return e.stopPropagation(); },
1945
- className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-overflow", title: tooltip,
2037
+ className: getStandardButtonOuterClassName(StandardButtons.Overflow), title: tooltip,
1946
2038
  onClick: onClick
1947
2039
  } });
1948
2040
  };
@@ -2142,6 +2234,7 @@ var GroupWrapper = /** @class */ (function (_super) {
2142
2234
  return _super !== null && _super.apply(this, arguments) || this;
2143
2235
  }
2144
2236
  GroupWrapper.prototype.componentDidMount = function () {
2237
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2145
2238
  var componentFactory = {
2146
2239
  createGroupCaptionBar: this.props.onCreateGroupCaptionBarRequested,
2147
2240
  updateGroupCaptionBar: this.props.onUpdateGroupCaptionBarRequested,
@@ -2191,6 +2284,21 @@ var GroupWrapper = /** @class */ (function (_super) {
2191
2284
  hideLoadingAnimation: this.props.onHideLoadingAnimationRequested,
2192
2285
  };
2193
2286
  webGroupsManager.init(undefined, componentFactory);
2287
+ webGroupsManager.updateTabHeaderStyles((_c = (_b = (_a = this.props.styles) === null || _a === void 0 ? void 0 : _a.tabs) === null || _b === void 0 ? void 0 : _b.header) !== null && _c !== void 0 ? _c : {});
2288
+ webGroupsManager.updateTabMoveAreaStyles((_f = (_e = (_d = this.props.styles) === null || _d === void 0 ? void 0 : _d.tabs) === null || _e === void 0 ? void 0 : _e.moveArea) !== null && _f !== void 0 ? _f : {});
2289
+ webGroupsManager.updateFrameStyles((_j = (_h = (_g = this.props.styles) === null || _g === void 0 ? void 0 : _g.frame) === null || _h === void 0 ? void 0 : _h.element) !== null && _j !== void 0 ? _j : {});
2290
+ };
2291
+ GroupWrapper.prototype.componentDidUpdate = function (prevProps, prevState, snapshot) {
2292
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
2293
+ if (((_b = (_a = this.props.styles) === null || _a === void 0 ? void 0 : _a.tabs) === null || _b === void 0 ? void 0 : _b.header) !== ((_d = (_c = prevProps.styles) === null || _c === void 0 ? void 0 : _c.tabs) === null || _d === void 0 ? void 0 : _d.header)) {
2294
+ webGroupsManager.updateTabHeaderStyles((_g = (_f = (_e = this.props.styles) === null || _e === void 0 ? void 0 : _e.tabs) === null || _f === void 0 ? void 0 : _f.header) !== null && _g !== void 0 ? _g : {});
2295
+ }
2296
+ if (((_j = (_h = this.props.styles) === null || _h === void 0 ? void 0 : _h.tabs) === null || _j === void 0 ? void 0 : _j.moveArea) !== ((_l = (_k = prevProps.styles) === null || _k === void 0 ? void 0 : _k.tabs) === null || _l === void 0 ? void 0 : _l.moveArea)) {
2297
+ webGroupsManager.updateTabMoveAreaStyles((_p = (_o = (_m = this.props.styles) === null || _m === void 0 ? void 0 : _m.tabs) === null || _o === void 0 ? void 0 : _o.moveArea) !== null && _p !== void 0 ? _p : {});
2298
+ }
2299
+ if (((_r = (_q = this.props.styles) === null || _q === void 0 ? void 0 : _q.frame) === null || _r === void 0 ? void 0 : _r.element) !== ((_t = (_s = prevProps.styles) === null || _s === void 0 ? void 0 : _s.frame) === null || _t === void 0 ? void 0 : _t.element)) {
2300
+ webGroupsManager.updateFrameStyles((_w = (_v = (_u = this.props.styles) === null || _u === void 0 ? void 0 : _u.frame) === null || _v === void 0 ? void 0 : _v.element) !== null && _w !== void 0 ? _w : {});
2301
+ }
2194
2302
  };
2195
2303
  GroupWrapper.prototype.componentWillUnmount = function () {
2196
2304
  // TODO
@@ -2908,7 +3016,7 @@ var FrameLoadingAnimation = function (_a) {
2908
3016
 
2909
3017
  var GroupElementCreationWrapper = function (_a) {
2910
3018
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
2911
- var components = _a.components;
3019
+ var components = _a.components, styles = _a.styles;
2912
3020
  var state = shim.useSyncExternalStore(webGroupsStore.subscribe, webGroupsStore.getSnapshot);
2913
3021
  var LoadingAnimation = (_c = (_b = components === null || components === void 0 ? void 0 : components.frame) === null || _b === void 0 ? void 0 : _b.LoadingAnimation) !== null && _c !== void 0 ? _c : FrameLoadingAnimation;
2914
3022
  var renderGroupCaptionBar = function () {
@@ -2918,6 +3026,9 @@ var GroupElementCreationWrapper = function (_a) {
2918
3026
  return;
2919
3027
  }
2920
3028
  var _b = state.groupCaptionBar, parentElement = _b.parentElement, options = __rest(_b, ["parentElement"]);
3029
+ var showCaptionEditor = function (text) {
3030
+ webGroupsManager.showCaptionEditor(TargetType.Group, options.targetId, text);
3031
+ };
2921
3032
  var minimize = __assign({ onClick: function () {
2922
3033
  webGroupsManager.onMinimizeButtonClick(TargetType.Group, options.targetId);
2923
3034
  } }, options.minimize);
@@ -2941,7 +3052,7 @@ var GroupElementCreationWrapper = function (_a) {
2941
3052
  } });
2942
3053
  var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Group, options.targetId, bounds); };
2943
3054
  return (React.createElement(Portal, { parentElement: parentElement },
2944
- React.createElement(GroupCaptionBarCustomElement, __assign({}, options, { minimize: minimize, maximize: maximize, restore: restore, close: close, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged }))));
3055
+ React.createElement(GroupCaptionBarCustomElement, __assign({}, options, { minimize: minimize, maximize: maximize, restore: restore, close: close, captionEditor: captionEditor, showCaptionEditor: showCaptionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged }))));
2945
3056
  };
2946
3057
  var renderGroupOverlay = function () {
2947
3058
  var _a;
@@ -2962,6 +3073,9 @@ var GroupElementCreationWrapper = function (_a) {
2962
3073
  return;
2963
3074
  }
2964
3075
  var parentElement = fcb.parentElement, options = __rest(fcb, ["parentElement"]);
3076
+ var showCaptionEditor = function (text) {
3077
+ webGroupsManager.showCaptionEditor(TargetType.Frame, options.targetId, text);
3078
+ };
2965
3079
  var feedback = __assign({ onClick: function () {
2966
3080
  webGroupsManager.onFeedbackButtonClick(TargetType.Frame, options.targetId);
2967
3081
  } }, options.feedback);
@@ -3030,7 +3144,7 @@ var GroupElementCreationWrapper = function (_a) {
3030
3144
  } });
3031
3145
  var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Frame, options.targetId, bounds); };
3032
3146
  return React.createElement(Portal, { key: options.targetId, parentElement: parentElement },
3033
- React.createElement(FrameCaptionBarCustomElement, __assign({}, options, { feedback: feedback, clone: clone, sticky: sticky, extract: extract, lock: lock, unlock: unlock, minimize: minimize, maximize: maximize, restore: restore, close: close, channels: channels, customButtons: customButtonsProps, frameId: options.targetId, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged })));
3147
+ React.createElement(FrameCaptionBarCustomElement, __assign({}, options, { feedback: feedback, clone: clone, sticky: sticky, extract: extract, lock: lock, unlock: unlock, minimize: minimize, maximize: maximize, restore: restore, close: close, channels: channels, customButtons: customButtonsProps, frameId: options.targetId, captionEditor: captionEditor, showCaptionEditor: showCaptionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged })));
3034
3148
  });
3035
3149
  };
3036
3150
  var renderFrameWindowOverlay = function () {
@@ -3338,7 +3452,7 @@ var GroupElementCreationWrapper = function (_a) {
3338
3452
  renderTabOverflowPopups(),
3339
3453
  renderBelowTabs(),
3340
3454
  renderHtmlButtons(),
3341
- React.createElement(GroupWrapper, { onCreateGroupCaptionBarRequested: ((_d = components === null || components === void 0 ? void 0 : components.group) === null || _d === void 0 ? void 0 : _d.CaptionBar) ? webGroupsStore.onCreateGroupCaptionBarRequested : undefined, onCreateGroupOverlayRequested: ((_e = components === null || components === void 0 ? void 0 : components.group) === null || _e === void 0 ? void 0 : _e.Overlay) ? webGroupsStore.onCreateGroupOverlayRequested : undefined, onCreateFrameCaptionBarRequested: ((_f = components === null || components === void 0 ? void 0 : components.flat) === null || _f === void 0 ? void 0 : _f.CaptionBar) ? webGroupsStore.onCreateFrameCaptionBarRequested : undefined, onCreateFrameWindowOverlayRequested: ((_g = components === null || components === void 0 ? void 0 : components.frame) === null || _g === void 0 ? void 0 : _g.Overlay) ? webGroupsStore.onCreateFrameWindowOverlayRequested : undefined, onCreateAboveWindowRequested: ((_h = components === null || components === void 0 ? void 0 : components.frame) === null || _h === void 0 ? void 0 : _h.AboveWindow) ? webGroupsStore.onCreateAboveWindowRequested : undefined, onCreateWindowContentOverlayRequested: ((_j = components === null || components === void 0 ? void 0 : components.frame) === null || _j === void 0 ? void 0 : _j.WindowContentOverlay) ? webGroupsStore.onCreateWindowContentOverlayRequested : undefined, onCreateFrameLoadingAnimationRequested: LoadingAnimation ? webGroupsStore.onCreateFrameLoadingAnimationRequested : undefined, onCreateBelowWindowRequested: ((_k = components === null || components === void 0 ? void 0 : components.frame) === null || _k === void 0 ? void 0 : _k.BelowWindow) ? webGroupsStore.onCreateBelowWindowRequested : undefined, onCreateAboveTabsRequested: ((_l = components === null || components === void 0 ? void 0 : components.tabs) === null || _l === void 0 ? void 0 : _l.Above) ? webGroupsStore.onCreateAboveTabsComponentRequested : undefined, onCreateBeforeTabsComponentRequested: ((_m = components === null || components === void 0 ? void 0 : components.tabs) === null || _m === void 0 ? void 0 : _m.Before) ? webGroupsStore.onCreateBeforeTabsComponentRequested : undefined, onCreateTabRequested: ((_o = components === null || components === void 0 ? void 0 : components.tabs) === null || _o === void 0 ? void 0 : _o.Element) ? webGroupsStore.onCreateTabElementRequested : undefined, onCreateAfterTabsComponentRequested: ((_p = components === null || components === void 0 ? void 0 : components.tabs) === null || _p === void 0 ? void 0 : _p.After) ? webGroupsStore.onCreateAfterTabsComponentRequested : undefined, onCreateTabHeaderButtonsRequested: ((_q = components === null || components === void 0 ? void 0 : components.tabs) === null || _q === void 0 ? void 0 : _q.Buttons) ? webGroupsStore.onCreateTabHeaderButtonsRequested : undefined, onCreateBelowTabsRequested: ((_r = components === null || components === void 0 ? void 0 : components.tabs) === null || _r === void 0 ? void 0 : _r.Below) ? webGroupsStore.onCreateBelowTabsComponentRequested : undefined, onCreateHtmlButtonsRequested: ((_s = components === null || components === void 0 ? void 0 : components.html) === null || _s === void 0 ? void 0 : _s.Buttons) ? webGroupsStore.onCreateHtmlButtonsRequested : undefined, onCreateTabOverflowPopupRequested: ((_t = components === null || components === void 0 ? void 0 : components.tabs) === null || _t === void 0 ? void 0 : _t.OverflowPopup) ? webGroupsStore.onCreateTabOverflowPopupRequested : undefined, onUpdateGroupCaptionBarRequested: ((_u = components === null || components === void 0 ? void 0 : components.group) === null || _u === void 0 ? void 0 : _u.CaptionBar) ? webGroupsStore.onUpdateGroupCaptionBarRequested : undefined, onUpdateFrameWindowOverlayRequested: ((_v = components === null || components === void 0 ? void 0 : components.group) === null || _v === void 0 ? void 0 : _v.Overlay) ? webGroupsStore.onUpdateFrameWindowOverlayRequested : undefined, onUpdateFrameCaptionBarRequested: ((_w = components === null || components === void 0 ? void 0 : components.flat) === null || _w === void 0 ? void 0 : _w.CaptionBar) ? webGroupsStore.onUpdateFrameCaptionBarRequested : undefined, onUpdateFrameRequested: webGroupsStore.onUpdateFrame, onUpdateStandardButtonRequested: webGroupsStore.onUpdateStandardButton, onUpdateCustomButtonsRequested: webGroupsStore.onUpdateCustomButtons, onUpdateAboveTabsRequested: ((_x = components === null || components === void 0 ? void 0 : components.tabs) === null || _x === void 0 ? void 0 : _x.Above) ? webGroupsStore.onUpdateAboveTabsRequested : undefined, onUpdateBeforeTabsComponentRequested: ((_y = components === null || components === void 0 ? void 0 : components.tabs) === null || _y === void 0 ? void 0 : _y.Before) ? webGroupsStore.onUpdateBeforeTabsRequested : undefined, onUpdateTabRequested: ((_z = components === null || components === void 0 ? void 0 : components.tabs) === null || _z === void 0 ? void 0 : _z.Element) ? webGroupsStore.onUpdateTabElementRequested : undefined, onUpdateAfterTabsComponentRequested: ((_0 = components === null || components === void 0 ? void 0 : components.tabs) === null || _0 === void 0 ? void 0 : _0.After) ? webGroupsStore.onUpdateAfterTabsRequested : undefined, onUpdateBelowTabsRequested: ((_1 = components === null || components === void 0 ? void 0 : components.tabs) === null || _1 === void 0 ? void 0 : _1.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, onRemoveTabOverflowPopupRequested: webGroupsStore.onRemoveTabOverflowPopupRequested, onShowCaptionEditorRequested: webGroupsStore.onShowCaptionEditorRequested, onCommitCaptionEditingRequested: webGroupsStore.onCommitCaptionEditingRequested, onHideCaptionEditorRequested: webGroupsStore.onHideCaptionEditorRequested, onShowLoadingAnimationRequested: webGroupsStore.onShowLoadingAnimationRequested, onHideLoadingAnimationRequested: webGroupsStore.onHideLoadingAnimationRequested }));
3455
+ React.createElement(GroupWrapper, { onCreateGroupCaptionBarRequested: ((_d = components === null || components === void 0 ? void 0 : components.group) === null || _d === void 0 ? void 0 : _d.CaptionBar) ? webGroupsStore.onCreateGroupCaptionBarRequested : undefined, onCreateGroupOverlayRequested: ((_e = components === null || components === void 0 ? void 0 : components.group) === null || _e === void 0 ? void 0 : _e.Overlay) ? webGroupsStore.onCreateGroupOverlayRequested : undefined, onCreateFrameCaptionBarRequested: ((_f = components === null || components === void 0 ? void 0 : components.flat) === null || _f === void 0 ? void 0 : _f.CaptionBar) ? webGroupsStore.onCreateFrameCaptionBarRequested : undefined, onCreateFrameWindowOverlayRequested: ((_g = components === null || components === void 0 ? void 0 : components.frame) === null || _g === void 0 ? void 0 : _g.Overlay) ? webGroupsStore.onCreateFrameWindowOverlayRequested : undefined, onCreateAboveWindowRequested: ((_h = components === null || components === void 0 ? void 0 : components.frame) === null || _h === void 0 ? void 0 : _h.AboveWindow) ? webGroupsStore.onCreateAboveWindowRequested : undefined, onCreateWindowContentOverlayRequested: ((_j = components === null || components === void 0 ? void 0 : components.frame) === null || _j === void 0 ? void 0 : _j.WindowContentOverlay) ? webGroupsStore.onCreateWindowContentOverlayRequested : undefined, onCreateFrameLoadingAnimationRequested: LoadingAnimation ? webGroupsStore.onCreateFrameLoadingAnimationRequested : undefined, onCreateBelowWindowRequested: ((_k = components === null || components === void 0 ? void 0 : components.frame) === null || _k === void 0 ? void 0 : _k.BelowWindow) ? webGroupsStore.onCreateBelowWindowRequested : undefined, onCreateAboveTabsRequested: ((_l = components === null || components === void 0 ? void 0 : components.tabs) === null || _l === void 0 ? void 0 : _l.Above) ? webGroupsStore.onCreateAboveTabsComponentRequested : undefined, onCreateBeforeTabsComponentRequested: ((_m = components === null || components === void 0 ? void 0 : components.tabs) === null || _m === void 0 ? void 0 : _m.Before) ? webGroupsStore.onCreateBeforeTabsComponentRequested : undefined, onCreateTabRequested: ((_o = components === null || components === void 0 ? void 0 : components.tabs) === null || _o === void 0 ? void 0 : _o.Element) ? webGroupsStore.onCreateTabElementRequested : undefined, onCreateAfterTabsComponentRequested: ((_p = components === null || components === void 0 ? void 0 : components.tabs) === null || _p === void 0 ? void 0 : _p.After) ? webGroupsStore.onCreateAfterTabsComponentRequested : undefined, onCreateTabHeaderButtonsRequested: ((_q = components === null || components === void 0 ? void 0 : components.tabs) === null || _q === void 0 ? void 0 : _q.Buttons) ? webGroupsStore.onCreateTabHeaderButtonsRequested : undefined, onCreateBelowTabsRequested: ((_r = components === null || components === void 0 ? void 0 : components.tabs) === null || _r === void 0 ? void 0 : _r.Below) ? webGroupsStore.onCreateBelowTabsComponentRequested : undefined, onCreateHtmlButtonsRequested: ((_s = components === null || components === void 0 ? void 0 : components.html) === null || _s === void 0 ? void 0 : _s.Buttons) ? webGroupsStore.onCreateHtmlButtonsRequested : undefined, onCreateTabOverflowPopupRequested: ((_t = components === null || components === void 0 ? void 0 : components.tabs) === null || _t === void 0 ? void 0 : _t.OverflowPopup) ? webGroupsStore.onCreateTabOverflowPopupRequested : undefined, onUpdateGroupCaptionBarRequested: ((_u = components === null || components === void 0 ? void 0 : components.group) === null || _u === void 0 ? void 0 : _u.CaptionBar) ? webGroupsStore.onUpdateGroupCaptionBarRequested : undefined, onUpdateFrameWindowOverlayRequested: ((_v = components === null || components === void 0 ? void 0 : components.group) === null || _v === void 0 ? void 0 : _v.Overlay) ? webGroupsStore.onUpdateFrameWindowOverlayRequested : undefined, onUpdateFrameCaptionBarRequested: ((_w = components === null || components === void 0 ? void 0 : components.flat) === null || _w === void 0 ? void 0 : _w.CaptionBar) ? webGroupsStore.onUpdateFrameCaptionBarRequested : undefined, onUpdateFrameRequested: webGroupsStore.onUpdateFrame, onUpdateStandardButtonRequested: webGroupsStore.onUpdateStandardButton, onUpdateCustomButtonsRequested: webGroupsStore.onUpdateCustomButtons, onUpdateAboveTabsRequested: ((_x = components === null || components === void 0 ? void 0 : components.tabs) === null || _x === void 0 ? void 0 : _x.Above) ? webGroupsStore.onUpdateAboveTabsRequested : undefined, onUpdateBeforeTabsComponentRequested: ((_y = components === null || components === void 0 ? void 0 : components.tabs) === null || _y === void 0 ? void 0 : _y.Before) ? webGroupsStore.onUpdateBeforeTabsRequested : undefined, onUpdateTabRequested: ((_z = components === null || components === void 0 ? void 0 : components.tabs) === null || _z === void 0 ? void 0 : _z.Element) ? webGroupsStore.onUpdateTabElementRequested : undefined, onUpdateAfterTabsComponentRequested: ((_0 = components === null || components === void 0 ? void 0 : components.tabs) === null || _0 === void 0 ? void 0 : _0.After) ? webGroupsStore.onUpdateAfterTabsRequested : undefined, onUpdateBelowTabsRequested: ((_1 = components === null || components === void 0 ? void 0 : components.tabs) === null || _1 === void 0 ? void 0 : _1.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, onRemoveTabOverflowPopupRequested: webGroupsStore.onRemoveTabOverflowPopupRequested, onShowCaptionEditorRequested: webGroupsStore.onShowCaptionEditorRequested, onCommitCaptionEditingRequested: webGroupsStore.onCommitCaptionEditingRequested, onHideCaptionEditorRequested: webGroupsStore.onHideCaptionEditorRequested, onShowLoadingAnimationRequested: webGroupsStore.onShowLoadingAnimationRequested, onHideLoadingAnimationRequested: webGroupsStore.onHideLoadingAnimationRequested, styles: styles }));
3342
3456
  };
3343
3457
 
3344
3458
  function useIOConnectWindow(windowId) {
@@ -3436,5 +3550,5 @@ var onCommitGroupCaptionEditingRequested = function (targetId, cb) { return webG
3436
3550
  var onCommitFlatCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb); };
3437
3551
  var onCommitTabCaptionEditingRequested = function (targetId, cb) { return webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb); };
3438
3552
 
3439
- 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 };
3553
+ 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, useDragMove, useEditableCaption, useGroupComponentVisibility, useIOConnectWindow, waitForWindow };
3440
3554
  //# sourceMappingURL=index.js.map