@nebula.js/stardust 5.0.2 → 5.1.1
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 +77 -74
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +3 -3
- package/core/esm/index.js.map +1 -1
- package/core/package.json +2 -2
- package/dist/stardust.dev.js +77 -74
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +13 -13
- package/dist/stardust.js.map +1 -1
- package/package.json +12 -12
- package/types/index.d.ts +10 -10
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v5.
|
|
2
|
+
* @nebula.js/stardust v5.1.1
|
|
3
3
|
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -709,6 +709,23 @@ var runtime = {exports: {}};
|
|
|
709
709
|
}
|
|
710
710
|
})(runtime);
|
|
711
711
|
|
|
712
|
+
function _defineProperty(e, r, t) {
|
|
713
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
714
|
+
value: t,
|
|
715
|
+
enumerable: !0,
|
|
716
|
+
configurable: !0,
|
|
717
|
+
writable: !0
|
|
718
|
+
}) : e[r] = t, e;
|
|
719
|
+
}
|
|
720
|
+
function _extends$6() {
|
|
721
|
+
return _extends$6 = Object.assign ? Object.assign.bind() : function (n) {
|
|
722
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
723
|
+
var t = arguments[e];
|
|
724
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
725
|
+
}
|
|
726
|
+
return n;
|
|
727
|
+
}, _extends$6.apply(null, arguments);
|
|
728
|
+
}
|
|
712
729
|
function ownKeys(e, r) {
|
|
713
730
|
var t = Object.keys(e);
|
|
714
731
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -730,6 +747,26 @@ function _objectSpread2(e) {
|
|
|
730
747
|
}
|
|
731
748
|
return e;
|
|
732
749
|
}
|
|
750
|
+
function _objectWithoutProperties(e, t) {
|
|
751
|
+
if (null == e) return {};
|
|
752
|
+
var o,
|
|
753
|
+
r,
|
|
754
|
+
i = _objectWithoutPropertiesLoose$2(e, t);
|
|
755
|
+
if (Object.getOwnPropertySymbols) {
|
|
756
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
757
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
758
|
+
}
|
|
759
|
+
return i;
|
|
760
|
+
}
|
|
761
|
+
function _objectWithoutPropertiesLoose$2(r, e) {
|
|
762
|
+
if (null == r) return {};
|
|
763
|
+
var t = {};
|
|
764
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
765
|
+
if (e.indexOf(n) >= 0) continue;
|
|
766
|
+
t[n] = r[n];
|
|
767
|
+
}
|
|
768
|
+
return t;
|
|
769
|
+
}
|
|
733
770
|
function _toPrimitive(t, r) {
|
|
734
771
|
if ("object" != typeof t || !t) return t;
|
|
735
772
|
var e = t[Symbol.toPrimitive];
|
|
@@ -744,60 +781,6 @@ function _toPropertyKey(t) {
|
|
|
744
781
|
var i = _toPrimitive(t, "string");
|
|
745
782
|
return "symbol" == typeof i ? i : i + "";
|
|
746
783
|
}
|
|
747
|
-
function _defineProperty(obj, key, value) {
|
|
748
|
-
key = _toPropertyKey(key);
|
|
749
|
-
if (key in obj) {
|
|
750
|
-
Object.defineProperty(obj, key, {
|
|
751
|
-
value: value,
|
|
752
|
-
enumerable: true,
|
|
753
|
-
configurable: true,
|
|
754
|
-
writable: true
|
|
755
|
-
});
|
|
756
|
-
} else {
|
|
757
|
-
obj[key] = value;
|
|
758
|
-
}
|
|
759
|
-
return obj;
|
|
760
|
-
}
|
|
761
|
-
function _extends$6() {
|
|
762
|
-
_extends$6 = Object.assign ? Object.assign.bind() : function (target) {
|
|
763
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
764
|
-
var source = arguments[i];
|
|
765
|
-
for (var key in source) {
|
|
766
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
767
|
-
target[key] = source[key];
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
return target;
|
|
772
|
-
};
|
|
773
|
-
return _extends$6.apply(this, arguments);
|
|
774
|
-
}
|
|
775
|
-
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
776
|
-
if (source == null) return {};
|
|
777
|
-
var target = {};
|
|
778
|
-
for (var key in source) {
|
|
779
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
780
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
781
|
-
target[key] = source[key];
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
return target;
|
|
785
|
-
}
|
|
786
|
-
function _objectWithoutProperties(source, excluded) {
|
|
787
|
-
if (source == null) return {};
|
|
788
|
-
var target = _objectWithoutPropertiesLoose$2(source, excluded);
|
|
789
|
-
var key, i;
|
|
790
|
-
if (Object.getOwnPropertySymbols) {
|
|
791
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
792
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
793
|
-
key = sourceSymbolKeys[i];
|
|
794
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
795
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
796
|
-
target[key] = source[key];
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
return target;
|
|
800
|
-
}
|
|
801
784
|
|
|
802
785
|
const format = function () {
|
|
803
786
|
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -9084,7 +9067,7 @@ function create$3(definition) {
|
|
|
9084
9067
|
return cache[key];
|
|
9085
9068
|
}
|
|
9086
9069
|
|
|
9087
|
-
const NEBULA_VERSION_HASH = "
|
|
9070
|
+
const NEBULA_VERSION_HASH = "2c0f" ;
|
|
9088
9071
|
ClassNameGenerator.configure(componentName => {
|
|
9089
9072
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
9090
9073
|
});
|
|
@@ -9316,7 +9299,7 @@ function boot(_ref2) {
|
|
|
9316
9299
|
const appRef = React__default.createRef();
|
|
9317
9300
|
const element = document.createElement('div');
|
|
9318
9301
|
element.style.display = 'none';
|
|
9319
|
-
element.setAttribute('data-nebulajs-version', "5.
|
|
9302
|
+
element.setAttribute('data-nebulajs-version', "5.1.1" );
|
|
9320
9303
|
element.setAttribute('data-app-id', app.id);
|
|
9321
9304
|
document.body.appendChild(element);
|
|
9322
9305
|
if (context) {
|
|
@@ -15552,13 +15535,8 @@ function ListBoxSearch(_ref2) {
|
|
|
15552
15535
|
setStoreValue
|
|
15553
15536
|
} = useDataStore(model);
|
|
15554
15537
|
const isRtl = direction === 'rtl';
|
|
15555
|
-
const cancel = () => selections.
|
|
15538
|
+
const cancel = () => selections.cancel();
|
|
15556
15539
|
const abortSearch = async () => {
|
|
15557
|
-
// When select is disabled we always want to allow abort (but not permitting selections).
|
|
15558
|
-
const preventAbort = selectionState.selectDisabled() ? false : !selections.isModal();
|
|
15559
|
-
if (preventAbort) {
|
|
15560
|
-
return;
|
|
15561
|
-
}
|
|
15562
15540
|
try {
|
|
15563
15541
|
await model.abortListObjectSearch(TREE_PATH);
|
|
15564
15542
|
} finally {
|
|
@@ -15566,9 +15544,10 @@ function ListBoxSearch(_ref2) {
|
|
|
15566
15544
|
}
|
|
15567
15545
|
};
|
|
15568
15546
|
useEffect$1(() => {
|
|
15569
|
-
if (
|
|
15570
|
-
abortSearch(); // abort when toggling off search
|
|
15547
|
+
if (visible) {
|
|
15548
|
+
return () => abortSearch(); // abort when toggling off search
|
|
15571
15549
|
}
|
|
15550
|
+
return () => {};
|
|
15572
15551
|
}, [visible]);
|
|
15573
15552
|
useEffect$1(() => {
|
|
15574
15553
|
selections.on('deactivated', abortSearch);
|
|
@@ -24300,10 +24279,15 @@ function depsChanged(prevDeps, deps) {
|
|
|
24300
24279
|
}
|
|
24301
24280
|
return false;
|
|
24302
24281
|
}
|
|
24282
|
+
function logHook(message, component) {
|
|
24283
|
+
var _ref;
|
|
24284
|
+
console.log("ID: ".concat((_ref = component || currentComponent) === null || _ref === void 0 || (_ref = _ref.context) === null || _ref === void 0 || (_ref = _ref.model) === null || _ref === void 0 ? void 0 : _ref.id, " index: ").concat(currentIndex, ", ").concat(message));
|
|
24285
|
+
}
|
|
24303
24286
|
function initiate(component) {
|
|
24304
24287
|
let {
|
|
24305
24288
|
explicitResize = false
|
|
24306
24289
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
24290
|
+
logHook('initiate');
|
|
24307
24291
|
component.__hooks = {
|
|
24308
24292
|
obsolete: false,
|
|
24309
24293
|
error: false,
|
|
@@ -24538,6 +24522,7 @@ function useState(initial) {
|
|
|
24538
24522
|
const v = typeof s === 'function' ? s(h.value[0]) : s;
|
|
24539
24523
|
if (v !== h.value[0]) {
|
|
24540
24524
|
h.value[0] = v;
|
|
24525
|
+
logHook("setState: ".concat(v), h.component);
|
|
24541
24526
|
scheduleMicro(h.component);
|
|
24542
24527
|
}
|
|
24543
24528
|
};
|
|
@@ -24588,10 +24573,13 @@ function useEffect(cb, deps) {
|
|
|
24588
24573
|
}
|
|
24589
24574
|
const h = getHook(++currentIndex);
|
|
24590
24575
|
if (depsChanged(h.value ? h.value[1] : undefined, deps)) {
|
|
24576
|
+
logHook('useEffect: deps changed');
|
|
24591
24577
|
h.value = [cb, deps];
|
|
24592
24578
|
if (currentComponent.__hooks.pendingEffects.indexOf(h) === -1) {
|
|
24593
24579
|
currentComponent.__hooks.pendingEffects.push(h);
|
|
24594
24580
|
}
|
|
24581
|
+
} else {
|
|
24582
|
+
logHook('useEffect: no change');
|
|
24595
24583
|
}
|
|
24596
24584
|
}
|
|
24597
24585
|
|
|
@@ -24705,6 +24693,7 @@ function usePromise(p, deps) {
|
|
|
24705
24693
|
h.teardown && h.teardown();
|
|
24706
24694
|
};
|
|
24707
24695
|
}, deps);
|
|
24696
|
+
logHook("usePromise: ".concat(obj.state));
|
|
24708
24697
|
return [obj.resolved, obj.rejected];
|
|
24709
24698
|
}
|
|
24710
24699
|
|
|
@@ -25817,9 +25806,16 @@ function create$2(generator, opts, galaxy) {
|
|
|
25817
25806
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25818
25807
|
args[_key] = arguments[_key];
|
|
25819
25808
|
}
|
|
25820
|
-
|
|
25821
|
-
|
|
25822
|
-
|
|
25809
|
+
// try/catch here to guard against charts not checking properties correctly
|
|
25810
|
+
try {
|
|
25811
|
+
generator.qae.properties.onChange.call({
|
|
25812
|
+
model: opts.model
|
|
25813
|
+
}, ...args);
|
|
25814
|
+
} catch (_unused) {
|
|
25815
|
+
{
|
|
25816
|
+
console.warn('Error in chart setProperties interceptor onChange call '); // eslint-disable-line no-console
|
|
25817
|
+
}
|
|
25818
|
+
}
|
|
25823
25819
|
return opts.model.__snInterceptor.setProperties.call(this, ...args);
|
|
25824
25820
|
};
|
|
25825
25821
|
opts.model.applyPatches = function applyPatches(qPatches, qSoftPatch) {
|
|
@@ -25833,10 +25829,15 @@ function create$2(generator, opts, galaxy) {
|
|
|
25833
25829
|
path: p.qPath
|
|
25834
25830
|
}));
|
|
25835
25831
|
JSONPatch.apply(currentProperties, patches);
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
|
|
25839
|
-
|
|
25832
|
+
try {
|
|
25833
|
+
generator.qae.properties.onChange.call({
|
|
25834
|
+
model: opts.model
|
|
25835
|
+
}, currentProperties);
|
|
25836
|
+
} catch (_unused2) {
|
|
25837
|
+
{
|
|
25838
|
+
console.warn('Error in chart applyPatches interceptor onChange call '); // eslint-disable-line no-console
|
|
25839
|
+
}
|
|
25840
|
+
}
|
|
25840
25841
|
// calculate new patches from after change
|
|
25841
25842
|
const newPatches = JSONPatch.generate(original, currentProperties).map(p => ({
|
|
25842
25843
|
qOp: p.op,
|
|
@@ -25847,8 +25848,10 @@ function create$2(generator, opts, galaxy) {
|
|
|
25847
25848
|
});
|
|
25848
25849
|
};
|
|
25849
25850
|
opts.model.__snInterceptor.teardown = () => {
|
|
25850
|
-
|
|
25851
|
-
|
|
25851
|
+
if (opts.model.__snInterceptor) {
|
|
25852
|
+
opts.model.setProperties = opts.model.__snInterceptor.setProperties;
|
|
25853
|
+
delete opts.model.__snInterceptor;
|
|
25854
|
+
}
|
|
25852
25855
|
};
|
|
25853
25856
|
teardowns.push(opts.model.__snInterceptor.teardown);
|
|
25854
25857
|
}
|