survey-js-ui 3.2.4 → 3.2.6
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 +583 -194
- package/fesm/survey-js-ui.mjs.map +1 -1
- package/package.json +2 -2
- package/survey-js-ui.js +588 -192
- package/survey-js-ui.js.map +1 -1
- package/survey-js-ui.min.js +2 -2
- package/typings/survey-react-ui/entries/react-ui-model.d.ts +1 -0
- package/typings/survey-react-ui/src/components/components-container.d.ts +5 -2
- package/typings/survey-react-ui/src/components/file/file-choose-button.d.ts +1 -1
- package/typings/survey-react-ui/src/components/filter/filter.d.ts +60 -0
- 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/survey-js-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v3.2.
|
|
2
|
+
* surveyjs - Survey JavaScript library v3.2.6
|
|
3
3
|
* Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SurveyUI = {}, global.Survey));
|
|
11
11
|
})(this, (function (exports, surveyCore) { 'use strict';
|
|
12
12
|
|
|
13
|
-
var n,l$1,u$1,i$1,r$1,o$1,e$1,f$1,c$1,s$1,a$1,h$1,p$1={},v$1=[],y$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w$2=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function g$2(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _$1(l,u,t){var i,r,o,e={};for(o in u)"key"==o?i=u[o]:"ref"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return m$1(l,e,i,r,null)}function m$1(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u$1:o,__i:-1,__u:0};return null==o&&null!=l$1.vnode&&l$1.vnode(e),e}function b$1(){return {current:null}}function k$2(n){return n.children}function x$2(n,l){this.props=n,this.context=l;}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?S(n):null}function C$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$2(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!$$1.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($$1);}function $$1(){for(var n,u,t,r,o,f,c,s=1;i$1.length;)i$1.length>s&&i$1.sort(e$1),n=i$1.shift(),s=i$1.length,n.__d&&(t=void 0,r=void 0,o=(r=(u=n).__v).__e,f=[],c=[],u.__P&&((t=d$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(t),O$1(u.__P,t,r,u.__n,u.__P.namespaceURI,32&r.__u?[o]:null,f,null==o?S(r):o,!!(32&r.__u),c),t.__v=r.__v,t.__.__k[t.__i]=t,N$1(f,t,c),r.__e=r.__=null,t.__e!=o&&C$2(t)));$$1.__r=0;}function I$1(n,l,u,t,i,r,o,e,f,c,s){var a,h,y,w,d,g,_,m=t&&t.__k||v$1,b=l.length;for(f=P$2(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p$1:m[y.__i]||p$1,y.__i=a,g=O$1(n,y,h,i,r,o,e,f,c,s),w=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$2(h.ref,null,y),s.push(y.ref,y.__c||w,y)),null==d&&null!=w&&(d=w),(_=!!(4&y.__u))||h.__k===y.__k?f=A$2(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:w&&(f=w.nextSibling),y.__u&=-7);return u.__e=d,f}function P$2(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&"boolean"!=typeof o&&"function"!=typeof o?(f=r+h,(o=n.__k[r]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m$1(null,o,null,null,null):w$2(o)?m$1(k$2,{children:o},null,null,null):null==o.constructor&&o.__b>0?m$1(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=L$1(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D$2(e,e));return t}function A$2(n,l,u,t){var i,r;if("function"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=A$2(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8==l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(w$2(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return -1}function T$2(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y$1.test(l)?u:u+"px";}function j$2(n,l,u,t,i){var r,o;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$2(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$2(n.style,l,u[l]);}else if("o"==l[0]&&"n"==l[1])r=l!=(l=l.replace(f$1,"$1")),o=l.toLowerCase(),l=o in n||"onFocusOut"==l||"onFocusIn"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u.u=t.u:(u.u=c$1,n.addEventListener(l,r?a$1:s$1,r)):n.removeEventListener(l,r?a$1:s$1,r);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F$2(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(null!=u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x$2(b,M),h.constructor=j,h.render=E$1),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d$1({},h.__s)),d$1(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_);});}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l$1.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=d$1(d$1({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$2&&null==a.key&&(L=V$1(a.props.children)),f=I$1(n,w$2(L)?L:[L],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f;}else {for(T=o.length;T--;)g$2(o[T]);z$2(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$2(u);l$1.__e(n,u,t);}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q$2(t.__e,u,t,i,r,o,e,c,s);return (a=l$1.diffed)&&a(u),128&u.__u?void 0:f}function z$2(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z$2);}function N$1(n,u,t){for(var i=0;i<t.length;i++)B$2(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function V$1(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:w$2(n)?n.map(V$1):d$1({},n)}function q$2(u,t,i,r,o,e,f,c,s){var a,h,v,y,d,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?o="http://www.w3.org/2000/svg":"math"==x?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((d=e[a])&&"setAttribute"in d==!!x&&(x?d.localName==x:3==d.nodeType)){u=d,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l$1.__m&&l$1.__m(t,e),c=!1),e=null;}if(null==x)b===k||c&&u.data==k||(u.data=k);else {if(e=e&&n.call(u.childNodes),b=i.props||p$1,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(d=u.attributes[a]).name]=d.value;for(a in b)if(d=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=d;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j$2(u,a,null,d,o);}for(a in k)d=k[a],"children"==a?y=d:"dangerouslySetInnerHTML"==a?h=d:"value"==a?_=d:"checked"==a?m=d:c&&"function"!=typeof d||b[a]===d||j$2(u,a,d,b[a],o);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I$1("template"==t.type?u.content:u,w$2(y)?y:[y],t,i,r,"foreignObject"==x?"http://www.w3.org/1999/xhtml":o,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g$2(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$2(u,a,_,b[a],o),a="checked",null!=m&&m!=u[a]&&j$2(u,a,m,b[a],o));}return u}function B$2(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function D$2(n,u,t){var i,r;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$2(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&D$2(i[r],u,t||"function"!=typeof n.type);t||g$2(n.__e),n.__c=n.__=n.__e=void 0;}function E$1(n,l,u){return this.constructor(n,u)}function G$1(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l$1.__&&l$1.__(u,t),o=(r="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O$1(t,u=(!r&&i||t).__k=_$1(k$2,null,[u]),o||p$1,p$1,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),N$1(e,u,f);}function J$1(n,l){G$1(n,l,J$1);}function K$1(l,u,t){var i,r,o,e,f=d$1({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==o?i=u[o]:"ref"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m$1(l.type,f,i||l.key,r||l.ref,null)}function Q$1(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n);};}),n.children}return l.__c="__cC"+h$1++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,x$2.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=d$1({},this.state),"function"==typeof n&&(n=n(d$1({},u),this.props)),n&&d$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},x$2.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},x$2.prototype.render=k$2,i$1=[],o$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n,l){return n.__v.__b-l.__v.__b},$$1.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$2(!1),a$1=F$2(!0),h$1=0;
|
|
13
|
+
var n,l$1,u$1,i$1,o$1,r$1,e$1,f$1,c$1,s$1,a$1,h$1,p$1={},v$1=[],y$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d$1=Array.isArray;function w$2(n,l){for(var u in l)n[u]=l[u];return n}function g$2(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _$1(l,u,t){var i,o,r,e={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:e[r]=u[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m$1(l,e,i,o,null)}function m$1(n,t,i,o,r){var e={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(e),e}function b$1(){return {current:null}}function k$2(n){return n.children}function x$2(n,l){this.props=n,this.context=l;}function S(n,l){if(null==l)return n.__?S(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?S(n):null}function C$2(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$2(n)}}function M$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!$$1.__r++||o$1!=l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)($$1);}function $$1(){for(var n,u,t,o,r,f,c,s=1;i$1.length;)i$1.length>s&&i$1.sort(e$1),n=i$1.shift(),s=i$1.length,n.__d&&(t=void 0,o=void 0,r=(o=(u=n).__v).__e,f=[],c=[],u.__P&&((t=w$2({},o)).__v=o.__v+1,l$1.vnode&&l$1.vnode(t),O$1(u.__P,t,o,u.__n,u.__P.namespaceURI,32&o.__u?[r]:null,f,null==r?S(o):r,!!(32&o.__u),c),t.__v=o.__v,t.__.__k[t.__i]=t,N$1(f,t,c),o.__e=o.__=null,t.__e!=r&&C$2(t)));$$1.__r=0;}function I$1(n,l,u,t,i,o,r,e,f,c,s){var a,h,y,d,w,g,_,m=t&&t.__k||v$1,b=l.length;for(f=P$2(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p$1:m[y.__i]||p$1,y.__i=a,g=O$1(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B$2(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),(_=!!(4&y.__u))||h.__k===y.__k?f=A$2(y,f,n,_):"function"==typeof y.type&&void 0!==g?f=g:d&&(f=d.nextSibling),y.__u&=-7);return u.__e=w,f}function P$2(n,l,u,t,i){var o,r,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),o=0;o<i;o++)null!=(r=l[o])&&"boolean"!=typeof r&&"function"!=typeof r?(f=o+h,(r=n.__k[o]="string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?m$1(null,r,null,null,null):d$1(r)?m$1(k$2,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?m$1(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=n,r.__b=n.__b+1,e=null,-1!=(c=r.__i=L$1(r,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),"function"!=typeof r.type&&(r.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,r.__u|=4))):n.__k[o]=null;if(a)for(o=0;o<s;o++)null!=(e=u[o])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D$2(e,e));return t}function A$2(n,l,u,t){var i,o;if("function"==typeof n.type){for(i=n.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=n,l=A$2(i[o],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8==l.nodeType);return l}function H$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(d$1(n)?n.some(function(n){H$1(n,l);}):l.push(n)),l}function L$1(n,l,u,t){var i,o,r,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==n.key||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,o=u+1;i>=0||o<l.length;)if(null!=(c=l[r=i>=0?i--:o++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return r;return -1}function T$2(n,l,u){"-"==l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||y$1.test(l)?u:u+"px";}function j$2(n,l,u,t,i){var o,r;n:if("style"==l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$2(n.style,l,"");if(u)for(l in u)t&&u[l]==t[l]||T$2(n.style,l,u[l]);}else if("o"==l[0]&&"n"==l[1])o=l!=(l=l.replace(f$1,"$1")),r=l.toLowerCase(),l=r in n||"onFocusOut"==l||"onFocusIn"==l?r.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=c$1,n.addEventListener(l,o?a$1:s$1,o)):n.removeEventListener(l,o?a$1:s$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F$2(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=c$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O$1(n,u,t,i,o,r,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[f=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof j)try{if(b=u.props,S="prototype"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x$2(b,M),h.constructor=j,h.render=E$1),C&&C.sub(h),h.props=b,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w$2({},h.__s)),w$2(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)||u.__v==t.__v){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_);});}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l$1.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=w$2(w$2({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k$2&&null==a.key&&(L=V$1(a.props.children)),f=I$1(n,d$1(L)?L:[L],u,t,i,o,r,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,u.__e=f;}else {for(T=r.length;T--;)g$2(r[T]);z$2(u);}else u.__e=t.__e,u.__k=t.__k,n.then||z$2(u);l$1.__e(n,u,t);}else null==r&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q$2(t.__e,u,t,i,o,r,e,c,s);return (a=l$1.diffed)&&a(u),128&u.__u?void 0:f}function z$2(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z$2);}function N$1(n,u,t){for(var i=0;i<t.length;i++)B$2(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function V$1(n){return "object"!=typeof n||null==n||n.__b&&n.__b>0?n:d$1(n)?n.map(V$1):w$2({},n)}function q$2(u,t,i,o,r,e,f,c,s){var a,h,v,y,w,_,m,b=i.props,k=t.props,x=t.type;if("svg"==x?r="http://www.w3.org/2000/svg":"math"==x?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&"setAttribute"in w==!!x&&(x?w.localName==x:3==w.nodeType)){u=w,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(r,x,k.is&&k),c&&(l$1.__m&&l$1.__m(t,e),c=!1),e=null;}if(null==x)b===k||c&&u.data==k||(u.data=k);else {if(e=e&&n.call(u.childNodes),b=i.props||p$1,!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(w=u.attributes[a]).name]=w.value;for(a in b)if(w=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)v=w;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;j$2(u,a,null,w,r);}for(a in k)w=k[a],"children"==a?y=w:"dangerouslySetInnerHTML"==a?h=w:"value"==a?_=w:"checked"==a?m=w:c&&"function"!=typeof w||b[a]===w||j$2(u,a,w,b[a],r);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=""),I$1("template"==t.type?u.content:u,d$1(y)?y:[y],t,i,o,"foreignObject"==x?"http://www.w3.org/1999/xhtml":r,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g$2(e[a]);c||(a="value","progress"==x&&null==_?u.removeAttribute("value"):null!=_&&(_!==u[a]||"progress"==x&&!_||"option"==x&&_!=b[a])&&j$2(u,a,_,b[a],r),a="checked",null!=m&&m!=u[a]&&j$2(u,a,m,b[a],r));}return u}function B$2(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function D$2(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B$2(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&D$2(i[o],u,t||"function"!=typeof n.type);t||g$2(n.__e),n.__c=n.__=n.__e=void 0;}function E$1(n,l,u){return this.constructor(n,u)}function G$1(u,t,i){var o,r,e,f;t==document&&(t=document.documentElement),l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O$1(t,u=(!o&&i||t).__k=_$1(k$2,null,[u]),r||p$1,p$1,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,e,!o&&i?i:r?r.__e:t.firstChild,o,f),N$1(e,u,f);}function J$1(n,l){G$1(n,l,J$1);}function K$1(l,u,t){var i,o,r,e,f=w$2({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=void 0===u[r]&&null!=e?e[r]:u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m$1(l.type,f,i||l.key,o||l.ref,null)}function Q$1(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null;},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M$1(n);});},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n);};}),n.children}return l.__c="__cC"+h$1++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,x$2.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w$2({},this.state),"function"==typeof n&&(n=n(w$2({},u),this.props)),n&&w$2(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M$1(this));},x$2.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M$1(this));},x$2.prototype.render=k$2,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n,l){return n.__v.__b-l.__v.__b},$$1.__r=0,f$1=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$2(!1),a$1=F$2(!0),h$1=0;
|
|
14
14
|
|
|
15
15
|
var t,r,u,i,o=0,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,h(D$1,n)}function h(n,u,i){var o=p(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D$1(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return !!n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),c&&c.call(this,n,t,r)||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function y(n,u){var i=p(t++,3);!c.__s&&C$1(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i));}function _(n,u){var i=p(t++,4);!c.__s&&C$1(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i));}function A$1(n){return o=5,T$1(function(){return {current:n}},[])}function F$1(n,t,r){o=6,_(function(){if("function"==typeof n){var r=n(t());return function(){n(null),r&&"function"==typeof r&&r();}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n));}function T$1(n,r){var u=p(t++,7);return C$1(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q$1(n,t){return o=8,T$1(function(){return n},t)}function x$1(n){var u=r.context[n.__c],i=p(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P$1(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n);}function b(n){var u=p(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n);}),[i[0],function(){i[1](void 0);}]}function g$1(){var n=p(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++;}return n.__}function j$1(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z$1),n.__H.__h.forEach(B$1),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0;})):(i.__h.forEach(z$1),i.__h.forEach(B$1),i.__h=[],t=0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w$1)(j$1)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z$1),n.__h=n.__h.filter(function(n){return !n.__||B$1(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z$1(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k$1="function"==typeof requestAnimationFrame;function w$1(n){var t,r=function(){clearTimeout(u),k$1&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,35);k$1&&(t=requestAnimationFrame(r));}function z$1(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B$1(n){var t=r;n.__c=n.__(),r=t;}function C$1(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D$1(n,t){return "function"==typeof t?t(n):t}
|
|
16
16
|
|
|
@@ -157,11 +157,10 @@
|
|
|
157
157
|
}
|
|
158
158
|
constructor(props) {
|
|
159
159
|
super(props);
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.propertyValueChangedHandler = (stateElement, options) => {
|
|
160
|
+
this.allowUpdate = false;
|
|
161
|
+
this.update = (stateElement, options) => {
|
|
163
162
|
const key = options.name;
|
|
164
|
-
if (!this.canUsePropInState(key) || this.
|
|
163
|
+
if (!this.canUsePropInState(key) || !this.allowUpdate)
|
|
165
164
|
return;
|
|
166
165
|
this.changedStatePropNameValue = key;
|
|
167
166
|
this.setState((state) => {
|
|
@@ -170,27 +169,44 @@
|
|
|
170
169
|
return newState;
|
|
171
170
|
});
|
|
172
171
|
};
|
|
173
|
-
this.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
172
|
+
this.propertyAccessTracker = new surveyCore.PropertyAccessTracker(this.update);
|
|
173
|
+
this._allowComponentUpdate = true;
|
|
174
|
+
this.prevStateElements = [];
|
|
175
|
+
const render = this.render;
|
|
176
|
+
this.render = () => this.renderWithTracking(render);
|
|
177
|
+
}
|
|
178
|
+
renderWithTracking(render) {
|
|
179
|
+
let res = null;
|
|
180
|
+
this.propertyAccessTracker.startTracking();
|
|
181
|
+
try {
|
|
182
|
+
if (this.canRender()) {
|
|
183
|
+
this.forceHiddenDependencies();
|
|
184
|
+
res = render.call(this);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
finally {
|
|
188
|
+
this.propertyAccessTracker.stopTracking();
|
|
189
|
+
}
|
|
190
|
+
if (!!res) {
|
|
191
|
+
res = this.wrapElement(res);
|
|
192
|
+
}
|
|
193
|
+
this.changedStatePropNameValue = undefined;
|
|
194
|
+
return res;
|
|
183
195
|
}
|
|
184
196
|
componentDidMount() {
|
|
185
|
-
this.
|
|
197
|
+
this.enableStateElementsRerenderEvent(this.getStateElements());
|
|
198
|
+
this.allowUpdate = true;
|
|
199
|
+
this.propertyAccessTracker.subscribe();
|
|
186
200
|
}
|
|
187
201
|
componentWillUnmount() {
|
|
188
|
-
this.unMakeBaseElementsReact();
|
|
189
202
|
this.disableStateElementsRerenderEvent(this.getStateElements());
|
|
203
|
+
this.allowUpdate = false;
|
|
204
|
+
this.propertyAccessTracker.unsubscribe();
|
|
190
205
|
}
|
|
191
206
|
componentDidUpdate(prevProps, prevState) {
|
|
192
207
|
var _a;
|
|
193
|
-
this.
|
|
208
|
+
this.propertyAccessTracker.subscribe();
|
|
209
|
+
this.enableStateElementsRerenderEvent(this.getStateElements());
|
|
194
210
|
const stateElements = this.getStateElements();
|
|
195
211
|
this.disableStateElementsRerenderEvent(((_a = this.prevStateElements) !== null && _a !== void 0 ? _a : []).filter(el => !stateElements.find(stateElement => stateElement == el)));
|
|
196
212
|
this.prevStateElements = [];
|
|
@@ -206,47 +222,22 @@
|
|
|
206
222
|
this._allowComponentUpdate = false;
|
|
207
223
|
}
|
|
208
224
|
shouldComponentUpdate(nextProps, nextState) {
|
|
209
|
-
|
|
210
|
-
|
|
225
|
+
const res = this._allowComponentUpdate && (this.state !== nextState || Object.keys(this.props).some(key => nextProps[key] !== this.props[key]));
|
|
226
|
+
if (res) {
|
|
211
227
|
this.prevStateElements = this.getStateElements();
|
|
212
228
|
}
|
|
213
|
-
return
|
|
229
|
+
return res;
|
|
214
230
|
}
|
|
231
|
+
forceHiddenDependencies() { }
|
|
215
232
|
render() {
|
|
216
|
-
|
|
217
|
-
return null;
|
|
218
|
-
}
|
|
219
|
-
this.startEndRendering(1);
|
|
220
|
-
var res = this.renderElement();
|
|
221
|
-
this.startEndRendering(-1);
|
|
222
|
-
if (!!res) {
|
|
223
|
-
res = this.wrapElement(res);
|
|
224
|
-
}
|
|
225
|
-
this.changedStatePropNameValue = undefined;
|
|
226
|
-
return res;
|
|
233
|
+
return this.renderElement();
|
|
227
234
|
}
|
|
228
235
|
wrapElement(element) {
|
|
229
236
|
return element;
|
|
230
237
|
}
|
|
231
|
-
get isRendering() {
|
|
232
|
-
var stateEls = this.getRenderedElements();
|
|
233
|
-
for (let stateEl of stateEls) {
|
|
234
|
-
if (stateEl.reactRendering > 0)
|
|
235
|
-
return true;
|
|
236
|
-
}
|
|
237
|
-
return false;
|
|
238
|
-
}
|
|
239
238
|
getRenderedElements() {
|
|
240
239
|
return this.getStateElements();
|
|
241
240
|
}
|
|
242
|
-
startEndRendering(val) {
|
|
243
|
-
var stateEls = this.getRenderedElements();
|
|
244
|
-
for (let stateEl of stateEls) {
|
|
245
|
-
if (!stateEl.reactRendering)
|
|
246
|
-
stateEl.reactRendering = 0;
|
|
247
|
-
stateEl.reactRendering += val;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
241
|
canRender() {
|
|
251
242
|
return true;
|
|
252
243
|
}
|
|
@@ -256,27 +247,16 @@
|
|
|
256
247
|
get changedStatePropName() {
|
|
257
248
|
return this.changedStatePropNameValue;
|
|
258
249
|
}
|
|
259
|
-
makeBaseElementsReact() {
|
|
260
|
-
var els = this.getStateElements();
|
|
261
|
-
for (var i = 0; i < els.length; i++) {
|
|
262
|
-
els[i].enableOnElementRerenderedEvent();
|
|
263
|
-
this.makeBaseElementReact(els[i]);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
unMakeBaseElementsReact() {
|
|
267
|
-
var els = this.getStateElements();
|
|
268
|
-
this.unMakeBaseElementsReactive(els);
|
|
269
|
-
}
|
|
270
|
-
unMakeBaseElementsReactive(els) {
|
|
271
|
-
for (var i = 0; i < els.length; i++) {
|
|
272
|
-
this.unMakeBaseElementReact(els[i]);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
250
|
disableStateElementsRerenderEvent(els) {
|
|
276
251
|
els.forEach(el => {
|
|
277
252
|
el.disableOnElementRerenderedEvent();
|
|
278
253
|
});
|
|
279
254
|
}
|
|
255
|
+
enableStateElementsRerenderEvent(els) {
|
|
256
|
+
els.forEach(el => {
|
|
257
|
+
el.enableOnElementRerenderedEvent();
|
|
258
|
+
});
|
|
259
|
+
}
|
|
280
260
|
getStateElements() {
|
|
281
261
|
var el = this.getStateElement();
|
|
282
262
|
return !!el ? [el] : [];
|
|
@@ -291,24 +271,9 @@
|
|
|
291
271
|
renderLocString(locStr, style = null, key) {
|
|
292
272
|
return SurveyElementBase.renderLocString(locStr, style, key);
|
|
293
273
|
}
|
|
294
|
-
canMakeReact(stateElement) {
|
|
295
|
-
return !!stateElement && !!stateElement.iteratePropertiesHash;
|
|
296
|
-
}
|
|
297
|
-
makeBaseElementReact(stateElement) {
|
|
298
|
-
if (!this.canMakeReact(stateElement))
|
|
299
|
-
return;
|
|
300
|
-
stateElement.addOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
301
|
-
stateElement.addOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
302
|
-
}
|
|
303
274
|
canUsePropInState(key) {
|
|
304
275
|
return true;
|
|
305
276
|
}
|
|
306
|
-
unMakeBaseElementReact(stateElement) {
|
|
307
|
-
if (!this.canMakeReact(stateElement))
|
|
308
|
-
return;
|
|
309
|
-
stateElement.removeOnPropertyValueChangedCallback(this.propertyValueChangedHandler);
|
|
310
|
-
stateElement.removeOnArrayChangedCallback(this.onArrayChangedCallback);
|
|
311
|
-
}
|
|
312
277
|
}
|
|
313
278
|
class ReactSurveyElement extends SurveyElementBase {
|
|
314
279
|
constructor(props) {
|
|
@@ -410,6 +375,9 @@
|
|
|
410
375
|
get question() {
|
|
411
376
|
return this.questionBase;
|
|
412
377
|
}
|
|
378
|
+
forceHiddenDependencies() {
|
|
379
|
+
this.getValueCore();
|
|
380
|
+
}
|
|
413
381
|
setValueCore(newValue) {
|
|
414
382
|
this.questionBase.value = newValue;
|
|
415
383
|
}
|
|
@@ -637,15 +605,18 @@
|
|
|
637
605
|
renderButtonContent() {
|
|
638
606
|
const text = this.renderText();
|
|
639
607
|
const svgIcon = !!this.item.iconName ? (_$1(SvgIcon, { className: this.item.cssClasses.itemIcon, size: this.item.iconSize, iconName: this.item.iconName, title: this.item.tooltip || this.item.title })) : null;
|
|
608
|
+
// A trailing icon (a filter chip's chevron); the bar's cssClasses give its class.
|
|
609
|
+
const markerIcon = !!this.item.markerIconName ? (_$1(SvgIcon, { className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: "auto" })) : null;
|
|
640
610
|
return (_$1(k$2, null,
|
|
641
611
|
svgIcon,
|
|
642
|
-
text
|
|
612
|
+
text,
|
|
613
|
+
markerIcon));
|
|
643
614
|
}
|
|
644
615
|
renderInnerButton() {
|
|
645
616
|
const className = this.item.getActionBarItemCss();
|
|
646
617
|
const buttonContent = this.renderButtonContent();
|
|
647
618
|
const tabIndex = this.item.disableTabStop ? -1 : undefined;
|
|
648
|
-
const button = attachKey2click(_$1("button", { ref: this.ref, className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: this.item.getTooltip(), "data-sv-tooltip": this.item.getTooltip(), tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-controls": this.item.ariaControls, "aria-labelledby": this.item.ariaLabelledBy, "aria-label": this.item.ariaLabel, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
|
619
|
+
const button = attachKey2click(_$1("button", { ref: this.ref, className: className, type: "button", disabled: this.item.disabled, onMouseDown: (args) => this.item.doMouseDown(args), onFocus: (args) => this.item.doFocus(args), onClick: (args) => this.item.doAction(args), title: this.item.getTooltip(), "data-sv-tooltip": this.item.getTooltip(), tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, "aria-controls": this.item.ariaControls, "aria-labelledby": this.item.ariaLabelledBy, "aria-describedby": this.item.ariaDescribedBy, "aria-label": this.item.ariaLabel, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
|
649
620
|
return button;
|
|
650
621
|
}
|
|
651
622
|
componentDidMount() {
|
|
@@ -718,7 +689,7 @@
|
|
|
718
689
|
return _$1(SurveyActionBar, props);
|
|
719
690
|
});
|
|
720
691
|
|
|
721
|
-
class TitleContent extends
|
|
692
|
+
class TitleContent extends SurveyElementBase {
|
|
722
693
|
constructor(props) {
|
|
723
694
|
super(props);
|
|
724
695
|
}
|
|
@@ -728,7 +699,7 @@
|
|
|
728
699
|
get element() {
|
|
729
700
|
return this.props.element;
|
|
730
701
|
}
|
|
731
|
-
|
|
702
|
+
renderElement() {
|
|
732
703
|
if (this.element.isTitleRenderedAsString)
|
|
733
704
|
return SurveyElementBase.renderLocString(this.element.locRenderedTitle);
|
|
734
705
|
var spans = this.renderTitleSpans(this.element.getTitleOwner(), this.cssClasses);
|
|
@@ -764,7 +735,7 @@
|
|
|
764
735
|
}
|
|
765
736
|
}
|
|
766
737
|
|
|
767
|
-
class TitleActions extends
|
|
738
|
+
class TitleActions extends SurveyElementBase {
|
|
768
739
|
get cssClasses() {
|
|
769
740
|
return this.props.cssClasses;
|
|
770
741
|
}
|
|
@@ -774,7 +745,7 @@
|
|
|
774
745
|
get renderActions() {
|
|
775
746
|
return this.props.renderActions === undefined ? true : this.props.renderActions;
|
|
776
747
|
}
|
|
777
|
-
|
|
748
|
+
renderElement() {
|
|
778
749
|
const titleContent = _$1(TitleContent, { element: this.element, cssClasses: this.cssClasses });
|
|
779
750
|
if (!this.element.hasVisibleTitleActions)
|
|
780
751
|
return titleContent;
|
|
@@ -788,7 +759,7 @@
|
|
|
788
759
|
return _$1(TitleActions, props);
|
|
789
760
|
});
|
|
790
761
|
|
|
791
|
-
class TitleElement extends
|
|
762
|
+
class TitleElement extends SurveyElementBase {
|
|
792
763
|
constructor(props) {
|
|
793
764
|
super(props);
|
|
794
765
|
}
|
|
@@ -801,7 +772,7 @@
|
|
|
801
772
|
return _$1("span", { className: this.element.getCssTitleExpandableSvgContainer() },
|
|
802
773
|
_$1(SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: this.element.titleExpandableSvgIconName, size: "auto" }));
|
|
803
774
|
}
|
|
804
|
-
|
|
775
|
+
renderElement() {
|
|
805
776
|
const element = this.element;
|
|
806
777
|
if (!element || !element.hasTitle)
|
|
807
778
|
return null;
|
|
@@ -822,7 +793,7 @@
|
|
|
822
793
|
}
|
|
823
794
|
}
|
|
824
795
|
|
|
825
|
-
class SurveyHeader extends
|
|
796
|
+
class SurveyHeader extends SurveyElementBase {
|
|
826
797
|
constructor(props) {
|
|
827
798
|
super(props);
|
|
828
799
|
this.state = { changed: 0 };
|
|
@@ -835,13 +806,12 @@
|
|
|
835
806
|
return this.survey.css;
|
|
836
807
|
}
|
|
837
808
|
componentDidMount() {
|
|
838
|
-
|
|
809
|
+
super.componentDidMount();
|
|
839
810
|
this.survey.afterRenderHeader(this.rootRef.current);
|
|
840
|
-
this.survey.locLogo.onChanged =
|
|
841
|
-
self.setState({ changed: self.state.changed + 1 });
|
|
842
|
-
};
|
|
811
|
+
this.survey.locLogo.onChanged = () => { this.setState({ changed: this.state.changed + 1 }); };
|
|
843
812
|
}
|
|
844
813
|
componentWillUnmount() {
|
|
814
|
+
super.componentWillUnmount();
|
|
845
815
|
this.survey.locLogo.onChanged = function () { };
|
|
846
816
|
}
|
|
847
817
|
renderTitle() {
|
|
@@ -861,7 +831,7 @@
|
|
|
861
831
|
data: componentData,
|
|
862
832
|
});
|
|
863
833
|
}
|
|
864
|
-
|
|
834
|
+
renderElement() {
|
|
865
835
|
if (!this.survey.renderedHasHeader)
|
|
866
836
|
return null;
|
|
867
837
|
return (_$1("div", { className: this.css.header, ref: this.rootRef },
|
|
@@ -931,21 +901,27 @@
|
|
|
931
901
|
return _$1(NotifierComponent, props);
|
|
932
902
|
});
|
|
933
903
|
|
|
934
|
-
class ComponentsContainer extends
|
|
935
|
-
|
|
936
|
-
const
|
|
904
|
+
class ComponentsContainer extends SurveyElementBase {
|
|
905
|
+
renderElement() {
|
|
906
|
+
const groups = this.props.survey.getContainerContentGroups(this.props.container);
|
|
937
907
|
const needRenderWrapper = this.props.needRenderWrapper === false ? false : true;
|
|
938
|
-
if (
|
|
908
|
+
if (groups.length == 0) {
|
|
939
909
|
return null;
|
|
940
910
|
}
|
|
911
|
+
const content = groups.map(group => this.renderGroup(group));
|
|
941
912
|
if (!needRenderWrapper) {
|
|
942
|
-
return _$1(k$2, null,
|
|
943
|
-
|
|
944
|
-
|
|
913
|
+
return _$1(k$2, null, content);
|
|
914
|
+
}
|
|
915
|
+
return _$1("div", { className: "sv-components-column" + " sv-components-container-" + this.props.container }, content);
|
|
916
|
+
}
|
|
917
|
+
renderGroup(group) {
|
|
918
|
+
if (!group.css) {
|
|
919
|
+
return this.renderComponent(group.elements[0]);
|
|
945
920
|
}
|
|
946
|
-
return _$1("div", { className:
|
|
947
|
-
|
|
948
|
-
|
|
921
|
+
return _$1("div", { className: group.css, key: group.key }, group.elements.map(component => this.renderComponent(component)));
|
|
922
|
+
}
|
|
923
|
+
renderComponent(component) {
|
|
924
|
+
return ReactElementFactory.Instance.createElement(component.component, { survey: this.props.survey, model: component.data, container: this.props.container, key: component.id });
|
|
949
925
|
}
|
|
950
926
|
}
|
|
951
927
|
ReactElementFactory.Instance.registerElement("sv-components-container", (props) => {
|
|
@@ -1019,7 +995,7 @@
|
|
|
1019
995
|
}
|
|
1020
996
|
return isNeedUpdate;
|
|
1021
997
|
}
|
|
1022
|
-
|
|
998
|
+
renderElement() {
|
|
1023
999
|
this.popup.model = this.model;
|
|
1024
1000
|
let popupContainer;
|
|
1025
1001
|
if (this.model.isModal) {
|
|
@@ -1091,7 +1067,7 @@
|
|
|
1091
1067
|
return (_$1("div", { className: "sv-popup__body-footer" },
|
|
1092
1068
|
_$1(SurveyActionBar, { model: popuModel.footerToolbar })));
|
|
1093
1069
|
}
|
|
1094
|
-
|
|
1070
|
+
renderElement() {
|
|
1095
1071
|
// Stays mounted and subscribed to the view model: Popup does not re-render when the popup opens.
|
|
1096
1072
|
if (!this.model.hasBeenShown)
|
|
1097
1073
|
return null;
|
|
@@ -1176,9 +1152,11 @@
|
|
|
1176
1152
|
return _$1(k$2, null, this.modalManager.getModals().map(model => $(_$1(PopupContainer, { model: model }), model.container, model.uniqueId.toString())));
|
|
1177
1153
|
}
|
|
1178
1154
|
componentDidMount() {
|
|
1155
|
+
super.componentDidMount();
|
|
1179
1156
|
PopupModal.addModalDescriptor(this.descriptor);
|
|
1180
1157
|
}
|
|
1181
1158
|
componentWillUnmount() {
|
|
1159
|
+
super.componentWillUnmount();
|
|
1182
1160
|
this.modalManager.clear();
|
|
1183
1161
|
PopupModal.removeModalDescriptor(this.descriptor);
|
|
1184
1162
|
}
|
|
@@ -1268,6 +1246,10 @@
|
|
|
1268
1246
|
|
|
1269
1247
|
var draghorizontal_24x16 = "<svg viewBox=\"0 0 24 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.5 9.25C16.81 9.25 16.25 9.81 16.25 10.5C16.25 11.19 16.81 11.75 17.5 11.75C18.19 11.75 18.75 11.19 18.75 10.5C18.75 9.81 18.19 9.25 17.5 9.25ZM17.25 10.5C17.25 10.36 17.36 10.25 17.5 10.25C17.64 10.25 17.75 10.36 17.75 10.5C17.75 10.78 17.25 10.78 17.25 10.5ZM17.5 6.75C18.19 6.75 18.75 6.19 18.75 5.5C18.75 4.81 18.19 4.25 17.5 4.25C16.81 4.25 16.25 4.81 16.25 5.5C16.25 6.19 16.81 6.75 17.5 6.75ZM17.5 5.25C17.64 5.25 17.75 5.36 17.75 5.5C17.75 5.78 17.25 5.78 17.25 5.5C17.25 5.36 17.36 5.25 17.5 5.25ZM12.5 9.25C11.81 9.25 11.25 9.81 11.25 10.5C11.25 11.19 11.81 11.75 12.5 11.75C13.19 11.75 13.75 11.19 13.75 10.5C13.75 9.81 13.19 9.25 12.5 9.25ZM12.25 10.5C12.25 10.36 12.36 10.25 12.5 10.25C12.64 10.25 12.75 10.36 12.75 10.5C12.75 10.78 12.25 10.78 12.25 10.5ZM12.5 4.25C11.81 4.25 11.25 4.81 11.25 5.5C11.25 6.19 11.81 6.75 12.5 6.75C13.19 6.75 13.75 6.19 13.75 5.5C13.75 4.81 13.19 4.25 12.5 4.25ZM12.25 5.5C12.25 5.36 12.36 5.25 12.5 5.25C12.64 5.25 12.75 5.36 12.75 5.5C12.75 5.78 12.25 5.78 12.25 5.5ZM7.5 9.25C6.81 9.25 6.25 9.81 6.25 10.5C6.25 11.19 6.81 11.75 7.5 11.75C8.19 11.75 8.75 11.19 8.75 10.5C8.75 9.81 8.19 9.25 7.5 9.25ZM7.25 10.5C7.25 10.36 7.36 10.25 7.5 10.25C7.64 10.25 7.75 10.36 7.75 10.5C7.75 10.78 7.25 10.78 7.25 10.5ZM7.5 4.25C6.81 4.25 6.25 4.81 6.25 5.5C6.25 6.19 6.81 6.75 7.5 6.75C8.19 6.75 8.75 6.19 8.75 5.5C8.75 4.81 8.19 4.25 7.5 4.25ZM7.25 5.5C7.25 5.36 7.36 5.25 7.5 5.25C7.64 5.25 7.75 5.36 7.75 5.5C7.75 5.78 7.25 5.78 7.25 5.5Z\"/></svg>";
|
|
1270
1248
|
|
|
1249
|
+
var edit_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.1209 2.0525L13.9509 1.8825C12.8809 0.812502 11.1309 0.812502 10.0609 1.8825L2.47089 9.4625C2.37089 9.5625 2.31089 9.6825 2.27089 9.8125L1.27089 13.8125C1.21089 14.0625 1.28089 14.3425 1.47089 14.5225C1.61089 14.6625 1.80089 14.7425 2.00089 14.7425C2.06089 14.7425 2.12089 14.7425 2.18089 14.7225L6.18089 13.7225C6.31089 13.6925 6.43089 13.6225 6.53089 13.5225L14.1209 5.9325C15.1909 4.8625 15.1909 3.1125 14.1209 2.0425V2.0525ZM5.62089 12.3125L3.04089 12.9625L3.69089 10.3825L9.00089 5.0525L10.9409 6.9925L5.62089 12.3125ZM13.0609 4.8725L12.0009 5.9325L10.0609 3.9925L11.1209 2.9325C11.6109 2.4425 12.4009 2.4425 12.8909 2.9325L13.0609 3.1025C13.5509 3.5925 13.5509 4.3825 13.0609 4.8725Z\"/></svg>";
|
|
1250
|
+
|
|
1251
|
+
var edit_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20.1301 6.05252L17.9601 3.88252C16.8901 2.81252 15.1401 2.81252 14.0701 3.88252L4.48014 13.4625C4.37014 13.5725 4.30014 13.7125 4.27014 13.8725L3.26014 19.8725C3.22014 20.1125 3.30014 20.3525 3.47014 20.5225C3.61014 20.6625 3.80014 20.7425 4.00014 20.7425C4.04014 20.7425 4.08014 20.7425 4.12014 20.7425L10.1201 19.7425C10.2701 19.7125 10.4201 19.6425 10.5301 19.5325L20.1201 9.94252C20.6401 9.42252 20.9301 8.73252 20.9301 8.00252C20.9301 7.27252 20.6401 6.57252 20.1201 6.06252L20.1301 6.05252ZM16.0101 11.9325L12.0701 7.99252L13.0101 7.05252L16.9501 10.9925L16.0101 11.9325ZM9.65014 18.2925L4.92014 19.0825L5.71014 14.3525L11.0101 9.05252L14.9501 12.9925L9.65014 18.2925ZM19.0701 8.87252L18.0101 9.93252L14.0701 5.99252L15.1301 4.93252C15.6201 4.44252 16.4101 4.44252 16.9001 4.93252L19.0701 7.10252C19.3101 7.34252 19.4401 7.65252 19.4401 7.98252C19.4401 8.31252 19.3101 8.63252 19.0701 8.86252V8.87252Z\"/></svg>";
|
|
1252
|
+
|
|
1271
1253
|
var editsmall_16x16 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M13.1209 3.05249L12.9509 2.88249C11.8809 1.81249 10.1309 1.81249 9.06089 2.88249L3.47089 8.46249C3.37089 8.56249 3.31089 8.68249 3.27089 8.81249L2.27089 12.8125C2.21089 13.0625 2.28089 13.3425 2.47089 13.5225C2.61089 13.6625 2.80089 13.7425 3.00089 13.7425C3.06089 13.7425 3.12089 13.7425 3.18089 13.7225L7.18089 12.7225C7.31089 12.6925 7.43089 12.6225 7.53089 12.5225L13.1209 6.93249C14.1909 5.86249 14.1909 4.11249 13.1209 3.04249V3.05249ZM6.62089 11.3125L4.04089 11.9625L4.69089 9.38249L8.01089 6.06249L9.95089 8.00249L6.63089 11.3225L6.62089 11.3125ZM12.0609 5.87249L11.0009 6.93249L9.06089 4.99249L10.1209 3.93249C10.6109 3.44249 11.4009 3.44249 11.8909 3.93249L12.0609 4.10249C12.5509 4.59249 12.5509 5.38249 12.0609 5.87249Z\"/></svg>";
|
|
1272
1254
|
|
|
1273
1255
|
var expand_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.75H8.75V11C8.75 11.41 8.41 11.75 8 11.75C7.59 11.75 7.25 11.41 7.25 11V8.75H5C4.59 8.75 4.25 8.41 4.25 8C4.25 7.59 4.59 7.25 5 7.25H7.25V5C7.25 4.59 7.59 4.25 8 4.25C8.41 4.25 8.75 4.59 8.75 5V7.25H11C11.41 7.25 11.75 7.59 11.75 8Z\"/></svg>";
|
|
@@ -1276,6 +1258,10 @@
|
|
|
1276
1258
|
|
|
1277
1259
|
var file_72x72 = "<svg viewBox=\"0 0 72 72\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M62.83 12.83L53.17 3.17C52.7982 2.79866 52.357 2.50421 51.8714 2.30346C51.3858 2.1027 50.8654 1.99959 50.34 2H14C12.4087 2 10.8826 2.63214 9.75735 3.75736C8.63214 4.88258 8 6.4087 8 8V64C8 65.5913 8.63214 67.1174 9.75735 68.2426C10.8826 69.3679 12.4087 70 14 70H58C59.5913 70 61.1174 69.3679 62.2426 68.2426C63.3679 67.1174 64 65.5913 64 64V15.66C64.0004 15.1346 63.8973 14.6142 63.6965 14.1286C63.4958 13.643 63.2013 13.2018 62.83 12.83ZM52 4.83L61.17 14H56C54.9391 14 53.9217 13.5786 53.1716 12.8284C52.4214 12.0783 52 11.0609 52 10V4.83ZM62 64C62 65.0609 61.5786 66.0783 60.8284 66.8284C60.0783 67.5786 59.0609 68 58 68H14C12.9391 68 11.9217 67.5786 11.1716 66.8284C10.4214 66.0783 10 65.0609 10 64V8C10 6.93914 10.4214 5.92172 11.1716 5.17157C11.9217 4.42143 12.9391 4 14 4H50V10C50 11.5913 50.6321 13.1174 51.7574 14.2426C52.8826 15.3679 54.4087 16 56 16H62V64ZM22 26H50V28H22V26ZM22 32H50V34H22V32ZM22 38H50V40H22V38ZM22 44H50V46H22V44Z\"/></svg>";
|
|
1278
1260
|
|
|
1261
|
+
var filter_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14 10.25H12.63C12.3 9.1 11.25 8.25 10 8.25C8.75 8.25 7.7 9.1 7.37 10.25H2C1.59 10.25 1.25 10.59 1.25 11C1.25 11.41 1.59 11.75 2 11.75H7.37C7.7 12.9 8.75 13.75 10 13.75C11.25 13.75 12.3 12.9 12.63 11.75H14C14.41 11.75 14.75 11.41 14.75 11C14.75 10.59 14.41 10.25 14 10.25ZM10 12.25C9.31 12.25 8.75 11.69 8.75 11C8.75 10.31 9.31 9.75 10 9.75C10.69 9.75 11.25 10.31 11.25 11C11.25 11.69 10.69 12.25 10 12.25ZM2 5.75H3.37C3.7 6.9 4.75 7.75 6 7.75C7.25 7.75 8.3 6.9 8.63 5.75H14C14.41 5.75 14.75 5.41 14.75 5C14.75 4.59 14.41 4.25 14 4.25H8.63C8.3 3.1 7.25 2.25 6 2.25C4.75 2.25 3.7 3.1 3.37 4.25H2C1.59 4.25 1.25 4.59 1.25 5C1.25 5.41 1.59 5.75 2 5.75ZM6 3.75C6.69 3.75 7.25 4.31 7.25 5C7.25 5.69 6.69 6.25 6 6.25C5.31 6.25 4.75 5.69 4.75 5C4.75 4.31 5.31 3.75 6 3.75Z\"/></svg>";
|
|
1262
|
+
|
|
1263
|
+
var filter_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 6.75H5.37C5.7 7.9 6.75 8.75 8 8.75C9.25 8.75 10.3 7.9 10.63 6.75H21C21.41 6.75 21.75 6.41 21.75 6C21.75 5.59 21.41 5.25 21 5.25H10.63C10.3 4.1 9.25 3.25 8 3.25C6.75 3.25 5.7 4.1 5.37 5.25H3C2.59 5.25 2.25 5.59 2.25 6C2.25 6.41 2.59 6.75 3 6.75ZM8 4.75C8.69 4.75 9.25 5.31 9.25 6C9.25 6.69 8.69 7.25 8 7.25C7.31 7.25 6.75 6.69 6.75 6C6.75 5.31 7.31 4.75 8 4.75ZM21 11.25H18.63C18.3 10.1 17.25 9.25 16 9.25C14.75 9.25 13.7 10.1 13.37 11.25H3C2.59 11.25 2.25 11.59 2.25 12C2.25 12.41 2.59 12.75 3 12.75H13.37C13.7 13.9 14.75 14.75 16 14.75C17.25 14.75 18.3 13.9 18.63 12.75H21C21.41 12.75 21.75 12.41 21.75 12C21.75 11.59 21.41 11.25 21 11.25ZM16 13.25C15.31 13.25 14.75 12.69 14.75 12C14.75 11.31 15.31 10.75 16 10.75C16.69 10.75 17.25 11.31 17.25 12C17.25 12.69 16.69 13.25 16 13.25ZM21 17.25H10.63C10.3 16.1 9.25 15.25 8 15.25C6.75 15.25 5.7 16.1 5.37 17.25H3C2.59 17.25 2.25 17.59 2.25 18C2.25 18.41 2.59 18.75 3 18.75H5.37C5.7 19.9 6.75 20.75 8 20.75C9.25 20.75 10.3 19.9 10.63 18.75H21C21.41 18.75 21.75 18.41 21.75 18C21.75 17.59 21.41 17.25 21 17.25ZM8 19.25C7.31 19.25 6.75 18.69 6.75 18C6.75 17.31 7.31 16.75 8 16.75C8.69 16.75 9.25 17.31 9.25 18C9.25 18.69 8.69 19.25 8 19.25Z\"/></svg>";
|
|
1264
|
+
|
|
1279
1265
|
var flip_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14.53 17.4775C14.82 17.7675 14.82 18.2475 14.53 18.5375L11.53 21.5375C11.38 21.6875 11.19 21.7575 11 21.7575C10.81 21.7575 10.62 21.6875 10.47 21.5375C10.18 21.2475 10.18 20.7675 10.47 20.4775L12.2 18.7475C12.13 18.7475 12.07 18.7475 12 18.7475C6.62 18.7475 2.25 15.7475 2.25 12.0575C2.25 10.2975 3.22 8.6375 4.99 7.3875C5.33 7.1475 5.8 7.2275 6.03 7.5675C6.27 7.9075 6.19 8.3775 5.85 8.6075C4.49 9.5675 3.74 10.7875 3.74 12.0575C3.74 14.9175 7.44 17.2475 11.99 17.2475C12.05 17.2475 12.11 17.2475 12.17 17.2475L10.46 15.5375C10.17 15.2475 10.17 14.7675 10.46 14.4775C10.75 14.1875 11.23 14.1875 11.52 14.4775L14.52 17.4775H14.53ZM12 5.2575C11.93 5.2575 11.87 5.2575 11.8 5.2575L13.53 3.5275C13.82 3.2375 13.82 2.7575 13.53 2.4675C13.24 2.1775 12.76 2.1775 12.47 2.4675L9.47 5.4675C9.18 5.7575 9.18 6.2375 9.47 6.5275L12.47 9.5275C12.62 9.6775 12.81 9.7475 13 9.7475C13.19 9.7475 13.38 9.6775 13.53 9.5275C13.82 9.2375 13.82 8.7575 13.53 8.4675L11.82 6.7575C11.88 6.7575 11.94 6.7575 12 6.7575C16.55 6.7575 20.25 9.0875 20.25 11.9475C20.25 13.2075 19.5 14.4375 18.14 15.3975C17.8 15.6375 17.72 16.1075 17.96 16.4475C18.11 16.6575 18.34 16.7675 18.57 16.7675C18.72 16.7675 18.87 16.7275 19 16.6275C20.77 15.3775 21.75 13.7175 21.75 11.9575C21.75 8.2675 17.38 5.2675 12 5.2675V5.2575Z\"/></svg>";
|
|
1280
1266
|
|
|
1281
1267
|
var folder_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M21.72 9.24C21.45 8.92 21.12 8.67 20.75 8.5V8C20.75 6.48 19.52 5.25 18 5.25H10.65C10.32 4.1 9.26 3.25 8 3.25H6C4.48 3.25 3.25 4.48 3.25 6V18C3.25 19.52 4.48 20.75 6 20.75H18.33C19.66 20.75 20.8 19.8 21.04 18.49L22.31 11.49C22.46 10.69 22.24 9.86 21.72 9.24ZM4.75 18V6C4.75 5.31 5.31 4.75 6 4.75H8C8.69 4.75 9.25 5.31 9.25 6C9.25 6.41 9.59 6.75 10 6.75H18C18.69 6.75 19.25 7.31 19.25 8V8.25H9.27C7.94 8.25 6.8 9.2 6.56 10.51L5.29 17.51C5.19 18.07 5.27 18.64 5.51 19.15C5.06 18.96 4.75 18.52 4.75 18ZM20.83 11.22L19.56 18.22C19.45 18.81 18.94 19.25 18.33 19.25H8C7.63 19.25 7.28 19.09 7.04 18.8C6.8 18.51 6.7 18.14 6.77 17.78L8.04 10.78C8.15 10.19 8.66 9.75 9.27 9.75H19.6C19.97 9.75 20.32 9.91 20.56 10.2C20.8 10.49 20.9 10.86 20.83 11.22Z\"/></svg>";
|
|
@@ -1302,6 +1288,8 @@
|
|
|
1302
1288
|
|
|
1303
1289
|
var plus_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8 2.25C8.41 2.25 8.75 2.59 8.75 3V7.25H13C13.41 7.25 13.75 7.59 13.75 8C13.75 8.41 13.41 8.75 13 8.75H8.75V13C8.75 13.41 8.41 13.75 8 13.75C7.59 13.75 7.25 13.41 7.25 13V8.75H3C2.59 8.75 2.25 8.41 2.25 8C2.25 7.59 2.59 7.25 3 7.25H7.25V3C7.25 2.59 7.59 2.25 8 2.25Z\"/></svg>";
|
|
1304
1290
|
|
|
1291
|
+
var plus_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 2.5C12.4142 2.5 12.75 2.83579 12.75 3.25V11.25H20.75L20.8271 11.2539C21.2051 11.2925 21.5 11.6118 21.5 12C21.5 12.3882 21.2051 12.7075 20.8271 12.7461L20.75 12.75H12.75V20.75L12.7461 20.8271C12.7075 21.2051 12.3882 21.5 12 21.5C11.6118 21.5 11.2925 21.2051 11.2539 20.8271L11.25 20.75V12.75H3.25C2.83579 12.75 2.5 12.4142 2.5 12C2.5 11.5858 2.83579 11.25 3.25 11.25H11.25V3.25C11.25 2.83579 11.5858 2.5 12 2.5Z\"/></svg>";
|
|
1292
|
+
|
|
1305
1293
|
var radio_16x16 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><circle cx=\"8\" cy=\"8\" r=\"4\"/></svg>";
|
|
1306
1294
|
|
|
1307
1295
|
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>";
|
|
@@ -1348,6 +1336,12 @@
|
|
|
1348
1336
|
|
|
1349
1337
|
var sort_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.28284 7.47861C5.37477 7.51396 5.45962 7.57053 5.53033 7.64124L8.35876 10.4697C8.64867 10.7596 8.64867 11.2404 8.35876 11.5303C8.06884 11.8202 7.58801 11.8202 7.2981 11.5303L5.74953 9.98177L5.74953 13.8284C5.74953 14.0406 5.66468 14.2244 5.53033 14.3588C5.39598 14.4931 5.21213 14.578 5 14.578C4.58988 14.578 4.25047 14.2385 4.25047 13.8284L4.25047 9.98177L2.7019 11.5303C2.41199 11.8202 1.93116 11.8202 1.64124 11.5303C1.35133 11.2404 1.35133 10.7596 1.64124 10.4697L4.46967 7.64124C4.54038 7.57053 4.61816 7.52103 4.71716 7.47861C4.901 7.4079 5.10607 7.40083 5.29698 7.47861H5.28284ZM13.296 4.47467L11.7475 6.02323L11.7475 2.17657C11.7475 1.76645 11.4081 1.42704 10.9979 1.42704C10.5878 1.42704 10.2484 1.76645 10.2484 2.17657V6.02323L8.69983 4.47467C8.40992 4.18476 7.92909 4.18476 7.63917 4.47467C7.34926 4.76458 7.34926 5.24542 7.63917 5.53533L10.4676 8.36376C10.5383 8.43447 10.6161 8.48397 10.7151 8.52639C10.8989 8.5971 11.104 8.60417 11.2949 8.52639C11.3868 8.49104 11.4717 8.43447 11.5424 8.36376L14.3708 5.53533C14.6607 5.24542 14.6607 4.76458 14.3708 4.47467C14.0809 4.18476 13.6001 4.18476 13.3102 4.47467H13.296Z\"/></svg>";
|
|
1350
1338
|
|
|
1339
|
+
var sparkle_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.93913 2.02558C7.06326 1.97411 7.20302 1.97411 7.32715 2.02558L7.38835 2.05553L7.46061 2.10696C7.52321 2.16012 7.55765 2.21612 7.57324 2.24368C7.5962 2.28429 7.6084 2.31948 7.61295 2.33287C7.61842 2.34897 7.62251 2.36247 7.62402 2.36803L7.62793 2.38235L7.94564 3.61477C8.18302 4.53503 8.27919 4.88338 8.45801 5.161C8.6253 5.42063 8.84616 5.64149 9.10579 5.80878C9.38341 5.9876 9.73176 6.08377 10.652 6.32115L11.8844 6.63886C11.8864 6.63937 11.8927 6.64112 11.8988 6.64277C11.9043 6.64428 11.9178 6.64837 11.9339 6.65384C11.9473 6.65839 11.9825 6.67059 12.0231 6.69355C12.0507 6.70914 12.1067 6.74358 12.1598 6.80618L12.2113 6.87845L12.2412 6.93964C12.3013 7.08459 12.2915 7.25106 12.2113 7.38886C12.1473 7.49861 12.0599 7.55296 12.0231 7.57376C11.9825 7.59672 11.9473 7.60892 11.9339 7.61347C11.9178 7.61894 11.9043 7.62302 11.8988 7.62454C11.8927 7.62619 11.8864 7.62794 11.8844 7.62844L10.652 7.94615C9.73176 8.18354 9.38341 8.27971 9.10579 8.45852C8.84616 8.62581 8.6253 8.84667 8.45801 9.10631C8.27919 9.38393 8.18302 9.73228 7.94564 10.6525L7.62793 11.885C7.62742 11.8869 7.62568 11.8932 7.62402 11.8993C7.62251 11.9048 7.61842 11.9183 7.61295 11.9344C7.6084 11.9478 7.5962 11.983 7.57324 12.0236C7.55244 12.0604 7.4981 12.1479 7.38835 12.2118C7.23075 12.3036 7.03552 12.3036 6.87793 12.2118C6.76818 12.1479 6.71383 12.0604 6.69303 12.0236C6.67007 11.983 6.65787 11.9478 6.65332 11.9344C6.64785 11.9183 6.64377 11.9048 6.64225 11.8993C6.6406 11.8932 6.63885 11.8869 6.63835 11.885L6.32064 10.6525C6.08325 9.73228 5.98708 9.38393 5.80827 9.10631C5.64098 8.84667 5.42012 8.62581 5.16048 8.45852C4.88286 8.27971 4.53451 8.18354 3.61426 7.94615L2.38183 7.62844C2.37988 7.62794 2.37359 7.62619 2.36751 7.62454C2.36195 7.62302 2.34846 7.61894 2.33236 7.61347C2.31896 7.60892 2.28377 7.59672 2.24316 7.57376C2.2064 7.55296 2.11894 7.49861 2.05501 7.38886C1.96324 7.23127 1.96324 7.03604 2.05501 6.87845L2.10644 6.80618C2.15961 6.74358 2.2156 6.70914 2.24316 6.69355C2.28377 6.67059 2.31896 6.65839 2.33236 6.65384C2.34846 6.64837 2.36195 6.64428 2.36751 6.64277C2.37359 6.64112 2.37988 6.63937 2.38183 6.63886L3.61426 6.32115C4.53451 6.08377 4.88286 5.9876 5.16048 5.80878C5.42012 5.64149 5.64098 5.42063 5.80827 5.161C5.98708 4.88338 6.08325 4.53503 6.32064 3.61477L6.63835 2.38235C6.63885 2.3804 6.6406 2.37411 6.64225 2.36803C6.64377 2.36247 6.64785 2.34897 6.65332 2.33287C6.65787 2.31948 6.67007 2.28429 6.69303 2.24368C6.71383 2.20692 6.76818 2.11946 6.87793 2.05553L6.93913 2.02558ZM7.13314 4.46048C6.99075 4.98691 6.86295 5.3704 6.64941 5.70201C6.40479 6.0818 6.08129 6.4053 5.7015 6.64993C5.36988 6.86346 4.98639 6.99127 4.45996 7.13365C4.98639 7.27604 5.36988 7.40384 5.7015 7.61738C6.08129 7.862 6.40479 8.1855 6.64941 8.56529C6.86286 8.89678 6.99082 9.28006 7.13314 9.80618C7.27546 9.28006 7.40341 8.89678 7.61686 8.56529C7.86149 8.1855 8.18499 7.862 8.56478 7.61738C8.89626 7.40393 9.27955 7.27597 9.80566 7.13365C9.27955 6.99133 8.89626 6.86338 8.56478 6.64993C8.18499 6.4053 7.86149 6.0818 7.61686 5.70201C7.40333 5.3704 7.27552 4.98691 7.13314 4.46048Z\"/><path d=\"M12.1476 10.848C12.2435 10.533 12.6895 10.533 12.7854 10.848L13.037 11.6746C13.0693 11.7809 13.1525 11.8641 13.2588 11.8965L14.0854 12.1481C14.4005 12.244 14.4005 12.69 14.0854 12.7859L13.2588 13.0375C13.1525 13.0698 13.0693 13.153 13.037 13.2593L12.7854 14.0859C12.6895 14.401 12.2435 14.401 12.1476 14.0859L11.896 13.2593C11.8637 13.153 11.7805 13.0698 11.6742 13.0375L10.8475 12.7859C10.5325 12.69 10.5325 12.244 10.8475 12.1481L11.6742 11.8965C11.7805 11.8641 11.8637 11.7809 11.896 11.6746L12.1476 10.848Z\"/><path d=\"M11.2087 1.82878C11.2662 1.63976 11.5338 1.63976 11.5913 1.82878L11.7578 2.37587C11.7773 2.43964 11.8272 2.48955 11.8909 2.50897L12.438 2.67548C12.6271 2.73301 12.6271 3.00062 12.438 3.05815L11.8909 3.22467C11.8272 3.24408 11.7773 3.29399 11.7578 3.35777L11.5913 3.90486C11.5338 4.09388 11.2662 4.09388 11.2087 3.90486L11.0421 3.35777C11.0227 3.29399 10.9728 3.24408 10.909 3.22467L10.362 3.05815C10.1729 3.00062 10.1729 2.73301 10.362 2.67548L10.909 2.50897C10.9728 2.48955 11.0227 2.43964 11.0421 2.37587L11.2087 1.82878Z\"/></svg>";
|
|
1340
|
+
|
|
1341
|
+
var sparkle_24x24 = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.4087 3.03837C10.5949 2.96117 10.8045 2.96117 10.9907 3.03837L11.0825 3.08329L11.1909 3.16044C11.2848 3.24018 11.3365 3.32417 11.3599 3.36552C11.3943 3.42643 11.4126 3.47921 11.4194 3.49931C11.4276 3.52346 11.4338 3.5437 11.436 3.55204L11.4419 3.57353L11.9185 5.42216C12.2745 6.80254 12.4188 7.32507 12.687 7.7415C12.9379 8.13095 13.2692 8.46224 13.6587 8.71318C14.0751 8.9814 14.5976 9.12565 15.978 9.48173L17.8267 9.95829C17.8296 9.95905 17.839 9.96167 17.8481 9.96415C17.8565 9.96642 17.8767 9.97255 17.9009 9.98075C17.921 9.98758 17.9738 10.0059 18.0347 10.0403C18.076 10.0637 18.16 10.1154 18.2397 10.2093L18.3169 10.3177L18.3618 10.4095C18.452 10.6269 18.4373 10.8766 18.3169 11.0833C18.221 11.2479 18.0898 11.3294 18.0347 11.3606C17.9738 11.3951 17.921 11.4134 17.9009 11.4202C17.8767 11.4284 17.8565 11.4345 17.8481 11.4368C17.839 11.4393 17.8296 11.4419 17.8267 11.4427L15.978 11.9192C14.5976 12.2753 14.0751 12.4196 13.6587 12.6878C13.2692 12.9387 12.9379 13.27 12.687 13.6595C12.4188 14.0759 12.2745 14.5984 11.9185 15.9788L11.4419 17.8274C11.4411 17.8304 11.4385 17.8398 11.436 17.8489C11.4338 17.8573 11.4276 17.8775 11.4194 17.9017C11.4126 17.9217 11.3943 17.9745 11.3599 18.0354C11.3287 18.0906 11.2471 18.2218 11.0825 18.3177C10.8461 18.4553 10.5533 18.4553 10.3169 18.3177C10.1523 18.2218 10.0707 18.0906 10.0395 18.0354C10.0051 17.9745 9.9868 17.9217 9.97998 17.9017C9.97178 17.8775 9.96565 17.8573 9.96338 17.8489C9.9609 17.8398 9.95827 17.8304 9.95752 17.8274L9.48096 15.9788C9.12487 14.5984 8.98062 14.0759 8.7124 13.6595C8.46146 13.27 8.13017 12.9387 7.74072 12.6878C7.3243 12.4196 6.80177 12.2753 5.42139 11.9192L3.57275 11.4427C3.56982 11.4419 3.56038 11.4393 3.55127 11.4368C3.54292 11.4345 3.52268 11.4284 3.49853 11.4202C3.47844 11.4134 3.42566 11.3951 3.36474 11.3606C3.3096 11.3294 3.17841 11.2479 3.08252 11.0833C2.94486 10.8469 2.94486 10.5541 3.08252 10.3177L3.15967 10.2093C3.23941 10.1154 3.3234 10.0637 3.36474 10.0403C3.42566 10.0059 3.47844 9.98758 3.49853 9.98075C3.52268 9.97255 3.54292 9.96642 3.55127 9.96415C3.56038 9.96167 3.56982 9.95905 3.57275 9.95829L5.42139 9.48173C6.80177 9.12565 7.3243 8.9814 7.74072 8.71318C8.13017 8.46224 8.46146 8.13095 8.7124 7.7415C8.98062 7.32507 9.12487 6.80254 9.48096 5.42216L9.95752 3.57353C9.95827 3.57059 9.9609 3.56116 9.96338 3.55204C9.96565 3.5437 9.97178 3.52346 9.97998 3.49931C9.9868 3.47921 10.0051 3.42643 10.0395 3.36552C10.0707 3.31037 10.1523 3.17918 10.3169 3.08329L10.4087 3.03837ZM10.6997 6.69071C10.4861 7.48036 10.2944 8.0556 9.97412 8.55302C9.60718 9.1227 9.12193 9.60796 8.55224 9.97489C8.05482 10.2952 7.47958 10.4869 6.68994 10.7005C7.47958 10.9141 8.05482 11.1058 8.55224 11.4261C9.12193 11.793 9.60718 12.2783 9.97412 12.8479C10.2943 13.3452 10.4862 13.9201 10.6997 14.7093C10.9132 13.9201 11.1051 13.3452 11.4253 12.8479C11.7922 12.2783 12.2775 11.793 12.8472 11.4261C13.3444 11.1059 13.9193 10.914 14.7085 10.7005C13.9193 10.487 13.3444 10.2951 12.8472 9.97489C12.2775 9.60796 11.7922 9.1227 11.4253 8.55302C11.105 8.0556 10.9133 7.48036 10.6997 6.69071Z\"/><path d=\"M18.2214 16.272C18.3652 15.7995 19.0342 15.7995 19.1781 16.272L19.5555 17.512C19.604 17.6714 19.7288 17.7962 19.8882 17.8447L21.1282 18.2221C21.6007 18.3659 21.6007 19.035 21.1282 19.1788L19.8882 19.5562C19.7288 19.6047 19.604 19.7295 19.5555 19.8889L19.1781 21.1289C19.0342 21.6014 18.3652 21.6014 18.2214 21.1289L17.844 19.8889C17.7955 19.7295 17.6707 19.6047 17.5113 19.5562L16.2713 19.1788C15.7988 19.035 15.7988 18.3659 16.2713 18.2221L17.5113 17.8447C17.6707 17.7962 17.7955 17.6714 17.844 17.512L18.2214 16.272Z\"/><path d=\"M16.813 2.74316C16.8993 2.45964 17.3007 2.45964 17.387 2.74316L17.6368 3.5638C17.6659 3.65946 17.7408 3.73433 17.8364 3.76345L18.6571 4.01322C18.9406 4.09952 18.9406 4.50093 18.6571 4.58722L17.8364 4.837C17.7408 4.86612 17.6659 4.94098 17.6368 5.03665L17.387 5.85728C17.3007 6.14081 16.8993 6.14081 16.813 5.85729L16.5632 5.03665C16.5341 4.94098 16.4592 4.86612 16.3636 4.837L15.5429 4.58722C15.2594 4.50093 15.2594 4.09952 15.5429 4.01322L16.3636 3.76345C16.4592 3.73433 16.5341 3.65946 16.5632 3.5638L16.813 2.74316Z\"/></svg>";
|
|
1342
|
+
|
|
1343
|
+
var star_16x16 = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.5406 15.23C11.2506 15.23 10.9506 15.15 10.6806 15L8.00057 13.49L5.32057 15C4.72057 15.34 3.99057 15.3 3.44057 14.89C2.88057 14.48 2.62057 13.81 2.75057 13.13L3.35057 10.08L1.06057 7.96999C0.560569 7.49999 0.370569 6.79999 0.590569 6.14999C0.800569 5.48999 1.36057 5.03999 2.05057 4.95999L5.12057 4.58999L6.41057 1.77999C6.70057 1.14999 7.31057 0.759995 8.00057 0.759995C8.69057 0.759995 9.30057 1.14999 9.59057 1.77999L10.8806 4.58999L13.9506 4.95999C14.6306 5.03999 15.1906 5.49999 15.4106 6.14999C15.6206 6.80999 15.4406 7.49999 14.9406 7.96999L12.6606 10.09L13.2606 13.14C13.3906 13.82 13.1306 14.49 12.5706 14.9C12.2606 15.12 11.9006 15.23 11.5506 15.23H11.5406ZM7.99057 11.88C8.12057 11.88 8.24057 11.91 8.36057 11.98L11.4106 13.7C11.5306 13.77 11.6306 13.72 11.6806 13.68C11.7306 13.64 11.8006 13.57 11.7806 13.43L11.1006 9.96999C11.0506 9.71999 11.1306 9.44999 11.3206 9.27999L13.9006 6.87999C14.0006 6.78999 13.9806 6.67999 13.9706 6.61999C13.9606 6.55999 13.9006 6.46999 13.7606 6.44999L10.2806 6.02999C10.0206 5.99999 9.80057 5.83999 9.69057 5.59999L8.23057 2.40999C8.17057 2.27999 8.06057 2.25999 8.00057 2.25999C7.94057 2.25999 7.83057 2.27999 7.77057 2.40999L6.31057 5.59999C6.20057 5.83999 5.98057 5.99999 5.72057 6.02999L2.24057 6.44999C2.10057 6.46999 2.05057 6.55999 2.03057 6.61999C2.01057 6.67999 1.99057 6.78999 2.10057 6.87999L4.68057 9.27999C4.87057 9.45999 4.96057 9.71999 4.90057 9.96999L4.22057 13.43C4.19057 13.57 4.27057 13.64 4.32057 13.68C4.37057 13.72 4.47057 13.76 4.59057 13.7L7.64057 11.98C7.75057 11.92 7.88057 11.88 8.01057 11.88H7.99057Z\"/></svg>";
|
|
1344
|
+
|
|
1351
1345
|
const icons = {
|
|
1352
1346
|
"modernbooleancheckchecked": modernbooleancheckchecked,
|
|
1353
1347
|
"modernbooleancheckind": modernbooleancheckind,
|
|
@@ -1384,10 +1378,14 @@
|
|
|
1384
1378
|
"delete-24x24": delete_24x24,
|
|
1385
1379
|
"drag-24x24": drag_24x24,
|
|
1386
1380
|
"draghorizontal-24x16": draghorizontal_24x16,
|
|
1381
|
+
"edit-16x16": edit_16x16,
|
|
1382
|
+
"edit-24x24": edit_24x24,
|
|
1387
1383
|
"editsmall-16x16": editsmall_16x16,
|
|
1388
1384
|
"expand-16x16": expand_16x16,
|
|
1389
1385
|
"expanddetails-16x16": expanddetails_16x16,
|
|
1390
1386
|
"file-72x72": file_72x72,
|
|
1387
|
+
"filter-16x16": filter_16x16,
|
|
1388
|
+
"filter-24x24": filter_24x24,
|
|
1391
1389
|
"flip-24x24": flip_24x24,
|
|
1392
1390
|
"folder-24x24": folder_24x24,
|
|
1393
1391
|
"fullsize-16x16": fullsize_16x16,
|
|
@@ -1401,6 +1399,7 @@
|
|
|
1401
1399
|
"navmenu-24x24": navmenu_24x24,
|
|
1402
1400
|
"noimage-48x48": noimage_48x48,
|
|
1403
1401
|
"plus-16x16": plus_16x16,
|
|
1402
|
+
"plus-24x24": plus_24x24,
|
|
1404
1403
|
"radio-16x16": radio_16x16,
|
|
1405
1404
|
"ranking-arrows": ranking_arrows,
|
|
1406
1405
|
"rankingdot-16x16": rankingdot_16x16,
|
|
@@ -1424,6 +1423,9 @@
|
|
|
1424
1423
|
"smiley-rate8-24x24": smiley_rate8_24x24,
|
|
1425
1424
|
"smiley-rate9-24x24": smiley_rate9_24x24,
|
|
1426
1425
|
"sort-16x16": sort_16x16,
|
|
1426
|
+
"sparkle-16x16": sparkle_16x16,
|
|
1427
|
+
"sparkle-24x24": sparkle_24x24,
|
|
1428
|
+
"star-16x16": star_16x16,
|
|
1427
1429
|
};
|
|
1428
1430
|
|
|
1429
1431
|
exports.icons = icons;
|
|
@@ -1477,6 +1479,7 @@
|
|
|
1477
1479
|
super(props);
|
|
1478
1480
|
this.previousJSON = {};
|
|
1479
1481
|
this.isSurveyUpdated = false;
|
|
1482
|
+
this.key = 0;
|
|
1480
1483
|
this.createSurvey(props);
|
|
1481
1484
|
this.updateSurvey(props, {});
|
|
1482
1485
|
this.rootRef = b$1();
|
|
@@ -1610,7 +1613,7 @@
|
|
|
1610
1613
|
if (!!this.survey.renderedWidth) {
|
|
1611
1614
|
style.maxWidth = this.survey.renderedWidth;
|
|
1612
1615
|
}
|
|
1613
|
-
return (_$1("div", { className: this.survey.bodyContainerCss },
|
|
1616
|
+
return (_$1("div", { key: this.key, className: this.survey.bodyContainerCss },
|
|
1614
1617
|
_$1(ComponentsContainer, { survey: this.survey, container: "left" }),
|
|
1615
1618
|
_$1("div", { className: "sv-components-column sv-components-column--expandable" },
|
|
1616
1619
|
_$1(ComponentsContainer, { survey: this.survey, container: "center" }),
|
|
@@ -1679,6 +1682,13 @@
|
|
|
1679
1682
|
}
|
|
1680
1683
|
if (newProps[key] === oldProps[key])
|
|
1681
1684
|
continue;
|
|
1685
|
+
if (key == "settings") {
|
|
1686
|
+
// Data for the model's settings() method; assigning it would replace the method. An absent value applies nothing
|
|
1687
|
+
if (newProps.settings !== undefined && newProps.settings !== null) {
|
|
1688
|
+
this.survey.settings(newProps.settings);
|
|
1689
|
+
}
|
|
1690
|
+
continue;
|
|
1691
|
+
}
|
|
1682
1692
|
if (key.indexOf("on") == 0 && this.survey[key] && this.survey[key].add) {
|
|
1683
1693
|
if (!!oldProps[key]) {
|
|
1684
1694
|
this.survey[key].remove(oldProps[key]);
|
|
@@ -1691,14 +1701,13 @@
|
|
|
1691
1701
|
}
|
|
1692
1702
|
}
|
|
1693
1703
|
setSurveyEvents() {
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
self.setState({ modelChanged: counter + 1 });
|
|
1704
|
+
this.survey.renderCallback = () => {
|
|
1705
|
+
this.key++;
|
|
1706
|
+
this.forceUpdate();
|
|
1698
1707
|
};
|
|
1699
1708
|
this.survey.onPartialSend.add((sender) => {
|
|
1700
|
-
if (!!
|
|
1701
|
-
|
|
1709
|
+
if (!!this.state) {
|
|
1710
|
+
this.setState(this.state);
|
|
1702
1711
|
}
|
|
1703
1712
|
});
|
|
1704
1713
|
}
|
|
@@ -1769,7 +1778,7 @@
|
|
|
1769
1778
|
get progress() {
|
|
1770
1779
|
return -this.timerModel.progress * this.circleLength;
|
|
1771
1780
|
}
|
|
1772
|
-
|
|
1781
|
+
renderElement() {
|
|
1773
1782
|
if (!this.timerModel.isRunning) {
|
|
1774
1783
|
return null;
|
|
1775
1784
|
}
|
|
@@ -1911,14 +1920,18 @@
|
|
|
1911
1920
|
}
|
|
1912
1921
|
componentDidMount() {
|
|
1913
1922
|
super.componentDidMount();
|
|
1923
|
+
if (!this.row)
|
|
1924
|
+
return;
|
|
1925
|
+
this.row.changeUIMountCount(1);
|
|
1914
1926
|
var el = this.rootRef.current;
|
|
1915
1927
|
if (this.rootRef.current) {
|
|
1916
1928
|
this.row.setRootElement(this.rootRef.current);
|
|
1917
1929
|
}
|
|
1918
1930
|
if (!!el && !this.row.isNeedRender) {
|
|
1931
|
+
var row = this.row;
|
|
1919
1932
|
var rowContainerDiv = el;
|
|
1920
1933
|
this.lazyRenderingTimeout = setTimeout(() => {
|
|
1921
|
-
|
|
1934
|
+
row.startLazyRendering(rowContainerDiv);
|
|
1922
1935
|
}, 10);
|
|
1923
1936
|
}
|
|
1924
1937
|
}
|
|
@@ -1926,27 +1939,42 @@
|
|
|
1926
1939
|
if (!super.shouldComponentUpdate(nextProps, nextState))
|
|
1927
1940
|
return false;
|
|
1928
1941
|
if (nextProps.row !== this.row) {
|
|
1942
|
+
// The next render reads these from the new row. The previous row is released at commit, in componentDidUpdate.
|
|
1929
1943
|
nextProps.row.isNeedRender = this.row.isNeedRender;
|
|
1930
1944
|
nextProps.row.setRootElement(this.rootRef.current);
|
|
1931
|
-
this.row.setRootElement(undefined);
|
|
1932
|
-
this.stopLazyRendering();
|
|
1933
1945
|
}
|
|
1934
1946
|
this.recalculateCss();
|
|
1935
1947
|
return true;
|
|
1936
1948
|
}
|
|
1937
|
-
|
|
1949
|
+
componentDidUpdate(prevProps, prevState) {
|
|
1950
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
1951
|
+
const prevRow = prevProps.row;
|
|
1952
|
+
if (prevRow === this.row)
|
|
1953
|
+
return;
|
|
1938
1954
|
clearTimeout(this.lazyRenderingTimeout);
|
|
1939
|
-
this.row
|
|
1940
|
-
|
|
1955
|
+
if (!!this.row) {
|
|
1956
|
+
this.row.changeUIMountCount(1);
|
|
1957
|
+
}
|
|
1958
|
+
this.releaseRowIfUnmounted(prevRow);
|
|
1941
1959
|
}
|
|
1942
1960
|
componentWillUnmount() {
|
|
1943
1961
|
super.componentWillUnmount();
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1962
|
+
clearTimeout(this.lazyRenderingTimeout);
|
|
1963
|
+
this.releaseRowIfUnmounted(this.row);
|
|
1964
|
+
}
|
|
1965
|
+
// Another component may still render the row (#10701), so only the last one to unmount resets it.
|
|
1966
|
+
releaseRowIfUnmounted(row) {
|
|
1967
|
+
if (!row)
|
|
1968
|
+
return;
|
|
1969
|
+
if (row.changeUIMountCount(-1) > 0) {
|
|
1970
|
+
if (row.getRootElement() === this.rootRef.current) {
|
|
1971
|
+
row.setRootElement(undefined);
|
|
1948
1972
|
}
|
|
1973
|
+
return;
|
|
1949
1974
|
}
|
|
1975
|
+
row.setRootElement(undefined);
|
|
1976
|
+
row.stopLazyRendering();
|
|
1977
|
+
row.isNeedRender = !row.isLazyRendering();
|
|
1950
1978
|
}
|
|
1951
1979
|
createElement(element, elementIndex) {
|
|
1952
1980
|
const index = elementIndex ? "-" + elementIndex : 0;
|
|
@@ -1985,7 +2013,7 @@
|
|
|
1985
2013
|
return this.getCss();
|
|
1986
2014
|
}
|
|
1987
2015
|
getPanelFromProps(props) {
|
|
1988
|
-
return
|
|
2016
|
+
return props.element || props.question;
|
|
1989
2017
|
}
|
|
1990
2018
|
get panelBase() {
|
|
1991
2019
|
return this.getPanelFromProps(this.props);
|
|
@@ -2326,14 +2354,14 @@
|
|
|
2326
2354
|
return _$1(SurveyBreadcrumbs, props);
|
|
2327
2355
|
});
|
|
2328
2356
|
|
|
2329
|
-
class QuestionHint extends
|
|
2357
|
+
class QuestionHint extends SurveyElementBase {
|
|
2330
2358
|
renderHint(hint, index) {
|
|
2331
2359
|
if (hint.alternatives.length > 0) {
|
|
2332
2360
|
return (_$1("span", { className: hint.className, key: index }, hint.alternatives.map((alternative, alternativeIndex) => this.renderHint(alternative, alternativeIndex))));
|
|
2333
2361
|
}
|
|
2334
2362
|
return (_$1("span", { className: hint.className, key: index }, hint.parts.map((part, partIndex) => (_$1("span", { key: partIndex, className: part.className }, part.text)))));
|
|
2335
2363
|
}
|
|
2336
|
-
|
|
2364
|
+
renderElement() {
|
|
2337
2365
|
const keyboardHintModel = this.props.question.getKeyboardHintModel();
|
|
2338
2366
|
if (!keyboardHintModel.hasItems())
|
|
2339
2367
|
return null;
|
|
@@ -2441,7 +2469,7 @@
|
|
|
2441
2469
|
const singleInput = singleSummary || (question.singleInputQuestion ? this.renderSingleInputQuestion(question, cssClasses) : undefined);
|
|
2442
2470
|
const questionContent = singleInput || this.wrapQuestionContent(this.renderQuestionContent());
|
|
2443
2471
|
return (_$1(k$2, null,
|
|
2444
|
-
_$1("div", { ref: this.rootRef, id: question.
|
|
2472
|
+
_$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) },
|
|
2445
2473
|
singleBreadcrumbs,
|
|
2446
2474
|
_$1("div", { className: question.getQuestionContainerCss() },
|
|
2447
2475
|
errorsAboveQuestion,
|
|
@@ -2504,7 +2532,6 @@
|
|
|
2504
2532
|
class SurveyElementErrors extends ReactSurveyElement {
|
|
2505
2533
|
constructor(props) {
|
|
2506
2534
|
super(props);
|
|
2507
|
-
this.state = this.getState();
|
|
2508
2535
|
}
|
|
2509
2536
|
get id() {
|
|
2510
2537
|
return this.props.element.renderedId + "_errors";
|
|
@@ -2515,14 +2542,9 @@
|
|
|
2515
2542
|
get creator() {
|
|
2516
2543
|
return this.props.creator;
|
|
2517
2544
|
}
|
|
2518
|
-
getState(prevState = null) {
|
|
2519
|
-
return !prevState ? { error: 0 } : { error: prevState.error + 1 };
|
|
2520
|
-
}
|
|
2521
2545
|
canRender() {
|
|
2522
2546
|
return !!this.element && this.element.hasVisibleErrors;
|
|
2523
2547
|
}
|
|
2524
|
-
componentWillUnmount() {
|
|
2525
|
-
}
|
|
2526
2548
|
renderElement() {
|
|
2527
2549
|
const errors = [];
|
|
2528
2550
|
for (let i = 0; i < this.element.renderedErrors.length; i++) {
|
|
@@ -2730,7 +2752,7 @@
|
|
|
2730
2752
|
if (this.panelBase)
|
|
2731
2753
|
this.panelBase.focusIn();
|
|
2732
2754
|
};
|
|
2733
|
-
return (_$1("div", { ref: this.rootRef, className: this.panelBase.getContainerCss(), onFocus: focusIn, id: this.panelBase.
|
|
2755
|
+
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) },
|
|
2734
2756
|
this.panel.showErrorsAbovePanel ? errors : null,
|
|
2735
2757
|
header,
|
|
2736
2758
|
this.panel.showErrorsAbovePanel ? null : errors,
|
|
@@ -3300,22 +3322,19 @@
|
|
|
3300
3322
|
}
|
|
3301
3323
|
}
|
|
3302
3324
|
class RatingItem extends RatingItemBase {
|
|
3303
|
-
|
|
3325
|
+
renderElement() {
|
|
3304
3326
|
var itemText = this.renderLocString(this.item.locText);
|
|
3305
3327
|
return (_$1("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
|
|
3306
3328
|
_$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 }),
|
|
3307
3329
|
_$1("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
|
|
3308
3330
|
}
|
|
3309
|
-
componentDidMount() {
|
|
3310
|
-
super.componentDidMount();
|
|
3311
|
-
}
|
|
3312
3331
|
}
|
|
3313
3332
|
ReactElementFactory.Instance.registerElement("sv-rating-item", (props) => {
|
|
3314
3333
|
return _$1(RatingItem, props);
|
|
3315
3334
|
});
|
|
3316
3335
|
|
|
3317
3336
|
class RatingItemStar extends RatingItemBase {
|
|
3318
|
-
|
|
3337
|
+
renderElement() {
|
|
3319
3338
|
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 },
|
|
3320
3339
|
_$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 }),
|
|
3321
3340
|
_$1(SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
|
|
@@ -3327,7 +3346,7 @@
|
|
|
3327
3346
|
});
|
|
3328
3347
|
|
|
3329
3348
|
class RatingItemSmiley extends RatingItemBase {
|
|
3330
|
-
|
|
3349
|
+
renderElement() {
|
|
3331
3350
|
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 },
|
|
3332
3351
|
_$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 }),
|
|
3333
3352
|
_$1(SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
|
|
@@ -3344,7 +3363,7 @@
|
|
|
3344
3363
|
getStateElement() {
|
|
3345
3364
|
return this.item;
|
|
3346
3365
|
}
|
|
3347
|
-
|
|
3366
|
+
renderElement() {
|
|
3348
3367
|
if (!this.item)
|
|
3349
3368
|
return null;
|
|
3350
3369
|
const item = this.props.item;
|
|
@@ -3413,7 +3432,7 @@
|
|
|
3413
3432
|
getStateElement() {
|
|
3414
3433
|
return this.props.model || this.question.dropdownListModelValue;
|
|
3415
3434
|
}
|
|
3416
|
-
|
|
3435
|
+
renderElement() {
|
|
3417
3436
|
return (_$1("div", { className: this.question.cssClasses.hint },
|
|
3418
3437
|
this.renderState.showHintPrefix ?
|
|
3419
3438
|
(_$1("div", { className: this.question.cssClasses.hintPrefix },
|
|
@@ -3937,12 +3956,15 @@
|
|
|
3937
3956
|
return this.questionBase;
|
|
3938
3957
|
}
|
|
3939
3958
|
componentDidMount() {
|
|
3959
|
+
super.componentDidMount();
|
|
3940
3960
|
this.reactOnStrChanged();
|
|
3941
3961
|
}
|
|
3942
3962
|
componentWillUnmount() {
|
|
3963
|
+
super.componentWillUnmount();
|
|
3943
3964
|
this.question.locHtml.onChanged = function () { };
|
|
3944
3965
|
}
|
|
3945
3966
|
componentDidUpdate(prevProps, prevState) {
|
|
3967
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
3946
3968
|
this.reactOnStrChanged();
|
|
3947
3969
|
}
|
|
3948
3970
|
reactOnStrChanged() {
|
|
@@ -4045,7 +4067,7 @@
|
|
|
4045
4067
|
get question() {
|
|
4046
4068
|
return (this.props.item && this.props.item.data.question) || this.props.data.question;
|
|
4047
4069
|
}
|
|
4048
|
-
|
|
4070
|
+
renderElement() {
|
|
4049
4071
|
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) },
|
|
4050
4072
|
!!this.props.item.iconName ? _$1(SvgIcon, { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto", className: this.props.item.cssClasses.itemIcon }) : null,
|
|
4051
4073
|
this.props.item.hasTitle ? _$1(SurveyLocStringViewer, { model: this.props.item.locTitle, textClass: this.props.item.getActionBarItemTitleCss() }) : null));
|
|
@@ -4064,7 +4086,7 @@
|
|
|
4064
4086
|
}
|
|
4065
4087
|
renderElement() {
|
|
4066
4088
|
const items = this.page.items.map((item, index) => { return ReactElementFactory.Instance.createElement("sv-file-item", { item, question: this.question, key: index }); });
|
|
4067
|
-
return (_$1("div", { className: this.page.css, id: this.page.
|
|
4089
|
+
return (_$1("div", { className: this.page.css, id: this.page.renderedId }, items));
|
|
4068
4090
|
}
|
|
4069
4091
|
}
|
|
4070
4092
|
|
|
@@ -4561,7 +4583,7 @@
|
|
|
4561
4583
|
}
|
|
4562
4584
|
return true;
|
|
4563
4585
|
}
|
|
4564
|
-
|
|
4586
|
+
renderElement() {
|
|
4565
4587
|
const model = this.model;
|
|
4566
4588
|
if (!model.visible)
|
|
4567
4589
|
return null;
|
|
@@ -4754,29 +4776,10 @@
|
|
|
4754
4776
|
super(props);
|
|
4755
4777
|
//Create rendered table in contructor and not on rendering
|
|
4756
4778
|
this.question.renderedTable;
|
|
4757
|
-
this.state = this.getState();
|
|
4758
4779
|
}
|
|
4759
4780
|
get question() {
|
|
4760
4781
|
return this.questionBase;
|
|
4761
4782
|
}
|
|
4762
|
-
getState(prevState = null) {
|
|
4763
|
-
return { rowCounter: !prevState ? 0 : prevState.rowCounter + 1 };
|
|
4764
|
-
}
|
|
4765
|
-
updateStateOnCallback() {
|
|
4766
|
-
if (this.isRendering)
|
|
4767
|
-
return;
|
|
4768
|
-
this.setState(this.getState(this.state));
|
|
4769
|
-
}
|
|
4770
|
-
componentDidMount() {
|
|
4771
|
-
super.componentDidMount();
|
|
4772
|
-
this.question.onRenderedTableResetCallback = () => {
|
|
4773
|
-
this.updateStateOnCallback();
|
|
4774
|
-
};
|
|
4775
|
-
}
|
|
4776
|
-
componentWillUnmount() {
|
|
4777
|
-
super.componentWillUnmount();
|
|
4778
|
-
this.question.onRenderedTableResetCallback = () => { };
|
|
4779
|
-
}
|
|
4780
4783
|
renderElement() {
|
|
4781
4784
|
return this.renderTableDiv();
|
|
4782
4785
|
}
|
|
@@ -5025,7 +5028,7 @@
|
|
|
5025
5028
|
const cssClasses = this.props.cssClasses;
|
|
5026
5029
|
const matrix = this.props.question;
|
|
5027
5030
|
const text = this.renderLocString(matrix.locNoRowsText);
|
|
5028
|
-
const textDiv = _$1("div", { className: cssClasses.noRowsText }, text);
|
|
5031
|
+
const textDiv = _$1("div", { id: matrix.noRowsTextId, className: cssClasses.noRowsText }, text);
|
|
5029
5032
|
const toolbar = matrix.getShowPlaceholderToolbar() ? ReactElementFactory.Instance.createElement("sv-action-bar", { model: matrix.toolbar }) : null;
|
|
5030
5033
|
return (_$1("div", { className: cssClasses.noRowsSection },
|
|
5031
5034
|
textDiv,
|
|
@@ -5041,6 +5044,9 @@
|
|
|
5041
5044
|
get question() {
|
|
5042
5045
|
return this.questionBase;
|
|
5043
5046
|
}
|
|
5047
|
+
getStateElement() {
|
|
5048
|
+
return this.question;
|
|
5049
|
+
}
|
|
5044
5050
|
componentDidMount() {
|
|
5045
5051
|
super.componentDidMount();
|
|
5046
5052
|
this.setState({ panelCounter: 0 });
|
|
@@ -5070,7 +5076,7 @@
|
|
|
5070
5076
|
const panels = [];
|
|
5071
5077
|
const cssClasses = this.question.cssClasses;
|
|
5072
5078
|
this.question.renderedPanels.forEach((panel, index) => {
|
|
5073
|
-
panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id,
|
|
5079
|
+
panels.push(_$1(SurveyQuestionPanelDynamicItem, { key: panel.id, panel: panel, question: this.question, index: index, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
|
|
5074
5080
|
});
|
|
5075
5081
|
const rangeTop = this.question.isRangeShowing && this.question.isProgressTopShowing
|
|
5076
5082
|
? this.renderRange()
|
|
@@ -5116,13 +5122,16 @@
|
|
|
5116
5122
|
return null;
|
|
5117
5123
|
}
|
|
5118
5124
|
}
|
|
5119
|
-
class SurveyQuestionPanelDynamicItem extends
|
|
5125
|
+
class SurveyQuestionPanelDynamicItem extends SurveyElementBase {
|
|
5120
5126
|
get question() {
|
|
5121
5127
|
return this.props.question;
|
|
5122
5128
|
}
|
|
5123
5129
|
get index() {
|
|
5124
5130
|
return this.props.index;
|
|
5125
5131
|
}
|
|
5132
|
+
get panel() {
|
|
5133
|
+
return this.props.panel;
|
|
5134
|
+
}
|
|
5126
5135
|
getSurvey() {
|
|
5127
5136
|
return !!this.question ? this.question.survey : null;
|
|
5128
5137
|
}
|
|
@@ -5130,14 +5139,13 @@
|
|
|
5130
5139
|
const survey = this.getSurvey();
|
|
5131
5140
|
return !!survey ? survey.getCss() : {};
|
|
5132
5141
|
}
|
|
5133
|
-
|
|
5134
|
-
const panel = super.render();
|
|
5142
|
+
renderElement() {
|
|
5135
5143
|
const removeButton = this.renderButton();
|
|
5136
5144
|
const separator = this.question.showSeparator(this.index) ?
|
|
5137
5145
|
(_$1("hr", { className: this.question.cssClasses.separator })) : null;
|
|
5138
5146
|
return (_$1(k$2, null,
|
|
5139
5147
|
_$1("div", { className: this.question.getPanelWrapperCss(this.panel) },
|
|
5140
|
-
panel,
|
|
5148
|
+
_$1(SurveyPanel, { element: this.panel, cssClasses: this.props.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.props.creator }),
|
|
5141
5149
|
removeButton),
|
|
5142
5150
|
separator));
|
|
5143
5151
|
}
|
|
@@ -5158,7 +5166,7 @@
|
|
|
5158
5166
|
const cssClasses = this.props.cssClasses;
|
|
5159
5167
|
const question = this.props.question;
|
|
5160
5168
|
return (_$1("div", { className: cssClasses.noEntriesPlaceholder },
|
|
5161
|
-
_$1("span",
|
|
5169
|
+
_$1("span", { id: question.noEntriesTextId }, this.renderLocString(question.locNoEntriesText)),
|
|
5162
5170
|
question.getShowPlaceholderToolbar() ? _$1(SurveyActionBar, { model: question.footerToolbar }) : null));
|
|
5163
5171
|
}
|
|
5164
5172
|
}
|
|
@@ -5186,7 +5194,7 @@
|
|
|
5186
5194
|
get progressBarAriaLabel() {
|
|
5187
5195
|
return this.model.progressBarAriaLabel;
|
|
5188
5196
|
}
|
|
5189
|
-
|
|
5197
|
+
renderElement() {
|
|
5190
5198
|
var progressStyle = {
|
|
5191
5199
|
width: this.progress + "%",
|
|
5192
5200
|
};
|
|
@@ -5222,7 +5230,7 @@
|
|
|
5222
5230
|
getStateElement() {
|
|
5223
5231
|
return this.model;
|
|
5224
5232
|
}
|
|
5225
|
-
|
|
5233
|
+
renderElement() {
|
|
5226
5234
|
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) },
|
|
5227
5235
|
_$1("div", { className: this.css.progressButtonsContainer, role: "presentation" },
|
|
5228
5236
|
_$1("div", { className: this.css.progressButtonsListContainer, role: "presentation" },
|
|
@@ -5270,7 +5278,7 @@
|
|
|
5270
5278
|
getStateElement() {
|
|
5271
5279
|
return this.item;
|
|
5272
5280
|
}
|
|
5273
|
-
|
|
5281
|
+
renderElement() {
|
|
5274
5282
|
if (!this.item)
|
|
5275
5283
|
return null;
|
|
5276
5284
|
const className = this.model.getItemClass(this.item);
|
|
@@ -5438,7 +5446,7 @@
|
|
|
5438
5446
|
const tocModel = this.props.model;
|
|
5439
5447
|
tocModel.updateStickyTOCSize(this.survey.rootElement);
|
|
5440
5448
|
}
|
|
5441
|
-
|
|
5449
|
+
renderElement() {
|
|
5442
5450
|
const tocModel = this.props.model;
|
|
5443
5451
|
let content;
|
|
5444
5452
|
if (tocModel.isMobile) {
|
|
@@ -5575,14 +5583,14 @@
|
|
|
5575
5583
|
return thumb;
|
|
5576
5584
|
}
|
|
5577
5585
|
getInput(i) {
|
|
5578
|
-
const { renderedMax: max, renderedMin: min, step, cssClasses, isDisabledAttr, renderedValue, handleOnChange, handlePointerDown, handlePointerUp, handleKeyDown, handleKeyUp, handleOnFocus, handleOnBlur,
|
|
5586
|
+
const { renderedMax: max, renderedMin: min, step, cssClasses, isDisabledAttr, renderedValue, handleOnChange, handlePointerDown, handlePointerUp, handleKeyDown, handleKeyUp, handleOnFocus, handleOnBlur, renderedId } = this.question;
|
|
5579
5587
|
const value = renderedValue[i];
|
|
5580
|
-
const input = _$1("input", { className: cssClasses.input, id:
|
|
5588
|
+
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 });
|
|
5581
5589
|
return input;
|
|
5582
5590
|
}
|
|
5583
5591
|
getRangeInput() {
|
|
5584
|
-
const { renderedMax: max, renderedMin: min, step, cssClasses, handleRangeOnChange, handleRangePointerDown, handleRangePointerUp,
|
|
5585
|
-
return _$1("input", { name: "range-input", id:
|
|
5592
|
+
const { renderedMax: max, renderedMin: min, step, cssClasses, handleRangeOnChange, handleRangePointerDown, handleRangePointerUp, renderedId } = this.question;
|
|
5593
|
+
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); } });
|
|
5586
5594
|
}
|
|
5587
5595
|
getLabels() {
|
|
5588
5596
|
const labels = [];
|
|
@@ -5913,8 +5921,8 @@
|
|
|
5913
5921
|
}
|
|
5914
5922
|
renderElement() {
|
|
5915
5923
|
return (_$1("div", { className: this.question.cssClasses.root, ref: (root) => (this.setControl(root)) },
|
|
5916
|
-
_$1("img", { className: this.question.cssClasses.bg, id: `${this.question.
|
|
5917
|
-
_$1("svg", { className: this.question.cssClasses.svg, id: `${this.question.
|
|
5924
|
+
_$1("img", { className: this.question.cssClasses.bg, id: `${this.question.renderedId}-bg`, src: this.question.imageLink, role: "presentation" }),
|
|
5925
|
+
_$1("svg", { className: this.question.cssClasses.svg, id: `${this.question.renderedId}-svg` })));
|
|
5918
5926
|
}
|
|
5919
5927
|
}
|
|
5920
5928
|
ReactQuestionFactory.Instance.registerQuestion("imagemap", (props) => {
|
|
@@ -5968,6 +5976,368 @@
|
|
|
5968
5976
|
return _$1(SurveyQuestionImage, props);
|
|
5969
5977
|
});
|
|
5970
5978
|
|
|
5979
|
+
// The Filter Control (#11890). Everything it shows is survey-core's: the chips, Clear All, Save and
|
|
5980
|
+
// Filters are actions the question owns (filter-toolbars.ts), drawn with sv-action-bar; a badge's
|
|
5981
|
+
// popup is a FilterFieldPopup; the Filters dialog is a FilterModal over a FilterConditionsEditor, and
|
|
5982
|
+
// New Preset and Edit Preset are FilterPresetDialogs; the classes are the theme's "filter"
|
|
5983
|
+
// entry. This file only lays the parts out and draws the few pieces that are not standard components:
|
|
5984
|
+
// a checkbox list entry, the popup's frame, the dialogs' content.
|
|
5985
|
+
// Create custom filter has nothing here: it is a survey, drawn by the "survey" component.
|
|
5986
|
+
// The editor survey is rendered as a page, not as a whole Survey (a Survey inside another survey's
|
|
5987
|
+
// question would put a <form> inside a <form>), so what the Survey component would answer for its
|
|
5988
|
+
// questions is answered here, from the editor survey itself.
|
|
5989
|
+
class FilterEditorCreator {
|
|
5990
|
+
constructor(survey) {
|
|
5991
|
+
this.survey = survey;
|
|
5992
|
+
}
|
|
5993
|
+
createQuestionElement(question) {
|
|
5994
|
+
return ReactQuestionFactory.Instance.createQuestion(question.isDefaultRendering() ? question.getTemplate() : question.getComponentName(), { question: question, isDisplayMode: question.isInputReadOnly, creator: this });
|
|
5995
|
+
}
|
|
5996
|
+
renderError(key, error, cssClasses, element) {
|
|
5997
|
+
return ReactElementFactory.Instance.createElement(this.survey.questionErrorComponent, { key: key, error, cssClasses, element });
|
|
5998
|
+
}
|
|
5999
|
+
questionTitleLocation() {
|
|
6000
|
+
return this.survey.questionTitleLocation;
|
|
6001
|
+
}
|
|
6002
|
+
questionErrorLocation() {
|
|
6003
|
+
return this.survey.questionErrorLocation;
|
|
6004
|
+
}
|
|
6005
|
+
}
|
|
6006
|
+
// The page of an editor survey: the Filters dialog's fields, a "condition" popup's, and a preset
|
|
6007
|
+
// dialog's form and fields.
|
|
6008
|
+
class FilterEditorPage extends SurveyElementBase {
|
|
6009
|
+
constructor() {
|
|
6010
|
+
super(...arguments);
|
|
6011
|
+
this.rootRef = b$1();
|
|
6012
|
+
}
|
|
6013
|
+
getCreator(survey) {
|
|
6014
|
+
if (this.creatorSurvey !== survey) {
|
|
6015
|
+
this.creator = new FilterEditorCreator(survey);
|
|
6016
|
+
this.creatorSurvey = survey;
|
|
6017
|
+
}
|
|
6018
|
+
return this.creator;
|
|
6019
|
+
}
|
|
6020
|
+
componentDidMount() {
|
|
6021
|
+
super.componentDidMount();
|
|
6022
|
+
this.updateRootElement();
|
|
6023
|
+
}
|
|
6024
|
+
componentDidUpdate(prevProps, prevState) {
|
|
6025
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
6026
|
+
this.updateRootElement();
|
|
6027
|
+
}
|
|
6028
|
+
componentWillUnmount() {
|
|
6029
|
+
super.componentWillUnmount();
|
|
6030
|
+
this.clearRootElement();
|
|
6031
|
+
}
|
|
6032
|
+
// The Survey component would set this; a page rendered on its own leaves it to its host. It is
|
|
6033
|
+
// cleared on unmount, unless something else set it in the meantime.
|
|
6034
|
+
updateRootElement() {
|
|
6035
|
+
const editor = this.props.editor;
|
|
6036
|
+
if (!!editor && !editor.isDisposed && !!this.rootRef.current) {
|
|
6037
|
+
if (this.rootSurvey !== editor.survey) {
|
|
6038
|
+
this.clearRootElement();
|
|
6039
|
+
}
|
|
6040
|
+
editor.survey.rootElement = this.rootRef.current;
|
|
6041
|
+
this.rootSurvey = editor.survey;
|
|
6042
|
+
this.rootElement = this.rootRef.current;
|
|
6043
|
+
}
|
|
6044
|
+
}
|
|
6045
|
+
clearRootElement() {
|
|
6046
|
+
const survey = this.rootSurvey;
|
|
6047
|
+
if (!!survey && !survey.isDisposed && survey.rootElement === this.rootElement) {
|
|
6048
|
+
survey.rootElement = undefined;
|
|
6049
|
+
}
|
|
6050
|
+
this.rootSurvey = undefined;
|
|
6051
|
+
this.rootElement = undefined;
|
|
6052
|
+
}
|
|
6053
|
+
renderElement() {
|
|
6054
|
+
const editor = this.props.editor;
|
|
6055
|
+
if (!editor || editor.isDisposed)
|
|
6056
|
+
return null;
|
|
6057
|
+
const survey = editor.survey;
|
|
6058
|
+
// No page while every field is hidden - Search in Filters found none, or a preset's text stands in
|
|
6059
|
+
// their place: a survey has no current page with nothing visible on it.
|
|
6060
|
+
const page = !!survey.currentPage ? _$1(SurveyPage, { survey: survey, page: survey.currentPage, css: survey.css, creator: this.getCreator(survey) }) : null;
|
|
6061
|
+
return _$1("div", { className: this.props.className, ref: this.rootRef }, page);
|
|
6062
|
+
}
|
|
6063
|
+
}
|
|
6064
|
+
// The Filters dialog's content: Search in Filters, the presets with Add New and Edit Selected, the text
|
|
6065
|
+
// of a preset that does not decompose with Edit..., "nothing found" and the fields; its footer is the
|
|
6066
|
+
// dialog's own. It watches the holder, so an emptied holder unmounts the content before survey-core
|
|
6067
|
+
// disposes the dialog's model: a holder never holds a disposed one.
|
|
6068
|
+
class SurveyFilterModal extends SurveyElementBase {
|
|
6069
|
+
get modal() {
|
|
6070
|
+
const holder = this.props.holder;
|
|
6071
|
+
return !!holder ? holder.modal : undefined;
|
|
6072
|
+
}
|
|
6073
|
+
getStateElements() {
|
|
6074
|
+
const holder = this.props.holder;
|
|
6075
|
+
const modal = this.modal;
|
|
6076
|
+
if (!modal)
|
|
6077
|
+
return !!holder ? [holder] : [];
|
|
6078
|
+
return [holder, modal, modal.presetsToolbar, modal.expressionToolbar];
|
|
6079
|
+
}
|
|
6080
|
+
renderSearch(modal) {
|
|
6081
|
+
const css = modal.cssClasses;
|
|
6082
|
+
const searchCss = modal.searchCss;
|
|
6083
|
+
return _$1("div", { className: css.modalSection },
|
|
6084
|
+
_$1("div", { className: searchCss.root },
|
|
6085
|
+
_$1(SvgIcon, { className: css.searchIcon, iconName: "icon-search-24x24", size: "auto" }),
|
|
6086
|
+
_$1("input", { type: "text", className: searchCss.control, value: modal.filterText, placeholder: modal.searchPlaceholder, "aria-label": modal.searchPlaceholder, onChange: (e) => { modal.filterText = e.target.value; } }),
|
|
6087
|
+
modal.showSearchClear ? _$1(SurveyActionBarItem, { item: modal.searchClearAction }) : null));
|
|
6088
|
+
}
|
|
6089
|
+
renderPresets(modal) {
|
|
6090
|
+
if (!modal.presetsToolbar.hasVisibleActions)
|
|
6091
|
+
return null;
|
|
6092
|
+
const css = modal.cssClasses;
|
|
6093
|
+
return _$1("div", { className: css.modalSection, role: "group", "aria-labelledby": modal.presetsTitleId },
|
|
6094
|
+
_$1("div", { className: css.modalSectionHeader },
|
|
6095
|
+
_$1("div", { className: css.modalSectionTitle, id: modal.presetsTitleId }, modal.presetsTitle)),
|
|
6096
|
+
_$1(SurveyActionBar, { model: modal.presetsToolbar }));
|
|
6097
|
+
}
|
|
6098
|
+
renderExpression(modal) {
|
|
6099
|
+
if (!modal.showExpression)
|
|
6100
|
+
return null;
|
|
6101
|
+
const css = modal.cssClasses;
|
|
6102
|
+
return _$1("div", { className: css.modalSection + " " + css.modalExpression },
|
|
6103
|
+
_$1("div", { className: css.modalSectionTitle }, modal.expressionTitle),
|
|
6104
|
+
_$1("div", { className: css.modalExpressionText }, modal.presetExpression),
|
|
6105
|
+
_$1(SurveyActionBar, { model: modal.expressionToolbar }));
|
|
6106
|
+
}
|
|
6107
|
+
renderNothingFound(modal) {
|
|
6108
|
+
if (!modal.isNothingFound)
|
|
6109
|
+
return null;
|
|
6110
|
+
const css = modal.cssClasses;
|
|
6111
|
+
return _$1("div", { className: css.modalNothingFound },
|
|
6112
|
+
_$1(SvgIcon, { className: css.modalNothingFoundIcon, iconName: "icon-search-24x24", size: "auto" }),
|
|
6113
|
+
_$1("div", null, modal.nothingFoundText));
|
|
6114
|
+
}
|
|
6115
|
+
renderElement() {
|
|
6116
|
+
const modal = this.modal;
|
|
6117
|
+
if (!modal)
|
|
6118
|
+
return null;
|
|
6119
|
+
const css = modal.cssClasses;
|
|
6120
|
+
return _$1("div", { className: css.modalContent },
|
|
6121
|
+
this.renderSearch(modal),
|
|
6122
|
+
this.renderPresets(modal),
|
|
6123
|
+
this.renderExpression(modal),
|
|
6124
|
+
this.renderNothingFound(modal),
|
|
6125
|
+
_$1(FilterEditorPage, { editor: modal.editor, className: modal.editorCss }));
|
|
6126
|
+
}
|
|
6127
|
+
}
|
|
6128
|
+
ReactElementFactory.Instance.registerElement(surveyCore.filterModalComponentName, (props) => { return _$1(SurveyFilterModal, props); });
|
|
6129
|
+
// New Preset and Edit Preset: the form - the name and the tagbox of Contains, or the text - and the
|
|
6130
|
+
// dialog's survey - the fields' editors in a frame and the AI description with its Create or Edit; the
|
|
6131
|
+
// footer is the dialog's own. A form made anew (Edit as Expression, an AI answer) is drawn anew, keyed
|
|
6132
|
+
// by its survey's uniqueId: element ids restart in every survey, so a page id would be the same for
|
|
6133
|
+
// each new form. The dialog's survey lives as long as the dialog, and its ids keep counting: it needs
|
|
6134
|
+
// no key.
|
|
6135
|
+
class SurveyFilterPresetDialog extends SurveyElementBase {
|
|
6136
|
+
get dialog() {
|
|
6137
|
+
const holder = this.props.holder;
|
|
6138
|
+
return !!holder ? holder.presetDialog : undefined;
|
|
6139
|
+
}
|
|
6140
|
+
getStateElements() {
|
|
6141
|
+
const holder = this.props.holder;
|
|
6142
|
+
const dialog = this.dialog;
|
|
6143
|
+
if (!dialog)
|
|
6144
|
+
return !!holder ? [holder] : [];
|
|
6145
|
+
return [holder, dialog];
|
|
6146
|
+
}
|
|
6147
|
+
renderElement() {
|
|
6148
|
+
const dialog = this.dialog;
|
|
6149
|
+
if (!dialog)
|
|
6150
|
+
return null;
|
|
6151
|
+
const form = dialog.form;
|
|
6152
|
+
// The page is empty with no field picked and no description (see hasSurveyContent).
|
|
6153
|
+
const hasFields = dialog.hasSurveyContent;
|
|
6154
|
+
return _$1("div", { className: dialog.contentCss },
|
|
6155
|
+
!!form ? _$1(FilterEditorPage, { key: form.uniqueId, editor: { survey: form, isDisposed: dialog.isDisposed }, className: dialog.formCss }) : null,
|
|
6156
|
+
hasFields ? _$1(FilterEditorPage, { editor: { survey: dialog.survey, isDisposed: dialog.isDisposed }, className: dialog.editorCss }) : null);
|
|
6157
|
+
}
|
|
6158
|
+
}
|
|
6159
|
+
ReactElementFactory.Instance.registerElement(surveyCore.filterPresetDialogComponentName, (props) => { return _$1(SurveyFilterPresetDialog, props); });
|
|
6160
|
+
// A badge's popup: the search box (a long list, or one a value can be typed into), a checkbox list's
|
|
6161
|
+
// title row with its link, the list or the operator and value, and Apply.
|
|
6162
|
+
class SurveyFilterFieldPopup extends SurveyElementBase {
|
|
6163
|
+
get popup() {
|
|
6164
|
+
const holder = this.props.holder;
|
|
6165
|
+
return !!holder ? holder.fieldPopup : undefined;
|
|
6166
|
+
}
|
|
6167
|
+
getStateElements() {
|
|
6168
|
+
const holder = this.props.holder;
|
|
6169
|
+
const popup = this.popup;
|
|
6170
|
+
if (!popup)
|
|
6171
|
+
return !!holder ? [holder] : [];
|
|
6172
|
+
const res = [holder, popup.headerToolbar, popup.footerToolbar];
|
|
6173
|
+
if (!!popup.list)
|
|
6174
|
+
res.push(popup.list);
|
|
6175
|
+
return res;
|
|
6176
|
+
}
|
|
6177
|
+
renderSearch(popup) {
|
|
6178
|
+
const list = popup.list;
|
|
6179
|
+
if (!list || !popup.showSearch)
|
|
6180
|
+
return null;
|
|
6181
|
+
const css = popup.cssClasses;
|
|
6182
|
+
return _$1("div", { className: css.popupSearch },
|
|
6183
|
+
_$1(SvgIcon, { className: css.popupSearchIcon, iconName: "icon-search-24x24", size: "auto" }),
|
|
6184
|
+
_$1("input", { type: "text", className: css.popupSearchInput, value: list.filterString || "", placeholder: list.filterStringPlaceholder, "aria-label": list.filterStringPlaceholder, onChange: (e) => { list.filterString = e.target.value; }, onKeyDown: (e) => { popup.onSearchKeyDown(e.nativeEvent); } }));
|
|
6185
|
+
}
|
|
6186
|
+
renderElement() {
|
|
6187
|
+
const popup = this.popup;
|
|
6188
|
+
if (!popup)
|
|
6189
|
+
return null;
|
|
6190
|
+
const css = popup.cssClasses;
|
|
6191
|
+
const body = !!popup.list ? _$1(List, { model: popup.list }) : _$1(FilterEditorPage, { editor: popup.editor, className: css.editor });
|
|
6192
|
+
const footer = popup.footerToolbar.hasActions
|
|
6193
|
+
? _$1("div", { className: css.popupFooter },
|
|
6194
|
+
_$1(SurveyActionBar, { model: popup.footerToolbar })) : null;
|
|
6195
|
+
const header = popup.showHeader ? _$1("div", { className: css.popupHeader },
|
|
6196
|
+
_$1("div", { className: css.popupTitle }, popup.title),
|
|
6197
|
+
_$1(SurveyActionBar, { model: popup.headerToolbar })) : null;
|
|
6198
|
+
return _$1("div", { className: css.popup },
|
|
6199
|
+
this.renderSearch(popup),
|
|
6200
|
+
header,
|
|
6201
|
+
_$1("div", { className: css.popupBody }, body),
|
|
6202
|
+
footer);
|
|
6203
|
+
}
|
|
6204
|
+
}
|
|
6205
|
+
ReactElementFactory.Instance.registerElement(surveyCore.filterFieldPopupComponentName, (props) => { return _$1(SurveyFilterFieldPopup, props); });
|
|
6206
|
+
// "Save as..."'s popup: the new preset's name and Save.
|
|
6207
|
+
class SurveyFilterSaveAsPopup extends SurveyElementBase {
|
|
6208
|
+
get popup() {
|
|
6209
|
+
const holder = this.props.holder;
|
|
6210
|
+
return !!holder ? holder.saveAsPopup : undefined;
|
|
6211
|
+
}
|
|
6212
|
+
getStateElements() {
|
|
6213
|
+
const holder = this.props.holder;
|
|
6214
|
+
const popup = this.popup;
|
|
6215
|
+
if (!popup)
|
|
6216
|
+
return !!holder ? [holder] : [];
|
|
6217
|
+
return [holder, popup.footerToolbar];
|
|
6218
|
+
}
|
|
6219
|
+
renderElement() {
|
|
6220
|
+
const popup = this.popup;
|
|
6221
|
+
if (!popup)
|
|
6222
|
+
return null;
|
|
6223
|
+
const css = popup.cssClasses;
|
|
6224
|
+
return _$1("div", { className: css.popup },
|
|
6225
|
+
_$1("div", { className: css.popupBody },
|
|
6226
|
+
_$1(FilterEditorPage, { editor: popup, className: css.editor })),
|
|
6227
|
+
_$1("div", { className: css.popupFooter },
|
|
6228
|
+
_$1(SurveyActionBar, { model: popup.footerToolbar })));
|
|
6229
|
+
}
|
|
6230
|
+
}
|
|
6231
|
+
ReactElementFactory.Instance.registerElement(surveyCore.filterSaveAsPopupComponentName, (props) => { return _$1(SurveyFilterSaveAsPopup, props); });
|
|
6232
|
+
// An entry of a checkbox list: drawn checked by the entry's active flag (FilterFieldPopup keeps it).
|
|
6233
|
+
// A value the respondent typed has no remove button: a button inside a list option is nested
|
|
6234
|
+
// interactive content, and unchecking the value is how it goes. The "Add" entry is its text alone.
|
|
6235
|
+
class SurveyFilterListItem extends SurveyElementBase {
|
|
6236
|
+
getStateElement() {
|
|
6237
|
+
return this.props.item;
|
|
6238
|
+
}
|
|
6239
|
+
renderElement() {
|
|
6240
|
+
const item = this.props.item;
|
|
6241
|
+
if (!item || !item.data || !item.data.popup)
|
|
6242
|
+
return null;
|
|
6243
|
+
const popup = item.data.popup;
|
|
6244
|
+
const css = popup.cssClasses;
|
|
6245
|
+
const text = _$1("span", { className: css.listItemText }, item.title);
|
|
6246
|
+
if (item.data.isAdd)
|
|
6247
|
+
return _$1("div", { className: css.listItem }, text);
|
|
6248
|
+
const check = _$1("span", { className: popup.getItemCheckCss(item), "aria-hidden": "true" },
|
|
6249
|
+
_$1("span", { className: css.listItemCheckDecorator },
|
|
6250
|
+
_$1(SvgIcon, { iconName: "icon-check-16x16", size: "auto", css: css.listItemCheckIcon })));
|
|
6251
|
+
return _$1("div", { className: css.listItem },
|
|
6252
|
+
check,
|
|
6253
|
+
text);
|
|
6254
|
+
}
|
|
6255
|
+
}
|
|
6256
|
+
ReactElementFactory.Instance.registerElement(surveyCore.filterListItemComponentName, (props) => { return _$1(SurveyFilterListItem, props); });
|
|
6257
|
+
// A chip (FilterChip): the standard action button (its trailing chevron is the item's markerIconName)
|
|
6258
|
+
// and, while the chip can be cleared, its cross - a button of its own, which the theme draws over the
|
|
6259
|
+
// chip's end. Its popup is drawn by the control, outside the chips row (see
|
|
6260
|
+
// QuestionFilterModel.popupChips); the chip only shows that the popup is open.
|
|
6261
|
+
class SurveyFilterChip extends SurveyActionBarItem {
|
|
6262
|
+
get chip() {
|
|
6263
|
+
return this.item;
|
|
6264
|
+
}
|
|
6265
|
+
componentDidMount() {
|
|
6266
|
+
super.componentDidMount();
|
|
6267
|
+
this.viewModel = new surveyCore.ActionDropdownViewModel(this.item);
|
|
6268
|
+
}
|
|
6269
|
+
componentWillUnmount() {
|
|
6270
|
+
super.componentWillUnmount();
|
|
6271
|
+
this.viewModel.dispose();
|
|
6272
|
+
}
|
|
6273
|
+
renderElement() {
|
|
6274
|
+
const chip = this.chip;
|
|
6275
|
+
const cross = chip.isClearable ? _$1(SurveyActionBarItem, { item: chip.clearAction }) : null;
|
|
6276
|
+
return _$1("div", { className: chip.boxCss },
|
|
6277
|
+
this.renderInnerButton(),
|
|
6278
|
+
cross);
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6281
|
+
ReactElementFactory.Instance.registerElement(surveyCore.filterChipComponentName, (props) => { return _$1(SurveyFilterChip, props); });
|
|
6282
|
+
class SurveyQuestionFilter extends SurveyQuestionElementBase {
|
|
6283
|
+
constructor() {
|
|
6284
|
+
super(...arguments);
|
|
6285
|
+
this.chipsRef = b$1();
|
|
6286
|
+
}
|
|
6287
|
+
get question() {
|
|
6288
|
+
return this.questionBase;
|
|
6289
|
+
}
|
|
6290
|
+
getStateElements() {
|
|
6291
|
+
const q = this.question;
|
|
6292
|
+
if (!q)
|
|
6293
|
+
return [];
|
|
6294
|
+
// A disposed question has released its layout, and asking for it would build a new one.
|
|
6295
|
+
return q.isDisposed ? [q] : [q, q.chipsLayout];
|
|
6296
|
+
}
|
|
6297
|
+
// FilterChipsLayout cuts the chips row to one row, and measures the row again itself whenever it
|
|
6298
|
+
// changes: the renderer only attaches it and detaches it.
|
|
6299
|
+
componentDidMount() {
|
|
6300
|
+
super.componentDidMount();
|
|
6301
|
+
const el = this.chipsRef.current;
|
|
6302
|
+
if (!!el && !!this.question && !this.question.isDisposed) {
|
|
6303
|
+
this.question.chipsLayout.attach(el);
|
|
6304
|
+
}
|
|
6305
|
+
}
|
|
6306
|
+
componentWillUnmount() {
|
|
6307
|
+
super.componentWillUnmount();
|
|
6308
|
+
if (!!this.question && !this.question.isDisposed) {
|
|
6309
|
+
this.question.chipsLayout.detach();
|
|
6310
|
+
}
|
|
6311
|
+
}
|
|
6312
|
+
renderSearch() {
|
|
6313
|
+
const q = this.question;
|
|
6314
|
+
if (!q.showSearch)
|
|
6315
|
+
return null;
|
|
6316
|
+
const css = q.cssClasses;
|
|
6317
|
+
const searchCss = q.searchCss;
|
|
6318
|
+
return _$1("div", { className: css.searchRow },
|
|
6319
|
+
_$1("div", { className: q.searchRootCss },
|
|
6320
|
+
_$1(SvgIcon, { className: css.searchIcon, iconName: "icon-search-24x24", size: "auto" }),
|
|
6321
|
+
_$1("input", { type: "text", className: searchCss.control, value: q.searchString, placeholder: q.searchPlaceholder, "aria-label": q.searchLabel, disabled: q.isSearchDisabled, onChange: (e) => { q.searchString = e.target.value; } }),
|
|
6322
|
+
q.showSearchClear ? _$1(SurveyActionBarItem, { item: q.searchClearAction }) : null),
|
|
6323
|
+
_$1(SurveyActionBar, { model: q.searchToolbar }));
|
|
6324
|
+
}
|
|
6325
|
+
// The chips' popups are drawn outside the chips row: on a phone the row scrolls sideways, and iOS
|
|
6326
|
+
// Safari keeps a fixed popup inside such a row.
|
|
6327
|
+
renderElement() {
|
|
6328
|
+
const q = this.question;
|
|
6329
|
+
const css = q.cssClasses;
|
|
6330
|
+
return _$1("div", { className: q.getQuestionRootCss() },
|
|
6331
|
+
this.renderSearch(),
|
|
6332
|
+
_$1("div", { className: css.chipsRow },
|
|
6333
|
+
_$1("div", { className: q.chipsCss, ref: this.chipsRef },
|
|
6334
|
+
_$1(SurveyActionBar, { model: q.chipsToolbar })),
|
|
6335
|
+
_$1(SurveyActionBar, { model: q.clearToolbar })),
|
|
6336
|
+
_$1("div", { className: css.popups }, q.popupChips.map((chip) => _$1(Popup, { key: chip.id, model: chip.popupModel }))));
|
|
6337
|
+
}
|
|
6338
|
+
}
|
|
6339
|
+
ReactQuestionFactory.Instance.registerQuestion("filter", (props) => { return _$1(SurveyQuestionFilter, props); });
|
|
6340
|
+
|
|
5971
6341
|
class SurveyQuestionSignaturePad extends SurveyQuestionElementBase {
|
|
5972
6342
|
constructor(props) {
|
|
5973
6343
|
super(props);
|
|
@@ -6148,7 +6518,7 @@
|
|
|
6148
6518
|
getStateElement() {
|
|
6149
6519
|
return this.item;
|
|
6150
6520
|
}
|
|
6151
|
-
|
|
6521
|
+
renderElement() {
|
|
6152
6522
|
if (!this.item)
|
|
6153
6523
|
return null;
|
|
6154
6524
|
const text = this.renderLocString(this.item.locTitle, undefined, "locString");
|
|
@@ -6176,7 +6546,7 @@
|
|
|
6176
6546
|
getStateElement() {
|
|
6177
6547
|
return this.item;
|
|
6178
6548
|
}
|
|
6179
|
-
|
|
6549
|
+
renderElement() {
|
|
6180
6550
|
var _a;
|
|
6181
6551
|
if (!this.item)
|
|
6182
6552
|
return null;
|
|
@@ -6201,6 +6571,7 @@
|
|
|
6201
6571
|
_$1(Popup, { model: this.item.popupModel })));
|
|
6202
6572
|
}
|
|
6203
6573
|
componentDidMount() {
|
|
6574
|
+
super.componentDidMount();
|
|
6204
6575
|
this.viewModel = new surveyCore.ActionDropdownViewModel(this.item);
|
|
6205
6576
|
}
|
|
6206
6577
|
componentWillUnmount() {
|
|
@@ -6228,14 +6599,29 @@
|
|
|
6228
6599
|
return _$1(SurveySortBarLevel, props);
|
|
6229
6600
|
});
|
|
6230
6601
|
|
|
6231
|
-
class LogoImage extends
|
|
6602
|
+
class LogoImage extends SurveyElementBase {
|
|
6232
6603
|
constructor(props) {
|
|
6233
6604
|
super(props);
|
|
6605
|
+
this.reactOnStrChanged = () => {
|
|
6606
|
+
this.setState({ locLogoLinkchanged: !!this.state && this.state.locLogoLink ? this.state.locLogoLink + 1 : 1 });
|
|
6607
|
+
};
|
|
6234
6608
|
}
|
|
6235
6609
|
get survey() {
|
|
6236
6610
|
return this.props.data;
|
|
6237
6611
|
}
|
|
6238
|
-
|
|
6612
|
+
componentDidMount() {
|
|
6613
|
+
super.componentDidMount();
|
|
6614
|
+
this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
6615
|
+
}
|
|
6616
|
+
componentDidUpdate(prevProps, prevState) {
|
|
6617
|
+
super.componentDidUpdate(prevProps, prevState);
|
|
6618
|
+
this.survey.locLogo.onStringChanged.add(this.reactOnStrChanged);
|
|
6619
|
+
}
|
|
6620
|
+
componentWillUnmount() {
|
|
6621
|
+
super.componentWillUnmount();
|
|
6622
|
+
this.survey.locLogo.onStringChanged.remove(this.reactOnStrChanged);
|
|
6623
|
+
}
|
|
6624
|
+
renderElement() {
|
|
6239
6625
|
const content = [];
|
|
6240
6626
|
content.push(_$1("div", { key: "logo-image", className: this.survey.logoClassNames },
|
|
6241
6627
|
_$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 } })));
|
|
@@ -6340,7 +6726,7 @@
|
|
|
6340
6726
|
class Skeleton extends x$2 {
|
|
6341
6727
|
render() {
|
|
6342
6728
|
var _a, _b;
|
|
6343
|
-
return (_$1("div", { className: "sv-skeleton-element", id: (_a = this.props.element) === null || _a === void 0 ? void 0 : _a.
|
|
6729
|
+
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 } }));
|
|
6344
6730
|
}
|
|
6345
6731
|
}
|
|
6346
6732
|
ReactElementFactory.Instance.registerElement("sv-skeleton", (props) => {
|
|
@@ -6377,7 +6763,7 @@
|
|
|
6377
6763
|
return _$1(CharacterCounterComponent, props);
|
|
6378
6764
|
});
|
|
6379
6765
|
|
|
6380
|
-
class HeaderMobile extends
|
|
6766
|
+
class HeaderMobile extends SurveyElementBase {
|
|
6381
6767
|
get model() {
|
|
6382
6768
|
return this.props.model;
|
|
6383
6769
|
}
|
|
@@ -6388,7 +6774,7 @@
|
|
|
6388
6774
|
data: componentData,
|
|
6389
6775
|
});
|
|
6390
6776
|
}
|
|
6391
|
-
|
|
6777
|
+
renderElement() {
|
|
6392
6778
|
return (_$1("div", { className: "sv-header--mobile" },
|
|
6393
6779
|
this.model.survey.hasLogo ? (_$1("div", { className: "sv-header__logo" }, this.renderLogoImage())) : null,
|
|
6394
6780
|
this.model.survey.hasTitle ? (_$1("div", { className: "sv-header__title", style: { maxWidth: this.model.renderedTextAreaWidth } },
|
|
@@ -6397,7 +6783,7 @@
|
|
|
6397
6783
|
_$1("div", { className: this.model.survey.css.description }, SurveyElementBase.renderLocString(this.model.survey.locDescription)))) : null));
|
|
6398
6784
|
}
|
|
6399
6785
|
}
|
|
6400
|
-
class HeaderCell extends
|
|
6786
|
+
class HeaderCell extends SurveyElementBase {
|
|
6401
6787
|
get model() {
|
|
6402
6788
|
return this.props.model;
|
|
6403
6789
|
}
|
|
@@ -6408,7 +6794,7 @@
|
|
|
6408
6794
|
data: componentData,
|
|
6409
6795
|
});
|
|
6410
6796
|
}
|
|
6411
|
-
|
|
6797
|
+
renderElement() {
|
|
6412
6798
|
return (_$1("div", { className: this.model.css, style: this.model.style },
|
|
6413
6799
|
_$1("div", { className: "sv-header__cell-content", style: this.model.contentStyle },
|
|
6414
6800
|
this.model.showLogo ? (_$1("div", { className: "sv-header__logo" }, this.renderLogoImage())) : null,
|
|
@@ -6441,6 +6827,9 @@
|
|
|
6441
6827
|
this.model.backgroundImage ? _$1("div", { style: this.model.backgroundImageStyle, className: this.model.backgroundImageClasses }) : null,
|
|
6442
6828
|
headerContent));
|
|
6443
6829
|
}
|
|
6830
|
+
forceHiddenDependencies() {
|
|
6831
|
+
this.model.width;
|
|
6832
|
+
}
|
|
6444
6833
|
componentDidMount() {
|
|
6445
6834
|
super.componentDidMount();
|
|
6446
6835
|
this.model.processResponsiveness();
|
|
@@ -6549,7 +6938,7 @@
|
|
|
6549
6938
|
}
|
|
6550
6939
|
};
|
|
6551
6940
|
const preact = React;
|
|
6552
|
-
surveyCore.checkLibraryVersion(`${"3.2.
|
|
6941
|
+
surveyCore.checkLibraryVersion(`${"3.2.6"}`, "survey-js-ui");
|
|
6553
6942
|
|
|
6554
6943
|
Object.defineProperty(exports, 'Model', {
|
|
6555
6944
|
enumerable: true,
|
|
@@ -6617,6 +7006,12 @@
|
|
|
6617
7006
|
exports.SurveyFileChooseButton = SurveyFileChooseButton;
|
|
6618
7007
|
exports.SurveyFileItem = SurveyFileItem;
|
|
6619
7008
|
exports.SurveyFilePreview = SurveyFilePreview;
|
|
7009
|
+
exports.SurveyFilterChip = SurveyFilterChip;
|
|
7010
|
+
exports.SurveyFilterFieldPopup = SurveyFilterFieldPopup;
|
|
7011
|
+
exports.SurveyFilterListItem = SurveyFilterListItem;
|
|
7012
|
+
exports.SurveyFilterModal = SurveyFilterModal;
|
|
7013
|
+
exports.SurveyFilterPresetDialog = SurveyFilterPresetDialog;
|
|
7014
|
+
exports.SurveyFilterSaveAsPopup = SurveyFilterSaveAsPopup;
|
|
6620
7015
|
exports.SurveyFlowPanel = SurveyFlowPanel;
|
|
6621
7016
|
exports.SurveyHeader = SurveyHeader;
|
|
6622
7017
|
exports.SurveyLocStringEditor = SurveyLocStringEditor;
|
|
@@ -6649,6 +7044,7 @@
|
|
|
6649
7044
|
exports.SurveyQuestionEmpty = SurveyQuestionEmpty;
|
|
6650
7045
|
exports.SurveyQuestionExpression = SurveyQuestionExpression;
|
|
6651
7046
|
exports.SurveyQuestionFile = SurveyQuestionFile;
|
|
7047
|
+
exports.SurveyQuestionFilter = SurveyQuestionFilter;
|
|
6652
7048
|
exports.SurveyQuestionHtml = SurveyQuestionHtml;
|
|
6653
7049
|
exports.SurveyQuestionImage = SurveyQuestionImage;
|
|
6654
7050
|
exports.SurveyQuestionImageMap = SurveyQuestionImageMap;
|