@nebula.js/stardust 5.0.2 → 5.1.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.
package/core/esm/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v5.0.2
2
+ * @nebula.js/stardust v5.1.0
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -9084,7 +9084,7 @@ function create$3(definition) {
9084
9084
  return cache[key];
9085
9085
  }
9086
9086
 
9087
- const NEBULA_VERSION_HASH = "656a" ;
9087
+ const NEBULA_VERSION_HASH = "06ed" ;
9088
9088
  ClassNameGenerator.configure(componentName => {
9089
9089
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
9090
9090
  });
@@ -9316,7 +9316,7 @@ function boot(_ref2) {
9316
9316
  const appRef = React__default.createRef();
9317
9317
  const element = document.createElement('div');
9318
9318
  element.style.display = 'none';
9319
- element.setAttribute('data-nebulajs-version', "5.0.2" );
9319
+ element.setAttribute('data-nebulajs-version', "5.1.0" );
9320
9320
  element.setAttribute('data-app-id', app.id);
9321
9321
  document.body.appendChild(element);
9322
9322
  if (context) {
@@ -25817,9 +25817,16 @@ function create$2(generator, opts, galaxy) {
25817
25817
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25818
25818
  args[_key] = arguments[_key];
25819
25819
  }
25820
- generator.qae.properties.onChange.call({
25821
- model: opts.model
25822
- }, ...args);
25820
+ // try/catch here to guard against charts not checking properties correctly
25821
+ try {
25822
+ generator.qae.properties.onChange.call({
25823
+ model: opts.model
25824
+ }, ...args);
25825
+ } catch (_unused) {
25826
+ {
25827
+ console.warn('Error in chart setProperties interceptor onChange call '); // eslint-disable-line no-console
25828
+ }
25829
+ }
25823
25830
  return opts.model.__snInterceptor.setProperties.call(this, ...args);
25824
25831
  };
25825
25832
  opts.model.applyPatches = function applyPatches(qPatches, qSoftPatch) {
@@ -25833,10 +25840,15 @@ function create$2(generator, opts, galaxy) {
25833
25840
  path: p.qPath
25834
25841
  }));
25835
25842
  JSONPatch.apply(currentProperties, patches);
25836
- generator.qae.properties.onChange.call({
25837
- model: opts.model
25838
- }, currentProperties);
25839
-
25843
+ try {
25844
+ generator.qae.properties.onChange.call({
25845
+ model: opts.model
25846
+ }, currentProperties);
25847
+ } catch (_unused2) {
25848
+ {
25849
+ console.warn('Error in chart applyPatches interceptor onChange call '); // eslint-disable-line no-console
25850
+ }
25851
+ }
25840
25852
  // calculate new patches from after change
25841
25853
  const newPatches = JSONPatch.generate(original, currentProperties).map(p => ({
25842
25854
  qOp: p.op,
@@ -25847,8 +25859,10 @@ function create$2(generator, opts, galaxy) {
25847
25859
  });
25848
25860
  };
25849
25861
  opts.model.__snInterceptor.teardown = () => {
25850
- opts.model.setProperties = opts.model.__snInterceptor.setProperties;
25851
- delete opts.model.__snInterceptor;
25862
+ if (opts.model.__snInterceptor) {
25863
+ opts.model.setProperties = opts.model.__snInterceptor.setProperties;
25864
+ delete opts.model.__snInterceptor;
25865
+ }
25852
25866
  };
25853
25867
  teardowns.push(opts.model.__snInterceptor.teardown);
25854
25868
  }