@nebula.js/stardust 4.0.0-alpha.1 → 4.0.0-alpha.3

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.3
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 = "ee80" ;
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.3" );
15566
15611
  element.setAttribute('data-app-id', app.id);
15567
15612
  document.body.appendChild(element);
15568
15613
  const root = client.createRoot(element);
@@ -21911,6 +21956,8 @@
21911
21956
  function getFieldKeyboardNavigation(_ref) {
21912
21957
  let {
21913
21958
  select,
21959
+ selectAll,
21960
+ onCtrlF,
21914
21961
  confirm,
21915
21962
  cancel,
21916
21963
  setScrollPosition,
@@ -21930,7 +21977,8 @@
21930
21977
  const {
21931
21978
  keyCode,
21932
21979
  shiftKey = false,
21933
- ctrlKey = false
21980
+ ctrlKey = false,
21981
+ metaKey = false
21934
21982
  } = event.nativeEvent;
21935
21983
  switch (keyCode) {
21936
21984
  case KEYS.SHIFT:
@@ -21985,6 +22033,18 @@
21985
22033
  }
21986
22034
  setScrollPosition === null || setScrollPosition === void 0 ? void 0 : setScrollPosition('end');
21987
22035
  break;
22036
+ case KEYS.A:
22037
+ if (ctrlKey || metaKey) {
22038
+ selectAll();
22039
+ break;
22040
+ }
22041
+ return;
22042
+ case KEYS.F:
22043
+ if (ctrlKey || metaKey) {
22044
+ onCtrlF();
22045
+ break;
22046
+ }
22047
+ return;
21988
22048
  default:
21989
22049
  return;
21990
22050
  // don't stop propagation since we want to outsource keydown to other handlers.
@@ -22011,15 +22071,29 @@
22011
22071
  constraints
22012
22072
  } = _ref2;
22013
22073
  const focusInsideListbox = element => {
22014
- const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-* button');
22074
+ const fieldElement = element.querySelector('.search input, .value.selector, .value, .ActionsToolbar-item button');
22015
22075
  setKeyboardActive(true);
22016
22076
  if (fieldElement) {
22017
22077
  fieldElement.focus();
22018
22078
  }
22019
22079
  };
22020
- const focusContainer = element => {
22021
- setKeyboardActive(false);
22022
- element.focus();
22080
+ const changeFocus = event => {
22081
+ var _event$target;
22082
+ if ((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.classList.contains('listbox-container')) {
22083
+ // Focus currently on a listbox
22084
+ // Esc on a list box should move the focus to its parent, i.e. a filter pane if any
22085
+ setKeyboardActive(false);
22086
+ } else {
22087
+ var _event$target2, _event$target3, _event$currentTarget, _event$currentTarget2;
22088
+ // Focus currently on a row
22089
+ // Esc on a row should move the focus to its parent, i.e. a listbox
22090
+ // First unfocus the row
22091
+ (_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.setAttribute('tabIndex', '-1');
22092
+ (_event$target3 = event.target) === null || _event$target3 === void 0 ? void 0 : _event$target3.blur();
22093
+ // Then focus the listbox
22094
+ (_event$currentTarget = event.currentTarget) === null || _event$currentTarget === void 0 ? void 0 : _event$currentTarget.setAttribute('tabIndex', '0');
22095
+ (_event$currentTarget2 = event.currentTarget) === null || _event$currentTarget2 === void 0 ? void 0 : _event$currentTarget2.focus();
22096
+ }
22023
22097
  };
22024
22098
  const updateKeyScrollOnHover = newState => {
22025
22099
  if (hovering) {
@@ -22043,7 +22117,7 @@
22043
22117
  focusInsideListbox(event.currentTarget);
22044
22118
  break;
22045
22119
  case KEYS.ESCAPE:
22046
- focusContainer(event.currentTarget);
22120
+ changeFocus(event);
22047
22121
  break;
22048
22122
  case KEYS.ARROW_UP:
22049
22123
  updateKeyScrollOnHover({
@@ -22055,6 +22129,10 @@
22055
22129
  down: 1
22056
22130
  });
22057
22131
  break;
22132
+ case KEYS.ARROW_LEFT:
22133
+ case KEYS.ARROW_RIGHT:
22134
+ return;
22135
+ // let it propagate to top-level
22058
22136
  case KEYS.PAGE_UP:
22059
22137
  updateKeyScrollOnHover({
22060
22138
  up: currentScrollIndex.stop - currentScrollIndex.start
@@ -22182,25 +22260,15 @@
22182
22260
  const getBarWidth = _ref => {
22183
22261
  let {
22184
22262
  qFrequency,
22185
- checkboxes,
22186
22263
  frequencyMax
22187
22264
  } = _ref;
22188
22265
  const freqStr = String(qFrequency);
22189
22266
  const isPercent = freqStr.substring(freqStr.length - 1) === '%';
22190
22267
  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
22268
  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 '';
22269
+ return "".concat(width, "%");
22203
22270
  };
22271
+ const getFrequencyText = qFrequency => qFrequency || frequencyTextNone;
22204
22272
 
22205
22273
  const CELL_PADDING_LEFT = 9;
22206
22274
  const ICON_WIDTH = 12;
@@ -22229,8 +22297,10 @@
22229
22297
  textOverflow: 'ellipsis',
22230
22298
  whiteSpace: 'nowrap'
22231
22299
  };
22300
+ const iconWidth = 24; // tick and lock icon width in px
22301
+
22232
22302
  const RowColRoot = styled$1('div', {
22233
- shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth'].includes(prop)
22303
+ shouldForwardProp: prop => !['flexBasisProp', 'isGridMode', 'isGridCol', 'dense', 'frequencyWidth', 'showIcon', 'checkboxes'].includes(prop)
22234
22304
  })(_ref2 => {
22235
22305
  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
22306
  let {
@@ -22239,7 +22309,9 @@
22239
22309
  isGridMode,
22240
22310
  isGridCol,
22241
22311
  dense,
22242
- frequencyWidth
22312
+ frequencyWidth,
22313
+ showIcon,
22314
+ checkboxes
22243
22315
  } = _ref2;
22244
22316
  return {
22245
22317
  '&:focus': {
@@ -22248,6 +22320,14 @@
22248
22320
  '&:focus-visible': {
22249
22321
  outline: 'none'
22250
22322
  },
22323
+ '& .value': {
22324
+ '&:focus': {
22325
+ boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
22326
+ },
22327
+ '&:focus-visible': {
22328
+ outline: 'none'
22329
+ }
22330
+ },
22251
22331
  ["& .".concat(rowColClasses.row)]: {
22252
22332
  flexWrap: 'nowrap',
22253
22333
  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 +22356,7 @@
22276
22356
  flexBasis: flexBasisProp,
22277
22357
  lineHeight: '16px',
22278
22358
  userSelect: 'none',
22279
- paddingRight: '1px'
22359
+ paddingRight: showIcon || checkboxes ? '1px' : "".concat(iconWidth, "px")
22280
22360
  }, ellipsis), {}, {
22281
22361
  whiteSpace: 'pre',
22282
22362
  // to keep white-space on highlight
@@ -22318,9 +22398,9 @@
22318
22398
  ["& .".concat(rowColClasses.icon)]: {
22319
22399
  display: 'flex',
22320
22400
  justifyContent: 'center',
22321
- width: 24,
22322
- minWidth: 24,
22323
- maxWidth: 24
22401
+ width: iconWidth,
22402
+ minWidth: iconWidth,
22403
+ maxWidth: iconWidth
22324
22404
  },
22325
22405
  // Selection styles (S=Selected, XS=ExcludedSelected, A=Available, X=Excluded).
22326
22406
  ["& .".concat(rowColClasses.S)]: _objectSpread2(_objectSpread2({}, getSelectedStyle({
@@ -22348,7 +22428,7 @@
22348
22428
  ["& .".concat(rowColClasses.frequencyCount)]: _objectSpread2(_objectSpread2({
22349
22429
  justifyContent: 'flex-end'
22350
22430
  }, ellipsis), {}, {
22351
- flex: "0 1 ".concat(frequencyWidth, "px"),
22431
+ flex: "0 1 ".concat(frequencyWidth + (showIcon || checkboxes ? 0 : iconWidth), "px"),
22352
22432
  textAlign: 'right',
22353
22433
  paddingLeft: '2px'
22354
22434
  }),
@@ -22358,27 +22438,38 @@
22358
22438
  alignItems: 'center'
22359
22439
  },
22360
22440
  ["& .".concat(rowColClasses.bar)]: {
22361
- border: "".concat(barBorderWidthPx, "px solid"),
22362
- borderColor: '#D9D9D9',
22363
22441
  height: dense ? '16px' : '20px',
22364
22442
  position: 'absolute',
22365
22443
  zIndex: '-1',
22366
22444
  alignSelf: 'center',
22367
- left: "".concat(barPadPx, "px"),
22368
- transition: 'width 0.2s',
22369
- backgroundColor: '#FAFAFA'
22445
+ left: barPadPx,
22446
+ width: "calc(100% - ".concat(barPadPx * 2, "px)"),
22447
+ display: 'flex',
22448
+ alignItems: 'center',
22449
+ '& .bar-filled': {
22450
+ border: "".concat(barBorderWidthPx, "px solid"),
22451
+ borderColor: '#D9D9D9',
22452
+ transition: 'width 0.2s',
22453
+ backgroundColor: '#FAFAFA',
22454
+ height: '100%'
22455
+ }
22370
22456
  },
22371
22457
  ["& .".concat(rowColClasses.barSelected)]: {
22372
- opacity: '30%',
22373
22458
  zIndex: '0',
22374
- background: theme.palette.background.lighter
22459
+ '& .bar-filled': {
22460
+ opacity: '30%',
22461
+ background: theme.palette.background.lighter
22462
+ }
22375
22463
  },
22376
22464
  ["& .".concat(rowColClasses.barWithCheckbox)]: {
22377
- left: "".concat(barWithCheckboxLeftPadPx, "px")
22465
+ left: barWithCheckboxLeftPadPx,
22466
+ width: "calc(100% - ".concat(barWithCheckboxLeftPadPx + barPadPx, "px)")
22378
22467
  },
22379
22468
  ["& .".concat(rowColClasses.barSelectedWithCheckbox)]: {
22380
- background: '#BFE5D0',
22381
- borderColor: '#BFE5D0'
22469
+ '& .bar-filled': {
22470
+ background: '#BFE5D0',
22471
+ borderColor: '#BFE5D0'
22472
+ }
22382
22473
  },
22383
22474
  ["& .".concat(rowColClasses.excludedTextWithCheckbox)]: {
22384
22475
  color: '#828282',
@@ -22554,6 +22645,7 @@
22554
22645
  color: color,
22555
22646
  align: valueTextAlign
22556
22647
  }, /*#__PURE__*/React.createElement("span", {
22648
+ dir: "auto",
22557
22649
  style: {
22558
22650
  whiteSpace: 'pre'
22559
22651
  }
@@ -22739,29 +22831,27 @@
22739
22831
 
22740
22832
  function Histogram(_ref) {
22741
22833
  let {
22742
- cell,
22834
+ qFrequency,
22743
22835
  histogram,
22744
22836
  checkboxes,
22745
22837
  isSelected,
22746
22838
  frequencyMax
22747
22839
  } = _ref;
22748
- const hasHistogramBar = cell && histogram && getFrequencyText({
22749
- cell
22750
- }) !== frequencyTextNone;
22840
+ const hasHistogramBar = qFrequency && histogram && getFrequencyText(qFrequency) !== frequencyTextNone;
22751
22841
  if (!hasHistogramBar) {
22752
22842
  return undefined;
22753
22843
  }
22754
22844
  const width = getBarWidth({
22755
- qFrequency: cell.qFrequency,
22845
+ qFrequency,
22756
22846
  checkboxes,
22757
22847
  frequencyMax
22758
22848
  });
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
- });
22849
+ return /*#__PURE__*/React.createElement(Box$1, {
22850
+ className: joinClassNames([rowColClasses.bar, checkboxes && rowColClasses.barWithCheckbox, isSelected && (checkboxes ? rowColClasses.barSelectedWithCheckbox : rowColClasses.barSelected)])
22851
+ }, /*#__PURE__*/React.createElement(Box$1, {
22852
+ className: "bar-filled",
22853
+ width: width
22854
+ }));
22765
22855
  }
22766
22856
 
22767
22857
  function Frequency(_ref) {
@@ -22786,9 +22876,7 @@
22786
22876
  cell,
22787
22877
  checkboxes
22788
22878
  }) && rowColClasses.excludedTextWithCheckbox])
22789
- }, getFrequencyText({
22790
- cell
22791
- })));
22879
+ }, getFrequencyText(cell === null || cell === void 0 ? void 0 : cell.qFrequency)));
22792
22880
  }
22793
22881
 
22794
22882
  function getGridItemSizes(_ref) {
@@ -22889,6 +22977,7 @@
22889
22977
  histogram = false,
22890
22978
  keyboard,
22891
22979
  showGray = true,
22980
+ showTick: sizePermitsTick = true,
22892
22981
  columnCount = 1,
22893
22982
  rowCount = 1,
22894
22983
  dataOffset,
@@ -22974,7 +23063,11 @@
22974
23063
  ltr: 'left'
22975
23064
  };
22976
23065
  if (isAutoTextAlign) {
22977
- valueTextAlign = isNumeric ? 'right' : dirToTextAlignMap[direction];
23066
+ if (!isNumeric) {
23067
+ valueTextAlign = dirToTextAlignMap[direction];
23068
+ } else {
23069
+ valueTextAlign = direction === 'rtl' ? 'left' : 'right';
23070
+ }
22978
23071
  } else {
22979
23072
  valueTextAlign = (textAlign === null || textAlign === void 0 ? void 0 : textAlign.align) || 'left';
22980
23073
  }
@@ -22993,22 +23086,26 @@
22993
23086
  display: 'flex',
22994
23087
  fontSize: '8px'
22995
23088
  };
22996
- const showLock = isSelected && isLocked;
22997
- const showTick = !checkboxes && isSelected && !isLocked;
22998
23089
  const cellStyle = {
22999
23090
  display: 'flex',
23000
23091
  alignItems: 'center',
23001
23092
  minWidth: 0,
23002
23093
  flexGrow: 1,
23003
- paddingLeft: checkboxes ? 0 : undefined,
23094
+ paddingLeft: direction === 'rtl' ? 8 : checkboxes ? 0 : undefined,
23095
+ paddingRight: checkboxes ? 0 : direction === 'rtl' ? 8 : 0,
23004
23096
  justifyContent: valueTextAlign
23005
23097
  };
23006
23098
  const isFirstElement = index === 0;
23007
23099
  const flexBasisVal = checkboxes ? 'auto' : 'max-content';
23100
+ const showLock = isSelected && isLocked;
23101
+ const showTick = !checkboxes && isSelected && !isLocked && sizePermitsTick;
23102
+ const showIcon = !checkboxes && (showTick || showLock);
23008
23103
  return /*#__PURE__*/React.createElement(RowColRoot$1, {
23009
23104
  className: rowColClasses.barContainer,
23010
23105
  flexBasisProp: flexBasisVal,
23011
23106
  style: styles,
23107
+ showIcon: showIcon,
23108
+ checkboxes: checkboxes,
23012
23109
  isGridCol: isGridCol,
23013
23110
  isGridMode: dataLayout === 'grid',
23014
23111
  dense: dense,
@@ -23034,8 +23131,8 @@
23034
23131
  role: column ? 'column' : 'row',
23035
23132
  tabIndex: isFirstElement && (!keyboard.enabled || keyboard.active) ? 0 : -1,
23036
23133
  "data-n": cell === null || cell === void 0 ? void 0 : cell.qElemNumber
23037
- }, /*#__PURE__*/React.createElement(Histogram, {
23038
- cell: cell,
23134
+ }, (cell === null || cell === void 0 ? void 0 : cell.qFrequency) && /*#__PURE__*/React.createElement(Histogram, {
23135
+ qFrequency: cell === null || cell === void 0 ? void 0 : cell.qFrequency,
23039
23136
  histogram: histogram,
23040
23137
  checkboxes: checkboxes,
23041
23138
  isSelected: isSelected,
@@ -23077,14 +23174,10 @@
23077
23174
  checkboxes: checkboxes,
23078
23175
  dense: dense,
23079
23176
  showGray: showGray
23080
- }), !checkboxes && /*#__PURE__*/React.createElement(Grid$1, {
23177
+ }), showIcon && /*#__PURE__*/React.createElement(Grid$1, {
23081
23178
  item: true,
23082
23179
  className: rowColClasses.icon
23083
- }, !showLock && !showTick && /*#__PURE__*/React.createElement("span", {
23084
- style: {
23085
- minWidth: '12px'
23086
- }
23087
- }), showLock && /*#__PURE__*/React.createElement(Lock, {
23180
+ }, showLock && /*#__PURE__*/React.createElement(Lock, {
23088
23181
  style: iconStyles,
23089
23182
  size: "small"
23090
23183
  }), showTick && /*#__PURE__*/React.createElement(Tick, {
@@ -24618,6 +24711,8 @@
24618
24711
  overflowDisclaimer.set(show);
24619
24712
  }
24620
24713
 
24714
+ const REMOVE_TICK_LIMIT = 80; // an item width equal to or less than this, will hide the select tick
24715
+
24621
24716
  const {
24622
24717
  StyledFixedSizeList,
24623
24718
  StyledFixedSizeGrid
@@ -24636,6 +24731,8 @@
24636
24731
  histogram,
24637
24732
  isSingleSelect,
24638
24733
  select,
24734
+ selectAll,
24735
+ onCtrlF,
24639
24736
  textAlign,
24640
24737
  selections,
24641
24738
  keyboard,
@@ -24649,20 +24746,23 @@
24649
24746
  focusListItems,
24650
24747
  setCurrentScrollIndex,
24651
24748
  constraints,
24749
+ frequencyMax,
24652
24750
  freqIsAllowed
24653
24751
  } = _ref;
24654
24752
  const {
24655
- layoutOptions = {},
24656
- frequencyMax
24753
+ layoutOptions = {}
24657
24754
  } = layout || {};
24658
24755
  const {
24756
+ columnWidth,
24659
24757
  itemPadding,
24660
24758
  listHeight,
24661
- itemSize,
24759
+ itemHeight,
24662
24760
  rowCount,
24663
24761
  columnCount,
24664
24762
  frequencyWidth
24665
24763
  } = sizes || {};
24764
+ const itemWidth = layoutOptions.dataLayout === 'grid' ? columnWidth : width;
24765
+ const showTick = itemWidth > REMOVE_TICK_LIMIT;
24666
24766
 
24667
24767
  // Options common for List and Grid.
24668
24768
  const commonComponentOptions = {
@@ -24690,14 +24790,18 @@
24690
24790
  select,
24691
24791
  confirm: () => selections === null || selections === void 0 ? void 0 : selections.confirm.call(selections),
24692
24792
  cancel: () => selections === null || selections === void 0 ? void 0 : selections.cancel.call(selections),
24693
- setScrollPosition
24793
+ setScrollPosition,
24794
+ selectAll,
24795
+ onCtrlF
24694
24796
  },
24695
24797
  frequencyMax,
24696
24798
  histogram,
24697
24799
  keyboard,
24698
24800
  showGray,
24801
+ showTick,
24699
24802
  dataOffset: local.current.dataOffset,
24700
- focusListItems
24803
+ focusListItems,
24804
+ direction
24701
24805
  });
24702
24806
  const List = _ref2 => {
24703
24807
  let {
@@ -24717,7 +24821,7 @@
24717
24821
  itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
24718
24822
  listCount
24719
24823
  }),
24720
- itemSize: itemSize,
24824
+ itemSize: itemHeight,
24721
24825
  onItemsRendered: renderProps => {
24722
24826
  var _layout$qListObject, _layout$qListObject$q;
24723
24827
  setCurrentScrollIndex({
@@ -24748,14 +24852,13 @@
24748
24852
  ref
24749
24853
  } = _ref3;
24750
24854
  const {
24751
- columnWidth,
24752
24855
  overflowStyling,
24753
24856
  scrollBarWidth
24754
24857
  } = sizes;
24755
24858
  const {
24756
24859
  layoutOrder
24757
24860
  } = layoutOptions || {};
24758
- const gridHeight = Math.min(listHeight, rowCount * itemSize + scrollBarWidth);
24861
+ const gridHeight = Math.min(listHeight, rowCount * itemHeight + scrollBarWidth);
24759
24862
  // eslint-disable-next-line no-param-reassign
24760
24863
  local.current.listRef = ref;
24761
24864
  const handleGridItemsRendered = renderProps => {
@@ -24794,7 +24897,7 @@
24794
24897
  columnCount: columnCount,
24795
24898
  columnWidth: columnWidth,
24796
24899
  rowCount: rowCount,
24797
- rowHeight: itemSize,
24900
+ rowHeight: itemHeight,
24798
24901
  style: _objectSpread2({}, overflowStyling),
24799
24902
  itemData: _objectSpread2(_objectSpread2({}, commonItemData), {}, {
24800
24903
  column: undefined,
@@ -24811,11 +24914,65 @@
24811
24914
  };
24812
24915
  }
24813
24916
 
24814
- const scrollBarWidth = 10; // TODO: ignore this - instead set the styling only show on hover...
24917
+ function calculateColumnMode(_ref) {
24918
+ let {
24919
+ maxVisibleRows,
24920
+ itemHeight,
24921
+ listCount,
24922
+ listHeight,
24923
+ columnAutoWidth,
24924
+ containerWidth,
24925
+ itemMinWidth
24926
+ } = _ref;
24927
+ let rowCount;
24928
+ const maxRows = (maxVisibleRows === null || maxVisibleRows === void 0 ? void 0 : maxVisibleRows.maxRows) || 3;
24929
+ const autoRowCount = Math.floor(listHeight / itemHeight);
24930
+ if (maxVisibleRows.auto !== false) {
24931
+ rowCount = autoRowCount;
24932
+ } else {
24933
+ rowCount = Math.min(listCount, maxRows, autoRowCount);
24934
+ }
24935
+ const columnCount = Math.ceil(listCount / rowCount);
24936
+ const columnWidth = Math.max(columnAutoWidth, containerWidth / columnCount, itemMinWidth);
24937
+ return {
24938
+ columnWidth,
24939
+ columnCount,
24940
+ rowCount
24941
+ };
24942
+ }
24815
24943
 
24816
- const ITEM_MIN_WIDTH = 56;
24944
+ const SCROLL_BAR_WIDTH = 10; // TODO: ignore this - instead set the styling only show on hover...
24817
24945
  const ITEM_MAX_WIDTH = 150;
24818
24946
  const FREQUENCY_WIDTH = 40;
24947
+ const ITEM_MIN_WIDTH = 56;
24948
+ const CHECKBOX_WIDTH = 20;
24949
+
24950
+ function calculateRowMode(_ref) {
24951
+ let {
24952
+ maxVisibleColumns,
24953
+ listCount,
24954
+ containerWidth,
24955
+ columnAutoWidth,
24956
+ itemMinWidth
24957
+ } = _ref;
24958
+ const maxColumns = (maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.maxColumns) || 3;
24959
+ const innerWidth = containerWidth - SCROLL_BAR_WIDTH;
24960
+ let columnCount;
24961
+ const autoColumnCount = Math.min(listCount, Math.ceil(innerWidth / Math.max(itemMinWidth, columnAutoWidth))); // TODO: smarter sizing... based on glyph count + font size etc...??
24962
+ if ((maxVisibleColumns === null || maxVisibleColumns === void 0 ? void 0 : maxVisibleColumns.auto) !== false) {
24963
+ columnCount = autoColumnCount;
24964
+ } else {
24965
+ columnCount = Math.min(listCount, maxColumns, autoColumnCount);
24966
+ }
24967
+ const columnWidth = innerWidth / columnCount;
24968
+ const rowCount = Math.ceil(listCount / columnCount);
24969
+ return {
24970
+ rowCount,
24971
+ columnWidth,
24972
+ columnCount
24973
+ };
24974
+ }
24975
+
24819
24976
  function getListSizes(_ref) {
24820
24977
  let {
24821
24978
  layout,
@@ -24824,7 +24981,8 @@
24824
24981
  listCount,
24825
24982
  count,
24826
24983
  textWidth,
24827
- freqIsAllowed
24984
+ freqIsAllowed,
24985
+ checkboxes
24828
24986
  } = _ref;
24829
24987
  const {
24830
24988
  layoutOptions = {}
@@ -24837,50 +24995,60 @@
24837
24995
  dataLayout
24838
24996
  } = layoutOptions;
24839
24997
  const frequencyAddWidth = freqIsAllowed ? FREQUENCY_WIDTH : 0;
24840
- const columnAutoWidth = Math.max(Math.min(ITEM_MAX_WIDTH, textWidth + 18 + frequencyAddWidth), ITEM_MIN_WIDTH + frequencyAddWidth);
24998
+ const checkboxAddWidth = checkboxes ? CHECKBOX_WIDTH : 0;
24999
+ const dynamicItemMinWidth = ITEM_MIN_WIDTH + frequencyAddWidth + checkboxAddWidth;
25000
+ const columnAutoWidth = Math.max(Math.min(ITEM_MAX_WIDTH, textWidth + 18 + frequencyAddWidth + checkboxAddWidth), dynamicItemMinWidth);
24841
25001
  let overflowStyling;
24842
25002
  let columnCount;
24843
25003
  let columnWidth;
24844
25004
  let rowCount;
24845
25005
  const isGridMode = dataLayout === 'grid';
24846
25006
  const itemPadding = 4;
24847
- const denseItemSize = 20;
24848
- const normalItemSize = isGridMode ? 32 : 29;
24849
- let itemSize = dense ? denseItemSize : normalItemSize;
25007
+ const denseItemHeight = 20;
25008
+ const normalItemHeight = isGridMode ? 32 : 29;
25009
+ let itemHeight = dense ? denseItemHeight : normalItemHeight;
24850
25010
  if (isGridMode) {
24851
25011
  // Emulate a margin between items using padding, since the list library
24852
25012
  // needs an explicit row height and cannot handle margins.
24853
- itemSize += itemPadding;
25013
+ itemHeight += itemPadding;
24854
25014
  }
24855
- const listHeight = height !== null && height !== void 0 ? height : 8 * itemSize;
25015
+ const listHeight = height !== null && height !== void 0 ? height : 8 * itemHeight;
24856
25016
  if (layoutOrder) {
24857
25017
  // Modify container width to achieve the exact design with 8px margins on each side (left and right).
24858
25018
  let containerWidth = width;
24859
25019
  if (layoutOrder === 'row') {
24860
- containerWidth += itemPadding * 2;
24861
25020
  overflowStyling = {
24862
25021
  overflowX: 'hidden'
24863
25022
  };
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;
25023
+ containerWidth += itemPadding * 2;
25024
+ ({
25025
+ rowCount,
25026
+ columnWidth,
25027
+ columnCount
25028
+ } = calculateRowMode({
25029
+ maxVisibleColumns,
25030
+ listCount,
25031
+ containerWidth,
25032
+ columnAutoWidth,
25033
+ itemMinWidth: dynamicItemMinWidth
25034
+ }));
24872
25035
  } else {
24873
25036
  overflowStyling = {
24874
25037
  overflowY: 'hidden'
24875
25038
  };
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);
25039
+ ({
25040
+ rowCount,
25041
+ columnWidth,
25042
+ columnCount
25043
+ } = calculateColumnMode({
25044
+ maxVisibleRows,
25045
+ itemHeight,
25046
+ listCount,
25047
+ listHeight,
25048
+ columnAutoWidth,
25049
+ containerWidth,
25050
+ itemMinWidth: dynamicItemMinWidth
25051
+ }));
24884
25052
  }
24885
25053
  }
24886
25054
  columnCount = (dataLayout === 'singleColumn' ? 1 : columnCount) || 1;
@@ -24897,9 +25065,9 @@
24897
25065
  columnWidth,
24898
25066
  rowCount,
24899
25067
  overflowStyling,
24900
- itemSize,
25068
+ itemHeight,
24901
25069
  listHeight,
24902
- scrollBarWidth,
25070
+ scrollBarWidth: SCROLL_BAR_WIDTH,
24903
25071
  count,
24904
25072
  listCount: limitedListCount,
24905
25073
  maxCount: {
@@ -24948,9 +25116,9 @@
24948
25116
  width,
24949
25117
  columnWidth,
24950
25118
  listHeight,
24951
- itemSize
25119
+ itemHeight
24952
25120
  } = _ref;
24953
- const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemSize);
25121
+ const visibleCellsCount = Math.ceil(width / columnWidth) * Math.ceil(listHeight / itemHeight);
24954
25122
  const minSize = visibleCellsCount * 2;
24955
25123
  return minSize;
24956
25124
  }
@@ -25272,12 +25440,53 @@
25272
25440
  return !!(widthPermitsFreq && (hasValidFreqOption || frequencyEnabled));
25273
25441
  }
25274
25442
 
25443
+ const escapeField = field => {
25444
+ if (!field) {
25445
+ return field;
25446
+ }
25447
+ return "".concat(field.replace(/\]/g, ']]'));
25448
+ };
25449
+ const needToFetchFrequencyMax = layout => (layout === null || layout === void 0 ? void 0 : layout.frequencyMax) === 'fetch';
25450
+ const getFrequencyMaxExpression = field => {
25451
+ const escapedField = escapeField(field);
25452
+ return "Max(AGGR(Count(".concat(escapedField, "), ").concat(escapedField, "))");
25453
+ };
25454
+ const getFrequencyMax = async (layout, app) => {
25455
+ const dimInfo = layout.qListObject.qDimensionInfo;
25456
+ const field = dimInfo.qGroupFieldDefs[dimInfo.qGroupPos];
25457
+ const expression = getFrequencyMaxExpression(field);
25458
+ const evaluadedExpression = await app.evaluateEx(expression);
25459
+ return evaluadedExpression.qNumber;
25460
+ };
25461
+
25462
+ const useFrequencyMax = (app, layout) => {
25463
+ const needFetch = needToFetchFrequencyMax(layout);
25464
+ const [frequencyMax, setFrequencyMax] = reactExports.useState();
25465
+ const [awaitingFrequencyMax, setAwaitingFrequencyMax] = reactExports.useState(needFetch);
25466
+ reactExports.useEffect(() => {
25467
+ if (!needFetch) {
25468
+ return;
25469
+ }
25470
+ const fetch = async () => {
25471
+ const newValue = await getFrequencyMax(layout, app);
25472
+ setFrequencyMax(newValue);
25473
+ setAwaitingFrequencyMax(false);
25474
+ };
25475
+ fetch();
25476
+ }, [needFetch && layout]);
25477
+ return {
25478
+ frequencyMax: needFetch ? frequencyMax : layout === null || layout === void 0 ? void 0 : layout.frequencyMax,
25479
+ awaitingFrequencyMax
25480
+ };
25481
+ };
25482
+
25275
25483
  const _excluded$4 = ["isLoadingData"];
25276
25484
  const DEFAULT_MIN_BATCH_SIZE = 100;
25277
25485
  function ListBox(_ref) {
25278
25486
  var _layout$qListObject$q, _loaderRef$current, _loaderRef$current$_l, _loaderRef$current$_l2;
25279
25487
  let {
25280
25488
  model,
25489
+ app,
25281
25490
  constraints,
25282
25491
  layout,
25283
25492
  selections,
@@ -25301,7 +25510,9 @@
25301
25510
  },
25302
25511
  currentScrollIndex = {
25303
25512
  set: () => {}
25304
- }
25513
+ },
25514
+ renderedCallback,
25515
+ onCtrlF
25305
25516
  } = _ref;
25306
25517
  const [initScrollPosIsSet, setInitScrollPosIsSet] = reactExports.useState(false);
25307
25518
  const isSingleSelect = !!(layout && layout.qListObject.qDimensionInfo.qIsOneAndOnlyOne);
@@ -25321,6 +25532,10 @@
25321
25532
 
25322
25533
  // The time from scroll end until new data is being fetched, may be exposed in API later on.
25323
25534
  const scrollTimeout = 0;
25535
+ const {
25536
+ frequencyMax,
25537
+ awaitingFrequencyMax
25538
+ } = useFrequencyMax(app, layout);
25324
25539
  const _useItemsLoader = useItemsLoader({
25325
25540
  local,
25326
25541
  loaderRef,
@@ -25346,11 +25561,15 @@
25346
25561
  if (itemsLoader !== null && itemsLoader !== void 0 && itemsLoader.pages) {
25347
25562
  selectionState.update({
25348
25563
  setPages,
25349
- pages: itemsLoader === null || itemsLoader === void 0 ? void 0 : itemsLoader.pages,
25564
+ pages: itemsLoader.pages,
25350
25565
  isSingleSelect,
25351
25566
  selectDisabled,
25352
25567
  layout
25353
25568
  });
25569
+ if (itemsLoader.pages.length && !awaitingFrequencyMax) {
25570
+ // All necessary data fetching done - signal rendering done!
25571
+ renderedCallback();
25572
+ }
25354
25573
  }
25355
25574
  const isItemLoaded = reactExports.useCallback(index => {
25356
25575
  if (!(pages !== null && pages !== void 0 && pages.length) || !local.current.validPages) {
@@ -25444,7 +25663,8 @@
25444
25663
  listCount: unlimitedListCount,
25445
25664
  count,
25446
25665
  textWidth,
25447
- freqIsAllowed
25666
+ freqIsAllowed,
25667
+ checkboxes
25448
25668
  });
25449
25669
  if (sizes.columnWidth) {
25450
25670
  // In grid mode, where we have a dynamic item width, get a second opinion on showing/hiding frequency.
@@ -25508,6 +25728,10 @@
25508
25728
  last
25509
25729
  }))
25510
25730
  });
25731
+ const selectAll = () => {
25732
+ selectionState.clearItemStates(false);
25733
+ model.selectListObjectAll('/qListObjectDef');
25734
+ };
25511
25735
  const {
25512
25736
  List,
25513
25737
  Grid
@@ -25523,6 +25747,8 @@
25523
25747
  showGray,
25524
25748
  interactionEvents,
25525
25749
  select,
25750
+ selectAll,
25751
+ onCtrlF,
25526
25752
  textAlign,
25527
25753
  isVertical,
25528
25754
  pages,
@@ -25541,19 +25767,20 @@
25541
25767
  focusListItems: getFocusState(),
25542
25768
  setCurrentScrollIndex: currentScrollIndex.set,
25543
25769
  constraints,
25770
+ frequencyMax,
25544
25771
  freqIsAllowed
25545
25772
  });
25546
25773
  const {
25547
25774
  columnWidth,
25548
25775
  listHeight,
25549
- itemSize
25776
+ itemHeight
25550
25777
  } = sizes || {};
25551
25778
  if (!isVertical) {
25552
25779
  minimumBatchSize = getHorizontalMinBatchSize({
25553
25780
  width,
25554
25781
  columnWidth,
25555
25782
  listHeight,
25556
- itemSize
25783
+ itemHeight
25557
25784
  });
25558
25785
  }
25559
25786
  return /*#__PURE__*/React.createElement(React.Fragment, null, !listCount && /*#__PURE__*/React.createElement(ListBoxDisclaimer, {
@@ -25912,6 +26139,7 @@
25912
26139
 
25913
26140
  const PREFIX$7 = 'ActionsToolbar';
25914
26141
  const classes$7 = {
26142
+ item: "".concat(PREFIX$7, "-item"),
25915
26143
  itemSpacing: "".concat(PREFIX$7, "-itemSpacing"),
25916
26144
  firstItemSpacing: "".concat(PREFIX$7, "-firstItemSpacing"),
25917
26145
  lastItemSpacing: "".concat(PREFIX$7, "-lastItemSpacing")
@@ -25948,25 +26176,27 @@
25948
26176
  actions = [],
25949
26177
  first = false,
25950
26178
  last = false,
25951
- addAnchor = false
26179
+ addAnchor = false,
26180
+ isRtl = false
25952
26181
  } = _ref2;
25953
26182
  return actions.length > 0 ? /*#__PURE__*/React.createElement(Grid$1, {
25954
26183
  item: true,
25955
26184
  container: true,
25956
26185
  gap: 0,
26186
+ flexDirection: isRtl ? 'row-reverse' : 'row',
25957
26187
  wrap: "nowrap"
25958
26188
  }, actions.map((e, ix) => {
25959
26189
  let cls = [];
25960
26190
  const isFirstItem = first && ix === 0;
25961
26191
  const isLastItem = last && actions.length - 1 === ix;
25962
26192
  if (isFirstItem && !isLastItem) {
25963
- cls = [classes$7.firstItemSpacing];
26193
+ cls = [classes$7.firstItemSpacing, classes$7.item];
25964
26194
  }
25965
26195
  if (isLastItem && !isFirstItem) {
25966
- cls = [...cls, classes$7.lastItemSpacing];
26196
+ cls = [...cls, classes$7.lastItemSpacing, classes$7.item];
25967
26197
  }
25968
26198
  if (!isFirstItem && !isLastItem && cls.length === 0) {
25969
- cls = [classes$7.itemSpacing];
26199
+ cls = [classes$7.itemSpacing, classes$7.item];
25970
26200
  }
25971
26201
  return /*#__PURE__*/React.createElement(Grid$1, {
25972
26202
  item: true,
@@ -26015,7 +26245,9 @@
26015
26245
  anchorEl: null
26016
26246
  },
26017
26247
  focusHandler = null,
26018
- actionsRefMock = null // for testing
26248
+ actionsRefMock = null,
26249
+ // for testing
26250
+ direction = 'ltr'
26019
26251
  } = _ref3;
26020
26252
  const defaultSelectionActions = useDefaultSelectionActions(selections);
26021
26253
  const {
@@ -26088,12 +26320,16 @@
26088
26320
  const showActions = newActions.length > 0;
26089
26321
  const showMore = moreActions.length > 0;
26090
26322
  const showDivider = showActions && selections.show || showMore && selections.show;
26323
+ const isRtl = direction === 'rtl';
26091
26324
  const Actions = /*#__PURE__*/React.createElement(Grid$1, {
26092
26325
  ref: actionsRef,
26093
26326
  onKeyDown: tabCallback,
26094
26327
  container: true,
26095
26328
  gap: 0,
26096
- wrap: "nowrap"
26329
+ wrap: "nowrap",
26330
+ sx: {
26331
+ flexDirection: isRtl ? 'row-reverse' : 'row'
26332
+ }
26097
26333
  }, showActions && /*#__PURE__*/React.createElement(ActionsGroup, {
26098
26334
  actions: newActions,
26099
26335
  first: true,
@@ -26114,7 +26350,8 @@
26114
26350
  })), selections.show && /*#__PURE__*/React.createElement(ActionsGroup, {
26115
26351
  actions: defaultSelectionActions,
26116
26352
  first: !showActions && !showMore,
26117
- last: true
26353
+ last: true,
26354
+ isRtl: isRtl
26118
26355
  }), showMoreItems && /*#__PURE__*/React.createElement(More$1, {
26119
26356
  show: showMoreItems,
26120
26357
  actions: moreActions,
@@ -26170,7 +26407,8 @@
26170
26407
  theme
26171
26408
  } = _ref2;
26172
26409
  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
26410
+ 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,
26411
+ display: 'flex'
26174
26412
  };
26175
26413
  });
26176
26414
  function ListBoxSearch(_ref3) {
@@ -26183,7 +26421,9 @@
26183
26421
  visible = true,
26184
26422
  autoFocus = true,
26185
26423
  wildCardSearch = false,
26186
- searchEnabled
26424
+ searchEnabled,
26425
+ direction,
26426
+ hide
26187
26427
  } = _ref3;
26188
26428
  const {
26189
26429
  translator
@@ -26195,6 +26435,8 @@
26195
26435
  const {
26196
26436
  getStoreValue
26197
26437
  } = useDataStore(model);
26438
+ const isRtl = direction === 'rtl';
26439
+ const inpuTextAlign = isRtl ? 'right' : 'left';
26198
26440
  const cancel = () => selections.isActive() && selections.cancel();
26199
26441
  const abortSearch = async () => {
26200
26442
  if (!selections.isModal()) {
@@ -26267,6 +26509,16 @@
26267
26509
  e.preventDefault();
26268
26510
  e.stopPropagation();
26269
26511
  break;
26512
+ case 'f':
26513
+ case 'F':
26514
+ if (e.ctrlKey || e.metaKey) {
26515
+ if (hide) {
26516
+ hide();
26517
+ }
26518
+ e.preventDefault();
26519
+ e.stopPropagation();
26520
+ }
26521
+ break;
26270
26522
  }
26271
26523
  return response;
26272
26524
  };
@@ -26282,6 +26534,7 @@
26282
26534
  className: "search",
26283
26535
  sx: [{
26284
26536
  border: 'none',
26537
+ fontSize: 14,
26285
26538
  borderRadius: 0,
26286
26539
  backgroundColor: 'transparent',
26287
26540
  '& fieldset': {
@@ -26300,6 +26553,8 @@
26300
26553
  paddingTop: '5px',
26301
26554
  paddingBottom: '5px'
26302
26555
  }
26556
+ }, {
26557
+ flexDirection: isRtl ? 'row-reverse' : 'row'
26303
26558
  }],
26304
26559
  inputRef: inputRef,
26305
26560
  size: "small",
@@ -26311,7 +26566,10 @@
26311
26566
  onKeyDown: onKeyDown,
26312
26567
  autoFocus: autoFocus,
26313
26568
  inputProps: {
26314
- tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1
26569
+ tabIndex: keyboard && (!keyboard.enabled || keyboard.active) ? 0 : -1,
26570
+ style: {
26571
+ textAlign: "".concat(inpuTextAlign)
26572
+ }
26315
26573
  }
26316
26574
  });
26317
26575
  }
@@ -26718,6 +26976,7 @@
26718
26976
  const open = show && Boolean(alignTo.current);
26719
26977
  const [listCount, setListCount] = reactExports.useState(0);
26720
26978
  const theme = useTheme$1();
26979
+ const searchContainerRef = reactExports.useRef();
26721
26980
  const [model] = useSessionModel({
26722
26981
  qInfo: {
26723
26982
  qType: 'njsListbox'
@@ -26779,6 +27038,10 @@
26779
27038
  translator,
26780
27039
  selectionState: selectionState$1
26781
27040
  });
27041
+ const onCtrlF = () => {
27042
+ const input = searchContainerRef.current.querySelector('input');
27043
+ input === null || input === void 0 ? void 0 : input.focus();
27044
+ };
26782
27045
  const hasSelections$1 = hasSelections(layout);
26783
27046
  return /*#__PURE__*/React.createElement(Popover$1, {
26784
27047
  open: open,
@@ -26845,7 +27108,10 @@
26845
27108
  xs: true
26846
27109
  }, /*#__PURE__*/React.createElement("div", {
26847
27110
  ref: moreAlignTo
26848
- }), /*#__PURE__*/React.createElement(ListBoxSearch, {
27111
+ }), /*#__PURE__*/React.createElement(Grid$1, {
27112
+ item: true,
27113
+ ref: searchContainerRef
27114
+ }, /*#__PURE__*/React.createElement(ListBoxSearch, {
26849
27115
  visible: true,
26850
27116
  model: model,
26851
27117
  listCount: listCount,
@@ -26855,13 +27121,15 @@
26855
27121
  enabled: false
26856
27122
  },
26857
27123
  autoFocus: autoFocus !== null && autoFocus !== void 0 ? autoFocus : true
26858
- }), /*#__PURE__*/React.createElement(ListBox, {
27124
+ })), /*#__PURE__*/React.createElement(ListBox, {
26859
27125
  model: model,
27126
+ app: app,
26860
27127
  layout: layout,
26861
27128
  selections: selections,
26862
27129
  selectionState: selectionState$1,
26863
27130
  direction: "ltr",
26864
- onSetListCount: c => setListCount(c)
27131
+ onSetListCount: c => setListCount(c),
27132
+ onCtrlF: onCtrlF
26865
27133
  }))));
26866
27134
  }
26867
27135
 
@@ -28130,20 +28398,21 @@
28130
28398
  var DrillDownIcon = (props => SvgIcon(drillDown(props)));
28131
28399
 
28132
28400
  const addListboxTheme = themeApi => {
28133
- const getListboxStyle = prop => themeApi.getStyle('object', '', "listBox.".concat(prop));
28401
+ const getListboxStyle = (path, prop) => themeApi.getStyle('object.listBox', path, prop);
28134
28402
  return {
28135
- backgroundColor: getListboxStyle('backgroundColor'),
28403
+ backgroundColor: getListboxStyle('', 'backgroundColor'),
28136
28404
  title: {
28137
28405
  main: {
28138
- color: getListboxStyle('title.main.color'),
28139
- fontSize: getListboxStyle('title.main.fontSize'),
28140
- fontFamily: getListboxStyle('title.main.fontFamily')
28406
+ color: getListboxStyle('title.main', 'color'),
28407
+ fontSize: getListboxStyle('title.main', 'fontSize'),
28408
+ fontFamily: getListboxStyle('title.main', 'fontFamily'),
28409
+ fontWeight: getListboxStyle('title.main', 'fontWeight')
28141
28410
  }
28142
28411
  },
28143
28412
  content: {
28144
- color: getListboxStyle('content.color'),
28145
- fontSize: getListboxStyle('content.fontSize'),
28146
- fontFamily: getListboxStyle('content.fontFamily')
28413
+ color: getListboxStyle('content', 'color'),
28414
+ fontSize: getListboxStyle('content', 'fontSize'),
28415
+ fontFamily: getListboxStyle('content', 'fontFamily')
28147
28416
  }
28148
28417
  };
28149
28418
  };
@@ -28217,7 +28486,7 @@
28217
28486
  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
28487
  ["& .".concat(classes$4.listBoxHeader)]: {
28219
28488
  alignSelf: 'center',
28220
- display: 'inline-flex',
28489
+ display: 'flex',
28221
28490
  width: "calc(100% - ".concat(BUTTON_ICON_WIDTH, "px)")
28222
28491
  },
28223
28492
  ["& .".concat(classes$4.screenReaderOnly)]: {
@@ -28228,18 +28497,25 @@
28228
28497
  },
28229
28498
  ["& .".concat(classes$4.listboxWrapper)]: {
28230
28499
  padding: containerPadding
28500
+ },
28501
+ '&:focus:not(:hover)': {
28502
+ boxShadow: "inset 0 0 0 2px ".concat(theme.palette.custom.focusBorder, " !important")
28503
+ },
28504
+ '&:focus-visible': {
28505
+ outline: 'none'
28231
28506
  }
28232
28507
  };
28233
28508
  });
28234
28509
  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;
28510
+ 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
28511
  let {
28237
28512
  theme
28238
28513
  } = _ref2;
28239
28514
  return {
28240
28515
  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
28516
  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
28517
+ 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,
28518
+ 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
28519
  };
28244
28520
  });
28245
28521
  function ListBoxInline(_ref3) {
@@ -28264,7 +28540,8 @@
28264
28540
  postProcessPages = undefined,
28265
28541
  calculatePagesHeight,
28266
28542
  showGray = true,
28267
- scrollState = undefined
28543
+ scrollState = undefined,
28544
+ renderedCallback
28268
28545
  } = options;
28269
28546
  let {
28270
28547
  toolbar = true
@@ -28379,6 +28656,7 @@
28379
28656
  return null;
28380
28657
  }
28381
28658
  const isLocked = layout.qListObject.qDimensionInfo.qLocked === true;
28659
+ const isRtl = direction === 'rtl';
28382
28660
  const isDrillDown = layout.qListObject.qDimensionInfo.qGrouping === 'H';
28383
28661
  const listboxSelectionToolbarItems = createListboxSelectionToolbar({
28384
28662
  layout,
@@ -28386,24 +28664,31 @@
28386
28664
  translator,
28387
28665
  selectionState: selectionState$1
28388
28666
  });
28389
- const showSearchToggle = search === 'toggle' && showSearch;
28390
- const searchVisible = (search === true || showSearchToggle) && !selectDisabled();
28391
28667
  const {
28668
+ wildCardSearch,
28669
+ searchEnabled,
28392
28670
  layoutOptions = {}
28393
28671
  } = layout;
28672
+ const showSearchToggle = search === 'toggle' && showSearch;
28673
+ const searchVisible = (search === true || showSearchToggle) && !selectDisabled() && searchEnabled !== false;
28394
28674
  const dense = (_layoutOptions$dense = layoutOptions.dense) !== null && _layoutOptions$dense !== void 0 ? _layoutOptions$dense : false;
28395
28675
  const searchHeight = dense ? 27 : 40;
28396
28676
  const extraheight = dense ? 39 : 49;
28397
- const minHeight = 49 + (searchVisible ? searchHeight : 0) + extraheight;
28677
+ const searchAddHeight = searchVisible ? searchHeight : 0;
28678
+ const minHeight = toolbar ? 49 + searchAddHeight + extraheight : 0;
28398
28679
  const headerHeight = 32;
28399
- const {
28400
- wildCardSearch,
28401
- searchEnabled
28402
- } = layout;
28403
28680
  const onShowSearch = () => {
28404
28681
  const newValue = !showSearch;
28405
28682
  setShowSearch(newValue);
28406
28683
  };
28684
+ const onCtrlF = () => {
28685
+ if (search === 'toggle') {
28686
+ onShowSearch();
28687
+ } else {
28688
+ const input = searchContainer.current.querySelector('input');
28689
+ input === null || input === void 0 ? void 0 : input.focus();
28690
+ }
28691
+ };
28407
28692
  const getActionToolbarProps = isPopover => getListboxActionProps({
28408
28693
  isPopover,
28409
28694
  showToolbar,
@@ -28418,6 +28703,7 @@
28418
28703
  const showIcons = showSearchOrLockIcon || isDrillDown;
28419
28704
  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
28705
  const headerPaddingLeft = CELL_PADDING_LEFT - (showSearchOrLockIcon ? ICON_PADDING : 0);
28706
+ const headerPaddingRight = isRtl ? CELL_PADDING_LEFT - (showIcons ? ICON_PADDING : 0) : 0;
28421
28707
 
28422
28708
  // Add a container padding for grid mode to harmonize with the grid item margins (should sum to 8px).
28423
28709
  const isGridMode = (layoutOptions === null || layoutOptions === void 0 ? void 0 : layoutOptions.dataLayout) === 'grid';
@@ -28425,7 +28711,9 @@
28425
28711
  if (isGridMode) {
28426
28712
  containerPadding = layoutOptions.layoutOrder === 'row' ? '2px 4px' : '2px 6px 2px 4px';
28427
28713
  }
28428
- return /*#__PURE__*/React.createElement(React.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React.createElement(ActionsToolbar, getActionToolbarProps(true)), /*#__PURE__*/React.createElement(StyledGrid$3, {
28714
+ return /*#__PURE__*/React.createElement(React.Fragment, null, toolbarDetachedOnly && /*#__PURE__*/React.createElement(ActionsToolbar, _extends$8({
28715
+ direction: direction
28716
+ }, getActionToolbarProps(true))), /*#__PURE__*/React.createElement(StyledGrid$3, {
28429
28717
  className: "listbox-container",
28430
28718
  container: true,
28431
28719
  tabIndex: keyboard.enabled && !keyboard.active ? 0 : -1,
@@ -28446,13 +28734,20 @@
28446
28734
  container: true,
28447
28735
  style: {
28448
28736
  padding: theme.spacing(1),
28449
- paddingLeft: "".concat(headerPaddingLeft, "px")
28737
+ paddingLeft: "".concat(headerPaddingLeft, "px"),
28738
+ paddingRight: "".concat(headerPaddingRight, "px")
28739
+ },
28740
+ sx: {
28741
+ flexDirection: isRtl ? 'row-reverse' : 'row'
28450
28742
  },
28451
28743
  wrap: "nowrap"
28452
28744
  }, /*#__PURE__*/React.createElement(Grid$1, {
28453
28745
  item: true,
28454
28746
  container: true,
28455
28747
  height: headerHeight,
28748
+ sx: {
28749
+ flexDirection: isRtl ? 'row-reverse' : 'row'
28750
+ },
28456
28751
  wrap: "nowrap"
28457
28752
  }, showIcons && /*#__PURE__*/React.createElement(Grid$1, {
28458
28753
  item: true,
@@ -28462,12 +28757,12 @@
28462
28757
  width: iconsWidth
28463
28758
  }
28464
28759
  }, isLocked ? /*#__PURE__*/React.createElement(IconButton$1, {
28760
+ title: translator.get('SelectionToolbar.ClickToUnlock'),
28465
28761
  tabIndex: -1,
28466
28762
  onClick: unlock,
28467
28763
  disabled: selectDisabled(),
28468
28764
  size: "large"
28469
28765
  }, /*#__PURE__*/React.createElement(Lock, {
28470
- title: translator.get('Listbox.Unlock'),
28471
28766
  disableRipple: true,
28472
28767
  style: {
28473
28768
  fontSize: '12px'
@@ -28492,6 +28787,9 @@
28492
28787
  }
28493
28788
  })), /*#__PURE__*/React.createElement(Grid$1, {
28494
28789
  item: true,
28790
+ sx: {
28791
+ justifyContent: isRtl ? 'flex-end' : 'flex-start'
28792
+ },
28495
28793
  className: classes$4.listBoxHeader
28496
28794
  }, /*#__PURE__*/React.createElement(Title, {
28497
28795
  variant: "h6",
@@ -28503,17 +28801,19 @@
28503
28801
  xs: true
28504
28802
  }), /*#__PURE__*/React.createElement(Grid$1, {
28505
28803
  item: true
28506
- }, /*#__PURE__*/React.createElement(ActionsToolbar, getActionToolbarProps(showToolbarDetached({
28804
+ }, /*#__PURE__*/React.createElement(ActionsToolbar, _extends$8({
28805
+ direction: direction
28806
+ }, getActionToolbarProps(showToolbarDetached({
28507
28807
  containerRef,
28508
28808
  titleRef,
28509
28809
  iconsWidth
28510
- }))))), /*#__PURE__*/React.createElement(Grid$1, {
28810
+ })))))), /*#__PURE__*/React.createElement(Grid$1, {
28511
28811
  item: true,
28512
28812
  container: true,
28513
28813
  direction: "column",
28514
28814
  style: {
28515
28815
  height: '100%',
28516
- minHeight: "".concat(minHeight, "px")
28816
+ minHeight: '50px'
28517
28817
  },
28518
28818
  role: "region",
28519
28819
  "aria-label": translator.get('Listbox.ResultFilterLabel')
@@ -28531,9 +28831,10 @@
28531
28831
  visible: searchVisible,
28532
28832
  search: search,
28533
28833
  autoFocus: shouldAutoFocus,
28534
- searchContainerRef: searchContainerRef,
28535
28834
  wildCardSearch: wildCardSearch,
28536
- searchEnabled: searchEnabled
28835
+ searchEnabled: searchEnabled,
28836
+ direction: direction,
28837
+ hide: showSearchIcon && onShowSearch
28537
28838
  })), /*#__PURE__*/React.createElement(Grid$1, {
28538
28839
  item: true,
28539
28840
  xs: true,
@@ -28547,6 +28848,7 @@
28547
28848
  } = _ref4;
28548
28849
  return /*#__PURE__*/React.createElement(ListBox, {
28549
28850
  model: model,
28851
+ app: app,
28550
28852
  constraints: constraints,
28551
28853
  layout: layout,
28552
28854
  selections: selections,
@@ -28576,7 +28878,9 @@
28576
28878
  currentScrollIndex: {
28577
28879
  state: currentScrollIndex,
28578
28880
  set: setCurrentScrollIndex
28579
- }
28881
+ },
28882
+ renderedCallback: renderedCallback,
28883
+ onCtrlF: onCtrlF
28580
28884
  });
28581
28885
  })))));
28582
28886
  }
@@ -28654,7 +28958,13 @@
28654
28958
  const dim = await app.getDimension(fieldIdentifier.qLibraryId);
28655
28959
  const dimLayout = await dim.getLayout();
28656
28960
  setFallbackTitle(dimLayout.qDim.title);
28657
- setFieldDef(dimLayout.qDim.qFieldDefs ? dimLayout.qDim.qFieldDefs[0] : '');
28961
+ if (dimLayout.qDim.qGrouping === 'N') {
28962
+ setFieldDef(dimLayout.qDim.qFieldDefs ? dimLayout.qDim.qFieldDefs[0] : '');
28963
+ } else {
28964
+ setFieldDef({
28965
+ multiFieldDim: true
28966
+ });
28967
+ }
28658
28968
  setIsFetching(false);
28659
28969
  } catch (e) {
28660
28970
  setIsFetching(false);
@@ -28764,11 +29074,16 @@
28764
29074
  listdef.qListObjectDef.qDef.qFieldDefs = [fieldIdentifier];
28765
29075
  fieldName = fieldIdentifier;
28766
29076
  }
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
- };
29077
+ if (frequencyMode !== 'P' && histogram) {
29078
+ if (fieldDef !== null && fieldDef !== void 0 && fieldDef.multiFieldDim) {
29079
+ listdef.frequencyMax = 'fetch';
29080
+ // maybe for all lib dimension to handle if it properties change
29081
+ } else {
29082
+ const field = fieldIdentifier.qLibraryId ? fieldDef : fieldName;
29083
+ listdef.frequencyMax = {
29084
+ qValueExpression: getFrequencyMaxExpression(field)
29085
+ };
29086
+ }
28772
29087
  }
28773
29088
  const [sessionModel] = useSessionModel(listdef, isFetching ? null : app, fieldName, stateName);
28774
29089
  reactExports.useEffect(() => {
@@ -28845,7 +29160,8 @@
28845
29160
  qId,
28846
29161
  stateName,
28847
29162
  element,
28848
- options
29163
+ options,
29164
+ renderedCallback
28849
29165
  } = _ref;
28850
29166
  const {
28851
29167
  isExistingObject,
@@ -28876,7 +29192,8 @@
28876
29192
  const opts = reactExports.useMemo(() => _objectSpread2(_objectSpread2({}, options), {}, {
28877
29193
  selections,
28878
29194
  model,
28879
- app
29195
+ app,
29196
+ renderedCallback
28880
29197
  }), [options, selections, model, app]);
28881
29198
  if (!selections || !model) {
28882
29199
  return null;
@@ -28892,7 +29209,8 @@
28892
29209
  fieldIdentifier,
28893
29210
  qId,
28894
29211
  stateName = '$',
28895
- options = {}
29212
+ options = {},
29213
+ renderedCallback
28896
29214
  } = _ref2;
28897
29215
  return ReactDOM.createPortal( /*#__PURE__*/React.createElement(ListBoxWrapper, {
28898
29216
  app: app,
@@ -28900,7 +29218,8 @@
28900
29218
  fieldIdentifier: fieldIdentifier,
28901
29219
  qId: qId,
28902
29220
  stateName: stateName,
28903
- options: options
29221
+ options: options,
29222
+ renderedCallback: renderedCallback
28904
29223
  }), element, uid());
28905
29224
  }
28906
29225
 
@@ -36119,6 +36438,7 @@
36119
36438
  const mergeConfigs = (base, c) => ({
36120
36439
  context: mergeObj(base.context, c.context),
36121
36440
  load: c.load || base.load,
36441
+ loadTheme: c.loadTheme || base.loadTheme,
36122
36442
  snapshot: _objectSpread2({}, c.snapshot || base.snapshot),
36123
36443
  types: mergeArray(base.types, c.types),
36124
36444
  themes: mergeArray(base.themes, c.themes),
@@ -36165,6 +36485,7 @@
36165
36485
  });
36166
36486
  const appTheme$1 = appTheme({
36167
36487
  themes: configuration.themes,
36488
+ loadTheme: configuration.loadTheme,
36168
36489
  root
36169
36490
  });
36170
36491
  currentContext.themeApi = appTheme$1.externalAPI;
@@ -36423,13 +36744,14 @@
36423
36744
  * @param {boolean=} [options.dense=false] Reduces padding and text size (not applicable for existing objects)
36424
36745
  * @param {string=} [options.stateName="$"] Sets the state to make selections in (not applicable for existing objects)
36425
36746
  * @param {object=} [options.properties={}] Properties object to extend default properties with
36747
+ * @returns {Promise<void>} A promise that resolves when the data is fetched.
36426
36748
  *
36427
36749
  * @since 1.1.0
36428
36750
  * @instance
36429
36751
  * @example
36430
36752
  * fieldInstance.mount(element);
36431
36753
  */
36432
- mount(element) {
36754
+ async mount(element) {
36433
36755
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
36434
36756
  if (!element) {
36435
36757
  throw new Error("Element for ".concat(fieldName || qId, " not provided"));
@@ -36439,18 +36761,21 @@
36439
36761
  }
36440
36762
  const onSelectionActivated = () => fieldSels.emit('selectionActivated');
36441
36763
  const onSelectionDeactivated = () => fieldSels.emit('selectionDeactivated');
36442
- this._instance = ListBoxPortal({
36443
- element,
36444
- app,
36445
- fieldIdentifier,
36446
- qId,
36447
- options: getOptions$1(_objectSpread2({
36448
- onSelectionActivated,
36449
- onSelectionDeactivated
36450
- }, options)),
36451
- stateName: options.stateName || '$'
36764
+ return new Promise(resolve => {
36765
+ this._instance = ListBoxPortal({
36766
+ element,
36767
+ app,
36768
+ fieldIdentifier,
36769
+ qId,
36770
+ options: getOptions$1(_objectSpread2({
36771
+ onSelectionActivated,
36772
+ onSelectionDeactivated
36773
+ }, options)),
36774
+ stateName: options.stateName || '$',
36775
+ renderedCallback: resolve
36776
+ });
36777
+ root.add(this._instance);
36452
36778
  });
36453
- root.add(this._instance);
36454
36779
  },
36455
36780
  /**
36456
36781
  * Unmounts the field listbox from the DOM.