@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/cjs/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
10
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
11
11
 
12
- /*! *****************************************************************************
12
+ /******************************************************************************
13
13
  Copyright (c) Microsoft Corporation.
14
14
 
15
15
  Permission to use, copy, modify, and/or distribute this software for any
@@ -23,16 +23,18 @@
23
23
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24
24
  PERFORMANCE OF THIS SOFTWARE.
25
25
  ***************************************************************************** */
26
- /* global Reflect, Promise */
26
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
27
27
 
28
28
  var extendStatics = function(d, b) {
29
29
  extendStatics = Object.setPrototypeOf ||
30
30
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
31
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
32
32
  return extendStatics(d, b);
33
33
  };
34
34
 
35
35
  function __extends(d, b) {
36
+ if (typeof b !== "function" && b !== null)
37
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
36
38
  extendStatics(d, b);
37
39
  function __() { this.constructor = d; }
38
40
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -59,8 +61,18 @@
59
61
  t[p[i]] = s[p[i]];
60
62
  }
61
63
  return t;
62
- }
64
+ }
65
+
66
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
67
+ var e = new Error(message);
68
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
69
+ };
63
70
 
71
+ var StandardButtonTarget;
72
+ (function (StandardButtonTarget) {
73
+ StandardButtonTarget["Default"] = "default";
74
+ StandardButtonTarget["Frame"] = "frame";
75
+ })(StandardButtonTarget || (StandardButtonTarget = {}));
64
76
  var TargetType;
65
77
  (function (TargetType) {
66
78
  TargetType["Group"] = "group";
@@ -299,6 +311,20 @@
299
311
  }
300
312
  window.webGroupsManager.externalLibraryFactory.onCaptionTextBoundsChanged(targetType, targetId, bounds);
301
313
  };
314
+ WebGroupsManagerDecorator.prototype.startDragMove = function () {
315
+ if (typeof window.webGroupsManager.externalLibraryFactory.startDragMove !== "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.startDragMove();
320
+ };
321
+ WebGroupsManagerDecorator.prototype.showCaptionEditor = function (targetType, targetId, text) {
322
+ if (typeof window.webGroupsManager.externalLibraryFactory.showCaptionEditor !== "function") {
323
+ // Handling the case when a new library is used with an older version of io.Connect Desktop
324
+ return;
325
+ }
326
+ window.webGroupsManager.externalLibraryFactory.showCaptionEditor(targetType, targetId, text);
327
+ };
302
328
  WebGroupsManagerDecorator.prototype.onCaptionEditorVisibleChanged = function (targetType, targetId, visible) {
303
329
  if (typeof window.webGroupsManager.externalLibraryFactory.onCaptionEditorVisibleChanged !== "function") {
304
330
  // Handling the case when a new library is used with an older version of io.Connect Desktop
@@ -326,6 +352,15 @@
326
352
  WebGroupsManagerDecorator.prototype.requestCommitCaptionEditing = function (targetType, targetId) {
327
353
  this.registry.execute(targetType + "-" + targetId);
328
354
  };
355
+ WebGroupsManagerDecorator.prototype.updateTabHeaderStyles = function (styles) {
356
+ window.webGroupsManager.externalLibraryFactory.updateTabHeaderStyles(styles);
357
+ };
358
+ WebGroupsManagerDecorator.prototype.updateTabMoveAreaStyles = function (styles) {
359
+ window.webGroupsManager.externalLibraryFactory.updateTabMoveAreaStyles(styles);
360
+ };
361
+ WebGroupsManagerDecorator.prototype.updateFrameStyles = function (styles) {
362
+ window.webGroupsManager.externalLibraryFactory.updateFrameStyles(styles);
363
+ };
329
364
  WebGroupsManagerDecorator.prototype.selectTab = function (windowId) {
330
365
  window.webGroupsManager.externalLibraryFactory.selectTab(windowId);
331
366
  };
@@ -356,13 +391,35 @@
356
391
 
357
392
  var BaseButton = function (_a) {
358
393
  var outerElement = _a.outerElement, innerElement = _a.innerElement;
359
- return React__default["default"].createElement("li", __assign({}, outerElement, { className: webGroupsManager.skipFocusStyle + " " + outerElement.className }),
394
+ return React__default["default"].createElement("li", __assign({}, outerElement, { "data-testid": "outer-element", className: webGroupsManager.skipFocusStyle + " " + outerElement.className }),
360
395
  React__default["default"].createElement("div", __assign({}, innerElement)));
361
396
  };
362
397
 
363
- var CloseButton = function (_a) {
364
- var onClick = _a.onClick, tooltip = _a.tooltip;
365
- return React__default["default"].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 } });
398
+ function getStandardButtonInnerClassName(buttonId, target) {
399
+ var classNames = "t42-standard-button t42-standard-button-" + buttonId;
400
+ if (target && target !== StandardButtonTarget.Default) {
401
+ classNames = classNames.concat(" t42-standard-button-" + target + "-" + buttonId);
402
+ }
403
+ return classNames;
404
+ }
405
+ function getStandardButtonOuterClassName(buttonId, target, isPressed) {
406
+ var classNames = "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-" + buttonId;
407
+ if (isPressed === true) {
408
+ classNames = classNames.concat(" active");
409
+ }
410
+ if (target && target !== StandardButtonTarget.Default) {
411
+ classNames = classNames.concat(" t42-caption-bar-button-" + target + "-" + buttonId);
412
+ }
413
+ return classNames;
414
+ }
415
+
416
+ var StandardButton = function (_a) {
417
+ var buttonId = _a.buttonId, target = _a.target, isPressed = _a.isPressed, tooltip = _a.tooltip, onClick = _a.onClick;
418
+ return React__default["default"].createElement(BaseButton, { innerElement: { className: getStandardButtonInnerClassName(buttonId, target) }, outerElement: { className: getStandardButtonOuterClassName(buttonId, target, isPressed), title: tooltip, onClick: onClick } });
419
+ };
420
+
421
+ var CloseButton = function (props) {
422
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Close }, props));
366
423
  };
367
424
 
368
425
  /**
@@ -380,9 +437,7 @@
380
437
  constructor(color) {
381
438
  super(`Failed to parse color: "${color}"`);
382
439
  }
383
-
384
440
  }
385
-
386
441
  var ColorError$1 = ColorError;
387
442
 
388
443
  /**
@@ -390,115 +445,94 @@
390
445
  *
391
446
  * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color
392
447
  */
393
-
394
448
  function parseToRgba(color) {
395
449
  if (typeof color !== 'string') throw new ColorError$1(color);
396
450
  if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];
397
451
  let normalizedColor = color.trim();
398
452
  normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;
399
453
  const reducedHexMatch = reducedHexRegex.exec(normalizedColor);
400
-
401
454
  if (reducedHexMatch) {
402
455
  const arr = Array.from(reducedHexMatch).slice(1);
403
456
  return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];
404
457
  }
405
-
406
458
  const hexMatch = hexRegex.exec(normalizedColor);
407
-
408
459
  if (hexMatch) {
409
460
  const arr = Array.from(hexMatch).slice(1);
410
461
  return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];
411
462
  }
412
-
413
463
  const rgbaMatch = rgbaRegex.exec(normalizedColor);
414
-
415
464
  if (rgbaMatch) {
416
465
  const arr = Array.from(rgbaMatch).slice(1);
417
466
  return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];
418
467
  }
419
-
420
468
  const hslaMatch = hslaRegex.exec(normalizedColor);
421
-
422
469
  if (hslaMatch) {
423
470
  const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);
424
471
  if (guard(0, 100, s) !== s) throw new ColorError$1(color);
425
472
  if (guard(0, 100, l) !== l) throw new ColorError$1(color);
426
- return [...hslToRgb(h, s, l), a || 1];
473
+ return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];
427
474
  }
428
-
429
475
  throw new ColorError$1(color);
430
476
  }
431
-
432
477
  function hash(str) {
433
478
  let hash = 5381;
434
479
  let i = str.length;
435
-
436
480
  while (i) {
437
481
  hash = hash * 33 ^ str.charCodeAt(--i);
438
482
  }
483
+
439
484
  /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
440
485
  * integers. Since we want the results to be always positive, convert the
441
486
  * signed int to an unsigned by doing an unsigned bitshift. */
442
-
443
-
444
487
  return (hash >>> 0) % 2341;
445
488
  }
446
-
447
489
  const colorToInt = x => parseInt(x.replace(/_/g, ''), 36);
448
-
449
490
  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) => {
450
491
  const key = colorToInt(next.substring(0, 3));
451
- const hex = colorToInt(next.substring(3)).toString(16); // NOTE: padStart could be used here but it breaks Node 6 compat
452
- // https://github.com/ricokahler/color2k/issues/351
492
+ const hex = colorToInt(next.substring(3)).toString(16);
453
493
 
494
+ // NOTE: padStart could be used here but it breaks Node 6 compat
495
+ // https://github.com/ricokahler/color2k/issues/351
454
496
  let prefix = '';
455
-
456
497
  for (let i = 0; i < 6 - hex.length; i++) {
457
498
  prefix += '0';
458
499
  }
459
-
460
500
  acc[key] = `${prefix}${hex}`;
461
501
  return acc;
462
502
  }, {});
503
+
463
504
  /**
464
505
  * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
465
506
  */
466
-
467
507
  function nameToHex(color) {
468
508
  const normalizedColorName = color.toLowerCase().trim();
469
509
  const result = compressedColorMap[hash(normalizedColorName)];
470
510
  if (!result) throw new ColorError$1(color);
471
511
  return `#${result}`;
472
512
  }
473
-
474
513
  const r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');
475
-
476
514
  const reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');
477
515
  const hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');
478
516
  const rgbaRegex = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${r(',\\s*(\\d+)\\s*', 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, 'i');
479
517
  const hslaRegex = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;
480
518
  const namedColorRegex = /^[a-z]+$/i;
481
-
482
519
  const roundColor = color => {
483
520
  return Math.round(color * 255);
484
521
  };
485
-
486
522
  const hslToRgb = (hue, saturation, lightness) => {
487
523
  let l = lightness / 100;
488
-
489
524
  if (saturation === 0) {
490
525
  // achromatic
491
526
  return [l, l, l].map(roundColor);
492
- } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
493
-
527
+ }
494
528
 
529
+ // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
495
530
  const huePrime = (hue % 360 + 360) % 360 / 60;
496
531
  const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);
497
532
  const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
498
533
  let red = 0;
499
534
  let green = 0;
500
535
  let blue = 0;
501
-
502
536
  if (huePrime >= 0 && huePrime < 1) {
503
537
  red = chroma;
504
538
  green = secondComponent;
@@ -518,7 +552,6 @@
518
552
  red = chroma;
519
553
  blue = secondComponent;
520
554
  }
521
-
522
555
  const lightnessModification = l - chroma / 2;
523
556
  const finalRed = red + lightnessModification;
524
557
  const finalGreen = green + lightnessModification;
@@ -526,20 +559,18 @@
526
559
  return [finalRed, finalGreen, finalBlue].map(roundColor);
527
560
  };
528
561
 
562
+ // taken from:
529
563
  // https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js
530
564
 
531
565
  /**
532
566
  * Returns a number (float) representing the luminance of a color.
533
567
  */
534
-
535
568
  function getLuminance(color) {
536
569
  if (color === 'transparent') return 0;
537
-
538
570
  function f(x) {
539
571
  const channel = x / 255;
540
- return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
572
+ return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
541
573
  }
542
-
543
574
  const [r, g, b] = parseToRgba(color);
544
575
  return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);
545
576
  }
@@ -549,7 +580,6 @@
549
580
  * readable color (i.e. the color to be place on top the input color) should be
550
581
  * black.
551
582
  */
552
-
553
583
  function readableColorIsBlack(color) {
554
584
  return getLuminance(color) > 0.179;
555
585
  }
@@ -560,11 +590,8 @@
560
590
  var r = rgba[0];
561
591
  var g = rgba[1];
562
592
  var b = rgba[2];
563
- var displayGamma = 2.2;
564
- var backgroundWeight = 0.2126 * Math.pow(r / 255.0, displayGamma) +
565
- 0.7152 * Math.pow(g / 255.0, displayGamma) +
566
- 0.0722 * Math.pow(b / 255.0, displayGamma);
567
- return backgroundWeight > Math.pow(0.5, displayGamma);
593
+ var backgroundWeight = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
594
+ return backgroundWeight > 0.5;
568
595
  }
569
596
  catch (_a) {
570
597
  // Fallback to other implementation
@@ -642,50 +669,40 @@
642
669
  return React__default["default"].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 });
643
670
  };
644
671
 
645
- var ExtractButton = function (_a) {
646
- var onClick = _a.onClick, tooltip = _a.tooltip;
647
- return React__default["default"].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 } });
672
+ var ExtractButton = function (props) {
673
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Extract }, props));
648
674
  };
649
675
 
650
- var FeedbackButton = function (_a) {
651
- var onClick = _a.onClick, tooltip = _a.tooltip;
652
- return React__default["default"].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 } });
676
+ var FeedbackButton = function (props) {
677
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Feedback }, props));
653
678
  };
654
679
 
655
- var CloneButton = function (_a) {
656
- var onClick = _a.onClick, tooltip = _a.tooltip;
657
- return React__default["default"].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 } });
680
+ var CloneButton = function (props) {
681
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Clone }, props));
658
682
  };
659
683
 
660
- var StickyButton = function (_a) {
661
- var onClick = _a.onClick, tooltip = _a.tooltip, isPressed = _a.isPressed;
662
- var outerElementClassName = "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-sticky";
663
- return React__default["default"].createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-sticky" }, outerElement: { className: isPressed ? outerElementClassName + " active" : outerElementClassName, title: tooltip, onClick: onClick } });
684
+ var StickyButton = function (props) {
685
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Sticky }, props));
664
686
  };
665
687
 
666
- var LockButton = function (_a) {
667
- var tooltip = _a.tooltip, onClick = _a.onClick;
668
- return React__default["default"].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 } });
688
+ var LockButton = function (props) {
689
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Lock }, props));
669
690
  };
670
691
 
671
- var MaximizeButton = function (_a) {
672
- var tooltip = _a.tooltip, onClick = _a.onClick;
673
- return React__default["default"].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 } });
692
+ var MaximizeButton = function (props) {
693
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Maximize }, props));
674
694
  };
675
695
 
676
- var MinimizeButton = function (_a) {
677
- var onClick = _a.onClick, tooltip = _a.tooltip;
678
- return React__default["default"].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 } });
696
+ var MinimizeButton = function (props) {
697
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Minimize }, props));
679
698
  };
680
699
 
681
- var RestoreButton = function (_a) {
682
- var tooltip = _a.tooltip, onClick = _a.onClick;
683
- return React__default["default"].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 } });
700
+ var RestoreButton = function (props) {
701
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Restore }, props));
684
702
  };
685
703
 
686
- var UnlockButton = function (_a) {
687
- var tooltip = _a.tooltip, onClick = _a.onClick;
688
- return React__default["default"].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 } });
704
+ var UnlockButton = function (props) {
705
+ return React__default["default"].createElement(StandardButton, __assign({ buttonId: StandardButtons.Unlock }, props));
689
706
  };
690
707
 
691
708
  var CustomButton = function (_a) {
@@ -1684,11 +1701,76 @@
1684
1701
  }, [ref]);
1685
1702
  }
1686
1703
 
1704
+ function useDragMove(option) {
1705
+ var _a = (option || {}).threshold, threshold = _a === void 0 ? 3 : _a;
1706
+ var initialPos = React.useRef(null);
1707
+ var onMoveRef = React.useRef();
1708
+ var onUpRef = React.useRef();
1709
+ var cleanup = function () {
1710
+ document.removeEventListener("mousemove", onMoveRef.current, true);
1711
+ document.removeEventListener("mouseup", onUpRef.current, true);
1712
+ initialPos.current = null;
1713
+ document.body.style.pointerEvents = "auto";
1714
+ };
1715
+ if (!onMoveRef.current) {
1716
+ onMoveRef.current = function (ev) {
1717
+ if (!initialPos.current)
1718
+ return;
1719
+ var dx = ev.pageX - initialPos.current.x;
1720
+ var dy = ev.pageY - initialPos.current.y;
1721
+ if (Math.abs(dx) >= threshold || Math.abs(dy) >= threshold) {
1722
+ document.body.style.pointerEvents = "none";
1723
+ cleanup();
1724
+ webGroupsManager.startDragMove();
1725
+ }
1726
+ ev.stopPropagation();
1727
+ ev.preventDefault();
1728
+ };
1729
+ }
1730
+ if (!onUpRef.current) {
1731
+ onUpRef.current = function (ev) {
1732
+ cleanup();
1733
+ ev.stopPropagation();
1734
+ ev.preventDefault();
1735
+ };
1736
+ }
1737
+ var startDrag = function (ev) {
1738
+ if (ev.button !== 0)
1739
+ return;
1740
+ initialPos.current = { x: ev.pageX, y: ev.pageY };
1741
+ document.addEventListener("mousemove", onMoveRef.current, true);
1742
+ document.addEventListener("mouseup", onUpRef.current, true);
1743
+ ev.stopPropagation();
1744
+ ev.preventDefault();
1745
+ };
1746
+ React.useEffect(function () {
1747
+ return function () {
1748
+ if (onMoveRef.current)
1749
+ document.removeEventListener("mousemove", onMoveRef.current, true);
1750
+ if (onUpRef.current)
1751
+ document.removeEventListener("mouseup", onUpRef.current, true);
1752
+ document.body.style.pointerEvents = "auto";
1753
+ initialPos.current = null;
1754
+ };
1755
+ }, []);
1756
+ return { startDrag: startDrag };
1757
+ }
1758
+
1687
1759
  var FlatCaption = function (_a) {
1688
- var caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1760
+ var showCaptionEditor = _a.showCaptionEditor, caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1689
1761
  var ref = React.useRef(null);
1690
1762
  useEditableCaption(ref, { notifyBoundsChanged: notifyBoundsChanged });
1691
- return React__default["default"].createElement("div", { ref: ref, className: "t42-caption t42-title t42-frame-caption-bar-element" }, caption);
1763
+ var startDrag = useDragMove().startDrag;
1764
+ var handleMouseDown = function (e) {
1765
+ if (e.button !== 0)
1766
+ return;
1767
+ startDrag(e);
1768
+ };
1769
+ var handleDoubleClick = function (e) {
1770
+ showCaptionEditor(caption);
1771
+ e.stopPropagation();
1772
+ };
1773
+ return (React__default["default"].createElement("div", { ref: ref, className: "t42-caption t42-title t42-frame-caption-bar-element", onMouseDown: handleMouseDown, onDoubleClick: handleDoubleClick }, caption));
1692
1774
  };
1693
1775
 
1694
1776
  function useCaptionEditor(ref, options) {
@@ -1848,11 +1930,11 @@
1848
1930
  };
1849
1931
 
1850
1932
  var FlatCaptionBar = function (_a) {
1851
- var moveAreaId = _a.moveAreaId, caption = _a.caption, channels = _a.channels, captionEditor = _a.captionEditor, notifyCaptionBoundsChanged = _a.notifyCaptionBoundsChanged, rest = __rest(_a, ["moveAreaId", "caption", "channels", "captionEditor", "notifyCaptionBoundsChanged"]);
1933
+ 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"]);
1852
1934
  return (React__default["default"].createElement("div", { className: "t42-react-caption-bar" },
1853
1935
  (channels === null || channels === void 0 ? void 0 : channels.visible) && channels.channelsMode !== "multi" && React__default["default"].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 }),
1854
1936
  (channels === null || channels === void 0 ? void 0 : channels.visible) && channels.channelsMode === "multi" && React__default["default"].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 }),
1855
- React__default["default"].createElement(FlatMoveArea, { moveAreaId: moveAreaId }, captionEditor.show ? React__default["default"].createElement(FlatCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, frameId: rest.frameId })) : React__default["default"].createElement(FlatCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1937
+ React__default["default"].createElement(FlatMoveArea, { moveAreaId: moveAreaId }, captionEditor.show ? React__default["default"].createElement(FlatCaptionEditor, __assign({}, captionEditor, { caption: captionEditor.text, frameId: rest.frameId })) : React__default["default"].createElement(FlatCaption, { showCaptionEditor: showCaptionEditor, notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1856
1938
  React__default["default"].createElement(FlatButtons, __assign({}, rest))));
1857
1939
  };
1858
1940
 
@@ -1872,10 +1954,20 @@
1872
1954
  };
1873
1955
 
1874
1956
  var GroupCaption = function (_a) {
1875
- var caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1957
+ var showCaptionEditor = _a.showCaptionEditor, caption = _a.caption, notifyBoundsChanged = _a.notifyBoundsChanged;
1876
1958
  var ref = React.useRef(null);
1877
1959
  useEditableCaption(ref, { notifyBoundsChanged: notifyBoundsChanged });
1878
- return React__default["default"].createElement("div", { ref: ref, className: "t42-caption t42-title t42-group-caption-bar-element" }, caption);
1960
+ var startDrag = useDragMove().startDrag;
1961
+ var handleMouseDown = function (e) {
1962
+ if (e.button !== 0)
1963
+ return;
1964
+ startDrag(e);
1965
+ };
1966
+ var handleDoubleClick = function (e) {
1967
+ showCaptionEditor(caption);
1968
+ e.stopPropagation();
1969
+ };
1970
+ return (React__default["default"].createElement("div", { ref: ref, onMouseDown: handleMouseDown, onDoubleClick: handleDoubleClick, className: "t42-caption t42-title t42-group-caption-bar-element" }, caption));
1879
1971
  };
1880
1972
 
1881
1973
  var GroupCaptionEditor = function (props) {
@@ -1883,11 +1975,11 @@
1883
1975
  };
1884
1976
 
1885
1977
  var GroupCaptionBar = function (_a) {
1886
- 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"]);
1978
+ 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"]);
1887
1979
  return React__default["default"].createElement("div", { className: "t42-react-caption-bar" },
1888
1980
  React__default["default"].createElement(GroupMoveArea, { moveAreaId: moveAreaId }, (captionEditor === null || captionEditor === void 0 ? void 0 : captionEditor.show) ?
1889
1981
  React__default["default"].createElement(GroupCaptionEditor, __assign({}, captionEditor, { groupId: targetId, caption: captionEditor.text })) :
1890
- React__default["default"].createElement(GroupCaption, { notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1982
+ React__default["default"].createElement(GroupCaption, { showCaptionEditor: showCaptionEditor, notifyBoundsChanged: notifyCaptionBoundsChanged, caption: caption })),
1891
1983
  React__default["default"].createElement(GroupButtons, __assign({}, rest)));
1892
1984
  };
1893
1985
 
@@ -1946,10 +2038,10 @@
1946
2038
 
1947
2039
  var OverflowButton = function (_a) {
1948
2040
  var onClick = _a.onClick, tooltip = _a.tooltip;
1949
- return React__default["default"].createElement(BaseButton, { innerElement: { className: "t42-standard-button t42-standard-button-overflow" }, outerElement: {
2041
+ return React__default["default"].createElement(BaseButton, { innerElement: { className: getStandardButtonInnerClassName(StandardButtons.Overflow) }, outerElement: {
1950
2042
  onMouseDown: function (e) { return e.stopPropagation(); },
1951
2043
  onPointerDown: function (e) { return e.stopPropagation(); },
1952
- className: "t42-button t42-caption-bar-button t42-tab-bar-button t42-caption-bar-button-overflow", title: tooltip,
2044
+ className: getStandardButtonOuterClassName(StandardButtons.Overflow), title: tooltip,
1953
2045
  onClick: onClick
1954
2046
  } });
1955
2047
  };
@@ -2149,6 +2241,7 @@
2149
2241
  return _super !== null && _super.apply(this, arguments) || this;
2150
2242
  }
2151
2243
  GroupWrapper.prototype.componentDidMount = function () {
2244
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2152
2245
  var componentFactory = {
2153
2246
  createGroupCaptionBar: this.props.onCreateGroupCaptionBarRequested,
2154
2247
  updateGroupCaptionBar: this.props.onUpdateGroupCaptionBarRequested,
@@ -2198,6 +2291,21 @@
2198
2291
  hideLoadingAnimation: this.props.onHideLoadingAnimationRequested,
2199
2292
  };
2200
2293
  webGroupsManager.init(undefined, componentFactory);
2294
+ 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 : {});
2295
+ 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 : {});
2296
+ 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 : {});
2297
+ };
2298
+ GroupWrapper.prototype.componentDidUpdate = function (prevProps, prevState, snapshot) {
2299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
2300
+ 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)) {
2301
+ 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 : {});
2302
+ }
2303
+ 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)) {
2304
+ 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 : {});
2305
+ }
2306
+ 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)) {
2307
+ 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 : {});
2308
+ }
2201
2309
  };
2202
2310
  GroupWrapper.prototype.componentWillUnmount = function () {
2203
2311
  // TODO
@@ -2915,7 +3023,7 @@
2915
3023
 
2916
3024
  var GroupElementCreationWrapper = function (_a) {
2917
3025
  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;
2918
- var components = _a.components;
3026
+ var components = _a.components, styles = _a.styles;
2919
3027
  var state = shim.useSyncExternalStore(webGroupsStore.subscribe, webGroupsStore.getSnapshot);
2920
3028
  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;
2921
3029
  var renderGroupCaptionBar = function () {
@@ -2925,6 +3033,9 @@
2925
3033
  return;
2926
3034
  }
2927
3035
  var _b = state.groupCaptionBar, parentElement = _b.parentElement, options = __rest(_b, ["parentElement"]);
3036
+ var showCaptionEditor = function (text) {
3037
+ webGroupsManager.showCaptionEditor(TargetType.Group, options.targetId, text);
3038
+ };
2928
3039
  var minimize = __assign({ onClick: function () {
2929
3040
  webGroupsManager.onMinimizeButtonClick(TargetType.Group, options.targetId);
2930
3041
  } }, options.minimize);
@@ -2948,7 +3059,7 @@
2948
3059
  } });
2949
3060
  var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Group, options.targetId, bounds); };
2950
3061
  return (React__default["default"].createElement(Portal, { parentElement: parentElement },
2951
- React__default["default"].createElement(GroupCaptionBarCustomElement, __assign({}, options, { minimize: minimize, maximize: maximize, restore: restore, close: close, captionEditor: captionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged }))));
3062
+ React__default["default"].createElement(GroupCaptionBarCustomElement, __assign({}, options, { minimize: minimize, maximize: maximize, restore: restore, close: close, captionEditor: captionEditor, showCaptionEditor: showCaptionEditor, notifyCaptionBoundsChanged: notifyCaptionBoundsChanged }))));
2952
3063
  };
2953
3064
  var renderGroupOverlay = function () {
2954
3065
  var _a;
@@ -2969,6 +3080,9 @@
2969
3080
  return;
2970
3081
  }
2971
3082
  var parentElement = fcb.parentElement, options = __rest(fcb, ["parentElement"]);
3083
+ var showCaptionEditor = function (text) {
3084
+ webGroupsManager.showCaptionEditor(TargetType.Frame, options.targetId, text);
3085
+ };
2972
3086
  var feedback = __assign({ onClick: function () {
2973
3087
  webGroupsManager.onFeedbackButtonClick(TargetType.Frame, options.targetId);
2974
3088
  } }, options.feedback);
@@ -3037,7 +3151,7 @@
3037
3151
  } });
3038
3152
  var notifyCaptionBoundsChanged = function (bounds) { return webGroupsManager.onCaptionTextBoundsChanged(TargetType.Frame, options.targetId, bounds); };
3039
3153
  return React__default["default"].createElement(Portal, { key: options.targetId, parentElement: parentElement },
3040
- React__default["default"].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 })));
3154
+ React__default["default"].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 })));
3041
3155
  });
3042
3156
  };
3043
3157
  var renderFrameWindowOverlay = function () {
@@ -3345,7 +3459,7 @@
3345
3459
  renderTabOverflowPopups(),
3346
3460
  renderBelowTabs(),
3347
3461
  renderHtmlButtons(),
3348
- React__default["default"].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 }));
3462
+ React__default["default"].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 }));
3349
3463
  };
3350
3464
 
3351
3465
  function useIOConnectWindow(windowId) {
@@ -3490,6 +3604,7 @@
3490
3604
  exports.useCommitFlatCaptionEditingRequested = useCommitFlatCaptionEditingRequested;
3491
3605
  exports.useCommitGroupCaptionEditingRequested = useCommitGroupCaptionEditingRequested;
3492
3606
  exports.useCommitTabCaptionEditingRequested = useCommitTabCaptionEditingRequested;
3607
+ exports.useDragMove = useDragMove;
3493
3608
  exports.useEditableCaption = useEditableCaption;
3494
3609
  exports.useGroupComponentVisibility = useGroupComponentVisibility;
3495
3610
  exports.useIOConnectWindow = useIOConnectWindow;