@pie-api/pie-api-live-components
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -21,4 +21,5 @@ import { Component, Prop, h, Watch, Event, State, Host, Element } from '@stencil/core'; | ||
watchsessionId(newVal, oldVal) { | ||
if (newVal !== oldVal) { | ||
if (newVal && (newVal !== oldVal)) { | ||
this.itemConfig = null; | ||
this.updateItemInfo(); | ||
} | ||
@@ -32,2 +33,4 @@ newVal && this.attachSession.emit(this.sessionId); | ||
this.metadataValues = result.metadata; | ||
this.sessionData.data = result.data; | ||
this.sessionData.timestamp = result.timestamp; | ||
this.sessionData = Object.assign(Object.assign({}, this.sessionData), { itemConfig: this.itemConfig }); | ||
@@ -76,2 +79,3 @@ } | ||
this.sessionId && this.attachSession.emit(this.sessionId); | ||
this.sessionId && this.updateItemInfo(); | ||
} | ||
@@ -78,0 +82,0 @@ getCorrectness(points, maxPoints) { |
export const loadSessionContentItem = async (token, id, apiUrl, metadata) => { | ||
var _a, _b, _c, _d, _e; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; | ||
const output = {}; | ||
@@ -10,2 +10,3 @@ const query = ` | ||
config | ||
data | ||
} | ||
@@ -17,3 +18,5 @@ } | ||
output.config = (_c = (_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.contentItemSession) === null || _b === void 0 ? void 0 : _b.contentItem) === null || _c === void 0 ? void 0 : _c.config; | ||
if (metadata && metadata.length > 0 && ((_e = (_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.contentItemSession) === null || _e === void 0 ? void 0 : _e.contentItem)) { | ||
output.data = (_f = (_e = (_d = res === null || res === void 0 ? void 0 : res.data) === null || _d === void 0 ? void 0 : _d.contentItemSession) === null || _e === void 0 ? void 0 : _e.contentItem) === null || _f === void 0 ? void 0 : _f.data; | ||
output.timestamp = (_j = (_h = (_g = res === null || res === void 0 ? void 0 : res.data) === null || _g === void 0 ? void 0 : _g.contentItemSession) === null || _h === void 0 ? void 0 : _h.contentItem) === null || _j === void 0 ? void 0 : _j.timestamp; | ||
if (metadata && metadata.length > 0 && ((_l = (_k = res === null || res === void 0 ? void 0 : res.data) === null || _k === void 0 ? void 0 : _k.contentItemSession) === null || _l === void 0 ? void 0 : _l.contentItem)) { | ||
const itemId = res.data.contentItemSession.contentItem.id; | ||
@@ -20,0 +23,0 @@ if (itemId) { |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as s}from"./p-e49ed7e6.js";e().then(e=>s([["p-83081db6",[[0,"pie-api-live",{metadata:[16],token:[1],host:[1]},[[0,"attachSession","handleLiveSessionAdded"]]],[1,"pie-live-session",{sessionId:[513,"session-id"],token:[1],client:[16],apiUrl:[1,"api-url"],metadata:[16],sessionData:[32]}],[0,"pie-response",{sessionData:[8,"session-data"]}],[0,"pie-response-cell",{sessionData:[8,"session-data"]}]]],["p-58e25be0",[[0,"item-metadata",{_key:[1,"key"],attribute:[1]}]]]],e)); | ||
import{p as e,b as s}from"./p-e49ed7e6.js";e().then(e=>s([["p-04e2f76f",[[0,"pie-api-live",{metadata:[16],token:[1],host:[1]},[[0,"attachSession","handleLiveSessionAdded"]]],[1,"pie-live-session",{sessionId:[513,"session-id"],token:[1],client:[16],apiUrl:[1,"api-url"],metadata:[16],sessionData:[32]}],[0,"pie-response",{sessionData:[8,"session-data"]}],[0,"pie-response-cell",{sessionData:[8,"session-data"]}]]],["p-58e25be0",[[0,"item-metadata",{_key:[1,"key"],attribute:[1]}]]]],e)); |
{ | ||
"name": "@pie-api/pie-api-live-components", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"description": "Custom Elements that work with PIE Api Live services", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1694967
38100