aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails/PresElementBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/trails/PresElementBox.tsx')
-rw-r--r--src/client/views/nodes/trails/PresElementBox.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 25adfba23..a76805960 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -1,11 +1,9 @@
-/* eslint-disable jsx-a11y/no-static-element-interactions */
-/* eslint-disable jsx-a11y/click-events-have-key-events */
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Tooltip } from '@mui/material';
import { action, computed, IReactionDisposer, makeObservable, observable, reaction, runInAction } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
-import { returnEmptyDoclist, returnFalse, returnTrue, setupMoveUpEvents } from '../../../../ClientUtils';
+import { returnFalse, returnTrue, setupMoveUpEvents } from '../../../../ClientUtils';
import { Doc, DocListCast, Opt } from '../../../../fields/Doc';
import { Id } from '../../../../fields/FieldSymbols';
import { List } from '../../../../fields/List';
@@ -23,6 +21,7 @@ import { EditableView } from '../../EditableView';
import { Colors } from '../../global/globalEnums';
import { PinDocView } from '../../PinFuncs';
import { StyleProp } from '../../StyleProp';
+import { returnEmptyDocViewList } from '../../StyleProvider';
import { DocumentView } from '../DocumentView';
import { FieldView, FieldViewProps } from '../FieldView';
import { PresBox } from './PresBox';
@@ -105,7 +104,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
embedHeight = () => this.collapsedHeight + this.expandViewHeight;
embedWidth = () => this._props.PanelWidth() / 2;
// prettier-ignore
- styleProvider = ( doc: Doc | undefined, props: Opt<FieldViewProps>, property: string ): any =>
+ styleProvider = ( doc: Doc | undefined, props: Opt<FieldViewProps>, property: string ) =>
(property === StyleProp.Opacity ? 1 : this._props.styleProvider?.(doc, props, property));
/**
* The function that is responsible for rendering a preview or not for this
@@ -123,7 +122,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
hideLinkButton
ScreenToLocalTransform={Transform.Identity}
renderDepth={this._props.renderDepth + 1}
- containerViewPath={returnEmptyDoclist}
+ containerViewPath={returnEmptyDocViewList}
childFilters={this._props.childFilters}
childFiltersByRanges={this._props.childFiltersByRanges}
searchFilterDocs={this._props.searchFilterDocs}
@@ -144,6 +143,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
const childDocs = DocListCast(this.targetDoc.data);
const groupSlides = childDocs.map((doc: Doc, ind: number) => (
<div
+ key={doc[Id]}
className="presItem-groupSlide"
onClick={e => {
e.stopPropagation();
@@ -156,7 +156,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
<EditableView
ref={this._titleRef}
editing={undefined}
- contents={doc.title}
+ contents={StrCast(doc.title)}
overflow="ellipsis"
GetValue={() => StrCast(doc.title)}
SetValue={(value: string) => {
@@ -179,7 +179,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
@action
headerDown = (e: React.PointerEvent<HTMLDivElement>) => {
- const element = e.target as any;
+ const element = e.target as HTMLDivElement;
e.stopPropagation();
e.preventDefault();
if (element && !(e.ctrlKey || e.metaKey || e.button === 2)) {
@@ -580,7 +580,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
className={`presItem-slide ${isCurrent ? 'active' : ''}${activeItem.runProcess ? ' testingv2' : ''}`}
style={{
display: 'infline-block',
- backgroundColor: this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor),
+ backgroundColor: this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor) as string,
// layout_boxShadow: presBoxColor && presBoxColor !== 'white' && presBoxColor !== 'transparent' ? (isCurrent ? '0 0 0px 1.5px' + presBoxColor : undefined) : undefined,
border: presBoxColor && presBoxColor !== 'white' && presBoxColor !== 'transparent' ? (isCurrent ? presBoxColor + ' solid 2.5px' : undefined) : undefined,
}}>
@@ -602,7 +602,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
}
}}
onClick={e => e.stopPropagation()}>{`${this.indexInPres + 1}. `}</div>
- <EditableView ref={this._titleRef} oneLine editing={!isSelected ? false : undefined} contents={activeItem.title} overflow="ellipsis" GetValue={() => StrCast(activeItem.title)} SetValue={this.onSetValue} />
+ <EditableView ref={this._titleRef} oneLine editing={!isSelected ? false : undefined} contents={StrCast(activeItem.title)} overflow="ellipsis" GetValue={() => StrCast(activeItem.title)} SetValue={this.onSetValue} />
</div>
{/* <Tooltip title={<><div className="dash-tooltip">{"Movement speed"}</div></>}><div className="presItem-time" style={{ display: showMore ? "block" : "none" }}>{this.transition}</div></Tooltip> */}
{/* <Tooltip title={<><div className="dash-tooltip">{"Duration"}</div></>}><div className="presItem-time" style={{ display: showMore ? "block" : "none" }}>{this.duration}</div></Tooltip> */}