@qualtrics/plugin-ui-react 1.4.0-alpha.8 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/common/field-mapper/field-mapper-key/field-mapper-key.d.ts +3 -0
  2. package/dist/common/field-mapper/field-mapper-row/field-mapper-row.d.ts +1 -2
  3. package/dist/common/field-mapper/field-mapper-value/field-mapper-value.d.ts +4 -2
  4. package/dist/common/field-mapper/field-mapper.d.ts +1 -2
  5. package/dist/common/piped-text-input/piped-text-input.d.ts +1 -1
  6. package/dist/index.es.js +48 -0
  7. package/dist/index.js +48 -0
  8. package/dist/lib/models/field-mapper-item.d.ts +0 -1
  9. package/dist/lib/models/piped-text.d.ts +3 -3
  10. package/package.json +32 -32
  11. package/tsconfig.json +7 -1
  12. package/.dockerignore +0 -8
  13. package/Dockerfile +0 -15
  14. package/Makefile +0 -25
  15. package/dist/common/capture-event/capture-event.test.d.ts +0 -1
  16. package/dist/common/copy-text/copy-text.test.d.ts +0 -1
  17. package/dist/common/dynamic-search-input/dynamic-search-input.d.ts +0 -1
  18. package/dist/common/dynamic-search-input/dynamic-search-input.test.d.ts +0 -1
  19. package/dist/common/event-registry.d.ts +0 -9
  20. package/dist/common/language-service.d.ts +0 -1
  21. package/dist/common/multiselect-dropdown/multiselect-dropdown.d.ts +0 -1
  22. package/dist/common/multiselect-dropdown/multiselect-dropdown.test.d.ts +0 -1
  23. package/dist/common/multiselect-dropdown/select-item/select-item.d.ts +0 -1
  24. package/dist/common/multiselect-dropdown/select-item/select-item.test.d.ts +0 -1
  25. package/dist/common/piped-text-input/piped-text-input.test.d.ts +0 -1
  26. package/dist/common/piped-text-select/piped-text-select.d.ts +0 -1
  27. package/dist/common/piped-text-select/piped-text-select.test.d.ts +0 -1
  28. package/dist/common/plugin-sdk-service.d.ts +0 -5
  29. package/dist/common/popover/popover.d.ts +0 -1
  30. package/dist/common/portal.d.ts +0 -10
  31. package/dist/common/task-fields/field-item/field-item.d.ts +0 -1
  32. package/dist/common/task-fields/field-item/field-item.test.d.ts +0 -1
  33. package/dist/common/task-fields/field-row/field-row.d.ts +0 -1
  34. package/dist/common/task-fields/field-row/field-row.test.d.ts +0 -1
  35. package/dist/common/task-fields/task-fields.d.ts +0 -1
  36. package/dist/common/task-fields/task-fields.test.d.ts +0 -1
  37. package/dist/main.es.js +0 -50
  38. package/dist/main.js +0 -50
  39. package/dist/plugin-app/example-data.d.ts +0 -102
  40. package/dist/plugin-app/plugin-app.d.ts +0 -1
  41. package/jenkins.groovy +0 -290
  42. package/jenkinsPipelineUtils/jira.groovy +0 -84
  43. package/jenkinsPipelineUtils/notifications.groovy +0 -34
  44. package/jenkinsPipelineUtils/pipelineControls.groovy +0 -64
  45. package/jenkinsPipelineUtils/trs.groovy +0 -30
  46. package/test_results/junit.xml +0 -101
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ /*! @license @qualtrics/plugin-ui-react 1.4.0
2
+ Qualtrics Software License Agreement
3
+
4
+ 1. General.
5
+ 1.1 Introduction. The software, programs, files, and/or code provided to you hereunder (collectively, the ?Software?) is hereby licensed to you subject to the terms of this License Agreement (this ?Agreement?). This Agreement forms a legally binding contract between you and Qualtrics, LLC (?Qualtrics?) in relation to your use of the Software. This Agreement relates solely to the Software provided under this Agreement and does not extend to, or provide any rights in connection with, any other products or services, including without limitation Qualtrics? software-as-a-service offerings and related services and products provided by Qualtrics to you or third parties (collectively, the ?Qualtrics Services?).
6
+ 1.2 Acceptance of Agreement. By accessing or using the Software, you acknowledge and agree to all of the terms and conditions of this Agreement. You may not access or use the Software if you do not accept this Agreement. You may not use the Software and may not accept this Agreement if you are a person barred from receiving the Software under the laws or regulations of the United States or other countries, including the country in which you are resident or from which you use the Software. If you are agreeing to be bound by this Agreement on behalf of your employer or other organization, you represent and warrant that you have full legal authority to bind your employer or such organization to this Agreement. If you do not have the requisite authority, you may not accept this Agreement or use the Software on behalf of your employer or organization.
7
+
8
+ 2. License and Use.
9
+ 2.1 Grant of License. Subject to the terms of this Agreement, Qualtrics grants you a limited, worldwide, royalty-free, non-assignable, non-exclusive, non-sublicensable, and revocable license to use the Software solely to interface or interact with, or to develop applications that interface or interact with, the Qualtrics Services. Qualtrics reserves the right to revoke this license at any time for any reason.
10
+ 2.2 Acceptable Use. You may not use the Software for any purpose not expressly permitted by this Agreement. You may not use the Software in connection with any activity, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of Qualtrics or any third party. Except to the extent explicitly authorized by the Software or as otherwise required by applicable third party licenses, you may not copy (except for routine backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Software or any part of the Software. You agree to use the Software only for purposes that are permitted by (a) this Agreement and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). You may not use this Software in connection with applications that are competitive with or disparaging toward Qualtrics or Qualtrics Services or that interface or interact with products or services that are competitive with Qualtrics Services.
11
+ 2.3 Responsibility for Use. You agree that you are solely responsible for (and that Qualtrics has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display and for the consequences of your actions (including any loss or damage which Qualtrics may suffer) by doing so. You agree that you are solely responsible for (and that Qualtrics has no responsibility to you or to any third party for) any breach of your obligations under this Agreement, any applicable third party contract or terms of service, or any applicable law or regulation, and for the consequences (including any loss or damage that Qualtrics or any third party may suffer) of any such breach.
12
+
13
+ 3 IP Ownership.
14
+ 3.1 Qualtrics IP. You agree that as between you and Qualtrics, Qualtrics owns all legal right, title and interest in and to the Software and related materials, including any Intellectual Property Rights in the Software. Qualtrics reserves all rights not expressly granted to you. As used herein, ?Intellectual Property Rights? means any and all rights under patent law, copyright law, trade secret law, trademark law, and/or any other intellectual property or proprietary rights.
15
+ 3.2 Your IP. Subject to the preceding subsection and other terms of this Agreement, Qualtrics agrees that it obtains no right, title or interest from you (or your licensors) under this Agreement in or to any software applications that you develop using the Software, including any Intellectual Property Rights in those applications.
16
+ 3.3 Trademarks. Nothing in this Agreement gives you a right to use any of Qualtrics? trade names, trademarks, service marks, logos, domain names, or other distinctive brand features. You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Software.
17
+ 3.4 Open Source. Use, reproduction and distribution of components of the Software licensed under an open source software license, if any, are governed solely by the terms of the applicable open source software license.
18
+
19
+ 4. Privacy and Information.
20
+ 4.1 Your Privacy Responsibilities. You agree that if you use the Software to develop applications for users, you will protect the privacy and legal rights of those users. If you use any Software or Qualtrics Service to retrieve a user?s data, you acknowledge and agree that you will retrieve data only with the user?s consent and in accordance with applicable laws. If your application stores personal or sensitive information provided by users, it must do so securely and in accordance with applicable law. If a user provides your application with Qualtrics account information, your application may only use that information to access the user?s Qualtrics account when, and for the limited purposes for which, the user has given you permission to do so.
21
+ 4.2 Qualtrics Privacy Responsibilities. In order to innovate on and improve the Software, Qualtrics may collect certain usage information and statistics from your use of thereof. The data collected will be anonymized and/or maintained in accordance with the Qualtrics Privacy Statement available online.
22
+
23
+ 5. Term
24
+ 5.1 Term; Termination. This Agreement will commence on the earlier of when you click through to accept its terms or when you access or use the Software. This Agreement will continue in effect until terminated by either you or Qualtrics. You may terminate this Agreement at any time by ceasing to access and use the Software and returning or destroying all copies and portions of the Software and related materials. Qualtrics may terminate this Agreement at any time by ceasing to make the Software available to you or by providing notice of termination to you in any reasonable form.
25
+ 5.2 Effect of Termination. Upon termination of this Agreement for any reason, all of your rights hereunder will immediately terminate, and you must immediately cease to access and use the Software and return or destroy all copies and portions of the Software and related materials. Sectionsˇ3, 5, 6, 7, 8, 9, and 10 will survive indefinitely notwithstanding the termination of this Agreement.
26
+
27
+ 6. DISCLAIMER OF WARRANTIES. YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE SOFTWARE AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED IN CONNECTION WITH USE OF THE SOFTWARE IS AT YOUR OWN DISCRETION AND AT YOUR SOLE RISK. YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FORM SUCH USE. THE SOFTWARE IS PROVIDED ?AS IS? AND ?AS AVAILABLE? WITHOUT WARRANTY OF ANY KIND FROM QUALTRICS OR ANY OTHER PERSON. QUALTRICS EXPRESSLY DISCLAIMS ALL REPRESENTATIONS, WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
28
+
29
+ 7. LIMITATION OF LIABILITY. YOU EXPRESSLY UNDERSTAND AND AGREE THAT NEITHER QUALTRICS NOR ITS AFFILIATES NOR THEIR RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, OR AGENTS SHALL BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU ARISING FROM OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, INCLUDING WITHOUT LIMITATION ANY LOSS OF DATA, WHETHER OR NOT QUALTRICS OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
30
+
31
+ 8. Indemnification. To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Qualtrics, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys? fees) arising out of or relating to (a) your use of the Software, (b) any application or work you develop with the Software that infringes any Intellectual Property Right of any person or defames any person or violates their rights of publicity or privacy, and/or (c) any breach or non-compliance by you of this Agreement.
32
+
33
+ 9. Modification.
34
+ 9.1 Modification of Software. You understand and agree that the substance, form, and nature of the Software that Qualtrics provides may change without prior notice to you and that future versions of the Software may be incompatible with applications developed on previous versions of the Software. You agree that Qualtrics may stop (permanently or temporarily) providing the Software or any features within the Software to you or to users generally at Qualtrics? sole discretion, without prior notice to you.
35
+ 9.2 Modification of Agreement. Qualtrics may modify this Agreement at any time by posting a revised version or by providing notice to you in any reasonable form. The modified Agreement will become effective immediately upon such posting or notification. By continuing to use the Software after the effective date of any modifications to this Agreement, you agree to be bound by the modified terms. It is your responsibility to check the online location of this Agreement regularly for modifications. Qualtrics last modified this Agreement on the date listed at the end of this Agreement.
36
+
37
+ 10. Miscellaneous
38
+ 10.1 Export Restrictions. The Software may be subject to United States export laws and regulations. You acknowledge and agree that you will comply with all domestic and international export laws and regulations that apply to the Software. These laws include restrictions on destinations, end users, and end use.
39
+ 10.2 Waiver. You agree that if Qualtrics does not exercise or enforce any legal right or remedy that is contained in this Agreement (or that Qualtrics has the benefit of under any applicable law), then this will not result in a waiver of Qualtrics? rights and those rights or remedies will still be available to Qualtrics.
40
+ 10.3 Severability. If any court of law rules that any provision of this Agreement is invalid, then that provision will be removed from this Agreement without affecting the rest of this Agreement. The remaining provisions of this Agreement will continue to be valid and enforceable to the maximum extent possible under applicable law.
41
+ 10.4 Third-Party Beneficiaries. You acknowledge and agree that each of Qualtrics? affiliates is a third-party beneficiary to this Agreement and shall be entitled to directly enforce, and rely upon, any provision of this Agreement that confers a benefit on (or rights in favor of) it. Other than this, no other person or company shall be third party beneficiaries to this Agreement.
42
+ 10.5 Assignment. You may not assign, delegate, or transfer this Agreement or your rights, duties, or obligations under this Agreement without the prior written consent of Qualtrics. Qualtrics may freely assign this Agreement or its rights, duties, or obligations hereunder, without consent, including without limitation in the event of a merger, acquisition, corporate reorganization, or sale of all or substantially all of its assets.
43
+ 10.6 Choice of Law; Jurisdiction. This Agreement, and your relationship with Qualtrics under this Agreement, shall be governed by the laws of the State of Utah without regard to its conflict of laws provisions. You and Qualtrics agree to submit to the exclusive jurisdiction of the courts located within Salt Lake County, Utah to resolve any legal matter arising from this Agreement. Notwithstanding the foregoing, you agree that Qualtrics shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
44
+ 10.7 Headings; Entire Agreement. The headings contained in this Agreement are for convenience only and shall not be interpreted to limit or otherwise affect any provision of this Agreement. This Agreement constitutes the entire agreement between you and Qualtrics in relation to the Software. This Agreement completely replaces and supersedes any prior agreements between you and Qualtrics in relation to the Software. For the avoidance of doubt, and if applicable, your general use of Qualtrics Services will continue to be governed by the applicable, separate agreement between Qualtrics and you or your organization.
45
+
46
+ Last updated August 28, 2019
47
+ */
48
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.promise.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.array.find-index.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.array.for-each.js"),require("core-js/modules/web.dom-collections.for-each.js");var e=require("react"),t=require("lodash.get"),n=require("@qualtrics/ui-react"),r=require("@qualtrics/ui-react/icons");require("core-js/modules/es.string.anchor.js");var i=require("lodash.clonedeep");require("core-js/modules/es.array.concat.js"),require("core-js/modules/es.array.is-array.js");var o=require("react-popper"),a=require("react-dom"),l=require("uuid");require("core-js/modules/es.array.map.js"),require("core-js/modules/es.function.name.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.array.find.js"),require("core-js/modules/es.object.assign.js"),require("core-js/modules/es.array.filter.js");var u=require("lodash.clonedeepwith");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("core-js/modules/es.string.trim.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.string.search.js");var c=d(e),s=d(t),p=d(i),f=d(a),m=d(u);function h(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(){b=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof s?t:s,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var l=w(a,n);if(l){if(l===c)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function s(){}function p(){}function f(){}var m={};l(m,i,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(C([])));v&&v!==t&&n.call(v,i)&&(m=v);var x=f.prototype=s.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){function r(i,o,a,l){var u=d(e[i],e,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,l)}),(function(e){r("throw",e,a,l)})):t.resolve(s).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,l)}))}l(u.arg)}var i;this._invoke=function(e,n){function o(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(o,o):o()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=f,l(x,"constructor",f),l(f,"constructor",p),p.displayName=l(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,a,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},g(y.prototype),l(y.prototype,o,(function(){return this})),e.AsyncIterator=y,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new y(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(x),l(x,a,"Generator"),l(x,i,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function y(e,t,n,r,i,o,a){try{var l=e[o](a),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,i)}function w(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){y(o,r,i,a,l,"next",e)}function l(e){y(o,r,i,a,l,"throw",e)}a(void 0)}))}}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T(this,n)}}function M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}h(".react-app {\n background-color: RGBA(0, 0, 0, 0.1);\n}");var q,R=0,L=function(){function e(t){var n=this;E(this,e),C(this,"register",(function(e){var t;return n.isSingletonHandler?(n.handler=e,function(){return n.handler=void 0}):(t=R++,n.handlers.push({callback:e,id:t}),function(){n.unregister(t)})})),this.isSingletonHandler=!!t,this.handlers=[],this.handler=function(){}}return I(e,[{key:"unregister",value:function(e){var t;this.isSingletonHandler||-1!==(t=this.handlers.findIndex((function(t){return t.id===e})))&&this.handlers.splice(t,1)}},{key:"trigger",value:function(e){if(this.isSingletonHandler)return this.handler(e);this.handlers.forEach((function(t){t.callback(e)}))}}]),e}(),D=void 0!==("undefined"==typeof global?"undefined":g(global))?global:void 0!==("undefined"==typeof self?"undefined":g(self))?self:void 0!==("undefined"==typeof window?"undefined":g(window))?window:{},z={actions_task:{save:new L(!0)}},H={actions_task:{save:function(e){return z.actions_task.save.trigger(e)}}},B={getPluginSdkClient:function(e){var t=!D.PluginClient;if(void 0!==q)return t?q:new Promise((function(e){return e(q)}));if(t)return n=D.PluginSDKClient,console.error("Warning - Initializing outdated version of PluginSDKClient. Please upgrade to PluginClient v1.0.0"),q=n.initialize();if(t||void 0===D.PluginClient)throw new Error("No PluginClient or PluginSDKClient found on global object");return function(e,t){var n,r=function(e){var t,n;t=void 0,n={},"object"===g(e)?n=e:"string"==typeof e?(t=e,n=H[e]||{}):n=e;return{pluginType:t,eventHandlers:n}}(t),i=r.pluginType,o=r.eventHandlers;return n=function(e,t){return Object.keys(o).includes(e)?z[i][e].register(t):function(){}},e.initialize(o).then((function(e){return"function"!=typeof e.registerHandler&&(e.registerHandler=n),q=e}))}(D.PluginClient,e);var n}};var _={DA:"da",DE:"de",EN:"en","EN-GB":"en-GB",ES:"es","ES-ES":"es-419",FI:"fi",FR:"fr","FR-CA":"fr-CA",ID:"id",IT:"it",JA:"ja",KO:"ko",MS:"ms",NL:"nl",PB:"pb",PT:"pt","PT-BR":"pt-BR","RI-GI":"ri-GI",RU:"ru",SV:"sv",TH:"th","ZH-S":"zh-Hans","ZH-T":"zh-Hant"};var K=function(){return K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},K.apply(this,arguments)};function G(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))}function V(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}var U=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(r,e.Component);var n=P(r);function r(){var e;E(this,r);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return C(F(e=n.call.apply(n,[this].concat(i))),"rootSelector",document.body),C(F(e),"container",document.createElement("div")),e}return I(r,[{key:"componentDidMount",value:function(){this.rootSelector.appendChild(this.container)}},{key:"componentWillUnmount",value:function(){this.rootSelector.removeChild(this.container)}},{key:"render",value:function(){return f.default.createPortal(this.props.children,this.container)}}]),r}();h(".q-popover {\n position: absolute;\n z-index: 1000;\n padding: 4px 0;\n font-size: 14px;\n line-height: 20px;\n color: #32363A;\n fill: #333;\n list-style: none;\n min-width: 160px;\n max-width: 500px;\n min-height: 10px;\n max-height: 99%;\n background: #fff;\n border-radius: 4px;\n box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 0px 10px 1px rgba(0, 0, 0, 0.14), 0 0px 10px 2px rgba(0, 0, 0, 0.12);\n z-index: 9000;\n}\n\nbody .q-popover {\n max-height: 50vh;\n overflow-y: scroll;\n max-width: 30vw;\n}");var Y=new L,$=c.default.createElement(n.Button,null," anchor "),J=[];function Q(t){var n=M(e.useState(!1),2),r=n[0],i=n[1],a=[].concat(J,j(t.modifiers||[])),l=function(){i(!1),t.onClose&&t.onClose()};return e.useEffect((function(){var e,n;return n=t.ignoreClickSelector,e=Y.register((function(e){var t;n&&(t=e.target.closest(n)),t||l()})),function(){e()}}),[]),e.useEffect((function(){t.show?i(t.show):l()}),[t.show]),c.default.createElement(o.Manager,null,c.default.createElement(o.Reference,null,(function(e){var n,r=e.ref;return"function"==typeof t.anchor?n=t.anchor(r):(n=t.anchor,n=c.default.createElement("div",{ref:r,className:"popover-anchor-container"},t.anchor||$)),n})),c.default.createElement(U,null,r&&c.default.createElement(o.Popper,{placement:t.placement||"bottom-start",modifiers:a},(function(e){var n,r=e.ref,i=e.style,o=e.placement,a=e.arrowProps,l=e.update;return n=[],Array.isArray(t.children)?n=t.children:void 0!==t.children&&(n=[t.children]),n.forEach((function(e){e.props.optionsRef&&(e.props.optionsRef.current.scheduleUpdate=l)})),c.default.createElement("div",{ref:r,"data-placement":o,style:x({},i),className:"q-popover"},t.children,c.default.createElement("div",{ref:a.ref,style:a.style}))}))))}window.addEventListener("click",(function(e){null===e.target.closest(".q-popover")?Y.trigger(e):(e.stopPropagation(),e.stopImmediatePropagation())}));function W(t){return e.useState((function(){return null!=t?t:l.v4()}))[0]}h(".piped-text-menu-list .piped-text-popover-menu > * {\n min-height: 32px;\n}");function Z(e){return c.default.createElement("div",{className:"piped-text-popover-container"},c.default.createElement("div",{className:"piped-text-error-container"},c.default.createElement("div",{className:"piped-text-error-icon"},c.default.createElement(r.ErrorIcon,{size:"medium"})),e.errorText&&c.default.createElement("div",{className:"piped-text-error-text"},e.errorText)))}h("");function X(e){return"embeddedData"===e.value}function ee(e){return!0===e.header||!0===e.disabled}function te(e){return!!e.hasSubmenu}function ne(e){var t,n,r;return t=X(e),n=te(e),r=function(e){return!(X(e)||ee(e)||te(e))}(e),t||n||r}h("div[role=menu] .piped-text-search-input-container {\n padding: 5px 10px;\n}\n\n.piped-text-search-input {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n align-content: center;\n padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n box-sizing: border-box;\n height: 36px;\n padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n /* the margin-right hack was not in harmony with tao.\n now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n position: absolute;\n z-index: -1;\n bottom: 0;\n top: 0;\n left: 0;\n right: 0;\n min-width: 100%;\n}\n\n.piped-text-submenu-item {\n padding-right: 24px;\n}\n\n.piped-text-information-message {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n color: #74777A;\n text-align: center;\n white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n width: fit-content;\n margin: 0 auto;\n}\n\n.piped-text-error-container {\n color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n fill: #BB0000;\n display: block;\n margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n text-align: center;\n white-space: pre-line;\n padding: 0 12px 8px;\n}\n\n.piped-text-menu-item-container.highlighted-menu-item {\n background: RGBA(50, 54, 58, 0.08);\n}\n.piped-text-menu-item-container .piped-text-menu-item, .piped-text-menu-item-container .piped-text-submenu-item {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n.piped-text-menu-item-container .piped-text-menu-item:not(.piped-text-header):not(.piped-text-disabled):hover, .piped-text-menu-item-container .piped-text-submenu-item:not(.piped-text-header):not(.piped-text-disabled):hover {\n cursor: pointer;\n}\n.piped-text-menu-item-container .piped-text-menu-item.piped-text-header, .piped-text-menu-item-container .piped-text-submenu-item.piped-text-header {\n font-size: 12px;\n line-height: 16px;\n font-weight: 700;\n padding: 12px;\n}\n.piped-text-menu-item-container .piped-text-menu-item.piped-text-disabled:not(.piped-text-header), .piped-text-menu-item-container .piped-text-submenu-item.piped-text-disabled:not(.piped-text-header) {\n color: RGB(116, 119, 122);\n}");h("");var re=c.default.forwardRef((function(t,n){var i=e.useRef(null),o=W(),a=t.menuItem;return c.default.createElement("div",{"data-testid":"piped-text-submenu",className:"piped-text-submenu-item-container",role:"presentation"},a.show&&c.default.createElement(me,{"aria-labelledby":o,items:a.submenu.items,show:a.show,placement:"right-start",onClose:function(){a.show=!1},allowCustom:a.submenu.allowCustom,customScheme:a.submenu.customScheme,customInputMessage:a.submenu.customInputMessage,searchPlaceholder:a.submenu.searchPlaceholder,errorText:a.submenu.errorText,onSelected:function(e){t.onMenuItemClick(e)},anchor:function(e){return c.default.createElement("div",{ref:e,className:"piped-text-submenu-anchor"})},anchorRef:i,keyboardCtrl:t.keyboardCtrl,pipedTextMenuId:t.pipedTextMenuId}),c.default.createElement("div",{id:o,className:"piped-text-submenu-item",ref:i},c.default.createElement("div",{className:"label-text"},a.label),c.default.createElement("div",{className:"piped-text-icon"},c.default.createElement(r.ChevronRightIcon,{size:"medium"}))))}));h("div[role=menu] .piped-text-search-input-container {\n padding: 5px 10px;\n}\n\n.piped-text-search-input {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n align-content: center;\n padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n box-sizing: border-box;\n height: 36px;\n padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n /* the margin-right hack was not in harmony with tao.\n now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n position: absolute;\n z-index: -1;\n bottom: 0;\n top: 0;\n left: 0;\n right: 0;\n min-width: 100%;\n}\n\n.piped-text-submenu-item {\n padding-right: 24px;\n}\n\n.piped-text-information-message {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n color: #74777A;\n text-align: center;\n white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n width: fit-content;\n margin: 0 auto;\n}\n\n.piped-text-error-container {\n color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n fill: #BB0000;\n display: block;\n margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n text-align: center;\n white-space: pre-line;\n padding: 0 12px 8px;\n}\n\n.embedded-data-menu {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n align-content: center;\n padding: 4px 8px 8px;\n}\n.embedded-data-menu input.q-plugin-popover-input {\n box-sizing: border-box;\n height: 36px;\n padding: 7px 9px;\n}");h("");var ie=["ArrowDown","Escape","Tab","PageUp","Home","PageDown","End","Enter"],oe=function(){function e(e,t){this.currentContainer=e,this.menuItems=t,this.highlightedIdx=-1}return e.prototype.setMenuItems=function(e){this.menuItems=e},e.prototype.findMenuItemIdx=function(e){return this.menuItems.findIndex((function(t){return t.current===e.current}))},e}(),ae=function(){function e(){this.menuFocusItems=[],this.currFocusItemIdx=-1}return e.prototype.getFocusMenu=function(e){var t;if(-1!==(t=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e.current}))))return this.menuFocusItems[t]},e.prototype.getCurrentFocusMenu=function(){return this.menuFocusItems[this.currFocusItemIdx]},e.prototype.addMenu=function(e,t){var n,r;r=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e.current})),0===this.menuFocusItems.length||-1===r?(n=new oe(e,t),this.menuFocusItems.push(n)):(n=this.menuFocusItems[r]).setMenuItems(t)},e.prototype.removeMenu=function(e){var t;if(-1===(t=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e.current}))))throw console.error(this),console.error(e),new Error("Could not find a matching PipedTextMenu");this.menuFocusItems.splice(t,1)},e.prototype.handleKeyEvent=function(e){var t,n,r,i,o,a,l,u,d,c,s,p;if(u=e.key,void 0!==(d=this.getCurrentFocusMenu()))switch(u){case"ArrowDown":d.highlightedIdx<d.menuItems.length-1&&(s=d.menuItems[d.highlightedIdx+1],this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(t=null==s?void 0:s.current)||void 0===t||t.focus());break;case"ArrowUp":d.highlightedIdx>0&&(s=d.menuItems[d.highlightedIdx-1],this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(n=null==s?void 0:s.current)||void 0===n||n.focus());break;case"ArrowRight":this.focusNextSubmenu();break;case"ArrowLeft":case"Escape":this.currFocusItemIdx>0&&(e.stopPropagation(),void 0!==(c=this.menuFocusItems[this.currFocusItemIdx-1])&&(void 0===(p=c.menuItems[c.highlightedIdx])?null===(i=null===(r=c.currentContainer)||void 0===r?void 0:r.current)||void 0===i||i.focus():null===(o=null==p?void 0:p.current)||void 0===o||o.focus()));break;case"PageUp":case"Home":(s=d.menuItems[0])&&(this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(a=null==s?void 0:s.current)||void 0===a||a.focus());break;case"PageDown":case"End":(s=d.menuItems[d.menuItems.length-1])&&(this.setFocusMenuHighlightedIdx(d.currentContainer,s),null===(l=null==s?void 0:s.current)||void 0===l||l.focus())}},e.prototype.focusNextSubmenu=function(){var e,t,n,r,i;void 0!==this.getCurrentFocusMenu()&&void 0!==(r=this.menuFocusItems[this.currFocusItemIdx+1])&&(void 0===(i=r.menuItems[r.highlightedIdx])?null===(t=null===(e=r.currentContainer)||void 0===e?void 0:e.current)||void 0===t||t.focus():null===(n=null==i?void 0:i.current)||void 0===n||n.focus())},e.prototype.getCurrentFocusMenuRef=function(){var e;return null===(e=this.getCurrentFocusMenu())||void 0===e?void 0:e.currentContainer},e.prototype.isMenuItemInCurrentFocusMenu=function(e){return void 0!==this.getCurrentFocusMenu().menuItems.find((function(t){return t.current===e.current}))},e.prototype.setFocus=function(e){var t;if(-1===(t=this.menuFocusItems.findIndex((function(t){return t.currentContainer.current===e}))))throw console.error(this),console.error(e),new Error("Could not find a matching PipedTextMenu");this.currFocusItemIdx=t},e.prototype.getFocusMenuHighlightedIdx=function(e){var t;return void 0===(t=this.getFocusMenu(e))?-1:t.highlightedIdx},e.prototype.setFocusMenuHighlightedIdx=function(e,t){var n,r;void 0!==(n=this.getFocusMenu(e))&&-1!==(r=n.findMenuItemIdx(t))&&(n.highlightedIdx=r)},e}();function le(t){var i=e.useState(""),o=i[0],a=i[1],l=e.useState(!1),u=l[0],d=l[1],s=e.useRef(),p=e.useRef();return e.useEffect((function(){t.keyboardCtrl.addMenu(s,[p])}),[s]),e.useEffect((function(){return function(){t.keyboardCtrl.removeMenu(s)}}),[]),c.default.createElement("div",{className:"embedded-data-input",tabIndex:-1,"aria-labelledby":t.ariaLabelledById,ref:s,onFocus:function(e){var n;e.currentTarget===s.current&&(t.keyboardCtrl.setFocus(s.current),null===(n=null==p?void 0:p.current)||void 0===n||n.focus(),t.keyboardCtrl.setFocusMenuHighlightedIdx(s,p),e.stopPropagation(),e.preventDefault())},onKeyDown:function(e){switch(e.key){case"ArrowDown":case"ArrowUp":case"ArrowRight":case"ArrowLeft":case"Escape":t.keyboardCtrl.handleKeyEvent(e),e.preventDefault();break;case"Enter":f(),e.stopPropagation(),e.preventDefault();break;case"PageUp":case"Home":case"PageDown":case"End":e.stopPropagation(),e.preventDefault()}}},c.default.createElement(n.InputGroup,null,c.default.createElement(n.Input,{onChange:function(e){!function(e){var t=(e.target.value||"").trim(),n=encodeURIComponent(t);a(n),n.length>0&&u&&d(!1)}(e)},invalid:u,onKeyDown:function(e){var t=e.key;ie.includes(e.key)||e.stopPropagation();e.shiftKey||"Tab"!==t||e.stopPropagation()},className:"q-plugin-popover-input",ref:p}),c.default.createElement(n.Button,{kind:"primary",onClick:f,onKeyDown:function(e){e.shiftKey&&"Tab"===e.key&&e.stopPropagation()},onFocus:function(e){e.stopPropagation()}},c.default.createElement(r.AddIcon,null))));function f(){var e;(o||"").trim().length<1?d(!0):(e="${e://Field/".concat(o,"}"),t.onSelect(e))}}var ue=c.default.forwardRef((function(e,t){var n=e.anchor,r=e.onClose||function(){},i=e.onSelect||function(){};return c.default.createElement(Q,{show:e.show,anchor:n,onClose:r,ignoreClickSelector:"embedded-data-menu-content",placement:e.placement||"right-start"},c.default.createElement("div",{className:"embedded-data-menu",ref:t},c.default.createElement(le,{onSelect:i,keyboardCtrl:e.keyboardCtrl,ariaLabelledById:e.ariaLabelledById})))}));function de(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!==e&&(e.current=t)}))}}var ce=c.default.forwardRef((function(t,n){var i=e.useState(),o=i[0],a=i[1],l=e.useState(),u=l[0],d=l[1],s=e.useState(),p=s[0],f=s[1],m=e.useState(),h=m[0],v=m[1],x=e.useState(),b=x[0],g=x[1],y=e.useState(),w=y[0],E=y[1],k=e.useState(),I=k[0],C=k[1],S=e.useRef(),N=W(),F=W();return e.useEffect((function(){var e,n,r,i,o,l,u;void 0!==t.menuItem&&(e=ne(t.menuItem),r=te(t.menuItem),i=X(t.menuItem),n=ee(t.menuItem),e&&(o=-1,u="menuitem"),(r||i)&&(l="menu"),a(l),d(o),f(u),v(r),g(n),E(e),C(i))}),[t.menuItem]),c.default.createElement("div",{className:"piped-text-menu-item-container "+(t.isHighlighted?"highlighted-menu-item":""),ref:de([n,S]),"aria-haspopup":o,tabIndex:u,role:p,id:o?N:void 0,"aria-controls":o?F:void 0,"aria-expanded":t.menuItem.show,onFocus:function(e){var n;n=t.menuItem,h||I?t.onSubmenuHover(n,S):t.onMenuItemHover(n,S)},onKeyDown:function(e){!function(e){if(!t.isHighlighted)return;if(!t.keyboardCtrl.isMenuItemInCurrentFocusMenu(S))return;" "!==e.key&&"Enter"!==e.key||(h||I?t.onSubmenuItemClick(t.menuItem):t.onMenuItemClicked(t.menuItem),e.preventDefault())}(e)},onMouseEnter:function(e){h||I?(n=t.menuItem,t.onSubmenuHover(n,S)):w&&function(e){t.onMenuItemHover(e,S)}(t.menuItem);var n},onClick:function(e){h||I?(n=t.menuItem,t.onSubmenuItemClick(n)):w&&T(t.menuItem);var n}},function(e){var n,i,o,a;h?n=c.default.createElement(re,{key:e.key,menuItem:e,onMenuItemClick:T,keyboardCtrl:t.keyboardCtrl,pipedTextMenuId:F}):b?(i=!0===e.header?"piped-text-header":"",o=!0===e.disabled?"piped-text-disabled":"",a="piped-text-menu-item ".concat(i," ").concat(o),n=c.default.createElement("div",{className:a},e.label)):n=I?c.default.createElement("div",{role:"presentation"},c.default.createElement(ue,{show:e.show,onSelect:P,anchor:function(e){return c.default.createElement("div",{ref:e,className:"embedded-data-menu-anchor","aria-hidden":"true"})},keyboardCtrl:t.keyboardCtrl,ariaLabelledById:N}),c.default.createElement("div",{className:"piped-text-submenu-item"},c.default.createElement("div",{className:"label-text"},e.label),c.default.createElement("div",{className:"piped-text-icon"},c.default.createElement(r.ChevronRightIcon,{size:"medium"})))):c.default.createElement("div",{className:"piped-text-menu-item",role:"presentation"},e.label);return c.default.createElement("div",{className:"piped-text-menu-item-content",role:"presentation"},n)}(t.menuItem));function T(e){t.onMenuItemClicked(e)}function P(e){var n;n={value:{locator:e}},t.onMenuItemClicked(n)}})),se=c.default.forwardRef((function(e,t){var r=c.default.useRef();return c.default.createElement("div",{className:"piped-text-search-input",tabIndex:-1,ref:t,onFocus:function(t){var n;t.target!==r.current&&(null===(n=r.current)||void 0===n||n.focus());e.onFocus(t)}},c.default.createElement("form",{onSubmit:e.onSearchSubmit},c.default.createElement(n.Input,{small:!0,full:!0,className:"q-plugin-popover-input",ref:r,placeholder:e.searchPlaceholder,value:e.value,onChange:e.onInputChange,onClick:e.onInputClick,onKeyDown:function(e){ie.includes(e.key)||e.stopPropagation()},role:"searchbox"})))})),pe=c.default.forwardRef((function(t,r){var i,o,a=this,l=e.useState(!1),u=l[0],d=l[1],s=e.useState(!1),p=s[0],f=s[1],m=e.useState(),h=m[0],v=m[1],x=e.useState(),b=x[0],g=x[1],y=e.useState(),w=y[0],E=y[1],k=e.useState(),I=k[0],C=k[1],S=e.useState(""),N=S[0],F=S[1],T=e.useState(!1),P=T[0],M=T[1],j=null!==(i=t.pipedTextMenuId)&&void 0!==i?i:W(),O=t["aria-labelledby"],A=e.useRef(),q=e.useRef(),R=e.useState(!1),L=R[0],D=R[1],z=e.useCallback((function(e){e&&D(!0)}),[]),H=e.useState(!1),B=H[0],_=H[1],K=e.useCallback((function(e){e&&_(!0)}),[]),U=void 0===t.keyboardCtrl,Y=e.useState(U?new ae:t.keyboardCtrl),$=Y[0];Y[1];return e.useEffect((function(){return function(){$.removeMenu(A)}}),[]),e.useEffect((function(){var e,t;A.current&&q.current&&w&&!u&&(t=c.default.Children.map(I,(function(e){return e.ref})),e=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([q],t,!0),$.addMenu(A,e),U&&!1===P&&(setTimeout((function(){var e;null===(e=A.current)||void 0===e||e.focus()}),0),M(!0)))}),[A,w,$,u]),e.useEffect((function(){var e;L&&(e=[],B&&e.push(q),$.addMenu(A,e))}),[L,B]),e.useEffect((function(){void 0!==t.items&&G(a,void 0,void 0,(function(){var e,n;return V(this,(function(r){switch(r.label){case 0:if("function"!=typeof t.items)return[3,5];d(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,t.items()];case 2:return e=r.sent(),[3,4];case 3:return r.sent(),f(!0),[3,4];case 4:return d(!1),[3,6];case 5:e=t.items,r.label=6;case 6:try{n=ve(e),v(n)}catch(e){f(!0)}return[2]}}))}))}),[t.items]),e.useEffect((function(){var e;void 0!==h&&(e=(h||[]).filter(Q),g(e))}),[N,h]),e.useEffect((function(){var e;Array.isArray(b)&&(e=function(e){var n,r,i,o;if(n=[],r=[],0===e.length&&!0===t.allowCustom&&t.customInputMessage)return c.default.createElement("div",null,c.default.createElement("div",{className:"piped-text-information-message"},t.customInputMessage));return i=0,o=$.getFocusMenuHighlightedIdx(A),n=e.map((function(e){var t,n,a,l=c.default.createRef();return a=(t=ne(e))&&o-1===i,n=c.default.createElement(ce,{ref:l,key:e.key,menuItem:e,onSubmenuHover:X,onMenuItemHover:ee,onMenuItemClicked:re,onSubmenuItemClick:ie,onEmbeddedDataItemClick:oe,keyboardCtrl:$,isHighlighted:a}),t&&(r.push(n),i++),n})),C(r),n}(b),E(e))}),[b]),function(){var e;"function"==typeof(null===(e=t.popoverOptionsRef)||void 0===e?void 0:e.current.scheduleUpdate)&&t.popoverOptionsRef.current.scheduleUpdate()}(),c.default.createElement("div",{className:"piped-text-menu-list ".concat(null!==(o=t.className)&&void 0!==o?o:""),ref:de([r,A,z]),id:j,"aria-labelledby":O,role:"menu",tabIndex:void 0===t.tabIndex?-1:t.tabIndex,onKeyDown:function(e){!function(e){var n;if("Tab"===e.key)J();if(null==t||t.menuKeyDown(e),n=$.getCurrentFocusMenuRef(),A.current!==(null==n?void 0:n.current))return;switch(e.key){case"ArrowDown":case"ArrowUp":case"ArrowRight":case"ArrowLeft":case"Escape":case"PageUp":case"Home":case"PageDown":case"End":$.handleKeyEvent(e),e.preventDefault()}}(e)},onFocus:function(e){!function(e){var t;e.currentTarget===A.current&&($.setFocus(A.current),-1===$.getFocusMenuHighlightedIdx(A)&&(null===(t=q.current)||void 0===t||t.focus()),e.stopPropagation(),e.preventDefault())}(e)}},c.default.createElement("div",{className:"piped-text-popover-menu",role:"presentation"},p?c.default.createElement(Z,{errorText:t.errorText}):c.default.createElement(c.default.Fragment,null,c.default.createElement(se,{ref:de([q,K]),value:N,onSearchSubmit:function(e){var n,r,i;if(e.preventDefault(),!(!0===t.allowCustom&&t.customScheme))return;if(""===(n=N.trim()))return;r="${".concat(t.customScheme,"://Field/").concat(encodeURIComponent(n),"}"),i={value:{locator:r}},t.onSelected(i),J()},searchPlaceholder:t.searchPlaceholder,onInputChange:function(e){return t=e.target.value,void F(t);var t},onInputClick:function(e){e.stopPropagation()},onFocus:function(){!function(){var e,t;t=null!==(e=null==h?void 0:h.slice())&&void 0!==e?e:[],$.setFocusMenuHighlightedIdx(A,q),fe(t),v(t)}()}}),u?c.default.createElement("div",{className:"piped-text-loading-spinner"},c.default.createElement(n.LoadingSpinner,{show:!0,size:"medium"})):w)));function J(){var e;null===(e=t.onClose)||void 0===e||e.call(t)}function Q(e){var t;return t=N||"",JSON.stringify(e).toLowerCase().includes(t.toLowerCase())}function X(e,t){var n;n=h.slice(),te(e,t),fe(n),v(n),e.show||(e.show=!0)}function ee(e,t){var n;n=h.slice(),te(e,t),fe(n),v(n)}function te(e,t){var n;$.setFocusMenuHighlightedIdx(A,t),null===(n=t.current)||void 0===n||n.focus()}function re(e){e.disabled||t.onSelected(e)}function ie(e){console.log("PipedTextMenuList submenu click"),$.focusNextSubmenu()}function oe(e){}}));function fe(e){e.forEach((function(e){e.show&&(e.show=!1)}))}h("div[role=menu] .piped-text-search-input-container {\n padding: 5px 10px;\n}\n\n.piped-text-search-input {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n align-content: center;\n padding: 4px 8px 8px;\n}\n.piped-text-search-input input.q-plugin-popover-input {\n box-sizing: border-box;\n height: 36px;\n padding: 7px 9px;\n}\n\n.piped-text-menu-empty-anchor {\n /* the margin-right hack was not in harmony with tao.\n now, the empty-anchor is truly empty */\n}\n\n.piped-text-submenu-item-container {\n position: relative;\n}\n.piped-text-submenu-item-container .piped-text-menu .piped-text-submenu-anchor {\n position: absolute;\n z-index: -1;\n bottom: 0;\n top: 0;\n left: 0;\n right: 0;\n min-width: 100%;\n}\n\n.piped-text-submenu-item {\n padding-right: 24px;\n}\n\n.piped-text-information-message {\n padding: 10px 12px;\n user-select: none;\n box-sizing: border-box;\n overflow-x: hidden;\n text-overflow: ellipsis;\n color: #74777A;\n text-align: center;\n white-space: pre-line;\n}\n\n.piped-text-loading-spinner {\n width: fit-content;\n margin: 0 auto;\n}\n\n.piped-text-error-container {\n color: #BB0000;\n}\n.piped-text-error-container .piped-text-error-icon {\n padding: 8px 0;\n}\n.piped-text-error-container .piped-text-error-icon svg {\n fill: #BB0000;\n display: block;\n margin: 0 auto;\n}\n.piped-text-error-container .piped-text-error-text {\n text-align: center;\n white-space: pre-line;\n padding: 0 12px 8px;\n}");var me=c.default.forwardRef((function(t,n){var r=e.useRef({}),i=e.useState(t.show),o=i[0],a=i[1],l=t["aria-labelledby"],u=t.onClose||function(){},d=e.useState(null);d[0];var s=d[1],p=e.useCallback((function(e){s(e)}),[]);e.useEffect((function(){t.show&&a(!0)}),[t.show]),e.useEffect((function(){return function(){return u()}}),[]);var f=function(e){a("boolean"==typeof e?e:!o)};return c.default.createElement("div",{className:"piped-text-menu"},c.default.createElement(Q,{show:o,onClose:function(){f(!1),u()},placement:t.placement||"right-start",anchor:t.anchor,ignoreClickSelector:t.ignoreClickSelector},c.default.createElement(pe,{className:"piped-text-popover-container",items:t.items,errorText:t.errorText,"aria-labelledby":l,ref:p,allowCustom:t.allowCustom,customInputMessage:t.customInputMessage,customScheme:t.customScheme,searchPlaceholder:t.searchPlaceholder,onSelected:function(e){t.onSelected(e),m()},onClose:function(){return u()},popoverOptionsRef:r,keyboardCtrl:t.keyboardCtrl,menuKeyDown:function(e){switch(e.key){case"Tab":case"Escape":m()}},pipedTextMenuId:t.pipedTextMenuId}),c.default.createElement(he,{optionsRef:r})));function m(){var e,n;u(),null===(n=null===(e=t.anchorRef)||void 0===e?void 0:e.current)||void 0===n||n.focus()}}));function he(e){return c.default.createElement("div",null)}function ve(e,t){var n;return t||(e=p.default(e)),n=1,e.forEach((function(e){e.key=e.key||n++,e.hasSubmenu=!!s.default(e,"submenu.items.length")||"function"==typeof s.default(e,"submenu.items"),(e.hasSubmenu||"embeddedData"===e.value)&&(e.show=!1),e.hasSubmenu&&"function"!=typeof e.submenu.items&&ve(e.submenu.items,!0)})),e}h(".piped-text-dropdown button[type=button].popover-toggle-button {\n min-width: 128px;\n}\n.piped-text-popover-container {\n padding: 0;\n}\n.piped-text-popover-container > * {\n min-height: 32px;\n}\n.piped-text-popover-container .piped-text-submenu-item .label-text, .piped-text-popover-container .piped-text-submenu-item > .piped-text-icon {\n display: inline-block;\n vertical-align: middle;\n overflow-wrap: break-word;\n word-wrap: break-word;\n -webkit-hyphens: auto;\n -ms-hyphens: auto;\n -moz-hyphens: auto;\n hyphens: auto;\n}\n.piped-text-popover-container .piped-text-submenu-item .piped-text-icon {\n display: inline-block;\n box-sizing: content-box;\n position: absolute;\n right: 0;\n max-width: 24px;\n min-width: 24px;\n max-height: 24px;\n}\n.piped-text-popover-container .piped-text-submenu-item .piped-text-icon > svg {\n position: relative;\n margin-left: -5px;\n margin-top: -3px;\n}");function xe(t){var n=M(e.useState(t.show),2),r=n[0],i=n[1],o=M(e.useState(v()),2),a=o[0],l=o[1],u=e.useRef(null),d=t.anchor,s=t["aria-labelledby"];e.useEffect((function(){return function(){return f()}}),[]),e.useEffect((function(){var e;e=t.show,i(e)}),[t.show]),e.useEffect((function(){var e=v();l(e)}),[t.items]);var p,f=function(){t.onClose&&t.onClose()},m=void 0!==d?c.default.cloneElement(d,{ref:d.ref}):(p=u,c.default.createElement("div",{ref:p,className:"piped-text-menu-empty-anchor"})),h=t.anchorRef||m.ref;return c.default.createElement("div",{className:"piped-text-dropdown"},r&&c.default.createElement(me,{onClose:f,show:r,onSelected:function(e){t.onSelect(e),f()},items:a,anchor:m,anchorRef:h,ignoreClickSelector:t.ignoreClickSelector,"aria-labelledby":s}));function v(){if(t.items)return ve(t.items)}}h(".piped-text-input .piped-text-input-toggle, .piped-text-input .piped-text-select-container {\n display: inline-block;\n}\n.piped-text-input .piped-text-input-toggle {\n display: flex;\n}\n.piped-text-input .piped-text-input-toggle input {\n flex: 1 1;\n box-sizing: border-box;\n}\n.piped-text-input .piped-text-input-toggle.multiline-input textarea {\n flex: 1 1;\n box-sizing: border-box;\n}\n.piped-text-input .piped-text-input-toggle input + button, .piped-text-input .piped-text-input-toggle textarea + button {\n margin-left: 4px;\n}\n.piped-text-input .addon-text-container {\n /*\n These styles are intended to match CFE QDS components,\n notably FormField and InputField.\n See: https://gitlab-app.eng.qops.net/cfe/ui/-/blob/master/packages/ui-react/src/FormField/Caption.less\n */\n margin-top: 6px;\n}\n.piped-text-input .addon-text-container .helper-text, .piped-text-input .addon-text-container .error-text {\n font-size: 12px;\n}\n.piped-text-input .addon-text-container .helper-text {\n color: #74777a;\n fill: #74777a;\n}\n.piped-text-input .addon-text-container .helper-text + .error-text {\n margin-top: 4px;\n}\n.piped-text-input .addon-text-container .error-text {\n display: flex;\n align-items: center;\n color: #b00;\n fill: #b00;\n}\n.piped-text-input .addon-text-container .error-text .error-text-icon svg {\n margin-left: -2px;\n margin-right: 3px;\n width: 16px;\n height: 16px;\n}");var be=c.default.forwardRef((function(t,i){var o=e.useState(!1),a=o[0],l=o[1],u=e.useState(),d=u[0],p=u[1],f=W(),m=e.useRef(null),h=e.useState({value:t.value||""}),v=h[0],x=h[1],b=t.items,g=t.value,y=t.placeholder,w=t.onChange,E=t.onSelect,k=t.onClose,I=t.errorText,C=t.helperText,S=t.multiline,N=void 0!==S&&S,F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["items","value","placeholder","onChange","onSelect","onClose","errorText","helperText","multiline"]);return e.useEffect((function(){if(function(){if(void 0===d&&g){var e=g.length-1||0;p(e)}else p(0)}(),void 0!==E&&"function"!=typeof E)throw new Error("PipedTextInput: onSelect property must be a function");if(void 0!==w&&"function"!=typeof w)throw new Error("PipedTextInput: onChange property must be a function")}),[]),e.useEffect((function(){x({value:"string"==typeof g?g:""})}),[t.value]),c.default.createElement("div",{className:"piped-text-input"},c.default.createElement("div",{className:"piped-text-input-toggle popover-toggle"+(N?" multiline-input":"")},c.default.createElement(n.Input,K({ref:i,value:v.value,onChange:function(e){!function(e){var t;t=e.target.value,x({value:t}),P(t,e)}(e)},onBlur:function(e){var t;t=e.target.selectionStart,p(t)},placeholder:y,multiline:N},F)),c.default.createElement(n.IconButton,{id:f,"aria-label":"PipedText","aria-haspopup":"menu","aria-expanded":!!a||void 0,role:"button",onClick:function(){var e;(e=!a)||T();l(e)},ref:m},c.default.createElement(r.PipedTextIcon,null)),c.default.createElement("div",{className:"piped-text-select-container"},c.default.createElement(xe,{items:b,onSelect:function(e){var t,n,r;M(e),s.default(e,"value.locator")&&(n=v.value.substring(0,d),r=v.value.substring(d),t="".concat(n).concat(e.value.locator).concat(r),x({value:t}),P(t))},show:a,onClose:T,ignoreClickSelector:"piped-text-input-toggle",anchorRef:m,"aria-labelledby":f}))),(void 0!==C||void 0!==I)&&c.default.createElement("div",{className:"addon-text-container"},C&&c.default.createElement("div",{className:"helper-text"},C),I&&c.default.createElement("div",{className:"error-text"},c.default.createElement("div",{className:"error-text-icon"},c.default.createElement(r.ErrorIcon,null)),c.default.createElement("div",{className:"error-text-content"},I))));function T(){k&&k(),l(!1)}function P(e,t){w&&w(e,t)}function M(e){E&&E(e)}}));function ge(t){var i=M(e.useState(t.children),2),o=i[0],a=i[1];e.useEffect((function(){var e;Array.isArray(o)||((e=[]).push(o),a(e))}),[]),e.useEffect((function(){var e;e=t.children.slice(),a(e)}),[t.children]);var l,u=function(e){"function"==typeof t.onFieldSwitch&&t.onFieldSwitch(t.id,e)},d=function(e){"function"==typeof t.onFieldNameChange&&t.onFieldNameChange(t.id,e)},s=function(e,n){"function"==typeof t.onFieldValueChange&&t.onFieldValueChange(t.id,e,n)},p=function(e){return"string"==typeof e?0===e.trim().length:"function"==typeof e||null==e||0==="".concat(e).trim().length},f=function e(t){return t.map((function(t){var r=t.id,i=t.name,o=t.subMenu,a=t.subMenuLabel;return void 0!==o?c.default.createElement(n.SelectMenu,{label:a||i,key:r},e(o)):c.default.createElement(n.MenuItem,{key:r,value:r},i)}))};return c.default.createElement("div",{className:"field-row"},c.default.createElement("div",{className:"field-selector ".concat(t.required&&!t.subMenu?"required-field":"")},(l=c.default.createElement("div",null,t.nameTooltip),c.default.createElement(n.Tooltip,{disabled:!t.isCustom||p(t.nameTooltip),placement:"top",content:l},c.default.createElement("div",null,t.isCustom?c.default.createElement(n.Input,{full:!0,value:void 0===t.fieldName?"":t.fieldName,placeholder:void 0===t.customNamePlaceholder?"":t.customNamePlaceholder,className:"custom-field-name",onChange:d}):t.required||!t.children||Array.isArray(o)&&0===o.length?t.subMenu?c.default.createElement(n.SelectMenu,{searchable:void 0!==t.searchable&&!1!==t.searchable,defaultLabel:t.fieldName||"",label:t.fieldName,className:"full-width left-align",onChange:u},f([{id:t.id,name:t.fieldName,subMenu:t.subMenu,subMenuLabel:t.subMenuLabel}])):c.default.createElement("div",{className:"required-indicator-container"},c.default.createElement("div",{className:"required-indicator-text"},t.fieldName),t.required&&c.default.createElement("div",{className:"required-indicator-symbol"},"*")):c.default.createElement(n.SelectMenu,{searchable:void 0!==t.searchable&&!1!==t.searchable,defaultLabel:t.fieldName||"",label:t.fieldName,className:"full-width left-align",onChange:u},f(o)))))),c.default.createElement("div",{className:"field-input-container"},c.default.createElement("div",{className:"field-input"},function(){var e=c.default.createElement("div",null,t.valueTooltip);return c.default.createElement(n.Tooltip,{disabled:p(t.valueTooltip),placement:"top",content:e},c.default.createElement("div",null,t.customInput?t.customInput:c.default.createElement(be,{items:t.pipedTextItems,value:void 0===t.value?"":t.value,onChange:s,placeholder:void 0===t.valuePlaceholder?"":t.valuePlaceholder})))}()),c.default.createElement("div",{className:"delete-row"},c.default.createElement("div",{className:"icon-wrapper",onClick:function(){"function"==typeof t.onRemove&&t.onRemove(t.id)}},!t.required&&c.default.createElement(n.IconButton,{"aria-label":"RemoveRow",size:"medium"},c.default.createElement(r.RemoveItemIcon,null))))))}h(".field-row {\n min-width: 475px;\n display: flex;\n align-items: center;\n}\n.field-row .field-selector, .field-row .field-input, .field-row .delete-row, .field-row .required-indicator {\n display: inline-block;\n}\n.field-row .field-selector, .field-row .field-input {\n padding: 0 10px;\n}\n.field-row .custom-field-name, .field-row .field-input, .field-row .delete-row {\n box-sizing: border-box;\n}\n.field-row .field-selector {\n min-width: 30%;\n}\n.field-row .field-selector.required-field button:hover {\n cursor: not-allowed;\n}\n.field-row .field-selector .required-indicator-container {\n padding-left: 12px;\n display: flex;\n color: #32363A;\n}\n.field-row .field-selector .required-indicator-container .required-indicator-text {\n min-width: 0;\n font-size: 14px;\n}\n.field-row .field-selector .required-indicator-container .required-indicator-symbol {\n margin-top: -2px;\n}\n.field-row .field-selector .left-align {\n text-align: left;\n}\n.field-row .field-selector .custom-field-name {\n padding-left: 16px;\n padding-right: 30px;\n}\n.field-row .field-selector .custom-field-name input {\n text-align: center;\n display: inline-block;\n width: 100%;\n padding: 0;\n}\n.field-row .field-input-container {\n display: flex;\n flex: 1 0;\n align-items: center;\n}\n.field-row .field-input-container .field-input {\n flex: 1;\n min-width: 0;\n margin-right: 4px;\n}\n.field-row .field-input-container .delete-row {\n max-width: 36px;\n margin-left: 12px;\n vertical-align: middle;\n}\n.field-row .field-input-container .delete-row .icon-wrapper {\n display: block;\n width: fit-content;\n margin: 0 auto;\n min-width: 41px;\n}\n.field-row .field-input-container .delete-row .icon-wrapper:hover {\n cursor: pointer;\n}\n.field-row .full-width {\n width: 100%;\n}");function ye(e){var t=e.name||void 0;return c.default.createElement("div",{className:"field-item",onClick:function(){"function"==typeof e.onClick&&e.onClick(e.id)}},t)}h("");h(".task-fields .add-field-button {\n margin-right: 100px;\n}\n.task-fields .add-field-button .add-field-button-label {\n padding: 0 3px;\n}\n.task-fields .field-table {\n padding-right: 100px;\n overflow-x: auto;\n}\n.task-fields .field-table .field-headers {\n margin-bottom: 10px;\n padding-left: 12px;\n}\n.task-fields .field-table .field-headers .field-row {\n color: #6A6D70;\n font-weight: bold;\n}\n.task-fields .field-table .field-headers .field-row .field-selector label, .task-fields .field-table .field-headers .field-row .field-input label {\n font-size: 12px;\n}\n.task-fields .field-table .field-headers .field-row .field-selector {\n padding-top: 0;\n padding-right: 24px;\n padding-bottom: 0;\n padding-left: 0;\n}\n.task-fields .field-table .field-headers .field-row .field-input {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 12px;\n}\n.task-fields .field-table .field-rows {\n padding-bottom: 12px;\n}\n.task-fields .field-table .field-rows .field-row {\n border-top: 1px solid #E5E5E5;\n}\n.task-fields .field-table .field-rows .field-row .field-selector {\n padding-top: 8px;\n padding-right: 12px;\n padding-bottom: 8px;\n padding-left: 12px;\n}\n.task-fields .field-table .field-rows .field-row .field-input {\n border-left: 1px solid #E5E5E5;\n padding-top: 8px;\n padding-right: 0;\n padding-bottom: 8px;\n padding-left: 12px;\n}\n\n.q-popover .field-item {\n padding: 5px 32px;\n}\n.q-popover .field-item:hover {\n cursor: pointer;\n user-select: none;\n background: #007ac0;\n color: #fff;\n fill: #fff;\n}");function we(t){var r=t.label||"",i=t.customLabel||"",o=t.disableAddFieldPopover,a=M(e.useState(!1),2),u=a[0],d=a[1],s=l.v4(),p=c.default.createElement(ye,{key:s,onClick:function(){t.onCustomFieldAdded(),d(!1)},id:s,name:i}),f=[],m=function e(t){return t.subMenu?e(t.subMenu[0]):t.id};return f=t.children.map((function(e){return c.default.createElement(ye,{name:e.props.name,key:e.props.id,id:e.props.id,subMenu:e.props.subMenu,onClick:function(e){d(!1),t.onFieldAdded(e)}})})),t.allowCustom&&f.push(p),c.default.createElement("div",{className:"add-field-button-container"},c.default.createElement(Q,{show:u,onClose:function(){d(!1)},ignoreClickSelector:".add-field-button",anchor:c.default.createElement(n.Button,{disabled:0===f.length,kind:"secondary",className:"add-field-button",onClick:function(){o?t.onFieldAdded(0!==t.children?m(t.children[0].props):""):d(!u)}},c.default.createElement("span",{className:"add-field-button-label"},r))},f))}function Ee(e){var t=e.itemHeaderText,r=e.inputHeaderText;return t||r?c.default.createElement("div",{className:"field-row"},c.default.createElement("div",{className:"field-selector"},c.default.createElement(n.Label,null,t)),c.default.createElement("div",{className:"field-input"},c.default.createElement(n.Label,null,r))):null}function ke(e){var t=e.checked||!1,n=e.children||"";return c.default.createElement("div",{className:"select-item",onClick:function(t){return e.onChange(e.value,t)}},c.default.createElement("div",{className:"item"},c.default.createElement("div",{className:"checked-container ".concat(t?"checked":"")},c.default.createElement(r.CheckIcon,{size:"medium"})),c.default.createElement("div",{className:"item-content"},n)))}h(".select-item .item {\n padding: 5px 32px;\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n width: 100%;\n}\n.select-item .item .checked-container, .select-item .item .item-content {\n display: inline-block;\n}\n.select-item .item .checked-container {\n margin-bottom: -3px;\n transition: opacity cubic-bezier(0.4, 0, 0.2, 1) 0.1s;\n}\n.select-item .item .checked-container.checked {\n opacity: 1;\n}\n.select-item .item .checked-container:not(.checked) {\n opacity: 0;\n}\n.select-item .item:hover {\n cursor: pointer;\n user-select: none;\n background: #007ac0;\n color: #fff;\n fill: #fff;\n}");h("");function Ie(e){return c.default.createElement("div",{className:"dynamic-search-popover-child",onClick:e.onClick},e.children)}h(".dynamic-search-input .search-input {\n box-sizing: border-box;\n}\n\n.dynamic-search-popover-child {\n padding: 5px 32px;\n}\n.dynamic-search-popover-child:hover {\n cursor: pointer;\n user-select: none;\n background: #007ac0;\n color: #fff;\n fill: #fff;\n}");h(".capture-event .capture-event-controls {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 20px;\n}\n.capture-event .capture-event-controls .status-message {\n font-size: 12px;\n line-height: 16px;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.capture-event .capture-event-controls .status-message.pending {\n color: #74777a;\n}\n.capture-event .capture-event-controls .status-message.success {\n color: #107e3e;\n fill: #107e3e;\n}\n.capture-event .capture-event-controls .status-message.failure {\n color: #bb0000;\n fill: #bb0000;\n}");h(".copy-text {\n display: flex;\n column-gap: 8px;\n}\n.copy-text .input-container {\n width: 100%;\n}\n.copy-text .input-container .input-textbox {\n width: 100%;\n}\n.copy-text .copy-button-container .selected-button {\n display: flex;\n}\n.copy-text .copy-button-container .selected-button .selected-button-text {\n display: flex;\n align-self: center;\n}");function Ce(e){return"string"==typeof e}h(".field-mapper {\n padding-bottom: 12px;\n}\n.field-mapper .field-mapper-row-container .field-mapper-row {\n border-top: 1px solid #E5E5E5;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row {\n margin-bottom: 10px;\n padding-left: 12px;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-row {\n border: 0;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key, .field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value {\n border: 0;\n display: flex;\n align-items: center;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key .field-mapper-header-cell, .field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value .field-mapper-header-cell {\n color: #6A6D70;\n font-weight: bold;\n font-size: 12px;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-key {\n padding-top: 0;\n padding-right: 24px;\n padding-bottom: 0;\n padding-left: 0;\n}\n.field-mapper .field-mapper-row-container.field-mapper-header-row .field-mapper-value {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n padding-left: 12px;\n}\n.field-mapper .add-field-button-container {\n padding-top: 12px;\n}\n.field-mapper .addon-text-container {\n padding-top: 6px;\n}\n.field-mapper .addon-text-container .error-text:not(:first-child) {\n padding-top: 4px;\n}");h(".field-mapper-row .field-mapper-row-content {\n display: flex;\n align-items: stretch;\n}\n.field-mapper-row .field-mapper-row-content .field-mapper-key {\n flex: 4;\n min-width: 33%;\n min-height: 100%;\n}\n.field-mapper-row .field-mapper-row-content .field-mapper-value {\n flex: 7;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container {\n min-height: 100%;\n padding: 8px 12px;\n border-left: 1px solid #E5E5E5;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container.hide-remove-button {\n border: 0;\n}\n.field-mapper-row .field-mapper-row-content .remove-row-container .empty-remove-button {\n min-width: 36px;\n}");h(".field-mapper-key {\n padding-top: 8px;\n padding-right: 12px;\n padding-bottom: 8px;\n padding-left: 12px;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-dropdown {\n width: 100%;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-dropdown-button {\n width: 100%;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled {\n opacity: 1;\n /*\n Styles below are copied \n verbatim from the styles on the <span> element\n in the QDS Dropdwon & DropdownButton components\n */\n /*[BEGIN COPIED STYLES]*/\n line-height: normal;\n padding: 0 4px 0 12px;\n display: inline-flex;\n justify-content: space-between;\n align-items: center;\n background-color: #fafafa;\n color: rgb(50, 54, 58);\n border-color: rgba(137, 137, 137, 0.6);\n /*[END COPIED STYLES]*/\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled .field-mapper-key-disabled-text {\n /*[BEGIN COPIED STYLES]*/\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-height: 10px;\n /*[END COPIED STYLES]*/\n opacity: 0.9;\n}\n.field-mapper-key .field-mapper-key-select-container .field-mapper-key-disabled .field-mapper-key-disabled-icon {\n /*[BEGIN COPIED STYLES]*/\n fill: rgb(81, 85, 89);\n /*[END COPIED STYLES]*/\n opacity: 0.6;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container {\n display: flex;\n height: 36px;\n align-items: center;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container .required-field-text {\n min-width: 0;\n font-size: 14px;\n}\n.field-mapper-key .field-mapper-key-select-container .required-field-container .required-field-symbol {\n margin-top: -2px;\n}");var Se=c.default.forwardRef((function(e,t){var i,o,a,l,u,d,s,p,f,m=null!==(i=e.id)&&void 0!==i?i:W(),h=e.helperText?"".concat(m,"-helper-text"):void 0,v=e.errorText?"".concat(m,"-error-text"):void 0,x=[h,v].filter((function(e){return void 0!==e})).join(" ");return p=Array.isArray(e.availableFields)?e.availableFields:[],f="function"==typeof e.onChange?e.onChange:function(){},c.default.createElement("div",{className:"field-mapper-key"+(e.className?" "+e.className:""),ref:t,id:m,"aria-describedby":x},c.default.createElement(n.Tooltip,{disabled:!e.tooltip,content:null!==(o=e.tooltip)&&void 0!==o?o:null},c.default.Children.count(e.children)>0?e.children:c.default.createElement("div",{className:"field-mapper-key-select-container"},function(){var t;return!((null==p?void 0:p.length)>0)&&!(null===(t=e.selectedField)||void 0===t?void 0:t.required)}()?c.default.createElement(n.Button,{className:"field-mapper-key-disabled",disabled:!0,full:!0},c.default.createElement("div",{className:"field-mapper-key-disabled-text"},null===(a=e.selectedField)||void 0===a?void 0:a.label),c.default.createElement(r.ChevronDownIcon,{className:"field-mapper-key-disabled-icon",size:"medium","aria-hidden":"true"})):!0===(null===(l=e.selectedField)||void 0===l?void 0:l.required)?c.default.createElement("div",{className:"required-field-container"},c.default.createElement("div",{className:"required-field-text"},null===(u=e.selectedField)||void 0===u?void 0:u.label),c.default.createElement("div",{className:"required-field-symbol"},"*")):c.default.createElement(n.Dropdown,{className:"field-mapper-key-dropdown",onChange:function(t){var n;if(void 0===(n=p.find((function(e){return e.key===t}))))return;f(e.selectedField,n)}},c.default.createElement(n.DropdownButton,{className:"field-mapper-key-dropdown-button",label:null===(d=e.selectedField)||void 0===d?void 0:d.label}),c.default.createElement(n.DropdownList,null,null===(s=e.availableFields)||void 0===s?void 0:s.map((function(e){return c.default.createElement(n.DropdownOption,{key:e.key,label:e.label,value:e.key})})))))),(e.errorText||e.helperText)&&c.default.createElement("div",{className:"addon-text-container"},e.helperText&&c.default.createElement(n.HelperText,{className:"helper-text",id:h},e.helperText),e.errorText&&c.default.createElement(n.ErrorText,{className:"error-text",id:v},e.errorText)))}));h(".field-mapper-value {\n border-left: 1px solid #E5E5E5;\n padding-top: 8px;\n padding-right: 12px;\n padding-bottom: 8px;\n padding-left: 12px;\n}");var Ne=c.default.forwardRef((function(e,t){var r,i,o,a,l=null!==(r=e.id)&&void 0!==r?r:W(),u=e.helperText?"".concat(l,"-helper-text"):void 0,d=e.errorText?"".concat(l,"-error-text"):void 0,s=[u,d].filter((function(e){return void 0!==e})).join(" ");return c.default.createElement("div",{className:"field-mapper-value"+(e.className?" "+e.className:""),ref:t,id:l,"aria-describedby":s||void 0},c.default.createElement(n.Tooltip,{disabled:!e.tooltip,content:null!==(i=e.tooltip)&&void 0!==i?i:null},c.default.Children.count(e.children)>0?e.children:c.default.createElement(be,K({items:null!==(o=e.pipedTextItems)&&void 0!==o?o:[],onChange:null!==(a=e.onChange)&&void 0!==a?a:function(){},value:e.inputValue},e.inputProps))),(e.errorText||e.helperText)&&c.default.createElement("div",{className:"addon-text-container"},e.helperText&&c.default.createElement(n.HelperText,{className:"helper-text",id:u},e.helperText),e.errorText&&c.default.createElement(n.ErrorText,{className:"error-text",id:d},e.errorText)))})),Fe=c.default.forwardRef((function(e,t){return c.default.createElement("div",{className:"field-mapper-row"+(e.className?" "+e.className:""),ref:t},c.default.createElement("div",{className:"field-mapper-row-content"},c.default.Children.map(e.children,(function(t){return function(t){var n,r,i,o,a,l,u,d,s,p,f,m;switch(l={},u={},t.type){case Se:d=!Array.isArray(t.props.availableFields)&&(null===(n=e.availableFields)||void 0===n?void 0:n.length)>0,s="object"!=typeof t.props.selectedField&&void 0!==e.selectedField,p="function"!=typeof t.props.onChange&&"function"==typeof e.onFieldKeyChange,d&&(l.availableFields=null!==(i=null===(r=e.availableFields)||void 0===r?void 0:r.slice())&&void 0!==i?i:[]),s&&(l.selectedField=Object.assign({},e.selectedField)),p&&(l.onChange=function(t,n){e.onFieldKeyChange(t,n)}),c.default.isValidElement(t)&&(d||s||p)&&(t=c.default.cloneElement(t,l)),a=t;break;case Ne:f=!Array.isArray(t.props.pipedTextItems)&&(null===(o=e.pipedTextItems)||void 0===o?void 0:o.length)>0,m="function"!=typeof t.props.onChange&&"function"==typeof e.onFieldValueChange,f&&(u.pipedTextItems=e.pipedTextItems),m&&(u.onChange=function(t){e.onFieldValueChange(e.selectedField,t)}),c.default.isValidElement(t)&&(f||m)&&(t=c.default.cloneElement(t,u)),a=t;break;default:a=t}return a}(t)})),c.default.createElement("div",{className:"remove-row-container"+(!1===e.showRemove?" hide-remove-button":"")},!1===e.showRemove?c.default.createElement("div",{className:"empty-remove-button"}):c.default.createElement(n.IconButton,{"aria-label":"Remove",onClick:function(t){var n;null===(n=e.onFieldRemove)||void 0===n||n.call(e,e.selectedField)}},c.default.createElement(r.RemoveItemIcon,null)))))})),Te=c.default.forwardRef((function(e,t){var i,o,a,l,u,d;return c.default.createElement("div",{className:"field-mapper "+(null!==(i=e.className)&&void 0!==i?i:""),ref:t},(Ce(e.fieldKeysHeaderText)||Ce(e.fieldValuesHeaderText))&&c.default.createElement("div",{className:"field-mapper-row-container field-mapper-header-row"},c.default.createElement(Fe,{showRemove:!1},c.default.createElement(Se,null,c.default.createElement("div",{className:"field-mapper-header-cell field-mapper-key-header"},null!==(o=e.fieldKeysHeaderText)&&void 0!==o?o:"")),c.default.createElement(Ne,null,c.default.createElement("div",{className:"field-mapper-header-cell field-mapper-value-header"},null!==(a=e.fieldValuesHeaderText)&&void 0!==a?a:"")))),c.default.createElement("div",{className:"field-mapper-row-container"},c.default.Children.map(e.children,(function(t){return function(t){var n,r,i,o,a,l,u,d,s,p,f;if(a={},t.type!==Fe)return o=t;o=t;l=!Array.isArray(o.props.availableFields)&&(null===(n=e.availableFields)||void 0===n?void 0:n.length)>0,u="function"!=typeof o.props.onFieldRemove&&"function"==typeof e.onFieldRemove,d=!Array.isArray(o.props.pipedTextItems)&&(null===(r=e.pipedTextItems)||void 0===r?void 0:r.length)>0,s="function"!=typeof o.props.onFieldKeyChange&&"function"==typeof e.onFieldKeyChange,p="function"!=typeof o.props.onFieldValueChange&&"function"==typeof e.onFieldValueChange,f="boolean"!=typeof o.props.showRemove&&"boolean"==typeof(null===(i=t.props.selectedField)||void 0===i?void 0:i.required),l&&(a.availableFields=e.availableFields.slice());u&&(a.onFieldRemove=function(t){return e.onFieldRemove(t)});d&&(a.pipedTextItems=e.pipedTextItems);s&&(a.onFieldKeyChange=function(t,n){return e.onFieldKeyChange(t,n)});p&&(a.onFieldValueChange=function(t,n){return e.onFieldValueChange(t,n)});f&&(a.showRemove=!t.props.selectedField.required);return o=c.default.cloneElement(o,a)}(t)}))),c.default.createElement("div",{className:"add-field-button-container"},Array.isArray(e.availableFields)&&e.availableFields.length>0?c.default.createElement(n.Dropdown,null,c.default.createElement(n.DropdownButton,null,c.default.createElement(n.Button,{className:"add-field-button",kind:"secondary"},c.default.createElement("div",{className:"add-field-icon"},c.default.createElement(r.AddIcon,null)),c.default.createElement("div",{className:"add-field-button-label"},null!==(u=e.addFieldLabel)&&void 0!==u?u:"{{MISSING_I18N_STRING}}"))),c.default.createElement(n.DropdownList,null,null===(d=e.availableFields)||void 0===d?void 0:d.map((function(t){return c.default.createElement(n.DropdownOption,{key:t.key,value:t.key,label:t.label,onSelect:function(n){var r,i;r=t.key,(i=e.availableFields.find((function(e){return e.key===r})))&&e.onFieldAdd(i)}})})))):c.default.createElement(n.Button,{disabled:!0,kind:"secondary",className:"add-field-button"},c.default.createElement("div",{className:"add-field-icon"},c.default.createElement(r.AddIcon,null)),c.default.createElement("div",{className:"add-field-button-label"},null!==(l=e.addFieldLabel)&&void 0!==l?l:"{{MISSING_I18N_STRING}}"))))}));exports.CaptureEvent=function(e){return c.default.createElement("div",{className:"capture-event"},c.default.createElement("div",{className:"capture-event-controls"},"pending"===e.status?c.default.createElement("div",{className:"capture-event-button-container"},c.default.createElement(n.Button,{kind:"secondary",onClick:function(){return e.onCancel()}},e.cancelCaptureTranslation)):c.default.createElement("div",{className:"capture-event-button-container"},c.default.createElement(n.Button,{kind:"primary",onClick:function(){return e.onStart()}},e.startCaptureTranslation)),(t={default:["",void 0],pending:[e.pendingStatusTranslation,c.default.createElement(n.LoadingSpinner,{size:"small",show:!0})],success:[e.successStatusTranslation,c.default.createElement(r.SuccessIcon,{size:"small"})],failure:[e.failureStatusTranslation,c.default.createElement(r.ErrorIcon,{size:"small"})]}[e.status],i=t[0],o=t[1],c.default.createElement("div",{className:"status-message ".concat(e.status)},o,i))),void 0!==e.payload&&c.default.createElement(n.FormField,{isReadOnly:!0},c.default.createElement(n.InputField,{"aria-readonly":!0,label:e.payloadLabelTranslation,multiline:!0,readOnly:!0,full:!0,value:e.payload,className:"polled-response-output"})));var t,i,o},exports.CopyText=function(t){var i=e.useState(!1),o=i[0],a=i[1];return c.default.createElement("div",{className:"copy-text"},c.default.createElement("div",{className:"input-container"},c.default.createElement(n.Input,{className:"input-textbox",defaultValue:t.text,"aria-readonly":!0,readOnly:!0})),c.default.createElement("div",{className:"copy-button-container"},c.default.createElement(n.Button,{kind:"secondary",disabled:o,onClick:function(){try{navigator.clipboard.writeText(t.text),a(!0),setTimeout((function(){return a(!1)}),1500)}catch(e){console.error("Failed to copy text"),console.error(e)}}},o?c.default.createElement("div",{className:"selected-button"},c.default.createElement("div",{className:"selected-button-icon"},c.default.createElement(r.CheckIcon,null)),c.default.createElement("div",{className:"selected-button-text"},t.copySelectedTranslation)):c.default.createElement("div",{className:"default-button"},t.copyTranslation))))},exports.DynamicSearchInput=function(t){var r=M(e.useState(!1),2),i=r[0],o=r[1],a=M(e.useState([]),2),l=a[0],u=a[1],d=M(e.useState(""),2),p=d[0],f=d[1];e.useEffect((function(){if(t.search&&"function"!=typeof t.search)throw new Error("DynamicSearchInput: Expected function for search property");if(t.onChange&&"function"!=typeof t.onChange)throw new Error("DynamicSearchInput: Expected onChange to be a function. Received type ".concat(g(t.onChange)));if(!t.search&&void 0===t.items)throw new Error("DynamicSearchInput: Expected one of either items or search function but found neither");if(t.search&&void 0!==t.items)throw new Error("DynamicSearchInput: Expected one of either items or search function but found both");if(void 0!==t.items){if(!Array.isArray(t.items))throw new Error("DynamicSearchInput: expected items property to be an Array");t.items.forEach((function(e){if(void 0===e.props.label)throw new Error('DynamicSearchInput: expected items in items property to have "label" property')}))}}),[]);var m,h,v=function(e,n){"function"==typeof t.onChange&&t.onChange(e,n)},x=(m=w(b().mark((function e(n){var r;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==(n=((n||"")+"").trim().toLowerCase())){e.next=3;break}return e.abrupt("return",[]);case 3:return r=t.items.filter((function(e){return e.props.label.toLowerCase().includes(n)})),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)}))),function(e){return m.apply(this,arguments)}),y=(h=w(b().mark((function e(n){var r,i,a,l,d;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.persist(),r=s.default(n,"target.value",""),i=t.search?t.search:x,e.next=5,i(r);case 5:if(a=e.sent,Array.isArray(a)){e.next=9;break}throw l=(void 0===a?"undefined":null===a&&"null")||a.constructor&&a.constructor.name||a,new Error("DynamicSearchInput: expected result from search function to be Array, but was ".concat(l));case 9:d=a.map((function(e){if(void 0===s.default(e,"props.label"))throw new Error("DynamicSearchInput: expected search result array values to have label property but found none");return c.default.createElement(Ie,{key:e.props.id,onClick:function(){var t;t=e.props.label,f(t),v(t),o(!1)}},e)})),f(r),d.length>0?o(!0):o(!1),u(d),v(r,n);case 14:case"end":return e.stop()}}),e)}))),function(e){return h.apply(this,arguments)});return c.default.createElement("div",{className:"dynamic-search-input"},c.default.createElement(Q,{show:i,onClose:function(){o(!1)},anchor:c.default.createElement(n.Input,{className:"search-input",full:!0,small:!0,placeholder:t.placeholder,value:p,onChange:y})},l))},exports.FieldItem=ye,exports.FieldMapper=Te,exports.FieldMapperKey=Se,exports.FieldMapperRow=Fe,exports.FieldMapperValue=Ne,exports.MultiselectDropdown=function(t){var r=M(e.useState(!1),2),i=r[0],o=r[1],a=t.label||"",l=function(e,n){"function"==typeof t.onChange&&t.onChange(e,n)},u=t.children||[];if(!Array.isArray(u)){var d=[];d.push(u),u=d}return c.default.createElement("div",{className:"multiselect-dropdown"},c.default.createElement(Q,{show:i,onClose:function(){o(!1)},ignoreClickSelector:".multiselect-dropdown-toggle",anchor:c.default.createElement("div",{className:"multiselect-dropdown-toggle"},c.default.createElement(n.Button,{onClick:function(){o(!i)}},a))},u.map((function(e){return c.default.createElement(ke,{onChange:l,checked:e.props.checked,value:e.props.value,key:e.props.value},e.props.children)}))))},exports.PipedTextInput=be,exports.PipedTextSelect=xe,exports.PluginSdkService=B,exports.Popover=Q,exports.SelectItem=ke,exports.TaskFields=function(t){var n=M(e.useState([]),2),r=n[0],i=n[1],o=M(e.useState([]),2),a=o[0],l=o[1],u=M(e.useState(),2),d=u[0],p=u[1],f=function(e,n){"function"==typeof t.onFieldSwitch&&t.onFieldSwitch(e,n)},h=function(e,n,r){"function"==typeof t.onFieldInputChange&&t.onFieldInputChange(e,n,r)},v=function(e,n){var r=s.default(t,"customFieldOptions.onCustomFieldNameChange");"function"==typeof r&&r(e,n)},x=function(e,t,n){var r=e.slice();return t.forEach((function(e){void 0!==e.subMenu&&n===e.id&&(-1===r.findIndex((function(t){return t.id===e.id}))&&r.push(e))})),r},b=function(e){"function"==typeof t.onFieldRemove&&t.onFieldRemove(e)},g=function(e){var n,r,i=[];if(void 0!==e)return Array.isArray(t.children)?n=t.children:(n=[]).push(t.children),r=[],n.forEach((function(e){e.props.required&&r.push({required:e.props.required,name:e.props.name,id:e.props.id,children:e.props.children,nameTooltip:e.props.nameTooltip,valueTooltip:e.props.valueTooltip,value:e.props.value||void 0,valuePlaceholder:e.props.valuePlaceholder,subMenu:e.props.subMenu,subMenuLabel:e.props.subMenuLabel})})),i=function(n){var r=n.slice();return(t.values||[]).forEach((function(n){var i=e.find((function(e){return e.id===n.id}));if(void 0!==i)!function(e,t,n){var r=e.find((function(e){return e.id===t.id}));if(void 0!==r)r.value=t.value;else{var i=m.default(n,(function(e){if(c.default.isValidElement(e))return c.default.cloneElement(e)}));i.value=t.value,e.push(i)}}(r,n,i);else if(t.customFieldOptions){var o={required:!1,name:n.name,id:n.id,value:n.value,nameTooltip:s.default(t,"customFieldOptions.nameTooltip",""),valueTooltip:s.default(t,"customFieldOptions.valueTooltip",""),namePlaceholder:s.default(t,"customFieldOptions.namePlaceholder",""),type:"custom",subMenu:n.subMenu,subMenuLabel:n.subMenuLabel};r.push(o)}})),r}(i=r),i=function(e,n){var r=e.slice(),i=t.values||[];return r=r.map((function(e){var t,r;return t=i.find((function(t){return t.id===e.id})),void 0===n.find((function(e){return e.props.id===t.id}))||e.required||(r=n.find((function(e){return e.props.id===t.id})),e=Object.assign({},e,{name:r.props.name,id:r.props.id,children:r.props.children,nameTooltip:r.props.nameTooltip,valueTooltip:r.props.valueTooltip,valuePlaceholder:r.props.valuePlaceholder,subMenu:r.props.subMenu,subMenuLabel:r.props.subMenuLabel})),e}))}(i,n),i},y=function(){var e=t.children.map((function(e){var t=e.props;return{required:t.required,name:t.name,id:t.id,children:t.children,nameTooltip:t.nameTooltip,valueTooltip:t.valueTooltip,valuePlaceholder:t.valuePlaceholder,subMenu:t.subMenu,subMenuLabel:t.subMenuLabel}})),n=g(e),r=e.filter((function(e){return-1===n.findIndex((function(t){return e.id===t.id}))}));p(e),i(n),l(r)};return e.useEffect((function(){y()}),[]),e.useEffect((function(){y()}),[t.values]),c.default.createElement("div",{className:"task-fields"},c.default.createElement("div",{className:"field-table",tabIndex:"0"},c.default.createElement("div",{className:"field-headers"},c.default.createElement(Ee,{itemHeaderText:t.fieldItemsHeaderText,inputHeaderText:t.fieldInputsHeaderText})),c.default.createElement("div",{className:"field-rows"},r.map((function(e){return c.default.createElement(ge,{customInput:e.children,required:e.required,fieldName:e.name,id:e.id,subMenu:e.subMenu,subMenuLabel:e.subMenuLabel,nameTooltip:"custom"===e.type?s.default(t,"customFieldOptions.nameTooltip",""):e.nameTooltip,valueTooltip:"custom"===e.type?s.default(t,"customFieldOptions.valueTooltip",""):e.valueTooltip,onFieldNameChange:v,onFieldValueChange:h,onFieldSwitch:f,onRemove:b,isCustom:"custom"===e.type,key:e.id,value:e.value,valuePlaceholder:"custom"===e.type?s.default(t,"customFieldOptions.valuePlaceholder",""):e.valuePlaceholder,customNamePlaceholder:s.default(t,"customFieldOptions.namePlaceholder",""),pipedTextItems:t.pipedTextItems,searchable:t.searchable},d&&x(a,d,e.id))})))),c.default.createElement("div",{className:"add-field-container"},c.default.createElement(we,{label:t.addFieldLabel,onFieldAdded:function(e){"function"==typeof t.onFieldAdd&&t.onFieldAdd(e)},disableAddFieldPopover:t.disableAddFieldPopover,allowCustom:t.customFieldOptions,customLabel:s.default(t,"customFieldOptions.label",""),onCustomFieldAdded:t.customFieldOptions?function(){s.default(t,"customFieldOptions.onCustomFieldAdd",(function(){}))()}:function(){}},a.map((function(e){return c.default.createElement(ye,{name:e.name,type:e.type,required:e.required,key:e.id,id:e.id,subMenu:e.subMenu,subMenuLabel:e.subMenuLabel})})))))},exports.languageCodeAdapter=function(e){var t;if(void 0===(t=_[e]))throw new Error("No language code mapping found for supplied code: '".concat(e,"'"));return t};
@@ -1,5 +1,4 @@
1
1
  export declare type FieldMapperItem<InputValue = string> = {
2
- value: string;
3
2
  label: string;
4
3
  key: string;
5
4
  required?: boolean;
@@ -1,5 +1,5 @@
1
1
  export declare type PipedTextLocator = {
2
- value: string;
2
+ locator: string;
3
3
  };
4
4
  export declare type LocalizedText = {
5
5
  emptyText: string;
@@ -7,10 +7,10 @@ export declare type LocalizedText = {
7
7
  };
8
8
  export declare type PipedTextItem = {
9
9
  label: string;
10
- locator: PipedTextLocator;
10
+ value?: PipedTextLocator;
11
11
  submenu?: {
12
12
  searchable?: boolean;
13
13
  localizedText?: LocalizedText;
14
- items: PipedTextItem[];
14
+ items?: PipedTextItem[];
15
15
  };
16
16
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@qualtrics/plugin-ui-react",
3
- "version": "1.4.0-alpha.8",
3
+ "version": "1.4.0",
4
4
  "description": "",
5
- "main": "dist/main.js",
6
- "module": "dist/main.es.js",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.es.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
9
9
  "start": "rollup -c --watch",
10
- "build": "rollup -c",
10
+ "build": "npx rimraf ./dist && rollup -c",
11
11
  "lint": "eslint '*/**/*.{js,jsx,ts,tsx}'",
12
12
  "purge": "echo 'hi'",
13
13
  "deps": "npm i --no-save @qualtrics/ui-react @qualtrics/base-styles react react-dom",
@@ -27,18 +27,25 @@
27
27
  "author": "twhited@qualtrics.com",
28
28
  "license": "LICENSE.md",
29
29
  "devDependencies": {
30
- "@babel/core": "^7.12.3",
31
- "@babel/plugin-external-helpers": "^7.12.1",
32
- "@babel/plugin-proposal-class-properties": "^7.12.1",
33
- "@babel/plugin-transform-runtime": "^7.12.1",
34
- "@babel/preset-env": "^7.12.1",
35
- "@babel/preset-react": "^7.12.1",
36
- "@babel/preset-typescript": "^7.14.5",
37
- "@qualtrics/base-styles": "^0.2.1",
38
- "@qualtrics/ui-react": "^1.60.0",
39
- "@testing-library/dom": "^7.30.3",
40
- "@testing-library/jest-dom": "^5.11.5",
41
- "@testing-library/react": "^11.1.0",
30
+ "@babel/core": "^7.19.6",
31
+ "@babel/plugin-external-helpers": "^7.18.6",
32
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
33
+ "@babel/plugin-transform-runtime": "^7.19.6",
34
+ "@babel/preset-env": "^7.19.4",
35
+ "@babel/preset-react": "^7.18.6",
36
+ "@babel/preset-typescript": "^7.18.6",
37
+ "@qualtrics/base-styles": "^0.4.0",
38
+ "@qualtrics/ui-react": "^1.105.0",
39
+ "@rollup/plugin-babel": "^6.0.2",
40
+ "@rollup/plugin-commonjs": "^23.0.2",
41
+ "@rollup/plugin-json": "^5.0.1",
42
+ "@rollup/plugin-node-resolve": "^15.0.1",
43
+ "@rollup/plugin-replace": "^5.0.1",
44
+ "@rollup/plugin-url": "^8.0.1",
45
+ "@testing-library/dom": "^8.19.0",
46
+ "@testing-library/jest-dom": "^5.16.5",
47
+ "@testing-library/react": "^12.1.5",
48
+ "@types/jest": "^29.2.0",
42
49
  "@types/lodash.clonedeep": "^4.5.7",
43
50
  "@types/lodash.get": "^4.4.6",
44
51
  "@types/react": "^17.0.11",
@@ -54,26 +61,19 @@
54
61
  "jest": "^26.6.3",
55
62
  "jest-css-modules": "^2.1.0",
56
63
  "jest-junit": "^12.0.0",
57
- "node-sass": "^6.0.1",
58
- "postcss-preset-env": "^6.7.0",
59
- "postcss-reporter": "^7.0.1",
64
+ "postcss-preset-env": "^7.8.2",
65
+ "postcss-reporter": "^7.0.5",
60
66
  "react": "^16.8.0",
61
67
  "react-dom": "^16.8.0",
62
68
  "react-test-renderer": "^16.14.0",
63
69
  "rimraf": "^3.0.2",
64
- "rollup": "^2.52.2",
65
- "rollup-plugin-babel": "^4.3.3",
66
- "rollup-plugin-commonjs": "^10.1.0",
67
- "rollup-plugin-json": "^4.0.0",
68
- "rollup-plugin-license": "^2.5.0",
69
- "rollup-plugin-node-resolve": "^5.2.0",
70
- "rollup-plugin-postcss": "^3.1.8",
71
- "rollup-plugin-replace": "^2.2.0",
70
+ "rollup": "^2.79.1",
71
+ "rollup-plugin-license": "^2.8.2",
72
+ "rollup-plugin-postcss": "^4.0.2",
72
73
  "rollup-plugin-terser": "^7.0.2",
73
- "rollup-plugin-typescript2": "^0.30.0",
74
- "rollup-plugin-url": "^2.2.2",
75
- "rollup-plugin-visualizer": "^4.1.2",
76
- "sass": "^1.32.5",
74
+ "rollup-plugin-typescript2": "^0.34.1",
75
+ "rollup-plugin-visualizer": "^5.8.3",
76
+ "sass": "^1.55.0",
77
77
  "typescript": "^4.3.4"
78
78
  },
79
79
  "peerDependencies": {
@@ -91,7 +91,7 @@
91
91
  "lodash.get": "^4.4.2",
92
92
  "react-popper": "^2.2.3",
93
93
  "regenerator-runtime": "^0.13.7",
94
- "uuid": "^3.3.2"
94
+ "uuid": "^9.0.0"
95
95
  },
96
96
  "jest": {
97
97
  "collectCoverage": true,
package/tsconfig.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
+ "outDir": "dist",
3
4
  "noImplicitAny": true,
4
5
  "sourceMap": true,
5
6
  "module": "ES2015",
@@ -26,6 +27,11 @@
26
27
  "exclude": [
27
28
  "./dist/",
28
29
  "./node_modules",
29
- "__mocks__"
30
+ "__mocks__",
31
+ "**/__mocks__/*",
32
+ "./src/**/*.test.ts",
33
+ "./src/**/*.test.js",
34
+ "./src/**/*.spec.ts",
35
+ "./src/**/*.spec.js",
30
36
  ]
31
37
  }
package/.dockerignore DELETED
@@ -1,8 +0,0 @@
1
- **/.git
2
- **/node_modules
3
- **/build
4
- **/dist
5
- **/coverage
6
- **/.nyc_output
7
- **/npm-debug.log
8
- **/yarn-error.log
package/Dockerfile DELETED
@@ -1,15 +0,0 @@
1
- FROM registry-app.eng.qops.net:5001/imported/alpine/node:16-alpine as base
2
- ARG APP
3
- ENV USER $APP
4
- ENV GROUP $APP
5
- ENV HOME /home/$USER
6
-
7
- WORKDIR $HOME
8
- ENV NODE_ENV=development
9
-
10
- RUN apk update && apk upgrade && apk --no-cache add curl
11
- RUN apk add --no-cache make
12
-
13
- COPY ./ .
14
-
15
- RUN npm ci && npm run build
package/Makefile DELETED
@@ -1,25 +0,0 @@
1
- APP = plugin-ui-react
2
- IMAGE = $(APP)-builder
3
-
4
- WORKSPACE_PATH ?= $(shell pwd)
5
- BASE_DIRECTORY = /home/$(APP)
6
- CURRENT_DIRECTORY = $(BASE_DIRECTORY)/$(DIRECTORY)
7
-
8
- RUNARGS = -w $(CURRENT_DIRECTORY) --rm
9
-
10
- build:
11
- docker build --build-arg APP=$(APP) -t $(IMAGE) -f Dockerfile .
12
-
13
- test: build
14
- docker run $(RUNARGS) -v $(WORKSPACE_PATH)/coverage/$(DIRECTORY):$(CURRENT_DIRECTORY)/coverage $(IMAGE) npm run test:trs
15
-
16
- publish: build
17
- docker run $(RUNARGS) -e INT_NPM_TOKEN $(IMAGE) npm publish --tag=$(TAG)
18
-
19
- clean:
20
- docker rmi $(IMAGE) || true
21
-
22
- .PHONY: build
23
- .PHONY: test
24
- .PHONY: publish
25
- .PHONY: clean
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export function DynamicSearchInput(props: any): JSX.Element;
@@ -1,9 +0,0 @@
1
- export class EventRegistry {
2
- constructor(isSingletonHandler: any);
3
- isSingletonHandler: boolean;
4
- handlers: any[];
5
- handler: () => void;
6
- register: (callback: any) => () => any;
7
- unregister(id: any): void;
8
- trigger(data: any): void;
9
- }
@@ -1 +0,0 @@
1
- export function languageCodeAdapter(languageCode: any): any;
@@ -1 +0,0 @@
1
- export function MultiselectDropdown(props: any): JSX.Element;
@@ -1 +0,0 @@
1
- export function SelectItem(props: any): JSX.Element;
@@ -1 +0,0 @@
1
- export function PipedTextSelect(props: any): JSX.Element;
@@ -1,5 +0,0 @@
1
- export default PluginSdkService;
2
- declare namespace PluginSdkService {
3
- export { getPluginSdkClient };
4
- }
5
- declare function getPluginSdkClient(handlers: any): any;
@@ -1 +0,0 @@
1
- export function Popover(props: any): JSX.Element;
@@ -1,10 +0,0 @@
1
- export class Portal extends Component<any, any, any> {
2
- constructor(props: any);
3
- constructor(props: any, context: any);
4
- rootSelector: HTMLElement;
5
- container: HTMLDivElement;
6
- componentDidMount(): void;
7
- componentWillUnmount(): void;
8
- render(): import("react").ReactPortal;
9
- }
10
- import { Component } from "react";
@@ -1 +0,0 @@
1
- export function FieldItem(props: any): JSX.Element;
@@ -1 +0,0 @@
1
- export function FieldRow(props: any): JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export function TaskFields(props: any): JSX.Element;
@@ -1 +0,0 @@
1
- export {};