@webex/plugin-meetings 3.12.0-next.10 → 3.12.0-next.12
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +23 -21
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +36 -20
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +38 -14
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/hashTree/hashTreeParser.d.ts +12 -2
- package/dist/types/locus-info/index.d.ts +8 -3
- package/dist/webinar/index.js +1 -1
- package/package.json +13 -13
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +26 -19
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/hashTreeParser.ts +39 -22
- package/src/locus-info/index.ts +48 -24
- package/src/meeting/util.ts +1 -0
- package/test/unit/spec/controls-options-manager/index.js +114 -6
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +59 -32
- package/test/unit/spec/locus-info/index.js +47 -22
- package/test/unit/spec/meeting/utils.js +4 -0
|
@@ -248,7 +248,10 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
248
248
|
var dataset = this.dataSets[datasetName];
|
|
249
249
|
if (!dataset) {
|
|
250
250
|
_loggerProxy.default.logger.warn("HashTreeParser#sendInitializationSyncRequestToLocus --> ".concat(this.debugId, " No data set found for ").concat(datasetName, ", cannot send the request for leaf data"));
|
|
251
|
-
return _promise.default.resolve(
|
|
251
|
+
return _promise.default.resolve({
|
|
252
|
+
updateType: LocusInfoUpdateType.OBJECTS_UPDATED,
|
|
253
|
+
updatedObjects: []
|
|
254
|
+
});
|
|
252
255
|
}
|
|
253
256
|
var emptyLeavesData = new Array(dataset.leafCount).fill([]);
|
|
254
257
|
_loggerProxy.default.logger.info("HashTreeParser#sendInitializationSyncRequestToLocus --> ".concat(this.debugId, " Sending initial sync request to Locus for data set \"").concat(datasetName, "\" with empty leaf data"));
|
|
@@ -380,7 +383,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
380
383
|
key: "initializeDataSets",
|
|
381
384
|
value: (function () {
|
|
382
385
|
var _initializeDataSets = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(visibleDataSets, debugText) {
|
|
383
|
-
var updatedObjects, _iterator2, _step2, dataSet, name, leafCount, url,
|
|
386
|
+
var updatedObjects, _iterator2, _step2, dataSet, name, leafCount, url, data, _t;
|
|
384
387
|
return _regenerator.default.wrap(function (_context3) {
|
|
385
388
|
while (1) switch (_context3.prev = _context3.next) {
|
|
386
389
|
case 0:
|
|
@@ -431,9 +434,9 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
431
434
|
_context3.next = 5;
|
|
432
435
|
return this.sendInitializationSyncRequestToLocus(name, debugText);
|
|
433
436
|
case 5:
|
|
434
|
-
|
|
435
|
-
if (
|
|
436
|
-
updatedObjects.push.apply(updatedObjects, (0, _toConsumableArray2.default)(
|
|
437
|
+
data = _context3.sent;
|
|
438
|
+
if (data.updateType === LocusInfoUpdateType.OBJECTS_UPDATED) {
|
|
439
|
+
updatedObjects.push.apply(updatedObjects, (0, _toConsumableArray2.default)(data.updatedObjects || []));
|
|
437
440
|
}
|
|
438
441
|
case 6:
|
|
439
442
|
_context3.next = 3;
|
|
@@ -1079,8 +1082,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1079
1082
|
key: "parseMessage",
|
|
1080
1083
|
value: function parseMessage(message, debugText) {
|
|
1081
1084
|
var _message$locusStateEl,
|
|
1082
|
-
_this1 = this
|
|
1083
|
-
_message$locusStateEl2;
|
|
1085
|
+
_this1 = this;
|
|
1084
1086
|
if (this.state === 'stopped') {
|
|
1085
1087
|
return [];
|
|
1086
1088
|
}
|
|
@@ -1139,7 +1141,7 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1139
1141
|
dataSetsRequiringInitialization = this.processVisibleDataSetChanges(removedDataSets, addedDataSets, updatedObjects);
|
|
1140
1142
|
}
|
|
1141
1143
|
}
|
|
1142
|
-
if (
|
|
1144
|
+
if (message.locusStateElements && message.locusStateElements.length > 0) {
|
|
1143
1145
|
// by this point we now have this.dataSets setup for data sets from this message
|
|
1144
1146
|
// and hash trees created for the new visible data sets,
|
|
1145
1147
|
// so we can now process all the updates from the message
|
|
@@ -1229,16 +1231,16 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1229
1231
|
}, {
|
|
1230
1232
|
key: "callLocusInfoUpdateCallback",
|
|
1231
1233
|
value: function callLocusInfoUpdateCallback(updates) {
|
|
1232
|
-
var
|
|
1234
|
+
var _updates$updatedObjec,
|
|
1235
|
+
_this10 = this;
|
|
1233
1236
|
if (this.state === 'stopped') {
|
|
1234
1237
|
return;
|
|
1235
1238
|
}
|
|
1236
|
-
var updateType = updates.updateType
|
|
1237
|
-
|
|
1238
|
-
if (updateType === LocusInfoUpdateType.OBJECTS_UPDATED && (updatedObjects === null || updatedObjects === void 0 ? void 0 : updatedObjects.length) > 0) {
|
|
1239
|
+
var updateType = updates.updateType;
|
|
1240
|
+
if (updateType === LocusInfoUpdateType.OBJECTS_UPDATED && ((_updates$updatedObjec = updates.updatedObjects) === null || _updates$updatedObjec === void 0 ? void 0 : _updates$updatedObjec.length) > 0) {
|
|
1239
1241
|
// Filter out updates for objects that already have a higher version in their datasets,
|
|
1240
1242
|
// or removals for objects that still exist in any of their datasets
|
|
1241
|
-
var filteredUpdates = updatedObjects.filter(function (object) {
|
|
1243
|
+
var filteredUpdates = updates.updatedObjects.filter(function (object) {
|
|
1242
1244
|
var elementId = object.htMeta.elementId;
|
|
1243
1245
|
var type = elementId.type,
|
|
1244
1246
|
id = elementId.id,
|
|
@@ -1270,13 +1272,14 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1270
1272
|
return true;
|
|
1271
1273
|
});
|
|
1272
1274
|
if (filteredUpdates.length > 0) {
|
|
1273
|
-
this.locusInfoUpdateCallback(
|
|
1275
|
+
this.locusInfoUpdateCallback({
|
|
1276
|
+
updateType: updateType,
|
|
1274
1277
|
updatedObjects: filteredUpdates
|
|
1275
1278
|
});
|
|
1276
1279
|
}
|
|
1277
1280
|
} else if (updateType !== LocusInfoUpdateType.OBJECTS_UPDATED) {
|
|
1278
|
-
this.locusInfoUpdateCallback(
|
|
1279
|
-
|
|
1281
|
+
this.locusInfoUpdateCallback({
|
|
1282
|
+
updateType: updateType
|
|
1280
1283
|
});
|
|
1281
1284
|
}
|
|
1282
1285
|
}
|
|
@@ -1557,6 +1560,18 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1557
1560
|
this.state = 'stopped';
|
|
1558
1561
|
}
|
|
1559
1562
|
|
|
1563
|
+
/**
|
|
1564
|
+
* Cleans up the HashTreeParser, stopping all timers and clearing all internal state.
|
|
1565
|
+
* After calling this, the parser should not be used anymore.
|
|
1566
|
+
* @returns {void}
|
|
1567
|
+
*/
|
|
1568
|
+
}, {
|
|
1569
|
+
key: "cleanUp",
|
|
1570
|
+
value: function cleanUp() {
|
|
1571
|
+
this.stop();
|
|
1572
|
+
this.dataSets = {};
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1560
1575
|
/**
|
|
1561
1576
|
* Resumes the HashTreeParser that was previously stopped.
|
|
1562
1577
|
* @param {HashTreeMessage} message - The message to resume with, it must contain metadata with visible data sets info
|
|
@@ -1565,9 +1580,9 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1565
1580
|
}, {
|
|
1566
1581
|
key: "resume",
|
|
1567
1582
|
value: function resume(message) {
|
|
1568
|
-
var _message$
|
|
1583
|
+
var _message$locusStateEl2, _metadataObject$data;
|
|
1569
1584
|
// check that message contains metadata with visible data sets - this is essential to be able to resume
|
|
1570
|
-
var metadataObject = (_message$
|
|
1585
|
+
var metadataObject = (_message$locusStateEl2 = message.locusStateElements) === null || _message$locusStateEl2 === void 0 ? void 0 : _message$locusStateEl2.find(function (el) {
|
|
1571
1586
|
return (0, _utils.isMetadata)(el);
|
|
1572
1587
|
});
|
|
1573
1588
|
if (!(metadataObject !== null && metadataObject !== void 0 && (_metadataObject$data = metadataObject.data) !== null && _metadataObject$data !== void 0 && _metadataObject$data.visibleDataSets)) {
|
|
@@ -1667,9 +1682,10 @@ var HashTreeParser = /*#__PURE__*/function () {
|
|
|
1667
1682
|
leafDataEntries: []
|
|
1668
1683
|
};
|
|
1669
1684
|
(0, _keys.default)(mismatchedLeavesData).forEach(function (index) {
|
|
1685
|
+
var leafIndex = (0, _parseInt2.default)(index, 10);
|
|
1670
1686
|
body.leafDataEntries.push({
|
|
1671
|
-
leafIndex:
|
|
1672
|
-
elementIds: mismatchedLeavesData[
|
|
1687
|
+
leafIndex: leafIndex,
|
|
1688
|
+
elementIds: mismatchedLeavesData[leafIndex]
|
|
1673
1689
|
});
|
|
1674
1690
|
});
|
|
1675
1691
|
var ourCurrentRootHash = dataSet.hashTree ? dataSet.hashTree.getRootHash() : _constants2.EMPTY_HASH;
|