@nebula.js/stardust 5.0.0-alpha4 → 5.0.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 +487 -242
- 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 +4 -4
- package/dist/stardust.dev.js +773 -521
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +14 -14
- package/dist/stardust.js.map +1 -1
- package/package.json +16 -18
- package/types/index.d.ts +36 -36
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v5.0.
|
|
2
|
+
* @nebula.js/stardust v5.0.1
|
|
3
3
|
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -742,7 +742,7 @@ function _toPrimitive(t, r) {
|
|
|
742
742
|
}
|
|
743
743
|
function _toPropertyKey(t) {
|
|
744
744
|
var i = _toPrimitive(t, "string");
|
|
745
|
-
return "symbol" == typeof i ? i :
|
|
745
|
+
return "symbol" == typeof i ? i : i + "";
|
|
746
746
|
}
|
|
747
747
|
function _defineProperty(obj, key, value) {
|
|
748
748
|
key = _toPropertyKey(key);
|
|
@@ -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') {
|
|
@@ -5235,7 +5262,7 @@ function GlobalStyles(props) {
|
|
|
5235
5262
|
}
|
|
5236
5263
|
|
|
5237
5264
|
/**
|
|
5238
|
-
* @mui/styled-engine v5.15.
|
|
5265
|
+
* @mui/styled-engine v5.15.14
|
|
5239
5266
|
*
|
|
5240
5267
|
* @license MIT
|
|
5241
5268
|
* This source code is licensed under the MIT license found in the
|
|
@@ -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
|
}
|
|
@@ -7703,7 +7746,7 @@ function emphasize(color, coefficient = 0.15) {
|
|
|
7703
7746
|
}
|
|
7704
7747
|
function private_safeEmphasize(color, coefficient, warning) {
|
|
7705
7748
|
try {
|
|
7706
|
-
return
|
|
7749
|
+
return emphasize(color, coefficient);
|
|
7707
7750
|
} catch (error) {
|
|
7708
7751
|
if (warning && "production" !== 'production') {
|
|
7709
7752
|
console.warn(warning);
|
|
@@ -8424,7 +8467,7 @@ Object.defineProperty(createStyled$1, "__esModule", {
|
|
|
8424
8467
|
value: true
|
|
8425
8468
|
});
|
|
8426
8469
|
var _default = createStyled$1.default = createStyled;
|
|
8427
|
-
|
|
8470
|
+
createStyled$1.shouldForwardProp = shouldForwardProp;
|
|
8428
8471
|
createStyled$1.systemDefaultTheme = void 0;
|
|
8429
8472
|
var _extends2 = _interopRequireDefault$1(require_extends());
|
|
8430
8473
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault$1(requireObjectWithoutPropertiesLoose());
|
|
@@ -8652,11 +8695,18 @@ function createStyled(input = {}) {
|
|
|
8652
8695
|
};
|
|
8653
8696
|
}
|
|
8654
8697
|
|
|
8655
|
-
|
|
8698
|
+
// copied from @mui/system/createStyled
|
|
8699
|
+
function slotShouldForwardProp(prop) {
|
|
8700
|
+
return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';
|
|
8701
|
+
}
|
|
8702
|
+
|
|
8703
|
+
const rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';
|
|
8704
|
+
var rootShouldForwardProp$1 = rootShouldForwardProp;
|
|
8705
|
+
|
|
8656
8706
|
const styled = _default({
|
|
8657
8707
|
themeId: THEME_ID,
|
|
8658
8708
|
defaultTheme: defaultTheme$1,
|
|
8659
|
-
rootShouldForwardProp
|
|
8709
|
+
rootShouldForwardProp: rootShouldForwardProp$1
|
|
8660
8710
|
});
|
|
8661
8711
|
|
|
8662
8712
|
const _excluded$7 = ["theme"];
|
|
@@ -8711,7 +8761,7 @@ function _assertThisInitialized(self) {
|
|
|
8711
8761
|
return self;
|
|
8712
8762
|
}
|
|
8713
8763
|
|
|
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']);
|
|
8764
|
+
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
8765
|
var buttonClasses$1 = buttonClasses;
|
|
8716
8766
|
|
|
8717
8767
|
var base = {
|
|
@@ -9051,7 +9101,7 @@ function create$3(definition) {
|
|
|
9051
9101
|
return cache[key];
|
|
9052
9102
|
}
|
|
9053
9103
|
|
|
9054
|
-
const NEBULA_VERSION_HASH = "
|
|
9104
|
+
const NEBULA_VERSION_HASH = "19bb" ;
|
|
9055
9105
|
ClassNameGenerator.configure(componentName => {
|
|
9056
9106
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
9057
9107
|
});
|
|
@@ -9283,7 +9333,7 @@ function boot(_ref2) {
|
|
|
9283
9333
|
const appRef = React__default.createRef();
|
|
9284
9334
|
const element = document.createElement('div');
|
|
9285
9335
|
element.style.display = 'none';
|
|
9286
|
-
element.setAttribute('data-nebulajs-version', "5.0.
|
|
9336
|
+
element.setAttribute('data-nebulajs-version', "5.0.1" );
|
|
9287
9337
|
element.setAttribute('data-app-id', app.id);
|
|
9288
9338
|
document.body.appendChild(element);
|
|
9289
9339
|
if (context) {
|
|
@@ -10427,31 +10477,52 @@ const excludedOrAlternative = _ref => {
|
|
|
10427
10477
|
} = _ref;
|
|
10428
10478
|
return (isAlternative(cell) || isExcluded(cell)) && checkboxes;
|
|
10429
10479
|
};
|
|
10430
|
-
|
|
10480
|
+
function getSelectionStateClass(_ref2) {
|
|
10481
|
+
let {
|
|
10482
|
+
cell,
|
|
10483
|
+
showGray
|
|
10484
|
+
} = _ref2;
|
|
10485
|
+
let selectionStateClass;
|
|
10486
|
+
switch (cell.qState) {
|
|
10487
|
+
case 'XS':
|
|
10488
|
+
selectionStateClass = showGray ? rowColClasses.XS : rowColClasses.S;
|
|
10489
|
+
break;
|
|
10490
|
+
case 'S':
|
|
10491
|
+
case 'L':
|
|
10492
|
+
selectionStateClass = rowColClasses.S;
|
|
10493
|
+
break;
|
|
10494
|
+
case 'A':
|
|
10495
|
+
selectionStateClass = showGray ? rowColClasses.A : false;
|
|
10496
|
+
break;
|
|
10497
|
+
case 'X':
|
|
10498
|
+
case 'XL':
|
|
10499
|
+
selectionStateClass = showGray ? rowColClasses.X : false;
|
|
10500
|
+
break;
|
|
10501
|
+
default:
|
|
10502
|
+
selectionStateClass = false;
|
|
10503
|
+
}
|
|
10504
|
+
return selectionStateClass;
|
|
10505
|
+
}
|
|
10506
|
+
const getValueStateClasses = _ref3 => {
|
|
10431
10507
|
let {
|
|
10432
10508
|
column,
|
|
10433
10509
|
histogram,
|
|
10434
|
-
checkboxes,
|
|
10435
10510
|
cell,
|
|
10436
10511
|
showGray
|
|
10437
|
-
} =
|
|
10512
|
+
} = _ref3;
|
|
10513
|
+
if (!cell) {
|
|
10514
|
+
return [];
|
|
10515
|
+
}
|
|
10438
10516
|
const clazzArr = [column ? rowColClasses.column : rowColClasses.row];
|
|
10439
10517
|
if (!histogram) {
|
|
10440
10518
|
clazzArr.push(rowColClasses.rowBorderBottom);
|
|
10441
10519
|
}
|
|
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
|
-
}
|
|
10520
|
+
const selectionStateClass = getSelectionStateClass({
|
|
10521
|
+
cell,
|
|
10522
|
+
showGray
|
|
10523
|
+
});
|
|
10524
|
+
if (selectionStateClass) {
|
|
10525
|
+
clazzArr.push(selectionStateClass);
|
|
10455
10526
|
}
|
|
10456
10527
|
return clazzArr;
|
|
10457
10528
|
};
|
|
@@ -10518,15 +10589,27 @@ const getMaxFreqWidth = _ref2 => {
|
|
|
10518
10589
|
}
|
|
10519
10590
|
return sizes.freqMaxWidth;
|
|
10520
10591
|
};
|
|
10521
|
-
const
|
|
10592
|
+
const getRowSelectionStyle = _ref3 => {
|
|
10522
10593
|
let {
|
|
10523
10594
|
theme,
|
|
10595
|
+
checkboxes,
|
|
10524
10596
|
styles,
|
|
10525
|
-
|
|
10597
|
+
selectionState
|
|
10526
10598
|
} = _ref3;
|
|
10599
|
+
if (checkboxes) {
|
|
10600
|
+
if (selectionState === 'selected') {
|
|
10601
|
+
return {
|
|
10602
|
+
["& .".concat(rowColClasses.labelText)]: {
|
|
10603
|
+
// Override labels (value and frequency count) color when selected.
|
|
10604
|
+
color: styles.selections.selected
|
|
10605
|
+
}
|
|
10606
|
+
};
|
|
10607
|
+
}
|
|
10608
|
+
return {};
|
|
10609
|
+
}
|
|
10527
10610
|
const selectionStyles = styles.selections;
|
|
10528
|
-
const backgroundColor = selectionStyles[
|
|
10529
|
-
const contrastTextColor = selectionStyles["".concat(
|
|
10611
|
+
const backgroundColor = selectionStyles[selectionState];
|
|
10612
|
+
const contrastTextColor = selectionStyles["".concat(selectionState, "Contrast")];
|
|
10530
10613
|
return {
|
|
10531
10614
|
background: backgroundColor,
|
|
10532
10615
|
color: contrastTextColor,
|
|
@@ -10572,16 +10655,29 @@ const RowColRoot = styled('div', {
|
|
|
10572
10655
|
} = _ref4;
|
|
10573
10656
|
const _styles$content = styles.content,
|
|
10574
10657
|
contentFontStyles = _objectWithoutProperties(_styles$content, _excluded$6);
|
|
10575
|
-
const
|
|
10658
|
+
const rowSelectionStyle = getRowSelectionStyle({
|
|
10576
10659
|
theme,
|
|
10577
10660
|
styles,
|
|
10578
|
-
|
|
10661
|
+
checkboxes,
|
|
10662
|
+
selectionState: 'selected'
|
|
10579
10663
|
});
|
|
10580
|
-
const
|
|
10664
|
+
const rowExcludedStyle = getRowSelectionStyle({
|
|
10581
10665
|
theme,
|
|
10582
10666
|
styles,
|
|
10583
|
-
|
|
10667
|
+
checkboxes,
|
|
10668
|
+
selectionState: 'excluded'
|
|
10584
10669
|
});
|
|
10670
|
+
const barDefaultFilledStyle = {
|
|
10671
|
+
height: '100%',
|
|
10672
|
+
transition: 'width 0.2s',
|
|
10673
|
+
border: "".concat(barBorderWidthPx, "px solid"),
|
|
10674
|
+
borderColor: '#D9D9D9',
|
|
10675
|
+
// overridden by selected color (classes.S),
|
|
10676
|
+
backgroundColor: '#FAFAFA'
|
|
10677
|
+
};
|
|
10678
|
+
const barSelectedFilledStyle = {
|
|
10679
|
+
opacity: '30%'
|
|
10680
|
+
};
|
|
10585
10681
|
return {
|
|
10586
10682
|
'&:focus': {
|
|
10587
10683
|
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
|
|
@@ -10663,26 +10759,33 @@ const RowColRoot = styled('div', {
|
|
|
10663
10759
|
color: contentFontStyles.color
|
|
10664
10760
|
},
|
|
10665
10761
|
// Selection styles (S=Selected, XS=ExcludedSelected, A=Alternative, X=Excluded).
|
|
10666
|
-
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({},
|
|
10762
|
+
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, rowSelectionStyle), {}, {
|
|
10667
10763
|
border: isGridMode ? 'none' : undefined
|
|
10668
10764
|
}),
|
|
10669
|
-
["& .".concat(rowColClasses.XS)]: _objectSpread2(_objectSpread2({},
|
|
10765
|
+
["& .".concat(rowColClasses.XS)]: _objectSpread2(_objectSpread2({}, getRowSelectionStyle({
|
|
10670
10766
|
theme,
|
|
10671
10767
|
styles,
|
|
10672
|
-
|
|
10768
|
+
checkboxes,
|
|
10769
|
+
selectionState: 'selectedExcluded'
|
|
10673
10770
|
})), {}, {
|
|
10674
10771
|
border: isGridMode ? 'none' : undefined
|
|
10675
10772
|
}),
|
|
10676
|
-
["& .".concat(rowColClasses.A)]: _objectSpread2(_objectSpread2({},
|
|
10773
|
+
["& .".concat(rowColClasses.A)]: _objectSpread2(_objectSpread2({}, getRowSelectionStyle({
|
|
10677
10774
|
theme,
|
|
10678
10775
|
styles,
|
|
10679
|
-
|
|
10776
|
+
checkboxes,
|
|
10777
|
+
selectionState: 'alternative'
|
|
10680
10778
|
})), {}, {
|
|
10681
10779
|
border: isGridMode ? 'none' : undefined
|
|
10682
10780
|
}),
|
|
10683
|
-
["& .".concat(rowColClasses.X)]: _objectSpread2(_objectSpread2({},
|
|
10781
|
+
["& .".concat(rowColClasses.X)]: _objectSpread2(_objectSpread2({}, rowExcludedStyle), {}, {
|
|
10684
10782
|
border: isGridMode ? 'none' : undefined
|
|
10685
10783
|
}),
|
|
10784
|
+
["& .".concat(rowColClasses.X, ", & .").concat(rowColClasses.XS)]: {
|
|
10785
|
+
// Override the selected color for bar-filled, when the value is selected and excluded.
|
|
10786
|
+
border: isGridMode ? 'none' : undefined,
|
|
10787
|
+
["& .".concat(rowColClasses.barSelected, " .bar-filled")]: _objectSpread2({}, barDefaultFilledStyle)
|
|
10788
|
+
},
|
|
10686
10789
|
["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
|
|
10687
10790
|
zIndex: 3,
|
|
10688
10791
|
justifyContent: 'flex-end'
|
|
@@ -10718,33 +10821,23 @@ const RowColRoot = styled('div', {
|
|
|
10718
10821
|
width: "calc(100% - ".concat(barPadPx * 2, "px)"),
|
|
10719
10822
|
display: 'flex',
|
|
10720
10823
|
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
|
-
}
|
|
10824
|
+
'& .bar-filled': _objectSpread2({}, barDefaultFilledStyle)
|
|
10728
10825
|
},
|
|
10729
10826
|
["& .".concat(rowColClasses.barSelected)]: {
|
|
10730
|
-
'& .bar-filled': {
|
|
10731
|
-
opacity: '30%',
|
|
10732
|
-
background: theme.palette.background.lighter
|
|
10733
|
-
}
|
|
10827
|
+
'& .bar-filled': _objectSpread2({}, barSelectedFilledStyle)
|
|
10734
10828
|
},
|
|
10735
10829
|
["& .".concat(rowColClasses.barWithCheckbox)]: {
|
|
10736
10830
|
left: direction === 'rtl' ? barPadPx : barWithCheckboxLeftPadPx,
|
|
10737
10831
|
width: "calc(100% - ".concat(barWithCheckboxLeftPadPx + barPadPx, "px)")
|
|
10738
10832
|
},
|
|
10739
10833
|
["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
|
|
10740
|
-
'& .bar-filled': {
|
|
10741
|
-
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
}
|
|
10834
|
+
'& .bar-filled': _objectSpread2(_objectSpread2({}, barSelectedFilledStyle), {}, {
|
|
10835
|
+
backgroundColor: styles.selections.selected || '#BFE5D0',
|
|
10836
|
+
borderColor: styles.selections.selected
|
|
10837
|
+
})
|
|
10745
10838
|
},
|
|
10746
10839
|
["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
|
|
10747
|
-
color:
|
|
10840
|
+
color: styles.content.color,
|
|
10748
10841
|
fontStyle: 'italic'
|
|
10749
10842
|
}
|
|
10750
10843
|
};
|
|
@@ -11219,94 +11312,6 @@ function getCellFromPages(_ref) {
|
|
|
11219
11312
|
return c;
|
|
11220
11313
|
}
|
|
11221
11314
|
|
|
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
11315
|
const KEYS = Object.freeze({
|
|
11311
11316
|
ENTER: 13,
|
|
11312
11317
|
ESCAPE: 27,
|
|
@@ -11592,6 +11597,40 @@ function getValueTextAlign(_ref) {
|
|
|
11592
11597
|
return ALLOWED_OPTIONS.includes(valueTextAlign) ? valueTextAlign : 'left';
|
|
11593
11598
|
}
|
|
11594
11599
|
|
|
11600
|
+
const LOC_STATES = {
|
|
11601
|
+
S: 'Object.Listbox.Selected',
|
|
11602
|
+
A: 'Object.Listbox.Alternative',
|
|
11603
|
+
O: 'Object.Listbox.Optional',
|
|
11604
|
+
XS: 'Object.Listbox.SelectedExcluded',
|
|
11605
|
+
L: 'Object.Listbox.Locked',
|
|
11606
|
+
X: 'Object.Listbox.Excluded',
|
|
11607
|
+
XL: 'Object.Listbox.ExcludedLock'
|
|
11608
|
+
};
|
|
11609
|
+
function getValueLabel(_ref) {
|
|
11610
|
+
let {
|
|
11611
|
+
translator: translatorDynamic,
|
|
11612
|
+
label,
|
|
11613
|
+
qState,
|
|
11614
|
+
isSelected,
|
|
11615
|
+
currentIndex,
|
|
11616
|
+
maxIndex,
|
|
11617
|
+
showSearch
|
|
11618
|
+
} = _ref;
|
|
11619
|
+
const stateTranslation = LOC_STATES[qState];
|
|
11620
|
+
const state = translatorDynamic.get(stateTranslation);
|
|
11621
|
+
const srStringArr = [];
|
|
11622
|
+
if (isSelected) {
|
|
11623
|
+
const navTranslation = showSearch ? 'Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu' : 'Listbox.ScreenReader.SelectionMenu.WithAccSelMenu';
|
|
11624
|
+
const nav = translatorDynamic.get(navTranslation);
|
|
11625
|
+
srStringArr.push(nav);
|
|
11626
|
+
}
|
|
11627
|
+
const valueString = "".concat(label, " ").concat(state);
|
|
11628
|
+
const indexString = translatorDynamic.get('CurrentSelections.Of', [currentIndex + 1, maxIndex + 1]); // E.g. 3 of 20
|
|
11629
|
+
srStringArr.unshift(valueString, indexString);
|
|
11630
|
+
const srString = srStringArr.join('. ').trim();
|
|
11631
|
+
return srString;
|
|
11632
|
+
}
|
|
11633
|
+
|
|
11595
11634
|
function RowColumn(_ref) {
|
|
11596
11635
|
var _cell$qText, _cell$qHighlightRange;
|
|
11597
11636
|
let {
|
|
@@ -11707,10 +11746,9 @@ function RowColumn(_ref) {
|
|
|
11707
11746
|
const classArr = useMemo$1(() => getValueStateClasses({
|
|
11708
11747
|
column,
|
|
11709
11748
|
histogram,
|
|
11710
|
-
checkboxes,
|
|
11711
11749
|
cell,
|
|
11712
11750
|
showGray
|
|
11713
|
-
}), [cell === null || cell === void 0 ? void 0 : cell.qState, histogram, dense
|
|
11751
|
+
}), [cell === null || cell === void 0 ? void 0 : cell.qState, histogram, dense]);
|
|
11714
11752
|
const preventContextMenu = useCallback(event => {
|
|
11715
11753
|
event.preventDefault();
|
|
11716
11754
|
}, [checkboxes]);
|
|
@@ -14041,7 +14079,7 @@ const SvgIconRoot = styled('svg', {
|
|
|
14041
14079
|
height: '1em',
|
|
14042
14080
|
display: 'inline-block',
|
|
14043
14081
|
// the <svg> will define the property that has `currentColor`
|
|
14044
|
-
//
|
|
14082
|
+
// for example heroicons uses fill="none" and stroke="currentColor"
|
|
14045
14083
|
fill: ownerState.hasSvgAsChild ? undefined : 'currentColor',
|
|
14046
14084
|
flexShrink: 0,
|
|
14047
14085
|
transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
|
@@ -14347,6 +14385,82 @@ const useFrequencyMax = (app, layout) => {
|
|
|
14347
14385
|
};
|
|
14348
14386
|
};
|
|
14349
14387
|
|
|
14388
|
+
/**
|
|
14389
|
+
* Announces the selection state.
|
|
14390
|
+
*
|
|
14391
|
+
* @ignore
|
|
14392
|
+
* @param {Layout} object
|
|
14393
|
+
* @returns {string}
|
|
14394
|
+
*/
|
|
14395
|
+
function getSRForSelectedState(_ref) {
|
|
14396
|
+
var _layout$qListObject;
|
|
14397
|
+
let {
|
|
14398
|
+
layout,
|
|
14399
|
+
translatorDynamic
|
|
14400
|
+
} = _ref;
|
|
14401
|
+
const {
|
|
14402
|
+
qStateCounts: s = {}
|
|
14403
|
+
} = (layout === null || layout === void 0 || (_layout$qListObject = layout.qListObject) === null || _layout$qListObject === void 0 ? void 0 : _layout$qListObject.qDimensionInfo) || {};
|
|
14404
|
+
const count = s.qSelected + s.qSelectedExcluded + s.qLocked + s.qLockedExcluded;
|
|
14405
|
+
let t;
|
|
14406
|
+
switch (count) {
|
|
14407
|
+
case 0:
|
|
14408
|
+
t = 'ScreenReader.ZeroSelected';
|
|
14409
|
+
break;
|
|
14410
|
+
case 1:
|
|
14411
|
+
t = 'ScreenReader.OneSelected';
|
|
14412
|
+
break;
|
|
14413
|
+
default:
|
|
14414
|
+
t = 'ScreenReader.ManySelected';
|
|
14415
|
+
break;
|
|
14416
|
+
}
|
|
14417
|
+
const text = translatorDynamic.get(t, [count]);
|
|
14418
|
+
return text;
|
|
14419
|
+
}
|
|
14420
|
+
function getSearchTranslationString(listCount) {
|
|
14421
|
+
let t;
|
|
14422
|
+
switch (listCount) {
|
|
14423
|
+
case 0:
|
|
14424
|
+
t = 'Listbox.NoMatchesForYourTerms';
|
|
14425
|
+
break;
|
|
14426
|
+
case 1:
|
|
14427
|
+
t = 'ScreenReader.OneSearchResult';
|
|
14428
|
+
break;
|
|
14429
|
+
default:
|
|
14430
|
+
t = 'ScreenReader.ManySearchResults';
|
|
14431
|
+
break;
|
|
14432
|
+
}
|
|
14433
|
+
return t;
|
|
14434
|
+
}
|
|
14435
|
+
function getScreenReaderAssertiveText(_ref2) {
|
|
14436
|
+
let {
|
|
14437
|
+
layout,
|
|
14438
|
+
searchInputText,
|
|
14439
|
+
listCount
|
|
14440
|
+
} = _ref2;
|
|
14441
|
+
const {
|
|
14442
|
+
translator: translatorDynamic
|
|
14443
|
+
} = useContext(InstanceContext);
|
|
14444
|
+
const finalStringArr = [];
|
|
14445
|
+
if (searchInputText !== null && searchInputText !== void 0 && searchInputText.length) {
|
|
14446
|
+
// Add search result text.
|
|
14447
|
+
const srSearchTranslationString = getSearchTranslationString(listCount);
|
|
14448
|
+
const srSearchString = translatorDynamic.get(srSearchTranslationString, [listCount]);
|
|
14449
|
+
finalStringArr.push(srSearchString);
|
|
14450
|
+
}
|
|
14451
|
+
|
|
14452
|
+
// Add selection value text.
|
|
14453
|
+
const srSelectionValueText = getSRForSelectedState({
|
|
14454
|
+
layout,
|
|
14455
|
+
translatorDynamic
|
|
14456
|
+
});
|
|
14457
|
+
finalStringArr.push(srSelectionValueText);
|
|
14458
|
+
|
|
14459
|
+
// Merge texts into one text string, targeting the assertive screen reader.
|
|
14460
|
+
const finalString = finalStringArr.filter(v => !!(v !== null && v !== void 0 && v.length)).join('. ');
|
|
14461
|
+
return finalString;
|
|
14462
|
+
}
|
|
14463
|
+
|
|
14350
14464
|
function deduceFrequencyMode(pages) {
|
|
14351
14465
|
const hasPercentSign = pages.some(_ref => {
|
|
14352
14466
|
let {
|
|
@@ -14415,7 +14529,6 @@ function ListBox(_ref) {
|
|
|
14415
14529
|
checkboxes = checkboxOption,
|
|
14416
14530
|
histogram
|
|
14417
14531
|
} = layout !== null && layout !== void 0 ? layout : {};
|
|
14418
|
-
const [screenReaderText, setScreenReaderText] = useState$1('');
|
|
14419
14532
|
const loaderRef = useRef(null);
|
|
14420
14533
|
const local = useRef({
|
|
14421
14534
|
queue: [],
|
|
@@ -14573,14 +14686,12 @@ function ListBox(_ref) {
|
|
|
14573
14686
|
listCount
|
|
14574
14687
|
} = sizes;
|
|
14575
14688
|
setStoreValue('listCount', listCount);
|
|
14576
|
-
const
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
}
|
|
14583
|
-
}, [inputText, listCount]);
|
|
14689
|
+
const searchInputText = getStoreValue('inputText');
|
|
14690
|
+
const screenReaderText = getScreenReaderAssertiveText({
|
|
14691
|
+
layout,
|
|
14692
|
+
searchInputText,
|
|
14693
|
+
listCount
|
|
14694
|
+
});
|
|
14584
14695
|
const setScrollPosition = position => {
|
|
14585
14696
|
const {
|
|
14586
14697
|
scrollIndex,
|
|
@@ -14689,10 +14800,7 @@ function ListBox(_ref) {
|
|
|
14689
14800
|
itemHeight
|
|
14690
14801
|
});
|
|
14691
14802
|
}
|
|
14692
|
-
return /*#__PURE__*/React__default.createElement(StyledWrapper, null, /*#__PURE__*/React__default.createElement(
|
|
14693
|
-
className: "screenReaderOnly",
|
|
14694
|
-
layout: layout
|
|
14695
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
14803
|
+
return /*#__PURE__*/React__default.createElement(StyledWrapper, null, /*#__PURE__*/React__default.createElement("div", {
|
|
14696
14804
|
className: "screenReaderOnly",
|
|
14697
14805
|
"aria-live": "assertive"
|
|
14698
14806
|
}, screenReaderText), !listCount && cardinal > 0 && /*#__PURE__*/React__default.createElement(ListBoxDisclaimer, {
|
|
@@ -15354,6 +15462,9 @@ function ActionsToolbar(_ref3) {
|
|
|
15354
15462
|
transformOrigin: popoverTransformOrigin,
|
|
15355
15463
|
hideBackdrop: true,
|
|
15356
15464
|
style: popoverStyle,
|
|
15465
|
+
onMouseDown: e => {
|
|
15466
|
+
e.stopPropagation(); // prevent click through, closing when it should not
|
|
15467
|
+
},
|
|
15357
15468
|
slotProps: {
|
|
15358
15469
|
paper: {
|
|
15359
15470
|
id: 'njs-action-toolbar-popover',
|
|
@@ -15378,8 +15489,10 @@ const search = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
15378
15489
|
});
|
|
15379
15490
|
var SearchIcon = (props => SvgIcon$1(search(props)));
|
|
15380
15491
|
|
|
15492
|
+
const MAX_SEARCH_LENGTH = 64000;
|
|
15381
15493
|
const TREE_PATH = '/qListObjectDef';
|
|
15382
15494
|
const WILDCARD = '**';
|
|
15495
|
+
const limitSearchLength = val => val === null || val === void 0 ? void 0 : val.substring(0, MAX_SEARCH_LENGTH);
|
|
15383
15496
|
const StyledOutlinedInput = styled(OutlinedInput, {
|
|
15384
15497
|
shouldForwardProp: p => !['styles', 'dense', 'isRtl'].includes(p)
|
|
15385
15498
|
})(_ref => {
|
|
@@ -15488,20 +15601,18 @@ function ListBoxSearch(_ref2) {
|
|
|
15488
15601
|
setStoreValue('inputText', value);
|
|
15489
15602
|
}, [value]);
|
|
15490
15603
|
const onChange = async e => {
|
|
15491
|
-
|
|
15492
|
-
|
|
15604
|
+
const searchValue = limitSearchLength(e.target.value);
|
|
15605
|
+
setValue(searchValue);
|
|
15606
|
+
if (!searchValue.length) {
|
|
15493
15607
|
return abortSearch();
|
|
15494
15608
|
}
|
|
15495
|
-
return model.searchListObjectFor(TREE_PATH,
|
|
15609
|
+
return model.searchListObjectFor(TREE_PATH, searchValue);
|
|
15496
15610
|
};
|
|
15497
15611
|
const handleFocus = () => {
|
|
15498
15612
|
if (wildCardSearch) {
|
|
15499
15613
|
setValue(WILDCARD);
|
|
15500
15614
|
setWildcardOn(true);
|
|
15501
15615
|
}
|
|
15502
|
-
if (!selectionState.selectDisabled() && !selections.isModal()) {
|
|
15503
|
-
selections.begin(['/qListObjectDef']);
|
|
15504
|
-
}
|
|
15505
15616
|
};
|
|
15506
15617
|
const hasHits = () => {
|
|
15507
15618
|
const listCount = getStoreValue("listCount");
|
|
@@ -15509,11 +15620,12 @@ function ListBoxSearch(_ref2) {
|
|
|
15509
15620
|
};
|
|
15510
15621
|
const performSearch = async () => {
|
|
15511
15622
|
let response;
|
|
15512
|
-
const
|
|
15623
|
+
const searchValue = limitSearchLength(value);
|
|
15624
|
+
const success = await model.searchListObjectFor(TREE_PATH, searchValue);
|
|
15513
15625
|
if (selectionState.selectDisabled()) {
|
|
15514
15626
|
return success;
|
|
15515
15627
|
}
|
|
15516
|
-
if (success &&
|
|
15628
|
+
if (success && searchValue.length && hasHits()) {
|
|
15517
15629
|
response = model.acceptListObjectSearch(TREE_PATH, true);
|
|
15518
15630
|
// eslint-disable-next-line no-param-reassign
|
|
15519
15631
|
selections.selectionsMade = true;
|
|
@@ -19422,6 +19534,7 @@ class AutoSizer extends Component {
|
|
|
19422
19534
|
defaultWidth,
|
|
19423
19535
|
disableHeight = false,
|
|
19424
19536
|
disableWidth = false,
|
|
19537
|
+
doNotBailOutOnEmptyChildren = false,
|
|
19425
19538
|
nonce,
|
|
19426
19539
|
onResize,
|
|
19427
19540
|
style = {},
|
|
@@ -19462,6 +19575,9 @@ class AutoSizer extends Component {
|
|
|
19462
19575
|
childParams.width = width;
|
|
19463
19576
|
childParams.scaledWidth = scaledWidth;
|
|
19464
19577
|
}
|
|
19578
|
+
if (doNotBailOutOnEmptyChildren) {
|
|
19579
|
+
bailoutOnChildren = false;
|
|
19580
|
+
}
|
|
19465
19581
|
return createElement(tagName, {
|
|
19466
19582
|
ref: this._setRef,
|
|
19467
19583
|
style: {
|
|
@@ -19743,16 +19859,6 @@ function getContainerPadding(_ref) {
|
|
|
19743
19859
|
return containerPadding;
|
|
19744
19860
|
}
|
|
19745
19861
|
|
|
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
19862
|
function showToolbarDetached(_ref) {
|
|
19757
19863
|
var _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
|
|
19758
19864
|
let {
|
|
@@ -19908,6 +20014,127 @@ function UnlockCoverButton(_ref4) {
|
|
|
19908
20014
|
return component;
|
|
19909
20015
|
}
|
|
19910
20016
|
|
|
20017
|
+
const cyclic = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20018
|
+
shapes: [{
|
|
20019
|
+
type: 'path',
|
|
20020
|
+
attrs: {
|
|
20021
|
+
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'
|
|
20022
|
+
}
|
|
20023
|
+
}]
|
|
20024
|
+
});
|
|
20025
|
+
var CyclicIcon = (props => SvgIcon$1(cyclic(props)));
|
|
20026
|
+
|
|
20027
|
+
const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20028
|
+
shapes: [{
|
|
20029
|
+
type: 'path',
|
|
20030
|
+
attrs: {
|
|
20031
|
+
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'
|
|
20032
|
+
}
|
|
20033
|
+
}]
|
|
20034
|
+
});
|
|
20035
|
+
var DrillDownIcon = (props => SvgIcon$1(drillDown(props)));
|
|
20036
|
+
|
|
20037
|
+
const reload = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
20038
|
+
shapes: [{
|
|
20039
|
+
type: 'path',
|
|
20040
|
+
attrs: {
|
|
20041
|
+
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'
|
|
20042
|
+
}
|
|
20043
|
+
}]
|
|
20044
|
+
});
|
|
20045
|
+
var ReloadIcon = (props => SvgIcon$1(reload(props)));
|
|
20046
|
+
|
|
20047
|
+
const dimensionTypes = {
|
|
20048
|
+
single: 'N',
|
|
20049
|
+
drillDown: 'H',
|
|
20050
|
+
cyclic: 'C'
|
|
20051
|
+
};
|
|
20052
|
+
const createDimensionIconData = _ref => {
|
|
20053
|
+
let {
|
|
20054
|
+
dimInfo,
|
|
20055
|
+
app,
|
|
20056
|
+
selections,
|
|
20057
|
+
isPopover,
|
|
20058
|
+
active
|
|
20059
|
+
} = _ref;
|
|
20060
|
+
switch (dimInfo.qGrouping) {
|
|
20061
|
+
case dimensionTypes.drillDown:
|
|
20062
|
+
return {
|
|
20063
|
+
icon: DrillDownIcon,
|
|
20064
|
+
tooltip: 'Listbox.DrillDown',
|
|
20065
|
+
onClick: undefined
|
|
20066
|
+
};
|
|
20067
|
+
case dimensionTypes.cyclic:
|
|
20068
|
+
{
|
|
20069
|
+
const clickable = app && active;
|
|
20070
|
+
return {
|
|
20071
|
+
icon: clickable ? ReloadIcon : CyclicIcon,
|
|
20072
|
+
tooltip: 'Listbox.Cyclic',
|
|
20073
|
+
onClick: clickable ? () => {
|
|
20074
|
+
if (!isPopover) {
|
|
20075
|
+
selections.confirm();
|
|
20076
|
+
}
|
|
20077
|
+
app.getDimension(dimInfo.qLibraryId).then(dimensionModel => {
|
|
20078
|
+
if (!dimensionModel.stepCycle) {
|
|
20079
|
+
// eslint-disable-next-line no-console
|
|
20080
|
+
console.log("engine api spec version doesn't have support for function stepCycle");
|
|
20081
|
+
return;
|
|
20082
|
+
}
|
|
20083
|
+
dimensionModel.stepCycle(1);
|
|
20084
|
+
}).catch(() => null);
|
|
20085
|
+
} : undefined
|
|
20086
|
+
};
|
|
20087
|
+
}
|
|
20088
|
+
default:
|
|
20089
|
+
return undefined;
|
|
20090
|
+
}
|
|
20091
|
+
};
|
|
20092
|
+
var iconUtils = {
|
|
20093
|
+
createDimensionIconData
|
|
20094
|
+
};
|
|
20095
|
+
|
|
20096
|
+
const StyledButton = styled$3(Button)(() => ({
|
|
20097
|
+
borderRadius: 4,
|
|
20098
|
+
width: 24,
|
|
20099
|
+
height: 24,
|
|
20100
|
+
minWidth: 22,
|
|
20101
|
+
padding: 0
|
|
20102
|
+
}));
|
|
20103
|
+
function DimensionIcon(_ref) {
|
|
20104
|
+
let {
|
|
20105
|
+
iconData,
|
|
20106
|
+
translator,
|
|
20107
|
+
iconStyle,
|
|
20108
|
+
disabled
|
|
20109
|
+
} = _ref;
|
|
20110
|
+
if (!iconData) return undefined;
|
|
20111
|
+
const {
|
|
20112
|
+
icon,
|
|
20113
|
+
tooltip,
|
|
20114
|
+
onClick
|
|
20115
|
+
} = iconData;
|
|
20116
|
+
const Icon = icon;
|
|
20117
|
+
const title = translator.get(tooltip);
|
|
20118
|
+
const isButton = onClick;
|
|
20119
|
+
return isButton ? /*#__PURE__*/React__default.createElement(StyledButton, {
|
|
20120
|
+
variant: "outlined",
|
|
20121
|
+
onClick: onClick,
|
|
20122
|
+
tabIndex: -1,
|
|
20123
|
+
title: title,
|
|
20124
|
+
size: "large",
|
|
20125
|
+
disableRipple: true,
|
|
20126
|
+
disabled: disabled
|
|
20127
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
20128
|
+
style: iconStyle
|
|
20129
|
+
})) : /*#__PURE__*/React__default.createElement(Icon, {
|
|
20130
|
+
title: title,
|
|
20131
|
+
size: "large",
|
|
20132
|
+
style: _objectSpread2(_objectSpread2({}, iconStyle), {}, {
|
|
20133
|
+
padding: "".concat(ICON_PADDING, "px")
|
|
20134
|
+
})
|
|
20135
|
+
});
|
|
20136
|
+
}
|
|
20137
|
+
|
|
19911
20138
|
// ms that needs to pass before the lock button can be toggled again
|
|
19912
20139
|
const lockTimeFrameMs = 500;
|
|
19913
20140
|
let lastTime = 0;
|
|
@@ -19942,7 +20169,7 @@ function getToggleLock(_ref) {
|
|
|
19942
20169
|
};
|
|
19943
20170
|
}
|
|
19944
20171
|
function ListBoxHeader(_ref2) {
|
|
19945
|
-
var _layout$qListObject, _layout$qListObject3;
|
|
20172
|
+
var _layout$qListObject, _layout$qListObject3, _layout$qListObject4;
|
|
19946
20173
|
let {
|
|
19947
20174
|
layout,
|
|
19948
20175
|
translator,
|
|
@@ -19950,7 +20177,6 @@ function ListBoxHeader(_ref2) {
|
|
|
19950
20177
|
isRtl,
|
|
19951
20178
|
showLock,
|
|
19952
20179
|
showSearchIcon,
|
|
19953
|
-
isDrillDown,
|
|
19954
20180
|
constraints,
|
|
19955
20181
|
onShowSearch,
|
|
19956
20182
|
classes,
|
|
@@ -19964,7 +20190,9 @@ function ListBoxHeader(_ref2) {
|
|
|
19964
20190
|
isDirectQuery,
|
|
19965
20191
|
selections,
|
|
19966
20192
|
keyboard,
|
|
19967
|
-
autoConfirm
|
|
20193
|
+
autoConfirm,
|
|
20194
|
+
app,
|
|
20195
|
+
isInSelection
|
|
19968
20196
|
} = _ref2;
|
|
19969
20197
|
const [isToolbarDetached, setIsToolbarDetached] = useState$1(showDetachedToolbarOnly);
|
|
19970
20198
|
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 +20202,22 @@ function ListBoxHeader(_ref2) {
|
|
|
19974
20202
|
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
20203
|
}, [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
20204
|
const titleRef = useRef(null);
|
|
20205
|
+
const iconData = iconUtils.createDimensionIconData({
|
|
20206
|
+
dimInfo: layout === null || layout === void 0 || (_layout$qListObject4 = layout.qListObject) === null || _layout$qListObject4 === void 0 ? void 0 : _layout$qListObject4.qDimensionInfo,
|
|
20207
|
+
app,
|
|
20208
|
+
selections,
|
|
20209
|
+
isPopover,
|
|
20210
|
+
active: !(constraints !== null && constraints !== void 0 && constraints.active)
|
|
20211
|
+
});
|
|
19977
20212
|
const showUnlock = showLock && isLocked;
|
|
19978
20213
|
const showLockIcon = !showLock && isLocked; // shows instead of the cover button when field/dim is locked.
|
|
19979
|
-
const showLeftIcon = showSearchIcon || showLockIcon ||
|
|
20214
|
+
const showLeftIcon = showSearchIcon || showLockIcon || iconData; // the left-most icon outside of the actions/selections toolbar.
|
|
19980
20215
|
|
|
19981
20216
|
const paddingLeft = CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0);
|
|
19982
20217
|
const paddingRight = isRtl ? CELL_PADDING_LEFT - (showLeftIcon ? ICON_PADDING : 0) : HEADER_PADDING_RIGHT;
|
|
19983
20218
|
|
|
19984
20219
|
// 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) + (
|
|
20220
|
+
const iconsWidth = (showSearchIcon ? BUTTON_ICON_WIDTH : 0) + (showLockIcon ? BUTTON_ICON_WIDTH : 0) + (iconData ? BUTTON_ICON_WIDTH : 0);
|
|
19986
20221
|
const toggleLock = getToggleLock({
|
|
19987
20222
|
isLocked,
|
|
19988
20223
|
setLocked,
|
|
@@ -20081,12 +20316,11 @@ function ListBoxHeader(_ref2) {
|
|
|
20081
20316
|
alignItems: "center",
|
|
20082
20317
|
width: iconsWidth,
|
|
20083
20318
|
className: "header-action-container"
|
|
20084
|
-
}, lockedIconComp || showSearchIcon && searchIconComp,
|
|
20085
|
-
|
|
20086
|
-
|
|
20087
|
-
|
|
20088
|
-
|
|
20089
|
-
})
|
|
20319
|
+
}, lockedIconComp || showSearchIcon && searchIconComp, /*#__PURE__*/React__default.createElement(DimensionIcon, {
|
|
20320
|
+
iconData: iconData,
|
|
20321
|
+
iconStyle: iconStyle,
|
|
20322
|
+
disabled: isInSelection && isPopover,
|
|
20323
|
+
translator: translator
|
|
20090
20324
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
20091
20325
|
item: true,
|
|
20092
20326
|
xs: true,
|
|
@@ -20156,7 +20390,7 @@ const isModal = _ref2 => {
|
|
|
20156
20390
|
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
20391
|
};
|
|
20158
20392
|
function ListBoxInline(_ref3) {
|
|
20159
|
-
var _layout$qListObject, _layout$
|
|
20393
|
+
var _layout$qListObject, _layout$title, _layoutOptions$dense, _containerRef$current;
|
|
20160
20394
|
let {
|
|
20161
20395
|
options,
|
|
20162
20396
|
layout
|
|
@@ -20246,6 +20480,7 @@ function ListBoxInline(_ref3) {
|
|
|
20246
20480
|
}), [app, appSelections]);
|
|
20247
20481
|
const isInvalid = layout === null || layout === void 0 ? void 0 : layout.qListObject.qDimensionInfo.qError;
|
|
20248
20482
|
const errorText = isInvalid && constraints.active ? 'Visualization.Invalid.Dimension' : 'Visualization.Incomplete';
|
|
20483
|
+
const [isInSelection, setIsInSelection] = useState$1(false);
|
|
20249
20484
|
const {
|
|
20250
20485
|
handleKeyDown,
|
|
20251
20486
|
handleOnMouseEnter,
|
|
@@ -20274,9 +20509,11 @@ function ListBoxInline(_ref3) {
|
|
|
20274
20509
|
}
|
|
20275
20510
|
const show = () => {
|
|
20276
20511
|
setShowToolbar(true);
|
|
20512
|
+
setIsInSelection(true);
|
|
20277
20513
|
};
|
|
20278
20514
|
const hide = () => {
|
|
20279
20515
|
setShowToolbar(false);
|
|
20516
|
+
setIsInSelection(false);
|
|
20280
20517
|
if (search === 'toggle') {
|
|
20281
20518
|
setShowSearch(false);
|
|
20282
20519
|
}
|
|
@@ -20284,7 +20521,6 @@ function ListBoxInline(_ref3) {
|
|
|
20284
20521
|
if (isPopover) {
|
|
20285
20522
|
// When isPopover, toolbar == false will be ignored.
|
|
20286
20523
|
if (!selections.isActive()) {
|
|
20287
|
-
selections.begin('/qListObjectDef');
|
|
20288
20524
|
selections.on('activated', show);
|
|
20289
20525
|
selections.on('deactivated', hide);
|
|
20290
20526
|
}
|
|
@@ -20322,7 +20558,6 @@ function ListBoxInline(_ref3) {
|
|
|
20322
20558
|
} = layout !== null && layout !== void 0 ? layout : {};
|
|
20323
20559
|
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
20560
|
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
20561
|
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
20562
|
const showDetachedToolbarOnly = toolbar && !canShowTitle && !isPopover;
|
|
20328
20563
|
const showAttachedToolbar = toolbar && canShowTitle || isPopover;
|
|
@@ -20360,8 +20595,8 @@ function ListBoxInline(_ref3) {
|
|
|
20360
20595
|
}
|
|
20361
20596
|
const listBoxMinHeight = showAttachedToolbar ? DENSE_ROW_HEIGHT + SCROLL_BAR_WIDTH : 0;
|
|
20362
20597
|
const listBoxHeader = /*#__PURE__*/React__default.createElement(ListBoxHeader, {
|
|
20598
|
+
app: app,
|
|
20363
20599
|
showSearchIcon: showSearchIcon,
|
|
20364
|
-
isDrillDown: isDrillDown,
|
|
20365
20600
|
onShowSearch: handleShowSearch,
|
|
20366
20601
|
isPopover: isPopover,
|
|
20367
20602
|
showToolbar: showToolbar,
|
|
@@ -20380,7 +20615,8 @@ function ListBoxInline(_ref3) {
|
|
|
20380
20615
|
model: model,
|
|
20381
20616
|
selectionState: selectionState$1,
|
|
20382
20617
|
selections: selections,
|
|
20383
|
-
keyboard: keyboard
|
|
20618
|
+
keyboard: keyboard,
|
|
20619
|
+
isInSelection: isInSelection
|
|
20384
20620
|
});
|
|
20385
20621
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showDetachedToolbarOnly && listBoxHeader, /*#__PURE__*/React__default.createElement(StyledGrid$3, {
|
|
20386
20622
|
className: "listbox-container",
|
|
@@ -20545,7 +20781,7 @@ function useExistingModel(_ref) {
|
|
|
20545
20781
|
/**
|
|
20546
20782
|
* Extends `ListObjectDef`, see Engine API: `ListObjectDef`.
|
|
20547
20783
|
* @interface ListObjectDef
|
|
20548
|
-
* @extends
|
|
20784
|
+
* @extends qix.ListObjectDef
|
|
20549
20785
|
* @property {boolean} [frequencyEnabled=false] Show frequency count. also requires qListObjectDef.qFrequencyMode to be set
|
|
20550
20786
|
*/
|
|
20551
20787
|
|
|
@@ -21384,10 +21620,10 @@ async function populateData(_ref, halo) {
|
|
|
21384
21620
|
/**
|
|
21385
21621
|
* @since 1.1.0
|
|
21386
21622
|
* @interface ExportDataDef
|
|
21387
|
-
* @property {
|
|
21388
|
-
* @property {
|
|
21389
|
-
* @property {
|
|
21390
|
-
* @property {
|
|
21623
|
+
* @property {qix.NxDimension[]} dimensions
|
|
21624
|
+
* @property {qix.NxMeasure[]} measures
|
|
21625
|
+
* @property {qix.NxDimension[]} excludedDimensions
|
|
21626
|
+
* @property {qix.NxMeasure[]} excludedMeasures
|
|
21391
21627
|
* @property {number[]} interColumnSortOrder
|
|
21392
21628
|
*/
|
|
21393
21629
|
|
|
@@ -24604,7 +24840,7 @@ function useRect() {
|
|
|
24604
24840
|
/**
|
|
24605
24841
|
* Gets the layout of the generic object associated with this visualization.
|
|
24606
24842
|
* @entry
|
|
24607
|
-
* @returns {
|
|
24843
|
+
* @returns {qix.GenericObjectLayout}
|
|
24608
24844
|
* @example
|
|
24609
24845
|
* import { useLayout } from '@nebula.js/stardust';
|
|
24610
24846
|
* // ...
|
|
@@ -24624,7 +24860,7 @@ function useLayout() {
|
|
|
24624
24860
|
* The returned value from `useStaleLayout()` and `useLayout()` are identical when the object
|
|
24625
24861
|
* is not in a modal state.
|
|
24626
24862
|
* @entry
|
|
24627
|
-
* @returns {
|
|
24863
|
+
* @returns {qix.GenericObjectLayout}
|
|
24628
24864
|
* @example
|
|
24629
24865
|
* import { useStaleLayout } from '@nebula.js/stardust';
|
|
24630
24866
|
* // ...
|
|
@@ -24645,7 +24881,7 @@ function useStaleLayout() {
|
|
|
24645
24881
|
/**
|
|
24646
24882
|
* Gets the layout of the app associated with this visualization.
|
|
24647
24883
|
* @entry
|
|
24648
|
-
* @returns {
|
|
24884
|
+
* @returns {qix.NxAppLayout} The app layout
|
|
24649
24885
|
* @example
|
|
24650
24886
|
* import { useAppLayout } from '@nebula.js/stardust';
|
|
24651
24887
|
* // ...
|
|
@@ -24659,7 +24895,7 @@ function useAppLayout() {
|
|
|
24659
24895
|
/**
|
|
24660
24896
|
* Gets the generic object API of the generic object connected to this visualization.
|
|
24661
24897
|
* @entry
|
|
24662
|
-
* @returns {
|
|
24898
|
+
* @returns {qix.GenericObject|undefined}
|
|
24663
24899
|
* @example
|
|
24664
24900
|
* import { useModel } from '@nebula.js/stardust';
|
|
24665
24901
|
* // ...
|
|
@@ -24678,7 +24914,7 @@ function useModel() {
|
|
|
24678
24914
|
/**
|
|
24679
24915
|
* Gets the doc API.
|
|
24680
24916
|
* @entry
|
|
24681
|
-
* @returns {
|
|
24917
|
+
* @returns {qix.Doc|undefined} The doc API.
|
|
24682
24918
|
* @example
|
|
24683
24919
|
* import { useApp } from '@nebula.js/stardust';
|
|
24684
24920
|
* // ...
|
|
@@ -24697,7 +24933,7 @@ function useApp() {
|
|
|
24697
24933
|
/**
|
|
24698
24934
|
* Gets the global API.
|
|
24699
24935
|
* @entry
|
|
24700
|
-
* @returns {
|
|
24936
|
+
* @returns {qix.Global|undefined} The global API.
|
|
24701
24937
|
* @example
|
|
24702
24938
|
* import { useGlobal } from '@nebula.js/stardust';
|
|
24703
24939
|
*
|
|
@@ -24747,7 +24983,7 @@ function useSelections() {
|
|
|
24747
24983
|
* import { useTheme } from '@nebula.js/stardust';
|
|
24748
24984
|
*
|
|
24749
24985
|
* const theme = useTheme();
|
|
24750
|
-
* console.log(theme.
|
|
24986
|
+
* console.log(theme.getContrastingColorTo('#ff0000'));
|
|
24751
24987
|
*/
|
|
24752
24988
|
function useTheme() {
|
|
24753
24989
|
return useInternalContext('theme');
|
|
@@ -24940,7 +25176,7 @@ function useConstraints() {
|
|
|
24940
25176
|
* @interface Interactions
|
|
24941
25177
|
* @property {boolean=} passive=true Whether or not passive interactions are on. Allows passive interaction by users, ie: tooltips
|
|
24942
25178
|
* @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.
|
|
25179
|
+
* @property {boolean=} select=true Whether or not select interactions are on. Allows selection actions. Implied when active is false.
|
|
24944
25180
|
* @property {boolean=} edit=false Whether or not edit actions are on. Allows edit actions.
|
|
24945
25181
|
*/
|
|
24946
25182
|
/**
|
|
@@ -25068,7 +25304,7 @@ function useImperativeHandle(fn, deps) {
|
|
|
25068
25304
|
/**
|
|
25069
25305
|
* Registers a callback that is called when a snapshot is taken.
|
|
25070
25306
|
* @entry
|
|
25071
|
-
* @param {function(
|
|
25307
|
+
* @param {function(qix.GenericObjectLayout): Promise<qix.GenericObjectLayout>} snapshotCallback
|
|
25072
25308
|
* @example
|
|
25073
25309
|
* import { onTakeSnapshot } from '@nebula.js/stardust';
|
|
25074
25310
|
* import { useState } from '@nebula.js/stardust';
|
|
@@ -25129,7 +25365,7 @@ function onContextMenu(cb) {
|
|
|
25129
25365
|
*
|
|
25130
25366
|
* const renderState = useRenderState();
|
|
25131
25367
|
* useState(() => {
|
|
25132
|
-
* if(
|
|
25368
|
+
* if(needPropertiesUpdate(...)) {
|
|
25133
25369
|
* useRenderState.pending();
|
|
25134
25370
|
* updateProperties(...);
|
|
25135
25371
|
* } else {
|
|
@@ -25671,7 +25907,7 @@ const noop = () => {};
|
|
|
25671
25907
|
|
|
25672
25908
|
/**
|
|
25673
25909
|
* @interface QAEDefinition
|
|
25674
|
-
* @property {
|
|
25910
|
+
* @property {qix.GenericObjectProperties=} properties
|
|
25675
25911
|
* @property {object=} data
|
|
25676
25912
|
* @property {DataTarget[]} data.targets
|
|
25677
25913
|
* @property {importProperties=} importProperties
|
|
@@ -25681,22 +25917,22 @@ const noop = () => {};
|
|
|
25681
25917
|
/**
|
|
25682
25918
|
* @interface DataTarget
|
|
25683
25919
|
* @property {string} path
|
|
25684
|
-
* @property {FieldTarget<
|
|
25685
|
-
* @property {FieldTarget<
|
|
25920
|
+
* @property {FieldTarget<qix.NxDimension>=} dimensions
|
|
25921
|
+
* @property {FieldTarget<qix.NxMeasure>=} measures
|
|
25686
25922
|
*/
|
|
25687
25923
|
|
|
25688
25924
|
/**
|
|
25689
25925
|
* @callback fieldTargetAddedCallback
|
|
25690
25926
|
* @template T
|
|
25691
25927
|
* @param {T} field
|
|
25692
|
-
* @param {
|
|
25928
|
+
* @param {qix.GenericObjectProperties} properties
|
|
25693
25929
|
*/
|
|
25694
25930
|
|
|
25695
25931
|
/**
|
|
25696
25932
|
* @callback fieldTargetRemovedCallback
|
|
25697
25933
|
* @template T
|
|
25698
25934
|
* @param {T} field
|
|
25699
|
-
* @param {
|
|
25935
|
+
* @param {qix.GenericObjectProperties} properties
|
|
25700
25936
|
* @param {number} index
|
|
25701
25937
|
*/
|
|
25702
25938
|
|
|
@@ -25960,7 +26196,7 @@ function viz() {
|
|
|
25960
26196
|
id: model.id,
|
|
25961
26197
|
/**
|
|
25962
26198
|
* This visualizations Enigma model, a representation of the generic object.
|
|
25963
|
-
* @type {
|
|
26199
|
+
* @type {qix.GenericObject}
|
|
25964
26200
|
*/
|
|
25965
26201
|
model,
|
|
25966
26202
|
/**
|
|
@@ -26081,7 +26317,6 @@ function viz() {
|
|
|
26081
26317
|
},
|
|
26082
26318
|
/**
|
|
26083
26319
|
* Listens to custom events from inside the visualization. See useEmitter
|
|
26084
|
-
* @experimental
|
|
26085
26320
|
* @param {string} eventName Event name to listen to
|
|
26086
26321
|
* @param {Function} listener Callback function to invoke
|
|
26087
26322
|
*/
|
|
@@ -26090,7 +26325,6 @@ function viz() {
|
|
|
26090
26325
|
},
|
|
26091
26326
|
/**
|
|
26092
26327
|
* Removes a listener
|
|
26093
|
-
* @experimental
|
|
26094
26328
|
* @param {string} eventName Event name to remove from
|
|
26095
26329
|
* @param {Function} listener Callback function to remove
|
|
26096
26330
|
*/
|
|
@@ -26105,6 +26339,16 @@ function viz() {
|
|
|
26105
26339
|
await rendered;
|
|
26106
26340
|
return cellRef.current.getImperativeHandle();
|
|
26107
26341
|
},
|
|
26342
|
+
/**
|
|
26343
|
+
* Takes a snapshot of the Viz layout and state
|
|
26344
|
+
* @experimental
|
|
26345
|
+
* @private
|
|
26346
|
+
* @returns {Promise<object>} viz layout object with snapshot settings
|
|
26347
|
+
*/
|
|
26348
|
+
async takeSnapshot() {
|
|
26349
|
+
await rendered;
|
|
26350
|
+
return cellRef.current.takeSnapshot();
|
|
26351
|
+
},
|
|
26108
26352
|
// ===== unexposed experimental API - use at own risk ======
|
|
26109
26353
|
__DO_NOT_USE__: {
|
|
26110
26354
|
mount(element) {
|
|
@@ -26239,7 +26483,7 @@ async function init(model, optional, halo, initialError) {
|
|
|
26239
26483
|
}
|
|
26240
26484
|
|
|
26241
26485
|
/**
|
|
26242
|
-
* @typedef {string |
|
|
26486
|
+
* @typedef {string | qix.NxDimension | qix.NxMeasure | LibraryField} Field
|
|
26243
26487
|
*/
|
|
26244
26488
|
|
|
26245
26489
|
/**
|
|
@@ -26253,7 +26497,7 @@ async function init(model, optional, halo, initialError) {
|
|
|
26253
26497
|
* @property {string=} version For creating objects: Version of visualization to render
|
|
26254
26498
|
* @property {(Field[])=} fields For creating objects: Data fields to use
|
|
26255
26499
|
* @property {boolean=} [extendProperties=false] For creating objects: Whether to deeply extend properties or not. If false then subtrees will be overwritten.
|
|
26256
|
-
* @property {
|
|
26500
|
+
* @property {qix.GenericObjectProperties=} properties For creating objects: Explicit properties to set
|
|
26257
26501
|
* @example
|
|
26258
26502
|
* // A config for Creating objects:
|
|
26259
26503
|
* const createConfig = {
|
|
@@ -26344,7 +26588,7 @@ async function createSessionObject(_ref, halo, store) {
|
|
|
26344
26588
|
}
|
|
26345
26589
|
|
|
26346
26590
|
/**
|
|
26347
|
-
* @typedef {string |
|
|
26591
|
+
* @typedef {string | qix.NxDimension | qix.NxMeasure | LibraryField} Field
|
|
26348
26592
|
*/
|
|
26349
26593
|
|
|
26350
26594
|
/**
|
|
@@ -26353,7 +26597,7 @@ async function createSessionObject(_ref, halo, store) {
|
|
|
26353
26597
|
* @property {string} type
|
|
26354
26598
|
* @property {string=} version
|
|
26355
26599
|
* @property {(Field[])=} fields
|
|
26356
|
-
* @property {
|
|
26600
|
+
* @property {qix.GenericObjectProperties=} properties
|
|
26357
26601
|
*/
|
|
26358
26602
|
|
|
26359
26603
|
async function createObject(_ref, halo, generateOnly, store) {
|
|
@@ -29074,7 +29318,10 @@ const DEFAULT_CONFIG = {
|
|
|
29074
29318
|
themes: [],
|
|
29075
29319
|
anything: {},
|
|
29076
29320
|
flags: {
|
|
29077
|
-
KPI_REACTCOLORPICKER: true
|
|
29321
|
+
KPI_REACTCOLORPICKER: true,
|
|
29322
|
+
IM_1869_HIDE_DIM_MEA_LINE: true,
|
|
29323
|
+
IM_1579_HIDE_DIM_MEA: true,
|
|
29324
|
+
CLIENT_IM_3365: true
|
|
29078
29325
|
},
|
|
29079
29326
|
snapshot: DEFAULT_SNAPSHOT_CONFIG
|
|
29080
29327
|
};
|
|
@@ -29155,7 +29402,7 @@ function nuked() {
|
|
|
29155
29402
|
* Initiates a new `Embed` instance using the specified enigma `app`.
|
|
29156
29403
|
* @entry
|
|
29157
29404
|
* @function embed
|
|
29158
|
-
* @param {
|
|
29405
|
+
* @param {qix.Doc} app
|
|
29159
29406
|
* @param {Configuration=} instanceConfig
|
|
29160
29407
|
* @returns {Embed}
|
|
29161
29408
|
* @example
|
|
@@ -29270,8 +29517,7 @@ function nuked() {
|
|
|
29270
29517
|
/**
|
|
29271
29518
|
* Creates a visualization model
|
|
29272
29519
|
* @param {CreateConfig} cfg The create configuration.
|
|
29273
|
-
* @
|
|
29274
|
-
* @returns {Promise<EngineAPI.IGenericObject>} An engima model
|
|
29520
|
+
* @returns {Promise<qix.GenericObject>} An engima model
|
|
29275
29521
|
* @example
|
|
29276
29522
|
* // create a barchart in the app and return the model
|
|
29277
29523
|
* const model = await n.create({
|
|
@@ -29285,7 +29531,6 @@ function nuked() {
|
|
|
29285
29531
|
/**
|
|
29286
29532
|
* Generates properties for a visualization object
|
|
29287
29533
|
* @param {CreateConfig} cfg The create configuration.
|
|
29288
|
-
* @experimental
|
|
29289
29534
|
* @returns {Promise<object>} The objects properties
|
|
29290
29535
|
* @example
|
|
29291
29536
|
* // generate properties for a barchart
|
|
@@ -29905,7 +30150,7 @@ function fromGenericObjects(genericObjects) {
|
|
|
29905
30150
|
*/
|
|
29906
30151
|
const mocker = /** @lends EnigmaMocker# */{
|
|
29907
30152
|
/**
|
|
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
|
|
30153
|
+
* 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
30154
|
*
|
|
29910
30155
|
* 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
30156
|
*
|
|
@@ -29913,9 +30158,9 @@ const mocker = /** @lends EnigmaMocker# */{
|
|
|
29913
30158
|
* @type function
|
|
29914
30159
|
* @experimental
|
|
29915
30160
|
* @since 3.0.0
|
|
29916
|
-
* @param {Array<object>} genericObjects Generic objects
|
|
30161
|
+
* @param {Array<object>} genericObjects Generic objects controlling behaviour of visualizations.
|
|
29917
30162
|
* @param {EnigmaMockerOptions=} options Options
|
|
29918
|
-
* @returns {Promise<
|
|
30163
|
+
* @returns {Promise<qix.Doc>}
|
|
29919
30164
|
* @example
|
|
29920
30165
|
* const genericObject = {
|
|
29921
30166
|
* getLayout() {
|