@nebula.js/stardust 5.0.0-alpha4 → 5.0.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 +445 -230
- 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 +3 -3
- package/dist/stardust.dev.js +720 -498
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +13 -13
- package/dist/stardust.js.map +1 -1
- package/package.json +15 -17
- package/types/index.d.ts +26 -26
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v5.0.0
|
|
2
|
+
* @nebula.js/stardust v5.0.0
|
|
3
3
|
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -952,6 +952,26 @@ var CurrentSelections_Of = {
|
|
|
952
952
|
"zh-TW": "{0}/ {1}"
|
|
953
953
|
}
|
|
954
954
|
};
|
|
955
|
+
var Listbox_Cyclic = {
|
|
956
|
+
id: "Listbox.Cyclic",
|
|
957
|
+
locale: {
|
|
958
|
+
"de-DE": "Zyklische Dimension",
|
|
959
|
+
"en-US": "Cyclic dimension",
|
|
960
|
+
"es-ES": "Dimensión cíclica",
|
|
961
|
+
"fr-FR": "Dimension cyclique",
|
|
962
|
+
"it-IT": "Dimensione ciclica",
|
|
963
|
+
"ja-JP": "サイクリック軸",
|
|
964
|
+
"ko-KR": "순환 차원",
|
|
965
|
+
"nl-NL": "Cyclische dimensie",
|
|
966
|
+
"pl-PL": "Wymiar cykliczny",
|
|
967
|
+
"pt-BR": "Dimensão cíclica",
|
|
968
|
+
"ru-RU": "Циклическое измерение",
|
|
969
|
+
"sv-SE": "Cyklisk dimension",
|
|
970
|
+
"tr-TR": "Döngüsel boyut",
|
|
971
|
+
"zh-CN": "循环维度",
|
|
972
|
+
"zh-TW": "循環維度"
|
|
973
|
+
}
|
|
974
|
+
};
|
|
955
975
|
var Listbox_Dismiss = {
|
|
956
976
|
id: "Listbox.Dismiss",
|
|
957
977
|
locale: {
|
|
@@ -1956,6 +1976,7 @@ var all = {
|
|
|
1956
1976
|
Cancel: Cancel$1,
|
|
1957
1977
|
CurrentSelections_All: CurrentSelections_All,
|
|
1958
1978
|
CurrentSelections_Of: CurrentSelections_Of,
|
|
1979
|
+
Listbox_Cyclic: Listbox_Cyclic,
|
|
1959
1980
|
Listbox_Dismiss: Listbox_Dismiss,
|
|
1960
1981
|
Listbox_DrillDown: Listbox_DrillDown,
|
|
1961
1982
|
Listbox_ItemsOverflow: Listbox_ItemsOverflow,
|
|
@@ -3251,9 +3272,15 @@ function theme$1(resolvedTheme) {
|
|
|
3251
3272
|
};
|
|
3252
3273
|
},
|
|
3253
3274
|
uiColor(c, shift) {
|
|
3275
|
+
const indexIsValid = typeof (c === null || c === void 0 ? void 0 : c.index) === 'number' && !Number.isNaN(c === null || c === void 0 ? void 0 : c.index);
|
|
3276
|
+
const colorIsValid = typeof (c === null || c === void 0 ? void 0 : c.color) === 'string';
|
|
3277
|
+
const somethingIsValid = indexIsValid || colorIsValid;
|
|
3278
|
+
if (!somethingIsValid) {
|
|
3279
|
+
return undefined;
|
|
3280
|
+
}
|
|
3254
3281
|
// eslint-disable-next-line no-param-reassign
|
|
3255
3282
|
shift = !!shift;
|
|
3256
|
-
if (c.index < 0 || typeof c.index === 'undefined') {
|
|
3283
|
+
if ((c === null || c === void 0 ? void 0 : c.index) < 0 || typeof (c === null || c === void 0 ? void 0 : c.index) === 'undefined') {
|
|
3257
3284
|
return c.color;
|
|
3258
3285
|
}
|
|
3259
3286
|
if (typeof uiPalette === 'undefined') {
|
|
@@ -5356,7 +5383,7 @@ var deepmerge = /*#__PURE__*/Object.freeze({
|
|
|
5356
5383
|
isPlainObject: isPlainObject
|
|
5357
5384
|
});
|
|
5358
5385
|
|
|
5359
|
-
const _excluded$
|
|
5386
|
+
const _excluded$h = ["values", "unit", "step"];
|
|
5360
5387
|
const sortBreakpointsValues = values => {
|
|
5361
5388
|
const breakpointsAsArray = Object.keys(values).map(key => ({
|
|
5362
5389
|
key,
|
|
@@ -5390,7 +5417,7 @@ function createBreakpoints(breakpoints) {
|
|
|
5390
5417
|
unit = 'px',
|
|
5391
5418
|
step = 5
|
|
5392
5419
|
} = breakpoints,
|
|
5393
|
-
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$
|
|
5420
|
+
other = _objectWithoutPropertiesLoose(breakpoints, _excluded$h);
|
|
5394
5421
|
const sortedValues = sortBreakpointsValues(values);
|
|
5395
5422
|
const keys = Object.keys(sortedValues);
|
|
5396
5423
|
function up(key) {
|
|
@@ -6455,7 +6482,7 @@ function applyStyles(key, styles) {
|
|
|
6455
6482
|
return {};
|
|
6456
6483
|
}
|
|
6457
6484
|
|
|
6458
|
-
const _excluded$
|
|
6485
|
+
const _excluded$g = ["breakpoints", "palette", "spacing", "shape"];
|
|
6459
6486
|
function createTheme$2(options = {}, ...args) {
|
|
6460
6487
|
const {
|
|
6461
6488
|
breakpoints: breakpointsInput = {},
|
|
@@ -6463,7 +6490,7 @@ function createTheme$2(options = {}, ...args) {
|
|
|
6463
6490
|
spacing: spacingInput,
|
|
6464
6491
|
shape: shapeInput = {}
|
|
6465
6492
|
} = options,
|
|
6466
|
-
other = _objectWithoutPropertiesLoose(options, _excluded$
|
|
6493
|
+
other = _objectWithoutPropertiesLoose(options, _excluded$g);
|
|
6467
6494
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
6468
6495
|
const spacing = createSpacing(spacingInput);
|
|
6469
6496
|
let muiTheme = deepmerge$1({
|
|
@@ -6509,7 +6536,7 @@ function useTheme$3(defaultTheme = systemDefaultTheme$1) {
|
|
|
6509
6536
|
return useTheme$4(defaultTheme);
|
|
6510
6537
|
}
|
|
6511
6538
|
|
|
6512
|
-
const _excluded$
|
|
6539
|
+
const _excluded$f = ["sx"];
|
|
6513
6540
|
const splitProps = props => {
|
|
6514
6541
|
var _props$theme$unstable, _props$theme;
|
|
6515
6542
|
const result = {
|
|
@@ -6530,7 +6557,7 @@ function extendSxProp(props) {
|
|
|
6530
6557
|
const {
|
|
6531
6558
|
sx: inSx
|
|
6532
6559
|
} = props,
|
|
6533
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$
|
|
6560
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$f);
|
|
6534
6561
|
const {
|
|
6535
6562
|
systemProps,
|
|
6536
6563
|
otherProps
|
|
@@ -6965,11 +6992,11 @@ function useForkRef(...refs) {
|
|
|
6965
6992
|
|
|
6966
6993
|
class Timeout {
|
|
6967
6994
|
constructor() {
|
|
6968
|
-
this.currentId =
|
|
6995
|
+
this.currentId = null;
|
|
6969
6996
|
this.clear = () => {
|
|
6970
|
-
if (this.currentId !==
|
|
6997
|
+
if (this.currentId !== null) {
|
|
6971
6998
|
clearTimeout(this.currentId);
|
|
6972
|
-
this.currentId =
|
|
6999
|
+
this.currentId = null;
|
|
6973
7000
|
}
|
|
6974
7001
|
};
|
|
6975
7002
|
this.disposeEffect = () => {
|
|
@@ -6985,7 +7012,7 @@ class Timeout {
|
|
|
6985
7012
|
start(delay, fn) {
|
|
6986
7013
|
this.clear();
|
|
6987
7014
|
this.currentId = setTimeout(() => {
|
|
6988
|
-
this.currentId =
|
|
7015
|
+
this.currentId = null;
|
|
6989
7016
|
fn();
|
|
6990
7017
|
}, delay);
|
|
6991
7018
|
}
|
|
@@ -7208,6 +7235,18 @@ function ThemeProvider$2(props) {
|
|
|
7208
7235
|
});
|
|
7209
7236
|
}
|
|
7210
7237
|
|
|
7238
|
+
const _excluded$e = ["value"];
|
|
7239
|
+
const RtlContext = /*#__PURE__*/React.createContext();
|
|
7240
|
+
function RtlProvider(_ref) {
|
|
7241
|
+
let {
|
|
7242
|
+
value
|
|
7243
|
+
} = _ref,
|
|
7244
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
7245
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(RtlContext.Provider, _extends$4({
|
|
7246
|
+
value: value != null ? value : true
|
|
7247
|
+
}, props));
|
|
7248
|
+
}
|
|
7249
|
+
|
|
7211
7250
|
const EMPTY_THEME = {};
|
|
7212
7251
|
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
|
|
7213
7252
|
return React.useMemo(() => {
|
|
@@ -7247,11 +7286,15 @@ function ThemeProvider$1(props) {
|
|
|
7247
7286
|
const upperPrivateTheme = useTheme$2() || EMPTY_THEME;
|
|
7248
7287
|
const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
|
|
7249
7288
|
const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
|
|
7289
|
+
const rtlValue = engineTheme.direction === 'rtl';
|
|
7250
7290
|
return /*#__PURE__*/jsxRuntimeExports.jsx(ThemeProvider$2, {
|
|
7251
7291
|
theme: privateTheme,
|
|
7252
7292
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(ThemeContext$2.Provider, {
|
|
7253
7293
|
value: engineTheme,
|
|
7254
|
-
children:
|
|
7294
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(RtlProvider, {
|
|
7295
|
+
value: rtlValue,
|
|
7296
|
+
children: children
|
|
7297
|
+
})
|
|
7255
7298
|
})
|
|
7256
7299
|
});
|
|
7257
7300
|
}
|
|
@@ -8711,7 +8754,7 @@ function _assertThisInitialized(self) {
|
|
|
8711
8754
|
return self;
|
|
8712
8755
|
}
|
|
8713
8756
|
|
|
8714
|
-
const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
|
|
8757
|
+
const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
|
|
8715
8758
|
var buttonClasses$1 = buttonClasses;
|
|
8716
8759
|
|
|
8717
8760
|
var base = {
|
|
@@ -9051,7 +9094,7 @@ function create$3(definition) {
|
|
|
9051
9094
|
return cache[key];
|
|
9052
9095
|
}
|
|
9053
9096
|
|
|
9054
|
-
const NEBULA_VERSION_HASH = "
|
|
9097
|
+
const NEBULA_VERSION_HASH = "e6be" ;
|
|
9055
9098
|
ClassNameGenerator.configure(componentName => {
|
|
9056
9099
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
9057
9100
|
});
|
|
@@ -9283,7 +9326,7 @@ function boot(_ref2) {
|
|
|
9283
9326
|
const appRef = React__default.createRef();
|
|
9284
9327
|
const element = document.createElement('div');
|
|
9285
9328
|
element.style.display = 'none';
|
|
9286
|
-
element.setAttribute('data-nebulajs-version', "5.0.0
|
|
9329
|
+
element.setAttribute('data-nebulajs-version', "5.0.0" );
|
|
9287
9330
|
element.setAttribute('data-app-id', app.id);
|
|
9288
9331
|
document.body.appendChild(element);
|
|
9289
9332
|
if (context) {
|
|
@@ -10427,31 +10470,52 @@ const excludedOrAlternative = _ref => {
|
|
|
10427
10470
|
} = _ref;
|
|
10428
10471
|
return (isAlternative(cell) || isExcluded(cell)) && checkboxes;
|
|
10429
10472
|
};
|
|
10430
|
-
|
|
10473
|
+
function getSelectionStateClass(_ref2) {
|
|
10474
|
+
let {
|
|
10475
|
+
cell,
|
|
10476
|
+
showGray
|
|
10477
|
+
} = _ref2;
|
|
10478
|
+
let selectionStateClass;
|
|
10479
|
+
switch (cell.qState) {
|
|
10480
|
+
case 'XS':
|
|
10481
|
+
selectionStateClass = showGray ? rowColClasses.XS : rowColClasses.S;
|
|
10482
|
+
break;
|
|
10483
|
+
case 'S':
|
|
10484
|
+
case 'L':
|
|
10485
|
+
selectionStateClass = rowColClasses.S;
|
|
10486
|
+
break;
|
|
10487
|
+
case 'A':
|
|
10488
|
+
selectionStateClass = showGray ? rowColClasses.A : false;
|
|
10489
|
+
break;
|
|
10490
|
+
case 'X':
|
|
10491
|
+
case 'XL':
|
|
10492
|
+
selectionStateClass = showGray ? rowColClasses.X : false;
|
|
10493
|
+
break;
|
|
10494
|
+
default:
|
|
10495
|
+
selectionStateClass = false;
|
|
10496
|
+
}
|
|
10497
|
+
return selectionStateClass;
|
|
10498
|
+
}
|
|
10499
|
+
const getValueStateClasses = _ref3 => {
|
|
10431
10500
|
let {
|
|
10432
10501
|
column,
|
|
10433
10502
|
histogram,
|
|
10434
|
-
checkboxes,
|
|
10435
10503
|
cell,
|
|
10436
10504
|
showGray
|
|
10437
|
-
} =
|
|
10505
|
+
} = _ref3;
|
|
10506
|
+
if (!cell) {
|
|
10507
|
+
return [];
|
|
10508
|
+
}
|
|
10438
10509
|
const clazzArr = [column ? rowColClasses.column : rowColClasses.row];
|
|
10439
10510
|
if (!histogram) {
|
|
10440
10511
|
clazzArr.push(rowColClasses.rowBorderBottom);
|
|
10441
10512
|
}
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
} else if (cell.qState === 'S' || cell.qState === 'L') {
|
|
10449
|
-
clazzArr.push(rowColClasses.S);
|
|
10450
|
-
} else if (showGray && isAlternative(cell)) {
|
|
10451
|
-
clazzArr.push(rowColClasses.A);
|
|
10452
|
-
} else if (showGray && isExcluded(cell)) {
|
|
10453
|
-
clazzArr.push(rowColClasses.X);
|
|
10454
|
-
}
|
|
10513
|
+
const selectionStateClass = getSelectionStateClass({
|
|
10514
|
+
cell,
|
|
10515
|
+
showGray
|
|
10516
|
+
});
|
|
10517
|
+
if (selectionStateClass) {
|
|
10518
|
+
clazzArr.push(selectionStateClass);
|
|
10455
10519
|
}
|
|
10456
10520
|
return clazzArr;
|
|
10457
10521
|
};
|
|
@@ -10518,15 +10582,27 @@ const getMaxFreqWidth = _ref2 => {
|
|
|
10518
10582
|
}
|
|
10519
10583
|
return sizes.freqMaxWidth;
|
|
10520
10584
|
};
|
|
10521
|
-
const
|
|
10585
|
+
const getRowSelectionStyle = _ref3 => {
|
|
10522
10586
|
let {
|
|
10523
10587
|
theme,
|
|
10588
|
+
checkboxes,
|
|
10524
10589
|
styles,
|
|
10525
|
-
|
|
10590
|
+
selectionState
|
|
10526
10591
|
} = _ref3;
|
|
10592
|
+
if (checkboxes) {
|
|
10593
|
+
if (selectionState === 'selected') {
|
|
10594
|
+
return {
|
|
10595
|
+
["& .".concat(rowColClasses.labelText)]: {
|
|
10596
|
+
// Override labels (value and frequency count) color when selected.
|
|
10597
|
+
color: styles.selections.selected
|
|
10598
|
+
}
|
|
10599
|
+
};
|
|
10600
|
+
}
|
|
10601
|
+
return {};
|
|
10602
|
+
}
|
|
10527
10603
|
const selectionStyles = styles.selections;
|
|
10528
|
-
const backgroundColor = selectionStyles[
|
|
10529
|
-
const contrastTextColor = selectionStyles["".concat(
|
|
10604
|
+
const backgroundColor = selectionStyles[selectionState];
|
|
10605
|
+
const contrastTextColor = selectionStyles["".concat(selectionState, "Contrast")];
|
|
10530
10606
|
return {
|
|
10531
10607
|
background: backgroundColor,
|
|
10532
10608
|
color: contrastTextColor,
|
|
@@ -10572,16 +10648,29 @@ const RowColRoot = styled('div', {
|
|
|
10572
10648
|
} = _ref4;
|
|
10573
10649
|
const _styles$content = styles.content,
|
|
10574
10650
|
contentFontStyles = _objectWithoutProperties(_styles$content, _excluded$6);
|
|
10575
|
-
const
|
|
10651
|
+
const rowSelectionStyle = getRowSelectionStyle({
|
|
10576
10652
|
theme,
|
|
10577
10653
|
styles,
|
|
10578
|
-
|
|
10654
|
+
checkboxes,
|
|
10655
|
+
selectionState: 'selected'
|
|
10579
10656
|
});
|
|
10580
|
-
const
|
|
10657
|
+
const rowExcludedStyle = getRowSelectionStyle({
|
|
10581
10658
|
theme,
|
|
10582
10659
|
styles,
|
|
10583
|
-
|
|
10660
|
+
checkboxes,
|
|
10661
|
+
selectionState: 'excluded'
|
|
10584
10662
|
});
|
|
10663
|
+
const barDefaultFilledStyle = {
|
|
10664
|
+
height: '100%',
|
|
10665
|
+
transition: 'width 0.2s',
|
|
10666
|
+
border: "".concat(barBorderWidthPx, "px solid"),
|
|
10667
|
+
borderColor: '#D9D9D9',
|
|
10668
|
+
// overridden by selected color (classes.S),
|
|
10669
|
+
backgroundColor: '#FAFAFA'
|
|
10670
|
+
};
|
|
10671
|
+
const barSelectedFilledStyle = {
|
|
10672
|
+
opacity: '30%'
|
|
10673
|
+
};
|
|
10585
10674
|
return {
|
|
10586
10675
|
'&:focus': {
|
|
10587
10676
|
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
|
|
@@ -10663,26 +10752,33 @@ const RowColRoot = styled('div', {
|
|
|
10663
10752
|
color: contentFontStyles.color
|
|
10664
10753
|
},
|
|
10665
10754
|
// Selection styles (S=Selected, XS=ExcludedSelected, A=Alternative, X=Excluded).
|
|
10666
|
-
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({},
|
|
10755
|
+
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, rowSelectionStyle), {}, {
|
|
10667
10756
|
border: isGridMode ? 'none' : undefined
|
|
10668
10757
|
}),
|
|
10669
|
-
["& .".concat(rowColClasses.XS)]: _objectSpread2(_objectSpread2({},
|
|
10758
|
+
["& .".concat(rowColClasses.XS)]: _objectSpread2(_objectSpread2({}, getRowSelectionStyle({
|
|
10670
10759
|
theme,
|
|
10671
10760
|
styles,
|
|
10672
|
-
|
|
10761
|
+
checkboxes,
|
|
10762
|
+
selectionState: 'selectedExcluded'
|
|
10673
10763
|
})), {}, {
|
|
10674
10764
|
border: isGridMode ? 'none' : undefined
|
|
10675
10765
|
}),
|
|
10676
|
-
["& .".concat(rowColClasses.A)]: _objectSpread2(_objectSpread2({},
|
|
10766
|
+
["& .".concat(rowColClasses.A)]: _objectSpread2(_objectSpread2({}, getRowSelectionStyle({
|
|
10677
10767
|
theme,
|
|
10678
10768
|
styles,
|
|
10679
|
-
|
|
10769
|
+
checkboxes,
|
|
10770
|
+
selectionState: 'alternative'
|
|
10680
10771
|
})), {}, {
|
|
10681
10772
|
border: isGridMode ? 'none' : undefined
|
|
10682
10773
|
}),
|
|
10683
|
-
["& .".concat(rowColClasses.X)]: _objectSpread2(_objectSpread2({},
|
|
10774
|
+
["& .".concat(rowColClasses.X)]: _objectSpread2(_objectSpread2({}, rowExcludedStyle), {}, {
|
|
10684
10775
|
border: isGridMode ? 'none' : undefined
|
|
10685
10776
|
}),
|
|
10777
|
+
["& .".concat(rowColClasses.X, ", & .").concat(rowColClasses.XS)]: {
|
|
10778
|
+
// Override the selected color for bar-filled, when the value is selected and excluded.
|
|
10779
|
+
border: isGridMode ? 'none' : undefined,
|
|
10780
|
+
["& .".concat(rowColClasses.barSelected, " .bar-filled")]: _objectSpread2({}, barDefaultFilledStyle)
|
|
10781
|
+
},
|
|
10686
10782
|
["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
|
|
10687
10783
|
zIndex: 3,
|
|
10688
10784
|
justifyContent: 'flex-end'
|
|
@@ -10718,33 +10814,23 @@ const RowColRoot = styled('div', {
|
|
|
10718
10814
|
width: "calc(100% - ".concat(barPadPx * 2, "px)"),
|
|
10719
10815
|
display: 'flex',
|
|
10720
10816
|
alignItems: 'center',
|
|
10721
|
-
'& .bar-filled': {
|
|
10722
|
-
border: "".concat(barBorderWidthPx, "px solid"),
|
|
10723
|
-
borderColor: '#D9D9D9',
|
|
10724
|
-
transition: 'width 0.2s',
|
|
10725
|
-
backgroundColor: '#FAFAFA',
|
|
10726
|
-
height: '100%'
|
|
10727
|
-
}
|
|
10817
|
+
'& .bar-filled': _objectSpread2({}, barDefaultFilledStyle)
|
|
10728
10818
|
},
|
|
10729
10819
|
["& .".concat(rowColClasses.barSelected)]: {
|
|
10730
|
-
'& .bar-filled': {
|
|
10731
|
-
opacity: '30%',
|
|
10732
|
-
background: theme.palette.background.lighter
|
|
10733
|
-
}
|
|
10820
|
+
'& .bar-filled': _objectSpread2({}, barSelectedFilledStyle)
|
|
10734
10821
|
},
|
|
10735
10822
|
["& .".concat(rowColClasses.barWithCheckbox)]: {
|
|
10736
10823
|
left: direction === 'rtl' ? barPadPx : barWithCheckboxLeftPadPx,
|
|
10737
10824
|
width: "calc(100% - ".concat(barWithCheckboxLeftPadPx + barPadPx, "px)")
|
|
10738
10825
|
},
|
|
10739
10826
|
["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
|
|
10740
|
-
'& .bar-filled': {
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
}
|
|
10827
|
+
'& .bar-filled': _objectSpread2(_objectSpread2({}, barSelectedFilledStyle), {}, {
|
|
10828
|
+
backgroundColor: styles.selections.selected || '#BFE5D0',
|
|
10829
|
+
borderColor: styles.selections.selected
|
|
10830
|
+
})
|
|
10745
10831
|
},
|
|
10746
10832
|
["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
|
|
10747
|
-
color:
|
|
10833
|
+
color: styles.content.color,
|
|
10748
10834
|
fontStyle: 'italic'
|
|
10749
10835
|
}
|
|
10750
10836
|
};
|
|
@@ -11219,94 +11305,6 @@ function getCellFromPages(_ref) {
|
|
|
11219
11305
|
return c;
|
|
11220
11306
|
}
|
|
11221
11307
|
|
|
11222
|
-
/* eslint-disable import/prefer-default-export */
|
|
11223
|
-
const LOC_STATES = {
|
|
11224
|
-
S: 'Object.Listbox.Selected',
|
|
11225
|
-
A: 'Object.Listbox.Alternative',
|
|
11226
|
-
O: 'Object.Listbox.Optional',
|
|
11227
|
-
XS: 'Object.Listbox.SelectedExcluded',
|
|
11228
|
-
L: 'Object.Listbox.Locked',
|
|
11229
|
-
X: 'Object.Listbox.Excluded',
|
|
11230
|
-
XL: 'Object.Listbox.ExcludedLock'
|
|
11231
|
-
};
|
|
11232
|
-
function getValueLabel(_ref) {
|
|
11233
|
-
let {
|
|
11234
|
-
translator: translatorDynamic,
|
|
11235
|
-
label,
|
|
11236
|
-
qState,
|
|
11237
|
-
isSelected,
|
|
11238
|
-
currentIndex,
|
|
11239
|
-
maxIndex,
|
|
11240
|
-
showSearch
|
|
11241
|
-
} = _ref;
|
|
11242
|
-
const stateTranslation = LOC_STATES[qState];
|
|
11243
|
-
const state = translatorDynamic.get(stateTranslation);
|
|
11244
|
-
const srStringArr = [];
|
|
11245
|
-
if (isSelected) {
|
|
11246
|
-
const navTranslation = showSearch ? 'Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu' : 'Listbox.ScreenReader.SelectionMenu.WithAccSelMenu';
|
|
11247
|
-
const nav = translatorDynamic.get(navTranslation);
|
|
11248
|
-
srStringArr.push(nav);
|
|
11249
|
-
}
|
|
11250
|
-
const valueString = "".concat(label, " ").concat(state);
|
|
11251
|
-
const indexString = translatorDynamic.get('CurrentSelections.Of', [currentIndex + 1, maxIndex + 1]); // E.g. 3 of 20
|
|
11252
|
-
srStringArr.unshift(valueString, indexString);
|
|
11253
|
-
const srString = srStringArr.join('. ').trim();
|
|
11254
|
-
return srString;
|
|
11255
|
-
}
|
|
11256
|
-
|
|
11257
|
-
/**
|
|
11258
|
-
* Announces the selection state.
|
|
11259
|
-
*
|
|
11260
|
-
* @ignore
|
|
11261
|
-
* @param {Layout} object
|
|
11262
|
-
* @returns {Element} An (invisible) component.
|
|
11263
|
-
*/
|
|
11264
|
-
function ScreenReaderForSelections(_ref2) {
|
|
11265
|
-
var _layout$qListObject;
|
|
11266
|
-
let {
|
|
11267
|
-
layout
|
|
11268
|
-
} = _ref2;
|
|
11269
|
-
const {
|
|
11270
|
-
translator: translatorDynamic
|
|
11271
|
-
} = useContext(InstanceContext);
|
|
11272
|
-
const {
|
|
11273
|
-
qStateCounts: s = {}
|
|
11274
|
-
} = (layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qDimensionInfo) || {};
|
|
11275
|
-
const count = s.qSelected + s.qSelectedExcluded + s.qLocked + s.qLockedExcluded;
|
|
11276
|
-
let t;
|
|
11277
|
-
switch (count) {
|
|
11278
|
-
case 0:
|
|
11279
|
-
t = 'ScreenReader.ZeroSelected';
|
|
11280
|
-
break;
|
|
11281
|
-
case 1:
|
|
11282
|
-
t = 'ScreenReader.OneSelected';
|
|
11283
|
-
break;
|
|
11284
|
-
default:
|
|
11285
|
-
t = 'ScreenReader.ManySelected';
|
|
11286
|
-
break;
|
|
11287
|
-
}
|
|
11288
|
-
const text = translatorDynamic.get(t, [count]);
|
|
11289
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
11290
|
-
className: "screenReaderOnly",
|
|
11291
|
-
"aria-live": "assertive"
|
|
11292
|
-
}, text);
|
|
11293
|
-
}
|
|
11294
|
-
function getScreenReaderSearchText(listCount) {
|
|
11295
|
-
let t;
|
|
11296
|
-
switch (listCount) {
|
|
11297
|
-
case 0:
|
|
11298
|
-
t = 'Listbox.NoMatchesForYourTerms';
|
|
11299
|
-
break;
|
|
11300
|
-
case 1:
|
|
11301
|
-
t = 'ScreenReader.OneSearchResult';
|
|
11302
|
-
break;
|
|
11303
|
-
default:
|
|
11304
|
-
t = 'ScreenReader.ManySearchResults';
|
|
11305
|
-
break;
|
|
11306
|
-
}
|
|
11307
|
-
return t;
|
|
11308
|
-
}
|
|
11309
|
-
|
|
11310
11308
|
const KEYS = Object.freeze({
|
|
11311
11309
|
ENTER: 13,
|
|
11312
11310
|
ESCAPE: 27,
|
|
@@ -11592,6 +11590,40 @@ function getValueTextAlign(_ref) {
|
|
|
11592
11590
|
return ALLOWED_OPTIONS.includes(valueTextAlign) ? valueTextAlign : 'left';
|
|
11593
11591
|
}
|
|
11594
11592
|
|
|
11593
|
+
const LOC_STATES = {
|
|
11594
|
+
S: 'Object.Listbox.Selected',
|
|
11595
|
+
A: 'Object.Listbox.Alternative',
|
|
11596
|
+
O: 'Object.Listbox.Optional',
|
|
11597
|
+
XS: 'Object.Listbox.SelectedExcluded',
|
|
11598
|
+
L: 'Object.Listbox.Locked',
|
|
11599
|
+
X: 'Object.Listbox.Excluded',
|
|
11600
|
+
XL: 'Object.Listbox.ExcludedLock'
|
|
11601
|
+
};
|
|
11602
|
+
function getValueLabel(_ref) {
|
|
11603
|
+
let {
|
|
11604
|
+
translator: translatorDynamic,
|
|
11605
|
+
label,
|
|
11606
|
+
qState,
|
|
11607
|
+
isSelected,
|
|
11608
|
+
currentIndex,
|
|
11609
|
+
maxIndex,
|
|
11610
|
+
showSearch
|
|
11611
|
+
} = _ref;
|
|
11612
|
+
const stateTranslation = LOC_STATES[qState];
|
|
11613
|
+
const state = translatorDynamic.get(stateTranslation);
|
|
11614
|
+
const srStringArr = [];
|
|
11615
|
+
if (isSelected) {
|
|
11616
|
+
const navTranslation = showSearch ? 'Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu' : 'Listbox.ScreenReader.SelectionMenu.WithAccSelMenu';
|
|
11617
|
+
const nav = translatorDynamic.get(navTranslation);
|
|
11618
|
+
srStringArr.push(nav);
|
|
11619
|
+
}
|
|
11620
|
+
const valueString = "".concat(label, " ").concat(state);
|
|
11621
|
+
const indexString = translatorDynamic.get('CurrentSelections.Of', [currentIndex + 1, maxIndex + 1]); // E.g. 3 of 20
|
|
11622
|
+
srStringArr.unshift(valueString, indexString);
|
|
11623
|
+
const srString = srStringArr.join('. ').trim();
|
|
11624
|
+
return srString;
|
|
11625
|
+
}
|
|
11626
|
+
|
|
11595
11627
|
function RowColumn(_ref) {
|
|
11596
11628
|
var _cell$qText, _cell$qHighlightRange;
|
|
11597
11629
|
let {
|
|
@@ -11707,10 +11739,9 @@ function RowColumn(_ref) {
|
|
|
11707
11739
|
const classArr = useMemo$1(() => getValueStateClasses({
|
|
11708
11740
|
column,
|
|
11709
11741
|
histogram,
|
|
11710
|
-
checkboxes,
|
|
11711
11742
|
cell,
|
|
11712
11743
|
showGray
|
|
11713
|
-
}), [cell === null || cell === void 0 ? void 0 : cell.qState, histogram, dense
|
|
11744
|
+
}), [cell === null || cell === void 0 ? void 0 : cell.qState, histogram, dense]);
|
|
11714
11745
|
const preventContextMenu = useCallback(event => {
|
|
11715
11746
|
event.preventDefault();
|
|
11716
11747
|
}, [checkboxes]);
|
|
@@ -14347,6 +14378,82 @@ const useFrequencyMax = (app, layout) => {
|
|
|
14347
14378
|
};
|
|
14348
14379
|
};
|
|
14349
14380
|
|
|
14381
|
+
/**
|
|
14382
|
+
* Announces the selection state.
|
|
14383
|
+
*
|
|
14384
|
+
* @ignore
|
|
14385
|
+
* @param {Layout} object
|
|
14386
|
+
* @returns {string}
|
|
14387
|
+
*/
|
|
14388
|
+
function getSRForSelectedState(_ref) {
|
|
14389
|
+
var _layout$qListObject;
|
|
14390
|
+
let {
|
|
14391
|
+
layout,
|
|
14392
|
+
translatorDynamic
|
|
14393
|
+
} = _ref;
|
|
14394
|
+
const {
|
|
14395
|
+
qStateCounts: s = {}
|
|
14396
|
+
} = (layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qDimensionInfo) || {};
|
|
14397
|
+
const count = s.qSelected + s.qSelectedExcluded + s.qLocked + s.qLockedExcluded;
|
|
14398
|
+
let t;
|
|
14399
|
+
switch (count) {
|
|
14400
|
+
case 0:
|
|
14401
|
+
t = 'ScreenReader.ZeroSelected';
|
|
14402
|
+
break;
|
|
14403
|
+
case 1:
|
|
14404
|
+
t = 'ScreenReader.OneSelected';
|
|
14405
|
+
break;
|
|
14406
|
+
default:
|
|
14407
|
+
t = 'ScreenReader.ManySelected';
|
|
14408
|
+
break;
|
|
14409
|
+
}
|
|
14410
|
+
const text = translatorDynamic.get(t, [count]);
|
|
14411
|
+
return text;
|
|
14412
|
+
}
|
|
14413
|
+
function getSearchTranslationString(listCount) {
|
|
14414
|
+
let t;
|
|
14415
|
+
switch (listCount) {
|
|
14416
|
+
case 0:
|
|
14417
|
+
t = 'Listbox.NoMatchesForYourTerms';
|
|
14418
|
+
break;
|
|
14419
|
+
case 1:
|
|
14420
|
+
t = 'ScreenReader.OneSearchResult';
|
|
14421
|
+
break;
|
|
14422
|
+
default:
|
|
14423
|
+
t = 'ScreenReader.ManySearchResults';
|
|
14424
|
+
break;
|
|
14425
|
+
}
|
|
14426
|
+
return t;
|
|
14427
|
+
}
|
|
14428
|
+
function getScreenReaderAssertiveText(_ref2) {
|
|
14429
|
+
let {
|
|
14430
|
+
layout,
|
|
14431
|
+
searchInputText,
|
|
14432
|
+
listCount
|
|
14433
|
+
} = _ref2;
|
|
14434
|
+
const {
|
|
14435
|
+
translator: translatorDynamic
|
|
14436
|
+
} = useContext(InstanceContext);
|
|
14437
|
+
const finalStringArr = [];
|
|
14438
|
+
if (searchInputText !== null && searchInputText !== void 0 && searchInputText.length) {
|
|
14439
|
+
// Add search result text.
|
|
14440
|
+
const srSearchTranslationString = getSearchTranslationString(listCount);
|
|
14441
|
+
const srSearchString = translatorDynamic.get(srSearchTranslationString, [listCount]);
|
|
14442
|
+
finalStringArr.push(srSearchString);
|
|
14443
|
+
}
|
|
14444
|
+
|
|
14445
|
+
// Add selection value text.
|
|
14446
|
+
const srSelectionValueText = getSRForSelectedState({
|
|
14447
|
+
layout,
|
|
14448
|
+
translatorDynamic
|
|
14449
|
+
});
|
|
14450
|
+
finalStringArr.push(srSelectionValueText);
|
|
14451
|
+
|
|
14452
|
+
// Merge texts into one text string, targeting the assertive screen reader.
|
|
14453
|
+
const finalString = finalStringArr.filter(v => !!(v !== null && v !== void 0 && v.length)).join('. ');
|
|
14454
|
+
return finalString;
|
|
14455
|
+
}
|
|
14456
|
+
|
|
14350
14457
|
function deduceFrequencyMode(pages) {
|
|
14351
14458
|
const hasPercentSign = pages.some(_ref => {
|
|
14352
14459
|
let {
|
|
@@ -14415,7 +14522,6 @@ function ListBox(_ref) {
|
|
|
14415
14522
|
checkboxes = checkboxOption,
|
|
14416
14523
|
histogram
|
|
14417
14524
|
} = layout !== null && layout !== void 0 ? layout : {};
|
|
14418
|
-
const [screenReaderText, setScreenReaderText] = useState$1('');
|
|
14419
14525
|
const loaderRef = useRef(null);
|
|
14420
14526
|
const local = useRef({
|
|
14421
14527
|
queue: [],
|
|
@@ -14573,14 +14679,12 @@ function ListBox(_ref) {
|
|
|
14573
14679
|
listCount
|
|
14574
14680
|
} = sizes;
|
|
14575
14681
|
setStoreValue('listCount', listCount);
|
|
14576
|
-
const
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
}
|
|
14583
|
-
}, [inputText, listCount]);
|
|
14682
|
+
const searchInputText = getStoreValue('inputText');
|
|
14683
|
+
const screenReaderText = getScreenReaderAssertiveText({
|
|
14684
|
+
layout,
|
|
14685
|
+
searchInputText,
|
|
14686
|
+
listCount
|
|
14687
|
+
});
|
|
14584
14688
|
const setScrollPosition = position => {
|
|
14585
14689
|
const {
|
|
14586
14690
|
scrollIndex,
|
|
@@ -14689,10 +14793,7 @@ function ListBox(_ref) {
|
|
|
14689
14793
|
itemHeight
|
|
14690
14794
|
});
|
|
14691
14795
|
}
|
|
14692
|
-
return /*#__PURE__*/React__default.createElement(StyledWrapper, null, /*#__PURE__*/React__default.createElement(
|
|
14693
|
-
className: "screenReaderOnly",
|
|
14694
|
-
layout: layout
|
|
14695
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14796
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14696
14797
|
className: "screenReaderOnly",
|
|
14697
14798
|
"aria-live": "assertive"
|
|
14698
14799
|
}, screenReaderText), !listCount && cardinal > 0 && /*#__PURE__*/React__default.createElement(ListBoxDisclaimer, {
|
|
@@ -15354,6 +15455,9 @@ function ActionsToolbar(_ref3) {
|
|
|
15354
15455
|
transformOrigin: popoverTransformOrigin,
|
|
15355
15456
|
hideBackdrop: true,
|
|
15356
15457
|
style: popoverStyle,
|
|
15458
|
+
onMouseDown: e => {
|
|
15459
|
+
e.stopPropagation(); // prevent click through, closing when it should not
|
|
15460
|
+
},
|
|
15357
15461
|
slotProps: {
|
|
15358
15462
|
paper: {
|
|
15359
15463
|
id: 'njs-action-toolbar-popover',
|
|
@@ -15378,8 +15482,10 @@ const search = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
15378
15482
|
});
|
|
15379
15483
|
var SearchIcon = (props => SvgIcon$1(search(props)));
|
|
15380
15484
|
|
|
15485
|
+
const MAX_SEARCH_LENGTH = 64000;
|
|
15381
15486
|
const TREE_PATH = '/qListObjectDef';
|
|
15382
15487
|
const WILDCARD = '**';
|
|
15488
|
+
const limitSearchLength = val => val === null || val === void 0 ? void 0 : val.substring(0, MAX_SEARCH_LENGTH);
|
|
15383
15489
|
const StyledOutlinedInput = styled(OutlinedInput, {
|
|
15384
15490
|
shouldForwardProp: p => !['styles', 'dense', 'isRtl'].includes(p)
|
|
15385
15491
|
})(_ref => {
|
|
@@ -15488,11 +15594,12 @@ function ListBoxSearch(_ref2) {
|
|
|
15488
15594
|
setStoreValue('inputText', value);
|
|
15489
15595
|
}, [value]);
|
|
15490
15596
|
const onChange = async e => {
|
|
15491
|
-
|
|
15492
|
-
|
|
15597
|
+
const searchValue = limitSearchLength(e.target.value);
|
|
15598
|
+
setValue(searchValue);
|
|
15599
|
+
if (!searchValue.length) {
|
|
15493
15600
|
return abortSearch();
|
|
15494
15601
|
}
|
|
15495
|
-
return model.searchListObjectFor(TREE_PATH,
|
|
15602
|
+
return model.searchListObjectFor(TREE_PATH, searchValue);
|
|
15496
15603
|
};
|
|
15497
15604
|
const handleFocus = () => {
|
|
15498
15605
|
if (wildCardSearch) {
|
|
@@ -15509,11 +15616,12 @@ function ListBoxSearch(_ref2) {
|
|
|
15509
15616
|
};
|
|
15510
15617
|
const performSearch = async () => {
|
|
15511
15618
|
let response;
|
|
15512
|
-
const
|
|
15619
|
+
const searchValue = limitSearchLength(value);
|
|
15620
|
+
const success = await model.searchListObjectFor(TREE_PATH, searchValue);
|
|
15513
15621
|
if (selectionState.selectDisabled()) {
|
|
15514
15622
|
return success;
|
|
15515
15623
|
}
|
|
15516
|
-
if (success &&
|
|
15624
|
+
if (success && searchValue.length && hasHits()) {
|
|
15517
15625
|
response = model.acceptListObjectSearch(TREE_PATH, true);
|
|
15518
15626
|
// eslint-disable-next-line no-param-reassign
|
|
15519
15627
|
selections.selectionsMade = true;
|
|
@@ -19422,6 +19530,7 @@ class AutoSizer extends Component {
|
|
|
19422
19530
|
defaultWidth,
|
|
19423
19531
|
disableHeight = false,
|
|
19424
19532
|
disableWidth = false,
|
|
19533
|
+
doNotBailOutOnEmptyChildren = false,
|
|
19425
19534
|
nonce,
|
|
19426
19535
|
onResize,
|
|
19427
19536
|
style = {},
|
|
@@ -19462,6 +19571,9 @@ class AutoSizer extends Component {
|
|
|
19462
19571
|
childParams.width = width;
|
|
19463
19572
|
childParams.scaledWidth = scaledWidth;
|
|
19464
19573
|
}
|
|
19574
|
+
if (doNotBailOutOnEmptyChildren) {
|
|
19575
|
+
bailoutOnChildren = false;
|
|
19576
|
+
}
|
|
19465
19577
|
return createElement(tagName, {
|
|
19466
19578
|
ref: this._setRef,
|
|
19467
19579
|
style: {
|
|
@@ -19743,16 +19855,6 @@ function getContainerPadding(_ref) {
|
|
|
19743
19855
|
return containerPadding;
|
|
19744
19856
|
}
|
|
19745
19857
|
|
|
19746
|
-
const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
19747
|
-
shapes: [{
|
|
19748
|
-
type: 'path',
|
|
19749
|
-
attrs: {
|
|
19750
|
-
d: 'M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z'
|
|
19751
|
-
}
|
|
19752
|
-
}]
|
|
19753
|
-
});
|
|
19754
|
-
var DrillDownIcon = (props => SvgIcon$1(drillDown(props)));
|
|
19755
|
-
|
|
19756
19858
|
function showToolbarDetached(_ref) {
|
|
19757
19859
|
var _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
|
|
19758
19860
|
let {
|
|
@@ -19908,6 +20010,112 @@ function UnlockCoverButton(_ref4) {
|
|
|
19908
20010
|
return component;
|
|
19909
20011
|
}
|
|
19910
20012
|
|
|
20013
|
+
const cyclic = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20014
|
+
shapes: [{
|
|
20015
|
+
type: 'path',
|
|
20016
|
+
attrs: {
|
|
20017
|
+
d: 'M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z'
|
|
20018
|
+
}
|
|
20019
|
+
}]
|
|
20020
|
+
});
|
|
20021
|
+
var CyclicIcon = (props => SvgIcon$1(cyclic(props)));
|
|
20022
|
+
|
|
20023
|
+
const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20024
|
+
shapes: [{
|
|
20025
|
+
type: 'path',
|
|
20026
|
+
attrs: {
|
|
20027
|
+
d: 'M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z'
|
|
20028
|
+
}
|
|
20029
|
+
}]
|
|
20030
|
+
});
|
|
20031
|
+
var DrillDownIcon = (props => SvgIcon$1(drillDown(props)));
|
|
20032
|
+
|
|
20033
|
+
const reload = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20034
|
+
shapes: [{
|
|
20035
|
+
type: 'path',
|
|
20036
|
+
attrs: {
|
|
20037
|
+
d: 'M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z'
|
|
20038
|
+
}
|
|
20039
|
+
}]
|
|
20040
|
+
});
|
|
20041
|
+
var ReloadIcon = (props => SvgIcon$1(reload(props)));
|
|
20042
|
+
|
|
20043
|
+
const dimensionTypes = {
|
|
20044
|
+
single: 'N',
|
|
20045
|
+
drillDown: 'H',
|
|
20046
|
+
cyclic: 'C'
|
|
20047
|
+
};
|
|
20048
|
+
const createDimensionIconData = (dimInfo, app) => {
|
|
20049
|
+
switch (dimInfo.qGrouping) {
|
|
20050
|
+
case dimensionTypes.drillDown:
|
|
20051
|
+
return {
|
|
20052
|
+
icon: DrillDownIcon,
|
|
20053
|
+
tooltip: 'Listbox.DrillDown',
|
|
20054
|
+
onClick: undefined
|
|
20055
|
+
};
|
|
20056
|
+
case dimensionTypes.cyclic:
|
|
20057
|
+
return {
|
|
20058
|
+
icon: app ? ReloadIcon : CyclicIcon,
|
|
20059
|
+
tooltip: 'Listbox.Cyclic',
|
|
20060
|
+
onClick: app ? () => {
|
|
20061
|
+
app.getDimension(dimInfo.qLibraryId).then(dimensionModel => {
|
|
20062
|
+
if (!dimensionModel.stepCycle) {
|
|
20063
|
+
// eslint-disable-next-line no-console
|
|
20064
|
+
console.log("engine api spec version doesn't have support for function stepCycle");
|
|
20065
|
+
return;
|
|
20066
|
+
}
|
|
20067
|
+
dimensionModel.stepCycle(1);
|
|
20068
|
+
}).catch(() => null);
|
|
20069
|
+
} : undefined
|
|
20070
|
+
};
|
|
20071
|
+
default:
|
|
20072
|
+
return undefined;
|
|
20073
|
+
}
|
|
20074
|
+
};
|
|
20075
|
+
var iconUtils = {
|
|
20076
|
+
createDimensionIconData
|
|
20077
|
+
};
|
|
20078
|
+
|
|
20079
|
+
const StyledButton = styled$3(Button)(() => ({
|
|
20080
|
+
borderRadius: 4,
|
|
20081
|
+
width: 24,
|
|
20082
|
+
height: 24,
|
|
20083
|
+
minWidth: 22,
|
|
20084
|
+
padding: 0
|
|
20085
|
+
}));
|
|
20086
|
+
function DimensionIcon(_ref) {
|
|
20087
|
+
let {
|
|
20088
|
+
iconData,
|
|
20089
|
+
translator,
|
|
20090
|
+
iconStyle
|
|
20091
|
+
} = _ref;
|
|
20092
|
+
if (!iconData) return undefined;
|
|
20093
|
+
const {
|
|
20094
|
+
icon,
|
|
20095
|
+
tooltip,
|
|
20096
|
+
onClick
|
|
20097
|
+
} = iconData;
|
|
20098
|
+
const Icon = icon;
|
|
20099
|
+
const title = translator.get(tooltip);
|
|
20100
|
+
const isButton = onClick;
|
|
20101
|
+
return isButton ? /*#__PURE__*/React__default.createElement(StyledButton, {
|
|
20102
|
+
variant: "outlined",
|
|
20103
|
+
onClick: onClick,
|
|
20104
|
+
tabIndex: -1,
|
|
20105
|
+
title: title,
|
|
20106
|
+
size: "large",
|
|
20107
|
+
disableRipple: true
|
|
20108
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
20109
|
+
style: iconStyle
|
|
20110
|
+
})) : /*#__PURE__*/React__default.createElement(Icon, {
|
|
20111
|
+
title: title,
|
|
20112
|
+
size: "large",
|
|
20113
|
+
style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
|
|
20114
|
+
padding: "".concat(ICON_PADDING, "px")
|
|
20115
|
+
})
|
|
20116
|
+
});
|
|
20117
|
+
}
|
|
20118
|
+
|
|
19911
20119
|
// ms that needs to pass before the lock button can be toggled again
|
|
19912
20120
|
const lockTimeFrameMs = 500;
|
|
19913
20121
|
let lastTime = 0;
|
|
@@ -19942,7 +20150,7 @@ function getToggleLock(_ref) {
|
|
|
19942
20150
|
};
|
|
19943
20151
|
}
|
|
19944
20152
|
function ListBoxHeader(_ref2) {
|
|
19945
|
-
var _layout$qListObject, _layout$qListObject3;
|
|
20153
|
+
var _layout$qListObject, _layout$qListObject3, _layout$qListObject4;
|
|
19946
20154
|
let {
|
|
19947
20155
|
layout,
|
|
19948
20156
|
translator,
|
|
@@ -19950,7 +20158,6 @@ function ListBoxHeader(_ref2) {
|
|
|
19950
20158
|
isRtl,
|
|
19951
20159
|
showLock,
|
|
19952
20160
|
showSearchIcon,
|
|
19953
|
-
isDrillDown,
|
|
19954
20161
|
constraints,
|
|
19955
20162
|
onShowSearch,
|
|
19956
20163
|
classes,
|
|
@@ -19964,7 +20171,8 @@ function ListBoxHeader(_ref2) {
|
|
|
19964
20171
|
isDirectQuery,
|
|
19965
20172
|
selections,
|
|
19966
20173
|
keyboard,
|
|
19967
|
-
autoConfirm
|
|
20174
|
+
autoConfirm,
|
|
20175
|
+
app
|
|
19968
20176
|
} = _ref2;
|
|
19969
20177
|
const [isToolbarDetached, setIsToolbarDetached] = useState$1(showDetachedToolbarOnly);
|
|
19970
20178
|
const [isLocked, setLocked] = useState$1(layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked);
|
|
@@ -19974,15 +20182,16 @@ function ListBoxHeader(_ref2) {
|
|
|
19974
20182
|
setLocked(layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qLocked);
|
|
19975
20183
|
}, [layout === null || layout === void 0 || (_layout$qListObject3 = layout.qListObject) === null || _layout$qListObject3 === void 0 || (_layout$qListObject3 = _layout$qListObject3.qDimensionInfo) === null || _layout$qListObject3 === void 0 ? void 0 : _layout$qListObject3.qLocked]);
|
|
19976
20184
|
const titleRef = useRef(null);
|
|
20185
|
+
const iconData = iconUtils.createDimensionIconData(layout === null || layout === void 0 || (_layout$qListObject4 = layout.qListObject) === null || _layout$qListObject4 === void 0 ? void 0 : _layout$qListObject4.qDimensionInfo, app);
|
|
19977
20186
|
const showUnlock = showLock && isLocked;
|
|
19978
20187
|
const showLockIcon = !showLock && isLocked; // shows instead of the cover button when field/dim is locked.
|
|
19979
|
-
const showLeftIcon = showSearchIcon || showLockIcon ||
|
|
20188
|
+
const showLeftIcon = showSearchIcon || showLockIcon || iconData; // the left-most icon outside of the actions/selections toolbar.
|
|
19980
20189
|
|
|
19981
20190
|
const paddingLeft = CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0);
|
|
19982
20191
|
const paddingRight = isRtl ? CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0) : HEADER_PADDING_RIGHT;
|
|
19983
20192
|
|
|
19984
20193
|
// Calculate explicit width for icons container. Search and lock cannot exist combined.
|
|
19985
|
-
const iconsWidth = (showSearchIcon ? BUTTON_ICON_WIDTH : 0) + (showLockIcon ? BUTTON_ICON_WIDTH : 0) + (
|
|
20194
|
+
const iconsWidth = (showSearchIcon ? BUTTON_ICON_WIDTH : 0) + (showLockIcon ? BUTTON_ICON_WIDTH : 0) + (iconData ? BUTTON_ICON_WIDTH : 0);
|
|
19986
20195
|
const toggleLock = getToggleLock({
|
|
19987
20196
|
isLocked,
|
|
19988
20197
|
setLocked,
|
|
@@ -20081,12 +20290,10 @@ function ListBoxHeader(_ref2) {
|
|
|
20081
20290
|
alignItems: "center",
|
|
20082
20291
|
width: iconsWidth,
|
|
20083
20292
|
className: "header-action-container"
|
|
20084
|
-
}, lockedIconComp || showSearchIcon && searchIconComp,
|
|
20085
|
-
|
|
20086
|
-
|
|
20087
|
-
|
|
20088
|
-
padding: "".concat(ICON_PADDING, "px")
|
|
20089
|
-
})
|
|
20293
|
+
}, lockedIconComp || showSearchIcon && searchIconComp, /*#__PURE__*/React__default.createElement(DimensionIcon, {
|
|
20294
|
+
iconData: iconData,
|
|
20295
|
+
iconStyle: iconStyle,
|
|
20296
|
+
translator: translator
|
|
20090
20297
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
20091
20298
|
item: true,
|
|
20092
20299
|
xs: true,
|
|
@@ -20156,7 +20363,7 @@ const isModal = _ref2 => {
|
|
|
20156
20363
|
return (_app$isInModalSelecti = (_app$isInModalSelecti2 = app.isInModalSelection) === null || _app$isInModalSelecti2 === void 0 ? void 0 : _app$isInModalSelecti2.call(app)) !== null && _app$isInModalSelecti !== void 0 ? _app$isInModalSelecti : appSelections.isInModal();
|
|
20157
20364
|
};
|
|
20158
20365
|
function ListBoxInline(_ref3) {
|
|
20159
|
-
var _layout$qListObject, _layout$
|
|
20366
|
+
var _layout$qListObject, _layout$title, _layoutOptions$dense, _containerRef$current;
|
|
20160
20367
|
let {
|
|
20161
20368
|
options,
|
|
20162
20369
|
layout
|
|
@@ -20322,7 +20529,6 @@ function ListBoxInline(_ref3) {
|
|
|
20322
20529
|
} = layout !== null && layout !== void 0 ? layout : {};
|
|
20323
20530
|
const isLocked = layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 || (_layout$qListObject = _layout$qListObject.qDimensionInfo) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qLocked;
|
|
20324
20531
|
const showSearchIcon = searchEnabled !== false && search === 'toggle' && !isLocked;
|
|
20325
|
-
const isDrillDown = (layout === null || layout === void 0 || (_layout$qListObject2 = layout.qListObject) === null || _layout$qListObject2 === void 0 || (_layout$qListObject2 = _layout$qListObject2.qDimensionInfo) === null || _layout$qListObject2 === void 0 ? void 0 : _layout$qListObject2.qGrouping) === 'H';
|
|
20326
20532
|
const canShowTitle = (layout === null || layout === void 0 || (_layout$title = layout.title) === null || _layout$title === void 0 ? void 0 : _layout$title.length) && (layout === null || layout === void 0 ? void 0 : layout.showTitle) !== false;
|
|
20327
20533
|
const showDetachedToolbarOnly = toolbar && !canShowTitle && !isPopover;
|
|
20328
20534
|
const showAttachedToolbar = toolbar && canShowTitle || isPopover;
|
|
@@ -20360,8 +20566,8 @@ function ListBoxInline(_ref3) {
|
|
|
20360
20566
|
}
|
|
20361
20567
|
const listBoxMinHeight = showAttachedToolbar ? DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH : 0;
|
|
20362
20568
|
const listBoxHeader = /*#__PURE__*/React__default.createElement(ListBoxHeader, {
|
|
20569
|
+
app: app,
|
|
20363
20570
|
showSearchIcon: showSearchIcon,
|
|
20364
|
-
isDrillDown: isDrillDown,
|
|
20365
20571
|
onShowSearch: handleShowSearch,
|
|
20366
20572
|
isPopover: isPopover,
|
|
20367
20573
|
showToolbar: showToolbar,
|
|
@@ -20545,7 +20751,7 @@ function useExistingModel(_ref) {
|
|
|
20545
20751
|
/**
|
|
20546
20752
|
* Extends `ListObjectDef`, see Engine API: `ListObjectDef`.
|
|
20547
20753
|
* @interface ListObjectDef
|
|
20548
|
-
* @extends
|
|
20754
|
+
* @extends qix.ListObjectDef
|
|
20549
20755
|
* @property {boolean} [frequencyEnabled=false] Show frequency count. also requires qListObjectDef.qFrequencyMode to be set
|
|
20550
20756
|
*/
|
|
20551
20757
|
|
|
@@ -21384,10 +21590,10 @@ async function populateData(_ref, halo) {
|
|
|
21384
21590
|
/**
|
|
21385
21591
|
* @since 1.1.0
|
|
21386
21592
|
* @interface ExportDataDef
|
|
21387
|
-
* @property {
|
|
21388
|
-
* @property {
|
|
21389
|
-
* @property {
|
|
21390
|
-
* @property {
|
|
21593
|
+
* @property {qix.NxDimension[]} dimensions
|
|
21594
|
+
* @property {qix.NxMeasure[]} measures
|
|
21595
|
+
* @property {qix.NxDimension[]} excludedDimensions
|
|
21596
|
+
* @property {qix.NxMeasure[]} excludedMeasures
|
|
21391
21597
|
* @property {number[]} interColumnSortOrder
|
|
21392
21598
|
*/
|
|
21393
21599
|
|
|
@@ -24604,7 +24810,7 @@ function useRect() {
|
|
|
24604
24810
|
/**
|
|
24605
24811
|
* Gets the layout of the generic object associated with this visualization.
|
|
24606
24812
|
* @entry
|
|
24607
|
-
* @returns {
|
|
24813
|
+
* @returns {qix.GenericObjectLayout}
|
|
24608
24814
|
* @example
|
|
24609
24815
|
* import { useLayout } from '@nebula.js/stardust';
|
|
24610
24816
|
* // ...
|
|
@@ -24624,7 +24830,7 @@ function useLayout() {
|
|
|
24624
24830
|
* The returned value from `useStaleLayout()` and `useLayout()` are identical when the object
|
|
24625
24831
|
* is not in a modal state.
|
|
24626
24832
|
* @entry
|
|
24627
|
-
* @returns {
|
|
24833
|
+
* @returns {qix.GenericObjectLayout}
|
|
24628
24834
|
* @example
|
|
24629
24835
|
* import { useStaleLayout } from '@nebula.js/stardust';
|
|
24630
24836
|
* // ...
|
|
@@ -24645,7 +24851,7 @@ function useStaleLayout() {
|
|
|
24645
24851
|
/**
|
|
24646
24852
|
* Gets the layout of the app associated with this visualization.
|
|
24647
24853
|
* @entry
|
|
24648
|
-
* @returns {
|
|
24854
|
+
* @returns {qix.NxAppLayout} The app layout
|
|
24649
24855
|
* @example
|
|
24650
24856
|
* import { useAppLayout } from '@nebula.js/stardust';
|
|
24651
24857
|
* // ...
|
|
@@ -24659,7 +24865,7 @@ function useAppLayout() {
|
|
|
24659
24865
|
/**
|
|
24660
24866
|
* Gets the generic object API of the generic object connected to this visualization.
|
|
24661
24867
|
* @entry
|
|
24662
|
-
* @returns {
|
|
24868
|
+
* @returns {qix.GenericObject|undefined}
|
|
24663
24869
|
* @example
|
|
24664
24870
|
* import { useModel } from '@nebula.js/stardust';
|
|
24665
24871
|
* // ...
|
|
@@ -24678,7 +24884,7 @@ function useModel() {
|
|
|
24678
24884
|
/**
|
|
24679
24885
|
* Gets the doc API.
|
|
24680
24886
|
* @entry
|
|
24681
|
-
* @returns {
|
|
24887
|
+
* @returns {qix.Doc|undefined} The doc API.
|
|
24682
24888
|
* @example
|
|
24683
24889
|
* import { useApp } from '@nebula.js/stardust';
|
|
24684
24890
|
* // ...
|
|
@@ -24697,7 +24903,7 @@ function useApp() {
|
|
|
24697
24903
|
/**
|
|
24698
24904
|
* Gets the global API.
|
|
24699
24905
|
* @entry
|
|
24700
|
-
* @returns {
|
|
24906
|
+
* @returns {qix.Global|undefined} The global API.
|
|
24701
24907
|
* @example
|
|
24702
24908
|
* import { useGlobal } from '@nebula.js/stardust';
|
|
24703
24909
|
*
|
|
@@ -24747,7 +24953,7 @@ function useSelections() {
|
|
|
24747
24953
|
* import { useTheme } from '@nebula.js/stardust';
|
|
24748
24954
|
*
|
|
24749
24955
|
* const theme = useTheme();
|
|
24750
|
-
* console.log(theme.
|
|
24956
|
+
* console.log(theme.getContrastingColorTo('#ff0000'));
|
|
24751
24957
|
*/
|
|
24752
24958
|
function useTheme() {
|
|
24753
24959
|
return useInternalContext('theme');
|
|
@@ -24940,7 +25146,7 @@ function useConstraints() {
|
|
|
24940
25146
|
* @interface Interactions
|
|
24941
25147
|
* @property {boolean=} passive=true Whether or not passive interactions are on. Allows passive interaction by users, ie: tooltips
|
|
24942
25148
|
* @property {boolean=} active=true Whether or not active interactions are on. Allows active interaction by users, ie: scroll, click
|
|
24943
|
-
* @property {boolean=} select=true Whether or not select interactions are on.
|
|
25149
|
+
* @property {boolean=} select=true Whether or not select interactions are on. Allows selection actions. Implied when active is false.
|
|
24944
25150
|
* @property {boolean=} edit=false Whether or not edit actions are on. Allows edit actions.
|
|
24945
25151
|
*/
|
|
24946
25152
|
/**
|
|
@@ -25068,7 +25274,7 @@ function useImperativeHandle(fn, deps) {
|
|
|
25068
25274
|
/**
|
|
25069
25275
|
* Registers a callback that is called when a snapshot is taken.
|
|
25070
25276
|
* @entry
|
|
25071
|
-
* @param {function(
|
|
25277
|
+
* @param {function(qix.GenericObjectLayout): Promise<qix.GenericObjectLayout>} snapshotCallback
|
|
25072
25278
|
* @example
|
|
25073
25279
|
* import { onTakeSnapshot } from '@nebula.js/stardust';
|
|
25074
25280
|
* import { useState } from '@nebula.js/stardust';
|
|
@@ -25129,7 +25335,7 @@ function onContextMenu(cb) {
|
|
|
25129
25335
|
*
|
|
25130
25336
|
* const renderState = useRenderState();
|
|
25131
25337
|
* useState(() => {
|
|
25132
|
-
* if(
|
|
25338
|
+
* if(needPropertiesUpdate(...)) {
|
|
25133
25339
|
* useRenderState.pending();
|
|
25134
25340
|
* updateProperties(...);
|
|
25135
25341
|
* } else {
|
|
@@ -25671,7 +25877,7 @@ const noop = () => {};
|
|
|
25671
25877
|
|
|
25672
25878
|
/**
|
|
25673
25879
|
* @interface QAEDefinition
|
|
25674
|
-
* @property {
|
|
25880
|
+
* @property {qix.GenericObjectProperties=} properties
|
|
25675
25881
|
* @property {object=} data
|
|
25676
25882
|
* @property {DataTarget[]} data.targets
|
|
25677
25883
|
* @property {importProperties=} importProperties
|
|
@@ -25681,22 +25887,22 @@ const noop = () => {};
|
|
|
25681
25887
|
/**
|
|
25682
25888
|
* @interface DataTarget
|
|
25683
25889
|
* @property {string} path
|
|
25684
|
-
* @property {FieldTarget<
|
|
25685
|
-
* @property {FieldTarget<
|
|
25890
|
+
* @property {FieldTarget<qix.NxDimension>=} dimensions
|
|
25891
|
+
* @property {FieldTarget<qix.NxMeasure>=} measures
|
|
25686
25892
|
*/
|
|
25687
25893
|
|
|
25688
25894
|
/**
|
|
25689
25895
|
* @callback fieldTargetAddedCallback
|
|
25690
25896
|
* @template T
|
|
25691
25897
|
* @param {T} field
|
|
25692
|
-
* @param {
|
|
25898
|
+
* @param {qix.GenericObjectProperties} properties
|
|
25693
25899
|
*/
|
|
25694
25900
|
|
|
25695
25901
|
/**
|
|
25696
25902
|
* @callback fieldTargetRemovedCallback
|
|
25697
25903
|
* @template T
|
|
25698
25904
|
* @param {T} field
|
|
25699
|
-
* @param {
|
|
25905
|
+
* @param {qix.GenericObjectProperties} properties
|
|
25700
25906
|
* @param {number} index
|
|
25701
25907
|
*/
|
|
25702
25908
|
|
|
@@ -25960,7 +26166,7 @@ function viz() {
|
|
|
25960
26166
|
id: model.id,
|
|
25961
26167
|
/**
|
|
25962
26168
|
* This visualizations Enigma model, a representation of the generic object.
|
|
25963
|
-
* @type {
|
|
26169
|
+
* @type {qix.GenericObject}
|
|
25964
26170
|
*/
|
|
25965
26171
|
model,
|
|
25966
26172
|
/**
|
|
@@ -26081,7 +26287,6 @@ function viz() {
|
|
|
26081
26287
|
},
|
|
26082
26288
|
/**
|
|
26083
26289
|
* Listens to custom events from inside the visualization. See useEmitter
|
|
26084
|
-
* @experimental
|
|
26085
26290
|
* @param {string} eventName Event name to listen to
|
|
26086
26291
|
* @param {Function} listener Callback function to invoke
|
|
26087
26292
|
*/
|
|
@@ -26090,7 +26295,6 @@ function viz() {
|
|
|
26090
26295
|
},
|
|
26091
26296
|
/**
|
|
26092
26297
|
* Removes a listener
|
|
26093
|
-
* @experimental
|
|
26094
26298
|
* @param {string} eventName Event name to remove from
|
|
26095
26299
|
* @param {Function} listener Callback function to remove
|
|
26096
26300
|
*/
|
|
@@ -26105,6 +26309,16 @@ function viz() {
|
|
|
26105
26309
|
await rendered;
|
|
26106
26310
|
return cellRef.current.getImperativeHandle();
|
|
26107
26311
|
},
|
|
26312
|
+
/**
|
|
26313
|
+
* Takes a snapshot of the Viz layout and state
|
|
26314
|
+
* @experimental
|
|
26315
|
+
* @private
|
|
26316
|
+
* @returns {Promise<object>} viz layout object with snapshot settings
|
|
26317
|
+
*/
|
|
26318
|
+
async takeSnapshot() {
|
|
26319
|
+
await rendered;
|
|
26320
|
+
return cellRef.current.takeSnapshot();
|
|
26321
|
+
},
|
|
26108
26322
|
// ===== unexposed experimental API - use at own risk ======
|
|
26109
26323
|
__DO_NOT_USE__: {
|
|
26110
26324
|
mount(element) {
|
|
@@ -26239,7 +26453,7 @@ async function init(model, optional, halo, initialError) {
|
|
|
26239
26453
|
}
|
|
26240
26454
|
|
|
26241
26455
|
/**
|
|
26242
|
-
* @typedef {string |
|
|
26456
|
+
* @typedef {string | qix.NxDimension | qix.NxMeasure | LibraryField} Field
|
|
26243
26457
|
*/
|
|
26244
26458
|
|
|
26245
26459
|
/**
|
|
@@ -26253,7 +26467,7 @@ async function init(model, optional, halo, initialError) {
|
|
|
26253
26467
|
* @property {string=} version For creating objects: Version of visualization to render
|
|
26254
26468
|
* @property {(Field[])=} fields For creating objects: Data fields to use
|
|
26255
26469
|
* @property {boolean=} [extendProperties=false] For creating objects: Whether to deeply extend properties or not. If false then subtrees will be overwritten.
|
|
26256
|
-
* @property {
|
|
26470
|
+
* @property {qix.GenericObjectProperties=} properties For creating objects: Explicit properties to set
|
|
26257
26471
|
* @example
|
|
26258
26472
|
* // A config for Creating objects:
|
|
26259
26473
|
* const createConfig = {
|
|
@@ -26344,7 +26558,7 @@ async function createSessionObject(_ref, halo, store) {
|
|
|
26344
26558
|
}
|
|
26345
26559
|
|
|
26346
26560
|
/**
|
|
26347
|
-
* @typedef {string |
|
|
26561
|
+
* @typedef {string | qix.NxDimension | qix.NxMeasure | LibraryField} Field
|
|
26348
26562
|
*/
|
|
26349
26563
|
|
|
26350
26564
|
/**
|
|
@@ -26353,7 +26567,7 @@ async function createSessionObject(_ref, halo, store) {
|
|
|
26353
26567
|
* @property {string} type
|
|
26354
26568
|
* @property {string=} version
|
|
26355
26569
|
* @property {(Field[])=} fields
|
|
26356
|
-
* @property {
|
|
26570
|
+
* @property {qix.GenericObjectProperties=} properties
|
|
26357
26571
|
*/
|
|
26358
26572
|
|
|
26359
26573
|
async function createObject(_ref, halo, generateOnly, store) {
|
|
@@ -29074,7 +29288,10 @@ const DEFAULT_CONFIG = {
|
|
|
29074
29288
|
themes: [],
|
|
29075
29289
|
anything: {},
|
|
29076
29290
|
flags: {
|
|
29077
|
-
KPI_REACTCOLORPICKER: true
|
|
29291
|
+
KPI_REACTCOLORPICKER: true,
|
|
29292
|
+
IM_1869_HIDE_DIM_MEA_LINE: true,
|
|
29293
|
+
IM_1579_HIDE_DIM_MEA: true,
|
|
29294
|
+
CLIENT_IM_3365: true
|
|
29078
29295
|
},
|
|
29079
29296
|
snapshot: DEFAULT_SNAPSHOT_CONFIG
|
|
29080
29297
|
};
|
|
@@ -29155,7 +29372,7 @@ function nuked() {
|
|
|
29155
29372
|
* Initiates a new `Embed` instance using the specified enigma `app`.
|
|
29156
29373
|
* @entry
|
|
29157
29374
|
* @function embed
|
|
29158
|
-
* @param {
|
|
29375
|
+
* @param {qix.Doc} app
|
|
29159
29376
|
* @param {Configuration=} instanceConfig
|
|
29160
29377
|
* @returns {Embed}
|
|
29161
29378
|
* @example
|
|
@@ -29270,8 +29487,7 @@ function nuked() {
|
|
|
29270
29487
|
/**
|
|
29271
29488
|
* Creates a visualization model
|
|
29272
29489
|
* @param {CreateConfig} cfg The create configuration.
|
|
29273
|
-
* @
|
|
29274
|
-
* @returns {Promise<EngineAPI.IGenericObject>} An engima model
|
|
29490
|
+
* @returns {Promise<qix.GenericObject>} An engima model
|
|
29275
29491
|
* @example
|
|
29276
29492
|
* // create a barchart in the app and return the model
|
|
29277
29493
|
* const model = await n.create({
|
|
@@ -29285,7 +29501,6 @@ function nuked() {
|
|
|
29285
29501
|
/**
|
|
29286
29502
|
* Generates properties for a visualization object
|
|
29287
29503
|
* @param {CreateConfig} cfg The create configuration.
|
|
29288
|
-
* @experimental
|
|
29289
29504
|
* @returns {Promise<object>} The objects properties
|
|
29290
29505
|
* @example
|
|
29291
29506
|
* // generate properties for a barchart
|
|
@@ -29905,7 +30120,7 @@ function fromGenericObjects(genericObjects) {
|
|
|
29905
30120
|
*/
|
|
29906
30121
|
const mocker = /** @lends EnigmaMocker# */{
|
|
29907
30122
|
/**
|
|
29908
|
-
* Mocks Engima app functionality. It accepts one / many generic objects as input argument and returns the mocked Enigma app. Each generic object represents one
|
|
30123
|
+
* Mocks Engima app functionality. It accepts one / many generic objects as input argument and returns the mocked Enigma app. Each generic object represents one visualisation and specifies how it behaves. For example, what layout to use the data to present.
|
|
29909
30124
|
*
|
|
29910
30125
|
* The generic object is represented with a Javascript object with a number of properties. The name of the property correlates to the name in the Enigma model for `app.getObject(id)`. For example, the property `getLayout` in the generic object is used to define `app.getObject(id).getLayout()`. Any property can be added to the fixture (just make sure it exists and behaves as in the Enigma model!).
|
|
29911
30126
|
*
|
|
@@ -29913,9 +30128,9 @@ const mocker = /** @lends EnigmaMocker# */{
|
|
|
29913
30128
|
* @type function
|
|
29914
30129
|
* @experimental
|
|
29915
30130
|
* @since 3.0.0
|
|
29916
|
-
* @param {Array<object>} genericObjects Generic objects
|
|
30131
|
+
* @param {Array<object>} genericObjects Generic objects controlling behaviour of visualizations.
|
|
29917
30132
|
* @param {EnigmaMockerOptions=} options Options
|
|
29918
|
-
* @returns {Promise<
|
|
30133
|
+
* @returns {Promise<qix.Doc>}
|
|
29919
30134
|
* @example
|
|
29920
30135
|
* const genericObject = {
|
|
29921
30136
|
* getLayout() {
|