linear-react-components-ui 1.1.18-beta.1 → 1.1.18-beta.11

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.
@@ -7,7 +7,6 @@
7
7
  ".eslintrc.js": true,
8
8
  ".gitignore": true,
9
9
  "package-lock.json": true,
10
- // ".gitlab-ci.yml": true,
11
10
  ".nvmrc": true,
12
11
  ".npmignore": true,
13
12
  ".editorconfig": true,
@@ -20,7 +19,4 @@
20
19
  "editor.codeActionsOnSave": {
21
20
  "source.fixAll.eslint": "explicit"
22
21
  },
23
- "cSpell.words": [
24
- "licenca"
25
- ]
26
22
  }
@@ -26,16 +26,16 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
26
26
  pointer-events: none;
27
27
  }
28
28
 
29
- >.expandedmenu,
30
- >.collapsedmenu {
29
+ > .expandedmenu,
30
+ > .collapsedmenu {
31
31
  height: auto;
32
32
  width: 100%;
33
33
 
34
- >.help-item {
34
+ > .help-item {
35
35
  border-top: 1px solid #eee;
36
36
  }
37
37
 
38
- >.item {
38
+ > .item {
39
39
  cursor: pointer;
40
40
  border-bottom: 1px solid #eee;
41
41
  width: 100%;
@@ -47,7 +47,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
47
47
  justify-content: center;
48
48
  padding-left: 0px;
49
49
 
50
- >.searchmenubutton {
50
+ > .searchmenubutton {
51
51
  width: 100%;
52
52
  height: 100%;
53
53
  display: flex;
@@ -55,7 +55,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
55
55
  justify-content: center;
56
56
  }
57
57
 
58
- >.helpmenubutton {
58
+ > .helpmenubutton {
59
59
  width: 100%;
60
60
  height: 100%;
61
61
  display: flex;
@@ -73,25 +73,25 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
73
73
  }
74
74
  }
75
75
 
76
- >.item:hover {
76
+ > .item:hover {
77
77
  background-color: #eee;
78
78
  }
79
79
 
80
- >.item:hover>.menuicon,
81
- >.item:hover .searchmenuicon,
82
- >.item:hover>.menulink>.menuicon,
83
- >.item:hover>.menulink .searchmenuicon {
80
+ > .item:hover > .menuicon,
81
+ > .item:hover .searchmenuicon,
82
+ > .item:hover > .menulink > .menuicon,
83
+ > .item:hover > .menulink .searchmenuicon {
84
84
  fill: rgb(114, 114, 114);
85
85
  }
86
86
 
87
- >.item:hover>.title,
88
- >.item:hover>.menulink>.title {
87
+ > .item:hover > .title,
88
+ > .item:hover > .menulink > .title {
89
89
  color: rgb(114, 114, 114);
90
90
  }
91
91
  }
92
92
 
93
- >.expandedmenu.customscroll,
94
- >.collapsedmenu.customscroll {
93
+ > .expandedmenu.customscroll,
94
+ > .collapsedmenu.customscroll {
95
95
  overflow-y: auto;
96
96
 
97
97
  &::-webkit-scrollbar {
@@ -144,7 +144,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
144
144
  }
145
145
  }
146
146
 
147
- .sidenav-component>.expandedmenu {
147
+ .sidenav-component > .expandedmenu {
148
148
  animation: revealelement 0.3s;
149
149
  -moz-animation: revealelement 0.3s;
150
150
  background-color: #fff;
@@ -155,7 +155,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
155
155
  -ms-flex: 0 0 70px;
156
156
  flex: 0 0 70px;
157
157
 
158
- >.item {
158
+ > .item {
159
159
  align-content: center;
160
160
  background-color: #fff;
161
161
  display: grid;
@@ -174,12 +174,12 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
174
174
  text-decoration: none;
175
175
  }
176
176
 
177
- >.menuicon {
177
+ > .menuicon {
178
178
  justify-self: center;
179
179
  }
180
180
 
181
- >.title,
182
- >.menulink>.title {
181
+ > .title,
182
+ > .menulink > .title {
183
183
  color: #666;
184
184
  align-self: center;
185
185
  justify-self: left;
@@ -188,12 +188,12 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
188
188
  }
189
189
  }
190
190
 
191
- .sidenav-component>.collapsedmenu {
191
+ .sidenav-component > .collapsedmenu {
192
192
  display: flex;
193
193
  flex-wrap: wrap;
194
194
  align-content: flex-start;
195
195
 
196
- >.item {
196
+ > .item {
197
197
  height: 50px;
198
198
  display: grid;
199
199
  grid-template-rows: 1fr;
@@ -204,14 +204,14 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
204
204
  align-items: stretch;
205
205
  }
206
206
 
207
- >.menulink {
207
+ > .menulink {
208
208
  display: grid;
209
209
  grid-template-rows: 1fr;
210
210
  align-items: center;
211
211
  }
212
212
 
213
- >.menuicon,
214
- >.menulink>.menuicon {
213
+ > .menuicon,
214
+ > .menulink > .menuicon {
215
215
  justify-self: center;
216
216
  }
217
217
  }
@@ -219,7 +219,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
219
219
  &.-small {
220
220
  width: 55px;
221
221
 
222
- >.item {
222
+ > .item {
223
223
  height: 40px;
224
224
  }
225
225
 
@@ -231,7 +231,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
231
231
  &.-medium {
232
232
  width: 55px;
233
233
 
234
- >.item {
234
+ > .item {
235
235
  height: 50px;
236
236
  }
237
237
 
@@ -243,7 +243,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
243
243
  &.-large {
244
244
  width: 75px;
245
245
 
246
- >.item {
246
+ > .item {
247
247
  height: 60px;
248
248
  }
249
249
 
@@ -253,8 +253,8 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
253
253
  }
254
254
  }
255
255
 
256
- .sidenav-component>.collapsedmenu>.item>.submenu-container,
257
- .sidenav-component>.expandedmenu>.item>.submenu-container {
256
+ .sidenav-component > .collapsedmenu > .item > .submenu-container,
257
+ .sidenav-component > .expandedmenu > .item > .submenu-container {
258
258
  animation: 0.5s ease-in 0s 1 slideLeft;
259
259
  -moz-animation: 0.5s ease-in 0s 1 slideLeft;
260
260
  background-color: #eee;
@@ -268,7 +268,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
268
268
  box-shadow: 3px 1px 6px 0px rgba(50, 50, 50, 0.35);
269
269
  z-index: 9999999;
270
270
 
271
- >.title {
271
+ > .title {
272
272
  color: #777777;
273
273
  font-size: 24px;
274
274
  font-weight: bold;
@@ -287,7 +287,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
287
287
  grid-template-columns: repeat(2, 1fr);
288
288
  align-items: flex-start;
289
289
 
290
- >.item {
290
+ > .item {
291
291
  display: grid;
292
292
  min-height: 40px;
293
293
  align-content: center;
@@ -300,13 +300,13 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
300
300
  }
301
301
  }
302
302
 
303
- >.item:hover {
303
+ > .item:hover {
304
304
  color: #333;
305
305
  }
306
306
 
307
- >.item:before {
307
+ > .item:before {
308
308
  position: absolute;
309
- content: '';
309
+ content: "";
310
310
  left: -15px;
311
311
  top: 15px;
312
312
  border-top: 5px solid transparent;
@@ -314,11 +314,11 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
314
314
  border-left: 5px solid #808080;
315
315
  }
316
316
 
317
- >.item:nth-child(even) {
317
+ > .item:nth-child(even) {
318
318
  padding-left: 5px;
319
319
  }
320
320
 
321
- >.item>.menulink {
321
+ > .item > .menulink {
322
322
  grid-template-columns: 1fr;
323
323
  text-decoration: none;
324
324
  }
@@ -347,37 +347,38 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
347
347
  position: absolute;
348
348
  padding: 20px;
349
349
 
350
- >.closebutton {
350
+ > .closebutton {
351
351
  cursor: pointer;
352
352
  float: right;
353
353
  margin: -21px -33px 15px 0px;
354
354
  }
355
355
  }
356
356
 
357
- .helpmenu {
358
- border: solid 1px $component-border-color;
359
- border-radius: 4px;
360
- width: 300px;
361
- position: absolute;
357
+ .popup-help {
358
+ border: 1px solid $list-container-border;
362
359
 
363
- >.list-component {
360
+ > .list-component {
364
361
  box-shadow: none;
365
362
  overflow: hidden;
366
363
  border-radius: 0px;
367
364
 
368
- >.helpheader {
369
- background-color: #77777736 !important;
365
+ > .helpheader {
366
+ background-color: #bdbdbda6;
370
367
 
371
- >.title {
372
- line-height: 40px;
368
+ > .title {
369
+ line-height: 35px;
373
370
  }
374
371
  }
372
+
373
+ > .item-container > .item > .text {
374
+ font-size: 12px;
375
+ }
375
376
  }
376
377
 
377
- >.infomartion>.help-information {
378
+ .infomartion > .help-information {
378
379
  color: rgba(0, 0, 0, 0.54);
379
380
  font-size: 12px;
380
- padding-bottom: 10px;
381
+ line-height: 16px;
381
382
  }
382
383
  }
383
384
 
@@ -389,19 +390,19 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
389
390
  height: 100%;
390
391
  width: 100%;
391
392
 
392
- >.text,
393
+ > .text,
393
394
  .subtext {
394
395
  color: #a8a8a8;
395
396
  text-align: center;
396
397
  }
397
398
 
398
- >.text {
399
+ > .text {
399
400
  font-size: 26px;
400
401
  margin-top: 20px;
401
402
  }
402
403
 
403
- >.subtext {
404
+ > .subtext {
404
405
  font-size: 15px;
405
406
  margin-top: 5px;
406
407
  }
407
- }
408
+ }
@@ -27,13 +27,17 @@ const NavMenuItem = props => {
27
27
  minWidth = 500,
28
28
  columnsQtty,
29
29
  targetRef,
30
- style
30
+ disableDefaultStyle = false,
31
+ showDropdownOnClick = false,
32
+ style,
33
+ customClassForDropdown
31
34
  } = props;
32
35
  const [showSubMenu, setShowSubMenu] = (0, _react.useState)(false);
33
36
  const [targetDimensions, setTargetDimensions] = (0, _react.useState)({});
34
- const [isFinalWindow, setIsFinalWindow] = (0, _react.useState)(false);
37
+ const [isOnEndWindow, setIsOnEndWindow] = (0, _react.useState)(false);
35
38
  const submenuContainerRef = (0, _react.useRef)(null);
36
39
  const submenuContentRef = (0, _react.useRef)(null);
40
+ const menuItemRef = (0, _react.useRef)(null);
37
41
  const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
38
42
  const [onDenied] = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr));
39
43
  const {
@@ -46,39 +50,65 @@ const NavMenuItem = props => {
46
50
  disabled
47
51
  } = onDenied;
48
52
  const onMouseEnter = e => {
53
+ if (showDropdownOnClick) return;
49
54
  const windowHeight = window.innerHeight;
50
55
  const eventTarget = e.target;
51
56
  const position = eventTarget.getBoundingClientRect();
52
57
  setShowSubMenu(true);
53
58
  setTargetDimensions(position);
54
- if (position.bottom >= windowHeight - 150) setIsFinalWindow(true);
59
+ if (position.bottom >= windowHeight - 150) setIsOnEndWindow(true);
55
60
  };
56
- const toggleSubMenu = () => {
57
- setShowSubMenu(!showSubMenu);
61
+ const toggleSubMenu = e => {
62
+ if (showDropdownOnClick && e) {
63
+ const eventTarget = e.target;
64
+ if (eventTarget === menuItemRef.current) {
65
+ const windowHeight = window.innerHeight;
66
+ const position = eventTarget.getBoundingClientRect();
67
+ setShowSubMenu(!showSubMenu);
68
+ setTargetDimensions(position);
69
+ if (position.bottom >= windowHeight - 150) setIsOnEndWindow(true);
70
+ }
71
+ }
58
72
  };
59
73
  const contextValues = {
60
74
  toggleSubMenu
61
75
  };
76
+ (0, _react.useEffect)(() => {
77
+ if (showSubMenu && showDropdownOnClick) {
78
+ document.addEventListener('click', e => {
79
+ var _menuItemRef$current;
80
+ const target = e.target;
81
+ const insideMenu = (_menuItemRef$current = menuItemRef.current) === null || _menuItemRef$current === void 0 ? void 0 : _menuItemRef$current.contains(target);
82
+ if (!insideMenu) setShowSubMenu(false);
83
+ });
84
+ }
85
+ }, [showSubMenu, showDropdownOnClick]);
62
86
  (0, _react.useEffect)(() => {
63
87
  var _submenuContainerRef$, _submenuContentRef$cu, _submenuContentRef$cu2;
64
88
  const heigthSubmenuContainer = ((_submenuContainerRef$ = submenuContainerRef.current) === null || _submenuContainerRef$ === void 0 ? void 0 : _submenuContainerRef$.clientHeight) || 0;
65
89
  const heigthSubmenuContent = ((_submenuContentRef$cu = submenuContentRef.current) === null || _submenuContentRef$cu === void 0 ? void 0 : _submenuContentRef$cu.clientHeight) || 0;
66
- const maxHeigthSubMenu = isFinalWindow ? '100%' : (window.innerHeight - targetDimensions.top - (heigthSubmenuContainer - heigthSubmenuContent) - 1).toString().concat('px') || '0px';
90
+ const maxHeigthSubMenu = isOnEndWindow ? '100%' : (window.innerHeight - targetDimensions.top - (heigthSubmenuContainer - heigthSubmenuContent) - 1).toString().concat('px') || '0px';
67
91
  (_submenuContentRef$cu2 = submenuContentRef.current) === null || _submenuContentRef$cu2 === void 0 ? void 0 : _submenuContentRef$cu2.style.setProperty('max-height', maxHeigthSubMenu);
68
92
  }, [showSubMenu]);
69
93
  if (unvisible) return null;
70
94
  return /*#__PURE__*/_react.default.createElement(_helpers.SubMenuContext.Provider, {
71
95
  value: contextValues
72
96
  }, /*#__PURE__*/_react.default.createElement("li", {
73
- ref: targetRef,
74
97
  style: style,
75
- className: "item ".concat(url && !disabled && '-withlink', " ").concat(customClass, " ").concat(disabled && '-disabled'),
76
- onMouseEnter: e => {
77
- onMouseEnter(e);
98
+ ref: r => {
99
+ menuItemRef.current = r;
100
+ if (targetRef) targetRef(r);
78
101
  },
102
+ className: "item ".concat(url && !disabled && '-withlink', " ").concat(customClass, " ").concat(disabled && '-disabled'),
103
+ onMouseEnter: onMouseEnter,
79
104
  onMouseLeave: () => {
105
+ if (showDropdownOnClick) return;
80
106
  setShowSubMenu(false);
81
- setIsFinalWindow(false);
107
+ setIsOnEndWindow(false);
108
+ },
109
+ onClick: e => {
110
+ if (!showDropdownOnClick) return;
111
+ toggleSubMenu(e);
82
112
  }
83
113
  }, /*#__PURE__*/_react.default.createElement(_MenuLink.default, _extends({
84
114
  disabled: disabled
@@ -93,12 +123,12 @@ const NavMenuItem = props => {
93
123
  className: "title"
94
124
  }, title), !childrenIsSubMenu && children)), showSubMenu && children && childrenIsSubMenu && !disabled && !openSearchMenuPopup && /*#__PURE__*/_react.default.createElement("div", {
95
125
  ref: submenuContainerRef,
96
- className: "submenu-container",
97
- style: isFinalWindow ? {
126
+ className: "customClassForDropdown ".concat(disableDefaultStyle ? '' : 'submenu-container'),
127
+ style: isOnEndWindow ? {
98
128
  marginLeft: targetDimensions.width,
99
129
  bottom: '0',
100
- paddingBottom: '10px',
101
- position: 'fixed'
130
+ position: 'fixed',
131
+ zIndex: disableDefaultStyle ? 999999999 : undefined
102
132
  } : {
103
133
  marginLeft: targetDimensions.width,
104
134
  top: targetDimensions.top,
@@ -39,7 +39,6 @@ var _helpers = require("./helpers");
39
39
  var _icons = _interopRequireDefault(require("../../icons"));
40
40
  var constants = _interopRequireWildcard(require("../../internals/constants"));
41
41
  var _popup_menu_search = _interopRequireDefault(require("./popup_menu_search"));
42
- var _popup_menu_help = _interopRequireDefault(require("./popup_menu_help"));
43
42
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
44
43
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
45
44
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -59,9 +58,7 @@ const SideNav = props => {
59
58
  const [menuItemsContent, setMenuItemsContent] = (0, _react.useState)([]);
60
59
  const [sideNavDimensions, setSideNavDimensions] = (0, _react.useState)({});
61
60
  const [openSearchMenuPopup, setOpenSearchMenuPopup] = (0, _react.useState)(false);
62
- const [openHelpMenuPopup, setOpenHelpMenuPopup] = (0, _react.useState)(false);
63
61
  const sideNavRef = (0, _react.useRef)(null);
64
- const helpRef = (0, _react.useRef)(null);
65
62
  const onHeaderClick = () => {
66
63
  setIsExpanded(!isExpanded);
67
64
  if (onExpandMenuClick) onExpandMenuClick(!isExpanded);
@@ -76,20 +73,9 @@ const SideNav = props => {
76
73
  const style = "left: ".concat(left + width + 5, "px; top: ").concat(top + 1, "px; height: ").concat(height - 8, "px;");
77
74
  return style;
78
75
  };
79
- const getPopupMenuHelpStyle = () => {
80
- const {
81
- left,
82
- width
83
- } = sideNavDimensions;
84
- const style = "left: ".concat(left + width, "px; \n bottom: 0px; \n height: auto; width: 22%;\n position: fixed;");
85
- return style;
86
- };
87
76
  const closeSearchMenuPopup = () => {
88
77
  setOpenSearchMenuPopup(false);
89
78
  };
90
- const closeHelpMenuPopup = () => {
91
- setOpenHelpMenuPopup(false);
92
- };
93
79
  const compareChild = child => {
94
80
  const {
95
81
  type
@@ -118,20 +104,12 @@ const SideNav = props => {
118
104
  const openSearchMenu = () => {
119
105
  setOpenSearchMenuPopup(true);
120
106
  };
121
- const openHelpMenu = () => {
122
- setOpenHelpMenuPopup(true);
123
- };
124
107
  const onKeyDown = e => {
125
108
  if ([constants.keyCodes.F].includes(e.keyCode) && e.ctrlKey && e.shiftKey) {
126
109
  e.preventDefault();
127
110
  openSearchMenu();
128
111
  }
129
112
  };
130
- const handleClickOutside = event => {
131
- if (helpRef.current && !helpRef.current.contains(event.target)) {
132
- setOpenHelpMenuPopup(false);
133
- }
134
- };
135
113
  (0, _react.useEffect)(() => {
136
114
  document.addEventListener('keydown', onKeyDown);
137
115
  return () => {
@@ -147,12 +125,6 @@ const SideNav = props => {
147
125
  (0, _react.useEffect)(() => {
148
126
  setIsExpanded(expanded);
149
127
  }, [expanded]);
150
- (0, _react.useEffect)(() => {
151
- document.addEventListener("mousedown", handleClickOutside);
152
- return () => {
153
- document.removeEventListener("mousedown", handleClickOutside);
154
- };
155
- }, []);
156
128
  const returnMenuItems = () => menuItemsContent.filter(item => item.content !== '');
157
129
  const getPopupMenuSearch = () => /*#__PURE__*/_react.default.createElement(_NavMenuGroup.default, {
158
130
  key: "popup-menusearch-".concat(uuid.v1())
@@ -179,40 +151,10 @@ const SideNav = props => {
179
151
  handlerClose: closeSearchMenuPopup,
180
152
  menuItemsContent: menuItemsContent && returnMenuItems()
181
153
  }))));
182
- const getPopupMenuHelp = () => /*#__PURE__*/_react.default.createElement(_NavMenuGroup.default, {
183
- style: {
184
- flexGrow: 1,
185
- alignContent: 'flex-end'
186
- },
187
- key: "popup-menuhelp-".concat(uuid.v1())
188
- }, /*#__PURE__*/_react.default.createElement(_NavMenuItem.default, {
189
- childrenIsSubMenu: false,
190
- customClass: "-customsidenavitem help-item",
191
- tooltip: "Ajuda",
192
- tooltipPosition: "right"
193
- }, /*#__PURE__*/_react.default.createElement("div", {
194
- key: "helpMenuIcon",
195
- className: "helpmenubutton",
196
- role: "button",
197
- tabIndex: -1,
198
- onKeyDown: () => {},
199
- onClick: () => {
200
- openHelpMenu();
201
- }
202
- }, /*#__PURE__*/_react.default.createElement(_icons.default, {
203
- name: "question",
204
- customClass: "helphmenuicon",
205
- size: menuSize === 'small' && 16 || menuSize === 'medium' && 22 || menuSize === 'large' && 32 || 16
206
- })), openHelpMenuPopup && /*#__PURE__*/_react.default.createElement(_popup_menu_help.default, _extends({}, props, {
207
- style: getPopupMenuHelpStyle(),
208
- handlerClose: closeHelpMenuPopup,
209
- menuItemsContent: menuItemsContent && returnMenuItems()
210
- }))));
211
154
  const getSideNavContent = () => {
212
155
  if (!enableMenuSearch) return children;
213
156
  const items = [...children];
214
157
  items.splice(1, 0, getPopupMenuSearch());
215
- items.splice(items.length, 0, getPopupMenuHelp());
216
158
  return items;
217
159
  };
218
160
  const contextValues = {
@@ -7,7 +7,6 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactDom = _interopRequireDefault(require("react-dom"));
9
9
  var _list = _interopRequireWildcard(require("../../../list"));
10
- var _withDropdown = _interopRequireDefault(require("../../../../lib/dropdown/withDropdown"));
11
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -18,7 +17,8 @@ const PopupMenuHelp = props => {
18
17
  copyright,
19
18
  handlerClose,
20
19
  version,
21
- helpList = []
20
+ helpList = [],
21
+ helpRef
22
22
  } = props;
23
23
  const searchFieldRef = (0, _react.useRef)(null);
24
24
  const popupRef = (0, _react.useRef)(document.createElement('div'));
@@ -46,39 +46,40 @@ const PopupMenuHelp = props => {
46
46
  style
47
47
  });
48
48
  }, [style]);
49
- const returnList = () => {
50
- return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_list.default, {
51
- condensed: true,
52
- selectable: true,
53
- onSelectItem: handlerClose,
54
- selectOnEnter: true,
55
- style: {
56
- border: 'none',
57
- boxShadow: 'hidden',
58
- overflow: 'none'
59
- }
60
- }, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_list.ListHeader, {
61
- customClass: "helpheader",
62
- title: "Ajuda"
63
- }), helpList.map(item => /*#__PURE__*/_react.default.createElement(_list.ListItem, {
64
- separator: true,
65
- selectOnEnter: true,
66
- key: item.id,
67
- itemId: item.id,
68
- url: item.url,
69
- text: item.title
70
- })))), /*#__PURE__*/_react.default.createElement("div", {
71
- className: "infomartion",
72
- style: {
73
- padding: '10px 0px 0px 7px '
74
- }
75
- }, /*#__PURE__*/_react.default.createElement("p", {
76
- className: "help-information"
77
- }, /*#__PURE__*/_react.default.createElement("b", null, "Vers\xE3o:"), version), /*#__PURE__*/_react.default.createElement("p", {
78
- className: "help-information"
79
- }, copyright)));
80
- };
81
- const getPopupContent = () => /*#__PURE__*/_react.default.createElement(_react.Fragment, null, returnList());
49
+ const getPopupContent = () => /*#__PURE__*/_react.default.createElement("div", {
50
+ className: "popup-help",
51
+ ref: helpRef
52
+ }, /*#__PURE__*/_react.default.createElement(_list.default, {
53
+ condensed: true,
54
+ selectable: true,
55
+ onSelectItem: handlerClose,
56
+ selectOnEnter: true,
57
+ style: {
58
+ border: 'none',
59
+ boxShadow: 'hidden',
60
+ overflow: 'none'
61
+ }
62
+ }, /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_list.ListHeader, {
63
+ customClass: "helpheader",
64
+ title: "Ajuda"
65
+ }), helpList.map(item => /*#__PURE__*/_react.default.createElement(_list.ListItem, {
66
+ separator: true,
67
+ selectOnEnter: true,
68
+ key: item.id,
69
+ itemId: item.id,
70
+ url: item.url,
71
+ text: item.title
72
+ })))), /*#__PURE__*/_react.default.createElement("div", {
73
+ className: "infomartion",
74
+ style: {
75
+ padding: '10px 0px 0px 7px',
76
+ backgroundColor: 'white'
77
+ }
78
+ }, /*#__PURE__*/_react.default.createElement("p", {
79
+ className: "help-information"
80
+ }, /*#__PURE__*/_react.default.createElement("b", null, "Vers\xE3o:"), version), /*#__PURE__*/_react.default.createElement("p", {
81
+ className: "help-information"
82
+ }, copyright)));
82
83
  return /*#__PURE__*/_reactDom.default.createPortal(getPopupContent(), popupRef.current);
83
84
  };
84
- var _default = exports.default = (0, _withDropdown.default)(PopupMenuHelp);
85
+ var _default = exports.default = PopupMenuHelp;