()
| 477 | } |
| 478 | |
| 479 | refreshWatchedFieldValues () { |
| 480 | if (!this.watched_values) return |
| 481 | const watched = {} |
| 482 | let changed = false |
| 483 | |
| 484 | if (this.watched) { |
| 485 | Object.keys(this.watched).forEach(name => { |
| 486 | const editor = this.jsoneditor.getEditor(this.watched[name]) |
| 487 | const val = editor ? editor.getValue() : null |
| 488 | if (this.watched_values[name] !== val) changed = true |
| 489 | watched[name] = val |
| 490 | }) |
| 491 | } |
| 492 | |
| 493 | watched.self = this.getValue() |
| 494 | if (this.watched_values.self !== watched.self) changed = true |
| 495 | |
| 496 | this.watched_values = watched |
| 497 | |
| 498 | return changed |
| 499 | } |
| 500 | |
| 501 | getWatchedFieldValues () { |
| 502 | return this.watched_values |
no test coverage detected