survey-react-ui 3.0.0-beta.0 → 3.0.0-beta.1

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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <video src="https://github.com/surveyjs/survey-library/assets/22315929/b24a68bf-d703-4096-835b-752f5f610aa6"></video>
5
5
 
6
6
 
7
- [![Build Status](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_apis/build/status/SurveyJS%20Library?branchName=master)](https://dev.azure.com/SurveyJS/SurveyJS%20Integration%20Tests/_build/latest?definitionId=7&branchName=master)
7
+ [![Build Status](https://dev.azure.com/SurveyJS/V2%20Libraries/_apis/build/status%2Flibrary%2FLibrary%20Main?repoName=surveyjs%2Fsurvey-library&branchName=master)](https://dev.azure.com/SurveyJS/V2%20Libraries/_build/latest?definitionId=130&repoName=surveyjs%2Fsurvey-library&branchName=master)
8
8
  [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE)
9
9
  [![Tested with Playwright](https://img.shields.io/badge/tested%20with-Playwright-2fa4cf.svg)](https://playwright.dev)
10
10
  <a href="https://github.com/surveyjs/survey-library/issues">
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v3.0.0-beta.0
2
+ * surveyjs - Survey JavaScript library v3.0.0-beta.1
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
  */
6
6
 
7
- import { SurveyModel, Helpers, createSvg, LocalizableString, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, SvgRegistry, PopupModalManager, settings, ScrollViewModel, addIconsToThemeSet, doKey2ClickBlur, doKey2ClickDown, Question, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, checkLibraryVersion } from 'survey-core';
7
+ import { SurveyModel, Helpers, createSvg, LocalizableString, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, SvgRegistry, PopupModalManager, settings, ScrollViewModel, addIconsToThemeSet, doKey2ClickBlur, doKey2ClickDown, ResizeManager, Question, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, checkLibraryVersion } from 'survey-core';
8
8
  export { SurveyModel as Model, SurveyModel, SurveyWindowModel, settings, surveyLocalization, surveyStrings } from 'survey-core';
9
9
  import * as React from 'react';
10
10
  import * as ReactDOM from 'react-dom';
@@ -1186,6 +1186,8 @@ var folder_24x24$1 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/
1186
1186
 
1187
1187
  var fullsize_16x16$1 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 13H4C2.9 13 2 12.1 2 11V5C2 3.9 2.9 3 4 3H12C13.1 3 14 3.9 14 5V11C14 12.1 13.1 13 12 13ZM4 5V11H12V5H4Z\"/></svg>";
1188
1188
 
1189
+ var grip$1 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_247_12)\"><path d=\"M13.8666 9.86954C14.1595 9.57665 14.6342 9.57665 14.9271 9.86954C15.22 10.1624 15.22 10.6372 14.9271 10.9301L10.9271 14.9301C10.6342 15.223 10.1595 15.223 9.86659 14.9301C9.5737 14.6372 9.5737 14.1624 9.86659 13.8695L13.8666 9.86954Z\"/><path d=\"M13.4657 5.46961C13.7586 5.17672 14.2334 5.17672 14.5263 5.46961C14.8191 5.7625 14.8192 6.23726 14.5263 6.53015L6.52626 14.5302C6.23339 14.8229 5.75858 14.8229 5.46571 14.5302C5.17286 14.2373 5.17292 13.7625 5.46571 13.4696L13.4657 5.46961Z\"/></g><defs><clipPath id=\"clip0_247_12\"><rect width=\"16\" height=\"16\" fill=\"white\"/></clipPath></defs></svg>";
1190
+
1189
1191
  var image_48x48$1 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M36 8H12C9.79 8 8 9.79 8 12V36C8 38.21 9.79 40 12 40H36C38.21 40 40 38.21 40 36V12C40 9.79 38.21 8 36 8ZM38 36C38 37.1 37.1 38 36 38H12C10.9 38 10 37.1 10 36V12C10 10.9 10.9 10 12 10H36C37.1 10 38 10.9 38 12V36ZM14 17C14 15.34 15.34 14 17 14C18.66 14 20 15.34 20 17C20 18.66 18.66 20 17 20C15.34 20 14 18.66 14 17ZM27 24L36 36H12L19 27L23 29L27 24Z\"/></svg>";
1190
1192
 
1191
1193
  var loading_48x48$1 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_19679_369428)\"><path opacity=\"0.1\" d=\"M24 40C15.18 40 8 32.82 8 24C8 15.18 15.18 8 24 8C32.82 8 40 15.18 40 24C40 32.82 32.82 40 24 40ZM24 12C17.38 12 12 17.38 12 24C12 30.62 17.38 36 24 36C30.62 36 36 30.62 36 24C36 17.38 30.62 12 24 12Z\" fill=\"black\" fill-opacity=\"0.91\"/><path d=\"M10 26C8.9 26 8 25.1 8 24C8 15.18 15.18 8 24 8C25.1 8 26 8.9 26 10C26 11.1 25.1 12 24 12C17.38 12 12 17.38 12 24C12 25.1 11.1 26 10 26Z\"/></g><defs><clipPath id=\"clip0_19679_369428\"><rect width=\"32\" height=\"32\" fill=\"white\" transform=\"translate(8 8)\"/></clipPath></defs></svg>";
@@ -1274,6 +1276,7 @@ const icons$1 = {
1274
1276
  "flip-24x24": flip_24x24$1,
1275
1277
  "folder-24x24": folder_24x24$1,
1276
1278
  "fullsize-16x16": fullsize_16x16$1,
1279
+ "grip": grip$1,
1277
1280
  "image-48x48": image_48x48$1,
1278
1281
  "loading-48x48": loading_48x48$1,
1279
1282
  "maximize-16x16": maximize_16x16$1,
@@ -1372,6 +1375,8 @@ var folder_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/sv
1372
1375
 
1373
1376
  var fullsize_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 3.25H4C3.04 3.25 2.25 4.04 2.25 5V11C2.25 11.96 3.04 12.75 4 12.75H12C12.96 12.75 13.75 11.96 13.75 11V5C13.75 4.04 12.96 3.25 12 3.25ZM12.25 11C12.25 11.14 12.14 11.25 12 11.25H4C3.86 11.25 3.75 11.14 3.75 11V5C3.75 4.86 3.86 4.75 4 4.75H12C12.14 4.75 12.25 4.86 12.25 5V11Z\"/></svg>";
1374
1377
 
1378
+ var grip = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_247_12)\"><path d=\"M13.8666 9.86954C14.1595 9.57665 14.6342 9.57665 14.9271 9.86954C15.22 10.1624 15.22 10.6372 14.9271 10.9301L10.9271 14.9301C10.6342 15.223 10.1595 15.223 9.86659 14.9301C9.5737 14.6372 9.5737 14.1624 9.86659 13.8695L13.8666 9.86954Z\"/><path d=\"M13.4657 5.46961C13.7586 5.17672 14.2334 5.17672 14.5263 5.46961C14.8191 5.7625 14.8192 6.23726 14.5263 6.53015L6.52626 14.5302C6.23339 14.8229 5.75858 14.8229 5.46571 14.5302C5.17286 14.2373 5.17292 13.7625 5.46571 13.4696L13.4657 5.46961Z\"/></g><defs><clipPath id=\"clip0_247_12\"><rect width=\"16\" height=\"16\" fill=\"white\"/></clipPath></defs></svg>";
1379
+
1375
1380
  var image_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M33 10.25H15C12.38 10.25 10.25 12.38 10.25 15V33C10.25 35.62 12.38 37.75 15 37.75H33C35.62 37.75 37.75 35.62 37.75 33V15C37.75 12.38 35.62 10.25 33 10.25ZM36.25 33C36.25 34.79 34.79 36.25 33 36.25H15C13.21 36.25 11.75 34.79 11.75 33V15C11.75 13.21 13.21 11.75 15 11.75H33C34.79 11.75 36.25 13.21 36.25 15V33ZM30.5 14.25C28.71 14.25 27.25 15.71 27.25 17.5C27.25 19.29 28.71 20.75 30.5 20.75C32.29 20.75 33.75 19.29 33.75 17.5C33.75 15.71 32.29 14.25 30.5 14.25ZM30.5 19.25C29.54 19.25 28.75 18.46 28.75 17.5C28.75 16.54 29.54 15.75 30.5 15.75C31.46 15.75 32.25 16.54 32.25 17.5C32.25 18.46 31.46 19.25 30.5 19.25ZM29.26 26.28C28.94 25.92 28.49 25.71 28.01 25.7C27.54 25.68 27.07 25.87 26.73 26.2L24.95 27.94L22.28 25.23C21.94 24.89 21.5 24.71 21 24.71C20.52 24.71 20.06 24.93 19.74 25.28L14.74 30.78C14.25 31.3 14.12 32.06 14.41 32.72C14.69 33.36 15.28 33.75 15.95 33.75H32.07C32.74 33.75 33.33 33.35 33.61 32.72C33.89 32.06 33.77 31.31 33.29 30.79L29.27 26.29L29.26 26.28ZM32.22 32.12C32.18 32.2 32.13 32.25 32.06 32.25H15.94C15.87 32.25 15.81 32.21 15.78 32.12C15.77 32.09 15.71 31.93 15.83 31.8L20.84 26.29C20.9 26.22 20.99 26.21 21.02 26.21C21.06 26.21 21.14 26.22 21.2 26.29L24.4 29.54C24.69 29.83 25.16 29.84 25.46 29.54L27.77 27.27C27.83 27.21 27.9 27.2 27.94 27.2C28.01 27.2 28.06 27.21 28.13 27.28L32.16 31.79C32.16 31.79 32.16 31.79 32.17 31.8C32.29 31.93 32.23 32.09 32.22 32.12Z\"/></svg>";
1376
1381
 
1377
1382
  var loading_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_19679_369428)\"><path opacity=\"0.1\" d=\"M24 40C15.18 40 8 32.82 8 24C8 15.18 15.18 8 24 8C32.82 8 40 15.18 40 24C40 32.82 32.82 40 24 40ZM24 12C17.38 12 12 17.38 12 24C12 30.62 17.38 36 24 36C30.62 36 36 30.62 36 24C36 17.38 30.62 12 24 12Z\" fill=\"black\" fill-opacity=\"0.91\"/><path d=\"M10 26C8.9 26 8 25.1 8 24C8 15.18 15.18 8 24 8C25.1 8 26 8.9 26 10C26 11.1 25.1 12 24 12C17.38 12 12 17.38 12 24C12 25.1 11.1 26 10 26Z\"/></g><defs><clipPath id=\"clip0_19679_369428\"><rect width=\"32\" height=\"32\" fill=\"white\" transform=\"translate(8 8)\"/></clipPath></defs></svg>";
@@ -1460,6 +1465,7 @@ const icons = {
1460
1465
  "flip-24x24": flip_24x24,
1461
1466
  "folder-24x24": folder_24x24,
1462
1467
  "fullsize-16x16": fullsize_16x16,
1468
+ "grip": grip,
1463
1469
  "image-48x48": image_48x48,
1464
1470
  "loading-48x48": loading_48x48,
1465
1471
  "maximize-16x16": maximize_16x16,
@@ -2123,23 +2129,12 @@ class SurveyPanelBase extends SurveyElementBase {
2123
2129
  }
2124
2130
  }
2125
2131
 
2126
- class CharacterCounterComponent extends SurveyElementBase {
2127
- getStateElement() {
2128
- return this.props.counter;
2129
- }
2130
- renderElement() {
2131
- return (React.createElement("div", { className: this.props.remainingCharacterCounter }, this.props.counter.remainingCharacterCounter));
2132
- }
2133
- }
2134
- ReactElementFactory.Instance.registerElement("sv-character-counter", (props) => {
2135
- return React.createElement(CharacterCounterComponent, props);
2136
- });
2137
-
2138
2132
  class TextAreaComponent extends SurveyElementBase {
2139
2133
  constructor(props) {
2140
2134
  super(props);
2141
- this.initialValue = this.viewModel.getTextValue() || "";
2142
2135
  this.textareaRef = React.createRef();
2136
+ this.anchorRef = React.createRef();
2137
+ this.initialValue = this.viewModel.getTextValue() || "";
2143
2138
  }
2144
2139
  get viewModel() {
2145
2140
  return this.props.viewModel;
@@ -2149,17 +2144,37 @@ class TextAreaComponent extends SurveyElementBase {
2149
2144
  }
2150
2145
  componentDidMount() {
2151
2146
  super.componentDidMount();
2147
+ if (this.anchorRef.current && this.textareaRef.current && this.viewModel.question.resizeStyle !== "none") {
2148
+ this.resizeManager = new ResizeManager(this.anchorRef.current, this.textareaRef.current, this.viewModel.question.resizeStyle);
2149
+ }
2152
2150
  let el = this.textareaRef.current;
2153
2151
  if (!!el) {
2154
2152
  this.viewModel.setElement(el);
2155
2153
  }
2156
2154
  }
2157
2155
  componentWillUnmount() {
2156
+ var _a;
2158
2157
  super.componentWillUnmount();
2158
+ (_a = this.resizeManager) === null || _a === void 0 ? void 0 : _a.dispose();
2159
2159
  this.viewModel.resetElement();
2160
2160
  }
2161
+ onContainerClick(event) {
2162
+ var _a;
2163
+ if (event.target == event.currentTarget) {
2164
+ (_a = this.textareaRef.current) === null || _a === void 0 ? void 0 : _a.focus();
2165
+ }
2166
+ }
2167
+ renderGroup() {
2168
+ return this.viewModel.hasVisibleInputActions ? React.createElement(SurveyActionBar, { model: this.viewModel.inputActionsContainer }) : null;
2169
+ }
2161
2170
  renderElement() {
2162
- return (React.createElement("textarea", { id: this.viewModel.id, className: this.viewModel.className, ref: this.textareaRef, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: (event) => { this.viewModel.onTextAreaInput(event); }, onFocus: (event) => { this.viewModel.onTextAreaFocus(event); }, onBlur: (event) => { this.viewModel.onTextAreaBlur(event); }, onKeyDown: (event) => { this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: this.viewModel.question.resizeStyle } }));
2171
+ const cssClasses = this.viewModel.getCssClasses();
2172
+ return (React.createElement("div", { className: cssClasses.root, onClick: (event) => this.onContainerClick(event) },
2173
+ React.createElement("textarea", { id: this.viewModel.id, className: cssClasses.control, ref: this.textareaRef, disabled: this.viewModel.isDisabledAttr, readOnly: this.viewModel.isReadOnlyAttr, rows: this.viewModel.rows, cols: this.viewModel.cols, placeholder: this.viewModel.placeholder, maxLength: this.viewModel.maxLength, defaultValue: this.initialValue, onChange: (event) => { this.viewModel.onTextAreaInput(event); }, onFocus: (event) => { this.viewModel.onTextAreaFocus(event); }, onBlur: (event) => { this.viewModel.onTextAreaBlur(event); }, onKeyDown: (event) => { this.viewModel.onTextAreaKeyDown(event); }, "aria-required": this.viewModel.ariaRequired, "aria-label": this.viewModel.ariaLabel, "aria-labelledby": this.viewModel.ariaLabelledBy, "aria-describedby": this.viewModel.ariaDescribedBy, "aria-invalid": this.viewModel.ariaInvalid, "aria-errormessage": this.viewModel.ariaErrormessage, style: { resize: "none" } }),
2174
+ this.renderGroup(),
2175
+ this.viewModel.question.resizeStyle !== "none" ?
2176
+ React.createElement("div", { className: cssClasses.grip, ref: this.anchorRef },
2177
+ React.createElement(SvgIcon, { iconName: cssClasses.gripIconId, size: "auto" })) : null));
2163
2178
  }
2164
2179
  }
2165
2180
  ReactElementFactory.Instance.registerElement("sv-text-area", (props) => {
@@ -2167,13 +2182,6 @@ ReactElementFactory.Instance.registerElement("sv-text-area", (props) => {
2167
2182
  });
2168
2183
 
2169
2184
  class SurveyQuestionComment extends SurveyQuestionUncontrolledElement {
2170
- renderCharacterCounter() {
2171
- let counter = null;
2172
- if (!!this.question.getMaxLength()) {
2173
- counter = React.createElement(CharacterCounterComponent, { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter });
2174
- }
2175
- return counter;
2176
- }
2177
2185
  constructor(props) {
2178
2186
  super(props);
2179
2187
  }
@@ -2181,11 +2189,9 @@ class SurveyQuestionComment extends SurveyQuestionUncontrolledElement {
2181
2189
  if (this.question.isReadOnlyRenderDiv()) {
2182
2190
  return React.createElement("div", null, this.question.value);
2183
2191
  }
2184
- const counter = this.renderCharacterCounter();
2185
2192
  const textAreaModel = this.props.question.textAreaModel;
2186
2193
  return (React.createElement(React.Fragment, null,
2187
- React.createElement(TextAreaComponent, { viewModel: textAreaModel }),
2188
- counter));
2194
+ React.createElement(TextAreaComponent, { viewModel: textAreaModel })));
2189
2195
  }
2190
2196
  }
2191
2197
  class SurveyQuestionCommentItem extends ReactSurveyElement {
@@ -3566,16 +3572,17 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3566
3572
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3567
3573
  // @ts-ignore
3568
3574
  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)) },
3569
- dropdownListModel.showHintPrefix ?
3570
- (React.createElement("div", { className: this.question.cssClasses.hintPrefix },
3571
- React.createElement("span", null, dropdownListModel.hintStringPrefix))) : null,
3572
3575
  React.createElement("div", { className: this.question.cssClasses.controlValue },
3573
- dropdownListModel.showHintString ?
3574
- (React.createElement("div", { className: this.question.cssClasses.hintSuffix },
3575
- React.createElement("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
3576
- React.createElement("span", null, dropdownListModel.hintStringSuffix))) : null,
3577
- valueElement,
3578
- dropdownListModel.needRenderInput ? this.renderFilterInput() : null),
3576
+ dropdownListModel.showHintPrefix ?
3577
+ (React.createElement("div", { className: this.question.cssClasses.hintPrefix },
3578
+ React.createElement("span", null, dropdownListModel.hintStringPrefix))) : null,
3579
+ React.createElement("div", { className: this.question.cssClasses.inputPrefixWrapper },
3580
+ dropdownListModel.showHintString ?
3581
+ (React.createElement("div", { className: this.question.cssClasses.hintSuffix },
3582
+ React.createElement("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
3583
+ React.createElement("span", null, dropdownListModel.hintStringSuffix))) : null,
3584
+ valueElement,
3585
+ dropdownListModel.needRenderInput ? this.renderFilterInput() : null)),
3579
3586
  this.renderEditorButtons()));
3580
3587
  }
3581
3588
  renderFilterInput() {
@@ -3714,18 +3721,16 @@ class SurveyQuestionDropdownSelect extends SurveyQuestionDropdown {
3714
3721
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3715
3722
  // @ts-ignore
3716
3723
  React.createElement("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true }, this.question.readOnlyText)) :
3717
- (React.createElement("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: (select) => (this.setControl(select)), autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, required: this.question.isRequired },
3724
+ (React.createElement("select", { id: this.question.inputId, className: cssClasses.controlValue, ref: (select) => (this.setControl(select)), autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, required: this.question.isRequired },
3718
3725
  this.question.allowClear ? (React.createElement("option", { value: "" }, this.question.placeholder)) : null,
3719
3726
  this.question.visibleChoices.map((item) => React.createElement(SurveyQuestionOptionItem, { key: item.uniqueId, item: item }))));
3720
3727
  return (React.createElement("div", { className: cssClasses.selectWrapper },
3721
- selectElement,
3722
- this.createChevronButton()));
3728
+ React.createElement("div", { className: this.question.getControlClass() },
3729
+ selectElement,
3730
+ this.renderEditorButtons())));
3723
3731
  }
3724
- createChevronButton() {
3725
- if (!this.question.cssClasses.chevronButtonIconId)
3726
- return null;
3727
- return (React.createElement("div", { className: this.question.cssClasses.chevronButton, "aria-hidden": "true", onPointerDown: this.chevronPointerDown },
3728
- React.createElement(SvgIcon, { className: this.question.cssClasses.chevronButtonSvg, iconName: this.question.cssClasses.chevronButtonIconId, size: "auto" })));
3732
+ renderEditorButtons() {
3733
+ return React.createElement(SurveyActionBar, { model: this.question.inputActionBar });
3729
3734
  }
3730
3735
  }
3731
3736
  ReactQuestionFactory.Instance.registerQuestion("sv-dropdown-select", (props) => {
@@ -4272,21 +4277,20 @@ class SurveyQuestionText extends SurveyQuestionUncontrolledElement {
4272
4277
  if (this.question.isReadOnlyRenderDiv()) {
4273
4278
  return React.createElement("div", null, this.question.inputValue);
4274
4279
  }
4275
- const counter = !!this.question.getMaxLength() ? (React.createElement(CharacterCounterComponent, { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
4276
- return (React.createElement(React.Fragment, null,
4277
- React.createElement("input", { id: this.question.inputId,
4278
- // disabled={this.isDisplayMode}
4279
- disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: inputClass, type: this.question.inputType,
4280
- //ref={this.controlRef}
4281
- ref: (input) => (this.setControl(input)), style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: (event) => { this.question.onBlur(event); }, onFocus: (event) => { this.question.onFocus(event); }, onChange: this.question.onChange, onClick: this.question.readOnlyBlocker, onPointerDown: this.question.readOnlyBlocker, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: (event) => this.question.onCompositionUpdate(event.nativeEvent), "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 }),
4282
- counter));
4280
+ return (React.createElement("input", { id: this.question.inputId,
4281
+ // disabled={this.isDisplayMode}
4282
+ disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: inputClass, type: this.question.inputType,
4283
+ //ref={this.controlRef}
4284
+ ref: (input) => (this.setControl(input)), style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: (event) => { this.question.onBlur(event); }, onFocus: (event) => { this.question.onFocus(event); }, onChange: this.question.onChange, onClick: this.question.readOnlyBlocker, onPointerDown: this.question.readOnlyBlocker, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: (event) => this.question.onCompositionUpdate(event.nativeEvent), "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 }));
4285
+ }
4286
+ renderGroup() {
4287
+ return this.question.hasVisibleInputActions ? React.createElement(SurveyActionBar, { model: this.question.inputActionsContainer }) : null;
4283
4288
  }
4284
4289
  renderElement() {
4285
- return (this.question.dataListId ?
4286
- React.createElement("div", null,
4287
- this.renderInput(),
4288
- this.renderDataList()) :
4289
- this.renderInput());
4290
+ return (React.createElement("div", { className: this.question.getRootClass(), onClick: (event) => this.question.onContainerClick(event) },
4291
+ this.renderInput(),
4292
+ this.renderDataList(),
4293
+ this.renderGroup()));
4290
4294
  }
4291
4295
  setValueCore(newValue) {
4292
4296
  this.question.inputValue = newValue;
@@ -6124,6 +6128,36 @@ ReactElementFactory.Instance.registerElement("sv-skeleton", (props) => {
6124
6128
  return React.createElement(Skeleton, props);
6125
6129
  });
6126
6130
 
6131
+ class CharacterCounterComponent extends SurveyElementBase {
6132
+ get counter() {
6133
+ if (!!this.props.item) {
6134
+ return this.props.item.data.counter;
6135
+ }
6136
+ else {
6137
+ return this.props.counter;
6138
+ }
6139
+ }
6140
+ get remainingCharacterCounter() {
6141
+ if (!!this.props.item) {
6142
+ return this.props.item.data.remainingCharacterCounter;
6143
+ }
6144
+ else {
6145
+ return this.props.remainingCharacterCounter;
6146
+ }
6147
+ }
6148
+ getStateElement() {
6149
+ return this.counter;
6150
+ }
6151
+ renderElement() {
6152
+ if (!this.counter)
6153
+ return null;
6154
+ return (React.createElement("div", { className: this.remainingCharacterCounter }, this.counter.remainingCharacterCounter));
6155
+ }
6156
+ }
6157
+ ReactElementFactory.Instance.registerElement("sv-character-counter", (props) => {
6158
+ return React.createElement(CharacterCounterComponent, props);
6159
+ });
6160
+
6127
6161
  class HeaderMobile extends React.Component {
6128
6162
  get model() {
6129
6163
  return this.props.model;
@@ -6247,7 +6281,7 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6247
6281
  return React.createElement(SurveyLocStringEditor, props);
6248
6282
  });
6249
6283
 
6250
- checkLibraryVersion(`${"3.0.0-beta.0"}`, "survey-react-ui");
6284
+ checkLibraryVersion(`${"3.0.0-beta.1"}`, "survey-react-ui");
6251
6285
 
6252
6286
  export { CharacterCounterComponent, ComponentsContainer, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Survey, SurveyActionBar, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, 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, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click };
6253
6287
  //# sourceMappingURL=survey-react-ui.mjs.map