@nebula.js/stardust 5.11.0 → 5.12.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 +191 -39
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +4 -4
- package/core/esm/index.js.map +1 -1
- package/core/package.json +2 -2
- package/dist/stardust.dev.js +258 -79
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +9 -9
- package/dist/stardust.js.map +1 -1
- package/package.json +12 -12
- package/types/index.d.ts +13 -3
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v5.
|
|
2
|
+
* @nebula.js/stardust v5.12.1
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -16,7 +16,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function getAugmentedNamespace(n) {
|
|
19
|
-
if (n
|
|
19
|
+
if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
|
|
20
20
|
var f = n.default;
|
|
21
21
|
if (typeof f == "function") {
|
|
22
22
|
var a = function a () {
|
|
@@ -2905,11 +2905,13 @@ var object$2 = {
|
|
|
2905
2905
|
title: {
|
|
2906
2906
|
main: {
|
|
2907
2907
|
color: "@B50",
|
|
2908
|
-
fontSize: "15px"
|
|
2908
|
+
fontSize: "15px",
|
|
2909
|
+
backgroundColor: "transparent"
|
|
2909
2910
|
},
|
|
2910
2911
|
subTitle: {
|
|
2911
2912
|
color: "@B50",
|
|
2912
|
-
fontSize: "12px"
|
|
2913
|
+
fontSize: "12px",
|
|
2914
|
+
backgroundColor: "transparent"
|
|
2913
2915
|
},
|
|
2914
2916
|
footer: {
|
|
2915
2917
|
color: "@B50",
|
|
@@ -4849,12 +4851,13 @@ function theme$1(resolvedTheme) {
|
|
|
4849
4851
|
uiPalettes() {
|
|
4850
4852
|
const pals = [];
|
|
4851
4853
|
resolvedTheme.palettes.ui.forEach(s => {
|
|
4854
|
+
const colors = s.colors[0] !== 'none' ? ['none', ...s.colors] : s.colors;
|
|
4852
4855
|
pals.push({
|
|
4853
4856
|
key: 'ui',
|
|
4854
4857
|
name: s.name,
|
|
4855
4858
|
translation: s.translation,
|
|
4856
4859
|
type: 'row',
|
|
4857
|
-
colors
|
|
4860
|
+
colors
|
|
4858
4861
|
});
|
|
4859
4862
|
});
|
|
4860
4863
|
return pals;
|
|
@@ -4870,7 +4873,7 @@ function theme$1(resolvedTheme) {
|
|
|
4870
4873
|
others: resolvedTheme.dataColors.othersColor
|
|
4871
4874
|
};
|
|
4872
4875
|
},
|
|
4873
|
-
uiColor(c
|
|
4876
|
+
uiColor(c) {
|
|
4874
4877
|
const indexIsValid = typeof (c === null || c === void 0 ? void 0 : c.index) === 'number' && !Number.isNaN(c === null || c === void 0 ? void 0 : c.index);
|
|
4875
4878
|
const colorIsValid = typeof (c === null || c === void 0 ? void 0 : c.color) === 'string';
|
|
4876
4879
|
const somethingIsValid = indexIsValid || colorIsValid;
|
|
@@ -4878,8 +4881,6 @@ function theme$1(resolvedTheme) {
|
|
|
4878
4881
|
return undefined;
|
|
4879
4882
|
}
|
|
4880
4883
|
const getColor = () => {
|
|
4881
|
-
// eslint-disable-next-line no-param-reassign
|
|
4882
|
-
shift = !!shift;
|
|
4883
4884
|
if ((c === null || c === void 0 ? void 0 : c.index) < 0 || typeof (c === null || c === void 0 ? void 0 : c.index) === 'undefined') {
|
|
4884
4885
|
return c.color;
|
|
4885
4886
|
}
|
|
@@ -4889,10 +4890,10 @@ function theme$1(resolvedTheme) {
|
|
|
4889
4890
|
if (!uiPalette) {
|
|
4890
4891
|
return c.color;
|
|
4891
4892
|
}
|
|
4892
|
-
if (typeof uiPalette.colors[c.index
|
|
4893
|
+
if (typeof uiPalette.colors[c.index] === 'undefined') {
|
|
4893
4894
|
return c.color;
|
|
4894
4895
|
}
|
|
4895
|
-
return uiPalette.colors[c.index
|
|
4896
|
+
return uiPalette.colors[c.index];
|
|
4896
4897
|
};
|
|
4897
4898
|
const color = getColor();
|
|
4898
4899
|
if (c.alpha === undefined || c.alpha >= 1 || c.alpha < 0) {
|
|
@@ -5319,12 +5320,10 @@ function theme() {
|
|
|
5319
5320
|
* @param {object} c
|
|
5320
5321
|
* @param {number=} c.index
|
|
5321
5322
|
* @param {string=} c.color
|
|
5322
|
-
* @param {boolean=} supportNone Shifts the palette index by one to account for the "none" color
|
|
5323
5323
|
* @returns {string} The resolved color.
|
|
5324
5324
|
*
|
|
5325
5325
|
* @example
|
|
5326
5326
|
* theme.getColorPickerColor({ index: 1 });
|
|
5327
|
-
* theme.getColorPickerColor({ index: 1 }, true);
|
|
5328
5327
|
* theme.getColorPickerColor({ color: 'red' });
|
|
5329
5328
|
*/
|
|
5330
5329
|
getColorPickerColor() {
|
|
@@ -10011,7 +10010,10 @@ function createTheme(options = {}, ...args) {
|
|
|
10011
10010
|
typography: typographyInput = {}
|
|
10012
10011
|
} = options,
|
|
10013
10012
|
other = _objectWithoutPropertiesLoose$1(options, _excluded$8);
|
|
10014
|
-
if (options.vars
|
|
10013
|
+
if (options.vars &&
|
|
10014
|
+
// The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
|
|
10015
|
+
// `generateCssVars` is the closest identifier for checking that the `options` is a result of `extendTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
|
|
10016
|
+
options.generateCssVars === undefined) {
|
|
10015
10017
|
throw new Error(formatMuiErrorMessage$1(18));
|
|
10016
10018
|
}
|
|
10017
10019
|
const palette = createPalette(paletteInput);
|
|
@@ -10374,9 +10376,21 @@ function ThemeProvider(_ref) {
|
|
|
10374
10376
|
} = _ref,
|
|
10375
10377
|
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$7);
|
|
10376
10378
|
const scopedTheme = themeInput[THEME_ID];
|
|
10379
|
+
let finalTheme = scopedTheme || themeInput;
|
|
10380
|
+
if (typeof themeInput !== 'function') {
|
|
10381
|
+
if (scopedTheme && !scopedTheme.vars) {
|
|
10382
|
+
finalTheme = _extends$5({}, scopedTheme, {
|
|
10383
|
+
vars: null
|
|
10384
|
+
});
|
|
10385
|
+
} else if (themeInput && !themeInput.vars) {
|
|
10386
|
+
finalTheme = _extends$5({}, themeInput, {
|
|
10387
|
+
vars: null
|
|
10388
|
+
});
|
|
10389
|
+
}
|
|
10390
|
+
}
|
|
10377
10391
|
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$1, _extends$5({}, props, {
|
|
10378
10392
|
themeId: scopedTheme ? THEME_ID : undefined,
|
|
10379
|
-
theme:
|
|
10393
|
+
theme: finalTheme
|
|
10380
10394
|
}));
|
|
10381
10395
|
}
|
|
10382
10396
|
|
|
@@ -10754,7 +10768,7 @@ function create$3(definition) {
|
|
|
10754
10768
|
return cache[key];
|
|
10755
10769
|
}
|
|
10756
10770
|
|
|
10757
|
-
const NEBULA_VERSION_HASH = "
|
|
10771
|
+
const NEBULA_VERSION_HASH = "b447";
|
|
10758
10772
|
ClassNameGenerator.configure(componentName => {
|
|
10759
10773
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
10760
10774
|
});
|
|
@@ -10813,6 +10827,7 @@ var createKeyStore = (function () {
|
|
|
10813
10827
|
let applyMiddleware = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
|
|
10814
10828
|
const sharedState = initialState;
|
|
10815
10829
|
const hookListeners = [];
|
|
10830
|
+
const subscribedListeners = {};
|
|
10816
10831
|
const store = {
|
|
10817
10832
|
get: key => sharedState[key],
|
|
10818
10833
|
set: (key, value) => {
|
|
@@ -10820,7 +10835,7 @@ var createKeyStore = (function () {
|
|
|
10820
10835
|
throw new Error("Invalid key: ".concat(JSON.stringify(key)));
|
|
10821
10836
|
}
|
|
10822
10837
|
sharedState[key] = value;
|
|
10823
|
-
applyMiddleware({
|
|
10838
|
+
subscribedListeners[key] = applyMiddleware({
|
|
10824
10839
|
type: 'SET',
|
|
10825
10840
|
value
|
|
10826
10841
|
});
|
|
@@ -10834,6 +10849,11 @@ var createKeyStore = (function () {
|
|
|
10834
10849
|
},
|
|
10835
10850
|
dispatch: forceNewState => {
|
|
10836
10851
|
hookListeners.forEach(listener => listener(forceNewState ? {} : sharedState));
|
|
10852
|
+
},
|
|
10853
|
+
destroy: () => {
|
|
10854
|
+
Object.keys(subscribedListeners).forEach(key => {
|
|
10855
|
+
subscribedListeners[key] && subscribedListeners[key]();
|
|
10856
|
+
});
|
|
10837
10857
|
}
|
|
10838
10858
|
};
|
|
10839
10859
|
const useKeyStore = () => {
|
|
@@ -10870,6 +10890,7 @@ function initializeStores$1(appId) {
|
|
|
10870
10890
|
modelChangedStore.dispatch(true); // Force new state to trigger hooks
|
|
10871
10891
|
};
|
|
10872
10892
|
const unsubscribe = () => {
|
|
10893
|
+
model.removeListener('closed', unsubscribe);
|
|
10873
10894
|
model.removeListener('changed', onChanged);
|
|
10874
10895
|
rpcResultStore.clear(model.id);
|
|
10875
10896
|
rpcRequestStore.clear(model.id);
|
|
@@ -10882,9 +10903,7 @@ function initializeStores$1(appId) {
|
|
|
10882
10903
|
case 'SET':
|
|
10883
10904
|
if (!initialized) {
|
|
10884
10905
|
model.on('changed', onChanged);
|
|
10885
|
-
model.once('closed',
|
|
10886
|
-
unsubscribe();
|
|
10887
|
-
});
|
|
10906
|
+
model.once('closed', unsubscribe);
|
|
10888
10907
|
}
|
|
10889
10908
|
break;
|
|
10890
10909
|
}
|
|
@@ -10901,8 +10920,12 @@ function initializeStores$1(appId) {
|
|
|
10901
10920
|
modelStore.clear(model.id);
|
|
10902
10921
|
};
|
|
10903
10922
|
};
|
|
10923
|
+
const destroy = () => {
|
|
10924
|
+
modelStore.destroy();
|
|
10925
|
+
};
|
|
10904
10926
|
return {
|
|
10905
10927
|
subscribe,
|
|
10928
|
+
destroy,
|
|
10906
10929
|
useModelStore,
|
|
10907
10930
|
modelStore,
|
|
10908
10931
|
useModelChangedStore,
|
|
@@ -10986,7 +11009,7 @@ function boot(_ref2) {
|
|
|
10986
11009
|
const appRef = React__default.createRef();
|
|
10987
11010
|
const element = document.createElement('div');
|
|
10988
11011
|
element.style.display = 'none';
|
|
10989
|
-
element.setAttribute('data-nebulajs-version', "5.
|
|
11012
|
+
element.setAttribute('data-nebulajs-version', "5.12.1");
|
|
10990
11013
|
element.setAttribute('data-app-id', app.id);
|
|
10991
11014
|
document.body.appendChild(element);
|
|
10992
11015
|
if (context) {
|
|
@@ -11003,6 +11026,7 @@ function boot(_ref2) {
|
|
|
11003
11026
|
selectionStore: selectionStore
|
|
11004
11027
|
}));
|
|
11005
11028
|
const cells = {};
|
|
11029
|
+
const cellsUnmount = {};
|
|
11006
11030
|
const components = [];
|
|
11007
11031
|
return [{
|
|
11008
11032
|
toggleFocusOfCells(cellIdToFocus) {
|
|
@@ -11011,11 +11035,14 @@ function boot(_ref2) {
|
|
|
11011
11035
|
});
|
|
11012
11036
|
},
|
|
11013
11037
|
cells,
|
|
11014
|
-
addCell(id, cell) {
|
|
11038
|
+
addCell(id, cell, unmount) {
|
|
11015
11039
|
cells[id] = cell;
|
|
11040
|
+
cellsUnmount[id] = unmount;
|
|
11016
11041
|
},
|
|
11017
11042
|
removeCell(id) {
|
|
11018
11043
|
delete cells[id];
|
|
11044
|
+
cellsUnmount[id]();
|
|
11045
|
+
delete cellsUnmount[id];
|
|
11019
11046
|
},
|
|
11020
11047
|
add(component) {
|
|
11021
11048
|
(async () => {
|
|
@@ -11049,6 +11076,12 @@ function boot(_ref2) {
|
|
|
11049
11076
|
}
|
|
11050
11077
|
appRef.current.setContext(ctx);
|
|
11051
11078
|
})();
|
|
11079
|
+
},
|
|
11080
|
+
destroy() {
|
|
11081
|
+
Object.keys(cellsUnmount).forEach(c => {
|
|
11082
|
+
cellsUnmount[c]();
|
|
11083
|
+
});
|
|
11084
|
+
modelStore.destroy();
|
|
11052
11085
|
}
|
|
11053
11086
|
}, modelStore, selectionStore, appRef, rendered];
|
|
11054
11087
|
}
|
|
@@ -18225,10 +18258,9 @@ function resolveProperty(path, attribute, theme, objectType) {
|
|
|
18225
18258
|
return undefined;
|
|
18226
18259
|
}
|
|
18227
18260
|
|
|
18228
|
-
const supportNone = true;
|
|
18229
18261
|
function resolveColor(colorObj, path, attribute, theme, objectType) {
|
|
18230
18262
|
if (colorObj && theme) {
|
|
18231
|
-
return colorObj.color !== 'none' ? theme.getColorPickerColor(colorObj
|
|
18263
|
+
return colorObj.color !== 'none' ? theme.getColorPickerColor(colorObj) : undefined;
|
|
18232
18264
|
}
|
|
18233
18265
|
return resolveProperty(path, attribute, theme, objectType);
|
|
18234
18266
|
}
|
|
@@ -18351,7 +18383,8 @@ function resolveTextStyle(textComp, target, theme, objectType) {
|
|
|
18351
18383
|
return {
|
|
18352
18384
|
fontFamily: textProps.fontFamily || theme.getStyle("object.".concat(objectType), "title.".concat(target), 'fontFamily'),
|
|
18353
18385
|
fontSize: textProps.fontSize || theme.getStyle("object.".concat(objectType), "title.".concat(target), 'fontSize'),
|
|
18354
|
-
color: textProps.color && textProps.color.color !== 'none' ? theme.getColorPickerColor(textProps.color
|
|
18386
|
+
color: textProps.color && textProps.color.color !== 'none' ? theme.getColorPickerColor(textProps.color) : theme.getStyle("object.".concat(objectType), target, 'color'),
|
|
18387
|
+
backgroundColor: textProps.backgroundColor || theme.getStyle("object.".concat(objectType), "title.".concat(target), 'backgroundColor'),
|
|
18355
18388
|
fontWeight: fontStyle.includes('bold') ? 'bold' : 'normal',
|
|
18356
18389
|
fontStyle: fontStyle.includes('italic') ? 'italic' : 'normal',
|
|
18357
18390
|
textDecoration: fontStyle.includes('underline') ? 'underline' : 'initial'
|
|
@@ -18422,7 +18455,7 @@ function getBackgroundColor(_ref2) {
|
|
|
18422
18455
|
bgColor
|
|
18423
18456
|
}, themeApi, 'listBox');
|
|
18424
18457
|
} else {
|
|
18425
|
-
color = themeApi.getColorPickerColor(bgColor === null || bgColor === void 0 ? void 0 : bgColor.color
|
|
18458
|
+
color = themeApi.getColorPickerColor(bgColor === null || bgColor === void 0 ? void 0 : bgColor.color);
|
|
18426
18459
|
}
|
|
18427
18460
|
return color;
|
|
18428
18461
|
}
|
|
@@ -18447,7 +18480,7 @@ function getStyles(_ref3) {
|
|
|
18447
18480
|
} = _ref3;
|
|
18448
18481
|
const overrides = getOverridesAsObject(components);
|
|
18449
18482
|
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
18450
|
-
const getColorPickerColor = c => (c === null || c === void 0 ? void 0 : c.index) > 0 || c !== null && c !== void 0 && c.color ? themeApi.getColorPickerColor(c
|
|
18483
|
+
const getColorPickerColor = c => (c === null || c === void 0 ? void 0 : c.index) > 0 || c !== null && c !== void 0 && c.color ? themeApi.getColorPickerColor(c) : undefined;
|
|
18451
18484
|
const selections = getSelectionColors({
|
|
18452
18485
|
getColorPickerColor,
|
|
18453
18486
|
theme,
|
|
@@ -23153,7 +23186,8 @@ const StyledGrid = styled(Grid)(_ref => {
|
|
|
23153
23186
|
return {
|
|
23154
23187
|
["& .".concat(classes.itemStyle)]: {
|
|
23155
23188
|
minWidth: 0,
|
|
23156
|
-
paddingTop: theme.spacing(1)
|
|
23189
|
+
paddingTop: theme.spacing(1),
|
|
23190
|
+
width: '100%'
|
|
23157
23191
|
}
|
|
23158
23192
|
};
|
|
23159
23193
|
});
|
|
@@ -23407,6 +23441,70 @@ class RenderError extends Error {
|
|
|
23407
23441
|
}
|
|
23408
23442
|
}
|
|
23409
23443
|
|
|
23444
|
+
const NP_PADDINH_IN_CARDS_WITHOUT_TITLE = ['action-button', 'sn-nav-menu'];
|
|
23445
|
+
const NO_PADDING_IN_CARDS = ['pivot-table', 'table', 'sn-table', 'sn-pivot-table', 'kpi', 'map', 'filterpane', 'sn-calendar', 'sn-filter-pane', 'sn-layout-container', 'sn-listbox', 'sn-shape', 'sn-tabbed-container'];
|
|
23446
|
+
const shouldUseCardPadding = _ref => {
|
|
23447
|
+
let {
|
|
23448
|
+
isCardTheme,
|
|
23449
|
+
layout,
|
|
23450
|
+
isError
|
|
23451
|
+
} = _ref;
|
|
23452
|
+
const visualization = layout === null || layout === void 0 ? void 0 : layout.visualization;
|
|
23453
|
+
if (!isCardTheme) {
|
|
23454
|
+
return false;
|
|
23455
|
+
}
|
|
23456
|
+
if (isError) {
|
|
23457
|
+
return true;
|
|
23458
|
+
}
|
|
23459
|
+
if (NO_PADDING_IN_CARDS.indexOf(visualization) !== -1) {
|
|
23460
|
+
return false;
|
|
23461
|
+
}
|
|
23462
|
+
const showTitle = layout === null || layout === void 0 ? void 0 : layout.showTitles;
|
|
23463
|
+
if (!showTitle && NP_PADDINH_IN_CARDS_WITHOUT_TITLE.indexOf(visualization) !== -1) {
|
|
23464
|
+
return false;
|
|
23465
|
+
}
|
|
23466
|
+
return true;
|
|
23467
|
+
};
|
|
23468
|
+
const getPadding = _ref2 => {
|
|
23469
|
+
let {
|
|
23470
|
+
layout,
|
|
23471
|
+
isError,
|
|
23472
|
+
senseTheme,
|
|
23473
|
+
titleStyles
|
|
23474
|
+
} = _ref2;
|
|
23475
|
+
const isCardTheme = senseTheme === null || senseTheme === void 0 ? void 0 : senseTheme.getStyle('', '', '_cards');
|
|
23476
|
+
const cardPadding = shouldUseCardPadding({
|
|
23477
|
+
isCardTheme,
|
|
23478
|
+
layout,
|
|
23479
|
+
isError
|
|
23480
|
+
});
|
|
23481
|
+
if (isCardTheme) {
|
|
23482
|
+
const showTitle = (layout === null || layout === void 0 ? void 0 : layout.showTitles) && !!(layout !== null && layout !== void 0 && layout.title);
|
|
23483
|
+
const showSubtitle = (layout === null || layout === void 0 ? void 0 : layout.showTitles) && !!(layout !== null && layout !== void 0 && layout.subtitle);
|
|
23484
|
+
const showFootnote = (layout === null || layout === void 0 ? void 0 : layout.showTitles) && !!(layout !== null && layout !== void 0 && layout.footnote);
|
|
23485
|
+
if (showTitle && cardPadding) {
|
|
23486
|
+
// eslint-disable-next-line no-param-reassign
|
|
23487
|
+
titleStyles.main.padding = '10px 10px 0';
|
|
23488
|
+
}
|
|
23489
|
+
if (showSubtitle && cardPadding) {
|
|
23490
|
+
// eslint-disable-next-line no-param-reassign
|
|
23491
|
+
titleStyles.subTitle.padding = showTitle ? '0 10px' : '10px 10px 0';
|
|
23492
|
+
}
|
|
23493
|
+
if (showFootnote) {
|
|
23494
|
+
// eslint-disable-next-line no-param-reassign
|
|
23495
|
+
titleStyles.footer.borderTop = '1px solid #d9d9d9';
|
|
23496
|
+
// eslint-disable-next-line no-param-reassign
|
|
23497
|
+
titleStyles.footer.padding = '6px 10px';
|
|
23498
|
+
}
|
|
23499
|
+
let bodyPadding;
|
|
23500
|
+
if (cardPadding) {
|
|
23501
|
+
bodyPadding = "".concat(showTitle || showSubtitle ? '0' : '10px', " 10px ").concat(showFootnote ? '0' : '5px');
|
|
23502
|
+
}
|
|
23503
|
+
return bodyPadding;
|
|
23504
|
+
}
|
|
23505
|
+
return undefined;
|
|
23506
|
+
};
|
|
23507
|
+
|
|
23410
23508
|
/**
|
|
23411
23509
|
* @interface
|
|
23412
23510
|
* @extends HTMLElement
|
|
@@ -23415,6 +23513,15 @@ const CellElement = {
|
|
|
23415
23513
|
/** @type {'njs-cell'} */
|
|
23416
23514
|
className: 'njs-cell'
|
|
23417
23515
|
};
|
|
23516
|
+
|
|
23517
|
+
/**
|
|
23518
|
+
* @interface
|
|
23519
|
+
* @extends HTMLElement
|
|
23520
|
+
*/
|
|
23521
|
+
const CellBody = {
|
|
23522
|
+
/** @type {'njs-cell-body'} */
|
|
23523
|
+
className: 'njs-cell-body'
|
|
23524
|
+
};
|
|
23418
23525
|
const initialState = err => ({
|
|
23419
23526
|
loading: false,
|
|
23420
23527
|
loaded: false,
|
|
@@ -23696,6 +23803,7 @@ const loadType = async _ref5 => {
|
|
|
23696
23803
|
}
|
|
23697
23804
|
};
|
|
23698
23805
|
const Cell = forwardRef((_ref6, ref) => {
|
|
23806
|
+
var _halo$public$galaxy;
|
|
23699
23807
|
let {
|
|
23700
23808
|
halo,
|
|
23701
23809
|
model: inputModel,
|
|
@@ -23945,6 +24053,25 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
23945
24053
|
appLayout: appLayout
|
|
23946
24054
|
});
|
|
23947
24055
|
}
|
|
24056
|
+
const flags = (_halo$public$galaxy = halo.public.galaxy) === null || _halo$public$galaxy === void 0 ? void 0 : _halo$public$galaxy.flags;
|
|
24057
|
+
let useOldCellPadding;
|
|
24058
|
+
let bodyPadding;
|
|
24059
|
+
if (disableCellPadding) {
|
|
24060
|
+
useOldCellPadding = false;
|
|
24061
|
+
bodyPadding = undefined;
|
|
24062
|
+
} else if (!(flags !== null && flags !== void 0 && flags.isEnabled('VNA-13_CELLPADDING_FROM_THEME'))) {
|
|
24063
|
+
useOldCellPadding = true;
|
|
24064
|
+
bodyPadding = undefined;
|
|
24065
|
+
} else {
|
|
24066
|
+
const senseTheme = halo.public.theme;
|
|
24067
|
+
useOldCellPadding = false;
|
|
24068
|
+
bodyPadding = getPadding({
|
|
24069
|
+
layout,
|
|
24070
|
+
isError: state.error,
|
|
24071
|
+
senseTheme,
|
|
24072
|
+
titleStyles
|
|
24073
|
+
});
|
|
24074
|
+
}
|
|
23948
24075
|
return /*#__PURE__*/React__default.createElement(Paper, {
|
|
23949
24076
|
style: {
|
|
23950
24077
|
position: 'relative',
|
|
@@ -23976,7 +24103,7 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
23976
24103
|
position: 'relative',
|
|
23977
24104
|
width: '100%',
|
|
23978
24105
|
height: '100%'
|
|
23979
|
-
},
|
|
24106
|
+
}, useOldCellPadding ? {
|
|
23980
24107
|
padding: theme.spacing(1)
|
|
23981
24108
|
} : {}), state.longRunningQuery ? {
|
|
23982
24109
|
opacity: '0.3'
|
|
@@ -23993,9 +24120,12 @@ const Cell = forwardRef((_ref6, ref) => {
|
|
|
23993
24120
|
onKeyDown: keyboardNavigation ? handleKeyDown : null,
|
|
23994
24121
|
item: true,
|
|
23995
24122
|
xs: true,
|
|
23996
|
-
|
|
24123
|
+
className: CellBody.className,
|
|
24124
|
+
style: _objectSpread2({
|
|
23997
24125
|
height: '100%'
|
|
23998
|
-
},
|
|
24126
|
+
}, bodyPadding ? {
|
|
24127
|
+
padding: bodyPadding
|
|
24128
|
+
} : {}),
|
|
23999
24129
|
ref: contentRef
|
|
24000
24130
|
}, Content), cellNode && layout && state.sn && /*#__PURE__*/React__default.createElement(Footer, {
|
|
24001
24131
|
layout: layout,
|
|
@@ -24045,7 +24175,7 @@ function glue$1(_ref) {
|
|
|
24045
24175
|
model.on('closed', unmount);
|
|
24046
24176
|
root.add(portal);
|
|
24047
24177
|
// Cannot use model.id as it is not unique in a given mashup
|
|
24048
|
-
root.addCell(currentId, cellRef);
|
|
24178
|
+
root.addCell(currentId, cellRef, unmount);
|
|
24049
24179
|
return [unmount, cellRef];
|
|
24050
24180
|
}
|
|
24051
24181
|
|
|
@@ -26228,9 +26358,20 @@ const noop = () => {};
|
|
|
26228
26358
|
* @returns {ExportFormat}
|
|
26229
26359
|
*/
|
|
26230
26360
|
|
|
26361
|
+
/**
|
|
26362
|
+
* @callback onPropertyChange
|
|
26363
|
+
* @param {qix.GenericObjectProperties} properties
|
|
26364
|
+
*/
|
|
26365
|
+
|
|
26366
|
+
/**
|
|
26367
|
+
* @interface QAEProperties
|
|
26368
|
+
* @property {qix.GenericObjectProperties=} initial
|
|
26369
|
+
* @property {onPropertyChange=} onChange
|
|
26370
|
+
*/
|
|
26371
|
+
|
|
26231
26372
|
/**
|
|
26232
26373
|
* @interface QAEDefinition
|
|
26233
|
-
* @property {qix.GenericObjectProperties=} properties
|
|
26374
|
+
* @property {(QAEProperties|qix.GenericObjectProperties)=} properties
|
|
26234
26375
|
* @property {object=} data
|
|
26235
26376
|
* @property {DataTarget[]} data.targets
|
|
26236
26377
|
* @property {importProperties=} importProperties
|
|
@@ -27042,20 +27183,27 @@ const SheetElement = {
|
|
|
27042
27183
|
className: 'njs-sheet'
|
|
27043
27184
|
};
|
|
27044
27185
|
function getCellRenderer(cell, halo, initialSnOptions, initialSnPlugins, initialError, onMount, navigation, onError) {
|
|
27186
|
+
var _halo$public$galaxy;
|
|
27045
27187
|
const {
|
|
27046
27188
|
x,
|
|
27047
27189
|
y,
|
|
27048
27190
|
width,
|
|
27049
27191
|
height
|
|
27050
27192
|
} = cell.bounds;
|
|
27193
|
+
const style = {
|
|
27194
|
+
left: "".concat(x, "%"),
|
|
27195
|
+
top: "".concat(y, "%"),
|
|
27196
|
+
width: "".concat(width, "%"),
|
|
27197
|
+
height: "".concat(height, "%"),
|
|
27198
|
+
position: 'absolute'
|
|
27199
|
+
};
|
|
27200
|
+
const flags = (_halo$public$galaxy = halo.public.galaxy) === null || _halo$public$galaxy === void 0 ? void 0 : _halo$public$galaxy.flags;
|
|
27201
|
+
if (flags !== null && flags !== void 0 && flags.isEnabled('VNA-13_CELLPADDING_FROM_THEME')) {
|
|
27202
|
+
style.boxSizing = 'border-box';
|
|
27203
|
+
style.padding = '4px';
|
|
27204
|
+
}
|
|
27051
27205
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
27052
|
-
style:
|
|
27053
|
-
left: "".concat(x, "%"),
|
|
27054
|
-
top: "".concat(y, "%"),
|
|
27055
|
-
width: "".concat(width, "%"),
|
|
27056
|
-
height: "".concat(height, "%"),
|
|
27057
|
-
position: 'absolute'
|
|
27058
|
-
},
|
|
27206
|
+
style: style,
|
|
27059
27207
|
key: cell.model.id
|
|
27060
27208
|
}, /*#__PURE__*/React__default.createElement(Cell, {
|
|
27061
27209
|
ref: cell.cellRef,
|
|
@@ -29469,6 +29617,10 @@ function nuked() {
|
|
|
29469
29617
|
}
|
|
29470
29618
|
return createSessionObject(cfg, halo, modelStore);
|
|
29471
29619
|
},
|
|
29620
|
+
// TODO - document
|
|
29621
|
+
destroy: async () => {
|
|
29622
|
+
root.destroy();
|
|
29623
|
+
},
|
|
29472
29624
|
/**
|
|
29473
29625
|
* Creates a visualization model
|
|
29474
29626
|
* @param {CreateConfig} cfg The create configuration.
|