mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-11 10:18:07 +09:00
Merge pull request #551 from anyproto/refactoring/arrow-functions
Refactoring/Short arrow functions
This commit is contained in:
commit
c829a0e72a
111 changed files with 282 additions and 282 deletions
2
dist/extension/js/foreground.js
vendored
2
dist/extension/js/foreground.js
vendored
|
@ -43,7 +43,7 @@
|
|||
return true;
|
||||
});
|
||||
|
||||
window.addEventListener('message', (e) => {
|
||||
window.addEventListener('message', e => {
|
||||
if (e.origin != `chrome-extension://${extensionId}`) {
|
||||
return;
|
||||
};
|
||||
|
|
2
dist/workers/graph.js
vendored
2
dist/workers/graph.js
vendored
|
@ -141,7 +141,7 @@ initFonts = () => {
|
|||
const fontFace = new FontFace(name, `url("../font/inter/regular.woff2") format("woff2")`);
|
||||
|
||||
self.fonts.add(fontFace);
|
||||
fontFace.load().then(() => { fontFamily = name; });
|
||||
fontFace.load().then(() => fontFamily = name);
|
||||
};
|
||||
|
||||
image = ({ src, bitmap }) => {
|
||||
|
|
|
@ -103,7 +103,7 @@ nativeTheme.on('updated', () => {
|
|||
function createWindow () {
|
||||
mainWindow = WindowManager.createMain({ route: Util.getRouteFromUrl(deeplinkingUrl), isChild: false });
|
||||
|
||||
mainWindow.on('close', (e) => {
|
||||
mainWindow.on('close', e => {
|
||||
Util.log('info', 'closeMain: ' + app.isQuiting);
|
||||
|
||||
if (app.isQuiting) {
|
||||
|
@ -114,7 +114,7 @@ function createWindow () {
|
|||
|
||||
if (mainWindow.isFullScreen()) {
|
||||
mainWindow.setFullScreen(false);
|
||||
mainWindow.once('leave-full-screen', () => { mainWindow.hide(); });
|
||||
mainWindow.once('leave-full-screen', () => mainWindow.hide());
|
||||
} else {
|
||||
mainWindow.hide();
|
||||
};
|
||||
|
@ -182,7 +182,7 @@ app.on('second-instance', (event, argv) => {
|
|||
mainWindow.focus();
|
||||
});
|
||||
|
||||
app.on('before-quit', (e) => {
|
||||
app.on('before-quit', e => {
|
||||
Util.log('info', 'before-quit');
|
||||
|
||||
if (app.isQuiting) {
|
||||
|
|
|
@ -16,7 +16,7 @@ $(() => {
|
|||
versionButton.on('click', e => {
|
||||
e.preventDefault();
|
||||
|
||||
var handler = (e) => {
|
||||
var handler = e => {
|
||||
e.preventDefault();
|
||||
e.clipboardData.setData('text/plain', versionText);
|
||||
|
||||
|
@ -29,7 +29,7 @@ $(() => {
|
|||
copyIcon.addClass('active');
|
||||
|
||||
clearTimeout(timeout);
|
||||
setTimeout(() => { copyIcon.removeClass('active'); }, 2000);
|
||||
setTimeout(() => copyIcon.removeClass('active'), 2000);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
|
|
|
@ -182,7 +182,7 @@ class Api {
|
|||
Util.log('info', '[Api].exit, relaunch: ' + relaunch);
|
||||
Util.send(win, 'shutdownStart');
|
||||
|
||||
Server.stop(signal).then(() => { this.shutdown(win, relaunch); });
|
||||
Server.stop(signal).then(() => this.shutdown(win, relaunch));
|
||||
};
|
||||
|
||||
setInterfaceLang (win, lang) {
|
||||
|
|
|
@ -230,7 +230,7 @@ class MenuManager {
|
|||
|
||||
{ label: 'Export templates', click: () => Util.send(this.win, 'commandGlobal', 'exportTemplates') },
|
||||
{ label: 'Export objects', click: () => Util.send(this.win, 'commandGlobal', 'exportObjects') },
|
||||
{ label: 'Export localstore', click: () => { Util.send(this.win, 'commandGlobal', 'exportLocalstore'); } },
|
||||
{ label: 'Export localstore', click: () => Util.send(this.win, 'commandGlobal', 'exportLocalstore') },
|
||||
|
||||
Separator,
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class WindowManager {
|
|||
win = null;
|
||||
});
|
||||
|
||||
win.once('ready-to-show', () => { win.show(); });
|
||||
win.once('ready-to-show', () => win.show());
|
||||
win.on('focus', () => {
|
||||
UpdateManager.setWindow(win);
|
||||
MenuManager.setWindow(win);
|
||||
|
|
|
@ -334,9 +334,9 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
|
|||
horizontal: I.MenuDirection.Center,
|
||||
commonFilter: true,
|
||||
onOpen: () => {
|
||||
window.setTimeout(() => { $(element).addClass('isFocused'); });
|
||||
window.setTimeout(() => $(element).addClass('isFocused'));
|
||||
},
|
||||
onClose: () => { $(element).removeClass('isFocused'); },
|
||||
onClose: () => $(element).removeClass('isFocused'),
|
||||
data: {
|
||||
canAdd: true,
|
||||
filter: '',
|
||||
|
|
|
@ -424,7 +424,7 @@ class App extends React.Component<object, State> {
|
|||
popupStore.closeAll();
|
||||
};
|
||||
|
||||
window.setTimeout(() => { popupStore.open(id, param); }, Constant.delay.popup);
|
||||
window.setTimeout(() => popupStore.open(id, param), Constant.delay.popup);
|
||||
};
|
||||
|
||||
onUpdateCheck (e: any, auto: boolean) {
|
||||
|
|
|
@ -411,8 +411,8 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp
|
|||
node.addClass('isDragging');
|
||||
|
||||
win.off('mousemove.cover mouseup.cover');
|
||||
win.on('mousemove.cover', (e: any) => { this.onDragMove(e); });
|
||||
win.on('mouseup.cover', (e: any) => { this.onDragEnd(e); });
|
||||
win.on('mousemove.cover', e => this.onDragMove(e));
|
||||
win.on('mouseup.cover', e => this.onDragEnd(e));
|
||||
};
|
||||
|
||||
onDragMove (e: any) {
|
||||
|
|
|
@ -961,7 +961,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
};
|
||||
|
||||
if (message.views && message.views.length) {
|
||||
window.setTimeout(() => { this.loadData(message.views[0].id, 0, true); }, 50);
|
||||
window.setTimeout(() => this.loadData(message.views[0].id, 0, true), 50);
|
||||
};
|
||||
|
||||
if (isNew) {
|
||||
|
@ -1201,7 +1201,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
block.content.objectOrder.push(it);
|
||||
};
|
||||
|
||||
window.setTimeout(() => { this.applyObjectOrder(it.groupId, records); }, 30);
|
||||
window.setTimeout(() => this.applyObjectOrder(it.groupId, records), 30);
|
||||
});
|
||||
|
||||
if (callBack) {
|
||||
|
|
|
@ -48,7 +48,7 @@ const CellFile = observer(class CellFile extends React.Component<I.Cell, State>
|
|||
};
|
||||
|
||||
const Item = (item: any) => (
|
||||
<div className="element" onClick={(e: any) => { this.onClick(e, item); }}>
|
||||
<div className="element" onClick={e => this.onClick(e, item)}>
|
||||
<div className="flex">
|
||||
<IconObject object={item} size={iconSize} />
|
||||
<div className="name">{UtilFile.name(item)}</div>
|
||||
|
|
|
@ -427,7 +427,7 @@ const Cell = observer(class Cell extends React.Component<Props> {
|
|||
});
|
||||
|
||||
if (!config.debug.ui) {
|
||||
win.off('blur.cell').on('blur.cell', () => { menuStore.closeAll(Constant.menuIds.cell); });
|
||||
win.off('blur.cell').on('blur.cell', () => menuStore.closeAll(Constant.menuIds.cell));
|
||||
};
|
||||
} else
|
||||
if (closeIfOpen) {
|
||||
|
|
|
@ -171,7 +171,7 @@ const CellObject = observer(class CellObject extends React.Component<I.Cell, Sta
|
|||
this.setState({ isEditing: v });
|
||||
|
||||
if (v) {
|
||||
window.setTimeout(() => { this.focus(); }, 15);
|
||||
window.setTimeout(() => this.focus(), 15);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -91,7 +91,7 @@ const CellSelect = observer(class CellSelect extends React.Component<I.Cell, Sta
|
|||
color={item.color}
|
||||
canEdit={!isSelect}
|
||||
className={Relation.selectClassName(relation.format)}
|
||||
onRemove={() => { this.onValueRemove(item.id); }}
|
||||
onRemove={() => this.onValueRemove(item.id)}
|
||||
/>
|
||||
</span>
|
||||
))}
|
||||
|
|
|
@ -108,7 +108,7 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone
|
|||
this.unbind();
|
||||
|
||||
const node = $(this.node);
|
||||
node.find('#scroll').on('scroll', (e: any) => { this.onScrollView(); });
|
||||
node.find('#scroll').on('scroll', e => this.onScrollView());
|
||||
};
|
||||
|
||||
unbind () {
|
||||
|
@ -267,7 +267,7 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone
|
|||
clone.attr({ id: '' }).addClass('isClone').css({ zIndex: 10000, position: 'fixed', left: -10000, top: -10000 });
|
||||
view.append(clone);
|
||||
|
||||
$(document).off('dragover').on('dragover', (e: any) => { e.preventDefault(); });
|
||||
$(document).off('dragover').on('dragover', e => e.preventDefault());
|
||||
$(window).off('dragend.board drag.board');
|
||||
$('body').addClass('grab');
|
||||
|
||||
|
@ -310,8 +310,8 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone
|
|||
this.initCacheColumn();
|
||||
this.isDraggingColumn = true;
|
||||
|
||||
win.on('drag.board', (e: any) => { this.onDragMoveColumn(e, groupId); });
|
||||
win.on('dragend.board', (e: any) => { this.onDragEndColumn(e, groupId); });
|
||||
win.on('drag.board', e => this.onDragMoveColumn(e, groupId));
|
||||
win.on('dragend.board', e => this.onDragEndColumn(e, groupId));
|
||||
};
|
||||
|
||||
onDragMoveColumn (e: any, groupId: any) {
|
||||
|
|
|
@ -105,7 +105,7 @@ const Card = observer(class Card extends React.Component<Props> {
|
|||
0: () => {
|
||||
keyboard.withCommand(e) ? UtilObject.openWindow(record) : UtilObject.openPopup(record);
|
||||
},
|
||||
2: () => { onContext(e, record.id); }
|
||||
2: () => onContext(e, record.id)
|
||||
};
|
||||
|
||||
const ids = selection ? selection.get(I.SelectType.Record) : [];
|
||||
|
|
|
@ -247,7 +247,7 @@ const Column = observer(class Column extends React.Component<Props> {
|
|||
menuStore.open('dataviewGroupEdit', {
|
||||
element: `#column-${id}-head`,
|
||||
horizontal: I.MenuDirection.Center,
|
||||
onClose: () => { node.removeClass('active'); },
|
||||
onClose: () => node.removeClass('active'),
|
||||
data: {
|
||||
rootId,
|
||||
blockId: block.id,
|
||||
|
|
|
@ -154,7 +154,7 @@ const Card = observer(class Card extends React.Component<Props> {
|
|||
0: () => {
|
||||
keyboard.withCommand(e) ? UtilObject.openWindow(record) : UtilObject.openPopup(record);
|
||||
},
|
||||
2: () => { onContext(e, record.id); }
|
||||
2: () => onContext(e, record.id)
|
||||
};
|
||||
|
||||
const ids = selection ? selection.get(I.SelectType.Record) : [];
|
||||
|
|
|
@ -168,7 +168,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent
|
|||
const node = $(this.node);
|
||||
|
||||
this.unbind();
|
||||
node.find('#scroll').on('scroll', () => { this.onScroll(); });
|
||||
node.find('#scroll').on('scroll', () => this.onScroll());
|
||||
};
|
||||
|
||||
unbind () {
|
||||
|
@ -258,8 +258,8 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent
|
|||
|
||||
$('body').addClass('colResize');
|
||||
win.off('mousemove.cell mouseup.cell');
|
||||
win.on('mousemove.cell', (e: any) => { this.onResizeMove(e, relationKey); });
|
||||
win.on('mouseup.cell', (e: any) => { this.onResizeEnd(e, relationKey); });
|
||||
win.on('mousemove.cell', e => this.onResizeMove(e, relationKey));
|
||||
win.on('mouseup.cell', e => this.onResizeEnd(e, relationKey));
|
||||
|
||||
el.addClass('isResizing');
|
||||
keyboard.setResize(true);
|
||||
|
@ -296,7 +296,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent
|
|||
width: this.checkWidth(e.pageX - this.ox),
|
||||
});
|
||||
|
||||
window.setTimeout(() => { keyboard.setResize(false); }, 50);
|
||||
window.setTimeout(() => keyboard.setResize(false), 50);
|
||||
};
|
||||
|
||||
checkWidth (width: number): number {
|
||||
|
@ -319,7 +319,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent
|
|||
isInline,
|
||||
isCollection,
|
||||
blockId: block.id,
|
||||
onAdd: () => { menuStore.closeAll(Constant.menuIds.cellAdd); }
|
||||
onAdd: () => menuStore.closeAll(Constant.menuIds.cellAdd)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -63,7 +63,7 @@ const BodyCell = observer(class BodyCell extends React.Component<Props> {
|
|||
key={id}
|
||||
id={id}
|
||||
className={cn.join(' ')}
|
||||
onClick={(e: any) => { onCellClick(e, relation.relationKey, recordId); }}
|
||||
onClick={e => onCellClick(e, relation.relationKey, recordId)}
|
||||
>
|
||||
<Cell
|
||||
ref={ref => {
|
||||
|
|
|
@ -48,7 +48,7 @@ const HeadCell = observer(class HeadCell extends React.Component<Props> {
|
|||
>
|
||||
<div className="cellContent">
|
||||
<Handle name={name} format={format} readonly={readonly} />
|
||||
<div className="resize" onMouseDown={(e: any) => { onResizeStart(e, relationKey); }} />
|
||||
<div className="resize" onMouseDown={e => onResizeStart(e, relationKey)} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -88,8 +88,8 @@ const HeadCell = observer(class HeadCell extends React.Component<Props> {
|
|||
element,
|
||||
horizontal: I.MenuDirection.Center,
|
||||
noFlipY: true,
|
||||
onOpen: () => { obj.addClass('active'); },
|
||||
onClose: () => { obj.removeClass('active'); },
|
||||
onOpen: () => obj.addClass('active'),
|
||||
onClose: () => obj.removeClass('active'),
|
||||
data: {
|
||||
loadData,
|
||||
getView,
|
||||
|
|
|
@ -125,7 +125,7 @@ const Row = observer(class Row extends React.Component<Props> {
|
|||
0: () => {
|
||||
keyboard.withCommand(e) ? UtilObject.openWindow(record) : UtilObject.openPopup(record);
|
||||
},
|
||||
2: () => { onContext(e, record.id); }
|
||||
2: () => onContext(e, record.id)
|
||||
};
|
||||
|
||||
const ids = selection ? selection.get(I.SelectType.Record) : [];
|
||||
|
|
|
@ -77,7 +77,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props
|
|||
id={Relation.cellId(PREFIX, 'type', object.id)}
|
||||
className="cellContent type"
|
||||
onClick={this.onType}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, 'type'); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, 'type')}
|
||||
onMouseLeave={this.onMouseLeave}
|
||||
>
|
||||
{typeName}
|
||||
|
@ -127,7 +127,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props
|
|||
id={Relation.cellId(PREFIX, 'setOf', object.id)}
|
||||
className="cellContent setOf"
|
||||
onClick={this.onSource}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, 'setOf', 'Query'); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, 'setOf', 'Query')}
|
||||
onMouseLeave={this.onMouseLeave}
|
||||
>
|
||||
{setOfString.length ? (
|
||||
|
@ -657,7 +657,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props
|
|||
param.classNameWrap = 'fixed fromHeader';
|
||||
};
|
||||
|
||||
menuStore.closeAll(null, () => { menuStore.open('blockRelationView', param); });
|
||||
menuStore.closeAll(null, () => menuStore.open('blockRelationView', param));
|
||||
break;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -568,8 +568,8 @@ const Block = observer(class Block extends React.Component<Props> {
|
|||
node.find('.colResize.active').removeClass('active');
|
||||
node.find('.colResize.c' + index).addClass('active');
|
||||
|
||||
win.on('mousemove.block', (e: any) => { this.onResize(e, index, offset); });
|
||||
win.on('mouseup.block', (e: any) => { this.onResizeEnd(e, index, offset); });
|
||||
win.on('mousemove.block', e => this.onResize(e, index, offset));
|
||||
win.on('mouseup.block', e => this.onResizeEnd(e, index, offset));
|
||||
|
||||
node.find('.resizable').trigger('resizeStart', [ e ]);
|
||||
};
|
||||
|
|
|
@ -69,13 +69,13 @@ const BlockImage = observer(class BlockImage extends React.Component<I.BlockComp
|
|||
<img
|
||||
className="mediaImage"
|
||||
src={commonStore.imageUrl(targetObjectId, Constant.size.image)}
|
||||
onDragStart={(e: any) => { e.preventDefault(); }}
|
||||
onDragStart={e => e.preventDefault()}
|
||||
onClick={this.onClick}
|
||||
onLoad={this.onLoad}
|
||||
onError={this.onError}
|
||||
/>
|
||||
<Icon className="download" onClick={this.onDownload} />
|
||||
<Icon className="resize" onMouseDown={(e: any) => { this.onResizeStart(e, false); }} />
|
||||
<Icon className="resize" onMouseDown={e => this.onResizeStart(e, false)} />
|
||||
</div>
|
||||
);
|
||||
break;
|
||||
|
@ -159,8 +159,8 @@ const BlockImage = observer(class BlockImage extends React.Component<I.BlockComp
|
|||
|
||||
keyboard.disableSelection(true);
|
||||
node.addClass('isResizing');
|
||||
win.on('mousemove.media', (e: any) => { this.onResize(e, checkMax); });
|
||||
win.on('mouseup.media', (e: any) => { this.onResizeEnd(e, checkMax); });
|
||||
win.on('mousemove.media', e => this.onResize(e, checkMax));
|
||||
win.on('mouseup.media', e => this.onResizeEnd(e, checkMax));
|
||||
};
|
||||
|
||||
onResize (e: any, checkMax: boolean) {
|
||||
|
|
|
@ -264,7 +264,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
component: 'select',
|
||||
onOpen: (context: any) => {
|
||||
menuContext = context;
|
||||
raf(() => { this.onOptionsOpen(type, rowId, columnId, cellId); });
|
||||
raf(() => this.onOptionsOpen(type, rowId, columnId, cellId));
|
||||
},
|
||||
onClose: () => {
|
||||
menuStore.closeAll(Constant.menuIds.table);
|
||||
|
@ -362,7 +362,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
offsetX: menuContext.getSize().width,
|
||||
vertical: I.MenuDirection.Center,
|
||||
isSub: true,
|
||||
onOpen: (context: any) => { menuSubContext = context; },
|
||||
onOpen: context => menuSubContext = context,
|
||||
data: {
|
||||
rootId,
|
||||
rebind: menuContext.ref.rebind,
|
||||
|
@ -432,7 +432,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
options: this.optionsHAlign(),
|
||||
value: current.hAlign,
|
||||
onSelect: (e: any, el: any) => {
|
||||
fill(() => { C.BlockListSetAlign(rootId, blockIds, el.id); });
|
||||
fill(() => C.BlockListSetAlign(rootId, blockIds, el.id));
|
||||
menuContext.close();
|
||||
}
|
||||
});
|
||||
|
@ -446,7 +446,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
options: this.optionsVAlign(),
|
||||
value: current.vAlign,
|
||||
onSelect: (e: any, el: any) => {
|
||||
fill(() => { C.BlockListSetVerticalAlign(rootId, blockIds, el.id); });
|
||||
fill(() => C.BlockListSetVerticalAlign(rootId, blockIds, el.id));
|
||||
menuContext.close();
|
||||
}
|
||||
});
|
||||
|
@ -457,7 +457,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
menuId = 'blockColor';
|
||||
menuParam.data = Object.assign(menuParam.data, {
|
||||
onChange: (id: string) => {
|
||||
fill(() => { C.BlockTextListSetColor(rootId, blockIds, id); });
|
||||
fill(() => C.BlockTextListSetColor(rootId, blockIds, id));
|
||||
menuContext.close();
|
||||
}
|
||||
});
|
||||
|
@ -468,7 +468,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
menuId = 'blockBackground';
|
||||
menuParam.data = Object.assign(menuParam.data, {
|
||||
onChange: (id: string) => {
|
||||
fill(() => { C.BlockListSetBackgroundColor(rootId, blockIds, id); });
|
||||
fill(() => C.BlockListSetBackgroundColor(rootId, blockIds, id));
|
||||
menuContext.close();
|
||||
}
|
||||
});
|
||||
|
@ -839,8 +839,8 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
|
||||
body.addClass('colResize');
|
||||
win.off('mousemove.table mouseup.table');
|
||||
win.on('mousemove.table', throttle((e: any) => { this.onResizeMove(e, id); }, 40));
|
||||
win.on('mouseup.table', (e: any) => { this.onResizeEnd(e, id); });
|
||||
win.on('mousemove.table', throttle(e => this.onResizeMove(e, id), 40));
|
||||
win.on('mouseup.table', e => this.onResizeEnd(e, id));
|
||||
|
||||
keyboard.setResize(true);
|
||||
};
|
||||
|
@ -921,11 +921,11 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
table.css({ width: widths[idx], zIndex: 10000, position: 'fixed', left: -10000, top: -10000 });
|
||||
node.append(table);
|
||||
|
||||
$(document).off('dragover').on('dragover', (e: any) => { e.preventDefault(); });
|
||||
$(document).off('dragover').on('dragover', e => e.preventDefault());
|
||||
e.dataTransfer.setDragImage(table.get(0), table.outerWidth(), 0);
|
||||
|
||||
win.on('drag.tableColumn', throttle((e: any) => { this.onDragMoveColumn(e, id); }, 40));
|
||||
win.on('dragend.tableColumn', (e: any) => { this.onDragEndColumn(e, id); });
|
||||
win.on('drag.tableColumn', throttle(e => this.onDragMoveColumn(e, id), 40));
|
||||
win.on('dragend.tableColumn', e => this.onDragEndColumn(e, id));
|
||||
|
||||
this.initCache(I.BlockType.TableColumn);
|
||||
this.setEditing('');
|
||||
|
@ -1013,11 +1013,11 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp
|
|||
layer.append(table);
|
||||
table.append(clone);
|
||||
|
||||
$(document).off('dragover').on('dragover', (e: any) => { e.preventDefault(); });
|
||||
$(document).off('dragover').on('dragover', e => e.preventDefault());
|
||||
e.dataTransfer.setDragImage(layer.get(0), 0, table.outerHeight());
|
||||
|
||||
win.on('drag.tableRow', throttle((e: any) => { this.onDragMoveRow(e, id); }, 40));
|
||||
win.on('dragend.tableRow', (e: any) => { this.onDragEndRow(e, id); });
|
||||
win.on('drag.tableRow', throttle(e => this.onDragMoveRow(e, id), 40));
|
||||
win.on('dragend.tableRow', e => this.onDragEndRow(e, id));
|
||||
|
||||
this.initCache(I.BlockType.TableRow);
|
||||
this.setEditing('');
|
||||
|
|
|
@ -49,8 +49,8 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro
|
|||
case I.BlockType.TableColumn:
|
||||
cn.push('handleColumn canDrag');
|
||||
|
||||
onDragStart = (e: any) => { onDragStartColumn(e, column.id); };
|
||||
onClick = (e: any) => { onHandleColumn(e, item.type, row.id, column.id, cellId); };
|
||||
onDragStart = e => onDragStartColumn(e, column.id);
|
||||
onClick = e => onHandleColumn(e, item.type, row.id, column.id, cellId);
|
||||
break;
|
||||
|
||||
case I.BlockType.TableRow:
|
||||
|
@ -58,9 +58,9 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro
|
|||
canDrag = !isHeader;
|
||||
|
||||
if (canDrag) {
|
||||
onDragStart = (e: any) => { onDragStartRow(e, row.id); };
|
||||
onDragStart = e => onDragStartRow(e, row.id);
|
||||
};
|
||||
onClick = (e: any) => { onHandleRow(e, item.type, row.id, column.id, cellId); };
|
||||
onClick = e => onHandleRow(e, item.type, row.id, column.id, cellId);
|
||||
break;
|
||||
};
|
||||
|
||||
|
@ -72,8 +72,8 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro
|
|||
<div
|
||||
className={cn.join(' ')}
|
||||
draggable={canDrag}
|
||||
onMouseEnter={(e: any) => { onEnterHandle(e, item.type, row.id, column.id); }}
|
||||
onMouseLeave={(e: any) => { onLeaveHandle(e); }}
|
||||
onMouseEnter={e => onEnterHandle(e, item.type, row.id, column.id)}
|
||||
onMouseLeave={e => onLeaveHandle(e)}
|
||||
onClick={onClick}
|
||||
onDragStart={onDragStart}
|
||||
onContextMenu={onClick}
|
||||
|
@ -144,24 +144,24 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro
|
|||
onKeyUp={(e: any, text: string, marks: I.Mark[], range: I.TextRange, props: any) => {
|
||||
onCellKeyUp(e, row.id, column.id, cellId, text, marks, range, props);
|
||||
}}
|
||||
onUpdate={() => { onCellUpdate(cellId); }}
|
||||
onFocus={(e: any) => { onCellFocus(e, row.id, column.id, cellId); }}
|
||||
onBlur={(e: any) => { onCellBlur(e, row.id, column.id, cellId); }}
|
||||
onUpdate={() => onCellUpdate(cellId)}
|
||||
onFocus={e => onCellFocus(e, row.id, column.id, cellId)}
|
||||
onBlur={e => onCellBlur(e, row.id, column.id, cellId)}
|
||||
getWrapperWidth={() => Constant.size.editor}
|
||||
/>
|
||||
) : (
|
||||
<EmptyBlock />
|
||||
)}
|
||||
|
||||
{!readonly ? <div className="resize" onMouseDown={(e: any) => { onResizeStart(e, column.id); }} /> : ''}
|
||||
<Icon className="menu" inner={inner} onClick={(e: any) => { onOptions(e, I.BlockType.Text, row.id, column.id, cellId); }} />
|
||||
{!readonly ? <div className="resize" onMouseDown={e => onResizeStart(e, column.id)} /> : ''}
|
||||
<Icon className="menu" inner={inner} onClick={e => onOptions(e, I.BlockType.Text, row.id, column.id, cellId)} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
onMouseDown (e: any) {
|
||||
keyboard.disableSelection(true);
|
||||
$(window).off('mousedown.table-cell').on('mousedown.table-cell', (e: any) => { keyboard.disableSelection(false); });
|
||||
$(window).off('mousedown.table-cell').on('mousedown.table-cell', e => keyboard.disableSelection(false));
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
@ -24,7 +24,7 @@ const BlockTableOfContents = observer(class BlockTableOfContents extends React.C
|
|||
return (
|
||||
<div
|
||||
className="item"
|
||||
onClick={(e: any) => { this.onClick(e, item.id); }}
|
||||
onClick={e => this.onClick(e, item.id)}
|
||||
style={{ paddingLeft: item.depth * 24 }}
|
||||
>
|
||||
<span>{item.text}</span>
|
||||
|
|
|
@ -203,7 +203,7 @@ const BlockText = observer(class BlockText extends React.Component<Props> {
|
|||
onMouseDown={this.onMouseDown}
|
||||
onMouseUp={this.onMouseUp}
|
||||
onInput={this.onInput}
|
||||
onDragStart={(e: any) => { e.preventDefault(); }}
|
||||
onDragStart={e => e.preventDefault()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
@ -1429,7 +1429,7 @@ const BlockText = observer(class BlockText extends React.Component<Props> {
|
|||
|
||||
onMouseUp () {
|
||||
window.clearTimeout(this.timeoutClick);
|
||||
this.timeoutClick = window.setTimeout(() => { this.clicks = 0; }, 300);
|
||||
this.timeoutClick = window.setTimeout(() => this.clicks = 0, 300);
|
||||
};
|
||||
|
||||
onSelectIcon (icon: string) {
|
||||
|
|
|
@ -32,8 +32,8 @@ const BlockType = observer(class BlockType extends React.Component<I.BlockCompon
|
|||
<div
|
||||
id={'item-' + item.id}
|
||||
className="item"
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
onMouseLeave={this.onOut}
|
||||
>
|
||||
{item.icon ? <Icon className={item.icon} /> : ''}
|
||||
|
@ -186,7 +186,7 @@ const BlockType = observer(class BlockType extends React.Component<I.BlockCompon
|
|||
|
||||
menuStore.open('typeSuggest', {
|
||||
element: `#block-${block.id} #item-menu`,
|
||||
onOpen: () => { obj.addClass('active'); },
|
||||
onOpen: () => obj.addClass('active'),
|
||||
onClose: () => {
|
||||
obj.removeClass('active');
|
||||
focus.apply();
|
||||
|
|
|
@ -102,8 +102,8 @@ class DragBox extends React.Component<Props> {
|
|||
element.addClass('isDragging');
|
||||
|
||||
win.off('mousemove.dragbox mouseup.dragbox');
|
||||
win.on('mousemove.dragbox', (e: any) => { this.onDragMove(e); });
|
||||
win.on('mouseup.dragbox', (e: any) => { this.onDragEnd(e); });
|
||||
win.on('mousemove.dragbox', e => this.onDragMove(e));
|
||||
win.on('mouseup.dragbox', e => this.onDragEnd(e));
|
||||
};
|
||||
|
||||
onDragMove (e: any) {
|
||||
|
|
|
@ -235,8 +235,8 @@ const DragProvider = observer(class DragProvider extends React.Component<Props>
|
|||
keyboard.disableSelection(true);
|
||||
Preview.hideAll();
|
||||
|
||||
win.on('drag.drag', (e: any) => { this.onDrag(e); });
|
||||
win.on('dragend.drag', (e: any) => { this.onDragEnd(e); });
|
||||
win.on('drag.drag', e => this.onDrag(e));
|
||||
win.on('dragend.drag', e => this.onDragEnd(e));
|
||||
|
||||
container.off('scroll.drag').on('scroll.drag', throttle(() => this.onScroll(), 20));
|
||||
sidebar.off('scroll.drag').on('scroll.drag', throttle(() => this.onScroll(), 20));
|
||||
|
|
|
@ -628,7 +628,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat
|
|||
};
|
||||
|
||||
e.preventDefault();
|
||||
Action.duplicate(rootId, rootId, ids[ids.length - 1], ids, I.BlockPosition.Bottom, () => { focus.clear(true); });
|
||||
Action.duplicate(rootId, rootId, ids[ids.length - 1], ids, I.BlockPosition.Bottom, () => focus.clear(true));
|
||||
});
|
||||
|
||||
for (const item of styleParam) {
|
||||
|
@ -1329,7 +1329,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat
|
|||
};
|
||||
|
||||
Action.move(rootId, rootId, obj.id, [ block.id ], (isShift ? I.BlockPosition.Bottom : I.BlockPosition.Inner), () => {
|
||||
window.setTimeout(() => { this.focus(block.id, range.from, range.to, false); }, 50);
|
||||
window.setTimeout(() => this.focus(block.id, range.from, range.to, false), 50);
|
||||
|
||||
if (next && next.isTextToggle()) {
|
||||
blockStore.toggle(rootId, next.id, true);
|
||||
|
@ -1880,7 +1880,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat
|
|||
|
||||
C.BlockCreate(rootId, blockId, position, param, (message: any) => {
|
||||
if (param.type == I.BlockType.Text) {
|
||||
window.setTimeout(() => { this.focus(message.blockId, 0, 0, false); }, 15);
|
||||
window.setTimeout(() => this.focus(message.blockId, 0, 0, false), 15);
|
||||
};
|
||||
|
||||
if (callBack) {
|
||||
|
|
|
@ -80,7 +80,7 @@ class InputWithFile extends React.Component<Props, State> {
|
|||
|
||||
if (isIcon) {
|
||||
cn.push('isIcon');
|
||||
onClick = (e: MouseEvent) => { this.onClickFile(e); };
|
||||
onClick = e => this.onClickFile(e);
|
||||
};
|
||||
|
||||
if (focused) {
|
||||
|
|
|
@ -116,7 +116,7 @@ class Header extends React.Component<Props> {
|
|||
menuParam.classNameWrap = 'fixed fromHeader';
|
||||
};
|
||||
|
||||
menuStore.closeAllForced(null, () => { menuStore.open(id, menuParam); });
|
||||
menuStore.closeAllForced(null, () => menuStore.open(id, menuParam));
|
||||
};
|
||||
|
||||
getContainer () {
|
||||
|
|
|
@ -116,7 +116,7 @@ const HeaderMainObject = observer(class HeaderMainObject extends React.Component
|
|||
const object = detailStore.get(rootId, rootId, []);
|
||||
|
||||
keyboard.disableClose(true);
|
||||
popupStore.closeAll(null, () => { UtilObject.openRoute(object); });
|
||||
popupStore.closeAll(null, () => UtilObject.openRoute(object));
|
||||
};
|
||||
|
||||
onMore () {
|
||||
|
|
|
@ -50,7 +50,7 @@ const ListObject = observer(class ListObject extends React.Component<Props> {
|
|||
offset={offset}
|
||||
limit={LIMIT}
|
||||
total={total}
|
||||
onChange={(page: number) => { this.getData(page); }}
|
||||
onChange={page => this.getData(page)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -112,7 +112,7 @@ const ListObjectManager = observer(class ListObjectManager extends React.Compone
|
|||
<Checkbox
|
||||
ref={ref => this.refCheckbox.set(item.id, ref)}
|
||||
value={this.selected.includes(item.id)}
|
||||
onChange={(e) => this.onClick(e, item)}
|
||||
onChange={e => this.onClick(e, item)}
|
||||
/>
|
||||
<div className="objectClickArea" onClick={() => UtilObject.openPopup(item)}>
|
||||
<IconObject object={item} size={iconSize} />
|
||||
|
|
|
@ -61,8 +61,8 @@ class MenuBlockAction extends React.Component<I.Menu, State> {
|
|||
<MenuItemVertical
|
||||
key={i}
|
||||
{...action}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -99,7 +99,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> {
|
|||
this._isMounted = true;
|
||||
this.rebind();
|
||||
|
||||
menu.off('mouseleave').on('mouseleave', () => { menuStore.clearTimeout(); });
|
||||
menu.off('mouseleave').on('mouseleave', () => menuStore.clearTimeout());
|
||||
};
|
||||
|
||||
componentDidUpdate () {
|
||||
|
@ -513,7 +513,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> {
|
|||
{ operator: I.FilterOperator.And, relationKey: 'layout', condition: I.FilterCondition.In, value: UtilObject.getPageLayouts() },
|
||||
],
|
||||
canAdd: true,
|
||||
onSelect: () => { close(); }
|
||||
onSelect: () => close()
|
||||
});
|
||||
break;
|
||||
};
|
||||
|
|
|
@ -50,8 +50,8 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu>
|
|||
<div
|
||||
id="item-relation-add"
|
||||
className="item add"
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
style={param.style}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
|
@ -136,8 +136,8 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu>
|
|||
{...item}
|
||||
className={cn.join(' ')}
|
||||
withDescription={item.isBlock}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
style={param.style}
|
||||
/>
|
||||
);
|
||||
|
@ -207,7 +207,7 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu>
|
|||
keyMapper: i => (items[i] || {}).id,
|
||||
});
|
||||
|
||||
$(`#${getId()}`).off('mouseleave').on('mouseleave', () => { window.clearTimeout(this.timeout); });
|
||||
$(`#${getId()}`).off('mouseleave').on('mouseleave', () => window.clearTimeout(this.timeout));
|
||||
};
|
||||
|
||||
componentDidUpdate () {
|
||||
|
@ -257,7 +257,7 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu>
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class MenuBlockHAlign extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ class MenuBlockBackground extends React.Component<I.Menu> {
|
|||
icon="color"
|
||||
inner={inner}
|
||||
checkbox={action.value == value}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, action); }}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
onMouseEnter={e => this.onOver(e, action)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -47,7 +47,7 @@ class MenuBlockBackground extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ class MenuBlockColor extends React.Component<I.Menu> {
|
|||
icon="color"
|
||||
inner={inner}
|
||||
checkbox={action.value == value}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, action); }}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
onMouseEnter={e => this.onOver(e, action)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -47,7 +47,7 @@ class MenuBlockColor extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component
|
|||
<div className="flex">
|
||||
{canTurn ? (
|
||||
<div className="section">
|
||||
<Icon id={'button-' + blockId + '-style'} arrow={true} tooltip={translate('menuBlockContextSwitchStyle')} tooltipY={I.MenuDirection.Top} className={[ styleIcon, 'blockStyle' ].join(' ')} onMouseDown={(e: any) => { this.onMark(e, 'style'); }} />
|
||||
<Icon id={'button-' + blockId + '-style'} arrow={true} tooltip={translate('menuBlockContextSwitchStyle')} tooltipY={I.MenuDirection.Top} className={[ styleIcon, 'blockStyle' ].join(' ')} onMouseDown={e => this.onMark(e, 'style')} />
|
||||
</div>
|
||||
) : ''}
|
||||
|
||||
|
@ -91,7 +91,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component
|
|||
tooltip={action.name}
|
||||
tooltipCaption={action.caption}
|
||||
tooltipY={I.MenuDirection.Top}
|
||||
onMouseDown={(e: any) => { this.onMark(e, action.type); }}
|
||||
onMouseDown={e => this.onMark(e, action.type)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -106,7 +106,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component
|
|||
tooltip={translate('commonColor')}
|
||||
tooltipCaption={`${cmd} + Shift + C`}
|
||||
tooltipY={I.MenuDirection.Top}
|
||||
onMouseDown={(e: any) => { this.onMark(e, I.MarkType.Color); }}
|
||||
onMouseDown={e => this.onMark(e, I.MarkType.Color)}
|
||||
/>
|
||||
|
||||
<Icon
|
||||
|
@ -116,7 +116,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component
|
|||
tooltip={translate('commonBackground')}
|
||||
tooltipCaption={`${cmd} + Shift + H`}
|
||||
tooltipY={I.MenuDirection.Top}
|
||||
onMouseDown={(e: any) => { this.onMark(e, I.MarkType.BgColor); }}
|
||||
onMouseDown={e => this.onMark(e, I.MarkType.BgColor)}
|
||||
/>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
|
@ -136,7 +136,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component
|
|||
className="more"
|
||||
tooltip={translate('menuBlockContextMoreOptions')}
|
||||
tooltipY={I.MenuDirection.Top}
|
||||
onMouseDown={(e: any) => { this.onMark(e, 'more'); }}
|
||||
onMouseDown={e => this.onMark(e, 'more')}
|
||||
/>
|
||||
</div>
|
||||
) : ''}
|
||||
|
@ -256,7 +256,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component
|
|||
menuStore.updateData(this.props.id, { marks });
|
||||
onChange(marks);
|
||||
|
||||
window.setTimeout(() => { focus.apply(); }, 15);
|
||||
window.setTimeout(() => focus.apply(), 15);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M
|
|||
const sections = this.getSections();
|
||||
|
||||
const Item = (item: any) => (
|
||||
<div className="item" onClick={(e: any) => { this.onSelect(e, item); }}>
|
||||
<div className="item" onClick={e => this.onSelect(e, item)}>
|
||||
<Cover preview={true} {...item} />
|
||||
{item.artist ? <div className="name">{item.artist}</div> : ''}
|
||||
</div>
|
||||
|
@ -136,7 +136,7 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M
|
|||
<div
|
||||
key={item.id}
|
||||
className={[ 'btn', (item.id == this.tab ? 'active' : '') ].join(' ')}
|
||||
onClick={() => { this.setTab(item.id); }}
|
||||
onClick={() => this.setTab(item.id)}
|
||||
>
|
||||
{item.name}
|
||||
</div>
|
||||
|
|
|
@ -178,7 +178,7 @@ const MenuBlockLatex = observer(class MenuBlockLatex extends React.Component<I.M
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ class MenuBlockLayout extends React.Component<I.Menu> {
|
|||
{...action}
|
||||
icon={action.icon || action.id}
|
||||
checkbox={action.id == value}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
@ -61,7 +61,7 @@ class MenuBlockLayout extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -92,8 +92,8 @@ const MenuBlockLink = observer(class MenuBlockLink extends React.Component<I.Men
|
|||
object={object}
|
||||
icon={item.icon}
|
||||
name={<ObjectName object={item} />}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
withDescription={item.isBig}
|
||||
description={type ? type.name : undefined}
|
||||
style={param.style}
|
||||
|
@ -206,7 +206,7 @@ const MenuBlockLink = observer(class MenuBlockLink extends React.Component<I.Men
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ const MenuBlockLinkSettings = observer(class MenuBlockLinkSettings extends React
|
|||
<MenuItemVertical
|
||||
key={i}
|
||||
{...action}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, action); }}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
onMouseEnter={e => this.onOver(e, action)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
@ -60,7 +60,7 @@ const MenuBlockLinkSettings = observer(class MenuBlockLinkSettings extends React
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -72,8 +72,8 @@ const MenuBlockMention = observer(class MenuBlockMention extends React.Component
|
|||
object={item.id == 'add' ? undefined : item}
|
||||
icon={item.icon}
|
||||
name={<ObjectName object={item} />}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
caption={type ? type.name : undefined}
|
||||
style={param.style}
|
||||
className={cn.join(' ')}
|
||||
|
@ -162,7 +162,7 @@ const MenuBlockMention = observer(class MenuBlockMention extends React.Component
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ class MenuBlockMore extends React.Component<I.Menu> {
|
|||
key={i}
|
||||
{...action}
|
||||
icon={action.icon || action.id}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -83,7 +83,7 @@ class MenuBlockMore extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
@ -508,7 +508,7 @@ class MenuBlockMore extends React.Component<I.Menu> {
|
|||
};
|
||||
|
||||
case 'pageUninstall': {
|
||||
Action.uninstall(object, false, () => { onBack(); });
|
||||
Action.uninstall(object, false, () => onBack());
|
||||
break;
|
||||
};
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React
|
|||
);
|
||||
|
||||
const ItemAdd = () => (
|
||||
<div id="item-add" className="item add" onClick={(e: any) => { this.onAdd(e); }}>
|
||||
<div id="item-add" className="item add" onClick={e => this.onAdd(e)}>
|
||||
<div className="line" />
|
||||
<div className="info">
|
||||
<Icon className="plus" />
|
||||
|
@ -111,7 +111,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React
|
|||
const scrollWrap = node.find('#scrollWrap');
|
||||
|
||||
this.resize();
|
||||
scrollWrap.off('scroll').on('scroll', (e: any) => { this.onScroll(); });
|
||||
scrollWrap.off('scroll').on('scroll', e => this.onScroll());
|
||||
|
||||
this.selectionPrevent(true);
|
||||
};
|
||||
|
@ -219,7 +219,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React
|
|||
if (idx < 0) {
|
||||
const item = items.find(it => it.relationKey == relationKey);
|
||||
const cb = () => {
|
||||
C.ObjectRelationAddFeatured(rootId, [ relationKey ], () => { analytics.event('FeatureRelation'); });
|
||||
C.ObjectRelationAddFeatured(rootId, [ relationKey ], () => analytics.event('FeatureRelation'));
|
||||
};
|
||||
|
||||
if (item.scope == I.RelationScope.Type) {
|
||||
|
@ -228,7 +228,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React
|
|||
cb();
|
||||
};
|
||||
} else {
|
||||
C.ObjectRelationRemoveFeatured(rootId, [ relationKey ], () => { analytics.event('UnfeatureRelation'); });
|
||||
C.ObjectRelationRemoveFeatured(rootId, [ relationKey ], () => analytics.event('UnfeatureRelation'));
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ const MenuBlockStyle = observer(class MenuBlockStyle extends React.Component<I.M
|
|||
key={i}
|
||||
{...action}
|
||||
checkbox={action.itemId == active}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, action); }}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
onMouseEnter={e => this.onOver(e, action)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
@ -52,7 +52,7 @@ const MenuBlockStyle = observer(class MenuBlockStyle extends React.Component<I.M
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ const MenuButton = observer(class MenuButton extends React.Component<I.Menu> {
|
|||
key={i}
|
||||
{...item}
|
||||
className={disabled ? 'disabled' : ''}
|
||||
onClick={(e: any) => { this.onSelect(e, item); }}
|
||||
onClick={e => this.onSelect(e, item)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
@ -37,8 +37,8 @@ class MenuContext extends React.Component<I.Menu> {
|
|||
key={i}
|
||||
{...action}
|
||||
icon={action.icon || action.id}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -71,7 +71,7 @@ class MenuContext extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ const MenuDataviewDate = observer(class MenuDataviewDate extends React.Component
|
|||
<MenuItemVertical
|
||||
key={i}
|
||||
{...action}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
@ -59,7 +59,7 @@ const MenuDataviewDate = observer(class MenuDataviewDate extends React.Component
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C
|
|||
let content = null;
|
||||
if (item.id == 'add') {
|
||||
content = (
|
||||
<div id="item-add" className="item add" onMouseEnter={(e: any) => { this.onOver(e, item); }} onClick={(e: any) => { this.onClick(e, item); }} style={param.style}>
|
||||
<div id="item-add" className="item add" onMouseEnter={e => this.onOver(e, item)} onClick={e => this.onClick(e, item)} style={param.style}>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{item.name}</div>
|
||||
</div>
|
||||
|
@ -69,8 +69,8 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C
|
|||
id={item.id}
|
||||
object={item}
|
||||
name={UtilFile.name(item)}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
caption={type ? type.name : undefined}
|
||||
style={param.style}
|
||||
/>
|
||||
|
@ -176,7 +176,7 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ const MenuDataviewFileValues = observer(class MenuDataviewFileValues extends Rea
|
|||
);
|
||||
|
||||
const Image = (item: any) => (
|
||||
<img src={commonStore.imageUrl(item.id, 208)} className="img" onLoad={() => { position(); }} />
|
||||
<img src={commonStore.imageUrl(item.id, 208)} className="img" onLoad={() => position()} />
|
||||
);
|
||||
|
||||
const Item = SortableElement((item: any) => {
|
||||
|
@ -70,11 +70,11 @@ const MenuDataviewFileValues = observer(class MenuDataviewFileValues extends Rea
|
|||
return (
|
||||
<div id={'item-' + item.id} className={cn.join(' ')}>
|
||||
<Handle />
|
||||
<div className="clickable" onClick={(e: any) => { UtilObject.openPopup(item); }}>
|
||||
<div className="clickable" onClick={e => UtilObject.openPopup(item)}>
|
||||
{content}
|
||||
</div>
|
||||
<div className="buttons">
|
||||
<Icon className="more" onClick={(e: any) => { this.onMore(e, item); }} />
|
||||
<Icon className="more" onClick={e => this.onMore(e, item)} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -68,9 +68,9 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M
|
|||
index={param.index}
|
||||
style={param.style}
|
||||
readonly={!allowedView}
|
||||
onOver={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onRemove={(e: any) => { this.onRemove(e, item); }}
|
||||
onOver={e => this.onOver(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
onRemove={e => this.onRemove(e, item)}
|
||||
/>
|
||||
</CellMeasurer>
|
||||
);
|
||||
|
@ -139,7 +139,7 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M
|
|||
className="item add"
|
||||
onClick={this.onAdd}
|
||||
onMouseEnter={() => { this.props.setHover({ id: 'add' }); }}
|
||||
onMouseLeave={() => { this.props.setHover(); }}
|
||||
onMouseLeave={() => this.props.setHover()}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{translate('menuDataviewFilterNewFilter')}</div>
|
||||
|
@ -182,10 +182,10 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M
|
|||
const { getId } = this.props;
|
||||
const obj = $(`#${getId()} .content`);
|
||||
|
||||
obj.off('click').on('click', () => { menuStore.closeAll(Constant.menuIds.cell); });
|
||||
obj.off('click').on('click', () => menuStore.closeAll(Constant.menuIds.cell));
|
||||
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
@ -286,7 +286,7 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M
|
|||
const { oldIndex, newIndex } = result;
|
||||
|
||||
view.filters = arrayMove(view.filters as I.Filter[], oldIndex, newIndex);
|
||||
C.BlockDataviewFilterSort(rootId, blockId, view.id, view.filters.map(it => it.id), () => { loadData(view.id, 0); });
|
||||
C.BlockDataviewFilterSort(rootId, blockId, view.id, view.filters.map(it => it.id), () => loadData(view.id, 0));
|
||||
|
||||
keyboard.disableSelection(false);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends
|
|||
let value = null;
|
||||
let Item = null;
|
||||
let list = [];
|
||||
let onSubmit = (e: any) => { this.onSubmit(e); };
|
||||
let onSubmit = e => this.onSubmit(e);
|
||||
|
||||
const ItemAdd = (item: any) => (
|
||||
<div
|
||||
|
@ -114,7 +114,7 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends
|
|||
/>
|
||||
</div>
|
||||
<div className="buttons">
|
||||
<Icon className="delete" onClick={(e: any) => { this.onDelete(e, element); }} />
|
||||
<Icon className="delete" onClick={e => this.onDelete(e, element)} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -29,8 +29,8 @@ const MenuGroupEdit = observer(class MenuGroupEdit extends React.Component<I.Men
|
|||
<MenuItemVertical
|
||||
key={i}
|
||||
{...action}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -73,7 +73,7 @@ const MenuGroupEdit = observer(class MenuGroupEdit extends React.Component<I.Men
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ const MenuGroupList = observer(class MenuGroupList extends React.Component<I.Men
|
|||
ref={node => this.node = node}
|
||||
id={'item-' + item.id}
|
||||
className={cn.join(' ')}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
style={item.style}
|
||||
>
|
||||
{allowedView ? <Handle /> : ''}
|
||||
|
|
|
@ -75,7 +75,7 @@ const MenuDataviewObjectList = observer(class MenuDataviewObjectList extends Rea
|
|||
} else
|
||||
if (item.id == 'add') {
|
||||
content = (
|
||||
<div id="item-add" className="item add" onMouseEnter={(e: any) => { this.onOver(e, item); }} onClick={(e: any) => { this.onClick(e, item); }} style={param.style}>
|
||||
<div id="item-add" className="item add" onMouseEnter={e => this.onOver(e, item)} onClick={e => this.onClick(e, item)} style={param.style}>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{item.name}</div>
|
||||
</div>
|
||||
|
@ -86,8 +86,8 @@ const MenuDataviewObjectList = observer(class MenuDataviewObjectList extends Rea
|
|||
id={item.id}
|
||||
object={item}
|
||||
name={name}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
caption={type ? type.name : undefined}
|
||||
style={param.style}
|
||||
/>
|
||||
|
|
|
@ -46,15 +46,15 @@ const MenuObjectValues = observer(class MenuObjectValues extends React.Component
|
|||
<div
|
||||
id={'item-' + item.id}
|
||||
className={cn.join(' ')}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
style={item.style}
|
||||
>
|
||||
<Handle />
|
||||
<span className="clickable" onClick={(e: any) => { this.onClick(e, item); }}>
|
||||
<span className="clickable" onClick={e => this.onClick(e, item)}>
|
||||
<IconObject object={item} />
|
||||
<ObjectName object={item} />
|
||||
</span>
|
||||
<Icon className="delete" onClick={(e: any) => { this.onRemove(e, item); }} />
|
||||
<Icon className="delete" onClick={e => this.onRemove(e, item)} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
@ -63,8 +63,8 @@ const MenuObjectValues = observer(class MenuObjectValues extends React.Component
|
|||
<div
|
||||
id="item-add"
|
||||
className="item add"
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
style={item.style}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
|
|
|
@ -186,7 +186,7 @@ const MenuOptionList = observer(class MenuOptionList extends React.Component<I.M
|
|||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', e => this.onKeyDown(e));
|
||||
$(`#${this.props.getId()}`).on('click', () => { menuStore.close('dataviewOptionEdit'); });
|
||||
$(`#${this.props.getId()}`).on('click', () => menuStore.close('dataviewOptionEdit'));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
@ -316,7 +316,7 @@ const MenuOptionList = observer(class MenuOptionList extends React.Component<I.M
|
|||
this.onFilterChange('');
|
||||
this.onValueAdd(message.objectId);
|
||||
|
||||
window.setTimeout(() => { this.resize(); }, 50);
|
||||
window.setTimeout(() => this.resize(), 50);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ const MenuRelationEdit = observer(class MenuRelationEdit extends React.Component
|
|||
<MenuItemVertical
|
||||
key={c}
|
||||
{...action}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
onMouseEnter={this.menuClose}
|
||||
/>
|
||||
))}
|
||||
|
|
|
@ -62,7 +62,7 @@ const MenuRelationList = observer(class MenuRelationList extends React.Component
|
|||
<div
|
||||
id={'item-' + item.relationKey}
|
||||
className={cn.join(' ')}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
style={item.style}
|
||||
>
|
||||
{allowedView ? <Handle /> : ''}
|
||||
|
@ -153,7 +153,7 @@ const MenuRelationList = observer(class MenuRelationList extends React.Component
|
|||
className="item add"
|
||||
onClick={this.onAdd}
|
||||
onMouseEnter={() => { this.props.setHover({ id: 'add' }); }}
|
||||
onMouseLeave={() => { this.props.setHover(); }}
|
||||
onMouseLeave={() => this.props.setHover()}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{translate('menuDataviewRelationListAddRelation')}</div>
|
||||
|
|
|
@ -61,7 +61,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
<div
|
||||
id={'item-' + item.id}
|
||||
className={[ 'item', (!allowedView ? 'isReadonly' : '') ].join(' ')}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
style={item.style}
|
||||
>
|
||||
{allowedView ? <Handle /> : ''}
|
||||
|
@ -71,7 +71,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
id={[ 'filter', 'relation', item.id ].join('-')}
|
||||
options={relationOptions}
|
||||
value={item.relationKey}
|
||||
onChange={(v: string) => { this.onChange(item.id, 'relationKey', v); }}
|
||||
onChange={v => this.onChange(item.id, 'relationKey', v)}
|
||||
/>
|
||||
|
||||
<Select
|
||||
|
@ -79,13 +79,13 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
className="grey"
|
||||
options={typeOptions}
|
||||
value={item.type}
|
||||
onChange={(v: string) => { this.onChange(item.id, 'type', v); }}
|
||||
onChange={v => this.onChange(item.id, 'type', v)}
|
||||
/>
|
||||
</div>
|
||||
{allowedView ? (
|
||||
<div className="buttons">
|
||||
<Icon className="more" onClick={(e: any) => { this.onClick(e, item); }} />
|
||||
<Icon className="delete" onClick={(e: any) => { this.onRemove(e, item); }} />
|
||||
<Icon className="more" onClick={e => this.onClick(e, item)} />
|
||||
<Icon className="delete" onClick={e => this.onRemove(e, item)} />
|
||||
</div>
|
||||
) : ''}
|
||||
</div>
|
||||
|
@ -172,7 +172,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
className="item add"
|
||||
onClick={this.onAdd}
|
||||
onMouseEnter={() => { this.props.setHover({ id: 'add' }); }}
|
||||
onMouseLeave={() => { this.props.setHover(); }}
|
||||
onMouseLeave={() => this.props.setHover()}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{translate('menuDataviewSortNewSort')}</div>
|
||||
|
@ -213,7 +213,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ const MenuSource = observer(class MenuSource extends React.Component<I.Menu> {
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ const MenuViewLayout = observer(class MenuViewLayout extends React.Component<I.M
|
|||
const Layout = (item: any) => (
|
||||
<div
|
||||
className={[ 'layout', type == item.id ? 'active' : '' ].join(' ')}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
onMouseEnter={this.menuClose}
|
||||
>
|
||||
<Icon className={item.icon} />
|
||||
|
@ -55,9 +55,9 @@ const MenuViewLayout = observer(class MenuViewLayout extends React.Component<I.M
|
|||
icon={action.icon}
|
||||
readonly={readonly}
|
||||
checkbox={(type == action.id) && (item.id == 'type')}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onMouseLeave={(e: any) => { this.onMouseLeave(e, action); }}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
onMouseLeave={e => this.onMouseLeave(e, action)}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
@ -46,16 +46,16 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu>
|
|||
<div
|
||||
id={'item-' + item.id}
|
||||
className="item"
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={(e: any) => { this.onOver(e, item); }}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
onMouseEnter={e => this.onOver(e, item)}
|
||||
style={item.style}
|
||||
>
|
||||
{allowed ? <Handle /> : ''}
|
||||
<div className="clickable" onClick={(e: any) => { loadData(item.id, 0); }}>
|
||||
<div className="clickable" onClick={e => loadData(item.id, 0)}>
|
||||
<div className="name">{item.name}</div>
|
||||
</div>
|
||||
<div className="buttons">
|
||||
<Icon className="more" onClick={(e: any) => { this.onViewContext(e, item); }} />
|
||||
<Icon className="more" onClick={e => this.onViewContext(e, item)} />
|
||||
</div>
|
||||
</div>
|
||||
));
|
||||
|
@ -146,7 +146,7 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu>
|
|||
className="item add"
|
||||
onClick={this.onAdd}
|
||||
onMouseEnter={() => { this.props.setHover({ id: 'add' }); }}
|
||||
onMouseLeave={() => { this.props.setHover(); }}
|
||||
onMouseLeave={() => this.props.setHover()}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
<div className="name">{translate('menuDataviewViewListAddView')}</div>
|
||||
|
@ -189,7 +189,7 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu>
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ const MenuViewSettings = observer(class MenuViewSettings extends React.Component
|
|||
icon={action.icon}
|
||||
readonly={readonly}
|
||||
checkbox={(type == action.id) && (item.id == 'type')}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }}
|
||||
onMouseLeave={(e: any) => { this.onMouseLeave(e, action); }}
|
||||
onClick={(e: any) => { this.onClick(e, action); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, action)}
|
||||
onMouseLeave={e => this.onMouseLeave(e, action)}
|
||||
onClick={e => this.onClick(e, action)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
|
|
@ -27,8 +27,8 @@ const MenuGraphSettings = observer(class MenuGraphSettings extends React.Compone
|
|||
<MenuItemVertical
|
||||
key={i}
|
||||
{...item}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
@ -60,7 +60,7 @@ const MenuGraphSettings = observer(class MenuGraphSettings extends React.Compone
|
|||
rebind () {
|
||||
this.unbind();
|
||||
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ class MenuHelp extends React.Component<I.Menu> {
|
|||
<MenuItemVertical
|
||||
key={i}
|
||||
{...item}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -252,7 +252,7 @@ const Menu = observer(class Menu extends React.Component<I.Menu, State> {
|
|||
};
|
||||
|
||||
const Tab = (item: any) => (
|
||||
<div className={[ 'tab', (item.id == tab ? 'active' : '') ].join(' ')} onClick={(e: any) => { this.onTab(item.id); }}>
|
||||
<div className={[ 'tab', (item.id == tab ? 'active' : '') ].join(' ')} onClick={e => this.onTab(item.id)}>
|
||||
{item.name}
|
||||
</div>
|
||||
);
|
||||
|
@ -605,7 +605,7 @@ const Menu = observer(class Menu extends React.Component<I.Menu, State> {
|
|||
});
|
||||
|
||||
window.clearTimeout(this.timeoutPoly);
|
||||
this.timeoutPoly = window.setTimeout(() => { this.poly.hide(); }, 500);
|
||||
this.timeoutPoly = window.setTimeout(() => this.poly.hide(), 500);
|
||||
};
|
||||
|
||||
// Arrow positioning
|
||||
|
@ -708,7 +708,7 @@ const Menu = observer(class Menu extends React.Component<I.Menu, State> {
|
|||
|
||||
if (refInput) {
|
||||
if (refInput.isFocused && (this.ref.n < 0)) {
|
||||
keyboard.shortcut('arrowleft, arrowright', e, () => { ret = true; });
|
||||
keyboard.shortcut('arrowleft, arrowright', e, () => ret = true);
|
||||
|
||||
keyboard.shortcut('arrowdown', e, () => {
|
||||
refInput.blur();
|
||||
|
|
|
@ -60,8 +60,8 @@ const MenuRelationSuggest = observer(class MenuRelationSuggest extends React.Com
|
|||
<div
|
||||
id="item-add"
|
||||
className="item add"
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
style={param.style}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
|
@ -84,8 +84,8 @@ const MenuRelationSuggest = observer(class MenuRelationSuggest extends React.Com
|
|||
{...item}
|
||||
className={item.isHidden ? 'isHidden' : ''}
|
||||
style={param.style}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -451,7 +451,7 @@ const MenuRelationSuggest = observer(class MenuRelationSuggest extends React.Com
|
|||
analytics.event('AddExistingRelation', { format: item.format, type: ref, objectType: object.type });
|
||||
};
|
||||
} else {
|
||||
Action.install(item, true, (message: any) => { cb(message.details); });
|
||||
Action.install(item, true, message => cb(message.details));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -226,7 +226,7 @@ const MenuSearchObject = observer(class MenuSearchObject extends React.Component
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
@ -455,7 +455,7 @@ const MenuSearchObject = observer(class MenuSearchObject extends React.Component
|
|||
close();
|
||||
} else {
|
||||
UtilObject.create('', '', { name: filter, type: commonStore.type, ...details }, I.BlockPosition.Bottom, '', {}, [ I.ObjectFlag.SelectType, I.ObjectFlag.SelectTemplate ], (message: any) => {
|
||||
UtilObject.getById(message.targetId, (object: any) => { process(object, true); });
|
||||
UtilObject.getById(message.targetId, object => process(object, true));
|
||||
close();
|
||||
});
|
||||
};
|
||||
|
|
|
@ -49,9 +49,9 @@ class MenuSearchText extends React.Component<I.Menu> {
|
|||
<div className="buttons">
|
||||
|
||||
<div id="switcher" className="switcher">
|
||||
<Icon className="arrow left" onClick={() => { this.onArrow(-1); }} />
|
||||
<Icon className="arrow left" onClick={() => this.onArrow(-1)} />
|
||||
<div id="cnt" className="cnt" />
|
||||
<Icon className="arrow right" onClick={() => { this.onArrow(1); }} />
|
||||
<Icon className="arrow right" onClick={() => this.onArrow(1)} />
|
||||
</div>
|
||||
|
||||
<div className="line" />
|
||||
|
|
|
@ -191,7 +191,7 @@ const MenuSelect = observer(class MenuSelect extends React.Component<I.Menu> {
|
|||
};
|
||||
|
||||
if (active && !active.isInitial) {
|
||||
window.setTimeout(() => { setActive(active, true); }, 15);
|
||||
window.setTimeout(() => setActive(active, true), 15);
|
||||
};
|
||||
|
||||
this.resize();
|
||||
|
|
|
@ -60,8 +60,8 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I
|
|||
<div
|
||||
id="item-add"
|
||||
className="item add"
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
style={param.style}
|
||||
>
|
||||
<Icon className="plus" />
|
||||
|
@ -84,8 +84,8 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I
|
|||
{...item}
|
||||
className={item.isHidden ? 'isHidden' : ''}
|
||||
style={param.style}
|
||||
onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }}
|
||||
onClick={(e: any) => { this.onClick(e, item); }}
|
||||
onMouseEnter={e => this.onMouseEnter(e, item)}
|
||||
onClick={e => this.onClick(e, item)}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -193,7 +193,7 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); });
|
||||
$(window).on('keydown.menu', e => this.props.onKeyDown(e));
|
||||
window.setTimeout(() => this.props.setActive(), 15);
|
||||
};
|
||||
|
||||
|
@ -450,7 +450,7 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I
|
|||
if (item.isInstalled || noInstall) {
|
||||
cb(item);
|
||||
} else {
|
||||
Action.install(item, true, (message: any) => { cb(message.details); });
|
||||
Action.install(item, true, message => cb(message.details));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -178,7 +178,7 @@ const PageAuthOnboard = observer(class PageAuthOnboard extends React.Component<I
|
|||
const tooltipPhrase = node.find('#tooltipPhrase');
|
||||
|
||||
this.unbind();
|
||||
$(window).on('keydown.onboarding', (e) => this.onKeyDown(e));
|
||||
$(window).on('keydown.onboarding', e => this.onKeyDown(e));
|
||||
|
||||
tooltipPhrase.off('click').on('click', () => this.onPhraseTooltip());
|
||||
};
|
||||
|
|
|
@ -56,7 +56,7 @@ const PageAuthPinCheck = observer(class PageAuthPinCheck extends React.Component
|
|||
|
||||
rebind () {
|
||||
this.unbind();
|
||||
$(window).on('focus.pin', () => { this.ref.focus(); });
|
||||
$(window).on('focus.pin', () => this.ref.focus());
|
||||
};
|
||||
|
||||
onError () {
|
||||
|
|
|
@ -151,7 +151,7 @@ const ControlButtons = observer(class ControlButtons extends React.Component<Pro
|
|||
onOpen: onCoverOpen,
|
||||
onClose: () => {
|
||||
window.clearTimeout(this.timeout);
|
||||
this.timeout = window.setTimeout(() => { onCoverClose(); }, Constant.delay.menu);
|
||||
this.timeout = window.setTimeout(() => onCoverClose(), Constant.delay.menu);
|
||||
},
|
||||
data: {
|
||||
options: options,
|
||||
|
|
|
@ -61,11 +61,11 @@ const HeadSimple = observer(class Controls extends React.Component<Props> {
|
|||
classNameWrap={item.className}
|
||||
classNameEditor={[ 'focusable', 'c' + item.id ].join(' ')}
|
||||
classNamePlaceholder={'c' + item.id}
|
||||
onFocus={(e: any) => { this.onFocus(e, item); }}
|
||||
onBlur={(e: any) => { this.onBlur(e, item); }}
|
||||
onKeyDown={(e: any) => { this.onKeyDown(e, item); }}
|
||||
onKeyUp={() => { this.onKeyUp(); }}
|
||||
onSelect={(e: any) => { this.onSelectText(e, item); }}
|
||||
onFocus={e => this.onFocus(e, item)}
|
||||
onBlur={e => this.onBlur(e, item)}
|
||||
onKeyDown={e => this.onKeyDown(e, item)}
|
||||
onKeyUp={() => this.onKeyUp()}
|
||||
onSelect={e => this.onSelectText(e, item)}
|
||||
onCompositionStart={this.onCompositionStart}
|
||||
/>
|
||||
);
|
||||
|
@ -169,7 +169,7 @@ const HeadSimple = observer(class Controls extends React.Component<Props> {
|
|||
focus.set('title', { from: 0, to: 0 });
|
||||
};
|
||||
|
||||
window.setTimeout(() => { focus.apply(); }, 10);
|
||||
window.setTimeout(() => focus.apply(), 10);
|
||||
};
|
||||
|
||||
onFocus (e: any, item: any) {
|
||||
|
|
|
@ -74,7 +74,7 @@ const PageMainGraph = observer(class PageMainGraph extends React.Component<I.Pag
|
|||
|
||||
if (this.loading) {
|
||||
window.clearTimeout(this.timeoutLoading);
|
||||
this.timeoutLoading = window.setTimeout(() => { this.setLoading(false); }, 100);
|
||||
this.timeoutLoading = window.setTimeout(() => this.setLoading(false), 100);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -167,7 +167,7 @@ const PageMainGraph = observer(class PageMainGraph extends React.Component<I.Pag
|
|||
loader.show().css({ opacity: 1 });
|
||||
} else {
|
||||
loader.css({ opacity: 0 });
|
||||
window.setTimeout(() => { loader.hide(); }, 200);
|
||||
window.setTimeout(() => loader.hide(), 200);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ const PageMainHistory = observer(class PageMainHistory extends React.Component<I
|
|||
children.css({ overflow: 'hidden', height: height });
|
||||
|
||||
window.setTimeout(() => { children.css({ height: 0 }); }, 15);
|
||||
window.setTimeout(() => { children.hide(); }, 215);
|
||||
window.setTimeout(() => children.hide(), 215);
|
||||
} else {
|
||||
item.addClass('expanded');
|
||||
children.show();
|
||||
|
|
|
@ -117,7 +117,7 @@ const PageMainNavigation = observer(class PageMainNavigation extends React.Compo
|
|||
|
||||
<div className="buttons">
|
||||
<Button text={translate('popupNavigationOpen')} className="c36" onClick={e => this.onConfirm(e, item)} />
|
||||
{isPopup ? <Button text={translate('popupNavigationCancel')} className="c36" color="blank" onClick={() => { popupStore.close('page'); }} /> : ''}
|
||||
{isPopup ? <Button text={translate('popupNavigationCancel')} className="c36" color="blank" onClick={() => popupStore.close('page')} /> : ''}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -123,7 +123,7 @@ const PageMainStore = observer(class PageMainStore extends React.Component<I.Pag
|
|||
<div
|
||||
key={item.id}
|
||||
className={[ 'tab', (item.id == this.view ? 'active' : '') ].join(' ')}
|
||||
onClick={(e: any) => { this.onView(item.id, true); }}
|
||||
onClick={e => this.onView(item.id, true)}
|
||||
>
|
||||
{item.name}
|
||||
</div>
|
||||
|
@ -150,14 +150,14 @@ const PageMainStore = observer(class PageMainStore extends React.Component<I.Pag
|
|||
if (sources.includes(item.id)) {
|
||||
icons.push({ className: 'check', tooltip: textInstalled });
|
||||
} else {
|
||||
icons.push({ className: 'plus', tooltip: textInstall, onClick: (e: any) => { this.onInstall(e, item); } });
|
||||
icons.push({ className: 'plus', tooltip: textInstall, onClick: e => this.onInstall(e, item) });
|
||||
};
|
||||
break;
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={cn.join(' ')}>
|
||||
<div className="flex" onClick={(e: any) => { this.onClick(e, item); }}>
|
||||
<div className="flex" onClick={e => this.onClick(e, item)}>
|
||||
<IconObject iconSize={iconSize} object={item} />
|
||||
<div className="name">{item.name}</div>
|
||||
</div>
|
||||
|
|
|
@ -27,7 +27,7 @@ const PopupSettingsPageAppearance = observer(class PopupSettingsPageAppearance e
|
|||
<div
|
||||
key={i}
|
||||
className={[ 'btn', (theme == item.id ? 'active' : ''), item.class ].join(' ')}
|
||||
onClick={() => { this.onTheme(item.id); }}
|
||||
onClick={() => this.onTheme(item.id)}
|
||||
>
|
||||
<div className="bg">
|
||||
<Icon />
|
||||
|
|
|
@ -56,7 +56,7 @@ const PopupSettingsPageDataManagement = observer(class PopupSettingsPageStorageI
|
|||
|
||||
<Title className="sub" text={translate('popupSettingsDataManagementDeleteTitle')} />
|
||||
<Label className="description" text={translate('popupSettingsDataManagementDeleteText')} />
|
||||
<Button className="c36" onClick={() => { onPage('delete'); }} color="red" text={translate('popupSettingsDataManagementDeleteButton')} />
|
||||
<Button className="c36" onClick={() => onPage('delete')} color="red" text={translate('popupSettingsDataManagementDeleteButton')} />
|
||||
|
||||
</React.Fragment>
|
||||
);
|
||||
|
|
|
@ -16,7 +16,7 @@ class PopupSettingsHead extends React.Component<Props> {
|
|||
return (
|
||||
<div className="head">
|
||||
<div className="inner">
|
||||
<div className="element" onClick={() => { onPage(returnTo || prevPage); }}>
|
||||
<div className="element" onClick={() => onPage(returnTo || prevPage)}>
|
||||
<Icon className="back" />
|
||||
{name}
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@ const PopupSettingsPageImportIndex = observer(class PopupSettingsPageImportIndex
|
|||
|
||||
const Item = (item: any) => {
|
||||
return (
|
||||
<div className={[ 'item', item.id ].join(' ')} onClick={() => { this.onClick(item.id); }} >
|
||||
<div className={[ 'item', item.id ].join(' ')} onClick={() => this.onClick(item.id)} >
|
||||
<Icon className={`import-${item.id}`} />
|
||||
<div className="name">{item.name}</div>
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,7 @@ class PopupSettingsPageImportNotion extends React.Component<I.PopupSettings, Sta
|
|||
<div className="errorWrapper">
|
||||
<Input
|
||||
focusOnMount
|
||||
ref={(ref: any) => { this.ref = ref; }}
|
||||
ref={ref => this.ref = ref}
|
||||
type="password"
|
||||
placeholder={translate('popupSettingsImportNotionTokenPlaceholder')}
|
||||
/>
|
||||
|
@ -50,7 +50,7 @@ class PopupSettingsPageImportNotion extends React.Component<I.PopupSettings, Sta
|
|||
|
||||
<div className="helpWrapper flex">
|
||||
<Title text={translate('popupSettingsImportNotionHowTo')} />
|
||||
<div className="btn" onClick={() => { onPage('importNotionHelp'); }}>
|
||||
<div className="btn" onClick={() => onPage('importNotionHelp')}>
|
||||
<Icon className="help" />{translate('popupSettingsImportNotionStepByStepGuide')}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -250,7 +250,7 @@ const PopupSearch = observer(class PopupSearch extends React.Component<I.Popup,
|
|||
|
||||
const win = $(window);
|
||||
win.on('keydown.search', e => this.onKeyDown(e));
|
||||
win.on('resize.search', (e: any) => { this.resize(); });
|
||||
win.on('resize.search', e => this.resize());
|
||||
};
|
||||
|
||||
unbind () {
|
||||
|
@ -569,7 +569,7 @@ const PopupSearch = observer(class PopupSearch extends React.Component<I.Popup,
|
|||
|
||||
case 'relation': {
|
||||
$('#button-header-relation').trigger('click');
|
||||
window.setTimeout(() => { $('#menuBlockRelationView #item-add').trigger('click'); }, Constant.delay.menu * 2);
|
||||
window.setTimeout(() => $('#menuBlockRelationView #item-add').trigger('click'), Constant.delay.menu * 2);
|
||||
break;
|
||||
};
|
||||
|
||||
|
|
|
@ -223,9 +223,9 @@ const PopupSettings = observer(class PopupSettings extends React.Component<I.Pop
|
|||
const win = $(window);
|
||||
|
||||
this.unbind();
|
||||
win.on('resize.settings', () => { this.resize(); });
|
||||
win.on('resize.settings', () => this.resize());
|
||||
win.on('keydown.settings', e => this.onKeyDown(e));
|
||||
win.on('mousedown.settings', (e: any) => { this.onMouseDown(e); });
|
||||
win.on('mousedown.settings', e => this.onMouseDown(e));
|
||||
};
|
||||
|
||||
unbind () {
|
||||
|
|
|
@ -142,7 +142,7 @@ const PreviewComponent = observer(class PreviewComponent extends React.Component
|
|||
menuStore.open('blockLink', {
|
||||
rect: rect ? { ...rect, height: 0, y: rect.y + win.scrollTop() } : null,
|
||||
horizontal: I.MenuDirection.Center,
|
||||
onOpen: () => { Preview.previewHide(true); },
|
||||
onOpen: () => Preview.previewHide(true),
|
||||
data: {
|
||||
filter: mark ? mark.param : '',
|
||||
type: mark ? mark.type : null,
|
||||
|
|
|
@ -161,8 +161,8 @@ const SelectionProvider = observer(class SelectionProvider extends React.Compone
|
|||
scrollOnMove.onMouseDown(e, isPopup);
|
||||
this.unbindMouse();
|
||||
|
||||
win.on(`mousemove.selection`, (e: any) => { this.onMouseMove(e); });
|
||||
win.on(`blur.selection mouseup.selection`, (e: any) => { this.onMouseUp(e); });
|
||||
win.on(`mousemove.selection`, e => this.onMouseMove(e));
|
||||
win.on(`blur.selection mouseup.selection`, e => this.onMouseUp(e));
|
||||
};
|
||||
|
||||
initNodes () {
|
||||
|
|
|
@ -234,7 +234,7 @@ const Sidebar = observer(class Sidebar extends React.Component<Props> {
|
|||
$('body').removeClass('rowResize colResize');
|
||||
$(window).off('mousemove.sidebar mouseup.sidebar');
|
||||
|
||||
window.setTimeout(() => { this.movedX = false; }, 15);
|
||||
window.setTimeout(() => this.movedX = false, 15);
|
||||
};
|
||||
|
||||
onHandleClick () {
|
||||
|
|
|
@ -38,7 +38,7 @@ class Frame extends React.Component<Props> {
|
|||
this.resize();
|
||||
this.unbind();
|
||||
|
||||
$(window).on('resize.frame', () => { this.resize(); });
|
||||
$(window).on('resize.frame', () => this.resize());
|
||||
};
|
||||
|
||||
componentWillUnmount () {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue