From 258790d42fddc948e021d2c60f525c466d2e5f05 Mon Sep 17 00:00:00 2001 From: Zsolt Viczian Date: Sat, 10 Apr 2021 22:12:30 +0200 Subject: [PATCH] updated date regexp to select yyyy, mm, dd --- data.json | 2 +- main.js | 1305 ++++++++++++++++++++++--------------------- model/TodoParser.ts | 6 +- settings.ts | 2 +- 4 files changed, 660 insertions(+), 655 deletions(-) diff --git a/data.json b/data.json index c89aba6..3afa513 100644 --- a/data.json +++ b/data.json @@ -1 +1 @@ -{"personRegexpString":"\\[{2}People\\/(.*?)\\]{2}","projectRegexpString":"\\[{2}Projects\\/(.*?)\\]{2}","dateRegexpString":"#(\\d{4}\\/\\d{2}\\/\\d{2})","discussWithRegexpString":"#(discussWith)","waitingForRegexpString":"#(waitingFor)","promisedToRegexpString":"#(promisedTo)","somedayMaybeRegexpString":"#(someday)"} \ No newline at end of file +{"personRegexpString":"\\[{2}People\\/(.*?)\\]{2}","projectRegexpString":"\\[{2}Projects\\/(.*?)\\]{2}","dateRegexpString":"#(\\d{4})\\/(\\d{2})\\/(\\d{2})","discussWithRegexpString":"#(discussWith)","waitingForRegexpString":"#(waitingFor)","promisedToRegexpString":"#(promisedTo)","somedayMaybeRegexpString":"#(someday)"} \ No newline at end of file diff --git a/main.js b/main.js index edf9283..744d010 100644 --- a/main.js +++ b/main.js @@ -2,673 +2,676 @@ var obsidian = require('obsidian'); -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); } const VIEW_TYPE_TODO = 'online.zsviczian.obsidian-stakeholder_action-plugin'; -var TodoItemStatus; -(function (TodoItemStatus) { - TodoItemStatus[TodoItemStatus["Todo"] = 0] = "Todo"; - TodoItemStatus[TodoItemStatus["Done"] = 1] = "Done"; -})(TodoItemStatus || (TodoItemStatus = {})); -// eslint-disable-next-line @typescript-eslint/no-namespace -(function (TodoItemStatus) { - function toggleStatus(status) { - switch (status) { - case TodoItemStatus.Todo: - return TodoItemStatus.Done; - case TodoItemStatus.Done: - return TodoItemStatus.Todo; - } - } - TodoItemStatus.toggleStatus = toggleStatus; -})(TodoItemStatus || (TodoItemStatus = {})); -class TodoItem { - constructor(status, description, person, project, isSomedayMaybeNote, isDiscussWithNote, isWaitingForNote, isPromisedToNote, sourceFilePath, startIndex, length, actionDate) { - this.status = status; - this.description = description; - this.person = person; - this.project = project; - this.actionDate = actionDate; - this.isSomedayMaybeNote = isSomedayMaybeNote; - this.isDiscussWithNote = isDiscussWithNote; - this.isWaitingForNote = isWaitingForNote; - this.isPromisedToNote = isPromisedToNote; - this.sourceFilePath = sourceFilePath; - this.startIndex = startIndex; - this.length = length; - } +var TodoItemStatus; +(function (TodoItemStatus) { + TodoItemStatus[TodoItemStatus["Todo"] = 0] = "Todo"; + TodoItemStatus[TodoItemStatus["Done"] = 1] = "Done"; +})(TodoItemStatus || (TodoItemStatus = {})); +// eslint-disable-next-line @typescript-eslint/no-namespace +(function (TodoItemStatus) { + function toggleStatus(status) { + switch (status) { + case TodoItemStatus.Todo: + return TodoItemStatus.Done; + case TodoItemStatus.Done: + return TodoItemStatus.Todo; + } + } + TodoItemStatus.toggleStatus = toggleStatus; +})(TodoItemStatus || (TodoItemStatus = {})); +class TodoItem { + constructor(status, description, person, project, isSomedayMaybeNote, isDiscussWithNote, isWaitingForNote, isPromisedToNote, sourceFilePath, startIndex, length, actionDate) { + this.status = status; + this.description = description; + this.person = person; + this.project = project; + this.actionDate = actionDate; + this.isSomedayMaybeNote = isSomedayMaybeNote; + this.isDiscussWithNote = isDiscussWithNote; + this.isWaitingForNote = isWaitingForNote; + this.isPromisedToNote = isPromisedToNote; + this.sourceFilePath = sourceFilePath; + this.startIndex = startIndex; + this.length = length; + } } -var Icon; -(function (Icon) { - Icon[Icon["Inbox"] = 0] = "Inbox"; - Icon[Icon["Reveal"] = 1] = "Reveal"; - Icon[Icon["Scheduled"] = 2] = "Scheduled"; - Icon[Icon["Someday"] = 3] = "Someday"; - Icon[Icon["Today"] = 4] = "Today"; - Icon[Icon["Stakeholder"] = 5] = "Stakeholder"; - Icon[Icon["Aging"] = 6] = "Aging"; -})(Icon || (Icon = {})); -const RenderIcon = (icon, title = '', description = '') => { - const svg = svgForIcon(icon)(title, description); - return parser.parseFromString(svg, 'text/xml').documentElement; -}; -const parser = new DOMParser(); -const svgForIcon = (icon) => { - switch (icon) { - case Icon.Inbox: - return inboxIcon; - case Icon.Reveal: - return revealIcon; - case Icon.Scheduled: - return scheduledIcon; - case Icon.Someday: - return somedayIcon; - case Icon.Today: - return todayIcon; - case Icon.Stakeholder: - return stakeholderIcon; - case Icon.Aging: - return agingIcon; - } -}; -const inboxIcon = (title, description) => ` - - ${title} - ${description} - - - -`; -const revealIcon = (title, description) => ` - - ${title} - ${description} - - -`; -const scheduledIcon = (title, description) => ` - - ${title} - ${description} - - - -`; -const somedayIcon = (title, description) => ` - - ${title} - ${description} - - - -`; -const todayIcon = (title, description) => ` - - ${title} - ${description} - - - -`; -const stakeholderIcon = (title, description) => ` - - ${title} - ${description} - - - - -`; -const agingIcon = (title, description) => ` - - ${title} - ${description} - - - - - - +var Icon; +(function (Icon) { + Icon[Icon["Inbox"] = 0] = "Inbox"; + Icon[Icon["Reveal"] = 1] = "Reveal"; + Icon[Icon["Scheduled"] = 2] = "Scheduled"; + Icon[Icon["Someday"] = 3] = "Someday"; + Icon[Icon["Today"] = 4] = "Today"; + Icon[Icon["Stakeholder"] = 5] = "Stakeholder"; + Icon[Icon["Aging"] = 6] = "Aging"; +})(Icon || (Icon = {})); +const RenderIcon = (icon, title = '', description = '') => { + const svg = svgForIcon(icon)(title, description); + return parser.parseFromString(svg, 'text/xml').documentElement; +}; +const parser = new DOMParser(); +const svgForIcon = (icon) => { + switch (icon) { + case Icon.Inbox: + return inboxIcon; + case Icon.Reveal: + return revealIcon; + case Icon.Scheduled: + return scheduledIcon; + case Icon.Someday: + return somedayIcon; + case Icon.Today: + return todayIcon; + case Icon.Stakeholder: + return stakeholderIcon; + case Icon.Aging: + return agingIcon; + } +}; +const inboxIcon = (title, description) => ` + + ${title} + ${description} + + + +`; +const revealIcon = (title, description) => ` + + ${title} + ${description} + + +`; +const scheduledIcon = (title, description) => ` + + ${title} + ${description} + + + +`; +const somedayIcon = (title, description) => ` + + ${title} + ${description} + + + +`; +const todayIcon = (title, description) => ` + + ${title} + ${description} + + + +`; +const stakeholderIcon = (title, description) => ` + + ${title} + ${description} + + + + +`; +const agingIcon = (title, description) => ` + + ${title} + ${description} + + + + + + `; -var TodoItemViewPane; -(function (TodoItemViewPane) { - TodoItemViewPane[TodoItemViewPane["Aging"] = 0] = "Aging"; - TodoItemViewPane[TodoItemViewPane["Today"] = 1] = "Today"; - TodoItemViewPane[TodoItemViewPane["Scheduled"] = 2] = "Scheduled"; - TodoItemViewPane[TodoItemViewPane["Inbox"] = 3] = "Inbox"; - TodoItemViewPane[TodoItemViewPane["Someday"] = 4] = "Someday"; - TodoItemViewPane[TodoItemViewPane["Stakeholder"] = 5] = "Stakeholder"; -})(TodoItemViewPane || (TodoItemViewPane = {})); -class TodoItemView extends obsidian.ItemView { - constructor(leaf, props) { - //debugger; - super(leaf); - this.props = props; - this.state = { - activePane: TodoItemViewPane.Today, - }; - this.filter = ''; - } - getViewType() { - return VIEW_TYPE_TODO; - } - getDisplayText() { - return 'Todo'; - } - getIcon() { - return 'checkmark'; - } - onClose() { - return Promise.resolve(); - } - setProps(setter) { - this.props = setter(this.props); - this.render(); - } - setViewState(newState) { - this.state = newState; - this.render(); - } - setFilter(filter) { - this.filter = filter; - this.filterRegexp = new RegExp(filter, 'i'); - this.render(); - } - render() { - const container = this.containerEl.children[1]; - container.empty(); - container.createDiv('todo-item-view-container', (el) => { - el.createDiv('todo-item-view-search', (el) => { - this.renderSearch(el); - }); - el.createDiv('todo-item-view-toolbar', (el) => { - this.renderToolBar(el); - }); - el.createDiv('todo-item-view-items', (el) => { - this.renderItems(el); - }); - }); - } - renderSearch(container) { - container.createEl('table', {}, (el) => { - el.addClass('todo-filter-wrapper'); - el.createEl('tr', {}, (el) => { - el.addClass('todo-filter-row'); - el.createEl('td', {}, (el) => { - el.addClass('todo-filter-col-input'); - el.createEl("input", { value: this.filter }, (el) => { - el.addClass('todo-filter-input'); - el.setAttribute('placeholder', 'proj/person RexExp filter, case insensitive'); - el.onchange = (e) => { - this.setFilter(e.target.value); - }; - }); - }); - el.createEl('td', {}, (el) => { - el.addClass('todo-filter-col-button'); - el.createEl("button", { text: "Filter" }, (el) => { - el.addClass('todo-filter-button'); - }); - }); - }); - }); - } - renderToolBar(container) { - const activeClass = (pane) => { - return pane === this.state.activePane ? ' active' : ''; - }; - const setActivePane = (pane) => { - const newState = Object.assign(Object.assign({}, this.state), { activePane: pane }); - this.setViewState(newState); - }; - container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Aging)}`, (el) => { - el.appendChild(RenderIcon(Icon.Aging, 'Aging')); - el.onClickEvent(() => setActivePane(TodoItemViewPane.Aging)); - }); - container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Today)}`, (el) => { - el.appendChild(RenderIcon(Icon.Today, 'Today')); - el.onClickEvent(() => setActivePane(TodoItemViewPane.Today)); - }); - container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Scheduled)}`, (el) => { - el.appendChild(RenderIcon(Icon.Scheduled, 'Scheduled')); - el.onClickEvent(() => setActivePane(TodoItemViewPane.Scheduled)); - }); - container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Inbox)}`, (el) => { - el.appendChild(RenderIcon(Icon.Inbox, 'Inbox')); - el.onClickEvent(() => setActivePane(TodoItemViewPane.Inbox)); - }); - container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Someday)}`, (el) => { - el.appendChild(RenderIcon(Icon.Someday, 'Someday / Maybe')); - el.onClickEvent(() => setActivePane(TodoItemViewPane.Someday)); - }); - container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Stakeholder)}`, (el) => { - el.appendChild(RenderIcon(Icon.Stakeholder, 'Stakeholder actions')); - el.onClickEvent(() => setActivePane(TodoItemViewPane.Stakeholder)); - }); - } - renderItems(container) { - const todosToRender = this.props.todos - .filter(this.filterForState, this) - .sort(this.sortByActionDate); - todosToRender - .forEach((todo, index) => { - if (index > 0) { - if ((todo.isWaitingForNote && todosToRender[index - 1].isDiscussWithNote) || - (todo.isPromisedToNote && (todosToRender[index - 1].isWaitingForNote || todosToRender[index - 1].isDiscussWithNote))) { - container.createEl('hr', {}, (el) => { - el.addClass('todo-item-view-divider'); - }); - } - } - container.createDiv('todo-item-view-item', (el) => { - el.createDiv('todo-item-view-item-checkbox', (el) => { - el.createEl('input', { type: 'checkbox' }, (el) => { - el.checked = todo.status === TodoItemStatus.Done; - el.onClickEvent(() => { - this.toggleTodo(todo); - }); - }); - }); - el.createDiv('todo-item-view-item-description', (el) => { - obsidian.MarkdownRenderer.renderMarkdown(todo.description, el, todo.sourceFilePath, this); - }); - el.createDiv('todo-item-view-item-link', (el) => { - el.appendChild(RenderIcon(Icon.Reveal, 'Open file')); - el.onClickEvent(() => { - this.openFile(todo); - }); - }); - }); - }); - } - filterForState(value, _index, _array) { - const isPersonMatch = value.person.match(this.filterRegexp) != null; - const isProjectMatch = value.project.match(this.filterRegexp) != null; - const isFilterSet = this.filter != ""; - if (!isFilterSet || isPersonMatch || isProjectMatch) { - const isToday = (date) => { - let today = new Date(); - return (date.getDate() == today.getDate() && - date.getMonth() == today.getMonth() && - date.getFullYear() == today.getFullYear()); - }; - const isBeforeToday = (date) => { - let today = (new Date()); - today.setHours(0, 0, 0, 0); - return date < today; - }; - const isAgingNote = value.actionDate && isBeforeToday(value.actionDate); - const isTodayNote = value.actionDate && isToday(value.actionDate); - const isScheduledNote = !value.isSomedayMaybeNote && value.actionDate && !isTodayNote && !isAgingNote; - switch (this.state.activePane) { - case TodoItemViewPane.Inbox: - return !value.isSomedayMaybeNote && !isTodayNote && !isScheduledNote && !isAgingNote; - case TodoItemViewPane.Scheduled: - return isScheduledNote; - case TodoItemViewPane.Someday: - return value.isSomedayMaybeNote; - case TodoItemViewPane.Today: - return isTodayNote; - case TodoItemViewPane.Aging: - return isAgingNote; - case TodoItemViewPane.Stakeholder: - return isFilterSet; - } - } - else - return false; - } - sortByActionDate(a, b) { - if (!a.actionDate && !b.actionDate) { - if (a.isDiscussWithNote && !b.isDiscussWithNote) { - return -1; - } - if (a.isWaitingForNote && !b.isDiscussWithNote && !b.isWaitingForNote) { - return -1; - } - if (a.isPromisedToNote && !b.isDiscussWithNote && !b.isWaitingForNote) { - return -1; - } - if (b.isDiscussWithNote && !a.isDiscussWithNote) { - return 1; - } - if (b.isWaitingForNote && !a.isDiscussWithNote && !a.isWaitingForNote) { - return 1; - } - if (b.isPromisedToNote && !a.isDiscussWithNote && !a.isWaitingForNote) { - return 1; - } - if (a.isSomedayMaybeNote && !b.isSomedayMaybeNote) { - return -1; - } - if (!a.isSomedayMaybeNote && b.isSomedayMaybeNote) { - return 1; - } - return 0; - } - return a.actionDate < b.actionDate ? -1 : a.actionDate > b.actionDate ? 1 : 0; - } - toggleTodo(todo) { - this.props.toggleTodo(todo, TodoItemStatus.toggleStatus(todo.status)); - } - openFile(todo) { - this.props.openFile(todo.sourceFilePath); - } +var TodoItemViewPane; +(function (TodoItemViewPane) { + TodoItemViewPane[TodoItemViewPane["Aging"] = 0] = "Aging"; + TodoItemViewPane[TodoItemViewPane["Today"] = 1] = "Today"; + TodoItemViewPane[TodoItemViewPane["Scheduled"] = 2] = "Scheduled"; + TodoItemViewPane[TodoItemViewPane["Inbox"] = 3] = "Inbox"; + TodoItemViewPane[TodoItemViewPane["Someday"] = 4] = "Someday"; + TodoItemViewPane[TodoItemViewPane["Stakeholder"] = 5] = "Stakeholder"; +})(TodoItemViewPane || (TodoItemViewPane = {})); +class TodoItemView extends obsidian.ItemView { + constructor(leaf, props) { + //debugger; + super(leaf); + this.props = props; + this.state = { + activePane: TodoItemViewPane.Today, + }; + this.filter = ''; + } + getViewType() { + return VIEW_TYPE_TODO; + } + getDisplayText() { + return 'Todo'; + } + getIcon() { + return 'checkmark'; + } + onClose() { + return Promise.resolve(); + } + setProps(setter) { + this.props = setter(this.props); + this.render(); + } + setViewState(newState) { + this.state = newState; + this.render(); + } + setFilter(filter) { + this.filter = filter; + this.filterRegexp = new RegExp(filter, 'i'); + this.render(); + } + render() { + const container = this.containerEl.children[1]; + container.empty(); + container.createDiv('todo-item-view-container', (el) => { + el.createDiv('todo-item-view-search', (el) => { + this.renderSearch(el); + }); + el.createDiv('todo-item-view-toolbar', (el) => { + this.renderToolBar(el); + }); + el.createDiv('todo-item-view-items', (el) => { + this.renderItems(el); + }); + }); + } + renderSearch(container) { + container.createEl('table', {}, (el) => { + el.addClass('todo-filter-wrapper'); + el.createEl('tr', {}, (el) => { + el.addClass('todo-filter-row'); + el.createEl('td', {}, (el) => { + el.addClass('todo-filter-col-input'); + el.createEl("input", { value: this.filter }, (el) => { + el.addClass('todo-filter-input'); + el.setAttribute('placeholder', 'proj/person RexExp filter, case insensitive'); + el.onchange = (e) => { + this.setFilter(e.target.value); + }; + }); + }); + el.createEl('td', {}, (el) => { + el.addClass('todo-filter-col-button'); + el.createEl("button", { text: "Filter" }, (el) => { + el.addClass('todo-filter-button'); + }); + }); + }); + }); + } + renderToolBar(container) { + const activeClass = (pane) => { + return pane === this.state.activePane ? ' active' : ''; + }; + const setActivePane = (pane) => { + const newState = Object.assign(Object.assign({}, this.state), { activePane: pane }); + this.setViewState(newState); + }; + container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Aging)}`, (el) => { + el.appendChild(RenderIcon(Icon.Aging, 'Aging')); + el.onClickEvent(() => setActivePane(TodoItemViewPane.Aging)); + }); + container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Today)}`, (el) => { + el.appendChild(RenderIcon(Icon.Today, 'Today')); + el.onClickEvent(() => setActivePane(TodoItemViewPane.Today)); + }); + container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Scheduled)}`, (el) => { + el.appendChild(RenderIcon(Icon.Scheduled, 'Scheduled')); + el.onClickEvent(() => setActivePane(TodoItemViewPane.Scheduled)); + }); + container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Inbox)}`, (el) => { + el.appendChild(RenderIcon(Icon.Inbox, 'Inbox')); + el.onClickEvent(() => setActivePane(TodoItemViewPane.Inbox)); + }); + container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Someday)}`, (el) => { + el.appendChild(RenderIcon(Icon.Someday, 'Someday / Maybe')); + el.onClickEvent(() => setActivePane(TodoItemViewPane.Someday)); + }); + container.createDiv(`todo-item-view-toolbar-item${activeClass(TodoItemViewPane.Stakeholder)}`, (el) => { + el.appendChild(RenderIcon(Icon.Stakeholder, 'Stakeholder actions')); + el.onClickEvent(() => setActivePane(TodoItemViewPane.Stakeholder)); + }); + } + renderItems(container) { + const todosToRender = this.props.todos + .filter(this.filterForState, this) + .sort(this.sortByActionDate); + todosToRender + .forEach((todo, index) => { + if (index > 0) { + if ((todo.isWaitingForNote && todosToRender[index - 1].isDiscussWithNote) || + (todo.isPromisedToNote && (todosToRender[index - 1].isWaitingForNote || todosToRender[index - 1].isDiscussWithNote))) { + container.createEl('hr', {}, (el) => { + el.addClass('todo-item-view-divider'); + }); + } + } + container.createDiv('todo-item-view-item', (el) => { + el.createDiv('todo-item-view-item-checkbox', (el) => { + el.createEl('input', { type: 'checkbox' }, (el) => { + el.checked = todo.status === TodoItemStatus.Done; + el.onClickEvent(() => { + this.toggleTodo(todo); + }); + }); + }); + el.createDiv('todo-item-view-item-description', (el) => { + obsidian.MarkdownRenderer.renderMarkdown(todo.description, el, todo.sourceFilePath, this); + }); + el.createDiv('todo-item-view-item-link', (el) => { + el.appendChild(RenderIcon(Icon.Reveal, 'Open file')); + el.onClickEvent(() => { + this.openFile(todo); + }); + }); + }); + }); + } + filterForState(value, _index, _array) { + const isPersonMatch = value.person.match(this.filterRegexp) != null; + const isProjectMatch = value.project.match(this.filterRegexp) != null; + const isFilterSet = this.filter != ""; + if (!isFilterSet || isPersonMatch || isProjectMatch) { + const isToday = (date) => { + let today = new Date(); + return (date.getDate() == today.getDate() && + date.getMonth() == today.getMonth() && + date.getFullYear() == today.getFullYear()); + }; + const isBeforeToday = (date) => { + let today = (new Date()); + today.setHours(0, 0, 0, 0); + return date < today; + }; + const isAgingNote = value.actionDate && isBeforeToday(value.actionDate); + const isTodayNote = value.actionDate && isToday(value.actionDate); + const isScheduledNote = !value.isSomedayMaybeNote && value.actionDate && !isTodayNote && !isAgingNote; + switch (this.state.activePane) { + case TodoItemViewPane.Inbox: + return !value.isSomedayMaybeNote && !isTodayNote && !isScheduledNote && !isAgingNote; + case TodoItemViewPane.Scheduled: + return isScheduledNote; + case TodoItemViewPane.Someday: + return value.isSomedayMaybeNote; + case TodoItemViewPane.Today: + return isTodayNote; + case TodoItemViewPane.Aging: + return isAgingNote; + case TodoItemViewPane.Stakeholder: + return isFilterSet; + } + } + else + return false; + } + sortByActionDate(a, b) { + if (!a.actionDate && !b.actionDate) { + if (a.isDiscussWithNote && !b.isDiscussWithNote) { + return -1; + } + if (a.isWaitingForNote && !b.isDiscussWithNote && !b.isWaitingForNote) { + return -1; + } + if (a.isPromisedToNote && !b.isDiscussWithNote && !b.isWaitingForNote) { + return -1; + } + if (b.isDiscussWithNote && !a.isDiscussWithNote) { + return 1; + } + if (b.isWaitingForNote && !a.isDiscussWithNote && !a.isWaitingForNote) { + return 1; + } + if (b.isPromisedToNote && !a.isDiscussWithNote && !a.isWaitingForNote) { + return 1; + } + if (a.isSomedayMaybeNote && !b.isSomedayMaybeNote) { + return -1; + } + if (!a.isSomedayMaybeNote && b.isSomedayMaybeNote) { + return 1; + } + return 0; + } + return a.actionDate < b.actionDate ? -1 : a.actionDate > b.actionDate ? 1 : 0; + } + toggleTodo(todo) { + this.props.toggleTodo(todo, TodoItemStatus.toggleStatus(todo.status)); + } + openFile(todo) { + this.props.openFile(todo.sourceFilePath); + } } -class TodoParser { - constructor(props) { - this.props = props; - } - parseTasks(filePath, fileContents) { - return __awaiter(this, void 0, void 0, function* () { - const pattern = /(-|\*) \[(\s|x)?\]\s(.*)/g; - return [...fileContents.matchAll(pattern)].map((task) => this.parseTask(filePath, task)); - }); - } - parseTask(filePath, entry) { - var _a; - //debugger; - const todoItemOffset = 2; // Strip off `-|* ` - const status = entry[2] === 'x' ? TodoItemStatus.Done : TodoItemStatus.Todo; - const description = entry[3]; - const dateMatches = description.match(this.props.dateRegexp); - const actionDate = dateMatches != null ? new Date(dateMatches[1]) : undefined; - const personMatches = description.match(this.props.personRegexp); - const person = personMatches != null ? personMatches[1] : ""; - const projectMatches = description.match(this.props.projectRegexp); - const project = projectMatches != null ? projectMatches[1] : ""; - return new TodoItem(status, description, person, project, description.match(this.props.somedayMaybeRegexp) != null, description.match(this.props.discussWithRegexp) != null, description.match(this.props.waitingForRegexp) != null, description.match(this.props.promisedToRegexp) != null, filePath, ((_a = entry.index) !== null && _a !== void 0 ? _a : 0) + todoItemOffset, entry[0].length - todoItemOffset, actionDate); - } +class TodoParser { + constructor(props) { + this.props = props; + } + parseTasks(filePath, fileContents) { + return __awaiter(this, void 0, void 0, function* () { + const pattern = /(-|\*) \[(\s|x)?\]\s(.*)/g; + return [...fileContents.matchAll(pattern)].map((task) => this.parseTask(filePath, task)); + }); + } + parseTask(filePath, entry) { + var _a; + //debugger; + const todoItemOffset = 2; // Strip off `-|* ` + const status = entry[2] === 'x' ? TodoItemStatus.Done : TodoItemStatus.Todo; + const description = entry[3]; + const dateMatches = description.match(this.props.dateRegexp); + let actionDate = undefined; + if (dateMatches != null) { + actionDate = dateMatches.length > 3 ? new Date(parseInt(dateMatches[1]), parseInt(dateMatches[2]) - 1, parseInt(dateMatches[3]), 0, 0, 0, 0) : undefined; + } + const personMatches = description.match(this.props.personRegexp); + const person = personMatches != null ? personMatches[1] : ""; + const projectMatches = description.match(this.props.projectRegexp); + const project = projectMatches != null ? projectMatches[1] : ""; + return new TodoItem(status, description, person, project, description.match(this.props.somedayMaybeRegexp) != null, description.match(this.props.discussWithRegexp) != null, description.match(this.props.waitingForRegexp) != null, description.match(this.props.promisedToRegexp) != null, filePath, ((_a = entry.index) !== null && _a !== void 0 ? _a : 0) + todoItemOffset, entry[0].length - todoItemOffset, actionDate); + } } -class TodoIndex { - constructor(vault, listener, props) { - this.props = props; - this.vault = vault; - this.todos = new Map(); - this.listeners = [listener]; - } - initialize() { - return __awaiter(this, void 0, void 0, function* () { - // TODO: persist index & last sync timestamp; only parse files that changed since then. - const todoMap = new Map(); - let numberOfTodos = 0; - const timeStart = new Date().getTime(); - const markdownFiles = this.vault.getMarkdownFiles(); - for (const file of markdownFiles) { - const todos = yield this.parseTodosInFile(file); - numberOfTodos += todos.length; - if (todos.length > 0) { - todoMap.set(file.path, todos); - } - } - const totalTimeMs = new Date().getTime() - timeStart; - console.log(`[obsidian-stakeholder_action-plugin] Parsed ${numberOfTodos} TODOs from ${markdownFiles.length} markdown files in (${totalTimeMs / 1000.0}s)`); - this.todos = todoMap; - this.registerEventHandlers(); - this.invokeListeners(); - }); - } - setStatus(todo, newStatus) { - const file = this.vault.getAbstractFileByPath(todo.sourceFilePath); - const fileContents = this.vault.read(file); - fileContents.then((c) => { - const newTodo = `[${newStatus === TodoItemStatus.Done ? 'x' : ' '}] ${todo.description}`; - const newContents = c.substring(0, todo.startIndex) + newTodo + c.substring(todo.startIndex + todo.length); - this.vault.modify(file, newContents); - }); - } - indexAbstractFile(file) { - if (!(file instanceof obsidian.TFile)) { - return; - } - this.indexFile(file); - } - indexFile(file) { - this.parseTodosInFile(file).then((todos) => { - this.todos.set(file.path, todos); - this.invokeListeners(); - }); - } - clearIndex(path, silent = false) { - this.todos.delete(path); - if (!silent) { - this.invokeListeners(); - } - } - setProps(setter) { - this.props = setter(this.props); - //do I need to do anything else?? - } - parseTodosInFile(file) { - return __awaiter(this, void 0, void 0, function* () { - // TODO: Does it make sense to index completed TODOs at all? - const todoParser = new TodoParser(this.props); - const fileContents = yield this.vault.cachedRead(file); - return todoParser - .parseTasks(file.path, fileContents) - .then((todos) => todos.filter((todo) => todo.status === TodoItemStatus.Todo)); - }); - } - registerEventHandlers() { - this.vault.on('create', (file) => { - this.indexAbstractFile(file); - }); - this.vault.on('modify', (file) => { - this.indexAbstractFile(file); - }); - this.vault.on('delete', (file) => { - this.clearIndex(file.path); - }); - // We could simply change the references to the old path, but parsing again does the trick as well - this.vault.on('rename', (file, oldPath) => { - this.clearIndex(oldPath); - this.indexAbstractFile(file); - }); - } - invokeListeners() { - const todos = [].concat(...Array.from(this.todos.values())); - this.listeners.forEach((listener) => listener(todos)); - } +class TodoIndex { + constructor(vault, listener, props) { + this.props = props; + this.vault = vault; + this.todos = new Map(); + this.listeners = [listener]; + } + initialize() { + return __awaiter(this, void 0, void 0, function* () { + // TODO: persist index & last sync timestamp; only parse files that changed since then. + const todoMap = new Map(); + let numberOfTodos = 0; + const timeStart = new Date().getTime(); + const markdownFiles = this.vault.getMarkdownFiles(); + for (const file of markdownFiles) { + const todos = yield this.parseTodosInFile(file); + numberOfTodos += todos.length; + if (todos.length > 0) { + todoMap.set(file.path, todos); + } + } + const totalTimeMs = new Date().getTime() - timeStart; + console.log(`[obsidian-stakeholder_action-plugin] Parsed ${numberOfTodos} TODOs from ${markdownFiles.length} markdown files in (${totalTimeMs / 1000.0}s)`); + this.todos = todoMap; + this.registerEventHandlers(); + this.invokeListeners(); + }); + } + setStatus(todo, newStatus) { + const file = this.vault.getAbstractFileByPath(todo.sourceFilePath); + const fileContents = this.vault.read(file); + fileContents.then((c) => { + const newTodo = `[${newStatus === TodoItemStatus.Done ? 'x' : ' '}] ${todo.description}`; + const newContents = c.substring(0, todo.startIndex) + newTodo + c.substring(todo.startIndex + todo.length); + this.vault.modify(file, newContents); + }); + } + indexAbstractFile(file) { + if (!(file instanceof obsidian.TFile)) { + return; + } + this.indexFile(file); + } + indexFile(file) { + this.parseTodosInFile(file).then((todos) => { + this.todos.set(file.path, todos); + this.invokeListeners(); + }); + } + clearIndex(path, silent = false) { + this.todos.delete(path); + if (!silent) { + this.invokeListeners(); + } + } + setProps(setter) { + this.props = setter(this.props); + //do I need to do anything else?? + } + parseTodosInFile(file) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Does it make sense to index completed TODOs at all? + const todoParser = new TodoParser(this.props); + const fileContents = yield this.vault.cachedRead(file); + return todoParser + .parseTasks(file.path, fileContents) + .then((todos) => todos.filter((todo) => todo.status === TodoItemStatus.Todo)); + }); + } + registerEventHandlers() { + this.vault.on('create', (file) => { + this.indexAbstractFile(file); + }); + this.vault.on('modify', (file) => { + this.indexAbstractFile(file); + }); + this.vault.on('delete', (file) => { + this.clearIndex(file.path); + }); + // We could simply change the references to the old path, but parsing again does the trick as well + this.vault.on('rename', (file, oldPath) => { + this.clearIndex(oldPath); + this.indexAbstractFile(file); + }); + } + invokeListeners() { + const todos = [].concat(...Array.from(this.todos.values())); + this.listeners.forEach((listener) => listener(todos)); + } } -const DEFAULT_SETTINGS = { - personRegexpString: '\\[{2}People\\/(.*?)\\]{2}', - projectRegexpString: '\\[{2}Projects\\/(.*?)\\]{2}', - dateRegexpString: '#(\\d{4}\\/\\d{2}\\/\\d{2})', - discussWithRegexpString: '#(discussWith)', - waitingForRegexpString: '#(waitingFor)', - promisedToRegexpString: '#(promisedTo)', - somedayMaybeRegexpString: '#(someday)' -}; -class ActionTrackerSettingTab extends obsidian.PluginSettingTab { - constructor(app, plugin) { - super(app, plugin); - this.plugin = plugin; - } - display() { - let { containerEl } = this; - this.containerEl.empty(); - this.containerEl.createEl('h2', { text: 'Settings for the stakeholder action tracker plugin' }); - new obsidian.Setting(containerEl) - .setName('Person regexp pattern') - .setDesc('This is the regular expression to identify the action party in the action.') - .addText(text => text - .setPlaceholder('\\[{2}People\\/(.*?)\\]{2}') - .setValue(this.plugin.settings.personRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.personRegexpString = value; - yield this.plugin.saveSettings(); - }))); - new obsidian.Setting(containerEl) - .setName('Project regexp pattern') - .setDesc('This is the regular expression to identify the project in the action.') - .addText(text => text - .setPlaceholder('\\[{2}Projects\\/(.*?)\\]{2}') - .setValue(this.plugin.settings.projectRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.projectRegexpString = value; - yield this.plugin.saveSettings(); - }))); - new obsidian.Setting(containerEl) - .setName('Date regexp pattern') - .setDesc('This is the regular expression to get the date for an action.') - .addText(text => text - .setPlaceholder('#(\\d{4}\\/\\d{2}\\/\\d{2})') - .setValue(this.plugin.settings.dateRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.dateRegexpString = value; - yield this.plugin.saveSettings(); - }))); - new obsidian.Setting(containerEl) - .setName('Discuss With regexp pattern') - .setDesc('This is the regexp pattern you use to mark topics you want to discuss with someone.') - .addText(text => text - .setPlaceholder('#(discussWith)') - .setValue(this.plugin.settings.discussWithRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.discussWithRegexpString = value; - yield this.plugin.saveSettings(); - }))); - new obsidian.Setting(containerEl) - .setName('Waiting For regexp pattern') - .setDesc('This is the regexp pattern you use to mark topics someone has promised to deliver to me.') - .addText(text => text - .setPlaceholder('#(waitingFor)') - .setValue(this.plugin.settings.waitingForRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.waitingForRegexpString = value; - yield this.plugin.saveSettings(); - }))); - new obsidian.Setting(containerEl) - .setName('Promised To regexp pattern') - .setDesc('This is the regexp pattern you use to mark topics someone has promised to deliver to me.') - .addText(text => text - .setPlaceholder('#(promisedTo)') - .setValue(this.plugin.settings.promisedToRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.promisedToRegexpString = value; - yield this.plugin.saveSettings(); - }))); - new obsidian.Setting(containerEl) - .setName('Someday Maybe regexp pattern') - .setDesc('This is the regexp pattern you use to mark actions without a deadline.') - .addText(text => text - .setPlaceholder('#(someday)') - .setValue(this.plugin.settings.somedayMaybeRegexpString) - .onChange((value) => __awaiter(this, void 0, void 0, function* () { - this.plugin.settings.somedayMaybeRegexpString = value; - yield this.plugin.saveSettings(); - }))); - } +const DEFAULT_SETTINGS = { + personRegexpString: '\\[{2}People\\/(.*?)\\]{2}', + projectRegexpString: '\\[{2}Projects\\/(.*?)\\]{2}', + dateRegexpString: '#(\\d{4})\\/(\\d{2})\\/(\\d{2})', + discussWithRegexpString: '#(discussWith)', + waitingForRegexpString: '#(waitingFor)', + promisedToRegexpString: '#(promisedTo)', + somedayMaybeRegexpString: '#(someday)' +}; +class ActionTrackerSettingTab extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + let { containerEl } = this; + this.containerEl.empty(); + this.containerEl.createEl('h2', { text: 'Settings for the stakeholder action tracker plugin' }); + new obsidian.Setting(containerEl) + .setName('Person regexp pattern') + .setDesc('This is the regular expression to identify the action party in the action.') + .addText(text => text + .setPlaceholder('\\[{2}People\\/(.*?)\\]{2}') + .setValue(this.plugin.settings.personRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.personRegexpString = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName('Project regexp pattern') + .setDesc('This is the regular expression to identify the project in the action.') + .addText(text => text + .setPlaceholder('\\[{2}Projects\\/(.*?)\\]{2}') + .setValue(this.plugin.settings.projectRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.projectRegexpString = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName('Date regexp pattern') + .setDesc('This is the regular expression to get the date for an action.') + .addText(text => text + .setPlaceholder('#(\\d{4}\\/\\d{2}\\/\\d{2})') + .setValue(this.plugin.settings.dateRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.dateRegexpString = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName('Discuss With regexp pattern') + .setDesc('This is the regexp pattern you use to mark topics you want to discuss with someone.') + .addText(text => text + .setPlaceholder('#(discussWith)') + .setValue(this.plugin.settings.discussWithRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.discussWithRegexpString = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName('Waiting For regexp pattern') + .setDesc('This is the regexp pattern you use to mark topics someone has promised to deliver to me.') + .addText(text => text + .setPlaceholder('#(waitingFor)') + .setValue(this.plugin.settings.waitingForRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.waitingForRegexpString = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName('Promised To regexp pattern') + .setDesc('This is the regexp pattern you use to mark topics someone has promised to deliver to me.') + .addText(text => text + .setPlaceholder('#(promisedTo)') + .setValue(this.plugin.settings.promisedToRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.promisedToRegexpString = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName('Someday Maybe regexp pattern') + .setDesc('This is the regexp pattern you use to mark actions without a deadline.') + .addText(text => text + .setPlaceholder('#(someday)') + .setValue(this.plugin.settings.somedayMaybeRegexpString) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.somedayMaybeRegexpString = value; + yield this.plugin.saveSettings(); + }))); + } } -class ActionTrackerPlugin extends obsidian.Plugin { - constructor(app, manifest) { - super(app, manifest); - } - onload() { - return __awaiter(this, void 0, void 0, function* () { - console.log('loading plugin'); - yield this.loadSettings(); - const props = { - personRegexp: new RegExp(this.getSettingValue('personRegexpString')), - projectRegexp: new RegExp(this.getSettingValue('projectRegexpString')), - dateRegexp: new RegExp(this.getSettingValue('dateRegexpString')), - discussWithRegexp: new RegExp(this.getSettingValue('discussWithRegexpString')), - waitingForRegexp: new RegExp(this.getSettingValue('waitingForRegexpString')), - promisedToRegexp: new RegExp(this.getSettingValue('promisedToRegexpString')), - somedayMaybeRegexp: new RegExp(this.getSettingValue('somedayMaybeRegexpString')), - }; - this.todoIndex = new TodoIndex(this.app.vault, this.tick.bind(this), props); - this.registerView(VIEW_TYPE_TODO, (leaf) => { - const todos = []; - const props = { - todos: todos, - openFile: (filePath) => { - const file = this.app.vault.getAbstractFileByPath(filePath); - this.app.workspace.splitActiveLeaf().openFile(file); - }, - toggleTodo: (todo, newStatus) => { - this.todoIndex.setStatus(todo, newStatus); - }, - }; - this.view = new TodoItemView(leaf, props); - return this.view; - }); - this.addSettingTab(new ActionTrackerSettingTab(this.app, this)); - if (this.app.workspace.layoutReady) { - this.initLeaf(); - yield this.prepareIndex(); - } - else { - this.registerEvent(this.app.workspace.on('layout-ready', this.initLeaf.bind(this))); - this.registerEvent(this.app.workspace.on('layout-ready', () => __awaiter(this, void 0, void 0, function* () { return yield this.prepareIndex(); }))); - } - }); - } - onunload() { - this.app.workspace.getLeavesOfType(VIEW_TYPE_TODO).forEach((leaf) => leaf.detach()); - } - initLeaf() { - if (this.app.workspace.getLeavesOfType(VIEW_TYPE_TODO).length) { - return; - } - this.app.workspace.getRightLeaf(false).setViewState({ - type: VIEW_TYPE_TODO, - }); - } - prepareIndex() { - return __awaiter(this, void 0, void 0, function* () { - yield this.todoIndex.initialize(); - }); - } - tick(todos) { - this.view.setProps((currentProps) => { - return Object.assign(Object.assign({}, currentProps), { todos: todos }); - }); - } - loadSettings() { - return __awaiter(this, void 0, void 0, function* () { - this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); - }); - } - saveSettings() { - return __awaiter(this, void 0, void 0, function* () { - yield this.saveData(this.settings); - }); - } - getSettingValue(setting) { - return this.settings[setting]; - } +class ActionTrackerPlugin extends obsidian.Plugin { + constructor(app, manifest) { + super(app, manifest); + } + onload() { + return __awaiter(this, void 0, void 0, function* () { + console.log('loading plugin'); + yield this.loadSettings(); + const props = { + personRegexp: new RegExp(this.getSettingValue('personRegexpString')), + projectRegexp: new RegExp(this.getSettingValue('projectRegexpString')), + dateRegexp: new RegExp(this.getSettingValue('dateRegexpString')), + discussWithRegexp: new RegExp(this.getSettingValue('discussWithRegexpString')), + waitingForRegexp: new RegExp(this.getSettingValue('waitingForRegexpString')), + promisedToRegexp: new RegExp(this.getSettingValue('promisedToRegexpString')), + somedayMaybeRegexp: new RegExp(this.getSettingValue('somedayMaybeRegexpString')), + }; + this.todoIndex = new TodoIndex(this.app.vault, this.tick.bind(this), props); + this.registerView(VIEW_TYPE_TODO, (leaf) => { + const todos = []; + const props = { + todos: todos, + openFile: (filePath) => { + const file = this.app.vault.getAbstractFileByPath(filePath); + this.app.workspace.splitActiveLeaf().openFile(file); + }, + toggleTodo: (todo, newStatus) => { + this.todoIndex.setStatus(todo, newStatus); + }, + }; + this.view = new TodoItemView(leaf, props); + return this.view; + }); + this.addSettingTab(new ActionTrackerSettingTab(this.app, this)); + if (this.app.workspace.layoutReady) { + this.initLeaf(); + yield this.prepareIndex(); + } + else { + this.registerEvent(this.app.workspace.on('layout-ready', this.initLeaf.bind(this))); + this.registerEvent(this.app.workspace.on('layout-ready', () => __awaiter(this, void 0, void 0, function* () { return yield this.prepareIndex(); }))); + } + }); + } + onunload() { + this.app.workspace.getLeavesOfType(VIEW_TYPE_TODO).forEach((leaf) => leaf.detach()); + } + initLeaf() { + if (this.app.workspace.getLeavesOfType(VIEW_TYPE_TODO).length) { + return; + } + this.app.workspace.getRightLeaf(false).setViewState({ + type: VIEW_TYPE_TODO, + }); + } + prepareIndex() { + return __awaiter(this, void 0, void 0, function* () { + yield this.todoIndex.initialize(); + }); + } + tick(todos) { + this.view.setProps((currentProps) => { + return Object.assign(Object.assign({}, currentProps), { todos: todos }); + }); + } + loadSettings() { + return __awaiter(this, void 0, void 0, function* () { + this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); + }); + } + saveSettings() { + return __awaiter(this, void 0, void 0, function* () { + yield this.saveData(this.settings); + }); + } + getSettingValue(setting) { + return this.settings[setting]; + } } module.exports = ActionTrackerPlugin; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsImNvbnN0YW50cy50cyIsIm1vZGVsL1RvZG9JdGVtLnRzIiwidWkvaWNvbnMudHMiLCJ1aS9Ub2RvSXRlbVZpZXcudHMiLCJtb2RlbC9Ub2RvUGFyc2VyLnRzIiwibW9kZWwvVG9kb0luZGV4LnRzIiwic2V0dGluZ3MudHMiLCJtYWluLnRzIl0sInNvdXJjZXNDb250ZW50IjpbIi8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuXHJcblxyXG5USEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiIEFORCBUSEUgQVVUSE9SIERJU0NMQUlNUyBBTEwgV0FSUkFOVEl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IGZ1bmN0aW9uIHZlcmIobikgeyByZXR1cm4gZnVuY3Rpb24gKHYpIHsgcmV0dXJuIHN0ZXAoW24sIHZdKTsgfTsgfVxyXG4gICAgZnVuY3Rpb24gc3RlcChvcCkge1xyXG4gICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKFwiR2VuZXJhdG9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA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UUFBUSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQztTQUNuQztLQUFBO0lBRUEsZUFBZSxDQUF3QyxPQUFVO1FBQy9ELE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsQ0FBQTtLQUM5Qjs7Ozs7In0= diff --git a/model/TodoParser.ts b/model/TodoParser.ts index e54b2e1..b92b1dd 100644 --- a/model/TodoParser.ts +++ b/model/TodoParser.ts @@ -20,8 +20,10 @@ export class TodoParser { const description = entry[3]; const dateMatches = description.match(this.props.dateRegexp); - const actionDate = dateMatches != null ? new Date(dateMatches[1]) : undefined; - + let actionDate = undefined; + if (dateMatches != null) { + actionDate = dateMatches.length > 3 ? new Date(parseInt(dateMatches[1]), parseInt(dateMatches[2])-1,parseInt(dateMatches[3]),0, 0, 0, 0) : undefined; + } const personMatches = description.match(this.props.personRegexp); const person = personMatches != null ? personMatches[1] : ""; diff --git a/settings.ts b/settings.ts index 5a1a061..c1f9d49 100644 --- a/settings.ts +++ b/settings.ts @@ -14,7 +14,7 @@ export interface ActionTrackerSettings { export const DEFAULT_SETTINGS: ActionTrackerSettings = { personRegexpString: '\\[{2}People\\/(.*?)\\]{2}', projectRegexpString: '\\[{2}Projects\\/(.*?)\\]{2}', - dateRegexpString: '#(\\d{4}\\/\\d{2}\\/\\d{2})', + dateRegexpString: '#(\\d{4})\\/(\\d{2})\\/(\\d{2})', discussWithRegexpString: '#(discussWith)', waitingForRegexpString: '#(waitingFor)', promisedToRegexpString: '#(promisedTo)',