jsgar 3.1.4 → 3.2.0

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 (2) hide show
  1. package/dist/gar.umd.js +7 -6
  2. package/package.json +1 -1
package/dist/gar.umd.js CHANGED
@@ -50,7 +50,7 @@
50
50
  this.user = user;
51
51
  this.working_namespace = working_namespace;
52
52
  this.heartbeatTimeoutInterval = heartbeatTimeoutInterval;
53
- this.version = 650706;
53
+ this.version = 650707;
54
54
 
55
55
  if (typeof window !== 'undefined' && window.location) {
56
56
  this.application = window.location.href;
@@ -318,13 +318,13 @@
318
318
 
319
319
  /**
320
320
  * Register handler for KeyIntroduction message.
321
- * @param {Function} handler - Callback with (keyId, name, class_list)
321
+ * @param {Function} handler - Callback with (keyId, name, class_list, deleted_class)
322
322
  * @param subscriptionGroup - The subscription group for callback (default 0)
323
323
  */
324
324
  registerKeyIntroductionHandler(handler, subscriptionGroup = 0) {
325
325
  this.registerHandler('KeyIntroduction', (msg) => {
326
326
  const value = msg.value;
327
- handler(value.key_id, value.name, value.class_list || null);
327
+ handler(value.key_id, value.name, value.class_list || null, value.deleted_class || null);
328
328
  }, subscriptionGroup);
329
329
  }
330
330
 
@@ -419,8 +419,8 @@
419
419
  this.registerLogoffHandler(() => this.log('INFO', 'Logoff received'));
420
420
  this.registerTopicIntroductionHandler((topicId, name) =>
421
421
  this.log('DEBUG', `New server topic: ${name} (Server ID: ${topicId})`));
422
- this.registerKeyIntroductionHandler((keyId, name, classList) =>
423
- this.log('DEBUG', `New server key: ${name} : ${keyId} (Classes: ${JSON.stringify(classList)})`));
422
+ this.registerKeyIntroductionHandler((keyId, name, classList, deletedClass) =>
423
+ this.log('DEBUG', `Key: ${name} : ${keyId} (Classes: ${JSON.stringify(classList)}/-${deletedClass})`));
424
424
  this.registerDeleteKeyHandler((keyId) =>
425
425
  this.log('DEBUG', `Delete key: ${this.serverKeyIdToName.get(keyId) || 'unknown'} (Server ID: ${keyId})`));
426
426
  this.registerSubscriptionStatusHandler(this._defaultSubscriptionStatusHandler.bind(this));
@@ -655,7 +655,8 @@
655
655
  value: {
656
656
  key_id: keyId,
657
657
  name: keyName,
658
- ...(keyClasses ? { class_list: keyClasses } : {})
658
+ ...(keyClasses ? { class_list: keyClasses } : {}),
659
+ deleted_class: null
659
660
  }
660
661
  };
661
662
  keyHandler(keyIntroMsg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsgar",
3
- "version": "3.1.4",
3
+ "version": "3.2.0",
4
4
  "description": "A Javascript client for the GAR protocol",
5
5
  "type": "module",
6
6
  "main": "dist/gar.umd.js",