@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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v4.0.0-alpha.1
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
  */
@@ -1040,6 +1040,26 @@
1040
1040
  "zh-TW": "解除"
1041
1041
  }
1042
1042
  };
1043
+ var Listbox_DrillDown = {
1044
+ id: "Listbox.DrillDown",
1045
+ locale: {
1046
+ "de-DE": "Drilldown-Dimension",
1047
+ "en-US": "Drill-down dimension",
1048
+ "es-ES": "Dimensión jerárquica",
1049
+ "fr-FR": "Dimension hiérarchique",
1050
+ "it-IT": "Dimensione drill-down",
1051
+ "ja-JP": "軸のドリルダウン",
1052
+ "ko-KR": "드릴다운 차원",
1053
+ "nl-NL": "Drill-downdimensie",
1054
+ "pl-PL": "Wymiar hierarchiczny",
1055
+ "pt-BR": "Dimensão de detalhamento",
1056
+ "ru-RU": "Детализированное измерение",
1057
+ "sv-SE": "Hierarkisk dimension",
1058
+ "tr-TR": "Detaya inme boyutu",
1059
+ "zh-CN": "钻取维度",
1060
+ "zh-TW": "向下探查維度"
1061
+ }
1062
+ };
1043
1063
  var Listbox_ItemsOverflow = {
1044
1064
  id: "Listbox.ItemsOverflow",
1045
1065
  locale: {
@@ -1680,17 +1700,12 @@
1680
1700
  "zh-TW": "不符計算條件"
1681
1701
  }
1682
1702
  };
1683
- var Listbox_DrillDown = {
1684
- id: "Listbox.DrillDown",
1685
- locale: {
1686
- "en-US": "Drill-down dimension"
1687
- }
1688
- };
1689
1703
  var all = {
1690
1704
  Cancel: Cancel$1,
1691
1705
  CurrentSelections_All: CurrentSelections_All,
1692
1706
  CurrentSelections_Of: CurrentSelections_Of,
1693
1707
  Listbox_Dismiss: Listbox_Dismiss,
1708
+ Listbox_DrillDown: Listbox_DrillDown,
1694
1709
  Listbox_ItemsOverflow: Listbox_ItemsOverflow,
1695
1710
  Listbox_Lock: Listbox_Lock,
1696
1711
  Listbox_NoMatchesForYourTerms: Listbox_NoMatchesForYourTerms,
@@ -1722,8 +1737,7 @@
1722
1737
  Visualization_Invalid_Dimension: Visualization_Invalid_Dimension,
1723
1738
  Visualization_Invalid_Measure: Visualization_Invalid_Measure,
1724
1739
  Visualization_LayoutError: Visualization_LayoutError,
1725
- Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition,
1726
- Listbox_DrillDown: Listbox_DrillDown
1740
+ Visualization_UnfulfilledCalculationCondition: Visualization_UnfulfilledCalculationCondition
1727
1741
  };
1728
1742
 
1729
1743
  function appLocaleFn(language) {
@@ -2804,9 +2818,34 @@
2804
2818
  color: color$1
2805
2819
  };
2806
2820
 
2821
+ var object = {
2822
+ listBox: {
2823
+ backgroundColor: "#ffffff",
2824
+ title: {
2825
+ main: {
2826
+ color: "#404040",
2827
+ fontSize: "14px",
2828
+ fontWeight: "bold"
2829
+ }
2830
+ },
2831
+ content: {
2832
+ color: "#404040",
2833
+ fontSize: "12px"
2834
+ }
2835
+ }
2836
+ };
2837
+ var baseInheritRawJSON = {
2838
+ object: object
2839
+ };
2840
+
2841
+ /* eslint no-underscore-dangle:0 */
2807
2842
  function setTheme(t, resolve) {
2808
2843
  const colorRawJSON = t.type === 'dark' ? darkRawJSON : lightRawJSON;
2809
- const root = extend$1(true, {}, baseRawJSON, colorRawJSON);
2844
+ let baseInherit = baseInheritRawJSON;
2845
+ if (t._inherit === false || t._inherit === 'false') {
2846
+ baseInherit = {};
2847
+ }
2848
+ const root = extend$1(true, {}, baseRawJSON, colorRawJSON, baseInherit);
2810
2849
  // avoid merging known array objects as it could cause issues if they are of different types (pyramid vs class) or length
2811
2850
  const rawThemeJSON = extend$1(true, {}, root, {
2812
2851
  scales: null,
@@ -3450,15 +3489,21 @@
3450
3489
  function appTheme() {
3451
3490
  let {
3452
3491
  themes = [],
3492
+ loadTheme,
3453
3493
  root
3454
3494
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3455
3495
  const wrappedTheme = theme();
3456
3496
  const setTheme = async themeId => {
3457
- const found = themes.filter(t => t.id === themeId)[0];
3497
+ let found = themes.filter(t => t.id === themeId)[0];
3458
3498
  let muiTheme = themeId === 'dark' ? 'dark' : 'light';
3499
+ if (!found && loadTheme) {
3500
+ found = {
3501
+ load: loadTheme
3502
+ };
3503
+ }
3459
3504
  if (found && found.load) {
3460
3505
  try {
3461
- const raw = await Promise.race([found.load(), timed(LOAD_THEME_TIMEOUT, {
3506
+ const raw = await Promise.race([found.load(themeId), timed(LOAD_THEME_TIMEOUT, {
3462
3507
  __timedOut: true
3463
3508
  })]);
3464
3509
  if (raw.__timedOut) {
@@ -15354,7 +15399,7 @@
15354
15399
  return cache[key];
15355
15400
  }
15356
15401
 
15357
- const NEBULA_VERSION_HASH = "f871" ;
15402
+ const NEBULA_VERSION_HASH = "9a45" ;
15358
15403
  ClassNameGenerator$1.configure(componentName => {
15359
15404
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
15360
15405
  });
@@ -15562,7 +15607,7 @@
15562
15607
  const appRef = React.createRef();
15563
15608
  const element = document.createElement('div');
15564
15609
  element.style.display = 'none';
15565
- element.setAttribute('data-nebulajs-version', "4.0.0-alpha.1" );
15610
+ element.setAttribute('data-nebulajs-version', "4.0.0-alpha.2" );
15566
15611
  element.setAttribute('data-app-id', app.id);
15567
15612
  document.body.appendChild(element);
15568
15613
  const root = client.createRoot(element);
@@ -22011,15 +22056,29 @@
22011
22056
  constraints
22012
22057
  } = _ref2;
22013
22058
  const focusInsideListbox = element => {
22014
- const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-* button');
22059
+ const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-item button');
22015
22060
  setKeyboardActive(true);
22016
22061
  if (fieldElement) {
22017
22062
  fieldElement.focus();
22018
22063
  }
22019
22064
  };
22020
- const focusContainer = element => {
22021
- setKeyboardActive(false);
22022
- element.focus();
22065
+ const changeFocus = event => {
22066
+ var _event$target;
22067
+ if ((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.classList.contains('listbox-container')) {
22068
+ // Focus currently on a listbox
22069
+ // Esc on a list box should move the focus to its parent, i.e. a filter pane if any
22070
+ setKeyboardActive(false);
22071
+ } else {
22072
+ var _event$target2, _event$target3, _event$currentTarget, _event$currentTarget2;
22073
+ // Focus currently on a row
22074
+ // Esc on a row should move the focus to its parent, i.e. a listbox
22075
+ // First unfocus the row
22076
+ (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.setAttribute('tabIndex', '-1');
22077
+ (_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.blur();
22078
+ // Then focus the listbox
22079
+ (_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.setAttribute('tabIndex', '0');
22080
+ (_event$currentTarget2 = event.currentTarget) === null || _event$currentTarget2 === void 0 ? void 0 : _event$currentTarget2.focus();
22081
+ }
22023
22082
  };
22024
22083
  const updateKeyScrollOnHover = newState => {
22025
22084
  if (hovering) {
@@ -22043,7 +22102,7 @@
22043
22102
  focusInsideListbox(event.currentTarget);
22044
22103
  break;
22045
22104
  case KEYS.ESCAPE:
22046
- focusContainer(event.currentTarget);
22105
+ changeFocus(event);
22047
22106
  break;
22048
22107
  case KEYS.ARROW_UP:
22049
22108
  updateKeyScrollOnHover({
@@ -22055,6 +22114,10 @@
22055
22114
  down: 1
22056
22115
  });
22057
22116
  break;
22117
+ case KEYS.ARROW_LEFT:
22118
+ case KEYS.ARROW_RIGHT:
22119
+ return;
22120
+ // let it propagate to top-level
22058
22121
  case KEYS.PAGE_UP:
22059
22122
  updateKeyScrollOnHover({
22060
22123
  up: currentScrollIndex.stop - currentScrollIndex.start
@@ -22182,25 +22245,15 @@
22182
22245
  const getBarWidth = _ref => {
22183
22246
  let {
22184
22247
  qFrequency,
22185
- checkboxes,
22186
22248
  frequencyMax
22187
22249
  } = _ref;
22188
22250
  const freqStr = String(qFrequency);
22189
22251
  const isPercent = freqStr.substring(freqStr.length - 1) === '%';
22190
22252
  const freq = parseFloat(isPercent ? freqStr : qFrequency);
22191
- const rightSlice = checkboxes ? "(".concat(barWithCheckboxLeftPadPx, "px + ").concat(barPadPx + barBorderWidthPx * 2, "px)") : "".concat(barPadPx * 2 + barBorderWidthPx * 2, "px");
22192
22253
  const width = isPercent ? freq : freq / frequencyMax * 100;
22193
- return "calc(".concat(width, "% - ").concat(rightSlice, ")");
22194
- };
22195
- const getFrequencyText = _ref2 => {
22196
- let {
22197
- cell
22198
- } = _ref2;
22199
- if (cell) {
22200
- return cell.qFrequency ? cell.qFrequency : frequencyTextNone;
22201
- }
22202
- return '';
22254
+ return "".concat(width, "%");
22203
22255
  };
22256
+ const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
22204
22257
 
22205
22258
  const CELL_PADDING_LEFT = 9;
22206
22259
  const ICON_WIDTH = 12;
@@ -22229,8 +22282,10 @@
22229
22282
  textOverflow: 'ellipsis',
22230
22283
  whiteSpace: 'nowrap'
22231
22284
  };
22285
+ const iconWidth = 24; // tick and lock icon width in px
22286
+
22232
22287
  const RowColRoot = styled$1('div', {
22233
- shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'].includes(prop)
22288
+ shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth', 'showIcon', 'checkboxes'].includes(prop)
22234
22289
  })(_ref2 => {
22235
22290
  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;
22236
22291
  let {
@@ -22239,7 +22294,9 @@
22239
22294
  isGridMode,
22240
22295
  isGridCol,
22241
22296
  dense,
22242
- frequencyWidth
22297
+ frequencyWidth,
22298
+ showIcon,
22299
+ checkboxes
22243
22300
  } = _ref2;
22244
22301
  return {
22245
22302
  '&:focus': {
@@ -22248,6 +22305,14 @@
22248
22305
  '&:focus-visible': {
22249
22306
  outline: 'none'
22250
22307
  },
22308
+ '& .value': {
22309
+ '&:focus': {
22310
+ boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
22311
+ },
22312
+ '&:focus-visible': {
22313
+ outline: 'none'
22314
+ }
22315
+ },
22251
22316
  ["& .".concat(rowColClasses.row)]: {
22252
22317
  flexWrap: 'nowrap',
22253
22318
  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
@@ -22276,7 +22341,7 @@
22276
22341
  flexBasis: flexBasisProp,
22277
22342
  lineHeight: '16px',
22278
22343
  userSelect: 'none',
22279
- paddingRight: '1px'
22344
+ paddingRight: showIcon || checkboxes ? '1px' : "".concat(iconWidth, "px")
22280
22345
  }, ellipsis), {}, {
22281
22346
  whiteSpace: 'pre',
22282
22347
  // to keep white-space on highlight
@@ -22318,9 +22383,9 @@
22318
22383
  ["& .".concat(rowColClasses.icon)]: {
22319
22384
  display: 'flex',
22320
22385
  justifyContent: 'center',
22321
- width: 24,
22322
- minWidth: 24,
22323
- maxWidth: 24
22386
+ width: iconWidth,
22387
+ minWidth: iconWidth,
22388
+ maxWidth: iconWidth
22324
22389
  },
22325
22390
  // Selection styles (S=Selected, XS=ExcludedSelected, A=Available, X=Excluded).
22326
22391
  ["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
@@ -22358,27 +22423,38 @@
22358
22423
  alignItems: 'center'
22359
22424
  },
22360
22425
  ["& .".concat(rowColClasses.bar)]: {
22361
- border: "".concat(barBorderWidthPx, "px solid"),
22362
- borderColor: '#D9D9D9',
22363
22426
  height: dense ? '16px' : '20px',
22364
22427
  position: 'absolute',
22365
22428
  zIndex: '-1',
22366
22429
  alignSelf: 'center',
22367
- left: "".concat(barPadPx, "px"),
22368
- transition: 'width 0.2s',
22369
- backgroundColor: '#FAFAFA'
22430
+ left: barPadPx,
22431
+ width: "calc(100% - ".concat(barPadPx * 2, "px)"),
22432
+ display: 'flex',
22433
+ alignItems: 'center',
22434
+ '& .bar-filled': {
22435
+ border: "".concat(barBorderWidthPx, "px solid"),
22436
+ borderColor: '#D9D9D9',
22437
+ transition: 'width 0.2s',
22438
+ backgroundColor: '#FAFAFA',
22439
+ height: '100%'
22440
+ }
22370
22441
  },
22371
22442
  ["& .".concat(rowColClasses.barSelected)]: {
22372
- opacity: '30%',
22373
22443
  zIndex: '0',
22374
- background: theme.palette.background.lighter
22444
+ '& .bar-filled': {
22445
+ opacity: '30%',
22446
+ background: theme.palette.background.lighter
22447
+ }
22375
22448
  },
22376
22449
  ["& .".concat(rowColClasses.barWithCheckbox)]: {
22377
- left: "".concat(barWithCheckboxLeftPadPx, "px")
22450
+ left: barWithCheckboxLeftPadPx,
22451
+ width: "calc(100% - ".concat(barWithCheckboxLeftPadPx + barPadPx, "px)")
22378
22452
  },
22379
22453
  ["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
22380
- background: '#BFE5D0',
22381
- borderColor: '#BFE5D0'
22454
+ '& .bar-filled': {
22455
+ background: '#BFE5D0',
22456
+ borderColor: '#BFE5D0'
22457
+ }
22382
22458
  },
22383
22459
  ["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
22384
22460
  color: '#828282',
@@ -22554,6 +22630,7 @@
22554
22630
  color: color,
22555
22631
  align: valueTextAlign
22556
22632
  }, /*#__PURE__*/React.createElement("span", {
22633
+ dir: "auto",
22557
22634
  style: {
22558
22635
  whiteSpace: 'pre'
22559
22636
  }
@@ -22739,29 +22816,27 @@
22739
22816
 
22740
22817
  function Histogram(_ref) {
22741
22818
  let {
22742
- cell,
22819
+ qFrequency,
22743
22820
  histogram,
22744
22821
  checkboxes,
22745
22822
  isSelected,
22746
22823
  frequencyMax
22747
22824
  } = _ref;
22748
- const hasHistogramBar = cell && histogram && getFrequencyText({
22749
- cell
22750
- }) !== frequencyTextNone;
22825
+ const hasHistogramBar = qFrequency && histogram && getFrequencyText(qFrequency) !== frequencyTextNone;
22751
22826
  if (!hasHistogramBar) {
22752
22827
  return undefined;
22753
22828
  }
22754
22829
  const width = getBarWidth({
22755
- qFrequency: cell.qFrequency,
22830
+ qFrequency,
22756
22831
  checkboxes,
22757
22832
  frequencyMax
22758
22833
  });
22759
- return /*#__PURE__*/React.createElement("div", {
22760
- className: joinClassNames([rowColClasses.bar, checkboxes && rowColClasses.barWithCheckbox, isSelected && (checkboxes ? rowColClasses.barSelectedWithCheckbox : rowColClasses.barSelected)]),
22761
- style: {
22762
- width
22763
- }
22764
- });
22834
+ return /*#__PURE__*/React.createElement(Box$1, {
22835
+ className: joinClassNames([rowColClasses.bar, checkboxes && rowColClasses.barWithCheckbox, isSelected && (checkboxes ? rowColClasses.barSelectedWithCheckbox : rowColClasses.barSelected)])
22836
+ }, /*#__PURE__*/React.createElement(Box$1, {
22837
+ className: "bar-filled",
22838
+ width: width
22839
+ }));
22765
22840
  }
22766
22841
 
22767
22842
  function Frequency(_ref) {
@@ -22786,9 +22861,7 @@
22786
22861
  cell,
22787
22862
  checkboxes
22788
22863
  }) && rowColClasses.excludedTextWithCheckbox])
22789
- }, getFrequencyText({
22790
- cell
22791
- })));
22864
+ }, getFrequencyText(cell === null || cell === void 0 ? void 0 : cell.qFrequency)));
22792
22865
  }
22793
22866
 
22794
22867
  function getGridItemSizes(_ref) {
@@ -22889,6 +22962,7 @@
22889
22962
  histogram = false,
22890
22963
  keyboard,
22891
22964
  showGray = true,
22965
+ showTick: sizePermitsTick = true,
22892
22966
  columnCount = 1,
22893
22967
  rowCount = 1,
22894
22968
  dataOffset,
@@ -22974,7 +23048,11 @@
22974
23048
  ltr: 'left'
22975
23049
  };
22976
23050
  if (isAutoTextAlign) {
22977
- valueTextAlign = isNumeric ? 'right' : dirToTextAlignMap[direction];
23051
+ if (!isNumeric) {
23052
+ valueTextAlign = dirToTextAlignMap[direction];
23053
+ } else {
23054
+ valueTextAlign = direction === 'rtl' ? 'left' : 'right';
23055
+ }
22978
23056
  } else {
22979
23057
  valueTextAlign = (textAlign === null || textAlign === void 0 ? void 0 : textAlign.align) || 'left';
22980
23058
  }
@@ -22993,22 +23071,26 @@
22993
23071
  display: 'flex',
22994
23072
  fontSize: '8px'
22995
23073
  };
22996
- const showLock = isSelected && isLocked;
22997
- const showTick = !checkboxes && isSelected && !isLocked;
22998
23074
  const cellStyle = {
22999
23075
  display: 'flex',
23000
23076
  alignItems: 'center',
23001
23077
  minWidth: 0,
23002
23078
  flexGrow: 1,
23003
- paddingLeft: checkboxes ? 0 : undefined,
23079
+ paddingLeft: direction === 'rtl' ? 8 : checkboxes ? 0 : undefined,
23080
+ paddingRight: checkboxes ? 0 : direction === 'rtl' ? 8 : 0,
23004
23081
  justifyContent: valueTextAlign
23005
23082
  };
23006
23083
  const isFirstElement = index === 0;
23007
23084
  const flexBasisVal = checkboxes ? 'auto' : 'max-content';
23085
+ const showLock = isSelected && isLocked;
23086
+ const showTick = !checkboxes && isSelected && !isLocked && sizePermitsTick;
23087
+ const showIcon = !checkboxes && (showTick || showLock);
23008
23088
  return /*#__PURE__*/React.createElement(RowColRoot$1, {
23009
23089
  className: rowColClasses.barContainer,
23010
23090
  flexBasisProp: flexBasisVal,
23011
23091
  style: styles,
23092
+ showIcon: showIcon,
23093
+ checkboxes: checkboxes,
23012
23094
  isGridCol: isGridCol,
23013
23095
  isGridMode: dataLayout === 'grid',
23014
23096
  dense: dense,
@@ -23034,8 +23116,8 @@
23034
23116
  role: column ? 'column' : 'row',
23035
23117
  tabIndex: isFirstElement && (!keyboard.enabled || keyboard.active) ? 0 : -1,
23036
23118
  "data-n": cell === null || cell === void 0 ? void 0 : cell.qElemNumber
23037
- }, /*#__PURE__*/React.createElement(Histogram, {
23038
- cell: cell,
23119
+ }, (cell === null || cell === void 0 ? void 0 : cell.qFrequency) && /*#__PURE__*/React.createElement(Histogram, {
23120
+ qFrequency: cell === null || cell === void 0 ? void 0 : cell.qFrequency,
23039
23121
  histogram: histogram,
23040
23122
  checkboxes: checkboxes,
23041
23123
  isSelected: isSelected,
@@ -23077,14 +23159,10 @@
23077
23159
  checkboxes: checkboxes,
23078
23160
  dense: dense,
23079
23161
  showGray: showGray
23080
- }), !checkboxes && /*#__PURE__*/React.createElement(Grid$1, {
23162
+ }), showIcon && /*#__PURE__*/React.createElement(Grid$1, {
23081
23163
  item: true,
23082
23164
  className: rowColClasses.icon
23083
- }, !showLock && !showTick && /*#__PURE__*/React.createElement("span", {
23084
- style: {
23085
- minWidth: '12px'
23086
- }
23087
- }), showLock && /*#__PURE__*/React.createElement(Lock, {
23165
+ }, showLock && /*#__PURE__*/React.createElement(Lock, {
23088
23166
  style: iconStyles,
23089
23167
  size: "small"
23090
23168
  }), showTick && /*#__PURE__*/React.createElement(Tick, {
@@ -24618,6 +24696,8 @@
24618
24696
  overflowDisclaimer.set(show);
24619
24697
  }
24620
24698
 
24699
+ const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
24700
+
24621
24701
  const {
24622
24702
  StyledFixedSizeList,
24623
24703
  StyledFixedSizeGrid
@@ -24649,20 +24729,23 @@
24649
24729
  focusListItems,
24650
24730
  setCurrentScrollIndex,
24651
24731
  constraints,
24732
+ frequencyMax,
24652
24733
  freqIsAllowed
24653
24734
  } = _ref;
24654
24735
  const {
24655
- layoutOptions = {},
24656
- frequencyMax
24736
+ layoutOptions = {}
24657
24737
  } = layout || {};
24658
24738
  const {
24739
+ columnWidth,
24659
24740
  itemPadding,
24660
24741
  listHeight,
24661
- itemSize,
24742
+ itemHeight,
24662
24743
  rowCount,
24663
24744
  columnCount,
24664
24745
  frequencyWidth
24665
24746
  } = sizes || {};
24747
+ const itemWidth = layoutOptions.dataLayout === 'grid' ? columnWidth : width;
24748
+ const showTick = itemWidth > REMOVE_TICK_LIMIT;
24666
24749
 
24667
24750
  // Options common for List and Grid.
24668
24751
  const commonComponentOptions = {
@@ -24696,8 +24779,10 @@
24696
24779
  histogram,
24697
24780
  keyboard,
24698
24781
  showGray,
24782
+ showTick,
24699
24783
  dataOffset: local.current.dataOffset,
24700
- focusListItems
24784
+ focusListItems,
24785
+ direction
24701
24786
  });
24702
24787
  const List = _ref2 => {
24703
24788
  let {
@@ -24717,7 +24802,7 @@
24717
24802
  itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
24718
24803
  listCount
24719
24804
  }),
24720
- itemSize: itemSize,
24805
+ itemSize: itemHeight,
24721
24806
  onItemsRendered: renderProps => {
24722
24807
  var _layout$qListObject, _layout$qListObject$q;
24723
24808
  setCurrentScrollIndex({
@@ -24748,14 +24833,13 @@
24748
24833
  ref
24749
24834
  } = _ref3;
24750
24835
  const {
24751
- columnWidth,
24752
24836
  overflowStyling,
24753
24837
  scrollBarWidth
24754
24838
  } = sizes;
24755
24839
  const {
24756
24840
  layoutOrder
24757
24841
  } = layoutOptions || {};
24758
- const gridHeight = Math.min(listHeight, rowCount * itemSize + scrollBarWidth);
24842
+ const gridHeight = Math.min(listHeight, rowCount * itemHeight + scrollBarWidth);
24759
24843
  // eslint-disable-next-line no-param-reassign
24760
24844
  local.current.listRef = ref;
24761
24845
  const handleGridItemsRendered = renderProps => {
@@ -24794,7 +24878,7 @@
24794
24878
  columnCount: columnCount,
24795
24879
  columnWidth: columnWidth,
24796
24880
  rowCount: rowCount,
24797
- rowHeight: itemSize,
24881
+ rowHeight: itemHeight,
24798
24882
  style: _objectSpread2({}, overflowStyling),
24799
24883
  itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
24800
24884
  column: undefined,
@@ -24811,11 +24895,65 @@
24811
24895
  };
24812
24896
  }
24813
24897
 
24814
- const scrollBarWidth = 10; // TODO: ignore this - instead set the styling only show on hover...
24898
+ function calculateColumnMode(_ref) {
24899
+ let {
24900
+ maxVisibleRows,
24901
+ itemHeight,
24902
+ listCount,
24903
+ listHeight,
24904
+ columnAutoWidth,
24905
+ containerWidth,
24906
+ itemMinWidth
24907
+ } = _ref;
24908
+ let rowCount;
24909
+ const maxRows = (maxVisibleRows === null || maxVisibleRows === void 0 ? void 0 : maxVisibleRows.maxRows) || 3;
24910
+ const autoRowCount = Math.floor(listHeight / itemHeight);
24911
+ if (maxVisibleRows.auto !== false) {
24912
+ rowCount = autoRowCount;
24913
+ } else {
24914
+ rowCount = Math.min(listCount, maxRows, autoRowCount);
24915
+ }
24916
+ const columnCount = Math.ceil(listCount / rowCount);
24917
+ const columnWidth = Math.max(columnAutoWidth, containerWidth / columnCount, itemMinWidth);
24918
+ return {
24919
+ columnWidth,
24920
+ columnCount,
24921
+ rowCount
24922
+ };
24923
+ }
24815
24924
 
24816
- const ITEM_MIN_WIDTH = 56;
24925
+ const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
24817
24926
  const ITEM_MAX_WIDTH = 150;
24818
24927
  const FREQUENCY_WIDTH = 40;
24928
+ const ITEM_MIN_WIDTH = 56;
24929
+ const CHECKBOX_WIDTH = 20;
24930
+
24931
+ function calculateRowMode(_ref) {
24932
+ let {
24933
+ maxVisibleColumns,
24934
+ listCount,
24935
+ containerWidth,
24936
+ columnAutoWidth,
24937
+ itemMinWidth
24938
+ } = _ref;
24939
+ const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
24940
+ const innerWidth = containerWidth - SCROLL_BAR_WIDTH;
24941
+ let columnCount;
24942
+ const autoColumnCount = Math.min(listCount, Math.ceil(innerWidth / Math.max(itemMinWidth, columnAutoWidth))); // TODO: smarter sizing... based on glyph count + font size etc...??
24943
+ if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
24944
+ columnCount = autoColumnCount;
24945
+ } else {
24946
+ columnCount = Math.min(listCount, maxColumns, autoColumnCount);
24947
+ }
24948
+ const columnWidth = innerWidth / columnCount;
24949
+ const rowCount = Math.ceil(listCount / columnCount);
24950
+ return {
24951
+ rowCount,
24952
+ columnWidth,
24953
+ columnCount
24954
+ };
24955
+ }
24956
+
24819
24957
  function getListSizes(_ref) {
24820
24958
  let {
24821
24959
  layout,
@@ -24824,7 +24962,8 @@
24824
24962
  listCount,
24825
24963
  count,
24826
24964
  textWidth,
24827
- freqIsAllowed
24965
+ freqIsAllowed,
24966
+ checkboxes
24828
24967
  } = _ref;
24829
24968
  const {
24830
24969
  layoutOptions = {}
@@ -24837,50 +24976,60 @@
24837
24976
  dataLayout
24838
24977
  } = layoutOptions;
24839
24978
  const frequencyAddWidth = freqIsAllowed ? FREQUENCY_WIDTH : 0;
24840
- const columnAutoWidth = Math.max(Math.min(ITEM_MAX_WIDTH, textWidth + 18 + frequencyAddWidth), ITEM_MIN_WIDTH + frequencyAddWidth);
24979
+ const checkboxAddWidth = checkboxes ? CHECKBOX_WIDTH : 0;
24980
+ const dynamicItemMinWidth = ITEM_MIN_WIDTH + frequencyAddWidth + checkboxAddWidth;
24981
+ const columnAutoWidth = Math.max(Math.min(ITEM_MAX_WIDTH, textWidth + 18 + frequencyAddWidth + checkboxAddWidth), dynamicItemMinWidth);
24841
24982
  let overflowStyling;
24842
24983
  let columnCount;
24843
24984
  let columnWidth;
24844
24985
  let rowCount;
24845
24986
  const isGridMode = dataLayout === 'grid';
24846
24987
  const itemPadding = 4;
24847
- const denseItemSize = 20;
24848
- const normalItemSize = isGridMode ? 32 : 29;
24849
- let itemSize = dense ? denseItemSize : normalItemSize;
24988
+ const denseItemHeight = 20;
24989
+ const normalItemHeight = isGridMode ? 32 : 29;
24990
+ let itemHeight = dense ? denseItemHeight : normalItemHeight;
24850
24991
  if (isGridMode) {
24851
24992
  // Emulate a margin between items using padding, since the list library
24852
24993
  // needs an explicit row height and cannot handle margins.
24853
- itemSize += itemPadding;
24994
+ itemHeight += itemPadding;
24854
24995
  }
24855
- const listHeight = height !== null && height !== void 0 ? height : 8 * itemSize;
24996
+ const listHeight = height !== null && height !== void 0 ? height : 8 * itemHeight;
24856
24997
  if (layoutOrder) {
24857
24998
  // Modify container width to achieve the exact design with 8px margins on each side (left and right).
24858
24999
  let containerWidth = width;
24859
25000
  if (layoutOrder === 'row') {
24860
- containerWidth += itemPadding * 2;
24861
25001
  overflowStyling = {
24862
25002
  overflowX: 'hidden'
24863
25003
  };
24864
- const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
24865
- if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
24866
- columnCount = Math.min(listCount, Math.ceil((containerWidth - scrollBarWidth) / columnAutoWidth)); // TODO: smarter sizing... based on glyph count + font size etc...??
24867
- } else {
24868
- columnCount = Math.min(listCount, maxColumns);
24869
- }
24870
- rowCount = Math.ceil(listCount / columnCount);
24871
- columnWidth = (containerWidth - scrollBarWidth) / columnCount;
25004
+ containerWidth += itemPadding * 2;
25005
+ ({
25006
+ rowCount,
25007
+ columnWidth,
25008
+ columnCount
25009
+ } = calculateRowMode({
25010
+ maxVisibleColumns,
25011
+ listCount,
25012
+ containerWidth,
25013
+ columnAutoWidth,
25014
+ itemMinWidth: dynamicItemMinWidth
25015
+ }));
24872
25016
  } else {
24873
25017
  overflowStyling = {
24874
25018
  overflowY: 'hidden'
24875
25019
  };
24876
- const maxRows = (maxVisibleRows === null || maxVisibleRows === void 0 ? void 0 : maxVisibleRows.maxRows) || 3;
24877
- if (maxVisibleRows.auto !== false) {
24878
- rowCount = Math.floor(listHeight / itemSize);
24879
- } else {
24880
- rowCount = Math.min(listCount, maxRows);
24881
- }
24882
- columnCount = Math.ceil(listCount / rowCount);
24883
- columnWidth = Math.max(columnAutoWidth, containerWidth / columnCount);
25020
+ ({
25021
+ rowCount,
25022
+ columnWidth,
25023
+ columnCount
25024
+ } = calculateColumnMode({
25025
+ maxVisibleRows,
25026
+ itemHeight,
25027
+ listCount,
25028
+ listHeight,
25029
+ columnAutoWidth,
25030
+ containerWidth,
25031
+ itemMinWidth: dynamicItemMinWidth
25032
+ }));
24884
25033
  }
24885
25034
  }
24886
25035
  columnCount = (dataLayout === 'singleColumn' ? 1 : columnCount) || 1;
@@ -24897,9 +25046,9 @@
24897
25046
  columnWidth,
24898
25047
  rowCount,
24899
25048
  overflowStyling,
24900
- itemSize,
25049
+ itemHeight,
24901
25050
  listHeight,
24902
- scrollBarWidth,
25051
+ scrollBarWidth: SCROLL_BAR_WIDTH,
24903
25052
  count,
24904
25053
  listCount: limitedListCount,
24905
25054
  maxCount: {
@@ -24948,9 +25097,9 @@
24948
25097
  width,
24949
25098
  columnWidth,
24950
25099
  listHeight,
24951
- itemSize
25100
+ itemHeight
24952
25101
  } = _ref;
24953
- const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemSize);
25102
+ const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemHeight);
24954
25103
  const minSize = visibleCellsCount * 2;
24955
25104
  return minSize;
24956
25105
  }
@@ -25272,12 +25421,48 @@
25272
25421
  return !!(widthPermitsFreq && (hasValidFreqOption || frequencyEnabled));
25273
25422
  }
25274
25423
 
25424
+ const escapeField = field => {
25425
+ if (!field) {
25426
+ return field;
25427
+ }
25428
+ return "".concat(field.replace(/\]/g, ']]'));
25429
+ };
25430
+ const needToFetchFrequencyMax = layout => (layout === null || layout === void 0 ? void 0 : layout.frequencyMax) === 'fetch';
25431
+ const getFrequencyMaxExpression = field => {
25432
+ const escapedField = escapeField(field);
25433
+ return "Max(AGGR(Count(".concat(escapedField, "), ").concat(escapedField, "))");
25434
+ };
25435
+ const getFrequencyMax = async (layout, app) => {
25436
+ const dimInfo = layout.qListObject.qDimensionInfo;
25437
+ const field = dimInfo.qGroupFieldDefs[dimInfo.qGroupPos];
25438
+ const expression = getFrequencyMaxExpression(field);
25439
+ const evaluadedExpression = await app.evaluateEx(expression);
25440
+ return evaluadedExpression.qNumber;
25441
+ };
25442
+
25443
+ const useFrequencyMax = (app, layout) => {
25444
+ const [frequencyMax, setFrequencyMax] = reactExports.useState();
25445
+ const needFetch = needToFetchFrequencyMax(layout);
25446
+ reactExports.useEffect(() => {
25447
+ if (!needFetch) {
25448
+ return;
25449
+ }
25450
+ const fetch = async () => {
25451
+ const newValue = await getFrequencyMax(layout, app);
25452
+ setFrequencyMax(newValue);
25453
+ };
25454
+ fetch();
25455
+ }, [needFetch && layout]);
25456
+ return needFetch ? frequencyMax : layout === null || layout === void 0 ? void 0 : layout.frequencyMax;
25457
+ };
25458
+
25275
25459
  const _excluded$4 = ["isLoadingData"];
25276
25460
  const DEFAULT_MIN_BATCH_SIZE = 100;
25277
25461
  function ListBox(_ref) {
25278
25462
  var _layout$qListObject$q, _loaderRef$current, _loaderRef$current$_l, _loaderRef$current$_l2;
25279
25463
  let {
25280
25464
  model,
25465
+ app,
25281
25466
  constraints,
25282
25467
  layout,
25283
25468
  selections,
@@ -25444,7 +25629,8 @@
25444
25629
  listCount: unlimitedListCount,
25445
25630
  count,
25446
25631
  textWidth,
25447
- freqIsAllowed
25632
+ freqIsAllowed,
25633
+ checkboxes
25448
25634
  });
25449
25635
  if (sizes.columnWidth) {
25450
25636
  // In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
@@ -25508,6 +25694,7 @@
25508
25694
  last
25509
25695
  }))
25510
25696
  });
25697
+ const frequencyMax = useFrequencyMax(app, layout);
25511
25698
  const {
25512
25699
  List,
25513
25700
  Grid
@@ -25541,19 +25728,20 @@
25541
25728
  focusListItems: getFocusState(),
25542
25729
  setCurrentScrollIndex: currentScrollIndex.set,
25543
25730
  constraints,
25731
+ frequencyMax,
25544
25732
  freqIsAllowed
25545
25733
  });
25546
25734
  const {
25547
25735
  columnWidth,
25548
25736
  listHeight,
25549
- itemSize
25737
+ itemHeight
25550
25738
  } = sizes || {};
25551
25739
  if (!isVertical) {
25552
25740
  minimumBatchSize = getHorizontalMinBatchSize({
25553
25741
  width,
25554
25742
  columnWidth,
25555
25743
  listHeight,
25556
- itemSize
25744
+ itemHeight
25557
25745
  });
25558
25746
  }
25559
25747
  return /*#__PURE__*/React.createElement(React.Fragment, null, !listCount && /*#__PURE__*/React.createElement(ListBoxDisclaimer, {
@@ -25912,6 +26100,7 @@
25912
26100
 
25913
26101
  const PREFIX$7 = 'ActionsToolbar';
25914
26102
  const classes$7 = {
26103
+ item: "".concat(PREFIX$7, "-item"),
25915
26104
  itemSpacing: "".concat(PREFIX$7, "-itemSpacing"),
25916
26105
  firstItemSpacing: "".concat(PREFIX$7, "-firstItemSpacing"),
25917
26106
  lastItemSpacing: "".concat(PREFIX$7, "-lastItemSpacing")
@@ -25948,25 +26137,27 @@
25948
26137
  actions = [],
25949
26138
  first = false,
25950
26139
  last = false,
25951
- addAnchor = false
26140
+ addAnchor = false,
26141
+ isRtl = false
25952
26142
  } = _ref2;
25953
26143
  return actions.length > 0 ? /*#__PURE__*/React.createElement(Grid$1, {
25954
26144
  item: true,
25955
26145
  container: true,
25956
26146
  gap: 0,
26147
+ flexDirection: isRtl ? 'row-reverse' : 'row',
25957
26148
  wrap: "nowrap"
25958
26149
  }, actions.map((e, ix) => {
25959
26150
  let cls = [];
25960
26151
  const isFirstItem = first && ix === 0;
25961
26152
  const isLastItem = last && actions.length - 1 === ix;
25962
26153
  if (isFirstItem && !isLastItem) {
25963
- cls = [classes$7.firstItemSpacing];
26154
+ cls = [classes$7.firstItemSpacing, classes$7.item];
25964
26155
  }
25965
26156
  if (isLastItem && !isFirstItem) {
25966
- cls = [...cls, classes$7.lastItemSpacing];
26157
+ cls = [...cls, classes$7.lastItemSpacing, classes$7.item];
25967
26158
  }
25968
26159
  if (!isFirstItem && !isLastItem && cls.length === 0) {
25969
- cls = [classes$7.itemSpacing];
26160
+ cls = [classes$7.itemSpacing, classes$7.item];
25970
26161
  }
25971
26162
  return /*#__PURE__*/React.createElement(Grid$1, {
25972
26163
  item: true,
@@ -26015,7 +26206,9 @@
26015
26206
  anchorEl: null
26016
26207
  },
26017
26208
  focusHandler = null,
26018
- actionsRefMock = null // for testing
26209
+ actionsRefMock = null,
26210
+ // for testing
26211
+ direction = 'ltr'
26019
26212
  } = _ref3;
26020
26213
  const defaultSelectionActions = useDefaultSelectionActions(selections);
26021
26214
  const {
@@ -26088,12 +26281,16 @@
26088
26281
  const showActions = newActions.length > 0;
26089
26282
  const showMore = moreActions.length > 0;
26090
26283
  const showDivider = showActions && selections.show || showMore && selections.show;
26284
+ const isRtl = direction === 'rtl';
26091
26285
  const Actions = /*#__PURE__*/React.createElement(Grid$1, {
26092
26286
  ref: actionsRef,
26093
26287
  onKeyDown: tabCallback,
26094
26288
  container: true,
26095
26289
  gap: 0,
26096
- wrap: "nowrap"
26290
+ wrap: "nowrap",
26291
+ sx: {
26292
+ flexDirection: isRtl ? 'row-reverse' : 'row'
26293
+ }
26097
26294
  }, showActions && /*#__PURE__*/React.createElement(ActionsGroup, {
26098
26295
  actions: newActions,
26099
26296
  first: true,
@@ -26114,7 +26311,8 @@
26114
26311
  })), selections.show && /*#__PURE__*/React.createElement(ActionsGroup, {
26115
26312
  actions: defaultSelectionActions,
26116
26313
  first: !showActions && !showMore,
26117
- last: true
26314
+ last: true,
26315
+ isRtl: isRtl
26118
26316
  }), showMoreItems && /*#__PURE__*/React.createElement(More$1, {
26119
26317
  show: showMoreItems,
26120
26318
  actions: moreActions,
@@ -26170,7 +26368,8 @@
26170
26368
  theme
26171
26369
  } = _ref2;
26172
26370
  return {
26173
- 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
26371
+ 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,
26372
+ display: 'flex'
26174
26373
  };
26175
26374
  });
26176
26375
  function ListBoxSearch(_ref3) {
@@ -26183,7 +26382,8 @@
26183
26382
  visible = true,
26184
26383
  autoFocus = true,
26185
26384
  wildCardSearch = false,
26186
- searchEnabled
26385
+ searchEnabled,
26386
+ direction
26187
26387
  } = _ref3;
26188
26388
  const {
26189
26389
  translator
@@ -26195,6 +26395,8 @@
26195
26395
  const {
26196
26396
  getStoreValue
26197
26397
  } = useDataStore(model);
26398
+ const isRtl = direction === 'rtl';
26399
+ const inpuTextAlign = isRtl ? 'right' : 'left';
26198
26400
  const cancel = () => selections.isActive() && selections.cancel();
26199
26401
  const abortSearch = async () => {
26200
26402
  if (!selections.isModal()) {
@@ -26282,6 +26484,7 @@
26282
26484
  className: "search",
26283
26485
  sx: [{
26284
26486
  border: 'none',
26487
+ fontSize: 14,
26285
26488
  borderRadius: 0,
26286
26489
  backgroundColor: 'transparent',
26287
26490
  '& fieldset': {
@@ -26300,6 +26503,8 @@
26300
26503
  paddingTop: '5px',
26301
26504
  paddingBottom: '5px'
26302
26505
  }
26506
+ }, {
26507
+ flexDirection: isRtl ? 'row-reverse' : 'row'
26303
26508
  }],
26304
26509
  inputRef: inputRef,
26305
26510
  size: "small",
@@ -26311,7 +26516,10 @@
26311
26516
  onKeyDown: onKeyDown,
26312
26517
  autoFocus: autoFocus,
26313
26518
  inputProps: {
26314
- tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1
26519
+ tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1,
26520
+ style: {
26521
+ textAlign: "".concat(inpuTextAlign)
26522
+ }
26315
26523
  }
26316
26524
  });
26317
26525
  }
@@ -26857,6 +27065,7 @@
26857
27065
  autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : true
26858
27066
  }), /*#__PURE__*/React.createElement(ListBox, {
26859
27067
  model: model,
27068
+ app: app,
26860
27069
  layout: layout,
26861
27070
  selections: selections,
26862
27071
  selectionState: selectionState$1,
@@ -28130,20 +28339,21 @@
28130
28339
  var DrillDownIcon = (props => SvgIcon(drillDown(props)));
28131
28340
 
28132
28341
  const addListboxTheme = themeApi => {
28133
- const getListboxStyle = prop => themeApi.getStyle('object', '', "listBox.".concat(prop));
28342
+ const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
28134
28343
  return {
28135
- backgroundColor: getListboxStyle('backgroundColor'),
28344
+ backgroundColor: getListboxStyle('', 'backgroundColor'),
28136
28345
  title: {
28137
28346
  main: {
28138
- color: getListboxStyle('title.main.color'),
28139
- fontSize: getListboxStyle('title.main.fontSize'),
28140
- fontFamily: getListboxStyle('title.main.fontFamily')
28347
+ color: getListboxStyle('title.main', 'color'),
28348
+ fontSize: getListboxStyle('title.main', 'fontSize'),
28349
+ fontFamily: getListboxStyle('title.main', 'fontFamily'),
28350
+ fontWeight: getListboxStyle('title.main', 'fontWeight')
28141
28351
  }
28142
28352
  },
28143
28353
  content: {
28144
- color: getListboxStyle('content.color'),
28145
- fontSize: getListboxStyle('content.fontSize'),
28146
- fontFamily: getListboxStyle('content.fontFamily')
28354
+ color: getListboxStyle('content', 'color'),
28355
+ fontSize: getListboxStyle('content', 'fontSize'),
28356
+ fontFamily: getListboxStyle('content', 'fontFamily')
28147
28357
  }
28148
28358
  };
28149
28359
  };
@@ -28217,7 +28427,7 @@
28217
28427
  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,
28218
28428
  ["& .".concat(classes$4.listBoxHeader)]: {
28219
28429
  alignSelf: 'center',
28220
- display: 'inline-flex',
28430
+ display: 'flex',
28221
28431
  width: "calc(100% - ".concat(BUTTON_ICON_WIDTH, "px)")
28222
28432
  },
28223
28433
  ["& .".concat(classes$4.screenReaderOnly)]: {
@@ -28228,18 +28438,25 @@
28228
28438
  },
28229
28439
  ["& .".concat(classes$4.listboxWrapper)]: {
28230
28440
  padding: containerPadding
28441
+ },
28442
+ '&:focus': {
28443
+ boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
28444
+ },
28445
+ '&:focus-visible': {
28446
+ outline: 'none'
28231
28447
  }
28232
28448
  };
28233
28449
  });
28234
28450
  const Title = styled$1(Typography$1)(_ref2 => {
28235
- 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;
28451
+ 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;
28236
28452
  let {
28237
28453
  theme
28238
28454
  } = _ref2;
28239
28455
  return {
28240
28456
  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,
28241
28457
  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,
28242
- 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
28458
+ 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,
28459
+ 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'
28243
28460
  };
28244
28461
  });
28245
28462
  function ListBoxInline(_ref3) {
@@ -28379,6 +28596,7 @@
28379
28596
  return null;
28380
28597
  }
28381
28598
  const isLocked = layout.qListObject.qDimensionInfo.qLocked === true;
28599
+ const isRtl = direction === 'rtl';
28382
28600
  const isDrillDown = layout.qListObject.qDimensionInfo.qGrouping === 'H';
28383
28601
  const listboxSelectionToolbarItems = createListboxSelectionToolbar({
28384
28602
  layout,
@@ -28386,20 +28604,19 @@
28386
28604
  translator,
28387
28605
  selectionState: selectionState$1
28388
28606
  });
28389
- const showSearchToggle = search === 'toggle' && showSearch;
28390
- const searchVisible = (search === true || showSearchToggle) && !selectDisabled();
28391
28607
  const {
28608
+ wildCardSearch,
28609
+ searchEnabled,
28392
28610
  layoutOptions = {}
28393
28611
  } = layout;
28612
+ const showSearchToggle = search === 'toggle' && showSearch;
28613
+ const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
28394
28614
  const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
28395
28615
  const searchHeight = dense ? 27 : 40;
28396
28616
  const extraheight = dense ? 39 : 49;
28397
- const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
28617
+ const searchAddHeight = searchVisible ? searchHeight : 0;
28618
+ const minHeight = toolbar ? 49 + searchAddHeight + extraheight : 0;
28398
28619
  const headerHeight = 32;
28399
- const {
28400
- wildCardSearch,
28401
- searchEnabled
28402
- } = layout;
28403
28620
  const onShowSearch = () => {
28404
28621
  const newValue = !showSearch;
28405
28622
  setShowSearch(newValue);
@@ -28418,6 +28635,7 @@
28418
28635
  const showIcons = showSearchOrLockIcon || isDrillDown;
28419
28636
  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
28420
28637
  const headerPaddingLeft = CELL_PADDING_LEFT - (showSearchOrLockIcon ? ICON_PADDING : 0);
28638
+ const headerPaddingRight = isRtl ? CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0) : 0;
28421
28639
 
28422
28640
  // Add a container padding for grid mode to harmonize with the grid item margins (should sum to 8px).
28423
28641
  const isGridMode = (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.dataLayout) === 'grid';
@@ -28425,7 +28643,9 @@
28425
28643
  if (isGridMode) {
28426
28644
  containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px';
28427
28645
  }
28428
- return /*#__PURE__*/React.createElement(React.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React.createElement(ActionsToolbar, getActionToolbarProps(true)), /*#__PURE__*/React.createElement(StyledGrid$3, {
28646
+ return /*#__PURE__*/React.createElement(React.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React.createElement(ActionsToolbar, _extends$8({
28647
+ direction: direction
28648
+ }, getActionToolbarProps(true))), /*#__PURE__*/React.createElement(StyledGrid$3, {
28429
28649
  className: "listbox-container",
28430
28650
  container: true,
28431
28651
  tabIndex: keyboard.enabled && !keyboard.active ? 0 : -1,
@@ -28446,13 +28666,20 @@
28446
28666
  container: true,
28447
28667
  style: {
28448
28668
  padding: theme.spacing(1),
28449
- paddingLeft: "".concat(headerPaddingLeft, "px")
28669
+ paddingLeft: "".concat(headerPaddingLeft, "px"),
28670
+ paddingRight: "".concat(headerPaddingRight, "px")
28671
+ },
28672
+ sx: {
28673
+ flexDirection: isRtl ? 'row-reverse' : 'row'
28450
28674
  },
28451
28675
  wrap: "nowrap"
28452
28676
  }, /*#__PURE__*/React.createElement(Grid$1, {
28453
28677
  item: true,
28454
28678
  container: true,
28455
28679
  height: headerHeight,
28680
+ sx: {
28681
+ flexDirection: isRtl ? 'row-reverse' : 'row'
28682
+ },
28456
28683
  wrap: "nowrap"
28457
28684
  }, showIcons && /*#__PURE__*/React.createElement(Grid$1, {
28458
28685
  item: true,
@@ -28462,12 +28689,12 @@
28462
28689
  width: iconsWidth
28463
28690
  }
28464
28691
  }, isLocked ? /*#__PURE__*/React.createElement(IconButton$1, {
28692
+ title: translator.get('SelectionToolbar.ClickToUnlock'),
28465
28693
  tabIndex: -1,
28466
28694
  onClick: unlock,
28467
28695
  disabled: selectDisabled(),
28468
28696
  size: "large"
28469
28697
  }, /*#__PURE__*/React.createElement(Lock, {
28470
- title: translator.get('Listbox.Unlock'),
28471
28698
  disableRipple: true,
28472
28699
  style: {
28473
28700
  fontSize: '12px'
@@ -28492,6 +28719,9 @@
28492
28719
  }
28493
28720
  })), /*#__PURE__*/React.createElement(Grid$1, {
28494
28721
  item: true,
28722
+ sx: {
28723
+ justifyContent: isRtl ? 'flex-end' : 'flex-start'
28724
+ },
28495
28725
  className: classes$4.listBoxHeader
28496
28726
  }, /*#__PURE__*/React.createElement(Title, {
28497
28727
  variant: "h6",
@@ -28503,17 +28733,19 @@
28503
28733
  xs: true
28504
28734
  }), /*#__PURE__*/React.createElement(Grid$1, {
28505
28735
  item: true
28506
- }, /*#__PURE__*/React.createElement(ActionsToolbar, getActionToolbarProps(showToolbarDetached({
28736
+ }, /*#__PURE__*/React.createElement(ActionsToolbar, _extends$8({
28737
+ direction: direction
28738
+ }, getActionToolbarProps(showToolbarDetached({
28507
28739
  containerRef,
28508
28740
  titleRef,
28509
28741
  iconsWidth
28510
- }))))), /*#__PURE__*/React.createElement(Grid$1, {
28742
+ })))))), /*#__PURE__*/React.createElement(Grid$1, {
28511
28743
  item: true,
28512
28744
  container: true,
28513
28745
  direction: "column",
28514
28746
  style: {
28515
28747
  height: '100%',
28516
- minHeight: "".concat(minHeight, "px")
28748
+ minHeight: '50px'
28517
28749
  },
28518
28750
  role: "region",
28519
28751
  "aria-label": translator.get('Listbox.ResultFilterLabel')
@@ -28533,7 +28765,8 @@
28533
28765
  autoFocus: shouldAutoFocus,
28534
28766
  searchContainerRef: searchContainerRef,
28535
28767
  wildCardSearch: wildCardSearch,
28536
- searchEnabled: searchEnabled
28768
+ searchEnabled: searchEnabled,
28769
+ direction: direction
28537
28770
  })), /*#__PURE__*/React.createElement(Grid$1, {
28538
28771
  item: true,
28539
28772
  xs: true,
@@ -28547,6 +28780,7 @@
28547
28780
  } = _ref4;
28548
28781
  return /*#__PURE__*/React.createElement(ListBox, {
28549
28782
  model: model,
28783
+ app: app,
28550
28784
  constraints: constraints,
28551
28785
  layout: layout,
28552
28786
  selections: selections,
@@ -28654,7 +28888,13 @@
28654
28888
  const dim = await app.getDimension(fieldIdentifier.qLibraryId);
28655
28889
  const dimLayout = await dim.getLayout();
28656
28890
  setFallbackTitle(dimLayout.qDim.title);
28657
- setFieldDef(dimLayout.qDim.qFieldDefs ? dimLayout.qDim.qFieldDefs[0] : '');
28891
+ if (dimLayout.qDim.qGrouping === 'N') {
28892
+ setFieldDef(dimLayout.qDim.qFieldDefs ? dimLayout.qDim.qFieldDefs[0] : '');
28893
+ } else {
28894
+ setFieldDef({
28895
+ multiFieldDim: true
28896
+ });
28897
+ }
28658
28898
  setIsFetching(false);
28659
28899
  } catch (e) {
28660
28900
  setIsFetching(false);
@@ -28764,11 +29004,16 @@
28764
29004
  listdef.qListObjectDef.qDef.qFieldDefs = [fieldIdentifier];
28765
29005
  fieldName = fieldIdentifier;
28766
29006
  }
28767
- if (frequencyMode !== 'N' || histogram) {
28768
- const field = fieldIdentifier.qLibraryId ? fieldDef : fieldName;
28769
- listdef.frequencyMax = {
28770
- qValueExpression: "Max(AGGR(Count([".concat(field, "]), [").concat(field, "]))")
28771
- };
29007
+ if (frequencyMode !== 'P' && histogram) {
29008
+ if (fieldDef !== null && fieldDef !== void 0 && fieldDef.multiFieldDim) {
29009
+ listdef.frequencyMax = 'fetch';
29010
+ // maybe for all lib dimension to handle if it properties change
29011
+ } else {
29012
+ const field = fieldIdentifier.qLibraryId ? fieldDef : fieldName;
29013
+ listdef.frequencyMax = {
29014
+ qValueExpression: getFrequencyMaxExpression(field)
29015
+ };
29016
+ }
28772
29017
  }
28773
29018
  const [sessionModel] = useSessionModel(listdef, isFetching ? null : app, fieldName, stateName);
28774
29019
  reactExports.useEffect(() => {
@@ -36119,6 +36364,7 @@
36119
36364
  const mergeConfigs = (base, c) => ({
36120
36365
  context: mergeObj(base.context, c.context),
36121
36366
  load: c.load || base.load,
36367
+ loadTheme: c.loadTheme || base.loadTheme,
36122
36368
  snapshot: _objectSpread2({}, c.snapshot || base.snapshot),
36123
36369
  types: mergeArray(base.types, c.types),
36124
36370
  themes: mergeArray(base.themes, c.themes),
@@ -36165,6 +36411,7 @@
36165
36411
  });
36166
36412
  const appTheme$1 = appTheme({
36167
36413
  themes: configuration.themes,
36414
+ loadTheme: configuration.loadTheme,
36168
36415
  root
36169
36416
  });
36170
36417
  currentContext.themeApi = appTheme$1.externalAPI;