survey-js-ui 3.2.0 → 3.2.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
- * surveyjs - Survey JavaScript library v3.2.0
2
+ * surveyjs - Survey JavaScript library v3.2.2
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -644,7 +644,7 @@ class SurveyActionBarItem extends SurveyElementBase {
644
644
  const className = this.item.getActionBarItemCss();
645
645
  const buttonContent = this.renderButtonContent();
646
646
  const tabIndex = this.item.disableTabStop ? -1 : undefined;
647
- const button = attachKey2click(_$1("button", { ref: this.ref, className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: this.item.getTooltip(), tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-controls": this.item.ariaControls, "aria-labelledby": this.item.ariaLabelledBy, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
647
+ const button = attachKey2click(_$1("button", { ref: this.ref, className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: this.item.getTooltip(), tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-controls": this.item.ariaControls, "aria-labelledby": this.item.ariaLabelledBy, "aria-label": this.item.ariaLabel, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
648
648
  return button;
649
649
  }
650
650
  componentDidMount() {
@@ -1115,6 +1115,9 @@ class PopupDropdownContainer extends PopupContainer {
1115
1115
  const popupDropdownModel = popupModel;
1116
1116
  if (!popupDropdownModel || !popupDropdownModel.showHeader)
1117
1117
  return null;
1118
+ // An overlay's header is its close button, not the pointer.
1119
+ if (popupDropdownModel.isOverlay)
1120
+ return super.renderHeaderPopup(popupModel);
1118
1121
  return (_$1("span", { style: {
1119
1122
  left: popupDropdownModel.pointerTarget.left,
1120
1123
  top: popupDropdownModel.pointerTarget.top,
@@ -1223,9 +1226,17 @@ function requireIconsV2 () {
1223
1226
 
1224
1227
  var check_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19.5275 7.5275L9.5275 17.5275C9.3775 17.6775 9.1875 17.7475 8.9975 17.7475C8.8075 17.7475 8.6175 17.6775 8.4675 17.5275L4.4675 13.5275C4.1775 13.2375 4.1775 12.7575 4.4675 12.4675C4.7575 12.1775 5.2375 12.1775 5.5275 12.4675L8.9975 15.9375L18.4675 6.4675C18.7575 6.1775 19.2375 6.1775 19.5275 6.4675C19.8175 6.7575 19.8175 7.2375 19.5275 7.5275Z\"/></svg>";
1225
1228
 
1229
+ var chevrondoubleleft_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.96875 3.46909C7.25875 3.17909 7.73832 3.17909 8.02832 3.46909C8.31832 3.75909 8.31832 4.23866 8.02832 4.52866L4.55859 7.99838L8.02832 11.4691C8.31832 11.7591 8.31832 12.2387 8.02832 12.5287C7.7383 12.8185 7.25869 12.8186 6.96875 12.5287L2.96875 8.52866C2.81875 8.37866 2.74902 8.18838 2.74902 7.99838C2.7491 7.80856 2.81896 7.61898 2.96875 7.46909L6.96875 3.46909Z\"/><path d=\"M10.9688 3.46909C11.2587 3.17909 11.7383 3.17909 12.0283 3.46909C12.3183 3.75909 12.3183 4.23866 12.0283 4.52866L8.55859 7.99838L12.0283 11.4691C12.3183 11.7591 12.3183 12.2387 12.0283 12.5287C11.7383 12.8185 11.2587 12.8186 10.9688 12.5287L6.96875 8.52866C6.81875 8.37866 6.74902 8.18838 6.74902 7.99838C6.7491 7.80856 6.81896 7.61898 6.96875 7.46909L10.9688 3.46909Z\"/></svg>";
1230
+
1231
+ var chevrondoubleright_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.96642 3.46903C4.25642 3.17903 4.73599 3.17903 5.02599 3.46903L9.02599 7.46903C9.17588 7.61892 9.2466 7.80846 9.2467 7.99832C9.2467 8.18832 9.17599 8.3786 9.02599 8.5286L5.02599 12.5286C4.73599 12.8185 4.2564 12.8186 3.96642 12.5286C3.67645 12.2386 3.6765 11.759 3.96642 11.469L7.43615 7.99832L3.96642 4.5286C3.67645 4.23862 3.6765 3.75903 3.96642 3.46903Z\"/><path d=\"M7.96642 3.46903C8.25642 3.17903 8.73599 3.17903 9.02599 3.46903L13.026 7.46903C13.1759 7.61892 13.2466 7.80846 13.2467 7.99832C13.2467 8.18832 13.176 8.3786 13.026 8.5286L9.02599 12.5286C8.73599 12.8185 8.2564 12.8186 7.96642 12.5286C7.67645 12.2386 7.6765 11.759 7.96642 11.469L11.4361 7.99832L7.96642 4.5286C7.67645 4.23862 7.6765 3.75903 7.96642 3.46903Z\"/></svg>";
1232
+
1233
+ var chevrondown_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.5275 7.5275L8.5275 10.5275C8.3775 10.6775 8.1875 10.7475 7.9975 10.7475C7.8075 10.7475 7.6175 10.6775 7.4675 10.5275L4.4675 7.5275C4.1775 7.2375 4.1775 6.7575 4.4675 6.4675C4.7575 6.1775 5.2375 6.1775 5.5275 6.4675L7.9975 8.9375L10.4675 6.4675C10.7575 6.1775 11.2375 6.1775 11.5275 6.4675C11.8175 6.7575 11.8175 7.2375 11.5275 7.5275Z\"/></svg>";
1234
+
1226
1235
  var chevrondown_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M16.5275 10.5275L12.5275 14.5275C12.3775 14.6775 12.1875 14.7475 11.9975 14.7475C11.8075 14.7475 11.6175 14.6775 11.4675 14.5275L7.4675 10.5275C7.1775 10.2375 7.1775 9.7575 7.4675 9.4675C7.7575 9.1775 8.2375 9.1775 8.5275 9.4675L11.9975 12.9375L15.4675 9.4675C15.7575 9.1775 16.2375 9.1775 16.5275 9.4675C16.8175 9.7575 16.8175 10.2375 16.5275 10.5275Z\"/></svg>";
1227
1236
 
1228
- var chevronright_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.35 8.34627L7.35 12.3463C7.25 12.4463 7.12 12.4963 7 12.4963C6.88 12.4963 6.74 12.4463 6.65 12.3463C6.45 12.1463 6.45 11.8363 6.65 11.6363L10.3 7.98627L6.65 4.34627C6.45 4.15627 6.45 3.83627 6.65 3.64627C6.85 3.45627 7.16 3.44627 7.35 3.64627L11.35 7.64627C11.55 7.84627 11.55 8.15627 11.35 8.35627V8.34627Z\"/></svg>";
1237
+ var chevronleft_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.7687 12.5287L4.7687 8.52872C4.6187 8.37872 4.5487 8.18872 4.5487 7.99872C4.5487 7.80872 4.6187 7.61872 4.7687 7.46872L8.7687 3.46872C9.0587 3.17872 9.5387 3.17872 9.8287 3.46872C10.1187 3.75872 10.1187 4.23872 9.8287 4.52872L6.3587 7.99872L9.8287 11.4687C10.1187 11.7587 10.1187 12.2387 9.8287 12.5287C9.5387 12.8187 9.0587 12.8187 8.7687 12.5287Z\"/></svg>";
1238
+
1239
+ var chevronright_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7.22629 3.46872L11.2263 7.46872C11.3763 7.61872 11.4463 7.80872 11.4463 7.99872C11.4463 8.18872 11.3763 8.37872 11.2263 8.52872L7.22629 12.5287C6.93629 12.8187 6.45629 12.8187 6.16629 12.5287C5.87629 12.2387 5.87629 11.7587 6.16629 11.4687L9.63629 7.99872L6.16629 4.52872C5.87629 4.23872 5.87629 3.75872 6.16629 3.46872C6.45629 3.17872 6.93629 3.17872 7.22629 3.46872Z\"/></svg>";
1229
1240
 
1230
1241
  var chevronright_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.2263 7.46872L15.2263 11.4687C15.3763 11.6187 15.4463 11.8087 15.4463 11.9987C15.4463 12.1887 15.3763 12.3787 15.2263 12.5287L11.2263 16.5287C10.9363 16.8187 10.4563 16.8187 10.1663 16.5287C9.87629 16.2387 9.87629 15.7587 10.1663 15.4687L13.6363 11.9987L10.1663 8.52872C9.87629 8.23872 9.87629 7.75872 10.1663 7.46872C10.4563 7.17872 10.9363 7.17872 11.2263 7.46872Z\"/></svg>";
1231
1242
 
@@ -1283,6 +1294,10 @@ function requireIconsV2 () {
1283
1294
 
1284
1295
  var ranking_arrows = "<svg viewBox=\"0 0 10 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\"/><path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\"/></svg>";
1285
1296
 
1297
+ var rankingdot_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 10C9.10457 10 10 9.10457 10 8C10 6.89543 9.10457 6 8 6C6.89543 6 6 6.89543 6 8C6 9.10457 6.89543 10 8 10Z\"/></svg>";
1298
+
1299
+ var rankingplus_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 2.25C8.41 2.25 8.75 2.59 8.75 3V7.25H13C13.41 7.25 13.75 7.59 13.75 8C13.75 8.41 13.41 8.75 13 8.75H8.75V13C8.75 13.41 8.41 13.75 8 13.75C7.59 13.75 7.25 13.41 7.25 13V8.75H3C2.59 8.75 2.25 8.41 2.25 8C2.25 7.59 2.59 7.25 3 7.25H7.25V3C7.25 2.59 7.59 2.25 8 2.25Z\"/></svg>";
1300
+
1286
1301
  var rankingundefined_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"/></svg>";
1287
1302
 
1288
1303
  var rating_star_2 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M24 39.5057L11.7226 45.9839C10.4095 46.6739 8.87606 45.5622 9.12525 44.096L11.4734 30.373L1.54411 20.6556C0.480254 19.6207 1.06489 17.8095 2.53128 17.5986L16.2559 15.5957L22.3994 3.10891C23.0512 1.77685 24.9488 1.77685 25.6102 3.10891L31.7441 15.5957L45.4687 17.5986C46.9351 17.8095 47.5197 19.6207 46.4559 20.6556L36.5266 30.373L38.8748 44.096C39.1239 45.5622 37.5905 46.6835 36.2774 45.9839L24 39.5057Z\" fill=\"none\" stroke-width=\"2\"/><path d=\"M24.3981 33.1305L24 32.9206L23.6019 33.1305L15.8715 37.2059L17.3542 28.5663L17.43 28.1246L17.1095 27.8113L10.83 21.6746L19.4965 20.4049L19.9405 20.3399L20.1387 19.9373L24 12.0936L27.8613 19.9373L28.0595 20.3399L28.5035 20.4049L37.17 21.6746L30.8905 27.8113L30.57 28.1246L30.6458 28.5663L32.1285 37.2059L24.3981 33.1305Z\" stroke-width=\"1.70746\"/></svg>";
@@ -1336,7 +1351,11 @@ function requireIconsV2 () {
1336
1351
  "cancel-24x24": cancel_24x24,
1337
1352
  "check-16x16": check_16x16,
1338
1353
  "check-24x24": check_24x24,
1354
+ "chevrondoubleleft-16x16": chevrondoubleleft_16x16,
1355
+ "chevrondoubleright-16x16": chevrondoubleright_16x16,
1356
+ "chevrondown-16x16": chevrondown_16x16,
1339
1357
  "chevrondown-24x24": chevrondown_24x24,
1358
+ "chevronleft-16x16": chevronleft_16x16,
1340
1359
  "chevronright-16x16": chevronright_16x16,
1341
1360
  "chevronright-24x24": chevronright_24x24,
1342
1361
  "clear-16x16": clear_16x16,
@@ -1366,6 +1385,8 @@ function requireIconsV2 () {
1366
1385
  "noimage-48x48": noimage_48x48,
1367
1386
  "radio-16x16": radio_16x16,
1368
1387
  "ranking-arrows": ranking_arrows,
1388
+ "rankingdot-16x16": rankingdot_16x16,
1389
+ "rankingplus-16x16": rankingplus_16x16,
1369
1390
  "rankingundefined-16x16": rankingundefined_16x16,
1370
1391
  "rating-star-2": rating_star_2,
1371
1392
  "rating-star-small-2": rating_star_small_2,
@@ -1483,7 +1504,7 @@ class Survey extends SurveyElementBase {
1483
1504
  this.survey.renderCallback = undefined;
1484
1505
  this.survey.onPartialSend.clear();
1485
1506
  this.survey.stopTimer();
1486
- this.survey.destroyResizeObserver();
1507
+ this.survey.beforeDestroySurveyElement();
1487
1508
  }
1488
1509
  }
1489
1510
  componentWillUnmount() {
@@ -1944,8 +1965,11 @@ class SurveyPanelBase extends SurveyElementBase {
1944
1965
  get css() {
1945
1966
  return this.getCss();
1946
1967
  }
1968
+ getPanelFromProps(props) {
1969
+ return this.props.element || this.props.question;
1970
+ }
1947
1971
  get panelBase() {
1948
- return this.getPanelBase();
1972
+ return this.getPanelFromProps(this.props);
1949
1973
  }
1950
1974
  getPanelBase() {
1951
1975
  return this.props.element || this.props.question;
@@ -1966,6 +1990,9 @@ class SurveyPanelBase extends SurveyElementBase {
1966
1990
  if (!!el) {
1967
1991
  el.removeAttribute("data-rendered");
1968
1992
  }
1993
+ if (this.panelBase) {
1994
+ this.panelBase.beforeDestroy();
1995
+ }
1969
1996
  }
1970
1997
  componentDidUpdate(prevProps, prevState) {
1971
1998
  super.componentDidUpdate(prevProps, prevState);
@@ -1974,6 +2001,10 @@ class SurveyPanelBase extends SurveyElementBase {
1974
2001
  !!this.survey.activePage &&
1975
2002
  prevProps.page.id === this.survey.activePage.id)
1976
2003
  return;
2004
+ const prevPanel = this.getPanelFromProps(prevProps);
2005
+ if (prevPanel) {
2006
+ prevPanel.beforeDestroy();
2007
+ }
1977
2008
  this.doAfterRender();
1978
2009
  }
1979
2010
  doAfterRender() {
@@ -2213,7 +2244,7 @@ class SurveyQuestionSigleInputSummary extends ReactSurveyElement {
2213
2244
  renderNoItems() {
2214
2245
  const q = this.summary.question;
2215
2246
  const placeholder = ReactElementFactory.Instance.createElement("sv-placeholder-" + q.getTemplate(), { cssClasses: this.css, question: q });
2216
- return placeholder || _$1("div", null, this.renderLocString(this.summary.noEntry));
2247
+ return _$1("div", { className: this.css.summaryPlaceholder }, placeholder || _$1("div", null, this.renderLocString(this.summary.noEntry)));
2217
2248
  }
2218
2249
  renderItem(item, index) {
2219
2250
  const btnEdit = item.btnEdit ?
@@ -2589,8 +2620,8 @@ class SurveyPage extends SurveyPanelBase {
2589
2620
  constructor(props) {
2590
2621
  super(props);
2591
2622
  }
2592
- getPanelBase() {
2593
- return this.props.page;
2623
+ getPanelFromProps(props) {
2624
+ return props.page;
2594
2625
  }
2595
2626
  get page() {
2596
2627
  return this.panelBase;
@@ -2643,17 +2674,13 @@ class SurveyPanel extends SurveyPanelBase {
2643
2674
  paddingInlineStart: this.panel.innerPaddingLeft
2644
2675
  ? `calc(${panelPaddingHorizontal} + ${this.panel.innerPaddingLeft})`
2645
2676
  : this.panel.innerPaddingLeft,
2646
- // paddingInlineEnd: this.panel.innerPaddingLeft ? panelPaddingHorizontal : undefined,
2647
- display: this.panel.renderedIsExpanded ? undefined : "none",
2648
2677
  };
2649
- let content = null;
2650
- let bottom = null;
2678
+ const className = this.panelBase.cssClasses.panel.content;
2679
+ let expandableContent = null;
2651
2680
  if (this.panel.renderedIsExpanded) {
2652
- // this.hasBeenExpanded = true;
2653
- const rows = this.renderRows(this.panelBase.cssClasses);
2654
- const className = this.panelBase.cssClasses.panel.content;
2655
- content = this.renderContent(style, rows, className);
2656
- bottom = this.renderBottom();
2681
+ expandableContent = _$1("div", { className: this.panel.cssClasses.panel.expandableContent },
2682
+ this.renderContent(style, this.renderRows(this.panelBase.cssClasses), className),
2683
+ this.renderBottom());
2657
2684
  }
2658
2685
  const focusIn = () => {
2659
2686
  if (this.panelBase)
@@ -2663,8 +2690,7 @@ class SurveyPanel extends SurveyPanelBase {
2663
2690
  this.panel.showErrorsAbovePanel ? errors : null,
2664
2691
  header,
2665
2692
  this.panel.showErrorsAbovePanel ? null : errors,
2666
- content,
2667
- bottom));
2693
+ expandableContent));
2668
2694
  }
2669
2695
  renderHeader() {
2670
2696
  if (!this.panel.hasTitle && !this.panel.hasDescription) {
@@ -2701,7 +2727,7 @@ class SurveyPanel extends SurveyPanelBase {
2701
2727
  return _$1(SurveyActionBar, { model: footerToolbar });
2702
2728
  }
2703
2729
  getIsVisible() {
2704
- return this.panelBase.getIsContentVisible();
2730
+ return this.panelBase.renderedIsContentVisible;
2705
2731
  }
2706
2732
  }
2707
2733
  ReactElementFactory.Instance.registerElement("panel", (props) => {
@@ -2840,13 +2866,14 @@ class SurveyQuestionSelectbase extends SurveyQuestionElementBase {
2840
2866
  }
2841
2867
  renderElement() {
2842
2868
  var cssClasses = this.question.cssClasses;
2843
- return (_$1("fieldset", { className: this.question.getSelectBaseRootCss(), ref: (fieldset) => (this.setControl(fieldset)), role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
2869
+ return (_$1("fieldset", { className: this.question.getSelectBaseRootCss(), ref: (fieldset) => (this.setControl(fieldset)), onKeyDown: (event) => this.handleRootKeyDown(event), role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
2844
2870
  this.renderHeader(),
2845
2871
  this.question.hasColumns
2846
2872
  ? this.getColumnedBody(cssClasses)
2847
2873
  : this.getBody(cssClasses),
2848
2874
  this.getFooter()));
2849
2875
  }
2876
+ handleRootKeyDown(_event) { }
2850
2877
  renderHeader() { return null; }
2851
2878
  getFooter() {
2852
2879
  if (this.question.hasFootItems) {
@@ -3012,6 +3039,10 @@ class SurveyQuestionCheckbox extends SurveyQuestionSelectbase {
3012
3039
  get question() {
3013
3040
  return this.questionBase;
3014
3041
  }
3042
+ handleRootKeyDown(event) {
3043
+ var _a, _b;
3044
+ (_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
3045
+ }
3015
3046
  renderHeader() {
3016
3047
  return _$1(k$3, null,
3017
3048
  _$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
@@ -3027,6 +3058,12 @@ class SurveyQuestionCheckbox extends SurveyQuestionSelectbase {
3027
3058
  class SurveyQuestionCheckboxItem extends SurveyQuestionSelectBaseItem {
3028
3059
  constructor(props) {
3029
3060
  super(props);
3061
+ this.handleOnKeyDown = (event) => {
3062
+ this.question.onChoiceKeyDown(event.nativeEvent);
3063
+ };
3064
+ this.handleOnBlur = (event) => {
3065
+ this.question.onChoiceFocusOut(event.nativeEvent);
3066
+ };
3030
3067
  }
3031
3068
  doOnItemChange(event) {
3032
3069
  this.question.clickItemHandler(this.item, event.target.checked);
@@ -3043,9 +3080,11 @@ class SurveyQuestionCheckboxItem extends SurveyQuestionSelectBaseItem {
3043
3080
  const itemClass = this.question.getItemClass(this.item);
3044
3081
  const labelClass = this.question.getLabelClass(this.item);
3045
3082
  const itemLabel = !this.hideCaption ? _$1("span", { className: this.cssClasses.controlLabel, id: this.question.getItemLabelId(this.item), "aria-hidden": this.question.isItemLabelAriaHidden ? "true" : undefined }, this.renderLocString(this.item.locText, this.textStyle)) : null;
3083
+ const shortcutKey = this.question.getChoiceKeyBadge(this.item);
3046
3084
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
3047
3085
  _$1("label", { className: labelClass },
3048
- _$1("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError(), "aria-label": this.ariaLabel, "aria-labelledby": !this.ariaLabel && !this.hideCaption ? this.question.getItemLabelId(this.item) : undefined }),
3086
+ shortcutKey ? _$1("span", { className: this.question.getItemShortcutKeyClass(this.item), "aria-hidden": "true" }, shortcutKey) : null,
3087
+ _$1("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, onBlur: this.handleOnBlur, required: this.question.hasRequiredError(), "aria-label": this.ariaLabel, "aria-labelledby": !this.ariaLabel && !this.hideCaption ? this.question.getItemLabelId(this.item) : undefined, "aria-keyshortcuts": this.question.getItemAriaKeyShortcuts(this.item) }),
3049
3088
  this.cssClasses.materialDecorator ?
3050
3089
  _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
3051
3090
  _$1("svg", { className: this.cssClasses.itemDecorator },
@@ -3160,7 +3199,7 @@ class SurveyQuestionRankingItem extends ReactSurveyElement {
3160
3199
  }
3161
3200
  renderEmptyIcon() {
3162
3201
  return (_$1("svg", null,
3163
- _$1("use", { xlinkHref: this.question.dashSvgIcon })));
3202
+ _$1("use", { xlinkHref: this.question.emptyIndexSvgIcon })));
3164
3203
  }
3165
3204
  renderElement() {
3166
3205
  let itemContent = ReactElementFactory.Instance.createElement(this.question.itemComponent, { item: this.item, cssClasses: this.cssClasses });
@@ -3281,8 +3320,12 @@ ReactElementFactory.Instance.registerElement("sv-rating-dropdown-item", (props)
3281
3320
  });
3282
3321
 
3283
3322
  class TagboxFilterString extends SurveyElementBase {
3323
+ // Creates the model: used by the event handlers only.
3284
3324
  get model() {
3285
- return this.props.model;
3325
+ return this.props.model || this.question.dropdownListModel;
3326
+ }
3327
+ get renderState() {
3328
+ return this.props.model || this.question.dropdownRenderState;
3286
3329
  }
3287
3330
  get question() {
3288
3331
  return this.props.question;
@@ -3298,9 +3341,9 @@ class TagboxFilterString extends SurveyElementBase {
3298
3341
  updateDomElement() {
3299
3342
  if (!!this.inputElement) {
3300
3343
  const control = this.inputElement;
3301
- const newValue = this.model.inputStringRendered;
3344
+ const newValue = this.renderState.inputStringRendered;
3302
3345
  if (!Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
3303
- control.value = this.model.inputStringRendered;
3346
+ control.value = this.renderState.inputStringRendered;
3304
3347
  }
3305
3348
  }
3306
3349
  }
@@ -3324,19 +3367,19 @@ class TagboxFilterString extends SurveyElementBase {
3324
3367
  super(props);
3325
3368
  }
3326
3369
  getStateElement() {
3327
- return this.model;
3370
+ return this.props.model || this.question.dropdownListModelValue;
3328
3371
  }
3329
3372
  render() {
3330
3373
  return (_$1("div", { className: this.question.cssClasses.hint },
3331
- this.model.showHintPrefix ?
3374
+ this.renderState.showHintPrefix ?
3332
3375
  (_$1("div", { className: this.question.cssClasses.hintPrefix },
3333
- _$1("span", null, this.model.hintStringPrefix))) : null,
3376
+ _$1("span", null, this.renderState.hintStringPrefix))) : null,
3334
3377
  _$1("div", { className: this.question.cssClasses.hintSuffixWrapper },
3335
- this.model.showHintString ?
3378
+ this.renderState.showHintString ?
3336
3379
  (_$1("div", { className: this.question.cssClasses.hintSuffix },
3337
- _$1("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
3338
- _$1("span", null, this.model.hintStringSuffix))) : null,
3339
- _$1("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: (element) => (this.inputElement = element), className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: this.model.filterReadOnly ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.ariaInputRole, "aria-required": this.model.ariaInputRequired, "aria-invalid": this.model.ariaInputInvalid, "aria-errormessage": this.model.ariaInputErrorMessage, "aria-expanded": this.model.ariaInputExpanded, "aria-label": this.model.ariaInputLabel, "aria-labelledby": this.model.ariaInputLabelledby, "aria-describedby": this.model.ariaInputDescribedby, "aria-controls": this.model.ariaInputControls, "aria-activedescendant": this.model.ariaInputActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: (e) => { this.keyhandler(e); }, onChange: (e) => { this.onChange(e); }, onBlur: (e) => { this.onBlur(e); }, onFocus: (e) => { this.onFocus(e); } }))));
3380
+ _$1("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.renderState.inputStringRendered),
3381
+ _$1("span", null, this.renderState.hintStringSuffix))) : null,
3382
+ _$1("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.renderState.inputMode, ref: (element) => (this.inputElement = element), className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: this.renderState.filterReadOnly ? true : undefined, size: !this.renderState.inputStringRendered ? 1 : undefined, role: this.renderState.ariaInputRole, "aria-required": this.renderState.ariaInputRequired, "aria-invalid": this.renderState.ariaInputInvalid, "aria-errormessage": this.renderState.ariaInputErrorMessage, "aria-expanded": this.renderState.ariaInputExpanded, "aria-label": this.renderState.ariaInputLabel, "aria-labelledby": this.renderState.ariaInputLabelledby, "aria-describedby": this.renderState.ariaInputDescribedby, "aria-controls": this.renderState.ariaInputControls, "aria-activedescendant": this.renderState.ariaInputActivedescendant, placeholder: this.renderState.filterStringPlaceholder, onKeyDown: (e) => { this.keyhandler(e); }, onChange: (e) => { this.onChange(e); }, onBlur: (e) => { this.onBlur(e); }, onFocus: (e) => { this.onFocus(e); } }))));
3340
3383
  }
3341
3384
  }
3342
3385
  ReactQuestionFactory.Instance.registerQuestion("sv-tagbox-filter", (props) => {
@@ -3415,8 +3458,18 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3415
3458
  get dropdownListModel() {
3416
3459
  return this.question["dropdownListModel"];
3417
3460
  }
3418
- getStateElement() {
3419
- return this.question["dropdownListModel"];
3461
+ // Everything the closed control renders. It does not create DropdownListModel; a question without it (a custom type)
3462
+ // falls back to the model.
3463
+ get renderState() {
3464
+ return this.question["dropdownRenderState"] || this.question["dropdownListModel"];
3465
+ }
3466
+ // The model is created on the first interaction or when the popup is rendered; componentDidUpdate subscribes to it then.
3467
+ getStateElements() {
3468
+ const res = [this.question];
3469
+ const model = this.question["dropdownListModelValue"];
3470
+ if (!!model)
3471
+ res.push(model);
3472
+ return res;
3420
3473
  }
3421
3474
  setValueCore(newValue) {
3422
3475
  this.questionBase.renderedValue = newValue;
@@ -3435,25 +3488,24 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3435
3488
  }
3436
3489
  renderSelect(cssClasses) {
3437
3490
  let selectElement = null;
3438
- const dropdownListModel = this.dropdownListModel;
3491
+ const renderState = this.renderState;
3439
3492
  if (this.question.isReadOnly) {
3440
3493
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3441
3494
  // @ts-ignore
3442
- selectElement = _$1("div", { id: this.question.inputId, role: dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionRole, "aria-label": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel === null || dropdownListModel === void 0 ? void 0 : dropdownListModel.ariaQuestionDescribedby, "aria-expanded": "false", "aria-readonly": "true", "aria-disabled": "true", tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) },
3495
+ selectElement = _$1("div", { id: this.question.inputId, role: renderState === null || renderState === void 0 ? void 0 : renderState.ariaQuestionRole, "aria-label": renderState === null || renderState === void 0 ? void 0 : renderState.ariaQuestionLabel, "aria-labelledby": renderState === null || renderState === void 0 ? void 0 : renderState.ariaQuestionLabelledby, "aria-describedby": renderState === null || renderState === void 0 ? void 0 : renderState.ariaQuestionDescribedby, "aria-expanded": "false", "aria-readonly": "true", "aria-disabled": "true", tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass(), ref: (div) => (this.setControl(div)) },
3443
3496
  this.renderReadOnlyElement(),
3444
3497
  this.renderEditorButtons());
3445
3498
  }
3446
3499
  else {
3447
3500
  selectElement = _$1(k$3, null,
3448
3501
  this.renderInput(),
3449
- this.question.isInputReadOnly ? null : _$1(Popup, { model: dropdownListModel.popupModel }));
3502
+ this.question.isInputReadOnly ? null : _$1(Popup, { model: this.dropdownListModel.popupModel }));
3450
3503
  }
3451
3504
  return (_$1("div", { className: cssClasses.selectWrapper, onClick: this.click }, selectElement));
3452
3505
  }
3453
3506
  renderValueElement() {
3454
3507
  if (this.question.showInputFieldComponent) {
3455
- const listModel = this.dropdownListModel;
3456
- const actionItem = !!listModel ? listModel.getSelectedAction() : this.question.selectedItem;
3508
+ const actionItem = this.renderState.getSelectedAction();
3457
3509
  return ReactElementFactory.Instance.createElement(this.question.inputFieldComponentName, { item: actionItem, question: this.question });
3458
3510
  }
3459
3511
  else if (this.question.showSelectedItemLocText) {
@@ -3462,36 +3514,36 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3462
3514
  return null;
3463
3515
  }
3464
3516
  renderInput() {
3465
- const dropdownListModel = this.dropdownListModel;
3517
+ const renderState = this.renderState;
3466
3518
  let valueElement = this.renderValueElement();
3467
- return (_$1("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
3519
+ return (_$1("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: renderState.noTabIndex ? undefined : 0,
3468
3520
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3469
3521
  // @ts-ignore
3470
- disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, onFocus: this.focus, role: dropdownListModel.ariaQuestionRole, "aria-required": dropdownListModel.ariaQuestionRequired, "aria-invalid": dropdownListModel.ariaQuestionInvalid, "aria-errormessage": dropdownListModel.ariaQuestionErrorMessage, "aria-expanded": dropdownListModel.ariaQuestionExpanded, "aria-label": dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel.ariaQuestionDescribedby, "aria-controls": dropdownListModel.ariaQuestionControls, "aria-activedescendant": dropdownListModel.ariaQuestionActivedescendant, ref: (div) => (this.setControl(div)) },
3522
+ disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, onFocus: this.focus, role: renderState.ariaQuestionRole, "aria-required": renderState.ariaQuestionRequired, "aria-invalid": renderState.ariaQuestionInvalid, "aria-errormessage": renderState.ariaQuestionErrorMessage, "aria-expanded": renderState.ariaQuestionExpanded, "aria-label": renderState.ariaQuestionLabel, "aria-labelledby": renderState.ariaQuestionLabelledby, "aria-describedby": renderState.ariaQuestionDescribedby, "aria-controls": renderState.ariaQuestionControls, "aria-activedescendant": renderState.ariaQuestionActivedescendant, ref: (div) => (this.setControl(div)) },
3471
3523
  _$1("div", { className: this.question.cssClasses.controlValue },
3472
- dropdownListModel.showHintPrefix ?
3524
+ renderState.showHintPrefix ?
3473
3525
  (_$1("div", { className: this.question.cssClasses.hintPrefix },
3474
- _$1("span", null, dropdownListModel.hintStringPrefix))) : null,
3526
+ _$1("span", null, renderState.hintStringPrefix))) : null,
3475
3527
  _$1("div", { className: this.question.cssClasses.inputPrefixWrapper },
3476
- dropdownListModel.showHintString ?
3528
+ renderState.showHintString ?
3477
3529
  (_$1("div", { className: this.question.cssClasses.hintSuffix },
3478
- _$1("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
3479
- _$1("span", null, dropdownListModel.hintStringSuffix))) : null,
3530
+ _$1("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, renderState.inputStringRendered),
3531
+ _$1("span", null, renderState.hintStringSuffix))) : null,
3480
3532
  valueElement,
3481
- dropdownListModel.needRenderInput ? this.renderFilterInput() : null)),
3533
+ renderState.needRenderInput ? this.renderFilterInput() : null)),
3482
3534
  this.renderEditorButtons()));
3483
3535
  }
3484
3536
  renderFilterInput() {
3485
3537
  settings.environment;
3486
- const dropdownListModel = this.dropdownListModel;
3538
+ const renderState = this.renderState;
3487
3539
  const onInputChange = (e) => {
3488
3540
  var _a;
3489
3541
  const activeElement = (_a = e.target.getRootNode()) === null || _a === void 0 ? void 0 : _a.activeElement;
3490
3542
  if (e.target === activeElement) {
3491
- dropdownListModel.inputStringRendered = e.target.value;
3543
+ this.dropdownListModel.inputStringRendered = e.target.value;
3492
3544
  }
3493
3545
  };
3494
- return _$1("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: (element) => (this.inputElement = element), className: this.question.cssClasses.filterStringInput, role: dropdownListModel.ariaInputRole, "aria-required": dropdownListModel.ariaInputRequired, "aria-invalid": dropdownListModel.ariaInputInvalid, "aria-errormessage": dropdownListModel.ariaInputErrorMessage, "aria-expanded": dropdownListModel.ariaInputExpanded, "aria-label": dropdownListModel.ariaInputLabel, "aria-labelledby": dropdownListModel.ariaInputLabelledby, "aria-describedby": dropdownListModel.ariaInputDescribedby, "aria-controls": dropdownListModel.ariaInputControls, "aria-activedescendant": dropdownListModel.ariaInputActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: (e) => { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus });
3546
+ return _$1("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: (element) => (this.inputElement = element), className: this.question.cssClasses.filterStringInput, role: renderState.ariaInputRole, "aria-required": renderState.ariaInputRequired, "aria-invalid": renderState.ariaInputInvalid, "aria-errormessage": renderState.ariaInputErrorMessage, "aria-expanded": renderState.ariaInputExpanded, "aria-label": renderState.ariaInputLabel, "aria-labelledby": renderState.ariaInputLabelledby, "aria-describedby": renderState.ariaInputDescribedby, "aria-controls": renderState.ariaInputControls, "aria-activedescendant": renderState.ariaInputActivedescendant, placeholder: renderState.placeholderRendered, readOnly: renderState.filterReadOnly ? true : undefined, tabIndex: renderState.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: renderState.inputMode, onChange: (e) => { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus });
3495
3547
  }
3496
3548
  renderOther(item, cssClasses) {
3497
3549
  if (!item || !item.isCommentShowing)
@@ -3500,7 +3552,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3500
3552
  _$1(SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
3501
3553
  }
3502
3554
  renderEditorButtons() {
3503
- return _$1(SurveyActionBar, { model: this.dropdownListModel.editorButtons });
3555
+ return _$1(SurveyActionBar, { model: this.renderState.editorButtons });
3504
3556
  }
3505
3557
  componentDidUpdate(prevProps, prevState) {
3506
3558
  super.componentDidUpdate(prevProps, prevState);
@@ -3512,15 +3564,16 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3512
3564
  }
3513
3565
  componentWillUnmount() {
3514
3566
  super.componentWillUnmount();
3515
- if (this.question.dropdownListModel)
3516
- this.question.dropdownListModel.focused = false;
3567
+ const model = this.question["dropdownListModelValue"];
3568
+ if (model)
3569
+ model.focused = false;
3517
3570
  }
3518
3571
  updateInputDomElement() {
3519
3572
  if (!!this.inputElement) {
3520
3573
  const control = this.inputElement;
3521
- const newValue = this.question.dropdownListModel.inputStringRendered;
3574
+ const newValue = this.renderState.inputStringRendered;
3522
3575
  if (!Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
3523
- control.value = this.question.dropdownListModel.inputStringRendered;
3576
+ control.value = this.renderState.inputStringRendered;
3524
3577
  }
3525
3578
  }
3526
3579
  }
@@ -3581,15 +3634,15 @@ class SurveyQuestionTagbox extends SurveyQuestionDropdownBase {
3581
3634
  return renderedItem;
3582
3635
  }
3583
3636
  renderInput() {
3584
- const dropdownListModel = this.dropdownListModel;
3637
+ const renderState = this.renderState;
3585
3638
  const items = this.question.selectedChoices.map((choice, index) => { return this.renderItem("item" + index, choice); });
3586
- return (_$1("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
3639
+ return (_$1("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: renderState.noTabIndex ? undefined : 0,
3587
3640
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3588
3641
  // @ts-ignore
3589
- disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: dropdownListModel.ariaQuestionRole, "aria-required": dropdownListModel.ariaQuestionRequired, "aria-invalid": dropdownListModel.ariaQuestionInvalid, "aria-errormessage": dropdownListModel.ariaQuestionErrorMessage, "aria-label": dropdownListModel.ariaQuestionLabel, "aria-labelledby": dropdownListModel.ariaQuestionLabelledby, "aria-describedby": dropdownListModel.ariaQuestionDescribedby, "aria-expanded": dropdownListModel.ariaQuestionExpanded, "aria-controls": dropdownListModel.ariaQuestionControls, "aria-activedescendant": dropdownListModel.ariaQuestionActivedescendant, ref: (div) => (this.setControl(div)) },
3642
+ disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: renderState.ariaQuestionRole, "aria-required": renderState.ariaQuestionRequired, "aria-invalid": renderState.ariaQuestionInvalid, "aria-errormessage": renderState.ariaQuestionErrorMessage, "aria-label": renderState.ariaQuestionLabel, "aria-labelledby": renderState.ariaQuestionLabelledby, "aria-describedby": renderState.ariaQuestionDescribedby, "aria-expanded": renderState.ariaQuestionExpanded, "aria-controls": renderState.ariaQuestionControls, "aria-activedescendant": renderState.ariaQuestionActivedescendant, ref: (div) => (this.setControl(div)) },
3590
3643
  _$1("div", { className: this.question.cssClasses.controlValue },
3591
3644
  items,
3592
- dropdownListModel.needRenderInput ? _$1(TagboxFilterString, { model: dropdownListModel, question: this.question }) : null),
3645
+ renderState.needRenderInput ? _$1(TagboxFilterString, { question: this.question }) : null),
3593
3646
  this.renderEditorButtons()));
3594
3647
  }
3595
3648
  renderElement() {
@@ -4121,6 +4174,10 @@ class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
4121
4174
  var _a, _b;
4122
4175
  (_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
4123
4176
  };
4177
+ this.handleOnBlur = (event) => {
4178
+ var _a, _b;
4179
+ (_b = (_a = this.question).onChoiceFocusOut) === null || _b === void 0 ? void 0 : _b.call(_a, event.nativeEvent);
4180
+ };
4124
4181
  this.handleOnMouseDown = this.handleOnMouseDown.bind(this);
4125
4182
  }
4126
4183
  getStateElement() {
@@ -4146,9 +4203,11 @@ class SurveyQuestionRadioItem extends SurveyQuestionSelectBaseItem {
4146
4203
  var labelClass = this.question.getLabelClass(this.item);
4147
4204
  var controlLabelClass = this.question.getControlLabelClass(this.item);
4148
4205
  const itemLabel = !this.hideCaption ? _$1("span", { className: controlLabelClass, id: this.question.getItemLabelId(this.item), "aria-hidden": this.question.isItemLabelAriaHidden ? "true" : undefined }, this.renderLocString(this.item.locText, this.textStyle)) : null;
4206
+ const shortcutKey = this.question.getChoiceKeyBadge(this.item);
4149
4207
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
4150
4208
  _$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
4151
- _$1("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, "aria-label": this.ariaLabel, "aria-labelledby": !this.ariaLabel && !this.hideCaption ? this.question.getItemLabelId(this.item) : undefined }),
4209
+ shortcutKey ? _$1("span", { className: this.question.getItemShortcutKeyClass(this.item), "aria-hidden": "true" }, shortcutKey) : null,
4210
+ _$1("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, onBlur: this.handleOnBlur, "aria-label": this.ariaLabel, "aria-labelledby": !this.ariaLabel && !this.hideCaption ? this.question.getItemLabelId(this.item) : undefined, "aria-keyshortcuts": this.question.getItemAriaKeyShortcuts(this.item) }),
4152
4211
  this.cssClasses.materialDecorator ?
4153
4212
  _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
4154
4213
  _$1("svg", { className: this.cssClasses.itemDecorator },
@@ -4302,7 +4361,7 @@ class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean {
4302
4361
  const itemClass = this.question.getCheckboxItemCss();
4303
4362
  const description = this.question.canRenderLabelDescription ?
4304
4363
  SurveyElementBase.renderQuestionDescription(this.question) : null;
4305
- return (_$1("div", { className: cssClasses.rootCheckbox },
4364
+ return (_$1("div", { className: cssClasses.rootCheckbox, onKeyDown: (event) => { var _a; return this.question.onKeyDown((_a = event.nativeEvent) !== null && _a !== void 0 ? _a : event); } },
4306
4365
  _$1("div", { className: itemClass },
4307
4366
  _$1("label", { className: cssClasses.checkboxLabel },
4308
4367
  _$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
@@ -4615,6 +4674,10 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
4615
4674
  renderElement() {
4616
4675
  return this.renderTableDiv();
4617
4676
  }
4677
+ // The records bar under the table: the pager.
4678
+ renderRecordsBar() {
4679
+ return ReactElementFactory.Instance.createElement("sv-records-bar", { model: this.question.recordsBar });
4680
+ }
4618
4681
  renderTableDiv() {
4619
4682
  return (_$1("div", { className: this.question.getTableWrapperCss(), ref: (root) => (this.setControl(root)) },
4620
4683
  _$1(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
@@ -4779,6 +4842,12 @@ class SurveyQuestionMatrixDropdown extends SurveyQuestionMatrixDropdownBase {
4779
4842
  constructor(props) {
4780
4843
  super(props);
4781
4844
  }
4845
+ // A fragment: a matrix that does not page renders the table alone, as before the pager.
4846
+ renderElement() {
4847
+ return (_$1(k$3, null,
4848
+ this.renderTableDiv(),
4849
+ this.renderRecordsBar()));
4850
+ }
4782
4851
  }
4783
4852
  ReactQuestionFactory.Instance.registerQuestion("matrixdropdown", props => {
4784
4853
  return _$1(SurveyQuestionMatrixDropdown, props);
@@ -4804,7 +4873,17 @@ class SurveyQuestionMatrixDynamic extends SurveyQuestionMatrixDropdownBase {
4804
4873
  return (_$1("div", null,
4805
4874
  this.renderTopToolbar(),
4806
4875
  mainDiv,
4807
- this.renderBottomToolbar()));
4876
+ this.renderRecordsFooter()));
4877
+ }
4878
+ // The footer exists only with the pager: the bottom toolbar and the pager in one row.
4879
+ // Without the pager the bottom toolbar is the next sibling of the table, as without paging.
4880
+ renderRecordsFooter() {
4881
+ const toolbar = this.renderBottomToolbar();
4882
+ if (!this.matrix.showPager)
4883
+ return toolbar;
4884
+ return _$1("div", { className: this.matrix.getFooterCss() },
4885
+ toolbar,
4886
+ this.renderRecordsBar());
4808
4887
  }
4809
4888
  renderToolbar(location) {
4810
4889
  if (!this.matrix.getShowToolbar(location))
@@ -4833,7 +4912,7 @@ class SurveyQuestionMatrixDynamicPlaceholder extends ReactSurveyElement {
4833
4912
  const matrix = this.props.question;
4834
4913
  const text = this.renderLocString(matrix.locNoRowsText);
4835
4914
  const textDiv = _$1("div", { className: cssClasses.noRowsText }, text);
4836
- const toolbar = matrix.getShowToolbar() ? ReactElementFactory.Instance.createElement("sv-action-bar", { model: matrix.toolbar }) : null;
4915
+ const toolbar = matrix.getShowPlaceholderToolbar() ? ReactElementFactory.Instance.createElement("sv-action-bar", { model: matrix.toolbar }) : null;
4837
4916
  return (_$1("div", { className: cssClasses.noRowsSection },
4838
4917
  textDiv,
4839
4918
  toolbar));
@@ -4892,21 +4971,24 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
4892
4971
  _$1("div", { className: this.question.cssClasses.panelsContainer }, panels),
4893
4972
  navigation));
4894
4973
  }
4974
+ // The records bar in the footer: the pager.
4975
+ renderRecordsBar() {
4976
+ return ReactElementFactory.Instance.createElement("sv-records-bar", { model: this.question.recordsBar });
4977
+ }
4895
4978
  renderRange() {
4896
4979
  return (_$1("div", { className: this.question.cssClasses.progress },
4897
4980
  _$1("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar", "aria-label": this.question.progressBarAriaLabel })));
4898
4981
  }
4899
4982
  renderNavigator() {
4900
- if (!this.question.showNavigation)
4901
- return null;
4902
- const range = this.question.isRangeShowing && this.question.isProgressBottomShowing ? this.renderRange() : null;
4903
- if (!range && !this.question.showFooterToolbar)
4983
+ if (!this.question.showFooter)
4904
4984
  return null;
4905
- return (_$1("div", { className: this.question.cssClasses.footer },
4985
+ const range = this.question.showFooterProgress ? this.renderRange() : null;
4986
+ return (_$1("div", { className: this.question.getFooterCss() },
4906
4987
  _$1("hr", { className: this.question.cssClasses.separator }),
4907
4988
  range,
4908
- this.question.showFooterToolbar ? (_$1("div", { className: this.question.cssClasses.footerButtonsContainer },
4909
- _$1(SurveyActionBar, { model: this.question.footerToolbar }))) : null));
4989
+ this.question.showFooterButtons ? (_$1("div", { className: this.question.cssClasses.footerButtonsContainer },
4990
+ _$1(SurveyActionBar, { model: this.question.footerToolbar }))) : null,
4991
+ this.renderRecordsBar()));
4910
4992
  }
4911
4993
  renderPlaceholder(cssClasses) {
4912
4994
  if (this.question.getShowNoEntriesPlaceholder())
@@ -4957,7 +5039,7 @@ class SurveyQuestionPanelDynamicPlaceholder extends ReactSurveyElement {
4957
5039
  const question = this.props.question;
4958
5040
  return (_$1("div", { className: cssClasses.noEntriesPlaceholder },
4959
5041
  _$1("span", null, this.renderLocString(question.locNoEntriesText)),
4960
- _$1(SurveyActionBar, { model: this.props.question.footerToolbar })));
5042
+ question.getShowPlaceholderToolbar() ? _$1(SurveyActionBar, { model: question.footerToolbar }) : null));
4961
5043
  }
4962
5044
  }
4963
5045
  ReactElementFactory.Instance.registerElement("sv-placeholder-paneldynamic", (props) => { return _$1(SurveyQuestionPanelDynamicPlaceholder, props); });
@@ -5507,7 +5589,7 @@ class SurveyQuestionImagePicker extends SurveyQuestionElementBase {
5507
5589
  }
5508
5590
  renderElement() {
5509
5591
  var cssClasses = this.question.cssClasses;
5510
- return (_$1("fieldset", { className: this.question.getSelectBaseRootCss(), style: this.question.getContainerStyle() },
5592
+ return (_$1("fieldset", { className: this.question.getSelectBaseRootCss(), style: this.question.getContainerStyle(), onKeyDown: (event) => { var _a, _b; return (_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event); } },
5511
5593
  _$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
5512
5594
  this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
5513
5595
  }
@@ -5542,6 +5624,8 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
5542
5624
  constructor(props) {
5543
5625
  super(props);
5544
5626
  this.handleOnChange = this.handleOnChange.bind(this);
5627
+ this.handleOnKeyDown = this.handleOnKeyDown.bind(this);
5628
+ this.handleOnBlur = this.handleOnBlur.bind(this);
5545
5629
  }
5546
5630
  getStateElement() {
5547
5631
  return this.item;
@@ -5572,6 +5656,12 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
5572
5656
  get question() {
5573
5657
  return this.props.question;
5574
5658
  }
5659
+ handleOnKeyDown(event) {
5660
+ this.question.onChoiceKeyDown(event.nativeEvent);
5661
+ }
5662
+ handleOnBlur(event) {
5663
+ this.question.onChoiceFocusOut(event.nativeEvent);
5664
+ }
5575
5665
  handleOnChange(event) {
5576
5666
  if (this.question.isReadOnlyAttr)
5577
5667
  return;
@@ -5619,10 +5709,11 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
5619
5709
  null));
5620
5710
  }
5621
5711
  const renderedItem = (_$1("div", { className: itemClass },
5622
- _$1("label", { className: cssClasses.label },
5623
- _$1("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, required: this.question.inputRequiredAttribute, "aria-label": item.locText.renderedHtml, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
5712
+ _$1("label", { className: cssClasses.label, onMouseDown: () => this.question.onMouseDown() },
5713
+ _$1("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, onKeyDown: this.handleOnKeyDown, onBlur: this.handleOnBlur, required: this.question.inputRequiredAttribute, "aria-label": item.locText.renderedHtml, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-keyshortcuts": this.question.getItemAriaKeyShortcuts(item) }),
5624
5714
  _$1("div", { className: this.question.cssClasses.itemDecorator },
5625
5715
  _$1("div", { className: this.question.cssClasses.imageContainer },
5716
+ this.question.getChoiceKeyBadge(item) ? _$1("span", { className: this.question.getItemShortcutKeyClass(item), "aria-hidden": "true" }, this.question.getChoiceKeyBadge(item)) : null,
5626
5717
  !!this.question.cssClasses.checkedItemDecorator ?
5627
5718
  _$1("span", { className: this.question.cssClasses.checkedItemDecorator, "aria-hidden": "true" }, !!this.question.cssClasses.checkedItemSvgIconId ? _$1(SvgIcon, { size: "auto", className: this.question.cssClasses.checkedItemSvgIcon, iconName: this.question.cssClasses.checkedItemSvgIconId }) : null) : null,
5628
5719
  control),
@@ -5943,6 +6034,26 @@ ReactElementFactory.Instance.registerElement("sv-action-bar-item-dropdown", (pro
5943
6034
  return _$1(SurveyActionBarItemDropdown, props);
5944
6035
  });
5945
6036
 
6037
+ // The bar under the records of a dynamic panel and of a matrix: the pager.
6038
+ class SurveyRecordsBar extends SurveyElementBase {
6039
+ get model() {
6040
+ return this.props.model;
6041
+ }
6042
+ getStateElement() {
6043
+ return this.model;
6044
+ }
6045
+ renderElement() {
6046
+ if (!this.model.isVisible)
6047
+ return null;
6048
+ const css = this.model.cssClasses;
6049
+ return _$1("div", { className: css.root },
6050
+ _$1("div", { className: css.pager }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.model.pagerActions })));
6051
+ }
6052
+ }
6053
+ ReactElementFactory.Instance.registerElement("sv-records-bar", (props) => {
6054
+ return _$1(SurveyRecordsBar, props);
6055
+ });
6056
+
5946
6057
  class LogoImage extends x$3 {
5947
6058
  constructor(props) {
5948
6059
  super(props);
@@ -6264,7 +6375,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6264
6375
  }
6265
6376
  };
6266
6377
  const preact = React;
6267
- checkLibraryVersion(`${"3.2.0"}`, "survey-js-ui");
6378
+ checkLibraryVersion(`${"3.2.2"}`, "survey-js-ui");
6268
6379
 
6269
- export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Cn as StrictMode, Survey, SurveyActionBar, SurveyActionBarItemDropdown, SurveyActionBarSeparator, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionBooleanSwitch, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicProgressText, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$2 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, pn as isFragment, yn as isMemo, mn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6380
+ export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Cn as StrictMode, Survey, SurveyActionBar, SurveyActionBarItemDropdown, SurveyActionBarSeparator, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionBooleanSwitch, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicProgressText, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRecordsBar, SurveyRow, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$2 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, pn as isFragment, yn as isMemo, mn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
6270
6381
  //# sourceMappingURL=survey-js-ui.mjs.map