survey-js-ui 3.0.0-beta.6 → 3.0.0-beta.7

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.
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v3.0.0-beta.6
2
+ * surveyjs - Survey JavaScript library v3.0.0-beta.7
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
6
 
7
- import { SurveyModel, Helpers, createSvg, LocalizableString, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, SvgRegistry, PopupModalManager, settings, ScrollViewModel, addIconsToThemeSet, doKey2ClickDown, doKey2ClickBlur, ResizeManager, Question, SurveyProgressModel, ProgressButtonsResponsivityManager, PopupSurveyModel, ButtonGroupItemModel, checkLibraryVersion } from 'survey-core';
7
+ import { SurveyModel, Helpers, createSvg, LocalizableString, createPopupViewModel, CssClassBuilder, ActionDropdownViewModel, RendererFactory, doKey2ClickUp, SvgRegistry, PopupModalManager, settings, ScrollViewModel, addIconsToThemeSet, doKey2ClickDown, doKey2ClickBlur, ResizeManager, Question, QuestionTextModel, SurveyProgressModel, PopupSurveyModel, ButtonGroupItemModel, checkLibraryVersion } from 'survey-core';
8
8
  export { SurveyModel as Model, SurveyModel, SurveyWindowModel, settings, surveyLocalization, surveyStrings } from 'survey-core';
9
9
 
10
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;
@@ -506,8 +506,8 @@ class SurveyLocStringViewer extends x$3 {
506
506
  this.locStr.onStringChanged.remove(this.onChangedHandler);
507
507
  }
508
508
  componentDidUpdate(prevProps, prevState) {
509
- if (!!prevProps.locStr) {
510
- prevProps.locStr.onStringChanged.remove(this.onChangedHandler);
509
+ if (!!prevProps.model) {
510
+ prevProps.model.onStringChanged.remove(this.onChangedHandler);
511
511
  }
512
512
  this.reactOnStrChanged();
513
513
  }
@@ -1271,6 +1271,8 @@ function requireIconsV2 () {
1271
1271
 
1272
1272
  var noimage_48x48 = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M30.4975 14.2475C28.7075 14.2475 27.2475 15.7075 27.2475 17.4975C27.2475 19.2875 28.7075 20.7475 30.4975 20.7475C32.2875 20.7475 33.7475 19.2875 33.7475 17.4975C33.7475 15.7075 32.2875 14.2475 30.4975 14.2475ZM30.4975 19.2475C29.5375 19.2475 28.7475 18.4575 28.7475 17.4975C28.7475 16.5375 29.5375 15.7475 30.4975 15.7475C31.4575 15.7475 32.2475 16.5375 32.2475 17.4975C32.2475 18.4575 31.4575 19.2475 30.4975 19.2475ZM13.5175 11.2175C13.4375 10.8075 13.7075 10.4175 14.1175 10.3375C14.4275 10.2775 14.7175 10.2475 14.9975 10.2475H32.9975C35.6175 10.2475 37.7475 12.3775 37.7475 14.9975V32.9975C37.7475 33.2775 37.7175 33.5675 37.6575 33.8775C37.5875 34.2375 37.2775 34.4875 36.9175 34.4875C36.8675 34.4875 36.8275 34.4875 36.7775 34.4775C36.3675 34.3975 36.1075 34.0075 36.1775 33.5975C36.2175 33.3775 36.2375 33.1775 36.2375 32.9975V14.9975C36.2375 13.2075 34.7775 11.7475 32.9875 11.7475H14.9975C14.8075 11.7475 14.6175 11.7675 14.3975 11.8075C13.9875 11.8875 13.5975 11.6175 13.5175 11.2075V11.2175ZM34.4775 36.7775C34.5575 37.1875 34.2875 37.5775 33.8775 37.6575C33.5675 37.7175 33.2775 37.7475 32.9975 37.7475H14.9975C12.3775 37.7475 10.2475 35.6175 10.2475 32.9975V14.9975C10.2475 14.7175 10.2775 14.4275 10.3375 14.1175C10.4175 13.7075 10.8075 13.4375 11.2175 13.5175C11.6275 13.5975 11.8875 13.9875 11.8175 14.3975C11.7775 14.6175 11.7575 14.8175 11.7575 14.9975V32.9975C11.7575 34.7875 13.2175 36.2475 15.0075 36.2475H33.0075C33.1975 36.2475 33.3875 36.2275 33.6075 36.1875C34.0075 36.1075 34.4075 36.3775 34.4875 36.7875L34.4775 36.7775ZM15.8275 31.7975C15.6975 31.9375 15.7575 32.0875 15.7775 32.1175C15.8175 32.1975 15.8675 32.2475 15.9375 32.2475H29.8175C30.2275 32.2475 30.5675 32.5875 30.5675 32.9975C30.5675 33.4075 30.2275 33.7475 29.8175 33.7475H15.9375C15.2675 33.7475 14.6775 33.3475 14.3975 32.7175C14.1075 32.0575 14.2375 31.2975 14.7275 30.7775L19.7275 25.2775C20.0475 24.9275 20.5075 24.7175 20.9875 24.7075C21.4875 24.7275 21.9375 24.8875 22.2675 25.2275L25.4675 28.4775C25.7575 28.7675 25.7575 29.2475 25.4675 29.5375C25.1675 29.8275 24.6975 29.8275 24.4075 29.5375L21.2075 26.2875C21.1475 26.2175 21.0675 26.1875 21.0275 26.2075C20.9875 26.2075 20.9075 26.2175 20.8475 26.2875L15.8375 31.7975H15.8275ZM38.5275 38.5275C38.3775 38.6775 38.1875 38.7475 37.9975 38.7475C37.8075 38.7475 37.6175 38.6775 37.4675 38.5275L9.4675 10.5275C9.1775 10.2375 9.1775 9.7575 9.4675 9.4675C9.7575 9.1775 10.2375 9.1775 10.5275 9.4675L38.5275 37.4675C38.8175 37.7575 38.8175 38.2375 38.5275 38.5275Z\"/></svg>";
1273
1273
 
1274
+ var radio_16x16 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><circle cx=\"8\" cy=\"8\" r=\"4\"/></svg>";
1275
+
1274
1276
  var ranking_arrows = "<svg viewBox=\"0 0 10 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10 5L5 0L0 5H4V9H6V5H10Z\"/><path d=\"M6 19V15H4V19H0L5 24L10 19H6Z\"/></svg>";
1275
1277
 
1276
1278
  var rankingundefined_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.75 8C11.75 8.41 11.41 8.75 11 8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"/></svg>";
@@ -1354,6 +1356,7 @@ function requireIconsV2 () {
1354
1356
  "more-24x24": more_24x24,
1355
1357
  "navmenu-24x24": navmenu_24x24,
1356
1358
  "noimage-48x48": noimage_48x48,
1359
+ "radio-16x16": radio_16x16,
1357
1360
  "ranking-arrows": ranking_arrows,
1358
1361
  "rankingundefined-16x16": rankingundefined_16x16,
1359
1362
  "rating-star-2": rating_star_2,
@@ -1508,6 +1511,11 @@ class Survey extends SurveyElementBase {
1508
1511
  const rootCss = this.survey.getRootCss();
1509
1512
  const cssClasses = this.rootNodeClassName ? this.rootNodeClassName + " " + rootCss : rootCss;
1510
1513
  return (_$1("div", { id: this.rootNodeId, ref: this.rootRef, className: cssClasses, style: this.survey.themeVariables, lang: this.survey.locale || "en", dir: this.survey.localeDir },
1514
+ this.survey.generateStylesheet ?
1515
+ _$1(k$3, null,
1516
+ _$1("style", null, this.survey.themeStyle),
1517
+ _$1("style", null, this.survey.resetVariablesStyle))
1518
+ : null,
1511
1519
  _$1(Scroll, { disabled: this.survey.rootScrollDisabled },
1512
1520
  this.survey.needRenderIcons ? _$1(SvgBundleComponent, null) : null,
1513
1521
  _$1(PopupModal, null),
@@ -4202,6 +4210,13 @@ class SurveyQuestionText extends SurveyQuestionUncontrolledElement {
4202
4210
  }
4203
4211
  return _$1("datalist", { id: this.question.dataListId }, options);
4204
4212
  }
4213
+ componentDidUpdate(prevProps, prevState) {
4214
+ var _a;
4215
+ super.componentDidUpdate(prevProps, prevState);
4216
+ if (this.question && this.question instanceof QuestionTextModel) {
4217
+ (_a = this.question) === null || _a === void 0 ? void 0 : _a.updateInputValueFromMask();
4218
+ }
4219
+ }
4205
4220
  }
4206
4221
  ReactQuestionFactory.Instance.registerQuestion("text", (props) => {
4207
4222
  return _$1(SurveyQuestionText, props);
@@ -4315,11 +4330,13 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
4315
4330
  renderRadioItem(value, locText) {
4316
4331
  const cssClasses = this.question.cssClasses;
4317
4332
  const handleOnChange = () => {
4318
- this.question.value = value;
4333
+ if (!this.question.isInputReadOnly) {
4334
+ this.question.value = value;
4335
+ }
4319
4336
  };
4320
4337
  return (_$1("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
4321
4338
  _$1("label", { className: cssClasses.radioLabel },
4322
- _$1("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
4339
+ _$1("input", { type: "radio", name: this.question.questionName, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
4323
4340
  this.question.cssClasses.materialRadioDecorator ?
4324
4341
  (_$1("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
4325
4342
  (_$1("svg", { className: cssClasses.itemRadioDecorator },
@@ -4328,7 +4345,7 @@ class SurveyQuestionBooleanRadio extends SurveyQuestionBoolean {
4328
4345
  }
4329
4346
  renderElement() {
4330
4347
  const cssClasses = this.question.cssClasses;
4331
- return (_$1("div", { className: cssClasses.rootRadio },
4348
+ return (_$1("div", { className: cssClasses.rootRadio, onKeyDown: this.handleOnKeyDown },
4332
4349
  _$1("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
4333
4350
  (_$1(k$3, null,
4334
4351
  this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
@@ -4956,23 +4973,29 @@ class SurveyProgress extends SurveyNavigationBase {
4956
4973
  get isTop() {
4957
4974
  return this.props.isTop;
4958
4975
  }
4976
+ get model() {
4977
+ return this.props.model;
4978
+ }
4979
+ getStateElement() {
4980
+ return this.model;
4981
+ }
4959
4982
  get progress() {
4960
- return this.survey.progressValue;
4983
+ return this.model.progressValue;
4961
4984
  }
4962
4985
  get progressText() {
4963
- return this.survey.progressText;
4986
+ return this.model.progressText;
4964
4987
  }
4965
4988
  get progressBarAriaLabel() {
4966
- return this.survey.progressBarAriaLabel;
4989
+ return this.model.progressBarAriaLabel;
4967
4990
  }
4968
4991
  render() {
4969
4992
  var progressStyle = {
4970
4993
  width: this.progress + "%",
4971
4994
  };
4972
- return (_$1("div", { className: this.survey.getProgressCssClasses(this.props.container) },
4973
- _$1("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
4974
- _$1("span", { className: SurveyProgressModel.getProgressTextInBarCss(this.css) }, this.progressText)),
4975
- _$1("span", { className: SurveyProgressModel.getProgressTextUnderBarCss(this.css) }, this.progressText)));
4995
+ return (_$1("div", { className: this.model.getProgressCssClasses(this.props.container) },
4996
+ _$1("div", { style: progressStyle, className: this.model.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.progressBarAriaLabel },
4997
+ _$1("span", { className: SurveyProgressModel.getProgressTextInBarCss(this.model.css) }, this.progressText)),
4998
+ _$1("span", { className: SurveyProgressModel.getProgressTextUnderBarCss(this.model.css) }, this.progressText)));
4976
4999
  }
4977
5000
  }
4978
5001
  ReactElementFactory.Instance.registerElement("sv-progress-pages", props => {
@@ -4991,7 +5014,6 @@ ReactElementFactory.Instance.registerElement("sv-progress-requiredquestions", pr
4991
5014
  class SurveyProgressButtons extends SurveyNavigationBase {
4992
5015
  constructor(props) {
4993
5016
  super(props);
4994
- this.listContainerRef = b$1();
4995
5017
  }
4996
5018
  get model() {
4997
5019
  return this.props.model;
@@ -5002,28 +5024,11 @@ class SurveyProgressButtons extends SurveyNavigationBase {
5002
5024
  getStateElement() {
5003
5025
  return this.model;
5004
5026
  }
5005
- onResize(canShowItemTitles) {
5006
- this.setState({ canShowItemTitles });
5007
- this.setState({ canShowHeader: !canShowItemTitles });
5008
- }
5009
- onUpdateScroller(hasScroller) {
5010
- this.setState({ hasScroller });
5011
- }
5012
- onUpdateSettings() {
5013
- this.setState({ canShowItemTitles: this.model.showItemTitles });
5014
- this.setState({ canShowFooter: !this.model.showItemTitles });
5015
- }
5016
5027
  render() {
5017
- return (_$1("div", { className: this.model.getRootCss(this.props.container), style: { "maxWidth": this.model.progressWidth, ["--sd-progress-buttons-pages-count"]: this.model.visiblePages.length }, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": this.model.progressBarAriaLabel },
5018
- this.state.canShowHeader ? _$1("div", { className: this.css.progressButtonsHeader },
5019
- _$1("div", { className: this.css.progressButtonsPageTitle, title: this.model.headerText }, this.model.headerText)) : null,
5020
- _$1("div", { className: this.css.progressButtonsContainer },
5021
- _$1("div", { className: this.model.getScrollButtonCss(this.state.hasScroller, true), role: "button", onClick: () => this.clickScrollButton(this.listContainerRef.current, true) }),
5022
- _$1("div", { className: this.css.progressButtonsListContainer, ref: this.listContainerRef },
5023
- _$1("ul", { className: this.css.progressButtonsList }, this.getListElements())),
5024
- _$1("div", { className: this.model.getScrollButtonCss(this.state.hasScroller, false), role: "button", onClick: () => this.clickScrollButton(this.listContainerRef.current, false) })),
5025
- this.state.canShowFooter ? _$1("div", { className: this.css.progressButtonsFooter },
5026
- _$1("div", { className: this.css.progressButtonsPageTitle, title: this.model.footerText }, this.model.footerText)) : null));
5028
+ 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) },
5029
+ _$1("div", { className: this.css.progressButtonsContainer, role: "presentation" },
5030
+ _$1("div", { className: this.css.progressButtonsListContainer, role: "presentation" },
5031
+ _$1("ul", { className: this.css.progressButtonsList, role: "presentation" }, this.getListElements())))));
5027
5032
  }
5028
5033
  getListElements() {
5029
5034
  let buttons = [];
@@ -5034,32 +5039,16 @@ class SurveyProgressButtons extends SurveyNavigationBase {
5034
5039
  }
5035
5040
  renderListElement(page, index) {
5036
5041
  const text = SurveyElementBase.renderLocString(page.locNavigationTitle);
5037
- return (_$1("li", { key: "listelement" + index, className: this.model.getListElementCss(index), onClick: this.model.isListElementClickable(index)
5038
- ? () => this.model.clickListElement(page)
5039
- : undefined, "data-page-number": this.model.getItemNumber(page) },
5040
- _$1("div", { className: this.css.progressButtonsConnector }),
5041
- this.state.canShowItemTitles ? _$1(k$3, null,
5042
- _$1("div", { className: this.css.progressButtonsPageTitle, title: page.renderedNavigationTitle }, text),
5043
- _$1("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription }, page.navigationDescription)) : null,
5044
- _$1("div", { className: this.css.progressButtonsButton },
5045
- _$1("div", { className: this.css.progressButtonsButtonBackground }),
5046
- _$1("div", { className: this.css.progressButtonsButtonContent }),
5047
- _$1("span", null, this.model.getItemNumber(page)))));
5048
- }
5049
- clickScrollButton(listContainerElement, isLeftScroll) {
5050
- if (!!listContainerElement) {
5051
- listContainerElement.scrollLeft += (isLeftScroll ? -1 : 1) * 70;
5052
- }
5053
- }
5054
- componentDidMount() {
5055
- super.componentDidMount();
5056
- this.respManager = new ProgressButtonsResponsivityManager(this.model, this.listContainerRef.current, this);
5057
- }
5058
- componentWillUnmount() {
5059
- if (!!this.respManager) {
5060
- this.respManager.dispose();
5061
- }
5062
- super.componentWillUnmount();
5042
+ const onClickHandler = this.model.isListElementClickable(index) ? () => this.model.clickListElement(page) : undefined;
5043
+ return (_$1("li", { key: page.uniqueId, className: this.model.getListElementCss(index), "data-page-number": this.model.getItemNumber(page), role: "presentation" },
5044
+ this.model.showItemTitles ? _$1("div", { className: this.css.progressButtonsPageTitle, title: page.renderedNavigationTitle, onClick: onClickHandler }, text) : null,
5045
+ this.model.showItemDescriptions ? _$1("div", { className: this.css.progressButtonsPageDescription, title: page.navigationDescription, onClick: onClickHandler }, page.navigationDescription) : null,
5046
+ _$1("button", { className: this.css.progressButtonsButton, onClick: onClickHandler, role: "tab", type: "button", "aria-selected": this.model.isPageSelected(index), "aria-label": this.model.getButtonAriaLabel(page), tabIndex: this.model.getTabIndex(index), "data-page-index": index }, this.model.showItemNumbers ?
5047
+ this.model.getItemNumber(page) :
5048
+ this.model.isListElementPassed(index) ?
5049
+ _$1("svg", { className: this.css.progressButtonsCheckIcon },
5050
+ _$1("use", { xlinkHref: `#icon-${this.css.progressButtonsCheckIconId}` })) :
5051
+ _$1("div", { className: this.css.progressButtonsDot }))));
5063
5052
  }
5064
5053
  }
5065
5054
  ReactElementFactory.Instance.registerElement("sv-progress-buttons", (props) => {
@@ -6223,7 +6212,7 @@ SurveyModel.prototype["render"] = function (element = null) {
6223
6212
  }
6224
6213
  };
6225
6214
  const preact = React;
6226
- checkLibraryVersion(`${"3.0.0-beta.6"}`, "survey-js-ui");
6215
+ checkLibraryVersion(`${"3.0.0-beta.7"}`, "survey-js-ui");
6227
6216
 
6228
6217
  export { CharacterCounterComponent, O as Children, x$3 as Component, ComponentsContainer, k$3 as Fragment, Header, HeaderCell, HeaderMobile, List, ListItemContent, ListItemGroup, 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, SurveyElementBase, SurveyElementErrors, SurveyFileChooseButton, SurveyFileItem, SurveyFilePreview, SurveyFlowPanel, SurveyHeader, SurveyLocStringEditor, SurveyLocStringViewer, SurveyNavigationBase, SurveyPage, SurveyPanel, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestion, SurveyQuestionAndErrorsCell, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionButtonGroup, SurveyQuestionButtonGroupDropdown, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionComment, SurveyQuestionCommentItem, SurveyQuestionComposite, SurveyQuestionCustom, SurveyQuestionDropdown, SurveyQuestionDropdownBase, SurveyQuestionDropdownSelect, SurveyQuestionElementBase, SurveyQuestionEmpty, SurveyQuestionExpression, SurveyQuestionFile, SurveyQuestionHtml, SurveyQuestionImage, SurveyQuestionImageMap, SurveyQuestionImagePicker, SurveyQuestionMatrix, SurveyQuestionMatrixCell, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionMatrixRow, SurveyQuestionMultipleText, SurveyQuestionOptionItem, SurveyQuestionPanelDynamic, SurveyQuestionPanelDynamicProgressText, SurveyQuestionRadioItem, SurveyQuestionRadiogroup, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionSignaturePad, SurveyQuestionSlider, SurveyQuestionTagbox, SurveyQuestionTagboxItem, SurveyQuestionText, SurveyRow, SurveyTimerPanel, SurveyWindow, 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 };
6229
6218
  //# sourceMappingURL=survey-js-ui.mjs.map