@knowlearning/agents 0.9.15 → 0.9.16
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.
|
@@ -209,7 +209,7 @@ export default function EmbeddedAgent() {
|
|
|
209
209
|
function disconnect() { return send({ type: 'disconnect' }) }
|
|
210
210
|
function reconnect() { return send({ type: 'reconnect' }) }
|
|
211
211
|
function synced() { return send({ type: 'synced' }) }
|
|
212
|
-
function close() { return send({ type: 'close' }) }
|
|
212
|
+
function close(info) { return send({ type: 'close', info }) }
|
|
213
213
|
|
|
214
214
|
return {
|
|
215
215
|
embedded: true,
|
|
@@ -54,8 +54,7 @@ function embed(environment, iframe) {
|
|
|
54
54
|
sendDown({})
|
|
55
55
|
}
|
|
56
56
|
else if (type === 'close') {
|
|
57
|
-
|
|
58
|
-
if (listeners.close) listeners.close()
|
|
57
|
+
if (listeners.close) listeners.close(message.info)
|
|
59
58
|
}
|
|
60
59
|
else if (type === 'environment') {
|
|
61
60
|
const env = await Agent.environment()
|
package/package.json
CHANGED
|
@@ -28,29 +28,7 @@ export default function (module, scope) {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
else if (component.setup) {
|
|
31
|
-
|
|
32
|
-
const isReactiveRef = r => r && r.__v_isRef
|
|
33
|
-
component.setup = function setupProxy(a, b) { // need to specifically add this here, otherwise second argument not passed in arguments array (probably because of webpack optimization...)
|
|
34
|
-
let refs = origSetupFn.call(this, a, b)
|
|
35
|
-
|
|
36
|
-
Object
|
|
37
|
-
.entries(state)
|
|
38
|
-
.filter(([k]) => isReactiveRef(refs[k]))
|
|
39
|
-
.forEach(([k, v]) => refs[k].value = v)
|
|
40
|
-
|
|
41
|
-
Object
|
|
42
|
-
.entries(refs)
|
|
43
|
-
.filter(([_,r]) => isReactiveRef(r) && isScopeSerializable(r.value))
|
|
44
|
-
.forEach(([key, ref]) => {
|
|
45
|
-
watchEffect(() => {
|
|
46
|
-
if (state[key] !== ref.value) {
|
|
47
|
-
state[key] = ref.value
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
return refs
|
|
53
|
-
}
|
|
31
|
+
throw new Error('vuePersistantCompoent is for components using the Options API. To use the composition API see https://docs.knowlearning.systems/frameworks/vue/')
|
|
54
32
|
}
|
|
55
33
|
}
|
|
56
34
|
|