imdone-core 1.53.3 → 1.53.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/card.js CHANGED
@@ -186,11 +186,17 @@ module.exports = function newCard(task, _project, dontParse) {
186
186
  ...defaultData
187
187
  }
188
188
 
189
- const keys = Object.keys(data)
189
+ const keys = Object.keys(data).map((key) => {
190
+ const value = data[key]
191
+ if (_isFunction(value)) {
192
+ key = key + '()'
193
+ }
194
+ return key
195
+ })
196
+
190
197
  keys.forEach((key) => {
191
198
  const value = data[key]
192
199
  if (_isObject(value) && !Array.isArray(value)) {
193
-
194
200
  keys.push(...Object.keys(value).map((k) => `${key}.${k}`))
195
201
  }
196
202
  })
package/lib/project.js CHANGED
@@ -108,9 +108,10 @@ module.exports = class WorkerProject extends Project {
108
108
  )
109
109
  let allLists = this.allLists
110
110
  allLists = allLists.map((list) => {
111
- list.tasks = list.tasks.map((card) => {
111
+ list.tasks = list.tasks.map((card, index) => {
112
112
  card.interpretedContent = ''
113
113
  card.totals = totals
114
+ card.index = index
114
115
  return card
115
116
  })
116
117
  return list
package/lib/task.js CHANGED
@@ -70,6 +70,7 @@ class Task {
70
70
  this.content = obj.content
71
71
  this.lastLine = this.getLastLine()
72
72
  this.orderModified = obj.orderModified
73
+ this.index = undefined
73
74
  if (dontParse || !this.text) return
74
75
  this.parse()
75
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imdone-core",
3
- "version": "1.53.3",
3
+ "version": "1.53.5",
4
4
  "description": "imdone-core",
5
5
  "main": "index.js",
6
6
  "scripts": {