@nebula.js/stardust 4.0.0-alpha.0 → 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.0
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) {
@@ -15112,7 +15157,7 @@
15112
15157
  disabled: 'rgba(0, 0, 0, 0.3)'
15113
15158
  },
15114
15159
  action: {
15115
- active: colors.grey25,
15160
+ active: '#545454',
15116
15161
  // color for actionable things like icon buttons
15117
15162
  hover: 'rgba(0, 0, 0, 0.03)',
15118
15163
  // color for hoverable things like list items
@@ -15252,10 +15297,21 @@
15252
15297
  padding: 7,
15253
15298
  borderRadius: 2,
15254
15299
  border: '1px solid transparent',
15255
- // should ideally use $focusVisible, but that messes up focus in all other places where Iconbutton is used (Checkbox, Switch etc)
15256
- '&:focus': {
15300
+ '&:hover': {
15301
+ backgroundColor: theme.palette.btn.hover
15302
+ },
15303
+ '&:focus-visible': {
15257
15304
  borderColor: theme.palette.custom.focusBorder,
15258
15305
  boxShadow: "0 0 0 2px ".concat(theme.palette.custom.focusOutline)
15306
+ },
15307
+ '&:active': {
15308
+ borderColor: 'transparent',
15309
+ boxShadow: 'none',
15310
+ backgroundColor: theme.palette.btn.active
15311
+ },
15312
+ '&:not(:active):not(:focus-visible)': {
15313
+ borderColor: 'transparent',
15314
+ boxShadow: 'none'
15259
15315
  }
15260
15316
  }
15261
15317
  },
@@ -15343,7 +15399,7 @@
15343
15399
  return cache[key];
15344
15400
  }
15345
15401
 
15346
- const NEBULA_VERSION_HASH = "b1a6" ;
15402
+ const NEBULA_VERSION_HASH = "9a45" ;
15347
15403
  ClassNameGenerator$1.configure(componentName => {
15348
15404
  return "njs-".concat(NEBULA_VERSION_HASH, "-").concat(componentName.replace('Mui', ''));
15349
15405
  });
@@ -15551,7 +15607,7 @@
15551
15607
  const appRef = React.createRef();
15552
15608
  const element = document.createElement('div');
15553
15609
  element.style.display = 'none';
15554
- element.setAttribute('data-nebulajs-version', "4.0.0-alpha.0" );
15610
+ element.setAttribute('data-nebulajs-version', "4.0.0-alpha.2" );
15555
15611
  element.setAttribute('data-app-id', app.id);
15556
15612
  document.body.appendChild(element);
15557
15613
  const root = client.createRoot(element);
@@ -21698,7 +21754,7 @@
21698
21754
  doSelect();
21699
21755
  }, []);
21700
21756
  const onMouseDown = reactExports.useCallback(event => {
21701
- if (selectionState.selectDisabled()) {
21757
+ if (event.button !== 0 || selectionState.selectDisabled()) {
21702
21758
  return;
21703
21759
  }
21704
21760
  const elemNumber = +event.currentTarget.getAttribute('data-n');
@@ -21719,7 +21775,7 @@
21719
21775
  handleSingleSelectKey(event, event.currentTarget);
21720
21776
  }, []);
21721
21777
  const onMouseUp = reactExports.useCallback(event => {
21722
- if (!currentSelect.current.active) {
21778
+ if (event.button !== 0 || !currentSelect.current.active) {
21723
21779
  return;
21724
21780
  }
21725
21781
  currentSelect.current.active = false;
@@ -21729,9 +21785,9 @@
21729
21785
  }
21730
21786
  doSelect();
21731
21787
  }, []);
21732
- const onMouseUpDoc = reactExports.useCallback(() => {
21788
+ const onMouseUpDoc = reactExports.useCallback(event => {
21733
21789
  // Ensure we end interactions when mouseup happens outside the Listbox.
21734
- if (!currentSelect.current.active) {
21790
+ if (event.button !== 0 || !currentSelect.current.active) {
21735
21791
  return;
21736
21792
  }
21737
21793
  currentSelect.current.active = false;
@@ -21758,17 +21814,19 @@
21758
21814
  };
21759
21815
  }, [onMouseUpDoc]);
21760
21816
  reactExports.useEffect(() => {
21761
- const onDeactivated = () => {
21817
+ const clearItemStates = () => {
21762
21818
  selectionState.clearItemStates(false);
21763
21819
  };
21764
21820
  const onCleared = () => {
21765
21821
  selectionState.clearItemStates(true);
21766
21822
  selectionState.triggerStateChanged();
21767
21823
  };
21768
- selections.on('deactivated', onDeactivated);
21824
+ selections.on('clearItemStates', clearItemStates);
21825
+ selections.on('deactivated', clearItemStates);
21769
21826
  selections.on('cleared', onCleared);
21770
21827
  return () => {
21771
- selections.removeListener('activated', onDeactivated);
21828
+ selections.removeListener('clearItemStates', clearItemStates);
21829
+ selections.removeListener('deactivated', clearItemStates);
21772
21830
  selections.removeListener('cleared', onCleared);
21773
21831
  };
21774
21832
  }, [selections]);
@@ -21998,15 +22056,29 @@
21998
22056
  constraints
21999
22057
  } = _ref2;
22000
22058
  const focusInsideListbox = element => {
22001
- const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-* button');
22059
+ const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-item button');
22002
22060
  setKeyboardActive(true);
22003
22061
  if (fieldElement) {
22004
22062
  fieldElement.focus();
22005
22063
  }
22006
22064
  };
22007
- const focusContainer = element => {
22008
- setKeyboardActive(false);
22009
- 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
+ }
22010
22082
  };
22011
22083
  const updateKeyScrollOnHover = newState => {
22012
22084
  if (hovering) {
@@ -22030,7 +22102,7 @@
22030
22102
  focusInsideListbox(event.currentTarget);
22031
22103
  break;
22032
22104
  case KEYS.ESCAPE:
22033
- focusContainer(event.currentTarget);
22105
+ changeFocus(event);
22034
22106
  break;
22035
22107
  case KEYS.ARROW_UP:
22036
22108
  updateKeyScrollOnHover({
@@ -22042,6 +22114,10 @@
22042
22114
  down: 1
22043
22115
  });
22044
22116
  break;
22117
+ case KEYS.ARROW_LEFT:
22118
+ case KEYS.ARROW_RIGHT:
22119
+ return;
22120
+ // let it propagate to top-level
22045
22121
  case KEYS.PAGE_UP:
22046
22122
  updateKeyScrollOnHover({
22047
22123
  up: currentScrollIndex.stop - currentScrollIndex.start
@@ -22169,28 +22245,20 @@
22169
22245
  const getBarWidth = _ref => {
22170
22246
  let {
22171
22247
  qFrequency,
22172
- checkboxes,
22173
22248
  frequencyMax
22174
22249
  } = _ref;
22175
22250
  const freqStr = String(qFrequency);
22176
22251
  const isPercent = freqStr.substring(freqStr.length - 1) === '%';
22177
22252
  const freq = parseFloat(isPercent ? freqStr : qFrequency);
22178
- const rightSlice = checkboxes ? "(".concat(barWithCheckboxLeftPadPx, "px + ").concat(barPadPx + barBorderWidthPx * 2, "px)") : "".concat(barPadPx * 2 + barBorderWidthPx * 2, "px");
22179
22253
  const width = isPercent ? freq : freq / frequencyMax * 100;
22180
- return "calc(".concat(width, "% - ").concat(rightSlice, ")");
22181
- };
22182
- const getFrequencyText = _ref2 => {
22183
- let {
22184
- cell
22185
- } = _ref2;
22186
- if (cell) {
22187
- return cell.qFrequency ? cell.qFrequency : frequencyTextNone;
22188
- }
22189
- return '';
22254
+ return "".concat(width, "%");
22190
22255
  };
22256
+ const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
22191
22257
 
22192
- const ICON_PADDING = 7;
22193
22258
  const CELL_PADDING_LEFT = 9;
22259
+ const ICON_WIDTH = 12;
22260
+ const ICON_PADDING = 7;
22261
+ const BUTTON_ICON_WIDTH = ICON_WIDTH + (ICON_PADDING + 1) * 2; // 1 is border width
22194
22262
 
22195
22263
  const getSelectedStyle = _ref => {
22196
22264
  let {
@@ -22214,8 +22282,10 @@
22214
22282
  textOverflow: 'ellipsis',
22215
22283
  whiteSpace: 'nowrap'
22216
22284
  };
22285
+ const iconWidth = 24; // tick and lock icon width in px
22286
+
22217
22287
  const RowColRoot = styled$1('div', {
22218
- shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'].includes(prop)
22288
+ shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth', 'showIcon', 'checkboxes'].includes(prop)
22219
22289
  })(_ref2 => {
22220
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;
22221
22291
  let {
@@ -22224,7 +22294,9 @@
22224
22294
  isGridMode,
22225
22295
  isGridCol,
22226
22296
  dense,
22227
- frequencyWidth
22297
+ frequencyWidth,
22298
+ showIcon,
22299
+ checkboxes
22228
22300
  } = _ref2;
22229
22301
  return {
22230
22302
  '&:focus': {
@@ -22233,6 +22305,14 @@
22233
22305
  '&:focus-visible': {
22234
22306
  outline: 'none'
22235
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
+ },
22236
22316
  ["& .".concat(rowColClasses.row)]: {
22237
22317
  flexWrap: 'nowrap',
22238
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
@@ -22261,7 +22341,7 @@
22261
22341
  flexBasis: flexBasisProp,
22262
22342
  lineHeight: '16px',
22263
22343
  userSelect: 'none',
22264
- paddingRight: '1px'
22344
+ paddingRight: showIcon || checkboxes ? '1px' : "".concat(iconWidth, "px")
22265
22345
  }, ellipsis), {}, {
22266
22346
  whiteSpace: 'pre',
22267
22347
  // to keep white-space on highlight
@@ -22303,9 +22383,9 @@
22303
22383
  ["& .".concat(rowColClasses.icon)]: {
22304
22384
  display: 'flex',
22305
22385
  justifyContent: 'center',
22306
- width: 24,
22307
- minWidth: 24,
22308
- maxWidth: 24
22386
+ width: iconWidth,
22387
+ minWidth: iconWidth,
22388
+ maxWidth: iconWidth
22309
22389
  },
22310
22390
  // Selection styles (S=Selected, XS=ExcludedSelected, A=Available, X=Excluded).
22311
22391
  ["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
@@ -22317,7 +22397,7 @@
22317
22397
  theme
22318
22398
  })), {}, {
22319
22399
  background: theme.palette.selected.excluded,
22320
- color: theme.palette.selected.mainContrastText,
22400
+ color: theme.palette.selected.excludedContrastText,
22321
22401
  border: isGridMode ? 'none' : undefined
22322
22402
  }),
22323
22403
  ["& .".concat(rowColClasses.A)]: {
@@ -22343,27 +22423,38 @@
22343
22423
  alignItems: 'center'
22344
22424
  },
22345
22425
  ["& .".concat(rowColClasses.bar)]: {
22346
- border: "".concat(barBorderWidthPx, "px solid"),
22347
- borderColor: '#D9D9D9',
22348
22426
  height: dense ? '16px' : '20px',
22349
22427
  position: 'absolute',
22350
22428
  zIndex: '-1',
22351
22429
  alignSelf: 'center',
22352
- left: "".concat(barPadPx, "px"),
22353
- transition: 'width 0.2s',
22354
- 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
+ }
22355
22441
  },
22356
22442
  ["& .".concat(rowColClasses.barSelected)]: {
22357
- opacity: '30%',
22358
22443
  zIndex: '0',
22359
- background: theme.palette.background.lighter
22444
+ '& .bar-filled': {
22445
+ opacity: '30%',
22446
+ background: theme.palette.background.lighter
22447
+ }
22360
22448
  },
22361
22449
  ["& .".concat(rowColClasses.barWithCheckbox)]: {
22362
- left: "".concat(barWithCheckboxLeftPadPx, "px")
22450
+ left: barWithCheckboxLeftPadPx,
22451
+ width: "calc(100% - ".concat(barWithCheckboxLeftPadPx + barPadPx, "px)")
22363
22452
  },
22364
22453
  ["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
22365
- background: '#BFE5D0',
22366
- borderColor: '#BFE5D0'
22454
+ '& .bar-filled': {
22455
+ background: '#BFE5D0',
22456
+ borderColor: '#BFE5D0'
22457
+ }
22367
22458
  },
22368
22459
  ["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
22369
22460
  color: '#828282',
@@ -22539,6 +22630,7 @@
22539
22630
  color: color,
22540
22631
  align: valueTextAlign
22541
22632
  }, /*#__PURE__*/React.createElement("span", {
22633
+ dir: "auto",
22542
22634
  style: {
22543
22635
  whiteSpace: 'pre'
22544
22636
  }
@@ -22724,29 +22816,27 @@
22724
22816
 
22725
22817
  function Histogram(_ref) {
22726
22818
  let {
22727
- cell,
22819
+ qFrequency,
22728
22820
  histogram,
22729
22821
  checkboxes,
22730
22822
  isSelected,
22731
22823
  frequencyMax
22732
22824
  } = _ref;
22733
- const hasHistogramBar = cell && histogram && getFrequencyText({
22734
- cell
22735
- }) !== frequencyTextNone;
22825
+ const hasHistogramBar = qFrequency && histogram && getFrequencyText(qFrequency) !== frequencyTextNone;
22736
22826
  if (!hasHistogramBar) {
22737
22827
  return undefined;
22738
22828
  }
22739
22829
  const width = getBarWidth({
22740
- qFrequency: cell.qFrequency,
22830
+ qFrequency,
22741
22831
  checkboxes,
22742
22832
  frequencyMax
22743
22833
  });
22744
- return /*#__PURE__*/React.createElement("div", {
22745
- className: joinClassNames([rowColClasses.bar, checkboxes && rowColClasses.barWithCheckbox, isSelected && (checkboxes ? rowColClasses.barSelectedWithCheckbox : rowColClasses.barSelected)]),
22746
- style: {
22747
- width
22748
- }
22749
- });
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
+ }));
22750
22840
  }
22751
22841
 
22752
22842
  function Frequency(_ref) {
@@ -22771,9 +22861,7 @@
22771
22861
  cell,
22772
22862
  checkboxes
22773
22863
  }) && rowColClasses.excludedTextWithCheckbox])
22774
- }, getFrequencyText({
22775
- cell
22776
- })));
22864
+ }, getFrequencyText(cell === null || cell === void 0 ? void 0 : cell.qFrequency)));
22777
22865
  }
22778
22866
 
22779
22867
  function getGridItemSizes(_ref) {
@@ -22874,6 +22962,7 @@
22874
22962
  histogram = false,
22875
22963
  keyboard,
22876
22964
  showGray = true,
22965
+ showTick: sizePermitsTick = true,
22877
22966
  columnCount = 1,
22878
22967
  rowCount = 1,
22879
22968
  dataOffset,
@@ -22936,7 +23025,7 @@
22936
23025
  pages,
22937
23026
  cellIndex
22938
23027
  }), [pages, cellIndex]);
22939
- const isSelected = (cell === null || cell === void 0 ? void 0 : cell.qState) === 'S' || (cell === null || cell === void 0 ? void 0 : cell.qState) === 'XS' || (cell === null || cell === void 0 ? void 0 : cell.qState) === 'L';
23028
+ const isSelected = (cell === null || cell === void 0 ? void 0 : cell.qState) === 'S' || (cell === null || cell === void 0 ? void 0 : cell.qState) === 'XS' || (cell === null || cell === void 0 ? void 0 : cell.qState) === 'L' || (cell === null || cell === void 0 ? void 0 : cell.qState) === 'XL';
22940
23029
  const classArr = reactExports.useMemo(() => getValueStateClasses({
22941
23030
  column,
22942
23031
  histogram,
@@ -22945,10 +23034,6 @@
22945
23034
  showGray
22946
23035
  }), [cell === null || cell === void 0 ? void 0 : cell.qState, histogram, dense, checkboxes]);
22947
23036
  const preventContextMenu = reactExports.useCallback(event => {
22948
- if (checkboxes) {
22949
- // Event will not propagate in the checkbox/radiobutton case
22950
- onClick(event);
22951
- }
22952
23037
  event.preventDefault();
22953
23038
  }, [checkboxes]);
22954
23039
  if (!cell) {
@@ -22963,7 +23048,11 @@
22963
23048
  ltr: 'left'
22964
23049
  };
22965
23050
  if (isAutoTextAlign) {
22966
- valueTextAlign = isNumeric ? 'right' : dirToTextAlignMap[direction];
23051
+ if (!isNumeric) {
23052
+ valueTextAlign = dirToTextAlignMap[direction];
23053
+ } else {
23054
+ valueTextAlign = direction === 'rtl' ? 'left' : 'right';
23055
+ }
22967
23056
  } else {
22968
23057
  valueTextAlign = (textAlign === null || textAlign === void 0 ? void 0 : textAlign.align) || 'left';
22969
23058
  }
@@ -22982,22 +23071,26 @@
22982
23071
  display: 'flex',
22983
23072
  fontSize: '8px'
22984
23073
  };
22985
- const showLock = isSelected && isLocked;
22986
- const showTick = !checkboxes && isSelected && !isLocked;
22987
23074
  const cellStyle = {
22988
23075
  display: 'flex',
22989
23076
  alignItems: 'center',
22990
23077
  minWidth: 0,
22991
23078
  flexGrow: 1,
22992
- paddingLeft: checkboxes ? 0 : undefined,
23079
+ paddingLeft: direction === 'rtl' ? 8 : checkboxes ? 0 : undefined,
23080
+ paddingRight: checkboxes ? 0 : direction === 'rtl' ? 8 : 0,
22993
23081
  justifyContent: valueTextAlign
22994
23082
  };
22995
23083
  const isFirstElement = index === 0;
22996
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);
22997
23088
  return /*#__PURE__*/React.createElement(RowColRoot$1, {
22998
23089
  className: rowColClasses.barContainer,
22999
23090
  flexBasisProp: flexBasisVal,
23000
23091
  style: styles,
23092
+ showIcon: showIcon,
23093
+ checkboxes: checkboxes,
23001
23094
  isGridCol: isGridCol,
23002
23095
  isGridMode: dataLayout === 'grid',
23003
23096
  dense: dense,
@@ -23023,8 +23116,8 @@
23023
23116
  role: column ? 'column' : 'row',
23024
23117
  tabIndex: isFirstElement && (!keyboard.enabled || keyboard.active) ? 0 : -1,
23025
23118
  "data-n": cell === null || cell === void 0 ? void 0 : cell.qElemNumber
23026
- }, /*#__PURE__*/React.createElement(Histogram, {
23027
- 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,
23028
23121
  histogram: histogram,
23029
23122
  checkboxes: checkboxes,
23030
23123
  isSelected: isSelected,
@@ -23066,14 +23159,10 @@
23066
23159
  checkboxes: checkboxes,
23067
23160
  dense: dense,
23068
23161
  showGray: showGray
23069
- }), !checkboxes && /*#__PURE__*/React.createElement(Grid$1, {
23162
+ }), showIcon && /*#__PURE__*/React.createElement(Grid$1, {
23070
23163
  item: true,
23071
23164
  className: rowColClasses.icon
23072
- }, !showLock && !showTick && /*#__PURE__*/React.createElement("span", {
23073
- style: {
23074
- minWidth: '12px'
23075
- }
23076
- }), showLock && /*#__PURE__*/React.createElement(Lock, {
23165
+ }, showLock && /*#__PURE__*/React.createElement(Lock, {
23077
23166
  style: iconStyles,
23078
23167
  size: "small"
23079
23168
  }), showTick && /*#__PURE__*/React.createElement(Tick, {
@@ -24607,6 +24696,8 @@
24607
24696
  overflowDisclaimer.set(show);
24608
24697
  }
24609
24698
 
24699
+ const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
24700
+
24610
24701
  const {
24611
24702
  StyledFixedSizeList,
24612
24703
  StyledFixedSizeGrid
@@ -24638,20 +24729,23 @@
24638
24729
  focusListItems,
24639
24730
  setCurrentScrollIndex,
24640
24731
  constraints,
24732
+ frequencyMax,
24641
24733
  freqIsAllowed
24642
24734
  } = _ref;
24643
24735
  const {
24644
- layoutOptions = {},
24645
- frequencyMax
24736
+ layoutOptions = {}
24646
24737
  } = layout || {};
24647
24738
  const {
24739
+ columnWidth,
24648
24740
  itemPadding,
24649
24741
  listHeight,
24650
- itemSize,
24742
+ itemHeight,
24651
24743
  rowCount,
24652
24744
  columnCount,
24653
24745
  frequencyWidth
24654
24746
  } = sizes || {};
24747
+ const itemWidth = layoutOptions.dataLayout === 'grid' ? columnWidth : width;
24748
+ const showTick = itemWidth > REMOVE_TICK_LIMIT;
24655
24749
 
24656
24750
  // Options common for List and Grid.
24657
24751
  const commonComponentOptions = {
@@ -24685,8 +24779,10 @@
24685
24779
  histogram,
24686
24780
  keyboard,
24687
24781
  showGray,
24782
+ showTick,
24688
24783
  dataOffset: local.current.dataOffset,
24689
- focusListItems
24784
+ focusListItems,
24785
+ direction
24690
24786
  });
24691
24787
  const List = _ref2 => {
24692
24788
  let {
@@ -24706,7 +24802,7 @@
24706
24802
  itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
24707
24803
  listCount
24708
24804
  }),
24709
- itemSize: itemSize,
24805
+ itemSize: itemHeight,
24710
24806
  onItemsRendered: renderProps => {
24711
24807
  var _layout$qListObject, _layout$qListObject$q;
24712
24808
  setCurrentScrollIndex({
@@ -24737,14 +24833,13 @@
24737
24833
  ref
24738
24834
  } = _ref3;
24739
24835
  const {
24740
- columnWidth,
24741
24836
  overflowStyling,
24742
24837
  scrollBarWidth
24743
24838
  } = sizes;
24744
24839
  const {
24745
24840
  layoutOrder
24746
24841
  } = layoutOptions || {};
24747
- const gridHeight = Math.min(listHeight, rowCount * itemSize + scrollBarWidth);
24842
+ const gridHeight = Math.min(listHeight, rowCount * itemHeight + scrollBarWidth);
24748
24843
  // eslint-disable-next-line no-param-reassign
24749
24844
  local.current.listRef = ref;
24750
24845
  const handleGridItemsRendered = renderProps => {
@@ -24783,7 +24878,7 @@
24783
24878
  columnCount: columnCount,
24784
24879
  columnWidth: columnWidth,
24785
24880
  rowCount: rowCount,
24786
- rowHeight: itemSize,
24881
+ rowHeight: itemHeight,
24787
24882
  style: _objectSpread2({}, overflowStyling),
24788
24883
  itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
24789
24884
  column: undefined,
@@ -24800,11 +24895,65 @@
24800
24895
  };
24801
24896
  }
24802
24897
 
24803
- 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
+ }
24804
24924
 
24805
- const ITEM_MIN_WIDTH = 56;
24925
+ const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
24806
24926
  const ITEM_MAX_WIDTH = 150;
24807
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
+
24808
24957
  function getListSizes(_ref) {
24809
24958
  let {
24810
24959
  layout,
@@ -24813,7 +24962,8 @@
24813
24962
  listCount,
24814
24963
  count,
24815
24964
  textWidth,
24816
- freqIsAllowed
24965
+ freqIsAllowed,
24966
+ checkboxes
24817
24967
  } = _ref;
24818
24968
  const {
24819
24969
  layoutOptions = {}
@@ -24826,50 +24976,60 @@
24826
24976
  dataLayout
24827
24977
  } = layoutOptions;
24828
24978
  const frequencyAddWidth = freqIsAllowed ? FREQUENCY_WIDTH : 0;
24829
- 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);
24830
24982
  let overflowStyling;
24831
24983
  let columnCount;
24832
24984
  let columnWidth;
24833
24985
  let rowCount;
24834
24986
  const isGridMode = dataLayout === 'grid';
24835
24987
  const itemPadding = 4;
24836
- const denseItemSize = 20;
24837
- const normalItemSize = isGridMode ? 32 : 29;
24838
- let itemSize = dense ? denseItemSize : normalItemSize;
24988
+ const denseItemHeight = 20;
24989
+ const normalItemHeight = isGridMode ? 32 : 29;
24990
+ let itemHeight = dense ? denseItemHeight : normalItemHeight;
24839
24991
  if (isGridMode) {
24840
24992
  // Emulate a margin between items using padding, since the list library
24841
24993
  // needs an explicit row height and cannot handle margins.
24842
- itemSize += itemPadding;
24994
+ itemHeight += itemPadding;
24843
24995
  }
24844
- const listHeight = height !== null && height !== void 0 ? height : 8 * itemSize;
24996
+ const listHeight = height !== null && height !== void 0 ? height : 8 * itemHeight;
24845
24997
  if (layoutOrder) {
24846
24998
  // Modify container width to achieve the exact design with 8px margins on each side (left and right).
24847
24999
  let containerWidth = width;
24848
25000
  if (layoutOrder === 'row') {
24849
- containerWidth += itemPadding * 2;
24850
25001
  overflowStyling = {
24851
25002
  overflowX: 'hidden'
24852
25003
  };
24853
- const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
24854
- if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
24855
- columnCount = Math.min(listCount, Math.ceil((containerWidth - scrollBarWidth) / columnAutoWidth)); // TODO: smarter sizing... based on glyph count + font size etc...??
24856
- } else {
24857
- columnCount = Math.min(listCount, maxColumns);
24858
- }
24859
- rowCount = Math.ceil(listCount / columnCount);
24860
- 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
+ }));
24861
25016
  } else {
24862
25017
  overflowStyling = {
24863
25018
  overflowY: 'hidden'
24864
25019
  };
24865
- const maxRows = (maxVisibleRows === null || maxVisibleRows === void 0 ? void 0 : maxVisibleRows.maxRows) || 3;
24866
- if (maxVisibleRows.auto !== false) {
24867
- rowCount = Math.floor(listHeight / itemSize);
24868
- } else {
24869
- rowCount = Math.min(listCount, maxRows);
24870
- }
24871
- columnCount = Math.ceil(listCount / rowCount);
24872
- 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
+ }));
24873
25033
  }
24874
25034
  }
24875
25035
  columnCount = (dataLayout === 'singleColumn' ? 1 : columnCount) || 1;
@@ -24886,9 +25046,9 @@
24886
25046
  columnWidth,
24887
25047
  rowCount,
24888
25048
  overflowStyling,
24889
- itemSize,
25049
+ itemHeight,
24890
25050
  listHeight,
24891
- scrollBarWidth,
25051
+ scrollBarWidth: SCROLL_BAR_WIDTH,
24892
25052
  count,
24893
25053
  listCount: limitedListCount,
24894
25054
  maxCount: {
@@ -24937,9 +25097,9 @@
24937
25097
  width,
24938
25098
  columnWidth,
24939
25099
  listHeight,
24940
- itemSize
25100
+ itemHeight
24941
25101
  } = _ref;
24942
- const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemSize);
25102
+ const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemHeight);
24943
25103
  const minSize = visibleCellsCount * 2;
24944
25104
  return minSize;
24945
25105
  }
@@ -25261,12 +25421,48 @@
25261
25421
  return !!(widthPermitsFreq && (hasValidFreqOption || frequencyEnabled));
25262
25422
  }
25263
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
+
25264
25459
  const _excluded$4 = ["isLoadingData"];
25265
25460
  const DEFAULT_MIN_BATCH_SIZE = 100;
25266
25461
  function ListBox(_ref) {
25267
25462
  var _layout$qListObject$q, _loaderRef$current, _loaderRef$current$_l, _loaderRef$current$_l2;
25268
25463
  let {
25269
25464
  model,
25465
+ app,
25270
25466
  constraints,
25271
25467
  layout,
25272
25468
  selections,
@@ -25433,7 +25629,8 @@
25433
25629
  listCount: unlimitedListCount,
25434
25630
  count,
25435
25631
  textWidth,
25436
- freqIsAllowed
25632
+ freqIsAllowed,
25633
+ checkboxes
25437
25634
  });
25438
25635
  if (sizes.columnWidth) {
25439
25636
  // In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
@@ -25497,6 +25694,7 @@
25497
25694
  last
25498
25695
  }))
25499
25696
  });
25697
+ const frequencyMax = useFrequencyMax(app, layout);
25500
25698
  const {
25501
25699
  List,
25502
25700
  Grid
@@ -25530,19 +25728,20 @@
25530
25728
  focusListItems: getFocusState(),
25531
25729
  setCurrentScrollIndex: currentScrollIndex.set,
25532
25730
  constraints,
25731
+ frequencyMax,
25533
25732
  freqIsAllowed
25534
25733
  });
25535
25734
  const {
25536
25735
  columnWidth,
25537
25736
  listHeight,
25538
- itemSize
25737
+ itemHeight
25539
25738
  } = sizes || {};
25540
25739
  if (!isVertical) {
25541
25740
  minimumBatchSize = getHorizontalMinBatchSize({
25542
25741
  width,
25543
25742
  columnWidth,
25544
25743
  listHeight,
25545
- itemSize
25744
+ itemHeight
25546
25745
  });
25547
25746
  }
25548
25747
  return /*#__PURE__*/React.createElement(React.Fragment, null, !listCount && /*#__PURE__*/React.createElement(ListBoxDisclaimer, {
@@ -25718,6 +25917,7 @@
25718
25917
  style: style,
25719
25918
  className: ActionElement.className,
25720
25919
  size: "large",
25920
+ disableRipple: true,
25721
25921
  "aria-expanded": ariaExpanded,
25722
25922
  "aria-controls": "moreMenuList"
25723
25923
  }, hasSvgIconShape && SvgIcon(item.getSvgIconShape()), addAnchor && /*#__PURE__*/React.createElement("div", {
@@ -25900,6 +26100,7 @@
25900
26100
 
25901
26101
  const PREFIX$7 = 'ActionsToolbar';
25902
26102
  const classes$7 = {
26103
+ item: "".concat(PREFIX$7, "-item"),
25903
26104
  itemSpacing: "".concat(PREFIX$7, "-itemSpacing"),
25904
26105
  firstItemSpacing: "".concat(PREFIX$7, "-firstItemSpacing"),
25905
26106
  lastItemSpacing: "".concat(PREFIX$7, "-lastItemSpacing")
@@ -25936,25 +26137,27 @@
25936
26137
  actions = [],
25937
26138
  first = false,
25938
26139
  last = false,
25939
- addAnchor = false
26140
+ addAnchor = false,
26141
+ isRtl = false
25940
26142
  } = _ref2;
25941
26143
  return actions.length > 0 ? /*#__PURE__*/React.createElement(Grid$1, {
25942
26144
  item: true,
25943
26145
  container: true,
25944
26146
  gap: 0,
26147
+ flexDirection: isRtl ? 'row-reverse' : 'row',
25945
26148
  wrap: "nowrap"
25946
26149
  }, actions.map((e, ix) => {
25947
26150
  let cls = [];
25948
26151
  const isFirstItem = first && ix === 0;
25949
26152
  const isLastItem = last && actions.length - 1 === ix;
25950
26153
  if (isFirstItem && !isLastItem) {
25951
- cls = [classes$7.firstItemSpacing];
26154
+ cls = [classes$7.firstItemSpacing, classes$7.item];
25952
26155
  }
25953
26156
  if (isLastItem && !isFirstItem) {
25954
- cls = [...cls, classes$7.lastItemSpacing];
26157
+ cls = [...cls, classes$7.lastItemSpacing, classes$7.item];
25955
26158
  }
25956
26159
  if (!isFirstItem && !isLastItem && cls.length === 0) {
25957
- cls = [classes$7.itemSpacing];
26160
+ cls = [classes$7.itemSpacing, classes$7.item];
25958
26161
  }
25959
26162
  return /*#__PURE__*/React.createElement(Grid$1, {
25960
26163
  item: true,
@@ -26003,7 +26206,9 @@
26003
26206
  anchorEl: null
26004
26207
  },
26005
26208
  focusHandler = null,
26006
- actionsRefMock = null // for testing
26209
+ actionsRefMock = null,
26210
+ // for testing
26211
+ direction = 'ltr'
26007
26212
  } = _ref3;
26008
26213
  const defaultSelectionActions = useDefaultSelectionActions(selections);
26009
26214
  const {
@@ -26076,12 +26281,16 @@
26076
26281
  const showActions = newActions.length > 0;
26077
26282
  const showMore = moreActions.length > 0;
26078
26283
  const showDivider = showActions && selections.show || showMore && selections.show;
26284
+ const isRtl = direction === 'rtl';
26079
26285
  const Actions = /*#__PURE__*/React.createElement(Grid$1, {
26080
26286
  ref: actionsRef,
26081
26287
  onKeyDown: tabCallback,
26082
26288
  container: true,
26083
26289
  gap: 0,
26084
- wrap: "nowrap"
26290
+ wrap: "nowrap",
26291
+ sx: {
26292
+ flexDirection: isRtl ? 'row-reverse' : 'row'
26293
+ }
26085
26294
  }, showActions && /*#__PURE__*/React.createElement(ActionsGroup, {
26086
26295
  actions: newActions,
26087
26296
  first: true,
@@ -26102,7 +26311,8 @@
26102
26311
  })), selections.show && /*#__PURE__*/React.createElement(ActionsGroup, {
26103
26312
  actions: defaultSelectionActions,
26104
26313
  first: !showActions && !showMore,
26105
- last: true
26314
+ last: true,
26315
+ isRtl: isRtl
26106
26316
  }), showMoreItems && /*#__PURE__*/React.createElement(More$1, {
26107
26317
  show: showMoreItems,
26108
26318
  actions: moreActions,
@@ -26125,7 +26335,7 @@
26125
26335
  className: ActionToolbarElement.className,
26126
26336
  style: {
26127
26337
  pointerEvents: 'auto',
26128
- padding: theme.spacing(1, 1)
26338
+ padding: theme.spacing(0.8)
26129
26339
  }
26130
26340
  }
26131
26341
  }, Actions) : show && Actions;
@@ -26158,7 +26368,8 @@
26158
26368
  theme
26159
26369
  } = _ref2;
26160
26370
  return {
26161
- 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'
26162
26373
  };
26163
26374
  });
26164
26375
  function ListBoxSearch(_ref3) {
@@ -26171,7 +26382,8 @@
26171
26382
  visible = true,
26172
26383
  autoFocus = true,
26173
26384
  wildCardSearch = false,
26174
- searchEnabled
26385
+ searchEnabled,
26386
+ direction
26175
26387
  } = _ref3;
26176
26388
  const {
26177
26389
  translator
@@ -26183,6 +26395,8 @@
26183
26395
  const {
26184
26396
  getStoreValue
26185
26397
  } = useDataStore(model);
26398
+ const isRtl = direction === 'rtl';
26399
+ const inpuTextAlign = isRtl ? 'right' : 'left';
26186
26400
  const cancel = () => selections.isActive() && selections.cancel();
26187
26401
  const abortSearch = async () => {
26188
26402
  if (!selections.isModal()) {
@@ -26270,6 +26484,7 @@
26270
26484
  className: "search",
26271
26485
  sx: [{
26272
26486
  border: 'none',
26487
+ fontSize: 14,
26273
26488
  borderRadius: 0,
26274
26489
  backgroundColor: 'transparent',
26275
26490
  '& fieldset': {
@@ -26288,6 +26503,8 @@
26288
26503
  paddingTop: '5px',
26289
26504
  paddingBottom: '5px'
26290
26505
  }
26506
+ }, {
26507
+ flexDirection: isRtl ? 'row-reverse' : 'row'
26291
26508
  }],
26292
26509
  inputRef: inputRef,
26293
26510
  size: "small",
@@ -26299,7 +26516,10 @@
26299
26516
  onKeyDown: onKeyDown,
26300
26517
  autoFocus: autoFocus,
26301
26518
  inputProps: {
26302
- tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1
26519
+ tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1,
26520
+ style: {
26521
+ textAlign: "".concat(inpuTextAlign)
26522
+ }
26303
26523
  }
26304
26524
  });
26305
26525
  }
@@ -26845,6 +27065,7 @@
26845
27065
  autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : true
26846
27066
  }), /*#__PURE__*/React.createElement(ListBox, {
26847
27067
  model: model,
27068
+ app: app,
26848
27069
  layout: layout,
26849
27070
  selections: selections,
26850
27071
  selectionState: selectionState$1,
@@ -28118,27 +28339,77 @@
28118
28339
  var DrillDownIcon = (props => SvgIcon(drillDown(props)));
28119
28340
 
28120
28341
  const addListboxTheme = themeApi => {
28121
- const getListboxStyle = prop => themeApi.getStyle('object', '', "listBox.".concat(prop));
28342
+ const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
28122
28343
  return {
28123
- backgroundColor: getListboxStyle('backgroundColor'),
28344
+ backgroundColor: getListboxStyle('', 'backgroundColor'),
28124
28345
  title: {
28125
28346
  main: {
28126
- color: getListboxStyle('title.main.color'),
28127
- fontSize: getListboxStyle('title.main.fontSize'),
28128
- 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')
28129
28351
  }
28130
28352
  },
28131
28353
  content: {
28132
- color: getListboxStyle('content.color'),
28133
- fontSize: getListboxStyle('content.fontSize'),
28134
- fontFamily: getListboxStyle('content.fontFamily')
28354
+ color: getListboxStyle('content', 'color'),
28355
+ fontSize: getListboxStyle('content', 'fontSize'),
28356
+ fontFamily: getListboxStyle('content', 'fontFamily')
28135
28357
  }
28136
28358
  };
28137
28359
  };
28138
28360
 
28361
+ function showToolbarDetached(_ref) {
28362
+ var _containerRef$current, _containerRef$current2, _titleRef$current$cli, _titleRef$current, _titleRef$current2, _titleRef$current3;
28363
+ let {
28364
+ containerRef,
28365
+ titleRef,
28366
+ iconsWidth
28367
+ } = _ref;
28368
+ const containerWidth = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : (_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 ? void 0 : _containerRef$current2.clientWidth) !== null && _containerRef$current !== void 0 ? _containerRef$current : 0;
28369
+ const padding = 16;
28370
+ const contentWidth = ((_titleRef$current$cli = titleRef === null || titleRef === void 0 ? void 0 : (_titleRef$current = titleRef.current) === null || _titleRef$current === void 0 ? void 0 : _titleRef$current.clientWidth) !== null && _titleRef$current$cli !== void 0 ? _titleRef$current$cli : 0) + iconsWidth + padding;
28371
+ const actionToolbarWidth = 128;
28372
+ const notSufficientSpace = containerWidth < contentWidth + actionToolbarWidth;
28373
+ const isTruncated = (titleRef === null || titleRef === void 0 ? void 0 : (_titleRef$current2 = titleRef.current) === null || _titleRef$current2 === void 0 ? void 0 : _titleRef$current2.scrollWidth) > (titleRef === null || titleRef === void 0 ? void 0 : (_titleRef$current3 = titleRef.current) === null || _titleRef$current3 === void 0 ? void 0 : _titleRef$current3.offsetWidth);
28374
+ return !!(notSufficientSpace | isTruncated);
28375
+ }
28376
+
28377
+ function getListboxActionProps(_ref) {
28378
+ let {
28379
+ isPopover,
28380
+ showToolbar,
28381
+ containerRef,
28382
+ isLocked,
28383
+ listboxSelectionToolbarItems,
28384
+ selections
28385
+ } = _ref;
28386
+ return {
28387
+ show: showToolbar && !isPopover,
28388
+ popover: {
28389
+ show: showToolbar && isPopover,
28390
+ anchorEl: containerRef.current
28391
+ },
28392
+ more: {
28393
+ enabled: !isLocked,
28394
+ actions: listboxSelectionToolbarItems,
28395
+ popoverProps: {
28396
+ elevation: 0
28397
+ },
28398
+ popoverPaperStyle: {
28399
+ boxShadow: '0 12px 8px -8px rgba(0, 0, 0, 0.2)',
28400
+ minWidth: '250px'
28401
+ }
28402
+ },
28403
+ selections: {
28404
+ show: showToolbar,
28405
+ api: selections,
28406
+ onConfirm: () => {},
28407
+ onCancel: () => {}
28408
+ }
28409
+ };
28410
+ }
28411
+
28139
28412
  const PREFIX$4 = 'ListBoxInline';
28140
- const searchIconWidth = 28;
28141
- const drillDownIconWidth = 24;
28142
28413
  const classes$4 = {
28143
28414
  listBoxHeader: "".concat(PREFIX$4, "-listBoxHeader"),
28144
28415
  screenReaderOnly: "".concat(PREFIX$4, "-screenReaderOnly"),
@@ -28156,8 +28427,8 @@
28156
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,
28157
28428
  ["& .".concat(classes$4.listBoxHeader)]: {
28158
28429
  alignSelf: 'center',
28159
- display: 'inline-flex',
28160
- width: "calc(100% - ".concat(searchIconWidth, "px)")
28430
+ display: 'flex',
28431
+ width: "calc(100% - ".concat(BUTTON_ICON_WIDTH, "px)")
28161
28432
  },
28162
28433
  ["& .".concat(classes$4.screenReaderOnly)]: {
28163
28434
  position: 'absolute',
@@ -28167,18 +28438,25 @@
28167
28438
  },
28168
28439
  ["& .".concat(classes$4.listboxWrapper)]: {
28169
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'
28170
28447
  }
28171
28448
  };
28172
28449
  });
28173
28450
  const Title = styled$1(Typography$1)(_ref2 => {
28174
- 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;
28175
28452
  let {
28176
28453
  theme
28177
28454
  } = _ref2;
28178
28455
  return {
28179
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,
28180
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,
28181
- 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'
28182
28460
  };
28183
28461
  });
28184
28462
  function ListBoxInline(_ref3) {
@@ -28231,7 +28509,6 @@
28231
28509
  constraints
28232
28510
  } = reactExports.useContext(InstanceContext);
28233
28511
  theme.listBox = addListboxTheme(themeApi);
28234
- const moreAlignTo = reactExports.useRef();
28235
28512
  const containerRef = reactExports.useRef();
28236
28513
  const [searchContainer, searchContainerRef] = useRefWithCallback();
28237
28514
  const [showToolbar, setShowToolbar] = reactExports.useState(false);
@@ -28249,6 +28526,7 @@
28249
28526
  stop: 0
28250
28527
  });
28251
28528
  const [appSelections] = useAppSelections(app);
28529
+ const titleRef = reactExports.useRef(null);
28252
28530
  const [selectionState$1] = reactExports.useState(() => selectionState());
28253
28531
  const {
28254
28532
  handleKeyDown,
@@ -28275,6 +28553,7 @@
28275
28553
  if ((layout === null || layout === void 0 ? void 0 : layout.toolbar) !== undefined) {
28276
28554
  toolbar = layout.toolbar;
28277
28555
  }
28556
+ const toolbarDetachedOnly = toolbar && (layout === null || layout === void 0 ? void 0 : layout.title) === '';
28278
28557
  toolbar = toolbar && (layout === null || layout === void 0 ? void 0 : layout.title) !== '';
28279
28558
  reactExports.useEffect(() => {
28280
28559
  const show = () => {
@@ -28291,15 +28570,15 @@
28291
28570
  };
28292
28571
  if (selections) {
28293
28572
  if (!selections.isModal()) {
28294
- selections.on('deactivated', hide);
28295
28573
  selections.on('activated', show);
28574
+ selections.on('deactivated', hide);
28296
28575
  }
28297
28576
  setShowToolbar(selections.isActive());
28298
28577
  }
28299
28578
  return () => {
28300
28579
  if (selections && selections.removeListener) {
28301
- selections.removeListener('deactivated', show);
28302
- selections.removeListener('activated', hide);
28580
+ selections.removeListener('activated', show);
28581
+ selections.removeListener('deactivated', hide);
28303
28582
  }
28304
28583
  };
28305
28584
  }, [selections, toolbar]);
@@ -28317,38 +28596,46 @@
28317
28596
  return null;
28318
28597
  }
28319
28598
  const isLocked = layout.qListObject.qDimensionInfo.qLocked === true;
28599
+ const isRtl = direction === 'rtl';
28320
28600
  const isDrillDown = layout.qListObject.qDimensionInfo.qGrouping === 'H';
28321
- const listboxSelectionToolbarItems = toolbar ? createListboxSelectionToolbar({
28601
+ const listboxSelectionToolbarItems = createListboxSelectionToolbar({
28322
28602
  layout,
28323
28603
  model,
28324
28604
  translator,
28325
28605
  selectionState: selectionState$1
28326
- }) : [];
28327
- const showSearchToggle = search === 'toggle' && showSearch;
28328
- const searchVisible = (search === true || showSearchToggle) && !selectDisabled();
28606
+ });
28329
28607
  const {
28608
+ wildCardSearch,
28609
+ searchEnabled,
28330
28610
  layoutOptions = {}
28331
28611
  } = layout;
28612
+ const showSearchToggle = search === 'toggle' && showSearch;
28613
+ const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
28332
28614
  const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
28333
28615
  const searchHeight = dense ? 27 : 40;
28334
28616
  const extraheight = dense ? 39 : 49;
28335
- const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
28617
+ const searchAddHeight = searchVisible ? searchHeight : 0;
28618
+ const minHeight = toolbar ? 49 + searchAddHeight + extraheight : 0;
28336
28619
  const headerHeight = 32;
28337
- const {
28338
- wildCardSearch,
28339
- searchEnabled
28340
- } = layout;
28341
28620
  const onShowSearch = () => {
28342
28621
  const newValue = !showSearch;
28343
28622
  setShowSearch(newValue);
28344
28623
  };
28624
+ const getActionToolbarProps = isPopover => getListboxActionProps({
28625
+ isPopover,
28626
+ showToolbar,
28627
+ containerRef,
28628
+ isLocked,
28629
+ listboxSelectionToolbarItems,
28630
+ selections
28631
+ });
28345
28632
  const shouldAutoFocus = searchVisible && search === 'toggle';
28346
28633
  const showSearchIcon = searchEnabled !== false && search === 'toggle' && !(constraints !== null && constraints !== void 0 && constraints.active);
28347
28634
  const showSearchOrLockIcon = isLocked || showSearchIcon;
28348
28635
  const showIcons = showSearchOrLockIcon || isDrillDown;
28349
- const iconsWidth = (showSearchOrLockIcon ? searchIconWidth : 0) + (isDrillDown ? drillDownIconWidth : 0);
28350
- const drillDownPaddingLeft = showSearchOrLockIcon ? 0 : ICON_PADDING;
28351
- const headerPaddingLeft = CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0);
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
28637
+ const headerPaddingLeft = CELL_PADDING_LEFT - (showSearchOrLockIcon ? ICON_PADDING : 0);
28638
+ const headerPaddingRight = isRtl ? CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0) : 0;
28352
28639
 
28353
28640
  // Add a container padding for grid mode to harmonize with the grid item margins (should sum to 8px).
28354
28641
  const isGridMode = (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.dataLayout) === 'grid';
@@ -28356,7 +28643,9 @@
28356
28643
  if (isGridMode) {
28357
28644
  containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px';
28358
28645
  }
28359
- return /*#__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, {
28360
28649
  className: "listbox-container",
28361
28650
  container: true,
28362
28651
  tabIndex: keyboard.enabled && !keyboard.active ? 0 : -1,
@@ -28377,13 +28666,20 @@
28377
28666
  container: true,
28378
28667
  style: {
28379
28668
  padding: theme.spacing(1),
28380
- paddingLeft: "".concat(headerPaddingLeft, "px")
28669
+ paddingLeft: "".concat(headerPaddingLeft, "px"),
28670
+ paddingRight: "".concat(headerPaddingRight, "px")
28671
+ },
28672
+ sx: {
28673
+ flexDirection: isRtl ? 'row-reverse' : 'row'
28381
28674
  },
28382
28675
  wrap: "nowrap"
28383
28676
  }, /*#__PURE__*/React.createElement(Grid$1, {
28384
28677
  item: true,
28385
28678
  container: true,
28386
28679
  height: headerHeight,
28680
+ sx: {
28681
+ flexDirection: isRtl ? 'row-reverse' : 'row'
28682
+ },
28387
28683
  wrap: "nowrap"
28388
28684
  }, showIcons && /*#__PURE__*/React.createElement(Grid$1, {
28389
28685
  item: true,
@@ -28393,12 +28689,13 @@
28393
28689
  width: iconsWidth
28394
28690
  }
28395
28691
  }, isLocked ? /*#__PURE__*/React.createElement(IconButton$1, {
28692
+ title: translator.get('SelectionToolbar.ClickToUnlock'),
28396
28693
  tabIndex: -1,
28397
28694
  onClick: unlock,
28398
28695
  disabled: selectDisabled(),
28399
28696
  size: "large"
28400
28697
  }, /*#__PURE__*/React.createElement(Lock, {
28401
- title: translator.get('Listbox.Unlock'),
28698
+ disableRipple: true,
28402
28699
  style: {
28403
28700
  fontSize: '12px'
28404
28701
  }
@@ -28407,66 +28704,52 @@
28407
28704
  tabIndex: -1,
28408
28705
  title: translator.get('Listbox.Search'),
28409
28706
  size: "large",
28707
+ disableRipple: true,
28410
28708
  "data-testid": "search-toggle-btn"
28411
28709
  }, /*#__PURE__*/React.createElement(SearchIcon, {
28412
28710
  style: {
28413
28711
  fontSize: '12px'
28414
28712
  }
28415
- })), isDrillDown && /*#__PURE__*/React.createElement(IconButton$1, {
28713
+ })), isDrillDown && /*#__PURE__*/React.createElement(DrillDownIcon, {
28416
28714
  tabIndex: -1,
28417
28715
  title: translator.get('Listbox.DrillDown'),
28418
28716
  size: "large",
28419
- sx: {
28420
- paddingLeft: "".concat(drillDownPaddingLeft, "px")
28421
- }
28422
- }, /*#__PURE__*/React.createElement(DrillDownIcon, {
28423
28717
  style: {
28424
28718
  fontSize: '12px'
28425
28719
  }
28426
- }))), /*#__PURE__*/React.createElement(Grid$1, {
28720
+ })), /*#__PURE__*/React.createElement(Grid$1, {
28427
28721
  item: true,
28722
+ sx: {
28723
+ justifyContent: isRtl ? 'flex-end' : 'flex-start'
28724
+ },
28428
28725
  className: classes$4.listBoxHeader
28429
28726
  }, /*#__PURE__*/React.createElement(Title, {
28430
28727
  variant: "h6",
28431
28728
  noWrap: true,
28729
+ ref: titleRef,
28432
28730
  title: layout.title
28433
28731
  }, layout.title))), /*#__PURE__*/React.createElement(Grid$1, {
28434
28732
  item: true,
28435
28733
  xs: true
28436
28734
  }), /*#__PURE__*/React.createElement(Grid$1, {
28437
28735
  item: true
28438
- }, /*#__PURE__*/React.createElement(ActionsToolbar, {
28439
- more: {
28440
- enabled: !isLocked,
28441
- actions: listboxSelectionToolbarItems,
28442
- alignTo: moreAlignTo,
28443
- popoverProps: {
28444
- elevation: 0
28445
- },
28446
- popoverPaperStyle: {
28447
- boxShadow: '0 12px 8px -8px rgba(0, 0, 0, 0.2)',
28448
- minWidth: '250px'
28449
- }
28450
- },
28451
- selections: {
28452
- show: showToolbar,
28453
- api: selections,
28454
- onConfirm: () => {},
28455
- onCancel: () => {}
28456
- }
28457
- }))), /*#__PURE__*/React.createElement(Grid$1, {
28736
+ }, /*#__PURE__*/React.createElement(ActionsToolbar, _extends$8({
28737
+ direction: direction
28738
+ }, getActionToolbarProps(showToolbarDetached({
28739
+ containerRef,
28740
+ titleRef,
28741
+ iconsWidth
28742
+ })))))), /*#__PURE__*/React.createElement(Grid$1, {
28458
28743
  item: true,
28459
28744
  container: true,
28460
28745
  direction: "column",
28461
28746
  style: {
28462
28747
  height: '100%',
28463
- minHeight: "".concat(minHeight, "px")
28748
+ minHeight: '50px'
28464
28749
  },
28465
28750
  role: "region",
28466
28751
  "aria-label": translator.get('Listbox.ResultFilterLabel')
28467
- }, /*#__PURE__*/React.createElement("div", {
28468
- ref: moreAlignTo
28469
- }), /*#__PURE__*/React.createElement(Grid$1, {
28752
+ }, /*#__PURE__*/React.createElement(Grid$1, {
28470
28753
  item: true,
28471
28754
  ref: searchContainerRef
28472
28755
  }, /*#__PURE__*/React.createElement("div", {
@@ -28482,7 +28765,8 @@
28482
28765
  autoFocus: shouldAutoFocus,
28483
28766
  searchContainerRef: searchContainerRef,
28484
28767
  wildCardSearch: wildCardSearch,
28485
- searchEnabled: searchEnabled
28768
+ searchEnabled: searchEnabled,
28769
+ direction: direction
28486
28770
  })), /*#__PURE__*/React.createElement(Grid$1, {
28487
28771
  item: true,
28488
28772
  xs: true,
@@ -28496,6 +28780,7 @@
28496
28780
  } = _ref4;
28497
28781
  return /*#__PURE__*/React.createElement(ListBox, {
28498
28782
  model: model,
28783
+ app: app,
28499
28784
  constraints: constraints,
28500
28785
  layout: layout,
28501
28786
  selections: selections,
@@ -28527,7 +28812,7 @@
28527
28812
  set: setCurrentScrollIndex
28528
28813
  }
28529
28814
  });
28530
- }))));
28815
+ })))));
28531
28816
  }
28532
28817
  const ListBoxInlineMemoed = React.memo(ListBoxInline);
28533
28818
  function IsolateUseLayoutWrapper(_ref5) {
@@ -28603,7 +28888,13 @@
28603
28888
  const dim = await app.getDimension(fieldIdentifier.qLibraryId);
28604
28889
  const dimLayout = await dim.getLayout();
28605
28890
  setFallbackTitle(dimLayout.qDim.title);
28606
- 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
+ }
28607
28898
  setIsFetching(false);
28608
28899
  } catch (e) {
28609
28900
  setIsFetching(false);
@@ -28713,11 +29004,16 @@
28713
29004
  listdef.qListObjectDef.qDef.qFieldDefs = [fieldIdentifier];
28714
29005
  fieldName = fieldIdentifier;
28715
29006
  }
28716
- if (frequencyMode !== 'N' || histogram) {
28717
- const field = fieldIdentifier.qLibraryId ? fieldDef : fieldName;
28718
- listdef.frequencyMax = {
28719
- qValueExpression: "Max(AGGR(Count([".concat(field, "]), [").concat(field, "]))")
28720
- };
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
+ }
28721
29017
  }
28722
29018
  const [sessionModel] = useSessionModel(listdef, isFetching ? null : app, fieldName, stateName);
28723
29019
  reactExports.useEffect(() => {
@@ -28821,7 +29117,7 @@
28821
29117
  options
28822
29118
  });
28823
29119
  const elementRef = reactExports.useRef(element);
28824
- const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, [elementRef, '.njs-action-toolbar-more'], options)[0];
29120
+ const selections = hasExternalSelectionsApi ? options.selectionsApi : useObjectSelections(app, model, [elementRef, '.njs-action-toolbar-more', '.njs-action-toolbar-popover'], options)[0];
28825
29121
  const opts = reactExports.useMemo(() => _objectSpread2(_objectSpread2({}, options), {}, {
28826
29122
  selections,
28827
29123
  model,
@@ -36068,6 +36364,7 @@
36068
36364
  const mergeConfigs = (base, c) => ({
36069
36365
  context: mergeObj(base.context, c.context),
36070
36366
  load: c.load || base.load,
36367
+ loadTheme: c.loadTheme || base.loadTheme,
36071
36368
  snapshot: _objectSpread2({}, c.snapshot || base.snapshot),
36072
36369
  types: mergeArray(base.types, c.types),
36073
36370
  themes: mergeArray(base.themes, c.themes),
@@ -36114,6 +36411,7 @@
36114
36411
  });
36115
36412
  const appTheme$1 = appTheme({
36116
36413
  themes: configuration.themes,
36414
+ loadTheme: configuration.loadTheme,
36117
36415
  root
36118
36416
  });
36119
36417
  currentContext.themeApi = appTheme$1.externalAPI;