@dexteel/mesf-core 4.13.5 → 4.14.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [4.14.0](https://github.com/dexteel/mesf-core-frontend/compare/v4.13.5...v4.14.0) (2024-07-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * **TreePickerControl:** Add ability to display asset/drawings relationship and enable the selection of multiple nodes ([1cec643](https://github.com/dexteel/mesf-core-frontend/commit/1cec643d17959cd776691c927738dbe2d8023b83))
11
+
5
12
  ### [4.13.5](https://github.com/dexteel/mesf-core-frontend/compare/v4.12.4...v4.13.5) (2024-05-24)
6
13
 
7
14
  ## [4.13.0](https://github.com/dexteel/mesf-core-frontend/compare/v4.12.4...v4.13.0) (2024-05-24)
@@ -1,12 +1,3 @@
1
- import PropTypes from "prop-types";
2
1
  import React from "react";
3
- declare const ModalTreeFilterControl: {
4
- (props: any): React.JSX.Element;
5
- propTypes: {
6
- onClose: PropTypes.Validator<(...args: any[]) => any>;
7
- open: PropTypes.Validator<boolean>;
8
- title: PropTypes.Validator<string>;
9
- data: PropTypes.Validator<object>;
10
- };
11
- };
2
+ declare const ModalTreeFilterControl: (props: any) => React.JSX.Element;
12
3
  export { ModalTreeFilterControl };
@@ -1,6 +1,9 @@
1
1
  import React, { Component } from "react";
2
2
  type TreePickerControlProps = {
3
- onSelect: (value: string, description: string, findNode: any, showPath?: boolean) => void;
3
+ onSelect: (value: string, description: string, findNode: any, showPath?: boolean, listAssetDrawings?: number[], multipleSelectNodes?: boolean, onHide?: (showAssetTree?: boolean) => void, showAssetTree?: boolean) => void;
4
+ isLoading?: boolean;
5
+ setListAssetDrawings?: Function;
6
+ onSuccess?: (success: boolean) => void;
4
7
  [key: string]: any;
5
8
  };
6
9
  export declare const TreePickerControl: (props: TreePickerControlProps) => React.JSX.Element;
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { LicenseManager } from 'ag-grid-enterprise';
2
- import { Typography, TextField, makeStyles as makeStyles$1, Button as Button$1, Grid as Grid$1, Dialog as Dialog$1, DialogTitle as DialogTitle$2, DialogContent as DialogContent$2, DialogContentText, DialogActions as DialogActions$2, FormHelperText, CircularProgress as CircularProgress$1, Badge, FormControlLabel, Checkbox, Snackbar as Snackbar$1, Paper as Paper$1, MenuItem as MenuItem$1, useTheme as useTheme$1, Tooltip, Divider, IconButton as IconButton$1, Box, FormControl as FormControl$1, Select as Select$1, debounce, createStyles as createStyles$1, List, ListItem, ListItemText } from '@material-ui/core';
2
+ import { Typography, Checkbox, TextField, makeStyles as makeStyles$1, Button as Button$1, Grid as Grid$1, Dialog as Dialog$1, DialogTitle as DialogTitle$2, DialogContent as DialogContent$2, DialogContentText, DialogActions as DialogActions$2, FormHelperText, CircularProgress as CircularProgress$1, Badge, FormControlLabel, Snackbar as Snackbar$1, Paper as Paper$1, MenuItem as MenuItem$1, useTheme as useTheme$1, Tooltip, Divider, IconButton as IconButton$1, Box, FormControl as FormControl$1, Select as Select$1, debounce, createStyles as createStyles$1, List, ListItem, ListItemText } from '@material-ui/core';
3
3
  import { values, get, isNil as isNil$1, isEmpty, round, isNaN, isNumber } from 'lodash-es';
4
4
  import * as React from 'react';
5
5
  import React__default, { useState, useRef, useEffect, useMemo, Component, createContext, useContext, useCallback, lazy, Suspense } from 'react';
@@ -276,6 +276,20 @@ BarChartControl.propTypes = {
276
276
  keys: PropTypes.array
277
277
  };
278
278
 
279
+ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
280
+
281
+ var css$2 = ".lds-ring {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 5px solid rgb(63,81,181);\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: rgb(63,81,181) transparent transparent transparent;\n}\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
282
+ n(css$2,{});
283
+
284
+ var LazyLoading = function () {
285
+ return (React__default.createElement(React__default.Fragment, null,
286
+ React__default.createElement("div", { className: "lds-ring" },
287
+ React__default.createElement("div", null),
288
+ React__default.createElement("div", null),
289
+ React__default.createElement("div", null),
290
+ React__default.createElement("div", null))));
291
+ };
292
+
279
293
  /**********************MATERIAL UI STYLES********************** */
280
294
  /*************************************************************** */
281
295
  function MinusSquare(props) {
@@ -313,13 +327,17 @@ var StyledTreeItem = withStyles(function (theme) { return ({
313
327
  marginLeft: 7,
314
328
  paddingLeft: 18,
315
329
  borderLeft: "1px dashed ".concat(alpha(theme.palette.text.primary, 0.4))
330
+ },
331
+ label: {
332
+ backgroundColor: function (props) {
333
+ return props.isChecked ? "lightblue !important" : "inherit";
334
+ }
316
335
  }
317
336
  }); })(function (props) { return (React__default.createElement(TreeItem, __assign({}, props, { TransitionComponent: TransitionComponent }))); });
318
337
  var useTreviewStyle = makeStyles(function (theme) { return ({
319
338
  root: {
320
339
  "min-height": 264,
321
- flexGrow: 1,
322
- maxWidth: 400
340
+ flexGrow: 1
323
341
  },
324
342
  treLabelIcon: {
325
343
  marginRight: theme.spacing(1)
@@ -336,13 +354,17 @@ var useTreviewStyle = makeStyles(function (theme) { return ({
336
354
  treeLabelInactive: {
337
355
  textDecoration: "line-through",
338
356
  textDecorationColor: "red"
357
+ },
358
+ smallCheckbox: {
359
+ transform: 'scale(0.8)'
339
360
  }
340
361
  }); });
341
362
  var ModalTreeFilterControl = function (props) {
342
- var onClose = props.onClose, valueProp = props.value, open = props.open, title = props.title, data = props.data, selectBranch = props.selectBranch, selectActive = props.selectActive, selectInternal = props.selectInternal, other = __rest(props, ["onClose", "value", "open", "title", "data", "selectBranch", "selectActive", "selectInternal"]);
363
+ var onClose = props.onClose, valueProp = props.value, open = props.open, title = props.title, data = props.data, selectBranch = props.selectBranch, selectActive = props.selectActive, selectInternal = props.selectInternal, multipleSelectNodes = props.multipleSelectNodes, onHide = props.onHide, listAssetDrawings = props.listAssetDrawings, setListAssetDrawings = props.setListAssetDrawings, onSuccess = props.onSuccess, isLoading = props.isLoading, other = __rest(props, ["onClose", "value", "open", "title", "data", "selectBranch", "selectActive", "selectInternal", "multipleSelectNodes", "onHide", "listAssetDrawings", "setListAssetDrawings", "onSuccess", "isLoading"]);
343
364
  var _a = useState(valueProp), value = _a[0], setValue = _a[1];
344
365
  var _b = useState([]), expanded = _b[0], setExpanded = _b[1];
345
366
  var treeRef = useRef(null);
367
+ var _c = useState([]), selectedNodes = _c[0], setSelectedNodes = _c[1];
346
368
  useEffect(function () {
347
369
  if (!open) {
348
370
  setValue(valueProp);
@@ -359,6 +381,7 @@ var ModalTreeFilterControl = function (props) {
359
381
  };
360
382
  var handleCancel = function () {
361
383
  onClose();
384
+ onHide(false);
362
385
  };
363
386
  var handleOk = function () {
364
387
  var findNode = getNodeData(data, parseInt(value));
@@ -368,12 +391,16 @@ var ModalTreeFilterControl = function (props) {
368
391
  var internalFilter = (selectInternal && findNode.isInternal) || selectInternal !== true;
369
392
  var branchFilter = selectBranch && !findNode.isLeaf;
370
393
  if (findNode.isLeaf) {
371
- if (activeFilter && internalFilter)
394
+ if (activeFilter && internalFilter) {
372
395
  onClose(value, findNode.name, findNode);
396
+ onSuccess(true);
397
+ }
373
398
  }
374
399
  else {
375
- if (branchFilter)
400
+ if (branchFilter) {
376
401
  onClose(value, findNode.name, findNode);
402
+ onSuccess(true);
403
+ }
377
404
  }
378
405
  };
379
406
  var handleKeyDown = function (event) {
@@ -381,6 +408,9 @@ var ModalTreeFilterControl = function (props) {
381
408
  onClose();
382
409
  }
383
410
  };
411
+ var handleCheckboxClick = function (event) {
412
+ event.stopPropagation();
413
+ };
384
414
  var getNodeParent = function (node, id, chain) {
385
415
  if (chain === void 0) { chain = []; }
386
416
  if (!node || node.id === undefined) {
@@ -428,9 +458,32 @@ var ModalTreeFilterControl = function (props) {
428
458
  return null;
429
459
  };
430
460
  var classes = useTreviewStyle();
461
+ var handleCheckboxChange = function (node) {
462
+ if (node) {
463
+ var isSelected = selectedNodes.includes(node.id);
464
+ var updatedSelectedNodes = void 0;
465
+ if (isSelected) {
466
+ updatedSelectedNodes = selectedNodes.filter(function (id) { return id !== node.id; });
467
+ }
468
+ else {
469
+ updatedSelectedNodes = __spreadArray(__spreadArray([], selectedNodes, true), [node.id], false);
470
+ }
471
+ setSelectedNodes(updatedSelectedNodes);
472
+ }
473
+ };
474
+ useEffect(function () {
475
+ if ((selectedNodes === null || selectedNodes === void 0 ? void 0 : selectedNodes.length) >= 1 && setListAssetDrawings) {
476
+ setListAssetDrawings(selectedNodes);
477
+ }
478
+ }, [selectedNodes]);
479
+ useEffect(function () {
480
+ if ((listAssetDrawings === null || listAssetDrawings === void 0 ? void 0 : listAssetDrawings.length) >= 1) {
481
+ setSelectedNodes(listAssetDrawings);
482
+ }
483
+ }, [listAssetDrawings]);
431
484
  var renderTree = function (nodes) { return (
432
485
  /* @ts-ignore */
433
- React__default.createElement(StyledTreeItem, { key: nodes.id, nodeId: nodes.id.toString(), label: React__default.createElement("div", { className: classes.treeLabelRoot },
486
+ React__default.createElement(StyledTreeItem, { isChecked: selectedNodes.includes(nodes.id), key: nodes.id, nodeId: nodes.id.toString(), label: React__default.createElement("div", { className: classes.treeLabelRoot },
434
487
  nodes.isCode === true && (React__default.createElement(Code, { className: classes.treeLabelIcon, htmlColor: "#1ABC9C" })),
435
488
  nodes.isCode === false && (React__default.createElement(FolderIcon, { className: classes.treeLabelIcon, htmlColor: "#F1C40F" })),
436
489
  React__default.createElement(Typography, { variant: "body2", className: [
@@ -439,22 +492,24 @@ var ModalTreeFilterControl = function (props) {
439
492
  ].join(" ") },
440
493
  React__default.createElement("span", null,
441
494
  nodes.isCode && (React__default.createElement("i", { className: "fas fa-square mr-2", style: { color: nodes.delayCategoryColor || "#FFFFFF" } })),
442
- nodes.name))), className: "delay-item-node", id: nodes.id, "data-isbranch": !nodes.isCode }, Array.isArray(nodes.children)
495
+ nodes.name)),
496
+ multipleSelectNodes &&
497
+ React__default.createElement(Checkbox, { className: classes.smallCheckbox, size: "small", color: "primary", checked: selectedNodes.includes(nodes.id), onChange: function () {
498
+ handleCheckboxChange(nodes);
499
+ }, onClick: handleCheckboxClick })), className: "delay-item-node", id: nodes.id, "data-isbranch": !nodes.isCode }, Array.isArray(nodes.children)
443
500
  ? nodes.children.map(function (node) { return renderTree(node); })
444
501
  : null)); };
445
- return (React__default.createElement(Dialog, __assign({ onClose: function (event, reason) { return null; }, "aria-label": title, maxWidth: "xs", TransitionProps: { onEntering: handleEntering }, "aria-labelledby": "confirmation-dialog-title", open: open }, other, { onKeyDown: handleKeyDown }),
502
+ return (React__default.createElement(Dialog, __assign({ onClose: function (event, reason) { return onHide(false); }, "aria-label": title, maxWidth: "sm", TransitionProps: { onEntering: handleEntering }, "aria-labelledby": "confirmation-dialog-title", open: open }, other, { onKeyDown: handleKeyDown }),
446
503
  React__default.createElement(DialogTitle$1, { id: "confirmation-dialog-title" }, title),
447
- React__default.createElement(DialogContent$1, { dividers: true },
448
- React__default.createElement(TreeView, { className: classes.root, defaultCollapseIcon: React__default.createElement(MinusSquare, null), defaultExpandIcon: React__default.createElement(PlusSquare, null), ref: treeRef, selected: value === undefined ? "" : value.toString(), expanded: expanded, onNodeSelect: handleChange, onNodeToggle: handleToogle }, data && data.id !== undefined && renderTree(data))),
504
+ isLoading
505
+ ?
506
+ React__default.createElement("div", { style: { width: 600, minHeight: 416, display: "flex", justifyContent: "center", alignItems: "center" } },
507
+ React__default.createElement(LazyLoading, null))
508
+ : (React__default.createElement(DialogContent$1, { dividers: true },
509
+ React__default.createElement(TreeView, { className: classes.root, defaultCollapseIcon: React__default.createElement(MinusSquare, null), defaultExpandIcon: React__default.createElement(PlusSquare, null), ref: treeRef, selected: value === undefined ? "" : value.toString(), expanded: expanded, onNodeSelect: handleChange, onNodeToggle: handleToogle }, data && data.id !== undefined && renderTree(data)))),
449
510
  React__default.createElement(DialogActions$1, null,
450
511
  React__default.createElement(Button, { autoFocus: true, onClick: handleCancel, color: "primary" }, "Cancel"),
451
512
  React__default.createElement(Button, { onClick: handleOk, color: "primary" }, "Ok"))));
452
- };
453
- ModalTreeFilterControl.propTypes = {
454
- onClose: PropTypes.func.isRequired,
455
- open: PropTypes.bool.isRequired,
456
- title: PropTypes.string.isRequired,
457
- data: PropTypes.object.isRequired
458
513
  };
459
514
 
460
515
  var useStyles$t = makeStyles(function (theme) { return ({
@@ -469,14 +524,13 @@ var useStyles$t = makeStyles(function (theme) { return ({
469
524
  },
470
525
  paper: {
471
526
  width: "100%",
472
- maxWidth: 600,
473
527
  maxHeight: 600
474
528
  }
475
529
  }); });
476
530
  var TreePickerControl = function (props) {
477
531
  var classes = useStyles$t();
478
- var onSelect = props.onSelect, value = props.value; props.styleLabel; var dataSource = props.dataSource, _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var other = __rest(props, ["onSelect", "value", "styleLabel", "dataSource", "inputTitle", "showPath"]);
479
- var _c = React__default.useState(false), open = _c[0], setOpen = _c[1];
532
+ var onSelect = props.onSelect, value = props.value; props.styleLabel; var dataSource = props.dataSource, _a = props.inputTitle, inputTitle = _a === void 0 ? "Asset" : _a; props.showPath; var _c = props.multipleSelectNodes, multipleSelectNodes = _c === void 0 ? false : _c, showAssetTree = props.showAssetTree, onHide = props.onHide, _d = props.listAssetDrawings, listAssetDrawings = _d === void 0 ? [] : _d, onSuccess = props.onSuccess, isLoading = props.isLoading, other = __rest(props, ["onSelect", "value", "styleLabel", "dataSource", "inputTitle", "showPath", "multipleSelectNodes", "showAssetTree", "onHide", "listAssetDrawings", "onSuccess", "isLoading"]);
533
+ var _e = useState(false), open = _e[0], setOpen = _e[1];
480
534
  var handleClickListItem = function (e) {
481
535
  e.stopPropagation();
482
536
  setOpen(true);
@@ -484,8 +538,9 @@ var TreePickerControl = function (props) {
484
538
  var handleClose = function (newValue, newDescription, findNode) {
485
539
  setOpen(false);
486
540
  if (newValue) {
487
- if (onSelect !== undefined)
541
+ if (onSelect !== undefined) {
488
542
  onSelect(newValue, newDescription, findNode);
543
+ }
489
544
  }
490
545
  };
491
546
  var formatDescription = function (description) {
@@ -518,27 +573,35 @@ var TreePickerControl = function (props) {
518
573
  }
519
574
  };
520
575
  var description = useMemo(function () { return formatDescription(props.description); }, [props.description]);
576
+ useEffect(function () {
577
+ if (showAssetTree) {
578
+ setOpen(showAssetTree);
579
+ }
580
+ }, []);
521
581
  return (React__default.createElement(Grid, { container: true, className: classes.root },
522
- React__default.createElement(Grid, { container: true, item: true, md: 12, xs: 12, style: { position: "relative" }, title: props.description },
523
- React__default.createElement(Grid, { item: true, style: { position: "relative", width: "100%" } },
524
- React__default.createElement(TextField, { id: "treePickerTextField", label: inputTitle, variant: "outlined", value: description, margin: "dense", autoComplete: "off", fullWidth: true, disabled: true }),
525
- React__default.createElement(AccountTreeIcon, { style: {
582
+ !showAssetTree ?
583
+ React__default.createElement(Grid, { container: true, item: true, md: 12, xs: 12, style: { position: "relative" }, title: props.description },
584
+ React__default.createElement(Grid, { item: true, style: { position: "relative", width: "100%" } },
585
+ React__default.createElement(TextField, { id: "treePickerTextField", label: inputTitle, variant: "outlined", value: description, margin: "dense", autoComplete: "off", fullWidth: true, disabled: true }),
586
+ React__default.createElement(AccountTreeIcon, { style: {
587
+ position: "absolute",
588
+ right: 15,
589
+ top: 16,
590
+ cursor: "pointer"
591
+ } })),
592
+ React__default.createElement("div", { style: {
526
593
  position: "absolute",
527
- right: 15,
528
- top: 16,
594
+ top: 0,
595
+ bottom: 0,
596
+ left: 0,
597
+ right: 0,
529
598
  cursor: "pointer"
530
- } })),
531
- React__default.createElement("div", { style: {
532
- position: "absolute",
533
- top: 0,
534
- bottom: 0,
535
- left: 0,
536
- right: 0,
537
- cursor: "pointer"
538
- }, onClick: handleClickListItem })),
539
- React__default.createElement(ModalTreeFilterControl, __assign({ classes: {
540
- paper: classes.paper
541
- }, id: "modal-treeview-filter", title: props.title, keepMounted: true, open: open, onClose: handleClose, value: value, data: dataSource, onBackdropClick: function () { return setOpen(false); } }, other))));
599
+ }, onClick: handleClickListItem }))
600
+ : React__default.createElement("div", null),
601
+ React__default.createElement(Grid, { item: true, xs: 12, md: 12 },
602
+ React__default.createElement(ModalTreeFilterControl, __assign({ classes: {
603
+ paper: classes.paper
604
+ }, onHide: onHide, id: "modal-treeview-filter", title: props.title, keepMounted: true, open: open, onClose: handleClose, isLoading: isLoading, value: value, data: dataSource, onBackdropClick: function () { return setOpen(false); }, multipleSelectNodes: multipleSelectNodes, listAssetDrawings: listAssetDrawings, setListAssetDrawings: listAssetDrawings, onSuccess: onSuccess }, other)))));
542
605
  };
543
606
  var SimpleTextControl = /** @class */ (function (_super) {
544
607
  __extends(SimpleTextControl, _super);
@@ -1052,20 +1115,6 @@ var Alert = function (props) {
1052
1115
  return React__default.createElement(Alert$2, __assign({ elevation: 6, variant: "filled" }, props));
1053
1116
  };
1054
1117
 
1055
- var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
1056
-
1057
- var css$2 = ".lds-ring {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n}\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 64px;\n height: 64px;\n margin: 8px;\n border: 5px solid rgb(63,81,181);\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: rgb(63,81,181) transparent transparent transparent;\n}\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n";
1058
- n(css$2,{});
1059
-
1060
- var LazyLoading = function () {
1061
- return (React__default.createElement(React__default.Fragment, null,
1062
- React__default.createElement("div", { className: "lds-ring" },
1063
- React__default.createElement("div", null),
1064
- React__default.createElement("div", null),
1065
- React__default.createElement("div", null),
1066
- React__default.createElement("div", null))));
1067
- };
1068
-
1069
1118
  var useStyles$s = makeStyles$1(function (theme) { return ({
1070
1119
  buttons: {
1071
1120
  opacity: 0,