survey-creator-react 1.9.4-beta.1 → 1.9.5-beta.1
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/package.json +1 -1
- package/survey-creator-react.css +62 -67
- package/survey-creator-react.d.ts +59 -57
- package/survey-creator-react.js +1049 -135
- package/survey-creator-react.min.css +60 -65
- package/survey-creator-react.min.js +29 -25
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator React v1.9.
|
|
3
|
-
* (c) 2015-
|
|
2
|
+
* SurveyJS Creator React v1.9.5-beta.1
|
|
3
|
+
* (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
6
6
|
*/
|
|
7
7
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("survey-react-ui"),require("survey-core"),require("react-dom")):"function"==typeof define&&define.amd?define("SurveyCreator",["react","survey-react-ui","survey-core","react-dom"],t):"object"==typeof exports?exports.SurveyCreator=t(require("react"),require("survey-react-ui"),require("survey-core"),require("react-dom")):e.SurveyCreator=t(e.React,e.SurveyReact,e.Survey,e.ReactDOM)}(this,(function(e,t,i,o){return function(e){var t={};function i(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=6)}([function(t,i){t.exports=e},function(e,i){e.exports=t},function(e,t,i){
|
|
8
8
|
/*!
|
|
9
|
-
* SurveyJS Creator v1.9.
|
|
10
|
-
* (c) 2015-
|
|
9
|
+
* SurveyJS Creator v1.9.5-beta.1
|
|
10
|
+
* (c) 2015-2022 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
11
11
|
* Github: https://github.com/surveyjs/survey-creator
|
|
12
12
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
13
13
|
*/
|
|
@@ -21,7 +21,7 @@ Papa Parse
|
|
|
21
21
|
v5.3.1
|
|
22
22
|
https://github.com/mholt/PapaParse
|
|
23
23
|
License: MIT
|
|
24
|
-
*/r=[],void 0===(n="function"==typeof(o=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},i=!t.document&&!!t.postMessage,o=i&&/blob:/i.test((t.location||{}).protocol),r={},n=0,a={parse:function(i,o){var s=(o=o||{}).dynamicTyping||!1;if(w(s)&&(o.dynamicTypingFunction=s,s={}),o.dynamicTyping=s,o.transform=!!w(o.transform)&&o.transform,o.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var i,o,s=(i=t.URL||t.webkitURL||null,o=e.toString(),a.BLOB_URL||(a.BLOB_URL=i.createObjectURL(new Blob(["(",o,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=v,l.id=n++,r[l.id]=l}();return l.userStep=o.step,l.userChunk=o.chunk,l.userComplete=o.complete,l.userError=o.error,o.step=w(o.step),o.chunk=w(o.chunk),o.complete=w(o.complete),o.error=w(o.error),delete o.worker,void l.postMessage({input:i,config:o,workerId:l.id})}var m=null;return a.NODE_STREAM_INPUT,"string"==typeof i?m=o.download?new u(o):new d(o):!0===i.readable&&w(i.read)&&w(i.on)?m=new p(o):(t.File&&i instanceof File||i instanceof Object)&&(m=new c(o)),m.stream(i)},unparse:function(e,t){var i=!1,o=!0,r=",",n="\r\n",s='"',l=s+s,u=!1,c=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(r=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(n=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(o=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),"boolean"==typeof t.escapeFormulae&&(d=t.escapeFormulae)}}();var p=new RegExp(g(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return m(null,e,u);if("object"==typeof e[0])return m(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),m(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function m(e,t,i){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(s&&o){for(var u=0;u<e.length;u++)0<u&&(a+=r),a+=h(e[u],u);0<t.length&&(a+=n)}for(var c=0;c<t.length;c++){var d=s?e.length:t[c].length,p=!1,m=s?0===Object.keys(t[c]).length:0===t[c].length;if(i&&!s&&(p="greedy"===i?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===i&&s){for(var g=[],v=0;v<d;v++){var y=l?e[v]:v;g.push(t[c][y])}p=""===g.join("").trim()}if(!p){for(var f=0;f<d;f++){0<f&&!m&&(a+=r);var b=s&&l?e[f]:f;a+=h(t[c][b],f)}c<t.length-1&&(!i||0<d&&!m)&&(a+=n)}}return a}function h(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===d&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var o=e.toString().replace(p,l);return"boolean"==typeof i&&i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1}(o,a.BAD_DELIMITERS)||-1<o.indexOf(r)||" "===o.charAt(0)||" "===o.charAt(o.length-1)?s+o+s:o}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!i&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=h,a.ParserHandle=m,a.NetworkStreamer=u,a.FileStreamer=c,a.StringStreamer=d,a.ReadableStreamStreamer=p,t.jQuery){var s=t.jQuery;s.fn.parse=function(e){var i=e.config||{},o=[];return this.each((function(e){if("INPUT"!==s(this).prop("tagName").toUpperCase()||"file"!==s(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var r=0;r<this.files.length;r++)o.push({file:this.files[r],inputElem:this,instanceConfig:s.extend({},i)})})),r(),this;function r(){if(0!==o.length){var t,i,r,l=o[0];if(w(e.before)){var u=e.before(l.file,l.inputElem);if("object"==typeof u){if("abort"===u.action)return t=l.file,i=l.inputElem,r=u.reason,void(w(e.error)&&e.error({name:"AbortError"},t,i,r));if("skip"===u.action)return void n();"object"==typeof u.config&&(l.instanceConfig=s.extend(l.instanceConfig,u.config))}else if("skip"===u)return void n()}var c=l.instanceConfig.complete;l.instanceConfig.complete=function(e){w(c)&&c(e,l.file,l.inputElem),n()},a.parse(l.file,l.instanceConfig)}else w(e.complete)&&e.complete()}function n(){o.splice(0,1),r()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new m(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,i){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1,this._halted=!1;var n=this._partialLine+e;this._partialLine="";var s=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=s.meta.cursor;this._finished||(this._partialLine=n.substring(l-this._baseIndex),this._baseIndex=l),s&&s.data&&(this._rowCount+=s.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)t.postMessage({results:s,workerId:a.WORKER_ID,finished:u});else if(w(this._config.chunk)&&!i){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!u||!w(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):o&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),i||(t.onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var o in e)t.setRequestHeader(o,e[o])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+r)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}i&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var i=t.statusText||e;this._sendError(new Error(i))}}function c(e){var t,i;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var o="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,o?((t=new FileReader).onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);e=i.call(e,this._start,r)}var n=t.readAsText(e,this._config.encoding);o||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,i=this._config.chunkSize;return i?(e=t.substring(0,i),t=t.substring(i)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function p(e){l.call(this,e=e||{});var t=[],i=!0,o=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=x((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=x((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=x((function(){this._streamCleanUp(),o=!0,this._streamData("")}),this),this._streamCleanUp=x((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function m(e){var t,i,o,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,u=this,c=0,d=0,p=!1,m=!1,v=[],y={data:[],errors:[],meta:{}};if(w(e.step)){var f=e.step;e.step=function(t){if(y=t,k())T();else{if(T(),0===y.data.length)return;c+=t.data.length,e.preview&&c>e.preview?i.abort():(y.data=y.data[0],f(y,u))}}}function x(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function T(){if(y&&o&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines)for(var t=0;t<y.data.length;t++)x(y.data[t])&&y.data.splice(t--,1);return k()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;k()&&t<y.data.length;t++)y.data[t].forEach(i);y.data.splice(0,1)}else y.data.forEach(i);function i(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),v.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,i){var o,r=e.header?{}:[];for(o=0;o<t.length;o++){var n=o,a=t[o];e.header&&(n=o>=v.length?"__parsed_extra":v[o]),e.transform&&(a=e.transform(a,n)),a=S(n,a),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(a)):r[n]=a}return e.header&&(o>v.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+o,d+i):o<v.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+o,d+i)),r}var i=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),i=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=v),d+=i,y}()}function k(){return e.header&&0===v.length}function S(t,i){return o=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[o]&&(e.dynamicTyping[o]=e.dynamicTypingFunction(o)),!0===(e.dynamicTyping[o]||e.dynamicTyping)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return!0}return!1}(i)?parseFloat(i):l.test(i)?new Date(i):""===i?null:i):i;var o}function P(e,t,i,o){var r={type:e,code:t,message:i};void 0!==o&&(r.row=o),y.errors.push(r)}this.parse=function(r,n,s){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(g(t)+"([^]*?)"+g(t),"gm"),o=(e=e.replace(i,"")).split("\r"),r=e.split("\n"),n=1<r.length&&r[0].length<o[0].length;if(1===o.length||n)return"\n";for(var a=0,s=0;s<o.length;s++)"\n"===o[s][0]&&a++;return a>=o.length/2?"\r\n":"\r"}(r,l)),o=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(r),y.meta.delimiter=e.delimiter);else{var u=function(t,i,o,r,n){var s,l,u,c;n=n||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var d=0;d<n.length;d++){var p=n[d],m=0,g=0,v=0;u=void 0;for(var y=new h({comments:r,delimiter:p,newline:i,preview:10}).parse(t),f=0;f<y.data.length;f++)if(o&&x(y.data[f]))v++;else{var b=y.data[f].length;g+=b,void 0!==u?0<b&&(m+=Math.abs(b-u),u=b):u=b}0<y.data.length&&(g/=y.data.length-v),(void 0===l||m<=l)&&(void 0===c||c<g)&&1.99<g&&(l=m,s=p,c=g)}return{successful:!!(e.delimiter=s),bestDelimiter:s}}(r,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(o=!0,e.delimiter=a.DefaultDelimiter),y.meta.delimiter=e.delimiter}var c=b(e);return e.preview&&e.header&&c.preview++,t=r,i=new h(c),y=i.parse(t,n,s),T(),p?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return p},this.pause=function(){p=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){u.streamer._halted?(p=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return m},this.abort=function(){m=!0,i.abort(),y.meta.aborted=!0,w(e.complete)&&e.complete(y),t=""}}function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function h(e){var t,i=(e=e||{}).delimiter,o=e.newline,r=e.comments,n=e.step,s=e.preview,l=e.fastMode,u=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof i||-1<a.BAD_DELIMITERS.indexOf(i))&&(i=","),r===i)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<a.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==o&&"\r"!==o&&"\r\n"!==o&&(o="\n");var c=0,d=!1;this.parse=function(e,a,p){if("string"!=typeof e)throw new Error("Input must be a string");var m=e.length,h=i.length,v=o.length,y=r.length,f=w(n),b=[],x=[],T=[],k=c=0;if(!e)return M();if(l||!1!==l&&-1===e.indexOf(t)){for(var S=e.split(o),P=0;P<S.length;P++){if(T=S[P],c+=T.length,P!==S.length-1)c+=o.length;else if(p)return M();if(!r||T.substring(0,y)!==r){if(f){if(b=[],V(T.split(i)),q(),d)return M()}else V(T.split(i));if(s&&s<=P)return b=b.slice(0,s),M(!0)}}return M()}for(var E=e.indexOf(i,c),C=e.indexOf(o,c),N=new RegExp(g(u)+g(t),"g"),O=e.indexOf(t,c);;)if(e[c]!==t)if(r&&0===T.length&&e.substring(c,c+y)===r){if(-1===C)return M();c=C+v,C=e.indexOf(o,c),E=e.indexOf(i,c)}else if(-1!==E&&(E<C||-1===C))T.push(e.substring(c,E)),c=E+h,E=e.indexOf(i,c);else{if(-1===C)break;if(T.push(e.substring(c,C)),z(C+v),f&&(q(),d))return M();if(s&&b.length>=s)return M(!0)}else for(O=c,c++;;){if(-1===(O=e.indexOf(t,O+1)))return p||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:c}),I();if(O===m-1)return I(e.substring(c,O).replace(N,t));if(t!==u||e[O+1]!==u){if(t===u||0===O||e[O-1]!==u){-1!==E&&E<O+1&&(E=e.indexOf(i,O+1)),-1!==C&&C<O+1&&(C=e.indexOf(o,O+1));var _=j(-1===C?E:Math.min(E,C));if(e[O+1+_]===i){T.push(e.substring(c,O).replace(N,t)),e[c=O+1+_+h]!==t&&(O=e.indexOf(t,c)),E=e.indexOf(i,c),C=e.indexOf(o,c);break}var A=j(C);if(e.substring(O+1+A,O+1+A+v)===o){if(T.push(e.substring(c,O).replace(N,t)),z(O+1+A+v),E=e.indexOf(i,c),O=e.indexOf(t,c),f&&(q(),d))return M();if(s&&b.length>=s)return M(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:c}),O++}}else O++}return I();function V(e){b.push(e),k=c}function j(t){var i=0;if(-1!==t){var o=e.substring(O+1,t);o&&""===o.trim()&&(i=o.length)}return i}function I(t){return p||(void 0===t&&(t=e.substring(c)),T.push(t),c=m,V(T),f&&q()),M()}function z(t){c=t,V(T),T=[],C=e.indexOf(o,c)}function M(e){return{data:b,errors:x,meta:{delimiter:i,linebreak:o,aborted:d,truncated:!!e,cursor:k+(a||0)}}}function q(){n(M()),b=[],x=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return c}}function v(e){var t=e.data,i=r[t.workerId],o=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){o=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:f,resume:f};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!o);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!o&&y(t.workerId,t.results)}function y(e,t){var i=r[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete r[e]}function f(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=b(e[i]);return t}function x(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return o&&(t.onmessage=function(e){var i=e.data;if(void 0===a.WORKER_ID&&i&&(a.WORKER_ID=i.workerId),"string"==typeof i.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(i.input,i.config),finished:!0});else if(t.File&&i.input instanceof File||i.input instanceof Object){var o=a.parse(i.input,i.config);o&&t.postMessage({workerId:a.WORKER_ID,results:o,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(c.prototype=Object.create(l.prototype)).constructor=c,(d.prototype=Object.create(d.prototype)).constructor=d,(p.prototype=Object.create(l.prototype)).constructor=p,a})?o.apply(t,r):o)||(e.exports=n)},"./src/components/action-container-view-model.ts":
|
|
24
|
+
*/r=[],void 0===(n="function"==typeof(o=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},i=!t.document&&!!t.postMessage,o=i&&/blob:/i.test((t.location||{}).protocol),r={},n=0,a={parse:function(i,o){var s=(o=o||{}).dynamicTyping||!1;if(w(s)&&(o.dynamicTypingFunction=s,s={}),o.dynamicTyping=s,o.transform=!!w(o.transform)&&o.transform,o.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var i,o,s=(i=t.URL||t.webkitURL||null,o=e.toString(),a.BLOB_URL||(a.BLOB_URL=i.createObjectURL(new Blob(["(",o,")();"],{type:"text/javascript"})))),l=new t.Worker(s);return l.onmessage=v,l.id=n++,r[l.id]=l}();return l.userStep=o.step,l.userChunk=o.chunk,l.userComplete=o.complete,l.userError=o.error,o.step=w(o.step),o.chunk=w(o.chunk),o.complete=w(o.complete),o.error=w(o.error),delete o.worker,void l.postMessage({input:i,config:o,workerId:l.id})}var m=null;return a.NODE_STREAM_INPUT,"string"==typeof i?m=o.download?new u(o):new d(o):!0===i.readable&&w(i.read)&&w(i.on)?m=new p(o):(t.File&&i instanceof File||i instanceof Object)&&(m=new c(o)),m.stream(i)},unparse:function(e,t){var i=!1,o=!0,r=",",n="\r\n",s='"',l=s+s,u=!1,c=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(r=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(n=t.newline),"string"==typeof t.quoteChar&&(s=t.quoteChar),"boolean"==typeof t.header&&(o=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+s),"boolean"==typeof t.escapeFormulae&&(d=t.escapeFormulae)}}();var p=new RegExp(g(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return m(null,e,u);if("object"==typeof e[0])return m(c||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),m(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function m(e,t,i){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(s&&o){for(var u=0;u<e.length;u++)0<u&&(a+=r),a+=h(e[u],u);0<t.length&&(a+=n)}for(var c=0;c<t.length;c++){var d=s?e.length:t[c].length,p=!1,m=s?0===Object.keys(t[c]).length:0===t[c].length;if(i&&!s&&(p="greedy"===i?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===i&&s){for(var g=[],v=0;v<d;v++){var y=l?e[v]:v;g.push(t[c][y])}p=""===g.join("").trim()}if(!p){for(var f=0;f<d;f++){0<f&&!m&&(a+=r);var b=s&&l?e[f]:f;a+=h(t[c][b],f)}c<t.length-1&&(!i||0<d&&!m)&&(a+=n)}}return a}function h(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===d&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var o=e.toString().replace(p,l);return"boolean"==typeof i&&i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1}(o,a.BAD_DELIMITERS)||-1<o.indexOf(r)||" "===o.charAt(0)||" "===o.charAt(o.length-1)?s+o+s:o}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!i&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=h,a.ParserHandle=m,a.NetworkStreamer=u,a.FileStreamer=c,a.StringStreamer=d,a.ReadableStreamStreamer=p,t.jQuery){var s=t.jQuery;s.fn.parse=function(e){var i=e.config||{},o=[];return this.each((function(e){if("INPUT"!==s(this).prop("tagName").toUpperCase()||"file"!==s(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var r=0;r<this.files.length;r++)o.push({file:this.files[r],inputElem:this,instanceConfig:s.extend({},i)})})),r(),this;function r(){if(0!==o.length){var t,i,r,l=o[0];if(w(e.before)){var u=e.before(l.file,l.inputElem);if("object"==typeof u){if("abort"===u.action)return t=l.file,i=l.inputElem,r=u.reason,void(w(e.error)&&e.error({name:"AbortError"},t,i,r));if("skip"===u.action)return void n();"object"==typeof u.config&&(l.instanceConfig=s.extend(l.instanceConfig,u.config))}else if("skip"===u)return void n()}var c=l.instanceConfig.complete;l.instanceConfig.complete=function(e){w(c)&&c(e,l.file,l.inputElem),n()},a.parse(l.file,l.instanceConfig)}else w(e.complete)&&e.complete()}function n(){o.splice(0,1),r()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new m(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,i){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1,this._halted=!1;var n=this._partialLine+e;this._partialLine="";var s=this._handle.parse(n,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=s.meta.cursor;this._finished||(this._partialLine=n.substring(l-this._baseIndex),this._baseIndex=l),s&&s.data&&(this._rowCount+=s.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)t.postMessage({results:s,workerId:a.WORKER_ID,finished:u});else if(w(this._config.chunk)&&!i){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!u||!w(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):o&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),i||(t.onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var o in e)t.setRequestHeader(o,e[o])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+r)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}i&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var i=t.statusText||e;this._sendError(new Error(i))}}function c(e){var t,i;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var o="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,o?((t=new FileReader).onload=x(this._chunkLoaded,this),t.onerror=x(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);e=i.call(e,this._start,r)}var n=t.readAsText(e,this._config.encoding);o||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,i=this._config.chunkSize;return i?(e=t.substring(0,i),t=t.substring(i)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function p(e){l.call(this,e=e||{});var t=[],i=!0,o=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){o&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=x((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=x((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=x((function(){this._streamCleanUp(),o=!0,this._streamData("")}),this),this._streamCleanUp=x((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function m(e){var t,i,o,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,u=this,c=0,d=0,p=!1,m=!1,v=[],y={data:[],errors:[],meta:{}};if(w(e.step)){var f=e.step;e.step=function(t){if(y=t,S())T();else{if(T(),0===y.data.length)return;c+=t.data.length,e.preview&&c>e.preview?i.abort():(y.data=y.data[0],f(y,u))}}}function x(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function T(){if(y&&o&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),o=!1),e.skipEmptyLines)for(var t=0;t<y.data.length;t++)x(y.data[t])&&y.data.splice(t--,1);return S()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;S()&&t<y.data.length;t++)y.data[t].forEach(i);y.data.splice(0,1)}else y.data.forEach(i);function i(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),v.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,i){var o,r=e.header?{}:[];for(o=0;o<t.length;o++){var n=o,a=t[o];e.header&&(n=o>=v.length?"__parsed_extra":v[o]),e.transform&&(a=e.transform(a,n)),a=k(n,a),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(a)):r[n]=a}return e.header&&(o>v.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+o,d+i):o<v.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+o,d+i)),r}var i=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),i=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=v),d+=i,y}()}function S(){return e.header&&0===v.length}function k(t,i){return o=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[o]&&(e.dynamicTyping[o]=e.dynamicTypingFunction(o)),!0===(e.dynamicTyping[o]||e.dynamicTyping)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return!0}return!1}(i)?parseFloat(i):l.test(i)?new Date(i):""===i?null:i):i;var o}function P(e,t,i,o){var r={type:e,code:t,message:i};void 0!==o&&(r.row=o),y.errors.push(r)}this.parse=function(r,n,s){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(g(t)+"([^]*?)"+g(t),"gm"),o=(e=e.replace(i,"")).split("\r"),r=e.split("\n"),n=1<r.length&&r[0].length<o[0].length;if(1===o.length||n)return"\n";for(var a=0,s=0;s<o.length;s++)"\n"===o[s][0]&&a++;return a>=o.length/2?"\r\n":"\r"}(r,l)),o=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(r),y.meta.delimiter=e.delimiter);else{var u=function(t,i,o,r,n){var s,l,u,c;n=n||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var d=0;d<n.length;d++){var p=n[d],m=0,g=0,v=0;u=void 0;for(var y=new h({comments:r,delimiter:p,newline:i,preview:10}).parse(t),f=0;f<y.data.length;f++)if(o&&x(y.data[f]))v++;else{var b=y.data[f].length;g+=b,void 0!==u?0<b&&(m+=Math.abs(b-u),u=b):u=b}0<y.data.length&&(g/=y.data.length-v),(void 0===l||m<=l)&&(void 0===c||c<g)&&1.99<g&&(l=m,s=p,c=g)}return{successful:!!(e.delimiter=s),bestDelimiter:s}}(r,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(o=!0,e.delimiter=a.DefaultDelimiter),y.meta.delimiter=e.delimiter}var c=b(e);return e.preview&&e.header&&c.preview++,t=r,i=new h(c),y=i.parse(t,n,s),T(),p?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return p},this.pause=function(){p=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){u.streamer._halted?(p=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return m},this.abort=function(){m=!0,i.abort(),y.meta.aborted=!0,w(e.complete)&&e.complete(y),t=""}}function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function h(e){var t,i=(e=e||{}).delimiter,o=e.newline,r=e.comments,n=e.step,s=e.preview,l=e.fastMode,u=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof i||-1<a.BAD_DELIMITERS.indexOf(i))&&(i=","),r===i)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<a.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==o&&"\r"!==o&&"\r\n"!==o&&(o="\n");var c=0,d=!1;this.parse=function(e,a,p){if("string"!=typeof e)throw new Error("Input must be a string");var m=e.length,h=i.length,v=o.length,y=r.length,f=w(n),b=[],x=[],T=[],S=c=0;if(!e)return z();if(l||!1!==l&&-1===e.indexOf(t)){for(var k=e.split(o),P=0;P<k.length;P++){if(T=k[P],c+=T.length,P!==k.length-1)c+=o.length;else if(p)return z();if(!r||T.substring(0,y)!==r){if(f){if(b=[],V(T.split(i)),q(),d)return z()}else V(T.split(i));if(s&&s<=P)return b=b.slice(0,s),z(!0)}}return z()}for(var E=e.indexOf(i,c),C=e.indexOf(o,c),N=new RegExp(g(u)+g(t),"g"),O=e.indexOf(t,c);;)if(e[c]!==t)if(r&&0===T.length&&e.substring(c,c+y)===r){if(-1===C)return z();c=C+v,C=e.indexOf(o,c),E=e.indexOf(i,c)}else if(-1!==E&&(E<C||-1===C))T.push(e.substring(c,E)),c=E+h,E=e.indexOf(i,c);else{if(-1===C)break;if(T.push(e.substring(c,C)),M(C+v),f&&(q(),d))return z();if(s&&b.length>=s)return z(!0)}else for(O=c,c++;;){if(-1===(O=e.indexOf(t,O+1)))return p||x.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:c}),I();if(O===m-1)return I(e.substring(c,O).replace(N,t));if(t!==u||e[O+1]!==u){if(t===u||0===O||e[O-1]!==u){-1!==E&&E<O+1&&(E=e.indexOf(i,O+1)),-1!==C&&C<O+1&&(C=e.indexOf(o,O+1));var _=j(-1===C?E:Math.min(E,C));if(e[O+1+_]===i){T.push(e.substring(c,O).replace(N,t)),e[c=O+1+_+h]!==t&&(O=e.indexOf(t,c)),E=e.indexOf(i,c),C=e.indexOf(o,c);break}var A=j(C);if(e.substring(O+1+A,O+1+A+v)===o){if(T.push(e.substring(c,O).replace(N,t)),M(O+1+A+v),E=e.indexOf(i,c),O=e.indexOf(t,c),f&&(q(),d))return z();if(s&&b.length>=s)return z(!0);break}x.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:c}),O++}}else O++}return I();function V(e){b.push(e),S=c}function j(t){var i=0;if(-1!==t){var o=e.substring(O+1,t);o&&""===o.trim()&&(i=o.length)}return i}function I(t){return p||(void 0===t&&(t=e.substring(c)),T.push(t),c=m,V(T),f&&q()),z()}function M(t){c=t,V(T),T=[],C=e.indexOf(o,c)}function z(e){return{data:b,errors:x,meta:{delimiter:i,linebreak:o,aborted:d,truncated:!!e,cursor:S+(a||0)}}}function q(){n(z()),b=[],x=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return c}}function v(e){var t=e.data,i=r[t.workerId],o=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){o=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:f,resume:f};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!o);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!o&&y(t.workerId,t.results)}function y(e,t){var i=r[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete r[e]}function f(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=b(e[i]);return t}function x(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return o&&(t.onmessage=function(e){var i=e.data;if(void 0===a.WORKER_ID&&i&&(a.WORKER_ID=i.workerId),"string"==typeof i.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(i.input,i.config),finished:!0});else if(t.File&&i.input instanceof File||i.input instanceof Object){var o=a.parse(i.input,i.config);o&&t.postMessage({workerId:a.WORKER_ID,results:o,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(c.prototype=Object.create(l.prototype)).constructor=c,(d.prototype=Object.create(d.prototype)).constructor=d,(p.prototype=Object.create(l.prototype)).constructor=p,a})?o.apply(t,r):o)||(e.exports=n)},"./src/components/action-container-view-model.ts":
|
|
25
25
|
/*!*******************************************************!*\
|
|
26
26
|
!*** ./src/components/action-container-view-model.ts ***!
|
|
27
27
|
\*******************************************************/
|
|
@@ -65,7 +65,7 @@ License: MIT
|
|
|
65
65
|
/*!**************************************!*\
|
|
66
66
|
!*** ./src/components/link-value.ts ***!
|
|
67
67
|
\**************************************/
|
|
68
|
-
/*! exports provided: QuestionLinkValueModel */function(e,t,i){"use strict";i.r(t),i.d(t,"QuestionLinkValueModel",(function(){return a}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),a=(i(/*! ./link-value.scss */"./src/components/link-value.scss"),function(e){function t(t,i){void 0===i&&(i=null);var o=e.call(this,t)||this;o.linkSetButtonCssClasses="svc-link-value-button svc-question-link__set-button",o.linkClearButtonCssClasses="svc-question-link__clear-button";var r=i&&!i.showValueInLink&&n.editorLocalization.getString("pe.set")+" "+i.title||null;return o.linkValueText=r||n.editorLocalization.getString("pe.emptyValue"),o}return Object(o.__extends)(t,e),t.prototype.onPropertyValueChanged=function(t,i,o){e.prototype.onPropertyValueChanged.call(this,t,i,o),"value"===t&&(this.updateLinkValueText(),this.allowClear&&(this.showClear=!!o))},t.prototype.getType=function(){return"linkvalue"},t.prototype.doLinkClick=function(){this.linkClickCallback&&this.linkClickCallback()},t.prototype.doClearClick=function(){this.clearClickCallback&&this.clearClickCallback()},t.prototype.updateLinkValueText=function(){var e;e=this.showValueInLink?this.isEmpty()?n.editorLocalization.getString("pe.emptyValue"):this.getObjDisplayValue():n.editorLocalization.getString(this.isEmpty()?"pe.set":"pe.change")+" "+this.title,this.linkValueText=e},t.prototype.stringifyValue=function(e){return"string"!=typeof e?JSON.stringify(e):e},t.prototype.getObjDisplayValue=function(){var e=this.obj;if(!e||!e.getDisplayValue)return this.stringifyValue(this.value);var t=e.getDisplayValue(!0,this.value);return"string"!=typeof t?JSON.stringify(t):t},Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"linkValueText",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showClear",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),t}(r.Question));r.Serializer.addClass("linkvalue",["showValueInLink"],(function(e){return new a("",e)}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new a(e)}))},"./src/components/matrix-cell.scss":
|
|
68
|
+
/*! exports provided: QuestionLinkValueModel */function(e,t,i){"use strict";i.r(t),i.d(t,"QuestionLinkValueModel",(function(){return a}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),a=(i(/*! ./link-value.scss */"./src/components/link-value.scss"),function(e){function t(t,i){void 0===i&&(i=null);var o=e.call(this,t)||this;o.linkSetButtonCssClasses="svc-link-value-button svc-question-link__set-button",o.linkClearButtonCssClasses="svc-question-link__clear-button";var r=i&&!i.showValueInLink&&n.editorLocalization.getString("pe.set")+" "+i.title||null;return o.linkValueText=r||n.editorLocalization.getString("pe.emptyValue"),o}return Object(o.__extends)(t,e),t.prototype.onPropertyValueChanged=function(t,i,o){e.prototype.onPropertyValueChanged.call(this,t,i,o),"value"===t&&(this.updateLinkValueText(),this.allowClear&&(this.showClear=!!o))},Object.defineProperty(t.prototype,"tooltip",{get:function(){return this.showTooltip?this.linkValueText:void 0},enumerable:!1,configurable:!0}),t.prototype.getType=function(){return"linkvalue"},t.prototype.doLinkClick=function(){this.linkClickCallback&&this.linkClickCallback()},t.prototype.doClearClick=function(){this.clearClickCallback&&this.clearClickCallback()},t.prototype.updateLinkValueText=function(){var e;e=this.showValueInLink?this.isEmpty()?n.editorLocalization.getString("pe.emptyValue"):this.getObjDisplayValue():n.editorLocalization.getString(this.isEmpty()?"pe.set":"pe.change")+" "+this.title,this.linkValueText=e},t.prototype.stringifyValue=function(e){return"string"!=typeof e?JSON.stringify(e):e},t.prototype.getObjDisplayValue=function(){var e=this.obj;if(!e||!e.getDisplayValue)return this.stringifyValue(this.value);var t=e.getDisplayValue(!0,this.value);return"string"!=typeof t?JSON.stringify(t):t},Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"isSelected",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"linkValueText",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showClear",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"allowClear",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"showValueInLink",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showTooltip",void 0),t}(r.Question));r.Serializer.addClass("linkvalue",["showValueInLink",{name:"showTooltip: boolean",default:!1,visible:!1}],(function(e){return new a("",e)}),"nonvalue"),r.QuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return new a(e)}))},"./src/components/matrix-cell.scss":
|
|
69
69
|
/*!*****************************************!*\
|
|
70
70
|
!*** ./src/components/matrix-cell.scss ***!
|
|
71
71
|
\*****************************************/
|
|
@@ -237,11 +237,11 @@ License: MIT
|
|
|
237
237
|
/*!**************************************************!*\
|
|
238
238
|
!*** ./src/components/tabs/logic-item-editor.ts ***!
|
|
239
239
|
\**************************************************/
|
|
240
|
-
/*! exports provided: LogicItemEditor */function(e,t,i){"use strict";i.r(t),i.d(t,"LogicItemEditor",(function(){return m}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../../settings */"./src/settings.ts"),a=i(/*! ../../property-grid/index */"./src/property-grid/index.ts"),s=i(/*! ./logic-items */"./src/components/tabs/logic-items.ts"),l=i(/*! ./logic-types */"./src/components/tabs/logic-types.ts"),u=i(/*! ../../editorLocalization */"./src/editorLocalization.ts"),c=i(/*! ../../survey-helper */"./src/survey-helper.ts"),d=i(/*! ./logic-theme */"./src/components/tabs/logic-theme.ts"),p=i(/*! ../../utils/utils */"./src/utils/utils.ts");r.FunctionFactory.Instance.register("logicTypeVisibleIf",(function(e){if(!this.question||!this.question.parentQuestion||1!=e.length)return!0;var t=this.question.parentQuestion.panels;if(t.length<2)return!0;for(var i=0;i<t.length;i++){var o=t[i].getQuestionByName("logicTypeName");if(o!=this.question&&o.value==e[0])return!1}return!0}));var m=function(e){function t(t,i){void 0===i&&(i=null);var o=e.call(this,i)||this;return o.options=i,o.initialSelectedElements={},o.isModifiedValue=!1,o.options||(o.options=new n.EmptySurveyCreatorOptions),o.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){"logicTypeName"==t.name&&o.onLogicTypeChanged(t.panel);var i=o.getElementPanelObj(t.panel);if(i){var r=t.panel;r.getElementByName("elementPanel").getQuestionByName(t.name)&&(i[t.name]=t.value);var n=o.getLogicTypeByPanel(r);n&&n.dependedOnPropertyName===t.name&&o.recreateQuestion(r,i,n.dynamicPropertyName),t.panel.runCondition(o.editSurvey.getAllValues(),{survey:o.editSurvey})}})),o.editSurvey.onDynamicPanelRemoved.add((function(e,t){if(!o.isBuildingPanels){var i=o.getActionByPanel(t.panel);i&&o.editableItem.removeAction(i),0==o.panel.panelCount&&o.panel.addPanel(),o.panel.panelCount>0&&(o.panel.panels[0].getQuestionByName("logicTypeName").title=u.editorLocalization.getString("pe.then"))}})),o.editSurvey.onDynamicPanelAdded.add((function(e,t){if(!o.isBuildingPanels){var i=o.panels[o.panel.panelCount-1];o.onPanelAdded(i,null)}})),o.editSurvey.onGetQuestionTitleActions.add((function(e,t){if(o.titleActionsCreator){var i=t.question;i.parent&&"elementPanel"===i.parent.name&&o.titleActionsCreator.onGetQuestionTitleActions(t)}})),o.editSurvey.css=d.logicCss,o.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){o.onUpdateQuestionCssClasses(t)})),o.editSurvey.onUpdatePanelCssClasses.add((function(e,t){o.onUpdatePanelCssClasses(t)})),o.editSurvey.onQuestionAdded.add((function(e,t){o.onQuestionAdded(t)})),o.editSurvey.onGetQuestionTitleActions.add((function(e,t){o.onGetQuestionTitleActions(t)})),o.editSurvey.onValueChanged.add((function(e,t){o.onValueChanged(t)})),o.setEditableItem(t),o}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),t.prototype.setEditableItem=function(e){this.editableItemValue=e,this.buildInitialSelectedElements(),this.buildPanels(),this.resetModified()},Object.defineProperty(t.prototype,"survey",{get:function(){return this.editableItem.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModified",{get:function(){return this.isModifiedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.editSurvey.getQuestionByName("panel")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panel.panels},enumerable:!1,configurable:!0}),t.prototype.getPanelByAction=function(e){for(var t=this.panels,i=0;i<t.length;i++)if(t[i].action==e)return t[i];return null},t.prototype.getActionByPanel=function(e){return e.action},t.prototype.getLogicTypeByPanel=function(e){return this.getLogicTypeByName(e.getQuestionByName("logicTypeName").value)},t.prototype.getSurveyJSON=function(){return{clearInvisibleValues:"onHidden",elements:[{type:"paneldynamic",name:"panel",title:Object(l.getLogicString)("actionsEditorTitle"),titleLocation:"hidden",panelAddText:Object(l.getLogicString)("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",title:u.editorLocalization.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:Object(l.getLogicString)("selectedActionCaption"),requiredErrorText:this.getLocString("pe.conditionActionEmpty")},{name:"logicTypeDescription",type:"html",startWithNewLine:!1,visible:!1},{name:"elementSelector",type:"dropdown",titleLocation:"hidden",isRequired:!0,startWithNewLine:!1,visible:!1},{name:"elementPanel",type:"panel",startWithNewLine:!1,visible:!1},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1}]}]}},t.prototype.getSurveyCreationReason=function(){return"logic-item-editor"},t.prototype.resetModified=function(){this.isModifiedValue=!1},t.prototype.apply=function(){if(this.editSurvey.hasErrors())return!1;for(var e=0;e<this.panels.length;e++)this.applyPanel(this.panels[e]);return this.resetModified(),!0},t.prototype.getEditingActions=function(){for(var e=[],t=0;t<this.panels.length;t++){var i=this.getOrCreateActionByPanel(this.panels[t]);i&&e.push(i)}return e},t.prototype.onUpdateQuestionCssClasses=function(e){e.cssClasses.answered="svc-logic-question--answered","logicTypeName"===e.question.name&&(e.cssClasses.control="svc-logic-operator svc-logic-operator--action",e.cssClasses.questionWrapper="svc-question-wrapper",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"elementSelector"!==e.question.name&&"setToName"!==e.question.name&&"fromName"!==e.question.name&&"gotoName"!==e.question.name||(e.cssClasses.control="svc-logic-operator svc-logic-operator--question",e.cssClasses.questionWrapper="svc-question-wrapper",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1,e.cssClasses.questionWrapper="svc-question-wrapper",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setValue"===e.question.name&&(Object(p.assignDefaultV2Classes)(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value"),"removeAction"===e.question.name&&(e.cssClasses.questionWrapper="svc-question-wrapper",e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--action ",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onUpdatePanelCssClasses=function(e){"elementPanel"===e.panel.name&&(e.cssClasses.panel.container+=" svc-logic-panel-element")},t.prototype.onValueChanged=function(e){this.isModifiedValue=!0,e.question.maxPanelCount=1!==e.value.length||e.value[0].logicTypeName?100:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))},t.prototype.onQuestionAdded=function(e){"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1)},t.prototype.onGetQuestionTitleActions=function(e){"setValue"===e.question.name&&(e.titleActions=[])},t.prototype.applyPanel=function(e){var t=this.getActionByPanel(e),i=this.getOrCreateActionByPanel(e);if(t!==i){this.editableItem.replaceAction(i,t),e.action=i,this.setElementPanelObj(e,i.element);var o=this.getElementPanelObj(e);o&&this.getLogicTypeByPanel(e).saveNewElement(o)}},t.prototype.getOrCreateActionByPanel=function(e){var t=this.getActionByPanel(e),i=this.getLogicTypeByPanel(e),o=this.getElementPanelObj(e),r=null;return o||(r=this.getElementBySelectorName(i,e.getQuestionByName("elementSelector").value)),!t||t.logicType!=i||r&&t.element!=r?new s.SurveyLogicAction(i,o||r,this.survey):(o&&t.element.fromJSON(o.toJSON()),t)},t.prototype.buildInitialSelectedElements=function(){if(this.initialSelectedElements={},this.editableItem)for(var e=0;e<this.editableItem.actions.length;e++){var t=this.editableItem.actions[e];if(this.isElementSelectorVisible(t.logicType)){var i=t.logicTypeName;this.initialSelectedElements[i]||(this.initialSelectedElements[i]=[]),this.initialSelectedElements[i].push(t.element)}}},t.prototype.buildPanels=function(){if(this.panel.panelCount=0,this.editableItem){this.logicTypeChoices=this.getLogicTypeChoices();for(var e=0;e<this.editableItem.actions.length;e++)this.onPanelAdded(this.panel.addPanel(),this.editableItem.actions[e]);0==this.panel.panelCount&&this.onPanelAdded(this.panel.addPanel(),null)}},t.prototype.onPanelAdded=function(e,t){var i=e.getQuestionByName("logicTypeName");i.title=this.panel.panelCount>1?u.editorLocalization.getString("pe.and").toLowerCase():u.editorLocalization.getString("pe.then"),i.choices=this.logicTypeChoices,t&&(e.action=t,i.value=t.logicTypeName);var o=e.getQuestionByName("removeAction"),r=o.parentQuestion;return o.linkClickCallback=function(){r&&r.removePanelUI(e)},o.linkValueText="",o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",e},t.prototype.getLogicTypeChoices=function(){for(var e=[],t=this.editableItem.getVisibleLogicTypes(),i=0;i<t.length;i++){var o=t[i],n=new r.ItemValue(o.name,o.displayName);o.isUniqueItem&&(n.visibleIf="logicTypeVisibleIf({item})"),e.push(n)}return e},t.prototype.onLogicTypeChanged=function(e){var t=this.getLogicTypeByPanel(e);e.getQuestionByName("logicTypeDescription").html=t?t.description:"",this.setElementPanelObj(e,null),this.setupElementSelector(e,t),this.setupElementPanel(e,t)},t.prototype.getLogicTypeByName=function(e){if(!e)return null;for(var t=this.editableItem.getVisibleLogicTypes(),i=0;i<t.length;i++)if(t[i].name==e)return t[i];return null},t.prototype.setupElementSelector=function(e,t){var i=e.getQuestionByName("elementSelector");if(i.visible=this.isElementSelectorVisible(t),i.visible){i.choices=this.getSelectorChoices(t),i.optionsCaption=this.getSelectorOptionsText(t);var o=this.getActionByPanel(e);i.value=o&&o.element&&o.logicType==t?o.element.name:void 0}},t.prototype.setupElementPanel=function(e,t){this.titleActionsCreator=null;for(var i=e.getElementByName("elementPanel"),o=i.questions,n=0;n<o.length;n++)o[n].clearValue();if(i.elements.splice(0,i.elements.length),this.isElementPanelVisible(t)){var s=this.createElementPanelObj(this.getActionByPanel(e),t);if(this.setElementPanelObj(e,s),i.visible=t.hasVisibleElements,i.visible){this.titleActionsCreator=new a.PropertyGridTitleActionsCreator(s,this.options),new a.PropertyJSONGenerator(s,this.options).setupObjPanel(i,!0,"logic"),i.title="";var l=i.getQuestionByName("runExpression");for(l&&(l.titleLocation="top"),i.visible=!0,i.getElementByName(t.propertyName).visible=!1,i.onSurveyLoad(),n=0;n<i.questions.length;n++){var u=i.questions[n];r.Helpers.isValueEmpty(s[u.getValueName()])||(u.value=s[u.getValueName()])}}}else i.visible=!1},t.prototype.recreateQuestion=function(e,t,i){var o=i?e.getQuestionByName(i):null;if(o){var n=e.getElementByName("elementPanel");if(n){var s=r.Serializer.createClass("panel");new a.PropertyJSONGenerator(t,this.options).setupObjPanel(s,!0,"logic");var l=s.getQuestionByName(i);if(l){var u=n.elements.indexOf(o);n.addElement(l,u),o.delete()}"setValue"===l.name&&this.updateSetValueQuestion(l,this.options),s.dispose()}}},t.prototype.updateSetValueQuestion=function(e,t){var i=e.obj,o=i.getSurvey();if(o||(o=i.owner),i.setToName&&o){var r=o.getQuestionByValueName(i.setToName);e.title=r.title,e.titleLocation="top"}},t.prototype.isElementSelectorVisible=function(e){return!!e&&t.elementSelectorTypes.indexOf(e.baseClass)>-1},t.prototype.isElementPanelVisible=function(e){return!!e&&!this.isElementSelectorVisible(e)},t.prototype.getElementPanelObj=function(e){return e.panelObj},t.prototype.setElementPanelObj=function(e,t){var i=this.getElementPanelObj(e);i&&(i.onPropertyValueChangedCallback=void 0),e.panelObj=t,t&&(t.onPropertyValueChangedCallback=function(t,o,r,n,a){if(e&&!e.isDisposed){var s=e.getQuestionByName(t);s&&(s.value=r)}else i.onPropertyValueChangedCallback=void 0})},t.prototype.createElementPanelObj=function(e,t){var i=e&&e.logicType==t?e.element:null;return t.createNewObj(i)},t.prototype.getLocString=function(e){return u.editorLocalization.getString(e)},t.prototype.getSelectorChoices=function(e){var t=e.baseClass,i=[];"question"==t&&(i=this.survey.getAllQuestions()),"page"==t&&(i=this.survey.pages),"panel"==t&&(i=this.survey.getAllPanels());for(var o=[],n=this.options.showTitlesInExpressions,a=0;a<i.length;a++){var s=i[a],l="";n&&(l=s.locTitle.renderedHtml),l||(l=s.name);var u=new r.ItemValue(s.name,l);s[e.propertyName]&&!this.isElementInInitialSelection(e.name,s)&&(u.enableIf="1=2"),o.push(u)}return c.SurveyHelper.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,i="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return this.getLocString(i)},t.prototype.getElementBySelectorName=function(e,t){if(!t)return null;var i=e.baseClass;return"question"==i?this.survey.getQuestionByName(t):this.survey.getPageByName(t)},t.elementSelectorTypes=["question","page","panel"],t}(a.PropertyEditorSetupValue)},"./src/components/tabs/logic-items.ts":
|
|
240
|
+
/*! exports provided: LogicItemEditor */function(e,t,i){"use strict";i.r(t),i.d(t,"LogicItemEditor",(function(){return m}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../../settings */"./src/settings.ts"),a=i(/*! ../../property-grid/index */"./src/property-grid/index.ts"),s=i(/*! ./logic-items */"./src/components/tabs/logic-items.ts"),l=i(/*! ./logic-types */"./src/components/tabs/logic-types.ts"),u=i(/*! ../../editorLocalization */"./src/editorLocalization.ts"),c=i(/*! ../../survey-helper */"./src/survey-helper.ts"),d=i(/*! ./logic-theme */"./src/components/tabs/logic-theme.ts"),p=i(/*! ../../utils/utils */"./src/utils/utils.ts");r.FunctionFactory.Instance.register("logicTypeVisibleIf",(function(e){if(!this.question||!this.question.parentQuestion||1!=e.length)return!0;var t=this.question.parentQuestion.panels;if(t.length<2)return!0;for(var i=0;i<t.length;i++){var o=t[i].getQuestionByName("logicTypeName");if(o!=this.question&&o.value==e[0])return!1}return!0}));var m=function(e){function t(t,i){void 0===i&&(i=null);var o=e.call(this,i)||this;return o.options=i,o.initialSelectedElements={},o.isModifiedValue=!1,o.options||(o.options=new n.EmptySurveyCreatorOptions),o.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){"logicTypeName"==t.name&&o.onLogicTypeChanged(t.panel);var i=o.getElementPanelObj(t.panel);if(i){var r=t.panel;r.getElementByName("elementPanel").getQuestionByName(t.name)&&(i[t.name]=t.value);var n=o.getLogicTypeByPanel(r);n&&n.dependedOnPropertyName===t.name&&o.recreateQuestion(r,i,n.dynamicPropertyName),t.panel.runCondition(o.editSurvey.getAllValues(),{survey:o.editSurvey})}})),o.editSurvey.onDynamicPanelRemoved.add((function(e,t){if(!o.isBuildingPanels){var i=o.getActionByPanel(t.panel);i&&o.editableItem.removeAction(i),0==o.panel.panelCount&&o.panel.addPanel(),o.panel.panelCount>0&&(o.panel.panels[0].getQuestionByName("logicTypeName").title=u.editorLocalization.getString("pe.then"))}})),o.editSurvey.onDynamicPanelAdded.add((function(e,t){if(!o.isBuildingPanels){var i=o.panels[o.panel.panelCount-1];o.onPanelAdded(i,null)}})),o.editSurvey.onGetQuestionTitleActions.add((function(e,t){if(o.titleActionsCreator){var i=t.question;i.parent&&"elementPanel"===i.parent.name&&o.titleActionsCreator.onGetQuestionTitleActions(t)}})),o.editSurvey.css=d.logicCss,o.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){o.onUpdateQuestionCssClasses(t)})),o.editSurvey.onUpdatePanelCssClasses.add((function(e,t){o.onUpdatePanelCssClasses(t)})),o.editSurvey.onQuestionAdded.add((function(e,t){o.onQuestionAdded(t)})),o.editSurvey.onGetQuestionTitleActions.add((function(e,t){o.onGetQuestionTitleActions(t)})),o.editSurvey.onValueChanged.add((function(e,t){o.onValueChanged(t)})),o.setEditableItem(t),o}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,"editableItem",{get:function(){return this.editableItemValue},enumerable:!1,configurable:!0}),t.prototype.setEditableItem=function(e){this.editableItemValue=e,this.buildInitialSelectedElements(),this.buildPanels(),this.resetModified()},Object.defineProperty(t.prototype,"survey",{get:function(){return this.editableItem.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModified",{get:function(){return this.isModifiedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.editSurvey.getQuestionByName("panel")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panels",{get:function(){return this.panel.panels},enumerable:!1,configurable:!0}),t.prototype.getPanelByAction=function(e){for(var t=this.panels,i=0;i<t.length;i++)if(t[i].action==e)return t[i];return null},t.prototype.getActionByPanel=function(e){return e.action},t.prototype.getLogicTypeByPanel=function(e){return this.getLogicTypeByName(e.getQuestionByName("logicTypeName").value)},t.prototype.getSurveyJSON=function(){return{clearInvisibleValues:"onHidden",elements:[{type:"paneldynamic",name:"panel",title:Object(l.getLogicString)("actionsEditorTitle"),titleLocation:"hidden",panelAddText:Object(l.getLogicString)("addNewAction"),panelRemoveButtonLocation:"right",panelCount:0,minPanelCount:1,maxPanelCount:1,templateElements:[{name:"logicTypeName",type:"dropdown",title:u.editorLocalization.getString("pe.then"),titleLocation:"left",isRequired:!0,optionsCaption:Object(l.getLogicString)("selectedActionCaption"),requiredErrorText:this.getLocString("pe.conditionActionEmpty")},{name:"logicTypeDescription",type:"html",startWithNewLine:!1,visible:!1},{name:"elementSelector",type:"dropdown",titleLocation:"hidden",isRequired:!0,startWithNewLine:!1,visible:!1},{name:"elementPanel",type:"panel",startWithNewLine:!1,visible:!1},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1}]}]}},t.prototype.getSurveyCreationReason=function(){return"logic-item-editor"},t.prototype.resetModified=function(){this.isModifiedValue=!1},t.prototype.apply=function(){if(this.editSurvey.hasErrors())return!1;for(var e=0;e<this.panels.length;e++)this.applyPanel(this.panels[e]);return this.resetModified(),!0},t.prototype.getEditingActions=function(){for(var e=[],t=0;t<this.panels.length;t++){var i=this.getOrCreateActionByPanel(this.panels[t]);i&&e.push(i)}return e},t.prototype.onUpdateQuestionCssClasses=function(e){e.cssClasses.answered="svc-logic-question--answered","logicTypeName"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control="svc-logic-operator svc-logic-operator--action",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"elementSelector"!==e.question.name&&"setToName"!==e.question.name&&"fromName"!==e.question.name&&"gotoName"!==e.question.name||(e.question.allowRootStyle=!1,e.cssClasses.control="svc-logic-operator svc-logic-operator--question",e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.allowRootStyle=!1,e.question.titleLocation="left",e.question.startWithNewLine=!1,e.cssClasses.error.root="svc-logic-operator__error",e.cssClasses.onError="svc-logic-operator--error"),"setValue"===e.question.name&&(Object(p.assignDefaultV2Classes)(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value"),"removeAction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--action ",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onUpdatePanelCssClasses=function(e){"elementPanel"===e.panel.name&&(e.cssClasses.panel.container+=" svc-logic-panel-element")},t.prototype.onValueChanged=function(e){this.isModifiedValue=!0,e.question.maxPanelCount=1!==e.value.length||e.value[0].logicTypeName?100:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))},t.prototype.onQuestionAdded=function(e){"setToName"!==e.question.name&&"fromName"!==e.question.name||(e.question.titleLocation="left",e.question.startWithNewLine=!1)},t.prototype.onGetQuestionTitleActions=function(e){"setValue"===e.question.name&&(e.titleActions=[])},t.prototype.applyPanel=function(e){var t=this.getActionByPanel(e),i=this.getOrCreateActionByPanel(e);if(t!==i){this.editableItem.replaceAction(i,t),e.action=i,this.setElementPanelObj(e,i.element);var o=this.getElementPanelObj(e);o&&this.getLogicTypeByPanel(e).saveNewElement(o)}},t.prototype.getOrCreateActionByPanel=function(e){var t=this.getActionByPanel(e),i=this.getLogicTypeByPanel(e),o=this.getElementPanelObj(e),r=null;return o||(r=this.getElementBySelectorName(i,e.getQuestionByName("elementSelector").value)),!t||t.logicType!=i||r&&t.element!=r?new s.SurveyLogicAction(i,o||r,this.survey):(o&&t.element.fromJSON(o.toJSON()),t)},t.prototype.buildInitialSelectedElements=function(){if(this.initialSelectedElements={},this.editableItem)for(var e=0;e<this.editableItem.actions.length;e++){var t=this.editableItem.actions[e];if(this.isElementSelectorVisible(t.logicType)){var i=t.logicTypeName;this.initialSelectedElements[i]||(this.initialSelectedElements[i]=[]),this.initialSelectedElements[i].push(t.element)}}},t.prototype.buildPanels=function(){if(this.panel.panelCount=0,this.editableItem){this.logicTypeChoices=this.getLogicTypeChoices();for(var e=0;e<this.editableItem.actions.length;e++)this.onPanelAdded(this.panel.addPanel(),this.editableItem.actions[e]);0==this.panel.panelCount&&this.onPanelAdded(this.panel.addPanel(),null)}},t.prototype.onPanelAdded=function(e,t){var i=e.getQuestionByName("logicTypeName");i.title=this.panel.panelCount>1?u.editorLocalization.getString("pe.and").toLowerCase():u.editorLocalization.getString("pe.then"),i.choices=this.logicTypeChoices,t&&(e.action=t,i.value=t.logicTypeName);var o=e.getQuestionByName("removeAction"),r=o.parentQuestion;return o.linkClickCallback=function(){r&&r.removePanelUI(e)},o.linkValueText="",o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",e},t.prototype.getLogicTypeChoices=function(){for(var e=[],t=this.editableItem.getVisibleLogicTypes(),i=0;i<t.length;i++){var o=t[i],n=new r.ItemValue(o.name,o.displayName);o.isUniqueItem&&(n.visibleIf="logicTypeVisibleIf({item})"),e.push(n)}return e},t.prototype.onLogicTypeChanged=function(e){var t=this.getLogicTypeByPanel(e);e.getQuestionByName("logicTypeDescription").html=t?t.description:"",this.setElementPanelObj(e,null),this.setupElementSelector(e,t),this.setupElementPanel(e,t)},t.prototype.getLogicTypeByName=function(e){if(!e)return null;for(var t=this.editableItem.getVisibleLogicTypes(),i=0;i<t.length;i++)if(t[i].name==e)return t[i];return null},t.prototype.setupElementSelector=function(e,t){var i=e.getQuestionByName("elementSelector");if(i.visible=this.isElementSelectorVisible(t),i.visible){i.choices=this.getSelectorChoices(t),i.optionsCaption=this.getSelectorOptionsText(t);var o=this.getActionByPanel(e);i.value=o&&o.element&&o.logicType==t?o.element.name:void 0}},t.prototype.setupElementPanel=function(e,t){this.titleActionsCreator=null;for(var i=e.getElementByName("elementPanel"),o=i.questions,n=0;n<o.length;n++)o[n].clearValue();if(i.elements.splice(0,i.elements.length),this.isElementPanelVisible(t)){var s=this.createElementPanelObj(this.getActionByPanel(e),t);if(this.setElementPanelObj(e,s),i.visible=t.hasVisibleElements,i.visible){this.titleActionsCreator=new a.PropertyGridTitleActionsCreator(s,this.options),new a.PropertyJSONGenerator(s,this.options).setupObjPanel(i,!0,"logic"),i.title="";var l=i.getQuestionByName("runExpression");for(l&&(l.titleLocation="top"),i.visible=!0,i.getElementByName(t.propertyName).visible=!1,i.onSurveyLoad(),n=0;n<i.questions.length;n++){var u=i.questions[n];r.Helpers.isValueEmpty(s[u.getValueName()])||(u.value=s[u.getValueName()])}}}else i.visible=!1},t.prototype.recreateQuestion=function(e,t,i){var o=i?e.getQuestionByName(i):null;if(o){var n=e.getElementByName("elementPanel");if(n){var s=r.Serializer.createClass("panel");new a.PropertyJSONGenerator(t,this.options).setupObjPanel(s,!0,"logic");var l=s.getQuestionByName(i);if(l){var u=n.elements.indexOf(o);n.addElement(l,u),o.delete()}"setValue"===l.name&&this.updateSetValueQuestion(l,this.options),s.dispose()}}},t.prototype.updateSetValueQuestion=function(e,t){var i=e.obj,o=i.getSurvey();if(o||(o=i.owner),i.setToName&&o){var r=o.getQuestionByValueName(i.setToName);e.title=r.title,e.titleLocation="top"}},t.prototype.isElementSelectorVisible=function(e){return!!e&&t.elementSelectorTypes.indexOf(e.baseClass)>-1},t.prototype.isElementPanelVisible=function(e){return!!e&&!this.isElementSelectorVisible(e)},t.prototype.getElementPanelObj=function(e){return e.panelObj},t.prototype.setElementPanelObj=function(e,t){var i=this.getElementPanelObj(e);i&&(i.onPropertyValueChangedCallback=void 0),e.panelObj=t,t&&(t.onPropertyValueChangedCallback=function(t,o,r,n,a){if(e&&!e.isDisposed){var s=e.getQuestionByName(t);s&&(s.value=r)}else i.onPropertyValueChangedCallback=void 0})},t.prototype.createElementPanelObj=function(e,t){var i=e&&e.logicType==t?e.element:null;return t.createNewObj(i)},t.prototype.getLocString=function(e){return u.editorLocalization.getString(e)},t.prototype.getSelectorChoices=function(e){var t=e.baseClass,i=[];"question"==t&&(i=this.survey.getAllQuestions()),"page"==t&&(i=this.survey.pages),"panel"==t&&(i=this.survey.getAllPanels());for(var o=[],n=this.options.showTitlesInExpressions,a=0;a<i.length;a++){var s=i[a],l="";n&&(l=s.locTitle.renderedHtml),l||(l=s.name);var u=new r.ItemValue(s.name,l);s[e.propertyName]&&!this.isElementInInitialSelection(e.name,s)&&(u.enableIf="1=2"),o.push(u)}return c.SurveyHelper.sortItems(o),o},t.prototype.isElementInInitialSelection=function(e,t){return!!this.initialSelectedElements[e]&&this.initialSelectedElements[e].indexOf(t)>-1},t.prototype.getSelectorOptionsText=function(e){var t=e.baseClass,i="page"==t?"pe.conditionSelectPage":"panel"==t?"pe.conditionSelectPanel":"pe.conditionSelectQuestion";return this.getLocString(i)},t.prototype.getElementBySelectorName=function(e,t){if(!t)return null;var i=e.baseClass;return"question"==i?this.survey.getQuestionByName(t):"panel"==i?this.survey.getPanelByName(t):this.survey.getPageByName(t)},t.elementSelectorTypes=["question","page","panel"],t}(a.PropertyEditorSetupValue)},"./src/components/tabs/logic-items.ts":
|
|
241
241
|
/*!********************************************!*\
|
|
242
242
|
!*** ./src/components/tabs/logic-items.ts ***!
|
|
243
243
|
\********************************************/
|
|
244
|
-
/*! exports provided: SurveyLogicAction, SurveyLogicItem */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyLogicAction",(function(){return l})),i.d(t,"SurveyLogicItem",(function(){return u}));var o=i(/*! survey-core */"survey-core"),r=i(/*! ../../editorLocalization */"./src/editorLocalization.ts"),n=i(/*! ../../expressionToDisplayText */"./src/expressionToDisplayText.ts"),a=i(/*! ./logic-types */"./src/components/tabs/logic-types.ts"),s=i(/*! ../../
|
|
244
|
+
/*! exports provided: SurveyLogicAction, SurveyLogicItem */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyLogicAction",(function(){return l})),i.d(t,"SurveyLogicItem",(function(){return u}));var o=i(/*! survey-core */"survey-core"),r=i(/*! ../../editorLocalization */"./src/editorLocalization.ts"),n=i(/*! ../../expressionToDisplayText */"./src/expressionToDisplayText.ts"),a=i(/*! ./logic-types */"./src/components/tabs/logic-types.ts"),s=i(/*! ../../utils/utils */"./src/utils/utils.ts"),l=function(){function e(e,t,i){this.surveyValue=i,this.logicTypeValue=e,this.elementValue=t}return Object.defineProperty(e.prototype,"logicType",{get:function(){return this.logicTypeValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.elementValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.apply=function(e,t){if(void 0===t&&(t=!1),this.element&&this.logicType&&(this.element[this.logicType.propertyName]=e,!e&&o.Serializer.isDescendantOf(this.element.getType(),"surveytrigger"))){var i=this.survey.triggers.indexOf(this.element);i>-1&&this.survey.triggers.splice(i,1)}},e.prototype.renameQuestion=function(e,t){if(this.element)for(var i=this.questionNames,o=0;o<i.length;o++){var r=this.element[i[o]];r&&r.toLowerCase()==e.toLowerCase()&&(this.element[i[o]]=t)}},e.prototype.clone=function(){var t=this.logicType.cloneElement(this.element);return new e(this.logicType,t,this.survey)},e.prototype.equals=function(e){return this.logicType===e.logicType&&this.logicType.areElementsEqual(this.element,e.element)},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType?this.logicType.displayName:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeName",{get:function(){return this.logicType?this.logicType.name:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logicTypeDescription",{get:function(){return this.logicType?this.logicType.description:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this.logicType?this.logicType.getDisplayText(this.element):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteActionText",{get:function(){return Object(a.getLogicString)("deleteAction")},enumerable:!1,configurable:!0}),e.prototype.getLocString=function(e){return r.editorLocalization.getString(e)},e.prototype.isSuitableByQuestionName=function(e){var t=this.elementName===e||0===this.elementName.indexOf(e+".");return t||(t=this.questionNamesValues.filter((function(t){return t===e||0===t.indexOf(e+".")})).length>0),t},e.prototype.isSuitableByLogicType=function(e){return!this.logicTypeName||e===this.logicTypeName},e.prototype.addQuestionNames=function(e){this.elementName&&-1===e.indexOf(this.elementName)&&e.push(this.elementName),this.questionNamesValues.forEach((function(t){t&&-1===e.indexOf(t)&&e.push(t)}))},Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType&&this.logicType.questionNames?this.logicType.questionNames:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementName",{get:function(){return!!this.element&&this.element.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"questionNamesValues",{get:function(){var e=this;return this.questionNames.map((function(t){return e.element[t]}))},enumerable:!1,configurable:!0}),e}(),u=function(){function e(t,i){void 0===i&&(i=""),this.owner=t,this.expression=i,this.idValue=++e.counter,this.isNew=!1,this.isModified=!1,this.actionsValue=[],this.removedActions=[]}return Object.defineProperty(e.prototype,"actions",{get:function(){return this.actionsValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this.idValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return"logicItem"+this.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.owner.survey},enumerable:!1,configurable:!0}),e.prototype.getVisibleLogicTypes=function(){return this.owner.getVisibleLogicTypes()},e.prototype.getDisplayText=function(){var e=this.getExpressionAsDisplayText(),t="";return this.actions.forEach((function(e){t+=", "+e.text})),e&&t?(this.ifText+" "+e+t).replace(new RegExp("({|})","gm"),"'"):r.editorLocalization.getString("ed.lg.itemEmptyExpressionText")},e.prototype.edit=function(){this.owner&&this.owner.editItem(this)},e.prototype.remove=function(){this.owner&&this.owner.removeItem(this)},Object.defineProperty(e.prototype,"isReadOnly",{get:function(){return!!this.owner&&this.owner.readOnly},enumerable:!1,configurable:!0}),e.prototype.addNewAction=function(e){this.actions.push(e)},e.prototype.removeAction=function(e){this.replaceActionCore(null,e)},e.prototype.replaceAction=function(e,t){t?this.replaceActionCore(e,t):this.addNewAction(e)},e.prototype.clone=function(){for(var t=new e(this.owner,this.expression),i=0;i<this.actions.length;i++)t.addNewAction(this.actions[i].clone());return t},e.prototype.equals=function(e){if(this.expression!==e.expression)return!1;if(this.actions.length!==e.actions.length)return!1;for(var t=0;t<this.actions.length;t++)if(!this.actions[t].equals(e.actions[t]))return!1;return!0},e.prototype.replaceActionCore=function(e,t){this.removedActions.push(t);var i=this.actions.indexOf(t);i>-1&&(e?this.actions.splice(i,1,e):this.actions.splice(i,1))},e.prototype.apply=function(e){e?this.removeSameActions():this.removeActions();for(var t=0;t<this.removedActions.length;t++)this.removedActions[t].apply("");this.removedActions=[],this.applyExpression(e,!1)},e.prototype.renameQuestion=function(e,t){if(e&&t){this.renameQuestionInExpression(e,t);for(var i=this.actions,o=0;o<i.length;o++)i[o].renameQuestion(e,t)}},e.prototype.removeQuestion=function(e){this.removeQuestionInExpression(e)},e.prototype.getQuestionNames=function(){var e=[];return this.getQuestionNamesFromExpression(e),this.getQuestionNamesFromActions(e),e},e.prototype.getActionTypes=function(){return this.actions.map((function(e){return e.logicTypeName}))},e.prototype.getQuestionNamesFromExpression=function(e){new o.ConditionRunner(this.expression).getVariables().forEach((function(t){-1===e.indexOf(t)&&e.push(t)}))},e.prototype.getQuestionNamesFromActions=function(e){this.actions.forEach((function(t){return t.addQuestionNames(e)}))},e.prototype.getExpressionAsDisplayText=function(){return this.owner?this.owner.getExpressionAsDisplayText(this.expression):this.expression},Object.defineProperty(e.prototype,"editText",{get:function(){return r.editorLocalization.getString("pe.edit")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"deleteText",{get:function(){return r.editorLocalization.getString("pe.delete")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ifText",{get:function(){return r.editorLocalization.getString("pe.if")},enumerable:!1,configurable:!0}),e.prototype.isSuitable=function(e,t){return void 0===t&&(t=""),!e&&!t||(e?t?(this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e))&&this.isSuitableByLogicTypeInActions(t):this.isSuitableInExpression(e)||this.isSuitableByNameInActions(e):this.isSuitableByLogicTypeInActions(t))},e.prototype.isSuitableInExpression=function(e){return-1!==this.expression.indexOf(Object(s.wrapTextByCurlyBraces)(e))||-1!==this.expression.indexOf("'"+e+".")},e.prototype.isSuitableByNameInActions=function(e){return this.actions.some((function(t){return t.isSuitableByQuestionName(e)}))},e.prototype.isSuitableByLogicTypeInActions=function(e){return this.actions.some((function(t){return t.isSuitableByLogicType(e)}))},e.prototype.renameQuestionInExpression=function(e,t){if(this.expression){var i=this.expression,o=this.expression.toLocaleLowerCase();e=Object(s.wrapTextByCurlyBraces)(e.toLowerCase()),t=Object(s.wrapTextByCurlyBraces)(t);for(var r=o.lastIndexOf(e,o.length);r>-1;)i=i.substring(0,r)+t+i.substr(r+e.length,+i.length),r=(o=o.substring(0,r)).lastIndexOf(e,o.length);i!=this.expression&&this.applyExpression(i,!0)}},e.prototype.removeQuestionInExpression=function(e){if(this.expression){var t=(new n.ExpressionRemoveVariable).remove(this.expression,e);t!=this.expression&&this.applyExpression(t,!0)}},e.prototype.applyExpression=function(e,t){this.expression=e;for(var i=this.actions,o=0;o<i.length;o++)i[o].apply(e,t)},e.prototype.removeActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)this.removeAction(e[t])},e.prototype.removeSameActions=function(){for(var e=this.actions,t=e.length-1;t>=0;t--)for(var i=t-1;i>=0;i--)if(e[t].equals(e[i])){this.removeAction(e[t]);break}},e.counter=0,e}()},"./src/components/tabs/logic-plugin.ts":
|
|
245
245
|
/*!*********************************************!*\
|
|
246
246
|
!*** ./src/components/tabs/logic-plugin.ts ***!
|
|
247
247
|
\*********************************************/
|
|
@@ -249,11 +249,11 @@ License: MIT
|
|
|
249
249
|
/*!********************************************!*\
|
|
250
250
|
!*** ./src/components/tabs/logic-theme.ts ***!
|
|
251
251
|
\********************************************/
|
|
252
|
-
/*! exports provided: logicCss */function(e,t,i){"use strict";i.r(t),i.d(t,"logicCss",(function(){return o}));var o={root:"",container:"",header:"",body:"",bodyEmpty:"",footer:"",title:"",description:"",logo:"",logoImage:"",headerText:"",navigationButton:"",completedPage:"",navigation:{complete:"",prev:"",next:"",start:"",preview:"",edit:""},panel:{title:"",titleExpandable:"",titleOnExpand:"",titleOnError:"",description:"",container:"sl-panel",content:"",icon:"",iconExpanded:"",footer:"sl-panel__footer",requiredText:"sl-panel__required-text"},paneldynamic:{mainRoot:"",root:"",navigation:"",title:"",button:"",buttonRemove:"",buttonAdd:"svc-logic-operator sl-paneldynamic__add-btn",progressTop:"",progressBottom:"",buttonPrev:"",buttonNext:"",progressContainer:"",progress:"",progressBar:"",progressText:"",separator:"sv-hidden",panelWrapper:"",panelWrapperInRow:"sl-panel-wrapper--in-row"},progress:"",progressBar:"",progressText:"",progressTextInBar:"",page:{root:"",title:"",description:""},pageTitle:"",pageDescription:"",row:"sl-row",rowMultiple:"sl-row--multiple",question:{mainRoot:"sl-question",flowRoot:"",asCell:"",header:"sl-question__header",headerLeft:"sl-question__header--left",headerTop:"",headerBottom:"",content:"",contentLeft:"",titleLeftRoot:"",titleOnAnswer:"",titleOnError:"",title:"sl-question__title",requiredText:"sl-question__required-text",number:"",description:"",descriptionUnderInput:"",comment:"",required:"",titleRequired:"",indent:
|
|
252
|
+
/*! exports provided: logicCss */function(e,t,i){"use strict";i.r(t),i.d(t,"logicCss",(function(){return o}));var o={root:"",container:"",header:"",body:"",bodyEmpty:"",footer:"",title:"",description:"",logo:"",logoImage:"",headerText:"",navigationButton:"",completedPage:"",navigation:{complete:"",prev:"",next:"",start:"",preview:"",edit:""},panel:{title:"",titleExpandable:"",titleOnExpand:"",titleOnError:"",description:"",container:"sl-panel",content:"",icon:"",iconExpanded:"",footer:"sl-panel__footer",requiredText:"sl-panel__required-text"},paneldynamic:{mainRoot:"",root:"",navigation:"",title:"",button:"",buttonRemove:"",buttonAdd:"svc-logic-operator sl-paneldynamic__add-btn",progressTop:"",progressBottom:"",buttonPrev:"",buttonNext:"",progressContainer:"",progress:"",progressBar:"",progressText:"",separator:"sv-hidden",panelWrapper:"",panelWrapperInRow:"sl-panel-wrapper--in-row"},progress:"",progressBar:"",progressText:"",progressTextInBar:"",page:{root:"",title:"",description:""},pageTitle:"",pageDescription:"",row:"sl-row",rowMultiple:"sl-row--multiple",question:{mainRoot:"sl-question",flowRoot:"",asCell:"",header:"sl-question__header",headerLeft:"sl-question__header--left",headerTop:"",headerBottom:"",content:"",contentLeft:"",titleLeftRoot:"",titleOnAnswer:"",titleOnError:"",title:"sl-question__title",requiredText:"sl-question__required-text",number:"",description:"",descriptionUnderInput:"",comment:"",required:"",titleRequired:"",indent:0,footer:"",formGroup:"",hasError:"",disabled:""},image:{root:""},error:{root:"",icon:"",item:"",locationTop:"",locationBottom:""},checkbox:{root:"",item:"",itemSelectAll:"",itemNone:"",itemDisabled:"",itemChecked:"",itemHover:"",itemInline:"",label:"",labelChecked:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",column:""},radiogroup:{root:"",item:"",itemInline:"",label:"",labelChecked:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlLabel:"",materialDecorator:"",other:"",clearButton:"",column:""},boolean:{mainRoot:"",root:"",item:"",control:"",itemChecked:"",itemIndeterminate:"",itemDisabled:"",label:"",switch:"",disabledLabel:"",itemDecorator:"",materialDecorator:"",sliderText:"",slider:""},text:{root:"",small:"",controlDisabled:"",onError:""},multipletext:{root:"",item:"",itemTitle:"",row:"",cell:""},dropdown:{root:"",small:"",control:"",selectWrapper:"",other:"",onError:"",label:"",item:"",itemDisabled:"",itemChecked:"",itemHover:"",itemControl:"",itemDecorator:"",controlDisabled:"",controlLabel:"",materialDecorator:""},imagepicker:{root:"",item:"",itemInline:"",itemChecked:"",itemDisabled:"",itemHover:"",label:"",itemControl:"",image:"",itemText:"",clearButton:"",other:""},matrix:{mainRoot:"",tableWrapper:"",root:"",row:"",rowAdditional:"",rowError:"",cell:"",headerCell:"",label:"",itemValue:"",itemChecked:"",itemDisabled:"",itemHover:"",materialDecorator:"",itemDecorator:"",cellText:"",cellTextSelected:"",cellTextDisabled:""},matrixdropdown:{mainRoot:"",root:"",row:"",rowAdditional:"",cell:"",headerCell:""},matrixdynamic:{mainRoot:"sl-question st-row__question st-scrollable",root:"sl-table st-matrixdynamic",row:"sl-table__row",rowAdditional:"sl-table__row--additional",cell:"sl-table__cell",headerCell:"sl-table__cell st-table__cell--header",button:"sl-btn",detailRow:"sl-table__row st-table__row--detail",detailButton:"sl-table__cell--detail-button",detailButtonExpanded:"sl-table__cell--detail-button--expanded",detailIcon:"sl-detail-panel__icon",detailIconExpanded:"sl-detail-panel__icon--expanded",detailPanelCell:"sl-table__cell--detail-panel",actionsCell:"sl-table__cell st-table__cell--actions",buttonAdd:"sl-matrixdynamic__add-btn",buttonRemove:"sl-matrixdynamic__remove-btn",iconAdd:"",iconRemove:""},rating:{root:"",item:"",itemHover:"",selected:"",minText:"",itemText:"",maxText:"",itemDisabled:""},comment:{mainRoot:"",root:"spg-comment sl-comment",small:""},expression:"",file:{root:"",other:"",placeholderInput:"",preview:"",fileSign:"",fileSignBottom:"",fileDecorator:"",fileInput:"",noFileChosen:"",chooseFile:"",disabled:"",removeButton:"",removeButtonBottom:"",removeFile:"",removeFileSvg:"",wrapper:""},signaturepad:{root:"",small:"",controls:"",placeholder:"",clearButton:""},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"",body:"",header:{root:"",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}},embeddedsurvey:{mainRoot:"sl-embedded-survey"}}},"./src/components/tabs/logic-types.ts":
|
|
253
253
|
/*!********************************************!*\
|
|
254
254
|
!*** ./src/components/tabs/logic-types.ts ***!
|
|
255
255
|
\********************************************/
|
|
256
|
-
/*! exports provided: getLogicString, SurveyLogicType, SurveyLogicTypes */function(e,t,i){"use strict";i.r(t),i.d(t,"getLogicString",(function(){return
|
|
256
|
+
/*! exports provided: getLogicString, SurveyLogicType, SurveyLogicTypes */function(e,t,i){"use strict";i.r(t),i.d(t,"getLogicString",(function(){return s})),i.d(t,"SurveyLogicType",(function(){return l})),i.d(t,"SurveyLogicTypes",(function(){return u}));var o=i(/*! survey-core */"survey-core"),r=i(/*! ../../editorLocalization */"./src/editorLocalization.ts"),n=i(/*! ../../expressionToDisplayText */"./src/expressionToDisplayText.ts"),a=i(/*! ../../utils/utils */"./src/utils/utils.ts");function s(e){return r.editorLocalization.getString("ed.lg."+e)}var l=function(){function e(e,t,i){void 0===i&&(i=null),this.logicType=e,this.survey=t,this.options=i}return e.expressionToDisplayText=function(e,t,i){return new n.ExpressionToDisplayText(e,t).toDisplayText(i)},Object.defineProperty(e.prototype,"name",{get:function(){return this.logicType.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseClass",{get:function(){return this.logicType.baseClass},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propertyName",{get:function(){return this.logicType.propertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasVisibleElements",{get:function(){return!0!==this.logicType.isInvisible},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicPropertyName",{get:function(){return this.logicType.dynamicPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dependedOnPropertyName",{get:function(){return this.logicType.dependedOnPropertyName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return!!this.showInUI&&(!this.logicType.showIf||this.logicType.showIf(this.survey))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showTitlesInExpression",{get:function(){return!!this.options&&this.options.showTitlesInExpressions},enumerable:!1,configurable:!0}),e.prototype.createNewObj=function(e){var t=o.Serializer.createClass(this.baseClass);return e&&t.fromJSON(e.toJSON()),t.survey=this.survey,t.setOwner&&t.setOwner(this.survey),t},e.prototype.cloneElement=function(e){return this.isTrigger?this.createNewObj(e):e},e.prototype.areElementsEqual=function(e,t){return e===t||!(!this.isTrigger||e.getType()!==t.getType())&&o.Helpers.isTwoValueEquals(e.toJSON(),t.toJSON())},e.prototype.saveNewElement=function(e){var t=this.logicType.getCollection?this.logicType.getCollection(this.survey):null;!t&&this.isTrigger&&(t=this.survey.triggers),t&&t.indexOf(e)<0&&t.push(e)},Object.defineProperty(e.prototype,"showInUI",{get:function(){return!1!==this.logicType.showInUI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUniqueItem",{get:function(){return!0===this.logicType.isUniqueItem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"questionNames",{get:function(){return this.logicType.questionNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"displayName",{get:function(){return s(this.name+"Name")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return s(this.name+"Description")},enumerable:!1,configurable:!0}),e.prototype.getDisplayText=function(e){var t=s(this.name+"Text");if(this.logicType.getDisplayText)return this.logicType.getDisplayText(e,t,this);var i="";return this.logicType.getDisplayTextName?i=this.logicType.getDisplayTextName(e):e&&e.name&&(i=e.name),i?t.format(this.formatElName(i)):t},e.prototype.formatElName=function(e){if(this.showTitlesInExpression&&this.survey){var t=this.survey.getQuestionByName(e);t&&t.title&&(e=t.title)}return Object(a.wrapTextByCurlyBraces)(e)},e.prototype.formatExpression=function(t){return e.expressionToDisplayText(this.survey,this.options,t)},Object.defineProperty(e.prototype,"isTrigger",{get:function(){return!!this.baseClass&&this.baseClass.indexOf("trigger")>-1},enumerable:!1,configurable:!0}),e}(),u=function(){function e(){}return e.types=[{name:"page_visibility",baseClass:"page",propertyName:"visibleIf",showIf:function(e){return e.pages.length>1}},{name:"panel_visibility",baseClass:"panel",propertyName:"visibleIf",showIf:function(e){return e.getAllPanels().length>0}},{name:"panel_enable",baseClass:"panel",propertyName:"enableIf",showIf:function(e){return e.getAllPanels().length>0}},{name:"question_visibility",baseClass:"question",propertyName:"visibleIf",showIf:function(e){return e.getAllQuestions().length>0}},{name:"question_enable",baseClass:"question",propertyName:"enableIf",showIf:function(e){return e.getAllQuestions().length>0}},{name:"question_require",baseClass:"question",propertyName:"requiredIf",showIf:function(e){return e.getAllQuestions().length>0}},{name:"expression_expression",baseClass:"expression",propertyName:"expression",showInUI:!1},{name:"matrixdropdowncolumn_visibleIf",baseClass:"matrixdropdowncolumn",propertyName:"visibleIf",showInUI:!1},{name:"matrixdropdowncolumn_enableIf",baseClass:"matrixdropdowncolumn",propertyName:"enableIf",showInUI:!1},{name:"matrixdropdowncolumn_requiredIf",baseClass:"matrixdropdowncolumn",propertyName:"requiredIf",showInUI:!1},{name:"matrixdropdowncolumn_totalExpression",baseClass:"matrixdropdowncolumn",propertyName:"totalExpression",showInUI:!1},{name:"trigger_complete",baseClass:"completetrigger",propertyName:"expression",isUniqueItem:!0,isInvisible:!0},{name:"trigger_setvalue",baseClass:"setvaluetrigger",propertyName:"expression",dynamicPropertyName:"setValue",dependedOnPropertyName:"setToName",questionNames:["setToName"],getDisplayText:function(e,t,i){return t.format(i.formatElName(e.setToName),e.setValue)}},{name:"trigger_copyvalue",baseClass:"copyvaluetrigger",propertyName:"expression",questionNames:["setToName","fromName"],getDisplayText:function(e,t,i){return t.format(i.formatElName(e.setToName),i.formatElName(e.fromName))}},{name:"trigger_skip",baseClass:"skiptrigger",propertyName:"expression",questionNames:["gotoName"],isUniqueItem:!0,getDisplayTextName:function(e){return e.gotoName}},{name:"trigger_runExpression",baseClass:"runexpressiontrigger",propertyName:"expression",questionNames:["setToName"],getDisplayText:function(e,t,i){var o=s("trigger_runExpressionText1");return o=o.format(i.formatExpression(e.runExpression)),e.setToName&&(o+=s("trigger_runExpressionText2").format(i.formatElName(e.setToName))),o}},{name:"completedHtmlOnCondition",baseClass:"htmlconditionitem",propertyName:"expression",isUniqueItem:!0,getCollection:function(e){return e.completedHtmlOnCondition}},{name:"trigger_runExpression_Expression",baseClass:"runexpressiontrigger",propertyName:"runExpression",showInUI:!1},{name:"question_expressionValidator",baseClass:"expressionvalidator",propertyName:"expression",showInUI:!1},{name:"matrix_rowsVisibleIf",baseClass:"matrix",propertyName:"rowsVisibleIf",showInUI:!1},{name:"matrix_columnsVisibleIf",baseClass:"matrix",propertyName:"columnsVisibleIf",showInUI:!1},{name:"matrixdropdown_rowsVisibleIf",baseClass:"matrixdropdown",propertyName:"rowsVisibleIf",showInUI:!1},{name:"select_choicesVisibleIf",baseClass:"selectbase",propertyName:"choicesVisibleIf",showInUI:!1},{name:"select_choicesEnableIf",baseClass:"selectbase",propertyName:"choicesEnableIf",showInUI:!1},{name:"itemvalue_visibleIf",baseClass:"itemvalue",propertyName:"visibleIf",showInUI:!1},{name:"itemvalue_enableIf",baseClass:"itemvalue",propertyName:"enableIf",showInUI:!1},{name:"calculatedValue",baseClass:"calculatedvalue",propertyName:"expression",showInUI:!1}],e}()},"./src/components/tabs/logic-ui.scss":
|
|
257
257
|
/*!*******************************************!*\
|
|
258
258
|
!*** ./src/components/tabs/logic-ui.scss ***!
|
|
259
259
|
\*******************************************/
|
|
@@ -261,7 +261,7 @@ License: MIT
|
|
|
261
261
|
/*!*****************************************!*\
|
|
262
262
|
!*** ./src/components/tabs/logic-ui.ts ***!
|
|
263
263
|
\*****************************************/
|
|
264
|
-
/*! exports provided: SurveyLogicUI */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyLogicUI",(function(){return m}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../../property-grid/condition-survey */"./src/property-grid/condition-survey.ts"),a=i(/*! ../../settings */"./src/settings.ts"),s=i(/*! ./logic-item-editor */"./src/components/tabs/logic-item-editor.ts"),l=i(/*! ./logic-types */"./src/components/tabs/logic-types.ts"),u=i(/*! ./logic */"./src/components/tabs/logic.ts"),c=i(/*! ../../property-grid/index */"./src/property-grid/index.ts"),d=i(/*! ../../utils/actions */"./src/utils/actions.ts"),p=(i(/*! ./logic-ui.scss */"./src/components/tabs/logic-ui.scss"),i(/*! ./logic-theme */"./src/components/tabs/logic-theme.ts")),m=function(e){function t(t,i){void 0===i&&(i=null);var o=e.call(this,t,i)||this;return o.survey=t,o.options=i,o.itemUIHash={},o.options||(o.options=new a.EmptySurveyCreatorOptions),o.setupToolbarItems(),o.update(),o}return Object(o.__extends)(t,e),t.prototype.update=function(t,i){var o=this;void 0===t&&(t=null),void 0===i&&(i=null),e.prototype.update.call(this,t,i);var r=this.options.createSurvey(this.getLogicItemSurveyJSON(),"logic-items");r.css=p.logicCss,this.itemsSurveyValue=r,this.itemsSurvey.onMatrixRowRemoving.add((function(e,t){var i=o.visibleItems[t.rowIndex];t.allow=o.canRemoveItem(i)})),this.itemsSurvey.onMatrixRowRemoved.add((function(e,t){var i=o.visibleItems[t.rowIndex],r=i===o.editableItem;o.removeItem(i,!1),r&&(o.mode="view",o.updateNewActionState()),o.expressionEditorCanShowBuilder=!!o.editableItem})),this.itemsSurvey.onGetMatrixRowActions.add((function(e,t){o.readOnly||(Object(d.updateMatrixLogicExpandAction)(t.question,t.actions,t.row),Object(d.updateMatrixRemoveAction)(t.question,t.actions,t.row))})),this.updateItemsSurveyData()},t.prototype.dispose=function(){for(var t in e.prototype.dispose.call(this),this.itemUIHash){var i=this.itemUIHash[t];i.expressionEditor.dispose(),i.itemEditor.dispose()}this.itemUIHash={}},t.prototype.addNewUI=function(){0!=this.items.length&&this.items[this.items.length-1].isNew||this.addNew(),this.matrixItems.visibleRows[this.matrixItems.visibleRows.length-1].showDetailPanel()},t.prototype.toggleExpressionEditorIsFastEntry=function(){this.expressionEditorIsFastEntry=!this.expressionEditorIsFastEntry,this.expressionEditor&&this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry)},t.prototype.onPropertyValueChanged=function(t,i,o){e.prototype.onPropertyValueChanged.call(this,t,i,o),"items"===t&&this.updateItemsSurveyData()},Object.defineProperty(t.prototype,"expressionEditor",{get:function(){return this.expressionEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditor",{get:function(){return this.itemEditorValue},enumerable:!1,configurable:!0}),t.prototype.getExpressionEditor=function(e){return this.getLogicItemUI(e).expressionEditor},t.prototype.getLogicItemEditor=function(e){return this.getLogicItemUI(e).itemEditor},t.prototype.getLogicItemUI=function(e){var t=this.itemUIHash[e.id];return t||((t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new s.LogicItemEditor(e,this.options)}).expressionEditor.text=e.expression,this.itemUIHash[e.id]=t),t},Object.defineProperty(t.prototype,"expressionSurvey",{get:function(){return this.expressionEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditorSurvey",{get:function(){return this.itemEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemsSurvey",{get:function(){return this.itemsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.items.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixItems",{get:function(){return this.itemsSurvey.getQuestionByName("items")},enumerable:!1,configurable:!0}),t.prototype.onStartEditing=function(){e.prototype.onStartEditing.call(this),this.expressionEditorValue=this.getExpressionEditor(this.editableItem),this.itemEditorValue=this.getLogicItemEditor(this.editableItem),this.expressionEditorIsFastEntry=!1,this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry),this.expressionEditorCanShowBuilder=n.ConditionEditor.canBuildExpression(this.expressionEditor.text)},t.prototype.onEndEditing=function(){this.editableItem&&(this.editableItem.isModified=!!this.itemEditor&&!!this.expressionEditor&&(this.itemEditor.isModified||this.expressionEditor.isModified(this.editableItem.expression))),e.prototype.onEndEditing.call(this),this.expressionEditorValue=null,this.itemEditorValue=null},t.prototype.onEditableItemApply=function(){this.expressionEditor.apply(),this.itemEditor.apply(),this.editableItem.apply(this.expressionEditor.text),this.editableItem.actions.length!=this.itemEditor.panels.length&&this.itemEditor.setEditableItem(this.editableItem),this.itemEditor.resetModified(),this.editableItem.isNew=!1,this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.isReady?!!this.itemEditor.hasErrors()&&(this.errorText=Object(l.getLogicString)("actionInvalid"),e&&e.notify(this.errorText,"error"),!0):(this.errorText=Object(l.getLogicString)("expressionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.getExpressionText=function(){return this.expressionEditor.text},t.prototype.getEditingActions=function(){return this.itemEditor.getEditingActions()},t.prototype.getLogicItemSurveyJSON=function(){var e={elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,showHeader:!1,columns:[{cellType:"linkvalue",name:"
|
|
264
|
+
/*! exports provided: SurveyLogicUI */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyLogicUI",(function(){return m}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../../property-grid/condition-survey */"./src/property-grid/condition-survey.ts"),a=i(/*! ../../settings */"./src/settings.ts"),s=i(/*! ./logic-item-editor */"./src/components/tabs/logic-item-editor.ts"),l=i(/*! ./logic-types */"./src/components/tabs/logic-types.ts"),u=i(/*! ./logic */"./src/components/tabs/logic.ts"),c=i(/*! ../../property-grid/index */"./src/property-grid/index.ts"),d=i(/*! ../../utils/actions */"./src/utils/actions.ts"),p=(i(/*! ./logic-ui.scss */"./src/components/tabs/logic-ui.scss"),i(/*! ./logic-theme */"./src/components/tabs/logic-theme.ts")),m=function(e){function t(t,i){void 0===i&&(i=null);var o=e.call(this,t,i)||this;return o.survey=t,o.options=i,o.itemUIHash={},o.options||(o.options=new a.EmptySurveyCreatorOptions),o.setupToolbarItems(),o.update(),o}return Object(o.__extends)(t,e),t.prototype.update=function(t,i){var o=this;void 0===t&&(t=null),void 0===i&&(i=null),e.prototype.update.call(this,t,i);var r=this.options.createSurvey(this.getLogicItemSurveyJSON(),"logic-items");r.css=p.logicCss,this.itemsSurveyValue=r,this.itemsSurvey.onMatrixRowRemoving.add((function(e,t){var i=o.visibleItems[t.rowIndex];t.allow=o.canRemoveItem(i)})),this.itemsSurvey.onMatrixRowRemoved.add((function(e,t){var i=o.visibleItems[t.rowIndex],r=i===o.editableItem;o.removeItem(i,!1),r&&(o.mode="view",o.updateNewActionState()),o.expressionEditorCanShowBuilder=!!o.editableItem})),this.itemsSurvey.onGetMatrixRowActions.add((function(e,t){o.readOnly||(Object(d.updateMatrixLogicExpandAction)(t.question,t.actions,t.row),Object(d.updateMatrixRemoveAction)(t.question,t.actions,t.row))})),this.updateItemsSurveyData()},t.prototype.dispose=function(){for(var t in e.prototype.dispose.call(this),this.itemUIHash){var i=this.itemUIHash[t];i.expressionEditor.dispose(),i.itemEditor.dispose()}this.itemUIHash={}},t.prototype.addNewUI=function(){0!=this.items.length&&this.items[this.items.length-1].isNew||this.addNew(),this.matrixItems.visibleRows[this.matrixItems.visibleRows.length-1].showDetailPanel()},t.prototype.toggleExpressionEditorIsFastEntry=function(){this.expressionEditorIsFastEntry=!this.expressionEditorIsFastEntry,this.expressionEditor&&this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry)},t.prototype.onPropertyValueChanged=function(t,i,o){e.prototype.onPropertyValueChanged.call(this,t,i,o),"items"===t&&this.updateItemsSurveyData()},Object.defineProperty(t.prototype,"expressionEditor",{get:function(){return this.expressionEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditor",{get:function(){return this.itemEditorValue},enumerable:!1,configurable:!0}),t.prototype.getExpressionEditor=function(e){return this.getLogicItemUI(e).expressionEditor},t.prototype.getLogicItemEditor=function(e){return this.getLogicItemUI(e).itemEditor},t.prototype.getLogicItemUI=function(e){var t=this.itemUIHash[e.id];return t||((t={expressionEditor:this.createExpressionPropertyEditor(),itemEditor:new s.LogicItemEditor(e,this.options)}).expressionEditor.text=e.expression,this.itemUIHash[e.id]=t),t},Object.defineProperty(t.prototype,"expressionSurvey",{get:function(){return this.expressionEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemEditorSurvey",{get:function(){return this.itemEditor.editSurvey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"itemsSurvey",{get:function(){return this.itemsSurveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasItems",{get:function(){return this.items.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"matrixItems",{get:function(){return this.itemsSurvey.getQuestionByName("items")},enumerable:!1,configurable:!0}),t.prototype.onStartEditing=function(){e.prototype.onStartEditing.call(this),this.expressionEditorValue=this.getExpressionEditor(this.editableItem),this.itemEditorValue=this.getLogicItemEditor(this.editableItem),this.expressionEditorIsFastEntry=!1,this.expressionEditor.setIsFastEntry(this.expressionEditorIsFastEntry),this.expressionEditorCanShowBuilder=n.ConditionEditor.canBuildExpression(this.expressionEditor.text)},t.prototype.onEndEditing=function(){this.editableItem&&(this.editableItem.isModified=!!this.itemEditor&&!!this.expressionEditor&&(this.itemEditor.isModified||this.expressionEditor.isModified(this.editableItem.expression))),e.prototype.onEndEditing.call(this),this.expressionEditorValue=null,this.itemEditorValue=null},t.prototype.onEditableItemApply=function(){this.expressionEditor.apply(),this.itemEditor.apply(),this.editableItem.apply(this.expressionEditor.text),this.editableItem.actions.length!=this.itemEditor.panels.length&&this.itemEditor.setEditableItem(this.editableItem),this.itemEditor.resetModified(),this.editableItem.isNew=!1,this.editableItem.isSuitable(this.questionFilter,this.actionTypeFilter)?this.updateItemsSurveyData():(this.questionFilter="",this.actionTypeFilter="")},t.prototype.hasErrorInUI=function(){var e=this.survey.creator;return this.expressionEditor.isReady?!!this.itemEditor.hasErrors()&&(this.errorText=Object(l.getLogicString)("actionInvalid"),e&&e.notify(this.errorText,"error"),!0):(this.errorText=Object(l.getLogicString)("expressionInvalid"),e&&e.notify(this.errorText,"error"),!0)},t.prototype.getExpressionText=function(){return this.expressionEditor.text},t.prototype.getEditingActions=function(){return this.itemEditor.getEditingActions()},t.prototype.getLogicItemSurveyJSON=function(){var e={elements:[{type:"matrixdynamic",name:"items",titleLocation:"hidden",showColumnHeader:!1,detailPanelMode:"underRowSingle",allowAddRows:!1,allowAdaptiveActions:!1,rowCount:0,showHeader:!1,columns:[{cellType:"linkvalue",name:"rules",showTooltip:!0,width:"50%"}]}]};return Object(c.setSurveyJSONForPropertyGrid)(e),e},t.prototype.createExpressionPropertyEditor=function(){var e=this,t=new n.ConditionEditor(this.survey,null,this.options);return t.isModal=!1,t.editSurvey.onValueChanged.add((function(t,i){"textEditor"===i.name&&(e.expressionEditorCanShowBuilder=n.ConditionEditor.canBuildExpression(i.value))})),t},t.prototype.getVisibleItems=function(){var e=this;return this.items.filter((function(t){return t.isNew||t.isSuitable(e.questionFilter,e.actionTypeFilter)}))},t.prototype.updateItemsSurveyData=function(){var e=this;if(this.itemsSurvey){var t=[];this.visibleItems=this.getVisibleItems();for(var i=0;i<this.visibleItems.length;i++)t.push({rules:this.visibleItems[i].getDisplayText()});this.matrixItems.onHasDetailPanelCallback=function(e){return!0},this.matrixItems.onCreateDetailPanelCallback=function(t,i){t.onDetailPanelShowingChanged=function(){if(e.expressionEditorCanShowBuilder=t.isDetailPanelShowing,t.isDetailPanelShowing){if("view"===e.mode){var o=e.visibleItems[t.rowIndex-1];e.editItem(o)}var r=i.getQuestionByName("conditions"),n=i.getQuestionByName("actions");r.embeddedSurvey=e.expressionEditor.editSurvey,n.embeddedSurvey=e.itemEditorValue.editSurvey,e.updateRowIsAdditionalClasses(t.rowIndex-1,!1)}else e.mode="view",e.updateRenderedRows();e.updateNewActionState()},i.addNewQuestion("embeddedsurvey","conditions"),i.addNewQuestion("embeddedsurvey","actions"),i.footerActions.push({id:"saveDetailPanel",innerCss:"sl-panel__done-button",title:e.getLocString("pe.doneEditing"),action:function(){e.saveEditableItem()&&t.hideDetailPanel(!0)}})},this.matrixItems.onCellCreatedCallback=function(e){e.cell.question.linkClickCallback=function(){e.row.isDetailPanelShowing?e.row.hideDetailPanel():e.row.showDetailPanel()},e.cell.question.showClear=!1,e.cell.question.allowClear=!1},this.matrixItems.value=t,this.updateRenderedRows()}},t.prototype.updateRenderedRows=function(){var e=this;this.visibleItems.forEach((function(t,i){e.updateRowIsAdditionalClasses(i,e.visibleItems[i].isModified||e.visibleItems[i].isNew)}))},t.prototype.updateRowIsAdditionalClasses=function(e,t){this.matrixItems.renderedTable&&(this.matrixItems.renderedTable.rows[e].isAdditionalClasses=t)},t.prototype.updateNewActionState=function(){this.addNewButton.enabled="new"!==this.mode},t.prototype.setupToolbarItems=function(){var e=this;this.addNewButton=new r.Action({id:"svd-logic-addNew",title:this.addNewText,tooltip:this.addNewText,component:"sv-action-bar-item",enabled:!0,action:function(){e.addNewUI()}})},Object.defineProperty(t.prototype,"addNewText",{get:function(){return Object(l.getLogicString)("addNewItem")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"emptyTabPlaceHolder",{get:function(){return Object(l.getLogicString)("empty_tab")},enumerable:!1,configurable:!0}),Object(o.__decorate)([Object(r.property)()],t.prototype,"itemsSurveyValue",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"expressionEditorIsFastEntry",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"expressionEditorCanShowBuilder",void 0),Object(o.__decorate)([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"questionFilter",void 0),Object(o.__decorate)([Object(r.property)({onSet:function(e,t){t.updateItemsSurveyData()}})],t.prototype,"actionTypeFilter",void 0),t}(u.SurveyLogic)},"./src/components/tabs/logic.scss":
|
|
265
265
|
/*!****************************************!*\
|
|
266
266
|
!*** ./src/components/tabs/logic.scss ***!
|
|
267
267
|
\****************************************/
|
|
@@ -313,7 +313,7 @@ License: MIT
|
|
|
313
313
|
/*!*****************************!*\
|
|
314
314
|
!*** ./src/creator-base.ts ***!
|
|
315
315
|
\*****************************/
|
|
316
|
-
/*! exports provided: TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorBase, StylesManager, getElementWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable */function(e,t,i){"use strict";i.r(t),i.d(t,"TabbedMenuItem",(function(){return N})),i.d(t,"TabbedMenuContainer",(function(){return O})),i.d(t,"ToolbarActionContainer",(function(){return _})),i.d(t,"CreatorBase",(function(){return A})),i.d(t,"StylesManager",(function(){return V})),i.d(t,"getElementWrapperComponentName",(function(){return j})),i.d(t,"getElementWrapperComponentData",(function(){return I})),i.d(t,"getItemValueWrapperComponentName",(function(){return z})),i.d(t,"getItemValueWrapperComponentData",(function(){return M})),i.d(t,"isStringEditable",(function(){return q}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ./settings */"./src/settings.ts"),a=i(/*! ./editorLocalization */"./src/editorLocalization.ts"),s=i(/*! ./json5 */"./src/json5.ts"),l=i(/*! ./questionconverter */"./src/questionconverter.ts"),u=i(/*! ./textWorker */"./src/textWorker.ts"),c=i(/*! ./toolbox */"./src/toolbox.ts"),d=i(/*! ./utils/utils */"./src/utils/utils.ts"),p=i(/*! ./survey-helper */"./src/survey-helper.ts"),m=i(/*! ./pages-controller */"./src/pages-controller.ts"),g=i(/*! ./selection-history */"./src/selection-history.ts"),h=i(/*! ./components/tabs/embed */"./src/components/tabs/embed.ts"),v=i(/*! ./components/tabs/json-editor-ace */"./src/components/tabs/json-editor-ace.ts"),y=i(/*! ./components/tabs/json-editor-textarea */"./src/components/tabs/json-editor-textarea.ts"),f=i(/*! ./components/tabs/test-plugin */"./src/components/tabs/test-plugin.ts"),b=i(/*! ./components/tabs/logic */"./src/components/tabs/logic.ts"),x=i(/*! ./components/tabs/translation-plugin */"./src/components/tabs/translation-plugin.ts"),w=i(/*! ./components/tabs/logic-plugin */"./src/components/tabs/logic-plugin.ts"),T=i(/*! ./components/notifier */"./src/components/notifier.ts"),k=i(/*! ./utils/actions */"./src/utils/actions.ts"),S=i(/*! ./plugins/undo-redo */"./src/plugins/undo-redo/index.ts"),P=i(/*! ./components/tabs/designer-plugin */"./src/components/tabs/designer-plugin.ts"),E=i(/*! ./creator-responsivity-manager */"./src/creator-responsivity-manager.ts"),C=i(/*! ./components/side-bar/side-bar-model */"./src/components/side-bar/side-bar-model.ts"),N=(i(/*! ./components/creator.scss */"./src/components/creator.scss"),i(/*! ./components/string-editor.scss */"./src/components/string-editor.scss"),i(/*! ./creator-theme/creator.scss */"./src/creator-theme/creator.scss"),function(e){function t(t){return e.call(this,t)||this}return Object(o.__extends)(t,e),t}(r.Action)),O=function(e){function t(){var t=e.call(this)||this;return t.dotsItemPopupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return Object(o.__extends)(t,e),t}(r.AdaptiveActionContainer),_=function(e){function t(t){var i=e.call(this)||this;return i.creator=t,i}return Object(o.__extends)(t,e),t.prototype.getRenderedActions=function(){var e=this.actions,t=this.creator.sideBar.getExpandAction(),i=e.indexOf(t);return-1!==i&&(e.splice(i,1),e.push(t)),e},t}(r.ActionContainer),A=function(e){function t(i,o){var a=e.call(this)||this;a.options=i,a.isRTLValue=!1,a.alwaySaveTextInPropertyEditorsValue=!1,a.pageEditModeValue="standard",a.newQuestions=[],a.newPanels=[],a.plugins={},a.onElementDeleting=new r.Event,a.onGetPropertyReadOnly=new r.Event,a.onSurveyInstanceCreated=new r.Event,a.onGetObjectDisplayName=new r.Event,a.onElementAllowOperations=new r.Event,a.onDefineElementMenuItems=new r.Event,a.onShowingProperty=new r.Event,a.onCanShowProperty=a.onShowingProperty,a.onPropertyEditorCreated=new r.Event,a.onPropertyEditorUpdateTitleActions=new r.Event,a.onCanDeleteItem=new r.Event,a.onCollectionItemDeleting=new r.Event,a.onCollectionItemAllowOperations=new r.Event,a.onItemValueAdded=new r.Event,a.onMatrixColumnAdded=new r.Event,a.onSetPropertyEditorOptions=new r.Event,a.onGenerateNewName=new r.Event,a.onPropertyValidationCustomError=new r.Event,a.onPropertyValueChanging=new r.Event,a.onConditionQuestionsGetList=new r.Event,a.onConditionGetTitle=new r.Event,a.onModified=new r.Event,a.onQuestionAdded=new r.Event,a.onPanelAdded=new r.Event,a.onPageAdded=new r.Event,a.onDesignerSurveyCreated=new r.Event,a.onPreviewSurveyCreated=new r.Event,a.onTestSurveyCreated=a.onPreviewSurveyCreated,a.onNotify=new r.Event,a.onSelectedElementChanging=new r.Event,a.onSelectedElementChanged=new r.Event,a.onOpenFileChooser=new r.Event,a.onUploadFile=new r.Event,a.onTranslationStringVisibility=new r.Event,a.useTabsInElementEditor=!1,a.maxLogicItemsInCondition=-1,a.showObjectTitles=!1,a.showTitlesInExpressions=!1,a.allowEditExpressionsInTextEditor=!0,a.maximumColumnsCount=n.settings.propertyGrid.maximumColumnsCount,a.maximumChoicesCount=n.settings.propertyGrid.maximumChoicesCount,a.maximumRowsCount=n.settings.propertyGrid.maximumRowsCount,a.maximumRateValues=n.settings.propertyGrid.maximumRateValues,a.showPagesInTestSurveyTab=!0,a.showSimulatorInTestSurveyTab=!0,a.allowModifyPages=!0,a.showDefaultLanguageInTestSurveyTab="auto",a.showInvisibleElementsInTestSurveyTab=!0,a.showPageSelectorInToolbar=!1,a.tabbedMenu=new O,a.showErrorOnFailedSave=!0,a.onActiveTabChanged=new r.Event,a.showPropertyGridValue=!0,a.onShowPropertyGridVisiblityChanged=new r.Event,a.onBeforeUndo=new r.Event,a.onBeforeRedo=new r.Event,a.onAfterUndo=new r.Event,a.onAfterRedo=new r.Event,a.onStateChanged=new r.Event,a.notifier=new T.Notifier,a.onKeyDownHandler=function(e){var t,i;Object.keys(a.shortcuts||{}).forEach((function(o){t=a.shortcuts[o],(i=e.metaKey?t.macOsHotkey:t.hotKey)&&!!i.ctrlKey==!!e.ctrlKey&&!!i.shiftKey==!!e.shiftKey&&i.keyCode===e.keyCode&&(i.keyCode<48&&function(e){if(!e.tagName)return!1;var t=e.tagName.toLowerCase();return-1!==["input","textarea"].indexOf(t)||"span"===t&&e.isContentEditable}(e.target)||t.execute(a.selectElement))}))},a.shortcuts={},a.autoSaveDelay=n.settings.autoSave.delay,a.autoSaveTimerId=null,a.saveNo=0,(o||"string"==typeof a.options||a.options instanceof String)&&(a.options=o||{},p.SurveyHelper.warnText("Creator constructor has one parameter, as creator options, in V2.")),a.toolbarValue=new _(a),a.pagesControllerValue=new m.PagesController(a),a.selectionHistoryControllerValue=new g.SelectionHistory(a),a.sideBar=new C.SideBarModel(a),a.setOptions(a.options),a.patchMetadata(),a.initSurveyWithJSON(JSON.parse(t.defaultNewSurveyText),!1),a.toolbox=new c.QuestionToolbox(a.options&&a.options.questionTypes?a.options.questionTypes:null,a),a.updateToolboxIsCompact(),a.initTabs(),a.initDragDrop();var s=a.sideBar.getExpandAction();return s&&a.toolbar.actions.push(s),a}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,"showPreviewTab",{get:function(){return this.showTestSurveyTab},set:function(e){this.showTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditSurveyTitle",{get:function(){return this.getPropertyValue("allowEditSurveyTitle",!0)},set:function(e){["title","description","logo","showTitle","logoWidth","logoHeight","logoFit"].forEach((function(t){return r.Serializer.findProperty("survey",t).visible=e})),this.setPropertyValue("allowEditSurveyTitle",e),this.designerPropertyGrid&&this.designerPropertyGrid.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"licenseText",{get:function(){return this.getLocString("survey.license")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageEditMode",{get:function(){return this.pageEditModeValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbarItems",{get:function(){return this.toolbarValue.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.toolbarValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showingViewName",{get:function(){return this.activeTab},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignerShowing",{get:function(){return"designer"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showDesigner=function(){this.activeTab="designer"},Object.defineProperty(t.prototype,"isTestSurveyShowing",{get:function(){return this.isPreviewShowing},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return"test"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showTestSurvey=function(){this.showPreview()},t.prototype.showPreview=function(){this.activeTab="test"},t.prototype.addPluginTab=function(e,t,i,o,r){var n=this,s=new N({id:e,title:i||a.editorLocalization.getString("ed."+e),componentContent:o||"svc-tab-"+e,data:t,action:function(){return n.makeNewViewActive(e)},active:this.viewType===e});r>=0&&r<this.tabs.length?this.tabs.splice(r,0,s):this.tabs.push(s),this.addPlugin(e,t)},t.prototype.addPlugin=function(e,t){this.plugins[e]=t},t.prototype.getPlugin=function(e){return this.plugins[e]},Object.defineProperty(t.prototype,"showPagesInPreviewTab",{get:function(){return this.showPagesInTestSurveyTab},set:function(e){this.showPagesInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSimulatorInPreviewTab",{get:function(){return this.showSimulatorInTestSurveyTab},set:function(e){this.showSimulatorInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDefaultLanguageInPreviewTab",{get:function(){return this.showDefaultLanguageInTestSurveyTab},set:function(e){this.showDefaultLanguageInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInvisibleElementsInPreviewTab",{get:function(){return this.showInvisibleElementsInTestSurveyTab},set:function(e){this.showInvisibleElementsInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabs",{get:function(){return this.tabbedMenu.actions},set:function(e){this.tabbedMenu.actions=e},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return a.editorLocalization.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){var t=this.text;this.setPropertyValue("readOnly",e),this.onSetReadOnly(e),this.text=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRTL",{get:function(){return this.isRTLValue},set:function(e){this.isRTLValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTab",{get:function(){return this.viewType},set:function(e){this.makeNewViewActive(e)},enumerable:!1,configurable:!0}),t.prototype.makeNewViewActive=function(e){if(e==this.viewType)return!1;if(!this.canSwitchViewType())return!1;var t=this.activatePlugin(e);return this.viewType=e,this.onActiveTabChanged.fire(this,{tabName:e,plugin:t,model:t?t.model:void 0}),!0},t.prototype.canSwitchViewType=function(){var e=this.currentPlugin;return!e||!e.deactivate||e.deactivate()},t.prototype.activatePlugin=function(e){var t=this.getPlugin(e);return t&&t.activate(),t},Object.defineProperty(t.prototype,"currentPlugin",{get:function(){return this.getPlugin(this.activeTab)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxCategories",{get:function(){return this.toolbox.categories},enumerable:!1,configurable:!0}),t.prototype.updateToolboxIsCompact=function(e){var t=null!=e&&null!=e;"right"==this.toolboxLocation?this.toolbox.isCompact=this.showPropertyGrid||t&&e:t&&(this.toolbox.isCompact=e)},t.prototype.onSurveyElementPropertyValueChanged=function(e,t,i){throw new Error("Method not implemented.")},Object.defineProperty(t.prototype,"showToolbox",{get:function(){return p.SurveyHelper.warnNonSupported("showToolbox","toolboxLocation"),"hidden"!==this.toolboxLocation},set:function(e){p.SurveyHelper.warnNonSupported("showToolbox","toolboxLocation"),this.toolboxLocation="none"===e||!1===e||"top"===e?"hidden":!0===e?"left":e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPropertyGrid",{get:function(){return this.showPropertyGridValue},set:function(e){!0===e||!1===e?this.showPropertyGrid!==e&&(this.showPropertyGridValue=e,this.updateToolboxIsCompact(),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e})):p.SurveyHelper.warnText("showPropertyGrid propertry grid is a boolean property now.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){p.SurveyHelper.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){p.SurveyHelper.warnNonSupported("leftContainerActiveItem")},Object.defineProperty(t.prototype,"undoRedoManager",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model.undoRedoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoRedoController",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model},enumerable:!1,configurable:!0}),t.prototype.startUndoRedoTransaction=function(e){void 0===e&&(e=""),this.undoRedoController&&this.undoRedoController.startTransaction(e)},t.prototype.stopUndoRedoTransaction=function(){this.undoRedoController&&this.undoRedoController.stopTransaction()},t.prototype.undo=function(){this.undoRedoController&&this.undoRedoController.undo()},t.prototype.redo=function(){this.undoRedoController&&this.undoRedoController.redo()},Object.defineProperty(t.prototype,"pagesController",{get:function(){return this.pagesControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionHistoryController",{get:function(){return this.selectionHistoryControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e},enumerable:!1,configurable:!0}),t.prototype.addPage=function(e){var t=e;if(t)this.survey.addPage(t);else{var i=p.SurveyHelper.getNewPageName(this.survey.pages);t=this.survey.addNewPage(i)}return this.selectElement(t),t},t.prototype.initTabs=function(){this.initPlugins(),this.initFooterToolbar(),this.tabs.length>0&&this.makeNewViewActive(this.tabs[0].id)},t.prototype.initPlugins=function(){this.addPlugin("undoredo",new S.UndoRedoPlugin(this)),this.showDesignerTab&&new P.TabDesignerPlugin(this),this.showPreviewTab&&new f.TabTestPlugin(this),this.showLogicTab&&new w.TabLogicPlugin(this),this.showJSONEditorTab&&(v.TabJsonEditorAcePlugin.hasAceEditor()?new v.TabJsonEditorAcePlugin(this):new y.TabJsonEditorTextareaPlugin(this)),this.showEmbeddedSurveyTab&&new h.TabEmbedPlugin(this),this.showTranslationTab&&new x.TabTranslationPlugin(this)},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbar||(this.footerToolbar=new r.ActionContainer,["undoredo","designer","test"].forEach((function(t){var i=e.getPlugin(t);i&&i.addFooterActions&&i.addFooterActions()})))},t.prototype.getOptions=function(){return this.options||{}},t.prototype.setOptions=function(e){e||(e={}),e.hasOwnProperty("generateValidJSON")||(e.generateValidJSON=!0),this.options=e,this.showDesignerTab=void 0===e.showDesignerTab||e.showDesignerTab,this.showLogicTab=void 0!==e.showLogicTab&&e.showLogicTab,this.showJSONEditorTab=void 0===e.showJSONEditorTab||e.showJSONEditorTab,this.showPreviewTab=void 0!==e.showPreviewTab?e.showPreviewTab:void 0===e.showTestSurveyTab||e.showTestSurveyTab,this.allowEditSurveyTitle=void 0===e.allowEditSurveyTitle||e.allowEditSurveyTitle,this.showEmbeddedSurveyTab=void 0!==e.showEmbeddedSurveyTab&&e.showEmbeddedSurveyTab,this.showTranslationTab=void 0!==e.showTranslationTab&&e.showTranslationTab,this.showLogicTab=void 0!==e.showLogicTab&&e.showLogicTab,this.haveCommercialLicense=void 0!==e.haveCommercialLicense&&e.haveCommercialLicense,this.showObjectTitles=void 0!==e.showObjectTitles&&e.showObjectTitles,this.showTitlesInExpressions=void 0!==e.showTitlesInExpressions&&e.showTitlesInExpressions,this.allowEditExpressionsInTextEditor=void 0===e.allowEditExpressionsInTextEditor||e.allowEditExpressionsInTextEditor,void 0!==e.maximumColumnsCount&&(this.maximumColumnsCount=e.maximumColumnsCount),void 0!==e.maximumChoicesCount&&(this.maximumChoicesCount=e.maximumChoicesCount),void 0!==e.maximumRowsCount&&(this.maximumRowsCount=e.maxiumumRowsCount),void 0!==e.maximumRateValues&&(this.maximumRateValues=e.maximumRateValues),this.useTabsInElementEditor=void 0!==e.useTabsInElementEditor&&e.useTabsInElementEditor,this.maxLogicItemsInCondition=void 0!==e.maxLogicItemsInCondition?e.maxLogicItemsInCondition:-1,this.showState=void 0!==e.showState&&e.showState,this.showOptions=void 0!==e.showOptions&&e.showOptions,this.generateValidJSON=this.options.generateValidJSON,this.isAutoSave=void 0!==e.isAutoSave&&e.isAutoSave,this.showErrorOnFailedSave=void 0===e.showErrorOnFailedSave||e.showErrorOnFailedSave,this.isRTLValue=void 0!==e.isRTL&&e.isRTL,void 0!==e.readOnly&&(this.readOnly=e.readOnly),void 0!==e.showPagesInTestSurveyTab&&(this.showPagesInPreviewTab=e.showPagesInTestSurveyTab),void 0!==e.showPagesInPreviewTab&&(this.showPagesInPreviewTab=e.showPagesInPreviewTab),void 0!==e.showSimulatorInTestSurveyTab&&(this.showSimulatorInPreviewTab=e.showSimulatorInTestSurveyTab),void 0!==e.showSimulatorInPreviewTab&&(this.showSimulatorInPreviewTab=e.showSimulatorInPreviewTab),void 0!==e.showDefaultLanguageInTestSurveyTab&&(this.showDefaultLanguageInPreviewTab=e.showDefaultLanguageInTestSurveyTab),void 0!==e.showDefaultLanguageInPreviewTab&&(this.showDefaultLanguageInPreviewTab=e.showDefaultLanguageInPreviewTab),void 0!==e.showInvisibleElementsInTestSurveyTab&&(this.showInvisibleElementsInPreviewTab=e.showInvisibleElementsInTestSurveyTab),void 0!==e.showInvisibleElementsInPreviewTab&&(this.showInvisibleElementsInPreviewTab=e.showInvisibleElementsInPreviewTab),void 0!==e.allowModifyPages&&(this.allowModifyPages=e.allowModifyPages),void 0!==e.pageEditMode&&(this.pageEditModeValue=e.pageEditMode,"single"===this.pageEditModeValue&&(r.Serializer.findProperty("survey","pages").visible=!1,r.Serializer.findProperty("question","page").visible=!1,r.Serializer.findProperty("panel","page").visible=!1,this.showJSONEditorTab=!1))},t.prototype.setPropertyPlaceHolder=function(e,t,i){var o=r.Serializer.findProperty(e,t);o&&(o.placeholder=i)},t.prototype.patchMetadata=function(){this.setPropertyPlaceHolder("survey","title","pe.surveyTitlePlaceholder"),this.setPropertyPlaceHolder("survey","description","pe.surveyDescriptionPlaceholder"),r.Serializer.findProperty("survey","logoPosition").visible=!1,this.setPropertyPlaceHolder("page","title","pe.pageTitlePlaceholder"),this.setPropertyPlaceHolder("page","description","pe.pageDescriptionPlaceholder")},t.prototype.isCanModifyProperty=function(e,t){var i,o,n=r.Serializer.findProperty(e.getType(),t);if(e instanceof r.ItemValue){if(i=e.locOwner,o=r.Serializer.findProperty(i.getType(),e.ownerPropertyName),!1===this.getElementAllowOperations(i).allowEdit)return!1;var a={allowDelete:!0,allowEdit:!0};if(this.onCollectionItemAllowingCallback(i,n,i.getPropertyValue(o.name),e,a),!1===a.allowEdit)return!1;if(this.onIsPropertyReadOnlyCallback(i,o,o.readOnly,null,null))return!1}return!(e instanceof r.SurveyElement&&!1===this.getElementAllowOperations(e).allowEdit)&&(!n||!this.onIsPropertyReadOnlyCallback(e,n,n.readOnly,i,o))},t.prototype.onIsPropertyReadOnlyCallback=function(e,t,i,o,r){var n=this.readOnly||i;if(this.onGetPropertyReadOnly.isEmpty)return n;var a={obj:e,property:t,readOnly:n,propertyName:t.name,parentObj:o,parentProperty:r};return this.onGetPropertyReadOnly.fire(this,a),a.readOnly},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),t.prototype.initSurveyWithJSON=function(e,t){var i=this;this.existingPages={};var o=this.createSurvey({});o.css=r.defaultV2Css,o.setDesignMode(!0),o.lazyRendering=!0,o.setJsonObject(e),o.logoPosition="right",o.isEmpty&&o.setJsonObject(this.getDefaultSurveyJson()),o.pages.forEach((function(e){i.existingPages[e.id]=!0})),this.onDesignerSurveyCreated.fire(this,{survey:o}),o.onQuestionAdded.add((function(e,t){i.doOnQuestionAdded(t.question,t.parentPanel)})),o.onPanelAdded.add((function(e,t){i.doOnPanelAdded(t.panel,t.parentPanel)})),o.onPageAdded.add((function(e,t){i.existingPages[t.page.id]||(i.existingPages[t.page.id]=!0,i.doOnPageAdded(t.page))})),o.onGetMatrixRowActions.add((function(e,t){Object(k.updateMatrixRemoveAction)(t.question,t.actions,t.row)})),this.setSurvey(o);var n=this.getPlugin(this.activeTab);n&&n.update&&n.update()},t.prototype.initDragDrop=function(){this.initDragDropSurveyElements(),this.initDragDropChoices()},t.prototype.initDragDropSurveyElements=function(){var e=this;r.DragDropSurveyElements.restrictDragQuestionBetweenPages=n.settings.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new r.DragDropSurveyElements(null,this),this.dragDropSurveyElements.onBeforeDrop.add((function(t,i){e.startUndoRedoTransaction("drag drop")})),this.dragDropSurveyElements.onAfterDrop.add((function(t,i){e.stopUndoRedoTransaction(),e.selectElement(i.draggedElement,void 0,!1)}))},t.prototype.initDragDropChoices=function(){var e=this;this.dragDropChoices=new r.DragDropChoices(null,this),this.dragDropChoices.onBeforeDrop.add((function(t,i){e.startUndoRedoTransaction("drag drop")})),this.dragDropChoices.onAfterDrop.add((function(t,i){e.stopUndoRedoTransaction(),e.selectElement(i.draggedElement,void 0,!1)}))},t.prototype.updateElementsOnLocaleChanged=function(e,t){if("survey"===e.getType()&&"locale"===t)for(var i=this.survey.pages,o=0;o<i.length;o++)i[o].locStrsChanged()},t.prototype.updateConditionsOnQuestionNameChanged=function(e,t,i){if(this.isObjQuestion(e)&&("name"!==t||e.valueName||this.updateConditions(i,e.name),"valueName"===t)){var o=i||e.name,r=e.valueName?e.valueName:e.name;this.updateConditions(o,r)}},t.prototype.updatePagesController=function(e,t){"name"!=t&&"title"!=t||!this.isObjPage(e)||this.pagesController.pageNameChanged(e)},t.prototype.updateConditions=function(e,t){e!==t&&new b.SurveyLogic(this.survey,this).renameQuestion(e,t)},t.prototype.isObjQuestion=function(e){return this.isObjThisType(e,"question")},t.prototype.isObjPage=function(e){return this.isObjThisType(e,"page")},t.prototype.isObjThisType=function(e,t){for(var i=r.Serializer.findClass(e.getType());i&&i.parentName;){if(i.name===t)return!0;i=r.Serializer.findClass(i.parentName)}return!!i&&i.name===t},t.prototype.doOnQuestionAdded=function(e,t){e.name=this.generateUniqueName(e,e.name);var i={question:e,page:this.getPageByElement(e)};this.onQuestionAdded.fire(this,i)},t.prototype.doOnPanelAdded=function(e,t){var i={panel:e,page:this.getPageByElement(e)};this.onPanelAdded.fire(this,i)},t.prototype.doOnPageAdded=function(e){var t={page:e};this.onPageAdded.fire(this,t),this.setModified({type:"PAGE_ADDED",newValue:t.page})},t.prototype.getPageByElement=function(e){return this.survey.getPageByElement(e)},t.prototype.getDefaultSurveyJson=function(){var e=n.settings.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=a.editorLocalization.getString("ed.newPageName")+"1"),e},t.prototype.setSurvey=function(e){this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=e,this.selectElement(e),this.pagesController.onSurveyChanged(),this.selectionHistoryController.reset()},t.prototype.getSurveyTextFromDesigner=function(){if(!this.survey)return"";var e=this.survey.toJSON(),t=n.settings.jsonEditor.indentation;return this.options&&this.options.generateValidJSON?JSON.stringify(e,null,t):(new s.SurveyJSON5).stringify(e,null,t)},t.prototype.setTextValue=function(e){this.setSurveyJSONTextCallback&&this.setSurveyJSONTextCallback(e)},t.prototype.changeText=function(e,t){void 0===t&&(t=!1),this.setTextValue(e);var i=new u.SurveyTextWorker(e);i.isJsonCorrect?this.initSurveyWithJSON(i.survey.toJSON(),t):this.viewType="editor"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getSurveyJSONTextCallback?this.getSurveyJSONTextCallback().text:this.getSurveyTextFromDesigner()},set:function(e){this.changeText(e,!0)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){if("editor"!=this.viewType)return(new r.JsonObject).toJsonObject(this.survey);var e=this.text,t=new u.SurveyTextWorker(e);return t.isJsonCorrect?(new r.JsonObject).toJsonObject(t.survey):null},t.prototype.getObjectDisplayName=function(e,t,i){void 0===t&&(t=void 0),void 0===i&&(i=void 0),i||(i=p.SurveyHelper.getObjectName(e,this.showObjectTitles));var o={obj:e,displayName:i,reason:t};return this.onGetObjectDisplayName.fire(this,o),o.displayName},t.prototype.createSurvey=function(e,t){void 0===e&&(e={}),void 0===t&&(t="designer");var i=this.createSurveyCore(e,t);return"designer"!=t&&"test"!=t&&(i.locale=a.editorLocalization.currentLocale),this.onSurveyInstanceCreated.fire(this,{survey:i,reason:t}),i},t.prototype.createSurveyCore=function(e,t){throw void 0===e&&(e={}),new Error("createSurveyCore method should be overridden/implemented")},Object.defineProperty(t.prototype,"state",{get:function(){return this._stateValue?this._stateValue:""},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){this._stateValue=e,this.onStateChanged.fire(this,{val:e}),e&&this.notify(this.getLocString("ed."+e))},t.prototype.setModified=function(e){void 0===e&&(e=null),this.setState("modified"),this.onModified.fire(this,e),this.isAutoSave&&this.doAutoSave()},t.prototype.notify=function(e,t){void 0===t&&(t="info"),this.onNotify.isEmpty?this.notifier.notify(e,t):this.onNotify.fire(this,{message:e})},t.prototype.convertQuestion=function(e,t){var i=l.QuestionConverter.convertObject(e,t);return this.setModified({type:"QUESTION_CONVERTED",className:t,oldValue:e,newValue:i}),i},Object.defineProperty(t.prototype,"JSON",{get:function(){return this.survey.toJSON()},set:function(e){"editor"==this.viewType?this.setTextValue(JSON.stringify(e)):this.initSurveyWithJSON(e,!0)},enumerable:!1,configurable:!0}),t.prototype.loadSurvey=function(e){var t=this;(new r.dxSurveyService).loadSurvey(e,(function(e,i,o){e&&i&&(t.JSON=i)}))},t.prototype.doClickQuestionCore=function(e,t,i,o){void 0===t&&(t="ADDED_FROM_TOOLBOX"),void 0===i&&(i=-1),void 0===o&&(o=null),0==this.survey.pageCount&&this.survey.addNewPage();var r=this.currentPage,n=this.getSelectedSurveyElement();n&&n.parent&&n.page==r&&(r=n.parent,i<0&&(i=r.elements.indexOf(n))>-1&&i++),o&&(r=o);var a=this.findRowByElement(n,r);a&&this.isRowMultiline(a)?this.addElemenMultiline(r,e,i,a):r.addElement(e,i),this.setModified({type:t,question:e})},t.prototype.isRowMultiline=function(e){return e.elements.length>1},t.prototype.findRowByElement=function(e,t){return e?e.isPage?e.rows[e.rows.length-1]:t.rows.find((function(t){return-1!==t.elements.indexOf(e)})):null},t.prototype.addElemenMultiline=function(e,t,i,o){var r=o.elements.length,n=o.elements[r-1];n.startWithNewLine=!0,e.addElement(t,i),n.startWithNewLine=!1},t.prototype.setNewNames=function(e){this.newQuestions=[],this.newPanels=[],this.newQuestionChangedNames={},this.setNewNamesCore(e),this.updateNewElementExpressions(e)},t.prototype.updateNewElementExpressions=function(e){var t=this.createSurvey({},"updateNewElementExpressions");t.setDesignMode(!0),e.isPage?t.addPage(e):(t.addNewPage("p1"),t.pages[0].addElement(e));var i=new b.SurveyLogic(t);for(var o in this.newQuestionChangedNames)i.renameQuestion(o,this.newQuestionChangedNames[o])},t.prototype.getAllQuestions=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!1,e);return this.addElements(this.newPanels,!1,e),this.addElements(this.newQuestions,!1,e),e},t.prototype.getAllPanels=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!0,e);return this.addElements(this.newPanels,!0,e),this.addElements(this.newQuestions,!0,e),e},t.prototype.addElements=function(e,t,i){for(var o=0;o<e.length;o++)e[o].isPanel===t&&i.push(e[o]),this.addElements(p.SurveyHelper.getElements(e[o]),t,i)},t.prototype.getNewName=function(e,t){return"page"==e?p.SurveyHelper.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return p.SurveyHelper.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return p.SurveyHelper.getNewPanelName(this.getAllPanels())},t.prototype.setNewNamesCore=function(e){var t=e.getType(),i=this.getNewName(t,e.isPanel);if(i!=e.name&&(this.newQuestionChangedNames[e.name]=i,e.name=i),e.isPanel||"page"==t){e.isPanel&&this.newPanels.push(e);for(var o=e,r=0;r<o.elements.length;r++)this.setNewNamesCore(o.elements[r])}else this.newQuestions.push(e)},t.prototype.createNewElement=function(e){var t=r.Serializer.createClass(e.type);return(new r.JsonObject).toObject(e,t),this.setNewNames(t),t},t.prototype.copyElement=function(e){var t=(new r.JsonObject).toJsonObject(e);return t.type=e.getType(),this.createNewElement(t)},t.prototype.fastCopyQuestion=function(e){var t=this.copyElement(e),i=e.parent?e.parent.elements.indexOf(e)+1:-1;return this.doClickQuestionCore(t,"ELEMENT_COPIED",i),t},Object.defineProperty(t.prototype,"selectedElement",{get:function(){return this.selectedElementValue},set:function(e){this.selectElement(e)},enumerable:!1,configurable:!0}),t.prototype.deleteCurrentObject=function(){this.deleteCurrentElement()},t.prototype.deleteCurrentElement=function(){this.deleteObject(this.selectedElement)},t.prototype.deleteElement=function(e){this.deleteObject(e)},t.prototype.copyPage=function(e){var t=this.copyElement(e),i=this.survey.pages.indexOf(e);return i>-1?this.survey.pages.splice(i+1,0,t):this.survey.pages.push(t),t},t.prototype.deleteObjectCore=function(e){if(e.isPage){var t=this.getNextPage(e);this.survey.removePage(e),this.selectElement(t||this.survey)}else this.deletePanelOrQuestion(e);this.setModified({type:"OBJECT_DELETED",target:e}),this.updateConditionsOnRemove(e)},t.prototype.getNextPage=function(e){var t=this.survey.pages.indexOf(e);return t<0||1==this.survey.pages.length?null:(t==this.survey.pages.length-1?t--:t++,t<0||t>this.survey.pages.length-1?null:this.survey.pages[t])},t.prototype.deleteObject=function(e){var t={element:e,elementType:p.SurveyHelper.getObjectType(e),allowing:!0};this.onElementDeleting.fire(this,t),t.allowing&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(p.SurveyHelper.getObjectType(e)==p.ObjType.Question)t=[e];else var t=e.questions;if(t)for(var i=new b.SurveyLogic(this.survey,this),o=0;o<t.length;o++)i.removeQuestion(t[o].getValueName())},t.prototype.isElementSelected=function(e){return!(!e||e.isDisposed)&&e.getPropertyValue("isSelectedInDesigner")},t.prototype.selectElement=function(e,t,i){void 0===i&&(i=!0);var o=this.selectedElement;o!==e&&(this.selectedElementValue=this.onSelectingElement(e),o!==this.selectedElementValue&&(o&&!o.isDisposed&&o.setPropertyValue("isSelectedInDesigner",!1),this.selectedElementValue&&this.selectedElementValue.setPropertyValue("isSelectedInDesigner",!0))),(o!==e||t)&&this.selectionChanged(this.selectedElement,t,i);var r=this.getSelectedSurveyElement();o!==e&&i&&document&&r&&setTimeout((function(){var e=document.getElementById(r.id);e&&(e.scrollIntoView({block:"center"}),t||e.parentElement&&e.parentElement.focus())}),100)},t.prototype.getSelectedSurveyElement=function(){var e=this.selectedElement;return e&&"survey"!=e.getType()&&e.isInteractiveDesignElement&&e.id?e:null},t.prototype.onSelectingElement=function(e){var t={newSelectedElement:e};return this.onSelectedElementChanging.fire(this,t),t.newSelectedElement},Object.defineProperty(t.prototype,"designerPropertyGrid",{get:function(){var e=this.sideBar.getTabById("propertyGrid");return e&&e.model?e.model.propertyGridModel:null},enumerable:!1,configurable:!0}),t.prototype.collapsePropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.collapseCategory(e)},t.prototype.expandPropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.expandCategory(e)},t.prototype.collapseAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.collapseAllCategories()},t.prototype.expandAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.expandAllCategories()},t.prototype.collapseAllPropertyTabs=function(){this.collapseAllPropertyGridCategories()},t.prototype.expandAllPropertyTabs=function(){this.expandAllPropertyGridCategories()},t.prototype.expandPropertyTab=function(e){this.expandPropertyGridCategory(e)},t.prototype.collapsePropertyTab=function(e){this.collapsePropertyGridCategory(e)},t.prototype.validateSelectedElement=function(){var e=!0;return this.selectedElement?(this.designerPropertyGrid&&(e=this.designerPropertyGrid.validate()),e):e},t.prototype.selectionChanged=function(e,t,i){void 0===i&&(i=!0),this.survey.currentPage=this.getCurrentPageByElement(e),this.selectionHistoryController.onObjSelected(e),this.designerPropertyGrid&&(this.designerPropertyGrid.obj=e,t||(t=this.designerPropertyGrid.currentlySelectedProperty),t&&this.designerPropertyGrid.selectProperty(t,i||!this.selectFromStringEditor),this.selectFromStringEditor=!1);var o={newSelectedElement:e};this.onSelectedElementChanged.fire(this,o)},t.prototype.getCurrentPageByElement=function(e){if(e)return e.isPage?e:e.page?e.page:e.parentQuestion?this.getCurrentPageByElement(e.parentQuestion):void 0},t.prototype.clickToolboxItem=function(e,t){void 0===t&&(t=null),this.readOnly||(void 0===e.getType&&(e=this.createNewElement(e)),this.survey.lazyRendering=!1,this.doClickQuestionCore(e,"ADDED_FROM_TOOLBOX",-1,t),this.selectElement(e))},t.prototype.getJSONForNewElement=function(e){var t=this.createNewElement(e);return(e=t.toJSON()).type=t.getType(),e},t.prototype.chooseFiles=function(e,t){if(this.onOpenFileChooser.isEmpty){if(!window.FileReader)return;e.value="",e.onchange=function(i){if(window.FileReader&&e&&e.files&&!(e.files.length<1)){for(var o=[],r=0;r<e.files.length;r++)o.push(e.files[r]);t(o)}},e.click()}else this.onOpenFileChooser.fire(this,{input:e,callback:t})},t.prototype.uploadFiles=function(e,t){if(this.onUploadFile.isEmpty){var i=new FileReader;i.onload=function(e){t("success",i.result)},i.readAsDataURL(e[0])}else this.onUploadFile.fire(this,{files:e||[],callback:t})},t.prototype.initKeyboardShortcuts=function(e){e.addEventListener("keydown",this.onKeyDownHandler)},t.prototype.removeKeyboardShortcuts=function(e){e.removeEventListener("keydown",this.onKeyDownHandler)},t.prototype.registerShortcut=function(e,t){this.shortcuts[e]=t},t.prototype.unRegisterShortcut=function(e){delete this.shortcuts[e]},t.prototype.deletePanelOrQuestion=function(e){var t=e.parent,i=t.elements,o=i.indexOf(e);o==i.length-1&&o--,e.delete(),this.selectElement(o>-1?i[o]:t)},t.prototype.onCanShowObjectProperty=function(e,t,i,o,r){var n={obj:e,property:t,canShow:!0,showMode:i,parentObj:o,parentProperty:r};return this.onCanShowProperty.fire(this,n),n.canShow},t.prototype.canDeleteItem=function(e,t,i){var o={obj:e,item:t,canDelete:i};return this.onCanDeleteItem.fire(this,o),o.canDelete},t.prototype.getErrorOnPropertyChanging=function(e,t,i){return"name"!==t||p.SurveyHelper.getObjectType(e)===p.ObjType.Unknown?null:(p.SurveyHelper.getObjectType(e)===p.ObjType.Column?e.colOwner&&!this.isNameUniqueInArray(e.colOwner.columns,e,i):this.generateUniqueName(e,i)!==i)?this.getLocString("pe.propertyNameIsNotUnique"):null},t.prototype.generateUniqueName=function(e,t){var i={element:e,name:t,isUnique:!0};do{for(i.isUnique||(i.name=p.SurveyHelper.generateNewName(i.name));!this.isNameUnique(e,i.name);)i.name=p.SurveyHelper.generateNewName(i.name);i.isUnique=!0;var o=i.name;this.onGenerateNewName.fire(this,i),o!=i.name&&(i.isUnique=this.isNameUnique(e,i.name))}while(!i.isUnique);return i.name},t.prototype.isNameUnique=function(e,t){return!!this.isNameUniqueInArray(this.survey.pages,e,t)&&!!this.isNameUniqueInArray(this.survey.getAllPanels(),e,t)&&this.isNameUniqueInArray(this.survey.getAllQuestions(),e,t)},t.prototype.isNameUniqueInArray=function(e,t,i){if(!Array.isArray(e))return!0;i=i.toLowerCase();for(var o=0;o<e.length;o++)if(e[o]!=t&&e[o].name.toLowerCase()==i)return!1;return!0},t.prototype.doPropertyGridChanged=function(){},Object.defineProperty(t.prototype,"alwaySaveTextInPropertyEditors",{get:function(){return this.alwaySaveTextInPropertyEditorsValue},set:function(e){this.alwaySaveTextInPropertyEditorsValue=e},enumerable:!1,configurable:!0}),t.prototype.onCanShowPropertyCallback=function(e,t,i,o,r){return void 0===i&&(i=null),this.onCanShowObjectProperty(e,t,i,o,r)},t.prototype.onPropertyEditorCreatedCallback=function(e,t,i){var o={obj:e,property:t,editor:i};this.onPropertyEditorCreated.fire(this,o)},t.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,i,o){var r={obj:e,property:t,editor:i,titleActions:o};this.onPropertyEditorUpdateTitleActions.fire(this,r)},t.prototype.onCanDeleteItemCallback=function(e,t,i){return this.canDeleteItem(e,t,i)},t.prototype.onCollectionItemDeletingCallback=function(e,t,i,o){if(this.onCollectionItemDeleting.isEmpty)return!0;var r={obj:e,property:t,propertyName:t.name,collection:i,item:o,allowDelete:!0};return this.onCollectionItemDeleting.fire(this,r),r.allowDelete},t.prototype.onCollectionItemAllowingCallback=function(e,t,i,o,r){if(!this.onCollectionItemAllowOperations.isEmpty){var n={obj:e,property:t,propertyName:t&&t.name,collection:i,item:o,allowEdit:r.allowEdit,allowDelete:r.allowDelete};this.onCollectionItemAllowOperations.fire(this,n),r.allowEdit=n.allowEdit,r.allowDelete=n.allowDelete}},t.prototype.onItemValueAddedCallback=function(e,t,i,o){var r={obj:e,propertyName:t,newItem:i,itemValues:o};this.onItemValueAdded.fire(this,r)},t.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,i){var o={newColumn:t,matrix:e,columns:i};this.onMatrixColumnAdded.fire(this,o)},t.prototype.onSetPropertyEditorOptionsCallback=function(e,t,i){var o={propertyName:e,obj:t,editorOptions:i};this.onSetPropertyEditorOptions.fire(this,o)},t.prototype.onGetErrorTextOnValidationCallback=function(e,t,i){var o=this.getErrorOnPropertyChanging(t,e,i);if(o)return o;var r={propertyName:e,obj:t,value:i,error:""};return this.onPropertyValidationCustomError.fire(this,r),r.error},t.prototype.onValueChangingCallback=function(e){this.onPropertyValueChanging.fire(this,e)},t.prototype.onGetElementEditorTitleCallback=function(e,t){return t},t.prototype.onConditionQuestionsGetListCallback=function(e,t,i,o){var r={propertyName:e,obj:t,editor:i,list:o};if(this.onConditionQuestionsGetList.fire(this,r),r.list!==o){o.splice(0,o.length);for(var n=0;n<r.list.length;n++)o.push(r.list[n])}},t.prototype.onConditionGetTitleCallback=function(e,t){var i={expression:e,title:t};return this.onConditionGetTitle.fire(this,i),i.title},t.prototype.doAutoSave=function(){if(this.autoSaveDelay<=0)this.doSave();else{this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId);var e=this;this.autoSaveTimerId=setTimeout((function(){clearTimeout(e.autoSaveTimerId),e.autoSaveTimerId=null,e.doSave()}),this.autoSaveDelay)}},t.prototype.doSave=function(){var e=this;this.setState("saving"),this.saveSurveyFunc&&(this.saveNo++,this.saveSurveyFunc(this.saveNo,(function(t,i){e.saveNo===t&&(i?e.setState("saved"):(e.showErrorOnFailedSave&&e.notify(e.getLocString("ed.saveError")),e.setState("modified")))})))},Object.defineProperty(t.prototype,"saveSurveyFunc",{get:function(){return this.saveSurveyFuncValue},set:function(e){this.saveSurveyFuncValue=e,this.showSaveButton=null!=e&&!this.isAutoSave},enumerable:!1,configurable:!0}),t.prototype.convertCurrentQuestion=function(e){var t=this.selectedElement;t&&t.getType()!==e&&p.SurveyHelper.getObjectType(t)===p.ObjType.Question&&(t=this.convertQuestion(t,e),this.selectElement(t))},t.prototype.getAddNewQuestionText=function(e){if(void 0===e&&(e=null),e||(e=this.currentAddQuestionType),e){var t=this.getLocString("ed.addNewTypeQuestion");if(t&&t.format)return t.format(this.toolbox.items.filter((function(t){return t.name==e}))[0].title)}return this.getLocString("ed.addNewQuestion")},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return this.getAddNewQuestionText()},enumerable:!1,configurable:!0}),t.prototype.getQuestionTypeSelectorModel=function(e,t){var i=this;void 0===t&&(t=null);var o=this.toolbox.items.map((function(e){return i.createIActionBarItemByClass(e.name,e.title)})),n=new r.PopupModel("sv-list",{model:new r.ListModel(o,(function(o){i.currentAddQuestionType=o.id,i.addNewQuestionInPage(e,t),n.toggleVisibility()}),!1)},"bottom","center");return{iconName:"icon-more",action:function(){n.displayMode=i.isMobileView?"overlay":"popup",n.toggleVisibility()},popupModel:n}},t.prototype.addNewQuestionInPage=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=null),i||(i=this.currentAddQuestionType),e(i);var o=r.ElementFactory.Instance.createElement(i||"text","q1");o?this.setNewNames(o):o=this.createNewElement({type:i}),this.clickToolboxItem(o,t)},t.prototype.createIActionBarItemByClass=function(e,t){return void 0===t&&(t=null),new r.Action({title:t||this.getLocString("qt."+e),id:e,iconName:"icon-"+e})},t.prototype.onElementMenuItemsChanged=function(e,t){this.onDefineElementMenuItems.fire(this,{obj:e,items:t})},t.prototype.getElementAllowOperations=function(e){var t={obj:e,element:e,allowDelete:!0,allowCopy:!0,allowDragging:!0,allowChangeType:!0,allowChangeRequired:!0};return this.onElementAllowOperations.fire(this,t),t},t.prototype.getNextItemValue=function(e){var t=r.surveyLocalization.getString("choices_Item"),i=e.choices.map((function(e){return e.value}));return Object(d.getNextValue)(t,i)},t.prototype.createNewItemValue=function(e){var t=this.getNextItemValue(e);return e.createItemValue(t)},t.prototype.onPropertyValueChanged=function(t,i,o){var r=this;e.prototype.onPropertyValueChanged.call(this,t,i,o),"viewType"===t&&this.tabs.forEach((function(e){return e.active=r.viewType===e.id}))},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new E.CreatorResponsivityManager(e,this)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.defaultNewSurveyText='{ "pages": [ { "name": "page1"}] }',Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showDesignerTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showJSONEditorTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showTestSurveyTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showEmbeddedSurveyTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"haveCommercialLicense",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"showOptions",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showState",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"surveyValue",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"viewType",void 0),Object(o.__decorate)([Object(S.undoRedoTransaction)()],t.prototype,"addPage",null),Object(o.__decorate)([Object(S.ignoreUndoRedo)()],t.prototype,"doOnQuestionAdded",null),Object(o.__decorate)([Object(S.ignoreUndoRedo)()],t.prototype,"doOnPanelAdded",null),Object(o.__decorate)([Object(S.ignoreUndoRedo)()],t.prototype,"doOnPageAdded",null),Object(o.__decorate)([Object(r.property)()],t.prototype,"_stateValue",void 0),Object(o.__decorate)([Object(S.undoRedoTransaction)()],t.prototype,"deleteObject",null),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),Object(o.__decorate)([Object(S.undoRedoTransaction)()],t.prototype,"convertCurrentQuestion",null),Object(o.__decorate)([Object(S.undoRedoTransaction)()],t.prototype,"addNewQuestionInPage",null),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"showPageNavigator",void 0),Object(o.__decorate)([Object(r.property)({getDefaultValue:function(){return n.settings.layout.showTabs}})],t.prototype,"showTabs",void 0),Object(o.__decorate)([Object(r.property)({getDefaultValue:function(){return n.settings.layout.showToolbar}})],t.prototype,"showToolbar",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"isMobileView",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:"left",onSet:function(e,t){t.toolbox.setLocation(e),t.updateToolboxIsCompact()}})],t.prototype,"toolboxLocation",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:"right"})],t.prototype,"sideBarLocation",void 0),t}(r.Base),V=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){p.SurveyHelper.warnNonSupported("StylesManager")},set:function(e){p.SurveyHelper.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){p.SurveyHelper.warnNonSupported("StylesManager")},e}();function j(e,t,i){if("logo-image"===t)return"svc-logo-image";if("cell"===t||"column-header"===t||"row-header"===t)return"svc-matrix-cell";if(!e.isContentElement){if(e instanceof r.Question)return i?"dropdown"==e.getType()?"svc-cell-dropdown-question":"svc-cell-question":e.customWidget?"svc-widget-question":"dropdown"==e.getType()?"svc-dropdown-question":"image"==e.getType()?"svc-image-question":"rating"==e.getType()?"svc-rating-question":"svc-question";if(e instanceof r.PanelModel)return"svc-panel"}}function I(e,t,i){return"logo-image"===t?i:"cell"===t||"column-header"===t||"row-header"===t?{creator:i,element:e,question:e.question,row:e.row,column:e.column}:j(e,t,!1)?e instanceof r.Question||e instanceof r.PanelModel?i:null:void 0}function z(e,t){return t.isContentElement?r.SurveyModel.TemplateRendererComponentName:"imagepicker"===t.getType()?"svc-image-item-value":"svc-item-value"}function M(e,t,i){return t.isContentElement?e:{creator:i,question:t,item:e}}function q(e,t){return!(e.parentQuestion instanceof r.QuestionMatrixDropdownModelBase)&&(!e.isContentElement||e.isEditableTemplateElement)}},"./src/creator-responsivity-manager.ts":
|
|
316
|
+
/*! exports provided: TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorBase, StylesManager, getElementWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable */function(e,t,i){"use strict";i.r(t),i.d(t,"TabbedMenuItem",(function(){return N})),i.d(t,"TabbedMenuContainer",(function(){return O})),i.d(t,"ToolbarActionContainer",(function(){return _})),i.d(t,"CreatorBase",(function(){return A})),i.d(t,"StylesManager",(function(){return V})),i.d(t,"getElementWrapperComponentName",(function(){return j})),i.d(t,"getElementWrapperComponentData",(function(){return I})),i.d(t,"getItemValueWrapperComponentName",(function(){return M})),i.d(t,"getItemValueWrapperComponentData",(function(){return z})),i.d(t,"isStringEditable",(function(){return q}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ./settings */"./src/settings.ts"),a=i(/*! ./editorLocalization */"./src/editorLocalization.ts"),s=i(/*! ./json5 */"./src/json5.ts"),l=i(/*! ./questionconverter */"./src/questionconverter.ts"),u=i(/*! ./textWorker */"./src/textWorker.ts"),c=i(/*! ./toolbox */"./src/toolbox.ts"),d=i(/*! ./utils/utils */"./src/utils/utils.ts"),p=i(/*! ./survey-helper */"./src/survey-helper.ts"),m=i(/*! ./pages-controller */"./src/pages-controller.ts"),g=i(/*! ./selection-history */"./src/selection-history.ts"),h=i(/*! ./components/tabs/embed */"./src/components/tabs/embed.ts"),v=i(/*! ./components/tabs/json-editor-ace */"./src/components/tabs/json-editor-ace.ts"),y=i(/*! ./components/tabs/json-editor-textarea */"./src/components/tabs/json-editor-textarea.ts"),f=i(/*! ./components/tabs/test-plugin */"./src/components/tabs/test-plugin.ts"),b=i(/*! ./components/tabs/logic */"./src/components/tabs/logic.ts"),x=i(/*! ./components/tabs/translation-plugin */"./src/components/tabs/translation-plugin.ts"),w=i(/*! ./components/tabs/logic-plugin */"./src/components/tabs/logic-plugin.ts"),T=i(/*! ./components/notifier */"./src/components/notifier.ts"),S=i(/*! ./utils/actions */"./src/utils/actions.ts"),k=i(/*! ./plugins/undo-redo */"./src/plugins/undo-redo/index.ts"),P=i(/*! ./components/tabs/designer-plugin */"./src/components/tabs/designer-plugin.ts"),E=i(/*! ./creator-responsivity-manager */"./src/creator-responsivity-manager.ts"),C=i(/*! ./components/side-bar/side-bar-model */"./src/components/side-bar/side-bar-model.ts"),N=(i(/*! ./components/creator.scss */"./src/components/creator.scss"),i(/*! ./components/string-editor.scss */"./src/components/string-editor.scss"),i(/*! ./creator-theme/creator.scss */"./src/creator-theme/creator.scss"),function(e){function t(t){return e.call(this,t)||this}return Object(o.__extends)(t,e),t}(r.Action)),O=function(e){function t(){var t=e.call(this)||this;return t.dotsItemPopupModel.horizontalPosition="center",t.minVisibleItemsCount=1,t}return Object(o.__extends)(t,e),t}(r.AdaptiveActionContainer),_=function(e){function t(t){var i=e.call(this)||this;return i.creator=t,i}return Object(o.__extends)(t,e),t.prototype.getRenderedActions=function(){var e=this.actions,t=this.creator.sideBar.getExpandAction(),i=e.indexOf(t);return-1!==i&&(e.splice(i,1),e.push(t)),e},t}(r.ActionContainer),A=function(e){function t(i,o){var a=e.call(this)||this;a.options=i,a.isRTLValue=!1,a.alwaySaveTextInPropertyEditorsValue=!1,a.pageEditModeValue="standard",a.newQuestions=[],a.newPanels=[],a.plugins={},a.onElementDeleting=new r.Event,a.onGetPropertyReadOnly=new r.Event,a.onSurveyInstanceCreated=new r.Event,a.onGetObjectDisplayName=new r.Event,a.onElementAllowOperations=new r.Event,a.onDefineElementMenuItems=new r.Event,a.onShowingProperty=new r.Event,a.onCanShowProperty=a.onShowingProperty,a.onPropertyEditorCreated=new r.Event,a.onPropertyEditorUpdateTitleActions=new r.Event,a.onCanDeleteItem=new r.Event,a.onCollectionItemDeleting=new r.Event,a.onCollectionItemAllowOperations=new r.Event,a.onItemValueAdded=new r.Event,a.onMatrixColumnAdded=new r.Event,a.onSetPropertyEditorOptions=new r.Event,a.onGenerateNewName=new r.Event,a.onPropertyValidationCustomError=new r.Event,a.onPropertyValueChanging=new r.Event,a.onConditionQuestionsGetList=new r.Event,a.onConditionGetTitle=new r.Event,a.onModified=new r.Event,a.onQuestionAdded=new r.Event,a.onPanelAdded=new r.Event,a.onPageAdded=new r.Event,a.onDesignerSurveyCreated=new r.Event,a.onPreviewSurveyCreated=new r.Event,a.onTestSurveyCreated=a.onPreviewSurveyCreated,a.onNotify=new r.Event,a.onSelectedElementChanging=new r.Event,a.onSelectedElementChanged=new r.Event,a.onOpenFileChooser=new r.Event,a.onUploadFile=new r.Event,a.onTranslationStringVisibility=new r.Event,a.useTabsInElementEditor=!1,a.maxLogicItemsInCondition=-1,a.showObjectTitles=!1,a.showTitlesInExpressions=!1,a.allowEditExpressionsInTextEditor=!0,a.maximumColumnsCount=n.settings.propertyGrid.maximumColumnsCount,a.maximumChoicesCount=n.settings.propertyGrid.maximumChoicesCount,a.maximumRowsCount=n.settings.propertyGrid.maximumRowsCount,a.maximumRateValues=n.settings.propertyGrid.maximumRateValues,a.showPagesInTestSurveyTab=!0,a.showSimulatorInTestSurveyTab=!0,a.allowModifyPages=!0,a.showDefaultLanguageInTestSurveyTab="auto",a.showInvisibleElementsInTestSurveyTab=!0,a.showPageSelectorInToolbar=!1,a.tabbedMenu=new O,a.showErrorOnFailedSave=!0,a.onActiveTabChanged=new r.Event,a.showPropertyGridValue=!0,a.onShowPropertyGridVisiblityChanged=new r.Event,a.onBeforeUndo=new r.Event,a.onBeforeRedo=new r.Event,a.onAfterUndo=new r.Event,a.onAfterRedo=new r.Event,a.onStateChanged=new r.Event,a.notifier=new T.Notifier,a.onKeyDownHandler=function(e){var t,i;Object.keys(a.shortcuts||{}).forEach((function(o){t=a.shortcuts[o],(i=e.metaKey?t.macOsHotkey:t.hotKey)&&!!i.ctrlKey==!!e.ctrlKey&&!!i.shiftKey==!!e.shiftKey&&i.keyCode===e.keyCode&&(i.keyCode<48&&function(e){if(!e.tagName)return!1;var t=e.tagName.toLowerCase();return-1!==["input","textarea"].indexOf(t)||"span"===t&&e.isContentEditable}(e.target)||t.execute(a.selectElement))}))},a.shortcuts={},a.autoSaveDelay=n.settings.autoSave.delay,a.autoSaveTimerId=null,a.saveNo=0,(o||"string"==typeof a.options||a.options instanceof String)&&(a.options=o||{},p.SurveyHelper.warnText("Creator constructor has one parameter, as creator options, in V2.")),a.toolbarValue=new _(a),a.pagesControllerValue=new m.PagesController(a),a.selectionHistoryControllerValue=new g.SelectionHistory(a),a.sideBar=new C.SideBarModel(a),a.setOptions(a.options),a.patchMetadata(),a.initSurveyWithJSON(JSON.parse(t.defaultNewSurveyText),!1),a.toolbox=new c.QuestionToolbox(a.options&&a.options.questionTypes?a.options.questionTypes:null,a),a.updateToolboxIsCompact(),a.initTabs(),a.initDragDrop();var s=a.sideBar.getExpandAction();return s&&a.toolbar.actions.push(s),a}return Object(o.__extends)(t,e),Object.defineProperty(t.prototype,"showPreviewTab",{get:function(){return this.showTestSurveyTab},set:function(e){this.showTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowEditSurveyTitle",{get:function(){return this.getPropertyValue("allowEditSurveyTitle",!0)},set:function(e){this.setPropertyVisibility("survey",e,"title","description","logo","showTitle","logoWidth","logoHeight"),this.setPropertyValue("allowEditSurveyTitle",e),this.designerPropertyGrid&&this.designerPropertyGrid.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"licenseText",{get:function(){return this.getLocString("survey.license")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageEditMode",{get:function(){return this.pageEditModeValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbarItems",{get:function(){return this.toolbarValue.actions},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.toolbarValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showingViewName",{get:function(){return this.activeTab},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isDesignerShowing",{get:function(){return"designer"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showDesigner=function(){this.activeTab="designer"},Object.defineProperty(t.prototype,"isTestSurveyShowing",{get:function(){return this.isPreviewShowing},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isPreviewShowing",{get:function(){return"test"===this.activeTab},enumerable:!1,configurable:!0}),t.prototype.showTestSurvey=function(){this.showPreview()},t.prototype.showPreview=function(){this.activeTab="test"},t.prototype.addPluginTab=function(e,t,i,o,r){var n=this,s=new N({id:e,title:i||a.editorLocalization.getString("ed."+e),componentContent:o||"svc-tab-"+e,data:t,action:function(){return n.makeNewViewActive(e)},active:this.viewType===e});r>=0&&r<this.tabs.length?this.tabs.splice(r,0,s):this.tabs.push(s),this.addPlugin(e,t)},t.prototype.addPlugin=function(e,t){this.plugins[e]=t},t.prototype.getPlugin=function(e){return this.plugins[e]},Object.defineProperty(t.prototype,"showPagesInPreviewTab",{get:function(){return this.showPagesInTestSurveyTab},set:function(e){this.showPagesInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSimulatorInPreviewTab",{get:function(){return this.showSimulatorInTestSurveyTab},set:function(e){this.showSimulatorInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showDefaultLanguageInPreviewTab",{get:function(){return this.showDefaultLanguageInTestSurveyTab},set:function(e){this.showDefaultLanguageInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showInvisibleElementsInPreviewTab",{get:function(){return this.showInvisibleElementsInTestSurveyTab},set:function(e){this.showInvisibleElementsInTestSurveyTab=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tabs",{get:function(){return this.tabbedMenu.actions},set:function(e){this.tabbedMenu.actions=e},enumerable:!1,configurable:!0}),t.prototype.getLocString=function(e){return a.editorLocalization.getString(e)},t.prototype.onSetReadOnly=function(e){},Object.defineProperty(t.prototype,"readOnly",{get:function(){return this.getPropertyValue("readOnly",!1)},set:function(e){var t=this.text;this.setPropertyValue("readOnly",e),this.onSetReadOnly(e),this.text=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRTL",{get:function(){return this.isRTLValue},set:function(e){this.isRTLValue=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeTab",{get:function(){return this.viewType},set:function(e){this.makeNewViewActive(e)},enumerable:!1,configurable:!0}),t.prototype.makeNewViewActive=function(e){if(e==this.viewType)return!1;if(!this.canSwitchViewType())return!1;var t=this.activatePlugin(e);return this.viewType=e,this.onActiveTabChanged.fire(this,{tabName:e,plugin:t,model:t?t.model:void 0}),!0},t.prototype.canSwitchViewType=function(){var e=this.currentPlugin;return!e||!e.deactivate||e.deactivate()},t.prototype.activatePlugin=function(e){var t=this.getPlugin(e);return t&&t.activate(),t},Object.defineProperty(t.prototype,"currentPlugin",{get:function(){return this.getPlugin(this.activeTab)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxCategories",{get:function(){return this.toolbox.categories},enumerable:!1,configurable:!0}),t.prototype.updateToolboxIsCompact=function(e){var t=null!=e&&null!=e;"right"==this.toolboxLocation?this.toolbox.isCompact=this.showPropertyGrid||t&&e:t&&(this.toolbox.isCompact=e)},t.prototype.onSurveyElementPropertyValueChanged=function(e,t,i){throw new Error("Method not implemented.")},Object.defineProperty(t.prototype,"showToolbox",{get:function(){return p.SurveyHelper.warnNonSupported("showToolbox","toolboxLocation"),"hidden"!==this.toolboxLocation},set:function(e){p.SurveyHelper.warnNonSupported("showToolbox","toolboxLocation"),this.toolboxLocation="none"===e||!1===e||"top"===e?"hidden":!0===e?"left":e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPropertyGrid",{get:function(){return this.showPropertyGridValue},set:function(e){!0===e||!1===e?this.showPropertyGrid!==e&&(this.showPropertyGridValue=e,this.updateToolboxIsCompact(),this.onShowPropertyGridVisiblityChanged.fire(this,{show:e})):p.SurveyHelper.warnText("showPropertyGrid propertry grid is a boolean property now.")},enumerable:!1,configurable:!0}),t.prototype.rightContainerActiveItem=function(e){p.SurveyHelper.warnNonSupported("rightContainerActiveItem")},t.prototype.leftContainerActiveItem=function(e){p.SurveyHelper.warnNonSupported("leftContainerActiveItem")},Object.defineProperty(t.prototype,"undoRedoManager",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model.undoRedoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoRedoController",{get:function(){var e=this.getPlugin("undoredo");return e&&e.model},enumerable:!1,configurable:!0}),t.prototype.startUndoRedoTransaction=function(e){void 0===e&&(e=""),this.undoRedoController&&this.undoRedoController.startTransaction(e)},t.prototype.stopUndoRedoTransaction=function(){this.undoRedoController&&this.undoRedoController.stopTransaction()},t.prototype.undo=function(){this.undoRedoController&&this.undoRedoController.undo()},t.prototype.redo=function(){this.undoRedoController&&this.undoRedoController.redo()},Object.defineProperty(t.prototype,"pagesController",{get:function(){return this.pagesControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionHistoryController",{get:function(){return this.selectionHistoryControllerValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPage",{get:function(){return this.survey.currentPage},set:function(e){this.survey.currentPage=e},enumerable:!1,configurable:!0}),t.prototype.addPage=function(e){var t=e;if(t)this.survey.addPage(t);else{var i=p.SurveyHelper.getNewPageName(this.survey.pages);t=this.survey.addNewPage(i)}return this.selectElement(t),t},t.prototype.initTabs=function(){this.initPlugins(),this.initFooterToolbar(),this.tabs.length>0&&this.makeNewViewActive(this.tabs[0].id)},t.prototype.initPlugins=function(){this.addPlugin("undoredo",new k.UndoRedoPlugin(this)),this.showDesignerTab&&new P.TabDesignerPlugin(this),this.showPreviewTab&&new f.TabTestPlugin(this),this.showLogicTab&&new w.TabLogicPlugin(this),this.showJSONEditorTab&&(v.TabJsonEditorAcePlugin.hasAceEditor()?new v.TabJsonEditorAcePlugin(this):new y.TabJsonEditorTextareaPlugin(this)),this.showEmbeddedSurveyTab&&new h.TabEmbedPlugin(this),this.showTranslationTab&&new x.TabTranslationPlugin(this)},t.prototype.initFooterToolbar=function(){var e=this;this.footerToolbar||(this.footerToolbar=new r.ActionContainer,["undoredo","designer","test"].forEach((function(t){var i=e.getPlugin(t);i&&i.addFooterActions&&i.addFooterActions()})))},t.prototype.getOptions=function(){return this.options||{}},t.prototype.setOptions=function(e){e||(e={}),e.hasOwnProperty("generateValidJSON")||(e.generateValidJSON=!0),this.options=e,this.showDesignerTab=void 0===e.showDesignerTab||e.showDesignerTab,this.showLogicTab=void 0!==e.showLogicTab&&e.showLogicTab,this.showJSONEditorTab=void 0===e.showJSONEditorTab||e.showJSONEditorTab,this.showPreviewTab=void 0!==e.showPreviewTab?e.showPreviewTab:void 0===e.showTestSurveyTab||e.showTestSurveyTab,this.allowEditSurveyTitle=void 0===e.allowEditSurveyTitle||e.allowEditSurveyTitle,this.showEmbeddedSurveyTab=void 0!==e.showEmbeddedSurveyTab&&e.showEmbeddedSurveyTab,this.showTranslationTab=void 0!==e.showTranslationTab&&e.showTranslationTab,this.showLogicTab=void 0!==e.showLogicTab&&e.showLogicTab,this.haveCommercialLicense=void 0!==e.haveCommercialLicense&&e.haveCommercialLicense,this.showObjectTitles=void 0!==e.showObjectTitles&&e.showObjectTitles,this.showTitlesInExpressions=void 0!==e.showTitlesInExpressions&&e.showTitlesInExpressions,this.allowEditExpressionsInTextEditor=void 0===e.allowEditExpressionsInTextEditor||e.allowEditExpressionsInTextEditor,void 0!==e.maximumColumnsCount&&(this.maximumColumnsCount=e.maximumColumnsCount),void 0!==e.maximumChoicesCount&&(this.maximumChoicesCount=e.maximumChoicesCount),void 0!==e.maximumRowsCount&&(this.maximumRowsCount=e.maxiumumRowsCount),void 0!==e.maximumRateValues&&(this.maximumRateValues=e.maximumRateValues),this.useTabsInElementEditor=void 0!==e.useTabsInElementEditor&&e.useTabsInElementEditor,this.maxLogicItemsInCondition=void 0!==e.maxLogicItemsInCondition?e.maxLogicItemsInCondition:-1,this.showState=void 0!==e.showState&&e.showState,this.showOptions=void 0!==e.showOptions&&e.showOptions,this.generateValidJSON=this.options.generateValidJSON,this.isAutoSave=void 0!==e.isAutoSave&&e.isAutoSave,this.showErrorOnFailedSave=void 0===e.showErrorOnFailedSave||e.showErrorOnFailedSave,this.isRTLValue=void 0!==e.isRTL&&e.isRTL,void 0!==e.readOnly&&(this.readOnly=e.readOnly),void 0!==e.showPagesInTestSurveyTab&&(this.showPagesInPreviewTab=e.showPagesInTestSurveyTab),void 0!==e.showPagesInPreviewTab&&(this.showPagesInPreviewTab=e.showPagesInPreviewTab),void 0!==e.showSimulatorInTestSurveyTab&&(this.showSimulatorInPreviewTab=e.showSimulatorInTestSurveyTab),void 0!==e.showSimulatorInPreviewTab&&(this.showSimulatorInPreviewTab=e.showSimulatorInPreviewTab),void 0!==e.showDefaultLanguageInTestSurveyTab&&(this.showDefaultLanguageInPreviewTab=e.showDefaultLanguageInTestSurveyTab),void 0!==e.showDefaultLanguageInPreviewTab&&(this.showDefaultLanguageInPreviewTab=e.showDefaultLanguageInPreviewTab),void 0!==e.showInvisibleElementsInTestSurveyTab&&(this.showInvisibleElementsInPreviewTab=e.showInvisibleElementsInTestSurveyTab),void 0!==e.showInvisibleElementsInPreviewTab&&(this.showInvisibleElementsInPreviewTab=e.showInvisibleElementsInPreviewTab),void 0!==e.allowModifyPages&&(this.allowModifyPages=e.allowModifyPages),void 0!==e.pageEditMode&&(this.pageEditModeValue=e.pageEditMode,"single"===this.pageEditModeValue&&(this.setPropertyVisibility("survey",!1,"pages"),this.setPropertyVisibility("question",!1,"page"),this.setPropertyVisibility("panel",!1,"page"),this.showJSONEditorTab=!1))},t.prototype.setPropertyPlaceHolder=function(e,t,i){var o=r.Serializer.findProperty(e,t);o&&(o.placeholder=i)},t.prototype.setPropertyVisibility=function(e,t){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];if(Array.isArray(i))for(var n=0;n<i.length;n++){var a=r.Serializer.findProperty(e,i[n]);a&&(a.visible=t)}},t.prototype.patchMetadata=function(){this.setPropertyPlaceHolder("survey","title","pe.surveyTitlePlaceholder"),this.setPropertyPlaceHolder("survey","description","pe.surveyDescriptionPlaceholder"),this.setPropertyVisibility("survey",!1,"logoPosition"),this.setPropertyPlaceHolder("page","title","pe.pageTitlePlaceholder"),this.setPropertyPlaceHolder("page","description","pe.pageDescriptionPlaceholder")},t.prototype.isCanModifyProperty=function(e,t){var i,o,n=r.Serializer.findProperty(e.getType(),t);if(e instanceof r.ItemValue){if(i=e.locOwner,o=r.Serializer.findProperty(i.getType(),e.ownerPropertyName),!1===this.getElementAllowOperations(i).allowEdit)return!1;var a={allowDelete:!0,allowEdit:!0};if(this.onCollectionItemAllowingCallback(i,n,i.getPropertyValue(o.name),e,a),!1===a.allowEdit)return!1;if(this.onIsPropertyReadOnlyCallback(i,o,o.readOnly,null,null))return!1}return!(e instanceof r.SurveyElement&&!1===this.getElementAllowOperations(e).allowEdit)&&(!n||!this.onIsPropertyReadOnlyCallback(e,n,n.readOnly,i,o))},t.prototype.onIsPropertyReadOnlyCallback=function(e,t,i,o,r){var n=this.readOnly||i;if(this.onGetPropertyReadOnly.isEmpty)return n;var a={obj:e,property:t,readOnly:n,propertyName:t.name,parentObj:o,parentProperty:r};return this.onGetPropertyReadOnly.fire(this,a),a.readOnly},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),t.prototype.initSurveyWithJSON=function(e,t){var i=this;this.existingPages={};var o=this.createSurvey({});o.css=r.defaultV2Css,o.setDesignMode(!0),o.lazyRendering=!0,o.setJsonObject(e),o.logoPosition="right",o.isEmpty&&o.setJsonObject(this.getDefaultSurveyJson()),o.pages.forEach((function(e){i.existingPages[e.id]=!0})),this.onDesignerSurveyCreated.fire(this,{survey:o}),o.onQuestionAdded.add((function(e,t){i.doOnQuestionAdded(t.question,t.parentPanel)})),o.onPanelAdded.add((function(e,t){i.doOnPanelAdded(t.panel,t.parentPanel)})),o.onPageAdded.add((function(e,t){i.existingPages[t.page.id]||(i.existingPages[t.page.id]=!0,i.doOnPageAdded(t.page))})),o.onGetMatrixRowActions.add((function(e,t){Object(S.updateMatrixRemoveAction)(t.question,t.actions,t.row)})),this.setSurvey(o);var n=this.getPlugin(this.activeTab);n&&n.update&&n.update()},t.prototype.initDragDrop=function(){this.initDragDropSurveyElements(),this.initDragDropChoices()},t.prototype.initDragDropSurveyElements=function(){var e=this;r.DragDropSurveyElements.restrictDragQuestionBetweenPages=n.settings.dragDrop.restrictDragQuestionBetweenPages,this.dragDropSurveyElements=new r.DragDropSurveyElements(null,this),this.dragDropSurveyElements.onBeforeDrop.add((function(t,i){e.startUndoRedoTransaction("drag drop")})),this.dragDropSurveyElements.onAfterDrop.add((function(t,i){e.stopUndoRedoTransaction(),e.selectElement(i.draggedElement,void 0,!1)}))},t.prototype.initDragDropChoices=function(){var e=this;this.dragDropChoices=new r.DragDropChoices(null,this),this.dragDropChoices.onBeforeDrop.add((function(t,i){e.startUndoRedoTransaction("drag drop")})),this.dragDropChoices.onAfterDrop.add((function(t,i){e.stopUndoRedoTransaction(),e.selectElement(i.draggedElement,void 0,!1)}))},t.prototype.updateElementsOnLocaleChanged=function(e,t){if("survey"===e.getType()&&"locale"===t)for(var i=this.survey.pages,o=0;o<i.length;o++)i[o].locStrsChanged()},t.prototype.updateConditionsOnQuestionNameChanged=function(e,t,i){if(this.isObjQuestion(e)&&("name"!==t||e.valueName||this.updateConditions(i,e.name),"valueName"===t)){var o=i||e.name,r=e.valueName?e.valueName:e.name;this.updateConditions(o,r)}},t.prototype.updatePagesController=function(e,t){"name"!=t&&"title"!=t||!this.isObjPage(e)||this.pagesController.pageNameChanged(e)},t.prototype.updateConditions=function(e,t){e!==t&&new b.SurveyLogic(this.survey,this).renameQuestion(e,t)},t.prototype.isObjQuestion=function(e){return this.isObjThisType(e,"question")},t.prototype.isObjPage=function(e){return this.isObjThisType(e,"page")},t.prototype.isObjThisType=function(e,t){for(var i=r.Serializer.findClass(e.getType());i&&i.parentName;){if(i.name===t)return!0;i=r.Serializer.findClass(i.parentName)}return!!i&&i.name===t},t.prototype.doOnQuestionAdded=function(e,t){e.name=this.generateUniqueName(e,e.name);var i={question:e,page:this.getPageByElement(e)};this.onQuestionAdded.fire(this,i)},t.prototype.doOnPanelAdded=function(e,t){var i={panel:e,page:this.getPageByElement(e)};this.onPanelAdded.fire(this,i)},t.prototype.doOnPageAdded=function(e){var t={page:e};this.onPageAdded.fire(this,t),this.setModified({type:"PAGE_ADDED",newValue:t.page})},t.prototype.getPageByElement=function(e){return this.survey.getPageByElement(e)},t.prototype.getDefaultSurveyJson=function(){var e=n.settings.defaultNewSurveyJSON;return e.pages&&e.pages.length>0&&e.pages[0].name&&(e.pages[0].name=a.editorLocalization.getString("ed.newPageName")+"1"),e},t.prototype.setSurvey=function(e){this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=e,this.selectElement(e),this.pagesController.onSurveyChanged(),this.selectionHistoryController.reset()},t.prototype.getSurveyTextFromDesigner=function(){if(!this.survey)return"";var e=this.survey.toJSON(),t=n.settings.jsonEditor.indentation;return this.options&&this.options.generateValidJSON?JSON.stringify(e,null,t):(new s.SurveyJSON5).stringify(e,null,t)},t.prototype.setTextValue=function(e){this.setSurveyJSONTextCallback&&this.setSurveyJSONTextCallback(e)},t.prototype.changeText=function(e,t){void 0===t&&(t=!1),this.setTextValue(e);var i=new u.SurveyTextWorker(e);i.isJsonCorrect?this.initSurveyWithJSON(i.survey.toJSON(),t):this.viewType="editor"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getSurveyJSONTextCallback?this.getSurveyJSONTextCallback().text:this.getSurveyTextFromDesigner()},set:function(e){this.changeText(e,!0)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){if("editor"!=this.viewType)return(new r.JsonObject).toJsonObject(this.survey);var e=this.text,t=new u.SurveyTextWorker(e);return t.isJsonCorrect?(new r.JsonObject).toJsonObject(t.survey):null},t.prototype.getObjectDisplayName=function(e,t,i){void 0===t&&(t=void 0),void 0===i&&(i=void 0),i||(i=p.SurveyHelper.getObjectName(e,this.showObjectTitles));var o={obj:e,displayName:i,reason:t};return this.onGetObjectDisplayName.fire(this,o),o.displayName},t.prototype.createSurvey=function(e,t){void 0===e&&(e={}),void 0===t&&(t="designer");var i=this.createSurveyCore(e,t);return"designer"!=t&&"test"!=t&&(i.locale=a.editorLocalization.currentLocale),this.onSurveyInstanceCreated.fire(this,{survey:i,reason:t}),i},t.prototype.createSurveyCore=function(e,t){throw void 0===e&&(e={}),new Error("createSurveyCore method should be overridden/implemented")},Object.defineProperty(t.prototype,"state",{get:function(){return this._stateValue?this._stateValue:""},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){this._stateValue=e,this.onStateChanged.fire(this,{val:e}),e&&this.notify(this.getLocString("ed."+e))},t.prototype.setModified=function(e){void 0===e&&(e=null),this.setState("modified"),this.onModified.fire(this,e),this.isAutoSave&&this.doAutoSave()},t.prototype.notify=function(e,t){void 0===t&&(t="info"),this.onNotify.isEmpty?this.notifier.notify(e,t):this.onNotify.fire(this,{message:e})},t.prototype.convertQuestion=function(e,t){var i=l.QuestionConverter.convertObject(e,t);return this.setModified({type:"QUESTION_CONVERTED",className:t,oldValue:e,newValue:i}),i},Object.defineProperty(t.prototype,"JSON",{get:function(){return this.survey.toJSON()},set:function(e){"editor"==this.viewType?this.setTextValue(JSON.stringify(e)):this.initSurveyWithJSON(e,!0)},enumerable:!1,configurable:!0}),t.prototype.loadSurvey=function(e){var t=this;(new r.dxSurveyService).loadSurvey(e,(function(e,i,o){e&&i&&(t.JSON=i)}))},t.prototype.doClickQuestionCore=function(e,t,i,o){void 0===t&&(t="ADDED_FROM_TOOLBOX"),void 0===i&&(i=-1),void 0===o&&(o=null),0==this.survey.pageCount&&this.survey.addNewPage();var r=this.currentPage,n=this.getSelectedSurveyElement();n&&n.parent&&n.page==r&&(r=n.parent,i<0&&(i=r.elements.indexOf(n))>-1&&i++),o&&(r=o);var a=this.findRowByElement(n,r);a&&this.isRowMultiline(a)?this.addElemenMultiline(r,e,i,a):r.addElement(e,i),this.setModified({type:t,question:e})},t.prototype.isRowMultiline=function(e){return e.elements.length>1},t.prototype.findRowByElement=function(e,t){return e?e.isPage?e.rows[e.rows.length-1]:t.rows.find((function(t){return-1!==t.elements.indexOf(e)})):null},t.prototype.addElemenMultiline=function(e,t,i,o){var r=o.elements.length,n=o.elements[r-1];n.startWithNewLine=!0,e.addElement(t,i),n.startWithNewLine=!1},t.prototype.setNewNames=function(e){this.newQuestions=[],this.newPanels=[],this.newQuestionChangedNames={},this.setNewNamesCore(e),this.updateNewElementExpressions(e)},t.prototype.updateNewElementExpressions=function(e){var t=this.createSurvey({},"updateNewElementExpressions");t.setDesignMode(!0),e.isPage?t.addPage(e):(t.addNewPage("p1"),t.pages[0].addElement(e));var i=new b.SurveyLogic(t);for(var o in this.newQuestionChangedNames)i.renameQuestion(o,this.newQuestionChangedNames[o])},t.prototype.getAllQuestions=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!1,e);return this.addElements(this.newPanels,!1,e),this.addElements(this.newQuestions,!1,e),e},t.prototype.getAllPanels=function(){for(var e=[],t=0;t<this.survey.pages.length;t++)this.addElements(this.survey.pages[t].elements,!0,e);return this.addElements(this.newPanels,!0,e),this.addElements(this.newQuestions,!0,e),e},t.prototype.addElements=function(e,t,i){for(var o=0;o<e.length;o++)e[o].isPanel===t&&i.push(e[o]),this.addElements(p.SurveyHelper.getElements(e[o]),t,i)},t.prototype.getNewName=function(e,t){return"page"==e?p.SurveyHelper.getNewPageName(this.survey.pages):t?this.getNewPanelName():this.getNewQuestionName()},t.prototype.getNewQuestionName=function(){return p.SurveyHelper.getNewQuestionName(this.getAllQuestions())},t.prototype.getNewPanelName=function(){return p.SurveyHelper.getNewPanelName(this.getAllPanels())},t.prototype.setNewNamesCore=function(e){var t=e.getType(),i=this.getNewName(t,e.isPanel);if(i!=e.name&&(this.newQuestionChangedNames[e.name]=i,e.name=i),e.isPanel||"page"==t){e.isPanel&&this.newPanels.push(e);for(var o=e,r=0;r<o.elements.length;r++)this.setNewNamesCore(o.elements[r])}else this.newQuestions.push(e)},t.prototype.createNewElement=function(e){var t=r.Serializer.createClass(e.type);return(new r.JsonObject).toObject(e,t),this.setNewNames(t),t},t.prototype.copyElement=function(e){var t=(new r.JsonObject).toJsonObject(e);return t.type=e.getType(),this.createNewElement(t)},t.prototype.fastCopyQuestion=function(e){var t=this.copyElement(e),i=e.parent?e.parent.elements.indexOf(e)+1:-1;return this.doClickQuestionCore(t,"ELEMENT_COPIED",i),t},Object.defineProperty(t.prototype,"selectedElement",{get:function(){return this.selectedElementValue},set:function(e){this.selectElement(e)},enumerable:!1,configurable:!0}),t.prototype.deleteCurrentObject=function(){this.deleteCurrentElement()},t.prototype.deleteCurrentElement=function(){this.deleteObject(this.selectedElement)},t.prototype.deleteElement=function(e){this.deleteObject(e)},t.prototype.copyPage=function(e){var t=this.copyElement(e),i=this.survey.pages.indexOf(e);return i>-1?this.survey.pages.splice(i+1,0,t):this.survey.pages.push(t),t},t.prototype.deleteObjectCore=function(e){if(e.isPage){var t=this.getNextPage(e);this.survey.removePage(e),this.selectElement(t||this.survey)}else this.deletePanelOrQuestion(e);this.setModified({type:"OBJECT_DELETED",target:e}),this.updateConditionsOnRemove(e)},t.prototype.getNextPage=function(e){var t=this.survey.pages.indexOf(e);return t<0||1==this.survey.pages.length?null:(t==this.survey.pages.length-1?t--:t++,t<0||t>this.survey.pages.length-1?null:this.survey.pages[t])},t.prototype.deleteObject=function(e){var t={element:e,elementType:p.SurveyHelper.getObjectType(e),allowing:!0};this.onElementDeleting.fire(this,t),t.allowing&&this.deleteObjectCore(e)},t.prototype.updateConditionsOnRemove=function(e){if(p.SurveyHelper.getObjectType(e)==p.ObjType.Question)t=[e];else var t=e.questions;if(t)for(var i=new b.SurveyLogic(this.survey,this),o=0;o<t.length;o++)i.removeQuestion(t[o].getValueName())},t.prototype.isElementSelected=function(e){return!(!e||e.isDisposed)&&e.getPropertyValue("isSelectedInDesigner")},t.prototype.selectElement=function(e,t,i){void 0===i&&(i=!0);var o=this.selectedElement;o!==e&&(this.selectedElementValue=this.onSelectingElement(e),o!==this.selectedElementValue&&(o&&!o.isDisposed&&o.setPropertyValue("isSelectedInDesigner",!1),this.selectedElementValue&&this.selectedElementValue.setPropertyValue("isSelectedInDesigner",!0))),(o!==e||t)&&this.selectionChanged(this.selectedElement,t,i);var r=this.getSelectedSurveyElement();o!==e&&i&&document&&r&&setTimeout((function(){var e=document.getElementById(r.id);e&&(e.scrollIntoView({block:"center"}),t||e.parentElement&&e.parentElement.focus())}),100)},t.prototype.getSelectedSurveyElement=function(){var e=this.selectedElement;return e&&"survey"!=e.getType()&&e.isInteractiveDesignElement&&e.id?e:null},t.prototype.onSelectingElement=function(e){var t={newSelectedElement:e};return this.onSelectedElementChanging.fire(this,t),t.newSelectedElement},Object.defineProperty(t.prototype,"designerPropertyGrid",{get:function(){var e=this.sideBar.getTabById("propertyGrid");return e&&e.model?e.model.propertyGridModel:null},enumerable:!1,configurable:!0}),t.prototype.collapsePropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.collapseCategory(e)},t.prototype.expandPropertyGridCategory=function(e){this.designerPropertyGrid&&this.designerPropertyGrid.expandCategory(e)},t.prototype.collapseAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.collapseAllCategories()},t.prototype.expandAllPropertyGridCategories=function(){this.designerPropertyGrid&&this.designerPropertyGrid.expandAllCategories()},t.prototype.collapseAllPropertyTabs=function(){this.collapseAllPropertyGridCategories()},t.prototype.expandAllPropertyTabs=function(){this.expandAllPropertyGridCategories()},t.prototype.expandPropertyTab=function(e){this.expandPropertyGridCategory(e)},t.prototype.collapsePropertyTab=function(e){this.collapsePropertyGridCategory(e)},t.prototype.validateSelectedElement=function(){var e=!0;return this.selectedElement?(this.designerPropertyGrid&&(e=this.designerPropertyGrid.validate()),e):e},t.prototype.selectionChanged=function(e,t,i){void 0===i&&(i=!0),this.survey.currentPage=this.getCurrentPageByElement(e),this.selectionHistoryController.onObjSelected(e),this.designerPropertyGrid&&(this.designerPropertyGrid.obj=e,t||(t=this.designerPropertyGrid.currentlySelectedProperty),t&&this.designerPropertyGrid.selectProperty(t,i||!this.selectFromStringEditor),this.selectFromStringEditor=!1);var o={newSelectedElement:e};this.onSelectedElementChanged.fire(this,o)},t.prototype.getCurrentPageByElement=function(e){if(e)return e.isPage?e:e.page?e.page:e.parentQuestion?this.getCurrentPageByElement(e.parentQuestion):void 0},t.prototype.clickToolboxItem=function(e,t){void 0===t&&(t=null),this.readOnly||(void 0===e.getType&&(e=this.createNewElement(e)),this.survey.lazyRendering=!1,this.doClickQuestionCore(e,"ADDED_FROM_TOOLBOX",-1,t),this.selectElement(e))},t.prototype.getJSONForNewElement=function(e){var t=this.createNewElement(e);return(e=t.toJSON()).type=t.getType(),e},t.prototype.chooseFiles=function(e,t){if(this.onOpenFileChooser.isEmpty){if(!window.FileReader)return;e.value="",e.onchange=function(i){if(window.FileReader&&e&&e.files&&!(e.files.length<1)){for(var o=[],r=0;r<e.files.length;r++)o.push(e.files[r]);t(o)}},e.click()}else this.onOpenFileChooser.fire(this,{input:e,callback:t})},t.prototype.uploadFiles=function(e,t){if(this.onUploadFile.isEmpty){var i=new FileReader;i.onload=function(e){t("success",i.result)},i.readAsDataURL(e[0])}else this.onUploadFile.fire(this,{files:e||[],callback:t})},t.prototype.initKeyboardShortcuts=function(e){e.addEventListener("keydown",this.onKeyDownHandler)},t.prototype.removeKeyboardShortcuts=function(e){e.removeEventListener("keydown",this.onKeyDownHandler)},t.prototype.registerShortcut=function(e,t){this.shortcuts[e]=t},t.prototype.unRegisterShortcut=function(e){delete this.shortcuts[e]},t.prototype.deletePanelOrQuestion=function(e){var t=e.parent,i=t.elements,o=i.indexOf(e);o==i.length-1&&o--,e.delete(),this.selectElement(o>-1?i[o]:t)},t.prototype.onCanShowObjectProperty=function(e,t,i,o,r){var n={obj:e,property:t,canShow:!0,showMode:i,parentObj:o,parentProperty:r};return this.onCanShowProperty.fire(this,n),n.canShow},t.prototype.canDeleteItem=function(e,t,i){var o={obj:e,item:t,canDelete:i};return this.onCanDeleteItem.fire(this,o),o.canDelete},t.prototype.getErrorOnPropertyChanging=function(e,t,i){return"name"!==t||p.SurveyHelper.getObjectType(e)===p.ObjType.Unknown?null:(p.SurveyHelper.getObjectType(e)===p.ObjType.Column?e.colOwner&&!this.isNameUniqueInArray(e.colOwner.columns,e,i):this.generateUniqueName(e,i)!==i)?this.getLocString("pe.propertyNameIsNotUnique"):null},t.prototype.generateUniqueName=function(e,t){var i={element:e,name:t,isUnique:!0};do{for(i.isUnique||(i.name=p.SurveyHelper.generateNewName(i.name));!this.isNameUnique(e,i.name);)i.name=p.SurveyHelper.generateNewName(i.name);i.isUnique=!0;var o=i.name;this.onGenerateNewName.fire(this,i),o!=i.name&&(i.isUnique=this.isNameUnique(e,i.name))}while(!i.isUnique);return i.name},t.prototype.isNameUnique=function(e,t){return!!this.isNameUniqueInArray(this.survey.pages,e,t)&&!!this.isNameUniqueInArray(this.survey.getAllPanels(),e,t)&&this.isNameUniqueInArray(this.survey.getAllQuestions(),e,t)},t.prototype.isNameUniqueInArray=function(e,t,i){if(!Array.isArray(e))return!0;i=i.toLowerCase();for(var o=0;o<e.length;o++)if(e[o]!=t&&e[o].name.toLowerCase()==i)return!1;return!0},t.prototype.doPropertyGridChanged=function(){},Object.defineProperty(t.prototype,"alwaySaveTextInPropertyEditors",{get:function(){return this.alwaySaveTextInPropertyEditorsValue},set:function(e){this.alwaySaveTextInPropertyEditorsValue=e},enumerable:!1,configurable:!0}),t.prototype.onCanShowPropertyCallback=function(e,t,i,o,r){return void 0===i&&(i=null),this.onCanShowObjectProperty(e,t,i,o,r)},t.prototype.onPropertyEditorCreatedCallback=function(e,t,i){var o={obj:e,property:t,editor:i};this.onPropertyEditorCreated.fire(this,o)},t.prototype.onPropertyEditorUpdateTitleActionsCallback=function(e,t,i,o){var r={obj:e,property:t,editor:i,titleActions:o};this.onPropertyEditorUpdateTitleActions.fire(this,r)},t.prototype.onCanDeleteItemCallback=function(e,t,i){return this.canDeleteItem(e,t,i)},t.prototype.onCollectionItemDeletingCallback=function(e,t,i,o){if(this.onCollectionItemDeleting.isEmpty)return!0;var r={obj:e,property:t,propertyName:t.name,collection:i,item:o,allowDelete:!0};return this.onCollectionItemDeleting.fire(this,r),r.allowDelete},t.prototype.onCollectionItemAllowingCallback=function(e,t,i,o,r){if(!this.onCollectionItemAllowOperations.isEmpty){var n={obj:e,property:t,propertyName:t&&t.name,collection:i,item:o,allowEdit:r.allowEdit,allowDelete:r.allowDelete};this.onCollectionItemAllowOperations.fire(this,n),r.allowEdit=n.allowEdit,r.allowDelete=n.allowDelete}},t.prototype.onItemValueAddedCallback=function(e,t,i,o){var r={obj:e,propertyName:t,newItem:i,itemValues:o};this.onItemValueAdded.fire(this,r)},t.prototype.onMatrixDropdownColumnAddedCallback=function(e,t,i){var o={newColumn:t,matrix:e,columns:i};this.onMatrixColumnAdded.fire(this,o)},t.prototype.onSetPropertyEditorOptionsCallback=function(e,t,i){var o={propertyName:e,obj:t,editorOptions:i};this.onSetPropertyEditorOptions.fire(this,o)},t.prototype.onGetErrorTextOnValidationCallback=function(e,t,i){var o=this.getErrorOnPropertyChanging(t,e,i);if(o)return o;var r={propertyName:e,obj:t,value:i,error:""};return this.onPropertyValidationCustomError.fire(this,r),r.error},t.prototype.onValueChangingCallback=function(e){this.onPropertyValueChanging.fire(this,e)},t.prototype.onGetElementEditorTitleCallback=function(e,t){return t},t.prototype.onConditionQuestionsGetListCallback=function(e,t,i,o){var r={propertyName:e,obj:t,editor:i,list:o};if(this.onConditionQuestionsGetList.fire(this,r),r.list!==o){o.splice(0,o.length);for(var n=0;n<r.list.length;n++)o.push(r.list[n])}},t.prototype.onConditionGetTitleCallback=function(e,t){var i={expression:e,title:t};return this.onConditionGetTitle.fire(this,i),i.title},t.prototype.doAutoSave=function(){if(this.autoSaveDelay<=0)this.doSave();else{this.autoSaveTimerId&&clearTimeout(this.autoSaveTimerId);var e=this;this.autoSaveTimerId=setTimeout((function(){clearTimeout(e.autoSaveTimerId),e.autoSaveTimerId=null,e.doSave()}),this.autoSaveDelay)}},t.prototype.doSave=function(){var e=this;this.setState("saving"),this.saveSurveyFunc&&(this.saveNo++,this.saveSurveyFunc(this.saveNo,(function(t,i){e.saveNo===t&&(i?e.setState("saved"):(e.showErrorOnFailedSave&&e.notify(e.getLocString("ed.saveError")),e.setState("modified")))})))},Object.defineProperty(t.prototype,"saveSurveyFunc",{get:function(){return this.saveSurveyFuncValue},set:function(e){this.saveSurveyFuncValue=e,this.showSaveButton=null!=e&&!this.isAutoSave},enumerable:!1,configurable:!0}),t.prototype.convertCurrentQuestion=function(e){var t=this.selectedElement;t&&t.getType()!==e&&p.SurveyHelper.getObjectType(t)===p.ObjType.Question&&(t=this.convertQuestion(t,e),this.selectElement(t))},t.prototype.getAddNewQuestionText=function(e){if(void 0===e&&(e=null),e||(e=this.currentAddQuestionType),e){var t=this.getLocString("ed.addNewTypeQuestion");if(t&&t.format)return t.format(this.toolbox.items.filter((function(t){return t.name==e}))[0].title)}return this.getLocString("ed.addNewQuestion")},Object.defineProperty(t.prototype,"addNewQuestionText",{get:function(){return this.getAddNewQuestionText()},enumerable:!1,configurable:!0}),t.prototype.getQuestionTypeSelectorModel=function(e,t){var i=this;void 0===t&&(t=null);var o=this.toolbox.items.map((function(e){return i.createIActionBarItemByClass(e.name,e.title)})),n=new r.PopupModel("sv-list",{model:new r.ListModel(o,(function(o){i.currentAddQuestionType=o.id,i.addNewQuestionInPage(e,t),n.toggleVisibility()}),!1)},"bottom","center");return{iconName:"icon-more",action:function(){n.displayMode=i.isMobileView?"overlay":"popup",n.toggleVisibility()},popupModel:n}},t.prototype.addNewQuestionInPage=function(e,t,i){void 0===t&&(t=null),void 0===i&&(i=null),i||(i=this.currentAddQuestionType),e(i);var o=r.ElementFactory.Instance.createElement(i||"text","q1");o?this.setNewNames(o):o=this.createNewElement({type:i}),this.clickToolboxItem(o,t)},t.prototype.createIActionBarItemByClass=function(e,t){return void 0===t&&(t=null),new r.Action({title:t||this.getLocString("qt."+e),id:e,iconName:"icon-"+e})},t.prototype.onElementMenuItemsChanged=function(e,t){this.onDefineElementMenuItems.fire(this,{obj:e,items:t})},t.prototype.getElementAllowOperations=function(e){var t={obj:e,element:e,allowDelete:!0,allowCopy:!0,allowDragging:!0,allowChangeType:!0,allowChangeRequired:!0};return this.onElementAllowOperations.fire(this,t),t},t.prototype.getNextItemValue=function(e){var t=r.surveyLocalization.getString("choices_Item"),i=e.choices.map((function(e){return e.value}));return Object(d.getNextValue)(t,i)},t.prototype.createNewItemValue=function(e){var t=this.getNextItemValue(e);return e.createItemValue(t)},t.prototype.onPropertyValueChanged=function(t,i,o){var r=this;e.prototype.onPropertyValueChanged.call(this,t,i,o),"viewType"===t&&this.tabs.forEach((function(e){return e.active=r.viewType===e.id}))},t.prototype.initResponsivityManager=function(e){this.responsivityManager=new E.CreatorResponsivityManager(e,this)},t.prototype.resetResponsivityManager=function(){this.responsivityManager&&(this.responsivityManager.dispose(),this.responsivityManager=void 0)},t.defaultNewSurveyText='{ "pages": [ { "name": "page1"}] }',Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showDesignerTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showJSONEditorTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showTestSurveyTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showEmbeddedSurveyTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showTranslationTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showLogicTab",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:200})],t.prototype,"pageHoverDelay",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"inplaceEditForValues",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"haveCommercialLicense",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"isAutoSave",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"showOptions",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showState",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showSearch",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"generateValidJSON",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:""})],t.prototype,"currentAddQuestionType",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"surveyValue",void 0),Object(o.__decorate)([Object(r.property)()],t.prototype,"viewType",void 0),Object(o.__decorate)([Object(k.undoRedoTransaction)()],t.prototype,"addPage",null),Object(o.__decorate)([Object(k.ignoreUndoRedo)()],t.prototype,"doOnQuestionAdded",null),Object(o.__decorate)([Object(k.ignoreUndoRedo)()],t.prototype,"doOnPanelAdded",null),Object(o.__decorate)([Object(k.ignoreUndoRedo)()],t.prototype,"doOnPageAdded",null),Object(o.__decorate)([Object(r.property)()],t.prototype,"_stateValue",void 0),Object(o.__decorate)([Object(k.undoRedoTransaction)()],t.prototype,"deleteObject",null),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"showSaveButton",void 0),Object(o.__decorate)([Object(k.undoRedoTransaction)()],t.prototype,"convertCurrentQuestion",null),Object(o.__decorate)([Object(k.undoRedoTransaction)()],t.prototype,"addNewQuestionInPage",null),Object(o.__decorate)([Object(r.property)({defaultValue:!0})],t.prototype,"showPageNavigator",void 0),Object(o.__decorate)([Object(r.property)({getDefaultValue:function(){return n.settings.layout.showTabs}})],t.prototype,"showTabs",void 0),Object(o.__decorate)([Object(r.property)({getDefaultValue:function(){return n.settings.layout.showToolbar}})],t.prototype,"showToolbar",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:!1})],t.prototype,"isMobileView",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:"left",onSet:function(e,t){t.toolbox.setLocation(e),t.updateToolboxIsCompact()}})],t.prototype,"toolboxLocation",void 0),Object(o.__decorate)([Object(r.property)({defaultValue:"right"})],t.prototype,"sideBarLocation",void 0),t}(r.Base),V=function(){function e(){}return Object.defineProperty(e,"currentTheme",{get:function(){p.SurveyHelper.warnNonSupported("StylesManager")},set:function(e){p.SurveyHelper.warnNonSupported("StylesManager")},enumerable:!1,configurable:!0}),e.applyTheme=function(e){p.SurveyHelper.warnNonSupported("StylesManager")},e}();function j(e,t,i){if("logo-image"===t)return"svc-logo-image";if("cell"===t||"column-header"===t||"row-header"===t)return"svc-matrix-cell";if(!e.isContentElement){if(e instanceof r.Question)return i?"dropdown"==e.getType()?"svc-cell-dropdown-question":"svc-cell-question":e.customWidget?"svc-widget-question":"dropdown"==e.getType()?"svc-dropdown-question":"image"==e.getType()?"svc-image-question":"rating"==e.getType()?"svc-rating-question":"svc-question";if(e instanceof r.PanelModel)return"svc-panel"}}function I(e,t,i){return"logo-image"===t?i:"cell"===t||"column-header"===t||"row-header"===t?{creator:i,element:e,question:e.question,row:e.row,column:e.column}:j(e,t,!1)?e instanceof r.Question||e instanceof r.PanelModel?i:null:void 0}function M(e,t){return t.isContentElement?r.SurveyModel.TemplateRendererComponentName:"imagepicker"===t.getType()?"svc-image-item-value":"svc-item-value"}function z(e,t,i){return t.isContentElement?e:{creator:i,question:t,item:e}}function q(e,t){return!(e.parentQuestion instanceof r.QuestionMatrixDropdownModelBase)&&(!e.isContentElement||e.isEditableTemplateElement)}},"./src/creator-responsivity-manager.ts":
|
|
317
317
|
/*!*********************************************!*\
|
|
318
318
|
!*** ./src/creator-responsivity-manager.ts ***!
|
|
319
319
|
\*********************************************/
|
|
@@ -337,15 +337,19 @@ License: MIT
|
|
|
337
337
|
/*!******************************!*\
|
|
338
338
|
!*** ./src/entries/index.ts ***!
|
|
339
339
|
\******************************/
|
|
340
|
-
/*! exports provided: Version, enStrings, editorLocalization, defaultStrings, localization, QuestionConvertMode, settings, EmptySurveyCreatorOptions, TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorBase, StylesManager, getElementWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable, CreatorResponsivityManager, EmbedModel, TabEmbedPlugin, AceJsonEditorModel, TabJsonEditorAcePlugin, JsonEditorBaseModel, TabJsonEditorBasePlugin, TextareaJsonEditorModel, TabJsonEditorTextareaPlugin, TestSurveyTabViewModel, TabTestPlugin, SurveyLogic, TranslationItemBase, TranslationItemString, TranslationItem, TranslationGroup, Translation, translationCss, TabTranslationPlugin, TabDesignerViewModel, TabDesignerPlugin, SurveyLogicUI, TabLogicPlugin, logicCss, ToolboxToolViewModel, PageNavigatorViewModel, PageViewModel, RowViewModel, QuestionAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveySimulatorModel, DEFAULT_MONITOR_DPI, simulatorDevices, SurveyResultsItemModel, SurveyResultsModel, LogoImageViewModel, StringEditorViewModelBase, QuestionEmbeddedSurveyModel, QuestionLinkValueModel, getLocString, SurveyJSON5, setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorNumber, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorColor, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorExpression, PropertyGridEditorCondition, PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings, PropertyGridViewModel, ObjectSelectorItem, ObjectSelector, ObjectSelectorModel, PropertyGridEditorQuestionRestfull, PropertyGridValueEditorBase, PropertyGridCellsEditor, PropertyGridValueEditor, PropertyGridRowValueEditor, PropertyGridPanelValueEditor, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, propertyGridCss, QuestionConverter, svgBundle, SurveyTextWorker, QuestionToolboxCategory, QuestionToolboxItem, QuestionToolbox, SideBarModel, SideBarTabModel, getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, SurveyQuestionEditorDefinition, ObjType, SurveyHelper, Notifier, ResizeManager, UndoRedoPlugin, undoRedoTransaction, ignoreUndoRedo, UndoRedoManager, Transaction, UndoRedoAction, UndoRedoArrayAction */function(e,t,i){"use strict";i.r(t),i.d(t,"Version",(function(){return se}));var o=i(/*! ../localization/english */"./src/localization/english.ts");i.d(t,"enStrings",(function(){return o.enStrings}));var r=i(/*! ../editorLocalization */"./src/editorLocalization.ts");i.d(t,"editorLocalization",(function(){return r.editorLocalization})),i.d(t,"defaultStrings",(function(){return r.defaultStrings})),i.d(t,"localization",(function(){return r.editorLocalization}));var n=i(/*! ../settings */"./src/settings.ts");i.d(t,"QuestionConvertMode",(function(){return n.QuestionConvertMode})),i.d(t,"settings",(function(){return n.settings})),i.d(t,"EmptySurveyCreatorOptions",(function(){return n.EmptySurveyCreatorOptions}));var a=i(/*! ../creator-base */"./src/creator-base.ts");i.d(t,"TabbedMenuItem",(function(){return a.TabbedMenuItem})),i.d(t,"TabbedMenuContainer",(function(){return a.TabbedMenuContainer})),i.d(t,"ToolbarActionContainer",(function(){return a.ToolbarActionContainer})),i.d(t,"CreatorBase",(function(){return a.CreatorBase})),i.d(t,"StylesManager",(function(){return a.StylesManager})),i.d(t,"getElementWrapperComponentName",(function(){return a.getElementWrapperComponentName})),i.d(t,"getElementWrapperComponentData",(function(){return a.getElementWrapperComponentData})),i.d(t,"getItemValueWrapperComponentName",(function(){return a.getItemValueWrapperComponentName})),i.d(t,"getItemValueWrapperComponentData",(function(){return a.getItemValueWrapperComponentData})),i.d(t,"isStringEditable",(function(){return a.isStringEditable}));var s=i(/*! ../creator-responsivity-manager */"./src/creator-responsivity-manager.ts");i.d(t,"CreatorResponsivityManager",(function(){return s.CreatorResponsivityManager}));var l=i(/*! ../components/tabs/embed */"./src/components/tabs/embed.ts");i.d(t,"EmbedModel",(function(){return l.EmbedModel})),i.d(t,"TabEmbedPlugin",(function(){return l.TabEmbedPlugin}));var u=i(/*! ../components/tabs/json-editor-ace */"./src/components/tabs/json-editor-ace.ts");i.d(t,"AceJsonEditorModel",(function(){return u.AceJsonEditorModel})),i.d(t,"TabJsonEditorAcePlugin",(function(){return u.TabJsonEditorAcePlugin}));var c=i(/*! ../components/tabs/json-editor-plugin */"./src/components/tabs/json-editor-plugin.ts");i.d(t,"JsonEditorBaseModel",(function(){return c.JsonEditorBaseModel})),i.d(t,"TabJsonEditorBasePlugin",(function(){return c.TabJsonEditorBasePlugin}));var d=i(/*! ../components/tabs/json-editor-textarea */"./src/components/tabs/json-editor-textarea.ts");i.d(t,"TextareaJsonEditorModel",(function(){return d.TextareaJsonEditorModel})),i.d(t,"TabJsonEditorTextareaPlugin",(function(){return d.TabJsonEditorTextareaPlugin}));var p=i(/*! ../components/tabs/test */"./src/components/tabs/test.ts");i.d(t,"TestSurveyTabViewModel",(function(){return p.TestSurveyTabViewModel}));var m=i(/*! ../components/tabs/test-plugin */"./src/components/tabs/test-plugin.ts");i.d(t,"TabTestPlugin",(function(){return m.TabTestPlugin}));var g=i(/*! ../components/tabs/logic */"./src/components/tabs/logic.ts");i.d(t,"SurveyLogic",(function(){return g.SurveyLogic}));var h=i(/*! ../components/tabs/translation */"./src/components/tabs/translation.ts");i.d(t,"TranslationItemBase",(function(){return h.TranslationItemBase})),i.d(t,"TranslationItemString",(function(){return h.TranslationItemString})),i.d(t,"TranslationItem",(function(){return h.TranslationItem})),i.d(t,"TranslationGroup",(function(){return h.TranslationGroup})),i.d(t,"Translation",(function(){return h.Translation}));var v=i(/*! ../components/tabs/translation-theme */"./src/components/tabs/translation-theme.ts");i.d(t,"translationCss",(function(){return v.translationCss}));var y=i(/*! ../components/tabs/translation-plugin */"./src/components/tabs/translation-plugin.ts");i.d(t,"TabTranslationPlugin",(function(){return y.TabTranslationPlugin}));var f=i(/*! ../components/tabs/designer */"./src/components/tabs/designer.ts");i.d(t,"TabDesignerViewModel",(function(){return f.TabDesignerViewModel}));var b=i(/*! ../components/tabs/designer-plugin */"./src/components/tabs/designer-plugin.ts");i.d(t,"TabDesignerPlugin",(function(){return b.TabDesignerPlugin}));var x=i(/*! ../components/tabs/logic-ui */"./src/components/tabs/logic-ui.ts");i.d(t,"SurveyLogicUI",(function(){return x.SurveyLogicUI}));var w=i(/*! ../components/tabs/logic-plugin */"./src/components/tabs/logic-plugin.ts");i.d(t,"TabLogicPlugin",(function(){return w.TabLogicPlugin}));var T=i(/*! ../components/tabs/logic-theme */"./src/components/tabs/logic-theme.ts");i.d(t,"logicCss",(function(){return T.logicCss}));var k=i(/*! ../components/toolbox/toolbox-tool */"./src/components/toolbox/toolbox-tool.ts");i.d(t,"ToolboxToolViewModel",(function(){return k.ToolboxToolViewModel}));var S=i(/*! ../components/page-navigator/page-navigator */"./src/components/page-navigator/page-navigator.ts");i.d(t,"PageNavigatorViewModel",(function(){return S.PageNavigatorViewModel}));var P=i(/*! ../components/page */"./src/components/page.ts");i.d(t,"PageViewModel",(function(){return P.PageViewModel}));var E=i(/*! ../components/row */"./src/components/row.ts");i.d(t,"RowViewModel",(function(){return E.RowViewModel}));var C=i(/*! ../components/question */"./src/components/question.ts");i.d(t,"QuestionAdornerViewModel",(function(){return C.QuestionAdornerViewModel}));var N=i(/*! ../components/question-image */"./src/components/question-image.ts");i.d(t,"QuestionImageAdornerViewModel",(function(){return N.QuestionImageAdornerViewModel}));var O=i(/*! ../components/question-rating */"./src/components/question-rating.ts");i.d(t,"QuestionRatingAdornerViewModel",(function(){return O.QuestionRatingAdornerViewModel}));var _=i(/*! ../components/item-value */"./src/components/item-value.ts");i.d(t,"ItemValueWrapperViewModel",(function(){return _.ItemValueWrapperViewModel}));var A=i(/*! ../components/image-item-value */"./src/components/image-item-value.ts");i.d(t,"ImageItemValueWrapperViewModel",(function(){return A.ImageItemValueWrapperViewModel}));var V=i(/*! ../components/matrix-cell */"./src/components/matrix-cell.ts");i.d(t,"MatrixCellWrapperViewModel",(function(){return V.MatrixCellWrapperViewModel}));var j=i(/*! ../components/simulator */"./src/components/simulator.ts");i.d(t,"SurveySimulatorModel",(function(){return j.SurveySimulatorModel})),i.d(t,"DEFAULT_MONITOR_DPI",(function(){return j.DEFAULT_MONITOR_DPI})),i.d(t,"simulatorDevices",(function(){return j.simulatorDevices}));var I=i(/*! ../components/results */"./src/components/results.ts");i.d(t,"SurveyResultsItemModel",(function(){return I.SurveyResultsItemModel})),i.d(t,"SurveyResultsModel",(function(){return I.SurveyResultsModel}));var z=i(/*! ../components/header/logo-image */"./src/components/header/logo-image.ts");i.d(t,"LogoImageViewModel",(function(){return z.LogoImageViewModel}));var M=i(/*! ../components/string-editor */"./src/components/string-editor.ts");i.d(t,"StringEditorViewModelBase",(function(){return M.StringEditorViewModelBase}));var q=i(/*! ../components/embedded-survey */"./src/components/embedded-survey.ts");i.d(t,"QuestionEmbeddedSurveyModel",(function(){return q.QuestionEmbeddedSurveyModel}));var L=i(/*! ../components/link-value */"./src/components/link-value.ts");i.d(t,"QuestionLinkValueModel",(function(){return L.QuestionLinkValueModel})),i.d(t,"getLocString",(function(){return r.getLocString}));var R=i(/*! ../json5 */"./src/json5.ts");i.d(t,"SurveyJSON5",(function(){return R.SurveyJSON5}));var D=i(/*! ../property-grid */"./src/property-grid/index.ts");i.d(t,"setSurveyJSONForPropertyGrid",(function(){return D.setSurveyJSONForPropertyGrid})),i.d(t,"PropertyEditorSetupValue",(function(){return D.PropertyEditorSetupValue})),i.d(t,"PropertyGridEditorCollection",(function(){return D.PropertyGridEditorCollection})),i.d(t,"PropertyGridTitleActionsCreator",(function(){return D.PropertyGridTitleActionsCreator})),i.d(t,"PropertyJSONGenerator",(function(){return D.PropertyJSONGenerator})),i.d(t,"PropertyGridModel",(function(){return D.PropertyGridModel})),i.d(t,"PropertyGridEditor",(function(){return D.PropertyGridEditor})),i.d(t,"PropertyGridEditorBoolean",(function(){return D.PropertyGridEditorBoolean})),i.d(t,"PropertyGridEditorStringBase",(function(){return D.PropertyGridEditorStringBase})),i.d(t,"PropertyGridEditorString",(function(){return D.PropertyGridEditorString})),i.d(t,"PropertyGridEditorNumber",(function(){return D.PropertyGridEditorNumber})),i.d(t,"PropertyGridEditorText",(function(){return D.PropertyGridEditorText})),i.d(t,"PropertyGridEditorHtml",(function(){return D.PropertyGridEditorHtml})),i.d(t,"PropertyGridEditorColor",(function(){return D.PropertyGridEditorColor})),i.d(t,"PropertyGridEditorStringArray",(function(){return D.PropertyGridEditorStringArray})),i.d(t,"PropertyGridEditorDropdown",(function(){return D.PropertyGridEditorDropdown})),i.d(t,"PropertyGridEditorSet",(function(){return D.PropertyGridEditorSet})),i.d(t,"PropertyGridEditorPage",(function(){return D.PropertyGridEditorPage})),i.d(t,"PropertyGridEditorQuestion",(function(){return D.PropertyGridEditorQuestion})),i.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return D.PropertyGridEditorQuestionSelectBase})),i.d(t,"PropertyGridEditorQuestionValue",(function(){return D.PropertyGridEditorQuestionValue}));var B=i(/*! ../property-grid/condition */"./src/property-grid/condition.ts");i.d(t,"PropertyGridEditorExpression",(function(){return B.PropertyGridEditorExpression})),i.d(t,"PropertyGridEditorCondition",(function(){return B.PropertyGridEditorCondition}));var H=i(/*! ../property-grid/matrices */"./src/property-grid/matrices.ts");i.d(t,"PropertyGridEditorMatrix",(function(){return H.PropertyGridEditorMatrix})),i.d(t,"PropertyGridEditorMatrixItemValues",(function(){return H.PropertyGridEditorMatrixItemValues})),i.d(t,"PropertyGridEditorMatrixColumns",(function(){return H.PropertyGridEditorMatrixColumns})),i.d(t,"PropertyGridEditorMatrixPages",(function(){return H.PropertyGridEditorMatrixPages})),i.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return H.PropertyGridEditorMatrixCalculatedValues})),i.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return H.PropertyGridEditorMatrixHtmlConditions})),i.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return H.PropertyGridEditorMatrixUrlConditions})),i.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return H.PropertyGridEditorMatrixMutlipleTextItems})),i.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return H.PropertyGridEditorMatrixMultipleTypes})),i.d(t,"PropertyGridEditorMatrixValidators",(function(){return H.PropertyGridEditorMatrixValidators})),i.d(t,"PropertyGridEditorMatrixTriggers",(function(){return H.PropertyGridEditorMatrixTriggers})),i.d(t,"PropertyGridEditorBindings",(function(){return H.PropertyGridEditorBindings}));var F=i(/*! ../property-grid/property-grid-view-model */"./src/property-grid/property-grid-view-model.ts");i.d(t,"PropertyGridViewModel",(function(){return F.PropertyGridViewModel}));var Q=i(/*! ../property-grid/object-selector */"./src/property-grid/object-selector.ts");i.d(t,"ObjectSelectorItem",(function(){return Q.ObjectSelectorItem})),i.d(t,"ObjectSelector",(function(){return Q.ObjectSelector})),i.d(t,"ObjectSelectorModel",(function(){return Q.ObjectSelectorModel}));var U=i(/*! ../property-grid/restfull */"./src/property-grid/restfull.ts");i.d(t,"PropertyGridEditorQuestionRestfull",(function(){return U.PropertyGridEditorQuestionRestfull}));var G=i(/*! ../property-grid/values */"./src/property-grid/values.ts");i.d(t,"PropertyGridValueEditorBase",(function(){return G.PropertyGridValueEditorBase})),i.d(t,"PropertyGridCellsEditor",(function(){return G.PropertyGridCellsEditor})),i.d(t,"PropertyGridValueEditor",(function(){return G.PropertyGridValueEditor})),i.d(t,"PropertyGridRowValueEditor",(function(){return G.PropertyGridRowValueEditor})),i.d(t,"PropertyGridPanelValueEditor",(function(){return G.PropertyGridPanelValueEditor})),i.d(t,"PropertyGridTriggerValueEditor",(function(){return G.PropertyGridTriggerValueEditor})),i.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return G.PropertyGridTriggerValueInLogicEditor}));var J=i(/*! ../property-grid-theme/property-grid */"./src/property-grid-theme/property-grid.ts");i.d(t,"propertyGridCss",(function(){return J.propertyGridCss}));var W=i(/*! ../questionconverter */"./src/questionconverter.ts");i.d(t,"QuestionConverter",(function(){return W.QuestionConverter}));var K=i(/*! ../svgbundle */"./src/svgbundle.ts");i.d(t,"svgBundle",(function(){return K.svgBundle}));var Z=i(/*! ../textWorker */"./src/textWorker.ts");i.d(t,"SurveyTextWorker",(function(){return Z.SurveyTextWorker}));var Y=i(/*! ../toolbox */"./src/toolbox.ts");i.d(t,"QuestionToolboxCategory",(function(){return Y.QuestionToolboxCategory})),i.d(t,"QuestionToolboxItem",(function(){return Y.QuestionToolboxItem})),i.d(t,"QuestionToolbox",(function(){return Y.QuestionToolbox}));var X=i(/*! ../components/side-bar/side-bar-model */"./src/components/side-bar/side-bar-model.ts");i.d(t,"SideBarModel",(function(){return X.SideBarModel}));var $=i(/*! ../components/side-bar/side-bar-tab-model */"./src/components/side-bar/side-bar-tab-model.ts");i.d(t,"SideBarTabModel",(function(){return $.SideBarTabModel})),i(/*! ../utils/events */"./src/utils/events.ts");var ee=i(/*! ../utils/utils */"./src/utils/utils.ts");i.d(t,"getNextValue",(function(){return ee.getNextValue})),i.d(t,"findParentNode",(function(){return ee.findParentNode})),i.d(t,"focusFirstControl",(function(){return ee.focusFirstControl})),i.d(t,"getFirstNonTextElement",(function(){return ee.getFirstNonTextElement})),i.d(t,"getNodesFromKoComponentInfo",(function(){return ee.getNodesFromKoComponentInfo})),i.d(t,"propertyExists",(function(){return ee.propertyExists})),i.d(t,"isPropertyVisible",(function(){return ee.isPropertyVisible})),i.d(t,"toggleHovered",(function(){return ee.toggleHovered})),i.d(t,"clearNewLines",(function(){return ee.clearNewLines})),i.d(t,"select",(function(){return ee.select})),i.d(t,"copyObject",(function(){return ee.copyObject})),i.d(t,"copyCssClasses",(function(){return ee.copyCssClasses})),i.d(t,"assignDefaultV2Classes",(function(){return ee.assignDefaultV2Classes}));var te=i(/*! ../question-editor/definition */"./src/question-editor/definition.ts");i.d(t,"SurveyQuestionEditorDefinition",(function(){return te.SurveyQuestionEditorDefinition}));var ie=i(/*! ../survey-helper */"./src/survey-helper.ts");i.d(t,"ObjType",(function(){return ie.ObjType})),i.d(t,"SurveyHelper",(function(){return ie.SurveyHelper}));var oe=i(/*! ../components/notifier */"./src/components/notifier.ts");i.d(t,"Notifier",(function(){return oe.Notifier}));var re=i(/*! ../utils/resizer */"./src/utils/resizer.ts");i.d(t,"ResizeManager",(function(){return re.ResizeManager}));var ne=i(/*! ../plugins/undo-redo */"./src/plugins/undo-redo/index.ts");i.d(t,"UndoRedoPlugin",(function(){return ne.UndoRedoPlugin})),i.d(t,"undoRedoTransaction",(function(){return ne.undoRedoTransaction})),i.d(t,"ignoreUndoRedo",(function(){return ne.ignoreUndoRedo}));var ae=i(/*! ../plugins/undo-redo/undo-redo-manager */"./src/plugins/undo-redo/undo-redo-manager.ts");i.d(t,"UndoRedoManager",(function(){return ae.UndoRedoManager})),i.d(t,"Transaction",(function(){return ae.Transaction})),i.d(t,"UndoRedoAction",(function(){return ae.UndoRedoAction})),i.d(t,"UndoRedoArrayAction",(function(){return ae.UndoRedoArrayAction})),i(/*! ../components/property-panel/property-panel-item.scss */"./src/components/property-panel/property-panel-item.scss"),i(/*! ../components/property-panel/property-panel.scss */"./src/components/property-panel/property-panel.scss"),i(/*! ../components/tabbed-menu/tabbed-menu-item.scss */"./src/components/tabbed-menu/tabbed-menu-item.scss"),i(/*! ../components/tabbed-menu/tabbed-menu.scss */"./src/components/tabbed-menu/tabbed-menu.scss"),i(/*! ../components/toolbox/toolbox-tool.scss */"./src/components/toolbox/toolbox-tool.scss"),i(/*! ../components/question-dropdown.scss */"./src/components/question-dropdown.scss"),i(/*! ../components/toolbox/toolbox.scss */"./src/components/toolbox/toolbox.scss"),i(/*! ../components/side-bar/side-bar.scss */"./src/components/side-bar/side-bar.scss"),i(/*! ../property-grid-theme/property-grid.scss */"./src/property-grid-theme/property-grid.scss"),i(/*! ../utils/design.scss */"./src/utils/design.scss"),i(/*! ../utils/layout.scss */"./src/utils/layout.scss"),i(/*! ../localization/danish */"./src/localization/danish.ts"),i(/*! ../localization/french */"./src/localization/french.ts"),i(/*! ../localization/german */"./src/localization/german.ts"),i(/*! ../localization/finnish */"./src/localization/finnish.ts"),i(/*! ../localization/italian */"./src/localization/italian.ts"),i(/*! ../localization/indonesian */"./src/localization/indonesian.ts"),i(/*! ../localization/korean */"./src/localization/korean.ts"),i(/*! ../localization/persian */"./src/localization/persian.ts"),i(/*! ../localization/polish */"./src/localization/polish.ts"),i(/*! ../localization/portuguese */"./src/localization/portuguese.ts"),i(/*! ../localization/simplified-chinese */"./src/localization/simplified-chinese.ts"),i(/*! ../localization/spanish */"./src/localization/spanish.ts"),i(/*! ../localization/swedish */"./src/localization/swedish.ts"),i(/*! ../localization/traditional-chinese */"./src/localization/traditional-chinese.ts"),i(/*! ../localization/turkish */"./src/localization/turkish.ts"),i(/*! ../localization/norwegian */"./src/localization/norwegian.ts"),i(/*! ../localization/hungarian */"./src/localization/hungarian.ts"),i(/*! ../localization/russian */"./src/localization/russian.ts"),i(/*! ../localization/tajik */"./src/localization/tajik.ts"),i(/*! ../localization/dutch */"./src/localization/dutch.ts"),i(/*! ../localization/croatian */"./src/localization/croatian.ts");var se,le=i(/*! survey-core */"survey-core");se="".concat("1.9.4-beta.1"),le.settings.supportCreatorV2=!0},"./src/expressionToDisplayText.ts":
|
|
340
|
+
/*! exports provided: Version, enStrings, editorLocalization, defaultStrings, localization, QuestionConvertMode, settings, EmptySurveyCreatorOptions, TabbedMenuItem, TabbedMenuContainer, ToolbarActionContainer, CreatorBase, StylesManager, getElementWrapperComponentName, getElementWrapperComponentData, getItemValueWrapperComponentName, getItemValueWrapperComponentData, isStringEditable, CreatorResponsivityManager, EmbedModel, TabEmbedPlugin, AceJsonEditorModel, TabJsonEditorAcePlugin, JsonEditorBaseModel, TabJsonEditorBasePlugin, TextareaJsonEditorModel, TabJsonEditorTextareaPlugin, TestSurveyTabViewModel, TabTestPlugin, SurveyLogic, TranslationItemBase, TranslationItemString, TranslationItem, TranslationGroup, Translation, translationCss, TabTranslationPlugin, TabDesignerViewModel, TabDesignerPlugin, SurveyLogicUI, TabLogicPlugin, logicCss, ToolboxToolViewModel, PageNavigatorViewModel, PageViewModel, RowViewModel, QuestionAdornerViewModel, QuestionImageAdornerViewModel, QuestionRatingAdornerViewModel, ItemValueWrapperViewModel, ImageItemValueWrapperViewModel, MatrixCellWrapperViewModel, SurveySimulatorModel, DEFAULT_MONITOR_DPI, simulatorDevices, SurveyResultsItemModel, SurveyResultsModel, LogoImageViewModel, StringEditorViewModelBase, QuestionEmbeddedSurveyModel, QuestionLinkValueModel, getLocString, SurveyJSON5, setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorNumber, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorColor, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue, PropertyGridEditorExpression, PropertyGridEditorCondition, PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings, PropertyGridViewModel, ObjectSelectorItem, ObjectSelector, ObjectSelectorModel, PropertyGridEditorQuestionRestfull, PropertyGridValueEditorBase, PropertyGridCellsEditor, PropertyGridValueEditor, PropertyGridRowValueEditor, PropertyGridPanelValueEditor, PropertyGridTriggerValueEditor, PropertyGridTriggerValueInLogicEditor, propertyGridCss, QuestionConverter, svgBundle, SurveyTextWorker, QuestionToolboxCategory, QuestionToolboxItem, QuestionToolbox, SideBarModel, SideBarTabModel, getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, wrapTextByCurlyBraces, SurveyQuestionEditorDefinition, ObjType, SurveyHelper, Notifier, ResizeManager, UndoRedoPlugin, undoRedoTransaction, ignoreUndoRedo, UndoRedoManager, Transaction, UndoRedoAction, UndoRedoArrayAction */function(e,t,i){"use strict";i.r(t),i.d(t,"Version",(function(){return se}));var o=i(/*! ../localization/english */"./src/localization/english.ts");i.d(t,"enStrings",(function(){return o.enStrings}));var r=i(/*! ../editorLocalization */"./src/editorLocalization.ts");i.d(t,"editorLocalization",(function(){return r.editorLocalization})),i.d(t,"defaultStrings",(function(){return r.defaultStrings})),i.d(t,"localization",(function(){return r.editorLocalization}));var n=i(/*! ../settings */"./src/settings.ts");i.d(t,"QuestionConvertMode",(function(){return n.QuestionConvertMode})),i.d(t,"settings",(function(){return n.settings})),i.d(t,"EmptySurveyCreatorOptions",(function(){return n.EmptySurveyCreatorOptions}));var a=i(/*! ../creator-base */"./src/creator-base.ts");i.d(t,"TabbedMenuItem",(function(){return a.TabbedMenuItem})),i.d(t,"TabbedMenuContainer",(function(){return a.TabbedMenuContainer})),i.d(t,"ToolbarActionContainer",(function(){return a.ToolbarActionContainer})),i.d(t,"CreatorBase",(function(){return a.CreatorBase})),i.d(t,"StylesManager",(function(){return a.StylesManager})),i.d(t,"getElementWrapperComponentName",(function(){return a.getElementWrapperComponentName})),i.d(t,"getElementWrapperComponentData",(function(){return a.getElementWrapperComponentData})),i.d(t,"getItemValueWrapperComponentName",(function(){return a.getItemValueWrapperComponentName})),i.d(t,"getItemValueWrapperComponentData",(function(){return a.getItemValueWrapperComponentData})),i.d(t,"isStringEditable",(function(){return a.isStringEditable}));var s=i(/*! ../creator-responsivity-manager */"./src/creator-responsivity-manager.ts");i.d(t,"CreatorResponsivityManager",(function(){return s.CreatorResponsivityManager}));var l=i(/*! ../components/tabs/embed */"./src/components/tabs/embed.ts");i.d(t,"EmbedModel",(function(){return l.EmbedModel})),i.d(t,"TabEmbedPlugin",(function(){return l.TabEmbedPlugin}));var u=i(/*! ../components/tabs/json-editor-ace */"./src/components/tabs/json-editor-ace.ts");i.d(t,"AceJsonEditorModel",(function(){return u.AceJsonEditorModel})),i.d(t,"TabJsonEditorAcePlugin",(function(){return u.TabJsonEditorAcePlugin}));var c=i(/*! ../components/tabs/json-editor-plugin */"./src/components/tabs/json-editor-plugin.ts");i.d(t,"JsonEditorBaseModel",(function(){return c.JsonEditorBaseModel})),i.d(t,"TabJsonEditorBasePlugin",(function(){return c.TabJsonEditorBasePlugin}));var d=i(/*! ../components/tabs/json-editor-textarea */"./src/components/tabs/json-editor-textarea.ts");i.d(t,"TextareaJsonEditorModel",(function(){return d.TextareaJsonEditorModel})),i.d(t,"TabJsonEditorTextareaPlugin",(function(){return d.TabJsonEditorTextareaPlugin}));var p=i(/*! ../components/tabs/test */"./src/components/tabs/test.ts");i.d(t,"TestSurveyTabViewModel",(function(){return p.TestSurveyTabViewModel}));var m=i(/*! ../components/tabs/test-plugin */"./src/components/tabs/test-plugin.ts");i.d(t,"TabTestPlugin",(function(){return m.TabTestPlugin}));var g=i(/*! ../components/tabs/logic */"./src/components/tabs/logic.ts");i.d(t,"SurveyLogic",(function(){return g.SurveyLogic}));var h=i(/*! ../components/tabs/translation */"./src/components/tabs/translation.ts");i.d(t,"TranslationItemBase",(function(){return h.TranslationItemBase})),i.d(t,"TranslationItemString",(function(){return h.TranslationItemString})),i.d(t,"TranslationItem",(function(){return h.TranslationItem})),i.d(t,"TranslationGroup",(function(){return h.TranslationGroup})),i.d(t,"Translation",(function(){return h.Translation}));var v=i(/*! ../components/tabs/translation-theme */"./src/components/tabs/translation-theme.ts");i.d(t,"translationCss",(function(){return v.translationCss}));var y=i(/*! ../components/tabs/translation-plugin */"./src/components/tabs/translation-plugin.ts");i.d(t,"TabTranslationPlugin",(function(){return y.TabTranslationPlugin}));var f=i(/*! ../components/tabs/designer */"./src/components/tabs/designer.ts");i.d(t,"TabDesignerViewModel",(function(){return f.TabDesignerViewModel}));var b=i(/*! ../components/tabs/designer-plugin */"./src/components/tabs/designer-plugin.ts");i.d(t,"TabDesignerPlugin",(function(){return b.TabDesignerPlugin}));var x=i(/*! ../components/tabs/logic-ui */"./src/components/tabs/logic-ui.ts");i.d(t,"SurveyLogicUI",(function(){return x.SurveyLogicUI}));var w=i(/*! ../components/tabs/logic-plugin */"./src/components/tabs/logic-plugin.ts");i.d(t,"TabLogicPlugin",(function(){return w.TabLogicPlugin}));var T=i(/*! ../components/tabs/logic-theme */"./src/components/tabs/logic-theme.ts");i.d(t,"logicCss",(function(){return T.logicCss}));var S=i(/*! ../components/toolbox/toolbox-tool */"./src/components/toolbox/toolbox-tool.ts");i.d(t,"ToolboxToolViewModel",(function(){return S.ToolboxToolViewModel}));var k=i(/*! ../components/page-navigator/page-navigator */"./src/components/page-navigator/page-navigator.ts");i.d(t,"PageNavigatorViewModel",(function(){return k.PageNavigatorViewModel}));var P=i(/*! ../components/page */"./src/components/page.ts");i.d(t,"PageViewModel",(function(){return P.PageViewModel}));var E=i(/*! ../components/row */"./src/components/row.ts");i.d(t,"RowViewModel",(function(){return E.RowViewModel}));var C=i(/*! ../components/question */"./src/components/question.ts");i.d(t,"QuestionAdornerViewModel",(function(){return C.QuestionAdornerViewModel}));var N=i(/*! ../components/question-image */"./src/components/question-image.ts");i.d(t,"QuestionImageAdornerViewModel",(function(){return N.QuestionImageAdornerViewModel}));var O=i(/*! ../components/question-rating */"./src/components/question-rating.ts");i.d(t,"QuestionRatingAdornerViewModel",(function(){return O.QuestionRatingAdornerViewModel}));var _=i(/*! ../components/item-value */"./src/components/item-value.ts");i.d(t,"ItemValueWrapperViewModel",(function(){return _.ItemValueWrapperViewModel}));var A=i(/*! ../components/image-item-value */"./src/components/image-item-value.ts");i.d(t,"ImageItemValueWrapperViewModel",(function(){return A.ImageItemValueWrapperViewModel}));var V=i(/*! ../components/matrix-cell */"./src/components/matrix-cell.ts");i.d(t,"MatrixCellWrapperViewModel",(function(){return V.MatrixCellWrapperViewModel}));var j=i(/*! ../components/simulator */"./src/components/simulator.ts");i.d(t,"SurveySimulatorModel",(function(){return j.SurveySimulatorModel})),i.d(t,"DEFAULT_MONITOR_DPI",(function(){return j.DEFAULT_MONITOR_DPI})),i.d(t,"simulatorDevices",(function(){return j.simulatorDevices}));var I=i(/*! ../components/results */"./src/components/results.ts");i.d(t,"SurveyResultsItemModel",(function(){return I.SurveyResultsItemModel})),i.d(t,"SurveyResultsModel",(function(){return I.SurveyResultsModel}));var M=i(/*! ../components/header/logo-image */"./src/components/header/logo-image.ts");i.d(t,"LogoImageViewModel",(function(){return M.LogoImageViewModel}));var z=i(/*! ../components/string-editor */"./src/components/string-editor.ts");i.d(t,"StringEditorViewModelBase",(function(){return z.StringEditorViewModelBase}));var q=i(/*! ../components/embedded-survey */"./src/components/embedded-survey.ts");i.d(t,"QuestionEmbeddedSurveyModel",(function(){return q.QuestionEmbeddedSurveyModel}));var R=i(/*! ../components/link-value */"./src/components/link-value.ts");i.d(t,"QuestionLinkValueModel",(function(){return R.QuestionLinkValueModel})),i.d(t,"getLocString",(function(){return r.getLocString}));var L=i(/*! ../json5 */"./src/json5.ts");i.d(t,"SurveyJSON5",(function(){return L.SurveyJSON5}));var D=i(/*! ../property-grid */"./src/property-grid/index.ts");i.d(t,"setSurveyJSONForPropertyGrid",(function(){return D.setSurveyJSONForPropertyGrid})),i.d(t,"PropertyEditorSetupValue",(function(){return D.PropertyEditorSetupValue})),i.d(t,"PropertyGridEditorCollection",(function(){return D.PropertyGridEditorCollection})),i.d(t,"PropertyGridTitleActionsCreator",(function(){return D.PropertyGridTitleActionsCreator})),i.d(t,"PropertyJSONGenerator",(function(){return D.PropertyJSONGenerator})),i.d(t,"PropertyGridModel",(function(){return D.PropertyGridModel})),i.d(t,"PropertyGridEditor",(function(){return D.PropertyGridEditor})),i.d(t,"PropertyGridEditorBoolean",(function(){return D.PropertyGridEditorBoolean})),i.d(t,"PropertyGridEditorStringBase",(function(){return D.PropertyGridEditorStringBase})),i.d(t,"PropertyGridEditorString",(function(){return D.PropertyGridEditorString})),i.d(t,"PropertyGridEditorNumber",(function(){return D.PropertyGridEditorNumber})),i.d(t,"PropertyGridEditorText",(function(){return D.PropertyGridEditorText})),i.d(t,"PropertyGridEditorHtml",(function(){return D.PropertyGridEditorHtml})),i.d(t,"PropertyGridEditorColor",(function(){return D.PropertyGridEditorColor})),i.d(t,"PropertyGridEditorStringArray",(function(){return D.PropertyGridEditorStringArray})),i.d(t,"PropertyGridEditorDropdown",(function(){return D.PropertyGridEditorDropdown})),i.d(t,"PropertyGridEditorSet",(function(){return D.PropertyGridEditorSet})),i.d(t,"PropertyGridEditorPage",(function(){return D.PropertyGridEditorPage})),i.d(t,"PropertyGridEditorQuestion",(function(){return D.PropertyGridEditorQuestion})),i.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return D.PropertyGridEditorQuestionSelectBase})),i.d(t,"PropertyGridEditorQuestionValue",(function(){return D.PropertyGridEditorQuestionValue}));var B=i(/*! ../property-grid/condition */"./src/property-grid/condition.ts");i.d(t,"PropertyGridEditorExpression",(function(){return B.PropertyGridEditorExpression})),i.d(t,"PropertyGridEditorCondition",(function(){return B.PropertyGridEditorCondition}));var H=i(/*! ../property-grid/matrices */"./src/property-grid/matrices.ts");i.d(t,"PropertyGridEditorMatrix",(function(){return H.PropertyGridEditorMatrix})),i.d(t,"PropertyGridEditorMatrixItemValues",(function(){return H.PropertyGridEditorMatrixItemValues})),i.d(t,"PropertyGridEditorMatrixColumns",(function(){return H.PropertyGridEditorMatrixColumns})),i.d(t,"PropertyGridEditorMatrixPages",(function(){return H.PropertyGridEditorMatrixPages})),i.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return H.PropertyGridEditorMatrixCalculatedValues})),i.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return H.PropertyGridEditorMatrixHtmlConditions})),i.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return H.PropertyGridEditorMatrixUrlConditions})),i.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return H.PropertyGridEditorMatrixMutlipleTextItems})),i.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return H.PropertyGridEditorMatrixMultipleTypes})),i.d(t,"PropertyGridEditorMatrixValidators",(function(){return H.PropertyGridEditorMatrixValidators})),i.d(t,"PropertyGridEditorMatrixTriggers",(function(){return H.PropertyGridEditorMatrixTriggers})),i.d(t,"PropertyGridEditorBindings",(function(){return H.PropertyGridEditorBindings}));var F=i(/*! ../property-grid/property-grid-view-model */"./src/property-grid/property-grid-view-model.ts");i.d(t,"PropertyGridViewModel",(function(){return F.PropertyGridViewModel}));var Q=i(/*! ../property-grid/object-selector */"./src/property-grid/object-selector.ts");i.d(t,"ObjectSelectorItem",(function(){return Q.ObjectSelectorItem})),i.d(t,"ObjectSelector",(function(){return Q.ObjectSelector})),i.d(t,"ObjectSelectorModel",(function(){return Q.ObjectSelectorModel}));var U=i(/*! ../property-grid/restfull */"./src/property-grid/restfull.ts");i.d(t,"PropertyGridEditorQuestionRestfull",(function(){return U.PropertyGridEditorQuestionRestfull}));var G=i(/*! ../property-grid/values */"./src/property-grid/values.ts");i.d(t,"PropertyGridValueEditorBase",(function(){return G.PropertyGridValueEditorBase})),i.d(t,"PropertyGridCellsEditor",(function(){return G.PropertyGridCellsEditor})),i.d(t,"PropertyGridValueEditor",(function(){return G.PropertyGridValueEditor})),i.d(t,"PropertyGridRowValueEditor",(function(){return G.PropertyGridRowValueEditor})),i.d(t,"PropertyGridPanelValueEditor",(function(){return G.PropertyGridPanelValueEditor})),i.d(t,"PropertyGridTriggerValueEditor",(function(){return G.PropertyGridTriggerValueEditor})),i.d(t,"PropertyGridTriggerValueInLogicEditor",(function(){return G.PropertyGridTriggerValueInLogicEditor}));var J=i(/*! ../property-grid-theme/property-grid */"./src/property-grid-theme/property-grid.ts");i.d(t,"propertyGridCss",(function(){return J.propertyGridCss}));var W=i(/*! ../questionconverter */"./src/questionconverter.ts");i.d(t,"QuestionConverter",(function(){return W.QuestionConverter}));var K=i(/*! ../svgbundle */"./src/svgbundle.ts");i.d(t,"svgBundle",(function(){return K.svgBundle}));var Z=i(/*! ../textWorker */"./src/textWorker.ts");i.d(t,"SurveyTextWorker",(function(){return Z.SurveyTextWorker}));var Y=i(/*! ../toolbox */"./src/toolbox.ts");i.d(t,"QuestionToolboxCategory",(function(){return Y.QuestionToolboxCategory})),i.d(t,"QuestionToolboxItem",(function(){return Y.QuestionToolboxItem})),i.d(t,"QuestionToolbox",(function(){return Y.QuestionToolbox}));var X=i(/*! ../components/side-bar/side-bar-model */"./src/components/side-bar/side-bar-model.ts");i.d(t,"SideBarModel",(function(){return X.SideBarModel}));var $=i(/*! ../components/side-bar/side-bar-tab-model */"./src/components/side-bar/side-bar-tab-model.ts");i.d(t,"SideBarTabModel",(function(){return $.SideBarTabModel})),i(/*! ../utils/events */"./src/utils/events.ts");var ee=i(/*! ../utils/utils */"./src/utils/utils.ts");i.d(t,"getNextValue",(function(){return ee.getNextValue})),i.d(t,"findParentNode",(function(){return ee.findParentNode})),i.d(t,"focusFirstControl",(function(){return ee.focusFirstControl})),i.d(t,"getFirstNonTextElement",(function(){return ee.getFirstNonTextElement})),i.d(t,"getNodesFromKoComponentInfo",(function(){return ee.getNodesFromKoComponentInfo})),i.d(t,"propertyExists",(function(){return ee.propertyExists})),i.d(t,"isPropertyVisible",(function(){return ee.isPropertyVisible})),i.d(t,"toggleHovered",(function(){return ee.toggleHovered})),i.d(t,"clearNewLines",(function(){return ee.clearNewLines})),i.d(t,"select",(function(){return ee.select})),i.d(t,"copyObject",(function(){return ee.copyObject})),i.d(t,"copyCssClasses",(function(){return ee.copyCssClasses})),i.d(t,"assignDefaultV2Classes",(function(){return ee.assignDefaultV2Classes})),i.d(t,"wrapTextByCurlyBraces",(function(){return ee.wrapTextByCurlyBraces}));var te=i(/*! ../question-editor/definition */"./src/question-editor/definition.ts");i.d(t,"SurveyQuestionEditorDefinition",(function(){return te.SurveyQuestionEditorDefinition}));var ie=i(/*! ../survey-helper */"./src/survey-helper.ts");i.d(t,"ObjType",(function(){return ie.ObjType})),i.d(t,"SurveyHelper",(function(){return ie.SurveyHelper}));var oe=i(/*! ../components/notifier */"./src/components/notifier.ts");i.d(t,"Notifier",(function(){return oe.Notifier}));var re=i(/*! ../utils/resizer */"./src/utils/resizer.ts");i.d(t,"ResizeManager",(function(){return re.ResizeManager}));var ne=i(/*! ../plugins/undo-redo */"./src/plugins/undo-redo/index.ts");i.d(t,"UndoRedoPlugin",(function(){return ne.UndoRedoPlugin})),i.d(t,"undoRedoTransaction",(function(){return ne.undoRedoTransaction})),i.d(t,"ignoreUndoRedo",(function(){return ne.ignoreUndoRedo}));var ae=i(/*! ../plugins/undo-redo/undo-redo-manager */"./src/plugins/undo-redo/undo-redo-manager.ts");i.d(t,"UndoRedoManager",(function(){return ae.UndoRedoManager})),i.d(t,"Transaction",(function(){return ae.Transaction})),i.d(t,"UndoRedoAction",(function(){return ae.UndoRedoAction})),i.d(t,"UndoRedoArrayAction",(function(){return ae.UndoRedoArrayAction})),i(/*! ../components/property-panel/property-panel-item.scss */"./src/components/property-panel/property-panel-item.scss"),i(/*! ../components/property-panel/property-panel.scss */"./src/components/property-panel/property-panel.scss"),i(/*! ../components/tabbed-menu/tabbed-menu-item.scss */"./src/components/tabbed-menu/tabbed-menu-item.scss"),i(/*! ../components/tabbed-menu/tabbed-menu.scss */"./src/components/tabbed-menu/tabbed-menu.scss"),i(/*! ../components/toolbox/toolbox-tool.scss */"./src/components/toolbox/toolbox-tool.scss"),i(/*! ../components/question-dropdown.scss */"./src/components/question-dropdown.scss"),i(/*! ../components/toolbox/toolbox.scss */"./src/components/toolbox/toolbox.scss"),i(/*! ../components/side-bar/side-bar.scss */"./src/components/side-bar/side-bar.scss"),i(/*! ../property-grid-theme/property-grid.scss */"./src/property-grid-theme/property-grid.scss"),i(/*! ../utils/design.scss */"./src/utils/design.scss"),i(/*! ../utils/layout.scss */"./src/utils/layout.scss"),i(/*! ../localization/arabic */"./src/localization/arabic.ts"),i(/*! ../localization/danish */"./src/localization/danish.ts"),i(/*! ../localization/french */"./src/localization/french.ts"),i(/*! ../localization/german */"./src/localization/german.ts"),i(/*! ../localization/finnish */"./src/localization/finnish.ts"),i(/*! ../localization/italian */"./src/localization/italian.ts"),i(/*! ../localization/indonesian */"./src/localization/indonesian.ts"),i(/*! ../localization/korean */"./src/localization/korean.ts"),i(/*! ../localization/persian */"./src/localization/persian.ts"),i(/*! ../localization/polish */"./src/localization/polish.ts"),i(/*! ../localization/portuguese */"./src/localization/portuguese.ts"),i(/*! ../localization/simplified-chinese */"./src/localization/simplified-chinese.ts"),i(/*! ../localization/spanish */"./src/localization/spanish.ts"),i(/*! ../localization/swedish */"./src/localization/swedish.ts"),i(/*! ../localization/traditional-chinese */"./src/localization/traditional-chinese.ts"),i(/*! ../localization/turkish */"./src/localization/turkish.ts"),i(/*! ../localization/norwegian */"./src/localization/norwegian.ts"),i(/*! ../localization/hungarian */"./src/localization/hungarian.ts"),i(/*! ../localization/russian */"./src/localization/russian.ts"),i(/*! ../localization/tajik */"./src/localization/tajik.ts"),i(/*! ../localization/dutch */"./src/localization/dutch.ts"),i(/*! ../localization/croatian */"./src/localization/croatian.ts");var se,le=i(/*! survey-core */"survey-core");se="".concat("1.9.5-beta.1"),le.settings.supportCreatorV2=!0},"./src/expressionToDisplayText.ts":
|
|
341
341
|
/*!****************************************!*\
|
|
342
342
|
!*** ./src/expressionToDisplayText.ts ***!
|
|
343
343
|
\****************************************/
|
|
344
|
-
/*! exports provided: ExpressionToDisplayText, ExpressionRemoveVariable */function(e,t,i){"use strict";i.r(t),i.d(t,"ExpressionToDisplayText",(function(){return
|
|
344
|
+
/*! exports provided: ExpressionToDisplayText, ExpressionRemoveVariable */function(e,t,i){"use strict";i.r(t),i.d(t,"ExpressionToDisplayText",(function(){return a})),i.d(t,"ExpressionRemoveVariable",(function(){return s}));var o=i(/*! survey-core */"survey-core"),r=i(/*! ./editorLocalization */"./src/editorLocalization.ts"),n=i(/*! ./utils/utils */"./src/utils/utils.ts"),a=function(){function e(e,t){void 0===t&&(t=null),this.survey=e,this.options=t}return e.prototype.toDisplayText=function(e){if(!this.survey)return e;this.showTitles=!!this.options&&1==this.options.showTitlesInExpressions;var t=(new o.ConditionsParser).parseExpression(e);if(!t)return e;if(t.getType)return this.toDisplayTextCore(t);if(!this.showTitles)return e;var i=[];return t.setVariables(i),this.replaceVariables(e,i)},e.prototype.toDisplayTextCore=function(e){this.currentQuestion=null;var t=this,i=!0,o=function(e){var r=i;return i=!1,t.showTitles&&"variable"==e.getType()?t.getQuestionText(e):t.showTitles&&"const"==e.getType()?t.getDisplayText(e):"binary"==e.getType()?(t.proceedBinary(e),t.getDisplayBinary(e,r,o)):"unary"==e.getType()?t.getDisplayUnary(e,o):void 0};return e.toString(o)},e.prototype.getQuestionText=function(e){var t=this.getQuestionByName(e.variable);if(t&&t.title)return Object(n.wrapTextByCurlyBraces)(t.title)},e.prototype.getDisplayText=function(e){if(this.currentQuestion){var t=this.currentQuestion.getDisplayValue(!0,e.correctValue);return t?new o.Const(t).toString():void 0}},e.prototype.getDisplayOperand=function(e,t){return e?e.toString(t):""},e.prototype.getDisplayOperator=function(t){var i=e.operatorText[t];return i||r.editorLocalization.getString("op."+t)},e.prototype.getDisplayBinary=function(e,t,i){return(t?"":"(")+this.getDisplayOperand(e.leftOperand,i)+" "+this.getDisplayOperator(e.operator)+" "+this.getDisplayOperand(e.rightOperand,i)+(t?"":")")},e.prototype.getDisplayUnary=function(e,t){var i=e.expression.toString(t),o=this.getDisplayOperator(e.operator);return"empty"==e.operator||"notempty"==e.operator?i+" "+o:o+" "+i},e.prototype.proceedBinary=function(e){e.isArithmetic||e.isConjunction?this.currentQuestion=null:(this.currentQuestion=this.getQuestionFromOperands(e.leftOperand,e.rightOperand),this.currentQuestion||(this.currentQuestion=this.getQuestionFromOperands(e.rightOperand,e.leftOperand)))},e.prototype.getQuestionFromOperands=function(e,t){if(!e||!t)return null;if("variable"!=e.getType())return null;var i=t.getType();return"const"!=i&&"function"!=i&&"array"!=i?null:this.getQuestionByName(e.variable)},e.prototype.replaceVariables=function(e,t){for(var i=0;i<t.length;i++)e=this.replaceVariable(e,t[i]);return e},e.prototype.replaceVariable=function(e,t){var i=this.getQuestionByName(t);return i&&i.title?e.replace(Object(n.wrapTextByCurlyBraces)(t),Object(n.wrapTextByCurlyBraces)(i.title)):e},e.prototype.getQuestionByName=function(e){return this.survey.getQuestionByValueName(e)},e.operatorText={less:"<",lessorequal:"<=",greater:">",greaterorequal:">=",equal:"==",notequal:"!=",plus:"+",minus:"-",mul:"*",div:"/",power:"^",mod:"%",negate:"!"},e}(),s=function(){function e(){}return e.prototype.remove=function(e,t){var i=(new o.ConditionsParser).parseExpression(e);if(!i)return e;if(this.wasRemoved=!1,i.getType){var r=this.processOperand(i,t);return this.wasRemoved?r?r.toString():"":e}return e},e.prototype.processOperand=function(e,t){return e?"variable"==e.getType()?this.processVariable(e,t):"unary"==e.getType()?this.processUnary(e,t):"binary"==e.getType()?this.proceedBinary(e,t):e:null},e.prototype.processVariable=function(e,t){return e.variable!==t?e:(this.wasRemoved=!0,null)},e.prototype.processUnary=function(e,t){return this.processOperand(e.expression,t)?e:(this.wasRemoved=!0,null)},e.prototype.proceedBinary=function(e,t){var i=this.processOperand(e.leftOperand,t),r=this.processOperand(e.rightOperand,t);if(i&&r)return i!==e.leftOperand||r!==e.rightOperand?new o.BinaryOperand(e.operator,i,r,e.isArithmetic):e;if(!i&&!r)return null;var n=i||r;return"binary"==n.getType()?n:null},e}()},"./src/json5.ts":
|
|
345
345
|
/*!**********************!*\
|
|
346
346
|
!*** ./src/json5.ts ***!
|
|
347
347
|
\**********************/
|
|
348
|
-
/*! exports provided: SurveyJSON5 */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyJSON5",(function(){return o}));var o=function(){function e(e){void 0===e&&(e=0),this.parseType=e}return e.prototype.parse=function(e,t,i,o){var r;return void 0===t&&(t=null),void 0===i&&(i=0),void 0===o&&(o=-1),this.text=String(e),this.at=i,this.endAt=o,this.ch=" ",r=this.value(),this.white(),this.ch&&this.error("Syntax error"),"function"==typeof t?function e(i,o){var r,n,a=i[o];if(a&&"object"==typeof a)for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(void 0!==(n=e(a,r))?a[r]=n:delete a[r]);return t.call(i,o,a)}({"":r},""):r},e.prototype.error=function(e){var t=new SyntaxError;throw t.message=e,t.at=this.at,t},e.prototype.next=function(e){return void 0===e&&(e=null),e&&e!==this.ch&&this.error("Expected '"+e+"' instead of '"+this.ch+"'"),this.ch=this.chartAt(),this.at+=1,this.ch},e.prototype.peek=function(){return this.chartAt()},e.prototype.chartAt=function(){return this.endAt>-1&&this.at>=this.endAt?"":this.text.charAt(this.at)},e.prototype.identifier=function(){var e=this.ch;for("_"!==this.ch&&"$"!==this.ch&&(this.ch<"a"||this.ch>"z")&&(this.ch<"A"||this.ch>"Z")&&this.error("Bad identifier");this.next()&&("_"===this.ch||"$"===this.ch||this.ch>="a"&&this.ch<="z"||this.ch>="A"&&this.ch<="Z"||this.ch>="0"&&this.ch<="9");)e+=this.ch;return e},e.prototype.number=function(){var e,t="",i="",o=10;if("-"!==this.ch&&"+"!==this.ch||(t=this.ch,this.next(this.ch)),"I"===this.ch)return("number"!=typeof(e=this.word())||isNaN(e))&&this.error("Unexpected word for number"),"-"===t?-e:e;if("N"===this.ch)return e=this.word(),isNaN(e)||this.error("expected word to be NaN"),e;switch("0"===this.ch&&(i+=this.ch,this.next(),"x"===this.ch||"X"===this.ch?(i+=this.ch,this.next(),o=16):this.ch>="0"&&this.ch<="9"&&this.error("Octal literal")),o){case 10:for(;this.ch>="0"&&this.ch<="9";)i+=this.ch,this.next();if("."===this.ch)for(i+=".";this.next()&&this.ch>="0"&&this.ch<="9";)i+=this.ch;if("e"===this.ch||"E"===this.ch)for(i+=this.ch,this.next(),"-"!==this.ch&&"+"!==this.ch||(i+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)i+=this.ch,this.next();break;case 16:for(;this.ch>="0"&&this.ch<="9"||this.ch>="A"&&this.ch<="F"||this.ch>="a"&&this.ch<="f";)i+=this.ch,this.next()}if(e="-"===t?-i:+i,isFinite(e))return e;this.error("Bad number")},e.prototype.string=function(){var t,i,o,r,n="";if('"'===this.ch||"'"===this.ch)for(o=this.ch;this.next();){if(this.ch===o)return this.next(),n;if("\\"===this.ch)if(this.next(),"u"===this.ch){for(r=0,i=0;i<4&&(t=parseInt(this.next(),16),isFinite(t));i+=1)r=16*r+t;n+=String.fromCharCode(r)}else if("\r"===this.ch)"\n"===this.peek()&&this.next();else{if("string"!=typeof e.escapee[this.ch])break;n+=e.escapee[this.ch]}else{if("\n"===this.ch)break;n+=this.ch}}this.error("Bad string")},e.prototype.inlineComment=function(){"/"!==this.ch&&this.error("Not an inline comment");do{if(this.next(),"\n"===this.ch||"\r"===this.ch)return void this.next()}while(this.ch)},e.prototype.blockComment=function(){"*"!==this.ch&&this.error("Not a block comment");do{for(this.next();"*"===this.ch;)if(this.next("*"),"/"===this.ch)return void this.next("/")}while(this.ch);this.error("Unterminated block comment")},e.prototype.comment=function(){"/"!==this.ch&&this.error("Not a comment"),this.next("/"),"/"===this.ch?this.inlineComment():"*"===this.ch?this.blockComment():this.error("Unrecognized comment")},e.prototype.white=function(){for(;this.ch;)if("/"===this.ch)this.comment();else{if(!(e.ws.indexOf(this.ch)>=0))return;this.next()}},e.prototype.word=function(){switch(this.ch){case"t":return this.next("t"),this.next("r"),this.next("u"),this.next("e"),!0;case"f":return this.next("f"),this.next("a"),this.next("l"),this.next("s"),this.next("e"),!1;case"n":return this.next("n"),this.next("u"),this.next("l"),this.next("l"),null;case"I":return this.next("I"),this.next("n"),this.next("f"),this.next("i"),this.next("n"),this.next("i"),this.next("t"),this.next("y"),1/0;case"N":return this.next("N"),this.next("a"),this.next("N"),NaN}this.error("Unexpected '"+this.ch+"'")},e.prototype.array=function(){var e=[];if("["===this.ch)for(this.next("["),this.white();this.ch;){if("]"===this.ch)return this.next("]"),e;if(","===this.ch?this.error("Missing array element"):e.push(this.value()),this.white(),","!==this.ch)return this.next("]"),e;this.next(","),this.white()}this.error("Bad array")},e.prototype.object=function(){var t,i,o=!0,r={};if(this.parseType>0&&(r[e.positionName]={start:this.at-1}),"{"===this.ch)for(this.next("{"),this.white(),i=this.at-1;this.ch;){if("}"===this.ch)return this.parseType>0&&(r[e.positionName].end=i),this.next("}"),r;if(t='"'===this.ch||"'"===this.ch?this.string():this.identifier(),this.white(),this.parseType>1&&(r[e.positionName][t]={start:i,valueStart:this.at}),this.next(":"),r[t]=this.value(),this.parseType>1&&(i=this.at-1,r[e.positionName][t].valueEnd=i,r[e.positionName][t].end=i),this.white(),","!==this.ch)return this.parseType>1&&(r[e.positionName][t].valueEnd--,r[e.positionName][t].end--),this.parseType>0&&(r[e.positionName].end=this.at-1),this.next("}"),r;this.parseType>1&&(r[e.positionName][t].valueEnd--,o||r[e.positionName][t].end--),this.next(","),this.white(),o=!1}this.error("Bad object")},e.prototype.value=function(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':case"'":return this.string();case"-":case"+":case".":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}},e.prototype.stringify=function(e,t,i){if(void 0===t&&(t=null),void 0===i&&(i=null),t&&"function"!=typeof t&&!this.isArray(t))throw new Error("Replacer must be a function or an array");this.replacer=t,this.indentStr=this.getIndent(i),this.objStack=[];var o={"":e};return void 0===e?this.getReplacedValueOrUndefined(o,"",!0):this.internalStringify(o,"",!0)},e.prototype.getIndent=function(e){if(e){if("string"==typeof e)return e;if("number"==typeof e&&e>=0)return this.makeIndent(" ",e,!0)}return""},e.prototype.getReplacedValueOrUndefined=function(e,t,i){var o=e[t];return o&&o.toJSON&&"function"==typeof o.toJSON&&(o=o.toJSON()),"function"==typeof this.replacer?this.replacer.call(e,t,o):this.replacer?i||this.isArray(e)||this.replacer.indexOf(t)>=0?o:void 0:o},e.prototype.isWordChar=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e},e.prototype.isWordStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e},e.prototype.isWord=function(e){if("string"!=typeof e)return!1;if(!this.isWordStart(e[0]))return!1;for(var t=1,i=e.length;t<i;){if(!this.isWordChar(e[t]))return!1;t++}return!0},e.prototype.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.prototype.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.prototype.isNaN=function(e){return"number"==typeof e&&e!=e},e.prototype.checkForCircular=function(e){for(var t=0;t<this.objStack.length;t++)if(this.objStack[t]===e)throw new TypeError("Converting circular structure to JSON")},e.prototype.makeIndent=function(e,t,i){if(void 0===i&&(i=!1),!e)return"";e.length>10&&(e=e.substring(0,10));for(var o=i?"":"\n",r=0;r<t;r++)o+=e;return o},e.prototype.escapeString=function(t){return e.escapable.lastIndex=0,e.escapable.test(t)?'"'+t.replace(e.escapable,(function(t){var i=e.meta[t];return"string"==typeof i?i:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},e.prototype.internalStringify=function(e,t,i){var o,r,n=this.getReplacedValueOrUndefined(e,t,i);switch(n&&!this.isDate(n)&&(n=n.valueOf()),typeof n){case"boolean":return n.toString();case"number":return isNaN(n)||!isFinite(n)?"null":n.toString();case"string":return this.escapeString(n.toString());case"object":if(null===n)return"null";if(this.isArray(n)){this.checkForCircular(n),o="[",this.objStack.push(n);for(var a=0;a<n.length;a++)r=this.internalStringify(n,a,!1),o+=this.makeIndent(this.indentStr,this.objStack.length),o+=null==r?"null":r,a<n.length-1?o+=",":this.indentStr&&(o+="\n");this.objStack.pop(),o+=this.makeIndent(this.indentStr,this.objStack.length,!0)+"]"}else{this.checkForCircular(n),o="{";var s=!1;for(var l in this.objStack.push(n),n)if(n.hasOwnProperty(l)){var u=this.internalStringify(n,l,!1);i=!1,null!=u&&(o+=this.makeIndent(this.indentStr,this.objStack.length),s=!0,o+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+u+",")}this.objStack.pop(),o=s?o.substring(0,o.length-1)+this.makeIndent(this.indentStr,this.objStack.length)+"}":"{}"}return o;default:return}},e.positionName="pos",e.escapee={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},e.ws=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],e.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e}()},"./src/localization/
|
|
348
|
+
/*! exports provided: SurveyJSON5 */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyJSON5",(function(){return o}));var o=function(){function e(e){void 0===e&&(e=0),this.parseType=e}return e.prototype.parse=function(e,t,i,o){var r;return void 0===t&&(t=null),void 0===i&&(i=0),void 0===o&&(o=-1),this.text=String(e),this.at=i,this.endAt=o,this.ch=" ",r=this.value(),this.white(),this.ch&&this.error("Syntax error"),"function"==typeof t?function e(i,o){var r,n,a=i[o];if(a&&"object"==typeof a)for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(void 0!==(n=e(a,r))?a[r]=n:delete a[r]);return t.call(i,o,a)}({"":r},""):r},e.prototype.error=function(e){var t=new SyntaxError;throw t.message=e,t.at=this.at,t},e.prototype.next=function(e){return void 0===e&&(e=null),e&&e!==this.ch&&this.error("Expected '"+e+"' instead of '"+this.ch+"'"),this.ch=this.chartAt(),this.at+=1,this.ch},e.prototype.peek=function(){return this.chartAt()},e.prototype.chartAt=function(){return this.endAt>-1&&this.at>=this.endAt?"":this.text.charAt(this.at)},e.prototype.identifier=function(){var e=this.ch;for("_"!==this.ch&&"$"!==this.ch&&(this.ch<"a"||this.ch>"z")&&(this.ch<"A"||this.ch>"Z")&&this.error("Bad identifier");this.next()&&("_"===this.ch||"$"===this.ch||this.ch>="a"&&this.ch<="z"||this.ch>="A"&&this.ch<="Z"||this.ch>="0"&&this.ch<="9");)e+=this.ch;return e},e.prototype.number=function(){var e,t="",i="",o=10;if("-"!==this.ch&&"+"!==this.ch||(t=this.ch,this.next(this.ch)),"I"===this.ch)return("number"!=typeof(e=this.word())||isNaN(e))&&this.error("Unexpected word for number"),"-"===t?-e:e;if("N"===this.ch)return e=this.word(),isNaN(e)||this.error("expected word to be NaN"),e;switch("0"===this.ch&&(i+=this.ch,this.next(),"x"===this.ch||"X"===this.ch?(i+=this.ch,this.next(),o=16):this.ch>="0"&&this.ch<="9"&&this.error("Octal literal")),o){case 10:for(;this.ch>="0"&&this.ch<="9";)i+=this.ch,this.next();if("."===this.ch)for(i+=".";this.next()&&this.ch>="0"&&this.ch<="9";)i+=this.ch;if("e"===this.ch||"E"===this.ch)for(i+=this.ch,this.next(),"-"!==this.ch&&"+"!==this.ch||(i+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)i+=this.ch,this.next();break;case 16:for(;this.ch>="0"&&this.ch<="9"||this.ch>="A"&&this.ch<="F"||this.ch>="a"&&this.ch<="f";)i+=this.ch,this.next()}if(e="-"===t?-i:+i,isFinite(e))return e;this.error("Bad number")},e.prototype.string=function(){var t,i,o,r,n="";if('"'===this.ch||"'"===this.ch)for(o=this.ch;this.next();){if(this.ch===o)return this.next(),n;if("\\"===this.ch)if(this.next(),"u"===this.ch){for(r=0,i=0;i<4&&(t=parseInt(this.next(),16),isFinite(t));i+=1)r=16*r+t;n+=String.fromCharCode(r)}else if("\r"===this.ch)"\n"===this.peek()&&this.next();else{if("string"!=typeof e.escapee[this.ch])break;n+=e.escapee[this.ch]}else{if("\n"===this.ch)break;n+=this.ch}}this.error("Bad string")},e.prototype.inlineComment=function(){"/"!==this.ch&&this.error("Not an inline comment");do{if(this.next(),"\n"===this.ch||"\r"===this.ch)return void this.next()}while(this.ch)},e.prototype.blockComment=function(){"*"!==this.ch&&this.error("Not a block comment");do{for(this.next();"*"===this.ch;)if(this.next("*"),"/"===this.ch)return void this.next("/")}while(this.ch);this.error("Unterminated block comment")},e.prototype.comment=function(){"/"!==this.ch&&this.error("Not a comment"),this.next("/"),"/"===this.ch?this.inlineComment():"*"===this.ch?this.blockComment():this.error("Unrecognized comment")},e.prototype.white=function(){for(;this.ch;)if("/"===this.ch)this.comment();else{if(!(e.ws.indexOf(this.ch)>=0))return;this.next()}},e.prototype.word=function(){switch(this.ch){case"t":return this.next("t"),this.next("r"),this.next("u"),this.next("e"),!0;case"f":return this.next("f"),this.next("a"),this.next("l"),this.next("s"),this.next("e"),!1;case"n":return this.next("n"),this.next("u"),this.next("l"),this.next("l"),null;case"I":return this.next("I"),this.next("n"),this.next("f"),this.next("i"),this.next("n"),this.next("i"),this.next("t"),this.next("y"),1/0;case"N":return this.next("N"),this.next("a"),this.next("N"),NaN}this.error("Unexpected '"+this.ch+"'")},e.prototype.array=function(){var e=[];if("["===this.ch)for(this.next("["),this.white();this.ch;){if("]"===this.ch)return this.next("]"),e;if(","===this.ch?this.error("Missing array element"):e.push(this.value()),this.white(),","!==this.ch)return this.next("]"),e;this.next(","),this.white()}this.error("Bad array")},e.prototype.object=function(){var t,i,o=!0,r={};if(this.parseType>0&&(r[e.positionName]={start:this.at-1}),"{"===this.ch)for(this.next("{"),this.white(),i=this.at-1;this.ch;){if("}"===this.ch)return this.parseType>0&&(r[e.positionName].end=i),this.next("}"),r;if(t='"'===this.ch||"'"===this.ch?this.string():this.identifier(),this.white(),this.parseType>1&&(r[e.positionName][t]={start:i,valueStart:this.at}),this.next(":"),r[t]=this.value(),this.parseType>1&&(i=this.at-1,r[e.positionName][t].valueEnd=i,r[e.positionName][t].end=i),this.white(),","!==this.ch)return this.parseType>1&&(r[e.positionName][t].valueEnd--,r[e.positionName][t].end--),this.parseType>0&&(r[e.positionName].end=this.at-1),this.next("}"),r;this.parseType>1&&(r[e.positionName][t].valueEnd--,o||r[e.positionName][t].end--),this.next(","),this.white(),o=!1}this.error("Bad object")},e.prototype.value=function(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':case"'":return this.string();case"-":case"+":case".":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}},e.prototype.stringify=function(e,t,i){if(void 0===t&&(t=null),void 0===i&&(i=null),t&&"function"!=typeof t&&!this.isArray(t))throw new Error("Replacer must be a function or an array");this.replacer=t,this.indentStr=this.getIndent(i),this.objStack=[];var o={"":e};return void 0===e?this.getReplacedValueOrUndefined(o,"",!0):this.internalStringify(o,"",!0)},e.prototype.getIndent=function(e){if(e){if("string"==typeof e)return e;if("number"==typeof e&&e>=0)return this.makeIndent(" ",e,!0)}return""},e.prototype.getReplacedValueOrUndefined=function(e,t,i){var o=e[t];return o&&o.toJSON&&"function"==typeof o.toJSON&&(o=o.toJSON()),"function"==typeof this.replacer?this.replacer.call(e,t,o):this.replacer?i||this.isArray(e)||this.replacer.indexOf(t)>=0?o:void 0:o},e.prototype.isWordChar=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e},e.prototype.isWordStart=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e},e.prototype.isWord=function(e){if("string"!=typeof e)return!1;if(!this.isWordStart(e[0]))return!1;for(var t=1,i=e.length;t<i;){if(!this.isWordChar(e[t]))return!1;t++}return!0},e.prototype.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},e.prototype.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.prototype.isNaN=function(e){return"number"==typeof e&&e!=e},e.prototype.checkForCircular=function(e){for(var t=0;t<this.objStack.length;t++)if(this.objStack[t]===e)throw new TypeError("Converting circular structure to JSON")},e.prototype.makeIndent=function(e,t,i){if(void 0===i&&(i=!1),!e)return"";e.length>10&&(e=e.substring(0,10));for(var o=i?"":"\n",r=0;r<t;r++)o+=e;return o},e.prototype.escapeString=function(t){return e.escapable.lastIndex=0,e.escapable.test(t)?'"'+t.replace(e.escapable,(function(t){var i=e.meta[t];return"string"==typeof i?i:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},e.prototype.internalStringify=function(e,t,i){var o,r,n=this.getReplacedValueOrUndefined(e,t,i);switch(n&&!this.isDate(n)&&(n=n.valueOf()),typeof n){case"boolean":return n.toString();case"number":return isNaN(n)||!isFinite(n)?"null":n.toString();case"string":return this.escapeString(n.toString());case"object":if(null===n)return"null";if(this.isArray(n)){this.checkForCircular(n),o="[",this.objStack.push(n);for(var a=0;a<n.length;a++)r=this.internalStringify(n,a,!1),o+=this.makeIndent(this.indentStr,this.objStack.length),o+=null==r?"null":r,a<n.length-1?o+=",":this.indentStr&&(o+="\n");this.objStack.pop(),o+=this.makeIndent(this.indentStr,this.objStack.length,!0)+"]"}else{this.checkForCircular(n),o="{";var s=!1;for(var l in this.objStack.push(n),n)if(n.hasOwnProperty(l)){var u=this.internalStringify(n,l,!1);i=!1,null!=u&&(o+=this.makeIndent(this.indentStr,this.objStack.length),s=!0,o+=(this.isWord(l)?l:this.escapeString(l))+":"+(this.indentStr?" ":"")+u+",")}this.objStack.pop(),o=s?o.substring(0,o.length-1)+this.makeIndent(this.indentStr,this.objStack.length)+"}":"{}"}return o;default:return}},e.positionName="pos",e.escapee={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},e.ws=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],e.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e.meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},e}()},"./src/localization/arabic.ts":
|
|
349
|
+
/*!************************************!*\
|
|
350
|
+
!*** ./src/localization/arabic.ts ***!
|
|
351
|
+
\************************************/
|
|
352
|
+
/*! exports provided: arStrings */function(e,t,i){"use strict";i.r(t),i.d(t,"arStrings",(function(){return r}));var o=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),r={survey:{edit:"تعديل",externalHelpLink:"شاهد وتعلم كيف يتم إنشاء إستبيان",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"الرجاء إفلات السؤال هنا من صندوق الأدوات",addLogicItem:".قم بإنشاء قاعدة لتخصيص تدفق الإستبيان",copy:"نسخ",duplicate:"نسخة طبق الأصل",settings:"الإعدادات",addToToolbox:"إضافة إلى صندوق الأدوات",deletePanel:"حذف لوحة",deleteQuestion:"حذف سؤال",convertTo:"تحويل إلى",drag:"إسحب العنصر",license:"الرجاء شراء ترخيص مطور SurveyJS Creator لاستخدامه في تطبيقك"},qt:{default:"الإفتراضي",checkbox:"إختيار من متعدد",comment:"تعليق",imagepicker:"إنتقاء الصور",ranking:"تصنيف",image:"صورة",dropdown:"قائمة منسدلة",file:"ملف",html:"لغة ترميز النصوص HTML",matrix:"مصفوفة (إختيار واحد)",matrixdropdown:"مصفوفة (إختيار متعدد)",matrixdynamic:"مصفوفة (صفوف ديناميكية)",multipletext:"مدخل متعدد",panel:"لوحة",paneldynamic:"لوحة ديناميكية",radiogroup:"إختيار فردي",rating:"تقييم",text:"مٌدخل فردي",boolean:"قيمة منطقية",expression:"عملية حسابية (للقرائة فقط)",signaturepad:"لوحة توقيع",buttongroup:"Button group",flowpanel:"Flow Panel"},ed:{defaultLocale:"إفتراضي ({0})",survey:"Survey1",settings:"Survey Settings",settingsTooltip:"Open survey settings",showPanel:"إظهار اللوحة",hidePanel:"إخفاء اللوحة",prevSelected:"Select previous",nextSelected:"Select next",surveyTypeName:"الإستبيان",pageTypeName:"الصفحة",panelTypeName:"اللوحة",questionTypeName:"السؤال",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"التعديل",newPageName:"الصفحة",newQuestionName:"السؤال",newPanelName:"اللوحة",newTextItemName:"text",testSurvey:"تجربة الإستبيان",testSurveyAgain:"Test Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to:",logic:"منطق الإستبيان",embedSurvey:"Embed Survey",translation:"Translation",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",designer:"تصميم الإستبيان",jsonEditor:"JSON Editor",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",toolboxGeneralCategory:"قائمة العام",correctJSON:"Please correct JSON.",surveyResults:"Survey Result: ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"هناك تعديل جديد",saving:"يتم الآن حفظ التغييرات",saved:"تم الحفظ",propertyEditorError:"خطأ:",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Translation Setting",translationLanguages:"Languages",translationAddLanguage:"Select language to translate",translationShowAllStrings:"Show all strings",translationShowAllPages:"Show all pages",translationNoStrings:"No strings to translate. Please, change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",bold:"Bold",italic:"Italic",underline:"Underline",fpAddQuestion:"Add question...",selectPage:"Select page...",chooseElement:"Choose element...",htmlPlaceHolder:"محتوى HTML سيكون هنا",signHere:"التوقيع هنا",panelPlaceHolder:"قم بإسقاط السؤال من صندوق الأدوات إلى هنا",addNewQuestion:"أضف سؤال",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[الشعار]",lg:{addNewItem:"",empty_tab:"قم بإنشاء إرتباط لتخصيص تدفق الإستبيان",page_visibilityName:"إظهار (إخفاء) صفحة",panel_visibilityName:"إظهار (إخفاء) لوحة",panel_enableName:"تفعيل (تعطيل) لوحة",question_visibilityName:"إظهار (إخفاء) سؤال",question_enableName:"تفعيل (تعطيل) سؤال",question_requireName:"جعل السؤال إلزامي",trigger_completeName:"أنهي الإستبيان",trigger_setvalueName:"تحديد قيمة السؤال",trigger_copyvalueName:"نسخ قيمة السؤال",trigger_skipName:"التخطي إلى السؤال",trigger_runExpressionName:"تشغيل تعبير رياضي مخصص",completedHtmlOnConditionName:"نص رسالة شكر مخصصة",page_visibilityDescription:"Make the page visible when the logic expression returns true. Otherwise keep it invisible.",panel_visibilityDescription:"Make the panel visible when the logic expression returns true. Otherwise keep it invisible.",panel_enableDescription:"Make the panel, and all elements inside it, enable when the logic expression returns true. Otherwise keep them disabled.",question_visibilityDescription:"Make the question visible when the logic expression returns true. Otherwise keep it invisible.",question_enableDescription:"Make the question enable when the logic expression returns true. Otherwise keep it disabled.",question_requireDescription:"Question becomes required when the logic expression returns true.",trigger_completeDescription:"When the logic expression returns true then the survey becomes completed and an end-user see the 'Thank you page'.",trigger_setvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value is set to the selected question.",trigger_copyvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value of one selected question is copied to another selected question.",trigger_skipDescription:"When the logic expression returns true then the survey skip to / focus the selected question.",trigger_runExpressionDescription:"When the logic expression returns true, then the custom expression is performed. You may optionally set this expression result into the selected question",completedHtmlOnConditionDescription:"If the logic expression returns true, then the default text for the 'Thank you page' is changed to the given one.",itemExpressionText:"عندما التعبير '{0}' رجع قيمة المنطقية صحيح",itemEmptyExpressionText:"الإرتباط الجديد لم يحدد",page_visibilityText:"جعل الصفحة {0} مرئية",panel_visibilityText:"جعل اللوحة {0} مرئية",panel_enableText:"جعل اللوحة {0} مفعلة",question_visibilityText:"جعل السؤال {0} مرئي",question_enableText:"جعل السؤال {0} مفعل",question_requireText:"جعل السؤال {0} إلزامي",trigger_completeText:"الإستبيان سيصبح مكتمل",trigger_setvalueText:"تثبيت إلى السؤال: {0} القيمة {1}",trigger_copyvalueText:"النسخ إلى السؤال: {0} القيمة القادمة من السؤال {1}",trigger_skipText:"التخطي إلى السؤال {0}",trigger_runExpressionText1:"شغل التعبير الرياضي '{0}'",trigger_runExpressionText2:" وثبت نتيجتها إلى السؤال {0}",completedHtmlOnConditionText:"عرض نص رسال 'صفحة شكر' مخصصة",showAllQuestions:"عرض كل الأسئلة",showAllActionTypes:"عرض كل أنواع الإجراءات",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"تعريف شرط(إشتراطات)",actionsEditorTitle:"تعريف إجراء (إجراءات)",deleteAction:"حذف الإجراء",addNewAction:"إضافة إجراء جديد",selectedActionCaption:"حدد الإجراء لأضافته",expressionInvalid:"التعبير المنطقي الرياضي فارغ أو غير صحيح، يرجى تصحيحه",noActionError:"الرجاء، إضافة إجراء واحد على الأقل",actionInvalid:"الرجاء، إصلاح الأخطاء في الإجراء التابع لك",expressionSetup:"",actionsSetup:""}},pe:{apply:"تطبيق",ok:"موافق",save:"حفظ",clear:"مسح",saveTooltip:"حفظ",cancel:"إلغاء",set:"تثبيت",reset:"Reset",change:"تغيير",refresh:"Refresh",close:"إغلاق",delete:"حذف",add:"إضافة",addNew:"إضافة إرتباط جديد",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"التعديل",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"إضافة",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"القيمة فارغة",fastEntry:"إدخالات سريعة",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"إختر السؤال...",conditionSelectPage:"Select page...",conditionSelectPanel:"Select panel...",conditionValueQuestionTitle:"Please enter/select the value",expressionHelp:"You can use curly brackets to get access to the question values: {question1} + {question2}, ({price}*{quantity}) * (100 - {discount}). You can use functions as: iif(), today(), age(), min(), max(), count(), avg() and others.",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions:",cellsEmptyRowsColumns:"There is should be at least one column or row",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",listIsEmpty:"Add a new item",expressionIsEmpty:"Expression is empty",value:"القيمة",text:"النص",rowid:"Row ID",imageLink:"رابط الصورة",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"رابط إلكتروني URL",path:"المسار",valueName:"اسم القيمة",titleName:"اسم العنوان",imageLinkName:"اسم رابط الصورة",allowEmptyResponse:"السماح بجواب فارغ",titlePlaceholder:"Input title here",surveyTitlePlaceholder:"أدخل عنوان الإستبيان هنا",pageTitlePlaceholder:"أدخل عنوان الصفحة هنا",descriptionPlaceholder:"Enter a description",surveyDescriptionPlaceholder:"أدخل وصف للإستبيان",pageDescriptionPlaceholder:"أدخل وصف للصفحة",hasOther:"هل هناك خيار أخرى",otherText:"نص خيار أخرى",hasNone:"هل هناك خيار بلا",noneText:"نص خيار بلا",hasSelectAll:"هل هناك خيار إختيار الكل",selectAllText:"نص خيار إختر الكل",choicesMin:"Minimum value for auto generated items",choicesMax:"Maximum value for auto generated items",choicesStep:"The difference between auto generated items",name:"الإسم",title:"العنوان",cellType:"نوع الخلية",colCount:"عدد الأعمدة",choicesOrder:"إختر ترتيب الإختيارات",visible:"مرئي؟",isRequired:"مطلوب؟",isAllRowRequired:"المطالبة بالأجوبة لكل الصفوف",requiredErrorText:"نص خطأ إلزامي السؤال",startWithNewLine:"إظهار السؤال في صف جديد",rows:"عدد الصفوف",cols:"عدد الأعمدة",placeHolder:"نص حامل خانة الإدخال",showPreview:"عرض منطقة المعاينة",storeDataAsText:"تخزين محتويات ملف JSON كنص",maxSize:"أقصى حجم للملف بالبايت",imageHeight:"طول الصورة",imageWidth:"عرض الصورة",rowCount:"عدد الصفوف",columnLayout:"تخطيط الأعمدة",addRowLocation:"موقع زر إضافة صف",addRowText:"نص زر إضافة صف",removeRowText:"نص زر حذف صف",rateMin:"أصغر معدل",rateMax:"أكبر معدل",rateStep:"خطوات المعدل",minRateDescription:"وصف أصغر معدل",maxRateDescription:"وصف أكبر معدل",inputType:"نوع المدخل",optionsCaption:"خيارات الشرح",showOptionsCaption:"Show options caption",defaultValue:"القيمة الإفتراضية",cellsDefaultRow:"Default cells texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"أقصى طول",buildExpression:"Build",editExpression:"التعديل",and:"أو",or:"و",remove:"إزالة",addCondition:"أضف الشرط",if:"إذا قيمة",then:"من ثم",setToName:"إلى",fromName:"from",ruleIsNotSet:"Rule is incorrect",showTitle:"إظهار/إخفاء العنوان",expandCollapseTitle:"Expand/collapse title",locale:"اللغة الإفتراضية",simulator:"Choose device",landscapeOrientation:"Landscape",portraitOrientation:"Portrait",mode:"النمط (التعديل، القرائة فقط)",clearInvisibleValues:"إمسح القيم الغير مرئية",cookieName:"أدخل إسم ملف تعريف الإرتباط (لتعطيل المشاركة بالإستبيان أكثر من مرة)",sendResultOnPageNext:"إرسال نتائج الإستبيان على الصفحة التالية",storeOthersAsComment:"تخزين قيمة 'أخرى' في حقل منفصل",showPageTitles:"عرض عنوان الصفحات",showPageNumbers:"عرض أرقام الصفحات",pagePrevText:"نص زر الإنتقال للصفحة السابقة",pageNextText:"نص زر الإنتقال للصفحة التالية",completeText:"نص زر إنهاء الإستبيان",previewText:"نص زر المعاينة",editText:"نص زر التعديل",startSurveyText:"نص زر بدء المشاركة بالإستبيان",showNavigationButtons:"إظهار أزرار الإنتقال (التنقل الإفتراضي)",showPrevButton:"إظهار زر التنقل السابق (السماح للمستخدم من العودة للصفحة السابقة في الإستبيان)",firstPageIsStarted:"الصفحة الأولى في الإستبيان هي صفحة البدء",showCompletedPage:"إظهار الصفحة المكتملة في النهاية (صفحة ويب مكتملة)",goNextPageAutomatic:"عند الإجابة على جميع الأسئلة، إنتقل إلى الصفحة التالية تلقائياً",showProgressBar:"إظهار شريط التقدم",questionTitleLocation:"موقع عنوان السؤال",requiredText:"رمز السؤال مطلوب",questionStartIndex:"فهرس بداية الأسئلة (1،2 أو 'أ' ، 'ب')",showQuestionNumbers:"إظهار أرقام الأسئلة",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"موقع خطأ في السؤال",focusFirstQuestionAutomatic:"ركز المؤشر على السؤال الأول عند تغير الصفحة",questionsOrder:"ترتيب العناصر على الصفحة",maxTimeToFinish:"أقصى وقت لإنهاء الإستبيان",maxTimeToFinishPage:"أقصى وقت لإنهاء الصفحة في الإستبيان",showTimerPanel:"إظهار لوحة المؤقت",showTimerPanelMode:"إظهار نمط لوحة المؤقت",renderMode:"نمط العرض",allowAddPanel:"السماح بإضافة لوحة",allowRemovePanel:"السماح بإزالة لوحة",panelAddText:"نص إضافة لوحة",panelRemoveText:"نص إزالة لوحة",isSinglePage:"Show all elements on one page",html:"صفحة ويب HTML",expression:"عملية حسابية",minValue:"أقل قيمة",maxValue:"أكبر قيمة",minLength:"Minimum length",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",totalText:"Total text",totalType:"Total type",totalExpression:"Total expression",totalDisplayStyle:"Total display style",totalCurrency:"Total currency",totalFormat:"Total format",logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"حذف الشعار",left:"يسار",right:"يمين",top:"في الأعلى",bottom:"في الأسفل"},tabs:{general:"عام",fileOptions:"الخيارات",html:"Html Editor",columns:"الأعمدة",rows:"الصفوف",choices:"الخيارات",items:"العناصر",visibleIf:"مرئي عندما",enableIf:"مفعل عندما",requiredIf:"مطلوب عندما",rateValues:"قيم التقييم",choicesByUrl:"خيارات من الإنترنت",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"الترقيم",validators:"المدققات",navigation:"التنقل",question:"السؤال",pages:"الصفحات",completedHtml:"صفحة الويب المكتملة",completedHtmlOnCondition:"صفحة ويب مكتملة بشرط",loadingHtml:"Loading Html",timer:"مؤقت/إختبار قصير",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"عنوان القالب",totals:"Totals",logic:"المنطق",layout:"التنسيق",data:"البيانات",validation:"التحقق",cells:"الخلايا",showOnCompleted:"عند الإنتهاء من الإستبيان",logo:"الشعار في عنوان الإستبيان",slider:"Slider",others:"غير ذلك"},editProperty:"Edit property '{0}'",items:"[ Items: {0} ]",enterNewValue:"Please, enter the value.",noquestions:"There is no any question in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible:",triggerMakeQuestionsVisible:"Make elements visible:",triggerCompleteText:"Complete the survey if succeed.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression:",triggerSetValue:"to: ",triggerGotoName:"Go to the question:",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",noFile:"No file choosen"},pv:{auto:"تلقائي",static:"ثابتة",responsive:"متجاوب",contain:"إحتواء",cover:"تغطية",fill:"ملئ",onBlur:"عند الطمس",onTyping:"عند الكتابة",video:"فيديو",image:"صور",true:"صحيح",false:"خطأ",inherit:"يَرث",show:"إظهار",hide:"إخفاء",initial:"مبدئي",random:"عشوائي",collapsed:"مقلص",expanded:"موسع",none:"بلا",asc:"تصاعدي",desc:"تنازلي",indeterminate:"غير محدد",decimal:"عدد عشري",currency:"العملة",percent:"نسبة مئوية",firstExpanded:"توسيع أول لوح",off:"إيقاف",onPanel:"على اللوحة",onSurvey:"على الإستبيان",list:"قائمة",progressTop:"التقدم بالأعلى",progressBottom:"التقدم بالأسف",progressTopBottom:"التقدم بالأعلى والأسفل معاً",horizontal:"عرضي",vertical:"عمودي",default:"الإفتراضي",top:"الأعلى",bottom:"الأسفل",topBottom:"الاعلى والأسفل",both:"الكل",left:"يسار",right:"يمين",color:"لون",date:"تاريخ",datetime:"تاريخ ووقت","datetime-local":"تاريخ ووقت محلي",email:"بريد إلكتروني",month:"شهر",number:"أرقام",password:"كلمة سر",range:"نطاق",tel:"رقم هاتف",text:"نص",time:"وقت",url:"رابط إلكتروني URL",week:"إسبوع",hidden:"مخفي",on:"تشغيل",onPage:"على الصفحة",edit:"التعديل",display:"العرض",onComplete:"عند الإنتهاء",onHidden:"عند الإخفال",onHiddenContainer:"عند إخفاء الحاوية",all:"الكل",page:"الصفحة",survey:"الإستبيان",onNextPage:"عند الإنتقال للصفحة التالية",onValueChanging:"عند تغيير القيمة",onValueChanged:"إذا تغيرت القيمة",singlePage:"صفحة واحدة",standard:"أساسي",questionPerPage:"سؤال لكل صفحة",noPreview:"بلا عرض",showAllQuestions:"المعاينة مع جميع الأسئلة",showAnsweredQuestions:"المعاينة مع الأسئلة المجٌابة",pages:"الصفحات",questions:"الأسئلة",requiredQuestions:"الأسئلة المطلوبة",correctQuestions:"الإجابات الصحيحة",buttons:"الأزرار",underInput:"أسفل خانة الإدخال",underTitle:"أعلى العنوان"},op:{empty:"فارغة",notempty:"ليست فارغة",equal:"تساوي",notequal:"لا تساوي",contains:"تحتوي",notcontains:"لا تحتوي",anyof:"أي من",allof:"كلاً من",greater:"أكبر",less:"أقل",greaterorequal:"أكبر أو يساوي",lessorequal:"أقل أو يساوي",and:"و",or:"أو"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it:",showInvisibleElements:"إظهار العناصر المخفية"},validators:{answercountvalidator:"answer count",emailvalidator:"بريد إلكتروني",expressionvalidator:"عملية حسابية",numericvalidator:"رقمية",regexvalidator:"تعبير رياضي",textvalidator:"النص"},triggers:{completetrigger:"إنهاء الإستبيان",setvaluetrigger:"تحديد قيمة",copyvaluetrigger:"نسخ قيمة",skiptrigger:"الإنتقال إلى سؤال",runexpressiontrigger:"تشغيل العملية الحسابية",visibletrigger:"تغيير الرؤية (مهمل)"},pehelp:{},p:{name:"الإسم",title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},navigationButtonsVisibility:"رؤية أزرار التنقل",questionsOrder:"questionsOrder",maxTimeToFinish:"maxTimeToFinish",visible:"مرئي",visibleIf:"مرئي عندما",questionTitleLocation:"questionTitleLocation",description:"الوصف",state:"الحالة",isRequired:"مطلوب؟",requiredIf:"مطلوب عندما",indent:"المسافة البادئة",requiredErrorText:"requiredErrorText",startWithNewLine:"startWithNewLine",innerIndent:"المسافة البادئة الداخلية",page:"الصفحة",width:"العرض",commentText:"نص التعليق",valueName:"valueName",enableIf:"فعال عندما",defaultValue:"القيمة الإفتراضية",correctAnswer:"الإجابة الصحيحة",readOnly:"للقرائة فقط",validators:"المدققات",titleLocation:"موقع عنوان السؤال",hasComment:"هل هناك تعليق؟",hasOther:"hasOther",choices:"الإختيارات",choicesOrder:"choicesOrder",choicesByUrl:"خيار عن طريق رابط إلكتروني URL",otherText:"otherText",otherErrorText:"otherErrorText",storeOthersAsComment:"storeOthersAsComment",label:"المسمى",showTitle:"showTitle",valueTrue:"قيمة صحيح",valueFalse:"قيمة خطأ",cols:"الأعمدة",rows:"الصفوف",placeHolder:"placeHolder",optionsCaption:"optionsCaption",expression:"expression",format:"الصيغة",displayStyle:"أسلوب العرض",currency:"currency",useGrouping:"إستخدام التجميع",showPreview:"showPreview",allowMultiple:"السماح بالمتعدد",imageHeight:"imageHeight",imageWidth:"imageWidth",storeDataAsText:"storeDataAsText",maxSize:"maxSize",html:"صفحة ويب HTML",columns:"الأعمدة",cells:"الخليات",isAllRowRequired:"isAllRowRequired",horizontalScroll:"تمرير أٌفقي بالمؤشر",cellType:"نوع الخلية",columnsLayout:"columnsLayout",columnColCount:"عدد تقسيم العمود",columnMinWidth:"أقل عرض للعمود",rowCount:"عدد الصفوف",minRowCount:"أقل عدد للصفوف",maxRowCount:"أكبر عدد للصفوف",keyName:"إسم المفتاح",keyDuplicationError:"خطأ تكرار المفتاح",confirmDelete:"رسالة تأكيد الحذف",confirmDeleteText:"نص رسالة تأكيد الحذف",addRowLocation:"addRowLocation",addRowText:"addRowText",removeRowText:"removeRowText",items:"items",itemSize:"itemSize",colCount:"colCount",templateTitle:"عنوان القالب",templateDescription:"وصف القالب",allowAddPanel:"allowAddPanel",allowRemovePanel:"allowRemovePanel",panelCount:"عدد اللوحات",minPanelCount:"أقل عدد للوحات",maxPanelCount:"أعلى عدد للوحات",panelsState:"حالة الوحة",panelAddText:"نص إضافة لوحة",panelRemoveText:"نص حذف لوحة",panelPrevText:"نص اللوحة السابقة",panelNextText:"نص اللوحة التالية",showQuestionNumbers:"showQuestionNumbers",showRangeInProgress:"عرض نطاق القيد التقدم",renderMode:"نمط العرض",templateTitleLocation:"موقع عنوان القالب",rateValues:"قييم التقييم",rateMin:"rateMin",rateMax:"rateMax",rateStep:"rateStep",minRateDescription:"minRateDescription",maxRateDescription:"maxRateDescription",inputType:"inputType",size:"الحجم",locale:"اللغة",focusFirstQuestionAutomatic:"focusFirstQuestionAutomatic",completedBeforeHtml:"الإنتهاء قبل HTML",loadingHtml:"تحميل HTML",triggers:"المحفزات",cookieName:"cookieName",sendResultOnPageNext:"sendResultOnPageNext",showNavigationButtons:"showNavigationButtons",showPrevButton:"showPrevButton",showPageTitles:"showPageTitles",showCompletedPage:"showCompletedPage",showPageNumbers:"showPageNumbers",questionErrorLocation:"questionErrorLocation",showProgressBar:"showProgressBar",mode:"mode",goNextPageAutomatic:"goNextPageAutomatic",checkErrorsMode:"نمط التحقق من الأخطاء",clearInvisibleValues:"clearInvisibleValues",startSurveyText:"startSurveyText",pagePrevText:"pagePrevText",pageNextText:"pageNextText",completeText:"completeText",requiredText:"requiredText",questionStartIndex:"questionStartIndex",questionTitleTemplate:"questionTitleTemplate",firstPageIsStarted:"firstPageIsStarted",isSinglePage:"isSinglePage",maxTimeToFinishPage:"maxTimeToFinishPage",showTimerPanel:"showTimerPanel",showTimerPanelMode:"showTimerPanelMode",defaultPanelValue:"القيمة الإفتراضية للوحة",defaultRowValue:"قيمة الصف الإفتراضية",hasNone:"hasNone",noneText:"noneText",text:"نص",multiSelect:"متعدد الإختيار",showLabel:"عرض الملصق",logo:"الشعار",logoWidth:"عٌرض الشعار",logoHeight:"طول الشعار",logoFit:"تناسب الشعار",focusOnFirstError:"تركيز المؤشر على أول خطأ",pages:"الصفحات",calculatedValues:"القيم المحسوبة",includeIntoResult:"الإضافة إلى النتائج",navigateToUrl:"الإنتقال إلى رابط URL",completedHtml:"صفحة الويب المكتملة",completedHtmlOnCondition:"صفحة ويب مكتملة بشرط",navigateToUrlOnCondition:"الإنتقال إلى رابط إلكتروني بشرط",questionDescriptionLocation:"موقع وصف السؤال",progressBarType:"نوع شريط التقدم",maxTextLength:"أقصى طٌول للنص",maxOthersLength:"أقصى طول لخيار 'أخرى'",textUpdateMode:"نمط تحديث النص",autoGrowComment:"نمو تلقائي للسؤال من نوع تعليق",questionTitlePattern:"تنسيق عنوان السؤال",questionsOnPageMode:"الأسئلة في الصفحات",showPreviewBeforeComplete:"المعاينة قبل الإنتهاء من الإستبيان",widthMode:"نمط عٌرض الشاشة",showNumber:"عرض الرقم",navigationTitle:"navigationTitle",navigationDescription:"navigationDescription",useDisplayValuesInTitle:"إستخدم عرض القيم في العنوان",setDefaultValue:"تثبيت قيمة إفتراضية",setCorrectValue:"تثبيت إجابة صحيحة",minWidth:"أقل عرض",maxWidth:"أعلى عرض",descriptionLocation:"موقع وصف السؤال",hideNumber:"إخفاء رقم السؤال",defaultValueExpression:"العملية الحسابية الإفتراضية",bindings:"الإرتباطات",value:"القيمة",columnsVisibleIf:"أظهر الأعمدة إذا",rowsVisibleIf:"أظهر الصفوف إذا",showHeader:"عرض رأس المصفوفة",detailPanelMode:"نمط تفاصيل اللوحة",rowTitleWidth:"rowTitleWidth",allowAddRows:"السماح إضافة صفوف",allowRemoveRows:"السماح لإزالة صفوف",defaultValueFromLastRow:"القيمة الإفتراضية تكون من الصف الأخير",hideColumnsIfEmpty:"إخفاء في حالة كان العمود فارغ",emptyRowsText:"emptyRowsText",detailPanelShowOnAdding:"detailPanelShowOnAdding",allowRowsDragAndDrop:"السماح للسحب والإدراج للصفوف",rowsOrder:"ترتيب الصفوف",hideIfRowsEmpty:"إخفاء إذا كان الصف فارغ",maximumFractionDigits:"الحد الأقصى للكسور",minimumFractionDigits:"الحد الأدنى للكسور",choicesFromQuestion:"الإختيارات من الأسئلة",choicesFromQuestionMode:"choicesFromQuestionMode",hideIfChoicesEmpty:"إخفاء عندما تكون الخيارات فارغة",choicesVisibleIf:"الإختيارات مرئية عندما",choicesEnableIf:"الإختيارات مفعلة عندما",otherPlaceHolder:"حامل نص لخيار الأخرى",maxSelectedChoices:"أقصى عدد للإختيار",showClearButton:"showClearButton",contentMode:"نمط عرض المحتوى",imageFit:"إحتواء الصورة",autoComplete:"الإكمال التلقائي",min:"أقل",max:"أكبر",minValueExpression:"minValueExpression",maxValueExpression:"maxValueExpression",minErrorText:"minErrorText",maxErrorText:"maxErrorText",step:"step",dataList:"قائمة البيانات",autoGrow:"تمدد تلقائي",multiLine:"multiLine",allowImagesPreview:"السماح بعرض الصور",acceptedTypes:"الأنواع المسموح بها",waitForUpload:"الإنتظار للرفع",needConfirmRemoveFile:"سؤال تأكيد لحذف الملف",labelTrue:"ملصق صحيح",labelFalse:"ملصق خطأ",height:"height",allowClear:"allowClear",penColor:"لون القلم",backgroundColor:"لون الخلفية",dataFormat:"صيغة البيانات",defaultValueFromLastPanel:"القيمة الإفتراضية من أخر لوحة",panelRemoveButtonLocation:"موقع زر حذف اللوحة",showCaption:"showCaption",iconName:"iconName",iconSize:"iconSize"}};o.editorLocalization.locales.ar=r},"./src/localization/croatian.ts":
|
|
349
353
|
/*!**************************************!*\
|
|
350
354
|
!*** ./src/localization/croatian.ts ***!
|
|
351
355
|
\**************************************/
|
|
@@ -361,7 +365,7 @@ License: MIT
|
|
|
361
365
|
/*!*************************************!*\
|
|
362
366
|
!*** ./src/localization/english.ts ***!
|
|
363
367
|
\*************************************/
|
|
364
|
-
/*! exports provided: enStrings */function(e,t,i){"use strict";i.r(t),i.d(t,"enStrings",(function(){return o}));var o={survey:{edit:"Edit",externalHelpLink:"Watch and learn how to create surveys",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Please drop a question here from the Toolbox.",addLogicItem:"Create a rule to customize the flow of the survey.",copy:"Copy",duplicate:"Duplicate",settings:"Settings",addToToolbox:"Add to toolbox",deletePanel:"Delete Panel",deleteQuestion:"Delete Question",convertTo:"Convert to",drag:"Drag element",license:"Please purchase a SurveyJS Creator developer license to use it in your app"},qt:{default:"Default",checkbox:"Checkbox",comment:"Comment",imagepicker:"Image picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",file:"File",html:"Html",matrix:"Matrix (single choice)",matrixdropdown:"Matrix (multiple choice)",matrixdynamic:"Matrix (dynamic rows)",multipletext:"Multiple Text",panel:"Panel",paneldynamic:"Panel (dynamic panels)",radiogroup:"Radiogroup",rating:"Rating",text:"Single Input",boolean:"Boolean",expression:"Expression (read-only)",signaturepad:"Signature pad",buttongroup:"Button group",flowpanel:"Flow Panel"},ed:{defaultLocale:"Default ({0})",survey:"Survey",settings:"Survey Settings",settingsTooltip:"Open survey settings",showPanel:"Show Panel",hidePanel:"Hide Panel",prevSelected:"Select previous",nextSelected:"Select next",surveyTypeName:"Survey",pageTypeName:"Page",panelTypeName:"Panel",questionTypeName:"Question",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"Edit",newPageName:"page",newQuestionName:"question",newPanelName:"panel",newTextItemName:"text",testSurvey:"Preview",testSurveyAgain:"Test Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to:",logic:"Logic",embedSurvey:"Embed Survey",translation:"Translation",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",designer:"Designer",jsonEditor:"JSON Editor",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",toolboxGeneralCategory:"General",correctJSON:"Please correct JSON.",surveyResults:"Survey Result: ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"Modified",saving:"Saving",saved:"Saved",propertyEditorError:"Error:",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Translation Setting",translationLanguages:"Languages",translationAddLanguage:"Select language to translate",translationShowAllStrings:"Show all strings",translationShowAllPages:"Show all pages",translationNoStrings:"No strings to translate. Please, change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",bold:"Bold",italic:"Italic",underline:"Underline",fpAddQuestion:"Add question...",selectPage:"Select page...",chooseElement:"Choose element...",htmlPlaceHolder:"HTML content will be here.",panelPlaceHolder:"Drop a question from the toolbox here.",addNewQuestion:"Add Question",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[LOGO]",lg:{addNewItem:"Add New Rule",empty_tab:"Create a rule to customize the flow of the survey.",page_visibilityName:"Show (hide) page",panel_visibilityName:"Show (hide) panel",panel_enableName:"Enable (disable) panel",question_visibilityName:"Show (hide) question",question_enableName:"Enable (disable) question",question_requireName:"Make question required",trigger_completeName:"Complete survey",trigger_setvalueName:"Set question value",trigger_copyvalueName:"Copy question value",trigger_skipName:"Skip to question",trigger_runExpressionName:"Run custom expression",completedHtmlOnConditionName:"Custom 'Thank you page' text",page_visibilityDescription:"Make the page visible when the logic expression returns true. Otherwise keep it invisible.",panel_visibilityDescription:"Make the panel visible when the logic expression returns true. Otherwise keep it invisible.",panel_enableDescription:"Make the panel, and all elements inside it, enable when the logic expression returns true. Otherwise keep them disabled.",question_visibilityDescription:"Make the question visible when the logic expression returns true. Otherwise keep it invisible.",question_enableDescription:"Make the question enable when the logic expression returns true. Otherwise keep it disabled.",question_requireDescription:"Question becomes required when the logic expression returns true.",trigger_completeDescription:"When the logic expression returns true then the survey becomes completed and an end-user see the 'Thank you page'.",trigger_setvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value is set to the selected question.",trigger_copyvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value of one selected question is copied to another selected question.",trigger_skipDescription:"When the logic expression returns true then the survey skip to / focus the selected question.",trigger_runExpressionDescription:"When the logic expression returns true, then the custom expression is performed. You may optionally set this expression result into the selected question",completedHtmlOnConditionDescription:"If the logic expression returns true, then the default text for the 'Thank you page' is changed to the given one.",itemExpressionText:"When expression: '{0}' returns true:",itemEmptyExpressionText:"New rule is not set",page_visibilityText:"Make page {0} visible",panel_visibilityText:"Make panel {0} visible",panel_enableText:"Make panel {0} enable",question_visibilityText:"Make question {0} visible",question_enableText:"Make question {0} enable",question_requireText:"Make question {0} required",trigger_completeText:"Survey becomes completed",trigger_setvalueText:"Set into question: {0} value {1}",trigger_copyvalueText:"Copy into question: {0} value from question {1}",trigger_skipText:"Survey skip to the question {0}",trigger_runExpressionText1:"Run expression: '{0}'",trigger_runExpressionText2:" and set its result into question: {0}",completedHtmlOnConditionText:"Show custom text for the 'Thank you page'.",showAllQuestions:"Show all questions",showAllActionTypes:"Show all action types",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"Define condition(s)",actionsEditorTitle:"Define action(s)",deleteAction:"Delete action",addNewAction:"Add new action",selectedActionCaption:"Select an action to add...",expressionInvalid:"The logic expression is empty or invalid. Please correct it.",noActionError:"Please, add at least one action.",actionInvalid:"Please, fix problems in your action(s).",expressionSetup:"",actionsSetup:""}},pe:{apply:"Apply",ok:"OK",save:"Save",clear:"Clear",saveTooltip:"Save",cancel:"Cancel",set:"Set",reset:"Reset",change:"Change",refresh:"Refresh",close:"Close",delete:"Delete",add:"Add",addNew:"Add New",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"Edit",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"Done",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"Value is empty",fastEntry:"Fast Entry",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"Select question...",conditionSelectPage:"Select page...",conditionSelectPanel:"Select panel...",conditionValueQuestionTitle:"Please enter/select the value",expressionHelp:"You can use curly brackets to get access to the question values: {question1} + {question2}, ({price}*{quantity}) * (100 - {discount}). You can use functions as: iif(), today(), age(), min(), max(), count(), avg() and others.",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions:",cellsEmptyRowsColumns:"There is should be at least one column or row",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",listIsEmpty:"Add a new item",choicesListIsEmpty:"No choices have been added yet","addNew@choices":"Add a choice",expressionIsEmpty:"Expression is empty",value:"Value",text:"Text",rowid:"Row ID",imageLink:"Image Link",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"URL",path:"Path",valueName:"Value name",titleName:"Title name",allowEmptyResponse:"Allow empty respose",titlePlaceholder:"Input title here",surveyTitlePlaceholder:"Input survey title here",pageTitlePlaceholder:"Input page title here",descriptionPlaceholder:"Enter a description",surveyDescriptionPlaceholder:"Enter a survey description",pageDescriptionPlaceholder:"Enter a page description",hasOther:"Has other item",otherText:"Other item text",hasNone:"Has none item",noneText:"None item text",hasSelectAll:"Has select all item",selectAllText:"Select all item text",choicesMin:"Minimum value for auto generated items",choicesMax:"Maximum value for auto generated items",choicesStep:"The difference between auto generated items",name:"Name",title:"Title",cellType:"Cell type",colCount:"Column count",choicesOrder:"Select choices order",visible:"Is visible?",isRequired:"Is required?",isAllRowRequired:"Require answer for all rows",requiredErrorText:"Required error text",startWithNewLine:"Is start with new line?",rows:"Row count",cols:"Column count",placeHolder:"Input place holder",showPreview:"Show preview area",storeDataAsText:"Store file content in JSON result as text",maxSize:"Maximum file size in bytes",imageHeight:"Image height",imageWidth:"Image width",rowCount:"Row count",columnLayout:"Columns layout",addRowLocation:"Add row button location",addRowText:"Add row button text",removeRowText:"Remove row button text",rateMin:"Minimum rate",rateMax:"Maximum rate",rateStep:"Rate step",minRateDescription:"Minimum rate description",maxRateDescription:"Maximum rate description",inputType:"Input type",optionsCaption:"Options caption",showOptionsCaption:"Show options caption",defaultValue:"Default value",cellsDefaultRow:"Default cells texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"Maximum length",buildExpression:"Build",editExpression:"Edit",and:"And",or:"Or",remove:"Remove",addCondition:"Add condition",if:"If",then:"Then",setToName:"to",fromName:"from",ruleIsNotSet:"Rule is incorrect",showTitle:"Show/hide title",expandCollapseTitle:"Expand/collapse title",locale:"Default language",simulator:"Choose device",landscapeOrientation:"Landscape",portraitOrientation:"Portrait",mode:"Mode (edit/read only)",clearInvisibleValues:"Clear invisible values",cookieName:"Cookie name (to disable run survey two times locally)",sendResultOnPageNext:"Send survey results on page next",storeOthersAsComment:"Store 'others' value in separate field",showPageTitles:"Show page titles",showPageNumbers:"Show page numbers",pagePrevText:"Page previous button text",pageNextText:"Page next button text",completeText:"Complete button text",previewText:"Preview button text",editText:"Edit button text",startSurveyText:"Start button text",showNavigationButtons:"Show navigation buttons (default navigation)",showPrevButton:"Show previous button (user may return on previous page)",firstPageIsStarted:"The first page in the survey is a started page.",showCompletedPage:"Show the completed page at the end (completedHtml)",goNextPageAutomatic:"On answering all questions, go to the next page automatically",showProgressBar:"Show progress bar",questionTitleLocation:"Question title location",requiredText:"The question required symbol(s)",questionStartIndex:"Question start index (1, 2 or 'A', 'a')",showQuestionNumbers:"Show question numbers",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"Question error location",focusFirstQuestionAutomatic:"Focus first question on changing the page",questionsOrder:"Elements order on the page",maxTimeToFinish:"Maximum time to finish the survey",maxTimeToFinishPage:"Maximum time to finish a page in the survey",showTimerPanel:"Show timer panel",showTimerPanelMode:"Show timer panel mode",renderMode:"Render mode",allowAddPanel:"Allow adding a panel",allowRemovePanel:"Allow removing the panel",panelAddText:"Adding panel text",panelRemoveText:"Removing panel text",isSinglePage:"Show all elements on one page",html:"Html",expression:"Expression",minValue:"Minimum value",maxValue:"Maximum value",minLength:"Minimum length",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",totalText:"Total text",totalType:"Total type",totalExpression:"Total expression",totalDisplayStyle:"Total display style",totalCurrency:"Total currency",totalFormat:"Total format",logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"Remove logo",left:"Left",right:"Right",top:"On the top",bottom:"In the bottom"},tabs:{general:"General",fileOptions:"Options",html:"Html Editor",columns:"Columns",rows:"Rows",choices:"Choices",items:"Items",visibleIf:"Visible If",enableIf:"Enable If",requiredIf:"Required If",rateValues:"Rate Values",choicesByUrl:"Choices from Web",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"Numbering",validators:"Validators",navigation:"Navigation",question:"Question",pages:"Pages",completedHtml:"Completed Html",completedHtmlOnCondition:"Completed Html on Condition",loadingHtml:"Loading Html",timer:"Timer/Quiz",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"Template title",totals:"Totals",logic:"Logic",layout:"Layout",data:"Data",validation:"Validation",cells:"Cells",showOnCompleted:"Show on Completed",logo:"Logo in Survey Title",slider:"Slider",others:"Others"},editProperty:"Edit property '{0}'",items:"[ Items: {0} ]",enterNewValue:"Please, enter the value.",noquestions:"There is no any question in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible:",triggerMakeQuestionsVisible:"Make elements visible:",triggerCompleteText:"Complete the survey if succeed.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression:",triggerSetValue:"to: ",triggerGotoName:"Go to the question:",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",noFile:"No file choosen"},pv:{true:"true",false:"false",inherit:"inherit",show:"show",hide:"hide",default:"default",initial:"initial",random:"random",collapsed:"collapsed",expanded:"expanded",none:"none",asc:"ascending",desc:"descending",indeterminate:"indeterminate",decimal:"decimal",currency:"currency",percent:"percent",firstExpanded:"first expanded",off:"off",onPanel:"on panel",onSurvey:"on survey",list:"list",progressTop:"progress on top",progressBottom:"progress on bottom",progressTopBottom:"progress on top&bottom",horizontal:"horizontal",vertical:"vertical",top:"top",bottom:"bottom",topBottom:"top and bottom",both:"both",left:"left",color:"color",date:"date",datetime:"datetime","datetime-local":"datetime-local",email:"email",month:"month",number:"number",password:"password",range:"range",tel:"tel",text:"text",time:"time",url:"url",week:"week",hidden:"hidden",on:"on",onPage:"on page",edit:"edit",display:"display",onComplete:"on complete",onHidden:"on hidden",all:"all",page:"page",survey:"survey",onNextPage:"on next page",onValueChanged:"on value changed",singlePage:"single page",standard:"standard",questionPerPage:"question per page",noPreview:"no preview",showAllQuestions:"show preview with all questions",showAnsweredQuestions:"show preview with answered questions",pages:"pages",questions:"questions",requiredQuestions:"required questions",correctQuestions:"correct questions",buttons:"buttons",underInput:"under input",underTitle:"under title"},op:{empty:"is empty",notempty:"is not empty",equal:"equals",notequal:"not equals",contains:"contains",notcontains:"not contains",anyof:"any of",allof:"all of",greater:"greater",less:"less",greaterorequal:"greater or equals",lessorequal:"less or equals",and:"and",or:"or"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it:",showInvisibleElements:"Show invisible elements"},validators:{answercountvalidator:"answer count",emailvalidator:"e-mail",expressionvalidator:"expression",numericvalidator:"numeric",regexvalidator:"regex",textvalidator:"text"},triggers:{completetrigger:"complete survey",setvaluetrigger:"set value",copyvaluetrigger:"copy value",skiptrigger:"skip to question",runexpressiontrigger:"run expression",visibletrigger:"change visibility (deprecated)"},pehelp:{},p:{name:"name",title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},navigationButtonsVisibility:"navigationButtonsVisibility",questionsOrder:"questionsOrder",maxTimeToFinish:"maxTimeToFinish",visible:"visible",visibleIf:"visibleIf",questionTitleLocation:"questionTitleLocation",description:"description",state:"state",isRequired:"isRequired",requiredIf:"requiredIf",indent:"indent",requiredErrorText:"requiredErrorText",startWithNewLine:"startWithNewLine",innerIndent:"innerIndent",page:"page",width:"width",commentText:"commentText",valueName:"valueName",enableIf:"enableIf",defaultValue:"defaultValue",correctAnswer:"correctAnswer",readOnly:"readOnly",validators:"validators",titleLocation:"titleLocation",hasComment:"hasComment",hasOther:"hasOther",choices:"choices",choicesOrder:"choicesOrder",choicesByUrl:"choicesByUrl",otherText:"otherText",otherErrorText:"otherErrorText",storeOthersAsComment:"storeOthersAsComment",label:"label",showTitle:"showTitle",valueTrue:"valueTrue",valueFalse:"valueFalse",cols:"cols",rows:"rows",placeHolder:"placeHolder",optionsCaption:"optionsCaption",expression:"expression",format:"format",displayStyle:"displayStyle",currency:"currency",useGrouping:"useGrouping",showPreview:"showPreview",allowMultiple:"allowMultiple",imageHeight:"imageHeight",imageWidth:"imageWidth",storeDataAsText:"storeDataAsText",maxSize:"maxSize",html:"html",columns:"columns",cells:"cells",isAllRowRequired:"isAllRowRequired",horizontalScroll:"horizontalScroll",cellType:"cellType",columnsLayout:"columnsLayout",columnColCount:"columnColCount",columnMinWidth:"columnMinWidth",rowCount:"rowCount",minRowCount:"minRowCount",maxRowCount:"maxRowCount",keyName:"keyName",keyDuplicationError:"keyDuplicationError",confirmDelete:"confirmDelete",confirmDeleteText:"confirmDeleteText",addRowLocation:"addRowLocation",addRowText:"addRowText",removeRowText:"removeRowText",items:"items",itemSize:"itemSize",colCount:"colCount",templateTitle:"templateTitle",templateDescription:"templateDescription",allowAddPanel:"allowAddPanel",allowRemovePanel:"allowRemovePanel",panelCount:"panelCount",minPanelCount:"minPanelCount",maxPanelCount:"maxPanelCount",panelsState:"panelsState",panelAddText:"panelAddText",panelRemoveText:"panelRemoveText",panelPrevText:"panelPrevText",panelNextText:"panelNextText",showQuestionNumbers:"showQuestionNumbers",showRangeInProgress:"showRangeInProgress",renderMode:"renderMode",templateTitleLocation:"templateTitleLocation",rateValues:"rateValues",rateMin:"rateMin",rateMax:"rateMax",rateStep:"rateStep",minRateDescription:"minRateDescription",maxRateDescription:"maxRateDescription",inputType:"inputType",size:"size",locale:"locale",focusFirstQuestionAutomatic:"focusFirstQuestionAutomatic",completedHtml:"completedHtml",completedBeforeHtml:"completedBeforeHtml",loadingHtml:"loadingHtml",triggers:"triggers",cookieName:"cookieName",sendResultOnPageNext:"sendResultOnPageNext",showNavigationButtons:"showNavigationButtons",showPrevButton:"showPrevButton",showPageTitles:"showPageTitles",showCompletedPage:"showCompletedPage",showPageNumbers:"showPageNumbers",questionErrorLocation:"questionErrorLocation",showProgressBar:"showProgressBar",mode:"mode",goNextPageAutomatic:"goNextPageAutomatic",checkErrorsMode:"checkErrorsMode",clearInvisibleValues:"clearInvisibleValues",startSurveyText:"startSurveyText",pagePrevText:"pagePrevText",pageNextText:"pageNextText",completeText:"completeText",requiredText:"requiredText",questionStartIndex:"questionStartIndex",questionTitleTemplate:"questionTitleTemplate",firstPageIsStarted:"firstPageIsStarted",isSinglePage:"isSinglePage",maxTimeToFinishPage:"maxTimeToFinishPage",showTimerPanel:"showTimerPanel",showTimerPanelMode:"showTimerPanelMode",defaultPanelValue:"defaultPanelValue",defaultRowValue:"defaultRowValue",hasNone:"hasNone",noneText:"noneText",text:"text",multiSelect:"Multi select",showLabel:"Show label",logo:"logo",logoWidth:"logoWidth",logoHeight:"logoHeight",logoFit:"logoFit",focusOnFirstError:"focusOnFirstError",completedHtmlOnCondition:"completedHtmlOnCondition",pages:"pages",calculatedValues:"calculatedValues",navigateToUrl:"navigateToUrl",navigateToUrlOnCondition:"navigateToUrlOnCondition",questionDescriptionLocation:"questionDescriptionLocation",progressBarType:"progressBarType",maxTextLength:"maxTextLength",maxOthersLength:"maxOthersLength",textUpdateMode:"textUpdateMode",autoGrowComment:"autoGrowComment",questionTitlePattern:"questionTitlePattern",questionsOnPageMode:"questionsOnPageMode",showPreviewBeforeComplete:"showPreviewBeforeComplete",widthMode:"widthMode",showNumber:"showNumber",navigationTitle:"navigationTitle",navigationDescription:"navigationDescription",useDisplayValuesInTitle:"useDisplayValuesInTitle",minWidth:"minWidth",maxWidth:"maxWidth",descriptionLocation:"descriptionLocation",hideNumber:"hideNumber",defaultValueExpression:"defaultValueExpression",bindings:"bindings",columnsVisibleIf:"columnsVisibleIf",rowsVisibleIf:"rowsVisibleIf",showHeader:"showHeader",detailPanelMode:"detailPanelMode",rowTitleWidth:"rowTitleWidth",allowAddRows:"allowAddRows",allowRemoveRows:"allowRemoveRows",defaultValueFromLastRow:"defaultValueFromLastRow",hideColumnsIfEmpty:"hideColumnsIfEmpty",emptyRowsText:"emptyRowsText",detailPanelShowOnAdding:"detailPanelShowOnAdding",allowRowsDragAndDrop:"allowRowsDragAndDrop",rowsOrder:"rowsOrder",hideIfRowsEmpty:"hideIfRowsEmpty",maximumFractionDigits:"maximumFractionDigits",minimumFractionDigits:"minimumFractionDigits",choicesFromQuestion:"choicesFromQuestion",choicesFromQuestionMode:"choicesFromQuestionMode",hideIfChoicesEmpty:"hideIfChoicesEmpty",choicesVisibleIf:"choicesVisibleIf",choicesEnableIf:"choicesEnableIf",otherPlaceHolder:"otherPlaceHolder",maxSelectedChoices:"maxSelectedChoices",showClearButton:"showClearButton",contentMode:"contentMode",imageFit:"imageFit",autoComplete:"autoComplete",min:"min",max:"max",minValueExpression:"minValueExpression",maxValueExpression:"maxValueExpression",minErrorText:"minErrorText",maxErrorText:"maxErrorText",step:"step",dataList:"dataList",autoGrow:"autoGrow",multiLine:"multiLine",allowImagesPreview:"allowImagesPreview",acceptedTypes:"acceptedTypes",waitForUpload:"waitForUpload",needConfirmRemoveFile:"needConfirmRemoveFile",labelTrue:"labelTrue",labelFalse:"labelFalse",height:"height",allowClear:"allowClear",penColor:"penColor",backgroundColor:"backgroundColor",dataFormat:"dataFormat",defaultValueFromLastPanel:"defaultValueFromLastPanel",panelRemoveButtonLocation:"panelRemoveButtonLocation",showCaption:"showCaption",iconName:"iconName",iconSize:"iconSize"}}},"./src/localization/finnish.ts":
|
|
368
|
+
/*! exports provided: enStrings */function(e,t,i){"use strict";i.r(t),i.d(t,"enStrings",(function(){return o}));var o={survey:{edit:"Edit",externalHelpLink:"Watch and learn how to create surveys",externalHelpLinkUrl:"https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Please drop a question here from the Toolbox.",addLogicItem:"Create a rule to customize the flow of the survey.",copy:"Copy",duplicate:"Duplicate",settings:"Settings",addToToolbox:"Add to toolbox",deletePanel:"Delete Panel",deleteQuestion:"Delete Question",convertTo:"Convert to",drag:"Drag element",license:"Please purchase a SurveyJS Creator developer license to use it in your app"},qt:{default:"Default",checkbox:"Checkbox",comment:"Comment",imagepicker:"Image picker",ranking:"Ranking",image:"Image",dropdown:"Dropdown",file:"File",html:"Html",matrix:"Matrix (single choice)",matrixdropdown:"Matrix (multiple choice)",matrixdynamic:"Matrix (dynamic rows)",multipletext:"Multiple Text",panel:"Panel",paneldynamic:"Panel (dynamic panels)",radiogroup:"Radiogroup",rating:"Rating",text:"Single Input",boolean:"Boolean",expression:"Expression (read-only)",signaturepad:"Signature pad",buttongroup:"Button group",flowpanel:"Flow Panel"},ed:{defaultLocale:"Default ({0})",survey:"Survey",settings:"Survey Settings",settingsTooltip:"Open survey settings",showPanel:"Show Panel",hidePanel:"Hide Panel",prevSelected:"Select previous",nextSelected:"Select next",surveyTypeName:"Survey",pageTypeName:"Page",panelTypeName:"Panel",questionTypeName:"Question",columnTypeName:"Column",addNewPage:"Add New Page",moveRight:"Scroll to the Right",moveLeft:"Scroll to the Left",deletePage:"Delete Page",editPage:"Edit Page",edit:"Edit",newPageName:"page",newQuestionName:"question",newPanelName:"panel",newTextItemName:"text",testSurvey:"Preview",testSurveyAgain:"Test Survey Again",testSurveyWidth:"Survey width: ",navigateToMsg:"You had to navigate to:",logic:"Logic",embedSurvey:"Embed Survey",translation:"Translation",saveSurvey:"Save Survey",saveSurveyTooltip:"Save Survey",designer:"Designer",jsonEditor:"JSON Editor",jsonHideErrors:"Hide errors",jsonShowErrors:"Show errors",undo:"Undo",redo:"Redo",undoTooltip:"Undo last change",redoTooltip:"Redo the change",copy:"Copy",cut:"Cut",paste:"Paste",copyTooltip:"Copy selection to clipboard",cutTooltip:"Cut selection to clipboard",pasteTooltip:"Paste from clipboard",options:"Options",generateValidJSON:"Generate Valid JSON",generateReadableJSON:"Generate Readable JSON",toolbox:"Toolbox","property-grid":"Properties",propertyGridFilteredTextPlaceholder:"Type to search...",toolboxGeneralCategory:"General",correctJSON:"Please correct JSON.",surveyResults:"Survey Result: ",surveyResultsTable:"As Table",surveyResultsJson:"As JSON",resultsTitle:"Question Title",resultsName:"Question Name",resultsValue:"Answer Value",resultsDisplayValue:"Display Value",modified:"Modified",saving:"Saving",saved:"Saved",propertyEditorError:"Error:",saveError:"Error! Editor content is not saved.",translationPropertyGridTitle:"Translation Setting",translationLanguages:"Languages",translationAddLanguage:"Select language to translate",translationShowAllStrings:"Show all strings",translationShowAllPages:"Show all pages",translationNoStrings:"No strings to translate. Please, change the filter.",translationExportToSCVButton:"Export to CSV",translationImportFromSCVButton:"Import from CSV",translationMergeLocaleWithDefault:"Merge {0} with default locale",translationPlaceHolder:"Translation...",bold:"Bold",italic:"Italic",underline:"Underline",fpAddQuestion:"Add question...",selectPage:"Select page...",chooseElement:"Choose element...",htmlPlaceHolder:"HTML content will be here.",panelPlaceHolder:"Drop a question from the toolbox here.",addNewQuestion:"Add Question",addNewTypeQuestion:"Add {0}",chooseLogoPlaceholder:"[LOGO]",lg:{addNewItem:"Add New Rule",empty_tab:"Create a rule to customize the flow of the survey.",page_visibilityName:"Show (hide) page",panel_visibilityName:"Show (hide) panel",panel_enableName:"Enable (disable) panel",question_visibilityName:"Show (hide) question",question_enableName:"Enable (disable) question",question_requireName:"Make question required",trigger_completeName:"Complete survey",trigger_setvalueName:"Set question value",trigger_copyvalueName:"Copy question value",trigger_skipName:"Skip to question",trigger_runExpressionName:"Run custom expression",completedHtmlOnConditionName:"Custom 'Thank you page' text",page_visibilityDescription:"Make the page visible when the logic expression returns true. Otherwise keep it invisible.",panel_visibilityDescription:"Make the panel visible when the logic expression returns true. Otherwise keep it invisible.",panel_enableDescription:"Make the panel, and all elements inside it, enable when the logic expression returns true. Otherwise keep them disabled.",question_visibilityDescription:"Make the question visible when the logic expression returns true. Otherwise keep it invisible.",question_enableDescription:"Make the question enable when the logic expression returns true. Otherwise keep it disabled.",question_requireDescription:"Question becomes required when the logic expression returns true.",trigger_completeDescription:"When the logic expression returns true then the survey becomes completed and an end-user see the 'Thank you page'.",trigger_setvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value is set to the selected question.",trigger_copyvalueDescription:"When question values, that are used in the logic expression, are changed and the logic expression returns true, then the value of one selected question is copied to another selected question.",trigger_skipDescription:"When the logic expression returns true then the survey skip to / focus the selected question.",trigger_runExpressionDescription:"When the logic expression returns true, then the custom expression is performed. You may optionally set this expression result into the selected question",completedHtmlOnConditionDescription:"If the logic expression returns true, then the default text for the 'Thank you page' is changed to the given one.",itemExpressionText:"When expression: '{0}' returns true:",itemEmptyExpressionText:"New rule is not set",page_visibilityText:"make page {0} visible",panel_visibilityText:"make panel {0} visible",panel_enableText:"make panel {0} enable",question_visibilityText:"make question {0} visible",question_enableText:"make question {0} enable",question_requireText:"make question {0} required",trigger_completeText:"survey becomes completed",trigger_setvalueText:"set into question: {0} value {1}",trigger_copyvalueText:"copy into question: {0} value from question {1}",trigger_skipText:"survey skip to the question {0}",trigger_runExpressionText1:"run expression: '{0}'",trigger_runExpressionText2:" and set its result into question: {0}",completedHtmlOnConditionText:"show custom text for the 'Thank you page'.",showAllQuestions:"Show all questions",showAllActionTypes:"Show all action types",conditions:"Condition(s)",actions:"Action(s)",expressionEditorTitle:"Define condition(s)",actionsEditorTitle:"Define action(s)",deleteAction:"Delete action",addNewAction:"Add new action",selectedActionCaption:"Select an action to add...",expressionInvalid:"The logic expression is empty or invalid. Please correct it.",noActionError:"Please, add at least one action.",actionInvalid:"Please, fix problems in your action(s).",expressionSetup:"",actionsSetup:""}},pe:{apply:"Apply",ok:"OK",save:"Save",clear:"Clear",saveTooltip:"Save",cancel:"Cancel",set:"Set",reset:"Reset",change:"Change",refresh:"Refresh",close:"Close",delete:"Delete",add:"Add",addNew:"Add New",addItem:"Click to add an item...",removeItem:"Click to remove the item...",dragItem:"Drag the item",addOther:"Other",addSelectAll:"Select All",addNone:"None",removeAll:"Remove All",edit:"Edit",back:"Return without saving",backTooltip:"Return without saving",saveAndBack:"Save and return",saveAndBackTooltip:"Save and return",doneEditing:"Done",editChoices:"Edit Choices",showChoices:"Show Choices",move:"Move",empty:"<empty>",emptyValue:"Value is empty",fastEntry:"Fast Entry",fastEntryNonUniqueError:"Value '{0}' is not unique",fastEntryChoicesCountError:"Please limit the number of items from {0} to {1}",formEntry:"Form Entry",testService:"Test the service",itemSelectorEmpty:"Please select the element",conditionActionEmpty:"Please select the action",conditionSelectQuestion:"Select question...",conditionSelectPage:"Select page...",conditionSelectPanel:"Select panel...",conditionValueQuestionTitle:"Please enter/select the value",expressionHelp:"You can use curly brackets to get access to the question values: {question1} + {question2}, ({price}*{quantity}) * (100 - {discount}). You can use functions as: iif(), today(), age(), min(), max(), count(), avg() and others.",aceEditorHelp:"Press ctrl+space to get expression completion hint",aceEditorRowTitle:"Current row",aceEditorPanelTitle:"Current panel",showMore:"For more details please check the documentation",assistantTitle:"Available questions:",cellsEmptyRowsColumns:"There is should be at least one column or row",propertyIsEmpty:"Please enter a value",propertyIsNoUnique:"Please enter a unique value",propertyNameIsNotUnique:"Please enter a unique name",listIsEmpty:"Add a new item",choicesListIsEmpty:"No choices have been added yet","addNew@choices":"Add a choice",expressionIsEmpty:"Expression is empty",value:"Value",text:"Text",rowid:"Row ID",imageLink:"Image Link",columnEdit:"Edit column: {0}",itemEdit:"Edit item: {0}",url:"URL",path:"Path",valueName:"Value name",titleName:"Title name",allowEmptyResponse:"Allow empty respose",titlePlaceholder:"Input title here",surveyTitlePlaceholder:"Input survey title here",pageTitlePlaceholder:"Input page title here",descriptionPlaceholder:"Enter a description",surveyDescriptionPlaceholder:"Enter a survey description",pageDescriptionPlaceholder:"Enter a page description",hasOther:"Has other item",otherText:"Other item text",hasNone:"Has none item",noneText:"None item text",hasSelectAll:"Has select all item",selectAllText:"Select all item text",choicesMin:"Minimum value for auto generated items",choicesMax:"Maximum value for auto generated items",choicesStep:"The difference between auto generated items",name:"Name",title:"Title",cellType:"Cell type",colCount:"Column count",choicesOrder:"Select choices order",visible:"Is visible?",isRequired:"Is required?",isAllRowRequired:"Require answer for all rows",requiredErrorText:"Required error text",startWithNewLine:"Is start with new line?",rows:"Row count",cols:"Column count",placeHolder:"Input place holder",showPreview:"Show preview area",storeDataAsText:"Store file content in JSON result as text",maxSize:"Maximum file size in bytes",imageHeight:"Image height",imageWidth:"Image width",rowCount:"Row count",columnLayout:"Columns layout",addRowLocation:"Add row button location",addRowText:"Add row button text",removeRowText:"Remove row button text",rateMin:"Minimum rate",rateMax:"Maximum rate",rateStep:"Rate step",minRateDescription:"Minimum rate description",maxRateDescription:"Maximum rate description",inputType:"Input type",optionsCaption:"Options caption",showOptionsCaption:"Show options caption",defaultValue:"Default value",cellsDefaultRow:"Default cells texts",surveyEditorTitle:"Edit survey settings",qEditorTitle:"Edit: {0}",maxLength:"Maximum length",buildExpression:"Build",editExpression:"Edit",and:"And",or:"Or",remove:"Remove",addCondition:"Add condition",if:"If",then:"Then",setToName:"to",fromName:"from",ruleIsNotSet:"Rule is incorrect",showTitle:"Show/hide title",expandCollapseTitle:"Expand/collapse title",locale:"Default language",simulator:"Choose device",landscapeOrientation:"Landscape",portraitOrientation:"Portrait",mode:"Mode (edit/read only)",clearInvisibleValues:"Clear invisible values",cookieName:"Cookie name (to disable run survey two times locally)",sendResultOnPageNext:"Send survey results on page next",storeOthersAsComment:"Store 'others' value in separate field",showPageTitles:"Show page titles",showPageNumbers:"Show page numbers",pagePrevText:"Page previous button text",pageNextText:"Page next button text",completeText:"Complete button text",previewText:"Preview button text",editText:"Edit button text",startSurveyText:"Start button text",showNavigationButtons:"Show navigation buttons (default navigation)",showPrevButton:"Show previous button (user may return on previous page)",firstPageIsStarted:"The first page in the survey is a started page.",showCompletedPage:"Show the completed page at the end (completedHtml)",goNextPageAutomatic:"On answering all questions, go to the next page automatically",showProgressBar:"Show progress bar",questionTitleLocation:"Question title location",requiredText:"The question required symbol(s)",questionStartIndex:"Question start index (1, 2 or 'A', 'a')",showQuestionNumbers:"Show question numbers",questionTitleTemplate:"Question title template, default is: '{no}. {require} {title}'",questionErrorLocation:"Question error location",focusFirstQuestionAutomatic:"Focus first question on changing the page",questionsOrder:"Elements order on the page",maxTimeToFinish:"Maximum time to finish the survey",maxTimeToFinishPage:"Maximum time to finish a page in the survey",showTimerPanel:"Show timer panel",showTimerPanelMode:"Show timer panel mode",renderMode:"Render mode",allowAddPanel:"Allow adding a panel",allowRemovePanel:"Allow removing the panel",panelAddText:"Adding panel text",panelRemoveText:"Removing panel text",isSinglePage:"Show all elements on one page",html:"Html",expression:"Expression",minValue:"Minimum value",maxValue:"Maximum value",minLength:"Minimum length",allowDigits:"Allow digits",minCount:"Minimum count",maxCount:"Maximum count",regex:"Regular expression",totalText:"Total text",totalType:"Total type",totalExpression:"Total expression",totalDisplayStyle:"Total display style",totalCurrency:"Total currency",totalFormat:"Total format",logoPosition:"Logo position",addLogo:"Add logo...",changeLogo:"Change logo...",logoPositions:{none:"Remove logo",left:"Left",right:"Right",top:"On the top",bottom:"In the bottom"},tabs:{general:"General",fileOptions:"Options",html:"Html Editor",columns:"Columns",rows:"Rows",choices:"Choices",items:"Items",visibleIf:"Visible If",enableIf:"Enable If",requiredIf:"Required If",rateValues:"Rate Values",choicesByUrl:"Choices from Web",matrixChoices:"Default Choices",multipleTextItems:"Text Inputs",numbering:"Numbering",validators:"Validators",navigation:"Navigation",question:"Question",pages:"Pages",completedHtml:"Completed Html",completedHtmlOnCondition:"Completed Html on Condition",loadingHtml:"Loading Html",timer:"Timer/Quiz",calculatedValues:"Calculated Values",triggers:"Triggers",templateTitle:"Template title",totals:"Totals",logic:"Logic",layout:"Layout",data:"Data",validation:"Validation",cells:"Cells",showOnCompleted:"Show on Completed",logo:"Logo in Survey Title",slider:"Slider",others:"Others"},editProperty:"Edit property '{0}'",items:"[ Items: {0} ]",enterNewValue:"Please, enter the value.",noquestions:"There is no any question in the survey.",createtrigger:"Please create a trigger",titleKeyboardAdornerTip:"Press enter button to edit",keyboardAdornerTip:"Press enter button to edit item, press delete button to delete item, press alt plus arrow up or arrow down to move item",triggerOn:"On ",triggerMakePagesVisible:"Make pages visible:",triggerMakeQuestionsVisible:"Make elements visible:",triggerCompleteText:"Complete the survey if succeed.",triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: ",triggerRunExpression:"Run this Expression:",triggerSetValue:"to: ",triggerGotoName:"Go to the question:",triggerIsVariable:"Do not put the variable into the survey result.",triggerRunExpressionEmpty:"Please enter a valid expression",emptyExpressionPlaceHolder:"Type expression here...",noFile:"No file choosen"},pv:{true:"true",false:"false",inherit:"inherit",show:"show",hide:"hide",default:"default",initial:"initial",random:"random",collapsed:"collapsed",expanded:"expanded",none:"none",asc:"ascending",desc:"descending",indeterminate:"indeterminate",decimal:"decimal",currency:"currency",percent:"percent",firstExpanded:"first expanded",off:"off",onPanel:"on panel",onSurvey:"on survey",list:"list",progressTop:"progress on top",progressBottom:"progress on bottom",progressTopBottom:"progress on top&bottom",horizontal:"horizontal",vertical:"vertical",top:"top",bottom:"bottom",topBottom:"top and bottom",both:"both",left:"left",color:"color",date:"date",datetime:"datetime","datetime-local":"datetime-local",email:"email",month:"month",number:"number",password:"password",range:"range",tel:"tel",text:"text",time:"time",url:"url",week:"week",hidden:"hidden",on:"on",onPage:"on page",edit:"edit",display:"display",onComplete:"on complete",onHidden:"on hidden",all:"all",page:"page",survey:"survey",onNextPage:"on next page",onValueChanged:"on value changed",singlePage:"single page",standard:"standard",questionPerPage:"question per page",noPreview:"no preview",showAllQuestions:"show preview with all questions",showAnsweredQuestions:"show preview with answered questions",pages:"pages",questions:"questions",requiredQuestions:"required questions",correctQuestions:"correct questions",buttons:"buttons",underInput:"under input",underTitle:"under title"},op:{empty:"is empty",notempty:"is not empty",equal:"equals",notequal:"not equals",contains:"contains",notcontains:"not contains",anyof:"any of",allof:"all of",greater:"greater",less:"less",greaterorequal:"greater or equals",lessorequal:"less or equals",and:"and",or:"or"},ew:{angular:"Use Angular version",jquery:"Use jQuery version",knockout:"Use Knockout version",react:"Use React version",vue:"Use Vue version",bootstrap:"For bootstrap framework",modern:"Modern theme",default:"Default theme",orange:"Orange theme",darkblue:"Darkblue theme",darkrose:"Darkrose theme",stone:"Stone theme",winter:"Winter theme",winterstone:"Winter-Stone theme",showOnPage:"Show survey on a page",showInWindow:"Show survey in a window",loadFromServer:"Load Survey JSON from server",titleScript:"Scripts and styles",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Select the page to test it:",showInvisibleElements:"Show invisible elements"},validators:{answercountvalidator:"answer count",emailvalidator:"e-mail",expressionvalidator:"expression",numericvalidator:"numeric",regexvalidator:"regex",textvalidator:"text"},triggers:{completetrigger:"complete survey",setvaluetrigger:"set value",copyvaluetrigger:"copy value",skiptrigger:"skip to question",runexpressiontrigger:"run expression",visibletrigger:"change visibility (deprecated)"},pehelp:{},p:{name:"name",title:{name:"title",title:"Leave it empty, if it is the same as 'Name'"},navigationButtonsVisibility:"navigationButtonsVisibility",questionsOrder:"questionsOrder",maxTimeToFinish:"maxTimeToFinish",visible:"visible",visibleIf:"visibleIf",questionTitleLocation:"questionTitleLocation",description:"description",state:"state",isRequired:"isRequired",requiredIf:"requiredIf",indent:"indent",requiredErrorText:"requiredErrorText",startWithNewLine:"startWithNewLine",innerIndent:"innerIndent",page:"page",width:"width",commentText:"commentText",valueName:"valueName",enableIf:"enableIf",defaultValue:"defaultValue",correctAnswer:"correctAnswer",readOnly:"readOnly",validators:"validators",titleLocation:"titleLocation",hasComment:"hasComment",hasOther:"hasOther",choices:"choices",choicesOrder:"choicesOrder",choicesByUrl:"choicesByUrl",otherText:"otherText",otherErrorText:"otherErrorText",storeOthersAsComment:"storeOthersAsComment",label:"label",showTitle:"showTitle",valueTrue:"valueTrue",valueFalse:"valueFalse",cols:"cols",rows:"rows",placeHolder:"placeHolder",optionsCaption:"optionsCaption",expression:"expression",format:"format",displayStyle:"displayStyle",currency:"currency",useGrouping:"useGrouping",showPreview:"showPreview",allowMultiple:"allowMultiple",imageHeight:"imageHeight",imageWidth:"imageWidth",storeDataAsText:"storeDataAsText",maxSize:"maxSize",html:"html",columns:"columns",cells:"cells",isAllRowRequired:"isAllRowRequired",horizontalScroll:"horizontalScroll",cellType:"cellType",columnsLayout:"columnsLayout",columnColCount:"columnColCount",columnMinWidth:"columnMinWidth",rowCount:"rowCount",minRowCount:"minRowCount",maxRowCount:"maxRowCount",keyName:"keyName",keyDuplicationError:"keyDuplicationError",confirmDelete:"confirmDelete",confirmDeleteText:"confirmDeleteText",addRowLocation:"addRowLocation",addRowText:"addRowText",removeRowText:"removeRowText",items:"items",itemSize:"itemSize",colCount:"colCount",templateTitle:"templateTitle",templateDescription:"templateDescription",allowAddPanel:"allowAddPanel",allowRemovePanel:"allowRemovePanel",panelCount:"panelCount",minPanelCount:"minPanelCount",maxPanelCount:"maxPanelCount",panelsState:"panelsState",panelAddText:"panelAddText",panelRemoveText:"panelRemoveText",panelPrevText:"panelPrevText",panelNextText:"panelNextText",showQuestionNumbers:"showQuestionNumbers",showRangeInProgress:"showRangeInProgress",renderMode:"renderMode",templateTitleLocation:"templateTitleLocation",rateValues:"rateValues",rateMin:"rateMin",rateMax:"rateMax",rateStep:"rateStep",minRateDescription:"minRateDescription",maxRateDescription:"maxRateDescription",inputType:"inputType",size:"size",locale:"locale",focusFirstQuestionAutomatic:"focusFirstQuestionAutomatic",completedHtml:"completedHtml",completedBeforeHtml:"completedBeforeHtml",loadingHtml:"loadingHtml",triggers:"triggers",cookieName:"cookieName",sendResultOnPageNext:"sendResultOnPageNext",showNavigationButtons:"showNavigationButtons",showPrevButton:"showPrevButton",showPageTitles:"showPageTitles",showCompletedPage:"showCompletedPage",showPageNumbers:"showPageNumbers",questionErrorLocation:"questionErrorLocation",showProgressBar:"showProgressBar",mode:"mode",goNextPageAutomatic:"goNextPageAutomatic",checkErrorsMode:"checkErrorsMode",clearInvisibleValues:"clearInvisibleValues",startSurveyText:"startSurveyText",pagePrevText:"pagePrevText",pageNextText:"pageNextText",completeText:"completeText",requiredText:"requiredText",questionStartIndex:"questionStartIndex",questionTitleTemplate:"questionTitleTemplate",firstPageIsStarted:"firstPageIsStarted",isSinglePage:"isSinglePage",maxTimeToFinishPage:"maxTimeToFinishPage",showTimerPanel:"showTimerPanel",showTimerPanelMode:"showTimerPanelMode",defaultPanelValue:"defaultPanelValue",defaultRowValue:"defaultRowValue",hasNone:"hasNone",noneText:"noneText",text:"text",multiSelect:"Multi select",showLabel:"Show label",logo:"logo",logoWidth:"logoWidth",logoHeight:"logoHeight",logoFit:"logoFit",focusOnFirstError:"focusOnFirstError",completedHtmlOnCondition:"completedHtmlOnCondition",pages:"pages",calculatedValues:"calculatedValues",navigateToUrl:"navigateToUrl",navigateToUrlOnCondition:"navigateToUrlOnCondition",questionDescriptionLocation:"questionDescriptionLocation",progressBarType:"progressBarType",maxTextLength:"maxTextLength",maxOthersLength:"maxOthersLength",textUpdateMode:"textUpdateMode",autoGrowComment:"autoGrowComment",questionTitlePattern:"questionTitlePattern",questionsOnPageMode:"questionsOnPageMode",showPreviewBeforeComplete:"showPreviewBeforeComplete",widthMode:"widthMode",showNumber:"showNumber",navigationTitle:"navigationTitle",navigationDescription:"navigationDescription",useDisplayValuesInTitle:"useDisplayValuesInTitle",minWidth:"minWidth",maxWidth:"maxWidth",descriptionLocation:"descriptionLocation",hideNumber:"hideNumber",defaultValueExpression:"defaultValueExpression",bindings:"bindings",columnsVisibleIf:"columnsVisibleIf",rowsVisibleIf:"rowsVisibleIf",showHeader:"showHeader",detailPanelMode:"detailPanelMode",rowTitleWidth:"rowTitleWidth",allowAddRows:"allowAddRows",allowRemoveRows:"allowRemoveRows",defaultValueFromLastRow:"defaultValueFromLastRow",hideColumnsIfEmpty:"hideColumnsIfEmpty",emptyRowsText:"emptyRowsText",detailPanelShowOnAdding:"detailPanelShowOnAdding",allowRowsDragAndDrop:"allowRowsDragAndDrop",rowsOrder:"rowsOrder",hideIfRowsEmpty:"hideIfRowsEmpty",maximumFractionDigits:"maximumFractionDigits",minimumFractionDigits:"minimumFractionDigits",choicesFromQuestion:"choicesFromQuestion",choicesFromQuestionMode:"choicesFromQuestionMode",hideIfChoicesEmpty:"hideIfChoicesEmpty",choicesVisibleIf:"choicesVisibleIf",choicesEnableIf:"choicesEnableIf",otherPlaceHolder:"otherPlaceHolder",maxSelectedChoices:"maxSelectedChoices",showClearButton:"showClearButton",contentMode:"contentMode",imageFit:"imageFit",autoComplete:"autoComplete",min:"min",max:"max",minValueExpression:"minValueExpression",maxValueExpression:"maxValueExpression",minErrorText:"minErrorText",maxErrorText:"maxErrorText",step:"step",dataList:"dataList",autoGrow:"autoGrow",multiLine:"multiLine",allowImagesPreview:"allowImagesPreview",acceptedTypes:"acceptedTypes",waitForUpload:"waitForUpload",needConfirmRemoveFile:"needConfirmRemoveFile",labelTrue:"labelTrue",labelFalse:"labelFalse",height:"height",allowClear:"allowClear",penColor:"penColor",backgroundColor:"backgroundColor",dataFormat:"dataFormat",defaultValueFromLastPanel:"defaultValueFromLastPanel",panelRemoveButtonLocation:"panelRemoveButtonLocation",showCaption:"showCaption",iconName:"iconName",iconSize:"iconSize"}}},"./src/localization/finnish.ts":
|
|
365
369
|
/*!*************************************!*\
|
|
366
370
|
!*** ./src/localization/finnish.ts ***!
|
|
367
371
|
\*************************************/
|
|
@@ -409,7 +413,7 @@ License: MIT
|
|
|
409
413
|
/*!*************************************!*\
|
|
410
414
|
!*** ./src/localization/russian.ts ***!
|
|
411
415
|
\*************************************/
|
|
412
|
-
/*! exports provided: ruStrings */function(e,t,i){"use strict";i.r(t),i.d(t,"ruStrings",(function(){return r}));var o=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),r={survey:{edit:"Редактировать",externalHelpLink:"Научиться создавать опросы",externalHelpLinkUrl:"Https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Пожалуйста, перетяните необходимый элемент из панели слева",copy:"Копировать",addToToolbox:"Добавить к инструментам",deletePanel:"Удалить панель",deleteQuestion:"Удалить вопрос",convertTo:"Преобразовать в",drag:"Перетянуть элемент"},qt:{default:"По умолчанию",checkbox:"Множественный выбор",comment:"Комментарий",imagepicker:"Выбор изображения",dropdown:"Выпадающий список",file:"Загрузка файлов",HTML:"HTML",matrix:"Матрица (единичный выбор)",matrixdropdown:"Матрица (множественный выбор)",matrixdynamic:"Матрица (динамические ряды)",multipletext:"Multiple Text",panel:"Панель (для группы вопросов)",paneldynamic:"Панель (динамические панели)",radiogroup:"Единичный выбор",rating:"Рейтинг (шкала)",text:"Текстовый ввод",boolean:"Булиевое значение",expression:"Выражение (только для чтения)",flowPanel:"Панель потока"},ed:{defaultLocale:"По умолчанию ({0})",survey:"Опросник",settings:"Настройки опросника",opjectPropertiesHeader:"Дополнительные",showObjectProperties:"Показать свойства объекта",hideObjectProperties:"Скрыть свойства объекта",editSurvey:"Редактировать опросник",addNewPage:"Добавить новую страницу",moveRight:"Прокрутить вправо",moveLeft:"Прокрутить влево",deletePage:"Удалить страницу",editPage:"Редактировать страницу",edit:"Редактировать",newPageName:"страница",newQuestionName:"вопрос",newPanelName:"панель",newTextItemName:"текст",testSurvey:"Тестировать опросник",testSurveyAgain:"Тестировать еще раз",testSurveyWidth:"Ширина опросника:",logic:"Логика опросника",embedSurvey:"Вставить опросник",translation:"Перевод","property-grid":"Свойства",saveSurvey:"Сохранить опросник",designer:"Обзор конструктора",jsonEditor:"JSON редактор",undo:"Отменить",redo:"Повтор",options:"Параметры",generateValidJSON:"Сформировать валидный JSON",generateReadableJSON:"Сформировать читаемый JSON",toolbox:"Панель инструментов",toolboxGeneralCategory:"Общие",delSelObject:"Удалить выбранный объект",editSelObject:"Редактировать выбранный объект",correctJSON:"Пожалуйста, исправьте JSON.",surveyResults:"Результаты обследования:",surveyResultsTable:"Как таблица",surveyResultsJson:"Как JSON",resultsTitle:"Заголовок вопроса",resultsName:"Название вопроса",resultsValue:"Значение ответа",resultsDisplayValue:"Отображаемое значение",modified:"Модифицирован",saving:"Сохранение",saved:"Сохраненный",saveError:"Ошибка! Содержание редактора не сохранено.",translationAddLanguage:"Выберите дополнительный язык опросника",translationShowAllStrings:"Показывать все строки",translationShowAllPages:"Показывать все страницы",translationNoStrings:"Нет строк для перевода. Пожалуйста, измените фильтр.",translationExportToSCVButton:"Экспорт в CSV",translationImportFromSCVButton:"Импорт из CSV",translationMergeLocaleWithDefault:"Объединить {0} с локалью по умолчанию",translationPlaceHolder:"Перевод...",bold:"Жирный",italic:"Курсив",underline:"Подчеркивание",fpAddQuestion:"Добавить вопрос...",completedHtmlOnConditionItemText:"Показывать, если:",lg:{addNewItem:"Добавить новое правило",page_visibilityName:"Видимость страницы",panel_visibilityName:"Видимость панели",panel_enableName:"Панель включена/выключена",question_visibilityName:"Видимость вопроса",question_enableName:"Вопрос включен/выключен",question_requireName:"Вопрос необязательный",trigger_completeName:"Опрос завершен",trigger_setvalueName:"Установить значение вопроса",trigger_copyvalueName:"Копировать значение вопроса",trigger_skipName:"Перейти к вопросу",trigger_runExpressionName:"Запустить пользовательское выражение",completedHtmlOnConditionName:"Пользовательский текст 'Страницы благодарности'",page_visibilityDescription:"Сделать страницу видимой, когда логическое выражение вернет 'true'. В противном случае сделать ее невидимой.",panel_visibilityDescription:"Сделать панель видимой, когда логическое выражение вернет 'true'. В противном случае сделать ее невидимой.",panel_enableDescription:"Сделать панель и все элементы внутри нее включенной, когда логическое выражение вернет 'true'. В противном случае оставить их отключенными.",question_visibilityDescription:"Сделать вопрос видимой, когда логическое выражение вернет 'true'. В противном случае сделать ее невидимой.",question_enableDescription:"Сделать вопрос включенным, когда логическое выражение вернет 'true'. В противном случае оставить его отключенными.",question_requireDescription:"Вопрос становится обязательным, когда логическое выражение вернет 'true'.",trigger_completeDescription:"Когда логическое выражение вернет 'true', то опрос становится завершенным и конечный пользователь видит 'Страницу благодарности'.",trigger_setvalueDescription:"Когда значения вопросов, которые используются в логическом выражении, изменяются и логическое выражение возвращает значение 'true', тогда на выбранный вопрос устанавливается значение.",trigger_copyvalueDescription:"Когда значения вопросов, которые используются в логическом выражении, изменяются и логическое выражение возвращает значение 'true', тогда значение одного выбранного вопроса копируется в другой выбранный вопрос.",trigger_skipDescription:"Когда логическое выражение вернет 'true', тогда опрос переходит к/фокусируется на выбранном вопросе.",trigger_runExpressionDescription:"Когда логическое выражение возвращает 'true',тогда выполняется пользовательское выражение. Вы можете при желании установить этот результат выражения в выбранный вопрос.",completedHtmlOnConditionDescription:"Если логическое выражение возвращает 'true', то текст по умолчанию для 'Страницы благодарности' изменяется на заданный.",itemExpressionText:"Когда выражение: '{0}' возвращает 'true':",page_visibilityText:"Сделать страницу {0} видимой",panel_visibilityText:"Сделать панель {0} видимой",panel_enableText:"Сделать панель {0} включенной",question_visibilityText:"Сделать вопрос {0} видимым",question_enableText:"Сделать вопрос {0} включенным",question_requireText:"Сделать вопрос {0} обязательным",trigger_completeText:"Опрос становится завершенным",trigger_setvalueText:"Установить в вопрос: {0} значение {1}",trigger_copyvalueText:"Копировать в вопрос: {0} значение из вопроса {1}",trigger_skipText:"Опрос переходит к вопросу {0}",trigger_runExpressionText1:"Выполнить выражение: '{0}'",trigger_runExpressionText2:"и установить его результат в вопрос: {0}",completedHtmlOnConditionText:"Показывать пользовательский текст для 'Страницы благодарности'.",expressionEditorTitle:"Настройка логики выражения",deleteOperation:"Удалить операцию",addNewOperation:"Добавить новую операцию(и)",expressionInvalid:"Логическое выражение пустое или недействительное. Пожалуйста, исправьте его.",noOperationError:"Пожалуйста, добавьте хоть одну операцию.",operationInvalid:"Пожалуйста, исправьте проблемы в вашей операции(ях)."}},pel:{isRequired:"Обязательное?"},pe:{apply:"Применить",ok:"OK",save:"Сохранить",cancel:"Отменить",reset:"Сброс",close:"Закрыть",delete:"Удалить",add:"Добавить",addNew:"Добавить новый",addItem:"Нажмите, чтобы добавить элемент...",addOther:"Другое",addSelectAll:"Выбрать все пункты",addNone:"Ничего",removeAll:"Удалить все",edit:"Редактировать",back:"Вернуться без сохранения",saveAndBack:"Сохранить и вернуться",itemValueEdit:"Отображать, если",editChoices:"Редактировать выбор",move:"Переместить",empty:"<пусто>",notEmpty:"<редактировать значение>",fastEntry:"Быстрый вход",formEntry:"Форма входа",testService:"Тест услуги",itemSelectorEmpty:"Пожалуйста, выберите элемент",conditionSelectQuestion:"Выберите вопрос ...",conditionSelectPage:"Выбрать страницу ...",conditionSelectPanel:"Выберите панель ...",conditionValueQuestionTitle:"Пожалуйста, введите/выберите значение",conditionButtonAdd:"Добавить",conditionButtonReplace:"Заменить",conditionHelp:"Пожалуйста, введите логическое выражение. Должно возвращаться значение 'true', чтобы вопрос/страница оставались видимыми, например:.. {Вопрос1} = 'значение1' или ({Вопрос2} * {Вопрос4}> 20 и {Вопрос3} <5)",expressionHelp:"Пожалуйста, введите выражение. Вы можете использовать фигурные скобки, чтобы получить доступ к значениям вопроса.: '{Вопрос1} + {Вопрос2}', '({цена}*{количество}) * (100 - {скидка}).",aceEditorHelp:"Нажмите Ctrl+Пробел, чтобы получить подсказки",aceEditorRowTitle:"Текущая строка",aceEditorPanelTitle:"Текущая панель",showMore:"Для получения более подробной информации, пожалуйста, перейдите к документации",conditionShowMoreUrl:"Https://surveyjs.io/Documentation/LibraryParameter?id=Question¶meter=visibleIf",assistantTitle:"Доступные вопросы:",cellsEmptyRowsColumns:"Должен быть хотя бы один столбец или строка",propertyIsEmpty:"Пожалуйста, введите значение",propertyNameIsNotUnique:"Пожалуйста, введите уникальное имя",listIsEmpty:"Добавьте новое условие",expressionIsEmpty:"Выражение - пустое",value:"Значение",text:"Текст",rowid:"ID строки",imageLink:"Ссылка на изображение",columnEdit:"Изменить столбец: {0}",itemEdit:"Редактировать элемент: {0}",url:"URL",path:"Путь",valueName:"Название пункта",titleName:"Заголовок пункта",titlePlaceholder:"Введите заголовок",surveyTitlePlaceholder:"Введите заголовок опроса",pageTitlePlaceholder:"Введите заголовок страницы",descriptionPlaceholder:"Введите описание",surveyDescriptionPlaceholder:"Введите описание опроса",pageDescriptionPlaceholder:"Введите описание страницы",hasOther:"Есть пункт 'Другое'",otherText:"Текст пункта 'Другое'",hasNone:"Нет ни одного пункта",noneText:"Текст пункта 'Ничего'",hasSelectAll:"Выбрать все пункты",selectAllText:"Текст пункта 'Выбрать все пункты'",choicesMin:"Минимальное значение для автоматически сгенерированных элементов",choicesMax:"Максимальное значение для автоматически сгенерированных элементов",choicesStep:"Разница между автоматически сгенерироваными элементами",name:"Название",title:"Заголовок",cellType:"Тип ячейки",ColCount:"Количество столбцов",choicesOrder:"Выбрать порядок отбора",visible:"Отображать?",isRequired:"Обязательный?",isAllRowRequired:"Все строки обязательны для заполнения",requiredErrorText:"Это поле обязательное для заполнения",startWithNewLine:"Начинать с новой строки?",rows:"Количество строк",PlaceHolder:"Плейсхолдер",showPreview:"Показать предпросмотр?",storeDataAsText:"Хранить содержимое файла в формате JSON как текст",MaxSize:"Максимальный размер файла в байтах",ImageHeight:"Высота изображения",ImageWidth:"Ширина изображения",rowCount:"Количество строк",columnLayout:"Макет столбцов",addRowLocation:"Добавить расположение кнопки строки",addRowText:"Добавить текст кнопки строки",removeRowText:"Удалить кнопку строки текста",rateMin:"Минимальный рейтинг",rateMax:"Максимальный рейтинг",rateStep:"Шаг рейтинга",minRateDescription:"Описание для минимального рейтинга",maxRateDescription:"Описание для максимального рейтинга",inputType:"Тип ввода",optionsCaption:"Параметры подписи",DefaultValue:"Значение по умолчанию",cellsDefaultRow:"Текст ячеек по умолчанию",surveyEditorTitle:"Настройки опросника",qEditorTitle:"Изменить: {0}",maxLength:"Максимальная длина",buildExpression:"Собрать",editExpression:"Редактировать",and:"И",or:"ИЛИ",remove:"Переместить",addCondition:"добавить условие",showTitle:"Показать/скрыть заголовок",locale:"Язык по умолчанию",simulator:"Выберите устройство",landscapeOrientation:"Альбомная",mode:"Режим (редактирование/просмотр)",clearInvisibleValues:"Очистить невидимые значения",cookieName:"Имя Cookie (отключить повторное прохождение опроса локально)",sendResultOnPageNext:"Показать результаты опроса на странице рядом",storeOthersAsComment:"Хранить занчение 'Другое' в отдельном поле",showPageTitles:"Показывать заголовки страниц",showPageNumbers:"Показывать номера страниц",pagePrevText:"Текст в кнопке 'Предыдущая страница'",pageNextText:"Текст в кнопке 'Следующая страница'",completeText:"Текст в кнопке 'Завершить'",startSurveyText:"Текст в кнопке 'Начать'",showNavigationButtons:"Показывать кнопки навигации (навигация по умолчанию)",showPrevButton:"Показывать кнопки 'Предыдущая страница' (пользователь может вернуться на предыдущую страницу)",firstPageIsStarted:"Первая страница опросника является стартовой страницей.",showCompletedPage:"Показывать страницу с текстом по завершению заполнения (HTML финальной страницы)",goNextPageAutomatic:"Переходить на следующую страницу автоматически при заполнении всех вопросов",showProgressBar:"Показывать прогресс заполнения",questionTitleLocation:"Расположение заголовка вопроса",requiredText:"Символ для обязательного вопроса",questionStartIndex:"Начальный индекс вопроса (1, 2 или 'A', 'а')",showQuestionNumbers:"Показывать номера вопросов",questionTitleTemplate:"Шаблон названия опроса, по умолчанию: {не} {требует} {текста}.",questionErrorLocation:"Размещение ошибки опроса",focusFirstQuestionAutomatic:"Фокусирование на первом вопросе при изменении страницы",questionsOrder:"Сортировка элементов на странице",maxTimeToFinish:"Максимальное время в секундах, чтобы заполнить опросник",maxTimeToFinishPage:"Максимальное время в секундах, чтобы заполнить страницу опросника",showTimerPanel:"Показывать панель таймера",showTimerPanelMode:"Показывать режим панели таймера",RenderMode:"Режим визуализации",allowAddPanel:"Разрешить добавление панели",allowRemovePanel:"Разрешить удаление панели",panelAddText:"Добавление текста на панели",panelRemoveText:"Удаление текста на панели",isSinglePage:"Показывать все элементы на одной странице",HTML:"HTML",expression:"Выражение",minValue:"Минимальное значение",maxValue:"Максимальное значение",mINLENGTH:"Минимальная длина",allowDigits:"Разрешить цифры",minCount:"Минимальное количество",maxCount:"Максимальное количество",regex:"Регулярное выражение",totalText:"Общий текст",totalType:"Общий тип",totalExpression:"Общее выражение",totalDisplayStyle:"Общий стиль отображения",totalCurrency:"Общая валюта",totalFormat:"Общий формат",logoPosition:"Местоположение логотипа",addLogo:"Добавить логотип...",changeLogo:"Изменить логотип...",logoPositions:{none:"Разместить логотип",left:"Слева",right:"Справа",top:"Сверху",bottom:"Снизу"},tabs:{general:"Общие",fileOptions:"Параметры",HTML:"Редактор HTML",columns:"Столбцы",rows:"Строки",choices:"Выбор",items:"Элементы",visibleIf:"Отображать, если",enableIf:"Доступен, если",requiredIf:"Обязателен для заполнения, если",rateValues:"Оценить важность(вес) вопроса",choicesByUrl:"Выбор из Интернета",matrixChoices:"Выбор по умолчанию",multipleTextItems:"Ввод нескольких текстовых полей",validators:"Валидаторы",navigation:"Навигация",question:"Вопрос",completedHtml:"HTML финальной страницы",completedHtmlOnCondition:"HTML финальной страницы при условии",loadingHtml:"Загрузка HTML",timer:"Таймер/Викторина",calculatedValues:"Расчетные значения",triggers:"Триггеры",templateTitle:"Название шаблона",totals:"Итоги",logic:"Логика",layout:"Планировка",data:"Данные",validation:"Проверка",cells:"Ячейки",showOnCompleted:"Показать по завершению",logo:"Логотип в заголовке опросника",others:"Другие"},editProperty:"Редактировать свойство '{0}'",items:"[Элементы: {0}]",enterNewValue:"Пожалуйста, введите значение.",noquestions:"В опроснике нет ни одного вопроса",createtrigger:"Пожалуйста, создайте триггер",triggerOn:"О",triggerMakePagesVisible:"Сделать страницы видимыми:",triggerMakeQuestionsVisible:"Сделать элементы видимыми:",triggerCompleteText:"Завершить опрос, если все получися.",triggerNotSet:"Тригер не установлен",triggerRunIf:"Начать, если",triggerSetToName:"Изменить значение:",triggerFromName:"Скопировать значение из:",triggerRunExpression:"Выполнить это выражение:",triggerSetValue:"в:",triggerGotoName:"Перейти к вопросу:",triggerIsVariable:"Не помещать переменную в результат опросника.",triggerRunExpressionEmpty:"Пожалуйста, введите корректное выражение"},pv:{true:"true",false:"false",inherit:"Наследовать",show:"Показать",hide:"Скрыть",default:"По умолчанию",initial:"Изначальный порядок",random:"Случайный порядок",collapsed:"Прерван",expanded:"Расширен",none:"Нет",asc:"По возрастанию",desc:"По убыванию",indeterminate:"Неопределенный",decimal:"Десятичный",currency:"Валюта",percent:"Проценты",firstExpanded:"Расширен первый",off:"Выключить",onPanel:"На панели",onSurvey:"В опроснике",list:"Список",progressTop:"progressTop",progressBottom:"progressBottom",progressTopBottom:"progressTopBottom",horizontal:"Горизонтально",vertical:"Вертикально",top:"Сверху",bottom:"Снизу",topBottom:"Сверху и снизу",left:"Слева",color:"Цвет",date:"Дата",datetime:"Дата и время","datetime-local":"Местные дата и время",email:"Email",month:"Месяц",number:"Номер",password:"Пароль",range:"Диапазон",tel:"Телефон",text:"Текст",time:"Время",url:"URL",week:"Неделя",hidden:"Скрыт",on:"Включить",onPage:"На странице",edit:"Редактирование",display:"Просмотр",onComplete:"По завершению",onHidden:"По скрытию",all:"Все",page:"Страница",survey:"Опрос",onNextPage:"При переходе на следующую страницу",onValueChanged:"При изменении значения"},op:{empty:"не заполнено",notempty:"заполнено",equal:"равно",notequal:"не равно",contains:"содержит",notcontains:"не содержит",anyof:"любой из",allof:"все из",greater:"больше",less:"меньше",greaterorequal:"больше или равно",lessorequal:"меньше или равно"},ew:{angular:"Используйте версию Angular",jquery:"Используйте версию jQuery",knockout:"Используйте версию Knockout",react:"Используйте версию React",vue:"Используйте версию Vue",bootstrap:"Для библиотеки bootstrap",standard:"Без библиотеки bootstrap",showOnPage:"Показывать опросник на странице",showInWindow:"Показывать опросник в модальном окне",loadFromServer:"Загрузить Json опросника с сервера",titleScript:"Скрипты и стили",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Выберите страницу, чтобы проверить это:",showInvisibleElements:"Показывать скрытые элементы"},validators:{answercountvalidator:"Количество ответов",EmailValidator:"Email",expressionvalidator:"Выражение",numericvalidator:"Число",regexvalidator:"Регулярное выражение",textvalidator:"Текст"},triggers:{completetrigger:"Завершить опрос",setvaluetrigger:"Установить значение",copyvaluetrigger:"Скопировать значение",skiptrigger:"Перейти к вопросу",runexpressiontrigger:"Запустить выражение",visibletrigger:"Изменить видимость (не рекомендуется)"},p:{name:"Название",title:{name:"Название",title:"Оставьте его пустым, если оно такое же, как 'Название'"},navigationButtonsVisibility:"Отображение навигационных кнопок",questionsOrder:"Сортировка элементов на странице",maxTimeToFinish:"Максимальное время для завершения",visible:"Видимый",visibleIf:"Отображать, если",questionTitleLocation:"Расположение заголовка вопроса",description:"Описание",state:"Состояние",isRequired:"Обязателен",requiredIf:"Обязателен если",indent:"Отступ",requiredErrorText:"Это поле обязательное для заполнения",startWithNewLine:"Начинать с новой строки",innerIndent:"Внутренний отступ",page:"Страница",width:"Ширина",commentText:"Комментарий",valueName:"Название значения",enableIf:"Доступен при условии",defaultValue:"Значение по умолчанию",correctAnswer:"Правильный ответ",readOnly:"Только для чтения",validators:"Валидаторы",titleLocation:"Расположение заголовка",hasComment:"Есть комментарий",hasOther:"Есть значение 'Другое'",choices:"Выбор",choicesOrder:"Выбрать порядок выбора",choicesByUrl:"Выбрать из интернета",otherText:"Другой текстовый элемент",otherErrorText:"Текст ошибки поля 'Другое'",storeOthersAsComment:"Хранить значение поля 'Другое', как комментарий",label:"Ярлык",showTitle:"Показывать название",valueTrue:"Правильно",valueFalse:"Неправильно",cols:"Столбцы",rows:"Строки",placeHolder:"Плейсхолдер",optionsCaption:"Подпись параметров",expression:"Выражение",format:"Формат",displayStyle:"Стиль отображения",currency:"Валюта",useGrouping:"Использовать группировку",showPreview:"Показывать превью",allowMultiple:"Выбрать несколько",imageHeight:"Высота изображения",imageWidth:"Ширина изображения",storeDataAsText:"Хранить данные в виде текста",maxSize:"Максимальный размер",html:"HTML",columns:"Столбцы",cells:"Ячейки",isAllRowRequired:"Все строки обязательны для заполнения",horizontalScroll:"Горизонтальный скролл",cellType:"Тип ячейки",columnsLayout:"Макет столбцов",columnColCount:"Количество столбцов",columnMinWidth:"Минимальная ширина столбца",rowCount:"Количество строк",minRowCount:"Минимальное количество строк",maxRowCount:"Максимальное количество строк",keyName:"Название ключа",keyDuplicationError:"Ошибка! Такой ключ уже существует, укажите другое название.",confirmDelete:"Подтвердить удаление",confirmDeleteText:"Текст сообщения при подтверждении удаления",addRowLocation:"Добавить расположение строк",addRowText:"Добавить кнопку строки текста",removeRowText:"Удалить кнопку строки текста",items:"Элементы",itemSize:"Размер элементов",colCount:"Количество столбцов",templateTitle:"Заголовок шаблона",templateDescription:"Описание шаблона",allowAddPanel:"Разрешить добавление панели",allowRemovePanel:"Разрешить удаление панели",panelCount:"Количество панелей",minPanelCount:"Минимальное количество панелей",maxPanelCount:"Максимальное количество панелей",panelsState:"Состояние панелей",panelAddText:"Текст сообщения при добавлении панели",panelRemoveText:"Текст сообщения при удалении панели",panelPrevText:"Текст сообщения предыдущей панели",panelNextText:"Текст сообщения следующей панели",showQuestionNumbers:"Показывать номера вопросов",showRangeInProgress:"Показывать прогресса заполнения",renderMode:"Режим отображения",templateTitleLocation:"Расположение заголовка шаблона",rateValues:"Оценить важность(вес) опроса",rateMin:"Минимальный рейтинг",rateMax:"Максимальный рейтинг",rateStep:"Шаг рейтинга",minRateDescription:"Описание для минимального рейтинга",maxRateDescription:"Описание для максимального рейтинга",inputType:"Тип ввода",size:"Размер",locale:"Локаль",focusFirstQuestionAutomatic:"Фокусирование на первом вопросе при изменении страницы",completedHtml:"HTML финальной страницы",completedHtmlOnCondition:"HTML финальной страницы при условии",loadingHtml:"Загрузка HTML",triggers:"триггеры",cookieName:"имя Cookie",sendResultOnPageNext:"Показать результаты опроса на странице рядом",showNavigationButtons:"Показывать кнопки навигации (навигация по умолчанию)",showPrevButton:"Показывать кнопки 'Предыдущая страница' (пользователь может вернуться на предыдущую страницу)",showPageTitles:"Показывать название страницы",showCompletedPage:"Показывать страницу с текстом по завершению заполнения (HTML финальной страницы)",showPageNumbers:"Показывать номера страниц",questionErrorLocation:"Размещение ошибки опроса",showProgressBar:"Показывать прогресс заполнения",mode:"Режим",goNextPageAutomatic:"Переходить на следующую страницу автоматически при ответе на все вопросы",checkErrorsMode:"Режим проверки ошибок",clearInvisibleValues:"Очистить невидимые значения",startSurveyText:"Текст в кнопке 'Начать'",pagePrevText:"Текст в кнопке 'Предыдущая страница'",pageNextText:"Текст в кнопке 'Следующая страница'",completeText:"Текст в кнопке 'Завершить'",requiredText:"Символ для обязательного вопроса",questionStartIndex:"Начальный индекс в опросе (1, 2 или 'A', 'а')",questionTitleTemplate:"Шаблон названия опроса, по умолчанию: {не} {требует} {текста}.",firstPageIsStarted:"Первая страница опросника является стартовой страницей.",isSinglePage:"Показывать все элементы на одной странице",maxTimeToFinishPage:"Максимальное время (секунды), чтобы заполнить страницу опросника",showTimerPanel:"Показывать панель таймера",showTimerPanelMode:"Показывать режим панели таймера",defaultPanelValue:"Значение панели по умолчанию",defaultRowValue:"Значение строки по умолчанию",hasNone:"Нет ни одного пункта",noneText:"Текст пункта 'Ничего'",text:"Текст"}};o.editorLocalization.locales.ru=r},"./src/localization/simplified-chinese.ts":
|
|
416
|
+
/*! exports provided: ruStrings */function(e,t,i){"use strict";i.r(t),i.d(t,"ruStrings",(function(){return r}));var o=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),r={survey:{edit:"Редактировать",externalHelpLink:"Научиться создавать опросы",externalHelpLinkUrl:"Https://www.youtube.com/channel/UCH2ru9okIcooNZfpIbyq4qQ?view_as=subscriber",dropQuestion:"Пожалуйста, перетяните необходимый элемент из панели слева",copy:"Копировать",addToToolbox:"Добавить к инструментам",deletePanel:"Удалить панель",deleteQuestion:"Удалить вопрос",convertTo:"Преобразовать в",drag:"Перетянуть элемент"},qt:{default:"По умолчанию",checkbox:"Множественный выбор",comment:"Комментарий",imagepicker:"Выбор изображения",dropdown:"Выпадающий список",file:"Загрузка файлов",HTML:"HTML",matrix:"Матрица (единичный выбор)",matrixdropdown:"Матрица (множественный выбор)",matrixdynamic:"Матрица (динамические ряды)",multipletext:"Multiple Text",panel:"Панель (для группы вопросов)",paneldynamic:"Панель (динамические панели)",radiogroup:"Единичный выбор",rating:"Рейтинг (шкала)",text:"Текстовый ввод",boolean:"Булиевое значение",expression:"Выражение (только для чтения)",flowPanel:"Панель потока"},ed:{defaultLocale:"По умолчанию ({0})",survey:"Опросник",settings:"Настройки опросника",opjectPropertiesHeader:"Дополнительные",showObjectProperties:"Показать свойства объекта",hideObjectProperties:"Скрыть свойства объекта",editSurvey:"Редактировать опросник",addNewPage:"Добавить новую страницу",moveRight:"Прокрутить вправо",moveLeft:"Прокрутить влево",deletePage:"Удалить страницу",editPage:"Редактировать страницу",edit:"Редактировать",newPageName:"страница",newQuestionName:"вопрос",newPanelName:"панель",newTextItemName:"текст",testSurvey:"Тестировать опросник",testSurveyAgain:"Тестировать еще раз",testSurveyWidth:"Ширина опросника:",logic:"Логика опросника",embedSurvey:"Вставить опросник",translation:"Перевод","property-grid":"Свойства",saveSurvey:"Сохранить опросник",designer:"Обзор конструктора",jsonEditor:"JSON редактор",undo:"Отменить",redo:"Повтор",options:"Параметры",generateValidJSON:"Сформировать валидный JSON",generateReadableJSON:"Сформировать читаемый JSON",toolbox:"Панель инструментов",toolboxGeneralCategory:"Общие",delSelObject:"Удалить выбранный объект",editSelObject:"Редактировать выбранный объект",correctJSON:"Пожалуйста, исправьте JSON.",surveyResults:"Результаты обследования:",surveyResultsTable:"Как таблица",surveyResultsJson:"Как JSON",resultsTitle:"Заголовок вопроса",resultsName:"Название вопроса",resultsValue:"Значение ответа",resultsDisplayValue:"Отображаемое значение",modified:"Модифицирован",saving:"Сохранение",saved:"Сохраненный",saveError:"Ошибка! Содержание редактора не сохранено.",translationAddLanguage:"Выберите дополнительный язык опросника",translationShowAllStrings:"Показывать все строки",translationShowAllPages:"Показывать все страницы",translationNoStrings:"Нет строк для перевода. Пожалуйста, измените фильтр.",translationExportToSCVButton:"Экспорт в CSV",translationImportFromSCVButton:"Импорт из CSV",translationMergeLocaleWithDefault:"Объединить {0} с локалью по умолчанию",translationPlaceHolder:"Перевод...",bold:"Жирный",italic:"Курсив",underline:"Подчеркивание",fpAddQuestion:"Добавить вопрос...",completedHtmlOnConditionItemText:"Показывать, если:",lg:{addNewItem:"Добавить новое правило",page_visibilityName:"Видимость страницы",panel_visibilityName:"Видимость панели",panel_enableName:"Панель включена/выключена",question_visibilityName:"Видимость вопроса",question_enableName:"Вопрос включен/выключен",question_requireName:"Вопрос обязательный",trigger_completeName:"Опрос завершен",trigger_setvalueName:"Установить значение вопроса",trigger_copyvalueName:"Копировать значение вопроса",trigger_skipName:"Перейти к вопросу",trigger_runExpressionName:"Запустить пользовательское выражение",completedHtmlOnConditionName:"Пользовательский текст 'Страницы благодарности'",page_visibilityDescription:"Сделать страницу видимой, когда логическое выражение вернет 'true'. В противном случае сделать ее невидимой.",panel_visibilityDescription:"Сделать панель видимой, когда логическое выражение вернет 'true'. В противном случае сделать ее невидимой.",panel_enableDescription:"Сделать панель и все элементы внутри нее включенной, когда логическое выражение вернет 'true'. В противном случае оставить их отключенными.",question_visibilityDescription:"Сделать вопрос видимой, когда логическое выражение вернет 'true'. В противном случае сделать ее невидимой.",question_enableDescription:"Сделать вопрос включенным, когда логическое выражение вернет 'true'. В противном случае оставить его отключенными.",question_requireDescription:"Вопрос становится обязательным, когда логическое выражение вернет 'true'.",trigger_completeDescription:"Когда логическое выражение вернет 'true', то опрос становится завершенным и конечный пользователь видит 'Страницу благодарности'.",trigger_setvalueDescription:"Когда значения вопросов, которые используются в логическом выражении, изменяются и логическое выражение возвращает значение 'true', тогда на выбранный вопрос устанавливается значение.",trigger_copyvalueDescription:"Когда значения вопросов, которые используются в логическом выражении, изменяются и логическое выражение возвращает значение 'true', тогда значение одного выбранного вопроса копируется в другой выбранный вопрос.",trigger_skipDescription:"Когда логическое выражение вернет 'true', тогда опрос переходит к/фокусируется на выбранном вопросе.",trigger_runExpressionDescription:"Когда логическое выражение возвращает 'true',тогда выполняется пользовательское выражение. Вы можете при желании установить этот результат выражения в выбранный вопрос.",completedHtmlOnConditionDescription:"Если логическое выражение возвращает 'true', то текст по умолчанию для 'Страницы благодарности' изменяется на заданный.",itemExpressionText:"Когда выражение: '{0}' возвращает 'true':",page_visibilityText:"Сделать страницу {0} видимой",panel_visibilityText:"Сделать панель {0} видимой",panel_enableText:"Сделать панель {0} включенной",question_visibilityText:"Сделать вопрос {0} видимым",question_enableText:"Сделать вопрос {0} включенным",question_requireText:"Сделать вопрос {0} обязательным",trigger_completeText:"Опрос становится завершенным",trigger_setvalueText:"Установить в вопрос: {0} значение {1}",trigger_copyvalueText:"Копировать в вопрос: {0} значение из вопроса {1}",trigger_skipText:"Опрос переходит к вопросу {0}",trigger_runExpressionText1:"Выполнить выражение: '{0}'",trigger_runExpressionText2:"и установить его результат в вопрос: {0}",completedHtmlOnConditionText:"Показывать пользовательский текст для 'Страницы благодарности'.",expressionEditorTitle:"Настройка логики выражения",deleteOperation:"Удалить операцию",addNewOperation:"Добавить новую операцию(и)",expressionInvalid:"Логическое выражение пустое или недействительное. Пожалуйста, исправьте его.",noOperationError:"Пожалуйста, добавьте хоть одну операцию.",operationInvalid:"Пожалуйста, исправьте проблемы в вашей операции(ях)."}},pel:{isRequired:"Обязательное?"},pe:{apply:"Применить",ok:"OK",save:"Сохранить",cancel:"Отменить",reset:"Сброс",close:"Закрыть",delete:"Удалить",add:"Добавить",addNew:"Добавить новый",addItem:"Нажмите, чтобы добавить элемент...",addOther:"Другое",addSelectAll:"Выбрать все пункты",addNone:"Ничего",removeAll:"Удалить все",edit:"Редактировать",back:"Вернуться без сохранения",saveAndBack:"Сохранить и вернуться",itemValueEdit:"Отображать, если",editChoices:"Редактировать выбор",move:"Переместить",empty:"<пусто>",notEmpty:"<редактировать значение>",fastEntry:"Быстрый вход",formEntry:"Форма входа",testService:"Тест услуги",itemSelectorEmpty:"Пожалуйста, выберите элемент",conditionSelectQuestion:"Выберите вопрос ...",conditionSelectPage:"Выбрать страницу ...",conditionSelectPanel:"Выберите панель ...",conditionValueQuestionTitle:"Пожалуйста, введите/выберите значение",conditionButtonAdd:"Добавить",conditionButtonReplace:"Заменить",conditionHelp:"Пожалуйста, введите логическое выражение. Должно возвращаться значение 'true', чтобы вопрос/страница оставались видимыми, например:.. {Вопрос1} = 'значение1' или ({Вопрос2} * {Вопрос4}> 20 и {Вопрос3} <5)",expressionHelp:"Пожалуйста, введите выражение. Вы можете использовать фигурные скобки, чтобы получить доступ к значениям вопроса.: '{Вопрос1} + {Вопрос2}', '({цена}*{количество}) * (100 - {скидка}).",aceEditorHelp:"Нажмите Ctrl+Пробел, чтобы получить подсказки",aceEditorRowTitle:"Текущая строка",aceEditorPanelTitle:"Текущая панель",showMore:"Для получения более подробной информации, пожалуйста, перейдите к документации",conditionShowMoreUrl:"Https://surveyjs.io/Documentation/LibraryParameter?id=Question¶meter=visibleIf",assistantTitle:"Доступные вопросы:",cellsEmptyRowsColumns:"Должен быть хотя бы один столбец или строка",propertyIsEmpty:"Пожалуйста, введите значение",propertyNameIsNotUnique:"Пожалуйста, введите уникальное имя",listIsEmpty:"Добавьте новое условие",expressionIsEmpty:"Выражение - пустое",value:"Значение",text:"Текст",rowid:"ID строки",imageLink:"Ссылка на изображение",columnEdit:"Изменить столбец: {0}",itemEdit:"Редактировать элемент: {0}",url:"URL",path:"Путь",valueName:"Название пункта",titleName:"Заголовок пункта",titlePlaceholder:"Введите заголовок",surveyTitlePlaceholder:"Введите заголовок опроса",pageTitlePlaceholder:"Введите заголовок страницы",descriptionPlaceholder:"Введите описание",surveyDescriptionPlaceholder:"Введите описание опроса",pageDescriptionPlaceholder:"Введите описание страницы",hasOther:"Есть пункт 'Другое'",otherText:"Текст пункта 'Другое'",hasNone:"Нет ни одного пункта",noneText:"Текст пункта 'Ничего'",hasSelectAll:"Выбрать все пункты",selectAllText:"Текст пункта 'Выбрать все пункты'",choicesMin:"Минимальное значение для автоматически сгенерированных элементов",choicesMax:"Максимальное значение для автоматически сгенерированных элементов",choicesStep:"Разница между автоматически сгенерироваными элементами",name:"Название",title:"Заголовок",cellType:"Тип ячейки",ColCount:"Количество столбцов",choicesOrder:"Выбрать порядок отбора",visible:"Отображать?",isRequired:"Обязательный?",isAllRowRequired:"Все строки обязательны для заполнения",requiredErrorText:"Это поле обязательное для заполнения",startWithNewLine:"Начинать с новой строки?",rows:"Количество строк",PlaceHolder:"Плейсхолдер",showPreview:"Показать предпросмотр?",storeDataAsText:"Хранить содержимое файла в формате JSON как текст",MaxSize:"Максимальный размер файла в байтах",ImageHeight:"Высота изображения",ImageWidth:"Ширина изображения",rowCount:"Количество строк",columnLayout:"Макет столбцов",addRowLocation:"Добавить расположение кнопки строки",addRowText:"Добавить текст кнопки строки",removeRowText:"Удалить кнопку строки текста",rateMin:"Минимальный рейтинг",rateMax:"Максимальный рейтинг",rateStep:"Шаг рейтинга",minRateDescription:"Описание для минимального рейтинга",maxRateDescription:"Описание для максимального рейтинга",inputType:"Тип ввода",optionsCaption:"Параметры подписи",DefaultValue:"Значение по умолчанию",cellsDefaultRow:"Текст ячеек по умолчанию",surveyEditorTitle:"Настройки опросника",qEditorTitle:"Изменить: {0}",maxLength:"Максимальная длина",buildExpression:"Собрать",editExpression:"Редактировать",and:"И",or:"ИЛИ",remove:"Переместить",addCondition:"добавить условие",showTitle:"Показать/скрыть заголовок",locale:"Язык по умолчанию",simulator:"Выберите устройство",landscapeOrientation:"Альбомная",mode:"Режим (редактирование/просмотр)",clearInvisibleValues:"Очистить невидимые значения",cookieName:"Имя Cookie (отключить повторное прохождение опроса локально)",sendResultOnPageNext:"Показать результаты опроса на странице рядом",storeOthersAsComment:"Хранить занчение 'Другое' в отдельном поле",showPageTitles:"Показывать заголовки страниц",showPageNumbers:"Показывать номера страниц",pagePrevText:"Текст в кнопке 'Предыдущая страница'",pageNextText:"Текст в кнопке 'Следующая страница'",completeText:"Текст в кнопке 'Завершить'",startSurveyText:"Текст в кнопке 'Начать'",showNavigationButtons:"Показывать кнопки навигации (навигация по умолчанию)",showPrevButton:"Показывать кнопки 'Предыдущая страница' (пользователь может вернуться на предыдущую страницу)",firstPageIsStarted:"Первая страница опросника является стартовой страницей.",showCompletedPage:"Показывать страницу с текстом по завершению заполнения (HTML финальной страницы)",goNextPageAutomatic:"Переходить на следующую страницу автоматически при заполнении всех вопросов",showProgressBar:"Показывать прогресс заполнения",questionTitleLocation:"Расположение заголовка вопроса",requiredText:"Символ для обязательного вопроса",questionStartIndex:"Начальный индекс вопроса (1, 2 или 'A', 'а')",showQuestionNumbers:"Показывать номера вопросов",questionTitleTemplate:"Шаблон названия опроса, по умолчанию: {не} {требует} {текста}.",questionErrorLocation:"Размещение ошибки опроса",focusFirstQuestionAutomatic:"Фокусирование на первом вопросе при изменении страницы",questionsOrder:"Сортировка элементов на странице",maxTimeToFinish:"Максимальное время в секундах, чтобы заполнить опросник",maxTimeToFinishPage:"Максимальное время в секундах, чтобы заполнить страницу опросника",showTimerPanel:"Показывать панель таймера",showTimerPanelMode:"Показывать режим панели таймера",RenderMode:"Режим визуализации",allowAddPanel:"Разрешить добавление панели",allowRemovePanel:"Разрешить удаление панели",panelAddText:"Добавление текста на панели",panelRemoveText:"Удаление текста на панели",isSinglePage:"Показывать все элементы на одной странице",HTML:"HTML",expression:"Выражение",minValue:"Минимальное значение",maxValue:"Максимальное значение",mINLENGTH:"Минимальная длина",allowDigits:"Разрешить цифры",minCount:"Минимальное количество",maxCount:"Максимальное количество",regex:"Регулярное выражение",totalText:"Общий текст",totalType:"Общий тип",totalExpression:"Общее выражение",totalDisplayStyle:"Общий стиль отображения",totalCurrency:"Общая валюта",totalFormat:"Общий формат",logoPosition:"Местоположение логотипа",addLogo:"Добавить логотип...",changeLogo:"Изменить логотип...",logoPositions:{none:"Разместить логотип",left:"Слева",right:"Справа",top:"Сверху",bottom:"Снизу"},tabs:{general:"Общие",fileOptions:"Параметры",HTML:"Редактор HTML",columns:"Столбцы",rows:"Строки",choices:"Выбор",items:"Элементы",visibleIf:"Отображать, если",enableIf:"Доступен, если",requiredIf:"Обязателен для заполнения, если",rateValues:"Оценить важность(вес) вопроса",choicesByUrl:"Выбор из Интернета",matrixChoices:"Выбор по умолчанию",multipleTextItems:"Ввод нескольких текстовых полей",validators:"Валидаторы",navigation:"Навигация",question:"Вопрос",completedHtml:"HTML финальной страницы",completedHtmlOnCondition:"HTML финальной страницы при условии",loadingHtml:"Загрузка HTML",timer:"Таймер/Викторина",calculatedValues:"Расчетные значения",triggers:"Триггеры",templateTitle:"Название шаблона",totals:"Итоги",logic:"Логика",layout:"Планировка",data:"Данные",validation:"Проверка",cells:"Ячейки",showOnCompleted:"Показать по завершению",logo:"Логотип в заголовке опросника",others:"Другие"},editProperty:"Редактировать свойство '{0}'",items:"[Элементы: {0}]",enterNewValue:"Пожалуйста, введите значение.",noquestions:"В опроснике нет ни одного вопроса",createtrigger:"Пожалуйста, создайте триггер",triggerOn:"О",triggerMakePagesVisible:"Сделать страницы видимыми:",triggerMakeQuestionsVisible:"Сделать элементы видимыми:",triggerCompleteText:"Завершить опрос, если все получися.",triggerNotSet:"Тригер не установлен",triggerRunIf:"Начать, если",triggerSetToName:"Изменить значение:",triggerFromName:"Скопировать значение из:",triggerRunExpression:"Выполнить это выражение:",triggerSetValue:"в:",triggerGotoName:"Перейти к вопросу:",triggerIsVariable:"Не помещать переменную в результат опросника.",triggerRunExpressionEmpty:"Пожалуйста, введите корректное выражение"},pv:{true:"true",false:"false",inherit:"Наследовать",show:"Показать",hide:"Скрыть",default:"По умолчанию",initial:"Изначальный порядок",random:"Случайный порядок",collapsed:"Прерван",expanded:"Расширен",none:"Нет",asc:"По возрастанию",desc:"По убыванию",indeterminate:"Неопределенный",decimal:"Десятичный",currency:"Валюта",percent:"Проценты",firstExpanded:"Расширен первый",off:"Выключить",onPanel:"На панели",onSurvey:"В опроснике",list:"Список",progressTop:"progressTop",progressBottom:"progressBottom",progressTopBottom:"progressTopBottom",horizontal:"Горизонтально",vertical:"Вертикально",top:"Сверху",bottom:"Снизу",topBottom:"Сверху и снизу",left:"Слева",color:"Цвет",date:"Дата",datetime:"Дата и время","datetime-local":"Местные дата и время",email:"Email",month:"Месяц",number:"Номер",password:"Пароль",range:"Диапазон",tel:"Телефон",text:"Текст",time:"Время",url:"URL",week:"Неделя",hidden:"Скрыт",on:"Включить",onPage:"На странице",edit:"Редактирование",display:"Просмотр",onComplete:"По завершению",onHidden:"По скрытию",all:"Все",page:"Страница",survey:"Опрос",onNextPage:"При переходе на следующую страницу",onValueChanged:"При изменении значения"},op:{empty:"не заполнено",notempty:"заполнено",equal:"равно",notequal:"не равно",contains:"содержит",notcontains:"не содержит",anyof:"любой из",allof:"все из",greater:"больше",less:"меньше",greaterorequal:"больше или равно",lessorequal:"меньше или равно"},ew:{angular:"Используйте версию Angular",jquery:"Используйте версию jQuery",knockout:"Используйте версию Knockout",react:"Используйте версию React",vue:"Используйте версию Vue",bootstrap:"Для библиотеки bootstrap",standard:"Без библиотеки bootstrap",showOnPage:"Показывать опросник на странице",showInWindow:"Показывать опросник в модальном окне",loadFromServer:"Загрузить Json опросника с сервера",titleScript:"Скрипты и стили",titleHtml:"HTML",titleJavaScript:"JavaScript"},ts:{selectPage:"Выберите страницу, чтобы проверить это:",showInvisibleElements:"Показывать скрытые элементы"},validators:{answercountvalidator:"Количество ответов",EmailValidator:"Email",expressionvalidator:"Выражение",numericvalidator:"Число",regexvalidator:"Регулярное выражение",textvalidator:"Текст"},triggers:{completetrigger:"Завершить опрос",setvaluetrigger:"Установить значение",copyvaluetrigger:"Скопировать значение",skiptrigger:"Перейти к вопросу",runexpressiontrigger:"Запустить выражение",visibletrigger:"Изменить видимость (не рекомендуется)"},p:{name:"Название",title:{name:"Название",title:"Оставьте его пустым, если оно такое же, как 'Название'"},navigationButtonsVisibility:"Отображение навигационных кнопок",questionsOrder:"Сортировка элементов на странице",maxTimeToFinish:"Максимальное время для завершения",visible:"Видимый",visibleIf:"Отображать, если",questionTitleLocation:"Расположение заголовка вопроса",description:"Описание",state:"Состояние",isRequired:"Обязателен",requiredIf:"Обязателен если",indent:"Отступ",requiredErrorText:"Это поле обязательное для заполнения",startWithNewLine:"Начинать с новой строки",innerIndent:"Внутренний отступ",page:"Страница",width:"Ширина",commentText:"Комментарий",valueName:"Название значения",enableIf:"Доступен при условии",defaultValue:"Значение по умолчанию",correctAnswer:"Правильный ответ",readOnly:"Только для чтения",validators:"Валидаторы",titleLocation:"Расположение заголовка",hasComment:"Есть комментарий",hasOther:"Есть значение 'Другое'",choices:"Выбор",choicesOrder:"Выбрать порядок выбора",choicesByUrl:"Выбрать из интернета",otherText:"Другой текстовый элемент",otherErrorText:"Текст ошибки поля 'Другое'",storeOthersAsComment:"Хранить значение поля 'Другое', как комментарий",label:"Ярлык",showTitle:"Показывать название",valueTrue:"Правильно",valueFalse:"Неправильно",cols:"Столбцы",rows:"Строки",placeHolder:"Плейсхолдер",optionsCaption:"Подпись параметров",expression:"Выражение",format:"Формат",displayStyle:"Стиль отображения",currency:"Валюта",useGrouping:"Использовать группировку",showPreview:"Показывать превью",allowMultiple:"Выбрать несколько",imageHeight:"Высота изображения",imageWidth:"Ширина изображения",storeDataAsText:"Хранить данные в виде текста",maxSize:"Максимальный размер",html:"HTML",columns:"Столбцы",cells:"Ячейки",isAllRowRequired:"Все строки обязательны для заполнения",horizontalScroll:"Горизонтальный скролл",cellType:"Тип ячейки",columnsLayout:"Макет столбцов",columnColCount:"Количество столбцов",columnMinWidth:"Минимальная ширина столбца",rowCount:"Количество строк",minRowCount:"Минимальное количество строк",maxRowCount:"Максимальное количество строк",keyName:"Название ключа",keyDuplicationError:"Ошибка! Такой ключ уже существует, укажите другое название.",confirmDelete:"Подтвердить удаление",confirmDeleteText:"Текст сообщения при подтверждении удаления",addRowLocation:"Добавить расположение строк",addRowText:"Добавить кнопку строки текста",removeRowText:"Удалить кнопку строки текста",items:"Элементы",itemSize:"Размер элементов",colCount:"Количество столбцов",templateTitle:"Заголовок шаблона",templateDescription:"Описание шаблона",allowAddPanel:"Разрешить добавление панели",allowRemovePanel:"Разрешить удаление панели",panelCount:"Количество панелей",minPanelCount:"Минимальное количество панелей",maxPanelCount:"Максимальное количество панелей",panelsState:"Состояние панелей",panelAddText:"Текст сообщения при добавлении панели",panelRemoveText:"Текст сообщения при удалении панели",panelPrevText:"Текст сообщения предыдущей панели",panelNextText:"Текст сообщения следующей панели",showQuestionNumbers:"Показывать номера вопросов",showRangeInProgress:"Показывать прогресса заполнения",renderMode:"Режим отображения",templateTitleLocation:"Расположение заголовка шаблона",rateValues:"Оценить важность(вес) опроса",rateMin:"Минимальный рейтинг",rateMax:"Максимальный рейтинг",rateStep:"Шаг рейтинга",minRateDescription:"Описание для минимального рейтинга",maxRateDescription:"Описание для максимального рейтинга",inputType:"Тип ввода",size:"Размер",locale:"Локаль",focusFirstQuestionAutomatic:"Фокусирование на первом вопросе при изменении страницы",completedHtml:"HTML финальной страницы",completedHtmlOnCondition:"HTML финальной страницы при условии",loadingHtml:"Загрузка HTML",triggers:"триггеры",cookieName:"имя Cookie",sendResultOnPageNext:"Показать результаты опроса на странице рядом",showNavigationButtons:"Показывать кнопки навигации (навигация по умолчанию)",showPrevButton:"Показывать кнопки 'Предыдущая страница' (пользователь может вернуться на предыдущую страницу)",showPageTitles:"Показывать название страницы",showCompletedPage:"Показывать страницу с текстом по завершению заполнения (HTML финальной страницы)",showPageNumbers:"Показывать номера страниц",questionErrorLocation:"Размещение ошибки опроса",showProgressBar:"Показывать прогресс заполнения",mode:"Режим",goNextPageAutomatic:"Переходить на следующую страницу автоматически при ответе на все вопросы",checkErrorsMode:"Режим проверки ошибок",clearInvisibleValues:"Очистить невидимые значения",startSurveyText:"Текст в кнопке 'Начать'",pagePrevText:"Текст в кнопке 'Предыдущая страница'",pageNextText:"Текст в кнопке 'Следующая страница'",completeText:"Текст в кнопке 'Завершить'",requiredText:"Символ для обязательного вопроса",questionStartIndex:"Начальный индекс в опросе (1, 2 или 'A', 'а')",questionTitleTemplate:"Шаблон названия опроса, по умолчанию: {не} {требует} {текста}.",firstPageIsStarted:"Первая страница опросника является стартовой страницей.",isSinglePage:"Показывать все элементы на одной странице",maxTimeToFinishPage:"Максимальное время (секунды), чтобы заполнить страницу опросника",showTimerPanel:"Показывать панель таймера",showTimerPanelMode:"Показывать режим панели таймера",defaultPanelValue:"Значение панели по умолчанию",defaultRowValue:"Значение строки по умолчанию",hasNone:"Нет ни одного пункта",noneText:"Текст пункта 'Ничего'",text:"Текст"}};o.editorLocalization.locales.ru=r},"./src/localization/simplified-chinese.ts":
|
|
413
417
|
/*!************************************************!*\
|
|
414
418
|
!*** ./src/localization/simplified-chinese.ts ***!
|
|
415
419
|
\************************************************/
|
|
@@ -457,7 +461,7 @@ License: MIT
|
|
|
457
461
|
/*!**************************************************!*\
|
|
458
462
|
!*** ./src/property-grid-theme/property-grid.ts ***!
|
|
459
463
|
\**************************************************/
|
|
460
|
-
/*! exports provided: propertyGridCss */function(e,t,i){"use strict";i.r(t),i.d(t,"propertyGridCss",(function(){return o}));var o={root:"spg-root-modern",container:"spg-container-modern",header:"spg-title spg-container-modern__title",body:"spg-body",bodyEmpty:"spg-body spg-body--empty",footer:"spg-footer spg-body__footer spg-clearfix",title:"",description:"",logo:"spg-logo",logoImage:"spg-logo__image",headerText:"spg-header__text",navigationButton:"",completedPage:"spg-completedpage",navigation:{complete:"spg-btn spg-footer__complete-btn",prev:"spg-btn spg-footer__prev-btn",next:"spg-btn spg-footer__next-btn",start:"spg-btn spg-footer__start-btn",preview:"spg-btn spg-footer__preview-btn",edit:"spg-btn spg-footer__edit-btn"},panel:{title:"spg-title spg-panel__title",titleExpandable:"spg-panel__title--expandable",titleOnExpand:"spg-panel__title--expanded",titleOnError:"spg-panel__title--error",description:"spg-description spg-panel__description",container:"spg-panel spg-row__panel",content:"spg-panel__content",icon:"spg-panel__icon",iconExpanded:"spg-panel__icon--expanded",footer:"spg-panel__footer",requiredText:"spg-panel__required-text"},paneldynamic:{root:"spg-paneldynamic",navigation:"spg-paneldynamic__navigation",title:"spg-title spg-question__title",button:"spg-btn",buttonRemove:"spg-paneldynamic__remove-btn",buttonAdd:"spg-paneldynamic__add-btn",progressTop:"spg-paneldynamic__progress spg-paneldynamic__progress--top",progressBottom:"spg-paneldynamic__progress spg-paneldynamic__progress--bottom",buttonPrev:"spg-paneldynamic__prev-btn",buttonNext:"spg-paneldynamic__next-btn",progressContainer:"spg-paneldynamic__progress-container",progress:"spg-progress",progressBar:"spg-progress__bar",progressText:"spg-paneldynamic__progress-text",separator:"spg-paneldynamic__separator"},progress:"spg-progress spg-body__progress",progressBar:"spg-progress__bar",progressText:"spg-progress__text",progressTextInBar:"spg-hidden",page:{root:"spg-page spg-body__page",title:"spg-title spg-page__title",description:"spg-description spg-page__description"},pageTitle:"spg-title spg-page__title",pageDescription:"spg-description spg-page__description",row:"spg-row spg-clearfix",rowMultiple:"spg-row--multiple",question:{mainRoot:"spg-question spg-row__question",flowRoot:"spg-question spg-row__question spg-row__question--flow",asCell:"spg-table__cell",header:"spg-question__header",headerLeft:"spg-question__header--location--left",headerTop:"spg-question__header--location--top",headerBottom:"spg-question__header--location--bottom",content:"spg-question__content",contentLeft:"spg-question__content--left",titleLeftRoot:"spg-question--location--left",titleOnAnswer:"spg-question__title--answer",titleOnError:"spg-question__title--error",title:"spg-title spg-question__title",requiredText:"spg-question__required-text",number:"spg-question__num",description:"spg-description spg-question__description",descriptionUnderInput:"spg-description spg-question__description",comment:"spg-comment",required:"spg-question--required",titleRequired:"spg-question__title--required",indent:
|
|
464
|
+
/*! exports provided: propertyGridCss */function(e,t,i){"use strict";i.r(t),i.d(t,"propertyGridCss",(function(){return o}));var o={root:"spg-root-modern",container:"spg-container-modern",header:"spg-title spg-container-modern__title",body:"spg-body",bodyEmpty:"spg-body spg-body--empty",footer:"spg-footer spg-body__footer spg-clearfix",title:"",description:"",logo:"spg-logo",logoImage:"spg-logo__image",headerText:"spg-header__text",navigationButton:"",completedPage:"spg-completedpage",navigation:{complete:"spg-btn spg-footer__complete-btn",prev:"spg-btn spg-footer__prev-btn",next:"spg-btn spg-footer__next-btn",start:"spg-btn spg-footer__start-btn",preview:"spg-btn spg-footer__preview-btn",edit:"spg-btn spg-footer__edit-btn"},panel:{title:"spg-title spg-panel__title",titleExpandable:"spg-panel__title--expandable",titleOnExpand:"spg-panel__title--expanded",titleOnError:"spg-panel__title--error",description:"spg-description spg-panel__description",container:"spg-panel spg-row__panel",content:"spg-panel__content",icon:"spg-panel__icon",iconExpanded:"spg-panel__icon--expanded",footer:"spg-panel__footer",requiredText:"spg-panel__required-text"},paneldynamic:{root:"spg-paneldynamic",navigation:"spg-paneldynamic__navigation",title:"spg-title spg-question__title",button:"spg-btn",buttonRemove:"spg-paneldynamic__remove-btn",buttonAdd:"spg-paneldynamic__add-btn",progressTop:"spg-paneldynamic__progress spg-paneldynamic__progress--top",progressBottom:"spg-paneldynamic__progress spg-paneldynamic__progress--bottom",buttonPrev:"spg-paneldynamic__prev-btn",buttonNext:"spg-paneldynamic__next-btn",progressContainer:"spg-paneldynamic__progress-container",progress:"spg-progress",progressBar:"spg-progress__bar",progressText:"spg-paneldynamic__progress-text",separator:"spg-paneldynamic__separator"},progress:"spg-progress spg-body__progress",progressBar:"spg-progress__bar",progressText:"spg-progress__text",progressTextInBar:"spg-hidden",page:{root:"spg-page spg-body__page",title:"spg-title spg-page__title",description:"spg-description spg-page__description"},pageTitle:"spg-title spg-page__title",pageDescription:"spg-description spg-page__description",row:"spg-row spg-clearfix",rowMultiple:"spg-row--multiple",question:{mainRoot:"spg-question spg-row__question",flowRoot:"spg-question spg-row__question spg-row__question--flow",asCell:"spg-table__cell",header:"spg-question__header",headerLeft:"spg-question__header--location--left",headerTop:"spg-question__header--location--top",headerBottom:"spg-question__header--location--bottom",content:"spg-question__content",contentLeft:"spg-question__content--left",titleLeftRoot:"spg-question--location--left",titleOnAnswer:"spg-question__title--answer",titleOnError:"spg-question__title--error",title:"spg-title spg-question__title",requiredText:"spg-question__required-text",number:"spg-question__num",description:"spg-description spg-question__description",descriptionUnderInput:"spg-description spg-question__description",comment:"spg-comment",required:"spg-question--required",titleRequired:"spg-question__title--required",indent:0,footer:"spg-question__footer",formGroup:"spg-question__form-group",hasError:"",disabled:"spg-question--disabled"},image:{root:"spg-image",image:"sv_image_image"},error:{root:"spg-question__erbox",icon:"",item:"",locationTop:"spg-question__erbox--location--top",locationBottom:"spg-question__erbox--location--bottom"},checkbox:{root:"spg-selectbase",item:"spg-item spg-checkbox spg-selectbase__item",itemSelectAll:"spg-checkbox--selectall",itemNone:"spg-checkbox--none",itemDisabled:"spg-item--disabled spg-checkbox--disabled",itemChecked:"spg-checkbox--checked",itemHover:"spg-checkbox--allowhover",itemInline:"spg-selectbase__item--inline",label:"spg-checkbox",itemSvgIconId:"#icon-v2check",labelChecked:"",itemControl:"spg-checkbox__control",itemDecorator:"spg-checkbox__hidden",controlLabel:"spg-checkbox__caption",materialDecorator:"spg-checkbox__rectangle",other:"spg-comment spg-question__other",column:"spg-selectbase__column"},radiogroup:{root:"spg-selectbase",item:"spg-item spg-radio spg-selectbase__item",itemInline:"spg-selectbase__item--inline",label:"spg-selectbase__label",labelChecked:"",itemDisabled:"spg-item--disabled spg-radio--disabled",itemChecked:"spg-radio--checked",itemHover:"spg-radio--allowhover",itemControl:"spg-visuallyhidden spg-item__control",itemDecorator:"spg-item__svg spg-radio__svg",controlLabel:"spg-item__control-label",materialDecorator:"spg-item__decorator spg-radio__decorator",other:"spg-comment spg-question__other",clearButton:"spg-btn spg-selectbase__clear-btn",column:"spg-selectbase__column"},boolean:{mainRoot:"spg-question spg-row__question spg-question--boolean",root:"",item:"spg-checkbox",control:"spg-checkbox__control",itemChecked:"spg-checkbox--checked",itemIndeterminate:"spg-checkbox--indeterminate",itemDisabled:"spg-checkbox--disabled",svgIconId:"#icon-v2check",label:"spg-checkbox__caption",disabledLabel:"spg-checkbox__label--disabled",itemDecorator:"spg-checkbox__hidden",materialDecorator:"spg-checkbox__rectangle"},text:{root:"spg-input spg-text",small:"spg-row__question--small",onError:"spg-input--error"},multipletext:{root:"spg-multipletext",item:"spg-multipletext__item",itemTitle:"spg-multipletext__item-title",row:"spg-multipletext__row",cell:"spg-multipletext__cell"},dropdown:{root:"",small:"spg-row__question--small",control:"spg-input spg-dropdown",selectWrapper:"",other:"spg-comment spg-question__other",onError:"spg-input--error"},imagepicker:{root:"spg-imagepicker",item:"spg-imagepicker__item",itemInline:"spg-imagepicker__item--inline",itemChecked:"spg-imagepicker__item--checked",itemDisabled:"spg-imagepicker__item--disabled",itemHover:"spg-imagepicker__item--allowhover",label:"spg-imagepicker__label",itemControl:"spg-imagepicker__control",image:"spg-imagepicker__image",itemText:"spg-imagepicker__text",clearButton:"spg-btn",other:"spg-comment spg-question__other"},matrix:{tableWrapper:"spg-matrix",root:"spg-table",rowError:"spg-matrix__row--error",cell:"spg-table__cell spg-matrix__cell",headerCell:"spg-table__cell spg-table__cell--header",label:"spg-item spg-radio spg-matrix__label",itemValue:"spg-visuallyhidden spg-item__control spg-radio__control",itemChecked:"spg-radio--checked",itemDisabled:"spg-item--disabled spg-radio--disabled",itemHover:"spg-radio--allowhover",materialDecorator:"spg-item__decorator spg-radio__decorator",itemDecorator:"spg-item__svg spg-radio__svg",cellText:"spg-matrix__text",cellTextSelected:"spg-matrix__text--checked",cellTextDisabled:"spg-matrix__text--disabled"},matrixdropdown:{root:"spg-table",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header"},matrixdynamic:{root:"spg-table spg-matrixdynamic",cell:"spg-table__cell",headerCell:"spg-table__cell spg-table__cell--header",button:"spg-btn",detailRow:"spg-table__row spg-table__row--detail",detailButton:"spg-table__cell--detail-button",detailButtonExpanded:"spg-table__cell--detail-button--expanded",detailIcon:"spg-detail-panel__icon",detailIconExpanded:"spg-detail-panel__icon--expanded",detailPanelCell:"spg-table__cell--detail-panel",actionsCell:"spg-table__cell spg-table__cell--actions",buttonAdd:"spg-matrixdynamic__add-btn spg-action-button spg-action-button--large",buttonRemove:"spg-matrixdynamic__remove-btn",iconAdd:"",iconRemove:"",iconDrag:"spg-matrixdynamic__drag-element",dragDropGhostPositionTop:"spg-matrixdynamic__drag-drop-ghost-position-top",dragDropGhostPositionBottom:"spg-matrixdynamic__drag-drop-ghost-position-bottom",emptyRowsSection:"spg-matrixdynamic__placeholder",emptyRowsText:"spg-matrixdynamic__placeholder-text"},rating:{root:"spg-rating",item:"spg-rating__item",selected:"spg-rating__item--selected",minText:"spg-rating__min-text",itemText:"spg-rating__item-text",maxText:"spg-rating__max-text",disabled:"spg-rating--disabled"},comment:{root:"spg-comment",small:"spg-row__question--small"},expression:"",file:{root:"spg-file",other:"spg-comment spg-question__other",placeholderInput:"spg-visuallyhidden",preview:"spg-file__preview",fileSign:"spg-hidden",fileSignBottom:"spg-file__sign",fileDecorator:"spg-file__decorator",fileInput:"spg-visuallyhidden",noFileChosen:"spg-description spg-file__no-file-chosen",chooseFile:"spg-btn spg-file__choose-btn",disabled:"spg-file__choose-btn--disabled",removeButton:"spg-hidden",removeButtonBottom:"spg-btn spg-file__clean-btn",removeFile:"spg-hidden",removeFileSvg:"spg-file__remove-svg",wrapper:"spg-file__wrapper"},signaturepad:{root:"spg-signaturepad sjs_sp_container",small:"spg-row__question--small",controls:"sjs_sp_controls",clearButton:"sjs_sp_clear"},saveData:{root:"",saving:"",error:"",success:"",saveAgainButton:""},window:{root:"sv_window",body:"sv_window_content",header:{root:"sv_window_title",title:"",button:"",buttonExpanded:"",buttonCollapsed:""}}}},"./src/property-grid/cells-survey.ts":
|
|
461
465
|
/*!*******************************************!*\
|
|
462
466
|
!*** ./src/property-grid/cells-survey.ts ***!
|
|
463
467
|
\*******************************************/
|
|
@@ -465,7 +469,7 @@ License: MIT
|
|
|
465
469
|
/*!***********************************************!*\
|
|
466
470
|
!*** ./src/property-grid/condition-survey.ts ***!
|
|
467
471
|
\***********************************************/
|
|
468
|
-
/*! exports provided: ConditionEditorItem, SurveyConditionEditorItem, ConditionEditorItemsBuilder, ConditionEditor */function(e,t,i){"use strict";i.r(t),i.d(t,"ConditionEditorItem",(function(){return d})),i.d(t,"SurveyConditionEditorItem",(function(){return p})),i.d(t,"ConditionEditorItemsBuilder",(function(){return m})),i.d(t,"ConditionEditor",(function(){return g}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../settings */"./src/settings.ts"),a=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),s=i(/*! ../survey-helper */"./src/survey-helper.ts"),l=i(/*! ./index */"./src/property-grid/index.ts"),u=i(/*! ../utils/utils */"./src/utils/utils.ts"),c=i(/*! ../components/tabs/logic-theme */"./src/components/tabs/logic-theme.ts"),d=function(){this.conjunction="and",this.operator="equal"},p=function(e){function t(t){var i=e.call(this)||this;return i.survey=t,i}return Object(o.__extends)(t,e),t.prototype.getOperatorText=function(){var e=this.operator;return"equal"==e?"=":"notequal"==e?"<>":"greater"==e?">":"less"==e?"<":"greaterorequal"==e?">=":"lessorequal"==e?"<=":e},t.prototype.getValueText=function(){var e=this.value;if(!e)return e;if(!Array.isArray(e))return this.valToText(e);for(var t="[",i=0;i<e.length;i++)t+=this.valToText(e[i]),i<e.length-1&&(t+=", ");return t+="]"},Object.defineProperty(t.prototype,"isValueRequired",{get:function(){return"empty"!==this.operator&&"notempty"!==this.operator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!(!this.questionName||this.isValueRequired&&r.Helpers.isValueEmpty(this.value))},enumerable:!1,configurable:!0}),t.prototype.toExpression=function(){var e="{"+this.getQuestionValueByName()+"} "+this.getOperatorText();return this.isValueRequired&&(e+=" "+this.getValueText()),e},t.prototype.getQuestionValueByName=function(){var e=this.survey.getQuestionByName(this.questionName);return e&&e.name!=e.getValueName()&&this.questionName!=e.getValueName()?this.questionName.replace(e.name,e.getValueName()):this.questionName},t.prototype.valToText=function(e){return"true"==e||"false"==e||this.isNumeric(e)?e:"["==e[0]?e.replace(/(?!^)(['])(?!$)/g,"\\$1"):(this.isQuote(e[0])||(e="'"+e),this.isQuote(e[e.length-1])||(e+="'"),e.replace(/(?!^)(['"])(?!$)/g,"\\$1"))},t.prototype.isNumeric=function(e){return!("string"==typeof e&&e.length>1&&"0"===e[0]&&"x"!==e[1]||isNaN(e))},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t}(d),m=function(){function e(e){void 0===e&&(e=null),this.hasValue=e}return e.prototype.build=function(e){return e&&(t=(new r.ConditionsParser).parseExpression(e))?this.buildEditorItems(t):[];var t},e.prototype.buildEditorItems=function(e){var t=[];return this.buildEditorItemsCore(e,t,"")||(t=[]),t},e.prototype.buildEditorItemsCore=function(e,t,i){if("unary"==e.getType())return this.buildEditorItemsAddUnaryOperand(e,t);if("binary"!==e.getType())return!1;var o=e;return!(o.isArithmetic&&!o.isConjunction)&&(o.isConjunction?this.buildEditorItemsAddConjunction(o,t,i):this.buildEditorItemsAddBinaryOperand(o,t))},e.prototype.buildEditorItemsAddConjunction=function(e,t,i){var o=e.conjunction;if("or"==o&&i&&i!=o)return!1;if(!this.buildEditorItemsCore(e.leftOperand,t,o))return!1;var r=t.length;return!!this.buildEditorItemsCore(e.rightOperand,t,o)&&(t[r].conjunction=e.conjunction,!0)},e.prototype.buildEditorItemsAddBinaryOperand=function(e,t){var i=this.getOperandByType(e,"variable"),o=this.getArrayValueFromOperand(e),r=o?null:this.getOperandByType(e,"const");if(!i||!r&&!o&&this.canShowValueByOperator(e.operator))return!1;if(!this.isVariableInSurvey(i.variable))return!1;var n=new d;return n.questionName=i.variable,n.operator=e.leftOperand!==i?this.getOppositeOperator(e.operator):e.operator,o&&(n.value=o),r&&(n.value=r.correctValue),t.push(n),!0},e.prototype.isVariableInSurvey=function(e){return!this.hasValue||this.hasValue(e)},e.prototype.getArrayValueFromOperand=function(e){var t=this.getOperandByType(e,"array");if(!t||!t.values)return null;var i=t.values;if(!Array.isArray(i)||0==i.length)return null;for(var o=[],r=0;r<i.length;r++){var n=i[r];if(n){if("const"!=n.getType())return null;o.push(n.correctValue)}}return 0==o.length?null:o},e.prototype.buildEditorItemsAddUnaryOperand=function(e,t){var i=e.operator;if("empty"!==i&&"notempty"!=i)return!1;var o=e.expression;if(null==o||"variable"!=o.getType())return!1;var r=o.variable;if(!this.isVariableInSurvey(r))return!1;var n=new d;return n.questionName=r,n.operator=i,t.push(n),!0},e.prototype.getOppositeOperator=function(e){return"less"==e?"greater":"greater"==e?"less":"lessorequal"==e?"greaterorequal":"greaterorequal"==e?"lessorequal":e},e.prototype.getOperandByType=function(e,t){return e.rightOperand?e.leftOperand.getType()!==t&&e.rightOperand.getType()!==t||e.leftOperand.getType()==t&&e.rightOperand.getType()==t?null:e.leftOperand.getType()==t?e.leftOperand:e.rightOperand:null},e.prototype.canShowValueByOperator=function(e){return"empty"!=e&&"notempty"!=e},e}();r.FunctionFactory.Instance.register("questionValueVisibleIf",(function(e){return 2===e.length&&!(!e[0]||!e[1])&&"empty"!==e[1]&&"notempty"!==e[1]}));var g=function(e){function t(t,i,o,r){void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r="");var n=e.call(this,o)||this;return n.propertyName=r,n.addConditionQuestionsHash={},n.isModalValue=!0,n.isSettingPanelValues=!1,n.calculatedValueQuestion=null,n.surveyValue=t,n.objectValue=i,n.panelValue=n.editSurvey.getQuestionByName("panel"),n.textEditorValue=n.editSurvey.getQuestionByName("textEditor"),n.options.maxLogicItemsInCondition&&(n.panel.maxPanelCount=n.options.maxLogicItemsInCondition),n.allConditionQuestions=n.createAllConditionQuestions(),n.editSurvey.onValueChanged.add((function(e,t){n.onValueChanged(t)})),n.editSurvey.onDynamicPanelAdded.add((function(e,t){n.onPanelAdded()})),n.editSurvey.onDynamicPanelRemoved.add((function(e,t){0==t.question.panelCount&&t.question.addPanel(),n.panel.panelCount>0&&(n.panel.panels[0].getQuestionByName("questionName").titleLocation="left")})),n.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){n.onPanelValueChanged(t.panel,t.name)})),n.editSurvey.css=c.logicCss,n.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){n.onUpdateQuestionCssClasses(t)})),n.text=n.object&&n.propertyName?n.object[n.propertyName]:"",n}return Object(o.__extends)(t,e),t.canParseExpression=function(e){return!e||!!(new r.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new m).build(e).length>0},Object.defineProperty(t.prototype,"title",{get:function(){return this.panel.title},set:function(e){this.panel.title=e,this.textEditor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.isModalValue},set:function(e){e!==this.isModalValue&&(this.isModalValue=e)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:a.editorLocalization.getString("pe.addCondition"),minPanelCount:1,maxPanelCount:1,startWithNewLine:!1,templateElements:[{name:"conjunction",type:"dropdown",titleLocation:"hidden",showOptionsCaption:!1,visibleIf:"{panelIndex} > 0",choices:[{value:"and",text:a.editorLocalization.getString("pe.and")},{value:"or",text:a.editorLocalization.getString("pe.or")}]},{name:"questionName",type:"dropdown",title:a.editorLocalization.getString("pe.if"),titleLocation:"left",startWithNewLine:!1,isRequired:!0},{name:"operator",type:"dropdown",titleLocation:"hidden",startWithNewLine:!1,showOptionsCaption:!1,isRequired:!0,enableIf:"{panel.questionName} notempty"},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"questionValue",type:"text",visible:!1}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",visible:!1}]}},t.prototype.getSurveyCreationReason=function(){return"condition-builder"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.isModal||t.canBuildExpression(e)?(this.textEditor.value=e,this.showBuilder(e)):(this.panel.panelCount=0,this.showTextEditor(e))},enumerable:!1,configurable:!0}),t.prototype.isModified=function(e){if(this.textEditor.visible)return e!=this.text;var t=this.getEditorItems(),i=e?(new r.ConditionsParser).parseExpression(e):null;if(!i)return!(1==t.length&&!t[0].questionName);if(!this.isReady)return!0;var o=(new r.ConditionsParser).parseExpression(this.text);return!i.isEqual(o)},t.prototype.processText=function(e){this.panel.panelCount=0;var t=(new m).build(e);this.buildPanels(t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.objectValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditor",{get:function(){return this.textEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){if(this.textEditor.visible)return t.canParseExpression(this.textEditor.value);for(var e=0;e<this.panel.panels.length;e++)if(!this.createEditorItemFromPanel(this.panel.panels[e]).isReady)return!1;return!0},enumerable:!1,configurable:!0}),t.prototype.apply=function(){return!!this.isReady&&(this.object&&this.propertyName?(this.object[this.propertyName]=this.text,!0):void 0)},t.prototype.setIsFastEntry=function(e){e?this.showTextEditor(this.text):this.panel.visible||this.showBuilder(this.text)},t.prototype.buildPanels=function(e){this.panel.panelCount=e.length;for(var t=0;t<e.length;t++)this.setItemToPanel(e[t],this.panel.panels[t]);0==this.panel.panelCount&&this.panel.addPanel()},t.prototype.setItemToPanel=function(e,t){this.isSettingPanelValues=!0,t.getQuestionByName("conjunction").value=e.conjunction,t.getQuestionByName("operator").choices=this.getOperators(),t.getQuestionByName("operator").value=e.operator,t.getQuestionByName("questionName").choices=this.allConditionQuestions,t.getQuestionByName("questionName").titleLocation=0==this.panel.panels.indexOf(t)?"left":"hidden",this.getConditionQuestion(e.questionName)&&(t.getQuestionByName("questionName").value=e.questionName),t.getQuestionByName("questionValue")&&(t.getQuestionByName("questionValue").value=e.value);var i=t.getQuestionByName("removeAction").parentQuestion,o=t.getQuestionByName("removeAction");o.linkClickCallback=function(){i&&i.removePanelUI(t)},o.linkValueText="",o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",this.isSettingPanelValues=!1},t.prototype.getText=function(){if(this.textEditor.visible)return this.textEditor.value;for(var e="",t=this.getEditorItems(),i=0;i<t.length;i++){if(!t[i].isReady)return"";e&&(e+=" "+t[i].conjunction+" "),e+=t[i].toExpression()}return e},t.prototype.getEditorItems=function(){for(var e=[],t=0;t<this.panel.panels.length;t++)e.push(this.createEditorItemFromPanel(this.panel.panels[t]));return e},t.prototype.createEditorItemFromPanel=function(e){var t=new p(this.survey);return t.conjunction=e.getQuestionByName("conjunction").value,t.questionName=e.getQuestionByName("questionName").value,t.operator=e.getQuestionByName("operator").value,e.getQuestionByName("questionValue")&&(t.value=e.getQuestionByName("questionValue").value),t},t.prototype.createAllConditionQuestions=function(){if(!this.survey)return[];var e=[],t=this.survey.getAllQuestions();if(t.length>0){for(var i=0;i<t.length;i++)this.object!=t[i]&&t[i].addConditionObjectsByContext(e,this.object);for(this.options.onConditionQuestionsGetListCallback(this.propertyName,this.object,this,e),i=0;i<e.length;i++){e[i].value=e[i].name;var o=e[i].question?e[i].question:e[i];if(!this.options.showTitlesInExpressions){var r=e[i].name,n=o.valueName;n&&0==r.indexOf(n)&&(r=r.replace(n,o.name)),e[i].text=this.options.getObjectDisplayName(o,"condition",r)}this.addConditionQuestionsHash[e[i].name]=o}}return this.addValuesIntoConditionQuestions(this.survey.calculatedValues,e),this.addValuesIntoConditionQuestions(this.survey.getVariableNames(),e),s.SurveyHelper.sortItems(e),e},t.prototype.addValuesIntoConditionQuestions=function(e,t){for(var i=0;i<e.length;i++){var o=e[i].name?e[i].name:e[i];this.addConditionQuestionsHash[o]=this.getCalculatedValueQuestion(),t.push({value:o,text:o,question:this.getCalculatedValueQuestion()})}},t.prototype.getCalculatedValueQuestion=function(){return this.calculatedValueQuestion||(this.calculatedValueQuestion=r.Serializer.createClass("text"),this.calculatedValueQuestion.name="question"),this.calculatedValueQuestion},t.prototype.getOperators=function(){var e=[],t=n.settings.operators;for(var i in t)e.push(new r.ItemValue(i,a.editorLocalization.getString("op."+i)));return e},t.prototype.rebuildQuestionValue=function(e){e.getQuestionByName("questionValue")&&e.getQuestionByName("questionValue").clearValue();var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value);t||(t={type:"text"}),t.isRequired=!0,s.SurveyHelper.updateQuestionJson(t),t.enableIf="{panel.questionName} notempty and {panel.operator} != 'empty' and {panel.operator} != 'notempty'";var i=r.Serializer.createClass(t.type);delete t.type,(new r.JsonObject).toObject(t,i),i||(i=r.Serializer.createClass("text",t));var o=e.getQuestionByName("questionValue");if(o&&e.removeElement(o),this.canShowQuestionValue(e)){var n=i.title;i.name="questionValue",i.visibleIf="questionValueVisibleIf({panel.questionName}, {panel.operator})",i.title=n,i.description="",i.titleLocation="top",i.hasComment=!1,e.addElement(i)}},t.prototype.rebuildQuestionValueOnOperandChanging=function(e){var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value),i=e.getQuestionByName("questionValue");!i||!i.isReadOnly&&i.isVisible||i.clearValue(),!i||t&&t.type==i.getType()||this.rebuildQuestionValue(e)},t.prototype.canShowQuestionValue=function(e){var t=e.getQuestionByName("operator");if(!t)return!1;this.updateOperatorEnables(e);for(var i=t.choices,o=0;o<i.length;o++)if(i[o].isEnabled){var r=i[o].value;if("empty"!==r&&"notempty"!=r)return!0}return!1},t.prototype.getConditionQuestion=function(e){return this.addConditionQuestionsHash[e]},t.prototype.getQuestionConditionJson=function(e,t){var i="",o=this.getConditionQuestion(e);if(!o)return null;0==e.indexOf(o.getValueName())&&(i=e.substr(o.getValueName().length)),0==e.indexOf("row.")&&(i=e.substr("row.".length)),i||(i=e),i&&"."==i[0]&&(i=i.substr(1));var r=o&&o.getConditionJson?o.getConditionJson(t,i):null;return r&&"radiogroup"==r.type&&(r.type="dropdown"),r&&"expression"==r.type&&(r.type="text"),r&&"anyof"==t&&(this.isClassContains(r.type,["checkbox"],[])||(r.type="checkbox")),r||null},t.prototype.updateOperatorEnables=function(e){var t=e.getQuestionByName("questionName");if(t){var i=this.getQuestionConditionJson(t.value,"equal"),o=i?i.type:null,r=e.getQuestionByName("operator");if(r){for(var a=r.choices,s=!0,l=r.value,u=0;u<a.length;u++)a[u].setIsEnabled(this.isOperatorEnabled(o,n.settings.operators[a[u].value])),a[u].value==l&&(s=a[u].isEnabled);s||(r.value=this.getFirstEnabledOperator(a))}}},t.prototype.updateQuestionsWidth=function(e){var t=e.getQuestionByName("questionValue"),i=e.getQuestionByName("conjunction"),o=e.getQuestionByName("questionName"),r=e.getQuestionByName("operator"),n=!!t&&!t.startWithNewLine,a=!i||!i.isVisible;a||(i.minWidth="50px",i.width="15%",i.paddingRight="20px"),o.minWidth="50px",o.width=a?"40%":"25%",o.paddingRight="20px",r.minWidth="50px",r.width=n?"25%":"60%",r.paddingRight="20px",t&&(t.minWidth="50px",t.width=n?"35%":"",t.paddingRight="20px")},t.prototype.getFirstEnabledOperator=function(e){for(var t=0;t<e.length;t++)if(e[t].isEnabled)return e[t].value;return"equal"},t.prototype.isOperatorEnabled=function(e,t){if(!e)return!0;if(!t||0==t.length)return!0;for(var i=[],o=[],r=0;r<t.length;r++){var n=t[r];"!"==n[0]?o.push(n.substr(1)):i.push(n)}return this.isClassContains(e,i,o)},t.prototype.isClassContains=function(e,t,i){for(var o=r.Serializer.findClass(e);o;){if(t.indexOf(o.name)>-1)return!0;if(i.indexOf(o.name)>-1)return!1;o=o.parentName?r.Serializer.findClass(o.parentName):null}return 0==t.length},t.prototype.onPanelAdded=function(){this.setItemToPanel(new d,this.panel.panels[this.panel.panels.length-1])},t.prototype.onPanelValueChanged=function(e,t){"questionName"==t&&(this.rebuildQuestionValue(e),this.isSettingPanelValues||(e.getQuestionByName("operator").value="equal")),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){e.cssClasses.answered="svc-logic-question--answered","conjunction"===e.question.name&&(e.cssClasses.control+="svc-logic-operator svc-logic-operator--conjunction ",e.cssClasses.questionWrapper="svc-question-wrapper"),"questionName"===e.question.name&&(e.cssClasses.control="svc-logic-operator svc-logic-operator--question",e.cssClasses.questionWrapper="svc-question-wrapper"),"operator"===e.question.name&&(e.cssClasses.control="svc-logic-operator svc-logic-operator--operator",e.cssClasses.questionWrapper="svc-question-wrapper"),"removeAction"===e.question.name&&(e.cssClasses.questionWrapper="svc-question-wrapper",e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"questionValue"===e.question.name&&(Object(u.assignDefaultV2Classes)(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--operator",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onValueChanged=function(e){if("panel"===e.question.name&&e.value.length>0){var t=this.options.maxLogicItemsInCondition>0?this.options.maxLogicItemsInCondition:100;e.question.maxPanelCount=1!==e.value.length||e.value[0].questionName?t:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))}this.setTitle()},t.prototype.setTitle=function(){var e=this.text;this.title=this.options.onConditionGetTitleCallback(e,e||a.editorLocalization.getString("pe.ruleIsNotSet"))},t.prototype.showTextEditor=function(e){this.panel.visible=!1,this.textEditor.value=e,this.textEditor.visible=!0},t.prototype.showBuilder=function(e){(this.isModal||this.getCanShowBuilder(e))&&(this.textEditor.visible=!1,this.processText(e),this.panel.visible=!0)},t.prototype.getCanShowBuilder=function(e){return t.canBuildExpression(e)},t}(l.PropertyEditorSetupValue)},"./src/property-grid/condition.ts":
|
|
472
|
+
/*! exports provided: ConditionEditorItem, SurveyConditionEditorItem, ConditionEditorItemsBuilder, ConditionEditor */function(e,t,i){"use strict";i.r(t),i.d(t,"ConditionEditorItem",(function(){return d})),i.d(t,"SurveyConditionEditorItem",(function(){return p})),i.d(t,"ConditionEditorItemsBuilder",(function(){return m})),i.d(t,"ConditionEditor",(function(){return g}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../settings */"./src/settings.ts"),a=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),s=i(/*! ../survey-helper */"./src/survey-helper.ts"),l=i(/*! ./index */"./src/property-grid/index.ts"),u=i(/*! ../utils/utils */"./src/utils/utils.ts"),c=i(/*! ../components/tabs/logic-theme */"./src/components/tabs/logic-theme.ts"),d=function(){this.conjunction="and",this.operator="equal"},p=function(e){function t(t){var i=e.call(this)||this;return i.survey=t,i}return Object(o.__extends)(t,e),t.prototype.getOperatorText=function(){var e=this.operator;return"equal"==e?"=":"notequal"==e?"<>":"greater"==e?">":"less"==e?"<":"greaterorequal"==e?">=":"lessorequal"==e?"<=":e},t.prototype.getValueText=function(){var e=this.value;if(!e)return e;if(!Array.isArray(e))return this.valToText(e);for(var t="[",i=0;i<e.length;i++)t+=this.valToText(e[i]),i<e.length-1&&(t+=", ");return t+="]"},Object.defineProperty(t.prototype,"isValueRequired",{get:function(){return"empty"!==this.operator&&"notempty"!==this.operator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){return!(!this.questionName||this.isValueRequired&&r.Helpers.isValueEmpty(this.value))},enumerable:!1,configurable:!0}),t.prototype.toExpression=function(){var e=Object(u.wrapTextByCurlyBraces)(this.getQuestionValueByName())+" "+this.getOperatorText();return this.isValueRequired&&(e+=" "+this.getValueText()),e},t.prototype.getQuestionValueByName=function(){var e=this.survey.getQuestionByName(this.questionName);return e&&e.name!=e.getValueName()&&this.questionName!=e.getValueName()?this.questionName.replace(e.name,e.getValueName()):this.questionName},t.prototype.valToText=function(e){return"true"==e||"false"==e||this.isNumeric(e)?e:"["==e[0]?e.replace(/(?!^)(['])(?!$)/g,"\\$1"):(this.isQuote(e[0])||(e="'"+e),this.isQuote(e[e.length-1])||(e+="'"),e.replace(/(?!^)(['"])(?!$)/g,"\\$1"))},t.prototype.isNumeric=function(e){return!("string"==typeof e&&e.length>1&&"0"===e[0]&&"x"!==e[1]||isNaN(e))},t.prototype.isQuote=function(e){return"'"==e||'"'==e},t}(d),m=function(){function e(e){void 0===e&&(e=null),this.hasValue=e}return e.prototype.build=function(e){return e&&(t=(new r.ConditionsParser).parseExpression(e))?this.buildEditorItems(t):[];var t},e.prototype.buildEditorItems=function(e){var t=[];return this.buildEditorItemsCore(e,t,"")||(t=[]),t},e.prototype.buildEditorItemsCore=function(e,t,i){if("unary"==e.getType())return this.buildEditorItemsAddUnaryOperand(e,t);if("binary"!==e.getType())return!1;var o=e;return!(o.isArithmetic&&!o.isConjunction)&&(o.isConjunction?this.buildEditorItemsAddConjunction(o,t,i):this.buildEditorItemsAddBinaryOperand(o,t))},e.prototype.buildEditorItemsAddConjunction=function(e,t,i){var o=e.conjunction;if("or"==o&&i&&i!=o)return!1;if(!this.buildEditorItemsCore(e.leftOperand,t,o))return!1;var r=t.length;return!!this.buildEditorItemsCore(e.rightOperand,t,o)&&(t[r].conjunction=e.conjunction,!0)},e.prototype.buildEditorItemsAddBinaryOperand=function(e,t){var i=this.getOperandByType(e,"variable"),o=this.getArrayValueFromOperand(e),r=o?null:this.getOperandByType(e,"const");if(!i||!r&&!o&&this.canShowValueByOperator(e.operator))return!1;if(!this.isVariableInSurvey(i.variable))return!1;var n=new d;return n.questionName=i.variable,n.operator=e.leftOperand!==i?this.getOppositeOperator(e.operator):e.operator,o&&(n.value=o),r&&(n.value=r.correctValue),t.push(n),!0},e.prototype.isVariableInSurvey=function(e){return!this.hasValue||this.hasValue(e)},e.prototype.getArrayValueFromOperand=function(e){var t=this.getOperandByType(e,"array");if(!t||!t.values)return null;var i=t.values;if(!Array.isArray(i)||0==i.length)return null;for(var o=[],r=0;r<i.length;r++){var n=i[r];if(n){if("const"!=n.getType())return null;o.push(n.correctValue)}}return 0==o.length?null:o},e.prototype.buildEditorItemsAddUnaryOperand=function(e,t){var i=e.operator;if("empty"!==i&&"notempty"!=i)return!1;var o=e.expression;if(null==o||"variable"!=o.getType())return!1;var r=o.variable;if(!this.isVariableInSurvey(r))return!1;var n=new d;return n.questionName=r,n.operator=i,t.push(n),!0},e.prototype.getOppositeOperator=function(e){return"less"==e?"greater":"greater"==e?"less":"lessorequal"==e?"greaterorequal":"greaterorequal"==e?"lessorequal":e},e.prototype.getOperandByType=function(e,t){return e.rightOperand?e.leftOperand.getType()!==t&&e.rightOperand.getType()!==t||e.leftOperand.getType()==t&&e.rightOperand.getType()==t?null:e.leftOperand.getType()==t?e.leftOperand:e.rightOperand:null},e.prototype.canShowValueByOperator=function(e){return"empty"!=e&&"notempty"!=e},e}();r.FunctionFactory.Instance.register("questionValueVisibleIf",(function(e){return 2===e.length&&!(!e[0]||!e[1])&&"empty"!==e[1]&&"notempty"!==e[1]}));var g=function(e){function t(t,i,o,r){void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r="");var n=e.call(this,o)||this;return n.propertyName=r,n.addConditionQuestionsHash={},n.isModalValue=!0,n.isSettingPanelValues=!1,n.calculatedValueQuestion=null,n.surveyValue=t,n.objectValue=i,n.panelValue=n.editSurvey.getQuestionByName("panel"),n.textEditorValue=n.editSurvey.getQuestionByName("textEditor"),n.options.maxLogicItemsInCondition&&(n.panel.maxPanelCount=n.options.maxLogicItemsInCondition),n.allConditionQuestions=n.createAllConditionQuestions(),n.editSurvey.onValueChanged.add((function(e,t){n.onValueChanged(t)})),n.editSurvey.onDynamicPanelAdded.add((function(e,t){n.onPanelAdded()})),n.editSurvey.onDynamicPanelRemoved.add((function(e,t){0==t.question.panelCount&&t.question.addPanel(),n.panel.panelCount>0&&(n.panel.panels[0].getQuestionByName("questionName").titleLocation="left")})),n.editSurvey.onDynamicPanelItemValueChanged.add((function(e,t){n.onPanelValueChanged(t.panel,t.name)})),n.editSurvey.css=c.logicCss,n.editSurvey.onUpdateQuestionCssClasses.add((function(e,t){n.onUpdateQuestionCssClasses(t)})),n.text=n.object&&n.propertyName?n.object[n.propertyName]:"",n}return Object(o.__extends)(t,e),t.canParseExpression=function(e){return!e||!!(new r.ConditionsParser).parseExpression(e)},t.canBuildExpression=function(e){return!e||!!t.canParseExpression(e)&&(new m).build(e).length>0},Object.defineProperty(t.prototype,"title",{get:function(){return this.panel.title},set:function(e){this.panel.title=e,this.textEditor.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isModal",{get:function(){return this.isModalValue},set:function(e){e!==this.isModalValue&&(this.isModalValue=e)},enumerable:!1,configurable:!0}),t.prototype.getSurveyJSON=function(){return{elements:[{type:"paneldynamic",titleLocation:"hidden",name:"panel",panelRemoveButtonLocation:"right",panelAddText:a.editorLocalization.getString("pe.addCondition"),minPanelCount:1,maxPanelCount:1,startWithNewLine:!1,templateElements:[{name:"conjunction",type:"dropdown",titleLocation:"hidden",showOptionsCaption:!1,visibleIf:"{panelIndex} > 0",choices:[{value:"and",text:a.editorLocalization.getString("pe.and")},{value:"or",text:a.editorLocalization.getString("pe.or")}]},{name:"questionName",type:"dropdown",title:a.editorLocalization.getString("pe.if"),titleLocation:"left",startWithNewLine:!1,isRequired:!0},{name:"operator",type:"dropdown",titleLocation:"hidden",startWithNewLine:!1,showOptionsCaption:!1,isRequired:!0,enableIf:"{panel.questionName} notempty"},{name:"removeAction",type:"linkvalue",titleLocation:"hidden",showOptionsCaption:!1,visible:!1,startWithNewLine:!1,showValueInLink:!1,allowClear:!1,showClear:!1},{name:"questionValue",type:"text",visible:!1}]},{type:"comment",titleLocation:"hidden",name:"textEditor",textUpdateMode:"onTyping",placeHolder:a.editorLocalization.getString("pe.emptyExpressionPlaceHolder"),visible:!1}]}},t.prototype.getSurveyCreationReason=function(){return"condition-builder"},Object.defineProperty(t.prototype,"text",{get:function(){return this.getText()},set:function(e){this.isModal||t.canBuildExpression(e)?(this.textEditor.value=e,this.showBuilder(e)):(this.panel.panelCount=0,this.showTextEditor(e))},enumerable:!1,configurable:!0}),t.prototype.isModified=function(e){if(this.textEditor.visible)return e!=this.text;var t=this.getEditorItems(),i=e?(new r.ConditionsParser).parseExpression(e):null;if(!i)return!(1==t.length&&!t[0].questionName);if(!this.isReady)return!0;var o=(new r.ConditionsParser).parseExpression(this.text);return!i.isEqual(o)},t.prototype.processText=function(e){this.panel.panelCount=0;var t=(new m).build(e);this.buildPanels(t)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.objectValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panel",{get:function(){return this.panelValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textEditor",{get:function(){return this.textEditorValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isReady",{get:function(){if(this.textEditor.visible)return t.canParseExpression(this.textEditor.value);for(var e=0;e<this.panel.panels.length;e++)if(!this.createEditorItemFromPanel(this.panel.panels[e]).isReady)return!1;return!0},enumerable:!1,configurable:!0}),t.prototype.apply=function(){return!!this.isReady&&(this.object&&this.propertyName?(this.object[this.propertyName]=this.text,!0):void 0)},t.prototype.setIsFastEntry=function(e){e?this.showTextEditor(this.text):this.panel.visible||this.showBuilder(this.text)},t.prototype.buildPanels=function(e){this.panel.panelCount=e.length;for(var t=0;t<e.length;t++)this.setItemToPanel(e[t],this.panel.panels[t]);0==this.panel.panelCount&&this.panel.addPanel()},t.prototype.setItemToPanel=function(e,t){this.isSettingPanelValues=!0,t.getQuestionByName("conjunction").value=e.conjunction,t.getQuestionByName("operator").choices=this.getOperators(),t.getQuestionByName("operator").value=e.operator,t.getQuestionByName("questionName").choices=this.allConditionQuestions,t.getQuestionByName("questionName").titleLocation=0==this.panel.panels.indexOf(t)?"left":"hidden",this.getConditionQuestion(e.questionName)&&(t.getQuestionByName("questionName").value=e.questionName),t.getQuestionByName("questionValue")&&(t.getQuestionByName("questionValue").value=e.value);var i=t.getQuestionByName("removeAction").parentQuestion,o=t.getQuestionByName("removeAction");o.linkClickCallback=function(){i&&i.removePanelUI(t)},o.linkValueText="",o.linkSetButtonCssClasses="svc-logic-condition-remove svc-icon-remove",this.isSettingPanelValues=!1},t.prototype.getText=function(){if(this.textEditor.visible)return this.textEditor.value;for(var e="",t=this.getEditorItems(),i=0;i<t.length;i++){if(!t[i].isReady)return"";e&&(e+=" "+t[i].conjunction+" "),e+=t[i].toExpression()}return e},t.prototype.getEditorItems=function(){for(var e=[],t=0;t<this.panel.panels.length;t++)e.push(this.createEditorItemFromPanel(this.panel.panels[t]));return e},t.prototype.createEditorItemFromPanel=function(e){var t=new p(this.survey);return t.conjunction=e.getQuestionByName("conjunction").value,t.questionName=e.getQuestionByName("questionName").value,t.operator=e.getQuestionByName("operator").value,e.getQuestionByName("questionValue")&&(t.value=e.getQuestionByName("questionValue").value),t},t.prototype.createAllConditionQuestions=function(){if(!this.survey)return[];var e=[],t=this.survey.getAllQuestions();if(t.length>0){for(var i=0;i<t.length;i++)this.object!=t[i]&&t[i].addConditionObjectsByContext(e,this.object);for(this.options.onConditionQuestionsGetListCallback(this.propertyName,this.object,this,e),i=0;i<e.length;i++){e[i].value=e[i].name;var o=e[i].question?e[i].question:e[i];if(!this.options.showTitlesInExpressions){var r=e[i].name,n=o.valueName;n&&0==r.indexOf(n)&&(r=r.replace(n,o.name)),e[i].text=this.options.getObjectDisplayName(o,"condition",r)}this.addConditionQuestionsHash[e[i].name]=o}}return this.addValuesIntoConditionQuestions(this.survey.calculatedValues,e),this.addValuesIntoConditionQuestions(this.survey.getVariableNames(),e),s.SurveyHelper.sortItems(e),e},t.prototype.addValuesIntoConditionQuestions=function(e,t){for(var i=0;i<e.length;i++){var o=e[i].name?e[i].name:e[i];this.addConditionQuestionsHash[o]=this.getCalculatedValueQuestion(),t.push({value:o,text:o,question:this.getCalculatedValueQuestion()})}},t.prototype.getCalculatedValueQuestion=function(){return this.calculatedValueQuestion||(this.calculatedValueQuestion=r.Serializer.createClass("text"),this.calculatedValueQuestion.name="question"),this.calculatedValueQuestion},t.prototype.getOperators=function(){var e=[],t=n.settings.operators;for(var i in t)e.push(new r.ItemValue(i,a.editorLocalization.getString("op."+i)));return e},t.prototype.rebuildQuestionValue=function(e){e.getQuestionByName("questionValue")&&e.getQuestionByName("questionValue").clearValue();var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value);t||(t={type:"text"}),t.isRequired=!0,s.SurveyHelper.updateQuestionJson(t),t.enableIf="{panel.questionName} notempty and {panel.operator} != 'empty' and {panel.operator} != 'notempty'";var i=r.Serializer.createClass(t.type);delete t.type,(new r.JsonObject).toObject(t,i),i||(i=r.Serializer.createClass("text",t));var o=e.getQuestionByName("questionValue");if(o&&e.removeElement(o),this.canShowQuestionValue(e)){var n=i.title;i.name="questionValue",i.visibleIf="questionValueVisibleIf({panel.questionName}, {panel.operator})",i.title=n,i.description="",i.titleLocation="top",i.hasComment=!1,e.addElement(i)}},t.prototype.rebuildQuestionValueOnOperandChanging=function(e){var t=this.getQuestionConditionJson(e.getQuestionByName("questionName").value,e.getQuestionByName("operator").value),i=e.getQuestionByName("questionValue");!i||!i.isReadOnly&&i.isVisible||i.clearValue(),!i||t&&t.type==i.getType()||this.rebuildQuestionValue(e)},t.prototype.canShowQuestionValue=function(e){var t=e.getQuestionByName("operator");if(!t)return!1;this.updateOperatorEnables(e);for(var i=t.choices,o=0;o<i.length;o++)if(i[o].isEnabled){var r=i[o].value;if("empty"!==r&&"notempty"!=r)return!0}return!1},t.prototype.getConditionQuestion=function(e){return this.addConditionQuestionsHash[e]},t.prototype.getQuestionConditionJson=function(e,t){var i="",o=this.getConditionQuestion(e);if(!o)return null;0==e.indexOf(o.getValueName())&&(i=e.substr(o.getValueName().length)),0==e.indexOf("row.")&&(i=e.substr("row.".length)),i||(i=e),i&&"."==i[0]&&(i=i.substr(1));var r=o&&o.getConditionJson?o.getConditionJson(t,i):null;return r&&"radiogroup"==r.type&&(r.type="dropdown"),r&&"expression"==r.type&&(r.type="text"),r&&"anyof"==t&&(this.isClassContains(r.type,["checkbox"],[])||(r.type="checkbox")),r||null},t.prototype.updateOperatorEnables=function(e){var t=e.getQuestionByName("questionName");if(t){var i=this.getQuestionConditionJson(t.value,"equal"),o=i?i.type:null,r=e.getQuestionByName("operator");if(r){for(var a=r.choices,s=!0,l=r.value,u=0;u<a.length;u++)a[u].setIsEnabled(this.isOperatorEnabled(o,n.settings.operators[a[u].value])),a[u].value==l&&(s=a[u].isEnabled);s||(r.value=this.getFirstEnabledOperator(a))}}},t.prototype.updateQuestionsWidth=function(e){var t=e.getQuestionByName("questionValue"),i=e.getQuestionByName("conjunction"),o=e.getQuestionByName("questionName"),r=e.getQuestionByName("operator"),n=!!t&&!t.startWithNewLine,a=!i||!i.isVisible;a||(i.minWidth="50px",i.width="15%"),o.minWidth="50px",o.width=a?"40%":"25%",r.minWidth="50px",r.width=n?"25%":"60%",t&&(t.minWidth="50px",t.width=n?"35%":"")},t.prototype.getFirstEnabledOperator=function(e){for(var t=0;t<e.length;t++)if(e[t].isEnabled)return e[t].value;return"equal"},t.prototype.isOperatorEnabled=function(e,t){if(!e)return!0;if(!t||0==t.length)return!0;for(var i=[],o=[],r=0;r<t.length;r++){var n=t[r];"!"==n[0]?o.push(n.substr(1)):i.push(n)}return this.isClassContains(e,i,o)},t.prototype.isClassContains=function(e,t,i){for(var o=r.Serializer.findClass(e);o;){if(t.indexOf(o.name)>-1)return!0;if(i.indexOf(o.name)>-1)return!1;o=o.parentName?r.Serializer.findClass(o.parentName):null}return 0==t.length},t.prototype.onPanelAdded=function(){this.setItemToPanel(new d,this.panel.panels[this.panel.panels.length-1])},t.prototype.onPanelValueChanged=function(e,t){"questionName"==t&&(this.rebuildQuestionValue(e),this.isSettingPanelValues||(e.getQuestionByName("operator").value="equal")),"operator"==t&&this.rebuildQuestionValueOnOperandChanging(e),this.updateOperatorEnables(e),this.updateQuestionsWidth(e)},t.prototype.onUpdateQuestionCssClasses=function(e){e.cssClasses.answered="svc-logic-question--answered","conjunction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control+="svc-logic-operator svc-logic-operator--conjunction "),"questionName"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control="svc-logic-operator svc-logic-operator--question"),"operator"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.control="svc-logic-operator svc-logic-operator--operator"),"removeAction"===e.question.name&&(e.question.allowRootStyle=!1,e.cssClasses.mainRoot+=" svc-logic-condition-remove-question"),"questionValue"===e.question.name&&(Object(u.assignDefaultV2Classes)(e.cssClasses,e.question.getType()),e.cssClasses.mainRoot+=" svc-logic-question-value"),"panel"===e.question.name&&(e.cssClasses.root+=" svc-logic-paneldynamic",e.cssClasses.buttonAdd+=" svc-logic-operator--operator",e.cssClasses.iconRemove="svc-icon-remove",e.cssClasses.buttonRemove="svc-logic-paneldynamic__button svc-logic-paneldynamic__remove-btn",e.cssClasses.buttonRemoveRight="svc-logic-paneldynamic__remove-btn--right",e.cssClasses.buttonRemoveText="svc-logic-paneldynamic__button-remove-text")},t.prototype.onValueChanged=function(e){if("panel"===e.question.name&&e.value.length>0){var t=this.options.maxLogicItemsInCondition>0?this.options.maxLogicItemsInCondition:100;e.question.maxPanelCount=1!==e.value.length||e.value[0].questionName?t:1,this.panel.panels.forEach((function(t){t.getQuestionByName("removeAction").visible=1!==e.value.length}))}this.setTitle()},t.prototype.setTitle=function(){var e=this.text;this.title=this.options.onConditionGetTitleCallback(e,e||a.editorLocalization.getString("pe.ruleIsNotSet"))},t.prototype.showTextEditor=function(e){this.panel.visible=!1,this.textEditor.value=e,this.textEditor.visible=!0},t.prototype.showBuilder=function(e){(this.isModal||this.getCanShowBuilder(e))&&(this.textEditor.visible=!1,this.processText(e),this.panel.visible=!0)},t.prototype.getCanShowBuilder=function(e){return t.canBuildExpression(e)},t}(l.PropertyEditorSetupValue)},"./src/property-grid/condition.ts":
|
|
469
473
|
/*!****************************************!*\
|
|
470
474
|
!*** ./src/property-grid/condition.ts ***!
|
|
471
475
|
\****************************************/
|
|
@@ -477,11 +481,11 @@ License: MIT
|
|
|
477
481
|
/*!************************************!*\
|
|
478
482
|
!*** ./src/property-grid/index.ts ***!
|
|
479
483
|
\************************************/
|
|
480
|
-
/*! exports provided: setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorNumber, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorColor, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue */function(e,t,i){"use strict";i.r(t),i.d(t,"setSurveyJSONForPropertyGrid",(function(){return m})),i.d(t,"PropertyEditorSetupValue",(function(){return g})),i.d(t,"PropertyGridEditorCollection",(function(){return h})),i.d(t,"PropertyGridTitleActionsCreator",(function(){return v})),i.d(t,"PropertyJSONGenerator",(function(){return y})),i.d(t,"PropertyGridModel",(function(){return f})),i.d(t,"PropertyGridEditor",(function(){return b})),i.d(t,"PropertyGridEditorBoolean",(function(){return x})),i.d(t,"PropertyGridEditorStringBase",(function(){return w})),i.d(t,"PropertyGridEditorString",(function(){return T})),i.d(t,"PropertyGridEditorNumber",(function(){return k})),i.d(t,"PropertyGridEditorText",(function(){return S})),i.d(t,"PropertyGridEditorHtml",(function(){return P})),i.d(t,"PropertyGridEditorColor",(function(){return E})),i.d(t,"PropertyGridEditorStringArray",(function(){return C})),i.d(t,"PropertyGridEditorDropdown",(function(){return N})),i.d(t,"PropertyGridEditorSet",(function(){return O})),i.d(t,"PropertyGridEditorPage",(function(){return _})),i.d(t,"PropertyGridEditorQuestion",(function(){return A})),i.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return V})),i.d(t,"PropertyGridEditorQuestionValue",(function(){return j}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),a=i(/*! ../editable-object */"./src/editable-object.ts"),s=i(/*! ../property-grid-theme/property-grid */"./src/property-grid-theme/property-grid.ts"),l=i(/*! ../question-editor/properties */"./src/question-editor/properties.ts"),u=i(/*! ../settings */"./src/settings.ts"),c=i(/*! ./properties-helptext */"./src/property-grid/properties-helptext.ts"),d=i(/*! ../utils/actions */"./src/utils/actions.ts"),p=i(/*! ../survey-helper */"./src/survey-helper.ts");function m(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),e.showNavigationButtons="none",e.showPageTitles=!1,e.focusFirstQuestionAutomatic=!1,e.showQuestionNumbers="off",i&&(e.questionTitleLocation="left"),e.showProgressBar="off",t&&(e.textUpdateMode="onTyping"),e.requiredText=""}r.FunctionFactory.Instance.register("propertyVisibleIf",(function(e){return!!(this.question&&this.question.obj&&this.question.property)&&this.question.property.visibleIf(this.question.obj)}));var g=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new u.EmptySurveyCreatorOptions),t&&this.setupSurvey()}return e.prototype.setupSurvey=function(){this.editSurveyValue=this.createSurvey()},Object.defineProperty(e.prototype,"editSurvey",{get:function(){return this.editSurveyValue},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return this.editSurvey.hasErrors(!0,!0)},e.prototype.createSurvey=function(){var e=this.getSurveyJSON();return m(e,!0,!1),this.options.createSurvey(e,this.getSurveyCreationReason())},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),h={editors:new Array,fitHash:{},clearHash:function(){this.fitHash={}},register:function(e){this.editors.push(e)},getEditor:function(e,t){if(!e)return null;if(t)for(var i=this.editors.length-1;i>=0;i--){var o=this.editors[i];if(o.fit(e,t))return o}var r=this.fitHash[e.id];if(r)return r;var n=this.isEditorFit(e);return n||this.isEditorFit(e,!0)},isEditorFit:function(e,t){void 0===t&&(t=!1);for(var i=this.editors.length-1;i>=0;i--){var o=this.editors[i];if(!t&&o.fit(e)||t&&o.isDefault&&o.isDefault())return this.fitHash[e.id]=o,o}return null},getJSON:function(e,t,i,o){var r=this.getEditor(t,o);return r?r.getJSON(e,t,i):null},onCreated:function(e,t,i,o){var r=this.getEditor(i);r&&r.onCreated&&r.onCreated(e,t,i,o)},onAfterRenderQuestion:function(e,t,i){var o=this.getEditor(t);o&&o.onAfterRenderQuestion&&o.onAfterRenderQuestion(e,t,i)},onMatrixCellCreated:function(e,t,i){var o=this.getEditor(t);o&&o.onMatrixCellCreated&&o.onMatrixCellCreated(i.question.obj,i)},onMatrixCellValueChanged:function(e,t,i){var o=this.getEditor(t);o&&o.onMatrixCellValueChanged&&o.onMatrixCellValueChanged(e,i);var r=i.row;if(r){var n=r.getQuestionByName(i.columnName);n&&r.runCondition({},{question:n})}},onMatrixAllowRemoveRow:function(e,t,i){var o=this.getEditor(t);return!o||!o.onMatrixAllowRemoveRow||o.onMatrixAllowRemoveRow(e,i)},onGetMatrixRowAction:function(e,t,i,o){var r=this.getEditor(t);r&&r.onGetMatrixRowAction&&r.onGetMatrixRowAction(e,i,o)},onUpdateQuestionCssClasses:function(e,t,i){var o=this.getEditor(t);o&&o.onUpdateQuestionCssClasses&&o.onUpdateQuestionCssClasses(e,i)},onGetQuestionTitleActions:function(e,t,i){var o=this.getEditor(t);o&&o.onGetQuestionTitleActions&&o.onGetQuestionTitleActions(e,i)},onValueChanged:function(e,t,i){var o=this.getEditor(t);o&&o.onValueChanged&&o.onValueChanged(e,t,i)},onMasterValueChanged:function(e,t,i){var o=this.getEditor(t);o&&o.onMasterValueChanged&&o.onMasterValueChanged(e,t,i)}},v=function(){function e(e,t){this.obj=e,this.options=t}return e.prototype.onGetQuestionTitleActions=function(e){var t=e.question,i=t.property,o=h.getEditor(i);if(o){var r=[],n=!t.isReadOnly;!!o.clearPropertyValue&&(!o.canClearPropertyValue||o.canClearPropertyValue(this.obj,i,t,this.options))&&r.push(this.createClearValueAction(o,i,t,n)),o.createPropertyEditorSetup&&(n&&(n=!o.isPropertyEditorSetupEnabled||o.isPropertyEditorSetupEnabled(this.obj,i,e.question,this.options)),r.push(this.createEditorSetupAction(o,i,t,n)));var a=this.createPropertyHelpAction(t);a&&r.push(a),r.length>0&&(e.titleActions=r)}},e.prototype.createClearValueAction=function(e,t,i,o){var a=this;return{id:"property-grid-clear",title:Object(n.getLocString)("pe.clear"),showTitle:!1,iconName:"icon-clear",css:"spg-action-button spg-action-button--danger",enabled:o,visible:new r.ComputedUpdater((function(){var e=i.obj[t.name];return Array.isArray(e)?e.length>0:!!e})),action:function(){e.clearPropertyValue(i.obj,t,i,a.options)}}},e.prototype.showModalPropertyEditor=function(e,t,i){return e.showModalPropertyEditor(e,t,i,this.options)},e.prototype.createEditorSetupAction=function(e,t,i,o){var r=this;return{id:"property-grid-setup",iconName:t.isArray?"icon-fast-entry":"icon-wizard",css:"spg-action-button",enabled:o,title:Object(n.getLocString)("pe.edit"),showTitle:!1,action:function(){return r.showModalPropertyEditor(e,t,i)}}},e.prototype.createPropertyHelpAction=function(e){var t=this;if(!e.description)return null;var i=new r.Action({title:"",id:"property-grid-help",css:"spg-action-button",iconName:this.getHelpActionIconName(e),showTitle:!1,action:function(){e.descriptionLocation="hidden"!=e.descriptionLocation?"hidden":"underTitle",i.iconName=t.getHelpActionIconName(e)}});return i},e.prototype.getHelpActionIconName=function(e){return"hidden"!=e.descriptionLocation?"icon-description-hide":"icon-description"},e}(),y=function(){function e(e,t,i,o){void 0===t&&(t=null),void 0===i&&(i=null),void 0===o&&(o=null),this.obj=e,this.options=t,this.parentObj=i,this.parentProperty=o}return e.isPropertyReadOnly=function(e,t,i,o,r){var n=e.readOnly;return t&&i&&(n=t.onIsPropertyReadOnlyCallback(i,e,n,o,r)),n},e.getClassNameProperty=function(e){if(e&&e.getClassNameProperty)return e.getClassNameProperty()},e.prototype.toJSON=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=void 0),this.createJSON(e,t)},e.prototype.createColumnsJSON=function(e,t){for(var i=[],o=0;o<t.length;o++){var r=this.getColumnPropertyJSON(e,t[o]);r&&i.push(r)}return i},e.prototype.setupObjPanel=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=void 0),e.fromJSON(this.toJSON(t,i)),this.onQuestionsCreated(e)},e.prototype.onQuestionsCreated=function(e){for(var t=r.Serializer.getPropertiesByObj(this.obj),i={},o=0;o<t.length;o++)i[t[o].name]=t[o];var n=e.questions;for(o=0;o<n.length;o++){var a=n[o],s=i[a.name];a.property=s,a.obj=this.obj,a.options=this.options;var l=this.getVisibilityOnEvent(s);a.readOnly=a.readOnly||this.isPropertyReadOnly(s),a.visible=a.visible&&l,s.visibleIf&&(a.visibleIf=l?"propertyVisibleIf() = true":""),a.descriptionLocation="hidden";var u=c.PropertiesHelpTexts.instance.getHelpText(this.obj,s);u&&(a.description=u),h.onCreated(this.obj,a,s,this.options),this.options.onPropertyEditorCreatedCallback(this.obj,s,a)}},e.prototype.getVisibilityOnEvent=function(e,t){return void 0===t&&(t=""),this.options.onCanShowPropertyCallback(this.obj,e,t,this.parentObj,this.parentProperty)},e.prototype.isPropertyReadOnly=function(t){return e.isPropertyReadOnly(t,this.options,this.obj,this.parentObj,this.parentProperty)},e.prototype.getClasPropName=function(){if(this.parentObj&&this.parentProperty)return this.parentProperty.name;var t=e.getClassNameProperty(this.obj);return t&&this.obj[t]?this.obj[t]:void 0},e.prototype.createJSON=function(e,t){void 0===t&&(t=void 0);var i=void 0,o=this.getClasPropName();o&&("itemvalue"===(i=this.obj.getType())&&(i+="[]"),i+="@"+o);for(var r=new l.SurveyQuestionProperties(this.obj,null,i,void 0,this.parentObj,this.parentProperty).getTabs(),n={},a=0;a<r.length;a++)!1!==r[a].visible&&(n[r[a].name]=this.createPanelProps(r[a],0==a,t));var s={elements:[]};for(var c in n)if(c==u.settings.propertyGrid.generalTabName&&e){var d=n[c].elements;for(a=0;a<d.length;a++)s.elements.push(d[a])}else s.elements.push(n[c]);return s},e.prototype.createPanelProps=function(e,t,i){for(var o=this.createPanelJSON(e.name,e.title,t),r=0;r<e.properties.length;r++){var n=e.properties[r],a=this.createQuestionJSON(n.property,n.title,!1,i);n.onSameLine&&(a.startWithNewLine=!1,this.updateQuestionJSONOnSameLine(a),o.elements.length>0&&this.updateQuestionJSONOnSameLine(o.elements[o.elements.length-1])),a&&o.elements.push(a)}return o},e.prototype.updateQuestionJSONOnSameLine=function(e){e.titleLocation="left",e.minWidth="50px"},e.prototype.createPanelJSON=function(e,t,i){return{type:"panel",name:e,title:this.getPanelTitle(e,t),state:i?"expanded":"collapsed",elements:[]}},e.prototype.createQuestionJSON=function(e,t,i,o){if(void 0===i&&(i=!1),!this.isPropertyVisible(e,i?"list":"")&&i)return null;var r=h.getJSON(this.obj,e,this.options,o);return r?(r.name=e.name,r.visible=e.visible,r.isReadOnly=e.readOnly,r.isRequired=e.isRequired,r.requiredErrorText=n.editorLocalization.getString("pe.propertyIsEmpty"),r.title=this.getQuestionTitle(e,t),r):null},e.prototype.getColumnPropertyJSON=function(e,t){if(!e)return null;var i=r.Serializer.findProperty(e,t);if(!i)return null;var o=this.createQuestionJSON(i,"",!0,void 0);return o?(o.name=i.name,o.title=this.getQuestionTitle(i,""),i.isUnique&&(o.isUnique=i.isUnique),o.type&&(o.cellType=o.type,delete o.type),"buttongroup"===o.cellType&&(o.cellType="dropdown"),i.visibleIf&&(o.visibleIf="propertyVisibleIf() = true"),o.isReadOnly&&(o.readOnly=o.isReadOnly,delete o.isReadOnly),o):null},e.prototype.isPropertyVisible=function(e,t){return!(!e.visible||t&&e.showMode&&t!=e.showMode)},e.prototype.getPanelTitle=function(e,t){return t||n.editorLocalization.getString("pe.tabs."+e)},e.prototype.getQuestionTitle=function(e,t){return e.displayName?e.displayName:t&&t!==e.name?t:n.editorLocalization.getPropertyNameInEditor(e.name)},e}(),f=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=new u.EmptySurveyCreatorOptions),this.isCellCreating=!1,this.options=t,this.obj=e}return e.prototype.refresh=function(){this.setObj(this.objValue)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},set:function(e){this.objValue!==e&&this.setObj(e)},enumerable:!1,configurable:!0}),e.prototype.selectProperty=function(e,t){if(void 0===t&&(t=!0),this.survey){var i=this.survey.getQuestionByName(e);if(i){for(var o=this.survey.getAllPanels(),r=0;r<o.length;r++){var n=o[r];n===i.parent?n.expand():n.collapse()}t&&i.focus()}}},e.prototype.setObjFromAction=function(e,t){this.changedFromActionCallback?this.changedFromActionCallback(e,t):this.setObj(e)},e.prototype.setObj=function(e){var t=this;this.objValue=e,this.classNameProperty=this.obj?y.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new v(this.obj,this.options):void 0;var i=this.getSurveyJSON();this.options.readOnly&&(i.mode="display"),this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=this.createSurvey(i),this.surveyValue.css=s.propertyGridCss;var o=this.surveyValue.createNewPage("p1");this.obj&&(new y(this.obj,this.options).setupObjPanel(o,!1),this.survey.addPage(o),this.survey.checkErrorsMode="onValueChanging",this.survey.onValueChanged.add((function(e,i){t.onValueChanged(i)})),this.survey.onValueChanging.add((function(e,i){t.onValueChanging(i)})),this.survey.onValidateQuestion.add((function(e,i){t.onValidateQuestion(i)})),this.survey.onGetQuestionTitleActions.add((function(e,i){t.titleActionsCreator.onGetQuestionTitleActions(i),t.onGetQuestionTitleActions(i);var o=i.question;t.options.onPropertyEditorUpdateTitleActionsCallback(t.obj,o.property,o,i.titleActions)})),this.survey.onGetPanelTitleActions.add((function(e,t){t.titleActions.splice(0,t.titleActions.length)})),this.survey.onMatrixCellCreated.add((function(e,i){t.onMatrixCellCreated(i)})),this.survey.onMatrixCellValueChanging.add((function(e,i){t.onMatrixCellValueChanging(i)})),this.survey.onMatrixCellValidate.add((function(e,i){t.onMatrixCellValidate(i)})),this.survey.onMatrixCellValueChanged.add((function(e,i){t.onMatrixCellValueChanged(i)})),this.survey.onMatrixAllowRemoveRow.add((function(e,i){i.allow=t.getMatrixAllowRemoveRow(i.question,i.row)})),this.survey.onMatrixRowAdded.add((function(e,i){t.onMatrixRowAdded(i)})),this.survey.onGetMatrixRowActions.add((function(e,i){t.onGetMatrixRowAction(i)})),this.survey.onUpdateQuestionCssClasses.add((function(e,i){t.onUpdateQuestionCssClasses(i)})),this.survey.onAfterRenderQuestion.add((function(e,i){t.onAfterRenderQuestion(i)})),this.survey.editingObj=this.obj,this.objValueChangedCallback&&this.objValueChangedCallback(),this.survey.onFocusInPanel.add((function(e,i){t.currentlySelectedPanel!==i.panel&&(t.currentlySelectedProperty=i.panel.getFirstQuestionToFocus().name,t.currentlySelectedPanel=i.panel)})),this.survey.onFocusInQuestion.add((function(e,i){t.currentlySelectedProperty=i.question.name,t.currentlySelectedPanel=i.question.parent})))},Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsValue},set:function(e){this.optionsValue=e||new u.EmptySurveyCreatorOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.validate=function(){if(this.survey)return!this.survey.hasErrors(!0,!0)},e.prototype.collapseCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.collapse()},e.prototype.expandCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.expand()},e.prototype.collapseAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].collapse()},e.prototype.expandAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].expand()},e.prototype.createSurvey=function(e){return this.options.createSurvey(e,"property-grid")},e.prototype.getSurveyJSON=function(){var e={};return m(e,!0,!1),e},e.prototype.onValidateQuestion=function(e){var t=e.question;t&&t.property&&(t.isRequired&&r.Helpers.isValueEmpty(e.value)?e.error=n.editorLocalization.getString("pe.propertyIsEmpty"):e.error=this.options.onGetErrorTextOnValidationCallback(t.property.name,this.obj,e.value))},e.prototype.onValueChanging=function(e){var t=e.question;if(t&&t.property){var i={obj:this.obj,propertyName:t.property.name,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(i),e.value=i.newValue}},e.prototype.onValueChanged=function(e){var t=e.question;t&&t.property&&(this.changeDependedProperties(t),h.onValueChanged(this.obj,t.property,t),this.classNameProperty&&e.name===this.classNameProperty&&this.classNameValue!==e.value&&this.setObj(this.obj))},e.prototype.changeDependedProperties=function(e){var t=e.property.getDependedProperties();if(t)for(var i=0;i<t.length;i++){var o=t[i],n=this.survey.getQuestionByName(o);n&&(r.Helpers.isTwoValueEquals(n.value,this.survey.getValue(o))||(n.value=this.survey.getValue(o)),h.onMasterValueChanged(this.obj,n.property,n))}},e.prototype.onAfterRenderQuestion=function(e){h.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,h.onMatrixCellCreated(this.obj,e.question.property,e),this.isCellCreating=!1;var t=e.row.editingObj;if(t){var i=r.Serializer.findProperty(t.getType(),e.columnName);if(i){var o=this.getMatrixAllowEditRow(e.question,e.row);e.cellQuestion.readOnly=!o||y.isPropertyReadOnly(i,this.options,t,this.obj,e.question.property)}}},e.prototype.onMatrixCellValueChanging=function(e){if(!this.isCellCreating){var t={obj:e.row.editingObj,propertyName:e.columnName,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(t),e.value=t.newValue}},e.prototype.onMatrixCellValidate=function(e){if(!this.isCellCreating){var t=e.question.getColumnByName(e.columnName);t&&t.isRequired&&r.Helpers.isValueEmpty(e.value)?e.error=n.editorLocalization.getString("pe.propertyIsEmpty"):e.error=this.options.onGetErrorTextOnValidationCallback(e.columnName,e.row.editingObj,e.value)}},e.prototype.onGetMatrixRowAction=function(e){var t=this;h.onGetMatrixRowAction(this.obj,e.question.property,e,(function(i){t.setObjFromAction(i,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){h.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e){h.onGetQuestionTitleActions(this.obj,e.question.property,e)},e.prototype.onMatrixCellValueChanged=function(e){this.isCellCreating||h.onMatrixCellValueChanged(this.obj,e.question.property,e)},e.prototype.getMatrixAllowRemoveRow=function(e,t){return void 0===t.allowDeleteRow&&this.calculateMatrixAllowOperations(e,t),t.allowDeleteRow},e.prototype.getMatrixAllowEditRow=function(e,t){return!e.readOnly&&(void 0===t.allowEditRow&&this.calculateMatrixAllowOperations(e,t),t.allowEditRow)},e.prototype.calculateMatrixAllowOperations=function(e,t){var i={allowDelete:this.onMatrixAllowRemoveRow(e,t),allowEdit:!0};this.options.onCollectionItemAllowingCallback(this.obj,e.property,e.value,t.editingObj,i),t.allowDeleteRow=i.allowDelete,t.allowEditRow=i.allowEdit},e.prototype.onMatrixAllowRemoveRow=function(e,t){var i=h.onMatrixAllowRemoveRow(this.obj,e.property,t);return i=this.options.onCollectionItemDeletingCallback(this.obj,e.property,e.value,t.editingObj)&&i,this.options.onCanDeleteItemCallback(this.obj,t.editingObj,i)},e.prototype.onMatrixRowAdded=function(e){var t=e.row.editingObj;r.Serializer.isDescendantOf(t.getType(),"itemvalue")&&this.options.onItemValueAddedCallback(this.obj,e.question.property.name,e.row.editingObj,e.question.value),r.Serializer.isDescendantOf(t.getType(),"matrixdropdowncolumn")&&this.options.onMatrixDropdownColumnAddedCallback(this.obj,e.row.editingObj,e.question.value)},e}(),b=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,i,o,n){var a=this,s=e.createPropertyEditorSetup(i.obj,t,i,o);return s?("condition"!==t.type&&(s.editSurvey.css=r.defaultV2Css),s.editSurvey.onGetMatrixRowActions.add((function(e,t){Object(d.updateMatrixRemoveAction)(t.question,t.actions,t.row)})),r.settings.showModal?(r.settings.showModal("survey",{survey:s.editSurvey,model:s.editSurvey},(function(){return a.onModalPropertyEditorClosed(e,t,i,o,"apply"),n&&n("apply"),s.apply()}),(function(){a.onModalPropertyEditorClosed(e,t,i,o,"cancel"),n&&n("cancel")}),"sv-property-editor",i.title,o.isMobileView?"overlay":"popup"),this.onModalPropertyEditorShown(e,t,i,o),s):s):null},e.prototype.onModalPropertyEditorShown=function(e,t,i,o){},e.prototype.onModalPropertyEditorClosed=function(e,t,i,o,r){},e.prototype.isSupportGrouping=function(){return!1},e.prototype.onUpdateQuestionCssClasses=function(e,t){if(this.isSupportGrouping()){var i=t.question;if(i&&i.parent){var o=i.parent.elements.indexOf(i);o<1||i.parent.elements[o-1].getType()===i.getType()&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")}}},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e,t){return"boolean"==e.type||"switch"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"boolean",default:!1,renderAs:"checkbox",titleLocation:"hidden"}},t.prototype.isSupportGrouping=function(){return!0},t}(b),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t}(b),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"string"==e.type},t.prototype.isDefault=function(){return!0},t.prototype.getJSON=function(e,t,i){var o=this.updateMaxLength(t,{type:"text"});return"name"==t.name&&(o.textUpdateMode="onBlur"),o},t}(w),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"number"==e.type},t.prototype.getJSON=function(e,t,i){var o={type:"text",inputType:"number",textUpdateMode:"onBlur"};return void 0!==t.minValue&&(o.min=t.minValue),void 0!==t.maxValue&&(o.max=t.maxValue),o},t}(b),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"text"===e.type},t.prototype.getJSON=function(e,t,i){return this.updateMaxLength(t,{type:"comment"})},t}(w),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"html"===e.type},t.prototype.getJSON=function(e,t,i){return this.updateMaxLength(t,{type:"comment"})},t}(w),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"text",inputType:"color"}},t}(b),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"string[]"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"comment"}},t.prototype.onCreated=function(e,t,i){t.valueFromDataCallback=function(e){return Array.isArray(e)?e.join("\n"):""},t.valueToDataCallback=function(e){return e?Array.isArray(e)&&!e.split?e:e.split("\n"):[]}},t}(b),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return this.isLocaleProp(e)||e.hasChoices},t.prototype.getJSON=function(e,t,i){var o=t.getChoices(e),r={type:this.renderAsButtonGroup(t,o)?"buttongroup":"dropdown",choices:o,showOptionsCaption:!1},n=this.getEmptyJsonItemValue(t,o);return n&&(r.showOptionsCaption=!0,r.optionsCaption=n.text),r},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return u.settings.propertyGrid.useButtonGroup},enumerable:!1,configurable:!0}),t.prototype.renderAsButtonGroup=function(e,t){if(this.isLocaleProp(e))return!1;if(!this.canRenderAsButtonGroup||!t||0==t.length||t.length>4)return!1;for(var i=0,o=0;o<t.length;o++){var r=this.getLocalizedText(e,t[o].value?t[o].value:t[o]);i+=r?r.length:0}return i<u.settings.propertyGrid.maxCharsInButtonGroup},t.prototype.onCreated=function(e,t,i){this.setChoices(e,t,i),t.displayValueCallback=function(e){return e||t.optionsCaption}},t.prototype.onMasterValueChanged=function(e,t,i){this.setChoices(e,i,t)},t.prototype.setChoicesCore=function(e,t,i){i&&Array.isArray(i)&&0!=i.length&&(e.choices=this.choicesFromPropChoices(t,i))},t.prototype.isLocaleProp=function(e){return"locale"===e.name},t.prototype.getLocalizedText=function(e,t){var i;return this.isLocaleProp(e)&&(i=n.editorLocalization.getLocaleName(t))||"cellType"===e.name&&(i=n.editorLocalization.getString("qt."+t))?i:null===t?null:n.editorLocalization.getPropertyValue(t)},t.prototype.choicesFromPropChoices=function(e,t){for(var i=[],o=0;o<t.length;o++){var n=this.getJsonItem(e,t[o]);r.Helpers.isValueEmpty(n.value)||i.push(n)}return i},t.prototype.getJsonItem=function(e,t){var i={value:void 0!==t.value?t.value:t},o=t.text?t.text:"";return o||(o=this.getLocalizedText(e,i.value)),o&&o!=i.value&&(i.text=o),i},t.prototype.setChoices=function(e,t,i){var o=this,r=i.getChoices(e,(function(e){o.setChoicesCore(t,i,e)}));this.setChoicesCore(t,i,r)},t.prototype.getEmptyJsonItemValue=function(e,t){if(!t)return null;for(var i=0;i<t.length;i++){var o=t[i],n=void 0!==o.value?o.value:o;if(r.Helpers.isValueEmpty(n))return this.getJsonItem(e,o)}return null},t}(b),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"set"==e.type||"multiplevalues"==e.type},t.prototype.getJSON=function(t,i,o){var n=e.prototype.getJSON.call(this,t,i,o),a=!!r.Serializer.findClass("tagbox");return n.type=a?"tagbox":"checkbox",n.hasSelectAll=!a,n},t}(N),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return e.hasChoices&&"page"==e.name},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCreated=function(t,i,o){e.prototype.onCreated.call(this,t,i,o),i.valueFromDataCallback=function(e){return e?e.name:""},i.valueToDataCallback=function(e){if(e&&t&&t.getSurvey())return t.getSurvey().getPageByName(e)}},t}(N),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"dropdown",optionsCaption:n.editorLocalization.getString("pe.conditionSelectQuestion"),choices:this.getChoices(e,t,i)}},t.prototype.getChoices=function(e,t,i){var o=this,r=a.EditableObject.getSurvey(e);if(!r)return[];var n=this.getQuestions(r,e);n||(n=[]);var s=!!i&&i.showTitlesInExpressions,l=n.map((function(e){var t=s?e.locTitle.renderedHtml:e.name;return{value:o.getItemValue(e),text:t}}));return p.SurveyHelper.sortItems(l),l},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(b),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"question_selectbase"==e.type},t.prototype.getQuestions=function(t,i){for(var o=e.prototype.getQuestions.call(this,t,i),n=[],a=0;a<o.length;a++)o[a]!==i&&r.Serializer.isDescendantOf(o[a].getType(),"selectbase")&&n.push(o[a]);return n},t}(A),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"questionvalue"==e.type},t.prototype.getItemValue=function(e){return e.getValueName()},t}(A);h.register(new x),h.register(new T),h.register(new k),h.register(new E),h.register(new S),h.register(new P),h.register(new N),h.register(new O),h.register(new _),h.register(new C),h.register(new A),h.register(new j),h.register(new V),r.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new r.QuestionButtonGroupModel(e)}))},"./src/property-grid/matrices.ts":
|
|
484
|
+
/*! exports provided: setSurveyJSONForPropertyGrid, PropertyEditorSetupValue, PropertyGridEditorCollection, PropertyGridTitleActionsCreator, PropertyJSONGenerator, PropertyGridModel, PropertyGridEditor, PropertyGridEditorBoolean, PropertyGridEditorStringBase, PropertyGridEditorString, PropertyGridEditorNumber, PropertyGridEditorText, PropertyGridEditorHtml, PropertyGridEditorColor, PropertyGridEditorStringArray, PropertyGridEditorDropdown, PropertyGridEditorSet, PropertyGridEditorPage, PropertyGridEditorQuestion, PropertyGridEditorQuestionSelectBase, PropertyGridEditorQuestionValue */function(e,t,i){"use strict";i.r(t),i.d(t,"setSurveyJSONForPropertyGrid",(function(){return m})),i.d(t,"PropertyEditorSetupValue",(function(){return g})),i.d(t,"PropertyGridEditorCollection",(function(){return h})),i.d(t,"PropertyGridTitleActionsCreator",(function(){return v})),i.d(t,"PropertyJSONGenerator",(function(){return y})),i.d(t,"PropertyGridModel",(function(){return f})),i.d(t,"PropertyGridEditor",(function(){return b})),i.d(t,"PropertyGridEditorBoolean",(function(){return x})),i.d(t,"PropertyGridEditorStringBase",(function(){return w})),i.d(t,"PropertyGridEditorString",(function(){return T})),i.d(t,"PropertyGridEditorNumber",(function(){return S})),i.d(t,"PropertyGridEditorText",(function(){return k})),i.d(t,"PropertyGridEditorHtml",(function(){return P})),i.d(t,"PropertyGridEditorColor",(function(){return E})),i.d(t,"PropertyGridEditorStringArray",(function(){return C})),i.d(t,"PropertyGridEditorDropdown",(function(){return N})),i.d(t,"PropertyGridEditorSet",(function(){return O})),i.d(t,"PropertyGridEditorPage",(function(){return _})),i.d(t,"PropertyGridEditorQuestion",(function(){return A})),i.d(t,"PropertyGridEditorQuestionSelectBase",(function(){return V})),i.d(t,"PropertyGridEditorQuestionValue",(function(){return j}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),a=i(/*! ../editable-object */"./src/editable-object.ts"),s=i(/*! ../property-grid-theme/property-grid */"./src/property-grid-theme/property-grid.ts"),l=i(/*! ../question-editor/properties */"./src/question-editor/properties.ts"),u=i(/*! ../settings */"./src/settings.ts"),c=i(/*! ./properties-helptext */"./src/property-grid/properties-helptext.ts"),d=i(/*! ../utils/actions */"./src/utils/actions.ts"),p=i(/*! ../survey-helper */"./src/survey-helper.ts");function m(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!0),e.showNavigationButtons="none",e.showPageTitles=!1,e.focusFirstQuestionAutomatic=!1,e.showQuestionNumbers="off",i&&(e.questionTitleLocation="left"),e.showProgressBar="off",t&&(e.textUpdateMode="onTyping"),e.requiredText=""}r.FunctionFactory.Instance.register("propertyVisibleIf",(function(e){return!!(this.question&&this.question.obj&&this.question.property)&&this.question.property.visibleIf(this.question.obj)}));var g=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!0),this.options=e,this.options||(this.options=new u.EmptySurveyCreatorOptions),t&&this.setupSurvey()}return e.prototype.setupSurvey=function(){this.editSurveyValue=this.createSurvey()},Object.defineProperty(e.prototype,"editSurvey",{get:function(){return this.editSurveyValue},enumerable:!1,configurable:!0}),e.prototype.hasErrors=function(){return this.editSurvey.hasErrors(!0,!0)},e.prototype.createSurvey=function(){var e=this.getSurveyJSON();return m(e,!0,!1),this.options.createSurvey(e,this.getSurveyCreationReason())},e.prototype.dispose=function(){this.editSurvey&&this.editSurvey.dispose()},e}(),h={editors:new Array,fitHash:{},clearHash:function(){this.fitHash={}},register:function(e){this.editors.push(e)},getEditor:function(e,t){if(!e)return null;if(t)for(var i=this.editors.length-1;i>=0;i--){var o=this.editors[i];if(o.fit(e,t))return o}var r=this.fitHash[e.id];if(r)return r;var n=this.isEditorFit(e);return n||this.isEditorFit(e,!0)},isEditorFit:function(e,t){void 0===t&&(t=!1);for(var i=this.editors.length-1;i>=0;i--){var o=this.editors[i];if(!t&&o.fit(e)||t&&o.isDefault&&o.isDefault())return this.fitHash[e.id]=o,o}return null},getJSON:function(e,t,i,o){var r=this.getEditor(t,o);return r?r.getJSON(e,t,i):null},onCreated:function(e,t,i,o){var r=this.getEditor(i);r&&r.onCreated&&r.onCreated(e,t,i,o)},onAfterRenderQuestion:function(e,t,i){var o=this.getEditor(t);o&&o.onAfterRenderQuestion&&o.onAfterRenderQuestion(e,t,i)},onMatrixCellCreated:function(e,t,i){var o=this.getEditor(t);o&&o.onMatrixCellCreated&&o.onMatrixCellCreated(i.question.obj,i)},onMatrixCellValueChanged:function(e,t,i){var o=this.getEditor(t);o&&o.onMatrixCellValueChanged&&o.onMatrixCellValueChanged(e,i);var r=i.row;if(r){var n=r.getQuestionByName(i.columnName);n&&r.runCondition({},{question:n})}},onMatrixAllowRemoveRow:function(e,t,i){var o=this.getEditor(t);return!o||!o.onMatrixAllowRemoveRow||o.onMatrixAllowRemoveRow(e,i)},onGetMatrixRowAction:function(e,t,i,o){var r=this.getEditor(t);r&&r.onGetMatrixRowAction&&r.onGetMatrixRowAction(e,i,o)},onUpdateQuestionCssClasses:function(e,t,i){var o=this.getEditor(t);o&&o.onUpdateQuestionCssClasses&&o.onUpdateQuestionCssClasses(e,i)},onGetQuestionTitleActions:function(e,t,i){var o=this.getEditor(t);o&&o.onGetQuestionTitleActions&&o.onGetQuestionTitleActions(e,i)},onValueChanged:function(e,t,i){var o=this.getEditor(t);o&&o.onValueChanged&&o.onValueChanged(e,t,i)},onMasterValueChanged:function(e,t,i){var o=this.getEditor(t);o&&o.onMasterValueChanged&&o.onMasterValueChanged(e,t,i)}},v=function(){function e(e,t){this.obj=e,this.options=t}return e.prototype.onGetQuestionTitleActions=function(e){var t=e.question,i=t.property,o=h.getEditor(i);if(o){var r=[],n=!t.isReadOnly;!!o.clearPropertyValue&&(!o.canClearPropertyValue||o.canClearPropertyValue(this.obj,i,t,this.options))&&r.push(this.createClearValueAction(o,i,t,n)),o.createPropertyEditorSetup&&(n&&(n=!o.isPropertyEditorSetupEnabled||o.isPropertyEditorSetupEnabled(this.obj,i,e.question,this.options)),r.push(this.createEditorSetupAction(o,i,t,n)));var a=this.createPropertyHelpAction(t);a&&r.push(a),r.length>0&&(e.titleActions=r)}},e.prototype.createClearValueAction=function(e,t,i,o){var a=this;return{id:"property-grid-clear",title:Object(n.getLocString)("pe.clear"),showTitle:!1,iconName:"icon-clear",css:"spg-action-button spg-action-button--danger",enabled:o,visible:new r.ComputedUpdater((function(){var e=i.obj[t.name];return Array.isArray(e)?e.length>0:!!e})),action:function(){e.clearPropertyValue(i.obj,t,i,a.options)}}},e.prototype.showModalPropertyEditor=function(e,t,i){return e.showModalPropertyEditor(e,t,i,this.options)},e.prototype.createEditorSetupAction=function(e,t,i,o){var r=this;return{id:"property-grid-setup",iconName:t.isArray?"icon-fast-entry":"icon-wizard",css:"spg-action-button",enabled:o,title:Object(n.getLocString)("pe.edit"),showTitle:!1,action:function(){return r.showModalPropertyEditor(e,t,i)}}},e.prototype.createPropertyHelpAction=function(e){var t=this;if(!e.description)return null;var i=new r.Action({title:"",id:"property-grid-help",css:"spg-action-button",iconName:this.getHelpActionIconName(e),showTitle:!1,action:function(){e.descriptionLocation="hidden"!=e.descriptionLocation?"hidden":"underTitle",i.iconName=t.getHelpActionIconName(e)}});return i},e.prototype.getHelpActionIconName=function(e){return"hidden"!=e.descriptionLocation?"icon-description-hide":"icon-description"},e}(),y=function(){function e(e,t,i,o){void 0===t&&(t=null),void 0===i&&(i=null),void 0===o&&(o=null),this.obj=e,this.options=t,this.parentObj=i,this.parentProperty=o}return e.isPropertyReadOnly=function(e,t,i,o,r){var n=e.readOnly;return t&&i&&(n=t.onIsPropertyReadOnlyCallback(i,e,n,o,r)),n},e.getClassNameProperty=function(e){if(e&&e.getClassNameProperty)return e.getClassNameProperty()},e.prototype.toJSON=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=void 0),this.createJSON(e,t)},e.prototype.createColumnsJSON=function(e,t){for(var i=[],o=0;o<t.length;o++){var r=this.getColumnPropertyJSON(e,t[o]);r&&i.push(r)}return i},e.prototype.setupObjPanel=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=void 0),e.fromJSON(this.toJSON(t,i)),this.onQuestionsCreated(e)},e.prototype.onQuestionsCreated=function(e){for(var t=r.Serializer.getPropertiesByObj(this.obj),i={},o=0;o<t.length;o++)i[t[o].name]=t[o];var n=e.questions;for(o=0;o<n.length;o++){var a=n[o],s=i[a.name];a.property=s,a.obj=this.obj,a.options=this.options;var l=this.getVisibilityOnEvent(s);a.readOnly=a.readOnly||this.isPropertyReadOnly(s),a.visible=a.visible&&l,s.visibleIf&&(a.visibleIf=l?"propertyVisibleIf() = true":""),a.descriptionLocation="hidden";var u=c.PropertiesHelpTexts.instance.getHelpText(this.obj,s);u&&(a.description=u),h.onCreated(this.obj,a,s,this.options),this.options.onPropertyEditorCreatedCallback(this.obj,s,a)}},e.prototype.getVisibilityOnEvent=function(e,t){return void 0===t&&(t=""),this.options.onCanShowPropertyCallback(this.obj,e,t,this.parentObj,this.parentProperty)},e.prototype.isPropertyReadOnly=function(t){return e.isPropertyReadOnly(t,this.options,this.obj,this.parentObj,this.parentProperty)},e.prototype.getClasPropName=function(){if(this.parentObj&&this.parentProperty)return this.parentProperty.name;var t=e.getClassNameProperty(this.obj);return t&&this.obj[t]?this.obj[t]:void 0},e.prototype.createJSON=function(e,t){void 0===t&&(t=void 0);var i=void 0,o=this.getClasPropName();o&&("itemvalue"===(i=this.obj.getType())&&(i+="[]"),i+="@"+o);for(var r=new l.SurveyQuestionProperties(this.obj,null,i,void 0,this.parentObj,this.parentProperty).getTabs(),n={},a=0;a<r.length;a++)!1!==r[a].visible&&(n[r[a].name]=this.createPanelProps(r[a],0==a,t));var s={elements:[]};for(var c in n)if(c==u.settings.propertyGrid.generalTabName&&e){var d=n[c].elements;for(a=0;a<d.length;a++)s.elements.push(d[a])}else s.elements.push(n[c]);return s},e.prototype.createPanelProps=function(e,t,i){for(var o=this.createPanelJSON(e.name,e.title,t),r=0;r<e.properties.length;r++){var n=e.properties[r],a=this.createQuestionJSON(n.property,n.title,!1,i);n.onSameLine&&(a.startWithNewLine=!1,this.updateQuestionJSONOnSameLine(a),o.elements.length>0&&this.updateQuestionJSONOnSameLine(o.elements[o.elements.length-1])),a&&o.elements.push(a)}return o},e.prototype.updateQuestionJSONOnSameLine=function(e){e.titleLocation="left",e.minWidth="50px"},e.prototype.createPanelJSON=function(e,t,i){return{type:"panel",name:e,title:this.getPanelTitle(e,t),state:i?"expanded":"collapsed",elements:[]}},e.prototype.createQuestionJSON=function(e,t,i,o){if(void 0===i&&(i=!1),!this.isPropertyVisible(e,i?"list":"")&&i)return null;var r=h.getJSON(this.obj,e,this.options,o);return r?(r.name=e.name,r.visible=e.visible,r.isReadOnly=e.readOnly,r.isRequired=e.isRequired,r.requiredErrorText=n.editorLocalization.getString("pe.propertyIsEmpty"),r.title=this.getQuestionTitle(e,t),r):null},e.prototype.getColumnPropertyJSON=function(e,t){if(!e)return null;var i=r.Serializer.findProperty(e,t);if(!i)return null;var o=this.createQuestionJSON(i,"",!0,void 0);return o?(o.name=i.name,o.title=this.getQuestionTitle(i,""),i.isUnique&&(o.isUnique=i.isUnique),o.type&&(o.cellType=o.type,delete o.type),"buttongroup"===o.cellType&&(o.cellType="dropdown"),i.visibleIf&&(o.visibleIf="propertyVisibleIf() = true"),o.isReadOnly&&(o.readOnly=o.isReadOnly,delete o.isReadOnly),o):null},e.prototype.isPropertyVisible=function(e,t){return!(!e.visible||t&&e.showMode&&t!=e.showMode)},e.prototype.getPanelTitle=function(e,t){return t||n.editorLocalization.getString("pe.tabs."+e)},e.prototype.getQuestionTitle=function(e,t){return e.displayName?e.displayName:t&&t!==e.name?t:n.editorLocalization.getPropertyNameInEditor(e.name)},e}(),f=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=new u.EmptySurveyCreatorOptions),this.isCellCreating=!1,this.options=t,this.obj=e}return e.prototype.refresh=function(){this.setObj(this.objValue)},Object.defineProperty(e.prototype,"obj",{get:function(){return this.objValue},set:function(e){this.objValue!==e&&this.setObj(e)},enumerable:!1,configurable:!0}),e.prototype.selectProperty=function(e,t){if(void 0===t&&(t=!0),this.survey){var i=this.survey.getQuestionByName(e);if(i){for(var o=this.survey.getAllPanels(),r=0;r<o.length;r++){var n=o[r];n===i.parent?n.expand():n.collapse()}t&&i.focus()}}},e.prototype.setObjFromAction=function(e,t){this.changedFromActionCallback?this.changedFromActionCallback(e,t):this.setObj(e)},e.prototype.setObj=function(e){var t=this;this.objValue=e,this.classNameProperty=this.obj?y.getClassNameProperty(this.obj):"",this.classNameValue=this.classNameProperty?this.obj[this.classNameProperty]:void 0,this.titleActionsCreator=this.obj?new v(this.obj,this.options):void 0;var i=this.getSurveyJSON();this.options.readOnly&&(i.mode="display"),this.surveyValue&&this.surveyValue.dispose(),this.surveyValue=this.createSurvey(i),this.surveyValue.css=s.propertyGridCss;var o=this.surveyValue.createNewPage("p1");this.obj&&(new y(this.obj,this.options).setupObjPanel(o,!1),this.survey.addPage(o),this.survey.checkErrorsMode="onValueChanging",this.survey.onValueChanged.add((function(e,i){t.onValueChanged(i)})),this.survey.onValueChanging.add((function(e,i){t.onValueChanging(i)})),this.survey.onValidateQuestion.add((function(e,i){t.onValidateQuestion(i)})),this.survey.onGetQuestionTitleActions.add((function(e,i){t.titleActionsCreator.onGetQuestionTitleActions(i),t.onGetQuestionTitleActions(i);var o=i.question;t.options.onPropertyEditorUpdateTitleActionsCallback(t.obj,o.property,o,i.titleActions)})),this.survey.onGetPanelTitleActions.add((function(e,t){t.titleActions.splice(0,t.titleActions.length)})),this.survey.onMatrixCellCreated.add((function(e,i){t.onMatrixCellCreated(i)})),this.survey.onMatrixCellValueChanging.add((function(e,i){t.onMatrixCellValueChanging(i)})),this.survey.onMatrixCellValidate.add((function(e,i){t.onMatrixCellValidate(i)})),this.survey.onMatrixCellValueChanged.add((function(e,i){t.onMatrixCellValueChanged(i)})),this.survey.onMatrixAllowRemoveRow.add((function(e,i){i.allow=t.getMatrixAllowRemoveRow(i.question,i.row)})),this.survey.onMatrixRowAdded.add((function(e,i){t.onMatrixRowAdded(i)})),this.survey.onGetMatrixRowActions.add((function(e,i){t.onGetMatrixRowAction(i)})),this.survey.onUpdateQuestionCssClasses.add((function(e,i){t.onUpdateQuestionCssClasses(i)})),this.survey.onAfterRenderQuestion.add((function(e,i){t.onAfterRenderQuestion(i)})),this.survey.editingObj=this.obj,this.objValueChangedCallback&&this.objValueChangedCallback(),this.updateDependedPropertiesEditors(),this.survey.onFocusInPanel.add((function(e,i){t.currentlySelectedPanel!==i.panel&&(t.currentlySelectedProperty=i.panel.getFirstQuestionToFocus().name,t.currentlySelectedPanel=i.panel)})),this.survey.onFocusInQuestion.add((function(e,i){t.currentlySelectedProperty=i.question.name,t.currentlySelectedPanel=i.question.parent})))},Object.defineProperty(e.prototype,"options",{get:function(){return this.optionsValue},set:function(e){this.optionsValue=e||new u.EmptySurveyCreatorOptions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"survey",{get:function(){return this.surveyValue},enumerable:!1,configurable:!0}),e.prototype.validate=function(){if(this.survey)return!this.survey.hasErrors(!0,!0)},e.prototype.collapseCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.collapse()},e.prototype.expandCategory=function(e){var t=this.survey.getPanelByName(e);t&&t.expand()},e.prototype.collapseAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].collapse()},e.prototype.expandAllCategories=function(){for(var e=this.survey.getAllPanels(),t=0;t<e.length;t++)e[t].expand()},e.prototype.createSurvey=function(e){return this.options.createSurvey(e,"property-grid")},e.prototype.getSurveyJSON=function(){var e={};return m(e,!0,!1),e},e.prototype.onValidateQuestion=function(e){var t=e.question;t&&t.property&&(t.isRequired&&r.Helpers.isValueEmpty(e.value)?e.error=n.editorLocalization.getString("pe.propertyIsEmpty"):e.error=this.options.onGetErrorTextOnValidationCallback(t.property.name,this.obj,e.value))},e.prototype.onValueChanging=function(e){var t=e.question;if(t&&t.property){var i={obj:this.obj,propertyName:t.property.name,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(i),e.value=i.newValue}},e.prototype.onValueChanged=function(e){var t=e.question;t&&t.property&&(this.changeDependedProperties(t),h.onValueChanged(this.obj,t.property,t),this.classNameProperty&&e.name===this.classNameProperty&&this.classNameValue!==e.value&&this.setObj(this.obj))},e.prototype.changeDependedProperties=function(e){var t=e.property.getDependedProperties();if(t)for(var i=0;i<t.length;i++){var o=t[i],n=this.survey.getQuestionByName(o);n&&(this.updateDependedPropertiesEditor(n),r.Helpers.isTwoValueEquals(n.value,this.survey.getValue(o))||(n.value=this.survey.getValue(o)),h.onMasterValueChanged(this.obj,n.property,n))}},e.prototype.updateDependedPropertiesEditor=function(e){var t=e.obj;if(t){var i=e.property;i&&i.onPropertyEditorUpdate&&i.onPropertyEditorUpdate(t,e)}},e.prototype.updateDependedPropertiesEditors=function(){for(var e=this.survey.getAllQuestions(),t=0;t<e.length;t++)this.updateDependedPropertiesEditor(e[t])},e.prototype.onAfterRenderQuestion=function(e){h.onAfterRenderQuestion(this.obj,e.question.property,e)},e.prototype.onMatrixCellCreated=function(e){this.isCellCreating=!0,h.onMatrixCellCreated(this.obj,e.question.property,e),this.isCellCreating=!1;var t=e.row.editingObj;if(t){var i=r.Serializer.findProperty(t.getType(),e.columnName);if(i){var o=this.getMatrixAllowEditRow(e.question,e.row);e.cellQuestion.readOnly=!o||y.isPropertyReadOnly(i,this.options,t,this.obj,e.question.property)}}},e.prototype.onMatrixCellValueChanging=function(e){if(!this.isCellCreating){var t={obj:e.row.editingObj,propertyName:e.columnName,value:e.oldValue,newValue:e.value,doValidation:!1};this.options.onValueChangingCallback(t),e.value=t.newValue}},e.prototype.onMatrixCellValidate=function(e){if(!this.isCellCreating){var t=e.question.getColumnByName(e.columnName);t&&t.isRequired&&r.Helpers.isValueEmpty(e.value)?e.error=n.editorLocalization.getString("pe.propertyIsEmpty"):e.error=this.options.onGetErrorTextOnValidationCallback(e.columnName,e.row.editingObj,e.value)}},e.prototype.onGetMatrixRowAction=function(e){var t=this;h.onGetMatrixRowAction(this.obj,e.question.property,e,(function(i){t.setObjFromAction(i,e.question.name)}))},e.prototype.onUpdateQuestionCssClasses=function(e){h.onUpdateQuestionCssClasses(this.obj,e.question.property,e)},e.prototype.onGetQuestionTitleActions=function(e){h.onGetQuestionTitleActions(this.obj,e.question.property,e)},e.prototype.onMatrixCellValueChanged=function(e){this.isCellCreating||h.onMatrixCellValueChanged(this.obj,e.question.property,e)},e.prototype.getMatrixAllowRemoveRow=function(e,t){return void 0===t.allowDeleteRow&&this.calculateMatrixAllowOperations(e,t),t.allowDeleteRow},e.prototype.getMatrixAllowEditRow=function(e,t){return!e.readOnly&&(void 0===t.allowEditRow&&this.calculateMatrixAllowOperations(e,t),t.allowEditRow)},e.prototype.calculateMatrixAllowOperations=function(e,t){var i={allowDelete:this.onMatrixAllowRemoveRow(e,t),allowEdit:!0};this.options.onCollectionItemAllowingCallback(this.obj,e.property,e.value,t.editingObj,i),t.allowDeleteRow=i.allowDelete,t.allowEditRow=i.allowEdit},e.prototype.onMatrixAllowRemoveRow=function(e,t){var i=h.onMatrixAllowRemoveRow(this.obj,e.property,t);return i=this.options.onCollectionItemDeletingCallback(this.obj,e.property,e.value,t.editingObj)&&i,this.options.onCanDeleteItemCallback(this.obj,t.editingObj,i)},e.prototype.onMatrixRowAdded=function(e){var t=e.row.editingObj;r.Serializer.isDescendantOf(t.getType(),"itemvalue")&&this.options.onItemValueAddedCallback(this.obj,e.question.property.name,e.row.editingObj,e.question.value),r.Serializer.isDescendantOf(t.getType(),"matrixdropdowncolumn")&&this.options.onMatrixDropdownColumnAddedCallback(this.obj,e.row.editingObj,e.question.value)},e}(),b=function(){function e(){}return e.prototype.showModalPropertyEditor=function(e,t,i,o,n){var a=this,s=e.createPropertyEditorSetup(i.obj,t,i,o);return s?("condition"!==t.type&&(s.editSurvey.css=r.defaultV2Css),s.editSurvey.onGetMatrixRowActions.add((function(e,t){Object(d.updateMatrixRemoveAction)(t.question,t.actions,t.row)})),r.settings.showModal?(r.settings.showModal("survey",{survey:s.editSurvey,model:s.editSurvey},(function(){return a.onModalPropertyEditorClosed(e,t,i,o,"apply"),n&&n("apply"),s.apply()}),(function(){a.onModalPropertyEditorClosed(e,t,i,o,"cancel"),n&&n("cancel")}),"sv-property-editor",i.title,o.isMobileView?"overlay":"popup"),this.onModalPropertyEditorShown(e,t,i,o),s):s):null},e.prototype.onModalPropertyEditorShown=function(e,t,i,o){},e.prototype.onModalPropertyEditorClosed=function(e,t,i,o,r){},e.prototype.isSupportGrouping=function(){return!1},e.prototype.onUpdateQuestionCssClasses=function(e,t){if(this.isSupportGrouping()){var i=t.question;if(i&&i.parent){var o=i.parent.elements.indexOf(i);o<1||i.parent.elements[o-1].getType()===i.getType()&&(t.cssClasses.mainRoot+=" spg-row-narrow__question")}}},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e,t){return"boolean"==e.type||"switch"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"boolean",default:!1,renderAs:"checkbox",titleLocation:"hidden"}},t.prototype.isSupportGrouping=function(){return!0},t}(b),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.updateMaxLength=function(e,t){return e.maxLength>0&&(t.maxLength=e.maxLength),t},t}(b),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"string"==e.type},t.prototype.isDefault=function(){return!0},t.prototype.getJSON=function(e,t,i){var o=this.updateMaxLength(t,{type:"text"});return"name"==t.name&&(o.textUpdateMode="onBlur"),o},t}(w),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"number"==e.type},t.prototype.getJSON=function(e,t,i){var o={type:"text",inputType:"number",textUpdateMode:"onBlur"};return void 0!==t.minValue&&(o.min=t.minValue),void 0!==t.maxValue&&(o.max=t.maxValue),o},t}(b),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"text"===e.type},t.prototype.getJSON=function(e,t,i){return this.updateMaxLength(t,{type:"comment"})},t}(w),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"html"===e.type},t.prototype.getJSON=function(e,t,i){return this.updateMaxLength(t,{type:"comment"})},t}(w),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"color"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"text",inputType:"color"}},t}(b),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"string[]"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"comment"}},t.prototype.onCreated=function(e,t,i){t.valueFromDataCallback=function(e){return Array.isArray(e)?e.join("\n"):""},t.valueToDataCallback=function(e){return e?Array.isArray(e)&&!e.split?e:e.split("\n"):[]}},t}(b),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return this.isLocaleProp(e)||e.hasChoices},t.prototype.getJSON=function(e,t,i){var o=t.getChoices(e),r={type:this.renderAsButtonGroup(t,o)?"buttongroup":"dropdown",choices:o,showOptionsCaption:!1},n=this.getEmptyJsonItemValue(t,o);return n&&(r.showOptionsCaption=!0,r.optionsCaption=n.text),r},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return u.settings.propertyGrid.useButtonGroup},enumerable:!1,configurable:!0}),t.prototype.renderAsButtonGroup=function(e,t){if(this.isLocaleProp(e))return!1;if(!this.canRenderAsButtonGroup||!t||0==t.length||t.length>4)return!1;for(var i=0,o=0;o<t.length;o++){var r=this.getLocalizedText(e,t[o].value?t[o].value:t[o]);i+=r?r.length:0}return i<u.settings.propertyGrid.maxCharsInButtonGroup},t.prototype.onCreated=function(e,t,i){this.setChoices(e,t,i),t.displayValueCallback=function(e){return e||t.optionsCaption}},t.prototype.onMasterValueChanged=function(e,t,i){this.setChoices(e,i,t)},t.prototype.setChoicesCore=function(e,t,i){i&&Array.isArray(i)&&0!=i.length&&(e.choices=this.choicesFromPropChoices(t,i))},t.prototype.isLocaleProp=function(e){return"locale"===e.name},t.prototype.getLocalizedText=function(e,t){var i;return this.isLocaleProp(e)&&(i=n.editorLocalization.getLocaleName(t))||"cellType"===e.name&&(i=n.editorLocalization.getString("qt."+t))?i:null===t?null:n.editorLocalization.getPropertyValue(t)},t.prototype.choicesFromPropChoices=function(e,t){for(var i=[],o=0;o<t.length;o++){var n=this.getJsonItem(e,t[o]);r.Helpers.isValueEmpty(n.value)||i.push(n)}return i},t.prototype.getJsonItem=function(e,t){var i={value:void 0!==t.value?t.value:t},o=t.text?t.text:"";return o||(o=this.getLocalizedText(e,i.value)),o&&o!=i.value&&(i.text=o),i},t.prototype.setChoices=function(e,t,i){var o=this,r=i.getChoices(e,(function(e){o.setChoicesCore(t,i,e)}));this.setChoicesCore(t,i,r)},t.prototype.getEmptyJsonItemValue=function(e,t){if(!t)return null;for(var i=0;i<t.length;i++){var o=t[i],n=void 0!==o.value?o.value:o;if(r.Helpers.isValueEmpty(n))return this.getJsonItem(e,o)}return null},t}(b),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"set"==e.type||"multiplevalues"==e.type},t.prototype.getJSON=function(t,i,o){var n=e.prototype.getJSON.call(this,t,i,o),a=!!r.Serializer.findClass("tagbox");return n.type=a?"tagbox":"checkbox",n.hasSelectAll=!a,n},t}(N),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return e.hasChoices&&"page"==e.name},Object.defineProperty(t.prototype,"canRenderAsButtonGroup",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.onCreated=function(t,i,o){e.prototype.onCreated.call(this,t,i,o),i.valueFromDataCallback=function(e){return e?e.name:""},i.valueToDataCallback=function(e){if(e&&t&&t.getSurvey())return t.getSurvey().getPageByName(e)}},t}(N),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"question"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"dropdown",optionsCaption:n.editorLocalization.getString("pe.conditionSelectQuestion"),choices:this.getChoices(e,t,i)}},t.prototype.getChoices=function(e,t,i){var o=this,r=a.EditableObject.getSurvey(e);if(!r)return[];var n=this.getQuestions(r,e);n||(n=[]);var s=!!i&&i.showTitlesInExpressions,l=n.map((function(e){var t=s?e.locTitle.renderedHtml:e.name;return{value:o.getItemValue(e),text:t}}));return p.SurveyHelper.sortItems(l),l},t.prototype.getQuestions=function(e,t){return e.getAllQuestions()},t.prototype.getItemValue=function(e){return e.name},t}(b),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"question_selectbase"==e.type},t.prototype.getQuestions=function(t,i){for(var o=e.prototype.getQuestions.call(this,t,i),n=[],a=0;a<o.length;a++)o[a]!==i&&r.Serializer.isDescendantOf(o[a].getType(),"selectbase")&&n.push(o[a]);return n},t}(A),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"questionvalue"==e.type},t.prototype.getItemValue=function(e){return e.getValueName()},t}(A);h.register(new x),h.register(new T),h.register(new S),h.register(new E),h.register(new k),h.register(new P),h.register(new N),h.register(new O),h.register(new _),h.register(new C),h.register(new A),h.register(new j),h.register(new V),r.QuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return new r.QuestionButtonGroupModel(e)}))},"./src/property-grid/matrices.ts":
|
|
481
485
|
/*!***************************************!*\
|
|
482
486
|
!*** ./src/property-grid/matrices.ts ***!
|
|
483
487
|
\***************************************/
|
|
484
|
-
/*! exports provided: PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings */function(e,t,i){"use strict";i.r(t),i.d(t,"PropertyGridEditorMatrix",(function(){return p})),i.d(t,"PropertyGridEditorMatrixItemValues",(function(){return m})),i.d(t,"PropertyGridEditorMatrixColumns",(function(){return g})),i.d(t,"PropertyGridEditorMatrixPages",(function(){return h})),i.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return v})),i.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return y})),i.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return f})),i.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return b})),i.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return x})),i.d(t,"PropertyGridEditorMatrixValidators",(function(){return w})),i.d(t,"PropertyGridEditorMatrixTriggers",(function(){return T})),i.d(t,"PropertyGridEditorBindings",(function(){return k}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),a=i(/*! ../question-editor/properties */"./src/question-editor/properties.ts"),s=i(/*! ../utils/utils */"./src/utils/utils.ts"),l=i(/*! ./fast-entry */"./src/property-grid/fast-entry.ts"),u=i(/*! ./index */"./src/property-grid/index.ts"),c=i(/*! ../utils/actions */"./src/utils/actions.ts"),d=function(){function e(){}return e.getNewColumnName=function(e,t,i){var o=[];if(Array.isArray(e))for(var r=0;r<e.length;r++)o.push(e[r][t]);return Object(s.getNextValue)(i,o)},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.onCreated=function(e,t,i){var o=this;t.onGetValueForNewRowCallBack=function(e){return o.createNewItem(e,i)},this.setupMatrixQuestion(e,t,i)},t.prototype.initializePlaceholder=function(e,t,i){var o="function"==typeof e.getType&&e.getType();"text"===t.getType()&&o&&("text"===i&&"itemvalue"===o&&(t.placeHolder=new r.ComputedUpdater((function(){return e.text}))),"title"===i&&"matrixdropdowncolumn"===o&&(t.placeHolder=new r.ComputedUpdater((function(){return e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var i=t.row.editingObj;if(i){var o=t.cellQuestion;o.obj=i,this.initializePlaceholder(i,o,t.columnName),o.property=r.Serializer.findProperty(i.getType(),t.columnName)}},t.prototype.onGetMatrixRowAction=function(e,t,i){var o=this,r=t.question,a=t.row,s=t.actions;this.getEditItemAsStandAlone()&&s.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:n.editorLocalization.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",css:"spg-action-button",action:function(){var e=t.row.editingObj;i(e)}});var l=s.filter((function(e){return"show-detail"===e.id}))[0];Object(c.updateMatrixRemoveAction)(r,s,a),l&&(l.component="sv-action-bar-item",l.css="spg-action-button",l.iconName=this.getShowDetailActionIconName(a),l.showTitle=!1,l.location="end",l.action=function(){a.showHideDetailPanelClick(),l.iconName=a.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},l.visibleIndex=0,a.onDetailPanelShowingChanged=function(){l.iconName=o.getShowDetailActionIconName(a)})},t.prototype.getShowDetailActionIconName=function(e){return e.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},t.prototype.onGetQuestionTitleActions=function(e,t){var i=t.question;t.titleActions.push({id:"add-item",iconName:"icon-add",css:"spg-action-button",title:i.addRowText,showTitle:!1,action:function(){i.addRow()},enabled:i.canAddRow})},t.prototype.onValueChanged=function(e,t,i){this.updateTitleActions(i)},t.prototype.updateTitleActions=function(e){var t=e.titleActions.filter((function(e){return"add-item"===e.id}))[0];t&&(t.enabled=e.canAddRow)},t.prototype.createNewItem=function(e,t){var i=this.getBaseValue(t),o=this.getKeyValue();i||(i="item");var n=null;i&&o&&(n=d.getNewColumnName(e.value,o,i));var a=r.Serializer.createClass(this.getDefaultClassName(t),{});n&&(a[o]=n),this.getObjTypeName()&&(a[this.getObjTypeName()]=a.getType());var s=e.obj[t.name];return s.push(a),s!=e.value&&(e.value=s),a},t.prototype.getDefaultClassName=function(e){return e.className},t.prototype.getBaseValue=function(e){return e.getBaseValue()},t.prototype.getKeyValue=function(){return""},t.prototype.getColumnNames=function(e,t,i){var o=this.getPropertiesNames(e,t,i);return o&&o.length>0?o:this.getDefaultListProperties(t)},t.prototype.getColumnClassName=function(e,t){return t.className},t.prototype.getPropertiesNames=function(e,t,i){for(var o=[],r=this.getDefinedListProperties(e,t,i),n=0;n<r.length;n++)o.push(r[n].name);return 0==o.length&&(o=this.getDefaulColumnNames()),o},t.prototype.getDefinedListProperties=function(e,t,i){if(!t.className)return[];var o=r.Serializer.createClass(t.className);if(!o)return[];var n=new a.SurveyQuestionProperties(o,i,this.getColumnClassName(e,t),"list",e,t);return 0==n.getTabs().length?[]:n.getTabs()[0].properties},t.prototype.getDefaultListProperties=function(e){var t=[];if(e&&e.className)for(var i=r.Serializer.getProperties(e.className),o=0;o<i.length;o++)this.isPropertyShownInList(i[o])&&t.push(i[o].name);return t.length>0?t:this.getDefaulColumnNames()},t.prototype.getDefaulColumnNames=function(){return[]},t.prototype.isPropertyShownInList=function(e){return e.visible&&"form"!==e.showMode},t.prototype.getObjTypeName=function(){return""},t.prototype.hasDetailPanel=function(){return!this.getEditItemAsStandAlone()},t.prototype.setupMatrixQuestion=function(e,t,i){var o=this;this.hasPropertiesInDetail=this.hasDetailPanel()&&this.calcHasPropertiesInDetail(t,i),t.onHasDetailPanelCallback=function(e){return!1!==e.allowEditRow&&o.hasPropertiesInDetail},t.onCreateDetailPanelRenderedRowCallback=function(e){e.cells=[e.cells[1]],e.cells[0].colSpans+=2};var r=t;t.onCreateDetailPanelCallback=function(e,t){new u.PropertyJSONGenerator(e.editingObj,r.options,r.obj,r.property).setupObjPanel(t,!0)},t.allowRowsDragAndDrop=this.getAllowRowDragDrop()&&!t.isReadOnly,r.options&&this.setupUsingOptions(e,t,r.options,i)},t.prototype.getAllowRowDragDrop=function(){return!1},t.prototype.calcHasPropertiesInDetail=function(e,t){if(!t.className)return!0;var i=r.Serializer.createClass(t.className);if(!i)return!0;var o=new r.PanelModel("");return new u.PropertyJSONGenerator(i,e.options,e.obj,t).setupObjPanel(o,!0),o.elements.length>0},t.prototype.getJSON=function(e,t,i){return this.getMatrixJSON(e,t,this.getColumnNames(e,t,i),i)},t.prototype.getMatrixJSON=function(e,t,i,o){var r=t.className;r||(r=t.baseClassName);var a={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,columns:this.getColumnsJSON(e,t,i,o),showHeader:!1,addRowText:this.getAddRowText(t),keyDuplicationError:n.editorLocalization.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(a.detailPanelShowOnAdding=!0);var s=this.getMaximumRowCount(e,t,o);return s>0&&(a.maxRowCount=s),a.hideColumnsIfEmpty=this.getHideColumnsEmpty(t),a},t.prototype.getHideColumnsEmpty=function(e){return!1},t.prototype.getEmptyRowsText=function(e){return n.editorLocalization.getString("pe.listIsEmpty")},t.prototype.getMaximumRowCount=function(e,t,i){return-1},t.prototype.getColumnsJSON=function(e,t,i,o){var r=t.className;r||(r=t.baseClassName);for(var n=new u.PropertyJSONGenerator(e,o).createColumnsJSON(r,i),a=0;a<n.length;a++)"comment"==n[a].cellType&&(n[a].cellType="text");return n},t.prototype.getEditItemAsStandAlone=function(){return!1},t.prototype.getShowDetailPanelOnAdding=function(){return!1},t.prototype.getAddRowText=function(e){var t="pe.addNew@"+e.name;return n.editorLocalization.hasString(t)?n.editorLocalization.getString(t):n.editorLocalization.getString("pe.addNew")},t.prototype.setupUsingOptions=function(e,t,i,o){var r={allowAddRemoveItems:!0,allowRemoveAllItems:!0,showTextView:!0};i.onSetPropertyEditorOptionsCallback(o.name,e,r),r.allowAddRemoveItems||(t.allowAddRows=!1,t.allowRemoveRows=!1),t.allowRemoveAllItems=r.allowRemoveAllItems,t.showTextView=r.showTextView},t}(u.PropertyGridEditor),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")},t.prototype.isPropertyEditorSetupEnabled=function(e,t,i,o){if(!1===i.showTextView)return!1;var r=i.getColumnByName("value"),n=i.value;return!!r&&r.isVisible&&!r.readOnly&&!this.hasMultipleLanguage(n)&&!this.hasVisibleIfOrEnableIf(n)},t.prototype.setupMatrixQuestion=function(t,i,o){e.prototype.setupMatrixQuestion.call(this,t,i,o),i.showHeader=!1},t.prototype.getAllowRowDragDrop=function(){return!0},t.prototype.createPropertyEditorSetup=function(e,t,i,o){var r=[];return i.columns.forEach((function(e){r.push(e.name)})),new l.FastEntryEditor(e[t.name],o,t.className,r)},t.prototype.canClearPropertyValue=function(e,t,i,o){return!1!==i.allowRemoveAllItems},t.prototype.clearPropertyValue=function(e,t,i,o){var r=e[t.name];Array.isArray(r)&&r.splice(0,r.length)},t.prototype.getColumnClassName=function(e,t){return e.getType()+"@"+t.name},t.prototype.getDefaulColumnNames=function(){return["value","text"]},t.prototype.getKeyValue=function(){return"value"},t.prototype.getHideColumnsEmpty=function(e){return"choices"===e.name},t.prototype.getEmptyRowsText=function(t){return"choices"===t.name?n.editorLocalization.getString("pe.choicesListIsEmpty"):e.prototype.getEmptyRowsText.call(this,t)},t.prototype.getMaximumRowCount=function(t,i,o){return"choices"===i.name?o.maximumChoicesCount:"rows"===i.name?o.maximumRowsCount:"columns"===i.name?o.maximumColumnsCount:"rateValues"===i.name?o.maximumRateValues:e.prototype.getMaximumRowCount.call(this,t,i,o)},t.prototype.hasMultipleLanguage=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].locText.hasNonDefaultText())return!0;return!1},t.prototype.hasVisibleIfOrEnableIf=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].visibleIf||e[t].enableIf)return!0;return!1},t}(p),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"matrixdropdowncolumns"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"column"},t.prototype.getMaximumRowCount=function(e,t,i){return i.maximumColumnsCount},t.prototype.getAllowRowDragDrop=function(){return!0},t}(p),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"surveypages"==e.type},t.prototype.onMatrixAllowRemoveRow=function(e,t){var i=t.editingObj;if(i&&i.survey)return i.survey.currentPage!==i},t.prototype.getColumnClassName=function(e,t){return"page@"+e.getType()},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.hasDetailPanel=function(){return!1},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"page"},t.prototype.getAllowRowDragDrop=function(){return!0},t}(p),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"calculatedvalues"==e.type},t.prototype.getColumnClassName=function(e,t){return"calculatedvalue@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"var"},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"textitems"==e.type},t.prototype.getColumnClassName=function(e,t){return"multipletext@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"item"},t}(p),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.getColumnsJSON=function(t,i,o,r){var n=e.prototype.getColumnsJSON.call(this,t,i,o,r);return this.getObjTypeName()&&n.unshift({name:this.getObjTypeName(),cellType:"dropdown"}),n},t.prototype.onMatrixCellCreated=function(t,i){e.prototype.onMatrixCellCreated.call(this,t,i);var o=i.cellQuestion;i.columnName===this.getObjTypeName()&&(o.showOptionsCaption=!1,o.choices=this.getChoices(t),o.value=i.row.editingObj.getType())},t.prototype.onMatrixCellValueChanged=function(e,t){if(t.columnName==this.getObjTypeName()){var i=t.question.visibleRows.indexOf(t.row);if(!(i<0)){var o=t.row.isDetailPanelShowing,n=t.row.editingObj.toJSON();delete n.type;var a=r.Serializer.createClass(t.value);a.fromJSON(n),a[this.getObjTypeName()]=a.getType(),t.row.hideDetailPanel(!0),t.question.value.splice(i,1,a),t.row.value=a,o&&t.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"validators"==e.type},t.prototype.getObjTypeName=function(){return"validatorType"},t.prototype.getDefaultClassName=function(e){return"expressionvalidator"},t.prototype.getChoices=function(e){for(var t=this.getSupportedValidators(e),i=[],o=0;o<t.length;o++){var r=t[o]+"validator";i.push({value:r,text:n.editorLocalization.getValidatorName(r)})}return i},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(x),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"triggers"==e.type},t.prototype.getObjTypeName=function(){return"triggerType"},t.prototype.getDefaultClassName=function(e){return"runexpressiontrigger"},t.prototype.getChoices=function(e){for(var t=r.Serializer.getChildrenClasses("surveytrigger",!0),i=[],o=0;o<t.length;o++){var a=t[o].name;"visibletrigger"!=a&&i.push({value:a,text:n.editorLocalization.getTriggerName(a)})}return i},t}(x),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"bindings"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"matrixdropdown",rows:this.getRows(e),columns:this.getColumns(e,i)}},t.prototype.onMatrixCellCreated=function(e,t){var i=e.bindings.getValueNameByPropertyName(t.row.rowName);i&&(t.cellQuestion.value=i)},t.prototype.onMatrixCellValueChanged=function(e,t){e.bindings.setBinding(t.row.rowName,t.value)},t.prototype.getRows=function(e){for(var t=e.bindings.getProperties(),i=[],o=0;o<t.length;o++){var r=t[o].name;i.push({value:r,text:n.editorLocalization.getPropertyName(r)})}return i},t.prototype.getColumns=function(e,t){var i=new r.JsonObjectProperty(null,"value");i.type="questionvalue";var o=u.PropertyGridEditorCollection.getJSON(e,i,t);return o.cellType=o.type,delete o.type,o.name="value",[o]},t}(u.PropertyGridEditor);u.PropertyGridEditorCollection.register(new m),u.PropertyGridEditorCollection.register(new g),u.PropertyGridEditorCollection.register(new h),u.PropertyGridEditorCollection.register(new v),u.PropertyGridEditorCollection.register(new y),u.PropertyGridEditorCollection.register(new f),u.PropertyGridEditorCollection.register(new b),u.PropertyGridEditorCollection.register(new w),u.PropertyGridEditorCollection.register(new T),u.PropertyGridEditorCollection.register(new k)},"./src/property-grid/object-selector.ts":
|
|
488
|
+
/*! exports provided: PropertyGridEditorMatrix, PropertyGridEditorMatrixItemValues, PropertyGridEditorMatrixColumns, PropertyGridEditorMatrixPages, PropertyGridEditorMatrixCalculatedValues, PropertyGridEditorMatrixHtmlConditions, PropertyGridEditorMatrixUrlConditions, PropertyGridEditorMatrixMutlipleTextItems, PropertyGridEditorMatrixMultipleTypes, PropertyGridEditorMatrixValidators, PropertyGridEditorMatrixTriggers, PropertyGridEditorBindings */function(e,t,i){"use strict";i.r(t),i.d(t,"PropertyGridEditorMatrix",(function(){return p})),i.d(t,"PropertyGridEditorMatrixItemValues",(function(){return m})),i.d(t,"PropertyGridEditorMatrixColumns",(function(){return g})),i.d(t,"PropertyGridEditorMatrixPages",(function(){return h})),i.d(t,"PropertyGridEditorMatrixCalculatedValues",(function(){return v})),i.d(t,"PropertyGridEditorMatrixHtmlConditions",(function(){return y})),i.d(t,"PropertyGridEditorMatrixUrlConditions",(function(){return f})),i.d(t,"PropertyGridEditorMatrixMutlipleTextItems",(function(){return b})),i.d(t,"PropertyGridEditorMatrixMultipleTypes",(function(){return x})),i.d(t,"PropertyGridEditorMatrixValidators",(function(){return w})),i.d(t,"PropertyGridEditorMatrixTriggers",(function(){return T})),i.d(t,"PropertyGridEditorBindings",(function(){return S}));var o=i(/*! tslib */"./src/entries/helpers.ts"),r=i(/*! survey-core */"survey-core"),n=i(/*! ../editorLocalization */"./src/editorLocalization.ts"),a=i(/*! ../question-editor/properties */"./src/question-editor/properties.ts"),s=i(/*! ../utils/utils */"./src/utils/utils.ts"),l=i(/*! ./fast-entry */"./src/property-grid/fast-entry.ts"),u=i(/*! ./index */"./src/property-grid/index.ts"),c=i(/*! ../utils/actions */"./src/utils/actions.ts"),d=function(){function e(){}return e.getNewColumnName=function(e,t,i){var o=[];if(Array.isArray(e))for(var r=0;r<e.length;r++)o.push(e[r][t]);return Object(s.getNextValue)(i,o)},e}(),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.onCreated=function(e,t,i){var o=this;t.onGetValueForNewRowCallBack=function(e){return o.createNewItem(e,i)},this.setupMatrixQuestion(e,t,i)},t.prototype.initializePlaceholder=function(e,t,i){var o="function"==typeof e.getType&&e.getType();"text"===t.getType()&&o&&("text"===i&&"itemvalue"===o&&(t.placeHolder=new r.ComputedUpdater((function(){return e.text}))),"title"===i&&"matrixdropdowncolumn"===o&&(t.placeHolder=new r.ComputedUpdater((function(){return e.title}))))},t.prototype.onMatrixCellCreated=function(e,t){var i=t.row.editingObj;if(i){var o=t.cellQuestion;o.obj=i,this.initializePlaceholder(i,o,t.columnName),o.property=r.Serializer.findProperty(i.getType(),t.columnName)}},t.prototype.onGetMatrixRowAction=function(e,t,i){var o=this,r=t.question,a=t.row,s=t.actions;this.getEditItemAsStandAlone()&&s.push({id:"svd-grid-edit-column",iconName:"icon-edit",title:n.editorLocalization.getString("pe.edit"),visibleIndex:0,showTitle:!1,location:"end",css:"spg-action-button",action:function(){var e=t.row.editingObj;i(e)}});var l=s.filter((function(e){return"show-detail"===e.id}))[0];Object(c.updateMatrixRemoveAction)(r,s,a),l&&(l.component="sv-action-bar-item",l.css="spg-action-button",l.iconName=this.getShowDetailActionIconName(a),l.showTitle=!1,l.location="end",l.action=function(){a.showHideDetailPanelClick(),l.iconName=a.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},l.visibleIndex=0,a.onDetailPanelShowingChanged=function(){l.iconName=o.getShowDetailActionIconName(a)})},t.prototype.getShowDetailActionIconName=function(e){return e.isDetailPanelShowing?"icon-editing-finish":"icon-edit"},t.prototype.onGetQuestionTitleActions=function(e,t){var i=t.question;t.titleActions.push({id:"add-item",iconName:"icon-add",css:"spg-action-button",title:i.addRowText,showTitle:!1,action:function(){i.addRow()},enabled:i.canAddRow})},t.prototype.onValueChanged=function(e,t,i){this.updateTitleActions(i)},t.prototype.updateTitleActions=function(e){var t=e.titleActions.filter((function(e){return"add-item"===e.id}))[0];t&&(t.enabled=e.canAddRow)},t.prototype.createNewItem=function(e,t){var i=this.getBaseValue(t),o=this.getKeyValue();i||(i="item");var n=null;i&&o&&(n=d.getNewColumnName(e.value,o,i));var a=r.Serializer.createClass(this.getDefaultClassName(t),{});n&&(a[o]=n),this.getObjTypeName()&&(a[this.getObjTypeName()]=a.getType());var s=e.obj[t.name];return s.push(a),s!=e.value&&(e.value=s),a},t.prototype.getDefaultClassName=function(e){return e.className},t.prototype.getBaseValue=function(e){return e.getBaseValue()},t.prototype.getKeyValue=function(){return""},t.prototype.getColumnNames=function(e,t,i){var o=this.getPropertiesNames(e,t,i);return o&&o.length>0?o:this.getDefaultListProperties(t)},t.prototype.getColumnClassName=function(e,t){return t.className},t.prototype.getPropertiesNames=function(e,t,i){for(var o=[],r=this.getDefinedListProperties(e,t,i),n=0;n<r.length;n++)o.push(r[n].name);return 0==o.length&&(o=this.getDefaulColumnNames()),o},t.prototype.getDefinedListProperties=function(e,t,i){if(!t.className)return[];var o=r.Serializer.createClass(t.className);if(!o)return[];var n=new a.SurveyQuestionProperties(o,i,this.getColumnClassName(e,t),"list",e,t);return 0==n.getTabs().length?[]:n.getTabs()[0].properties},t.prototype.getDefaultListProperties=function(e){var t=[];if(e&&e.className)for(var i=r.Serializer.getProperties(e.className),o=0;o<i.length;o++)this.isPropertyShownInList(i[o])&&t.push(i[o].name);return t.length>0?t:this.getDefaulColumnNames()},t.prototype.getDefaulColumnNames=function(){return[]},t.prototype.isPropertyShownInList=function(e){return e.visible&&"form"!==e.showMode},t.prototype.getObjTypeName=function(){return""},t.prototype.hasDetailPanel=function(){return!this.getEditItemAsStandAlone()},t.prototype.setupMatrixQuestion=function(e,t,i){var o=this;this.hasPropertiesInDetail=this.hasDetailPanel()&&this.calcHasPropertiesInDetail(t,i),t.onHasDetailPanelCallback=function(e){return!1!==e.allowEditRow&&o.hasPropertiesInDetail},t.onCreateDetailPanelRenderedRowCallback=function(e){e.cells=[e.cells[1]],e.cells[0].colSpans+=2};var r=t;t.onCreateDetailPanelCallback=function(e,t){new u.PropertyJSONGenerator(e.editingObj,r.options,r.obj,r.property).setupObjPanel(t,!0)},t.allowRowsDragAndDrop=this.getAllowRowDragDrop()&&!t.isReadOnly,r.options&&this.setupUsingOptions(e,t,r.options,i)},t.prototype.getAllowRowDragDrop=function(){return!1},t.prototype.calcHasPropertiesInDetail=function(e,t){if(!t.className)return!0;var i=r.Serializer.createClass(t.className);if(!i)return!0;var o=new r.PanelModel("");return new u.PropertyJSONGenerator(i,e.options,e.obj,t).setupObjPanel(o,!0),o.elements.length>0},t.prototype.getJSON=function(e,t,i){return this.getMatrixJSON(e,t,this.getColumnNames(e,t,i),i)},t.prototype.getMatrixJSON=function(e,t,i,o){var r=t.className;r||(r=t.baseClassName);var a={type:"matrixdynamic",detailPanelMode:"underRow",cellType:"text",rowCount:0,columns:this.getColumnsJSON(e,t,i,o),showHeader:!1,addRowText:this.getAddRowText(t),keyDuplicationError:n.editorLocalization.getString("pe.propertyIsNoUnique"),emptyRowsText:this.getEmptyRowsText(t)};this.getShowDetailPanelOnAdding()&&(a.detailPanelShowOnAdding=!0);var s=this.getMaximumRowCount(e,t,o);return s>0&&(a.maxRowCount=s),a.hideColumnsIfEmpty=this.getHideColumnsEmpty(t),a},t.prototype.getHideColumnsEmpty=function(e){return!1},t.prototype.getEmptyRowsText=function(e){return n.editorLocalization.getString("pe.listIsEmpty")},t.prototype.getMaximumRowCount=function(e,t,i){return-1},t.prototype.getColumnsJSON=function(e,t,i,o){var r=t.className;r||(r=t.baseClassName);for(var n=new u.PropertyJSONGenerator(e,o).createColumnsJSON(r,i),a=0;a<n.length;a++)"comment"==n[a].cellType&&(n[a].cellType="text");return n},t.prototype.getEditItemAsStandAlone=function(){return!1},t.prototype.getShowDetailPanelOnAdding=function(){return!1},t.prototype.getAddRowText=function(e){var t="pe.addNew@"+e.name;return n.editorLocalization.hasString(t)?n.editorLocalization.getString(t):n.editorLocalization.getString("pe.addNew")},t.prototype.setupUsingOptions=function(e,t,i,o){var r={allowAddRemoveItems:!0,allowRemoveAllItems:!0,showTextView:!0};i.onSetPropertyEditorOptionsCallback(o.name,e,r),r.allowAddRemoveItems||(t.allowAddRows=!1,t.allowRemoveRows=!1),t.allowRemoveAllItems=r.allowRemoveAllItems,t.showTextView=r.showTextView},t}(u.PropertyGridEditor),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return e.isArray&&r.Serializer.isDescendantOf(e.className,"itemvalue")},t.prototype.isPropertyEditorSetupEnabled=function(e,t,i,o){if(!1===i.showTextView)return!1;var r=i.getColumnByName("value"),n=i.value;return!!r&&r.isVisible&&!r.readOnly&&!this.hasMultipleLanguage(n)&&!this.hasVisibleIfOrEnableIf(n)},t.prototype.setupMatrixQuestion=function(t,i,o){e.prototype.setupMatrixQuestion.call(this,t,i,o),i.showHeader=!1},t.prototype.getAllowRowDragDrop=function(){return!0},t.prototype.createPropertyEditorSetup=function(e,t,i,o){var r=[];return i.columns.forEach((function(e){r.push(e.name)})),new l.FastEntryEditor(e[t.name],o,t.className,r)},t.prototype.canClearPropertyValue=function(e,t,i,o){return!1!==i.allowRemoveAllItems},t.prototype.clearPropertyValue=function(e,t,i,o){var r=e[t.name];Array.isArray(r)&&r.splice(0,r.length)},t.prototype.getColumnClassName=function(e,t){return e.getType()+"@"+t.name},t.prototype.getDefaulColumnNames=function(){return["value","text"]},t.prototype.getKeyValue=function(){return"value"},t.prototype.getHideColumnsEmpty=function(e){return"choices"===e.name},t.prototype.getEmptyRowsText=function(t){return"choices"===t.name?n.editorLocalization.getString("pe.choicesListIsEmpty"):e.prototype.getEmptyRowsText.call(this,t)},t.prototype.getMaximumRowCount=function(t,i,o){return"choices"===i.name?o.maximumChoicesCount:"rows"===i.name?o.maximumRowsCount:"columns"===i.name?o.maximumColumnsCount:"rateValues"===i.name?o.maximumRateValues:e.prototype.getMaximumRowCount.call(this,t,i,o)},t.prototype.hasMultipleLanguage=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].locText.hasNonDefaultText())return!0;return!1},t.prototype.hasVisibleIfOrEnableIf=function(e){if(!e||!Array.isArray(e))return!1;for(var t=0;t<e.length;t++)if(e[t].visibleIf||e[t].enableIf)return!0;return!1},t}(p),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"matrixdropdowncolumns"==e.type},t.prototype.getEditItemAsStandAlone=function(){return!0},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"column"},t.prototype.getMaximumRowCount=function(e,t,i){return i.maximumColumnsCount},t.prototype.getAllowRowDragDrop=function(){return!0},t}(p),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"surveypages"==e.type},t.prototype.onMatrixAllowRemoveRow=function(e,t){var i=t.editingObj;if(i&&i.survey)return i.survey.currentPage!==i},t.prototype.getColumnClassName=function(e,t){return"page@"+e.getType()},t.prototype.getDefaulColumnNames=function(){return["name","title"]},t.prototype.hasDetailPanel=function(){return!1},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"page"},t.prototype.getAllowRowDragDrop=function(){return!0},t}(p),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"calculatedvalues"==e.type},t.prototype.getColumnClassName=function(e,t){return"calculatedvalue@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"var"},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"htmlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["html"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"urlconditions"==e.type},t.prototype.getDefaulColumnNames=function(){return["url"]},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"textitems"==e.type},t.prototype.getColumnClassName=function(e,t){return"multipletext@items"},t.prototype.getDefaulColumnNames=function(){return["name"]},t.prototype.getKeyValue=function(){return"name"},t.prototype.getBaseValue=function(e){return"item"},t}(p),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.getColumnsJSON=function(t,i,o,r){var n=e.prototype.getColumnsJSON.call(this,t,i,o,r);return this.getObjTypeName()&&n.unshift({name:this.getObjTypeName(),cellType:"dropdown"}),n},t.prototype.onMatrixCellCreated=function(t,i){e.prototype.onMatrixCellCreated.call(this,t,i);var o=i.cellQuestion;i.columnName===this.getObjTypeName()&&(o.showOptionsCaption=!1,o.choices=this.getChoices(t),o.value=i.row.editingObj.getType())},t.prototype.onMatrixCellValueChanged=function(e,t){if(t.columnName==this.getObjTypeName()){var i=t.question.visibleRows.indexOf(t.row);if(!(i<0)){var o=t.row.isDetailPanelShowing,n=t.row.editingObj.toJSON();delete n.type;var a=r.Serializer.createClass(t.value);a.fromJSON(n),a[this.getObjTypeName()]=a.getType(),t.row.hideDetailPanel(!0),t.question.value.splice(i,1,a),t.row.value=a,o&&t.row.showDetailPanel()}}},t.prototype.getShowDetailPanelOnAdding=function(){return!0},t}(p),w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"validators"==e.type},t.prototype.getObjTypeName=function(){return"validatorType"},t.prototype.getDefaultClassName=function(e){return"expressionvalidator"},t.prototype.getChoices=function(e){for(var t=this.getSupportedValidators(e),i=[],o=0;o<t.length;o++){var r=t[o]+"validator";i.push({value:r,text:n.editorLocalization.getValidatorName(r)})}return i},t.prototype.getSupportedValidators=function(e){return e?e.getSupportedValidators?e.getSupportedValidators():e.getOriginalObj?this.getSupportedValidators(e.getOriginalObj()):[]:[]},t}(x),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"triggers"==e.type},t.prototype.getObjTypeName=function(){return"triggerType"},t.prototype.getDefaultClassName=function(e){return"runexpressiontrigger"},t.prototype.getChoices=function(e){for(var t=r.Serializer.getChildrenClasses("surveytrigger",!0),i=[],o=0;o<t.length;o++){var a=t[o].name;"visibletrigger"!=a&&i.push({value:a,text:n.editorLocalization.getTriggerName(a)})}return i},t}(x),S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype.fit=function(e){return"bindings"==e.type},t.prototype.getJSON=function(e,t,i){return{type:"matrixdropdown",rows:this.getRows(e),columns:this.getColumns(e,i)}},t.prototype.onMatrixCellCreated=function(e,t){var i=e.bindings.getValueNameByPropertyName(t.row.rowName);i&&(t.cellQuestion.value=i)},t.prototype.onMatrixCellValueChanged=function(e,t){e.bindings.setBinding(t.row.rowName,t.value)},t.prototype.getRows=function(e){for(var t=e.bindings.getProperties(),i=[],o=0;o<t.length;o++){var r=t[o].name;i.push({value:r,text:n.editorLocalization.getPropertyName(r)})}return i},t.prototype.getColumns=function(e,t){var i=new r.JsonObjectProperty(null,"value");i.type="questionvalue";var o=u.PropertyGridEditorCollection.getJSON(e,i,t);return o.cellType=o.type,delete o.type,o.name="value",[o]},t}(u.PropertyGridEditor);u.PropertyGridEditorCollection.register(new m),u.PropertyGridEditorCollection.register(new g),u.PropertyGridEditorCollection.register(new h),u.PropertyGridEditorCollection.register(new v),u.PropertyGridEditorCollection.register(new y),u.PropertyGridEditorCollection.register(new f),u.PropertyGridEditorCollection.register(new b),u.PropertyGridEditorCollection.register(new w),u.PropertyGridEditorCollection.register(new T),u.PropertyGridEditorCollection.register(new S)},"./src/property-grid/object-selector.ts":
|
|
485
489
|
/*!**********************************************!*\
|
|
486
490
|
!*** ./src/property-grid/object-selector.ts ***!
|
|
487
491
|
\**********************************************/
|
|
@@ -509,7 +513,7 @@ License: MIT
|
|
|
509
513
|
/*!*******************************************!*\
|
|
510
514
|
!*** ./src/question-editor/definition.ts ***!
|
|
511
515
|
\*******************************************/
|
|
512
|
-
/*! exports provided: SurveyQuestionEditorDefinition */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyQuestionEditorDefinition",(function(){return o}));var o=function(){function e(){}return e.definition={question:{properties:["name","title","description",{name:"visible"},{name:"isRequired"},{name:"readOnly"},{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"bindings",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"hideNumber",tab:"layout"},{name:"state",tab:"layout"},{name:"titleLocation",tab:"layout"},{name:"descriptionLocation",tab:"layout"},{name:"indent",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"valueName",tab:"data"},{name:"defaultValue",tab:"data"},{name:"correctAnswer",tab:"data"},{name:"useDisplayValuesInTitle",tab:"data"},{name:"requiredErrorText",tab:"validation"},{name:"validators",tab:"validation"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},comment:{properties:[{name:"rows",tab:"layout"},{name:"cols",tab:"layout"},"placeHolder",{name:"maxLength",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"autoGrow",tab:"layout"}]},file:{properties:["hasComment","commentText","commentPlaceHolder","allowMultiple","allowImagesPreview","acceptedTypes",{name:"showPreview"},{name:"storeDataAsText"},"maxSize","imageHeight","imageWidth","waitForUpload","needConfirmRemoveFile"]},html:{properties:["html"]},matrixdropdownbase:{properties:["cellType","optionsCaption","detailPanelMode","detailPanelShowOnAdding",{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"columnsVisibleIf",tab:"logic"},{name:"columnLayout",tab:"layout"},{name:"horizontalScroll",tab:"layout"},{name:"columnColCount",tab:"layout"},{name:"columnMinWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"choices",index:12}]},matrixdynamic:{properties:["allowAddRows","allowRemoveRows","allowRowsDragAndDrop","rowCount","minRowCount","maxRowCount","addRowLocation","addRowText","removeRowText","confirmDelete","confirmDeleteText",{name:"hideColumnsIfEmpty",tab:"columns"},{name:"emptyRowsText",tab:"columns"},{name:"defaultRowValue",tab:"data"},{name:"defaultValueFromLastRow",tab:"data"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},matrixdropdown:{properties:["totalText",{name:"rowsVisibleIf",tab:"logic"},{name:"rowTitleWidth",tab:"layout"},{name:"keyDuplicationError",tab:"validation"}]},matrix:{properties:[{name:"isAllRowRequired",tab:"validation"},{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"rowsOrder",tab:"rows"},{name:"hideIfRowsEmpty",tab:"rows"},{name:"columnsVisibleIf",tab:"logic"},{name:"rowsVisibleIf",tab:"logic"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"cells",index:500}]},multipletext:{properties:[{name:"colCount",tab:"layout"},{name:"itemSize",tab:"layout"}],tabs:[{name:"items",index:10}]},rating:{properties:["hasComment","commentText","commentPlaceHolder",{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:10}]},selectbase:{properties:["hasComment","commentText","commentPlaceHolder",{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"layout"},{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"otherPlaceHolder",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"},{name:"hideIfChoicesEmpty",tab:"logic"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"},{name:"otherErrorText",tab:"validation"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},checkbox:{properties:[{name:"hasSelectAll",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"}]},radiogroup:{properties:[{name:"showClearButton",tab:"choices"}]},dropdown:{properties:["optionsCaption","autoComplete",{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"showOptionsCaption",tab:"choices"}]},imagepicker:{properties:["multiSelect","showLabel","contentMode","imageFit","imageHeight","imageWidth"]},image:{properties:["imageLink","contentMode","imageFit","imageHeight","imageWidth","text"]},"itemvalue[]@choices":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@rows":{properties:[{name:"visibleIf"}],tabs:[{name:"general"}]},"itemvalue[]@columns":{properties:[{name:"visibleIf"}],tabs:[{name:"general"}]},text:{properties:["inputType","min","max","step","placeHolder","autoComplete","dataList",{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"size",tab:"layout"},{name:"maxLength",tab:"validation"},{name:"minErrorText",tab:"validation"},{name:"maxErrorText",tab:"validation"},{name:"textUpdateMode",tab:"data"}]},boolean:{properties:["label","labelTrue","labelFalse","showTitle",{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"}]},expression:{properties:["expression","currency","displayStyle","format","maximumFractionDigits","minimumFractionDigits","useGrouping"]},matrixdropdowncolumn:{properties:["name","title"]},"matrixdropdowncolumn@default":{properties:["cellType","name","title","isRequired","readOnly","showInMultipleColumns","width","minWidth",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"totalType",tab:"totals"},{name:"totalDisplayStyle",tab:"totals"},{name:"totalCurrency",tab:"totals"},{name:"totalFormat",tab:"totals"},{name:"totalExpression",tab:"totals"}],tabs:[{name:"general",index:5},{name:"logic",index:20},{name:"totals",index:40}]},"matrixdropdowncolumn@checkbox":{properties:[{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"hasSelectAll",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"selectAllText",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@radiogroup":{properties:[{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@dropdown":{properties:[{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@text":{properties:["inputType","min","max","step","placeHolder","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@comment":{properties:["rows","placeHolder","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@boolean":{properties:["defaultValue","labelTrue","labelFalse","valueTrue","valueFalse"]},"matrixdropdowncolumn@expression":{properties:["displayStyle","currency"],tabs:[{name:"expression",index:10}]},"matrixdropdowncolumn@rating":{properties:["rateValues",{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"}],tabs:[{name:"rateValues",index:5}]},multipletextitem:{properties:["inputType","name","title","isRequired","maxLength","size","placeHolder","requiredErrorText","validators"]},"multipletext@items":{properties:["name","title"]},calculatedvalue:{properties:["name","expression","includeIntoResult"]},"calculatedvalue@items":{properties:["name","expression"]},paneldynamic:{properties:["renderMode","panelCount","minPanelCount","maxPanelCount","panelsState",{name:"allowAddPanel"},{name:"allowRemovePanel"},"panelAddText","panelRemoveText","templateTitle","templateDescription","confirmDelete","confirmDeleteText","panelPrevText","panelNextText","showQuestionNumbers","showRangeInProgress",{name:"defaultPanelValue",tab:"data"},{name:"defaultValueFromLastPanel",tab:"data"},{name:"templateTitleLocation",tab:"layout"},{name:"panelRemoveButtonLocation",tab:"layout"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},panelbase:{properties:["name","title","description","visible","readOnly",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"questionTitleLocation",tab:"layout"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},panel:{properties:["isRequired",{name:"requiredErrorText",tab:"validation"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"state",tab:"layout"},{name:"questionsOrder",tab:"layout"},{name:"indent",tab:"layout"},{name:"innerIndent",tab:"layout"},{name:"width",tab:"layout"},{name:"showNumber",tab:"numbering"},{name:"showQuestionNumbers",tab:"numbering"},{name:"questionStartIndex",tab:"numbering"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"}],tabs:[{name:"numbering",index:350}]},page:{properties:["navigationTitle","navigationDescription","maxTimeToFinish",{name:"questionsOrder",tab:"layout"},{name:"navigationButtonsVisibility",tab:"layout"}]},survey:{properties:["title","description","showTitle","locale","mode","cookieName","widthMode",{name:"showPreviewBeforeComplete",tab:"navigation"},{name:"pagePrevText",tab:"navigation"},{name:"pageNextText",tab:"navigation"},{name:"completeText",tab:"navigation"},{name:"previewText",tab:"navigation"},{name:"editText",tab:"navigation"},{name:"startSurveyText",tab:"navigation"},{name:"showNavigationButtons",tab:"navigation"},{name:"showPrevButton",tab:"navigation"},{name:"firstPageIsStarted",tab:"navigation"},{name:"goNextPageAutomatic",tab:"navigation"},{name:"showProgressBar",tab:"navigation"},{name:"progressBarType",tab:"navigation"},{name:"questionsOnPageMode",tab:"navigation"},{name:"questionTitleLocation",tab:"question"},{name:"questionDescriptionLocation",tab:"question"},{name:"showQuestionNumbers",tab:"question"},{name:"questionTitlePattern",tab:"question"},{name:"requiredText",tab:"question"},{name:"questionStartIndex",tab:"question"},{name:"questionErrorLocation",tab:"question"},{name:"focusFirstQuestionAutomatic",tab:"question"},{name:"questionsOrder",tab:"question"},{name:"maxTextLength",tab:"question"},{name:"maxOthersLength",tab:"question"},{name:"autoGrowComment",tab:"question"},{name:"showPageTitles",tab:"pages"},{name:"showPageNumbers",tab:"pages"},{name:"calculatedValues",tab:"logic"},{name:"triggers",tab:"logic"},{name:"clearInvisibleValues",tab:"data"},{name:"textUpdateMode",tab:"data"},{name:"sendResultOnPageNext",tab:"data"},{name:"storeOthersAsComment",tab:"data"},{name:"focusOnFirstError",tab:"validation"},{name:"checkErrorsMode",tab:"validation"},{name:"navigateToUrl",tab:"showOnCompleted"},{name:"showCompletedPage",tab:"showOnCompleted"},{name:"completedHtml",tab:"showOnCompleted"},{name:"navigateToUrlOnCondition",tab:"showOnCompleted"},{name:"completedHtmlOnCondition",tab:"showOnCompleted"},{name:"loadingHtml",tab:"showOnCompleted"},{name:"completedBeforeHtml",tab:"showOnCompleted"},{name:"maxTimeToFinish",tab:"timer"},{name:"maxTimeToFinishPage",tab:"timer"},{name:"showTimerPanel",tab:"timer"},{name:"showTimerPanelMode",tab:"timer"},{name:"logo",tab:"logo"},{name:"logoPosition",tab:"logo"},{name:"logoWidth",tab:"logo"},{name:"logoHeight",tab:"logo"},{name:"logoFit",tab:"logo"}],tabs:[{name:"navigation",index:100},{name:"question",index:200},{name:"pages",index:250},{name:"logic",index:300},{name:"data",index:400},{name:"validation",index:500},{name:"showOnCompleted",index:600},{name:"timer",index:700}]},"page@survey":{properties:["name","title"]}},e}()},"./src/question-editor/properties.ts":
|
|
516
|
+
/*! exports provided: SurveyQuestionEditorDefinition */function(e,t,i){"use strict";i.r(t),i.d(t,"SurveyQuestionEditorDefinition",(function(){return o}));var o=function(){function e(){}return e.definition={question:{properties:["name","title","description",{name:"visible"},{name:"isRequired"},{name:"readOnly"},{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"bindings",tab:"logic"},{name:"defaultValueExpression",tab:"logic"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"hideNumber",tab:"layout"},{name:"state",tab:"layout"},{name:"titleLocation",tab:"layout"},{name:"descriptionLocation",tab:"layout"},{name:"indent",tab:"layout"},{name:"width",tab:"layout"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"},{name:"valueName",tab:"data"},{name:"defaultValue",tab:"data"},{name:"correctAnswer",tab:"data"},{name:"useDisplayValuesInTitle",tab:"data"},{name:"clearIfInvisible",tab:"data"},{name:"requiredErrorText",tab:"validation"},{name:"validators",tab:"validation"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},comment:{properties:[{name:"rows",tab:"layout"},{name:"cols",tab:"layout"},"placeHolder",{name:"maxLength",tab:"validation"},{name:"textUpdateMode",tab:"data"},{name:"autoGrow",tab:"layout"}]},file:{properties:["hasComment","commentText","commentPlaceHolder","allowMultiple","allowImagesPreview","acceptedTypes",{name:"showPreview"},{name:"storeDataAsText"},"maxSize","imageHeight","imageWidth","waitForUpload","needConfirmRemoveFile"]},html:{properties:["html"]},matrixdropdownbase:{properties:["cellType","optionsCaption","detailPanelMode","detailPanelShowOnAdding",{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"columnsVisibleIf",tab:"logic"},{name:"columnLayout",tab:"layout"},{name:"horizontalScroll",tab:"layout"},{name:"columnColCount",tab:"layout"},{name:"columnMinWidth",tab:"layout"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"choices",index:12}]},matrixdynamic:{properties:["allowAddRows","allowRemoveRows","allowRowsDragAndDrop","rowCount","minRowCount","maxRowCount","addRowLocation","addRowText","removeRowText","confirmDelete","confirmDeleteText",{name:"hideColumnsIfEmpty",tab:"columns"},{name:"emptyRowsText",tab:"columns"},{name:"defaultRowValue",tab:"data"},{name:"defaultValueFromLastRow",tab:"data"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},matrixdropdown:{properties:["totalText",{name:"rowsVisibleIf",tab:"logic"},{name:"rowTitleWidth",tab:"layout"},{name:"keyDuplicationError",tab:"validation"}]},matrix:{properties:[{name:"isAllRowRequired",tab:"validation"},{name:"showHeader",tab:"layout"},{name:"showColumnHeader",tab:"layout"},{name:"rowsOrder",tab:"rows"},{name:"hideIfRowsEmpty",tab:"rows"},{name:"columnsVisibleIf",tab:"logic"},{name:"rowsVisibleIf",tab:"logic"}],tabs:[{name:"columns",index:10},{name:"rows",index:11},{name:"cells",index:500}]},multipletext:{properties:[{name:"colCount",tab:"layout"},{name:"itemSize",tab:"layout"}],tabs:[{name:"items",index:10}]},rating:{properties:["hasComment","commentText","commentPlaceHolder",{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"},{name:"displayRateDescriptionsAsExtremeItems",tab:"rateValues"}],tabs:[{name:"rateValues",index:10}]},selectbase:{properties:["hasComment","commentText","commentPlaceHolder",{name:"choicesFromQuestion",tab:"choices"},{name:"choicesFromQuestionMode",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"layout"},{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"otherPlaceHolder",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"},{name:"hideIfChoicesEmpty",tab:"logic"},{name:"choicesVisibleIf",tab:"logic"},{name:"choicesEnableIf",tab:"logic"},{name:"otherErrorText",tab:"validation"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},checkbox:{properties:[{name:"hasSelectAll",tab:"choices"},{name:"selectAllText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"}]},radiogroup:{properties:[{name:"showClearButton",tab:"choices"}]},dropdown:{properties:["optionsCaption","autoComplete",{name:"choicesMin",tab:"choices"},{name:"choicesMax",tab:"choices"},{name:"choicesStep",tab:"choices"},{name:"showOptionsCaption",tab:"choices"}]},imagepicker:{properties:["multiSelect","showLabel","contentMode","imageFit","imageHeight","imageWidth"]},image:{properties:["imageLink","contentMode","imageFit","imageHeight","imageWidth","text"]},"itemvalue[]@choices":{properties:[{name:"visibleIf"},{name:"enableIf"}],tabs:[{name:"general"}]},"itemvalue[]@rows":{properties:[{name:"visibleIf"}],tabs:[{name:"general"}]},"itemvalue[]@columns":{properties:[{name:"visibleIf"}],tabs:[{name:"general"}]},text:{properties:["inputType","min","max","step","placeHolder","autoComplete","dataList",{name:"minValueExpression",tab:"logic"},{name:"maxValueExpression",tab:"logic"},{name:"size",tab:"layout"},{name:"maxLength",tab:"validation"},{name:"minErrorText",tab:"validation"},{name:"maxErrorText",tab:"validation"},{name:"textUpdateMode",tab:"data"}]},boolean:{properties:["label","labelTrue","labelFalse","showTitle",{name:"valueTrue",tab:"data"},{name:"valueFalse",tab:"data"}]},expression:{properties:["expression","currency","displayStyle","format","maximumFractionDigits","minimumFractionDigits","useGrouping"]},matrixdropdowncolumn:{properties:["name","title"]},"matrixdropdowncolumn@default":{properties:["cellType","name","title","isRequired","readOnly","showInMultipleColumns","width","minWidth",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"totalType",tab:"totals"},{name:"totalDisplayStyle",tab:"totals"},{name:"totalCurrency",tab:"totals"},{name:"totalFormat",tab:"totals"},{name:"totalExpression",tab:"totals"}],tabs:[{name:"general",index:5},{name:"logic",index:20},{name:"totals",index:40}]},"matrixdropdowncolumn@checkbox":{properties:[{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"hasSelectAll",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"},{name:"maxSelectedChoices",tab:"choices"},{name:"selectAllText",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@radiogroup":{properties:[{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"colCount",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@dropdown":{properties:[{name:"hasOther",tab:"choices"},{name:"otherText",tab:"choices"},{name:"choicesOrder",tab:"choices"},{name:"optionsCaption",tab:"choices"},{name:"hasNone",tab:"choices"},{name:"noneText",tab:"choices"}],tabs:[{name:"choices",index:10},{name:"choicesByUrl",index:11}]},"matrixdropdowncolumn@text":{properties:["inputType","min","max","step","placeHolder","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@comment":{properties:["rows","placeHolder","maxLength"],tabs:[{name:"validators",index:10}]},"matrixdropdowncolumn@boolean":{properties:["defaultValue","labelTrue","labelFalse","valueTrue","valueFalse"]},"matrixdropdowncolumn@expression":{properties:["displayStyle","currency"],tabs:[{name:"expression",index:10}]},"matrixdropdowncolumn@rating":{properties:["rateValues",{name:"rateMin",tab:"rateValues"},{name:"rateMax",tab:"rateValues"},{name:"rateStep",tab:"rateValues"},{name:"minRateDescription",tab:"rateValues"},{name:"maxRateDescription",tab:"rateValues"}],tabs:[{name:"rateValues",index:5}]},multipletextitem:{properties:["inputType","name","title","isRequired","maxLength","size","placeHolder","requiredErrorText","validators"]},"multipletext@items":{properties:["name","title"]},calculatedvalue:{properties:["name","expression","includeIntoResult"]},"calculatedvalue@items":{properties:["name","expression"]},paneldynamic:{properties:["renderMode","panelCount","minPanelCount","maxPanelCount","panelsState",{name:"allowAddPanel"},{name:"allowRemovePanel"},"panelAddText","panelRemoveText","templateTitle","templateDescription","confirmDelete","confirmDeleteText","panelPrevText","panelNextText","showQuestionNumbers","showRangeInProgress",{name:"defaultPanelValue",tab:"data"},{name:"defaultValueFromLastPanel",tab:"data"},{name:"templateTitleLocation",tab:"layout"},{name:"panelRemoveButtonLocation",tab:"layout"},{name:"keyName",tab:"validation"},{name:"keyDuplicationError",tab:"validation"}]},panelbase:{properties:["name","title","description","visible","readOnly",{name:"visibleIf",tab:"logic"},{name:"enableIf",tab:"logic"},{name:"requiredIf",tab:"logic"},{name:"questionTitleLocation",tab:"layout"}],tabs:[{name:"logic",index:100},{name:"layout",index:200},{name:"data",index:300},{name:"validation",index:400}]},panel:{properties:["isRequired",{name:"requiredErrorText",tab:"validation"},{name:"page",tab:"layout"},{name:"startWithNewLine",tab:"layout"},{name:"state",tab:"layout"},{name:"questionsOrder",tab:"layout"},{name:"indent",tab:"layout"},{name:"innerIndent",tab:"layout"},{name:"width",tab:"layout"},{name:"showNumber",tab:"numbering"},{name:"showQuestionNumbers",tab:"numbering"},{name:"questionStartIndex",tab:"numbering"},{name:"minWidth",tab:"layout"},{name:"maxWidth",tab:"layout"}],tabs:[{name:"numbering",index:350}]},page:{properties:["navigationTitle","navigationDescription","maxTimeToFinish",{name:"questionsOrder",tab:"layout"},{name:"navigationButtonsVisibility",tab:"layout"}]},survey:{properties:["title","description","showTitle","locale","mode","cookieName","widthMode",{name:"showPreviewBeforeComplete",tab:"navigation"},{name:"pagePrevText",tab:"navigation"},{name:"pageNextText",tab:"navigation"},{name:"completeText",tab:"navigation"},{name:"previewText",tab:"navigation"},{name:"editText",tab:"navigation"},{name:"startSurveyText",tab:"navigation"},{name:"showNavigationButtons",tab:"navigation"},{name:"showPrevButton",tab:"navigation"},{name:"firstPageIsStarted",tab:"navigation"},{name:"goNextPageAutomatic",tab:"navigation"},{name:"showProgressBar",tab:"navigation"},{name:"progressBarType",tab:"navigation"},{name:"questionsOnPageMode",tab:"navigation"},{name:"questionTitleLocation",tab:"question"},{name:"questionDescriptionLocation",tab:"question"},{name:"showQuestionNumbers",tab:"question"},{name:"questionTitlePattern",tab:"question"},{name:"requiredText",tab:"question"},{name:"questionStartIndex",tab:"question"},{name:"questionErrorLocation",tab:"question"},{name:"focusFirstQuestionAutomatic",tab:"question"},{name:"questionsOrder",tab:"question"},{name:"maxTextLength",tab:"question"},{name:"maxOthersLength",tab:"question"},{name:"autoGrowComment",tab:"question"},{name:"showPageTitles",tab:"pages"},{name:"showPageNumbers",tab:"pages"},{name:"calculatedValues",tab:"logic"},{name:"triggers",tab:"logic"},{name:"clearInvisibleValues",tab:"data"},{name:"textUpdateMode",tab:"data"},{name:"sendResultOnPageNext",tab:"data"},{name:"storeOthersAsComment",tab:"data"},{name:"focusOnFirstError",tab:"validation"},{name:"checkErrorsMode",tab:"validation"},{name:"navigateToUrl",tab:"showOnCompleted"},{name:"showCompletedPage",tab:"showOnCompleted"},{name:"completedHtml",tab:"showOnCompleted"},{name:"navigateToUrlOnCondition",tab:"showOnCompleted"},{name:"completedHtmlOnCondition",tab:"showOnCompleted"},{name:"loadingHtml",tab:"showOnCompleted"},{name:"completedBeforeHtml",tab:"showOnCompleted"},{name:"maxTimeToFinish",tab:"timer"},{name:"maxTimeToFinishPage",tab:"timer"},{name:"showTimerPanel",tab:"timer"},{name:"showTimerPanelMode",tab:"timer"},{name:"logo",tab:"logo"},{name:"logoPosition",tab:"logo"},{name:"logoWidth",tab:"logo"},{name:"logoHeight",tab:"logo"},{name:"logoFit",tab:"logo"}],tabs:[{name:"navigation",index:100},{name:"question",index:200},{name:"pages",index:250},{name:"logic",index:300},{name:"data",index:400},{name:"validation",index:500},{name:"showOnCompleted",index:600},{name:"timer",index:700}]},"page@survey":{properties:["name","title"]}},e}()},"./src/question-editor/properties.ts":
|
|
513
517
|
/*!*******************************************!*\
|
|
514
518
|
!*** ./src/question-editor/properties.ts ***!
|
|
515
519
|
\*******************************************/
|
|
@@ -533,7 +537,7 @@ License: MIT
|
|
|
533
537
|
/*!******************************!*\
|
|
534
538
|
!*** ./src/survey-helper.ts ***!
|
|
535
539
|
\******************************/
|
|
536
|
-
/*! exports provided: ObjType, SurveyHelper */function(e,t,i){"use strict";i.r(t),i.d(t,"ObjType",(function(){return o})),i.d(t,"SurveyHelper",(function(){return
|
|
540
|
+
/*! exports provided: ObjType, SurveyHelper */function(e,t,i){"use strict";i.r(t),i.d(t,"ObjType",(function(){return o})),i.d(t,"SurveyHelper",(function(){return s}));var o,r=i(/*! survey-core */"survey-core"),n=i(/*! ./editorLocalization */"./src/editorLocalization.ts"),a=i(/*! ./utils/utils */"./src/utils/utils.ts");!function(e){e[e.Unknown=0]="Unknown",e[e.Survey=1]="Survey",e[e.Page=2]="Page",e[e.Panel=3]="Panel",e[e.Question=4]="Question",e[e.Column=5]="Column"}(o||(o={}));var s=function(){function e(){}return e.getNewPageName=function(t){return e.getNewName(t,n.editorLocalization.getString("ed.newPageName"))},e.getNewQuestionName=function(t){return e.getNewName(t,n.editorLocalization.getString("ed.newQuestionName"))},e.getNewPanelName=function(t){return e.getNewName(t,n.editorLocalization.getString("ed.newPanelName"))},e.generateNewName=function(e){for(var t=e.length;t>0&&e[t-1]>="0"&&e[t-1]<="9";)t--;var i=e.substr(0,t),o=0;return t<e.length&&(o=parseInt(e.substr(t))),i+ ++o},e.getNewName=function(e,t){for(var i={},o=0;o<e.length;o++)i[e[o].name]=!0;for(var r=1;i[t+r.toString()];)r++;return t+r.toString()},e.getObjectType=function(e){return e&&e.getType?"page"==e.getType()?o.Page:"panel"==e.getType()?o.Panel:"survey"==e.getType()?o.Survey:"matrixdropdowncolumn"==e.getType()?o.Column:e.name?o.Question:o.Unknown:o.Unknown},e.getObjectTypeStr=function(t){var i=e.getObjectType(t);return i===o.Survey?"survey":i===o.Page?"page":i===o.Panel?"panel":i===o.Question?"question":i===o.Column?"column":"unknown"},e.getObjectName=function(t,i){void 0===i&&(i=!1);var r=e.getObjectType(t);if(r===o.Survey)return n.editorLocalization.getString("ed.surveyTypeName");if(i&&t.title)return t.title;if(i&&t.text)return t.text;if(t.name)return t.name;if(r!=o.Page)return"";var a=t.data;return a||(a=t.survey),"[Page "+(a.pages.indexOf(t)+1)+"]"},e.getElements=function(e,t){return void 0===t&&(t=!1),e?e.getElementsInDesign?e.getElementsInDesign(t):e.elements?e.elements:[]:[]},e.isPropertyVisible=function(e,t,i,o,r,n){if(void 0===i&&(i=null),void 0===o&&(o=null),void 0===r&&(r=null),void 0===n&&(n=null),!t||!t.visible)return!1;if(o&&t.showMode&&o!==t.showMode)return!1;if(t.isVisible&&e.getLayoutType&&!t.isVisible(e.getLayoutType(),null))return!1;var a=i?function(e,t){return i.onCanShowPropertyCallback(e,t,o,r,n)}:null;return!(a&&!a(e,t))},e.scrollIntoViewIfNeeded=function(t){if(t&&t.scrollIntoView){var i=t.getBoundingClientRect(),o=e.getScrollableDiv(t);if(o){var r=o.clientHeight;if(i.top<o.offsetTop)t.scrollIntoView(!0);else{var n=r+o.offsetTop;i.bottom>n&&i.height<r&&t.scrollIntoView(!1)}}}},e.getScrollableDiv=function(e){for(;e;){if(e.id&&e.id.indexOf("scrollableDiv")>-1)return e;if(!e.offsetParent)return null;e=e.offsetParent}return null},e.moveItemInArray=function(t,i,o){if(!t||t.length<2)return!1;if(o<0||o>=t.length)return!1;var r=t.indexOf(i);if(r<0||r==o)return!1;for(var n=0;n<t.length;n++)e.disableSelectingObj(t[n]);for(t.splice(r,1),t.splice(o,0,i),n=0;n<t.length;n++)e.enableSelectingObj(t[n]);return!0},e.applyItemValueArray=function(e,t){if(t&&0!=t.length){if(e.length>t.length&&e.splice(t.length,e.length-t.length),e.length<t.length){for(var i=[],o=e.length;o<t.length;o++)i.push(t[o]);e.splice.apply(e,[e.length,0].concat(i))}for(o=0;o<e.length;o++)e[o].value!=t[o].value&&(e[o].value=t[o].value),e[o].text=t[o].hasText?t[o].text:""}else e.splice(0,e.length)},e.disableSelectingObj=function(e){e.disableSelecting=!0},e.enableSelectingObj=function(e){delete e.disableSelecting},e.canSelectObj=function(e){return!e||!0!==e.disableSelecting},e.warnNonSupported=function(t,i){var o=Object(a.wrapTextByCurlyBraces)(t)+" is not supported in V2.";i&&(o+=" Use the '"+i+"' property instead"),e.warnText(o)},e.warnText=function(e){console.warn(e)},e.deleteConditionProperties=function(e){delete e.visible,delete e.visibleIf,delete e.readOnly,delete e.enableIf,delete e.valueName,delete e.choicesVisibleIf,delete e.choicesEnableIf,delete e.width,delete e.minWidth,delete e.maxWidth},e.updateQuestionJson=function(t){if(t.storeOthersAsComment=!1,e.deleteConditionProperties(t),t.choices)for(var i=0;i<t.choices.length;i++)e.deleteConditionProperties(t.choices[i])},e.convertMatrixRowsToText=function(e){return e.filter((function(e){return!e.cells[0].hasError})).map((function(e){return e.cells.map((function(e){return e.value||""})).join(r.ItemValue.Separator).replace(/\|$/,"")})).join("\n")},e.convertItemValuesToText=function(e){var t="";return e.forEach((function(e){t&&(t+="\n"),t+=e.value,e.pureText&&(t+="|"+e.pureText)})),t},e.convertTextToItemValues=function(e,t,i){var o=[];if(!e)return o;for(var n=e.split("\n"),a=0;a<n.length;a++)if(n[a]){var s=n[a].split(r.ItemValue.Separator),l=r.Serializer.createClass(i);t.forEach((function(e,t){l[e.name]=s[t]})),o.push(l)}return o},e.sortItems=function(e,t){void 0===t&&(t="text"),e.sort((function(e,i){for(var o=e[t]?e[t]:"",n=i[t]?i[t]:"",a=0;a<o.length&&a<n.length&&o[a]===n[a];)a++;if(a<o.length&&a<n.length){for(;a>0&&o[a-1]>="0"&&o[a-1]<="9";)a--;var s=o.substr(a),l=n.substr(a);if(r.Helpers.isNumber(s)&&r.Helpers.isNumber(l)){var u=parseFloat(s),c=parseFloat(l);return u===c?0:u<c?-1:1}}return o.localeCompare(n)}))},e}()},"./src/svgbundle.html":
|
|
537
541
|
/*!****************************!*\
|
|
538
542
|
!*** ./src/svgbundle.html ***!
|
|
539
543
|
\****************************/
|
|
@@ -577,8 +581,8 @@ License: MIT
|
|
|
577
581
|
/*!****************************!*\
|
|
578
582
|
!*** ./src/utils/utils.ts ***!
|
|
579
583
|
\****************************/
|
|
580
|
-
/*! exports provided: getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes */function(e,t,i){"use strict";i.r(t),i.d(t,"getNextValue",(function(){return s})),i.d(t,"findParentNode",(function(){return l})),i.d(t,"focusFirstControl",(function(){return u})),i.d(t,"getFirstNonTextElement",(function(){return c})),i.d(t,"getNodesFromKoComponentInfo",(function(){return d})),i.d(t,"propertyExists",(function(){return p})),i.d(t,"isPropertyVisible",(function(){return m})),i.d(t,"toggleHovered",(function(){return g})),i.d(t,"clearNewLines",(function(){return h})),i.d(t,"select",(function(){return v})),i.d(t,"copyObject",(function(){return y})),i.d(t,"copyCssClasses",(function(){return f})),i.d(t,"assignDefaultV2Classes",(function(){return b}));var o=i(/*! survey-core */"survey-core");function r(e){if(!e)return"";for(var t="",i=e.length-1;i>=0;i--){if(e[i]>="0"&&e[i]<="9")t=e[i]+t;else if(t)return t;if(10==t.length)break}return t}var n={true:"false",True:"False",TRUE:"FALSE",false:"true",False:"True",FALSE:"TRUE",yes:"no",Yes:"No",YES:"NO",no:"yes",No:"Yes",NO:"YES"};function a(e,t){t=t.toString();for(var i=0;i<e.length;i++)if(e[i]&&e[i].toString()===t)return!0;return!1}function s(e,t){if(t.length>0)var i=function(e){return n[e]?n[e]:null}(t[t.length-1]);if(i&&t.indexOf(i)<0)return i;for(var o,s="",l=-1,u=t.length-1;u>=0;u--)if(t[u]){var c=t[u].toString();if(s=r(c)){l=c.lastIndexOf(s),o=t[u];break}}if(l>-1){var d,p=parseInt(s),m=o===p;do{if(m)d=++p;else{for(var g=(p++).toString();s.length>g.length;)g="0"+g;d=c.substr(0,l)+g+c.substr(l+s.length)}}while(a(t,d));return d}return e+1}function l(e,t){for(var i=t;i&&!i.classList.contains(e);)i=i.parentElement;return i}function u(e){for(var t=0;t<e.length;t++)if("function"==typeof e[t].getElementsByClassName){var i=e[t].getElementsByClassName("svd-focusable");if(0===i.length&&-1!==e[t].className.indexOf("svd-focusable")&&(i=[e[t]]),i.length>0){var o=i[0];if("a"!==o.tagName.toLowerCase()){o.focus({preventScroll:!0});break}}}}function c(e){if(e&&e.length){for(var t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}}function d(e){var t=e.element,i=[];if(8!==t.nodeType)return t.childNodes;for(;t=t.nextSibling;)3!==t.nodeType&&i.push(t);return i}function p(e,t){var i=!0;return e&&"function"==typeof e.getType&&(i=!!o.Serializer.findProperty(e.getType(),t)),i}function m(e,t){var i=!0;if(e&&"function"==typeof e.getType){var r=o.Serializer.findProperty(e.getType(),t);i=!r||r.visible}return i}function g(e,t,i){function o(e,i){void 0===i&&(i=null);var o=t.className.split(" ");i&&-1==o.indexOf(i)||-1==o.indexOf(e)&&(t.className+=" "+e)}void 0===i&&(i=0),e.__svc_question_processed||"mouseover"!==e.type?(t.className=t.className.replace(" svc-hovered-ready",""),t.className=t.className.replace(" svc-hovered","")):(i?(o("svc-hovered-ready"),setTimeout((function(){o("svc-hovered","svc-hovered-ready")}),i)):o("svc-hovered"),e.__svc_question_processed=!0)}function h(e){return e.replace(new RegExp("(\\r\\n|\\n|\\r)","gm"),"")}function v(e){var t,i;window.getSelection&&document.createRange?(i=window.getSelection(),(t=document.createRange()).selectNodeContents(e),i.removeAllRanges(),i.addRange(t)):document.selection&&document.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(e),t.select())}function y(e,t){for(var i in t){var o=t[i];"object"==typeof o&&(o={},this.copyObject(o,t[i])),e[i]=o}}function f(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:y(e,t))}function b(e,t){f(e,o.defaultV2Css.question),f(e,o.defaultV2Css[t])}},"survey-core":
|
|
584
|
+
/*! exports provided: getNextValue, findParentNode, focusFirstControl, getFirstNonTextElement, getNodesFromKoComponentInfo, propertyExists, isPropertyVisible, toggleHovered, clearNewLines, select, copyObject, copyCssClasses, assignDefaultV2Classes, wrapTextByCurlyBraces */function(e,t,i){"use strict";i.r(t),i.d(t,"getNextValue",(function(){return s})),i.d(t,"findParentNode",(function(){return l})),i.d(t,"focusFirstControl",(function(){return u})),i.d(t,"getFirstNonTextElement",(function(){return c})),i.d(t,"getNodesFromKoComponentInfo",(function(){return d})),i.d(t,"propertyExists",(function(){return p})),i.d(t,"isPropertyVisible",(function(){return m})),i.d(t,"toggleHovered",(function(){return g})),i.d(t,"clearNewLines",(function(){return h})),i.d(t,"select",(function(){return v})),i.d(t,"copyObject",(function(){return y})),i.d(t,"copyCssClasses",(function(){return f})),i.d(t,"assignDefaultV2Classes",(function(){return b})),i.d(t,"wrapTextByCurlyBraces",(function(){return x}));var o=i(/*! survey-core */"survey-core");function r(e){if(!e)return"";for(var t="",i=e.length-1;i>=0;i--){if(e[i]>="0"&&e[i]<="9")t=e[i]+t;else if(t)return t;if(10==t.length)break}return t}var n={true:"false",True:"False",TRUE:"FALSE",false:"true",False:"True",FALSE:"TRUE",yes:"no",Yes:"No",YES:"NO",no:"yes",No:"Yes",NO:"YES"};function a(e,t){t=t.toString();for(var i=0;i<e.length;i++)if(e[i]&&e[i].toString()===t)return!0;return!1}function s(e,t){if(t.length>0)var i=function(e){return n[e]?n[e]:null}(t[t.length-1]);if(i&&t.indexOf(i)<0)return i;for(var o,s="",l=-1,u=t.length-1;u>=0;u--)if(t[u]){var c=t[u].toString();if(s=r(c)){l=c.lastIndexOf(s),o=t[u];break}}if(l>-1){var d,p=parseInt(s),m=o===p;do{if(m)d=++p;else{for(var g=(p++).toString();s.length>g.length;)g="0"+g;d=c.substr(0,l)+g+c.substr(l+s.length)}}while(a(t,d));return d}return e+1}function l(e,t){for(var i=t;i&&!i.classList.contains(e);)i=i.parentElement;return i}function u(e){for(var t=0;t<e.length;t++)if("function"==typeof e[t].getElementsByClassName){var i=e[t].getElementsByClassName("svd-focusable");if(0===i.length&&-1!==e[t].className.indexOf("svd-focusable")&&(i=[e[t]]),i.length>0){var o=i[0];if("a"!==o.tagName.toLowerCase()){o.focus({preventScroll:!0});break}}}}function c(e){if(e&&e.length){for(var t=0;t<e.length;t++)if("#text"!=e[t].nodeName&&"#comment"!=e[t].nodeName)return e[t];return null}}function d(e){var t=e.element,i=[];if(8!==t.nodeType)return t.childNodes;for(;t=t.nextSibling;)3!==t.nodeType&&i.push(t);return i}function p(e,t){var i=!0;return e&&"function"==typeof e.getType&&(i=!!o.Serializer.findProperty(e.getType(),t)),i}function m(e,t){var i=!0;if(e&&"function"==typeof e.getType){var r=o.Serializer.findProperty(e.getType(),t);i=!r||r.visible}return i}function g(e,t,i){function o(e,i){void 0===i&&(i=null);var o=t.className.split(" ");i&&-1==o.indexOf(i)||-1==o.indexOf(e)&&(t.className+=" "+e)}void 0===i&&(i=0),e.__svc_question_processed||"mouseover"!==e.type?(t.className=t.className.replace(" svc-hovered-ready",""),t.className=t.className.replace(" svc-hovered","")):(i?(o("svc-hovered-ready"),setTimeout((function(){o("svc-hovered","svc-hovered-ready")}),i)):o("svc-hovered"),e.__svc_question_processed=!0)}function h(e){return e.replace(new RegExp("(\\r\\n|\\n|\\r)","gm"),"")}function v(e){var t,i;window.getSelection&&document.createRange?(i=window.getSelection(),(t=document.createRange()).selectNodeContents(e),i.removeAllRanges(),i.addRange(t)):document.selection&&document.body.createTextRange&&((t=document.body.createTextRange()).moveToElementText(e),t.select())}function y(e,t){for(var i in t){var o=t[i];"object"==typeof o&&(o={},this.copyObject(o,t[i])),e[i]=o}}function f(e,t){t&&("string"==typeof t||t instanceof String?e.root=t:y(e,t))}function b(e,t){f(e,o.defaultV2Css.question),f(e,o.defaultV2Css[t])}function x(e){return"{"+e+"}"}},"survey-core":
|
|
581
585
|
/*!*********************************************************************************************************!*\
|
|
582
586
|
!*** external {"root":"Survey","commonjs2":"survey-core","commonjs":"survey-core","amd":"survey-core"} ***!
|
|
583
587
|
\*********************************************************************************************************/
|
|
584
|
-
/*! no static exports found */function(t,i){t.exports=e}})},e.exports=o(i(3))},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,i){},function(e,t,i){"use strict";i.r(t),i.d(t,"Version",(function(){return de})),i.d(t,"SurveyCreatorComponent",(function(){return y})),i.d(t,"DesignTimeSurveyModel",(function(){return f})),i.d(t,"SurveyCreator",(function(){return b})),i.d(t,"RowWrapper",(function(){return x})),i.d(t,"QuestionAdornerComponent",(function(){return k})),i.d(t,"QuestionWrapperHeader",(function(){return S})),i.d(t,"QuestionWrapperFooter",(function(){return P})),i.d(t,"QuestionDropdownAdornerComponent",(function(){return E})),i.d(t,"QuestionImageAdornerComponent",(function(){return C})),i.d(t,"QuestionRatingAdornerComponent",(function(){return N})),i.d(t,"QuestionWidgetAdornerComponent",(function(){return O})),i.d(t,"CellQuestionAdornerComponent",(function(){return _})),i.d(t,"CellQuestionDropdownAdornerComponent",(function(){return A})),i.d(t,"CreatorSurveyPageComponent",(function(){return V})),i.d(t,"PanelAdornerComponent",(function(){return j})),i.d(t,"LogoImageComponent",(function(){return I})),i.d(t,"SurveyQuestionLinkValue",(function(){return z})),i.d(t,"SurveyElementEmbeddedSurvey",(function(){return M})),i.d(t,"QuestionEditorContentComponent",(function(){return q})),i.d(t,"ItemValueAdornerComponent",(function(){return L})),i.d(t,"ImageItemValueAdornerComponent",(function(){return R})),i.d(t,"MatrixCellAdornerComponent",(function(){return D})),i.d(t,"SurveyResults",(function(){return B})),i.d(t,"SurveyCreatorToolboxTool",(function(){return H})),i.d(t,"SurveyCreatorToolboxItem",(function(){return F})),i.d(t,"Toolbox",(function(){return Q})),i.d(t,"AdaptiveToolbox",(function(){return U})),i.d(t,"TabbedMenuComponent",(function(){return d})),i.d(t,"TabbedMenuItemComponent",(function(){return m})),i.d(t,"NotifierComponent",(function(){return h})),i.d(t,"SurveyNavigation",(function(){return G})),i.d(t,"SideBarComponent",(function(){return J})),i.d(t,"TranslationLineSkeleton",(function(){return K})),i.d(t,"ActionButton",(function(){return Z})),i.d(t,"TabDesignerComponent",(function(){return $})),i.d(t,"TabEmbedComponent",(function(){return ee})),i.d(t,"TabJsonEditorAceComponent",(function(){return te})),i.d(t,"TabJsonEditorTextareaComponent",(function(){return ie})),i.d(t,"TabLogicAddButtonComponent",(function(){return oe})),i.d(t,"TabLogicComponent",(function(){return re})),i.d(t,"TabPreviewTestSurveyAgainComponent",(function(){return ae})),i.d(t,"TabPreviewSurveyComponent",(function(){return se})),i.d(t,"TabTranslationComponent",(function(){return le})),i.d(t,"SurveySimulator",(function(){return ne})),i.d(t,"ReactMouseEvent",(function(){return w})),i.d(t,"ReactDragEvent",(function(){return T})),i.d(t,"PropertyGridComponent",(function(){return ce})),i.d(t,"editorLocalization",(function(){return u.editorLocalization})),i.d(t,"localization",(function(){return u.editorLocalization})),i.d(t,"settings",(function(){return u.settings})),i.d(t,"svgBundle",(function(){return u.svgBundle})),i.d(t,"SurveyLogic",(function(){return u.SurveyLogic})),i.d(t,"SurveyLogicUI",(function(){return u.SurveyLogicUI})),i.d(t,"SurveyQuestionEditorDefinition",(function(){return u.SurveyQuestionEditorDefinition})),i.d(t,"ToolboxToolViewModel",(function(){return u.ToolboxToolViewModel})),i.d(t,"PropertyGridEditorCollection",(function(){return u.PropertyGridEditorCollection})),i.d(t,"StylesManager",(function(){return u.StylesManager}));i(5),Object.assign;function o(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var r=i(0),n=i.n(r),a=i(4),s=i.n(a),l=i(1),u=i(2),c=i(3),d=function(e){function t(t){var i=e.call(this,t)||this;return i.rootRef=n.a.createRef(),i}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.model.renderedActions.map((function(e){return n.a.createElement(p,{item:e,key:e.id})}));return n.a.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu"},e)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new c.ResponsivityManager(t,this.model,".svc-tabbed-menu-item-container:not(.sv-dots)>.sv-action__content"))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t}(l.SurveyElementBase),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e="svc-tabbed-menu-item-container";this.item.css&&(e+=" "+this.item.css),e+=this.item.isVisible?"":" sv-action--hidden";var t=l.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return n.a.createElement("span",{key:this.item.id,className:e},n.a.createElement("div",{className:"sv-action__content"},t))},t}(l.SurveyElementBase),m=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this.item,t="svc-tabbed-menu-item";e.active&&(t+=" svc-tabbed-menu-item--selected"),void 0===e.enabled||e.enabled||(t+=" svc-tabbed-menu-item--disabled");var i="svc-text svc-tabbed-menu-item__text svc-text--normal";return e.active&&(i+=" svc-text--bold"),Object(l.attachKey2click)(n.a.createElement("div",{className:t,onClick:function(){return e.action(e)}},n.a.createElement("span",{className:i},e.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",(function(e){return n.a.createElement(m,e)}));var g=function(e){function t(t){var i=e.call(this,t)||this;return i.blurredByEscape=!1,i.onInput=function(e){return i.baseModel.onInput(e.nativeEvent),i.baseModel.errorText},i.onFocus=function(e){i.baseModel.onFocus(e.nativeEvent)},i.onKeyDown=function(e){return i.baseModel.onKeyDown(e.nativeEvent)},i.done=function(e){i.baseModel.done(e),i.locString.__isEditing=!1},i.edit=function(e){i.svStringEditorRef.current.focus(),i.locString.__isEditing=!0,i.baseModel.onClick(e)},i.state={changed:0},i.baseModel=new u.StringEditorViewModelBase(i.locString,i.creator),i.svStringEditorRef=n.a.createRef(),i.baseModel.blurEditor=function(){i.svStringEditorRef.current.blur()},i}return o(t,e),Object.defineProperty(t.prototype,"locString",{get:function(){return this.props.locStr.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.locStr.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.baseModel},Object.defineProperty(t.prototype,"errorText",{get:function(){return this.baseModel.errorText},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locString){var e=this;this.locString.onChanged=function(){e.setState({changed:e.state.changed+1})},this.locString.__isEditing&&this.svStringEditorRef.current.focus()}},t.prototype.componentWillUnmount=function(){this.locString&&(this.locString.onChanged=function(){})},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.baseModel.placeholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return this.baseModel.contentEditable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.baseModel.className(this.locString.renderedHtml)},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.locString)return null;this.baseModel.setLocString(this.locString);var e=null;if(this.locString.hasHtml){var t={__html:this.locString.renderedHtml};e=n.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:t,onBlur:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onClick:this.edit})}else e=n.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,onBlur:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onClick:this.edit},this.locString.renderedHtml);return n.a.createElement("span",{className:this.className},n.a.createElement("span",{className:"svc-string-editor__content"},n.a.createElement("div",{className:"svc-string-editor__border",onClick:this.edit},n.a.createElement(l.SvgIcon,{className:"svc-string-editor__button svc-string-editor__button--edit",size:16,iconName:"icon-edit"})),e,n.a.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit})),this.errorText?n.a.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-string-editor",(function(e){return n.a.createElement(g,e)}));var h=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){return this.notifier.active?n.a.createElement("div",{className:this.notifier.css},n.a.createElement("span",null,this.notifier.message)):null},t}(l.SurveyElementBase),v=function(e){function t(t){var i=e.call(this,t)||this;return i.containerRef=n.a.createRef(),i}return o(t,e),t.prototype.componentDidMount=function(){this.containerRef.current.innerHTML=u.svgBundle},t.prototype.componentWillUnmount=function(){},t.prototype.render=function(){return n.a.createElement("div",{ref:this.containerRef})},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-svg-bundle",(function(e){return n.a.createElement(v,e)}));var y=function(e){function t(t){var i=e.call(this,t)||this;return i.rootNode=n.a.createRef(),i}return o(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.props.creator},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.creator.initKeyboardShortcuts(this.rootNode.current),this.creator.initResponsivityManager(this.rootNode.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.creator.removeKeyboardShortcuts(this.rootNode.current),this.creator.resetResponsivityManager()},t.prototype.renderElement=function(){var e=this.props.creator,t="svc-creator"+(this.props.creator.isMobileView?" svc-creator--mobile":""),i="svc-creator__content-wrapper svc-flex-row"+(this.props.creator.isMobileView?" svc-creator__content-wrapper--footer-toolbar":""),o="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sideBarLocation,r=null;return this.props.creator.haveCommercialLicense||(r=n.a.createElement("div",{className:"svc-creator__banner"},n.a.createElement("span",{className:"svc-creator__non-commercial-text"},n.a.createElement("a",{href:"https://surveyjs.io/buy"},this.props.creator.licenseText)))),n.a.createElement("div",{className:t,ref:this.rootNode},n.a.createElement(v,null),n.a.createElement("div",{className:"svc-full-container svc-creator__area svc-flex-column"},n.a.createElement("div",{className:o},n.a.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},n.a.createElement("div",{className:"svc-top-bar"},e.showTabs?n.a.createElement("div",{className:"svc-tabbed-menu-wrapper"},n.a.createElement(d,{model:e.tabbedMenu})):null,e.showToolbar?n.a.createElement("div",{className:"svc-toolbar-wrapper"},n.a.createElement(l.SurveyActionBar,{model:e.toolbar})):null),n.a.createElement("div",{className:i},n.a.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),n.a.createElement("div",{className:"svc-footer-bar"},e.isMobileView?n.a.createElement("div",{className:"svc-toolbar-wrapper"},n.a.createElement(l.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSideBar()),r,n.a.createElement(h,{creator:e,notifier:e.notifier})))},t.prototype.renderActiveTab=function(){for(var e=this.props.creator,t=0;t<e.tabs.length;t++)if(e.tabs[t].id===e.activeTab)return this.renderCreatorTab(e.tabs[t]);return null},t.prototype.renderCreatorTab=function(e){if(!1===e.visible)return null;var t=this.props.creator,i=e.renderTab?e.renderTab():l.ReactElementFactory.Instance.createElement(e.componentContent,{creator:t,survey:t.survey,data:e.data.model}),o="svc-creator-tab"+("right"==t.toolboxLocation?" svc-creator__toolbox--right":"");return n.a.createElement("div",{key:e.id,id:"scrollableDiv-"+e.id,className:o},i)},t.prototype.renderSideBar=function(){if(this.creator.sideBar){var e=this.creator.isMobileView?"sv-mobile-side-bar":"";return n.a.createElement("div",{className:e},l.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sideBar}))}return null},t}(l.SurveyElementBase),f=function(e){function t(t,i){var o=e.call(this,i)||this;return o.creator=t,o.isPopupEditorContent=!1,o}return o(t,e),t.prototype.getElementWrapperComponentName=function(t,i){return Object(u.getElementWrapperComponentName)(t,i,this.isPopupEditorContent)||e.prototype.getElementWrapperComponentName.call(this,t,i)},t.prototype.getElementWrapperComponentData=function(t,i){return Object(u.getElementWrapperComponentData)(t,i,this.creator)||e.prototype.getElementWrapperComponentData.call(this,t)},t.prototype.getRowWrapperComponentName=function(e){return"svc-row"},t.prototype.getRowWrapperComponentData=function(e){return{creator:this.creator,row:e}},t.prototype.getItemValueWrapperComponentName=function(e,t){return Object(u.getItemValueWrapperComponentName)(e,t)},t.prototype.getItemValueWrapperComponentData=function(e,t){return Object(u.getItemValueWrapperComponentData)(e,t,this.creator)},t.prototype.getRendererForString=function(e,t){if(!this.creator.readOnly&&Object(u.isStringEditable)(e,t))return"svc-string-editor"},t.prototype.getRendererContextForString=function(e,t){var i=t;return!this.creator.readOnly&&Object(u.isStringEditable)(e,t.name)?{creator:this.creator,element:e,locStr:t}:i},t}(l.Model),b=function(e){function t(t,i){return void 0===t&&(t={}),e.call(this,t,i)||this}return o(t,e),t.prototype.createSurveyCore=function(e,t){return void 0===e&&(e={}),"designer"===t||"modal-question-editor"===t?new f(this,e):new l.Model(e)},t.prototype.render=function(e){var t=e;"string"==typeof e&&(t=document.getElementById(e)),s.a.unmountComponentAtNode(t),s.a.render(n.a.createElement(n.a.StrictMode,null,n.a.createElement(y,{creator:this})),t)},t.prototype.createQuestionElement=function(e){return l.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})},t.prototype.renderError=function(e,t,i){return n.a.createElement("div",{key:e},n.a.createElement("span",{className:i.error.icon,"aria-hidden":"true"}),n.a.createElement("span",{className:i.error.item},n.a.createElement(l.SurveyLocStringViewer,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(u.CreatorBase);l.ReactElementFactory.Instance.registerElement("survey-widget",(function(e){return n.a.createElement(l.Survey,e)}));var x=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.RowViewModel(i.props.componentData.creator,i.props.row,null),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return n.a.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},this.props.element)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-row",(function(e){return n.a.createElement(x,e)}));var w=function(){function e(e){this.event=e}return e.prototype.stopPropagation=function(){this.event.stopPropagation()},e.prototype.preventDefault=function(){this.event.preventDefault()},Object.defineProperty(e.prototype,"cancelBubble",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this.event.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this.event.currentTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.event.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.event.clientY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.event.nativeEvent.offsetX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.event.nativeEvent.offsetY},enumerable:!1,configurable:!0}),e}(),T=function(e){function t(t){var i=e.call(this,t)||this;return i.event=t,i}return o(t,e),Object.defineProperty(t.prototype,"dataTransfer",{get:function(){return this.event.dataTransfer},enumerable:!1,configurable:!0}),t}(w),k=function(e){function t(t){var i=e.call(this,t)||this;return i.modelValue=i.createQuestionViewModel(),i}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!this.model.isDragged},t.prototype.renderElement=function(){var e=this.model.surveyElement.isInteractiveDesignElement,t=this.renderContent(e);return n.a.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.surveyElement.name||null,className:"svc-question__adorner"+this.model.rootCss(),onMouseOut:function(t){return e&&Object(u.toggleHovered)(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e&&Object(u.toggleHovered)(t.nativeEvent,t.currentTarget)}},t)},t.prototype.renderContent=function(e){var t=this,i=this.renderElementContent();return e?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-question__content "+this.model.css(),onClick:function(e){return t.model.select(t.model,new w(e))}},this.renderHeader(),i,this.renderFooter())):i},t.prototype.renderHeader=function(){return l.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})},t.prototype.renderFooter=function(){return l.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model})},t.prototype.renderElementContent=function(){return n.a.createElement(n.a.Fragment,null,this.props.element,this.renderElementPlaceholder())},t.prototype.renderElementPlaceholder=function(){return this.model.isEmptyElement?n.a.createElement("div",{className:"svc-panel__placeholder_frame"},n.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText)):null},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-question",(function(e){return n.a.createElement(k,e)}));var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return this.props.model.allowDragging?n.a.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.props.model.onPointerDown(t)}},n.a.createElement("div",{className:"svc-question__drag-element"})):null},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-question-header",(function(e){return n.a.createElement(S,e)}));var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return n.a.createElement("div",{className:this.props.className},n.a.createElement(l.SurveyActionBar,{model:this.props.model.actionContainer}))},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-question-footer",(function(e){return n.a.createElement(P,e)}));var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.renderElementPlaceholder=function(){var e=this.props.question,t=this.props.question.textStyle;return n.a.createElement("div",{className:"svc-question__dropdown-choices"},(e.visibleChoices||[]).map((function(i,o){return n.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(o)},e.survey.wrapItemValue(l.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:i,textStyle:t,index:o,isChecked:e.value===i.value}),e,i))})))},t}(k);l.ReactElementFactory.Instance.registerElement("svc-dropdown-question",(function(e){return n.a.createElement(E,e)}));var C=function(e){function t(t){var i=e.call(this,t)||this;return i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionImageAdornerViewModel(this.props.componentData,this.props.question,null,null)},Object.defineProperty(t.prototype,"imageModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.imageModel.questionRoot=this.rootRef.current},t.prototype.renderHeader=function(){return n.a.createElement(n.a.Fragment,null,n.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),e.prototype.renderHeader.call(this))},t.prototype.renderElementPlaceholder=function(){var e=this;return n.a.createElement("div",{className:"svc-image-question-controls"},this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-question-controls__button svc-image-question-controls__choose-file",onClick:function(){return e.imageModel.chooseFile(e.imageModel)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-file"}))):null)},t}(k);l.ReactElementFactory.Instance.registerElement("svc-image-question",(function(e){return n.a.createElement(C,e)}));var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionRatingAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"ratingModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderFooter=function(){var t=this.ratingModel;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-rating-question-controls svc-item-value-controls"},t.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":t.removeTooltip,onClick:function(){return t.removeItem(t)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null,t.allowAdd?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":t.addTooltip,onClick:function(){return t.addItem(t)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):null),e.prototype.renderFooter.call(this))},t}(k);l.ReactElementFactory.Instance.registerElement("svc-rating-question",(function(e){return n.a.createElement(N,e)}));var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"widgetModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderElementContent=function(){return n.a.createElement("div",{className:"svc-widget__content"},this.props.element)},t}(k);l.ReactElementFactory.Instance.registerElement("svc-widget-question",(function(e){return n.a.createElement(O,e)}));var _=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.QuestionAdornerViewModel(i.props.componentData,i.props.question,null),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return this.model.isDragged?null:n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.surveyElement.name,className:"svc-question__adorner"},n.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-cell-question",(function(e){return n.a.createElement(_,e)}));var A=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.QuestionAdornerViewModel(i.props.componentData,i.props.question,null),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){if(this.model.isDragged)return null;var e=this.props.question,t=this.props.question.textStyle;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.surveyElement.name,className:"svc-question__adorner"},n.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element,n.a.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map((function(i,o){return n.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(o)},e.survey.wrapItemValue(l.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:i,textStyle:t,index:o,isChecked:e.value===i.value}),e,i))}))))))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",(function(e){return n.a.createElement(A,e)}));var V=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.PageViewModel(i.props.creator,i.props.page),i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.model.onPageSelectedCallback=function(){t.rootRef.current&&u.SurveyHelper.scrollIntoViewIfNeeded(t.rootRef.current)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.dispose()},t.prototype.canRender=function(){return!!this.model&&this.model.isPageLive&&!!this.model.page&&!!this.model.page.survey},t.prototype.renderElement=function(){var e=this;return Object(l.attachKey2click)(n.a.createElement("div",{ref:this.rootRef,className:"svc-page__content "+this.model.css,id:this.props.page.id,onClick:function(t){return e.model.select(e.model,new w(t))},onMouseOut:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},this.renderHeader(),this.renderContent(),this.renderFooter()))},t.prototype.renderContent=function(){return n.a.createElement(l.SurveyPage,{page:this.props.page,survey:this.props.survey,creator:this.props.creator,css:this.model.css})},t.prototype.renderHeader=function(){return n.a.createElement("div",{className:"svc-page__content-actions"},n.a.createElement(l.SurveyActionBar,{model:this.model.actionContainer}))},t.prototype.renderFooter=function(){var e=this;if(!this.model.allowEdit)return null;var t=this.model.questionTypeSelectorModel;return Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-page__add-new-question svc-btn",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion(e.model,new w(t))}},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText),Object(l.attachKey2click)(n.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.action()},className:"svc-page__question-type-selector",title:this.model.addNewQuestionText},n.a.createElement("span",{className:"svc-page__question-type-selector-icon"},n.a.createElement(l.SvgIcon,{iconName:t.iconName,size:24})),n.a.createElement(l.Popup,{model:t.popupModel})))))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-page",(function(e){return n.a.createElement(V,e)}));var j=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.renderElementPlaceholder=function(){var e=this;return this.model.isEmptyElement?n.a.createElement("div",{className:"svc-panel__placeholder_frame"},n.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-panel__add-new-question",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion()}},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText))):null):null},t.prototype.renderFooter=function(){var t=this;return n.a.createElement(n.a.Fragment,null,!this.model.isEmptyElement&&this.model.surveyElement.isPanel&&this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-panel__add-new-question",onClick:function(e){e.stopPropagation(),t.model.addNewQuestion()}},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText),Object(l.attachKey2click)(n.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.model.questionTypeSelectorModel.action()},className:"svc-panel__question-type-selector",title:this.model.addNewQuestionText},n.a.createElement("span",{className:"svc-panel__question-type-selector-icon"},n.a.createElement(l.SvgIcon,{iconName:this.model.questionTypeSelectorModel.iconName,size:24})),n.a.createElement(l.Popup,{model:this.model.questionTypeSelectorModel.popupModel}))))):null,e.prototype.renderFooter.call(this))},t}(k);l.ReactElementFactory.Instance.registerElement("svc-panel",(function(e){return n.a.createElement(j,e)}));var I=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.LogoImageViewModel(t.data,null),i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.root=this.rootRef.current},t.prototype.render=function(){var e=this,t=null;return t=this.model.survey.locLogo.renderedHtml?n.a.createElement(n.a.Fragment,null,n.a.createElement(l.LogoImage,{data:this.props.data.survey}),this.model.allowEdit?n.a.createElement("div",{className:"svc-image-item-value-controls"},Object(l.attachKey2click)(n.a.createElement(l.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",size:24,iconName:"icon-file",onClick:function(){return e.model.chooseFile(e.model)}})),Object(l.attachKey2click)(n.a.createElement(l.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",size:24,iconName:"icon-delete",onClick:function(){return e.model.remove(e.model)}}))):null):this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-logo-image-placeholder",onClick:function(){return e.model.chooseFile(e.model)}},this.model.chooseLogoPlaceholder)):null,n.a.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},n.a.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input"}),t)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-logo-image",(function(e){return n.a.createElement(I,e)}));var z=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderClear=function(){var e=this,t=this.questionBase.showClear;return!this.questionBase.isReadOnly&&t?n.a.createElement(Z,{classes:this.question.linkClearButtonCssClasses,click:function(){return e.question.doClearClick()},selected:this.question.isSelected,text:u.editorLocalization.getString("pe.clear")}):null},t.prototype.renderElement=function(){var e=this;return n.a.createElement(n.a.Fragment,null,n.a.createElement(Z,{classes:this.question.linkSetButtonCssClasses,click:function(){return e.question.doLinkClick()},selected:this.question.isSelected,disabled:this.question.isReadOnly,text:this.question.linkValueText}),this.renderClear())},t}(l.SurveyQuestionElementBase);l.ReactQuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return n.a.createElement(z,e)}));var M=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.props.element||this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.embeddedSurvey)return null;var e=this.embeddedSurvey.embeddedSurvey;return e&&e.currentPage?n.a.createElement(l.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator}):null},t}(l.SurveyQuestionElementBase);l.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return n.a.createElement(M,e)}));var q=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.createQuestionElement=function(e){return l.ReactQuestionFactory.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t.prototype.renderError=function(e,t,i){return null},t.prototype.render=function(){var e=this.survey.getAllQuestions()[0];return n.a.createElement(n.a.Fragment,null,n.a.createElement(l.SurveyQuestion,{creator:this,element:e}))},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-question-editor-content",(function(e){return n.a.createElement(q,e)}));var L=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.ItemValueWrapperViewModel(i.props.componentData.creator,i.props.question,i.props.item),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=this.model.allowAdd?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":this.model.tooltip,onClick:function(){return e.model.add(e.model)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):n.a.createElement(n.a.Fragment,null," ",this.model.isDraggable?n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__drag","aria-label":this.model.dragTooltip},n.a.createElement(l.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:24,iconName:"icon-drag-area-indicator"})):null,this.model.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":this.model.tooltip,onClick:function(){return e.model.remove(e.model)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null);return n.a.createElement("div",{className:"svc-item-value-wrapper"+(this.model.allowAdd?" svc-item-value--new":"")+(this.model.isDragging?" svc-item-value--dragging":"")+(this.model.isDragDropGhost?" svc-item-value--ghost":"")+(this.model.isDragDropMoveDown?" svc-item-value--movedown":"")+(this.model.isDragDropMoveUp?" svc-item-value--moveup":""),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)}},n.a.createElement("div",{className:"svc-item-value__ghost"}),n.a.createElement("div",{className:"svc-item-value-controls"},t),n.a.createElement("div",{className:"svc-item-value__item",onClick:function(t){return e.model.select(e.model,t)}},this.props.element))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-item-value",(function(e){return n.a.createElement(L,e)}));var R=function(e){function t(t){var i=e.call(this,t)||this;return i.preventDragHandler=function(e){e.preventDefault()},i.model=new u.ImageItemValueWrapperViewModel(i.props.componentData.creator,i.props.question,i.props.item,null,null),i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.itemsRoot=this.rootRef.current},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=!this.props.question.isItemInList(this.props.item),i=this.props.question.imageWidth,o=this.props.question.imageHeight,r=null;return r=t?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-image-item-value__item"},n.a.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},n.a.createElement("label",{className:"sd-imagepicker__label"},n.a.createElement("div",{style:{width:i?i+"px":void 0,height:o?o+"px":void 0},className:"sd-imagepicker__image"})))),n.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowAdd?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__add",onClick:function(){return e.model.chooseNewFile(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-add-lg"}))):null)):n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-image-item-value__item"},this.props.element),n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__drag-area-indicator",onPointerDown:function(t){return e.model.onPointerDown(t)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-drag-area-indicator"})),n.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",onClick:function(){return e.model.chooseFile(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-file"}))):null,this.model.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",onClick:function(){return e.model.remove(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-delete"}))):null)),n.a.createElement("div",{ref:this.rootRef,className:"svc-image-item-value-wrapper"+(t?" svc-image-item-value--new":"")+(this.model.isDragDropGhost?" svc-image-item-value-wrapper--ghost":""),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)},onDragStart:this.preventDragHandler},n.a.createElement("div",{className:"svc-image-item-value-wrapper__ghost"}),n.a.createElement("div",{className:"svc-image-item-value-wrapper__content"},n.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),r))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-image-item-value",(function(e){return n.a.createElement(R,e)}));var D=function(e){function t(t){var i=e.call(this,t)||this,o=i.props.componentData;return i.model=new u.MatrixCellWrapperViewModel(o.creator,o.element,o.question,o.row,o.column),i}return o(t,e),t.prototype.componentDidUpdate=function(t,i){e.prototype.componentDidUpdate.call(this,t,i);var o=this.props.componentData;this.model.templateData=o.element,this.model.row=o.row,this.model.column=o.column,this.model.question=o.question},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=null;return this.model.question&&(t=n.a.createElement("div",{className:"svc-matrix-cell__question-controls"},Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-matrix-cell__question-controls-button",onClick:function(){return e.model.editQuestion(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-edit"}))))),n.a.createElement("div",{className:"svc-matrix-cell",key:this.props.element.key,onClick:function(t){return!e.props.question&&e.model.selectContext(e.model,t)},onMouseOut:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},n.a.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,t)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-matrix-cell",(function(e){return n.a.createElement(D,e)}));var B=function(e){function t(t){var i=e.call(this,t)||this;return t.survey&&(i.model=new u.SurveyResultsModel(t.survey)),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return this.model?n.a.createElement("div",{className:"svd_test_results"},n.a.createElement("div",{className:"svd_results_header"},n.a.createElement("h2",null,this.model.surveyResultsText)),n.a.createElement("ul",{className:"navbar-default container-fluid nav nav-tabs editor-tabs"},n.a.createElement("li",{className:"nav-item "+this.model.resultViewType=="table"?"active":""},Object(l.attachKey2click)(n.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){return e.model.selectTableClick(e.model)}},this.model.getLocString("ed.surveyResultsTable")))),n.a.createElement("li",{className:"nav-item "+this.model.resultViewType=="text"?"active":""},Object(l.attachKey2click)(n.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){return e.model.selectJsonClick(e.model)}},this.model.getLocString("ed.surveyResultsJson"))))),this.renderResultAsText(),this.renderResultAsTable()):null},t.prototype.renderResultAsText=function(){return"text"!==this.model.resultViewType?null:n.a.createElement("div",{className:"svd_results_text svd-light-bg-color"},n.a.createElement("div",null,this.model.resultText))},t.prototype.renderResultAsTable=function(){return"table"!==this.model.resultViewType?null:n.a.createElement("div",{className:"svd_results_table svd-light-bg-color"},n.a.createElement("table",null,n.a.createElement("thead",null,n.a.createElement("tr",{className:"svd-light-background-color"},n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsTitle),n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsName),n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsValue),n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsDisplayValue))),n.a.createElement("tbody",null,this.renderRows(this.model.resultData))))},t.prototype.renderRows=function(e){var t=this;return e.map((function(e){return t.renderRow(e)}))},t.prototype.renderRow=function(e){return n.a.createElement(n.a.Fragment,null,n.a.createElement("tr",{"data-bind":"click: toggle"},n.a.createElement("td",{className:"svd-dark-border-color"},e.isNode?n.a.createElement("span",{className:""},"▶"):null,n.a.createElement("span",null,e.title)),n.a.createElement("td",{className:"svd-dark-border-color"},e.name),n.a.createElement("td",{className:"svd-dark-border-color"},n.a.createElement("div",{className:"survey-result-value"},e.getString(e.value))),n.a.createElement("td",{className:"svd-dark-border-color"},e.getString(e.displayValue))),this.renderRows(e.data))},t}(l.SurveyElementBase),H=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.ToolboxToolViewModel(i.item,i.props.creator),i}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.props.isCompact},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this,t=this.item,i="svc-toolbox__tool "+t.css+(t.isVisible?"":" sv-action--hidden"),o=l.ReactElementFactory.Instance.createElement(this.item.component||"svc-toolbox-item",{item:this.item,creator:this.creator,isCompact:this.isCompact});return n.a.createElement("div",{className:i,key:t.id,onPointerDown:function(t){t.persist(),e.model.onPointerDown(t)}},n.a.createElement("div",{className:"sv-action__content"},this.isCompact&&t.needSeparator?n.a.createElement("div",{className:"svc-toolbox__category-separator"}):null,o))},t}(l.SurveyElementBase),F=function(e){function t(t){var i=e.call(this,t)||this,o=i.props.item;return i.model=new u.ToolboxToolViewModel(o,i.props.creator),i}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t="svc-toolbox__item svc-toolbox__item--"+this.item.iconName;return Object(l.attachKey2click)(n.a.createElement("div",{className:t,tabIndex:0,role:"button","aria-label":this.item.tooltip+" "+u.editorLocalization.getString("toolbox")+" item",onClick:function(t){t.persist(),e.model.click(t)}},n.a.createElement("span",{className:"svc-toolbox__item-container"},n.a.createElement(l.SvgIcon,{size:24,iconName:this.item.iconName})),this.props.isCompact?n.a.createElement("span",{className:"svc-toolbox__item-banner svc-item__banner"},n.a.createElement(l.SvgIcon,{size:24,iconName:this.item.iconName}),n.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)):n.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-toolbox-item",(function(e){return n.a.createElement(F,e)}));var Q=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbox",{get:function(){return this.creator.toolbox},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.toolbox},t.prototype.render=function(){return this.toolbox.hasActions?n.a.createElement("div",{className:"svc-toolbox"},n.a.createElement("div",{className:"svc-toolbox__container"},1==this.toolbox.categories.length?n.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.visibleActions)):this.renderCategories())):null},t.prototype.renderItems=function(e){var t=this;return e.map((function(e,i){return n.a.createElement(H,{item:e,creator:t.creator,key:"item"+i,isCompact:!1})}))},t.prototype.renderCategories=function(){var e=this;return this.toolbox.categories.map((function(t){var i=e.renderCategoryHeader(t),o=e.renderCategoryContent(t);return n.a.createElement("div",{className:"svc-toolbox__category",key:t.name},i,o)}))},t.prototype.renderCategoryHeader=function(e){var t=e.collapsed?"arrow-down":"arrow-up",i="svc-toolbox__category-header__button svc-string-editor__button--"+(e.collapsed?"expand":"collapse");return Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-toolbox__category-header",onClick:function(t){return e.toggleState()}},n.a.createElement("span",{className:"svc-toolbox__category-title"},e.name),n.a.createElement("div",{className:"svc-toolbox__category-header__controls"},n.a.createElement(l.SvgIcon,{className:i,iconName:"icon-"+t,size:24}))))},t.prototype.renderCategoryContent=function(e){return e.collapsed?[]:this.renderItems(e.items)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-toolbox",(function(e){return n.a.createElement(Q,e)}));var U=function(e){function t(t){var i=e.call(this,t)||this;return i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new c.VerticalResponsivityManager(t,this.toolbox,".svc-toolbox__tool:not(.sv-dots)>.sv-action__content",40))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){if(!this.toolbox.hasActions)return null;var e="svc-toolbox"+(this.toolbox.isCompact?" svc-toolbox--compact":"");return n.a.createElement("div",{ref:this.rootRef,className:e},n.a.createElement("div",{className:"svc-toolbox__container"},this.toolbox.isCompact||1==this.toolbox.categories.length?n.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompact)):this.renderCategories()))},t.prototype.renderItems=function(e,t){var i=this;return e.map((function(e,o){return n.a.createElement(H,{item:e,creator:i.creator,isCompact:t,key:"item"+o})}))},t.prototype.renderCategoryContent=function(e){var t=[];return e.collapsed||(t=this.renderItems(e.items,!1)),t},t}(Q);l.ReactElementFactory.Instance.registerElement("svc-adaptive-toolbox",(function(e){return n.a.createElement(U,e)}));var G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPropChangedHandler=function(e,i){if(!t.isRendering){var o=["showProgressBar","progressBarType","currentPageValue"];if(!(o.indexOf(i.name)<0)){for(var r={},n=0;n<o.length;n++){var a=o[n];r[a]=t.survey[a]}t.setState(r)}}},t}return o(t,e),t.prototype.componentDidMount=function(){this.setHandler()},t.prototype.componentDidUpdate=function(e,t){this.setHandler()},t.prototype.setHandler=function(){this.survey&&!this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler)&&this.survey.onPropertyChanged.add(this.onPropChangedHandler)},t.prototype.componentWillUnmount=function(){this.survey&&this.survey.onPropertyChanged.remove(this.onPropChangedHandler)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTop",{get:function(){return"top"==this.location},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.isTop?this.survey.isShowProgressBarOnTop:this.survey.isShowProgressBarOnBottom},t.prototype.renderElement=function(){return l.ReactElementFactory.Instance.createElement("sv-progress-"+this.survey.progressBarType.toLowerCase(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})},t}(l.SurveyElementBase),J=function(e){function t(t){var i=e.call(this,t)||this;return i.containerRef=n.a.createRef(),i}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.initResizeManager(this.containerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.resetResizeManager()},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){var e=this,t={display:this.model.visible?"":"none"},i="svc-side-bar"+(this.model.flyoutPanelMode?" svc-flyout-side-bar":""),o=this.model.tabs.map((function(e){return n.a.createElement(W,{item:e,key:e.id})}));return n.a.createElement("div",{className:i,style:{display:this.model.hasVisibleTabs?"":"none"}},n.a.createElement("div",{className:"svc-side-bar__shadow"}),n.a.createElement("div",{className:"svc-flex-column svc-side-bar__wrapper"},n.a.createElement("div",{ref:this.containerRef,style:t,className:"svc-side-bar__container"},n.a.createElement("div",{className:"svc-side-bar__container-header"},n.a.createElement("div",{className:"svc-side-bar__container-actions"},n.a.createElement(l.SurveyActionBar,{model:this.model.toolbar})),n.a.createElement("div",{className:"svc-side-bar__container-title"},this.model.headerText)),n.a.createElement("div",{className:"svc-side-bar__container-content"},o),n.a.createElement("div",{className:"svc-side-bar__container-close"},n.a.createElement("div",{className:"sd-btn sd-btn--action svc-side-bar__container-close-button",onClick:function(){return e.model.collapseSideBar()}}," ",this.model.closeText," ")))))},t}(l.SurveyElementBase),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return this.item.visible?l.ReactElementFactory.Instance.createElement(this.item.componentName,{model:this.item.model}):null},t}(l.SurveyElementBase);l.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-tab",(function(e){return n.a.createElement(W,e)}));l.ReactElementFactory.Instance.registerElement("svc-side-bar",(function(e){return n.a.createElement(J,e)}));var K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return n.a.createElement("div",{className:"sd-translation-line-skeleton"})},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",(function(e){return n.a.createElement(K,e)}));var Z=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.renderElement=function(){var e=this,t=this.props.classes+" svc-action-button";return this.props.selected&&(t+=" svc-action-button--selected"),this.props.disabled?(t+=" svc-action-button--disabled",n.a.createElement("span",{className:t},this.props.text)):n.a.createElement(n.a.Fragment,null,Object(l.attachKey2click)(n.a.createElement("span",{role:"button",className:t,onClick:function(t){t.stopPropagation(),e.props.click()}},this.props.text)))},t}(l.SurveyElementBase),Y=function(e){function t(t){var i=e.call(this,t)||this;return i.containerRef=n.a.createRef(),i.model=new u.PageNavigatorViewModel(t.creator.pagesController),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.containerRef.current;if(t){var i=this;t.parentElement.parentElement.onscroll=function(e){return i.model.onContainerScroll(e.currentTarget)}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.containerRef.current;t&&(t.parentElement.parentElement.onscroll=void 0),this.model.dispose()},t.prototype.renderElement=function(){var e=this,t="svc-page-navigator__selector";return this.model.isPopupOpened&&(t+=" svc-page-navigator__selector--opened"),n.a.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},Object(l.attachKey2click)(n.a.createElement("div",{className:t,onClick:function(){return e.model.togglePageSelector()},title:this.model.pageSelectorCaption},n.a.createElement(l.SvgIcon,{className:"svc-page-navigator__navigator-icon",iconName:this.model.icon,size:24}),n.a.createElement(l.Popup,{model:this.model.popupModel}))),this.model.items.map((function(e){return n.a.createElement(X,{key:e.id,item:e})})))},t}(l.SurveyElementBase),X=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.getStateElement=function(){return this.props.item},t.prototype.renderElement=function(){var e=this.props.item,t="svc-page-navigator-item-content";return Object(c.unwrap)(e.active)&&(t+=" svc-page-navigator-item--selected"),Object(c.unwrap)(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),n.a.createElement("div",{className:"svc-page-navigator-item"},Object(l.attachKey2click)(n.a.createElement("div",{className:t,onClick:function(t){e.action(e),t.stopPropagation()}},n.a.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title}),n.a.createElement("div",{className:"svc-page-navigator-item__banner svc-item__banner"},n.a.createElement("span",{className:"svc-text svc-text--small svc-text--bold"},e.title),n.a.createElement("span",{className:"svc-page-navigator-item__dot"})))))},t}(l.SurveyElementBase),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.model.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.model,this.model.survey]},t.prototype.renderPages=function(){var e=this,t=this.creator.survey.pages.map((function(t,i){return n.a.createElement("div",{className:"svc-page","data-sv-drop-target-page":t.name,"data-sv-drop-target-survey-element":t.name,key:t.id+"-"+i},e.renderPage(t))}));return this.model.showNewPage&&t.push(n.a.createElement("div",{className:"svc-page","data-sv-drop-target-survey-element":"newGhostPage",key:this.model.newPage.id+"-ghost-new-page"},this.renderPage(this.model.newPage))),t},t.prototype.renderPage=function(e){return l.ReactElementFactory.Instance.createElement("svc-page",{survey:this.creator.survey,page:e,creator:this.creator})},t.prototype.renderElement=function(){var e=this,t=this.creator.survey,i="svc-tab-designer "+this.model.getRootCss();return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?l.ReactElementFactory.Instance.createElement("svc-adaptive-toolbox",{model:this.creator}):null),n.a.createElement("div",{className:i,onClick:function(){return e.model.clickDesigner()}},n.a.createElement("div",{className:this.model.getDesignerCss()},this.creator.allowEditSurveyTitle?n.a.createElement("div",null,n.a.createElement(l.SurveyHeader,{survey:t})):null,n.a.createElement(G,{survey:t,location:"top"}),this.renderPages(),n.a.createElement(G,{survey:t,location:"bottom",css:t.css})),this.creator.showPageNavigator?n.a.createElement("div",{className:"svc-tab-designer__page-navigator"},n.a.createElement(Y,{creator:this.creator,pages:this.creator.pagesController.pages})):null))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-designer",(function(e){return n.a.createElement($,e)}));var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return n.a.createElement("div",{className:"svc-creator-tab__content svc-embed-tab__content"},this.model.survey?n.a.createElement(l.Survey,{model:this.model.survey}):null)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-embed",(function(e){return n.a.createElement(ee,e)}));var te=function(e){function t(t){var i=e.call(this,t)||this;return i.aceEditorrRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.model.init(ace.edit(this.aceEditorrRef.current))},t.prototype.renderElement=function(){return n.a.createElement("div",{className:"svc-creator-tab__content"},n.a.createElement("div",{className:"svc-json-editor-tab__content"},n.a.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef})))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",(function(e){return n.a.createElement(te,e)}));var ie=function(e){function t(t){var i=e.call(this,t)||this;return i.model.canShowErrors=!1,i}return o(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this,t=[],i=1,o=this.model.userFriendlyErrors,r=0;r<o.length;r++)t.push(n.a.createElement("span",{key:i},n.a.createElement("b",null,"Error: "))),i++,t.push(n.a.createElement("span",{key:i},o[r])),i++;return n.a.createElement("div",{className:"svc-creator-tab__content"},n.a.createElement("div",{className:"svc-json-editor-tab__content"},n.a.createElement("textarea",{className:"svc-json-editor-tab__content-area",value:this.model.text,onChange:function(t){return e.model.text=t.target.value},onKeyDown:function(t){return e.model.checkKey(t,t)},disabled:this.model.readOnly,"aria-label":this.model.ariaLabel}),t.length>0&&n.a.createElement("button",{type:"button",className:"svc-json-editor-tab__errros_button",onClick:function(){return e.model.toggleErrors()}},this.model.errorButtonText),this.model.canShowErrors&&n.a.createElement("div",{className:"svc-json-editor-tab__content-errors"},t)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",(function(e){return n.a.createElement(ie,e)}));var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.button},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t="svc-logic-tab__content-action svc-btn"+(void 0===this.model.enabled||this.model.enabled?"":" svc-logic-tab__content-action--disabled");return Object(l.attachKey2click)(n.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:t,title:this.model.title},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button",(function(e){return n.a.createElement(oe,e)}));var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){this.model;var e=this.renderViewContent();return n.a.createElement("div",{className:"svc-creator-tab__content"},e)},t.prototype.renderViewContent=function(){var e="svc-plugin-tab__content svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab__empty");return n.a.createElement(r.Fragment,null,n.a.createElement("div",{className:e},n.a.createElement(l.Survey,{model:this.model.itemsSurvey}),this.model.hasItems?null:n.a.createElement("div",{className:"svc-logic-tab__content-empty"},n.a.createElement("span",{className:"svc-text"},this.model.emptyTabPlaceHolder)),n.a.createElement(oe,{button:this.model.addNewButton})))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-logic",(function(e){return n.a.createElement(re,e)}));var ne=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e="svd-simulator-main"+("desktop"===this.model.device?" svd-simulator-main--desktop":"");return this.model.survey?this.model.hasFrame?n.a.createElement("div",{className:e+" "+this.model.simulatorMainCssClass},n.a.createElement("div",{className:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},n.a.createElement("div",{className:"svd-simulator-frame "+this.model.simulatorFrame.cssClass,style:{width:(this.model.landscapeOrientation?this.model.simulatorFrame.frameHeight:this.model.simulatorFrame.frameWidth)+"px",height:(this.model.landscapeOrientation?this.model.simulatorFrame.frameWidth:this.model.simulatorFrame.frameHeight)+"px"}}),n.a.createElement("div",{className:"svd-simulator",style:{width:this.model.simulatorFrame.width/this.model.simulatorFrame.scale+"px",height:this.model.simulatorFrame.height/this.model.simulatorFrame.scale+"px",transform:"scale("+this.model.simulatorFrame.scale+") translate(-50%, -50%)"}},n.a.createElement("div",{className:"svd-simulator-content"},n.a.createElement(l.Survey,{model:this.model.survey}))))):n.a.createElement("div",{className:e},n.a.createElement("div",{className:"svd-simulator-content"},n.a.createElement(l.Survey,{model:this.model.survey}))):n.a.createElement("div",{className:e})},t}(l.SurveyElementBase),ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.button},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this;return Object(l.attachKey2click)(n.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:"svc-preview__test-again svc-btn",title:this.model.title},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-preview-test-again",(function(e){return n.a.createElement(ae,e)}));var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return n.a.createElement("div",{className:e},n.a.createElement("div",{className:"svc-plugin-tab__content"},n.a.createElement(ne,{model:this.model.simulator}),this.model.isRunning?null:n.a.createElement(ae,{button:this.model.testAgainAction}),this.model.isRunning?null:n.a.createElement(B,{survey:this.model.simulator.survey})),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?n.a.createElement("div",{className:"svc-test-tab__content-actions"},n.a.createElement(l.SurveyActionBar,{model:this.model.pages})):null},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-test",(function(e){return n.a.createElement(se,e)}));var le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model?n.a.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"},this.renderElementContent()):null},t.prototype.renderElementContent=function(){return this.model.isEmpty?n.a.createElement("div",{className:"st-no-strings"},n.a.createElement("span",null,this.model.noStringsText)):n.a.createElement("div",{className:"st-content"},n.a.createElement("div",{className:"svc-flex-column st-strings-wrapper"},n.a.createElement("div",{className:"svc-flex-row st-strings-header"},n.a.createElement(l.Survey,{model:this.model.stringsHeaderSurvey})),n.a.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},n.a.createElement(l.Survey,{model:this.model.stringsSurvey}))))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-translation",(function(e){return n.a.createElement(le,e)}));var ue=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model.isVisible?n.a.createElement("div",{className:"svc-object-selector"},n.a.createElement(l.List,{model:this.model.list})):null},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-object-selector",(function(e){return n.a.createElement(ue,e)}));var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){return n.a.createElement(l.Survey,{model:this.model.survey})},t}(l.SurveyElementBase);l.ReactQuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return n.a.createElement(l.SurveyQuestionButtonGroup,e)}));var de;l.ReactElementFactory.Instance.registerElement("svc-property-grid",(function(e){return n.a.createElement(ce,e)})),de="".concat("1.9.4-beta.1")}])}));
|
|
588
|
+
/*! no static exports found */function(t,i){t.exports=e}})},e.exports=o(i(3))},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,i){},function(e,t,i){"use strict";i.r(t),i.d(t,"Version",(function(){return de})),i.d(t,"SurveyCreatorComponent",(function(){return y})),i.d(t,"DesignTimeSurveyModel",(function(){return f})),i.d(t,"SurveyCreator",(function(){return b})),i.d(t,"RowWrapper",(function(){return x})),i.d(t,"QuestionAdornerComponent",(function(){return S})),i.d(t,"QuestionWrapperHeader",(function(){return k})),i.d(t,"QuestionWrapperFooter",(function(){return P})),i.d(t,"QuestionDropdownAdornerComponent",(function(){return E})),i.d(t,"QuestionImageAdornerComponent",(function(){return C})),i.d(t,"QuestionRatingAdornerComponent",(function(){return N})),i.d(t,"QuestionWidgetAdornerComponent",(function(){return O})),i.d(t,"CellQuestionAdornerComponent",(function(){return _})),i.d(t,"CellQuestionDropdownAdornerComponent",(function(){return A})),i.d(t,"CreatorSurveyPageComponent",(function(){return V})),i.d(t,"PanelAdornerComponent",(function(){return j})),i.d(t,"LogoImageComponent",(function(){return I})),i.d(t,"SurveyQuestionLinkValue",(function(){return z})),i.d(t,"SurveyElementEmbeddedSurvey",(function(){return q})),i.d(t,"QuestionEditorContentComponent",(function(){return R})),i.d(t,"ItemValueAdornerComponent",(function(){return L})),i.d(t,"ImageItemValueAdornerComponent",(function(){return D})),i.d(t,"MatrixCellAdornerComponent",(function(){return B})),i.d(t,"SurveyResults",(function(){return H})),i.d(t,"SurveyCreatorToolboxTool",(function(){return F})),i.d(t,"SurveyCreatorToolboxItem",(function(){return Q})),i.d(t,"Toolbox",(function(){return U})),i.d(t,"AdaptiveToolbox",(function(){return G})),i.d(t,"TabbedMenuComponent",(function(){return d})),i.d(t,"TabbedMenuItemComponent",(function(){return m})),i.d(t,"NotifierComponent",(function(){return h})),i.d(t,"SurveyNavigation",(function(){return J})),i.d(t,"SideBarComponent",(function(){return W})),i.d(t,"TranslationLineSkeleton",(function(){return Z})),i.d(t,"ActionButton",(function(){return M})),i.d(t,"TabDesignerComponent",(function(){return $})),i.d(t,"TabEmbedComponent",(function(){return ee})),i.d(t,"TabJsonEditorAceComponent",(function(){return te})),i.d(t,"TabJsonEditorTextareaComponent",(function(){return ie})),i.d(t,"TabLogicAddButtonComponent",(function(){return oe})),i.d(t,"TabLogicComponent",(function(){return re})),i.d(t,"TabPreviewTestSurveyAgainComponent",(function(){return ae})),i.d(t,"TabPreviewSurveyComponent",(function(){return se})),i.d(t,"TabTranslationComponent",(function(){return le})),i.d(t,"SurveySimulator",(function(){return ne})),i.d(t,"ReactMouseEvent",(function(){return w})),i.d(t,"ReactDragEvent",(function(){return T})),i.d(t,"PropertyGridComponent",(function(){return ce})),i.d(t,"editorLocalization",(function(){return u.editorLocalization})),i.d(t,"localization",(function(){return u.editorLocalization})),i.d(t,"settings",(function(){return u.settings})),i.d(t,"svgBundle",(function(){return u.svgBundle})),i.d(t,"SurveyLogic",(function(){return u.SurveyLogic})),i.d(t,"SurveyLogicUI",(function(){return u.SurveyLogicUI})),i.d(t,"SurveyQuestionEditorDefinition",(function(){return u.SurveyQuestionEditorDefinition})),i.d(t,"ToolboxToolViewModel",(function(){return u.ToolboxToolViewModel})),i.d(t,"PropertyGridEditorCollection",(function(){return u.PropertyGridEditorCollection})),i.d(t,"StylesManager",(function(){return u.StylesManager}));i(5),Object.assign;function o(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);function o(){this.constructor=e}e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var r=i(0),n=i.n(r),a=i(4),s=i.n(a),l=i(1),u=i(2),c=i(3),d=function(e){function t(t){var i=e.call(this,t)||this;return i.rootRef=n.a.createRef(),i}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this.model.renderedActions.map((function(e){return n.a.createElement(p,{item:e,key:e.id})}));return n.a.createElement("div",{ref:this.rootRef,className:"svc-tabbed-menu"},e)},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new c.ResponsivityManager(t,this.model,".svc-tabbed-menu-item-container:not(.sv-dots)>.sv-action__content"))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t}(l.SurveyElementBase),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){var e="svc-tabbed-menu-item-container";this.item.css&&(e+=" "+this.item.css),e+=this.item.isVisible?"":" sv-action--hidden";var t=l.ReactElementFactory.Instance.createElement(this.item.component||"svc-tabbed-menu-item",{item:this.item});return n.a.createElement("span",{key:this.item.id,className:e},n.a.createElement("div",{className:"sv-action__content"},t))},t}(l.SurveyElementBase),m=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this.item,t="svc-tabbed-menu-item";e.active&&(t+=" svc-tabbed-menu-item--selected"),void 0===e.enabled||e.enabled||(t+=" svc-tabbed-menu-item--disabled");var i="svc-text svc-tabbed-menu-item__text svc-text--normal";return e.active&&(i+=" svc-text--bold"),Object(l.attachKey2click)(n.a.createElement("div",{className:t,onClick:function(){return e.action(e)}},n.a.createElement("span",{className:i},e.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tabbed-menu-item",(function(e){return n.a.createElement(m,e)}));var g=function(e){function t(t){var i=e.call(this,t)||this;return i.blurredByEscape=!1,i.onInput=function(e){return i.baseModel.onInput(e.nativeEvent),i.baseModel.errorText},i.onFocus=function(e){i.baseModel.onFocus(e.nativeEvent)},i.onKeyDown=function(e){return i.baseModel.onKeyDown(e.nativeEvent)},i.done=function(e){i.baseModel.done(e),i.locString.__isEditing=!1},i.edit=function(e){i.svStringEditorRef.current.focus(),i.locString.__isEditing=!0,i.baseModel.onClick(e)},i.state={changed:0},i.baseModel=new u.StringEditorViewModelBase(i.locString,i.creator),i.svStringEditorRef=n.a.createRef(),i.baseModel.blurEditor=function(){i.svStringEditorRef.current.blur()},i}return o(t,e),Object.defineProperty(t.prototype,"locString",{get:function(){return this.props.locStr.locStr},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.locStr.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.props.style},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.baseModel},Object.defineProperty(t.prototype,"errorText",{get:function(){return this.baseModel.errorText},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){if(this.locString){var e=this;this.locString.onChanged=function(){e.setState({changed:e.state.changed+1})},this.locString.__isEditing&&this.svStringEditorRef.current.focus()}},t.prototype.componentWillUnmount=function(){this.locString&&(this.locString.onChanged=function(){})},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this.baseModel.placeholder},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contentEditable",{get:function(){return this.baseModel.contentEditable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.baseModel.className(this.locString.renderedHtml)},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.locString)return null;this.baseModel.setLocString(this.locString);var e=null;if(this.locString.hasHtml){var t={__html:this.locString.renderedHtml};e=n.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:t,onBlur:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onClick:this.edit})}else e=n.a.createElement("span",{ref:this.svStringEditorRef,className:"sv-string-editor",contentEditable:this.contentEditable,"aria-placeholder":this.placeholder,suppressContentEditableWarning:!0,onBlur:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeyDown,onClick:this.edit},this.locString.renderedHtml);return n.a.createElement("span",{className:this.className},n.a.createElement("span",{className:"svc-string-editor__content"},n.a.createElement("div",{className:"svc-string-editor__border",onClick:this.edit},n.a.createElement(l.SvgIcon,{className:"svc-string-editor__button svc-string-editor__button--edit",size:16,iconName:"icon-edit"})),e,n.a.createElement("div",{className:"svc-string-editor__controls",onClick:this.edit})),this.errorText?n.a.createElement("span",{className:"svc-string-editor__error"},this.errorText):"")},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-string-editor",(function(e){return n.a.createElement(g,e)}));var h=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"notifier",{get:function(){return this.props.notifier},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.notifier},t.prototype.renderElement=function(){return this.notifier.active?n.a.createElement("div",{className:this.notifier.css},n.a.createElement("span",null,this.notifier.message)):null},t}(l.SurveyElementBase),v=function(e){function t(t){var i=e.call(this,t)||this;return i.containerRef=n.a.createRef(),i}return o(t,e),t.prototype.componentDidMount=function(){this.containerRef.current.innerHTML=u.svgBundle},t.prototype.componentWillUnmount=function(){},t.prototype.render=function(){return n.a.createElement("div",{ref:this.containerRef})},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-svg-bundle",(function(e){return n.a.createElement(v,e)}));var y=function(e){function t(t){var i=e.call(this,t)||this;return i.rootNode=n.a.createRef(),i}return o(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.props.creator},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.creator.initKeyboardShortcuts(this.rootNode.current),this.creator.initResponsivityManager(this.rootNode.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.creator.removeKeyboardShortcuts(this.rootNode.current),this.creator.resetResponsivityManager()},t.prototype.renderElement=function(){var e=this.props.creator,t="svc-creator"+(this.props.creator.isMobileView?" svc-creator--mobile":""),i="svc-creator__content-wrapper svc-flex-row"+(this.props.creator.isMobileView?" svc-creator__content-wrapper--footer-toolbar":""),o="svc-flex-row svc-full-container svc-creator__side-bar--"+this.creator.sideBarLocation,r=null;return this.props.creator.haveCommercialLicense||(r=n.a.createElement("div",{className:"svc-creator__banner"},n.a.createElement("span",{className:"svc-creator__non-commercial-text"},n.a.createElement("a",{href:"https://surveyjs.io/buy"},this.props.creator.licenseText)))),n.a.createElement("div",{className:t,ref:this.rootNode},n.a.createElement(v,null),n.a.createElement("div",{className:"svc-full-container svc-creator__area svc-flex-column"},n.a.createElement("div",{className:o},n.a.createElement("div",{className:"svc-flex-column svc-flex-row__element svc-flex-row__element--growing"},n.a.createElement("div",{className:"svc-top-bar"},e.showTabs?n.a.createElement("div",{className:"svc-tabbed-menu-wrapper"},n.a.createElement(d,{model:e.tabbedMenu})):null,e.showToolbar?n.a.createElement("div",{className:"svc-toolbar-wrapper"},n.a.createElement(l.SurveyActionBar,{model:e.toolbar})):null),n.a.createElement("div",{className:i},n.a.createElement("div",{className:"svc-creator__content-holder svc-flex-column"},this.renderActiveTab())),n.a.createElement("div",{className:"svc-footer-bar"},e.isMobileView?n.a.createElement("div",{className:"svc-toolbar-wrapper"},n.a.createElement(l.SurveyActionBar,{model:e.footerToolbar})):null)),this.renderSideBar()),r,n.a.createElement(h,{creator:e,notifier:e.notifier})))},t.prototype.renderActiveTab=function(){for(var e=this.props.creator,t=0;t<e.tabs.length;t++)if(e.tabs[t].id===e.activeTab)return this.renderCreatorTab(e.tabs[t]);return null},t.prototype.renderCreatorTab=function(e){if(!1===e.visible)return null;var t=this.props.creator,i=e.renderTab?e.renderTab():l.ReactElementFactory.Instance.createElement(e.componentContent,{creator:t,survey:t.survey,data:e.data.model}),o="svc-creator-tab"+("right"==t.toolboxLocation?" svc-creator__toolbox--right":"");return n.a.createElement("div",{key:e.id,id:"scrollableDiv-"+e.id,className:o},i)},t.prototype.renderSideBar=function(){if(this.creator.sideBar){var e=this.creator.isMobileView?"sv-mobile-side-bar":"";return n.a.createElement("div",{className:e},l.ReactElementFactory.Instance.createElement("svc-side-bar",{model:this.creator.sideBar}))}return null},t}(l.SurveyElementBase),f=function(e){function t(t,i){var o=e.call(this,i)||this;return o.creator=t,o.isPopupEditorContent=!1,o}return o(t,e),t.prototype.getElementWrapperComponentName=function(t,i){return Object(u.getElementWrapperComponentName)(t,i,this.isPopupEditorContent)||e.prototype.getElementWrapperComponentName.call(this,t,i)},t.prototype.getElementWrapperComponentData=function(t,i){return Object(u.getElementWrapperComponentData)(t,i,this.creator)||e.prototype.getElementWrapperComponentData.call(this,t)},t.prototype.getRowWrapperComponentName=function(e){return"svc-row"},t.prototype.getRowWrapperComponentData=function(e){return{creator:this.creator,row:e}},t.prototype.getItemValueWrapperComponentName=function(e,t){return Object(u.getItemValueWrapperComponentName)(e,t)},t.prototype.getItemValueWrapperComponentData=function(e,t){return Object(u.getItemValueWrapperComponentData)(e,t,this.creator)},t.prototype.getRendererForString=function(e,t){if(!this.creator.readOnly&&Object(u.isStringEditable)(e,t))return"svc-string-editor"},t.prototype.getRendererContextForString=function(e,t){var i=t;return!this.creator.readOnly&&Object(u.isStringEditable)(e,t.name)?{creator:this.creator,element:e,locStr:t}:i},t}(l.Model),b=function(e){function t(t,i){return void 0===t&&(t={}),e.call(this,t,i)||this}return o(t,e),t.prototype.createSurveyCore=function(e,t){return void 0===e&&(e={}),"designer"===t||"modal-question-editor"===t?new f(this,e):new l.Model(e)},t.prototype.render=function(e){var t=e;"string"==typeof e&&(t=document.getElementById(e)),s.a.unmountComponentAtNode(t),s.a.render(n.a.createElement(n.a.StrictMode,null,n.a.createElement(y,{creator:this})),t)},t.prototype.createQuestionElement=function(e){return l.ReactQuestionFactory.Instance.createQuestion(e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isReadOnly,creator:this})},t.prototype.renderError=function(e,t,i){return n.a.createElement("div",{key:e},n.a.createElement("span",{className:i.error.icon,"aria-hidden":"true"}),n.a.createElement("span",{className:i.error.item},n.a.createElement(l.SurveyLocStringViewer,{locStr:t.locText})))},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t}(u.CreatorBase);l.ReactElementFactory.Instance.registerElement("survey-widget",(function(e){return n.a.createElement(l.Survey,e)}));var x=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.RowViewModel(i.props.componentData.creator,i.props.row,null),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return n.a.createElement("div",{key:"svc-row-"+this.props.row.id,className:this.model.cssClasses},this.props.element)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-row",(function(e){return n.a.createElement(x,e)}));var w=function(){function e(e){this.event=e}return e.prototype.stopPropagation=function(){this.event.stopPropagation()},e.prototype.preventDefault=function(){this.event.preventDefault()},Object.defineProperty(e.prototype,"cancelBubble",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this.event.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this.event.currentTarget},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.event.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.event.clientY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.event.nativeEvent.offsetX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.event.nativeEvent.offsetY},enumerable:!1,configurable:!0}),e}(),T=function(e){function t(t){var i=e.call(this,t)||this;return i.event=t,i}return o(t,e),Object.defineProperty(t.prototype,"dataTransfer",{get:function(){return this.event.dataTransfer},enumerable:!1,configurable:!0}),t}(w),S=function(e){function t(t){var i=e.call(this,t)||this;return i.modelValue=i.createQuestionViewModel(),i}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"model",{get:function(){return this.modelValue},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return e.prototype.canRender.call(this)&&!this.model.isDragged},t.prototype.renderElement=function(){var e=this.model.surveyElement.isInteractiveDesignElement,t=this.renderContent(e);return n.a.createElement("div",{ref:this.rootRef,"data-sv-drop-target-survey-element":this.model.surveyElement.name||null,className:"svc-question__adorner"+this.model.rootCss(),onMouseOut:function(t){return e&&Object(u.toggleHovered)(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e&&Object(u.toggleHovered)(t.nativeEvent,t.currentTarget)}},t)},t.prototype.renderContent=function(e){var t=this,i=this.renderElementContent();return e?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-question__content "+this.model.css(),onClick:function(e){return t.model.select(t.model,new w(e))}},this.renderHeader(),i,this.renderFooter())):i},t.prototype.renderHeader=function(){return l.ReactElementFactory.Instance.createElement("svc-question-header",{model:this.model})},t.prototype.renderFooter=function(){return l.ReactElementFactory.Instance.createElement("svc-question-footer",{className:"svc-question__content-actions",model:this.model})},t.prototype.renderElementContent=function(){return n.a.createElement(n.a.Fragment,null,this.props.element,this.renderElementPlaceholder())},t.prototype.renderElementPlaceholder=function(){return this.model.isEmptyElement?n.a.createElement("div",{className:"svc-panel__placeholder_frame"},n.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText)):null},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-question",(function(e){return n.a.createElement(S,e)}));var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this;return this.props.model.allowDragging?n.a.createElement("div",{className:"svc-question__drag-area",onPointerDown:function(t){return e.props.model.onPointerDown(t)}},n.a.createElement("div",{className:"svc-question__drag-element"})):null},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-question-header",(function(e){return n.a.createElement(k,e)}));var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return n.a.createElement("div",{className:this.props.className},n.a.createElement(l.SurveyActionBar,{model:this.props.model.actionContainer}))},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-question-footer",(function(e){return n.a.createElement(P,e)}));var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.renderElementPlaceholder=function(){var e=this.props.question,t=this.props.question.textStyle;return n.a.createElement("div",{className:"svc-question__dropdown-choices"},(e.visibleChoices||[]).map((function(i,o){return n.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(o)},e.survey.wrapItemValue(l.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:i,textStyle:t,index:o,isChecked:e.value===i.value}),e,i))})))},t}(S);l.ReactElementFactory.Instance.registerElement("svc-dropdown-question",(function(e){return n.a.createElement(E,e)}));var C=function(e){function t(t){var i=e.call(this,t)||this;return i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionImageAdornerViewModel(this.props.componentData,this.props.question,null,null)},Object.defineProperty(t.prototype,"imageModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.imageModel.questionRoot=this.rootRef.current},t.prototype.renderHeader=function(){return n.a.createElement(n.a.Fragment,null,n.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),e.prototype.renderHeader.call(this))},t.prototype.renderElementPlaceholder=function(){var e=this;return n.a.createElement("div",{className:"svc-image-question-controls"},this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-question-controls__button svc-image-question-controls__choose-file",onClick:function(){return e.imageModel.chooseFile(e.imageModel)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-file"}))):null)},t}(S);l.ReactElementFactory.Instance.registerElement("svc-image-question",(function(e){return n.a.createElement(C,e)}));var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionRatingAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"ratingModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderFooter=function(){var t=this.ratingModel;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-rating-question-controls svc-item-value-controls"},t.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":t.removeTooltip,onClick:function(){return t.removeItem(t)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null,t.allowAdd?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":t.addTooltip,onClick:function(){return t.addItem(t)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):null),e.prototype.renderFooter.call(this))},t}(S);l.ReactElementFactory.Instance.registerElement("svc-rating-question",(function(e){return n.a.createElement(N,e)}));var O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.createQuestionViewModel=function(){return new u.QuestionAdornerViewModel(this.props.componentData,this.props.question,null)},Object.defineProperty(t.prototype,"widgetModel",{get:function(){return this.model},enumerable:!1,configurable:!0}),t.prototype.renderElementContent=function(){return n.a.createElement("div",{className:"svc-widget__content"},this.props.element)},t}(S);l.ReactElementFactory.Instance.registerElement("svc-widget-question",(function(e){return n.a.createElement(O,e)}));var _=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.QuestionAdornerViewModel(i.props.componentData,i.props.question,null),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){return this.model.isDragged?null:n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.surveyElement.name,className:"svc-question__adorner"},n.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-cell-question",(function(e){return n.a.createElement(_,e)}));var A=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.QuestionAdornerViewModel(i.props.componentData,i.props.question,null),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){if(this.model.isDragged)return null;var e=this.props.question,t=this.props.question.textStyle;return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{"data-sv-drop-target-survey-element":this.model.surveyElement.name,className:"svc-question__adorner"},n.a.createElement("div",{className:" svc-question__content--selected-no-border svc-question__content"},this.props.element,n.a.createElement("div",{className:"svc-question__dropdown-choices"},e.visibleChoices.map((function(i,o){return n.a.createElement("div",{className:"svc-question__dropdown-choice",key:"editable_choice_".concat(o)},e.survey.wrapItemValue(l.ReactElementFactory.Instance.createElement("survey-radiogroup-item",{question:e,cssClasses:e.cssClasses,isDisplayMode:!0,item:i,textStyle:t,index:o,isChecked:e.value===i.value}),e,i))}))))))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-cell-dropdown-question",(function(e){return n.a.createElement(A,e)}));var V=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.PageViewModel(i.props.creator,i.props.page),i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){var t=this;e.prototype.componentDidMount.call(this),this.model.onPageSelectedCallback=function(){t.rootRef.current&&u.SurveyHelper.scrollIntoViewIfNeeded(t.rootRef.current)}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.dispose()},t.prototype.canRender=function(){return!!this.model&&this.model.isPageLive&&!!this.model.page&&!!this.model.page.survey},t.prototype.renderElement=function(){var e=this;return Object(l.attachKey2click)(n.a.createElement("div",{ref:this.rootRef,className:"svc-page__content "+this.model.css,id:this.props.page.id,onClick:function(t){return e.model.select(e.model,new w(t))},onMouseOut:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},this.renderHeader(),this.renderContent(),this.renderFooter()))},t.prototype.renderContent=function(){return n.a.createElement(l.SurveyPage,{page:this.props.page,survey:this.props.survey,creator:this.props.creator,css:this.model.css})},t.prototype.renderHeader=function(){return n.a.createElement("div",{className:"svc-page__content-actions"},n.a.createElement(l.SurveyActionBar,{model:this.model.actionContainer}))},t.prototype.renderFooter=function(){var e=this;if(!this.model.allowEdit)return null;var t=this.model.questionTypeSelectorModel;return Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-page__add-new-question svc-btn",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion(e.model,new w(t))}},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText),Object(l.attachKey2click)(n.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.action()},className:"svc-page__question-type-selector",title:this.model.addNewQuestionText},n.a.createElement("span",{className:"svc-page__question-type-selector-icon"},n.a.createElement(l.SvgIcon,{iconName:t.iconName,size:24})),n.a.createElement(l.Popup,{model:t.popupModel})))))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-page",(function(e){return n.a.createElement(V,e)}));var j=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.renderElementPlaceholder=function(){var e=this;return this.model.isEmptyElement?n.a.createElement("div",{className:"svc-panel__placeholder_frame"},n.a.createElement("div",{className:"svc-panel__placeholder"},this.model.placeholderText),this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-panel__add-new-question",onClick:function(t){t.stopPropagation(),e.model.addNewQuestion()}},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText))):null):null},t.prototype.renderFooter=function(){var t=this;return n.a.createElement(n.a.Fragment,null,!this.model.isEmptyElement&&this.model.surveyElement.isPanel&&this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-panel__add-new-question",onClick:function(e){e.stopPropagation(),t.model.addNewQuestion()}},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.addNewQuestionText),Object(l.attachKey2click)(n.a.createElement("button",{type:"button",onClick:function(e){e.stopPropagation(),t.model.questionTypeSelectorModel.action()},className:"svc-panel__question-type-selector",title:this.model.addNewQuestionText},n.a.createElement("span",{className:"svc-panel__question-type-selector-icon"},n.a.createElement(l.SvgIcon,{iconName:this.model.questionTypeSelectorModel.iconName,size:24})),n.a.createElement(l.Popup,{model:this.model.questionTypeSelectorModel.popupModel}))))):null,e.prototype.renderFooter.call(this))},t}(S);l.ReactElementFactory.Instance.registerElement("svc-panel",(function(e){return n.a.createElement(j,e)}));var I=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.LogoImageViewModel(t.data,null),i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.root=this.rootRef.current},t.prototype.render=function(){var e=this,t=null;return t=this.model.survey.locLogo.renderedHtml?n.a.createElement(n.a.Fragment,null,n.a.createElement(l.LogoImage,{data:this.props.data.survey}),this.model.allowEdit?n.a.createElement("div",{className:"svc-image-item-value-controls"},Object(l.attachKey2click)(n.a.createElement(l.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",size:24,iconName:"icon-file",onClick:function(){return e.model.chooseFile(e.model)}})),Object(l.attachKey2click)(n.a.createElement(l.SvgIcon,{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",size:24,iconName:"icon-delete",onClick:function(){return e.model.remove(e.model)}}))):null):this.model.allowEdit?Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-logo-image-placeholder",onClick:function(){return e.model.chooseFile(e.model)}},this.model.chooseLogoPlaceholder)):null,n.a.createElement("div",{ref:this.rootRef,className:"svc-logo-image"},n.a.createElement("input",{"aria-hidden":"true",type:"file",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input"}),t)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-logo-image",(function(e){return n.a.createElement(I,e)}));var M=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.renderElement=function(){var e=this,t=this.props.classes+" svc-action-button";return this.props.selected&&(t+=" svc-action-button--selected"),this.props.disabled?(t+=" svc-action-button--disabled",n.a.createElement("span",{className:t},this.props.text)):n.a.createElement(n.a.Fragment,null,Object(l.attachKey2click)(n.a.createElement("span",{role:"button",className:t,onClick:function(t){t.stopPropagation(),e.props.click()},title:this.props.title},this.props.text)))},t}(l.SurveyElementBase),z=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"question",{get:function(){return this.questionBase},enumerable:!1,configurable:!0}),t.prototype.renderClear=function(){var e=this,t=this.questionBase.showClear;return!this.questionBase.isReadOnly&&t?n.a.createElement(M,{classes:this.question.linkClearButtonCssClasses,click:function(){return e.question.doClearClick()},selected:this.question.isSelected,text:u.editorLocalization.getString("pe.clear")}):null},t.prototype.renderElement=function(){var e=this;return n.a.createElement(n.a.Fragment,null,n.a.createElement(M,{classes:this.question.linkSetButtonCssClasses,click:function(){return e.question.doLinkClick()},selected:this.question.isSelected,disabled:this.question.isReadOnly,text:this.question.linkValueText,title:this.question.tooltip}),this.renderClear())},t}(l.SurveyQuestionElementBase);l.ReactQuestionFactory.Instance.registerQuestion("linkvalue",(function(e){return n.a.createElement(z,e)}));var q=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"embeddedSurvey",{get:function(){return this.props.element||this.props.question},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.render=function(){if(!this.embeddedSurvey)return null;var e=this.embeddedSurvey.embeddedSurvey;return e&&e.currentPage?n.a.createElement(l.SurveyPage,{survey:e,page:e.currentPage,css:e.css,creator:this.creator}):null},t}(l.SurveyQuestionElementBase);l.ReactQuestionFactory.Instance.registerQuestion("embeddedsurvey",(function(e){return n.a.createElement(q,e)}));var R=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),t.prototype.createQuestionElement=function(e){return l.ReactQuestionFactory.Instance.createQuestion(!e.isDefaultRendering||e.isDefaultRendering()?e.getTemplate():e.getComponentName(),{question:e,isDisplayMode:e.isInputReadOnly,creator:this})},t.prototype.questionTitleLocation=function(){return this.survey.questionTitleLocation},t.prototype.questionErrorLocation=function(){return this.survey.questionErrorLocation},t.prototype.renderError=function(e,t,i){return null},t.prototype.render=function(){var e=this.survey.getAllQuestions()[0];return n.a.createElement(n.a.Fragment,null,n.a.createElement(l.SurveyQuestion,{creator:this,element:e}))},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("svc-question-editor-content",(function(e){return n.a.createElement(R,e)}));var L=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.ItemValueWrapperViewModel(i.props.componentData.creator,i.props.question,i.props.item),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=this.model.allowAdd?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__add","aria-label":this.model.tooltip,onClick:function(){return e.model.add(e.model)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-add_16x16"}))):n.a.createElement(n.a.Fragment,null," ",this.model.isDraggable?n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__drag","aria-label":this.model.dragTooltip},n.a.createElement(l.SvgIcon,{className:"svc-item-value-controls__drag-icon",size:24,iconName:"icon-drag-area-indicator"})):null,this.model.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-item-value-controls__button svc-item-value-controls__remove","aria-label":this.model.tooltip,onClick:function(){return e.model.remove(e.model)}},n.a.createElement(l.SvgIcon,{size:16,iconName:"icon-remove_16x16"}))):null);return n.a.createElement("div",{className:"svc-item-value-wrapper"+(this.model.allowAdd?" svc-item-value--new":"")+(this.model.isDragging?" svc-item-value--dragging":"")+(this.model.isDragDropGhost?" svc-item-value--ghost":"")+(this.model.isDragDropMoveDown?" svc-item-value--movedown":"")+(this.model.isDragDropMoveUp?" svc-item-value--moveup":""),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)}},n.a.createElement("div",{className:"svc-item-value__ghost"}),n.a.createElement("div",{className:"svc-item-value-controls"},t),n.a.createElement("div",{className:"svc-item-value__item",onClick:function(t){return e.model.select(e.model,t)}},this.props.element))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-item-value",(function(e){return n.a.createElement(L,e)}));var D=function(e){function t(t){var i=e.call(this,t)||this;return i.preventDragHandler=function(e){e.preventDefault()},i.model=new u.ImageItemValueWrapperViewModel(i.props.componentData.creator,i.props.question,i.props.item,null,null),i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.itemsRoot=this.rootRef.current},t.prototype.render=function(){var e=this;this.model.item=this.props.item;var t=!this.props.question.isItemInList(this.props.item),i=this.props.question.imageWidth,o=this.props.question.imageHeight,r=null;return r=t?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-image-item-value__item"},n.a.createElement("div",{className:"sd-imagepicker__item sd-imagepicker__item--inline"},n.a.createElement("label",{className:"sd-imagepicker__label"},n.a.createElement("div",{style:{width:i?i+"px":void 0,height:o?o+"px":void 0},className:"sd-imagepicker__image"})))),n.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowAdd?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__add",onClick:function(){return e.model.chooseNewFile(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-add-lg"}))):null)):n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-image-item-value__item"},this.props.element),n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__drag-area-indicator",onPointerDown:function(t){return e.model.onPointerDown(t)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-drag-area-indicator"})),n.a.createElement("div",{className:"svc-image-item-value-controls"},this.model.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__choose-file",onClick:function(){return e.model.chooseFile(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-file"}))):null,this.model.allowRemove?Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-image-item-value-controls__button svc-image-item-value-controls__remove",onClick:function(){return e.model.remove(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-delete"}))):null)),n.a.createElement("div",{ref:this.rootRef,className:"svc-image-item-value-wrapper"+(t?" svc-image-item-value--new":"")+(this.model.isDragDropGhost?" svc-image-item-value-wrapper--ghost":""),key:this.props.element.key,"data-sv-drop-target-item-value":this.model.isDraggable?this.model.item.value:void 0,onPointerDown:function(t){return e.model.onPointerDown(t)},onDragStart:this.preventDragHandler},n.a.createElement("div",{className:"svc-image-item-value-wrapper__ghost"}),n.a.createElement("div",{className:"svc-image-item-value-wrapper__content"},n.a.createElement("input",{type:"file","aria-hidden":"true",tabIndex:-1,accept:"image/*",className:"svc-choose-file-input",style:{position:"absolute",opacity:0,width:"1px",height:"1px",overflow:"hidden"}}),r))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-image-item-value",(function(e){return n.a.createElement(D,e)}));var B=function(e){function t(t){var i=e.call(this,t)||this,o=i.props.componentData;return i.model=new u.MatrixCellWrapperViewModel(o.creator,o.element,o.question,o.row,o.column),i}return o(t,e),t.prototype.componentDidUpdate=function(t,i){e.prototype.componentDidUpdate.call(this,t,i);var o=this.props.componentData;this.model.templateData=o.element,this.model.row=o.row,this.model.column=o.column,this.model.question=o.question},t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t=null;return this.model.question&&(t=n.a.createElement("div",{className:"svc-matrix-cell__question-controls"},Object(l.attachKey2click)(n.a.createElement("span",{className:"svc-matrix-cell__question-controls-button",onClick:function(){return e.model.editQuestion(e.model)}},n.a.createElement(l.SvgIcon,{size:24,iconName:"icon-edit"}))))),n.a.createElement("div",{className:"svc-matrix-cell",key:this.props.element.key,onClick:function(t){return!e.props.question&&e.model.selectContext(e.model,t)},onMouseOut:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)},onMouseOver:function(t){return e.model.hover(t.nativeEvent,t.currentTarget)}},n.a.createElement("div",{className:"svc-matrix-cell--selected"+(this.model.isSelected?" svc-visible":"")}),this.props.element,t)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-matrix-cell",(function(e){return n.a.createElement(B,e)}));var H=function(e){function t(t){var i=e.call(this,t)||this;return t.survey&&(i.model=new u.SurveyResultsModel(t.survey)),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this;return this.model?n.a.createElement("div",{className:"svd_test_results"},n.a.createElement("div",{className:"svd_results_header"},n.a.createElement("h2",null,this.model.surveyResultsText)),n.a.createElement("ul",{className:"navbar-default container-fluid nav nav-tabs editor-tabs"},n.a.createElement("li",{className:"nav-item "+this.model.resultViewType=="table"?"active":""},Object(l.attachKey2click)(n.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){return e.model.selectTableClick(e.model)}},this.model.getLocString("ed.surveyResultsTable")))),n.a.createElement("li",{className:"nav-item "+this.model.resultViewType=="text"?"active":""},Object(l.attachKey2click)(n.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){return e.model.selectJsonClick(e.model)}},this.model.getLocString("ed.surveyResultsJson"))))),this.renderResultAsText(),this.renderResultAsTable()):null},t.prototype.renderResultAsText=function(){return"text"!==this.model.resultViewType?null:n.a.createElement("div",{className:"svd_results_text svd-light-bg-color"},n.a.createElement("div",null,this.model.resultText))},t.prototype.renderResultAsTable=function(){return"table"!==this.model.resultViewType?null:n.a.createElement("div",{className:"svd_results_table svd-light-bg-color"},n.a.createElement("table",null,n.a.createElement("thead",null,n.a.createElement("tr",{className:"svd-light-background-color"},n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsTitle),n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsName),n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsValue),n.a.createElement("th",{className:"svd-dark-border-color"},this.model.resultsDisplayValue))),n.a.createElement("tbody",null,this.renderRows(this.model.resultData))))},t.prototype.renderRows=function(e){var t=this;return e.map((function(e){return t.renderRow(e)}))},t.prototype.renderRow=function(e){return n.a.createElement(n.a.Fragment,null,n.a.createElement("tr",{"data-bind":"click: toggle"},n.a.createElement("td",{className:"svd-dark-border-color"},e.isNode?n.a.createElement("span",{className:""},"▶"):null,n.a.createElement("span",null,e.title)),n.a.createElement("td",{className:"svd-dark-border-color"},e.name),n.a.createElement("td",{className:"svd-dark-border-color"},n.a.createElement("div",{className:"survey-result-value"},e.getString(e.value))),n.a.createElement("td",{className:"svd-dark-border-color"},e.getString(e.displayValue))),this.renderRows(e.data))},t}(l.SurveyElementBase),F=function(e){function t(t){var i=e.call(this,t)||this;return i.model=new u.ToolboxToolViewModel(i.item,i.props.creator),i}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCompact",{get:function(){return this.props.isCompact},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.render=function(){var e=this,t=this.item,i="svc-toolbox__tool "+t.css+(t.isVisible?"":" sv-action--hidden"),o=l.ReactElementFactory.Instance.createElement(this.item.component||"svc-toolbox-item",{item:this.item,creator:this.creator,isCompact:this.isCompact});return n.a.createElement("div",{className:i,key:t.id,onPointerDown:function(t){t.persist(),e.model.onPointerDown(t)}},n.a.createElement("div",{className:"sv-action__content"},this.isCompact&&t.needSeparator?n.a.createElement("div",{className:"svc-toolbox__category-separator"}):null,o))},t}(l.SurveyElementBase),Q=function(e){function t(t){var i=e.call(this,t)||this,o=i.props.item;return i.model=new u.ToolboxToolViewModel(o,i.props.creator),i}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.render=function(){var e=this,t="svc-toolbox__item svc-toolbox__item--"+this.item.iconName;return Object(l.attachKey2click)(n.a.createElement("div",{className:t,tabIndex:0,role:"button","aria-label":this.item.tooltip+" "+u.editorLocalization.getString("toolbox")+" item",onClick:function(t){t.persist(),e.model.click(t)}},n.a.createElement("span",{className:"svc-toolbox__item-container"},n.a.createElement(l.SvgIcon,{size:24,iconName:this.item.iconName})),this.props.isCompact?n.a.createElement("span",{className:"svc-toolbox__item-banner svc-item__banner"},n.a.createElement(l.SvgIcon,{size:24,iconName:this.item.iconName}),n.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)):n.a.createElement("span",{className:"svc-toolbox__item-title"},this.item.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-toolbox-item",(function(e){return n.a.createElement(Q,e)}));var U=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"creator",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolbox",{get:function(){return this.creator.toolbox},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.toolbox},t.prototype.render=function(){return this.toolbox.hasActions?n.a.createElement("div",{className:"svc-toolbox"},n.a.createElement("div",{className:"svc-toolbox__container"},1==this.toolbox.categories.length?n.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.visibleActions)):this.renderCategories())):null},t.prototype.renderItems=function(e){var t=this;return e.map((function(e,i){return n.a.createElement(F,{item:e,creator:t.creator,key:"item"+i,isCompact:!1})}))},t.prototype.renderCategories=function(){var e=this;return this.toolbox.categories.map((function(t){var i=e.renderCategoryHeader(t),o=e.renderCategoryContent(t);return n.a.createElement("div",{className:"svc-toolbox__category",key:t.name},i,o)}))},t.prototype.renderCategoryHeader=function(e){var t=e.collapsed?"arrow-down":"arrow-up",i="svc-toolbox__category-header__button svc-string-editor__button--"+(e.collapsed?"expand":"collapse");return Object(l.attachKey2click)(n.a.createElement("div",{className:"svc-toolbox__category-header",onClick:function(t){return e.toggleState()}},n.a.createElement("span",{className:"svc-toolbox__category-title"},e.name),n.a.createElement("div",{className:"svc-toolbox__category-header__controls"},n.a.createElement(l.SvgIcon,{className:i,iconName:"icon-"+t,size:24}))))},t.prototype.renderCategoryContent=function(e){return e.collapsed?[]:this.renderItems(e.items)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-toolbox",(function(e){return n.a.createElement(U,e)}));var G=function(e){function t(t){var i=e.call(this,t)||this;return i.rootRef=n.a.createRef(),i}return o(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.rootRef.current;t&&(this.manager=new c.VerticalResponsivityManager(t,this.toolbox,".svc-toolbox__tool:not(.sv-dots)>.sv-action__content",40))},t.prototype.componentWillUnmount=function(){this.manager&&this.manager.dispose(),e.prototype.componentWillUnmount.call(this)},t.prototype.render=function(){if(!this.toolbox.hasActions)return null;var e="svc-toolbox"+(this.toolbox.isCompact?" svc-toolbox--compact":"");return n.a.createElement("div",{ref:this.rootRef,className:e},n.a.createElement("div",{className:"svc-toolbox__container"},this.toolbox.isCompact||1==this.toolbox.categories.length?n.a.createElement("div",{className:"svc-toolbox__category"},this.renderItems(this.toolbox.renderedActions,this.toolbox.isCompact)):this.renderCategories()))},t.prototype.renderItems=function(e,t){var i=this;return e.map((function(e,o){return n.a.createElement(F,{item:e,creator:i.creator,isCompact:t,key:"item"+o})}))},t.prototype.renderCategoryContent=function(e){var t=[];return e.collapsed||(t=this.renderItems(e.items,!1)),t},t}(U);l.ReactElementFactory.Instance.registerElement("svc-adaptive-toolbox",(function(e){return n.a.createElement(G,e)}));var J=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPropChangedHandler=function(e,i){if(!t.isRendering){var o=["showProgressBar","progressBarType","currentPageValue"];if(!(o.indexOf(i.name)<0)){for(var r={},n=0;n<o.length;n++){var a=o[n];r[a]=t.survey[a]}t.setState(r)}}},t}return o(t,e),t.prototype.componentDidMount=function(){this.setHandler()},t.prototype.componentDidUpdate=function(e,t){this.setHandler()},t.prototype.setHandler=function(){this.survey&&!this.survey.onPropertyChanged.hasFunc(this.onPropChangedHandler)&&this.survey.onPropertyChanged.add(this.onPropChangedHandler)},t.prototype.componentWillUnmount=function(){this.survey&&this.survey.onPropertyChanged.remove(this.onPropChangedHandler)},Object.defineProperty(t.prototype,"survey",{get:function(){return this.props.survey},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.props.location},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isTop",{get:function(){return"top"==this.location},enumerable:!1,configurable:!0}),t.prototype.canRender=function(){return this.isTop?this.survey.isShowProgressBarOnTop:this.survey.isShowProgressBarOnBottom},t.prototype.renderElement=function(){return l.ReactElementFactory.Instance.createElement("sv-progress-"+this.survey.progressBarType.toLowerCase(),{survey:this.survey,css:this.survey.css,isTop:this.isTop})},t}(l.SurveyElementBase),W=function(e){function t(t){var i=e.call(this,t)||this;return i.containerRef=n.a.createRef(),i}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.model.initResizeManager(this.containerRef.current)},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this),this.model.resetResizeManager()},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){var e=this,t={display:this.model.visible?"":"none"},i="svc-side-bar"+(this.model.flyoutPanelMode?" svc-flyout-side-bar":""),o=this.model.tabs.map((function(e){return n.a.createElement(K,{item:e,key:e.id})}));return n.a.createElement("div",{className:i,style:{display:this.model.hasVisibleTabs?"":"none"}},n.a.createElement("div",{className:"svc-side-bar__shadow"}),n.a.createElement("div",{className:"svc-flex-column svc-side-bar__wrapper"},n.a.createElement("div",{ref:this.containerRef,style:t,className:"svc-side-bar__container"},n.a.createElement("div",{className:"svc-side-bar__container-header"},n.a.createElement("div",{className:"svc-side-bar__container-actions"},n.a.createElement(l.SurveyActionBar,{model:this.model.toolbar})),n.a.createElement("div",{className:"svc-side-bar__container-title"},this.model.headerText)),n.a.createElement("div",{className:"svc-side-bar__container-content"},o),n.a.createElement("div",{className:"svc-side-bar__container-close"},n.a.createElement("div",{className:"sd-btn sd-btn--action svc-side-bar__container-close-button",onClick:function(){return e.model.collapseSideBar()}}," ",this.model.closeText," ")))))},t}(l.SurveyElementBase),K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.item},t.prototype.renderElement=function(){return this.item.visible?l.ReactElementFactory.Instance.createElement(this.item.componentName,{model:this.item.model}):null},t}(l.SurveyElementBase);l.ReactQuestionFactory.Instance.registerQuestion("svc-side-bar-tab",(function(e){return n.a.createElement(K,e)}));l.ReactElementFactory.Instance.registerElement("svc-side-bar",(function(e){return n.a.createElement(W,e)}));var Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return n.a.createElement("div",{className:"sd-translation-line-skeleton"})},t}(n.a.Component);l.ReactElementFactory.Instance.registerElement("sd-translation-line-skeleton",(function(e){return n.a.createElement(Z,e)}));var Y=function(e){function t(t){var i=e.call(this,t)||this;return i.containerRef=n.a.createRef(),i.model=new u.PageNavigatorViewModel(t.creator.pagesController),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this);var t=this.containerRef.current;if(t){var i=this;t.parentElement.parentElement.onscroll=function(e){return i.model.onContainerScroll(e.currentTarget)}}},t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.containerRef.current;t&&(t.parentElement.parentElement.onscroll=void 0),this.model.dispose()},t.prototype.renderElement=function(){var e=this,t="svc-page-navigator__selector";return this.model.isPopupOpened&&(t+=" svc-page-navigator__selector--opened"),n.a.createElement("div",{className:"svc-page-navigator",ref:this.containerRef,style:{display:this.model.visible?"flex":"none"}},Object(l.attachKey2click)(n.a.createElement("div",{className:t,onClick:function(){return e.model.togglePageSelector()},title:this.model.pageSelectorCaption},n.a.createElement(l.SvgIcon,{className:"svc-page-navigator__navigator-icon",iconName:this.model.icon,size:24}),n.a.createElement(l.Popup,{model:this.model.popupModel}))),this.model.items.map((function(e){return n.a.createElement(X,{key:e.id,item:e})})))},t}(l.SurveyElementBase),X=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.getStateElement=function(){return this.props.item},t.prototype.renderElement=function(){var e=this.props.item,t="svc-page-navigator-item-content";return Object(c.unwrap)(e.active)&&(t+=" svc-page-navigator-item--selected"),Object(c.unwrap)(e.disabled)&&(t+=" svc-page-navigator-item--disabled"),n.a.createElement("div",{className:"svc-page-navigator-item"},Object(l.attachKey2click)(n.a.createElement("div",{className:t,onClick:function(t){e.action(e),t.stopPropagation()}},n.a.createElement("div",{className:"svc-page-navigator-item__dot",title:e.title}),n.a.createElement("div",{className:"svc-page-navigator-item__banner svc-item__banner"},n.a.createElement("span",{className:"svc-text svc-text--small svc-text--bold"},e.title),n.a.createElement("span",{className:"svc-page-navigator-item__dot"})))))},t}(l.SurveyElementBase),$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"creator",{get:function(){return this.model.creator},enumerable:!1,configurable:!0}),t.prototype.getStateElements=function(){return[this.model,this.model.survey]},t.prototype.renderPages=function(){var e=this,t=this.creator.survey.pages.map((function(t,i){return n.a.createElement("div",{className:"svc-page","data-sv-drop-target-page":t.name,"data-sv-drop-target-survey-element":t.name,key:t.id+"-"+i},e.renderPage(t))}));return this.model.showNewPage&&t.push(n.a.createElement("div",{className:"svc-page","data-sv-drop-target-survey-element":"newGhostPage",key:this.model.newPage.id+"-ghost-new-page"},this.renderPage(this.model.newPage))),t},t.prototype.renderPage=function(e){return l.ReactElementFactory.Instance.createElement("svc-page",{survey:this.creator.survey,page:e,creator:this.creator})},t.prototype.renderElement=function(){var e=this,t=this.creator.survey,i="svc-tab-designer "+this.model.getRootCss();return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"svc-flex-column"},this.model.isToolboxVisible?l.ReactElementFactory.Instance.createElement("svc-adaptive-toolbox",{model:this.creator}):null),n.a.createElement("div",{className:i,onClick:function(){return e.model.clickDesigner()}},n.a.createElement("div",{className:this.model.getDesignerCss()},this.creator.allowEditSurveyTitle?n.a.createElement("div",null,n.a.createElement(l.SurveyHeader,{survey:t})):null,n.a.createElement(J,{survey:t,location:"top"}),this.renderPages(),n.a.createElement(J,{survey:t,location:"bottom",css:t.css})),this.creator.showPageNavigator?n.a.createElement("div",{className:"svc-tab-designer__page-navigator"},n.a.createElement(Y,{creator:this.creator,pages:this.creator.pagesController.pages})):null))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-designer",(function(e){return n.a.createElement($,e)}));var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return n.a.createElement("div",{className:"svc-creator-tab__content svc-embed-tab__content"},this.model.survey?n.a.createElement(l.Survey,{model:this.model.survey}):null)},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-embed",(function(e){return n.a.createElement(ee,e)}));var te=function(e){function t(t){var i=e.call(this,t)||this;return i.aceEditorrRef=n.a.createRef(),i}return o(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this.model.init(ace.edit(this.aceEditorrRef.current))},t.prototype.renderElement=function(){return n.a.createElement("div",{className:"svc-creator-tab__content"},n.a.createElement("div",{className:"svc-json-editor-tab__content"},n.a.createElement("div",{className:"svc-json-editor-tab__ace-editor",ref:this.aceEditorrRef})))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-ace",(function(e){return n.a.createElement(te,e)}));var ie=function(e){function t(t){var i=e.call(this,t)||this;return i.model.canShowErrors=!1,i}return o(t,e),t.prototype.getStateElement=function(){return this.model},Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.renderElement=function(){for(var e=this,t=[],i=1,o=this.model.userFriendlyErrors,r=0;r<o.length;r++)t.push(n.a.createElement("span",{key:i},n.a.createElement("b",null,"Error: "))),i++,t.push(n.a.createElement("span",{key:i},o[r])),i++;return n.a.createElement("div",{className:"svc-creator-tab__content"},n.a.createElement("div",{className:"svc-json-editor-tab__content"},n.a.createElement("textarea",{className:"svc-json-editor-tab__content-area",value:this.model.text,onChange:function(t){return e.model.text=t.target.value},onKeyDown:function(t){return e.model.checkKey(t,t)},disabled:this.model.readOnly,"aria-label":this.model.ariaLabel}),t.length>0&&n.a.createElement("button",{type:"button",className:"svc-json-editor-tab__errros_button",onClick:function(){return e.model.toggleErrors()}},this.model.errorButtonText),this.model.canShowErrors&&n.a.createElement("div",{className:"svc-json-editor-tab__content-errors"},t)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-json-editor-textarea",(function(e){return n.a.createElement(ie,e)}));var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.button},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this,t="svc-logic-tab__content-action svc-btn"+(void 0===this.model.enabled||this.model.enabled?"":" svc-logic-tab__content-action--disabled");return Object(l.attachKey2click)(n.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:t,title:this.model.title},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-logic-add-button",(function(e){return n.a.createElement(oe,e)}));var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){this.model;var e=this.renderViewContent();return n.a.createElement("div",{className:"svc-creator-tab__content"},e)},t.prototype.renderViewContent=function(){var e="svc-plugin-tab__content svc-logic-tab__content "+(this.model.hasItems?"":"svc-logic-tab__empty");return n.a.createElement(r.Fragment,null,n.a.createElement("div",{className:e},n.a.createElement(l.Survey,{model:this.model.itemsSurvey}),this.model.hasItems?null:n.a.createElement("div",{className:"svc-logic-tab__content-empty"},n.a.createElement("span",{className:"svc-text"},this.model.emptyTabPlaceHolder)),n.a.createElement(oe,{button:this.model.addNewButton})))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-logic",(function(e){return n.a.createElement(re,e)}));var ne=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e="svd-simulator-main"+("desktop"===this.model.device?" svd-simulator-main--desktop":"");return this.model.survey?this.model.hasFrame?n.a.createElement("div",{className:e+" "+this.model.simulatorMainCssClass},n.a.createElement("div",{className:"svd-simulator-wrapper",style:{width:this.model.simulatorFrame.frameWidth+"px",height:this.model.simulatorFrame.frameHeight+"px"}},n.a.createElement("div",{className:"svd-simulator-frame "+this.model.simulatorFrame.cssClass,style:{width:(this.model.landscapeOrientation?this.model.simulatorFrame.frameHeight:this.model.simulatorFrame.frameWidth)+"px",height:(this.model.landscapeOrientation?this.model.simulatorFrame.frameWidth:this.model.simulatorFrame.frameHeight)+"px"}}),n.a.createElement("div",{className:"svd-simulator",style:{width:this.model.simulatorFrame.width/this.model.simulatorFrame.scale+"px",height:this.model.simulatorFrame.height/this.model.simulatorFrame.scale+"px",transform:"scale("+this.model.simulatorFrame.scale+") translate(-50%, -50%)"}},n.a.createElement("div",{className:"svd-simulator-content"},n.a.createElement(l.Survey,{model:this.model.survey}))))):n.a.createElement("div",{className:e},n.a.createElement("div",{className:"svd-simulator-content"},n.a.createElement(l.Survey,{model:this.model.survey}))):n.a.createElement("div",{className:e})},t}(l.SurveyElementBase),ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.button},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e=this;return Object(l.attachKey2click)(n.a.createElement("div",{role:"button",onClick:function(t){t.stopPropagation(),e.model.action()},className:"svc-preview__test-again svc-btn",title:this.model.title},n.a.createElement("span",{className:"svc-text svc-text--normal svc-text--bold"},this.model.title)))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-preview-test-again",(function(e){return n.a.createElement(ae,e)}));var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){var e="svc-creator-tab__content svc-test-tab__content"+(this.model.isPageToolbarVisible?" svc-creator-tab__content--with-toolbar":"");return n.a.createElement("div",{className:e},n.a.createElement("div",{className:"svc-plugin-tab__content"},n.a.createElement(ne,{model:this.model.simulator}),this.model.isRunning?null:n.a.createElement(ae,{button:this.model.testAgainAction}),this.model.isRunning?null:n.a.createElement(H,{survey:this.model.simulator.survey})),this.getBottomToolbar())},t.prototype.getBottomToolbar=function(){return this.model.isPageToolbarVisible?n.a.createElement("div",{className:"svc-test-tab__content-actions"},n.a.createElement(l.SurveyActionBar,{model:this.model.pages})):null},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-test",(function(e){return n.a.createElement(se,e)}));var le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.data},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model?n.a.createElement("div",{className:"svc-creator-tab__content svc-translation-tab"},this.renderElementContent()):null},t.prototype.renderElementContent=function(){return this.model.isEmpty?n.a.createElement("div",{className:"st-no-strings"},n.a.createElement("span",null,this.model.noStringsText)):n.a.createElement("div",{className:"st-content"},n.a.createElement("div",{className:"svc-flex-column st-strings-wrapper"},n.a.createElement("div",{className:"svc-flex-row st-strings-header"},n.a.createElement(l.Survey,{model:this.model.stringsHeaderSurvey})),n.a.createElement("div",{className:"svc-flex-row svc-plugin-tab__content st-strings"},n.a.createElement(l.Survey,{model:this.model.stringsSurvey}))))},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-tab-translation",(function(e){return n.a.createElement(le,e)}));var ue=function(e){function t(t){return e.call(this,t)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.renderElement=function(){return this.model.isVisible?n.a.createElement("div",{className:"svc-object-selector"},n.a.createElement(l.List,{model:this.model.list})):null},t}(l.SurveyElementBase);l.ReactElementFactory.Instance.registerElement("svc-object-selector",(function(e){return n.a.createElement(ue,e)}));var ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),Object.defineProperty(t.prototype,"model",{get:function(){return this.props.model},enumerable:!1,configurable:!0}),t.prototype.getStateElement=function(){return this.model},t.prototype.canRender=function(){return!!this.model&&e.prototype.canRender.call(this)},t.prototype.renderElement=function(){return n.a.createElement(l.Survey,{model:this.model.survey})},t}(l.SurveyElementBase);l.ReactQuestionFactory.Instance.registerQuestion("buttongroup",(function(e){return n.a.createElement(l.SurveyQuestionButtonGroup,e)}));var de;l.ReactElementFactory.Instance.registerElement("svc-property-grid",(function(e){return n.a.createElement(ce,e)})),de="".concat("1.9.5-beta.1")}])}));
|