survey-js-ui 3.2.4 → 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.
- package/README.md +1 -1
- package/fesm/survey-js-ui.mjs +175 -181
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +174 -180
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +2 -2
- package/typings/survey-react-ui/src/components/components-container.d.ts +3 -2
- package/typings/survey-react-ui/src/components/file/file-choose-button.d.ts +1 -1
- package/typings/survey-react-ui/src/components/header.d.ts +5 -4
- package/typings/survey-react-ui/src/components/list/list-item-content.d.ts +1 -1
- package/typings/survey-react-ui/src/components/list/list-item-group.d.ts +1 -1
- package/typings/survey-react-ui/src/components/list/list-item.d.ts +1 -1
- package/typings/survey-react-ui/src/components/matrix/row.d.ts +1 -1
- package/typings/survey-react-ui/src/components/popup/popup.d.ts +2 -2
- package/typings/survey-react-ui/src/components/question-hint.d.ts +3 -2
- package/typings/survey-react-ui/src/components/rating/rating-dropdown-item.d.ts +1 -1
- package/typings/survey-react-ui/src/components/rating/rating-item-smiley.d.ts +1 -1
- package/typings/survey-react-ui/src/components/rating/rating-item-star.d.ts +1 -1
- package/typings/survey-react-ui/src/components/rating/rating-item.d.ts +1 -2
- package/typings/survey-react-ui/src/components/survey-header/logo-image.d.ts +7 -2
- package/typings/survey-react-ui/src/components/survey-header/survey-header.d.ts +3 -2
- package/typings/survey-react-ui/src/components/title/title-actions.d.ts +3 -2
- package/typings/survey-react-ui/src/components/title/title-content.d.ts +3 -2
- package/typings/survey-react-ui/src/components/title/title-element.d.ts +3 -2
- package/typings/survey-react-ui/src/progress.d.ts +1 -1
- package/typings/survey-react-ui/src/progressButtons.d.ts +1 -1
- package/typings/survey-react-ui/src/progressToc.d.ts +1 -1
- package/typings/survey-react-ui/src/reactSurvey.d.ts +1 -0
- package/typings/survey-react-ui/src/reactquestion.d.ts +0 -2
- package/typings/survey-react-ui/src/reactquestion_element.d.ts +7 -10
- package/typings/survey-react-ui/src/reactquestion_matrixdropdownbase.d.ts +0 -4
- package/typings/survey-react-ui/src/reactquestion_paneldynamic.d.ts +14 -5
- package/typings/survey-react-ui/src/reacttimerpanel.d.ts +1 -1
- package/typings/survey-react-ui/src/row.d.ts +2 -1
- package/typings/survey-react-ui/src/tagbox-filter.d.ts +1 -1
package/fesm/survey-js-ui.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.2.
|
|
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
|
*/
|
|
6
6
|
|
|
7
|
-
import { SurveyModel, Helpers, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, createSvg, LocalizableString, RendererFactory, SvgRegistry, createPopupViewModel, CssClassBuilder, PopupModalManager, settings, ScrollViewModel, addIconsToThemeSet, ResizeManager, Question, QuestionTextModel, SurveyProgressModel, PopupSurveyModel, ButtonGroupItemModel, ActionDropdownViewModel, checkLibraryVersion } from 'survey-core';
|
|
7
|
+
import { SurveyModel, PropertyAccessTracker, Helpers, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, createSvg, LocalizableString, RendererFactory, SvgRegistry, createPopupViewModel, CssClassBuilder, PopupModalManager, settings, ScrollViewModel, addIconsToThemeSet, ResizeManager, Question, QuestionTextModel, SurveyProgressModel, PopupSurveyModel, ButtonGroupItemModel, ActionDropdownViewModel, checkLibraryVersion } from 'survey-core';
|
|
8
8
|
export { SurveyModel as Model, SurveyModel, SurveyWindowModel, settings, surveyLocalization, surveyStrings } from 'survey-core';
|
|
9
9
|
|
|
10
|
-
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$3=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function g$3(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$3(n){return n.children}function x$3(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$3(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$3(n)}}function M$2(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!$$2.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($$2);}function $$2(){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$2(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$2(f,t,c),r.__e=r.__=null,t.__e!=o&&C$3(t)));$$2.__r=0;}function I$2(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$3(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$2(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$3(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$3(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$3(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$3(o)?m$1(k$3,{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$2(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$3(e,e));return t}function A$3(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$3(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$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(w$3(n)?n.some(function(n){H$2(n,l);}):l.push(n)),l}function L$2(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$3(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$3(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$3(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$3(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$3(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$2(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$3(b,M),h.constructor=j,h.render=E$2),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$3&&null==a.key&&(L=V$2(a.props.children)),f=I$2(n,w$3(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$3(o[T]);z$3(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$3(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$3(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$3(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z$3);}function N$2(n,u,t){for(var i=0;i<t.length;i++)B$3(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$2(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:w$3(n)?n.map(V$2):d$1({},n)}function q$3(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$3(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$3(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$2("template"==t.type?u.content:u,w$3(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$3(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$3(u,a,_,b[a],o),a="checked",null!=m&&m!=u[a]&&j$3(u,a,m,b[a],o));}return u}function B$3(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$3(n,u,t){var i,r;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$3(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$3(i[r],u,t||"function"!=typeof n.type);t||g$3(n.__e),n.__c=n.__=n.__e=void 0;}function E$2(n,l,u){return this.constructor(n,u)}function G$2(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$2(t,u=(!r&&i||t).__k=_$1(k$3,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$2(e,u,f);}function J$2(n,l){G$2(n,l,J$2);}function K$2(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$2(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$2(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$3.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$2(this));},x$3.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$2(this));},x$3.prototype.render=k$3,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},$$2.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$3(!1),a$1=F$3(!0),h$1=0;
|
|
10
|
+
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$3(n,l){for(var u in l)n[u]=l[u];return n}function g$3(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$3(n){return n.children}function x$3(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$3(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$3(n)}}function M$2(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!$$2.__r++||o$1!=l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)($$2);}function $$2(){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$3({},o)).__v=o.__v+1,l$1.vnode&&l$1.vnode(t),O$2(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$2(f,t,c),o.__e=o.__=null,t.__e!=r&&C$3(t)));$$2.__r=0;}function I$2(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$3(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$2(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$3(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$3(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$3(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$3,{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$2(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$3(e,e));return t}function A$3(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$3(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$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(d$1(n)?n.some(function(n){H$2(n,l);}):l.push(n)),l}function L$2(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$3(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$3(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$3(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$3(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$3(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$2(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$3(b,M),h.constructor=j,h.render=E$2),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$3({},h.__s)),w$3(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$3(w$3({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$3&&null==a.key&&(L=V$2(a.props.children)),f=I$2(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$3(r[T]);z$3(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$3(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$3(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$3(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z$3);}function N$2(n,u,t){for(var i=0;i<t.length;i++)B$3(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$2(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:d$1(n)?n.map(V$2):w$3({},n)}function q$3(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$3(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$3(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$2("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$3(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$3(u,a,_,b[a],r),a="checked",null!=m&&m!=u[a]&&j$3(u,a,m,b[a],r));}return u}function B$3(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$3(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$3(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$3(i[o],u,t||"function"!=typeof n.type);t||g$3(n.__e),n.__c=n.__=n.__e=void 0;}function E$2(n,l,u){return this.constructor(n,u)}function G$2(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$2(t,u=(!o&&i||t).__k=_$1(k$3,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$2(e,u,f);}function J$2(n,l){G$2(n,l,J$2);}function K$2(l,u,t){var i,o,r,e,f=w$3({},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$2(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$2(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$3.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w$3({},this.state),"function"==typeof n&&(n=n(w$3({},u),this.props)),n&&w$3(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$2(this));},x$3.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$2(this));},x$3.prototype.render=k$3,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},$$2.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$3(!1),a$1=F$3(!0),h$1=0;
|
|
11
11
|
|
|
12
12
|
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$2,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D$2(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$2(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i));}function _(n,u){var i=p(t++,4);!c.__s&&C$2(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i));}function A$2(n){return o=5,T$2(function(){return {current:n}},[])}function F$2(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$2(n,r){var u=p(t++,7);return C$2(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q$2(n,t){return o=8,T$2(function(){return n},t)}function x$2(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$2(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$2(){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$2(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$2),n.__H.__h.forEach(B$2),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$2),i.__h.forEach(B$2),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$2)(j$2)),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$2),n.__h=n.__h.filter(function(n){return !n.__||B$2(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$2(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k$2="function"==typeof requestAnimationFrame;function w$2(n){var t,r=function(){clearTimeout(u),k$2&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,35);k$2&&(t=requestAnimationFrame(r));}function z$2(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$2(n){var t=r;n.__c=n.__(),r=t;}function C$2(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D$2(n,t){return "function"==typeof t?t(n):t}
|
|
13
13
|
|
|
@@ -156,11 +156,10 @@ class SurveyElementBase extends x$3 {
|
|
|
156
156
|
}
|
|
157
157
|
constructor(props) {
|
|
158
158
|
super(props);
|
|
159
|
-
this.
|
|
160
|
-
this.
|
|
161
|
-
this.propertyValueChangedHandler = (stateElement, options) => {
|
|
159
|
+
this.allowUpdate = false;
|
|
160
|
+
this.update = (stateElement, options) => {
|
|
162
161
|
const key = options.name;
|
|
163
|
-
if (!this.canUsePropInState(key) || this.
|
|
162
|
+
if (!this.canUsePropInState(key) || !this.allowUpdate)
|
|
164
163
|
return;
|
|
165
164
|
this.changedStatePropNameValue = key;
|
|
166
165
|
this.setState((state) => {
|
|
@@ -169,27 +168,44 @@ class SurveyElementBase extends x$3 {
|
|
|
169
168
|
return newState;
|
|
170
169
|
});
|
|
171
170
|
};
|
|
172
|
-
this.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
171
|
+
this.propertyAccessTracker = new PropertyAccessTracker(this.update);
|
|
172
|
+
this._allowComponentUpdate = true;
|
|
173
|
+
this.prevStateElements = [];
|
|
174
|
+
const render = this.render;
|
|
175
|
+
this.render = () => this.renderWithTracking(render);
|
|
176
|
+
}
|
|
177
|
+
renderWithTracking(render) {
|
|
178
|
+
let res = null;
|
|
179
|
+
this.propertyAccessTracker.startTracking();
|
|
180
|
+
try {
|
|
181
|
+
if (this.canRender()) {
|
|
182
|
+
this.forceHiddenDependencies();
|
|
183
|
+
res = render.call(this);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
finally {
|
|
187
|
+
this.propertyAccessTracker.stopTracking();
|
|
188
|
+
}
|
|
189
|
+
if (!!res) {
|
|
190
|
+
res = this.wrapElement(res);
|
|
191
|
+
}
|
|
192
|
+
this.changedStatePropNameValue = undefined;
|
|
193
|
+
return res;
|
|
182
194
|
}
|
|
183
195
|
componentDidMount() {
|
|
184
|
-
this.
|
|
196
|
+
this.enableStateElementsRerenderEvent(this.getStateElements());
|
|
197
|
+
this.allowUpdate = true;
|
|
198
|
+
this.propertyAccessTracker.subscribe();
|
|
185
199
|
}
|
|
186
200
|
componentWillUnmount() {
|
|
187
|
-
this.unMakeBaseElementsReact();
|
|
188
201
|
this.disableStateElementsRerenderEvent(this.getStateElements());
|
|
202
|
+
this.allowUpdate = false;
|
|
203
|
+
this.propertyAccessTracker.unsubscribe();
|
|
189
204
|
}
|
|
190
205
|
componentDidUpdate(prevProps, prevState) {
|
|
191
206
|
var _a;
|
|
192
|
-
this.
|
|
207
|
+
this.propertyAccessTracker.subscribe();
|
|
208
|
+
this.enableStateElementsRerenderEvent(this.getStateElements());
|
|
193
209
|
const stateElements = this.getStateElements();
|
|
194
210
|
this.disableStateElementsRerenderEvent(((_a = this.prevStateElements) !== null && _a !== void 0 ? _a : []).filter(el => !stateElements.find(stateElement => stateElement == el)));
|
|
195
211
|
this.prevStateElements = [];
|
|
@@ -205,47 +221,22 @@ class SurveyElementBase extends x$3 {
|
|
|
205
221
|
this._allowComponentUpdate = false;
|
|
206
222
|
}
|
|
207
223
|
shouldComponentUpdate(nextProps, nextState) {
|
|
208
|
-
|
|
209
|
-
|
|
224
|
+
const res = this._allowComponentUpdate && (this.state !== nextState || Object.keys(this.props).some(key => nextProps[key] !== this.props[key]));
|
|
225
|
+
if (res) {
|
|
210
226
|
this.prevStateElements = this.getStateElements();
|
|
211
227
|
}
|
|
212
|
-
return
|
|
228
|
+
return res;
|
|
213
229
|
}
|
|
230
|
+
forceHiddenDependencies() { }
|
|
214
231
|
render() {
|
|
215
|
-
|
|
216
|
-
return null;
|
|
217
|
-
}
|
|
218
|
-
this.startEndRendering(1);
|
|
219
|
-
var res = this.renderElement();
|
|
220
|
-
this.startEndRendering(-1);
|
|
221
|
-
if (!!res) {
|
|
222
|
-
res = this.wrapElement(res);
|
|
223
|
-
}
|
|
224
|
-
this.changedStatePropNameValue = undefined;
|
|
225
|
-
return res;
|
|
232
|
+
return this.renderElement();
|
|
226
233
|
}
|
|
227
234
|
wrapElement(element) {
|
|
228
235
|
return element;
|
|
229
236
|
}
|
|
230
|
-
get isRendering() {
|
|
231
|
-
var stateEls = this.getRenderedElements();
|
|
232
|
-
for (let stateEl of stateEls) {
|
|
233
|
-
if (stateEl.reactRendering > 0)
|
|
234
|
-
return true;
|
|
235
|
-
}
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
237
|
getRenderedElements() {
|
|
239
238
|
return this.getStateElements();
|
|
240
239
|
}
|
|
241
|
-
startEndRendering(val) {
|
|
242
|
-
var stateEls = this.getRenderedElements();
|
|
243
|
-
for (let stateEl of stateEls) {
|
|
244
|
-
if (!stateEl.reactRendering)
|
|
245
|
-
stateEl.reactRendering = 0;
|
|
246
|
-
stateEl.reactRendering += val;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
240
|
canRender() {
|
|
250
241
|
return true;
|
|
251
242
|
}
|
|
@@ -255,27 +246,16 @@ class SurveyElementBase extends x$3 {
|
|
|
255
246
|
get changedStatePropName() {
|
|
256
247
|
return this.changedStatePropNameValue;
|
|
257
248
|
}
|
|
258
|
-
makeBaseElementsReact() {
|
|
259
|
-
var els = this.getStateElements();
|
|
260
|
-
for (var i = 0; i < els.length; i++) {
|
|
261
|
-
els[i].enableOnElementRerenderedEvent();
|
|
262
|
-
this.makeBaseElementReact(els[i]);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
unMakeBaseElementsReact() {
|
|
266
|
-
var els = this.getStateElements();
|
|
267
|
-
this.unMakeBaseElementsReactive(els);
|
|
268
|
-
}
|
|
269
|
-
unMakeBaseElementsReactive(els) {
|
|
270
|
-
for (var i = 0; i < els.length; i++) {
|
|
271
|
-
this.unMakeBaseElementReact(els[i]);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
249
|
disableStateElementsRerenderEvent(els) {
|
|
275
250
|
els.forEach(el => {
|
|
276
251
|
el.disableOnElementRerenderedEvent();
|
|
277
252
|
});
|
|
278
253
|
}
|
|
254
|
+
enableStateElementsRerenderEvent(els) {
|
|
255
|
+
els.forEach(el => {
|
|
256
|
+
el.enableOnElementRerenderedEvent();
|
|
257
|
+
});
|
|
258
|
+
}
|
|
279
259
|
getStateElements() {
|
|
280
260
|
var el = this.getStateElement();
|
|
281
261
|
return !!el ? [el] : [];
|
|
@@ -290,24 +270,9 @@ class SurveyElementBase extends x$3 {
|
|
|
290
270
|
renderLocString(locStr, style = null, key) {
|
|
291
271
|
return SurveyElementBase.renderLocString(locStr, style, key);
|
|
292
272
|
}
|
|
293
|
-
canMakeReact(stateElement) {
|
|
294
|
-
return !!stateElement && !!stateElement.iteratePropertiesHash;
|
|
295
|
-
}
|
|
296
|
-
makeBaseElementReact(stateElement) {
|
|
297
|
-
if (!this.canMakeReact(stateElement))
|
|
298
|
-
return;
|
|
299
|
-
stateElement.addOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
300
|
-
stateElement.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
301
|
-
}
|
|
302
273
|
canUsePropInState(key) {
|
|
303
274
|
return true;
|
|
304
275
|
}
|
|
305
|
-
unMakeBaseElementReact(stateElement) {
|
|
306
|
-
if (!this.canMakeReact(stateElement))
|
|
307
|
-
return;
|
|
308
|
-
stateElement.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
309
|
-
stateElement.removeOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
310
|
-
}
|
|
311
276
|
}
|
|
312
277
|
class ReactSurveyElement extends SurveyElementBase {
|
|
313
278
|
constructor(props) {
|
|
@@ -409,6 +374,9 @@ class SurveyQuestionUncontrolledElement extends SurveyQuestionElementBase {
|
|
|
409
374
|
get question() {
|
|
410
375
|
return this.questionBase;
|
|
411
376
|
}
|
|
377
|
+
forceHiddenDependencies() {
|
|
378
|
+
this.getValueCore();
|
|
379
|
+
}
|
|
412
380
|
setValueCore(newValue) {
|
|
413
381
|
this.questionBase.value = newValue;
|
|
414
382
|
}
|
|
@@ -717,7 +685,7 @@ ReactElementFactory.Instance.registerElement("sv-action-bar", (props) => {
|
|
|
717
685
|
return _$1(SurveyActionBar, props);
|
|
718
686
|
});
|
|
719
687
|
|
|
720
|
-
class TitleContent extends
|
|
688
|
+
class TitleContent extends SurveyElementBase {
|
|
721
689
|
constructor(props) {
|
|
722
690
|
super(props);
|
|
723
691
|
}
|
|
@@ -727,7 +695,7 @@ class TitleContent extends x$3 {
|
|
|
727
695
|
get element() {
|
|
728
696
|
return this.props.element;
|
|
729
697
|
}
|
|
730
|
-
|
|
698
|
+
renderElement() {
|
|
731
699
|
if (this.element.isTitleRenderedAsString)
|
|
732
700
|
return SurveyElementBase.renderLocString(this.element.locRenderedTitle);
|
|
733
701
|
var spans = this.renderTitleSpans(this.element.getTitleOwner(), this.cssClasses);
|
|
@@ -763,7 +731,7 @@ class TitleContent extends x$3 {
|
|
|
763
731
|
}
|
|
764
732
|
}
|
|
765
733
|
|
|
766
|
-
class TitleActions extends
|
|
734
|
+
class TitleActions extends SurveyElementBase {
|
|
767
735
|
get cssClasses() {
|
|
768
736
|
return this.props.cssClasses;
|
|
769
737
|
}
|
|
@@ -773,7 +741,7 @@ class TitleActions extends x$3 {
|
|
|
773
741
|
get renderActions() {
|
|
774
742
|
return this.props.renderActions === undefined ? true : this.props.renderActions;
|
|
775
743
|
}
|
|
776
|
-
|
|
744
|
+
renderElement() {
|
|
777
745
|
const titleContent = _$1(TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
778
746
|
if (!this.element.hasVisibleTitleActions)
|
|
779
747
|
return titleContent;
|
|
@@ -787,7 +755,7 @@ ReactElementFactory.Instance.registerElement("sv-title-actions", (props) => {
|
|
|
787
755
|
return _$1(TitleActions, props);
|
|
788
756
|
});
|
|
789
757
|
|
|
790
|
-
class TitleElement extends
|
|
758
|
+
class TitleElement extends SurveyElementBase {
|
|
791
759
|
constructor(props) {
|
|
792
760
|
super(props);
|
|
793
761
|
}
|
|
@@ -800,7 +768,7 @@ class TitleElement extends x$3 {
|
|
|
800
768
|
return _$1("span", { className: this.element.getCssTitleExpandableSvgContainer() },
|
|
801
769
|
_$1(SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: this.element.titleExpandableSvgIconName, size: "auto" }));
|
|
802
770
|
}
|
|
803
|
-
|
|
771
|
+
renderElement() {
|
|
804
772
|
const element = this.element;
|
|
805
773
|
if (!element || !element.hasTitle)
|
|
806
774
|
return null;
|
|
@@ -821,7 +789,7 @@ class TitleElement extends x$3 {
|
|
|
821
789
|
}
|
|
822
790
|
}
|
|
823
791
|
|
|
824
|
-
class SurveyHeader extends
|
|
792
|
+
class SurveyHeader extends SurveyElementBase {
|
|
825
793
|
constructor(props) {
|
|
826
794
|
super(props);
|
|
827
795
|
this.state = { changed: 0 };
|
|
@@ -834,13 +802,12 @@ class SurveyHeader extends x$3 {
|
|
|
834
802
|
return this.survey.css;
|
|
835
803
|
}
|
|
836
804
|
componentDidMount() {
|
|
837
|
-
|
|
805
|
+
super.componentDidMount();
|
|
838
806
|
this.survey.afterRenderHeader(this.rootRef.current);
|
|
839
|
-
this.survey.locLogo.onChanged =
|
|
840
|
-
self.setState({ changed: self.state.changed + 1 });
|
|
841
|
-
};
|
|
807
|
+
this.survey.locLogo.onChanged = () => { this.setState({ changed: this.state.changed + 1 }); };
|
|
842
808
|
}
|
|
843
809
|
componentWillUnmount() {
|
|
810
|
+
super.componentWillUnmount();
|
|
844
811
|
this.survey.locLogo.onChanged = function () { };
|
|
845
812
|
}
|
|
846
813
|
renderTitle() {
|
|
@@ -860,7 +827,7 @@ class SurveyHeader extends x$3 {
|
|
|
860
827
|
data: componentData,
|
|
861
828
|
});
|
|
862
829
|
}
|
|
863
|
-
|
|
830
|
+
renderElement() {
|
|
864
831
|
if (!this.survey.renderedHasHeader)
|
|
865
832
|
return null;
|
|
866
833
|
return (_$1("div", { className: this.css.header, ref: this.rootRef },
|
|
@@ -930,8 +897,8 @@ ReactElementFactory.Instance.registerElement("sv-notifier", (props) => {
|
|
|
930
897
|
return _$1(NotifierComponent, props);
|
|
931
898
|
});
|
|
932
899
|
|
|
933
|
-
class ComponentsContainer extends
|
|
934
|
-
|
|
900
|
+
class ComponentsContainer extends SurveyElementBase {
|
|
901
|
+
renderElement() {
|
|
935
902
|
const components = this.props.survey.getContainerContent(this.props.container);
|
|
936
903
|
const needRenderWrapper = this.props.needRenderWrapper === false ? false : true;
|
|
937
904
|
if (components.length == 0) {
|
|
@@ -1018,7 +985,7 @@ class Popup extends SurveyElementBase {
|
|
|
1018
985
|
}
|
|
1019
986
|
return isNeedUpdate;
|
|
1020
987
|
}
|
|
1021
|
-
|
|
988
|
+
renderElement() {
|
|
1022
989
|
this.popup.model = this.model;
|
|
1023
990
|
let popupContainer;
|
|
1024
991
|
if (this.model.isModal) {
|
|
@@ -1090,7 +1057,7 @@ class PopupContainer extends SurveyElementBase {
|
|
|
1090
1057
|
return (_$1("div", { className: "sv-popup__body-footer" },
|
|
1091
1058
|
_$1(SurveyActionBar, { model: popuModel.footerToolbar })));
|
|
1092
1059
|
}
|
|
1093
|
-
|
|
1060
|
+
renderElement() {
|
|
1094
1061
|
// Stays mounted and subscribed to the view model: Popup does not re-render when the popup opens.
|
|
1095
1062
|
if (!this.model.hasBeenShown)
|
|
1096
1063
|
return null;
|
|
@@ -1175,9 +1142,11 @@ class PopupModal extends SurveyElementBase {
|
|
|
1175
1142
|
return _$1(k$3, null, this.modalManager.getModals().map(model => $$1(_$1(PopupContainer, { model: model }), model.container, model.uniqueId.toString())));
|
|
1176
1143
|
}
|
|
1177
1144
|
componentDidMount() {
|
|
1145
|
+
super.componentDidMount();
|
|
1178
1146
|
PopupModal.addModalDescriptor(this.descriptor);
|
|
1179
1147
|
}
|
|
1180
1148
|
componentWillUnmount() {
|
|
1149
|
+
super.componentWillUnmount();
|
|
1181
1150
|
this.modalManager.clear();
|
|
1182
1151
|
PopupModal.removeModalDescriptor(this.descriptor);
|
|
1183
1152
|
}
|
|
@@ -1476,6 +1445,7 @@ class Survey extends SurveyElementBase {
|
|
|
1476
1445
|
super(props);
|
|
1477
1446
|
this.previousJSON = {};
|
|
1478
1447
|
this.isSurveyUpdated = false;
|
|
1448
|
+
this.key = 0;
|
|
1479
1449
|
this.createSurvey(props);
|
|
1480
1450
|
this.updateSurvey(props, {});
|
|
1481
1451
|
this.rootRef = b$1();
|
|
@@ -1609,7 +1579,7 @@ class Survey extends SurveyElementBase {
|
|
|
1609
1579
|
if (!!this.survey.renderedWidth) {
|
|
1610
1580
|
style.maxWidth = this.survey.renderedWidth;
|
|
1611
1581
|
}
|
|
1612
|
-
return (_$1("div", { className: this.survey.bodyContainerCss },
|
|
1582
|
+
return (_$1("div", { key: this.key, className: this.survey.bodyContainerCss },
|
|
1613
1583
|
_$1(ComponentsContainer, { survey: this.survey, container: "left" }),
|
|
1614
1584
|
_$1("div", { className: "sv-components-column sv-components-column--expandable" },
|
|
1615
1585
|
_$1(ComponentsContainer, { survey: this.survey, container: "center" }),
|
|
@@ -1678,6 +1648,13 @@ class Survey extends SurveyElementBase {
|
|
|
1678
1648
|
}
|
|
1679
1649
|
if (newProps[key] === oldProps[key])
|
|
1680
1650
|
continue;
|
|
1651
|
+
if (key == "settings") {
|
|
1652
|
+
// Data for the model's settings() method; assigning it would replace the method. An absent value applies nothing
|
|
1653
|
+
if (newProps.settings !== undefined && newProps.settings !== null) {
|
|
1654
|
+
this.survey.settings(newProps.settings);
|
|
1655
|
+
}
|
|
1656
|
+
continue;
|
|
1657
|
+
}
|
|
1681
1658
|
if (key.indexOf("on") == 0 && this.survey[key] && this.survey[key].add) {
|
|
1682
1659
|
if (!!oldProps[key]) {
|
|
1683
1660
|
this.survey[key].remove(oldProps[key]);
|
|
@@ -1690,14 +1667,13 @@ class Survey extends SurveyElementBase {
|
|
|
1690
1667
|
}
|
|
1691
1668
|
}
|
|
1692
1669
|
setSurveyEvents() {
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
self.setState({ modelChanged: counter + 1 });
|
|
1670
|
+
this.survey.renderCallback = () => {
|
|
1671
|
+
this.key++;
|
|
1672
|
+
this.forceUpdate();
|
|
1697
1673
|
};
|
|
1698
1674
|
this.survey.onPartialSend.add((sender) => {
|
|
1699
|
-
if (!!
|
|
1700
|
-
|
|
1675
|
+
if (!!this.state) {
|
|
1676
|
+
this.setState(this.state);
|
|
1701
1677
|
}
|
|
1702
1678
|
});
|
|
1703
1679
|
}
|
|
@@ -1768,7 +1744,7 @@ class SurveyTimerPanel extends ReactSurveyElement {
|
|
|
1768
1744
|
get progress() {
|
|
1769
1745
|
return -this.timerModel.progress * this.circleLength;
|
|
1770
1746
|
}
|
|
1771
|
-
|
|
1747
|
+
renderElement() {
|
|
1772
1748
|
if (!this.timerModel.isRunning) {
|
|
1773
1749
|
return null;
|
|
1774
1750
|
}
|
|
@@ -1910,14 +1886,18 @@ class SurveyRow extends SurveyElementBase {
|
|
|
1910
1886
|
}
|
|
1911
1887
|
componentDidMount() {
|
|
1912
1888
|
super.componentDidMount();
|
|
1889
|
+
if (!this.row)
|
|
1890
|
+
return;
|
|
1891
|
+
this.row.changeUIMountCount(1);
|
|
1913
1892
|
var el = this.rootRef.current;
|
|
1914
1893
|
if (this.rootRef.current) {
|
|
1915
1894
|
this.row.setRootElement(this.rootRef.current);
|
|
1916
1895
|
}
|
|
1917
1896
|
if (!!el && !this.row.isNeedRender) {
|
|
1897
|
+
var row = this.row;
|
|
1918
1898
|
var rowContainerDiv = el;
|
|
1919
1899
|
this.lazyRenderingTimeout = setTimeout(() => {
|
|
1920
|
-
|
|
1900
|
+
row.startLazyRendering(rowContainerDiv);
|
|
1921
1901
|
}, 10);
|
|
1922
1902
|
}
|
|
1923
1903
|
}
|
|
@@ -1925,27 +1905,42 @@ class SurveyRow extends SurveyElementBase {
|
|
|
1925
1905
|
if (!super.shouldComponentUpdate(nextProps, nextState))
|
|
1926
1906
|
return false;
|
|
1927
1907
|
if (nextProps.row !== this.row) {
|
|
1908
|
+
// The next render reads these from the new row. The previous row is released at commit, in componentDidUpdate.
|
|
1928
1909
|
nextProps.row.isNeedRender = this.row.isNeedRender;
|
|
1929
1910
|
nextProps.row.setRootElement(this.rootRef.current);
|
|
1930
|
-
this.row.setRootElement(undefined);
|
|
1931
|
-
this.stopLazyRendering();
|
|
1932
1911
|
}
|
|
1933
1912
|
this.recalculateCss();
|
|
1934
1913
|
return true;
|
|
1935
1914
|
}
|
|
1936
|
-
|
|
1915
|
+
componentDidUpdate(prevProps, prevState) {
|
|
1916
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
1917
|
+
const prevRow = prevProps.row;
|
|
1918
|
+
if (prevRow === this.row)
|
|
1919
|
+
return;
|
|
1937
1920
|
clearTimeout(this.lazyRenderingTimeout);
|
|
1938
|
-
this.row
|
|
1939
|
-
|
|
1921
|
+
if (!!this.row) {
|
|
1922
|
+
this.row.changeUIMountCount(1);
|
|
1923
|
+
}
|
|
1924
|
+
this.releaseRowIfUnmounted(prevRow);
|
|
1940
1925
|
}
|
|
1941
1926
|
componentWillUnmount() {
|
|
1942
1927
|
super.componentWillUnmount();
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1928
|
+
clearTimeout(this.lazyRenderingTimeout);
|
|
1929
|
+
this.releaseRowIfUnmounted(this.row);
|
|
1930
|
+
}
|
|
1931
|
+
// Another component may still render the row (#10701), so only the last one to unmount resets it.
|
|
1932
|
+
releaseRowIfUnmounted(row) {
|
|
1933
|
+
if (!row)
|
|
1934
|
+
return;
|
|
1935
|
+
if (row.changeUIMountCount(-1) > 0) {
|
|
1936
|
+
if (row.getRootElement() === this.rootRef.current) {
|
|
1937
|
+
row.setRootElement(undefined);
|
|
1947
1938
|
}
|
|
1939
|
+
return;
|
|
1948
1940
|
}
|
|
1941
|
+
row.setRootElement(undefined);
|
|
1942
|
+
row.stopLazyRendering();
|
|
1943
|
+
row.isNeedRender = !row.isLazyRendering();
|
|
1949
1944
|
}
|
|
1950
1945
|
createElement(element, elementIndex) {
|
|
1951
1946
|
const index = elementIndex ? "-" + elementIndex : 0;
|
|
@@ -1984,7 +1979,7 @@ class SurveyPanelBase extends SurveyElementBase {
|
|
|
1984
1979
|
return this.getCss();
|
|
1985
1980
|
}
|
|
1986
1981
|
getPanelFromProps(props) {
|
|
1987
|
-
return
|
|
1982
|
+
return props.element || props.question;
|
|
1988
1983
|
}
|
|
1989
1984
|
get panelBase() {
|
|
1990
1985
|
return this.getPanelFromProps(this.props);
|
|
@@ -2325,14 +2320,14 @@ ReactElementFactory.Instance.registerElement("sv-breadcrumbs", (props) => {
|
|
|
2325
2320
|
return _$1(SurveyBreadcrumbs, props);
|
|
2326
2321
|
});
|
|
2327
2322
|
|
|
2328
|
-
class QuestionHint extends
|
|
2323
|
+
class QuestionHint extends SurveyElementBase {
|
|
2329
2324
|
renderHint(hint, index) {
|
|
2330
2325
|
if (hint.alternatives.length > 0) {
|
|
2331
2326
|
return (_$1("span", { className: hint.className, key: index }, hint.alternatives.map((alternative, alternativeIndex) => this.renderHint(alternative, alternativeIndex))));
|
|
2332
2327
|
}
|
|
2333
2328
|
return (_$1("span", { className: hint.className, key: index }, hint.parts.map((part, partIndex) => (_$1("span", { key: partIndex, className: part.className }, part.text)))));
|
|
2334
2329
|
}
|
|
2335
|
-
|
|
2330
|
+
renderElement() {
|
|
2336
2331
|
const keyboardHintModel = this.props.question.getKeyboardHintModel();
|
|
2337
2332
|
if (!keyboardHintModel.hasItems())
|
|
2338
2333
|
return null;
|
|
@@ -2440,7 +2435,7 @@ class SurveyQuestion extends SurveyElementBase {
|
|
|
2440
2435
|
const singleInput = singleSummary || (question.singleInputQuestion ? this.renderSingleInputQuestion(question, cssClasses) : undefined);
|
|
2441
2436
|
const questionContent = singleInput || this.wrapQuestionContent(this.renderQuestionContent());
|
|
2442
2437
|
return (_$1(k$3, null,
|
|
2443
|
-
_$1("div", { ref: this.rootRef, id: question.
|
|
2438
|
+
_$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) },
|
|
2444
2439
|
singleBreadcrumbs,
|
|
2445
2440
|
_$1("div", { className: question.getQuestionContainerCss() },
|
|
2446
2441
|
errorsAboveQuestion,
|
|
@@ -2503,7 +2498,6 @@ ReactElementFactory.Instance.registerElement("question", (props) => {
|
|
|
2503
2498
|
class SurveyElementErrors extends ReactSurveyElement {
|
|
2504
2499
|
constructor(props) {
|
|
2505
2500
|
super(props);
|
|
2506
|
-
this.state = this.getState();
|
|
2507
2501
|
}
|
|
2508
2502
|
get id() {
|
|
2509
2503
|
return this.props.element.renderedId + "_errors";
|
|
@@ -2514,14 +2508,9 @@ class SurveyElementErrors extends ReactSurveyElement {
|
|
|
2514
2508
|
get creator() {
|
|
2515
2509
|
return this.props.creator;
|
|
2516
2510
|
}
|
|
2517
|
-
getState(prevState = null) {
|
|
2518
|
-
return !prevState ? { error: 0 } : { error: prevState.error + 1 };
|
|
2519
|
-
}
|
|
2520
2511
|
canRender() {
|
|
2521
2512
|
return !!this.element && this.element.hasVisibleErrors;
|
|
2522
2513
|
}
|
|
2523
|
-
componentWillUnmount() {
|
|
2524
|
-
}
|
|
2525
2514
|
renderElement() {
|
|
2526
2515
|
const errors = [];
|
|
2527
2516
|
for (let i = 0; i < this.element.renderedErrors.length; i++) {
|
|
@@ -2729,7 +2718,7 @@ class SurveyPanel extends SurveyPanelBase {
|
|
|
2729
2718
|
if (this.panelBase)
|
|
2730
2719
|
this.panelBase.focusIn();
|
|
2731
2720
|
};
|
|
2732
|
-
return (_$1("div", { ref: this.rootRef, className: this.panelBase.getContainerCss(), onFocus: focusIn, id: this.panelBase.
|
|
2721
|
+
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) },
|
|
2733
2722
|
this.panel.showErrorsAbovePanel ? errors : null,
|
|
2734
2723
|
header,
|
|
2735
2724
|
this.panel.showErrorsAbovePanel ? null : errors,
|
|
@@ -3299,22 +3288,19 @@ class RatingItemBase extends SurveyElementBase {
|
|
|
3299
3288
|
}
|
|
3300
3289
|
}
|
|
3301
3290
|
class RatingItem extends RatingItemBase {
|
|
3302
|
-
|
|
3291
|
+
renderElement() {
|
|
3303
3292
|
var itemText = this.renderLocString(this.item.locText);
|
|
3304
3293
|
return (_$1("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
|
|
3305
3294
|
_$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
3295
|
_$1("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
|
|
3307
3296
|
}
|
|
3308
|
-
componentDidMount() {
|
|
3309
|
-
super.componentDidMount();
|
|
3310
|
-
}
|
|
3311
3297
|
}
|
|
3312
3298
|
ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
|
|
3313
3299
|
return _$1(RatingItem, props);
|
|
3314
3300
|
});
|
|
3315
3301
|
|
|
3316
3302
|
class RatingItemStar extends RatingItemBase {
|
|
3317
|
-
|
|
3303
|
+
renderElement() {
|
|
3318
3304
|
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 },
|
|
3319
3305
|
_$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 }),
|
|
3320
3306
|
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
|
|
@@ -3326,7 +3312,7 @@ ReactElementFactory.Instance.registerElement("sv-rating-item-star", (props) => {
|
|
|
3326
3312
|
});
|
|
3327
3313
|
|
|
3328
3314
|
class RatingItemSmiley extends RatingItemBase {
|
|
3329
|
-
|
|
3315
|
+
renderElement() {
|
|
3330
3316
|
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 },
|
|
3331
3317
|
_$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 }),
|
|
3332
3318
|
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
|
|
@@ -3343,7 +3329,7 @@ class RatingDropdownItem extends SurveyElementBase {
|
|
|
3343
3329
|
getStateElement() {
|
|
3344
3330
|
return this.item;
|
|
3345
3331
|
}
|
|
3346
|
-
|
|
3332
|
+
renderElement() {
|
|
3347
3333
|
if (!this.item)
|
|
3348
3334
|
return null;
|
|
3349
3335
|
const item = this.props.item;
|
|
@@ -3412,7 +3398,7 @@ class TagboxFilterString extends SurveyElementBase {
|
|
|
3412
3398
|
getStateElement() {
|
|
3413
3399
|
return this.props.model || this.question.dropdownListModelValue;
|
|
3414
3400
|
}
|
|
3415
|
-
|
|
3401
|
+
renderElement() {
|
|
3416
3402
|
return (_$1("div", { className: this.question.cssClasses.hint },
|
|
3417
3403
|
this.renderState.showHintPrefix ?
|
|
3418
3404
|
(_$1("div", { className: this.question.cssClasses.hintPrefix },
|
|
@@ -3936,12 +3922,15 @@ class SurveyQuestionHtml extends SurveyQuestionElementBase {
|
|
|
3936
3922
|
return this.questionBase;
|
|
3937
3923
|
}
|
|
3938
3924
|
componentDidMount() {
|
|
3925
|
+
super.componentDidMount();
|
|
3939
3926
|
this.reactOnStrChanged();
|
|
3940
3927
|
}
|
|
3941
3928
|
componentWillUnmount() {
|
|
3929
|
+
super.componentWillUnmount();
|
|
3942
3930
|
this.question.locHtml.onChanged = function () { };
|
|
3943
3931
|
}
|
|
3944
3932
|
componentDidUpdate(prevProps, prevState) {
|
|
3933
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
3945
3934
|
this.reactOnStrChanged();
|
|
3946
3935
|
}
|
|
3947
3936
|
reactOnStrChanged() {
|
|
@@ -4044,7 +4033,7 @@ class SurveyFileChooseButton extends ReactSurveyElement {
|
|
|
4044
4033
|
get question() {
|
|
4045
4034
|
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
4046
4035
|
}
|
|
4047
|
-
|
|
4036
|
+
renderElement() {
|
|
4048
4037
|
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) },
|
|
4049
4038
|
!!this.props.item.iconName ? _$1(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto", className: this.props.item.cssClasses.itemIcon }) : null,
|
|
4050
4039
|
this.props.item.hasTitle ? _$1(SurveyLocStringViewer, { model: this.props.item.locTitle, textClass: this.props.item.getActionBarItemTitleCss() }) : null));
|
|
@@ -4063,7 +4052,7 @@ class SurveyFilePage extends SurveyElementBase {
|
|
|
4063
4052
|
}
|
|
4064
4053
|
renderElement() {
|
|
4065
4054
|
const items = this.page.items.map((item, index) => { return ReactElementFactory.Instance.createElement("sv-file-item", { item, question: this.question, key: index }); });
|
|
4066
|
-
return (_$1("div", { className: this.page.css, id: this.page.
|
|
4055
|
+
return (_$1("div", { className: this.page.css, id: this.page.renderedId }, items));
|
|
4067
4056
|
}
|
|
4068
4057
|
}
|
|
4069
4058
|
|
|
@@ -4560,7 +4549,7 @@ class MatrixRow extends SurveyElementBase {
|
|
|
4560
4549
|
}
|
|
4561
4550
|
return true;
|
|
4562
4551
|
}
|
|
4563
|
-
|
|
4552
|
+
renderElement() {
|
|
4564
4553
|
const model = this.model;
|
|
4565
4554
|
if (!model.visible)
|
|
4566
4555
|
return null;
|
|
@@ -4753,29 +4742,10 @@ class SurveyQuestionMatrixDropdownBase extends SurveyQuestionElementBase {
|
|
|
4753
4742
|
super(props);
|
|
4754
4743
|
//Create rendered table in contructor and not on rendering
|
|
4755
4744
|
this.question.renderedTable;
|
|
4756
|
-
this.state = this.getState();
|
|
4757
4745
|
}
|
|
4758
4746
|
get question() {
|
|
4759
4747
|
return this.questionBase;
|
|
4760
4748
|
}
|
|
4761
|
-
getState(prevState = null) {
|
|
4762
|
-
return { rowCounter: !prevState ? 0 : prevState.rowCounter + 1 };
|
|
4763
|
-
}
|
|
4764
|
-
updateStateOnCallback() {
|
|
4765
|
-
if (this.isRendering)
|
|
4766
|
-
return;
|
|
4767
|
-
this.setState(this.getState(this.state));
|
|
4768
|
-
}
|
|
4769
|
-
componentDidMount() {
|
|
4770
|
-
super.componentDidMount();
|
|
4771
|
-
this.question.onRenderedTableResetCallback = () => {
|
|
4772
|
-
this.updateStateOnCallback();
|
|
4773
|
-
};
|
|
4774
|
-
}
|
|
4775
|
-
componentWillUnmount() {
|
|
4776
|
-
super.componentWillUnmount();
|
|
4777
|
-
this.question.onRenderedTableResetCallback = () => { };
|
|
4778
|
-
}
|
|
4779
4749
|
renderElement() {
|
|
4780
4750
|
return this.renderTableDiv();
|
|
4781
4751
|
}
|
|
@@ -5040,6 +5010,9 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
5040
5010
|
get question() {
|
|
5041
5011
|
return this.questionBase;
|
|
5042
5012
|
}
|
|
5013
|
+
getStateElement() {
|
|
5014
|
+
return this.question;
|
|
5015
|
+
}
|
|
5043
5016
|
componentDidMount() {
|
|
5044
5017
|
super.componentDidMount();
|
|
5045
5018
|
this.setState({ panelCounter: 0 });
|
|
@@ -5069,7 +5042,7 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
5069
5042
|
const panels = [];
|
|
5070
5043
|
const cssClasses = this.question.cssClasses;
|
|
5071
5044
|
this.question.renderedPanels.forEach((panel, index) => {
|
|
5072
|
-
panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id,
|
|
5045
|
+
panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id, panel: panel, question: this.question, index: index, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
|
|
5073
5046
|
});
|
|
5074
5047
|
const rangeTop = this.question.isRangeShowing && this.question.isProgressTopShowing
|
|
5075
5048
|
? this.renderRange()
|
|
@@ -5115,13 +5088,16 @@ class SurveyQuestionPanelDynamic extends SurveyQuestionElementBase {
|
|
|
5115
5088
|
return null;
|
|
5116
5089
|
}
|
|
5117
5090
|
}
|
|
5118
|
-
class SurveyQuestionPanelDynamicItem extends
|
|
5091
|
+
class SurveyQuestionPanelDynamicItem extends SurveyElementBase {
|
|
5119
5092
|
get question() {
|
|
5120
5093
|
return this.props.question;
|
|
5121
5094
|
}
|
|
5122
5095
|
get index() {
|
|
5123
5096
|
return this.props.index;
|
|
5124
5097
|
}
|
|
5098
|
+
get panel() {
|
|
5099
|
+
return this.props.panel;
|
|
5100
|
+
}
|
|
5125
5101
|
getSurvey() {
|
|
5126
5102
|
return !!this.question ? this.question.survey : null;
|
|
5127
5103
|
}
|
|
@@ -5129,14 +5105,13 @@ class SurveyQuestionPanelDynamicItem extends SurveyPanel {
|
|
|
5129
5105
|
const survey = this.getSurvey();
|
|
5130
5106
|
return !!survey ? survey.getCss() : {};
|
|
5131
5107
|
}
|
|
5132
|
-
|
|
5133
|
-
const panel = super.render();
|
|
5108
|
+
renderElement() {
|
|
5134
5109
|
const removeButton = this.renderButton();
|
|
5135
5110
|
const separator = this.question.showSeparator(this.index) ?
|
|
5136
5111
|
(_$1("hr", { className: this.question.cssClasses.separator })) : null;
|
|
5137
5112
|
return (_$1(k$3, null,
|
|
5138
5113
|
_$1("div", { className: this.question.getPanelWrapperCss(this.panel) },
|
|
5139
|
-
panel,
|
|
5114
|
+
_$1(SurveyPanel, { element: this.panel, cssClasses: this.props.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.props.creator }),
|
|
5140
5115
|
removeButton),
|
|
5141
5116
|
separator));
|
|
5142
5117
|
}
|
|
@@ -5185,7 +5160,7 @@ class SurveyProgress extends SurveyNavigationBase {
|
|
|
5185
5160
|
get progressBarAriaLabel() {
|
|
5186
5161
|
return this.model.progressBarAriaLabel;
|
|
5187
5162
|
}
|
|
5188
|
-
|
|
5163
|
+
renderElement() {
|
|
5189
5164
|
var progressStyle = {
|
|
5190
5165
|
width: this.progress + "%",
|
|
5191
5166
|
};
|
|
@@ -5221,7 +5196,7 @@ class SurveyProgressButtons extends SurveyNavigationBase {
|
|
|
5221
5196
|
getStateElement() {
|
|
5222
5197
|
return this.model;
|
|
5223
5198
|
}
|
|
5224
|
-
|
|
5199
|
+
renderElement() {
|
|
5225
5200
|
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) },
|
|
5226
5201
|
_$1("div", { className: this.css.progressButtonsContainer, role: "presentation" },
|
|
5227
5202
|
_$1("div", { className: this.css.progressButtonsListContainer, role: "presentation" },
|
|
@@ -5269,7 +5244,7 @@ class ListItem extends SurveyElementBase {
|
|
|
5269
5244
|
getStateElement() {
|
|
5270
5245
|
return this.item;
|
|
5271
5246
|
}
|
|
5272
|
-
|
|
5247
|
+
renderElement() {
|
|
5273
5248
|
if (!this.item)
|
|
5274
5249
|
return null;
|
|
5275
5250
|
const className = this.model.getItemClass(this.item);
|
|
@@ -5437,7 +5412,7 @@ class SurveyProgressToc extends SurveyNavigationBase {
|
|
|
5437
5412
|
const tocModel = this.props.model;
|
|
5438
5413
|
tocModel.updateStickyTOCSize(this.survey.rootElement);
|
|
5439
5414
|
}
|
|
5440
|
-
|
|
5415
|
+
renderElement() {
|
|
5441
5416
|
const tocModel = this.props.model;
|
|
5442
5417
|
let content;
|
|
5443
5418
|
if (tocModel.isMobile) {
|
|
@@ -5574,14 +5549,14 @@ class SurveyQuestionSlider extends SurveyQuestionElementBase {
|
|
|
5574
5549
|
return thumb;
|
|
5575
5550
|
}
|
|
5576
5551
|
getInput(i) {
|
|
5577
|
-
const { renderedMax: max, renderedMin: min, step, cssClasses, isDisabledAttr, renderedValue, handleOnChange, handlePointerDown, handlePointerUp, handleKeyDown, handleKeyUp, handleOnFocus, handleOnBlur,
|
|
5552
|
+
const { renderedMax: max, renderedMin: min, step, cssClasses, isDisabledAttr, renderedValue, handleOnChange, handlePointerDown, handlePointerUp, handleKeyDown, handleKeyUp, handleOnFocus, handleOnBlur, renderedId } = this.question;
|
|
5578
5553
|
const value = renderedValue[i];
|
|
5579
|
-
const input = _$1("input", { className: cssClasses.input, id:
|
|
5554
|
+
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 });
|
|
5580
5555
|
return input;
|
|
5581
5556
|
}
|
|
5582
5557
|
getRangeInput() {
|
|
5583
|
-
const { renderedMax: max, renderedMin: min, step, cssClasses, handleRangeOnChange, handleRangePointerDown, handleRangePointerUp,
|
|
5584
|
-
return _$1("input", { name: "range-input", id:
|
|
5558
|
+
const { renderedMax: max, renderedMin: min, step, cssClasses, handleRangeOnChange, handleRangePointerDown, handleRangePointerUp, renderedId } = this.question;
|
|
5559
|
+
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); } });
|
|
5585
5560
|
}
|
|
5586
5561
|
getLabels() {
|
|
5587
5562
|
const labels = [];
|
|
@@ -5912,8 +5887,8 @@ class SurveyQuestionImageMap extends SurveyQuestionElementBase {
|
|
|
5912
5887
|
}
|
|
5913
5888
|
renderElement() {
|
|
5914
5889
|
return (_$1("div", { className: this.question.cssClasses.root, ref: (root) => (this.setControl(root)) },
|
|
5915
|
-
_$1("img", { className: this.question.cssClasses.bg, id: `${this.question.
|
|
5916
|
-
_$1("svg", { className: this.question.cssClasses.svg, id: `${this.question.
|
|
5890
|
+
_$1("img", { className: this.question.cssClasses.bg, id: `${this.question.renderedId}-bg`, src: this.question.imageLink, role: "presentation" }),
|
|
5891
|
+
_$1("svg", { className: this.question.cssClasses.svg, id: `${this.question.renderedId}-svg` })));
|
|
5917
5892
|
}
|
|
5918
5893
|
}
|
|
5919
5894
|
ReactQuestionFactory.Instance.registerQuestion("imagemap", (props) => {
|
|
@@ -6147,7 +6122,7 @@ class ListItemContent extends SurveyElementBase {
|
|
|
6147
6122
|
getStateElement() {
|
|
6148
6123
|
return this.item;
|
|
6149
6124
|
}
|
|
6150
|
-
|
|
6125
|
+
renderElement() {
|
|
6151
6126
|
if (!this.item)
|
|
6152
6127
|
return null;
|
|
6153
6128
|
const text = this.renderLocString(this.item.locTitle, undefined, "locString");
|
|
@@ -6175,7 +6150,7 @@ class ListItemGroup extends SurveyElementBase {
|
|
|
6175
6150
|
getStateElement() {
|
|
6176
6151
|
return this.item;
|
|
6177
6152
|
}
|
|
6178
|
-
|
|
6153
|
+
renderElement() {
|
|
6179
6154
|
var _a;
|
|
6180
6155
|
if (!this.item)
|
|
6181
6156
|
return null;
|
|
@@ -6200,6 +6175,7 @@ class SurveyActionBarItemDropdown extends SurveyActionBarItem {
|
|
|
6200
6175
|
_$1(Popup, { model: this.item.popupModel })));
|
|
6201
6176
|
}
|
|
6202
6177
|
componentDidMount() {
|
|
6178
|
+
super.componentDidMount();
|
|
6203
6179
|
this.viewModel = new ActionDropdownViewModel(this.item);
|
|
6204
6180
|
}
|
|
6205
6181
|
componentWillUnmount() {
|
|
@@ -6227,14 +6203,29 @@ ReactElementFactory.Instance.registerElement("sv-sort-bar-level", (props) => {
|
|
|
6227
6203
|
return _$1(SurveySortBarLevel, props);
|
|
6228
6204
|
});
|
|
6229
6205
|
|
|
6230
|
-
class LogoImage extends
|
|
6206
|
+
class LogoImage extends SurveyElementBase {
|
|
6231
6207
|
constructor(props) {
|
|
6232
6208
|
super(props);
|
|
6209
|
+
this.reactOnStrChanged = () => {
|
|
6210
|
+
this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
|
|
6211
|
+
};
|
|
6233
6212
|
}
|
|
6234
6213
|
get survey() {
|
|
6235
6214
|
return this.props.data;
|
|
6236
6215
|
}
|
|
6237
|
-
|
|
6216
|
+
componentDidMount() {
|
|
6217
|
+
super.componentDidMount();
|
|
6218
|
+
this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
6219
|
+
}
|
|
6220
|
+
componentDidUpdate(prevProps, prevState) {
|
|
6221
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
6222
|
+
this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
6223
|
+
}
|
|
6224
|
+
componentWillUnmount() {
|
|
6225
|
+
super.componentWillUnmount();
|
|
6226
|
+
this.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
|
|
6227
|
+
}
|
|
6228
|
+
renderElement() {
|
|
6238
6229
|
const content = [];
|
|
6239
6230
|
content.push(_$1("div", { key: "logo-image", className: this.survey.logoClassNames },
|
|
6240
6231
|
_$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 } })));
|
|
@@ -6339,7 +6330,7 @@ ReactElementFactory.Instance.registerElement("sv-slider-label-item", (props) =>
|
|
|
6339
6330
|
class Skeleton extends x$3 {
|
|
6340
6331
|
render() {
|
|
6341
6332
|
var _a, _b;
|
|
6342
|
-
return (_$1("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.
|
|
6333
|
+
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 } }));
|
|
6343
6334
|
}
|
|
6344
6335
|
}
|
|
6345
6336
|
ReactElementFactory.Instance.registerElement("sv-skeleton", (props) => {
|
|
@@ -6376,7 +6367,7 @@ ReactElementFactory.Instance.registerElement("sv-character-counter", (props) =>
|
|
|
6376
6367
|
return _$1(CharacterCounterComponent, props);
|
|
6377
6368
|
});
|
|
6378
6369
|
|
|
6379
|
-
class HeaderMobile extends
|
|
6370
|
+
class HeaderMobile extends SurveyElementBase {
|
|
6380
6371
|
get model() {
|
|
6381
6372
|
return this.props.model;
|
|
6382
6373
|
}
|
|
@@ -6387,7 +6378,7 @@ class HeaderMobile extends x$3 {
|
|
|
6387
6378
|
data: componentData,
|
|
6388
6379
|
});
|
|
6389
6380
|
}
|
|
6390
|
-
|
|
6381
|
+
renderElement() {
|
|
6391
6382
|
return (_$1("div", { className: "sv-header--mobile" },
|
|
6392
6383
|
this.model.survey.hasLogo ? (_$1("div", { className: "sv-header__logo" }, this.renderLogoImage())) : null,
|
|
6393
6384
|
this.model.survey.hasTitle ? (_$1("div", { className: "sv-header__title", style: { maxWidth: this.model.renderedTextAreaWidth } },
|
|
@@ -6396,7 +6387,7 @@ class HeaderMobile extends x$3 {
|
|
|
6396
6387
|
_$1("div", { className: this.model.survey.css.description }, SurveyElementBase.renderLocString(this.model.survey.locDescription)))) : null));
|
|
6397
6388
|
}
|
|
6398
6389
|
}
|
|
6399
|
-
class HeaderCell extends
|
|
6390
|
+
class HeaderCell extends SurveyElementBase {
|
|
6400
6391
|
get model() {
|
|
6401
6392
|
return this.props.model;
|
|
6402
6393
|
}
|
|
@@ -6407,7 +6398,7 @@ class HeaderCell extends x$3 {
|
|
|
6407
6398
|
data: componentData,
|
|
6408
6399
|
});
|
|
6409
6400
|
}
|
|
6410
|
-
|
|
6401
|
+
renderElement() {
|
|
6411
6402
|
return (_$1("div", { className: this.model.css, style: this.model.style },
|
|
6412
6403
|
_$1("div", { className: "sv-header__cell-content", style: this.model.contentStyle },
|
|
6413
6404
|
this.model.showLogo ? (_$1("div", { className: "sv-header__logo" }, this.renderLogoImage())) : null,
|
|
@@ -6440,6 +6431,9 @@ class Header extends SurveyElementBase {
|
|
|
6440
6431
|
this.model.backgroundImage ? _$1("div", { style: this.model.backgroundImageStyle, className: this.model.backgroundImageClasses }) : null,
|
|
6441
6432
|
headerContent));
|
|
6442
6433
|
}
|
|
6434
|
+
forceHiddenDependencies() {
|
|
6435
|
+
this.model.width;
|
|
6436
|
+
}
|
|
6443
6437
|
componentDidMount() {
|
|
6444
6438
|
super.componentDidMount();
|
|
6445
6439
|
this.model.processResponsiveness();
|
|
@@ -6548,7 +6542,7 @@ SurveyModel.prototype["render"] = function (element = null) {
|
|
|
6548
6542
|
}
|
|
6549
6543
|
};
|
|
6550
6544
|
const preact = React;
|
|
6551
|
-
checkLibraryVersion(`${"3.2.
|
|
6545
|
+
checkLibraryVersion(`${"3.2.5"}`, "survey-js-ui");
|
|
6552
6546
|
|
|
6553
6547
|
export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, ListLoading, LoadingIndicatorComponent, LogoImage, MatrixRow, NotifierComponent, Popup, PopupModal, PopupSurvey, N as PureComponent, QuestionErrorComponent, RatingDropdownItem, RatingItem, RatingItemSmiley, RatingItemStar, ReactElementFactory, ReactQuestionFactory, ReactSurveyElement, ReactSurveyElementsWrapper, Scroll, Skeleton, SliderLabelItem, Cn as StrictMode, Survey, SurveyActionBar, SurveyActionBarItemDropdown, SurveyActionBarSeparator, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyMatrixHeaderSortButton, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionBooleanSwitch, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicProgressText, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyQuestionView, SurveyRow, SurveySortBarLevel, SurveyTimerPanel, SurveyWindow, P as Suspense, B as SuspenseList, SvgBundleComponent, SvgIcon, TagboxFilterString, TitleActions, TitleElement, attachKey2click, _n as cloneElement, Q$2 as createContext, _$1 as createElement, dn as createFactory, $ as createPortal, b$1 as createRef, Sn as findDOMNode, En as flushSync, D as forwardRef, tn as hydrate, pn as isFragment, yn as isMemo, mn as isValidElement, z as lazy, M as memo, preact, nn as render, renderPopupSurvey, renderSurvey, R as startTransition, bn as unmountComponentAtNode, gn as unstable_batchedUpdates, q$2 as useCallback, x$2 as useContext, P$2 as useDebugValue, w as useDeferredValue, y as useEffect, g$2 as useId, F$2 as useImperativeHandle, I as useInsertionEffect, _ as useLayoutEffect, T$2 as useMemo, h as useReducer, A$2 as useRef, d as useState, C as useSyncExternalStore, k as useTransition, vn as version };
|
|
6554
6548
|
//# sourceMappingURL=survey-js-ui.mjs.map
|