superdesk-ui-framework 3.0.66 → 3.0.68

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 (78) hide show
  1. package/app/styles/components/_list-item.scss +22 -11
  2. package/app-typescript/components/Autocomplete.tsx +9 -3
  3. package/app-typescript/components/Badge.tsx +16 -2
  4. package/app-typescript/components/Dropdown.tsx +3 -1
  5. package/app-typescript/components/DropdownFirst.tsx +14 -2
  6. package/app-typescript/components/DurationInput.tsx +19 -4
  7. package/app-typescript/components/EmptyState.tsx +11 -2
  8. package/app-typescript/components/Layouts/Panel.tsx +12 -1
  9. package/app-typescript/components/Lists/ContentList.tsx +5 -1
  10. package/app-typescript/components/Modal.tsx +10 -1
  11. package/app-typescript/components/Navigation/BottomNav.tsx +9 -2
  12. package/app-typescript/components/Navigation/QuickNavBar.tsx +10 -2
  13. package/app-typescript/components/Navigation/SideBarMenu.tsx +9 -4
  14. package/app-typescript/components/SidebarMenu.tsx +8 -1
  15. package/app-typescript/components/TabList.tsx +5 -1
  16. package/app-typescript/components/TagInput.tsx +4 -1
  17. package/app-typescript/components/ThemeSelector.tsx +13 -2
  18. package/app-typescript/components/TreeMenu.tsx +127 -122
  19. package/app-typescript/components/TreeSelect/TreeSelect.tsx +157 -141
  20. package/app-typescript/components/WithPortal.tsx +49 -0
  21. package/app-typescript/components/avatar/avatar-image.tsx +2 -0
  22. package/app-typescript/components/avatar/avatar.tsx +2 -1
  23. package/dist/examples.bundle.js +1446 -1318
  24. package/dist/playgrounds/planning.html +121 -43
  25. package/dist/playgrounds/react-playgrounds/CoreLayout.tsx +398 -385
  26. package/dist/playgrounds/react-playgrounds/EditorTest.tsx +359 -365
  27. package/dist/playgrounds/react-playgrounds/FirstPlayground.tsx +33 -33
  28. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +227 -231
  29. package/dist/playgrounds/react-playgrounds/PageLayoutTest.tsx +41 -38
  30. package/dist/playgrounds/react-playgrounds/PersonalProfile.tsx +76 -96
  31. package/dist/playgrounds/react-playgrounds/RundownEditor.tsx +73 -101
  32. package/dist/playgrounds/react-playgrounds/Rundowns.tsx +788 -729
  33. package/dist/playgrounds/react-playgrounds/SamsPlayground.tsx +35 -26
  34. package/dist/playgrounds/react-playgrounds/TestGround.tsx +99 -128
  35. package/dist/playgrounds/react-playgrounds/UiPlayground.tsx +40 -25
  36. package/dist/playgrounds/react-playgrounds/components/GraphicButton.tsx +6 -5
  37. package/dist/playgrounds/react-playgrounds/components/Layout.tsx +0 -2
  38. package/dist/playgrounds/react-playgrounds/components/SearchBar.tsx +16 -9
  39. package/dist/playgrounds/react-playgrounds/tsconfig.json +4 -0
  40. package/dist/superdesk-ui.bundle.css +24 -14
  41. package/dist/superdesk-ui.bundle.js +830 -727
  42. package/dist/vendor.bundle.js +14 -14
  43. package/examples/pages/playgrounds/planning.html +121 -43
  44. package/examples/pages/playgrounds/react-playgrounds/CoreLayout.tsx +398 -385
  45. package/examples/pages/playgrounds/react-playgrounds/EditorTest.tsx +359 -365
  46. package/examples/pages/playgrounds/react-playgrounds/FirstPlayground.tsx +33 -33
  47. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +227 -231
  48. package/examples/pages/playgrounds/react-playgrounds/PageLayoutTest.tsx +41 -38
  49. package/examples/pages/playgrounds/react-playgrounds/PersonalProfile.tsx +76 -96
  50. package/examples/pages/playgrounds/react-playgrounds/RundownEditor.tsx +73 -101
  51. package/examples/pages/playgrounds/react-playgrounds/Rundowns.tsx +788 -729
  52. package/examples/pages/playgrounds/react-playgrounds/SamsPlayground.tsx +35 -26
  53. package/examples/pages/playgrounds/react-playgrounds/TestGround.tsx +99 -128
  54. package/examples/pages/playgrounds/react-playgrounds/UiPlayground.tsx +40 -25
  55. package/examples/pages/playgrounds/react-playgrounds/components/GraphicButton.tsx +6 -5
  56. package/examples/pages/playgrounds/react-playgrounds/components/Layout.tsx +0 -2
  57. package/examples/pages/playgrounds/react-playgrounds/components/SearchBar.tsx +16 -9
  58. package/examples/pages/playgrounds/react-playgrounds/tsconfig.json +4 -0
  59. package/package.json +3 -2
  60. package/react/components/Autocomplete.js +2 -2
  61. package/react/components/Badge.js +1 -1
  62. package/react/components/Dropdown.js +3 -1
  63. package/react/components/DropdownFirst.js +6 -2
  64. package/react/components/DurationInput.js +5 -1
  65. package/react/components/EmptyState.js +2 -1
  66. package/react/components/Lists/ContentList.js +1 -1
  67. package/react/components/Navigation/BottomNav.js +4 -1
  68. package/react/components/Navigation/QuickNavBar.js +2 -1
  69. package/react/components/Navigation/SideBarMenu.js +3 -1
  70. package/react/components/TabList.js +2 -1
  71. package/react/components/TagInput.js +1 -1
  72. package/react/components/TreeSelect/TreeSelect.d.ts +3 -2
  73. package/react/components/TreeSelect/TreeSelect.js +81 -73
  74. package/react/components/WithPortal.d.ts +14 -0
  75. package/react/components/WithPortal.js +69 -0
  76. package/react/components/avatar/avatar.js +2 -1
  77. /package/dist/playgrounds/dummy-data/{items.js → items.ts} +0 -0
  78. /package/examples/pages/playgrounds/dummy-data/{items.js → items.ts} +0 -0
@@ -64,7 +64,7 @@ var SelectPreview_1 = require("../SelectPreview");
64
64
  var TreeSelectPill_1 = require("./TreeSelectPill");
65
65
  var TreeSelectItem_1 = require("./TreeSelectItem");
66
66
  var KeyboardNavigation_1 = require("./KeyboardNavigation");
67
- var react_dom_1 = require("react-dom");
67
+ var WithPortal_1 = require("../WithPortal");
68
68
  var TreeSelect = /** @class */ (function (_super) {
69
69
  __extends(TreeSelect, _super);
70
70
  function TreeSelect(props) {
@@ -87,7 +87,10 @@ var TreeSelect = /** @class */ (function (_super) {
87
87
  if ((((_a = _this.dropdownRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target)) !== true)
88
88
  && (((_b = _this.treeSelectRef.current) === null || _b === void 0 ? void 0 : _b.contains(event.target)) !== true)
89
89
  && _this.state.openDropdown) {
90
- _this.setState({ openDropdown: false });
90
+ _this.setState({
91
+ openDropdown: false,
92
+ searchFieldValue: '',
93
+ });
91
94
  }
92
95
  };
93
96
  _this.onKeyDown = function (e) {
@@ -104,10 +107,19 @@ var TreeSelect = /** @class */ (function (_super) {
104
107
  }
105
108
  }
106
109
  };
110
+ _this.onPressEsc = function (event) {
111
+ if (event.key === 'Escape' && _this.state.openDropdown) {
112
+ _this.setState({
113
+ openDropdown: false,
114
+ searchFieldValue: '',
115
+ });
116
+ }
117
+ };
107
118
  _this.componentDidMount = function () {
108
119
  _this.recursion(_this.state.options);
109
120
  document.addEventListener("mousedown", _this.onMouseDown);
110
121
  document.addEventListener("keydown", _this.onKeyDown);
122
+ document.addEventListener("keydown", _this.onPressEsc);
111
123
  };
112
124
  _this.debounceFn = (0, debounce_1.default)(_this.handleDebounce, 500);
113
125
  _this.state = {
@@ -135,6 +147,7 @@ var TreeSelect = /** @class */ (function (_super) {
135
147
  _this.toggleMenu = _this.toggleMenu.bind(_this);
136
148
  _this.onMouseDown = _this.onMouseDown.bind(_this);
137
149
  _this.onKeyDown = _this.onKeyDown.bind(_this);
150
+ _this.onPressEsc = _this.onPressEsc.bind(_this);
138
151
  _this.dropdownRef = React.createRef();
139
152
  _this.ref = React.createRef();
140
153
  _this.inputRef = React.createRef();
@@ -147,6 +160,7 @@ var TreeSelect = /** @class */ (function (_super) {
147
160
  TreeSelect.prototype.componentWillUnmount = function () {
148
161
  document.removeEventListener("mousedown", this.onMouseDown);
149
162
  document.removeEventListener("keydown", this.onKeyDown);
163
+ document.addEventListener("keydown", this.onPressEsc);
150
164
  };
151
165
  TreeSelect.prototype.componentDidUpdate = function (prevProps, prevState) {
152
166
  var _a, _b;
@@ -173,17 +187,9 @@ var TreeSelect = /** @class */ (function (_super) {
173
187
  var _this = this;
174
188
  var _a, _b;
175
189
  if (this.state.openDropdown) {
176
- if (this.openDropdownRef.current && this.dropdownRef.current) {
177
- this.popperInstance = (0, core_1.createPopper)(this.openDropdownRef.current, this.dropdownRef.current, {
190
+ if (this.treeSelectRef.current && this.dropdownRef.current) {
191
+ this.popperInstance = (0, core_1.createPopper)(this.treeSelectRef.current, this.dropdownRef.current, {
178
192
  placement: 'bottom-start',
179
- modifiers: [
180
- {
181
- name: 'offset',
182
- options: {
183
- offset: [-4, 4],
184
- },
185
- },
186
- ],
187
193
  });
188
194
  }
189
195
  (_a = this.inputRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', function (e) {
@@ -501,13 +507,16 @@ var TreeSelect = /** @class */ (function (_super) {
501
507
  }, items: this.state.value, valueTemplate: this.props.valueTemplate, getLabel: this.props.getLabel }));
502
508
  }
503
509
  return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex, fullWidth: (_a = this.props.inputWidth === '100%') !== null && _a !== void 0 ? _a : false, "data-test-id": this.props['data-test-id'] },
504
- React.createElement("div", { className: "tags-input sd-input__input tags-input--".concat(this.props.allowMultiple ? 'multi-select' : 'single-select'), ref: this.treeSelectRef, "data-test-id": this.props.allowMultiple ? undefined : 'open-popover' }, this.props.allowMultiple
510
+ React.createElement("div", { className: "\n tags-input sd-input__input\n tags-input--".concat(this.props.allowMultiple ? 'multi-select' : 'single-select'), ref: this.treeSelectRef, "data-test-id": this.props.allowMultiple ? undefined : 'open-popover' }, this.props.allowMultiple
505
511
  ? React.createElement("div", { className: "tags-input__tags" },
506
512
  this.props.readOnly
507
- || React.createElement("button", { ref: this.openDropdownRef, className: "tags-input__add-button ".concat(this.props.disabled ? 'tags-input__add-button--disabled' : ''), onClick: function (e) {
513
+ || React.createElement("button", { ref: this.openDropdownRef, className: "\n tags-input__add-button\n ".concat(this.props.disabled ? 'tags-input__add-button--disabled' : ''), onClick: function (e) {
508
514
  e.stopPropagation();
509
515
  if (!_this.props.disabled) {
510
- _this.setState({ openDropdown: !_this.state.openDropdown });
516
+ _this.setState({
517
+ openDropdown: !_this.state.openDropdown,
518
+ searchFieldValue: '',
519
+ });
511
520
  }
512
521
  }, "data-test-id": "open-popover" },
513
522
  React.createElement("i", { className: "icon-plus-large" })),
@@ -557,68 +566,67 @@ var TreeSelect = /** @class */ (function (_super) {
557
566
  : (React.createElement(Wrapper, null,
558
567
  React.createElement("span", null, _this.props.getLabel(item)))));
559
568
  }))),
560
- (0, react_dom_1.createPortal)(this.state.openDropdown
561
- && React.createElement("div", { "data-test-id": "tree-select-popover" },
562
- React.createElement("div", { className: "autocomplete autocomplete--multi-select"
563
- + (this.props.popoverWidth === 'medium' ? ' autocomplete--fixed-width' : ''), style: {
564
- zIndex: this.props.zIndex,
565
- width: (_b = this.treeSelectRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth,
566
- }, ref: this.dropdownRef },
567
- React.createElement("div", { className: 'autocomplete__header' },
569
+ React.createElement(WithPortal_1.WithPortal, { active: this.state.openDropdown, "data-test-id": "tree-select-popover" },
570
+ React.createElement("div", { className: "autocomplete autocomplete--multi-select"
571
+ + (this.props.width === 'medium' ? ' autocomplete--fixed-width' : ''), style: {
572
+ zIndex: this.props.zIndex,
573
+ width: (_b = this.treeSelectRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth,
574
+ }, ref: this.dropdownRef },
575
+ React.createElement("div", { className: 'autocomplete__header' },
576
+ React.createElement("div", { className: "autocomplete__icon", onClick: function () {
577
+ _this.backButton();
578
+ } },
579
+ React.createElement(Icon_1.Icon, { name: "search", className: "search" })),
580
+ React.createElement("div", { className: 'autocomplete__filter' },
581
+ React.createElement("input", { className: "autocomplete__input", type: "text", placeholder: this.props.searchPlaceholder, ref: this.inputRef, value: this.state.searchFieldValue, onChange: function (event) {
582
+ var _a, _b;
583
+ if (_this.props.kind === 'synchronous') {
584
+ _this.setState({ searchFieldValue: event.target.value });
585
+ (_a = _this.popperInstance) === null || _a === void 0 ? void 0 : _a.update();
586
+ }
587
+ else if (_this.props.kind === 'asynchronous') {
588
+ if (_this.ICancelFn) {
589
+ _this.ICancelFn();
590
+ }
591
+ _this.setState({ searchFieldValue: event.target.value, options: [] });
592
+ (_b = _this.popperInstance) === null || _b === void 0 ? void 0 : _b.update();
593
+ _this.debounceFn();
594
+ }
595
+ else {
596
+ return;
597
+ }
598
+ }, "data-test-id": "filter-input" }))),
599
+ (this.state.activeTree.length > 0 && this.state.buttonValue != null)
600
+ && React.createElement("div", { className: 'autocomplete__category-header' },
568
601
  React.createElement("div", { className: "autocomplete__icon", onClick: function () {
569
602
  _this.backButton();
570
603
  } },
571
- React.createElement(Icon_1.Icon, { name: "search", className: "search" })),
604
+ React.createElement(Icon_1.Icon, { name: "arrow-left", className: "arrow-left" })),
572
605
  React.createElement("div", { className: 'autocomplete__filter' },
573
- React.createElement("input", { className: "autocomplete__input", type: "text", placeholder: this.props.searchPlaceholder, ref: this.inputRef, value: this.state.searchFieldValue, onChange: function (event) {
574
- var _a, _b;
575
- if (_this.props.kind === 'synchronous') {
576
- _this.setState({ searchFieldValue: event.target.value });
577
- (_a = _this.popperInstance) === null || _a === void 0 ? void 0 : _a.update();
578
- }
579
- else if (_this.props.kind === 'asynchronous') {
580
- if (_this.ICancelFn) {
581
- _this.ICancelFn();
582
- }
583
- _this.setState({ searchFieldValue: event.target.value, options: [] });
584
- (_b = _this.popperInstance) === null || _b === void 0 ? void 0 : _b.update();
585
- _this.debounceFn();
586
- }
587
- else {
588
- return;
589
- }
590
- }, "data-test-id": "filter-input" }))),
591
- (this.state.activeTree.length > 0 && this.state.buttonValue != null)
592
- && React.createElement("div", { className: 'autocomplete__category-header' },
593
- React.createElement("div", { className: "autocomplete__icon", onClick: function () {
594
- _this.backButton();
595
- } },
596
- React.createElement(Icon_1.Icon, { name: "arrow-left", className: "arrow-left" })),
597
- React.createElement("div", { className: 'autocomplete__filter' },
598
- React.createElement("button", { className: 'autocomplete__category-title' }, this.props.optionTemplate
599
- ? this.props.optionTemplate(this.state.buttonValue.value)
600
- : this.props.getLabel(this.state.buttonValue.value)),
601
- this.props.selectBranchWithChildren
602
- && this.branchButton(this.state.buttonValue))),
603
- this.state.loading
604
- ? React.createElement("ul", { className: "suggestion-list--loader" },
605
- React.createElement(Loader_1.Loader, { overlay: true }))
606
- : this.state.searchFieldValue === ''
607
- ? this.props.getOptions
608
- ? React.createElement("ul", { className: "suggestion-list suggestion-list--multi-select", ref: this.ref, "data-test-id": "options" }, this.state.options.map(function (option, i) {
609
- var selectedItem = _this.state.value.some(function (obj) {
610
- return _this.props.getId(obj) === _this.props.getId(option.value);
611
- });
612
- return (React.createElement(TreeSelectItem_1.TreeSelectItem, { key: i, option: option, handleTree: _this.handleTree, selectedItem: selectedItem, allowMultiple: _this.props.allowMultiple, getBorderColor: _this.props.getBorderColor, getBackgroundColor: _this.props.getBackgroundColor, getId: _this.props.getId, optionTemplate: _this.props.optionTemplate, getLabel: _this.props.getLabel, onKeyDown: function () { return _this.setState({
613
- buttonTarget: __spreadArray(__spreadArray([], _this.state.buttonTarget, true), [
614
- _this.props.getId(option.value),
615
- ], false),
616
- }); } }));
617
- }))
618
- : null
619
- : React.createElement("ul", { className: "suggestion-list suggestion-list--multi-select", ref: this.ref }, this.filteredItem(this.props.singleLevelSearch
620
- ? this.state.options
621
- : this.state.filterArr)))), document.body)));
606
+ React.createElement("button", { className: 'autocomplete__category-title' }, this.props.optionTemplate
607
+ ? this.props.optionTemplate(this.state.buttonValue.value)
608
+ : this.props.getLabel(this.state.buttonValue.value)),
609
+ this.props.selectBranchWithChildren
610
+ && this.branchButton(this.state.buttonValue))),
611
+ this.state.loading
612
+ ? React.createElement("ul", { className: "suggestion-list--loader" },
613
+ React.createElement(Loader_1.Loader, { overlay: true }))
614
+ : this.state.searchFieldValue === ''
615
+ ? this.props.getOptions
616
+ ? React.createElement("ul", { className: "suggestion-list suggestion-list--multi-select", ref: this.ref, "data-test-id": "options" }, this.state.options.map(function (option, i) {
617
+ var selectedItem = _this.state.value.some(function (obj) {
618
+ return _this.props.getId(obj) === _this.props.getId(option.value);
619
+ });
620
+ return (React.createElement(TreeSelectItem_1.TreeSelectItem, { key: i, option: option, handleTree: _this.handleTree, selectedItem: selectedItem, allowMultiple: _this.props.allowMultiple, getBorderColor: _this.props.getBorderColor, getBackgroundColor: _this.props.getBackgroundColor, getId: _this.props.getId, optionTemplate: _this.props.optionTemplate, getLabel: _this.props.getLabel, onKeyDown: function () { return _this.setState({
621
+ buttonTarget: __spreadArray(__spreadArray([], _this.state.buttonTarget, true), [
622
+ _this.props.getId(option.value),
623
+ ], false),
624
+ }); } }));
625
+ }))
626
+ : null
627
+ : React.createElement("ul", { className: "suggestion-list suggestion-list--multi-select", ref: this.ref }, this.filteredItem(this.props.singleLevelSearch
628
+ ? this.state.options
629
+ : this.state.filterArr))))));
622
630
  };
623
631
  return TreeSelect;
624
632
  }(React.Component));
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ interface IProps {
3
+ active: boolean;
4
+ 'data-test-id'?: string;
5
+ }
6
+ export declare function findParent(element: HTMLElement | null): HTMLElement | null;
7
+ export declare class WithPortal extends React.Component<IProps> {
8
+ private ref;
9
+ private dataTheme;
10
+ constructor(props: IProps);
11
+ componentDidMount(): void;
12
+ render(): JSX.Element;
13
+ }
14
+ export {};
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.WithPortal = exports.findParent = void 0;
42
+ var React = __importStar(require("react"));
43
+ var react_dom_1 = require("react-dom");
44
+ function findParent(element) {
45
+ var _a;
46
+ var dataTheme = element;
47
+ while (dataTheme != null && (dataTheme === null || dataTheme === void 0 ? void 0 : dataTheme.getAttribute('data-theme')) == null) {
48
+ dataTheme = (_a = dataTheme.parentElement) !== null && _a !== void 0 ? _a : null;
49
+ }
50
+ return dataTheme;
51
+ }
52
+ exports.findParent = findParent;
53
+ var WithPortal = /** @class */ (function (_super) {
54
+ __extends(WithPortal, _super);
55
+ function WithPortal(props) {
56
+ var _this = _super.call(this, props) || this;
57
+ _this.ref = React.createRef();
58
+ return _this;
59
+ }
60
+ WithPortal.prototype.componentDidMount = function () {
61
+ var _a, _b;
62
+ this.dataTheme = (_b = (_a = findParent(this.ref.current)) === null || _a === void 0 ? void 0 : _a.getAttribute('data-theme')) !== null && _b !== void 0 ? _b : undefined;
63
+ };
64
+ WithPortal.prototype.render = function () {
65
+ return (React.createElement("div", { ref: this.ref }, this.props.active && ((0, react_dom_1.createPortal)(React.createElement("div", { "data-theme": this.dataTheme, "data-test-id": this.props['data-test-id'] }, this.props.children), document.body))));
66
+ };
67
+ return WithPortal;
68
+ }(React.Component));
69
+ exports.WithPortal = WithPortal;
@@ -50,7 +50,8 @@ var Avatar = /** @class */ (function (_super) {
50
50
  }
51
51
  Avatar.prototype.render = function () {
52
52
  var _a = this.props, imageUrl = _a.imageUrl, initials = _a.initials, size = _a.size, statusIndicator = _a.statusIndicator, administratorIndicator = _a.administratorIndicator, icon = _a.icon, displayName = _a.displayName, customContent = _a.customContent;
53
- var tooltipCombined = [displayName, this.props.tooltip].filter(function (str) { return (str !== null && str !== void 0 ? str : '').trim().length > 0; }).join('\n');
53
+ var tooltipCombined = [displayName, this.props.tooltip]
54
+ .filter(function (str) { return (str !== null && str !== void 0 ? str : '').trim().length > 0; }).join('\n');
54
55
  return (React.createElement(avatar_wrapper_1.AvatarWrapper, { size: size, statusIndicator: statusIndicator ? { status: statusIndicator, tooltipText: '' } : undefined, administratorIndicator: administratorIndicator ? { enabled: true, tooltipText: '' } : undefined, icon: icon, isEmpty: false }, (function () {
55
56
  if (customContent != null) {
56
57
  return customContent;