1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-27 08:31:20 +02:00

npm run fix

This commit is contained in:
Chen-I Lim 2020-10-27 14:00:15 -07:00
parent 3ff889ebab
commit 775db6c36d
12 changed files with 32 additions and 25 deletions

View File

@ -60,7 +60,10 @@ class BoardCard extends React.Component<BoardCardProps, BoardCardState> {
this.props.onDragEnd(e)
}}
>
<MenuWrapper className='optionsMenu' stopPropagationOnToggle={true}>
<MenuWrapper
className='optionsMenu'
stopPropagationOnToggle={true}
>
<div className='octo-hoverbutton square'><OptionsIcon/></div>
<Menu>
<Menu.Text

View File

@ -529,7 +529,7 @@ class BoardComponent extends React.Component<Props, State> {
Utils.assertValue(boardTree.groupByProperty)
// Move option to new index
const visibleOptionIds = boardTree.visibleGroups.map(o => o.option.id)
const visibleOptionIds = boardTree.visibleGroups.map((o) => o.option.id)
const {activeView} = boardTree
const srcIndex = visibleOptionIds.indexOf(draggedHeaderOption.id)

View File

@ -141,7 +141,8 @@ class CardDetail extends React.Component<Props, State> {
onClick={() => {
const newIcon = BlockIcons.shared.randomIcon()
mutator.changeIcon(card, newIcon)
}}>
}}
>
<FormattedMessage
id='CardDetail.add-icon'
defaultMessage='Add Icon'
@ -202,10 +203,10 @@ class CardDetail extends React.Component<Props, State> {
{/* Comments */}
<hr/>
<CommentsList
comments={comments}
cardId={card.id}
/>
<CommentsList
comments={comments}
cardId={card.id}
/>
<hr/>
</div>

View File

@ -112,7 +112,7 @@ class Editable extends React.Component<Props, State> {
this.text = newText
} else {
this.text = oldText // Reset text
this.text = oldText // Reset text
}
this.elementRef.current.classList.remove('active')

View File

@ -24,7 +24,6 @@ type State = {
}
export default class PropertyValueElement extends React.Component<Props, State> {
constructor(props: Props) {
super(props)
const propertyValue = props.card.properties[props.propertyTemplate.id]

View File

@ -175,11 +175,11 @@ class TableComponent extends React.Component<Props, State> {
card={card}
focusOnMount={focusOnMount}
onSaveWithEnter={() => {
console.log("WORKING")
console.log('WORKING')
if (cards.length > 0 && cards[cards.length - 1] === card) {
this.addCard(false)
}
console.log("STILL WORKING")
console.log('STILL WORKING')
}}
/>)

View File

@ -241,7 +241,7 @@ class ViewHeader extends React.Component<Props, State> {
}}
/>
<Menu.Separator />
<Menu.Separator/>
{boardTree.board.cardProperties.map((option: IPropertyTemplate) => (
<Menu.Text

View File

@ -1,8 +1,9 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Utils} from './utils'
import {IntlShape} from 'react-intl'
import {Utils} from './utils'
type FilterCondition = 'includes' | 'notIncludes' | 'isEmpty' | 'isNotEmpty'
class FilterClause {

View File

@ -320,7 +320,7 @@ class Mutator {
}
async changePropertyType(boardTree: BoardTree, propertyTemplate: IPropertyTemplate, type: PropertyType) {
const { board } = boardTree
const {board} = boardTree
const newBoard = new MutableBoard(board)
const newTemplate = newBoard.cardProperties.find((o) => o.id === propertyTemplate.id)
@ -333,7 +333,7 @@ class Mutator {
for (const card of boardTree.allCards) {
const oldValue = card.properties[propertyTemplate.id]
if (oldValue) {
const newValue = propertyTemplate.options.find(o => o.id === oldValue)?.value
const newValue = propertyTemplate.options.find((o) => o.id === oldValue)?.value
const newCard = new MutableCard(card)
newCard.properties[propertyTemplate.id] = newValue
newBlocks.push(newCard)
@ -345,7 +345,7 @@ class Mutator {
for (const card of boardTree.allCards) {
const oldValue = card.properties[propertyTemplate.id]
if (oldValue) {
const newValue = propertyTemplate.options.find(o => o.value === oldValue)?.id
const newValue = propertyTemplate.options.find((o) => o.value === oldValue)?.id
const newCard = new MutableCard(card)
newCard.properties[propertyTemplate.id] = newValue
newBlocks.push(newCard)
@ -401,7 +401,7 @@ class Mutator {
}
const newView = new MutableBoardView(view)
newView.visibleOptionIds = newView.visibleOptionIds.filter(o => o !== columnOptionId)
newView.visibleOptionIds = newView.visibleOptionIds.filter((o) => o !== columnOptionId)
newView.hiddenOptionIds.push(columnOptionId)
await this.updateBlock(newView, view, 'hide column')
}
@ -413,8 +413,9 @@ class Mutator {
const newView = new MutableBoardView(view)
newView.hiddenOptionIds = newView.hiddenOptionIds.filter((o) => o !== columnOptionId)
// Put the column at the end of the visible list
newView.visibleOptionIds = newView.visibleOptionIds.filter(o => o !== columnOptionId)
newView.visibleOptionIds = newView.visibleOptionIds.filter((o) => o !== columnOptionId)
newView.visibleOptionIds.push(columnOptionId)
await this.updateBlock(newView, view, 'show column')
}

View File

@ -149,6 +149,7 @@ export default class BoardPage extends React.Component<Props, State> {
await workspaceTree.sync()
const boardIds = workspaceTree.boards.map((o) => o.id)
// Listen to boards plus all blocks at root (Empty string for parentId)
this.workspaceListener.open(['', ...boardIds], async (blockId) => {
Utils.log(`workspaceListener.onChanged: ${blockId}`)

View File

@ -169,9 +169,9 @@ class MutableBoardTree implements BoardTree {
private groupCards() {
const {activeView, groupByProperty} = this
const unassignedOptionIds = groupByProperty.options
.filter(o => !activeView.visibleOptionIds.includes(o.id) && !activeView.hiddenOptionIds.includes(o.id))
.map(o => o.id)
const unassignedOptionIds = groupByProperty.options.
filter((o) => !activeView.visibleOptionIds.includes(o.id) && !activeView.hiddenOptionIds.includes(o.id)).
map((o) => o.id)
const visibleOptionIds = [...activeView.visibleOptionIds, ...unassignedOptionIds]
const {hiddenOptionIds} = activeView
@ -188,12 +188,12 @@ class MutableBoardTree implements BoardTree {
const groups = []
for (const optionId of optionIds) {
if (optionId) {
const option = groupByProperty.options.find(o => o.id === optionId)
const option = groupByProperty.options.find((o) => o.id === optionId)
if (option) {
const cards = this.cards.filter((o) => optionId === o.properties[groupByProperty.id])
const group: Group = {
option,
cards
cards,
}
groups.push(group)
} else {
@ -207,7 +207,7 @@ class MutableBoardTree implements BoardTree {
})
const group: Group = {
option: {id: '', value: `No ${groupByProperty.name}`, color: ''},
cards: emptyGroupCards
cards: emptyGroupCards,
}
groups.push(group)
}

View File

@ -2,9 +2,10 @@
// See LICENSE.txt for license information.
import React from 'react'
import {MenuOptionProps} from './menuItem'
import SubmenuTriangleIcon from '../icons/submenuTriangle'
import {MenuOptionProps} from './menuItem'
import './subMenuOption.scss'
type SubMenuOptionProps = MenuOptionProps & {