survey-js-ui 3.2.7 → 3.2.8

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
@@ -131,6 +131,27 @@ Adapters are available for [Bootstrap](https://getbootstrap.com) (plus Bootswatc
131
131
  - Multi-language forms and right-to-left language support
132
132
  - Community-supported UI localization
133
133
 
134
+ ## Missing API or found a bug?
135
+
136
+ SurveyJS fixes reported bugs and adds small API improvements (a property, an
137
+ event, an option) quickly, often in the next weekly release. If you had to work around SurveyJS in
138
+ your application code (private members, prototype patches, DOM or CSS changes inside
139
+ SurveyJS markup, timers that wait for survey state), please tell us instead of keeping
140
+ the workaround.
141
+
142
+ 1. Search existing issues: https://github.com/surveyjs/survey-library/issues
143
+ 2. Open an issue with: package versions, a minimal survey JSON, the workaround code you
144
+ wrote, and the API you expected.
145
+
146
+ ```sh
147
+ gh issue create --repo surveyjs/survey-library --title "[API gap] <short summary>" --body-file issue.md
148
+ ```
149
+
150
+ Use the `[Bug]` title prefix for defects. Please don't include application code,
151
+ credentials or data. Survey Creator issues go to
152
+ https://github.com/surveyjs/survey-creator/issues. Report security issues by email to
153
+ info@devsoftbaltic.com, not in public issues.
154
+
134
155
  ## Related packages
135
156
 
136
157
  | Package | Purpose |
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v3.2.7
2
+ * surveyjs - Survey JavaScript library v3.2.8
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
  */
@@ -156,10 +156,9 @@ class SurveyElementBase extends x$3 {
156
156
  }
157
157
  constructor(props) {
158
158
  super(props);
159
- this.allowUpdate = false;
160
159
  this.update = (stateElement, options) => {
161
160
  const key = options.name;
162
- if (!this.canUsePropInState(key) || !this.allowUpdate)
161
+ if (!this.canUsePropInState(key))
163
162
  return;
164
163
  this.changedStatePropNameValue = key;
165
164
  this.setState((state) => {
@@ -169,8 +168,8 @@ class SurveyElementBase extends x$3 {
169
168
  });
170
169
  };
171
170
  this.propertyAccessTracker = new PropertyAccessTracker(this.update);
171
+ this.rerenderEventStateElements = new Set();
172
172
  this._allowComponentUpdate = true;
173
- this.prevStateElements = [];
174
173
  const render = this.render;
175
174
  this.render = () => this.renderWithTracking(render);
176
175
  }
@@ -193,26 +192,30 @@ class SurveyElementBase extends x$3 {
193
192
  return res;
194
193
  }
195
194
  componentDidMount() {
196
- this.enableStateElementsRerenderEvent(this.getStateElements());
197
- this.allowUpdate = true;
195
+ this.syncStateElementsRerenderEvent();
198
196
  this.propertyAccessTracker.subscribe();
199
197
  }
200
198
  componentWillUnmount() {
201
- this.disableStateElementsRerenderEvent(this.getStateElements());
202
- this.allowUpdate = false;
199
+ this.disableStateElementsRerenderEvent(Array.from(this.rerenderEventStateElements));
200
+ this.rerenderEventStateElements.clear();
203
201
  this.propertyAccessTracker.unsubscribe();
204
202
  }
205
203
  componentDidUpdate(prevProps, prevState) {
206
- var _a;
207
204
  this.propertyAccessTracker.subscribe();
208
- this.enableStateElementsRerenderEvent(this.getStateElements());
209
- const stateElements = this.getStateElements();
210
- this.disableStateElementsRerenderEvent(((_a = this.prevStateElements) !== null && _a !== void 0 ? _a : []).filter(el => !stateElements.find(stateElement => stateElement == el)));
211
- this.prevStateElements = [];
212
- this.getStateElements().forEach((el) => {
205
+ const stateElements = this.syncStateElementsRerenderEvent();
206
+ stateElements.forEach((el) => {
213
207
  el.afterRerender();
214
208
  });
215
209
  }
210
+ syncStateElementsRerenderEvent() {
211
+ const stateElements = this.getStateElements();
212
+ const current = new Set(stateElements);
213
+ const prev = this.rerenderEventStateElements;
214
+ this.disableStateElementsRerenderEvent(Array.from(prev).filter(el => !current.has(el)));
215
+ this.enableStateElementsRerenderEvent(Array.from(current).filter(el => !prev.has(el)));
216
+ this.rerenderEventStateElements = current;
217
+ return stateElements;
218
+ }
216
219
  allowComponentUpdate() {
217
220
  this._allowComponentUpdate = true;
218
221
  this.forceUpdate();
@@ -221,11 +224,7 @@ class SurveyElementBase extends x$3 {
221
224
  this._allowComponentUpdate = false;
222
225
  }
223
226
  shouldComponentUpdate(nextProps, nextState) {
224
- const res = this._allowComponentUpdate && (this.state !== nextState || Object.keys(this.props).some(key => nextProps[key] !== this.props[key]));
225
- if (res) {
226
- this.prevStateElements = this.getStateElements();
227
- }
228
- return res;
227
+ return this._allowComponentUpdate && (this.state !== nextState || Object.keys(this.props).some(key => nextProps[key] !== this.props[key]));
229
228
  }
230
229
  forceHiddenDependencies() { }
231
230
  render() {
@@ -365,7 +364,7 @@ class SurveyQuestionUncontrolledElement extends SurveyQuestionElementBase {
365
364
  constructor(props) {
366
365
  super(props);
367
366
  this.updateValueOnEvent = (event) => {
368
- if (!Helpers.isTwoValueEquals(this.questionBase.value, event.target.value, false, true, false)) {
367
+ if (!Helpers.checkIfValuesEqual(this.questionBase.value, event.target.value, { ignoreOrder: false, caseSensitive: true, trimStrings: false })) {
369
368
  this.setValueCore(event.target.value);
370
369
  }
371
370
  };
@@ -387,7 +386,7 @@ class SurveyQuestionUncontrolledElement extends SurveyQuestionElementBase {
387
386
  if (!!this.control) {
388
387
  const control = this.control;
389
388
  const newValue = this.getValueCore();
390
- if (!Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
389
+ if (!Helpers.checkIfValuesEqual(newValue, control.value, { ignoreOrder: false, caseSensitive: true, trimStrings: false })) {
391
390
  control.value = this.getValue(newValue);
392
391
  }
393
392
  }
@@ -795,7 +794,6 @@ class TitleElement extends SurveyElementBase {
795
794
  class SurveyHeader extends SurveyElementBase {
796
795
  constructor(props) {
797
796
  super(props);
798
- this.state = { changed: 0 };
799
797
  this.rootRef = b$1();
800
798
  }
801
799
  get survey() {
@@ -807,11 +805,6 @@ class SurveyHeader extends SurveyElementBase {
807
805
  componentDidMount() {
808
806
  super.componentDidMount();
809
807
  this.survey.afterRenderHeader(this.rootRef.current);
810
- this.survey.locLogo.onChanged = () => { this.setState({ changed: this.state.changed + 1 }); };
811
- }
812
- componentWillUnmount() {
813
- super.componentWillUnmount();
814
- this.survey.locLogo.onChanged = function () { };
815
808
  }
816
809
  renderTitle() {
817
810
  if (!this.survey.renderedHasTitle)
@@ -1681,13 +1674,6 @@ class Survey extends SurveyElementBase {
1681
1674
  }
1682
1675
  if (newProps[key] === oldProps[key])
1683
1676
  continue;
1684
- if (key == "settings") {
1685
- // Data for the model's settings() method; assigning it would replace the method. An absent value applies nothing
1686
- if (newProps.settings !== undefined && newProps.settings !== null) {
1687
- this.survey.settings(newProps.settings);
1688
- }
1689
- continue;
1690
- }
1691
1677
  if (key.indexOf("on") == 0 && this.survey[key] && this.survey[key].add) {
1692
1678
  if (!!oldProps[key]) {
1693
1679
  this.survey[key].remove(oldProps[key]);
@@ -1922,17 +1908,9 @@ class SurveyRow extends SurveyElementBase {
1922
1908
  if (!this.row)
1923
1909
  return;
1924
1910
  this.row.changeUIMountCount(1);
1925
- var el = this.rootRef.current;
1926
1911
  if (this.rootRef.current) {
1927
1912
  this.row.setRootElement(this.rootRef.current);
1928
1913
  }
1929
- if (!!el && !this.row.isNeedRender) {
1930
- var row = this.row;
1931
- var rowContainerDiv = el;
1932
- this.lazyRenderingTimeout = setTimeout(() => {
1933
- row.startLazyRendering(rowContainerDiv);
1934
- }, 10);
1935
- }
1936
1914
  }
1937
1915
  shouldComponentUpdate(nextProps, nextState) {
1938
1916
  if (!super.shouldComponentUpdate(nextProps, nextState))
@@ -1950,7 +1928,6 @@ class SurveyRow extends SurveyElementBase {
1950
1928
  const prevRow = prevProps.row;
1951
1929
  if (prevRow === this.row)
1952
1930
  return;
1953
- clearTimeout(this.lazyRenderingTimeout);
1954
1931
  if (!!this.row) {
1955
1932
  this.row.changeUIMountCount(1);
1956
1933
  }
@@ -1958,7 +1935,6 @@ class SurveyRow extends SurveyElementBase {
1958
1935
  }
1959
1936
  componentWillUnmount() {
1960
1937
  super.componentWillUnmount();
1961
- clearTimeout(this.lazyRenderingTimeout);
1962
1938
  this.releaseRowIfUnmounted(this.row);
1963
1939
  }
1964
1940
  // Another component may still render the row (#10701), so only the last one to unmount resets it.
@@ -2056,12 +2032,7 @@ class SurveyPanelBase extends SurveyElementBase {
2056
2032
  doAfterRender() {
2057
2033
  var el = this.rootRef.current;
2058
2034
  if (el && this.survey) {
2059
- if (this.panelBase.isPanel) {
2060
- this.panelBase.afterRender(el);
2061
- }
2062
- else {
2063
- this.survey.afterRenderPage(el);
2064
- }
2035
+ this.panelBase.afterRender(el);
2065
2036
  }
2066
2037
  }
2067
2038
  getIsVisible() {
@@ -3404,7 +3375,7 @@ class TagboxFilterString extends SurveyElementBase {
3404
3375
  if (!!this.inputElement) {
3405
3376
  const control = this.inputElement;
3406
3377
  const newValue = this.renderState.inputStringRendered;
3407
- if (!Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
3378
+ if (!Helpers.checkIfValuesEqual(newValue, control.value, { ignoreOrder: false, caseSensitive: true, trimStrings: false })) {
3408
3379
  control.value = this.renderState.inputStringRendered;
3409
3380
  }
3410
3381
  }
@@ -3634,7 +3605,7 @@ class SurveyQuestionDropdownBase extends SurveyQuestionUncontrolledElement {
3634
3605
  if (!!this.inputElement) {
3635
3606
  const control = this.inputElement;
3636
3607
  const newValue = this.renderState.inputStringRendered;
3637
- if (!Helpers.isTwoValueEquals(newValue, control.value, false, true, false)) {
3608
+ if (!Helpers.checkIfValuesEqual(newValue, control.value, { ignoreOrder: false, caseSensitive: true, trimStrings: false })) {
3638
3609
  control.value = this.renderState.inputStringRendered;
3639
3610
  }
3640
3611
  }
@@ -3954,28 +3925,11 @@ class SurveyQuestionHtml extends SurveyQuestionElementBase {
3954
3925
  get question() {
3955
3926
  return this.questionBase;
3956
3927
  }
3957
- componentDidMount() {
3958
- super.componentDidMount();
3959
- this.reactOnStrChanged();
3960
- }
3961
- componentWillUnmount() {
3962
- super.componentWillUnmount();
3963
- this.question.locHtml.onChanged = function () { };
3964
- }
3965
- componentDidUpdate(prevProps, prevState) {
3966
- super.componentDidUpdate(prevProps, prevState);
3967
- this.reactOnStrChanged();
3968
- }
3969
- reactOnStrChanged() {
3970
- this.question.locHtml.onChanged = () => {
3971
- this.setState({ changed: !!this.state && this.state.changed ? this.state.changed + 1 : 1 });
3972
- };
3973
- }
3974
3928
  canRender() {
3975
3929
  return super.canRender() && !!this.question.html;
3976
3930
  }
3977
3931
  renderElement() {
3978
- var htmlValue = { __html: this.question.locHtml.renderedHtml };
3932
+ var htmlValue = { __html: this.question.renderedHtml };
3979
3933
  return (_$1("div", { className: this.question.renderCssRoot, dangerouslySetInnerHTML: htmlValue }));
3980
3934
  }
3981
3935
  }
@@ -4434,6 +4388,10 @@ class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean {
4434
4388
  super(props);
4435
4389
  }
4436
4390
  renderElement() {
4391
+ if (this.question.isCheckboxView && this.question.booleanValue !== true && !this.question.isLabelRendered) {
4392
+ return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId }, this.question.checkboxViewText));
4393
+ }
4394
+ const showDash = this.question.isCheckboxView && this.question.booleanValue !== true;
4437
4395
  const cssClasses = this.question.cssClasses;
4438
4396
  const itemClass = this.question.getCheckboxItemCss();
4439
4397
  const description = this.question.canRenderLabelDescription ?
@@ -4441,14 +4399,14 @@ class SurveyQuestionBooleanCheckbox extends SurveyQuestionBoolean {
4441
4399
  return (_$1("div", { className: cssClasses.rootCheckbox, onKeyDown: (event) => { var _a; return this.question.onKeyDown((_a = event.nativeEvent) !== null && _a !== void 0 ? _a : event); } },
4442
4400
  _$1("div", { className: itemClass },
4443
4401
  _$1("label", { className: cssClasses.checkboxLabel },
4444
- _$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
4402
+ showDash ? null : _$1("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
4445
4403
  ? ""
4446
- : this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "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 }),
4447
- _$1("span", { className: cssClasses.checkboxMaterialDecorator, "aria-hidden": "true" },
4404
+ : this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, tabIndex: this.question.isCheckboxView ? -1 : undefined, onChange: this.handleOnChange, "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 }),
4405
+ showDash ? (_$1("span", { className: this.question.viewModeCssClass, id: this.question.inputId }, this.question.checkboxViewText)) : (_$1("span", { className: cssClasses.checkboxMaterialDecorator, "aria-hidden": "true" },
4448
4406
  this.question.svgIcon ?
4449
4407
  _$1("svg", { className: cssClasses.checkboxItemDecorator },
4450
4408
  _$1("use", { xlinkHref: this.question.svgIcon })) : null,
4451
- _$1("span", { className: "check" })),
4409
+ _$1("span", { className: "check" }))),
4452
4410
  this.question.isLabelRendered && (_$1("span", { className: cssClasses.checkboxControlLabel, id: this.question.labelRenderedAriaID },
4453
4411
  _$1(TitleActions, { element: this.question, cssClasses: this.question.cssClasses })))),
4454
4412
  description)));
@@ -4482,7 +4440,7 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
4482
4440
  renderElement() {
4483
4441
  const cssClasses = this.question.cssClasses;
4484
4442
  return (_$1("div", { className: cssClasses.rootRadio, onKeyDown: this.handleOnKeyDown },
4485
- _$1("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
4443
+ _$1("fieldset", { className: cssClasses.radioFieldset, role: "radiogroup", "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 }, !this.question.swapOrder ?
4486
4444
  (_$1(k$3, null,
4487
4445
  this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
4488
4446
  this.renderRadioItem(this.question.getValueTrue(), this.question.locLabelTrue)))
@@ -5763,7 +5721,7 @@ class SurveyQuestionImagePicker extends SurveyQuestionElementBase {
5763
5721
  const isVideo = this.question.contentMode === "video";
5764
5722
  const style = { objectFit: this.question.imageFit };
5765
5723
  return (_$1("div", { className: this.question.getSelectBaseRootCss(), id: this.question.inputId, ref: (root) => (this.setControl(root)) }, items.map((item) => {
5766
- const src = item.locImageLink.renderedHtml;
5724
+ const src = item.renderedImageURL;
5767
5725
  const width = this.question.renderedImageWidth;
5768
5726
  const height = this.question.renderedImageHeight;
5769
5727
  if (isVideo) {
@@ -5809,23 +5767,6 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
5809
5767
  getStateElement() {
5810
5768
  return this.item;
5811
5769
  }
5812
- componentDidMount() {
5813
- super.componentDidMount();
5814
- this.reactOnStrChanged();
5815
- }
5816
- componentWillUnmount() {
5817
- super.componentWillUnmount();
5818
- this.item.locImageLink.onChanged = function () { };
5819
- }
5820
- componentDidUpdate(prevProps, prevState) {
5821
- super.componentDidUpdate(prevProps, prevState);
5822
- this.reactOnStrChanged();
5823
- }
5824
- reactOnStrChanged() {
5825
- this.item.locImageLink.onChanged = () => {
5826
- this.setState({ locImageLinkchanged: !!this.state && this.state.locImageLink ? this.state.locImageLink + 1 : 1 });
5827
- };
5828
- }
5829
5770
  get cssClasses() {
5830
5771
  return this.props.cssClasses;
5831
5772
  }
@@ -5871,13 +5812,13 @@ class SurveyQuestionImagePickerItem extends ReactSurveyElement {
5871
5812
  }
5872
5813
  var style = { objectFit: this.question.imageFit };
5873
5814
  var control = null;
5874
- if (item.locImageLink.renderedHtml && this.question.contentMode === "image") {
5875
- control = (_$1("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: (event) => { this.question["onContentLoaded"](item, event.nativeEvent); }, onError: (event) => { item.onErrorHandler(item, event.nativeEvent); } }));
5815
+ if (item.renderedImageURL && this.question.contentMode === "image") {
5816
+ control = (_$1("img", { className: cssClasses.image, src: item.renderedImageURL, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: (event) => { this.question["onContentLoaded"](item, event.nativeEvent); }, onError: (event) => { item.onErrorHandler(item, event.nativeEvent); } }));
5876
5817
  }
5877
- if (item.locImageLink.renderedHtml && this.question.contentMode === "video") {
5878
- control = (_$1("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: (event) => { this.question["onContentLoaded"](item, event.nativeEvent); }, onError: (event) => { item.onErrorHandler(item, event.nativeEvent); } }));
5818
+ if (item.renderedImageURL && this.question.contentMode === "video") {
5819
+ control = (_$1("video", { controls: true, className: cssClasses.image, src: item.renderedImageURL, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: (event) => { this.question["onContentLoaded"](item, event.nativeEvent); }, onError: (event) => { item.onErrorHandler(item, event.nativeEvent); } }));
5879
5820
  }
5880
- if (!item.locImageLink.renderedHtml || item.contentNotLoaded) {
5821
+ if (!item.renderedImageURL || item.contentNotLoaded) {
5881
5822
  let style = {
5882
5823
  width: this.question.renderedImageWidth,
5883
5824
  height: this.question.renderedImageHeight,
@@ -5932,16 +5873,6 @@ class SurveyQuestionImage extends SurveyQuestionElementBase {
5932
5873
  constructor(props) {
5933
5874
  super(props);
5934
5875
  }
5935
- componentDidMount() {
5936
- super.componentDidMount();
5937
- this.question.locImageLink.onChanged = () => {
5938
- this.forceUpdate();
5939
- };
5940
- }
5941
- componentWillUnmount() {
5942
- super.componentWillUnmount();
5943
- this.question.locImageLink.onChanged = () => { };
5944
- }
5945
5876
  get question() {
5946
5877
  return this.questionBase;
5947
5878
  }
@@ -5953,13 +5884,13 @@ class SurveyQuestionImage extends SurveyQuestionElementBase {
5953
5884
  }
5954
5885
  var control = null;
5955
5886
  if (this.question.renderedMode === "image") {
5956
- control = (_$1("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml || null, alt: this.question.renderedAltText, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoad: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
5887
+ control = (_$1("img", { className: cssClasses, src: this.question.renderedImageURL || null, alt: this.question.renderedAltText, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoad: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
5957
5888
  }
5958
5889
  if (this.question.renderedMode === "video") {
5959
- control = (_$1("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
5890
+ control = (_$1("video", { controls: true, className: cssClasses, src: this.question.renderedImageURL, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: (event) => { this.question.onLoadHandler(); }, onError: (event) => { this.question.onErrorHandler(); } }));
5960
5891
  }
5961
5892
  if (this.question.renderedMode === "youtube") {
5962
- control = (_$1("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, title: this.question.renderedAltText }));
5893
+ control = (_$1("iframe", { className: cssClasses, src: this.question.renderedImageURL, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, title: this.question.renderedAltText }));
5963
5894
  }
5964
5895
  var noImage = null;
5965
5896
  if (!this.question.imageLink || this.question.contentNotLoaded) {
@@ -6082,7 +6013,7 @@ class SurveyFilterModal extends SurveyElementBase {
6082
6013
  return _$1("div", { className: css.modalSection },
6083
6014
  _$1("div", { className: searchCss.root },
6084
6015
  _$1(SvgIcon, { className: css.searchIcon, iconName: "icon-search-24x24", size: "auto" }),
6085
- _$1("input", { type: "text", className: searchCss.control, value: modal.filterText, placeholder: modal.searchPlaceholder, "aria-label": modal.searchPlaceholder, onChange: (e) => { modal.filterText = e.target.value; } }),
6016
+ _$1("input", { type: "text", autoComplete: "off", className: searchCss.control, value: modal.filterText, placeholder: modal.searchPlaceholder, "aria-label": modal.searchPlaceholder, onChange: (e) => { modal.filterText = e.target.value; } }),
6086
6017
  modal.showSearchClear ? _$1(SurveyActionBarItem, { item: modal.searchClearAction }) : null));
6087
6018
  }
6088
6019
  renderPresets(modal) {
@@ -6180,7 +6111,7 @@ class SurveyFilterFieldPopup extends SurveyElementBase {
6180
6111
  const css = popup.cssClasses;
6181
6112
  return _$1("div", { className: css.popupSearch },
6182
6113
  _$1(SvgIcon, { className: css.popupSearchIcon, iconName: "icon-search-24x24", size: "auto" }),
6183
- _$1("input", { type: "text", className: css.popupSearchInput, value: list.filterString || "", placeholder: list.filterStringPlaceholder, "aria-label": list.filterStringPlaceholder, onChange: (e) => { list.filterString = e.target.value; }, onKeyDown: (e) => { popup.onSearchKeyDown(e.nativeEvent); } }));
6114
+ _$1("input", { type: "text", autoComplete: "off", className: css.popupSearchInput, value: list.filterString || "", placeholder: list.filterStringPlaceholder, "aria-label": list.filterStringPlaceholder, onChange: (e) => { list.filterString = e.target.value; }, onKeyDown: (e) => { popup.onSearchKeyDown(e.nativeEvent); } }));
6184
6115
  }
6185
6116
  renderElement() {
6186
6117
  const popup = this.popup;
@@ -6310,14 +6241,14 @@ class SurveyQuestionFilter extends SurveyQuestionElementBase {
6310
6241
  }
6311
6242
  renderSearch() {
6312
6243
  const q = this.question;
6313
- if (!q.showSearch)
6244
+ if (!q.showSearchBar)
6314
6245
  return null;
6315
6246
  const css = q.cssClasses;
6316
6247
  const searchCss = q.searchCss;
6317
6248
  return _$1("div", { className: css.searchRow },
6318
6249
  _$1("div", { className: q.searchRootCss },
6319
6250
  _$1(SvgIcon, { className: css.searchIcon, iconName: "icon-search-24x24", size: "auto" }),
6320
- _$1("input", { type: "text", className: searchCss.control, value: q.searchString, placeholder: q.searchPlaceholder, "aria-label": q.searchLabel, disabled: q.isSearchDisabled, onChange: (e) => { q.searchString = e.target.value; } }),
6251
+ _$1("input", { type: "text", autoComplete: "off", className: searchCss.control, value: q.searchString, placeholder: q.searchPlaceholder, "aria-label": q.searchLabel, disabled: q.isSearchDisabled, onChange: (e) => { q.searchString = e.target.value; } }),
6321
6252
  q.showSearchClear ? _$1(SurveyActionBarItem, { item: q.searchClearAction }) : null),
6322
6253
  _$1(SurveyActionBar, { model: q.searchToolbar }));
6323
6254
  }
@@ -6437,7 +6368,7 @@ class SurveyButtonGroupItem extends SurveyElementBase {
6437
6368
  return null;
6438
6369
  }
6439
6370
  renderInput() {
6440
- return (_$1("input", { className: this.model.css.control, id: this.model.id, type: "radio", name: this.model.name, checked: this.model.selected, value: this.model.value, disabled: this.model.readOnly, onChange: () => {
6371
+ return (_$1("input", { className: this.model.css.control, id: this.model.id, type: "radio", name: this.model.name, checked: this.model.selected, value: this.model.value, disabled: this.model.disabled, readOnly: this.question.isReadOnlyAttr, onChange: () => {
6441
6372
  this.model.onChange();
6442
6373
  }, "aria-required": this.model.isRequired, "aria-label": this.model.caption.renderedHtml, "aria-invalid": this.model.hasErrors, "aria-errormessage": this.model.describedBy }));
6443
6374
  }
@@ -6601,29 +6532,14 @@ ReactElementFactory.Instance.registerElement("sv-sort-bar-level", (props) => {
6601
6532
  class LogoImage extends SurveyElementBase {
6602
6533
  constructor(props) {
6603
6534
  super(props);
6604
- this.reactOnStrChanged = () => {
6605
- this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
6606
- };
6607
6535
  }
6608
6536
  get survey() {
6609
6537
  return this.props.data;
6610
6538
  }
6611
- componentDidMount() {
6612
- super.componentDidMount();
6613
- this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
6614
- }
6615
- componentDidUpdate(prevProps, prevState) {
6616
- super.componentDidUpdate(prevProps, prevState);
6617
- this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
6618
- }
6619
- componentWillUnmount() {
6620
- super.componentWillUnmount();
6621
- this.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
6622
- }
6623
6539
  renderElement() {
6624
6540
  const content = [];
6625
6541
  content.push(_$1("div", { key: "logo-image", className: this.survey.logoClassNames },
6626
- _$1("img", { className: this.survey.css.logoImage, src: this.survey.locLogo.renderedHtml || null, alt: this.survey.locTitle.renderedHtml, width: this.survey.renderedLogoWidth, height: this.survey.renderedLogoHeight, style: { objectFit: this.survey.logoFit, width: this.survey.renderedStyleLogoWidth, height: this.survey.renderedStyleLogoHeight } })));
6542
+ _$1("img", { className: this.survey.css.logoImage, src: this.survey.renderedLogoURL || null, role: "presentation", width: this.survey.renderedLogoWidth, height: this.survey.renderedLogoHeight, style: { objectFit: this.survey.logoFit, width: this.survey.renderedStyleLogoWidth, height: this.survey.renderedStyleLogoHeight } })));
6627
6543
  return _$1(k$3, null, content);
6628
6544
  }
6629
6545
  }
@@ -6888,6 +6804,41 @@ ReactElementFactory.Instance.registerElement(LocalizableString.editableRenderer,
6888
6804
  return _$1(SurveyLocStringEditor, props);
6889
6805
  });
6890
6806
 
6807
+ const installed = [];
6808
+ /* A component that re-renders on its own (setState, forceUpdate) gets a shallow copy of its vnode, diffed and put in
6809
+ its parent's _children. The vnode the copy replaces is still in the props.children of the vnode that rendered it,
6810
+ and Preact clears only its _dom and _parent: its _children keeps the subtree it rendered, with the DOM nodes,
6811
+ detached as the component goes on rendering. Where shouldComponentUpdate returns false, a vnode and its successor
6812
+ share one _children array, so the replaced subtrees chain up and the detached DOM grows with every re-render: a
6813
+ sort of a dynamic matrix keeps the cells it hides and the actions it rebuilds. React keeps no such references.
6814
+ The copy reaches options.vnode before the diff, while its component still points to the vnode it replaces (and the
6815
+ two share _children); the diff is the last reader of the replaced vnode's _children, so the commit drops them. */
6816
+ function releaseReplacedVNodes(opts = l$1) {
6817
+ if (installed.indexOf(opts) > -1)
6818
+ return;
6819
+ installed.push(opts);
6820
+ const replaced = [];
6821
+ const prevVNode = opts.vnode;
6822
+ opts.vnode = (vnode) => {
6823
+ const component = vnode.__c;
6824
+ const prev = !!component ? component.__v : undefined;
6825
+ if (!!prev && prev !== vnode && !!prev.__k && prev.__k === vnode.__k) {
6826
+ replaced.push(prev);
6827
+ }
6828
+ if (!!prevVNode)
6829
+ prevVNode(vnode);
6830
+ };
6831
+ const prevCommit = opts.__c;
6832
+ opts.__c = (root, commitQueue) => {
6833
+ for (let i = 0; i < replaced.length; i++) {
6834
+ replaced[i].__k = null;
6835
+ }
6836
+ replaced.length = 0;
6837
+ if (!!prevCommit)
6838
+ prevCommit(root, commitQueue);
6839
+ };
6840
+ }
6841
+
6891
6842
  function renderSurvey(model, element, props = {}) {
6892
6843
  const survey = _$1(Survey, { model, ...props });
6893
6844
  nn$1(survey, element);
@@ -6927,6 +6878,7 @@ function initJquery(instance) {
6927
6878
  SurveyWindow: doPopupSurvey
6928
6879
  });
6929
6880
  }
6881
+ releaseReplacedVNodes();
6930
6882
  SurveyModel.platform = "js-ui";
6931
6883
  SurveyModel.prototype["render"] = function (element = null) {
6932
6884
  if (this.renderCallback) {
@@ -6937,7 +6889,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6937
6889
  }
6938
6890
  };
6939
6891
  const preact = React;
6940
- checkLibraryVersion(`${"3.2.7"}`, "survey-js-ui");
6892
+ checkLibraryVersion(`${"3.2.8"}`, "survey-js-ui");
6941
6893
 
6942
6894
  export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, ListLoading, 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, SurveyFilterChip, SurveyFilterFieldPopup, SurveyFilterListItem, SurveyFilterModal, SurveyFilterPresetDialog, SurveyFilterSaveAsPopup, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyMatrixHeaderSortButton, 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, SurveyQuestionFilter, 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, SurveyQuestionView, SurveyRow, SurveySortBarLevel, 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 };
6943
6895
  //# sourceMappingURL=survey-js-ui.mjs.map