bruce-models 3.7.6 → 3.7.8

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.
@@ -183,7 +183,6 @@
183
183
  return null;
184
184
  }
185
185
  id = String(id);
186
- // Prioritize memory over storage because it's faster to access.
187
186
  let record = this.memory.get(id);
188
187
  if (!record) {
189
188
  return {
@@ -337,8 +336,7 @@
337
336
  this.Cache.Set({
338
337
  id: key,
339
338
  data: value,
340
- duration,
341
- persistence: "memory"
339
+ duration
342
340
  });
343
341
  }
344
342
  /**
@@ -601,7 +599,7 @@
601
599
  }
602
600
  }
603
601
  formatApiUri(uri) {
604
- const ws = "wss";
602
+ const ws = !window.document || window.document.location.protocol === "https:" ? "wss" : "ws";
605
603
  return uri.replace(/^(https|http)/, ws) + "websocket";
606
604
  }
607
605
  onOpen(ev) {
@@ -6612,7 +6610,10 @@
6612
6610
  if (cdnUrl) {
6613
6611
  return cdnUrl;
6614
6612
  }
6615
- return `${api.GetBaseUrl()}${urlSuffix}`;
6613
+ let url = `${api.GetBaseUrl()}${urlSuffix}`;
6614
+ // Invalidating cache manually because we have a wave of invalid headers now cached across devices.
6615
+ url = exports.UrlUtils.AddQueryParam(url, "cc", "1");
6616
+ return url;
6616
6617
  }
6617
6618
  ClientFile.GetUrl = GetUrl;
6618
6619
  /**
@@ -6630,7 +6631,10 @@
6630
6631
  if (cdnUrl) {
6631
6632
  return cdnUrl;
6632
6633
  }
6633
- return `${api.GetBaseUrl()}${urlSuffix}`;
6634
+ let url = `${api.GetBaseUrl()}${urlSuffix}`;
6635
+ // Invalidating cache manually because we have a wave of invalid headers now cached across devices.
6636
+ url = exports.UrlUtils.AddQueryParam(url, "cc", "1");
6637
+ return url;
6634
6638
  }
6635
6639
  ClientFile.GetUrlWithExt = GetUrlWithExt;
6636
6640
  /**
@@ -9902,6 +9906,20 @@
9902
9906
  return str;
9903
9907
  }
9904
9908
  UrlUtils.ToHumanReadable = ToHumanReadable;
9909
+ /**
9910
+ * Adds a query parameter to a url.
9911
+ * Eg: AddQueryParam('http://example.com', 'key', 'value') => 'http://example.com?key=value'
9912
+ * @param url
9913
+ * @param key
9914
+ * @param value
9915
+ * @returns
9916
+ */
9917
+ function AddQueryParam(url, key, value) {
9918
+ const urlObj = new URL(url);
9919
+ urlObj.searchParams.append(key, value);
9920
+ return urlObj.toString();
9921
+ }
9922
+ UrlUtils.AddQueryParam = AddQueryParam;
9905
9923
  })(exports.UrlUtils || (exports.UrlUtils = {}));
9906
9924
 
9907
9925
  (function (DataLab) {
@@ -10668,6 +10686,12 @@
10668
10686
  }
10669
10687
  const callDispose = window[disposeId];
10670
10688
  return () => {
10689
+ if (elementId) {
10690
+ const element = window.document.getElementById(elementId);
10691
+ if (element && element.parentElement) {
10692
+ element.parentElement.removeChild(element);
10693
+ }
10694
+ }
10671
10695
  callDispose();
10672
10696
  };
10673
10697
  }
@@ -10861,7 +10885,7 @@
10861
10885
  })(exports.DataSource || (exports.DataSource = {}));
10862
10886
 
10863
10887
  // This is updated with the package.json version on build.
10864
- const VERSION = "3.7.6";
10888
+ const VERSION = "3.7.8";
10865
10889
 
10866
10890
  exports.VERSION = VERSION;
10867
10891
  exports.AbstractApi = AbstractApi;