ywana-core8 0.0.828 → 0.0.830

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/dist/index.umd.js CHANGED
@@ -5069,7 +5069,6 @@
5069
5069
  var tasks = function tasks(filters, likes) {
5070
5070
  try {
5071
5071
  return Promise.resolve(_catch$5(function () {
5072
- console.log("tasks", filters);
5073
5072
  return Promise.resolve(API.all(filters, likes));
5074
5073
  }, function (error) {
5075
5074
  console.log("tasks error", error);
@@ -5102,8 +5101,9 @@
5102
5101
  React.useEffect(function () {
5103
5102
  var interval = setInterval(function () {
5104
5103
  try {
5105
- return Promise.resolve(API.all()).then(function (tasks) {
5106
- // find task for each listener
5104
+ return Promise.resolve(API.all({
5105
+ state: TASK_STATES.RUNNING
5106
+ })).then(function (tasks) {
5107
5107
  Object.keys(_listeners).forEach(function (taskID) {
5108
5108
  var task = tasks.find(function (task) {
5109
5109
  return task.id === taskID;
@@ -5136,6 +5136,17 @@
5136
5136
  value: value
5137
5137
  }, children);
5138
5138
  };
5139
+ /**
5140
+ * Task States
5141
+ */
5142
+
5143
+ var TASK_STATES = {
5144
+ "CREATED": "CREATED",
5145
+ "RUNNING": "RUNNING",
5146
+ "COMPLETED": "COMPPLETED",
5147
+ "FAULTED": "FAULTED",
5148
+ "CANCELED": "CANCELED"
5149
+ };
5139
5150
  /**
5140
5151
  * TaskProgress
5141
5152
  */