survey-js-ui 3.2.3 → 3.2.5

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.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/fesm/survey-js-ui.mjs +286 -208
  3. package/fesm/survey-js-ui.mjs.map +1 -1
  4. package/package.json +2 -2
  5. package/survey-js-ui.js +286 -207
  6. package/survey-js-ui.js.map +1 -1
  7. package/survey-js-ui.min.js +2 -2
  8. package/typings/survey-react-ui/entries/react-ui-model.d.ts +2 -1
  9. package/typings/survey-react-ui/src/components/components-container.d.ts +3 -2
  10. package/typings/survey-react-ui/src/components/file/file-choose-button.d.ts +1 -1
  11. package/typings/survey-react-ui/src/components/header.d.ts +5 -4
  12. package/typings/survey-react-ui/src/components/list/list-item-content.d.ts +1 -1
  13. package/typings/survey-react-ui/src/components/list/list-item-group.d.ts +1 -1
  14. package/typings/survey-react-ui/src/components/list/list-item.d.ts +1 -1
  15. package/typings/survey-react-ui/src/components/list/list-loading.d.ts +12 -0
  16. package/typings/survey-react-ui/src/components/list/list.d.ts +2 -1
  17. package/typings/survey-react-ui/src/components/matrix/row.d.ts +1 -1
  18. package/typings/survey-react-ui/src/components/popup/popup.d.ts +2 -2
  19. package/typings/survey-react-ui/src/components/question-hint.d.ts +9 -0
  20. package/typings/survey-react-ui/src/components/rating/rating-dropdown-item.d.ts +1 -1
  21. package/typings/survey-react-ui/src/components/rating/rating-item-smiley.d.ts +1 -1
  22. package/typings/survey-react-ui/src/components/rating/rating-item-star.d.ts +1 -1
  23. package/typings/survey-react-ui/src/components/rating/rating-item.d.ts +1 -2
  24. package/typings/survey-react-ui/src/components/survey-header/logo-image.d.ts +7 -2
  25. package/typings/survey-react-ui/src/components/survey-header/survey-header.d.ts +3 -2
  26. package/typings/survey-react-ui/src/components/title/title-actions.d.ts +3 -2
  27. package/typings/survey-react-ui/src/components/title/title-content.d.ts +3 -2
  28. package/typings/survey-react-ui/src/components/title/title-element.d.ts +3 -2
  29. package/typings/survey-react-ui/src/imagepicker.d.ts +1 -0
  30. package/typings/survey-react-ui/src/progress.d.ts +1 -1
  31. package/typings/survey-react-ui/src/progressButtons.d.ts +1 -1
  32. package/typings/survey-react-ui/src/progressToc.d.ts +1 -1
  33. package/typings/survey-react-ui/src/reactSurvey.d.ts +1 -0
  34. package/typings/survey-react-ui/src/reactquestion.d.ts +0 -2
  35. package/typings/survey-react-ui/src/reactquestion_comment.d.ts +2 -0
  36. package/typings/survey-react-ui/src/reactquestion_element.d.ts +7 -10
  37. package/typings/survey-react-ui/src/reactquestion_matrixdropdownbase.d.ts +0 -4
  38. package/typings/survey-react-ui/src/reactquestion_paneldynamic.d.ts +14 -5
  39. package/typings/survey-react-ui/src/reactquestion_view.d.ts +7 -0
  40. package/typings/survey-react-ui/src/reacttimerpanel.d.ts +1 -1
  41. package/typings/survey-react-ui/src/row.d.ts +2 -1
  42. package/typings/survey-react-ui/src/tagbox-filter.d.ts +1 -1
  43. package/typings/survey-react-ui/src/components/records-sort-dialog.d.ts +0 -12
package/survey-js-ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v3.2.3
2
+ * surveyjs - Survey JavaScript library v3.2.5
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
  */
@@ -10,7 +10,7 @@
10
10
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SurveyUI = {}, global.Survey));
11
11
  })(this, (function (exports, surveyCore) { 'use strict';
12
12
 
13
- var n,l$1,u$1,i$1,r$1,o$1,e$1,f$1,c$1,s$1,a$1,h$1,p$1={},v$1=[],y$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w$2=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function g$2(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _$1(l,u,t){var i,r,o,e={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m$1(l,e,i,r,null)}function m$1(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u$1:o,__i:-1,__u:0};return null==o&&null!=l$1.vnode&&l$1.vnode(e),e}function b$1(){return {current:null}}function k$2(n){return n.children}function x$2(n,l){this.props=n,this.context=l;}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?S(n):null}function C$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$2(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!$$1.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($$1);}function $$1(){for(var n,u,t,r,o,f,c,s=1;i$1.length;)i$1.length>s&&i$1.sort(e$1),n=i$1.shift(),s=i$1.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(t),O$1(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N$1(f,t,c),r.__e=r.__=null,t.__e!=o&&C$2(t)));$$1.__r=0;}function I$1(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v$1,b=l.length;for(f=P$2(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p$1:m[y.__i]||p$1,y.__i=a,g=O$1(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$2(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A$2(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P$2(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m$1(null,o,null,null,null):w$2(o)?m$1(k$2,{children:o},null,null,null):null==o.constructor&&o.__b>0?m$1(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L$1(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D$2(e,e));return t}function A$2(n,l,u,t){var i,r;if("function"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A$2(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8==l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(w$2(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return -1}function T$2(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y$1.test(l)?u:u+"px";}function j$2(n,l,u,t,i){var r,o;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$2(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$2(n.style,l,u[l]);}else if("o"==l[0]&&"n"==l[1])r=l!=(l=l.replace(f$1,"$1")),o=l.toLowerCase(),l=o in n||"onFocusOut"==l||"onFocusIn"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c$1,n.addEventListener(l,r?a$1:s$1,r)):n.removeEventListener(l,r?a$1:s$1,r);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F$2(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x$2(b,M),h.constructor=j,h.render=E$1),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d$1({},h.__s)),d$1(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_);});}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l$1.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d$1(d$1({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$2&&null==a.key&&(L=V$1(a.props.children)),f=I$1(n,w$2(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f;}else {for(T=o.length;T--;)g$2(o[T]);z$2(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$2(u);l$1.__e(n,u,t);}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q$2(t.__e,u,t,i,r,o,e,c,s);return (a=l$1.diffed)&&a(u),128&u.__u?void 0:f}function z$2(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z$2);}function N$1(n,u,t){for(var i=0;i<t.length;i++)B$2(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function V$1(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:w$2(n)?n.map(V$1):d$1({},n)}function q$2(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&"setAttribute"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l$1.__m&&l$1.__m(t,e),c=!1),e=null;}if(null==x)b===k||c&&u.data==k||(u.data=k);else {if(e=e&&n.call(u.childNodes),b=i.props||p$1,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=d;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j$2(u,a,null,d,o);}for(a in k)d=k[a],"children"==a?y=d:"dangerouslySetInnerHTML"==a?h=d:"value"==a?_=d:"checked"==a?m=d:c&&"function"!=typeof d||b[a]===d||j$2(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I$1("template"==t.type?u.content:u,w$2(y)?y:[y],t,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g$2(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$2(u,a,_,b[a],o),a="checked",null!=m&&m!=u[a]&&j$2(u,a,m,b[a],o));}return u}function B$2(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function D$2(n,u,t){var i,r;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$2(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D$2(i[r],u,t||"function"!=typeof n.type);t||g$2(n.__e),n.__c=n.__=n.__e=void 0;}function E$1(n,l,u){return this.constructor(n,u)}function G$1(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l$1.__&&l$1.__(u,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O$1(t,u=(!r&&i||t).__k=_$1(k$2,null,[u]),o||p$1,p$1,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),N$1(e,u,f);}function J$1(n,l){G$1(n,l,J$1);}function K$1(l,u,t){var i,r,o,e,f=d$1({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==o?i=u[o]:"ref"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m$1(l.type,f,i||l.key,r||l.ref,null)}function Q$1(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n);};}),n.children}return l.__c="__cC"+h$1++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,x$2.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d$1({},this.state),"function"==typeof n&&(n=n(d$1({},u),this.props)),n&&d$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},x$2.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},x$2.prototype.render=k$2,i$1=[],o$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n,l){return n.__v.__b-l.__v.__b},$$1.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$2(!1),a$1=F$2(!0),h$1=0;
13
+ var n,l$1,u$1,i$1,o$1,r$1,e$1,f$1,c$1,s$1,a$1,h$1,p$1={},v$1=[],y$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d$1=Array.isArray;function w$2(n,l){for(var u in l)n[u]=l[u];return n}function g$2(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _$1(l,u,t){var i,o,r,e={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=u[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m$1(l,e,i,o,null)}function m$1(n,t,i,o,r){var e={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(e),e}function b$1(){return {current:null}}function k$2(n){return n.children}function x$2(n,l){this.props=n,this.context=l;}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?S(n):null}function C$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$2(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!$$1.__r++||o$1!=l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)($$1);}function $$1(){for(var n,u,t,o,r,f,c,s=1;i$1.length;)i$1.length>s&&i$1.sort(e$1),n=i$1.shift(),s=i$1.length,n.__d&&(t=void 0,o=void 0,r=(o=(u=n).__v).__e,f=[],c=[],u.__P&&((t=w$2({},o)).__v=o.__v+1,l$1.vnode&&l$1.vnode(t),O$1(u.__P,t,o,u.__n,u.__P.namespaceURI,32&o.__u?[r]:null,f,null==r?S(o):r,!!(32&o.__u),c),t.__v=o.__v,t.__.__k[t.__i]=t,N$1(f,t,c),o.__e=o.__=null,t.__e!=r&&C$2(t)));$$1.__r=0;}function I$1(n,l,u,t,i,o,r,e,f,c,s){var a,h,y,d,w,g,_,m=t&&t.__k||v$1,b=l.length;for(f=P$2(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p$1:m[y.__i]||p$1,y.__i=a,g=O$1(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$2(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),(_=!!(4&y.__u))||h.__k===y.__k?f=A$2(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:d&&(f=d.nextSibling),y.__u&=-7);return u.__e=w,f}function P$2(n,l,u,t,i){var o,r,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),o=0;o<i;o++)null!=(r=l[o])&&"boolean"!=typeof r&&"function"!=typeof r?(f=o+h,(r=n.__k[o]="string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?m$1(null,r,null,null,null):d$1(r)?m$1(k$2,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?m$1(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=n,r.__b=n.__b+1,e=null,-1!=(c=r.__i=L$1(r,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof r.type&&(r.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,r.__u|=4))):n.__k[o]=null;if(a)for(o=0;o<s;o++)null!=(e=u[o])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D$2(e,e));return t}function A$2(n,l,u,t){var i,o;if("function"==typeof n.type){for(i=n.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=n,l=A$2(i[o],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8==l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(d$1(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i,o,r,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,o=u+1;i>=0||o<l.length;)if(null!=(c=l[r=i>=0?i--:o++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return r;return -1}function T$2(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y$1.test(l)?u:u+"px";}function j$2(n,l,u,t,i){var o,r;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$2(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$2(n.style,l,u[l]);}else if("o"==l[0]&&"n"==l[1])o=l!=(l=l.replace(f$1,"$1")),r=l.toLowerCase(),l=r in n||"onFocusOut"==l||"onFocusIn"==l?r.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=c$1,n.addEventListener(l,o?a$1:s$1,o)):n.removeEventListener(l,o?a$1:s$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F$2(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,o,r,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[f=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x$2(b,M),h.constructor=j,h.render=E$1),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w$2({},h.__s)),w$2(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_);});}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l$1.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=w$2(w$2({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$2&&null==a.key&&(L=V$1(a.props.children)),f=I$1(n,d$1(L)?L:[L],u,t,i,o,r,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,u.__e=f;}else {for(T=r.length;T--;)g$2(r[T]);z$2(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$2(u);l$1.__e(n,u,t);}else null==r&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q$2(t.__e,u,t,i,o,r,e,c,s);return (a=l$1.diffed)&&a(u),128&u.__u?void 0:f}function z$2(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z$2);}function N$1(n,u,t){for(var i=0;i<t.length;i++)B$2(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function V$1(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:d$1(n)?n.map(V$1):w$2({},n)}function q$2(u,t,i,o,r,e,f,c,s){var a,h,v,y,w,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?r="http://www.w3.org/2000/svg":"math"==x?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!x&&(x?w.localName==x:3==w.nodeType)){u=w,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(r,x,k.is&&k),c&&(l$1.__m&&l$1.__m(t,e),c=!1),e=null;}if(null==x)b===k||c&&u.data==k||(u.data=k);else {if(e=e&&n.call(u.childNodes),b=i.props||p$1,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(w=u.attributes[a]).name]=w.value;for(a in b)if(w=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j$2(u,a,null,w,r);}for(a in k)w=k[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?_=w:"checked"==a?m=w:c&&"function"!=typeof w||b[a]===w||j$2(u,a,w,b[a],r);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I$1("template"==t.type?u.content:u,d$1(y)?y:[y],t,i,o,"foreignObject"==x?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g$2(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$2(u,a,_,b[a],r),a="checked",null!=m&&m!=u[a]&&j$2(u,a,m,b[a],r));}return u}function B$2(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function D$2(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$2(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&D$2(i[o],u,t||"function"!=typeof n.type);t||g$2(n.__e),n.__c=n.__=n.__e=void 0;}function E$1(n,l,u){return this.constructor(n,u)}function G$1(u,t,i){var o,r,e,f;t==document&&(t=document.documentElement),l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O$1(t,u=(!o&&i||t).__k=_$1(k$2,null,[u]),r||p$1,p$1,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,e,!o&&i?i:r?r.__e:t.firstChild,o,f),N$1(e,u,f);}function J$1(n,l){G$1(n,l,J$1);}function K$1(l,u,t){var i,o,r,e,f=w$2({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=void 0===u[r]&&null!=e?e[r]:u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m$1(l.type,f,i||l.key,o||l.ref,null)}function Q$1(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n);};}),n.children}return l.__c="__cC"+h$1++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,x$2.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w$2({},this.state),"function"==typeof n&&(n=n(w$2({},u),this.props)),n&&w$2(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},x$2.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},x$2.prototype.render=k$2,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n,l){return n.__v.__b-l.__v.__b},$$1.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$2(!1),a$1=F$2(!0),h$1=0;
14
14
 
15
15
  var t,r,u,i,o=0,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,h(D$1,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D$1(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return !!n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function y(n,u){var i=p(t++,3);!c.__s&&C$1(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i));}function _(n,u){var i=p(t++,4);!c.__s&&C$1(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i));}function A$1(n){return o=5,T$1(function(){return {current:n}},[])}function F$1(n,t,r){o=6,_(function(){if("function"==typeof n){var r=n(t());return function(){n(null),r&&"function"==typeof r&&r();}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n));}function T$1(n,r){var u=p(t++,7);return C$1(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q$1(n,t){return o=8,T$1(function(){return n},t)}function x$1(n){var u=r.context[n.__c],i=p(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P$1(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n);}function b(n){var u=p(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n);}),[i[0],function(){i[1](void 0);}]}function g$1(){var n=p(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++;}return n.__}function j$1(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$1),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(i.__h.forEach(z$1),i.__h.forEach(B$1),i.__h=[],t=0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w$1)(j$1)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z$1),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z$1(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k$1="function"==typeof requestAnimationFrame;function w$1(n){var t,r=function(){clearTimeout(u),k$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,35);k$1&&(t=requestAnimationFrame(r));}function z$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}function C$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D$1(n,t){return "function"==typeof t?t(n):t}
16
16
 
@@ -157,11 +157,10 @@
157
157
  }
158
158
  constructor(props) {
159
159
  super(props);
160
- this._allowComponentUpdate = true;
161
- this.prevStateElements = [];
162
- this.propertyValueChangedHandler = (stateElement, options) => {
160
+ this.allowUpdate = false;
161
+ this.update = (stateElement, options) => {
163
162
  const key = options.name;
164
- if (!this.canUsePropInState(key) || this.isRendering)
163
+ if (!this.canUsePropInState(key) || !this.allowUpdate)
165
164
  return;
166
165
  this.changedStatePropNameValue = key;
167
166
  this.setState((state) => {
@@ -170,27 +169,44 @@
170
169
  return newState;
171
170
  });
172
171
  };
173
- this.onArrayChangedCallback = (stateElement, options) => {
174
- if (this.isRendering)
175
- return;
176
- this.changedStatePropNameValue = options.name;
177
- this.setState((state) => {
178
- var newState = {};
179
- newState[options.name] = options.newValue;
180
- return newState;
181
- });
182
- };
172
+ this.propertyAccessTracker = new surveyCore.PropertyAccessTracker(this.update);
173
+ this._allowComponentUpdate = true;
174
+ this.prevStateElements = [];
175
+ const render = this.render;
176
+ this.render = () => this.renderWithTracking(render);
177
+ }
178
+ renderWithTracking(render) {
179
+ let res = null;
180
+ this.propertyAccessTracker.startTracking();
181
+ try {
182
+ if (this.canRender()) {
183
+ this.forceHiddenDependencies();
184
+ res = render.call(this);
185
+ }
186
+ }
187
+ finally {
188
+ this.propertyAccessTracker.stopTracking();
189
+ }
190
+ if (!!res) {
191
+ res = this.wrapElement(res);
192
+ }
193
+ this.changedStatePropNameValue = undefined;
194
+ return res;
183
195
  }
184
196
  componentDidMount() {
185
- this.makeBaseElementsReact();
197
+ this.enableStateElementsRerenderEvent(this.getStateElements());
198
+ this.allowUpdate = true;
199
+ this.propertyAccessTracker.subscribe();
186
200
  }
187
201
  componentWillUnmount() {
188
- this.unMakeBaseElementsReact();
189
202
  this.disableStateElementsRerenderEvent(this.getStateElements());
203
+ this.allowUpdate = false;
204
+ this.propertyAccessTracker.unsubscribe();
190
205
  }
191
206
  componentDidUpdate(prevProps, prevState) {
192
207
  var _a;
193
- this.makeBaseElementsReact();
208
+ this.propertyAccessTracker.subscribe();
209
+ this.enableStateElementsRerenderEvent(this.getStateElements());
194
210
  const stateElements = this.getStateElements();
195
211
  this.disableStateElementsRerenderEvent(((_a = this.prevStateElements) !== null && _a !== void 0 ? _a : []).filter(el => !stateElements.find(stateElement => stateElement == el)));
196
212
  this.prevStateElements = [];
@@ -206,47 +222,22 @@
206
222
  this._allowComponentUpdate = false;
207
223
  }
208
224
  shouldComponentUpdate(nextProps, nextState) {
209
- if (this._allowComponentUpdate) {
210
- this.unMakeBaseElementsReact();
225
+ const res = this._allowComponentUpdate && (this.state !== nextState || Object.keys(this.props).some(key => nextProps[key] !== this.props[key]));
226
+ if (res) {
211
227
  this.prevStateElements = this.getStateElements();
212
228
  }
213
- return this._allowComponentUpdate;
229
+ return res;
214
230
  }
231
+ forceHiddenDependencies() { }
215
232
  render() {
216
- if (!this.canRender()) {
217
- return null;
218
- }
219
- this.startEndRendering(1);
220
- var res = this.renderElement();
221
- this.startEndRendering(-1);
222
- if (!!res) {
223
- res = this.wrapElement(res);
224
- }
225
- this.changedStatePropNameValue = undefined;
226
- return res;
233
+ return this.renderElement();
227
234
  }
228
235
  wrapElement(element) {
229
236
  return element;
230
237
  }
231
- get isRendering() {
232
- var stateEls = this.getRenderedElements();
233
- for (let stateEl of stateEls) {
234
- if (stateEl.reactRendering > 0)
235
- return true;
236
- }
237
- return false;
238
- }
239
238
  getRenderedElements() {
240
239
  return this.getStateElements();
241
240
  }
242
- startEndRendering(val) {
243
- var stateEls = this.getRenderedElements();
244
- for (let stateEl of stateEls) {
245
- if (!stateEl.reactRendering)
246
- stateEl.reactRendering = 0;
247
- stateEl.reactRendering += val;
248
- }
249
- }
250
241
  canRender() {
251
242
  return true;
252
243
  }
@@ -256,27 +247,16 @@
256
247
  get changedStatePropName() {
257
248
  return this.changedStatePropNameValue;
258
249
  }
259
- makeBaseElementsReact() {
260
- var els = this.getStateElements();
261
- for (var i = 0; i < els.length; i++) {
262
- els[i].enableOnElementRerenderedEvent();
263
- this.makeBaseElementReact(els[i]);
264
- }
265
- }
266
- unMakeBaseElementsReact() {
267
- var els = this.getStateElements();
268
- this.unMakeBaseElementsReactive(els);
269
- }
270
- unMakeBaseElementsReactive(els) {
271
- for (var i = 0; i < els.length; i++) {
272
- this.unMakeBaseElementReact(els[i]);
273
- }
274
- }
275
250
  disableStateElementsRerenderEvent(els) {
276
251
  els.forEach(el => {
277
252
  el.disableOnElementRerenderedEvent();
278
253
  });
279
254
  }
255
+ enableStateElementsRerenderEvent(els) {
256
+ els.forEach(el => {
257
+ el.enableOnElementRerenderedEvent();
258
+ });
259
+ }
280
260
  getStateElements() {
281
261
  var el = this.getStateElement();
282
262
  return !!el ? [el] : [];
@@ -291,24 +271,9 @@
291
271
  renderLocString(locStr, style = null, key) {
292
272
  return SurveyElementBase.renderLocString(locStr, style, key);
293
273
  }
294
- canMakeReact(stateElement) {
295
- return !!stateElement && !!stateElement.iteratePropertiesHash;
296
- }
297
- makeBaseElementReact(stateElement) {
298
- if (!this.canMakeReact(stateElement))
299
- return;
300
- stateElement.addOnArrayChangedCallback(this.onArrayChangedCallback);
301
- stateElement.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
302
- }
303
274
  canUsePropInState(key) {
304
275
  return true;
305
276
  }
306
- unMakeBaseElementReact(stateElement) {
307
- if (!this.canMakeReact(stateElement))
308
- return;
309
- stateElement.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
310
- stateElement.removeOnArrayChangedCallback(this.onArrayChangedCallback);
311
- }
312
277
  }
313
278
  class ReactSurveyElement extends SurveyElementBase {
314
279
  constructor(props) {
@@ -410,6 +375,9 @@
410
375
  get question() {
411
376
  return this.questionBase;
412
377
  }
378
+ forceHiddenDependencies() {
379
+ this.getValueCore();
380
+ }
413
381
  setValueCore(newValue) {
414
382
  this.questionBase.value = newValue;
415
383
  }
@@ -645,7 +613,7 @@
645
613
  const className = this.item.getActionBarItemCss();
646
614
  const buttonContent = this.renderButtonContent();
647
615
  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, "aria-label": this.item.ariaLabel, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
616
+ 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(), "data-sv-tooltip": 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
617
  return button;
650
618
  }
651
619
  componentDidMount() {
@@ -718,7 +686,7 @@
718
686
  return _$1(SurveyActionBar, props);
719
687
  });
720
688
 
721
- class TitleContent extends x$2 {
689
+ class TitleContent extends SurveyElementBase {
722
690
  constructor(props) {
723
691
  super(props);
724
692
  }
@@ -728,7 +696,7 @@
728
696
  get element() {
729
697
  return this.props.element;
730
698
  }
731
- render() {
699
+ renderElement() {
732
700
  if (this.element.isTitleRenderedAsString)
733
701
  return SurveyElementBase.renderLocString(this.element.locRenderedTitle);
734
702
  var spans = this.renderTitleSpans(this.element.getTitleOwner(), this.cssClasses);
@@ -764,7 +732,7 @@
764
732
  }
765
733
  }
766
734
 
767
- class TitleActions extends x$2 {
735
+ class TitleActions extends SurveyElementBase {
768
736
  get cssClasses() {
769
737
  return this.props.cssClasses;
770
738
  }
@@ -774,7 +742,7 @@
774
742
  get renderActions() {
775
743
  return this.props.renderActions === undefined ? true : this.props.renderActions;
776
744
  }
777
- render() {
745
+ renderElement() {
778
746
  const titleContent = _$1(TitleContent, { element: this.element, cssClasses: this.cssClasses });
779
747
  if (!this.element.hasVisibleTitleActions)
780
748
  return titleContent;
@@ -788,7 +756,7 @@
788
756
  return _$1(TitleActions, props);
789
757
  });
790
758
 
791
- class TitleElement extends x$2 {
759
+ class TitleElement extends SurveyElementBase {
792
760
  constructor(props) {
793
761
  super(props);
794
762
  }
@@ -801,7 +769,7 @@
801
769
  return _$1("span", { className: this.element.getCssTitleExpandableSvgContainer() },
802
770
  _$1(SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: this.element.titleExpandableSvgIconName, size: "auto" }));
803
771
  }
804
- render() {
772
+ renderElement() {
805
773
  const element = this.element;
806
774
  if (!element || !element.hasTitle)
807
775
  return null;
@@ -822,7 +790,7 @@
822
790
  }
823
791
  }
824
792
 
825
- class SurveyHeader extends x$2 {
793
+ class SurveyHeader extends SurveyElementBase {
826
794
  constructor(props) {
827
795
  super(props);
828
796
  this.state = { changed: 0 };
@@ -835,13 +803,12 @@
835
803
  return this.survey.css;
836
804
  }
837
805
  componentDidMount() {
838
- const self = this;
806
+ super.componentDidMount();
839
807
  this.survey.afterRenderHeader(this.rootRef.current);
840
- this.survey.locLogo.onChanged = function () {
841
- self.setState({ changed: self.state.changed + 1 });
842
- };
808
+ this.survey.locLogo.onChanged = () => { this.setState({ changed: this.state.changed + 1 }); };
843
809
  }
844
810
  componentWillUnmount() {
811
+ super.componentWillUnmount();
845
812
  this.survey.locLogo.onChanged = function () { };
846
813
  }
847
814
  renderTitle() {
@@ -861,7 +828,7 @@
861
828
  data: componentData,
862
829
  });
863
830
  }
864
- render() {
831
+ renderElement() {
865
832
  if (!this.survey.renderedHasHeader)
866
833
  return null;
867
834
  return (_$1("div", { className: this.css.header, ref: this.rootRef },
@@ -931,8 +898,8 @@
931
898
  return _$1(NotifierComponent, props);
932
899
  });
933
900
 
934
- class ComponentsContainer extends x$2 {
935
- render() {
901
+ class ComponentsContainer extends SurveyElementBase {
902
+ renderElement() {
936
903
  const components = this.props.survey.getContainerContent(this.props.container);
937
904
  const needRenderWrapper = this.props.needRenderWrapper === false ? false : true;
938
905
  if (components.length == 0) {
@@ -1019,7 +986,7 @@
1019
986
  }
1020
987
  return isNeedUpdate;
1021
988
  }
1022
- render() {
989
+ renderElement() {
1023
990
  this.popup.model = this.model;
1024
991
  let popupContainer;
1025
992
  if (this.model.isModal) {
@@ -1084,14 +1051,14 @@
1084
1051
  return _$1("div", { className: "sv-popup__content" }, contentComponent);
1085
1052
  }
1086
1053
  renderHeaderPopup(popupModel) {
1087
- return popupModel.showCloseButton ? _$1("button", { tabIndex: -1, className: "sv-popup__close-button sd-action sd-action--icon", onClick: () => this.model.clickClose() },
1054
+ return popupModel.showCloseButton ? _$1("button", { tabIndex: -1, className: "sv-popup__close-button sd-action sd-action--small sd-action--icon", onClick: () => this.model.clickClose() },
1088
1055
  _$1(SvgIcon, { className: "sv-popup__close-button-icon", iconName: "icon-close-24x24", size: "auto" })) : null;
1089
1056
  }
1090
1057
  renderFooter(popuModel) {
1091
1058
  return (_$1("div", { className: "sv-popup__body-footer" },
1092
1059
  _$1(SurveyActionBar, { model: popuModel.footerToolbar })));
1093
1060
  }
1094
- render() {
1061
+ renderElement() {
1095
1062
  // Stays mounted and subscribed to the view model: Popup does not re-render when the popup opens.
1096
1063
  if (!this.model.hasBeenShown)
1097
1064
  return null;
@@ -1176,9 +1143,11 @@
1176
1143
  return _$1(k$2, null, this.modalManager.getModals().map(model => $(_$1(PopupContainer, { model: model }), model.container, model.uniqueId.toString())));
1177
1144
  }
1178
1145
  componentDidMount() {
1146
+ super.componentDidMount();
1179
1147
  PopupModal.addModalDescriptor(this.descriptor);
1180
1148
  }
1181
1149
  componentWillUnmount() {
1150
+ super.componentWillUnmount();
1182
1151
  this.modalManager.clear();
1183
1152
  PopupModal.removeModalDescriptor(this.descriptor);
1184
1153
  }
@@ -1286,12 +1255,14 @@
1286
1255
 
1287
1256
  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>";
1288
1257
 
1289
- 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>";
1258
+ 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.25\" 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\"/><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>";
1290
1259
 
1291
1260
  var maximize_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.75 3V7C13.75 7.41 13.41 7.75 13 7.75C12.59 7.75 12.25 7.41 12.25 7V4.81L9.53 7.53C9.38 7.68 9.19 7.75 9 7.75C8.81 7.75 8.62 7.68 8.47 7.53C8.18 7.24 8.18 6.76 8.47 6.47L11.19 3.75H9C8.59 3.75 8.25 3.41 8.25 3C8.25 2.59 8.59 2.25 9 2.25H13C13.1 2.25 13.19 2.27 13.29 2.31C13.47 2.39 13.62 2.53 13.7 2.72C13.74 2.81 13.76 2.91 13.76 3.01L13.75 3ZM7.53 8.47C7.24 8.18 6.76 8.18 6.47 8.47L3.75 11.19V9C3.75 8.59 3.41 8.25 3 8.25C2.59 8.25 2.25 8.59 2.25 9V13C2.25 13.1 2.27 13.19 2.31 13.29C2.39 13.47 2.53 13.62 2.72 13.7C2.81 13.74 2.91 13.76 3.01 13.76H7.01C7.42 13.76 7.76 13.42 7.76 13.01C7.76 12.6 7.42 12.26 7.01 12.26H4.82L7.54 9.54C7.83 9.25 7.83 8.77 7.54 8.48L7.53 8.47Z\"/></svg>";
1292
1261
 
1293
1262
  var minimize_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13.75 8C13.75 8.41 13.41 8.75 13 8.75H3C2.59 8.75 2.25 8.41 2.25 8C2.25 7.59 2.59 7.25 3 7.25H13C13.41 7.25 13.75 7.59 13.75 8Z\"/></svg>";
1294
1263
 
1264
+ var more_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 6.5C7.18 6.5 6.5 7.18 6.5 8C6.5 8.82 7.18 9.5 8 9.5C8.82 9.5 9.5 8.82 9.5 8C9.5 7.18 8.82 6.5 8 6.5ZM2.86 6.5C2.03 6.5 1.36 7.18 1.36 8C1.36 8.82 2.03 9.5 2.86 9.5C3.68 9.5 4.36 8.82 4.36 8C4.36 7.18 3.68 6.5 2.86 6.5ZM13.14 6.5C12.32 6.5 11.64 7.18 11.64 8C11.64 8.82 12.32 9.5 13.14 9.5C13.97 9.5 14.64 8.82 14.64 8C14.64 7.18 13.97 6.5 13.14 6.5Z\"/></svg>";
1265
+
1295
1266
  var more_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 10.25C11.04 10.25 10.25 11.04 10.25 12C10.25 12.96 11.04 13.75 12 13.75C12.96 13.75 13.75 12.96 13.75 12C13.75 11.04 12.96 10.25 12 10.25ZM11.75 12C11.75 11.86 11.86 11.75 12 11.75C12.14 11.75 12.25 11.86 12.25 12C12.25 12.28 11.75 12.28 11.75 12ZM19 10.25C18.04 10.25 17.25 11.04 17.25 12C17.25 12.96 18.04 13.75 19 13.75C19.96 13.75 20.75 12.96 20.75 12C20.75 11.04 19.96 10.25 19 10.25ZM18.75 12C18.75 11.86 18.86 11.75 19 11.75C19.14 11.75 19.25 11.86 19.25 12C19.25 12.28 18.75 12.28 18.75 12ZM5 10.25C4.04 10.25 3.25 11.04 3.25 12C3.25 12.96 4.04 13.75 5 13.75C5.96 13.75 6.75 12.96 6.75 12C6.75 11.04 5.96 10.25 5 10.25ZM4.75 12C4.75 11.86 4.86 11.75 5 11.75C5.14 11.75 5.25 11.86 5.25 12C5.25 12.28 4.75 12.28 4.75 12Z\"/></svg>";
1296
1267
 
1297
1268
  var navmenu_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.25 7C3.25 6.59 3.59 6.25 4 6.25H15C15.41 6.25 15.75 6.59 15.75 7C15.75 7.41 15.41 7.75 15 7.75H4C3.59 7.75 3.25 7.41 3.25 7ZM20 11.25H4C3.59 11.25 3.25 11.59 3.25 12C3.25 12.41 3.59 12.75 4 12.75H20C20.41 12.75 20.75 12.41 20.75 12C20.75 11.59 20.41 11.25 20 11.25ZM9 16.25H4C3.59 16.25 3.25 16.59 3.25 17C3.25 17.41 3.59 17.75 4 17.75H9C9.41 17.75 9.75 17.41 9.75 17C9.75 16.59 9.41 16.25 9 16.25Z\"/></svg>";
@@ -1394,6 +1365,7 @@
1394
1365
  "loading-48x48": loading_48x48,
1395
1366
  "maximize-16x16": maximize_16x16,
1396
1367
  "minimize-16x16": minimize_16x16,
1368
+ "more-16x16": more_16x16,
1397
1369
  "more-24x24": more_24x24,
1398
1370
  "navmenu-24x24": navmenu_24x24,
1399
1371
  "noimage-48x48": noimage_48x48,
@@ -1474,6 +1446,7 @@
1474
1446
  super(props);
1475
1447
  this.previousJSON = {};
1476
1448
  this.isSurveyUpdated = false;
1449
+ this.key = 0;
1477
1450
  this.createSurvey(props);
1478
1451
  this.updateSurvey(props, {});
1479
1452
  this.rootRef = b$1();
@@ -1607,7 +1580,7 @@
1607
1580
  if (!!this.survey.renderedWidth) {
1608
1581
  style.maxWidth = this.survey.renderedWidth;
1609
1582
  }
1610
- return (_$1("div", { className: this.survey.bodyContainerCss },
1583
+ return (_$1("div", { key: this.key, className: this.survey.bodyContainerCss },
1611
1584
  _$1(ComponentsContainer, { survey: this.survey, container: "left" }),
1612
1585
  _$1("div", { className: "sv-components-column sv-components-column--expandable" },
1613
1586
  _$1(ComponentsContainer, { survey: this.survey, container: "center" }),
@@ -1676,6 +1649,13 @@
1676
1649
  }
1677
1650
  if (newProps[key] === oldProps[key])
1678
1651
  continue;
1652
+ if (key == "settings") {
1653
+ // Data for the model's settings() method; assigning it would replace the method. An absent value applies nothing
1654
+ if (newProps.settings !== undefined && newProps.settings !== null) {
1655
+ this.survey.settings(newProps.settings);
1656
+ }
1657
+ continue;
1658
+ }
1679
1659
  if (key.indexOf("on") == 0 && this.survey[key] && this.survey[key].add) {
1680
1660
  if (!!oldProps[key]) {
1681
1661
  this.survey[key].remove(oldProps[key]);
@@ -1688,14 +1668,13 @@
1688
1668
  }
1689
1669
  }
1690
1670
  setSurveyEvents() {
1691
- var self = this;
1692
- this.survey.renderCallback = function () {
1693
- var counter = !!self.state && !!self.state.modelChanged ? self.state.modelChanged : 0;
1694
- self.setState({ modelChanged: counter + 1 });
1671
+ this.survey.renderCallback = () => {
1672
+ this.key++;
1673
+ this.forceUpdate();
1695
1674
  };
1696
1675
  this.survey.onPartialSend.add((sender) => {
1697
- if (!!self.state) {
1698
- self.setState(self.state);
1676
+ if (!!this.state) {
1677
+ this.setState(this.state);
1699
1678
  }
1700
1679
  });
1701
1680
  }
@@ -1766,7 +1745,7 @@
1766
1745
  get progress() {
1767
1746
  return -this.timerModel.progress * this.circleLength;
1768
1747
  }
1769
- render() {
1748
+ renderElement() {
1770
1749
  if (!this.timerModel.isRunning) {
1771
1750
  return null;
1772
1751
  }
@@ -1908,14 +1887,18 @@
1908
1887
  }
1909
1888
  componentDidMount() {
1910
1889
  super.componentDidMount();
1890
+ if (!this.row)
1891
+ return;
1892
+ this.row.changeUIMountCount(1);
1911
1893
  var el = this.rootRef.current;
1912
1894
  if (this.rootRef.current) {
1913
1895
  this.row.setRootElement(this.rootRef.current);
1914
1896
  }
1915
1897
  if (!!el && !this.row.isNeedRender) {
1898
+ var row = this.row;
1916
1899
  var rowContainerDiv = el;
1917
1900
  this.lazyRenderingTimeout = setTimeout(() => {
1918
- this.row.startLazyRendering(rowContainerDiv);
1901
+ row.startLazyRendering(rowContainerDiv);
1919
1902
  }, 10);
1920
1903
  }
1921
1904
  }
@@ -1923,27 +1906,42 @@
1923
1906
  if (!super.shouldComponentUpdate(nextProps, nextState))
1924
1907
  return false;
1925
1908
  if (nextProps.row !== this.row) {
1909
+ // The next render reads these from the new row. The previous row is released at commit, in componentDidUpdate.
1926
1910
  nextProps.row.isNeedRender = this.row.isNeedRender;
1927
1911
  nextProps.row.setRootElement(this.rootRef.current);
1928
- this.row.setRootElement(undefined);
1929
- this.stopLazyRendering();
1930
1912
  }
1931
1913
  this.recalculateCss();
1932
1914
  return true;
1933
1915
  }
1934
- stopLazyRendering() {
1916
+ componentDidUpdate(prevProps, prevState) {
1917
+ super.componentDidUpdate(prevProps, prevState);
1918
+ const prevRow = prevProps.row;
1919
+ if (prevRow === this.row)
1920
+ return;
1935
1921
  clearTimeout(this.lazyRenderingTimeout);
1936
- this.row.stopLazyRendering();
1937
- this.row.isNeedRender = !this.row.isLazyRendering();
1922
+ if (!!this.row) {
1923
+ this.row.changeUIMountCount(1);
1924
+ }
1925
+ this.releaseRowIfUnmounted(prevRow);
1938
1926
  }
1939
1927
  componentWillUnmount() {
1940
1928
  super.componentWillUnmount();
1941
- if (!!this.row) {
1942
- if (!this.row.hasActiveUISubscribers) {
1943
- this.row.setRootElement(undefined);
1944
- this.stopLazyRendering();
1929
+ clearTimeout(this.lazyRenderingTimeout);
1930
+ this.releaseRowIfUnmounted(this.row);
1931
+ }
1932
+ // Another component may still render the row (#10701), so only the last one to unmount resets it.
1933
+ releaseRowIfUnmounted(row) {
1934
+ if (!row)
1935
+ return;
1936
+ if (row.changeUIMountCount(-1) > 0) {
1937
+ if (row.getRootElement() === this.rootRef.current) {
1938
+ row.setRootElement(undefined);
1945
1939
  }
1940
+ return;
1946
1941
  }
1942
+ row.setRootElement(undefined);
1943
+ row.stopLazyRendering();
1944
+ row.isNeedRender = !row.isLazyRendering();
1947
1945
  }
1948
1946
  createElement(element, elementIndex) {
1949
1947
  const index = elementIndex ? "-" + elementIndex : 0;
@@ -1982,7 +1980,7 @@
1982
1980
  return this.getCss();
1983
1981
  }
1984
1982
  getPanelFromProps(props) {
1985
- return this.props.element || this.props.question;
1983
+ return props.element || props.question;
1986
1984
  }
1987
1985
  get panelBase() {
1988
1986
  return this.getPanelFromProps(this.props);
@@ -2132,8 +2130,14 @@
2132
2130
  getTextAreaModel() {
2133
2131
  return this.props.question.commentTextAreaModel;
2134
2132
  }
2133
+ getViewText() {
2134
+ return this.props.question.getCommentViewText();
2135
+ }
2135
2136
  renderElement() {
2136
2137
  const question = this.props.question;
2138
+ if (question.isViewMode) {
2139
+ return _$1("div", { className: question.viewModeCssClass }, this.getViewText());
2140
+ }
2137
2141
  if (question.isReadOnlyRenderDiv()) {
2138
2142
  const comment = this.textAreaModel.getTextValue() || "";
2139
2143
  return _$1("div", null, comment);
@@ -2149,6 +2153,9 @@
2149
2153
  getTextAreaModel() {
2150
2154
  return this.props.question.getCommentTextAreaModel(this.props.item);
2151
2155
  }
2156
+ getViewText() {
2157
+ return this.props.question.getCommentViewText(this.props.item);
2158
+ }
2152
2159
  getKey() { return this.props.item.uniqueId; }
2153
2160
  }
2154
2161
  ReactQuestionFactory.Instance.registerQuestion("comment", (props) => {
@@ -2314,6 +2321,21 @@
2314
2321
  return _$1(SurveyBreadcrumbs, props);
2315
2322
  });
2316
2323
 
2324
+ class QuestionHint extends SurveyElementBase {
2325
+ renderHint(hint, index) {
2326
+ if (hint.alternatives.length > 0) {
2327
+ return (_$1("span", { className: hint.className, key: index }, hint.alternatives.map((alternative, alternativeIndex) => this.renderHint(alternative, alternativeIndex))));
2328
+ }
2329
+ return (_$1("span", { className: hint.className, key: index }, hint.parts.map((part, partIndex) => (_$1("span", { key: partIndex, className: part.className }, part.text)))));
2330
+ }
2331
+ renderElement() {
2332
+ const keyboardHintModel = this.props.question.getKeyboardHintModel();
2333
+ if (!keyboardHintModel.hasItems())
2334
+ return null;
2335
+ return (_$1("div", { className: keyboardHintModel.cssClasses.keyboardHintContainer, "aria-hidden": "true" }, keyboardHintModel.items.map((hint, index) => this.renderHint(hint, index))));
2336
+ }
2337
+ }
2338
+
2317
2339
  class SurveyQuestion extends SurveyElementBase {
2318
2340
  static renderQuestionBody(creator, question) {
2319
2341
  // if (!question.isVisible) return null;
@@ -2414,7 +2436,7 @@
2414
2436
  const singleInput = singleSummary || (question.singleInputQuestion ? this.renderSingleInputQuestion(question, cssClasses) : undefined);
2415
2437
  const questionContent = singleInput || this.wrapQuestionContent(this.renderQuestionContent());
2416
2438
  return (_$1(k$2, null,
2417
- _$1("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, "data-name": question.name, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-label": this.question.ariaLabel, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded, onClick: (event) => question.clickRootFunction && question.clickRootFunction(event.nativeEvent) },
2439
+ _$1("div", { ref: this.rootRef, id: question.renderedId, className: question.getRootCss(), style: rootStyle, "data-name": question.name, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-label": this.question.ariaLabel, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded, onClick: (event) => question.clickRootFunction && question.clickRootFunction(event.nativeEvent) },
2418
2440
  singleBreadcrumbs,
2419
2441
  _$1("div", { className: question.getQuestionContainerCss() },
2420
2442
  errorsAboveQuestion,
@@ -2422,7 +2444,8 @@
2422
2444
  headerTop,
2423
2445
  questionContent,
2424
2446
  headerBottom),
2425
- errorsBelowQuestion))));
2447
+ errorsBelowQuestion)),
2448
+ question.canShowKeyboardHints() ? _$1(QuestionHint, { question: question }) : null));
2426
2449
  }
2427
2450
  renderSingleInputQuestion(question, cssClasses) {
2428
2451
  const singleQuestion = question.singleInputQuestion;
@@ -2476,7 +2499,6 @@
2476
2499
  class SurveyElementErrors extends ReactSurveyElement {
2477
2500
  constructor(props) {
2478
2501
  super(props);
2479
- this.state = this.getState();
2480
2502
  }
2481
2503
  get id() {
2482
2504
  return this.props.element.renderedId + "_errors";
@@ -2487,14 +2509,9 @@
2487
2509
  get creator() {
2488
2510
  return this.props.creator;
2489
2511
  }
2490
- getState(prevState = null) {
2491
- return !prevState ? { error: 0 } : { error: prevState.error + 1 };
2492
- }
2493
2512
  canRender() {
2494
2513
  return !!this.element && this.element.hasVisibleErrors;
2495
2514
  }
2496
- componentWillUnmount() {
2497
- }
2498
2515
  renderElement() {
2499
2516
  const errors = [];
2500
2517
  for (let i = 0; i < this.element.renderedErrors.length; i++) {
@@ -2702,7 +2719,7 @@
2702
2719
  if (this.panelBase)
2703
2720
  this.panelBase.focusIn();
2704
2721
  };
2705
- return (_$1("div", { ref: this.rootRef, className: this.panelBase.getContainerCss(), onFocus: focusIn, id: this.panelBase.id, onClick: (e) => this.panelBase.clickRootFunction && this.panelBase.clickRootFunction(e.nativeEvent) },
2722
+ return (_$1("div", { ref: this.rootRef, className: this.panelBase.getContainerCss(), onFocus: focusIn, id: this.panelBase.renderedId, onClick: (e) => this.panelBase.clickRootFunction && this.panelBase.clickRootFunction(e.nativeEvent) },
2706
2723
  this.panel.showErrorsAbovePanel ? errors : null,
2707
2724
  header,
2708
2725
  this.panel.showErrorsAbovePanel ? null : errors,
@@ -3272,24 +3289,21 @@
3272
3289
  }
3273
3290
  }
3274
3291
  class RatingItem extends RatingItemBase {
3275
- render() {
3292
+ renderElement() {
3276
3293
  var itemText = this.renderLocString(this.item.locText);
3277
3294
  return (_$1("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
3278
3295
  _$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3279
3296
  _$1("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
3280
3297
  }
3281
- componentDidMount() {
3282
- super.componentDidMount();
3283
- }
3284
3298
  }
3285
3299
  ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
3286
3300
  return _$1(RatingItem, props);
3287
3301
  });
3288
3302
 
3289
3303
  class RatingItemStar extends RatingItemBase {
3290
- render() {
3304
+ renderElement() {
3291
3305
  return (_$1("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
3292
- _$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3306
+ _$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, tabIndex: this.question.itemTabIndex, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3293
3307
  _$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
3294
3308
  _$1(SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
3295
3309
  }
@@ -3299,9 +3313,9 @@
3299
3313
  });
3300
3314
 
3301
3315
  class RatingItemSmiley extends RatingItemBase {
3302
- render() {
3316
+ renderElement() {
3303
3317
  return (_$1("label", { style: this.item.style, className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: e => this.question.onItemMouseIn(this.item), onMouseOut: e => this.question.onItemMouseOut(this.item), title: this.item.text },
3304
- _$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3318
+ _$1("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, tabIndex: this.question.itemTabIndex, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: () => { }, "aria-label": this.question.ariaLabel }),
3305
3319
  _$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
3306
3320
  }
3307
3321
  }
@@ -3316,7 +3330,7 @@
3316
3330
  getStateElement() {
3317
3331
  return this.item;
3318
3332
  }
3319
- render() {
3333
+ renderElement() {
3320
3334
  if (!this.item)
3321
3335
  return null;
3322
3336
  const item = this.props.item;
@@ -3385,7 +3399,7 @@
3385
3399
  getStateElement() {
3386
3400
  return this.props.model || this.question.dropdownListModelValue;
3387
3401
  }
3388
- render() {
3402
+ renderElement() {
3389
3403
  return (_$1("div", { className: this.question.cssClasses.hint },
3390
3404
  this.renderState.showHintPrefix ?
3391
3405
  (_$1("div", { className: this.question.cssClasses.hintPrefix },
@@ -3870,13 +3884,19 @@
3870
3884
  return !!this.question && !!this.row;
3871
3885
  }
3872
3886
  renderElement() {
3887
+ const viewText = this.question.getCellViewText(this.row, this.column);
3888
+ const mobileSpan = this.question.isMobile ?
3889
+ (_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
3890
+ : undefined;
3891
+ if (viewText) {
3892
+ return (_$1(k$2, null,
3893
+ _$1("div", { className: this.question.viewModeCssClass }, viewText),
3894
+ mobileSpan));
3895
+ }
3873
3896
  const isChecked = this.row.isChecked(this.column);
3874
3897
  const inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
3875
3898
  const itemClass = this.question.getItemClass(this.row, this.column);
3876
3899
  const itemSvgIcon = this.question.getItemSvgIcon(this.row, this.column);
3877
- const mobileSpan = this.question.isMobile ?
3878
- (_$1("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
3879
- : undefined;
3880
3900
  return (_$1("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
3881
3901
  this.renderInput(inputId, isChecked),
3882
3902
  _$1("span", { className: this.question.cssMaterialDecorator, "aria-hidden": "true" }, itemSvgIcon ?
@@ -3903,12 +3923,15 @@
3903
3923
  return this.questionBase;
3904
3924
  }
3905
3925
  componentDidMount() {
3926
+ super.componentDidMount();
3906
3927
  this.reactOnStrChanged();
3907
3928
  }
3908
3929
  componentWillUnmount() {
3930
+ super.componentWillUnmount();
3909
3931
  this.question.locHtml.onChanged = function () { };
3910
3932
  }
3911
3933
  componentDidUpdate(prevProps, prevState) {
3934
+ super.componentDidUpdate(prevProps, prevState);
3912
3935
  this.reactOnStrChanged();
3913
3936
  }
3914
3937
  reactOnStrChanged() {
@@ -3952,7 +3975,13 @@
3952
3975
  const className = !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss();
3953
3976
  const style = this.isDisplayMode ? { color: "transparent" } : {};
3954
3977
  let fileInput;
3955
- if (this.question.isReadOnlyAttr) {
3978
+ if (this.question.isViewMode && this.question.isEmpty()) {
3979
+ return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: el => (this.setControl(el)) }, this.question.viewDisplayText));
3980
+ }
3981
+ if (this.question.isViewMode) {
3982
+ fileInput = null;
3983
+ }
3984
+ else if (this.question.isReadOnlyAttr) {
3956
3985
  fileInput = _$1("input", { readOnly: true, type: "file", className: className, id: this.question.inputId, ref: input => (this.setControl(input)), style: style, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: acceptedTypes });
3957
3986
  }
3958
3987
  else if (this.question.isDisabledAttr) {
@@ -4005,7 +4034,7 @@
4005
4034
  get question() {
4006
4035
  return (this.props.item && this.props.item.data.question) || this.props.data.question;
4007
4036
  }
4008
- render() {
4037
+ renderElement() {
4009
4038
  return attachKey2click(_$1("label", { tabIndex: 0, className: this.props.item.getActionBarItemCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText, onClick: (e) => this.question.chooseFile(e.nativeEvent) },
4010
4039
  !!this.props.item.iconName ? _$1(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto", className: this.props.item.cssClasses.itemIcon }) : null,
4011
4040
  this.props.item.hasTitle ? _$1(SurveyLocStringViewer, { model: this.props.item.locTitle, textClass: this.props.item.getActionBarItemTitleCss() }) : null));
@@ -4024,7 +4053,7 @@
4024
4053
  }
4025
4054
  renderElement() {
4026
4055
  const items = this.page.items.map((item, index) => { return ReactElementFactory.Instance.createElement("sv-file-item", { item, question: this.question, key: index }); });
4027
- return (_$1("div", { className: this.page.css, id: this.page.id }, items));
4056
+ return (_$1("div", { className: this.page.css, id: this.page.renderedId }, items));
4028
4057
  }
4029
4058
  }
4030
4059
 
@@ -4521,7 +4550,7 @@
4521
4550
  }
4522
4551
  return true;
4523
4552
  }
4524
- render() {
4553
+ renderElement() {
4525
4554
  const model = this.model;
4526
4555
  if (!model.visible)
4527
4556
  return null;
@@ -4554,10 +4583,12 @@
4554
4583
  renderElement() {
4555
4584
  const cell = this.cell;
4556
4585
  const description = cell.sortDescription;
4586
+ const rank = cell.sortRank;
4557
4587
  return (_$1("button", { type: "button", className: cell.sortButtonCss, "aria-label": cell.sortAriaLabel, title: cell.sortTooltip, "aria-describedby": !!description ? cell.sortDescriptionId : undefined, "aria-disabled": !cell.canToggleSort ? "true" : undefined, onClick: this.onClick },
4558
4588
  _$1("span", { className: cell.sortTitleCss }, this.props.content),
4559
4589
  _$1("span", { className: cell.sortCss, "aria-hidden": "true" },
4560
- _$1(SvgIcon, { iconName: cell.sortIconName, size: 16 })),
4590
+ _$1(SvgIcon, { iconName: cell.sortIconName, size: 16 }),
4591
+ !!rank ? _$1("span", { className: cell.sortRankCss }, rank) : null),
4561
4592
  !!description ? _$1("span", { id: cell.sortDescriptionId, className: "sv-visuallyhidden" }, description) : null));
4562
4593
  }
4563
4594
  }
@@ -4712,29 +4743,10 @@
4712
4743
  super(props);
4713
4744
  //Create rendered table in contructor and not on rendering
4714
4745
  this.question.renderedTable;
4715
- this.state = this.getState();
4716
4746
  }
4717
4747
  get question() {
4718
4748
  return this.questionBase;
4719
4749
  }
4720
- getState(prevState = null) {
4721
- return { rowCounter: !prevState ? 0 : prevState.rowCounter + 1 };
4722
- }
4723
- updateStateOnCallback() {
4724
- if (this.isRendering)
4725
- return;
4726
- this.setState(this.getState(this.state));
4727
- }
4728
- componentDidMount() {
4729
- super.componentDidMount();
4730
- this.question.onRenderedTableResetCallback = () => {
4731
- this.updateStateOnCallback();
4732
- };
4733
- }
4734
- componentWillUnmount() {
4735
- super.componentWillUnmount();
4736
- this.question.onRenderedTableResetCallback = () => { };
4737
- }
4738
4750
  renderElement() {
4739
4751
  return this.renderTableDiv();
4740
4752
  }
@@ -4999,6 +5011,9 @@
4999
5011
  get question() {
5000
5012
  return this.questionBase;
5001
5013
  }
5014
+ getStateElement() {
5015
+ return this.question;
5016
+ }
5002
5017
  componentDidMount() {
5003
5018
  super.componentDidMount();
5004
5019
  this.setState({ panelCounter: 0 });
@@ -5028,7 +5043,7 @@
5028
5043
  const panels = [];
5029
5044
  const cssClasses = this.question.cssClasses;
5030
5045
  this.question.renderedPanels.forEach((panel, index) => {
5031
- panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: this.question, index: index, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
5046
+ panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id, panel: panel, question: this.question, index: index, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
5032
5047
  });
5033
5048
  const rangeTop = this.question.isRangeShowing && this.question.isProgressTopShowing
5034
5049
  ? this.renderRange()
@@ -5074,13 +5089,16 @@
5074
5089
  return null;
5075
5090
  }
5076
5091
  }
5077
- class SurveyQuestionPanelDynamicItem extends SurveyPanel {
5092
+ class SurveyQuestionPanelDynamicItem extends SurveyElementBase {
5078
5093
  get question() {
5079
5094
  return this.props.question;
5080
5095
  }
5081
5096
  get index() {
5082
5097
  return this.props.index;
5083
5098
  }
5099
+ get panel() {
5100
+ return this.props.panel;
5101
+ }
5084
5102
  getSurvey() {
5085
5103
  return !!this.question ? this.question.survey : null;
5086
5104
  }
@@ -5088,14 +5106,13 @@
5088
5106
  const survey = this.getSurvey();
5089
5107
  return !!survey ? survey.getCss() : {};
5090
5108
  }
5091
- render() {
5092
- const panel = super.render();
5109
+ renderElement() {
5093
5110
  const removeButton = this.renderButton();
5094
5111
  const separator = this.question.showSeparator(this.index) ?
5095
5112
  (_$1("hr", { className: this.question.cssClasses.separator })) : null;
5096
5113
  return (_$1(k$2, null,
5097
5114
  _$1("div", { className: this.question.getPanelWrapperCss(this.panel) },
5098
- panel,
5115
+ _$1(SurveyPanel, { element: this.panel, cssClasses: this.props.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.props.creator }),
5099
5116
  removeButton),
5100
5117
  separator));
5101
5118
  }
@@ -5144,7 +5161,7 @@
5144
5161
  get progressBarAriaLabel() {
5145
5162
  return this.model.progressBarAriaLabel;
5146
5163
  }
5147
- render() {
5164
+ renderElement() {
5148
5165
  var progressStyle = {
5149
5166
  width: this.progress + "%",
5150
5167
  };
@@ -5180,7 +5197,7 @@
5180
5197
  getStateElement() {
5181
5198
  return this.model;
5182
5199
  }
5183
- render() {
5200
+ renderElement() {
5184
5201
  return (_$1("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth }, role: "tablist", "aria-label": this.model.progressBarAriaLabel, onKeyDown: (event) => this.model.onKeyDown(event.nativeEvent) },
5185
5202
  _$1("div", { className: this.css.progressButtonsContainer, role: "presentation" },
5186
5203
  _$1("div", { className: this.css.progressButtonsListContainer, role: "presentation" },
@@ -5228,7 +5245,7 @@
5228
5245
  getStateElement() {
5229
5246
  return this.item;
5230
5247
  }
5231
- render() {
5248
+ renderElement() {
5232
5249
  if (!this.item)
5233
5250
  return null;
5234
5251
  const className = this.model.getItemClass(this.item);
@@ -5265,6 +5282,22 @@
5265
5282
  return _$1(ListItem, props);
5266
5283
  });
5267
5284
 
5285
+ class ListLoading extends SurveyElementBase {
5286
+ get model() {
5287
+ return this.props.model;
5288
+ }
5289
+ getStateElement() {
5290
+ return this.model;
5291
+ }
5292
+ render() {
5293
+ return (_$1("div", { className: this.model.cssClasses.emptyContainer, role: "status", "aria-label": this.model.getLocalizationString("loadingData") },
5294
+ _$1(LoadingIndicatorComponent, null)));
5295
+ }
5296
+ }
5297
+ ReactElementFactory.Instance.registerElement("sv-list-loading", (props) => {
5298
+ return _$1(ListLoading, props);
5299
+ });
5300
+
5268
5301
  class List extends SurveyElementBase {
5269
5302
  constructor(props) {
5270
5303
  super(props);
@@ -5362,6 +5395,9 @@
5362
5395
  }
5363
5396
  }
5364
5397
  emptyContent() {
5398
+ if (this.model.loadingState === "loading") {
5399
+ return ReactElementFactory.Instance.createElement(this.model.loadingComponent, { model: this.model });
5400
+ }
5365
5401
  const style = { display: this.model.isEmpty ? null : "none" };
5366
5402
  return (_$1("div", { className: this.model.cssClasses.emptyContainer, style: style },
5367
5403
  _$1("div", { className: this.model.cssClasses.emptyText, "aria-label": this.model.emptyMessage }, this.model.emptyMessage)));
@@ -5377,7 +5413,7 @@
5377
5413
  const tocModel = this.props.model;
5378
5414
  tocModel.updateStickyTOCSize(this.survey.rootElement);
5379
5415
  }
5380
- render() {
5416
+ renderElement() {
5381
5417
  const tocModel = this.props.model;
5382
5418
  let content;
5383
5419
  if (tocModel.isMobile) {
@@ -5514,14 +5550,14 @@
5514
5550
  return thumb;
5515
5551
  }
5516
5552
  getInput(i) {
5517
- const { renderedMax: max, renderedMin: min, step, cssClasses, isDisabledAttr, renderedValue, handleOnChange, handlePointerDown, handlePointerUp, handleKeyDown, handleKeyUp, handleOnFocus, handleOnBlur, id } = this.question;
5553
+ const { renderedMax: max, renderedMin: min, step, cssClasses, isDisabledAttr, renderedValue, handleOnChange, handlePointerDown, handlePointerUp, handleKeyDown, handleKeyUp, handleOnFocus, handleOnBlur, renderedId } = this.question;
5518
5554
  const value = renderedValue[i];
5519
- const input = _$1("input", { className: cssClasses.input, id: id + "-sjs-slider-input-" + i, type: "range", min: min, max: max, step: step, value: value, onChange: (e) => { handleOnChange(e.nativeEvent, i); }, onPointerDown: (e) => { handlePointerDown(e.nativeEvent); }, onPointerUp: (e) => { e.stopPropagation(); handlePointerUp(e.nativeEvent); }, onKeyDown: (e) => { handleKeyDown(e.nativeEvent); }, onKeyUp: (e) => { handleKeyUp(e.nativeEvent); }, onFocus: () => { handleOnFocus(i); }, onBlur: () => { handleOnBlur(); }, disabled: isDisabledAttr, "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 });
5555
+ const input = _$1("input", { className: cssClasses.input, id: renderedId + "-sjs-slider-input-" + i, type: "range", min: min, max: max, step: step, value: value, onChange: (e) => { handleOnChange(e.nativeEvent, i); }, onPointerDown: (e) => { handlePointerDown(e.nativeEvent); }, onPointerUp: (e) => { e.stopPropagation(); handlePointerUp(e.nativeEvent); }, onKeyDown: (e) => { handleKeyDown(e.nativeEvent); }, onKeyUp: (e) => { handleKeyUp(e.nativeEvent); }, onFocus: () => { handleOnFocus(i); }, onBlur: () => { handleOnBlur(); }, disabled: isDisabledAttr, "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 });
5520
5556
  return input;
5521
5557
  }
5522
5558
  getRangeInput() {
5523
- const { renderedMax: max, renderedMin: min, step, cssClasses, handleRangeOnChange, handleRangePointerDown, handleRangePointerUp, id } = this.question;
5524
- return _$1("input", { name: "range-input", id: id + "-sjs-slider-input-range-input", ref: this.rangeInputRef, className: cssClasses.input, type: "range", "aria-hidden": "true", min: min, max: max, step: step, tabIndex: -1, onChange: (e) => { handleRangeOnChange(e.nativeEvent); }, onPointerDown: (e) => { e.persist(); handleRangePointerDown(e.nativeEvent, this.control); }, onPointerUp: (e) => { handleRangePointerUp(e.nativeEvent, this.control); } });
5559
+ const { renderedMax: max, renderedMin: min, step, cssClasses, handleRangeOnChange, handleRangePointerDown, handleRangePointerUp, renderedId } = this.question;
5560
+ return _$1("input", { name: "range-input", id: renderedId + "-sjs-slider-input-range-input", ref: this.rangeInputRef, className: cssClasses.input, type: "range", "aria-hidden": "true", min: min, max: max, step: step, tabIndex: -1, onChange: (e) => { handleRangeOnChange(e.nativeEvent); }, onPointerDown: (e) => { e.persist(); handleRangePointerDown(e.nativeEvent, this.control); }, onPointerUp: (e) => { handleRangePointerUp(e.nativeEvent, this.control); } });
5525
5561
  }
5526
5562
  getLabels() {
5527
5563
  const labels = [];
@@ -5554,6 +5590,19 @@
5554
5590
  return _$1(SurveyQuestionExpression, props);
5555
5591
  });
5556
5592
 
5593
+ class SurveyQuestionView extends SurveyQuestionElementBase {
5594
+ get question() {
5595
+ return this.questionBase;
5596
+ }
5597
+ renderElement() {
5598
+ return (_$1("div", { id: this.question.inputId, className: this.question.viewModeCssClass, ref: (div) => (this.setControl(div)) }, this.question.viewDisplayText));
5599
+ }
5600
+ }
5601
+ ReactQuestionFactory.Instance.registerQuestion("sv-question-view", (props) => {
5602
+ return _$1(SurveyQuestionView, props);
5603
+ });
5604
+ surveyCore.RendererFactory.Instance.registerRenderer("question", "view", "sv-question-view");
5605
+
5557
5606
  class PopupSurvey extends Survey {
5558
5607
  constructor(props) {
5559
5608
  super(props);
@@ -5666,11 +5715,31 @@
5666
5715
  return this.questionBase;
5667
5716
  }
5668
5717
  renderElement() {
5718
+ if (this.question.isViewMode) {
5719
+ return this.renderViewMode();
5720
+ }
5669
5721
  var cssClasses = this.question.cssClasses;
5670
5722
  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); } },
5671
5723
  _$1("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
5672
5724
  this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
5673
5725
  }
5726
+ renderViewMode() {
5727
+ const items = this.question.getViewModeItems();
5728
+ if (items.length === 0) {
5729
+ return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: (root) => (this.setControl(root)) }, this.question.viewDisplayText));
5730
+ }
5731
+ const isVideo = this.question.contentMode === "video";
5732
+ const style = { objectFit: this.question.imageFit };
5733
+ return (_$1("div", { className: this.question.getSelectBaseRootCss(), id: this.question.inputId, ref: (root) => (this.setControl(root)) }, items.map((item) => {
5734
+ const src = item.locImageLink.renderedHtml;
5735
+ const width = this.question.renderedImageWidth;
5736
+ const height = this.question.renderedImageHeight;
5737
+ if (isVideo) {
5738
+ return (_$1("video", { key: item.uniqueId, className: this.question.cssClasses.image, src: src, width: width, height: height, style: style, onLoadedMetadata: (event) => { this.question.onContentLoaded(item, event.nativeEvent); } }));
5739
+ }
5740
+ return (_$1("img", { key: item.uniqueId, className: this.question.cssClasses.image, src: src, alt: item.locText.renderedHtml, width: width, height: height, style: style, onLoad: (event) => { this.question.onContentLoaded(item, event.nativeEvent); } }));
5741
+ })));
5742
+ }
5674
5743
  getColumns(cssClasses) {
5675
5744
  return this.question.columns.map((column, ci) => {
5676
5745
  var items = column.map((item, ii) => this.renderItem(item, cssClasses));
@@ -5819,8 +5888,8 @@
5819
5888
  }
5820
5889
  renderElement() {
5821
5890
  return (_$1("div", { className: this.question.cssClasses.root, ref: (root) => (this.setControl(root)) },
5822
- _$1("img", { className: this.question.cssClasses.bg, id: `${this.question.id}-bg`, src: this.question.imageLink, role: "presentation" }),
5823
- _$1("svg", { className: this.question.cssClasses.svg, id: `${this.question.id}-svg` })));
5891
+ _$1("img", { className: this.question.cssClasses.bg, id: `${this.question.renderedId}-bg`, src: this.question.imageLink, role: "presentation" }),
5892
+ _$1("svg", { className: this.question.cssClasses.svg, id: `${this.question.renderedId}-svg` })));
5824
5893
  }
5825
5894
  }
5826
5895
  ReactQuestionFactory.Instance.registerQuestion("imagemap", (props) => {
@@ -5883,6 +5952,12 @@
5883
5952
  return this.questionBase;
5884
5953
  }
5885
5954
  renderElement() {
5955
+ if (this.question.isViewMode) {
5956
+ if (!this.question.value) {
5957
+ return (_$1("div", { className: this.question.viewModeCssClass, id: this.question.inputId, ref: (root) => (this.setControl(root)) }, this.question.viewDisplayText));
5958
+ }
5959
+ return (_$1("img", { className: this.question.viewModeCssClass, id: this.question.inputId, src: this.question.value, alt: "", ref: (root) => (this.setControl(root)) }));
5960
+ }
5886
5961
  var cssClasses = this.question.cssClasses;
5887
5962
  const loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
5888
5963
  var toolbar = this.renderToolbar();
@@ -6048,7 +6123,7 @@
6048
6123
  getStateElement() {
6049
6124
  return this.item;
6050
6125
  }
6051
- render() {
6126
+ renderElement() {
6052
6127
  if (!this.item)
6053
6128
  return null;
6054
6129
  const text = this.renderLocString(this.item.locTitle, undefined, "locString");
@@ -6076,7 +6151,7 @@
6076
6151
  getStateElement() {
6077
6152
  return this.item;
6078
6153
  }
6079
- render() {
6154
+ renderElement() {
6080
6155
  var _a;
6081
6156
  if (!this.item)
6082
6157
  return null;
@@ -6101,6 +6176,7 @@
6101
6176
  _$1(Popup, { model: this.item.popupModel })));
6102
6177
  }
6103
6178
  componentDidMount() {
6179
+ super.componentDidMount();
6104
6180
  this.viewModel = new surveyCore.ActionDropdownViewModel(this.item);
6105
6181
  }
6106
6182
  componentWillUnmount() {
@@ -6128,30 +6204,29 @@
6128
6204
  return _$1(SurveySortBarLevel, props);
6129
6205
  });
6130
6206
 
6131
- // The content of the "Sort by" dialog: one action bar per row (field, direction, remove).
6132
- class SurveyRecordsSortDialog extends SurveyElementBase {
6133
- get model() {
6134
- return this.props.model;
6135
- }
6136
- getStateElement() {
6137
- return this.model;
6138
- }
6139
- renderElement() {
6140
- return _$1("div", { className: this.model.rootCss }, this.model.rows.map((row) => _$1(k$2, { key: row.uniqueId }, ReactElementFactory.Instance.createElement("sv-action-bar", { model: row }))));
6141
- }
6142
- }
6143
- ReactElementFactory.Instance.registerElement("sv-records-sort-dialog", (props) => {
6144
- return _$1(SurveyRecordsSortDialog, props);
6145
- });
6146
-
6147
- class LogoImage extends x$2 {
6207
+ class LogoImage extends SurveyElementBase {
6148
6208
  constructor(props) {
6149
6209
  super(props);
6210
+ this.reactOnStrChanged = () => {
6211
+ this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
6212
+ };
6150
6213
  }
6151
6214
  get survey() {
6152
6215
  return this.props.data;
6153
6216
  }
6154
- render() {
6217
+ componentDidMount() {
6218
+ super.componentDidMount();
6219
+ this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
6220
+ }
6221
+ componentDidUpdate(prevProps, prevState) {
6222
+ super.componentDidUpdate(prevProps, prevState);
6223
+ this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
6224
+ }
6225
+ componentWillUnmount() {
6226
+ super.componentWillUnmount();
6227
+ this.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
6228
+ }
6229
+ renderElement() {
6155
6230
  const content = [];
6156
6231
  content.push(_$1("div", { key: "logo-image", className: this.survey.logoClassNames },
6157
6232
  _$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 } })));
@@ -6173,7 +6248,7 @@
6173
6248
  return this.props.item;
6174
6249
  }
6175
6250
  renderElement() {
6176
- return _$1("div", { onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); } }, this.renderIcon());
6251
+ return _$1("div", { className: this.question.cssClasses.dragHandle, role: "button", tabIndex: 0, "aria-label": this.props.item.ariaLabel, onPointerDown: (event) => { this.question.onPointerDown(event.nativeEvent, this.row); }, onKeyDown: (event) => { this.question.onDragHandleKeyDown(event.nativeEvent, this.row); } }, this.renderIcon());
6177
6252
  }
6178
6253
  renderIcon() {
6179
6254
  if (this.question.iconDragElement) {
@@ -6256,7 +6331,7 @@
6256
6331
  class Skeleton extends x$2 {
6257
6332
  render() {
6258
6333
  var _a, _b;
6259
- return (_$1("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.id, style: { height: (_b = this.props.element) === null || _b === void 0 ? void 0 : _b.skeletonHeight } }));
6334
+ return (_$1("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.renderedId, style: { height: (_b = this.props.element) === null || _b === void 0 ? void 0 : _b.skeletonHeight } }));
6260
6335
  }
6261
6336
  }
6262
6337
  ReactElementFactory.Instance.registerElement("sv-skeleton", (props) => {
@@ -6293,7 +6368,7 @@
6293
6368
  return _$1(CharacterCounterComponent, props);
6294
6369
  });
6295
6370
 
6296
- class HeaderMobile extends x$2 {
6371
+ class HeaderMobile extends SurveyElementBase {
6297
6372
  get model() {
6298
6373
  return this.props.model;
6299
6374
  }
@@ -6304,7 +6379,7 @@
6304
6379
  data: componentData,
6305
6380
  });
6306
6381
  }
6307
- render() {
6382
+ renderElement() {
6308
6383
  return (_$1("div", { className: "sv-header--mobile" },
6309
6384
  this.model.survey.hasLogo ? (_$1("div", { className: "sv-header__logo" }, this.renderLogoImage())) : null,
6310
6385
  this.model.survey.hasTitle ? (_$1("div", { className: "sv-header__title", style: { maxWidth: this.model.renderedTextAreaWidth } },
@@ -6313,7 +6388,7 @@
6313
6388
  _$1("div", { className: this.model.survey.css.description }, SurveyElementBase.renderLocString(this.model.survey.locDescription)))) : null));
6314
6389
  }
6315
6390
  }
6316
- class HeaderCell extends x$2 {
6391
+ class HeaderCell extends SurveyElementBase {
6317
6392
  get model() {
6318
6393
  return this.props.model;
6319
6394
  }
@@ -6324,7 +6399,7 @@
6324
6399
  data: componentData,
6325
6400
  });
6326
6401
  }
6327
- render() {
6402
+ renderElement() {
6328
6403
  return (_$1("div", { className: this.model.css, style: this.model.style },
6329
6404
  _$1("div", { className: "sv-header__cell-content", style: this.model.contentStyle },
6330
6405
  this.model.showLogo ? (_$1("div", { className: "sv-header__logo" }, this.renderLogoImage())) : null,
@@ -6357,6 +6432,9 @@
6357
6432
  this.model.backgroundImage ? _$1("div", { style: this.model.backgroundImageStyle, className: this.model.backgroundImageClasses }) : null,
6358
6433
  headerContent));
6359
6434
  }
6435
+ forceHiddenDependencies() {
6436
+ this.model.width;
6437
+ }
6360
6438
  componentDidMount() {
6361
6439
  super.componentDidMount();
6362
6440
  this.model.processResponsiveness();
@@ -6465,7 +6543,7 @@
6465
6543
  }
6466
6544
  };
6467
6545
  const preact = React;
6468
- surveyCore.checkLibraryVersion(`${"3.2.3"}`, "survey-js-ui");
6546
+ surveyCore.checkLibraryVersion(`${"3.2.5"}`, "survey-js-ui");
6469
6547
 
6470
6548
  Object.defineProperty(exports, 'Model', {
6471
6549
  enumerable: true,
@@ -6502,6 +6580,7 @@
6502
6580
  exports.List = List;
6503
6581
  exports.ListItemContent = ListItemContent;
6504
6582
  exports.ListItemGroup = ListItemGroup;
6583
+ exports.ListLoading = ListLoading;
6505
6584
  exports.LoadingIndicatorComponent = LoadingIndicatorComponent;
6506
6585
  exports.LogoImage = LogoImage;
6507
6586
  exports.MatrixRow = MatrixRow;
@@ -6592,7 +6671,7 @@
6592
6671
  exports.SurveyQuestionTagbox = SurveyQuestionTagbox;
6593
6672
  exports.SurveyQuestionTagboxItem = SurveyQuestionTagboxItem;
6594
6673
  exports.SurveyQuestionText = SurveyQuestionText;
6595
- exports.SurveyRecordsSortDialog = SurveyRecordsSortDialog;
6674
+ exports.SurveyQuestionView = SurveyQuestionView;
6596
6675
  exports.SurveyRow = SurveyRow;
6597
6676
  exports.SurveySortBarLevel = SurveySortBarLevel;
6598
6677
  exports.SurveyTimerPanel = SurveyTimerPanel;