@nebula.js/stardust 4.0.0-alpha.1 → 4.0.0-alpha.2
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 +403 -156
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +3 -3
- package/core/esm/index.js.map +1 -1
- package/dist/stardust.dev.js +402 -155
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +13 -13
- package/dist/stardust.js.map +1 -1
- package/package.json +9 -9
- package/types/index.d.ts +8 -8
package/core/esm/dev.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v4.0.0-alpha.
|
|
2
|
+
* @nebula.js/stardust v4.0.0-alpha.2
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -8,7 +8,7 @@ import * as React from 'react';
|
|
|
8
8
|
import React__default, { useState as useState$1, useEffect as useEffect$1, forwardRef, useMemo as useMemo$1, useImperativeHandle as useImperativeHandle$1, useReducer, useCallback, useLayoutEffect as useLayoutEffect$1, PureComponent, useRef, createElement, useContext } from 'react';
|
|
9
9
|
import ReactDOM from 'react-dom';
|
|
10
10
|
import { CacheProvider, ThemeContext as ThemeContext$2 } from '@emotion/react';
|
|
11
|
-
import { Checkbox, Radio, Typography, FormControlLabel, Grid, Tooltip, Paper, IconButton, Popover, MenuList, MenuItem, ListItemIcon, Divider, InputAdornment, OutlinedInput, Badge, List, ListItem, Button,
|
|
11
|
+
import { Checkbox, Radio, Typography, FormControlLabel, Box, Grid, Tooltip, Paper, IconButton, Popover, MenuList, MenuItem, ListItemIcon, Divider, InputAdornment, OutlinedInput, Badge, List, ListItem, Button, Icon, CircularProgress } from '@mui/material';
|
|
12
12
|
import styled$3 from '@emotion/styled';
|
|
13
13
|
|
|
14
14
|
function getAugmentedNamespace(n) {
|
|
@@ -973,6 +973,26 @@ var Listbox_Dismiss = {
|
|
|
973
973
|
"zh-TW": "解除"
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
|
+
var Listbox_DrillDown = {
|
|
977
|
+
id: "Listbox.DrillDown",
|
|
978
|
+
locale: {
|
|
979
|
+
"de-DE": "Drilldown-Dimension",
|
|
980
|
+
"en-US": "Drill-down dimension",
|
|
981
|
+
"es-ES": "Dimensión jerárquica",
|
|
982
|
+
"fr-FR": "Dimension hiérarchique",
|
|
983
|
+
"it-IT": "Dimensione drill-down",
|
|
984
|
+
"ja-JP": "軸のドリルダウン",
|
|
985
|
+
"ko-KR": "드릴다운 차원",
|
|
986
|
+
"nl-NL": "Drill-downdimensie",
|
|
987
|
+
"pl-PL": "Wymiar hierarchiczny",
|
|
988
|
+
"pt-BR": "Dimensão de detalhamento",
|
|
989
|
+
"ru-RU": "Детализированное измерение",
|
|
990
|
+
"sv-SE": "Hierarkisk dimension",
|
|
991
|
+
"tr-TR": "Detaya inme boyutu",
|
|
992
|
+
"zh-CN": "钻取维度",
|
|
993
|
+
"zh-TW": "向下探查維度"
|
|
994
|
+
}
|
|
995
|
+
};
|
|
976
996
|
var Listbox_ItemsOverflow = {
|
|
977
997
|
id: "Listbox.ItemsOverflow",
|
|
978
998
|
locale: {
|
|
@@ -1613,17 +1633,12 @@ var Visualization_UnfulfilledCalculationCondition = {
|
|
|
1613
1633
|
"zh-TW": "不符計算條件"
|
|
1614
1634
|
}
|
|
1615
1635
|
};
|
|
1616
|
-
var Listbox_DrillDown = {
|
|
1617
|
-
id: "Listbox.DrillDown",
|
|
1618
|
-
locale: {
|
|
1619
|
-
"en-US": "Drill-down dimension"
|
|
1620
|
-
}
|
|
1621
|
-
};
|
|
1622
1636
|
var all = {
|
|
1623
1637
|
Cancel: Cancel$1,
|
|
1624
1638
|
CurrentSelections_All: CurrentSelections_All,
|
|
1625
1639
|
CurrentSelections_Of: CurrentSelections_Of,
|
|
1626
1640
|
Listbox_Dismiss: Listbox_Dismiss,
|
|
1641
|
+
Listbox_DrillDown: Listbox_DrillDown,
|
|
1627
1642
|
Listbox_ItemsOverflow: Listbox_ItemsOverflow,
|
|
1628
1643
|
Listbox_Lock: Listbox_Lock,
|
|
1629
1644
|
Listbox_NoMatchesForYourTerms: Listbox_NoMatchesForYourTerms,
|
|
@@ -1655,8 +1670,7 @@ var all = {
|
|
|
1655
1670
|
Visualization_Invalid_Dimension: Visualization_Invalid_Dimension,
|
|
1656
1671
|
Visualization_Invalid_Measure: Visualization_Invalid_Measure,
|
|
1657
1672
|
Visualization_LayoutError: Visualization_LayoutError,
|
|
1658
|
-
Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
|
|
1659
|
-
Listbox_DrillDown: Listbox_DrillDown
|
|
1673
|
+
Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
|
|
1660
1674
|
};
|
|
1661
1675
|
|
|
1662
1676
|
function appLocaleFn(language) {
|
|
@@ -2737,9 +2751,34 @@ var darkRawJSON = {
|
|
|
2737
2751
|
color: color$1
|
|
2738
2752
|
};
|
|
2739
2753
|
|
|
2754
|
+
var object = {
|
|
2755
|
+
listBox: {
|
|
2756
|
+
backgroundColor: "#ffffff",
|
|
2757
|
+
title: {
|
|
2758
|
+
main: {
|
|
2759
|
+
color: "#404040",
|
|
2760
|
+
fontSize: "14px",
|
|
2761
|
+
fontWeight: "bold"
|
|
2762
|
+
}
|
|
2763
|
+
},
|
|
2764
|
+
content: {
|
|
2765
|
+
color: "#404040",
|
|
2766
|
+
fontSize: "12px"
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
};
|
|
2770
|
+
var baseInheritRawJSON = {
|
|
2771
|
+
object: object
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2774
|
+
/* eslint no-underscore-dangle:0 */
|
|
2740
2775
|
function setTheme(t, resolve) {
|
|
2741
2776
|
const colorRawJSON = t.type === 'dark' ? darkRawJSON : lightRawJSON;
|
|
2742
|
-
|
|
2777
|
+
let baseInherit = baseInheritRawJSON;
|
|
2778
|
+
if (t._inherit === false || t._inherit === 'false') {
|
|
2779
|
+
baseInherit = {};
|
|
2780
|
+
}
|
|
2781
|
+
const root = extend$1(true, {}, baseRawJSON, colorRawJSON, baseInherit);
|
|
2743
2782
|
// avoid merging known array objects as it could cause issues if they are of different types (pyramid vs class) or length
|
|
2744
2783
|
const rawThemeJSON = extend$1(true, {}, root, {
|
|
2745
2784
|
scales: null,
|
|
@@ -3383,15 +3422,21 @@ const LOAD_THEME_TIMEOUT = 5000;
|
|
|
3383
3422
|
function appTheme() {
|
|
3384
3423
|
let {
|
|
3385
3424
|
themes = [],
|
|
3425
|
+
loadTheme,
|
|
3386
3426
|
root
|
|
3387
3427
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3388
3428
|
const wrappedTheme = theme();
|
|
3389
3429
|
const setTheme = async themeId => {
|
|
3390
|
-
|
|
3430
|
+
let found = themes.filter(t => t.id === themeId)[0];
|
|
3391
3431
|
let muiTheme = themeId === 'dark' ? 'dark' : 'light';
|
|
3432
|
+
if (!found && loadTheme) {
|
|
3433
|
+
found = {
|
|
3434
|
+
load: loadTheme
|
|
3435
|
+
};
|
|
3436
|
+
}
|
|
3392
3437
|
if (found && found.load) {
|
|
3393
3438
|
try {
|
|
3394
|
-
const raw = await Promise.race([found.load(), timed(LOAD_THEME_TIMEOUT, {
|
|
3439
|
+
const raw = await Promise.race([found.load(themeId), timed(LOAD_THEME_TIMEOUT, {
|
|
3395
3440
|
__timedOut: true
|
|
3396
3441
|
})]);
|
|
3397
3442
|
if (raw.__timedOut) {
|
|
@@ -7998,7 +8043,7 @@ function create$3(definition) {
|
|
|
7998
8043
|
return cache[key];
|
|
7999
8044
|
}
|
|
8000
8045
|
|
|
8001
|
-
const NEBULA_VERSION_HASH = "
|
|
8046
|
+
const NEBULA_VERSION_HASH = "9a45" ;
|
|
8002
8047
|
ClassNameGenerator$1.configure(componentName => {
|
|
8003
8048
|
return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
|
|
8004
8049
|
});
|
|
@@ -8206,7 +8251,7 @@ function boot(_ref2) {
|
|
|
8206
8251
|
const appRef = React__default.createRef();
|
|
8207
8252
|
const element = document.createElement('div');
|
|
8208
8253
|
element.style.display = 'none';
|
|
8209
|
-
element.setAttribute('data-nebulajs-version', "4.0.0-alpha.
|
|
8254
|
+
element.setAttribute('data-nebulajs-version', "4.0.0-alpha.2" );
|
|
8210
8255
|
element.setAttribute('data-app-id', app.id);
|
|
8211
8256
|
document.body.appendChild(element);
|
|
8212
8257
|
const root = client.createRoot(element);
|
|
@@ -9380,15 +9425,29 @@ function getListboxInlineKeyboardNavigation(_ref2) {
|
|
|
9380
9425
|
constraints
|
|
9381
9426
|
} = _ref2;
|
|
9382
9427
|
const focusInsideListbox = element => {
|
|
9383
|
-
const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar
|
|
9428
|
+
const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-item button');
|
|
9384
9429
|
setKeyboardActive(true);
|
|
9385
9430
|
if (fieldElement) {
|
|
9386
9431
|
fieldElement.focus();
|
|
9387
9432
|
}
|
|
9388
9433
|
};
|
|
9389
|
-
const
|
|
9390
|
-
|
|
9391
|
-
|
|
9434
|
+
const changeFocus = event => {
|
|
9435
|
+
var _event$target;
|
|
9436
|
+
if ((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.classList.contains('listbox-container')) {
|
|
9437
|
+
// Focus currently on a listbox
|
|
9438
|
+
// Esc on a list box should move the focus to its parent, i.e. a filter pane if any
|
|
9439
|
+
setKeyboardActive(false);
|
|
9440
|
+
} else {
|
|
9441
|
+
var _event$target2, _event$target3, _event$currentTarget, _event$currentTarget2;
|
|
9442
|
+
// Focus currently on a row
|
|
9443
|
+
// Esc on a row should move the focus to its parent, i.e. a listbox
|
|
9444
|
+
// First unfocus the row
|
|
9445
|
+
(_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.setAttribute('tabIndex', '-1');
|
|
9446
|
+
(_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.blur();
|
|
9447
|
+
// Then focus the listbox
|
|
9448
|
+
(_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.setAttribute('tabIndex', '0');
|
|
9449
|
+
(_event$currentTarget2 = event.currentTarget) === null || _event$currentTarget2 === void 0 ? void 0 : _event$currentTarget2.focus();
|
|
9450
|
+
}
|
|
9392
9451
|
};
|
|
9393
9452
|
const updateKeyScrollOnHover = newState => {
|
|
9394
9453
|
if (hovering) {
|
|
@@ -9412,7 +9471,7 @@ function getListboxInlineKeyboardNavigation(_ref2) {
|
|
|
9412
9471
|
focusInsideListbox(event.currentTarget);
|
|
9413
9472
|
break;
|
|
9414
9473
|
case KEYS.ESCAPE:
|
|
9415
|
-
|
|
9474
|
+
changeFocus(event);
|
|
9416
9475
|
break;
|
|
9417
9476
|
case KEYS.ARROW_UP:
|
|
9418
9477
|
updateKeyScrollOnHover({
|
|
@@ -9424,6 +9483,10 @@ function getListboxInlineKeyboardNavigation(_ref2) {
|
|
|
9424
9483
|
down: 1
|
|
9425
9484
|
});
|
|
9426
9485
|
break;
|
|
9486
|
+
case KEYS.ARROW_LEFT:
|
|
9487
|
+
case KEYS.ARROW_RIGHT:
|
|
9488
|
+
return;
|
|
9489
|
+
// let it propagate to top-level
|
|
9427
9490
|
case KEYS.PAGE_UP:
|
|
9428
9491
|
updateKeyScrollOnHover({
|
|
9429
9492
|
up: currentScrollIndex.stop - currentScrollIndex.start
|
|
@@ -9551,25 +9614,15 @@ const joinClassNames = namesArray => namesArray.filter(c => !!c).join(' ').trim(
|
|
|
9551
9614
|
const getBarWidth = _ref => {
|
|
9552
9615
|
let {
|
|
9553
9616
|
qFrequency,
|
|
9554
|
-
checkboxes,
|
|
9555
9617
|
frequencyMax
|
|
9556
9618
|
} = _ref;
|
|
9557
9619
|
const freqStr = String(qFrequency);
|
|
9558
9620
|
const isPercent = freqStr.substring(freqStr.length - 1) === '%';
|
|
9559
9621
|
const freq = parseFloat(isPercent ? freqStr : qFrequency);
|
|
9560
|
-
const rightSlice = checkboxes ? "(".concat(barWithCheckboxLeftPadPx, "px + ").concat(barPadPx + barBorderWidthPx * 2, "px)") : "".concat(barPadPx * 2 + barBorderWidthPx * 2, "px");
|
|
9561
9622
|
const width = isPercent ? freq : freq / frequencyMax * 100;
|
|
9562
|
-
return "
|
|
9563
|
-
};
|
|
9564
|
-
const getFrequencyText = _ref2 => {
|
|
9565
|
-
let {
|
|
9566
|
-
cell
|
|
9567
|
-
} = _ref2;
|
|
9568
|
-
if (cell) {
|
|
9569
|
-
return cell.qFrequency ? cell.qFrequency : frequencyTextNone;
|
|
9570
|
-
}
|
|
9571
|
-
return '';
|
|
9623
|
+
return "".concat(width, "%");
|
|
9572
9624
|
};
|
|
9625
|
+
const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
|
|
9573
9626
|
|
|
9574
9627
|
const CELL_PADDING_LEFT = 9;
|
|
9575
9628
|
const ICON_WIDTH = 12;
|
|
@@ -9598,8 +9651,10 @@ const ellipsis = {
|
|
|
9598
9651
|
textOverflow: 'ellipsis',
|
|
9599
9652
|
whiteSpace: 'nowrap'
|
|
9600
9653
|
};
|
|
9654
|
+
const iconWidth = 24; // tick and lock icon width in px
|
|
9655
|
+
|
|
9601
9656
|
const RowColRoot = styled$1('div', {
|
|
9602
|
-
shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'].includes(prop)
|
|
9657
|
+
shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth', 'showIcon', 'checkboxes'].includes(prop)
|
|
9603
9658
|
})(_ref2 => {
|
|
9604
9659
|
var _theme$listBox$conten, _theme$listBox, _theme$listBox$conten2, _theme$listBox$conten3, _theme$listBox2, _theme$listBox2$conte, _theme$listBox3, _theme$listBox3$conte, _theme$listBox4, _theme$listBox4$conte;
|
|
9605
9660
|
let {
|
|
@@ -9608,7 +9663,9 @@ const RowColRoot = styled$1('div', {
|
|
|
9608
9663
|
isGridMode,
|
|
9609
9664
|
isGridCol,
|
|
9610
9665
|
dense,
|
|
9611
|
-
frequencyWidth
|
|
9666
|
+
frequencyWidth,
|
|
9667
|
+
showIcon,
|
|
9668
|
+
checkboxes
|
|
9612
9669
|
} = _ref2;
|
|
9613
9670
|
return {
|
|
9614
9671
|
'&:focus': {
|
|
@@ -9617,6 +9674,14 @@ const RowColRoot = styled$1('div', {
|
|
|
9617
9674
|
'&:focus-visible': {
|
|
9618
9675
|
outline: 'none'
|
|
9619
9676
|
},
|
|
9677
|
+
'& .value': {
|
|
9678
|
+
'&:focus': {
|
|
9679
|
+
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
|
|
9680
|
+
},
|
|
9681
|
+
'&:focus-visible': {
|
|
9682
|
+
outline: 'none'
|
|
9683
|
+
}
|
|
9684
|
+
},
|
|
9620
9685
|
["& .".concat(rowColClasses.row)]: {
|
|
9621
9686
|
flexWrap: 'nowrap',
|
|
9622
9687
|
color: (_theme$listBox$conten = (_theme$listBox = theme.listBox) === null || _theme$listBox === void 0 ? void 0 : (_theme$listBox$conten2 = _theme$listBox.content) === null || _theme$listBox$conten2 === void 0 ? void 0 : _theme$listBox$conten2.color) !== null && _theme$listBox$conten !== void 0 ? _theme$listBox$conten : theme.palette.text.primary
|
|
@@ -9645,7 +9710,7 @@ const RowColRoot = styled$1('div', {
|
|
|
9645
9710
|
flexBasis: flexBasisProp,
|
|
9646
9711
|
lineHeight: '16px',
|
|
9647
9712
|
userSelect: 'none',
|
|
9648
|
-
paddingRight: '1px'
|
|
9713
|
+
paddingRight: showIcon || checkboxes ? '1px' : "".concat(iconWidth, "px")
|
|
9649
9714
|
}, ellipsis), {}, {
|
|
9650
9715
|
whiteSpace: 'pre',
|
|
9651
9716
|
// to keep white-space on highlight
|
|
@@ -9687,9 +9752,9 @@ const RowColRoot = styled$1('div', {
|
|
|
9687
9752
|
["& .".concat(rowColClasses.icon)]: {
|
|
9688
9753
|
display: 'flex',
|
|
9689
9754
|
justifyContent: 'center',
|
|
9690
|
-
width:
|
|
9691
|
-
minWidth:
|
|
9692
|
-
maxWidth:
|
|
9755
|
+
width: iconWidth,
|
|
9756
|
+
minWidth: iconWidth,
|
|
9757
|
+
maxWidth: iconWidth
|
|
9693
9758
|
},
|
|
9694
9759
|
// Selection styles (S=Selected, XS=ExcludedSelected, A=Available, X=Excluded).
|
|
9695
9760
|
["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
|
|
@@ -9727,27 +9792,38 @@ const RowColRoot = styled$1('div', {
|
|
|
9727
9792
|
alignItems: 'center'
|
|
9728
9793
|
},
|
|
9729
9794
|
["& .".concat(rowColClasses.bar)]: {
|
|
9730
|
-
border: "".concat(barBorderWidthPx, "px solid"),
|
|
9731
|
-
borderColor: '#D9D9D9',
|
|
9732
9795
|
height: dense ? '16px' : '20px',
|
|
9733
9796
|
position: 'absolute',
|
|
9734
9797
|
zIndex: '-1',
|
|
9735
9798
|
alignSelf: 'center',
|
|
9736
|
-
left:
|
|
9737
|
-
|
|
9738
|
-
|
|
9799
|
+
left: barPadPx,
|
|
9800
|
+
width: "calc(100% - ".concat(barPadPx * 2, "px)"),
|
|
9801
|
+
display: 'flex',
|
|
9802
|
+
alignItems: 'center',
|
|
9803
|
+
'& .bar-filled': {
|
|
9804
|
+
border: "".concat(barBorderWidthPx, "px solid"),
|
|
9805
|
+
borderColor: '#D9D9D9',
|
|
9806
|
+
transition: 'width 0.2s',
|
|
9807
|
+
backgroundColor: '#FAFAFA',
|
|
9808
|
+
height: '100%'
|
|
9809
|
+
}
|
|
9739
9810
|
},
|
|
9740
9811
|
["& .".concat(rowColClasses.barSelected)]: {
|
|
9741
|
-
opacity: '30%',
|
|
9742
9812
|
zIndex: '0',
|
|
9743
|
-
|
|
9813
|
+
'& .bar-filled': {
|
|
9814
|
+
opacity: '30%',
|
|
9815
|
+
background: theme.palette.background.lighter
|
|
9816
|
+
}
|
|
9744
9817
|
},
|
|
9745
9818
|
["& .".concat(rowColClasses.barWithCheckbox)]: {
|
|
9746
|
-
left:
|
|
9819
|
+
left: barWithCheckboxLeftPadPx,
|
|
9820
|
+
width: "calc(100% - ".concat(barWithCheckboxLeftPadPx + barPadPx, "px)")
|
|
9747
9821
|
},
|
|
9748
9822
|
["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
|
|
9749
|
-
|
|
9750
|
-
|
|
9823
|
+
'& .bar-filled': {
|
|
9824
|
+
background: '#BFE5D0',
|
|
9825
|
+
borderColor: '#BFE5D0'
|
|
9826
|
+
}
|
|
9751
9827
|
},
|
|
9752
9828
|
["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
|
|
9753
9829
|
color: '#828282',
|
|
@@ -9923,6 +9999,7 @@ function ValueField(_ref) {
|
|
|
9923
9999
|
color: color,
|
|
9924
10000
|
align: valueTextAlign
|
|
9925
10001
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10002
|
+
dir: "auto",
|
|
9926
10003
|
style: {
|
|
9927
10004
|
whiteSpace: 'pre'
|
|
9928
10005
|
}
|
|
@@ -10108,29 +10185,27 @@ var Field$1 = React__default.memo(Field);
|
|
|
10108
10185
|
|
|
10109
10186
|
function Histogram(_ref) {
|
|
10110
10187
|
let {
|
|
10111
|
-
|
|
10188
|
+
qFrequency,
|
|
10112
10189
|
histogram,
|
|
10113
10190
|
checkboxes,
|
|
10114
10191
|
isSelected,
|
|
10115
10192
|
frequencyMax
|
|
10116
10193
|
} = _ref;
|
|
10117
|
-
const hasHistogramBar =
|
|
10118
|
-
cell
|
|
10119
|
-
}) !== frequencyTextNone;
|
|
10194
|
+
const hasHistogramBar = qFrequency && histogram && getFrequencyText(qFrequency) !== frequencyTextNone;
|
|
10120
10195
|
if (!hasHistogramBar) {
|
|
10121
10196
|
return undefined;
|
|
10122
10197
|
}
|
|
10123
10198
|
const width = getBarWidth({
|
|
10124
|
-
qFrequency
|
|
10199
|
+
qFrequency,
|
|
10125
10200
|
checkboxes,
|
|
10126
10201
|
frequencyMax
|
|
10127
10202
|
});
|
|
10128
|
-
return /*#__PURE__*/React__default.createElement(
|
|
10129
|
-
className: joinClassNames([rowColClasses.bar, checkboxes && rowColClasses.barWithCheckbox, isSelected && (checkboxes ? rowColClasses.barSelectedWithCheckbox : rowColClasses.barSelected)])
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
});
|
|
10203
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
10204
|
+
className: joinClassNames([rowColClasses.bar, checkboxes && rowColClasses.barWithCheckbox, isSelected && (checkboxes ? rowColClasses.barSelectedWithCheckbox : rowColClasses.barSelected)])
|
|
10205
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
10206
|
+
className: "bar-filled",
|
|
10207
|
+
width: width
|
|
10208
|
+
}));
|
|
10134
10209
|
}
|
|
10135
10210
|
|
|
10136
10211
|
function Frequency(_ref) {
|
|
@@ -10155,9 +10230,7 @@ function Frequency(_ref) {
|
|
|
10155
10230
|
cell,
|
|
10156
10231
|
checkboxes
|
|
10157
10232
|
}) && rowColClasses.excludedTextWithCheckbox])
|
|
10158
|
-
}, getFrequencyText(
|
|
10159
|
-
cell
|
|
10160
|
-
})));
|
|
10233
|
+
}, getFrequencyText(cell === null || cell === void 0 ? void 0 : cell.qFrequency)));
|
|
10161
10234
|
}
|
|
10162
10235
|
|
|
10163
10236
|
function getGridItemSizes(_ref) {
|
|
@@ -10258,6 +10331,7 @@ function RowColumn(_ref) {
|
|
|
10258
10331
|
histogram = false,
|
|
10259
10332
|
keyboard,
|
|
10260
10333
|
showGray = true,
|
|
10334
|
+
showTick: sizePermitsTick = true,
|
|
10261
10335
|
columnCount = 1,
|
|
10262
10336
|
rowCount = 1,
|
|
10263
10337
|
dataOffset,
|
|
@@ -10343,7 +10417,11 @@ function RowColumn(_ref) {
|
|
|
10343
10417
|
ltr: 'left'
|
|
10344
10418
|
};
|
|
10345
10419
|
if (isAutoTextAlign) {
|
|
10346
|
-
|
|
10420
|
+
if (!isNumeric) {
|
|
10421
|
+
valueTextAlign = dirToTextAlignMap[direction];
|
|
10422
|
+
} else {
|
|
10423
|
+
valueTextAlign = direction === 'rtl' ? 'left' : 'right';
|
|
10424
|
+
}
|
|
10347
10425
|
} else {
|
|
10348
10426
|
valueTextAlign = (textAlign === null || textAlign === void 0 ? void 0 : textAlign.align) || 'left';
|
|
10349
10427
|
}
|
|
@@ -10362,22 +10440,26 @@ function RowColumn(_ref) {
|
|
|
10362
10440
|
display: 'flex',
|
|
10363
10441
|
fontSize: '8px'
|
|
10364
10442
|
};
|
|
10365
|
-
const showLock = isSelected && isLocked;
|
|
10366
|
-
const showTick = !checkboxes && isSelected && !isLocked;
|
|
10367
10443
|
const cellStyle = {
|
|
10368
10444
|
display: 'flex',
|
|
10369
10445
|
alignItems: 'center',
|
|
10370
10446
|
minWidth: 0,
|
|
10371
10447
|
flexGrow: 1,
|
|
10372
|
-
paddingLeft: checkboxes ? 0 : undefined,
|
|
10448
|
+
paddingLeft: direction === 'rtl' ? 8 : checkboxes ? 0 : undefined,
|
|
10449
|
+
paddingRight: checkboxes ? 0 : direction === 'rtl' ? 8 : 0,
|
|
10373
10450
|
justifyContent: valueTextAlign
|
|
10374
10451
|
};
|
|
10375
10452
|
const isFirstElement = index === 0;
|
|
10376
10453
|
const flexBasisVal = checkboxes ? 'auto' : 'max-content';
|
|
10454
|
+
const showLock = isSelected && isLocked;
|
|
10455
|
+
const showTick = !checkboxes && isSelected && !isLocked && sizePermitsTick;
|
|
10456
|
+
const showIcon = !checkboxes && (showTick || showLock);
|
|
10377
10457
|
return /*#__PURE__*/React__default.createElement(RowColRoot$1, {
|
|
10378
10458
|
className: rowColClasses.barContainer,
|
|
10379
10459
|
flexBasisProp: flexBasisVal,
|
|
10380
10460
|
style: styles,
|
|
10461
|
+
showIcon: showIcon,
|
|
10462
|
+
checkboxes: checkboxes,
|
|
10381
10463
|
isGridCol: isGridCol,
|
|
10382
10464
|
isGridMode: dataLayout === 'grid',
|
|
10383
10465
|
dense: dense,
|
|
@@ -10403,8 +10485,8 @@ function RowColumn(_ref) {
|
|
|
10403
10485
|
role: column ? 'column' : 'row',
|
|
10404
10486
|
tabIndex: isFirstElement && (!keyboard.enabled || keyboard.active) ? 0 : -1,
|
|
10405
10487
|
"data-n": cell === null || cell === void 0 ? void 0 : cell.qElemNumber
|
|
10406
|
-
}, /*#__PURE__*/React__default.createElement(Histogram, {
|
|
10407
|
-
cell: cell,
|
|
10488
|
+
}, (cell === null || cell === void 0 ? void 0 : cell.qFrequency) && /*#__PURE__*/React__default.createElement(Histogram, {
|
|
10489
|
+
qFrequency: cell === null || cell === void 0 ? void 0 : cell.qFrequency,
|
|
10408
10490
|
histogram: histogram,
|
|
10409
10491
|
checkboxes: checkboxes,
|
|
10410
10492
|
isSelected: isSelected,
|
|
@@ -10446,14 +10528,10 @@ function RowColumn(_ref) {
|
|
|
10446
10528
|
checkboxes: checkboxes,
|
|
10447
10529
|
dense: dense,
|
|
10448
10530
|
showGray: showGray
|
|
10449
|
-
}),
|
|
10531
|
+
}), showIcon && /*#__PURE__*/React__default.createElement(Grid, {
|
|
10450
10532
|
item: true,
|
|
10451
10533
|
className: rowColClasses.icon
|
|
10452
|
-
},
|
|
10453
|
-
style: {
|
|
10454
|
-
minWidth: '12px'
|
|
10455
|
-
}
|
|
10456
|
-
}), showLock && /*#__PURE__*/React__default.createElement(Lock, {
|
|
10534
|
+
}, showLock && /*#__PURE__*/React__default.createElement(Lock, {
|
|
10457
10535
|
style: iconStyles,
|
|
10458
10536
|
size: "small"
|
|
10459
10537
|
}), showTick && /*#__PURE__*/React__default.createElement(Tick, {
|
|
@@ -11987,6 +12065,8 @@ function handleSetOverflowDisclaimer(_ref) {
|
|
|
11987
12065
|
overflowDisclaimer.set(show);
|
|
11988
12066
|
}
|
|
11989
12067
|
|
|
12068
|
+
const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
|
|
12069
|
+
|
|
11990
12070
|
const {
|
|
11991
12071
|
StyledFixedSizeList,
|
|
11992
12072
|
StyledFixedSizeGrid
|
|
@@ -12018,20 +12098,23 @@ function getListBoxComponents(_ref) {
|
|
|
12018
12098
|
focusListItems,
|
|
12019
12099
|
setCurrentScrollIndex,
|
|
12020
12100
|
constraints,
|
|
12101
|
+
frequencyMax,
|
|
12021
12102
|
freqIsAllowed
|
|
12022
12103
|
} = _ref;
|
|
12023
12104
|
const {
|
|
12024
|
-
layoutOptions = {}
|
|
12025
|
-
frequencyMax
|
|
12105
|
+
layoutOptions = {}
|
|
12026
12106
|
} = layout || {};
|
|
12027
12107
|
const {
|
|
12108
|
+
columnWidth,
|
|
12028
12109
|
itemPadding,
|
|
12029
12110
|
listHeight,
|
|
12030
|
-
|
|
12111
|
+
itemHeight,
|
|
12031
12112
|
rowCount,
|
|
12032
12113
|
columnCount,
|
|
12033
12114
|
frequencyWidth
|
|
12034
12115
|
} = sizes || {};
|
|
12116
|
+
const itemWidth = layoutOptions.dataLayout === 'grid' ? columnWidth : width;
|
|
12117
|
+
const showTick = itemWidth > REMOVE_TICK_LIMIT;
|
|
12035
12118
|
|
|
12036
12119
|
// Options common for List and Grid.
|
|
12037
12120
|
const commonComponentOptions = {
|
|
@@ -12065,8 +12148,10 @@ function getListBoxComponents(_ref) {
|
|
|
12065
12148
|
histogram,
|
|
12066
12149
|
keyboard,
|
|
12067
12150
|
showGray,
|
|
12151
|
+
showTick,
|
|
12068
12152
|
dataOffset: local.current.dataOffset,
|
|
12069
|
-
focusListItems
|
|
12153
|
+
focusListItems,
|
|
12154
|
+
direction
|
|
12070
12155
|
});
|
|
12071
12156
|
const List = _ref2 => {
|
|
12072
12157
|
let {
|
|
@@ -12086,7 +12171,7 @@ function getListBoxComponents(_ref) {
|
|
|
12086
12171
|
itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
|
|
12087
12172
|
listCount
|
|
12088
12173
|
}),
|
|
12089
|
-
itemSize:
|
|
12174
|
+
itemSize: itemHeight,
|
|
12090
12175
|
onItemsRendered: renderProps => {
|
|
12091
12176
|
var _layout$qListObject, _layout$qListObject$q;
|
|
12092
12177
|
setCurrentScrollIndex({
|
|
@@ -12117,14 +12202,13 @@ function getListBoxComponents(_ref) {
|
|
|
12117
12202
|
ref
|
|
12118
12203
|
} = _ref3;
|
|
12119
12204
|
const {
|
|
12120
|
-
columnWidth,
|
|
12121
12205
|
overflowStyling,
|
|
12122
12206
|
scrollBarWidth
|
|
12123
12207
|
} = sizes;
|
|
12124
12208
|
const {
|
|
12125
12209
|
layoutOrder
|
|
12126
12210
|
} = layoutOptions || {};
|
|
12127
|
-
const gridHeight = Math.min(listHeight, rowCount *
|
|
12211
|
+
const gridHeight = Math.min(listHeight, rowCount * itemHeight + scrollBarWidth);
|
|
12128
12212
|
// eslint-disable-next-line no-param-reassign
|
|
12129
12213
|
local.current.listRef = ref;
|
|
12130
12214
|
const handleGridItemsRendered = renderProps => {
|
|
@@ -12163,7 +12247,7 @@ function getListBoxComponents(_ref) {
|
|
|
12163
12247
|
columnCount: columnCount,
|
|
12164
12248
|
columnWidth: columnWidth,
|
|
12165
12249
|
rowCount: rowCount,
|
|
12166
|
-
rowHeight:
|
|
12250
|
+
rowHeight: itemHeight,
|
|
12167
12251
|
style: _objectSpread2({}, overflowStyling),
|
|
12168
12252
|
itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
|
|
12169
12253
|
column: undefined,
|
|
@@ -12180,11 +12264,65 @@ function getListBoxComponents(_ref) {
|
|
|
12180
12264
|
};
|
|
12181
12265
|
}
|
|
12182
12266
|
|
|
12183
|
-
|
|
12267
|
+
function calculateColumnMode(_ref) {
|
|
12268
|
+
let {
|
|
12269
|
+
maxVisibleRows,
|
|
12270
|
+
itemHeight,
|
|
12271
|
+
listCount,
|
|
12272
|
+
listHeight,
|
|
12273
|
+
columnAutoWidth,
|
|
12274
|
+
containerWidth,
|
|
12275
|
+
itemMinWidth
|
|
12276
|
+
} = _ref;
|
|
12277
|
+
let rowCount;
|
|
12278
|
+
const maxRows = (maxVisibleRows === null || maxVisibleRows === void 0 ? void 0 : maxVisibleRows.maxRows) || 3;
|
|
12279
|
+
const autoRowCount = Math.floor(listHeight / itemHeight);
|
|
12280
|
+
if (maxVisibleRows.auto !== false) {
|
|
12281
|
+
rowCount = autoRowCount;
|
|
12282
|
+
} else {
|
|
12283
|
+
rowCount = Math.min(listCount, maxRows, autoRowCount);
|
|
12284
|
+
}
|
|
12285
|
+
const columnCount = Math.ceil(listCount / rowCount);
|
|
12286
|
+
const columnWidth = Math.max(columnAutoWidth, containerWidth / columnCount, itemMinWidth);
|
|
12287
|
+
return {
|
|
12288
|
+
columnWidth,
|
|
12289
|
+
columnCount,
|
|
12290
|
+
rowCount
|
|
12291
|
+
};
|
|
12292
|
+
}
|
|
12184
12293
|
|
|
12185
|
-
const
|
|
12294
|
+
const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
|
|
12186
12295
|
const ITEM_MAX_WIDTH = 150;
|
|
12187
12296
|
const FREQUENCY_WIDTH = 40;
|
|
12297
|
+
const ITEM_MIN_WIDTH = 56;
|
|
12298
|
+
const CHECKBOX_WIDTH = 20;
|
|
12299
|
+
|
|
12300
|
+
function calculateRowMode(_ref) {
|
|
12301
|
+
let {
|
|
12302
|
+
maxVisibleColumns,
|
|
12303
|
+
listCount,
|
|
12304
|
+
containerWidth,
|
|
12305
|
+
columnAutoWidth,
|
|
12306
|
+
itemMinWidth
|
|
12307
|
+
} = _ref;
|
|
12308
|
+
const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
|
|
12309
|
+
const innerWidth = containerWidth - SCROLL_BAR_WIDTH;
|
|
12310
|
+
let columnCount;
|
|
12311
|
+
const autoColumnCount = Math.min(listCount, Math.ceil(innerWidth / Math.max(itemMinWidth, columnAutoWidth))); // TODO: smarter sizing... based on glyph count + font size etc...??
|
|
12312
|
+
if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
|
|
12313
|
+
columnCount = autoColumnCount;
|
|
12314
|
+
} else {
|
|
12315
|
+
columnCount = Math.min(listCount, maxColumns, autoColumnCount);
|
|
12316
|
+
}
|
|
12317
|
+
const columnWidth = innerWidth / columnCount;
|
|
12318
|
+
const rowCount = Math.ceil(listCount / columnCount);
|
|
12319
|
+
return {
|
|
12320
|
+
rowCount,
|
|
12321
|
+
columnWidth,
|
|
12322
|
+
columnCount
|
|
12323
|
+
};
|
|
12324
|
+
}
|
|
12325
|
+
|
|
12188
12326
|
function getListSizes(_ref) {
|
|
12189
12327
|
let {
|
|
12190
12328
|
layout,
|
|
@@ -12193,7 +12331,8 @@ function getListSizes(_ref) {
|
|
|
12193
12331
|
listCount,
|
|
12194
12332
|
count,
|
|
12195
12333
|
textWidth,
|
|
12196
|
-
freqIsAllowed
|
|
12334
|
+
freqIsAllowed,
|
|
12335
|
+
checkboxes
|
|
12197
12336
|
} = _ref;
|
|
12198
12337
|
const {
|
|
12199
12338
|
layoutOptions = {}
|
|
@@ -12206,50 +12345,60 @@ function getListSizes(_ref) {
|
|
|
12206
12345
|
dataLayout
|
|
12207
12346
|
} = layoutOptions;
|
|
12208
12347
|
const frequencyAddWidth = freqIsAllowed ? FREQUENCY_WIDTH : 0;
|
|
12209
|
-
const
|
|
12348
|
+
const checkboxAddWidth = checkboxes ? CHECKBOX_WIDTH : 0;
|
|
12349
|
+
const dynamicItemMinWidth = ITEM_MIN_WIDTH + frequencyAddWidth + checkboxAddWidth;
|
|
12350
|
+
const columnAutoWidth = Math.max(Math.min(ITEM_MAX_WIDTH, textWidth + 18 + frequencyAddWidth + checkboxAddWidth), dynamicItemMinWidth);
|
|
12210
12351
|
let overflowStyling;
|
|
12211
12352
|
let columnCount;
|
|
12212
12353
|
let columnWidth;
|
|
12213
12354
|
let rowCount;
|
|
12214
12355
|
const isGridMode = dataLayout === 'grid';
|
|
12215
12356
|
const itemPadding = 4;
|
|
12216
|
-
const
|
|
12217
|
-
const
|
|
12218
|
-
let
|
|
12357
|
+
const denseItemHeight = 20;
|
|
12358
|
+
const normalItemHeight = isGridMode ? 32 : 29;
|
|
12359
|
+
let itemHeight = dense ? denseItemHeight : normalItemHeight;
|
|
12219
12360
|
if (isGridMode) {
|
|
12220
12361
|
// Emulate a margin between items using padding, since the list library
|
|
12221
12362
|
// needs an explicit row height and cannot handle margins.
|
|
12222
|
-
|
|
12363
|
+
itemHeight += itemPadding;
|
|
12223
12364
|
}
|
|
12224
|
-
const listHeight = height !== null && height !== void 0 ? height : 8 *
|
|
12365
|
+
const listHeight = height !== null && height !== void 0 ? height : 8 * itemHeight;
|
|
12225
12366
|
if (layoutOrder) {
|
|
12226
12367
|
// Modify container width to achieve the exact design with 8px margins on each side (left and right).
|
|
12227
12368
|
let containerWidth = width;
|
|
12228
12369
|
if (layoutOrder === 'row') {
|
|
12229
|
-
containerWidth += itemPadding * 2;
|
|
12230
12370
|
overflowStyling = {
|
|
12231
12371
|
overflowX: 'hidden'
|
|
12232
12372
|
};
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
columnCount
|
|
12238
|
-
}
|
|
12239
|
-
|
|
12240
|
-
|
|
12373
|
+
containerWidth += itemPadding * 2;
|
|
12374
|
+
({
|
|
12375
|
+
rowCount,
|
|
12376
|
+
columnWidth,
|
|
12377
|
+
columnCount
|
|
12378
|
+
} = calculateRowMode({
|
|
12379
|
+
maxVisibleColumns,
|
|
12380
|
+
listCount,
|
|
12381
|
+
containerWidth,
|
|
12382
|
+
columnAutoWidth,
|
|
12383
|
+
itemMinWidth: dynamicItemMinWidth
|
|
12384
|
+
}));
|
|
12241
12385
|
} else {
|
|
12242
12386
|
overflowStyling = {
|
|
12243
12387
|
overflowY: 'hidden'
|
|
12244
12388
|
};
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12389
|
+
({
|
|
12390
|
+
rowCount,
|
|
12391
|
+
columnWidth,
|
|
12392
|
+
columnCount
|
|
12393
|
+
} = calculateColumnMode({
|
|
12394
|
+
maxVisibleRows,
|
|
12395
|
+
itemHeight,
|
|
12396
|
+
listCount,
|
|
12397
|
+
listHeight,
|
|
12398
|
+
columnAutoWidth,
|
|
12399
|
+
containerWidth,
|
|
12400
|
+
itemMinWidth: dynamicItemMinWidth
|
|
12401
|
+
}));
|
|
12253
12402
|
}
|
|
12254
12403
|
}
|
|
12255
12404
|
columnCount = (dataLayout === 'singleColumn' ? 1 : columnCount) || 1;
|
|
@@ -12266,9 +12415,9 @@ function getListSizes(_ref) {
|
|
|
12266
12415
|
columnWidth,
|
|
12267
12416
|
rowCount,
|
|
12268
12417
|
overflowStyling,
|
|
12269
|
-
|
|
12418
|
+
itemHeight,
|
|
12270
12419
|
listHeight,
|
|
12271
|
-
scrollBarWidth,
|
|
12420
|
+
scrollBarWidth: SCROLL_BAR_WIDTH,
|
|
12272
12421
|
count,
|
|
12273
12422
|
listCount: limitedListCount,
|
|
12274
12423
|
maxCount: {
|
|
@@ -12317,9 +12466,9 @@ function getHorizontalMinBatchSize(_ref) {
|
|
|
12317
12466
|
width,
|
|
12318
12467
|
columnWidth,
|
|
12319
12468
|
listHeight,
|
|
12320
|
-
|
|
12469
|
+
itemHeight
|
|
12321
12470
|
} = _ref;
|
|
12322
|
-
const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight /
|
|
12471
|
+
const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemHeight);
|
|
12323
12472
|
const minSize = visibleCellsCount * 2;
|
|
12324
12473
|
return minSize;
|
|
12325
12474
|
}
|
|
@@ -12787,12 +12936,48 @@ function getFrequencyAllowed(_ref) {
|
|
|
12787
12936
|
return !!(widthPermitsFreq && (hasValidFreqOption || frequencyEnabled));
|
|
12788
12937
|
}
|
|
12789
12938
|
|
|
12939
|
+
const escapeField = field => {
|
|
12940
|
+
if (!field) {
|
|
12941
|
+
return field;
|
|
12942
|
+
}
|
|
12943
|
+
return "".concat(field.replace(/\]/g, ']]'));
|
|
12944
|
+
};
|
|
12945
|
+
const needToFetchFrequencyMax = layout => (layout === null || layout === void 0 ? void 0 : layout.frequencyMax) === 'fetch';
|
|
12946
|
+
const getFrequencyMaxExpression = field => {
|
|
12947
|
+
const escapedField = escapeField(field);
|
|
12948
|
+
return "Max(AGGR(Count(".concat(escapedField, "), ").concat(escapedField, "))");
|
|
12949
|
+
};
|
|
12950
|
+
const getFrequencyMax = async (layout, app) => {
|
|
12951
|
+
const dimInfo = layout.qListObject.qDimensionInfo;
|
|
12952
|
+
const field = dimInfo.qGroupFieldDefs[dimInfo.qGroupPos];
|
|
12953
|
+
const expression = getFrequencyMaxExpression(field);
|
|
12954
|
+
const evaluadedExpression = await app.evaluateEx(expression);
|
|
12955
|
+
return evaluadedExpression.qNumber;
|
|
12956
|
+
};
|
|
12957
|
+
|
|
12958
|
+
const useFrequencyMax = (app, layout) => {
|
|
12959
|
+
const [frequencyMax, setFrequencyMax] = useState$1();
|
|
12960
|
+
const needFetch = needToFetchFrequencyMax(layout);
|
|
12961
|
+
useEffect$1(() => {
|
|
12962
|
+
if (!needFetch) {
|
|
12963
|
+
return;
|
|
12964
|
+
}
|
|
12965
|
+
const fetch = async () => {
|
|
12966
|
+
const newValue = await getFrequencyMax(layout, app);
|
|
12967
|
+
setFrequencyMax(newValue);
|
|
12968
|
+
};
|
|
12969
|
+
fetch();
|
|
12970
|
+
}, [needFetch && layout]);
|
|
12971
|
+
return needFetch ? frequencyMax : layout === null || layout === void 0 ? void 0 : layout.frequencyMax;
|
|
12972
|
+
};
|
|
12973
|
+
|
|
12790
12974
|
const _excluded$4 = ["isLoadingData"];
|
|
12791
12975
|
const DEFAULT_MIN_BATCH_SIZE = 100;
|
|
12792
12976
|
function ListBox(_ref) {
|
|
12793
12977
|
var _layout$qListObject$q, _loaderRef$current, _loaderRef$current$_l, _loaderRef$current$_l2;
|
|
12794
12978
|
let {
|
|
12795
12979
|
model,
|
|
12980
|
+
app,
|
|
12796
12981
|
constraints,
|
|
12797
12982
|
layout,
|
|
12798
12983
|
selections,
|
|
@@ -12959,7 +13144,8 @@ function ListBox(_ref) {
|
|
|
12959
13144
|
listCount: unlimitedListCount,
|
|
12960
13145
|
count,
|
|
12961
13146
|
textWidth,
|
|
12962
|
-
freqIsAllowed
|
|
13147
|
+
freqIsAllowed,
|
|
13148
|
+
checkboxes
|
|
12963
13149
|
});
|
|
12964
13150
|
if (sizes.columnWidth) {
|
|
12965
13151
|
// In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
|
|
@@ -13023,6 +13209,7 @@ function ListBox(_ref) {
|
|
|
13023
13209
|
last
|
|
13024
13210
|
}))
|
|
13025
13211
|
});
|
|
13212
|
+
const frequencyMax = useFrequencyMax(app, layout);
|
|
13026
13213
|
const {
|
|
13027
13214
|
List,
|
|
13028
13215
|
Grid
|
|
@@ -13056,19 +13243,20 @@ function ListBox(_ref) {
|
|
|
13056
13243
|
focusListItems: getFocusState(),
|
|
13057
13244
|
setCurrentScrollIndex: currentScrollIndex.set,
|
|
13058
13245
|
constraints,
|
|
13246
|
+
frequencyMax,
|
|
13059
13247
|
freqIsAllowed
|
|
13060
13248
|
});
|
|
13061
13249
|
const {
|
|
13062
13250
|
columnWidth,
|
|
13063
13251
|
listHeight,
|
|
13064
|
-
|
|
13252
|
+
itemHeight
|
|
13065
13253
|
} = sizes || {};
|
|
13066
13254
|
if (!isVertical) {
|
|
13067
13255
|
minimumBatchSize = getHorizontalMinBatchSize({
|
|
13068
13256
|
width,
|
|
13069
13257
|
columnWidth,
|
|
13070
13258
|
listHeight,
|
|
13071
|
-
|
|
13259
|
+
itemHeight
|
|
13072
13260
|
});
|
|
13073
13261
|
}
|
|
13074
13262
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !listCount && /*#__PURE__*/React__default.createElement(ListBoxDisclaimer, {
|
|
@@ -13427,6 +13615,7 @@ const More$1 = React__default.forwardRef((_ref3, ref) => {
|
|
|
13427
13615
|
|
|
13428
13616
|
const PREFIX$7 = 'ActionsToolbar';
|
|
13429
13617
|
const classes$7 = {
|
|
13618
|
+
item: "".concat(PREFIX$7, "-item"),
|
|
13430
13619
|
itemSpacing: "".concat(PREFIX$7, "-itemSpacing"),
|
|
13431
13620
|
firstItemSpacing: "".concat(PREFIX$7, "-firstItemSpacing"),
|
|
13432
13621
|
lastItemSpacing: "".concat(PREFIX$7, "-lastItemSpacing")
|
|
@@ -13463,25 +13652,27 @@ const ActionsGroup = React__default.forwardRef((_ref2, ref) => {
|
|
|
13463
13652
|
actions = [],
|
|
13464
13653
|
first = false,
|
|
13465
13654
|
last = false,
|
|
13466
|
-
addAnchor = false
|
|
13655
|
+
addAnchor = false,
|
|
13656
|
+
isRtl = false
|
|
13467
13657
|
} = _ref2;
|
|
13468
13658
|
return actions.length > 0 ? /*#__PURE__*/React__default.createElement(Grid, {
|
|
13469
13659
|
item: true,
|
|
13470
13660
|
container: true,
|
|
13471
13661
|
gap: 0,
|
|
13662
|
+
flexDirection: isRtl ? 'row-reverse' : 'row',
|
|
13472
13663
|
wrap: "nowrap"
|
|
13473
13664
|
}, actions.map((e, ix) => {
|
|
13474
13665
|
let cls = [];
|
|
13475
13666
|
const isFirstItem = first && ix === 0;
|
|
13476
13667
|
const isLastItem = last && actions.length - 1 === ix;
|
|
13477
13668
|
if (isFirstItem && !isLastItem) {
|
|
13478
|
-
cls = [classes$7.firstItemSpacing];
|
|
13669
|
+
cls = [classes$7.firstItemSpacing, classes$7.item];
|
|
13479
13670
|
}
|
|
13480
13671
|
if (isLastItem && !isFirstItem) {
|
|
13481
|
-
cls = [...cls, classes$7.lastItemSpacing];
|
|
13672
|
+
cls = [...cls, classes$7.lastItemSpacing, classes$7.item];
|
|
13482
13673
|
}
|
|
13483
13674
|
if (!isFirstItem && !isLastItem && cls.length === 0) {
|
|
13484
|
-
cls = [classes$7.itemSpacing];
|
|
13675
|
+
cls = [classes$7.itemSpacing, classes$7.item];
|
|
13485
13676
|
}
|
|
13486
13677
|
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
13487
13678
|
item: true,
|
|
@@ -13530,7 +13721,9 @@ function ActionsToolbar(_ref3) {
|
|
|
13530
13721
|
anchorEl: null
|
|
13531
13722
|
},
|
|
13532
13723
|
focusHandler = null,
|
|
13533
|
-
actionsRefMock = null
|
|
13724
|
+
actionsRefMock = null,
|
|
13725
|
+
// for testing
|
|
13726
|
+
direction = 'ltr'
|
|
13534
13727
|
} = _ref3;
|
|
13535
13728
|
const defaultSelectionActions = useDefaultSelectionActions(selections);
|
|
13536
13729
|
const {
|
|
@@ -13603,12 +13796,16 @@ function ActionsToolbar(_ref3) {
|
|
|
13603
13796
|
const showActions = newActions.length > 0;
|
|
13604
13797
|
const showMore = moreActions.length > 0;
|
|
13605
13798
|
const showDivider = showActions && selections.show || showMore && selections.show;
|
|
13799
|
+
const isRtl = direction === 'rtl';
|
|
13606
13800
|
const Actions = /*#__PURE__*/React__default.createElement(Grid, {
|
|
13607
13801
|
ref: actionsRef,
|
|
13608
13802
|
onKeyDown: tabCallback,
|
|
13609
13803
|
container: true,
|
|
13610
13804
|
gap: 0,
|
|
13611
|
-
wrap: "nowrap"
|
|
13805
|
+
wrap: "nowrap",
|
|
13806
|
+
sx: {
|
|
13807
|
+
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
13808
|
+
}
|
|
13612
13809
|
}, showActions && /*#__PURE__*/React__default.createElement(ActionsGroup, {
|
|
13613
13810
|
actions: newActions,
|
|
13614
13811
|
first: true,
|
|
@@ -13629,7 +13826,8 @@ function ActionsToolbar(_ref3) {
|
|
|
13629
13826
|
})), selections.show && /*#__PURE__*/React__default.createElement(ActionsGroup, {
|
|
13630
13827
|
actions: defaultSelectionActions,
|
|
13631
13828
|
first: !showActions && !showMore,
|
|
13632
|
-
last: true
|
|
13829
|
+
last: true,
|
|
13830
|
+
isRtl: isRtl
|
|
13633
13831
|
}), showMoreItems && /*#__PURE__*/React__default.createElement(More$1, {
|
|
13634
13832
|
show: showMoreItems,
|
|
13635
13833
|
actions: moreActions,
|
|
@@ -13685,7 +13883,8 @@ const StyledOutlinedInput = styled$1(OutlinedInput)(_ref2 => {
|
|
|
13685
13883
|
theme
|
|
13686
13884
|
} = _ref2;
|
|
13687
13885
|
return {
|
|
13688
|
-
color: (_theme$listBox2 = theme.listBox) === null || _theme$listBox2 === void 0 ? void 0 : (_theme$listBox2$conte = _theme$listBox2.content) === null || _theme$listBox2$conte === void 0 ? void 0 : _theme$listBox2$conte.color
|
|
13886
|
+
color: (_theme$listBox2 = theme.listBox) === null || _theme$listBox2 === void 0 ? void 0 : (_theme$listBox2$conte = _theme$listBox2.content) === null || _theme$listBox2$conte === void 0 ? void 0 : _theme$listBox2$conte.color,
|
|
13887
|
+
display: 'flex'
|
|
13689
13888
|
};
|
|
13690
13889
|
});
|
|
13691
13890
|
function ListBoxSearch(_ref3) {
|
|
@@ -13698,7 +13897,8 @@ function ListBoxSearch(_ref3) {
|
|
|
13698
13897
|
visible = true,
|
|
13699
13898
|
autoFocus = true,
|
|
13700
13899
|
wildCardSearch = false,
|
|
13701
|
-
searchEnabled
|
|
13900
|
+
searchEnabled,
|
|
13901
|
+
direction
|
|
13702
13902
|
} = _ref3;
|
|
13703
13903
|
const {
|
|
13704
13904
|
translator
|
|
@@ -13710,6 +13910,8 @@ function ListBoxSearch(_ref3) {
|
|
|
13710
13910
|
const {
|
|
13711
13911
|
getStoreValue
|
|
13712
13912
|
} = useDataStore(model);
|
|
13913
|
+
const isRtl = direction === 'rtl';
|
|
13914
|
+
const inpuTextAlign = isRtl ? 'right' : 'left';
|
|
13713
13915
|
const cancel = () => selections.isActive() && selections.cancel();
|
|
13714
13916
|
const abortSearch = async () => {
|
|
13715
13917
|
if (!selections.isModal()) {
|
|
@@ -13797,6 +13999,7 @@ function ListBoxSearch(_ref3) {
|
|
|
13797
13999
|
className: "search",
|
|
13798
14000
|
sx: [{
|
|
13799
14001
|
border: 'none',
|
|
14002
|
+
fontSize: 14,
|
|
13800
14003
|
borderRadius: 0,
|
|
13801
14004
|
backgroundColor: 'transparent',
|
|
13802
14005
|
'& fieldset': {
|
|
@@ -13815,6 +14018,8 @@ function ListBoxSearch(_ref3) {
|
|
|
13815
14018
|
paddingTop: '5px',
|
|
13816
14019
|
paddingBottom: '5px'
|
|
13817
14020
|
}
|
|
14021
|
+
}, {
|
|
14022
|
+
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
13818
14023
|
}],
|
|
13819
14024
|
inputRef: inputRef,
|
|
13820
14025
|
size: "small",
|
|
@@ -13826,7 +14031,10 @@ function ListBoxSearch(_ref3) {
|
|
|
13826
14031
|
onKeyDown: onKeyDown,
|
|
13827
14032
|
autoFocus: autoFocus,
|
|
13828
14033
|
inputProps: {
|
|
13829
|
-
tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1
|
|
14034
|
+
tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1,
|
|
14035
|
+
style: {
|
|
14036
|
+
textAlign: "".concat(inpuTextAlign)
|
|
14037
|
+
}
|
|
13830
14038
|
}
|
|
13831
14039
|
});
|
|
13832
14040
|
}
|
|
@@ -14372,6 +14580,7 @@ function ListBoxPopover(_ref) {
|
|
|
14372
14580
|
autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : true
|
|
14373
14581
|
}), /*#__PURE__*/React__default.createElement(ListBox, {
|
|
14374
14582
|
model: model,
|
|
14583
|
+
app: app,
|
|
14375
14584
|
layout: layout,
|
|
14376
14585
|
selections: selections,
|
|
14377
14586
|
selectionState: selectionState$1,
|
|
@@ -15645,20 +15854,21 @@ const drillDown = props => _objectSpread2(_objectSpread2({}, props), {}, {
|
|
|
15645
15854
|
var DrillDownIcon = (props => SvgIcon$2(drillDown(props)));
|
|
15646
15855
|
|
|
15647
15856
|
const addListboxTheme = themeApi => {
|
|
15648
|
-
const getListboxStyle = prop => themeApi.getStyle('object',
|
|
15857
|
+
const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
|
|
15649
15858
|
return {
|
|
15650
|
-
backgroundColor: getListboxStyle('backgroundColor'),
|
|
15859
|
+
backgroundColor: getListboxStyle('', 'backgroundColor'),
|
|
15651
15860
|
title: {
|
|
15652
15861
|
main: {
|
|
15653
|
-
color: getListboxStyle('title.main
|
|
15654
|
-
fontSize: getListboxStyle('title.main
|
|
15655
|
-
fontFamily: getListboxStyle('title.main
|
|
15862
|
+
color: getListboxStyle('title.main', 'color'),
|
|
15863
|
+
fontSize: getListboxStyle('title.main', 'fontSize'),
|
|
15864
|
+
fontFamily: getListboxStyle('title.main', 'fontFamily'),
|
|
15865
|
+
fontWeight: getListboxStyle('title.main', 'fontWeight')
|
|
15656
15866
|
}
|
|
15657
15867
|
},
|
|
15658
15868
|
content: {
|
|
15659
|
-
color: getListboxStyle('content
|
|
15660
|
-
fontSize: getListboxStyle('content
|
|
15661
|
-
fontFamily: getListboxStyle('content
|
|
15869
|
+
color: getListboxStyle('content', 'color'),
|
|
15870
|
+
fontSize: getListboxStyle('content', 'fontSize'),
|
|
15871
|
+
fontFamily: getListboxStyle('content', 'fontFamily')
|
|
15662
15872
|
}
|
|
15663
15873
|
};
|
|
15664
15874
|
};
|
|
@@ -15732,7 +15942,7 @@ const StyledGrid$3 = styled$1(Grid, {
|
|
|
15732
15942
|
backgroundColor: (_theme$listBox$backgr = (_theme$listBox = theme.listBox) === null || _theme$listBox === void 0 ? void 0 : _theme$listBox.backgroundColor) !== null && _theme$listBox$backgr !== void 0 ? _theme$listBox$backgr : theme.palette.background.default,
|
|
15733
15943
|
["& .".concat(classes$4.listBoxHeader)]: {
|
|
15734
15944
|
alignSelf: 'center',
|
|
15735
|
-
display: '
|
|
15945
|
+
display: 'flex',
|
|
15736
15946
|
width: "calc(100% - ".concat(BUTTON_ICON_WIDTH, "px)")
|
|
15737
15947
|
},
|
|
15738
15948
|
["& .".concat(classes$4.screenReaderOnly)]: {
|
|
@@ -15743,18 +15953,25 @@ const StyledGrid$3 = styled$1(Grid, {
|
|
|
15743
15953
|
},
|
|
15744
15954
|
["& .".concat(classes$4.listboxWrapper)]: {
|
|
15745
15955
|
padding: containerPadding
|
|
15956
|
+
},
|
|
15957
|
+
'&:focus': {
|
|
15958
|
+
boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
|
|
15959
|
+
},
|
|
15960
|
+
'&:focus-visible': {
|
|
15961
|
+
outline: 'none'
|
|
15746
15962
|
}
|
|
15747
15963
|
};
|
|
15748
15964
|
});
|
|
15749
15965
|
const Title = styled$1(Typography)(_ref2 => {
|
|
15750
|
-
var _theme$listBox2, _theme$listBox2$title, _theme$listBox2$title2, _theme$listBox3, _theme$listBox3$title, _theme$listBox3$title2, _theme$listBox4, _theme$listBox4$title, _theme$listBox4$title2;
|
|
15966
|
+
var _theme$listBox2, _theme$listBox2$title, _theme$listBox2$title2, _theme$listBox3, _theme$listBox3$title, _theme$listBox3$title2, _theme$listBox4, _theme$listBox4$title, _theme$listBox4$title2, _theme$listBox5, _theme$listBox5$title, _theme$listBox5$title2;
|
|
15751
15967
|
let {
|
|
15752
15968
|
theme
|
|
15753
15969
|
} = _ref2;
|
|
15754
15970
|
return {
|
|
15755
15971
|
color: (_theme$listBox2 = theme.listBox) === null || _theme$listBox2 === void 0 ? void 0 : (_theme$listBox2$title = _theme$listBox2.title) === null || _theme$listBox2$title === void 0 ? void 0 : (_theme$listBox2$title2 = _theme$listBox2$title.main) === null || _theme$listBox2$title2 === void 0 ? void 0 : _theme$listBox2$title2.color,
|
|
15756
15972
|
fontSize: (_theme$listBox3 = theme.listBox) === null || _theme$listBox3 === void 0 ? void 0 : (_theme$listBox3$title = _theme$listBox3.title) === null || _theme$listBox3$title === void 0 ? void 0 : (_theme$listBox3$title2 = _theme$listBox3$title.main) === null || _theme$listBox3$title2 === void 0 ? void 0 : _theme$listBox3$title2.fontSize,
|
|
15757
|
-
fontFamily: (_theme$listBox4 = theme.listBox) === null || _theme$listBox4 === void 0 ? void 0 : (_theme$listBox4$title = _theme$listBox4.title) === null || _theme$listBox4$title === void 0 ? void 0 : (_theme$listBox4$title2 = _theme$listBox4$title.main) === null || _theme$listBox4$title2 === void 0 ? void 0 : _theme$listBox4$title2.fontFamily
|
|
15973
|
+
fontFamily: (_theme$listBox4 = theme.listBox) === null || _theme$listBox4 === void 0 ? void 0 : (_theme$listBox4$title = _theme$listBox4.title) === null || _theme$listBox4$title === void 0 ? void 0 : (_theme$listBox4$title2 = _theme$listBox4$title.main) === null || _theme$listBox4$title2 === void 0 ? void 0 : _theme$listBox4$title2.fontFamily,
|
|
15974
|
+
fontWeight: ((_theme$listBox5 = theme.listBox) === null || _theme$listBox5 === void 0 ? void 0 : (_theme$listBox5$title = _theme$listBox5.title) === null || _theme$listBox5$title === void 0 ? void 0 : (_theme$listBox5$title2 = _theme$listBox5$title.main) === null || _theme$listBox5$title2 === void 0 ? void 0 : _theme$listBox5$title2.fontWeight) || 'bold'
|
|
15758
15975
|
};
|
|
15759
15976
|
});
|
|
15760
15977
|
function ListBoxInline(_ref3) {
|
|
@@ -15894,6 +16111,7 @@ function ListBoxInline(_ref3) {
|
|
|
15894
16111
|
return null;
|
|
15895
16112
|
}
|
|
15896
16113
|
const isLocked = layout.qListObject.qDimensionInfo.qLocked === true;
|
|
16114
|
+
const isRtl = direction === 'rtl';
|
|
15897
16115
|
const isDrillDown = layout.qListObject.qDimensionInfo.qGrouping === 'H';
|
|
15898
16116
|
const listboxSelectionToolbarItems = createListboxSelectionToolbar({
|
|
15899
16117
|
layout,
|
|
@@ -15901,20 +16119,19 @@ function ListBoxInline(_ref3) {
|
|
|
15901
16119
|
translator,
|
|
15902
16120
|
selectionState: selectionState$1
|
|
15903
16121
|
});
|
|
15904
|
-
const showSearchToggle = search === 'toggle' && showSearch;
|
|
15905
|
-
const searchVisible = (search === true || showSearchToggle) && !selectDisabled();
|
|
15906
16122
|
const {
|
|
16123
|
+
wildCardSearch,
|
|
16124
|
+
searchEnabled,
|
|
15907
16125
|
layoutOptions = {}
|
|
15908
16126
|
} = layout;
|
|
16127
|
+
const showSearchToggle = search === 'toggle' && showSearch;
|
|
16128
|
+
const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
|
|
15909
16129
|
const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
|
|
15910
16130
|
const searchHeight = dense ? 27 : 40;
|
|
15911
16131
|
const extraheight = dense ? 39 : 49;
|
|
15912
|
-
const
|
|
16132
|
+
const searchAddHeight = searchVisible ? searchHeight : 0;
|
|
16133
|
+
const minHeight = toolbar ? 49 + searchAddHeight + extraheight : 0;
|
|
15913
16134
|
const headerHeight = 32;
|
|
15914
|
-
const {
|
|
15915
|
-
wildCardSearch,
|
|
15916
|
-
searchEnabled
|
|
15917
|
-
} = layout;
|
|
15918
16135
|
const onShowSearch = () => {
|
|
15919
16136
|
const newValue = !showSearch;
|
|
15920
16137
|
setShowSearch(newValue);
|
|
@@ -15933,6 +16150,7 @@ function ListBoxInline(_ref3) {
|
|
|
15933
16150
|
const showIcons = showSearchOrLockIcon || isDrillDown;
|
|
15934
16151
|
const iconsWidth = (showSearchOrLockIcon ? BUTTON_ICON_WIDTH : 0) + (isDrillDown ? ICON_WIDTH + ICON_PADDING : 0); // Drill-down icon needs padding right so there is space between the icon and the title
|
|
15935
16152
|
const headerPaddingLeft = CELL_PADDING_LEFT - (showSearchOrLockIcon ? ICON_PADDING : 0);
|
|
16153
|
+
const headerPaddingRight = isRtl ? CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0) : 0;
|
|
15936
16154
|
|
|
15937
16155
|
// Add a container padding for grid mode to harmonize with the grid item margins (should sum to 8px).
|
|
15938
16156
|
const isGridMode = (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.dataLayout) === 'grid';
|
|
@@ -15940,7 +16158,9 @@ function ListBoxInline(_ref3) {
|
|
|
15940
16158
|
if (isGridMode) {
|
|
15941
16159
|
containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px';
|
|
15942
16160
|
}
|
|
15943
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar,
|
|
16161
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$6({
|
|
16162
|
+
direction: direction
|
|
16163
|
+
}, getActionToolbarProps(true))), /*#__PURE__*/React__default.createElement(StyledGrid$3, {
|
|
15944
16164
|
className: "listbox-container",
|
|
15945
16165
|
container: true,
|
|
15946
16166
|
tabIndex: keyboard.enabled && !keyboard.active ? 0 : -1,
|
|
@@ -15961,13 +16181,20 @@ function ListBoxInline(_ref3) {
|
|
|
15961
16181
|
container: true,
|
|
15962
16182
|
style: {
|
|
15963
16183
|
padding: theme.spacing(1),
|
|
15964
|
-
paddingLeft: "".concat(headerPaddingLeft, "px")
|
|
16184
|
+
paddingLeft: "".concat(headerPaddingLeft, "px"),
|
|
16185
|
+
paddingRight: "".concat(headerPaddingRight, "px")
|
|
16186
|
+
},
|
|
16187
|
+
sx: {
|
|
16188
|
+
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
15965
16189
|
},
|
|
15966
16190
|
wrap: "nowrap"
|
|
15967
16191
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
15968
16192
|
item: true,
|
|
15969
16193
|
container: true,
|
|
15970
16194
|
height: headerHeight,
|
|
16195
|
+
sx: {
|
|
16196
|
+
flexDirection: isRtl ? 'row-reverse' : 'row'
|
|
16197
|
+
},
|
|
15971
16198
|
wrap: "nowrap"
|
|
15972
16199
|
}, showIcons && /*#__PURE__*/React__default.createElement(Grid, {
|
|
15973
16200
|
item: true,
|
|
@@ -15977,12 +16204,12 @@ function ListBoxInline(_ref3) {
|
|
|
15977
16204
|
width: iconsWidth
|
|
15978
16205
|
}
|
|
15979
16206
|
}, isLocked ? /*#__PURE__*/React__default.createElement(IconButton, {
|
|
16207
|
+
title: translator.get('SelectionToolbar.ClickToUnlock'),
|
|
15980
16208
|
tabIndex: -1,
|
|
15981
16209
|
onClick: unlock,
|
|
15982
16210
|
disabled: selectDisabled(),
|
|
15983
16211
|
size: "large"
|
|
15984
16212
|
}, /*#__PURE__*/React__default.createElement(Lock, {
|
|
15985
|
-
title: translator.get('Listbox.Unlock'),
|
|
15986
16213
|
disableRipple: true,
|
|
15987
16214
|
style: {
|
|
15988
16215
|
fontSize: '12px'
|
|
@@ -16007,6 +16234,9 @@ function ListBoxInline(_ref3) {
|
|
|
16007
16234
|
}
|
|
16008
16235
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
16009
16236
|
item: true,
|
|
16237
|
+
sx: {
|
|
16238
|
+
justifyContent: isRtl ? 'flex-end' : 'flex-start'
|
|
16239
|
+
},
|
|
16010
16240
|
className: classes$4.listBoxHeader
|
|
16011
16241
|
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
16012
16242
|
variant: "h6",
|
|
@@ -16018,17 +16248,19 @@ function ListBoxInline(_ref3) {
|
|
|
16018
16248
|
xs: true
|
|
16019
16249
|
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
16020
16250
|
item: true
|
|
16021
|
-
}, /*#__PURE__*/React__default.createElement(ActionsToolbar,
|
|
16251
|
+
}, /*#__PURE__*/React__default.createElement(ActionsToolbar, _extends$6({
|
|
16252
|
+
direction: direction
|
|
16253
|
+
}, getActionToolbarProps(showToolbarDetached({
|
|
16022
16254
|
containerRef,
|
|
16023
16255
|
titleRef,
|
|
16024
16256
|
iconsWidth
|
|
16025
|
-
}))))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
16257
|
+
})))))), /*#__PURE__*/React__default.createElement(Grid, {
|
|
16026
16258
|
item: true,
|
|
16027
16259
|
container: true,
|
|
16028
16260
|
direction: "column",
|
|
16029
16261
|
style: {
|
|
16030
16262
|
height: '100%',
|
|
16031
|
-
minHeight:
|
|
16263
|
+
minHeight: '50px'
|
|
16032
16264
|
},
|
|
16033
16265
|
role: "region",
|
|
16034
16266
|
"aria-label": translator.get('Listbox.ResultFilterLabel')
|
|
@@ -16048,7 +16280,8 @@ function ListBoxInline(_ref3) {
|
|
|
16048
16280
|
autoFocus: shouldAutoFocus,
|
|
16049
16281
|
searchContainerRef: searchContainerRef,
|
|
16050
16282
|
wildCardSearch: wildCardSearch,
|
|
16051
|
-
searchEnabled: searchEnabled
|
|
16283
|
+
searchEnabled: searchEnabled,
|
|
16284
|
+
direction: direction
|
|
16052
16285
|
})), /*#__PURE__*/React__default.createElement(Grid, {
|
|
16053
16286
|
item: true,
|
|
16054
16287
|
xs: true,
|
|
@@ -16062,6 +16295,7 @@ function ListBoxInline(_ref3) {
|
|
|
16062
16295
|
} = _ref4;
|
|
16063
16296
|
return /*#__PURE__*/React__default.createElement(ListBox, {
|
|
16064
16297
|
model: model,
|
|
16298
|
+
app: app,
|
|
16065
16299
|
constraints: constraints,
|
|
16066
16300
|
layout: layout,
|
|
16067
16301
|
selections: selections,
|
|
@@ -16169,7 +16403,13 @@ function useOnTheFlyModel(_ref) {
|
|
|
16169
16403
|
const dim = await app.getDimension(fieldIdentifier.qLibraryId);
|
|
16170
16404
|
const dimLayout = await dim.getLayout();
|
|
16171
16405
|
setFallbackTitle(dimLayout.qDim.title);
|
|
16172
|
-
|
|
16406
|
+
if (dimLayout.qDim.qGrouping === 'N') {
|
|
16407
|
+
setFieldDef(dimLayout.qDim.qFieldDefs ? dimLayout.qDim.qFieldDefs[0] : '');
|
|
16408
|
+
} else {
|
|
16409
|
+
setFieldDef({
|
|
16410
|
+
multiFieldDim: true
|
|
16411
|
+
});
|
|
16412
|
+
}
|
|
16173
16413
|
setIsFetching(false);
|
|
16174
16414
|
} catch (e) {
|
|
16175
16415
|
setIsFetching(false);
|
|
@@ -16279,11 +16519,16 @@ function useOnTheFlyModel(_ref) {
|
|
|
16279
16519
|
listdef.qListObjectDef.qDef.qFieldDefs = [fieldIdentifier];
|
|
16280
16520
|
fieldName = fieldIdentifier;
|
|
16281
16521
|
}
|
|
16282
|
-
if (frequencyMode !== '
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
}
|
|
16522
|
+
if (frequencyMode !== 'P' && histogram) {
|
|
16523
|
+
if (fieldDef !== null && fieldDef !== void 0 && fieldDef.multiFieldDim) {
|
|
16524
|
+
listdef.frequencyMax = 'fetch';
|
|
16525
|
+
// maybe for all lib dimension to handle if it properties change
|
|
16526
|
+
} else {
|
|
16527
|
+
const field = fieldIdentifier.qLibraryId ? fieldDef : fieldName;
|
|
16528
|
+
listdef.frequencyMax = {
|
|
16529
|
+
qValueExpression: getFrequencyMaxExpression(field)
|
|
16530
|
+
};
|
|
16531
|
+
}
|
|
16287
16532
|
}
|
|
16288
16533
|
const [sessionModel] = useSessionModel(listdef, isFetching ? null : app, fieldName, stateName);
|
|
16289
16534
|
useEffect$1(() => {
|
|
@@ -23634,6 +23879,7 @@ const mergeArray = function () {
|
|
|
23634
23879
|
const mergeConfigs = (base, c) => ({
|
|
23635
23880
|
context: mergeObj(base.context, c.context),
|
|
23636
23881
|
load: c.load || base.load,
|
|
23882
|
+
loadTheme: c.loadTheme || base.loadTheme,
|
|
23637
23883
|
snapshot: _objectSpread2({}, c.snapshot || base.snapshot),
|
|
23638
23884
|
types: mergeArray(base.types, c.types),
|
|
23639
23885
|
themes: mergeArray(base.themes, c.themes),
|
|
@@ -23680,6 +23926,7 @@ function nuked() {
|
|
|
23680
23926
|
});
|
|
23681
23927
|
const appTheme$1 = appTheme({
|
|
23682
23928
|
themes: configuration.themes,
|
|
23929
|
+
loadTheme: configuration.loadTheme,
|
|
23683
23930
|
root
|
|
23684
23931
|
});
|
|
23685
23932
|
currentContext.themeApi = appTheme$1.externalAPI;
|