@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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"module": "esm/index.js",
|
|
3
3
|
"peerDependencies": {
|
|
4
|
-
"@mui/material": "^5.15.
|
|
5
|
-
"@mui/icons-material": "^5.15.
|
|
4
|
+
"@mui/material": "^5.15.18",
|
|
5
|
+
"@mui/icons-material": "^5.15.18",
|
|
6
6
|
"@emotion/react": "^11.11.4",
|
|
7
7
|
"@emotion/styled": "^11.11.5",
|
|
8
8
|
"react": "^17.0.2 || ^18.1.0",
|
package/dist/stardust.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
|
*/
|
|
@@ -723,6 +723,23 @@
|
|
|
723
723
|
}
|
|
724
724
|
})(runtime);
|
|
725
725
|
|
|
726
|
+
function _defineProperty(e, r, t) {
|
|
727
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
728
|
+
value: t,
|
|
729
|
+
enumerable: !0,
|
|
730
|
+
configurable: !0,
|
|
731
|
+
writable: !0
|
|
732
|
+
}) : e[r] = t, e;
|
|
733
|
+
}
|
|
734
|
+
function _extends$8() {
|
|
735
|
+
return _extends$8 = Object.assign ? Object.assign.bind() : function (n) {
|
|
736
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
737
|
+
var t = arguments[e];
|
|
738
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
739
|
+
}
|
|
740
|
+
return n;
|
|
741
|
+
}, _extends$8.apply(null, arguments);
|
|
742
|
+
}
|
|
726
743
|
function ownKeys(e, r) {
|
|
727
744
|
var t = Object.keys(e);
|
|
728
745
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -744,6 +761,26 @@
|
|
|
744
761
|
}
|
|
745
762
|
return e;
|
|
746
763
|
}
|
|
764
|
+
function _objectWithoutProperties(e, t) {
|
|
765
|
+
if (null == e) return {};
|
|
766
|
+
var o,
|
|
767
|
+
r,
|
|
768
|
+
i = _objectWithoutPropertiesLoose$4(e, t);
|
|
769
|
+
if (Object.getOwnPropertySymbols) {
|
|
770
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
771
|
+
for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
772
|
+
}
|
|
773
|
+
return i;
|
|
774
|
+
}
|
|
775
|
+
function _objectWithoutPropertiesLoose$4(r, e) {
|
|
776
|
+
if (null == r) return {};
|
|
777
|
+
var t = {};
|
|
778
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
779
|
+
if (e.indexOf(n) >= 0) continue;
|
|
780
|
+
t[n] = r[n];
|
|
781
|
+
}
|
|
782
|
+
return t;
|
|
783
|
+
}
|
|
747
784
|
function _toPrimitive(t, r) {
|
|
748
785
|
if ("object" != typeof t || !t) return t;
|
|
749
786
|
var e = t[Symbol.toPrimitive];
|
|
@@ -758,60 +795,6 @@
|
|
|
758
795
|
var i = _toPrimitive(t, "string");
|
|
759
796
|
return "symbol" == typeof i ? i : i + "";
|
|
760
797
|
}
|
|
761
|
-
function _defineProperty(obj, key, value) {
|
|
762
|
-
key = _toPropertyKey(key);
|
|
763
|
-
if (key in obj) {
|
|
764
|
-
Object.defineProperty(obj, key, {
|
|
765
|
-
value: value,
|
|
766
|
-
enumerable: true,
|
|
767
|
-
configurable: true,
|
|
768
|
-
writable: true
|
|
769
|
-
});
|
|
770
|
-
} else {
|
|
771
|
-
obj[key] = value;
|
|
772
|
-
}
|
|
773
|
-
return obj;
|
|
774
|
-
}
|
|
775
|
-
function _extends$8() {
|
|
776
|
-
_extends$8 = Object.assign ? Object.assign.bind() : function (target) {
|
|
777
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
778
|
-
var source = arguments[i];
|
|
779
|
-
for (var key in source) {
|
|
780
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
781
|
-
target[key] = source[key];
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
return target;
|
|
786
|
-
};
|
|
787
|
-
return _extends$8.apply(this, arguments);
|
|
788
|
-
}
|
|
789
|
-
function _objectWithoutPropertiesLoose$4(source, excluded) {
|
|
790
|
-
if (source == null) return {};
|
|
791
|
-
var target = {};
|
|
792
|
-
for (var key in source) {
|
|
793
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
794
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
795
|
-
target[key] = source[key];
|
|
796
|
-
}
|
|
797
|
-
}
|
|
798
|
-
return target;
|
|
799
|
-
}
|
|
800
|
-
function _objectWithoutProperties(source, excluded) {
|
|
801
|
-
if (source == null) return {};
|
|
802
|
-
var target = _objectWithoutPropertiesLoose$4(source, excluded);
|
|
803
|
-
var key, i;
|
|
804
|
-
if (Object.getOwnPropertySymbols) {
|
|
805
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
806
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
807
|
-
key = sourceSymbolKeys[i];
|
|
808
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
809
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
810
|
-
target[key] = source[key];
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
return target;
|
|
814
|
-
}
|
|
815
798
|
|
|
816
799
|
var react = {exports: {}};
|
|
817
800
|
|
|
@@ -12695,7 +12678,7 @@
|
|
|
12695
12678
|
return cache[key];
|
|
12696
12679
|
}
|
|
12697
12680
|
|
|
12698
|
-
const NEBULA_VERSION_HASH = "
|
|
12681
|
+
const NEBULA_VERSION_HASH = "2c0f" ;
|
|
12699
12682
|
ClassNameGenerator.configure(componentName => {
|
|
12700
12683
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
12701
12684
|
});
|
|
@@ -12927,7 +12910,7 @@
|
|
|
12927
12910
|
const appRef = React$1.createRef();
|
|
12928
12911
|
const element = document.createElement('div');
|
|
12929
12912
|
element.style.display = 'none';
|
|
12930
|
-
element.setAttribute('data-nebulajs-version', "5.
|
|
12913
|
+
element.setAttribute('data-nebulajs-version', "5.1.1" );
|
|
12931
12914
|
element.setAttribute('data-app-id', app.id);
|
|
12932
12915
|
document.body.appendChild(element);
|
|
12933
12916
|
if (context) {
|
|
@@ -27714,13 +27697,8 @@
|
|
|
27714
27697
|
setStoreValue
|
|
27715
27698
|
} = useDataStore(model);
|
|
27716
27699
|
const isRtl = direction === 'rtl';
|
|
27717
|
-
const cancel = () => selections.
|
|
27700
|
+
const cancel = () => selections.cancel();
|
|
27718
27701
|
const abortSearch = async () => {
|
|
27719
|
-
// When select is disabled we always want to allow abort (but not permitting selections).
|
|
27720
|
-
const preventAbort = selectionState.selectDisabled() ? false : !selections.isModal();
|
|
27721
|
-
if (preventAbort) {
|
|
27722
|
-
return;
|
|
27723
|
-
}
|
|
27724
27702
|
try {
|
|
27725
27703
|
await model.abortListObjectSearch(TREE_PATH);
|
|
27726
27704
|
} finally {
|
|
@@ -27728,9 +27706,10 @@
|
|
|
27728
27706
|
}
|
|
27729
27707
|
};
|
|
27730
27708
|
reactExports.useEffect(() => {
|
|
27731
|
-
if (
|
|
27732
|
-
abortSearch(); // abort when toggling off search
|
|
27709
|
+
if (visible) {
|
|
27710
|
+
return () => abortSearch(); // abort when toggling off search
|
|
27733
27711
|
}
|
|
27712
|
+
return () => {};
|
|
27734
27713
|
}, [visible]);
|
|
27735
27714
|
reactExports.useEffect(() => {
|
|
27736
27715
|
selections.on('deactivated', abortSearch);
|
|
@@ -36462,10 +36441,15 @@
|
|
|
36462
36441
|
}
|
|
36463
36442
|
return false;
|
|
36464
36443
|
}
|
|
36444
|
+
function logHook(message, component) {
|
|
36445
|
+
var _ref;
|
|
36446
|
+
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));
|
|
36447
|
+
}
|
|
36465
36448
|
function initiate(component) {
|
|
36466
36449
|
let {
|
|
36467
36450
|
explicitResize = false
|
|
36468
36451
|
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
36452
|
+
logHook('initiate');
|
|
36469
36453
|
component.__hooks = {
|
|
36470
36454
|
obsolete: false,
|
|
36471
36455
|
error: false,
|
|
@@ -36700,6 +36684,7 @@
|
|
|
36700
36684
|
const v = typeof s === 'function' ? s(h.value[0]) : s;
|
|
36701
36685
|
if (v !== h.value[0]) {
|
|
36702
36686
|
h.value[0] = v;
|
|
36687
|
+
logHook("setState: ".concat(v), h.component);
|
|
36703
36688
|
scheduleMicro(h.component);
|
|
36704
36689
|
}
|
|
36705
36690
|
};
|
|
@@ -36750,10 +36735,13 @@
|
|
|
36750
36735
|
}
|
|
36751
36736
|
const h = getHook(++currentIndex);
|
|
36752
36737
|
if (depsChanged(h.value ? h.value[1] : undefined, deps)) {
|
|
36738
|
+
logHook('useEffect: deps changed');
|
|
36753
36739
|
h.value = [cb, deps];
|
|
36754
36740
|
if (currentComponent.__hooks.pendingEffects.indexOf(h) === -1) {
|
|
36755
36741
|
currentComponent.__hooks.pendingEffects.push(h);
|
|
36756
36742
|
}
|
|
36743
|
+
} else {
|
|
36744
|
+
logHook('useEffect: no change');
|
|
36757
36745
|
}
|
|
36758
36746
|
}
|
|
36759
36747
|
|
|
@@ -36867,6 +36855,7 @@
|
|
|
36867
36855
|
h.teardown && h.teardown();
|
|
36868
36856
|
};
|
|
36869
36857
|
}, deps);
|
|
36858
|
+
logHook("usePromise: ".concat(obj.state));
|
|
36870
36859
|
return [obj.resolved, obj.rejected];
|
|
36871
36860
|
}
|
|
36872
36861
|
|
|
@@ -37979,9 +37968,16 @@
|
|
|
37979
37968
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37980
37969
|
args[_key] = arguments[_key];
|
|
37981
37970
|
}
|
|
37982
|
-
|
|
37983
|
-
|
|
37984
|
-
|
|
37971
|
+
// try/catch here to guard against charts not checking properties correctly
|
|
37972
|
+
try {
|
|
37973
|
+
generator.qae.properties.onChange.call({
|
|
37974
|
+
model: opts.model
|
|
37975
|
+
}, ...args);
|
|
37976
|
+
} catch (_unused) {
|
|
37977
|
+
{
|
|
37978
|
+
console.warn('Error in chart setProperties interceptor onChange call '); // eslint-disable-line no-console
|
|
37979
|
+
}
|
|
37980
|
+
}
|
|
37985
37981
|
return opts.model.__snInterceptor.setProperties.call(this, ...args);
|
|
37986
37982
|
};
|
|
37987
37983
|
opts.model.applyPatches = function applyPatches(qPatches, qSoftPatch) {
|
|
@@ -37995,10 +37991,15 @@
|
|
|
37995
37991
|
path: p.qPath
|
|
37996
37992
|
}));
|
|
37997
37993
|
JSONPatch.apply(currentProperties, patches);
|
|
37998
|
-
|
|
37999
|
-
|
|
38000
|
-
|
|
38001
|
-
|
|
37994
|
+
try {
|
|
37995
|
+
generator.qae.properties.onChange.call({
|
|
37996
|
+
model: opts.model
|
|
37997
|
+
}, currentProperties);
|
|
37998
|
+
} catch (_unused2) {
|
|
37999
|
+
{
|
|
38000
|
+
console.warn('Error in chart applyPatches interceptor onChange call '); // eslint-disable-line no-console
|
|
38001
|
+
}
|
|
38002
|
+
}
|
|
38002
38003
|
// calculate new patches from after change
|
|
38003
38004
|
const newPatches = JSONPatch.generate(original, currentProperties).map(p => ({
|
|
38004
38005
|
qOp: p.op,
|
|
@@ -38009,8 +38010,10 @@
|
|
|
38009
38010
|
});
|
|
38010
38011
|
};
|
|
38011
38012
|
opts.model.__snInterceptor.teardown = () => {
|
|
38012
|
-
|
|
38013
|
-
|
|
38013
|
+
if (opts.model.__snInterceptor) {
|
|
38014
|
+
opts.model.setProperties = opts.model.__snInterceptor.setProperties;
|
|
38015
|
+
delete opts.model.__snInterceptor;
|
|
38016
|
+
}
|
|
38014
38017
|
};
|
|
38015
38018
|
teardowns.push(opts.model.__snInterceptor.teardown);
|
|
38016
38019
|
}
|