survey-js-ui 3.2.1 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-js-ui",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "license": "MIT",
5
5
  "homepage": "https://surveyjs.io/",
6
6
  "author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {},
62
62
  "peerDependencies": {
63
- "survey-core": "3.2.1",
63
+ "survey-core": "3.2.2",
64
64
  "@types/react-dom": "*",
65
65
  "@types/react": "*"
66
66
  }
package/survey-js-ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v3.2.1
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
  */
@@ -645,7 +645,7 @@
645
645
  const className = this.item.getActionBarItemCss();
646
646
  const buttonContent = this.renderButtonContent();
647
647
  const tabIndex = this.item.disableTabStop ? -1 : undefined;
648
- 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 });
648
+ 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 });
649
649
  return button;
650
650
  }
651
651
  componentDidMount() {
@@ -1116,6 +1116,9 @@
1116
1116
  const popupDropdownModel = popupModel;
1117
1117
  if (!popupDropdownModel || !popupDropdownModel.showHeader)
1118
1118
  return null;
1119
+ // An overlay's header is its close button, not the pointer.
1120
+ if (popupDropdownModel.isOverlay)
1121
+ return super.renderHeaderPopup(popupModel);
1119
1122
  return (_$1("span", { style: {
1120
1123
  left: popupDropdownModel.pointerTarget.left,
1121
1124
  top: popupDropdownModel.pointerTarget.top,
@@ -1224,9 +1227,17 @@
1224
1227
 
1225
1228
  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>";
1226
1229
 
1230
+ 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>";
1231
+
1232
+ 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>";
1233
+
1234
+ 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>";
1235
+
1227
1236
  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>";
1228
1237
 
1229
- 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>";
1238
+ 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>";
1239
+
1240
+ 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>";
1230
1241
 
1231
1242
  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>";
1232
1243
 
@@ -1341,7 +1352,11 @@
1341
1352
  "cancel-24x24": cancel_24x24,
1342
1353
  "check-16x16": check_16x16,
1343
1354
  "check-24x24": check_24x24,
1355
+ "chevrondoubleleft-16x16": chevrondoubleleft_16x16,
1356
+ "chevrondoubleright-16x16": chevrondoubleright_16x16,
1357
+ "chevrondown-16x16": chevrondown_16x16,
1344
1358
  "chevrondown-24x24": chevrondown_24x24,
1359
+ "chevronleft-16x16": chevronleft_16x16,
1345
1360
  "chevronright-16x16": chevronright_16x16,
1346
1361
  "chevronright-24x24": chevronright_24x24,
1347
1362
  "clear-16x16": clear_16x16,
@@ -1951,8 +1966,11 @@
1951
1966
  get css() {
1952
1967
  return this.getCss();
1953
1968
  }
1969
+ getPanelFromProps(props) {
1970
+ return this.props.element || this.props.question;
1971
+ }
1954
1972
  get panelBase() {
1955
- return this.getPanelBase();
1973
+ return this.getPanelFromProps(this.props);
1956
1974
  }
1957
1975
  getPanelBase() {
1958
1976
  return this.props.element || this.props.question;
@@ -1973,6 +1991,9 @@
1973
1991
  if (!!el) {
1974
1992
  el.removeAttribute("data-rendered");
1975
1993
  }
1994
+ if (this.panelBase) {
1995
+ this.panelBase.beforeDestroy();
1996
+ }
1976
1997
  }
1977
1998
  componentDidUpdate(prevProps, prevState) {
1978
1999
  super.componentDidUpdate(prevProps, prevState);
@@ -1981,6 +2002,10 @@
1981
2002
  !!this.survey.activePage &&
1982
2003
  prevProps.page.id === this.survey.activePage.id)
1983
2004
  return;
2005
+ const prevPanel = this.getPanelFromProps(prevProps);
2006
+ if (prevPanel) {
2007
+ prevPanel.beforeDestroy();
2008
+ }
1984
2009
  this.doAfterRender();
1985
2010
  }
1986
2011
  doAfterRender() {
@@ -2220,7 +2245,7 @@
2220
2245
  renderNoItems() {
2221
2246
  const q = this.summary.question;
2222
2247
  const placeholder = ReactElementFactory.Instance.createElement("sv-placeholder-" + q.getTemplate(), { cssClasses: this.css, question: q });
2223
- return placeholder || _$1("div", null, this.renderLocString(this.summary.noEntry));
2248
+ return _$1("div", { className: this.css.summaryPlaceholder }, placeholder || _$1("div", null, this.renderLocString(this.summary.noEntry)));
2224
2249
  }
2225
2250
  renderItem(item, index) {
2226
2251
  const btnEdit = item.btnEdit ?
@@ -2596,8 +2621,8 @@
2596
2621
  constructor(props) {
2597
2622
  super(props);
2598
2623
  }
2599
- getPanelBase() {
2600
- return this.props.page;
2624
+ getPanelFromProps(props) {
2625
+ return props.page;
2601
2626
  }
2602
2627
  get page() {
2603
2628
  return this.panelBase;
@@ -2650,17 +2675,13 @@
2650
2675
  paddingInlineStart: this.panel.innerPaddingLeft
2651
2676
  ? `calc(${panelPaddingHorizontal} + ${this.panel.innerPaddingLeft})`
2652
2677
  : this.panel.innerPaddingLeft,
2653
- // paddingInlineEnd: this.panel.innerPaddingLeft ? panelPaddingHorizontal : undefined,
2654
- display: this.panel.renderedIsExpanded ? undefined : "none",
2655
2678
  };
2656
- let content = null;
2657
- let bottom = null;
2679
+ const className = this.panelBase.cssClasses.panel.content;
2680
+ let expandableContent = null;
2658
2681
  if (this.panel.renderedIsExpanded) {
2659
- // this.hasBeenExpanded = true;
2660
- const rows = this.renderRows(this.panelBase.cssClasses);
2661
- const className = this.panelBase.cssClasses.panel.content;
2662
- content = this.renderContent(style, rows, className);
2663
- bottom = this.renderBottom();
2682
+ expandableContent = _$1("div", { className: this.panel.cssClasses.panel.expandableContent },
2683
+ this.renderContent(style, this.renderRows(this.panelBase.cssClasses), className),
2684
+ this.renderBottom());
2664
2685
  }
2665
2686
  const focusIn = () => {
2666
2687
  if (this.panelBase)
@@ -2670,8 +2691,7 @@
2670
2691
  this.panel.showErrorsAbovePanel ? errors : null,
2671
2692
  header,
2672
2693
  this.panel.showErrorsAbovePanel ? null : errors,
2673
- content,
2674
- bottom));
2694
+ expandableContent));
2675
2695
  }
2676
2696
  renderHeader() {
2677
2697
  if (!this.panel.hasTitle && !this.panel.hasDescription) {
@@ -2847,13 +2867,14 @@
2847
2867
  }
2848
2868
  renderElement() {
2849
2869
  var cssClasses = this.question.cssClasses;
2850
- 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 },
2870
+ 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 },
2851
2871
  this.renderHeader(),
2852
2872
  this.question.hasColumns
2853
2873
  ? this.getColumnedBody(cssClasses)
2854
2874
  : this.getBody(cssClasses),
2855
2875
  this.getFooter()));
2856
2876
  }
2877
+ handleRootKeyDown(_event) { }
2857
2878
  renderHeader() { return null; }
2858
2879
  getFooter() {
2859
2880
  if (this.question.hasFootItems) {
@@ -3019,6 +3040,10 @@
3019
3040
  get question() {
3020
3041
  return this.questionBase;
3021
3042
  }
3043
+ handleRootKeyDown(event) {
3044
+ var _a, _b;
3045
+ (_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
3046
+ }
3022
3047
  renderHeader() {
3023
3048
  return _$1(k$2, null,
3024
3049
  _$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
@@ -3034,6 +3059,12 @@
3034
3059
  class SurveyQuestionCheckboxItem extends SurveyQuestionSelectBaseItem {
3035
3060
  constructor(props) {
3036
3061
  super(props);
3062
+ this.handleOnKeyDown = (event) => {
3063
+ this.question.onChoiceKeyDown(event.nativeEvent);
3064
+ };
3065
+ this.handleOnBlur = (event) => {
3066
+ this.question.onChoiceFocusOut(event.nativeEvent);
3067
+ };
3037
3068
  }
3038
3069
  doOnItemChange(event) {
3039
3070
  this.question.clickItemHandler(this.item, event.target.checked);
@@ -3050,9 +3081,11 @@
3050
3081
  const itemClass = this.question.getItemClass(this.item);
3051
3082
  const labelClass = this.question.getLabelClass(this.item);
3052
3083
  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;
3084
+ const shortcutKey = this.question.getChoiceKeyBadge(this.item);
3053
3085
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
3054
3086
  _$1("label", { className: labelClass },
3055
- _$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 }),
3087
+ shortcutKey ? _$1("span", { className: this.question.getItemShortcutKeyClass(this.item), "aria-hidden": "true" }, shortcutKey) : null,
3088
+ _$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) }),
3056
3089
  this.cssClasses.materialDecorator ?
3057
3090
  _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
3058
3091
  _$1("svg", { className: this.cssClasses.itemDecorator },
@@ -4142,6 +4175,10 @@
4142
4175
  var _a, _b;
4143
4176
  (_b = (_a = this.question).onKeyDown) === null || _b === void 0 ? void 0 : _b.call(_a, event);
4144
4177
  };
4178
+ this.handleOnBlur = (event) => {
4179
+ var _a, _b;
4180
+ (_b = (_a = this.question).onChoiceFocusOut) === null || _b === void 0 ? void 0 : _b.call(_a, event.nativeEvent);
4181
+ };
4145
4182
  this.handleOnMouseDown = this.handleOnMouseDown.bind(this);
4146
4183
  }
4147
4184
  getStateElement() {
@@ -4167,9 +4204,11 @@
4167
4204
  var labelClass = this.question.getLabelClass(this.item);
4168
4205
  var controlLabelClass = this.question.getControlLabelClass(this.item);
4169
4206
  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;
4207
+ const shortcutKey = this.question.getChoiceKeyBadge(this.item);
4170
4208
  return (_$1("div", { className: itemClass, role: "presentation", ref: this.rootRef },
4171
4209
  _$1("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
4172
- _$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 }),
4210
+ shortcutKey ? _$1("span", { className: this.question.getItemShortcutKeyClass(this.item), "aria-hidden": "true" }, shortcutKey) : null,
4211
+ _$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) }),
4173
4212
  this.cssClasses.materialDecorator ?
4174
4213
  _$1("span", { className: this.cssClasses.materialDecorator, "aria-hidden": "true" }, this.question.itemSvgIcon ?
4175
4214
  _$1("svg", { className: this.cssClasses.itemDecorator },
@@ -4323,7 +4362,7 @@
4323
4362
  const itemClass = this.question.getCheckboxItemCss();
4324
4363
  const description = this.question.canRenderLabelDescription ?
4325
4364
  SurveyElementBase.renderQuestionDescription(this.question) : null;
4326
- return (_$1("div", { className: cssClasses.rootCheckbox },
4365
+ return (_$1("div", { className: cssClasses.rootCheckbox, onKeyDown: (event) => { var _a; return this.question.onKeyDown((_a = event.nativeEvent) !== null && _a !== void 0 ? _a : event); } },
4327
4366
  _$1("div", { className: itemClass },
4328
4367
  _$1("label", { className: cssClasses.checkboxLabel },
4329
4368
  _$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
@@ -4636,6 +4675,10 @@
4636
4675
  renderElement() {
4637
4676
  return this.renderTableDiv();
4638
4677
  }
4678
+ // The records bar under the table: the pager.
4679
+ renderRecordsBar() {
4680
+ return ReactElementFactory.Instance.createElement("sv-records-bar", { model: this.question.recordsBar });
4681
+ }
4639
4682
  renderTableDiv() {
4640
4683
  return (_$1("div", { className: this.question.getTableWrapperCss(), ref: (root) => (this.setControl(root)) },
4641
4684
  _$1(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: (cell, element, reason) => this.wrapCell(cell, element, reason) })));
@@ -4800,6 +4843,12 @@
4800
4843
  constructor(props) {
4801
4844
  super(props);
4802
4845
  }
4846
+ // A fragment: a matrix that does not page renders the table alone, as before the pager.
4847
+ renderElement() {
4848
+ return (_$1(k$2, null,
4849
+ this.renderTableDiv(),
4850
+ this.renderRecordsBar()));
4851
+ }
4803
4852
  }
4804
4853
  ReactQuestionFactory.Instance.registerQuestion("matrixdropdown", props => {
4805
4854
  return _$1(SurveyQuestionMatrixDropdown, props);
@@ -4825,7 +4874,17 @@
4825
4874
  return (_$1("div", null,
4826
4875
  this.renderTopToolbar(),
4827
4876
  mainDiv,
4828
- this.renderBottomToolbar()));
4877
+ this.renderRecordsFooter()));
4878
+ }
4879
+ // The footer exists only with the pager: the bottom toolbar and the pager in one row.
4880
+ // Without the pager the bottom toolbar is the next sibling of the table, as without paging.
4881
+ renderRecordsFooter() {
4882
+ const toolbar = this.renderBottomToolbar();
4883
+ if (!this.matrix.showPager)
4884
+ return toolbar;
4885
+ return _$1("div", { className: this.matrix.getFooterCss() },
4886
+ toolbar,
4887
+ this.renderRecordsBar());
4829
4888
  }
4830
4889
  renderToolbar(location) {
4831
4890
  if (!this.matrix.getShowToolbar(location))
@@ -4854,7 +4913,7 @@
4854
4913
  const matrix = this.props.question;
4855
4914
  const text = this.renderLocString(matrix.locNoRowsText);
4856
4915
  const textDiv = _$1("div", { className: cssClasses.noRowsText }, text);
4857
- const toolbar = matrix.getShowToolbar() ? ReactElementFactory.Instance.createElement("sv-action-bar", { model: matrix.toolbar }) : null;
4916
+ const toolbar = matrix.getShowPlaceholderToolbar() ? ReactElementFactory.Instance.createElement("sv-action-bar", { model: matrix.toolbar }) : null;
4858
4917
  return (_$1("div", { className: cssClasses.noRowsSection },
4859
4918
  textDiv,
4860
4919
  toolbar));
@@ -4913,21 +4972,24 @@
4913
4972
  _$1("div", { className: this.question.cssClasses.panelsContainer }, panels),
4914
4973
  navigation));
4915
4974
  }
4975
+ // The records bar in the footer: the pager.
4976
+ renderRecordsBar() {
4977
+ return ReactElementFactory.Instance.createElement("sv-records-bar", { model: this.question.recordsBar });
4978
+ }
4916
4979
  renderRange() {
4917
4980
  return (_$1("div", { className: this.question.cssClasses.progress },
4918
4981
  _$1("div", { className: this.question.cssClasses.progressBar, style: { width: this.question.progress }, role: "progressbar", "aria-label": this.question.progressBarAriaLabel })));
4919
4982
  }
4920
4983
  renderNavigator() {
4921
- if (!this.question.showNavigation)
4984
+ if (!this.question.showFooter)
4922
4985
  return null;
4923
- const range = this.question.isRangeShowing && this.question.isProgressBottomShowing ? this.renderRange() : null;
4924
- if (!range && !this.question.showFooterToolbar)
4925
- return null;
4926
- return (_$1("div", { className: this.question.cssClasses.footer },
4986
+ const range = this.question.showFooterProgress ? this.renderRange() : null;
4987
+ return (_$1("div", { className: this.question.getFooterCss() },
4927
4988
  _$1("hr", { className: this.question.cssClasses.separator }),
4928
4989
  range,
4929
- this.question.showFooterToolbar ? (_$1("div", { className: this.question.cssClasses.footerButtonsContainer },
4930
- _$1(SurveyActionBar, { model: this.question.footerToolbar }))) : null));
4990
+ this.question.showFooterButtons ? (_$1("div", { className: this.question.cssClasses.footerButtonsContainer },
4991
+ _$1(SurveyActionBar, { model: this.question.footerToolbar }))) : null,
4992
+ this.renderRecordsBar()));
4931
4993
  }
4932
4994
  renderPlaceholder(cssClasses) {
4933
4995
  if (this.question.getShowNoEntriesPlaceholder())
@@ -4978,7 +5040,7 @@
4978
5040
  const question = this.props.question;
4979
5041
  return (_$1("div", { className: cssClasses.noEntriesPlaceholder },
4980
5042
  _$1("span", null, this.renderLocString(question.locNoEntriesText)),
4981
- _$1(SurveyActionBar, { model: this.props.question.footerToolbar })));
5043
+ question.getShowPlaceholderToolbar() ? _$1(SurveyActionBar, { model: question.footerToolbar }) : null));
4982
5044
  }
4983
5045
  }
4984
5046
  ReactElementFactory.Instance.registerElement("sv-placeholder-paneldynamic", (props) => { return _$1(SurveyQuestionPanelDynamicPlaceholder, props); });
@@ -5528,7 +5590,7 @@
5528
5590
  }
5529
5591
  renderElement() {
5530
5592
  var cssClasses = this.question.cssClasses;
5531
- return (_$1("fieldset", { className: this.question.getSelectBaseRootCss(), style: this.question.getContainerStyle() },
5593
+ 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); } },
5532
5594
  _$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
5533
5595
  this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
5534
5596
  }
@@ -5563,6 +5625,8 @@
5563
5625
  constructor(props) {
5564
5626
  super(props);
5565
5627
  this.handleOnChange = this.handleOnChange.bind(this);
5628
+ this.handleOnKeyDown = this.handleOnKeyDown.bind(this);
5629
+ this.handleOnBlur = this.handleOnBlur.bind(this);
5566
5630
  }
5567
5631
  getStateElement() {
5568
5632
  return this.item;
@@ -5593,6 +5657,12 @@
5593
5657
  get question() {
5594
5658
  return this.props.question;
5595
5659
  }
5660
+ handleOnKeyDown(event) {
5661
+ this.question.onChoiceKeyDown(event.nativeEvent);
5662
+ }
5663
+ handleOnBlur(event) {
5664
+ this.question.onChoiceFocusOut(event.nativeEvent);
5665
+ }
5596
5666
  handleOnChange(event) {
5597
5667
  if (this.question.isReadOnlyAttr)
5598
5668
  return;
@@ -5640,10 +5710,11 @@
5640
5710
  null));
5641
5711
  }
5642
5712
  const renderedItem = (_$1("div", { className: itemClass },
5643
- _$1("label", { className: cssClasses.label },
5644
- _$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 }),
5713
+ _$1("label", { className: cssClasses.label, onMouseDown: () => this.question.onMouseDown() },
5714
+ _$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) }),
5645
5715
  _$1("div", { className: this.question.cssClasses.itemDecorator },
5646
5716
  _$1("div", { className: this.question.cssClasses.imageContainer },
5717
+ this.question.getChoiceKeyBadge(item) ? _$1("span", { className: this.question.getItemShortcutKeyClass(item), "aria-hidden": "true" }, this.question.getChoiceKeyBadge(item)) : null,
5647
5718
  !!this.question.cssClasses.checkedItemDecorator ?
5648
5719
  _$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,
5649
5720
  control),
@@ -5964,6 +6035,26 @@
5964
6035
  return _$1(SurveyActionBarItemDropdown, props);
5965
6036
  });
5966
6037
 
6038
+ // The bar under the records of a dynamic panel and of a matrix: the pager.
6039
+ class SurveyRecordsBar extends SurveyElementBase {
6040
+ get model() {
6041
+ return this.props.model;
6042
+ }
6043
+ getStateElement() {
6044
+ return this.model;
6045
+ }
6046
+ renderElement() {
6047
+ if (!this.model.isVisible)
6048
+ return null;
6049
+ const css = this.model.cssClasses;
6050
+ return _$1("div", { className: css.root },
6051
+ _$1("div", { className: css.pager }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: this.model.pagerActions })));
6052
+ }
6053
+ }
6054
+ ReactElementFactory.Instance.registerElement("sv-records-bar", (props) => {
6055
+ return _$1(SurveyRecordsBar, props);
6056
+ });
6057
+
5967
6058
  class LogoImage extends x$2 {
5968
6059
  constructor(props) {
5969
6060
  super(props);
@@ -6285,7 +6376,7 @@
6285
6376
  }
6286
6377
  };
6287
6378
  const preact = React;
6288
- surveyCore.checkLibraryVersion(`${"3.2.1"}`, "survey-js-ui");
6379
+ surveyCore.checkLibraryVersion(`${"3.2.2"}`, "survey-js-ui");
6289
6380
 
6290
6381
  Object.defineProperty(exports, 'Model', {
6291
6382
  enumerable: true,
@@ -6411,6 +6502,7 @@
6411
6502
  exports.SurveyQuestionTagbox = SurveyQuestionTagbox;
6412
6503
  exports.SurveyQuestionTagboxItem = SurveyQuestionTagboxItem;
6413
6504
  exports.SurveyQuestionText = SurveyQuestionText;
6505
+ exports.SurveyRecordsBar = SurveyRecordsBar;
6414
6506
  exports.SurveyRow = SurveyRow;
6415
6507
  exports.SurveyTimerPanel = SurveyTimerPanel;
6416
6508
  exports.SurveyWindow = SurveyWindow;