@azrico/webobject 1.4.149 → 1.4.151

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.
@@ -69,11 +69,12 @@ var ObjectManager = exports.ObjectManager = /*#__PURE__*/function (_RawObject) {
69
69
  case 3:
70
70
  if (value === undefined && type != "meta") value = obj.getValue(key);
71
71
  typestr = (type ? "$".concat(type, "$") : "") + String(key);
72
- _context.next = 7;
72
+ console.log("event_run", typestr, value);
73
+ _context.next = 8;
73
74
  return this.event_run("on_change", typestr, value);
74
- case 7:
75
- return _context.abrupt("return", _context.sent);
76
75
  case 8:
76
+ return _context.abrupt("return", _context.sent);
77
+ case 9:
77
78
  case "end":
78
79
  return _context.stop();
79
80
  }
@@ -167,8 +167,7 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
167
167
  return _context.abrupt("return", false);
168
168
  case 7:
169
169
  isValueChanged = false;
170
- console.log("setValue", key, value, shouldNotify);
171
- _context.prev = 9;
170
+ /* --------------------------- set if not changed --------------------------- */
172
171
  oldval = this.getValue(key);
173
172
  if (!(0, _object.object_equals)(oldval, value, {
174
173
  strictArrayCheck: true,
@@ -177,29 +176,20 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
177
176
  _classPrivateMethodGet(this, _setProperty, _setProperty2).call(this, key, value);
178
177
  isValueChanged = true;
179
178
  } else isValueChanged = false;
180
- _context.next = 17;
181
- break;
182
- case 14:
183
- _context.prev = 14;
184
- _context.t0 = _context["catch"](9);
185
- console.error("setValue failed", _context.t0);
186
- case 17:
187
- _context.prev = 17;
179
+ /* --------------------------------- notify --------------------------------- */
188
180
  if (!(shouldNotify === true || shouldNotify === "auto" && isValueChanged)) {
189
- _context.next = 21;
181
+ _context.next = 13;
190
182
  break;
191
183
  }
192
- _context.next = 21;
184
+ _context.next = 13;
193
185
  return this.notifyChanged("", key, value);
194
- case 21:
195
- return _context.finish(17);
196
- case 22:
186
+ case 13:
197
187
  return _context.abrupt("return", isValueChanged);
198
- case 23:
188
+ case 14:
199
189
  case "end":
200
190
  return _context.stop();
201
191
  }
202
- }, _callee, this, [[9, 14, 17, 22]]);
192
+ }, _callee, this);
203
193
  }));
204
194
  function setValue(_x, _x2) {
205
195
  return _setValue.apply(this, arguments);
@@ -626,16 +616,17 @@ var SimpleObject = exports.SimpleObject = /*#__PURE__*/function (_MapableObject)
626
616
  /* --------------------------- notify the manager --------------------------- */
627
617
  manager_class = this.manager;
628
618
  if (!(typeof (manager_class === null || manager_class === void 0 ? void 0 : manager_class.notifyChanged) === "function")) {
629
- _context11.next = 11;
619
+ _context11.next = 12;
630
620
  break;
631
621
  }
632
- _context11.next = 10;
622
+ console.log("notify manager", type, key, value);
623
+ _context11.next = 11;
633
624
  return manager_class.notifyChanged(type, key, value, subvalue);
634
- case 10:
635
- return _context11.abrupt("return", _context11.sent);
636
625
  case 11:
637
- return _context11.abrupt("return", false);
626
+ return _context11.abrupt("return", _context11.sent);
638
627
  case 12:
628
+ return _context11.abrupt("return", false);
629
+ case 13:
639
630
  case "end":
640
631
  return _context11.stop();
641
632
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.4.149",
3
+ "version": "1.4.151",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",
@@ -70,8 +70,8 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@azrico/convert": "^1.0.5",
73
- "@azrico/event": "^1.2.34",
74
- "@azrico/global": "^1.3.76",
73
+ "@azrico/event": "^1.2.43",
74
+ "@azrico/global": "^1.3.78",
75
75
  "@azrico/math": "^1.0.5",
76
76
  "@azrico/object": "^1.4.101",
77
77
  "@azrico/string": "^1.2.95",