@bigbinary/neeto-commons-frontend 2.0.67 → 2.0.68

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/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Subscription } from "@rails/actioncable";
1
+ import { Mixin, Subscription } from "@rails/actioncable";
2
2
  import dayjs from "dayjs";
3
3
  import React from "react";
4
4
  export function resetAuthTokens(): void;
@@ -323,8 +323,8 @@ type ChannelNameWithParams = {
323
323
  * channel: "testChannel",
324
324
  * deployment_id: "deploymentId",
325
325
  * },
326
- * value => handleValue(value)
326
+ * { received: value => handleValue(value) }
327
327
  * );
328
328
  * @endexample
329
329
  */
330
- export function createSubscription(channelName: string | ChannelNameWithParams, callback: (value: string) => void): Subscription;
330
+ export function createSubscription(channelName: string | ChannelNameWithParams, callbacks: Mixin): Subscription;
package/utils.js CHANGED
@@ -5449,7 +5449,7 @@ function getConfig(name) {
5449
5449
 
5450
5450
  function cov_19fxzgc93l() {
5451
5451
  var path = "/home/runner/work/neeto-commons-frontend/neeto-commons-frontend/src/utils/createSubscription.js";
5452
- var hash = "c81a0a17cf8ab79204c8442cd2ce29533c0ed54b";
5452
+ var hash = "b3e7b2755cc6d5d5ac6f51395a5e0309cb9ff355";
5453
5453
  var global = new Function("return this")();
5454
5454
  var gcv = "__coverage__";
5455
5455
  var coverageData = {
@@ -5461,7 +5461,7 @@ function cov_19fxzgc93l() {
5461
5461
  column: 24
5462
5462
  },
5463
5463
  end: {
5464
- line: 14,
5464
+ line: 15,
5465
5465
  column: 1
5466
5466
  }
5467
5467
  },
@@ -5481,37 +5481,37 @@ function cov_19fxzgc93l() {
5481
5481
  column: 2
5482
5482
  },
5483
5483
  end: {
5484
- line: 13,
5484
+ line: 14,
5485
5485
  column: 5
5486
5486
  }
5487
5487
  },
5488
5488
  "3": {
5489
5489
  start: {
5490
- line: 16,
5490
+ line: 17,
5491
5491
  column: 34
5492
5492
  },
5493
5493
  end: {
5494
- line: 23,
5494
+ line: 24,
5495
5495
  column: 1
5496
5496
  }
5497
5497
  },
5498
5498
  "4": {
5499
5499
  start: {
5500
- line: 17,
5500
+ line: 18,
5501
5501
  column: 23
5502
5502
  },
5503
5503
  end: {
5504
- line: 20,
5504
+ line: 21,
5505
5505
  column: 3
5506
5506
  }
5507
5507
  },
5508
5508
  "5": {
5509
5509
  start: {
5510
- line: 22,
5510
+ line: 23,
5511
5511
  column: 2
5512
5512
  },
5513
5513
  end: {
5514
- line: 22,
5514
+ line: 23,
5515
5515
  column: 22
5516
5516
  }
5517
5517
  }
@@ -5535,7 +5535,7 @@ function cov_19fxzgc93l() {
5535
5535
  column: 30
5536
5536
  },
5537
5537
  end: {
5538
- line: 14,
5538
+ line: 15,
5539
5539
  column: 1
5540
5540
  }
5541
5541
  },
@@ -5545,25 +5545,25 @@ function cov_19fxzgc93l() {
5545
5545
  name: "(anonymous_1)",
5546
5546
  decl: {
5547
5547
  start: {
5548
- line: 16,
5548
+ line: 17,
5549
5549
  column: 34
5550
5550
  },
5551
5551
  end: {
5552
- line: 16,
5552
+ line: 17,
5553
5553
  column: 35
5554
5554
  }
5555
5555
  },
5556
5556
  loc: {
5557
5557
  start: {
5558
- line: 16,
5559
- column: 61
5558
+ line: 17,
5559
+ column: 62
5560
5560
  },
5561
5561
  end: {
5562
- line: 23,
5562
+ line: 24,
5563
5563
  column: 1
5564
5564
  }
5565
5565
  },
5566
- line: 16
5566
+ line: 17
5567
5567
  }
5568
5568
  },
5569
5569
  branchMap: {},
@@ -5581,7 +5581,7 @@ function cov_19fxzgc93l() {
5581
5581
  },
5582
5582
  b: {},
5583
5583
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
5584
- hash: "c81a0a17cf8ab79204c8442cd2ce29533c0ed54b"
5584
+ hash: "b3e7b2755cc6d5d5ac6f51395a5e0309cb9ff355"
5585
5585
  };
5586
5586
  var coverage = global[gcv] || (global[gcv] = {});
5587
5587
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -5605,15 +5605,14 @@ var getWebsocketURL = function getWebsocketURL() {
5605
5605
  cov_19fxzgc93l().s[2]++;
5606
5606
  return buildUrl(websocketURL, {
5607
5607
  auth_token: (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.authenticationToken,
5608
- email: (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.email
5608
+ email: (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.email,
5609
+ subdomain: globalProps.organization.subdomain
5609
5610
  });
5610
5611
  };
5611
5612
  cov_19fxzgc93l().s[3]++;
5612
- var createSubscription = function createSubscription(channelName, callback) {
5613
+ var createSubscription = function createSubscription(channelName, callbacks) {
5613
5614
  cov_19fxzgc93l().f[1]++;
5614
- var subscription = (cov_19fxzgc93l().s[4]++, createConsumer(getWebsocketURL).subscriptions.create(channelName, {
5615
- received: callback
5616
- }));
5615
+ var subscription = (cov_19fxzgc93l().s[4]++, createConsumer(getWebsocketURL).subscriptions.create(channelName, callbacks));
5617
5616
  cov_19fxzgc93l().s[5]++;
5618
5617
  return subscription;
5619
5618
  };