@webex/plugin-meetings 3.12.0-next.1 → 3.12.0-next.10

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.
Files changed (38) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/hashTree/constants.js +10 -1
  5. package/dist/hashTree/constants.js.map +1 -1
  6. package/dist/hashTree/hashTreeParser.js +20 -11
  7. package/dist/hashTree/hashTreeParser.js.map +1 -1
  8. package/dist/hashTree/utils.js +22 -0
  9. package/dist/hashTree/utils.js.map +1 -1
  10. package/dist/interpretation/index.js +1 -1
  11. package/dist/interpretation/siLanguage.js +1 -1
  12. package/dist/meeting/index.js +427 -323
  13. package/dist/meeting/index.js.map +1 -1
  14. package/dist/metrics/constants.js +5 -1
  15. package/dist/metrics/constants.js.map +1 -1
  16. package/dist/multistream/sendSlotManager.js +116 -2
  17. package/dist/multistream/sendSlotManager.js.map +1 -1
  18. package/dist/types/hashTree/constants.d.ts +1 -0
  19. package/dist/types/hashTree/utils.d.ts +11 -0
  20. package/dist/types/meeting/index.d.ts +24 -1
  21. package/dist/types/metrics/constants.d.ts +4 -0
  22. package/dist/types/multistream/sendSlotManager.d.ts +23 -1
  23. package/dist/webinar/index.js +325 -220
  24. package/dist/webinar/index.js.map +1 -1
  25. package/package.json +15 -15
  26. package/src/hashTree/constants.ts +9 -0
  27. package/src/hashTree/hashTreeParser.ts +21 -14
  28. package/src/hashTree/utils.ts +17 -0
  29. package/src/meeting/index.ts +165 -57
  30. package/src/metrics/constants.ts +5 -0
  31. package/src/multistream/sendSlotManager.ts +97 -3
  32. package/src/webinar/index.ts +120 -18
  33. package/test/unit/spec/hashTree/hashTreeParser.ts +238 -0
  34. package/test/unit/spec/hashTree/utils.ts +88 -1
  35. package/test/unit/spec/meeting/index.js +179 -48
  36. package/test/unit/spec/meetings/index.js +3 -3
  37. package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
  38. package/test/unit/spec/webinar/index.ts +193 -8
@@ -8,8 +8,10 @@ _Object$defineProperty(exports, "__esModule", {
8
8
  exports.deleteNestedObjectsWithHtMeta = void 0;
9
9
  exports.isMetadata = isMetadata;
10
10
  exports.isSelf = isSelf;
11
+ exports.sortByInitPriority = sortByInitPriority;
11
12
  var _isArray = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/array/is-array"));
12
13
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
14
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
13
15
  var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/typeof"));
14
16
  var _types = require("./types");
15
17
  /* eslint-disable import/prefer-default-export */
@@ -66,4 +68,24 @@ var _deleteNestedObjectsWithHtMeta = exports.deleteNestedObjectsWithHtMeta = fun
66
68
  }
67
69
  }
68
70
  };
71
+
72
+ /**
73
+ * Reorders items so that those matching the given priority list come first (in priority order),
74
+ * followed by everything else in their original order.
75
+ *
76
+ * @param {Array<T>} items - The items to reorder
77
+ * @param {string[]} priority - Ordered list of names that should come first
78
+ * @returns {Array<T>} A new array with prioritized items first
79
+ */
80
+ function sortByInitPriority(items, priority) {
81
+ var prioritized = priority.map(function (name) {
82
+ return items.find(function (item) {
83
+ return item.name === name;
84
+ });
85
+ }).filter(Boolean);
86
+ var rest = items.filter(function (item) {
87
+ return !priority.includes(item.name);
88
+ });
89
+ return [].concat((0, _toConsumableArray2.default)(prioritized), (0, _toConsumableArray2.default)(rest));
90
+ }
69
91
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","isSelf","object","htMeta","elementId","type","toLowerCase","ObjectType","self","isMetadata","metadata","deleteNestedObjectsWithHtMeta","exports","currentLocusPart","parent","currentKey","_typeof2","default","undefined","_isArray","splice","Number","i","length","_i","_Object$keys","_keys","key","Object","prototype","hasOwnProperty","call"],"sources":["utils.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n\nimport {ObjectType, HashTreeObject} from './types';\n\n/**\n * Checks if the given hash tree object is of type \"self\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"self\", false otherwise\n */\nexport function isSelf(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.self;\n}\n\n/**\n * Checks if the given hash tree object is of type \"Metadata\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"Metadata\", false otherwise\n */\nexport function isMetadata(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.metadata;\n}\n\n/**\n * Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta\n *\n * @param {Object} currentLocusPart part of locus DTO to analyze\n * @param {Object} parent parent object\n * @param {string|number} currentKey key of the parent object that currentLocusPart is\n * @returns {void}\n */\nexport const deleteNestedObjectsWithHtMeta = (\n currentLocusPart: any,\n parent?: any,\n currentKey?: string | number\n) => {\n if (typeof currentLocusPart !== 'object' || currentLocusPart === null) {\n return;\n }\n\n if (parent && currentKey !== undefined && currentLocusPart.htMeta) {\n if (Array.isArray(parent)) {\n parent.splice(Number(currentKey), 1);\n } else {\n delete parent[currentKey];\n }\n\n return;\n }\n\n if (Array.isArray(currentLocusPart)) {\n // iterate array in reverse, so that indexes remain valid when deleting elements\n for (let i = currentLocusPart.length - 1; i >= 0; i -= 1) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[i], currentLocusPart, i);\n }\n } else {\n for (const key of Object.keys(currentLocusPart)) {\n if (Object.prototype.hasOwnProperty.call(currentLocusPart, key)) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[key], currentLocusPart, key);\n }\n }\n }\n};\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAFA;;AAIA;AACA;AACA;AACA;AACA;AACO,SAASC,MAAMA,CAACC,MAAsB,EAAE;EAC7C,OAAOA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EAAA,GAAAC,YAAA,CAAAF,MAAA,EAAAC,EAAA,IAAE;MAA5C,IAAMG,GAAG,GAAAF,YAAA,CAAAD,EAAA;MACZ,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAAClB,gBAAgB,EAAEc,GAAG,CAAC,EAAE;QAC/DhB,8BAA6B,CAACE,gBAAgB,CAACc,GAAG,CAAC,EAAEd,gBAAgB,EAAEc,GAAG,CAAC;MAC7E;IACF;EACF;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_types","require","isSelf","object","htMeta","elementId","type","toLowerCase","ObjectType","self","isMetadata","metadata","deleteNestedObjectsWithHtMeta","exports","currentLocusPart","parent","currentKey","_typeof2","default","undefined","_isArray","splice","Number","i","length","_i","_Object$keys","_keys","key","Object","prototype","hasOwnProperty","call","sortByInitPriority","items","priority","prioritized","map","name","find","item","filter","Boolean","rest","includes","concat","_toConsumableArray2"],"sources":["utils.ts"],"sourcesContent":["/* eslint-disable import/prefer-default-export */\n\nimport {ObjectType, HashTreeObject} from './types';\n\n/**\n * Checks if the given hash tree object is of type \"self\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"self\", false otherwise\n */\nexport function isSelf(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.self;\n}\n\n/**\n * Checks if the given hash tree object is of type \"Metadata\"\n * @param {HashTreeObject} object object to check\n * @returns {boolean} True if the object is of type \"Metadata\", false otherwise\n */\nexport function isMetadata(object: HashTreeObject) {\n return object.htMeta.elementId.type.toLowerCase() === ObjectType.metadata;\n}\n\n/**\n * Analyzes given part of Locus DTO recursively and delete any nested objects that have their own htMeta\n *\n * @param {Object} currentLocusPart part of locus DTO to analyze\n * @param {Object} parent parent object\n * @param {string|number} currentKey key of the parent object that currentLocusPart is\n * @returns {void}\n */\nexport const deleteNestedObjectsWithHtMeta = (\n currentLocusPart: any,\n parent?: any,\n currentKey?: string | number\n) => {\n if (typeof currentLocusPart !== 'object' || currentLocusPart === null) {\n return;\n }\n\n if (parent && currentKey !== undefined && currentLocusPart.htMeta) {\n if (Array.isArray(parent)) {\n parent.splice(Number(currentKey), 1);\n } else {\n delete parent[currentKey];\n }\n\n return;\n }\n\n if (Array.isArray(currentLocusPart)) {\n // iterate array in reverse, so that indexes remain valid when deleting elements\n for (let i = currentLocusPart.length - 1; i >= 0; i -= 1) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[i], currentLocusPart, i);\n }\n } else {\n for (const key of Object.keys(currentLocusPart)) {\n if (Object.prototype.hasOwnProperty.call(currentLocusPart, key)) {\n deleteNestedObjectsWithHtMeta(currentLocusPart[key], currentLocusPart, key);\n }\n }\n }\n};\n\n/**\n * Reorders items so that those matching the given priority list come first (in priority order),\n * followed by everything else in their original order.\n *\n * @param {Array<T>} items - The items to reorder\n * @param {string[]} priority - Ordered list of names that should come first\n * @returns {Array<T>} A new array with prioritized items first\n */\nexport function sortByInitPriority<T extends {name: string}>(items: T[], priority: string[]): T[] {\n const prioritized = priority\n .map((name) => items.find((item) => item.name === name))\n .filter(Boolean) as T[];\n const rest = items.filter((item) => !priority.includes(item.name));\n\n return [...prioritized, ...rest];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AAFA;;AAIA;AACA;AACA;AACA;AACA;AACO,SAASC,MAAMA,CAACC,MAAsB,EAAE;EAC7C,OAAOA,MAAM,CAACC,MAAM,CAACC,SAAS,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKC,iBAAU,CAACC,IAAI;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACP,MAAsB,EAAE;EACjD,OAAOA,MAAM,CAACC,MAAM,CAACC,SAAS,CAACC,IAAI,CAACC,WAAW,CAAC,CAAC,KAAKC,iBAAU,CAACG,QAAQ;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMC,8BAA6B,GAAAC,OAAA,CAA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,kBAAkBA,CAA2BC,KAAU,EAAEC,QAAkB,EAAO;EAChG,IAAMC,WAAW,GAAGD,QAAQ,CACzBE,GAAG,CAAC,UAACC,IAAI;IAAA,OAAKJ,KAAK,CAACK,IAAI,CAAC,UAACC,IAAI;MAAA,OAAKA,IAAI,CAACF,IAAI,KAAKA,IAAI;IAAA,EAAC;EAAA,EAAC,CACvDG,MAAM,CAACC,OAAO,CAAQ;EACzB,IAAMC,IAAI,GAAGT,KAAK,CAACO,MAAM,CAAC,UAACD,IAAI;IAAA,OAAK,CAACL,QAAQ,CAACS,QAAQ,CAACJ,IAAI,CAACF,IAAI,CAAC;EAAA,EAAC;EAElE,UAAAO,MAAA,KAAAC,mBAAA,CAAA5B,OAAA,EAAWkB,WAAW,OAAAU,mBAAA,CAAA5B,OAAA,EAAKyB,IAAI;AACjC","ignoreList":[]}
@@ -372,7 +372,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
372
372
  throw error;
373
373
  });
374
374
  },
375
- version: "3.12.0-next.1"
375
+ version: "3.12.0-next.10"
376
376
  });
377
377
  var _default = exports.default = SimultaneousInterpretation;
378
378
  //# sourceMappingURL=index.js.map
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
18
18
  languageCode: 'number',
19
19
  languageName: 'string'
20
20
  },
21
- version: "3.12.0-next.1"
21
+ version: "3.12.0-next.10"
22
22
  });
23
23
  var _default = exports.default = SILanguage;
24
24
  //# sourceMappingURL=siLanguage.js.map