@elyra/canvas 12.10.2 → 12.11.2

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 (205) hide show
  1. package/dist/canvas-constants-7f93e705.js +2 -0
  2. package/dist/canvas-constants-7f93e705.js.map +1 -0
  3. package/dist/canvas-constants-ac5daafb.js +2 -0
  4. package/dist/canvas-constants-ac5daafb.js.map +1 -0
  5. package/dist/canvas-controller-190542a6.js +2 -0
  6. package/dist/canvas-controller-190542a6.js.map +1 -0
  7. package/dist/canvas-controller-cbee8dd7.js +2 -0
  8. package/dist/canvas-controller-cbee8dd7.js.map +1 -0
  9. package/dist/canvas-logger-815781bb.js +2 -0
  10. package/dist/canvas-logger-815781bb.js.map +1 -0
  11. package/dist/canvas-logger-a0f1beaa.js +2 -0
  12. package/dist/canvas-logger-a0f1beaa.js.map +1 -0
  13. package/dist/common-canvas-8d2ddc6b.js +2 -0
  14. package/dist/common-canvas-8d2ddc6b.js.map +1 -0
  15. package/dist/common-canvas-e0a57cdb.js +2 -0
  16. package/dist/common-canvas-e0a57cdb.js.map +1 -0
  17. package/dist/common-canvas.es.js +1 -1
  18. package/dist/common-canvas.es.js.map +1 -1
  19. package/dist/common-canvas.js +1 -1
  20. package/dist/common-canvas.js.map +1 -1
  21. package/dist/common-properties-09ec10eb.js +2 -0
  22. package/dist/common-properties-09ec10eb.js.map +1 -0
  23. package/dist/common-properties-f1b96e0f.js +2 -0
  24. package/dist/common-properties-f1b96e0f.js.map +1 -0
  25. package/dist/datarecord-metadata-v3-schema-bda88f2e.js +2 -0
  26. package/dist/datarecord-metadata-v3-schema-bda88f2e.js.map +1 -0
  27. package/dist/datarecord-metadata-v3-schema-d7ad05cd.js +2 -0
  28. package/dist/datarecord-metadata-v3-schema-d7ad05cd.js.map +1 -0
  29. package/dist/en-2ed89528.js +2 -0
  30. package/dist/en-2ed89528.js.map +1 -0
  31. package/dist/en-e93855cc.js +2 -0
  32. package/dist/en-e93855cc.js.map +1 -0
  33. package/dist/extends-39f57612.js +7 -0
  34. package/dist/extends-39f57612.js.map +1 -0
  35. package/dist/extends-51d9ddcc.js +7 -0
  36. package/dist/extends-51d9ddcc.js.map +1 -0
  37. package/dist/flexible-table-154a3359.js +2 -0
  38. package/dist/flexible-table-154a3359.js.map +1 -0
  39. package/dist/flexible-table-5e4a1e6d.js +2 -0
  40. package/dist/flexible-table-5e4a1e6d.js.map +1 -0
  41. package/dist/icon-811ffddd.js +2 -0
  42. package/dist/icon-811ffddd.js.map +1 -0
  43. package/dist/icon-d6909a68.js +2 -0
  44. package/dist/icon-d6909a68.js.map +1 -0
  45. package/dist/index-4fd90a14.js +2 -0
  46. package/dist/index-4fd90a14.js.map +1 -0
  47. package/dist/index-6d138021.js +2 -0
  48. package/dist/index-6d138021.js.map +1 -0
  49. package/dist/isArrayLikeObject-31e5e646.js +2 -0
  50. package/dist/isArrayLikeObject-31e5e646.js.map +1 -0
  51. package/dist/isArrayLikeObject-7c33c7fd.js +2 -0
  52. package/dist/isArrayLikeObject-7c33c7fd.js.map +1 -0
  53. package/dist/lib/canvas-controller.es.js +1 -1
  54. package/dist/lib/canvas-controller.js +1 -1
  55. package/dist/lib/canvas.es.js +1 -1
  56. package/dist/lib/canvas.js +1 -1
  57. package/dist/lib/context-menu.es.js +1 -1
  58. package/dist/lib/context-menu.es.js.map +1 -1
  59. package/dist/lib/context-menu.js +1 -1
  60. package/dist/lib/context-menu.js.map +1 -1
  61. package/dist/lib/properties/field-picker.es.js +1 -1
  62. package/dist/lib/properties/field-picker.js +1 -1
  63. package/dist/lib/properties/flexible-table.es.js +1 -1
  64. package/dist/lib/properties/flexible-table.js +1 -1
  65. package/dist/lib/properties.es.js +1 -1
  66. package/dist/lib/properties.js +1 -1
  67. package/dist/lib/tooltip.es.js +1 -1
  68. package/dist/lib/tooltip.es.js.map +1 -1
  69. package/dist/lib/tooltip.js +1 -1
  70. package/dist/lib/tooltip.js.map +1 -1
  71. package/dist/styles/common-canvas.min.css +1 -1
  72. package/dist/styles/common-canvas.min.css.map +1 -1
  73. package/dist/toolbar-335252dd.js +2 -0
  74. package/dist/toolbar-335252dd.js.map +1 -0
  75. package/dist/toolbar-85e6c77b.js +2 -0
  76. package/dist/toolbar-85e6c77b.js.map +1 -0
  77. package/locales/command-actions/locales/en.json +7 -1
  78. package/locales/command-actions/locales/eo.json +7 -1
  79. package/locales/command-actions/locales/index.js +3 -1
  80. package/locales/command-actions/locales/ko.json +9 -0
  81. package/locales/common-canvas/locales/en.json +3 -0
  82. package/locales/common-canvas/locales/eo.json +3 -0
  83. package/locales/common-canvas/locales/index.js +3 -1
  84. package/locales/common-canvas/locales/ko.json +32 -0
  85. package/locales/common-properties/locales/index.js +3 -1
  86. package/locales/common-properties/locales/ko.json +93 -0
  87. package/locales/palette/locales/index.js +3 -1
  88. package/locales/palette/locales/ko.json +10 -0
  89. package/locales/toolbar/locales/index.js +3 -1
  90. package/locales/toolbar/locales/ko.json +8 -0
  91. package/package.json +2 -1
  92. package/src/color-picker/color-picker-panel.jsx +61 -0
  93. package/src/color-picker/color-picker.jsx +37 -0
  94. package/src/color-picker/color-picker.scss +46 -0
  95. package/src/command-actions/colorSelectedObjectsAction.js +72 -0
  96. package/src/command-actions/deleteObjectsAction.js +16 -11
  97. package/src/command-actions/pasteAction.js +50 -21
  98. package/src/common-canvas/canvas-controller.js +32 -5
  99. package/src/common-canvas/cc-bottom-panel.jsx +15 -9
  100. package/src/common-canvas/cc-contents.jsx +115 -8
  101. package/src/common-canvas/cc-toolbar.jsx +7 -6
  102. package/src/common-canvas/common-canvas-utils.js +73 -90
  103. package/src/common-canvas/common-canvas.scss +5 -5
  104. package/src/common-canvas/constants/canvas-constants.js +17 -16
  105. package/src/common-canvas/label-util.js +1 -1
  106. package/src/common-canvas/svg-canvas-d3.js +20 -107
  107. package/src/common-canvas/svg-canvas-d3.scss +66 -4
  108. package/src/common-canvas/svg-canvas-pipeline.js +201 -0
  109. package/src/common-canvas/svg-canvas-renderer.js +325 -339
  110. package/src/common-canvas/svg-canvas-utils-links.js +3 -3
  111. package/src/common-canvas/svg-canvas-utils-nodes.js +22 -44
  112. package/src/common-properties/actions.js +4 -0
  113. package/src/common-properties/components/field-picker/field-picker.jsx +33 -36
  114. package/src/common-properties/components/field-picker/field-picker.scss +20 -23
  115. package/src/common-properties/components/flexible-table/flexible-table.jsx +46 -31
  116. package/src/common-properties/components/flexible-table/flexible-table.scss +14 -17
  117. package/src/common-properties/components/properties-buttons/properties-buttons.jsx +28 -21
  118. package/src/common-properties/components/table-buttons/table-buttons.jsx +3 -1
  119. package/src/common-properties/components/table-buttons/table-buttons.scss +8 -8
  120. package/src/common-properties/components/title-editor/title-editor.jsx +31 -4
  121. package/src/common-properties/components/title-editor/title-editor.scss +30 -5
  122. package/src/common-properties/components/virtualized-table/virtualized-table.jsx +119 -27
  123. package/src/common-properties/components/virtualized-table/virtualized-table.scss +72 -8
  124. package/src/common-properties/constants/constants.js +5 -1
  125. package/src/common-properties/constants/form-constants.js +1 -0
  126. package/src/common-properties/controls/abstract-table.jsx +12 -11
  127. package/src/common-properties/controls/abstract-table.scss +6 -2
  128. package/src/common-properties/controls/dropdown/dropdown.scss +4 -0
  129. package/src/common-properties/controls/expression/expression-builder/expression-select-field-function.jsx +2 -2
  130. package/src/common-properties/controls/expression/expression.scss +1 -1
  131. package/src/common-properties/controls/passwordfield/passwordfield.jsx +2 -2
  132. package/src/common-properties/controls/readonlytable/readonlytable.jsx +4 -2
  133. package/src/common-properties/controls/selectcolumns/selectcolumns.scss +0 -19
  134. package/src/common-properties/controls/someofselect/someofselect.scss +2 -2
  135. package/src/common-properties/form/ControlInfo.js +8 -0
  136. package/src/common-properties/form/EditorForm.js +4 -0
  137. package/src/common-properties/form/ParameterInfo.js +4 -0
  138. package/src/common-properties/panels/sub-panel/cell.jsx +18 -23
  139. package/src/common-properties/panels/sub-panel/sub-panel.scss +5 -22
  140. package/src/common-properties/properties-controller.js +18 -0
  141. package/src/common-properties/properties-main/properties-main.jsx +15 -9
  142. package/src/common-properties/properties-main/properties-main.scss +9 -2
  143. package/src/common-properties/properties-store.js +27 -1
  144. package/src/common-properties/reducers/properties-settings.js +17 -1
  145. package/src/context-menu/common-context-menu.jsx +74 -29
  146. package/src/context-menu/context-menu-wrapper.jsx +2 -2
  147. package/src/icons/icon.jsx +5 -46
  148. package/src/index.scss +1 -0
  149. package/src/object-model/api-pipeline.js +18 -7
  150. package/src/object-model/object-model.js +27 -3
  151. package/src/object-model/redux/reducers/canvasinfo.js +36 -0
  152. package/src/object-model/redux/reducers/comments.js +58 -10
  153. package/src/object-model/redux/reducers/externalpipelineflows.js +1 -0
  154. package/src/object-model/redux/reducers/links.js +9 -7
  155. package/src/object-model/redux/reducers/selectioninfo.js +2 -1
  156. package/src/palette/palette-content-list-item.jsx +8 -1
  157. package/src/palette/palette-dialog-content-grid-node.jsx +8 -1
  158. package/src/toolbar/toolbar-action-item.jsx +75 -11
  159. package/src/toolbar/toolbar-overflow-item.jsx +2 -3
  160. package/src/tooltip/tooltip.jsx +4 -1
  161. package/stats.html +1 -1
  162. package/dist/canvas-constants-af93267a.js +0 -2
  163. package/dist/canvas-constants-af93267a.js.map +0 -1
  164. package/dist/canvas-constants-ffce3b78.js +0 -2
  165. package/dist/canvas-constants-ffce3b78.js.map +0 -1
  166. package/dist/canvas-controller-3f67c4fb.js +0 -2
  167. package/dist/canvas-controller-3f67c4fb.js.map +0 -1
  168. package/dist/canvas-controller-cee447d2.js +0 -2
  169. package/dist/canvas-controller-cee447d2.js.map +0 -1
  170. package/dist/common-canvas-e212a9c1.js +0 -2
  171. package/dist/common-canvas-e212a9c1.js.map +0 -1
  172. package/dist/common-canvas-e98191b3.js +0 -2
  173. package/dist/common-canvas-e98191b3.js.map +0 -1
  174. package/dist/common-properties-653e50e3.js +0 -2
  175. package/dist/common-properties-653e50e3.js.map +0 -1
  176. package/dist/common-properties-e2c6def7.js +0 -2
  177. package/dist/common-properties-e2c6def7.js.map +0 -1
  178. package/dist/datarecord-metadata-v3-schema-10ddafaf.js +0 -2
  179. package/dist/datarecord-metadata-v3-schema-10ddafaf.js.map +0 -1
  180. package/dist/datarecord-metadata-v3-schema-1504c843.js +0 -2
  181. package/dist/datarecord-metadata-v3-schema-1504c843.js.map +0 -1
  182. package/dist/en-517f38fc.js +0 -2
  183. package/dist/en-517f38fc.js.map +0 -1
  184. package/dist/en-dc6f2e9f.js +0 -2
  185. package/dist/en-dc6f2e9f.js.map +0 -1
  186. package/dist/extends-5a45f92e.js +0 -7
  187. package/dist/extends-5a45f92e.js.map +0 -1
  188. package/dist/extends-a52336ca.js +0 -8
  189. package/dist/extends-a52336ca.js.map +0 -1
  190. package/dist/flexible-table-e6ccbe58.js +0 -2
  191. package/dist/flexible-table-e6ccbe58.js.map +0 -1
  192. package/dist/flexible-table-f60c1680.js +0 -2
  193. package/dist/flexible-table-f60c1680.js.map +0 -1
  194. package/dist/index-567978da.js +0 -2
  195. package/dist/index-567978da.js.map +0 -1
  196. package/dist/index-59486e9a.js +0 -2
  197. package/dist/index-59486e9a.js.map +0 -1
  198. package/dist/isEmpty-def8f509.js +0 -2
  199. package/dist/isEmpty-def8f509.js.map +0 -1
  200. package/dist/isEmpty-e171b734.js +0 -2
  201. package/dist/isEmpty-e171b734.js.map +0 -1
  202. package/dist/toolbar-404bf690.js +0 -2
  203. package/dist/toolbar-404bf690.js.map +0 -1
  204. package/dist/toolbar-611d8ab9.js +0 -2
  205. package/dist/toolbar-611d8ab9.js.map +0 -1
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("./createClass-6db89a23.js"),t=require("./getPrototypeOf-0bf77a9e.js"),r=require("react"),o=require("./index-59486e9a.js"),n=require("./en-517f38fc.js"),a=require("./datarecord-metadata-v3-schema-10ddafaf.js"),i=require("./isEmpty-e171b734.js"),s=require("carbon-components-react"),l=require("./extends-a52336ca.js"),u=require("react-portal"),c=require("react-redux"),p=require("@carbon/icons-react"),d=require("react-dom"),f=require("uuid"),h=require("./lib/tooltip.js"),m=require("redux"),y=require("seedrandom"),v=require("./lib/command-stack.js"),g=require("react-intl"),b=require("date-fns"),E=require("react-inlinesvg"),_=require("prop-types"),S=require("./toolbar-611d8ab9.js"),T=require("./flexible-table-e6ccbe58.js"),I=require("react-codemirror2"),C=require("jsonschema");function R(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var A=R(r),k=R(d),w=R(y),O=R(E),P=R(_),N=n._baseGet,L=a._baseSet,D=i._castPath;var M=function(e,t,r){for(var o=-1,n=t.length,a={};++o<n;){var i=t[o],s=N(e,i);r(s,i)&&L(a,D(i,e),s)}return a},x=o.hasIn_1;var B=function(e,t){return M(e,t,(function(t,r){return x(e,r)}))},F=n._baseFlatten;var V=function(e){return(null==e?0:e.length)?F(e,1):[]},U=n._overRest,j=n._setToString;var z=function(e){return j(U(e,void 0,V),e+"")},H=B,G=z((function(e,t){return null==e?{}:H(e,t)}));var q=function(e,t,r){var o=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(r=r>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(n);++o<n;)a[o]=e[o+t];return a},Y=n._baseGet,K=q;var W=function(e,t){return t.length<2?e:Y(e,K(t,0,-1))},$=i._castPath,X=a.last_1,J=W,Z=i._toKey;var Q=function(e,t){return t=$(t,e),null==(e=J(e,t))||delete e[Z(X(t))]},ee=i._baseGetTag,te=n._getPrototype,re=i.isObjectLike_1,oe=Function.prototype,ne=Object.prototype,ae=oe.toString,ie=ne.hasOwnProperty,se=ae.call(Object);var le=function(e){if(!re(e)||"[object Object]"!=ee(e))return!1;var t=te(e);if(null===t)return!0;var r=ie.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ae.call(r)==se};var ue=function(e){return le(e)?void 0:e},ce=i._arrayMap,pe=n._baseClone,de=Q,fe=i._castPath,he=n._copyObject,me=ue,ye=z,ve=n._getAllKeysIn,ge=ye((function(e,t){var r={};if(null==e)return r;var o=!1;t=ce(t,(function(t){return t=fe(t,e),o||(o=t.length>1),t})),he(e,ve(e),r),o&&(r=pe(r,7,me));for(var n=t.length;n--;)de(r,t[n]);return r}));function be(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ee=function(r){t._inherits(a,r);var n=be(a);function a(){return e._classCallCheck(this,a),n.apply(this,arguments)}return e._createClass(a,[{key:"getCarbonModalSize",value:function(){switch(this.props.bsSize){case o.Size.SMALL:return l.CARBON_MODAL_SIZE_XSMALL;case o.Size.LARGE:return l.CARBON_MODAL_SIZE_LARGE;case o.Size.MEDIUM:default:return l.CARBON_MODAL_SIZE_SMALL}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return A.default.createElement(u.Portal,null,A.default.createElement(s.Modal,{className:l.classNames("properties-modal",{noButtons:!1===this.props.showPropertiesButtons}),open:!0,modalHeading:this.props.title,primaryButtonText:this.props.applyLabel,secondaryButtonText:this.props.rejectLabel,onRequestSubmit:this.props.okHandler,onSecondarySubmit:this.props.cancelHandler,"aria-label":"",size:e},A.default.createElement("div",{className:"properties-modal-children"},this.props.children)))}}]),a}(r.Component),_e=Ee;function Se(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Te=function(r){t._inherits(a,r);var n=Se(a);function a(){return e._classCallCheck(this,a),n.apply(this,arguments)}return e._createClass(a,[{key:"render",value:function(){var e="properties-editing properties-"+(void 0===this.props.bsSize?"large":this.props.bsSize),t=A.default.createElement(o.PropertiesButtons,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons});return A.default.createElement("div",{className:e},A.default.createElement("h2",null,this.props.title),A.default.createElement("div",{className:"properties-body"},this.props.children),t)}}]),a}(r.Component),Ie=Te;function Ce(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Re=function(r){t._inherits(a,r);var n=Ce(a);function a(){return e._classCallCheck(this,a),n.apply(this,arguments)}return e._createClass(a,[{key:"shouldEnabledSaveButton",value:function(){return!!this.props.saveButtonEnabled&&(!this.props.disableSaveOnRequiredErrors||0===Object.keys(this.props.requiredErrorMessages).length)}},{key:"render",value:function(){var e=this.shouldEnabledSaveButton();return A.default.createElement(o.PropertiesButtons,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,showPropertiesButtons:this.props.showPropertiesButtons,applyButtonEnabled:e})}}]),a}(r.Component);Re.defaultProps={saveButtonEnabled:!0};var Ae=c.connect((function(e,t){return{saveButtonEnabled:!t.controller.getSaveButtonDisable(),requiredErrorMessages:t.controller.getRequiredErrorMessages()}}),null)(Re);function ke(e){return{type:"SET_TITLE",title:e}}function we(e){return{type:"SET_ACTIVE_TAB",activeTab:e}}function Oe(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Pe=function(r){t._inherits(n,r);var o=Oe(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){var e=this.props.panel;return void 0===e&&(e=A.default.createElement("div",{className:"properties-control-panel"})),e}}]),n}(A.default.Component),Ne=c.connect((function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}}),null)(Pe);function Le(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var De=function(r){t._inherits(a,r);var n=Le(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).state={style:{height:0}},o.updateDimensions=o.updateDimensions.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"updateDimensions",value:function(){if(this.wideFlyout&&(this.commonPropertiesParent||(this.commonPropertiesParent=this.findPropertyWrapper(this.wideFlyout)),this.commonPropertiesParent)){var e=k.default.findDOMNode(this.commonPropertiesParent).getBoundingClientRect();this.setState({style:{height:e.height+"px",top:e.top+"px"}})}}},{key:"findPropertyWrapper",value:function(e){return e&&e.parentNode&&e.parentNode.className&&e.parentNode.className.includes("properties-right-flyout")?e.parentNode:e&&e.parentNode?this.findPropertyWrapper(e.parentNode):null}},{key:"render",value:function(){var e,t,r,n=this,a=A.default.createElement("div",{className:l.classNames("properties-wf-overlay",{show:this.props.show})});return this.props.show&&(this.props.title&&(e=A.default.createElement("div",{className:"properties-wf-title"},this.props.title)),t=A.default.createElement(o.PropertiesButtons,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,showPropertiesButtons:this.props.showPropertiesButtons,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel}),r=A.default.createElement("div",{className:"properties-wf-children"}," ",this.props.children," ")),A.default.createElement("div",{className:"properties-wf-modal",ref:function(e){return n.wideFlyout=e}},A.default.createElement(u.Portal,{node:this.commonPropertiesParent},a,A.default.createElement("div",{className:l.classNames("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}]),a}(r.Component);De.defaultProps={show:!1};var Me=De;function xe(e,t){var r=t||f.v4();return"".concat(Be(e),"-").concat(r)}function Be(e){var t=e.name;return void 0!==e.row?(t+="_"+e.row,void 0!==e.col&&(t+="_"+e.col)):void 0!==e.col&&(t+="_"+e.col),"properties-"+t}function Fe(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function Ve(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function Ue(e,t){var r=!1;if(Array.isArray(e)){if(0===e.length)return{value:"",truncated:r};var o="";return e.forEach((function(n,a){var i=je(n),s=a===e.length-1?"":t;o+=i+s,r||(r=i.length!==n.length)})),{value:o,truncated:r}}return{value:e,truncated:r}}function je(e){return e.length>l.TRUNCATE_LIMIT?e.substring(0,l.TRUNCATE_LIMIT)+"...":e}function ze(e,t){var r={};return!e||t||("error"===e.type?(r.invalid=!0,r.invalidText=e.text):"warning"===e.type&&(r.warn=!0,r.warnText=e.text)),r}function He(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ge(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function qe(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ye=function(r){t._inherits(a,r);var n=qe(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).state={showWideFlyout:!1},o.handleLinkClicked=o.handleLinkClicked.bind(t._assertThisInitialized(o)),o.hideWideFlyout=o.hideWideFlyout.bind(t._assertThisInitialized(o)),o.cancelWideFlyout=o.cancelWideFlyout.bind(t._assertThisInitialized(o)),o._getSummaryTables=o._getSummaryTables.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"_onMouseMove",value:function(e){this.setState({mousePos:{x:e.clientX,y:e.clientY}})}},{key:"hideWideFlyout",value:function(){this.props.controller.setIsSummaryPanelShowing(!1),this.setState({showWideFlyout:!1}),this.props.controller.clearSelectedRows()}},{key:"cancelWideFlyout",value:function(){this.props.controller.setPropertyValues(this.initialControlValues),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates),this.hideWideFlyout()}},{key:"handleLinkClicked",value:function(){this.props.children&&(this.props.controller.setIsSummaryPanelShowing(!0),this.setState({showWideFlyout:!0})),this.initialControlValues=this.props.controller.getPropertyValues(),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates()}},{key:"_getSummaryTables",value:function(){var e=[],t=this.props.controller.getSummaryPanelControls(this.props.panel.id);if(!Array.isArray(t))return e;var r,n=He(t);try{for(n.s();!(r=n.n()).done;){var a=r.value,i={name:a},s=this.props.controller.getControl(i),u=this.props.controller.getPropertyValue(i,{filterHiddenDisabled:!0}),c=this.props.controller.getCustPropSumPanelValue(i),p=!1;null!=c&&(u=c.value,s.summaryLabel=c.label,p=!0);var d=[];if(Array.isArray(u)){var m=0;if(s.subControls)for(var y=0;y<s.subControls.length;y++){var v={name:i.name,col:y};(this.props.controller.isSummary(v)||p)&&m++}else s.summary&&(m=1);for(var g=0!==m?"calc((100% / "+m+") - 2px)":"100%",b=0;b<u.length;b++){var E=u[b],_=[];if(Array.isArray(E))for(var S=0;S<E.length;S++){var T={name:i.name,col:S};if(this.props.controller.isSummary(T)||p){var I=this._getSummaryDisplayValue(E[S],T),C=void 0===I?"":JSON.stringify(I).replace('"',"").replace(new RegExp('"',"g"),"")+" ";_.push(A.default.createElement("td",{key:"summary-table-data-"+S,className:"properties-summary-row-data ",style:{width:g},onMouseMove:this._onMouseMove.bind(this)},A.default.createElement(h,{id:f.v4(),tip:C,mousePos:this.state.mousePos,showToolTipIfTruncated:!0},A.default.createElement("span",{id:"span_"+f.v4()},C))))}}else if(this.props.controller.isSummary(i)||p){var R=this._getSummaryDisplayValue(E,i);_.push(A.default.createElement("td",{key:"summary-table-row-data-"+b,className:"properties-summary-row-data "},A.default.createElement(h,{id:f.v4(),tip:R,mousePos:this.state.mousePos,showToolTipIfTruncated:!0},A.default.createElement("span",{id:"span_"+f.v4()},R))))}_.length>0&&d.push(A.default.createElement("tr",{key:"summary-table-row-"+b,className:"properties-summary-row"},_))}}else if(u&&(this.props.controller.isSummary(i)||p)){var k=this._getSummaryDisplayValue(u,i);d.push(A.default.createElement("tr",{key:"summary-row-"+a,className:"properties-summary-row"},A.default.createElement("td",{key:"summary-table-row-data-"+a,className:"properties-summary-rows-data"},k)))}if(d.length>0){var w=A.default.createElement("table",{role:"presentation",key:"summary-table-"+a,className:"properties-summary-table"},A.default.createElement("tbody",{key:"summary-body-"+a},d));if(d.length>10){var O=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.LONG_TABLE_SUMMARY_PLACEHOLDER);w=A.default.createElement("div",{className:"properties-summary-table"},A.default.createElement("span",null,O))}e.push(A.default.createElement("div",{key:"summary-container-"+a,className:"properties-summary-values"},A.default.createElement("span",{key:"summary-text-"+a,className:"properties-summary-label"},s.summaryLabel),w))}}}catch(e){n.e(e)}finally{n.f()}return e}},{key:"_getSummaryDisplayValue",value:function(e,t){var r=e,n=this.props.controller.getControl(t);if(n.values&&n.valueLabels){var a=n.values.indexOf(e);a>-1&&n.valueLabels[a]&&(r=n.valueLabels[a])}return"object"===o.toType(r)&&(r=n.valueDef.propType===o.Type.STRUCTURE&&n.role===o.ParamRole.COLUMN?o.stringifyFieldValue(e,n):JSON.stringify(r)),r}},{key:"_getSummaryIconState",value:function(){var e=this,t=this.props.controller.getSummaryPanelControls(this.props.panel.id),r={},n=0,a=0;if(Array.isArray(t)&&t.forEach((function(t){var o=e.props.controller.getErrorMessage({name:t},!0);i.isEmpty_1(o)||(o.type===l.CONDITION_MESSAGE_TYPE.WARNING&&(a+=1),o.type===l.CONDITION_MESSAGE_TYPE.ERROR&&(n+=1)),i.isEmpty_1(o)||i.isEmpty_1(r)&&"error"===r.type||(r=o)})),!i.isEmpty_1(r)){var s="";return n>0&&0===a?s=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.CONTROL_SUMMARY_ERROR,{errorMsgCount:n}):n>0&&a>0?s=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:n,warningMsgCount:a}):0===n&&a>0&&(s=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.CONTROL_SUMMARY_WARNING,{warningMsgCount:a})),A.default.createElement(h,{id:f.v4()+"summary-icon",tip:s,className:"properties-tooltips"},A.default.createElement(l.Icon,{type:r.type,className:"properties-summary-link-icon ".concat(r.type)}))}return null}},{key:"render",value:function(){var e=this._getSummaryIconState(),t=A.default.createElement("div",{className:"properties-summary-link-container"},A.default.createElement(s.Button,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"small",kind:"ghost",renderIcon:p.Add16},this.props.panel.label),e),r=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.APPLYBUTTON_LABEL),n=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.REJECTBUTTON_LABEL),a=this.state.showWideFlyout?A.default.createElement(Me,{cancelHandler:this.cancelWideFlyout,okHandler:this.hideWideFlyout,show:!0,applyLabel:r,rejectLabel:n,title:this.props.panel.label,light:this.props.controller.getLight()},A.default.createElement("div",null,this.props.children)):A.default.createElement("div",null),i=this.props.panel.className?this.props.panel.className:"",u=l.classNames("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===l.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return A.default.createElement("div",{className:u,disabled:this.props.panelState===l.STATES.DISABLED,"data-id":Be({name:this.props.panel.id})},a,t,this._getSummaryTables())}}]),a}(A.default.Component),Ke=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Ye);function We(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var $e=function(r){t._inherits(n,r);var o=We(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"",t=this.props.panelState===l.STATES.DISABLED;return A.default.createElement("div",{className:l.classNames("properties-twisty-panel",{hide:this.props.panelState===l.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":Be({name:this.props.panel.id})},A.default.createElement(s.Accordion,{disabled:t},A.default.createElement(s.AccordionItem,{disabled:t,open:this.props.panel.open,title:this.props.panel.label},this.props.children)))}}]),n}(A.default.Component),Xe=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)($e);function Je(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ze=function(r){t._inherits(n,r);var o=Je(n);function n(r){var a;return e._classCallCheck(this,n),(a=o.call(this,r)).state={panel:null,title:null,hideHandler:null,subPanelVisible:!1},a.showSubDialog=a.showSubDialog.bind(t._assertThisInitialized(a)),a.hideSubDialog=a.hideSubDialog.bind(t._assertThisInitialized(a)),a}return e._createClass(n,[{key:"showSubDialog",value:function(e,t,r){this.props.controller.increaseVisibleSubPanelCounter(),this.setState({panel:t,title:e,hideHandler:r,subPanelVisible:!0})}},{key:"hideSubDialog",value:function(e){this.props.controller.decreaseVisibleSubPanelCounter(),this.state.hideHandler(e),this.setState({panel:null,title:null,hideHandler:null,subPanelVisible:!1})}},{key:"render",value:function(){var e=[];return this.state.subPanelVisible&&!this.props.rightFlyout?e=A.default.createElement(_e,{title:this.state.title,okHandler:this.hideSubDialog.bind(this,!0),cancelHandler:this.hideSubDialog.bind(this,!1),applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel},this.state.panel):this.props.rightFlyout&&this.state.subPanelVisible&&(e=A.default.createElement(Me,{cancelHandler:this.hideSubDialog.bind(this,!1),okHandler:this.hideSubDialog.bind(this,!0),show:!0,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,title:this.state.title,light:this.props.controller.getLight()},A.default.createElement("div",null,this.state.panel))),A.default.createElement("div",null,e,this.props.children)}}]),n}(A.default.Component);function Qe(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}Ze.defaultProps={rightFlyout:!1};var et=function(r){t._inherits(a,r);var n=Qe(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).showSubPanel=o.showSubPanel.bind(t._assertThisInitialized(o)),o.onSubPanelHidden=o.onSubPanelHidden.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"onSubPanelHidden",value:function(e){o.logger.info("onSubPanelHidden(): applyChanges="+e)}},{key:"showSubPanel",value:function(){this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.APPLYBUTTON_LABEL),r=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.REJECTBUTTON_LABEL),n=A.default.createElement(s.Button,{className:"properties-subpanel-button",type:"button",small:!0,kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return A.default.createElement(Ze,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},n)}}]),a}(A.default.Component);function tt(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var rt=function(r){t._inherits(n,r);var o=tt(n);function n(t){var r;e._classCallCheck(this,n),r=o.call(this,t);var a="";return t.children.forEach((function(e,t){0===t?a="1fr":a+=" 1fr"})),r.style={gridTemplateColumns:a},r}return e._createClass(n,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return A.default.createElement("div",{className:l.classNames("properties-column-panel",{hide:this.props.panelState===l.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===l.STATES.DISABLED,"data-id":Be({name:this.props.panel.id}),style:this.style},this.props.children)}}]),n}(A.default.Component),ot=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(rt);function nt(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var at=function(r){t._inherits(n,r);var o=nt(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return this.props.children.length>0?A.default.createElement("div",{className:l.classNames("properties-control-panel",{hide:this.props.panelState===l.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===l.STATES.DISABLED,"data-id":Be({name:this.props.panel.id})},this.props.children):null}}]),n}(A.default.Component),it=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(at);function st(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var lt=function(r){t._inherits(n,r);var o=st(n);function n(t){var r;return e._classCallCheck(this,n),(r=o.call(this,t)).state={activeTabId:""},r}return e._createClass(n,[{key:"onClick",value:function(e){this.setState({activeTabId:e})}},{key:"render",value:function(){for(var e=[],t=0,r=0,o=this.props.className?this.props.className:"",n=0;n<this.props.tabs.length;n++){var a=this.props.tabs[n],i=this.props.controller.getPanelState({name:a.group});if(i!==l.STATES.HIDDEN){var u=this.props.genUIItem(n,a.content);this.state.activeTabId===a.group&&i!==l.STATES.DISABLED&&(t=r),e.push(A.default.createElement(s.Tab,{key:"subtabs.tab."+n,disabled:i===l.STATES.DISABLED,className:"properties-subtab",tabIndex:r,label:a.text,onClick:this.onClick.bind(this,a.group),"data-id":Be({name:a.group})},u)),r++}}return A.default.createElement("div",{className:l.classNames("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},o)},A.default.createElement(s.Tabs,{className:"properties-subtabs",selected:t,light:this.props.controller.getLight()},e))}}]),n}(A.default.Component);function ut(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ct=function(r){t._inherits(a,r);var n=ut(a);function a(){return e._classCallCheck(this,a),n.apply(this,arguments)}return e._createClass(a,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"",t=this.props.panel.label?A.default.createElement("div",{className:"panel-label"},this.props.panel.label):null,r=this.props.panel.description?A.default.createElement("div",{className:"panel-description"},o.evaluateText(this.props.panel.description,this.props.controller)):null;return A.default.createElement("div",{className:l.classNames("properties-text-panel",{hide:this.props.panelState===l.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===l.STATES.DISABLED},t,r)}}]),a}(r.Component),pt=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}}),null)(ct);function dt(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ft=function(r){t._inherits(n,r);var o=dt(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){var e=this.props.panel.className?this.props.panel.className:"";return A.default.createElement("div",{className:l.classNames("properties-action-panel",{hide:this.props.panelState===l.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":Be({name:this.props.panel.id}),disabled:this.props.panelState===l.STATES.DISABLED},this.props.children)}}]),n}(r.Component),ht=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(ft);function mt(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var yt=function(r){t._inherits(n,r);var o=mt(n);function n(r){var a;return e._classCallCheck(this,n),(a=o.call(this,r)).state={},a.applyAction=a.applyAction.bind(t._assertThisInitialized(a)),a.uuid=f.v4(),a}return e._createClass(n,[{key:"applyAction",value:function(){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}},{key:"render",value:function(){var e=l.classNames("properties-action-button",{hide:this.props.state===l.STATES.HIDDEN}),t=this.props.state===l.STATES.DISABLED,r=A.default.createElement("div",{className:e,"data-id":this.props.action.name},A.default.createElement(s.Button,{type:"button",size:"small",kind:"tertiary",onClick:this.applyAction,disabled:t},this.props.action.label.text)),o=r;if(this.props.action.description){var n=this.uuid+"-tooltip-action-"+this.props.action.name,a=A.default.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);o=A.default.createElement(h,{id:n,tip:a,direction:"bottom",className:"properties-tooltips",disable:t},r)}return o}}]),n}(A.default.Component),vt=c.connect((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(yt);function gt(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var bt=function(r){t._inherits(n,r);var o=gt(n);function n(r){var a;return e._classCallCheck(this,n),(a=o.call(this,r)).state={},a.applyAction=a.applyAction.bind(t._assertThisInitialized(a)),a.uuid=f.v4(),a}return e._createClass(n,[{key:"applyAction",value:function(){if(this.props.state!==l.STATES.DISABLED){var e=this.props.controller.getHandlers().actionHandler;"function"==typeof e&&e(this.props.action.name,this.props.controller.getAppData(),this.props.action.data)}}},{key:"render",value:function(){var e={},t={};this.props.action.image.size&&(e=this.props.action.image.size.height?{height:this.props.action.image.size.height}:{},t=this.props.action.image.size.width?{width:this.props.action.image.size.width}:{});var r=this.props.state===l.STATES.DISABLED,o=l.classNames("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===l.STATES.HIDDEN},{disabled:r}),n=A.default.createElement("div",{"data-id":this.props.action.name},A.default.createElement("img",l._extends({src:this.props.action.image.url,onClick:this.applyAction},e,t))),a=n;if(this.props.action.description){var i=this.uuid+"-tooltip-action-"+this.props.action.name,s=A.default.createElement("div",{className:"properties-tooltips"},this.props.action.description.text),u=this.props.action.image.tooltip_direction&&["left","right","top","bottom"].includes(this.props.action.image.tooltip_direction.toLowerCase())?this.props.action.image.tooltip_direction.toLowerCase():"bottom";a=A.default.createElement(h,{id:i,tip:s,direction:u,className:"properties-tooltips",disable:r},n)}return A.default.createElement("div",{className:o},a)}}]),n}(A.default.Component),Et=c.connect((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(bt),_t=function(){function t(r){e._classCallCheck(this,t),this.controller=r}return e._createClass(t,[{key:"generateAction",value:function(e,t){if(t){if("button"===t.actionType)return A.default.createElement(vt,{key:"action."+e,action:t,controller:this.controller});if("image"===t.actionType)return A.default.createElement(Et,{key:"action."+e,action:t,controller:this.controller})}return null}}]),t}();function St(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Tt(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function It(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ct=function(r){t._inherits(u,r);var a=It(u);function u(r){var o;return e._classCallCheck(this,u),(o=a.call(this,r)).state={showFieldPicker:!1},o.genPanel=o.genPanel.bind(t._assertThisInitialized(o)),o.genUIContent=o.genUIContent.bind(t._assertThisInitialized(o)),o.genUIItem=o.genUIItem.bind(t._assertThisInitialized(o)),o._getGroupedMessages=o._getGroupedMessages.bind(t._assertThisInitialized(o)),o.closeFieldPicker=o.closeFieldPicker.bind(t._assertThisInitialized(o)),o.openFieldPicker=o.openFieldPicker.bind(t._assertThisInitialized(o)),o.generateSharedControlNames=o.generateSharedControlNames.bind(t._assertThisInitialized(o)),o.messages=o._getGroupedMessages(r.messages),o.ControlFactory=r.controller.getControlFactory(),o.ControlFactory.setFunctions(o.openFieldPicker,o.genUIItem),o.ControlFactory.setRightFlyout(r.rightFlyout),o.actionFactory=new _t(o.props.controller),o}return e._createClass(u,[{key:"shouldComponentUpdate",value:function(e,t){return this.props.controller.isSummaryPanelShowing()||this.props.controller.isSubPanelsShowing()||(this.messages=this._getGroupedMessages(e.messages)),!0}},{key:"_getMessageCountForCategory",value:function(e){var t=this;if("alertMsgs"===e.group)return" ("+this.messages.length+")";var r=0;return this.messages.forEach((function(o){var n=t.props.controller.getControl({name:o.id_ref});n&&n.parentCategoryId===e.group&&r++})),r>0?" ("+r+")":null}},{key:"_getGroupedMessages",value:function(e){return i.isEmpty_1(e)?[]:o.sortBy_1(e,["type"])}},{key:"_getTabId",value:function(e){return e.group}},{key:"_showCategoryPanel",value:function(e){var t=e;this.props.activeTab===e&&(t=""),this.props.setActiveTab(t)}},{key:"_handleMessageClick",value:function(e,t){var r=this.props.controller.getControl(e);this.props.setActiveTab(r.parentCategoryId)}},{key:"_modalTabsOnClick",value:function(e){this.props.setActiveTab(e)}},{key:"genPrimaryTabs",value:function(e,t,r,o){for(var n=[],a=!1,i=0,u=0;u<t.length;u++){var c=t[u];0===u&&"alertMsgs"===c.group&&(a=!0);var p=this.genUIItem(this._getContainerIndex(a,u),c.content,r,o),d=null;if(this.props.additionalComponents&&(d=this.props.additionalComponents[c.group]),1===t.length)return A.default.createElement("div",{key:"cat."+e,className:"properties-category"},p,d);if(this.props.rightFlyout){var f=A.default.createElement(l.Icon,{type:l.CARBON_ICONS.CHEVRONARROWS.DOWN,className:"properties-category-caret-down"}),h=!1;this.props.activeTab===c.group&&(f=A.default.createElement(l.Icon,{type:l.CARBON_ICONS.CHEVRONARROWS.UP,className:"properties-category-caret-up"}),h=!0),n.push(A.default.createElement("div",{key:this._getContainerIndex(a,u)+"-"+e,className:"properties-category-container"},A.default.createElement("button",{type:"button",onClick:this._showCategoryPanel.bind(this,c.group),className:l.classNames("properties-category-title",{"properties-light-enabled":this.props.controller.getLight()})},c.text,this._getMessageCountForCategory(c),f),A.default.createElement("div",{className:l.classNames("properties-category-content",{show:h})},p,d)))}else this.props.activeTab===c.group&&(i=u),n.push(A.default.createElement(s.Tab,{key:this._getContainerIndex(a,u)+"-"+e,tabIndex:u,label:c.text,onClick:this._modalTabsOnClick.bind(this,c.group)},p,d))}return this.props.rightFlyout?A.default.createElement("div",{key:"cat."+e,className:"properties-categories"},n):A.default.createElement(s.Tabs,{key:"tab."+e,className:"properties-primaryTabs",selected:i,light:this.props.controller.getLight()},n)}},{key:"_getContainerIndex",value:function(e,t){return e&&0===t?"alerts":e?t-1:t}},{key:"genPanelSelector",value:function(e,t,r,o,n,a,i){var s=this.generateAdditionalPanels(t,e,o,n,!1,i);return A.default.createElement(Ne,{key:"selectorPanel"+e,panels:s,dependsOn:r,controller:this.props.controller})}},{key:"generateAdditionalPanels",value:function(e,t,r,o,n,a){for(var i={},s=0;s<e.length;s++){var u=e[s],c="properties-control-panel";u.content&&"textPanel"===u.content.itemType&&(c=""),n&&(c+=" properties-control-nested-panel"),i[u.group]=A.default.createElement("div",{className:l.classNames(c,a),key:u.group+t},this.genUIItem(s,u.content,r,o))}return i}},{key:"genUIContent",value:function(e,t,r){for(var o=[],n=0;n<e.length;n++)o.push(this.genUIItem(n,e[n],t,r));return o}},{key:"genUIItem",value:function(e,t,r,a){var i="",s=null,u="";switch(t.itemType){case"control":t.additionalItems&&t.additionalItems.length>0&&(t.control.additionalItems=t.additionalItems,t.control.optionalPanels=this.generateAdditionalPanels(t.additionalItems,e,null,a,!0));var c={name:t.control.name};if(r){var p=n.cloneDeep_1(r);return this.props.controller.updateLastChildPropertyId(p,{col:a(t.control.name)}),this.ControlFactory.createControlItem(t.control,p)}return this.ControlFactory.createControlItem(t.control,c);case"additionalLink":var d=this.genPanel(e,t.panel,r,a);return A.default.createElement(et,{key:"sub-panel-button."+e,label:t.text,title:t.secondaryText,panel:d,controller:this.props.controller,rightFlyout:this.props.rightFlyout});case"staticText":return i=l.classNames("properties-static-text",t.textType),s="info"===t.textType?A.default.createElement("div",null,A.default.createElement(l.Icon,{type:l.CARBON_ICONS.INFORMATION,className:"properties-static-text-icon-info"})):null,u=A.default.createElement("div",{className:i},o.evaluateText(t.text,this.props.controller)),A.default.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},s,u);case"linkText":return i=l.classNames("properties-link-text-container",t.textType),"warning"===t.textType?s=A.default.createElement(l.Icon,{type:l.CONDITION_MESSAGE_TYPE.WARNING}):"error"===t.textType&&(s=A.default.createElement(l.Icon,{type:l.CONDITION_MESSAGE_TYPE.ERROR})),u=A.default.createElement("a",{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},o.evaluateText(t.text,this.props.controller)),A.default.createElement("div",{key:"link-text."+e,className:i},s,u);case"hSeparator":return A.default.createElement("hr",{key:"h-separator."+e,className:"properties-h-separator"});case"panel":case"checkboxSelector":return this.genPanel(e,t.panel,r,a);case"subTabs":return A.default.createElement(lt,{key:"subtabs."+e,tabs:t.tabs,className:t.className,controller:this.props.controller,rightFlyout:this.props.rightFlyout,genUIItem:this.genUIItem,nestedPanel:t.nestedPanel});case"primaryTabs":return this.genPrimaryTabs(e,t.tabs,r,a);case"panelSelector":return this.genPanelSelector(e,t.tabs,t.dependsOn,r,a,t.id,t.className);case"customPanel":return this.generateCustomPanel(e,t.panel);case"action":return this.actionFactory.generateAction(e,t.action);case"textPanel":return t.panel?A.default.createElement(pt,{key:"text-panel-"+e,panel:t.panel,controller:this.props.controller}):A.default.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType);default:return A.default.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType)}}},{key:"generateCustomPanel",value:function(e,t){if(this.props.customPanels){var r,a=St(this.props.customPanels);try{for(a.s();!(r=a.n()).done;){var i=r.value;if(i.id()===t.id)try{return A.default.createElement("div",{className:l.classNames("properties-custom-panel",{"properties-control-nested-panel":n.get_1(t,"nestedPanel",!1)}),key:"custom."+e},new i(t.parameters,this.props.controller,t.data).renderPanel())}catch(e){return o.logger.warn("Error thrown creating custom panel: "+e),null}}}catch(e){a.e(e)}finally{a.f()}}return A.default.createElement("div",{key:"custom."+e},"Panel Not Found: ",t.id)}},{key:"generateSharedControlNames",value:function(e){var t,r=St(this.props.controller.getSharedCtrlInfo());try{for(r.s();!(t=r.n()).done;){var o=t.value;if(void 0!==o.id&&o.id===e.id)return}}catch(e){r.e(e)}finally{r.f()}var n,a=[],i=St(e.uiItems);try{for(i.s();!(n=i.n()).done;){var s=n.value;if(s.control&&s.control.name){var l=s.control.name;a.push({controlName:l})}}}catch(e){i.e(e)}finally{i.f()}this.props.controller.addSharedControls(e.id,a)}},{key:"genPanel",value:function(e,t,r,o){var n=this.genUIContent(t.uiItems,r,o),a="panel."+e;switch(t.panelType){case"columnSelection":return this.generateSharedControlNames(t),n=this.genUIContent(t.uiItems,r,o),A.default.createElement(it,{key:a,controller:this.props.controller,panel:t},n);case"summary":return this.props.rightFlyout?A.default.createElement(Ke,{key:"summary-panel-"+a,controller:this.props.controller,panel:t},n):n;case"actionPanel":return A.default.createElement(ht,{key:"action-panel-"+e,controller:this.props.controller,panel:t},n);case"twisty":return A.default.createElement(Xe,{key:a,controller:this.props.controller,panel:t},n);case"column":return A.default.createElement(ot,{key:a,controller:this.props.controller,panel:t},n);default:return A.default.createElement(it,{key:a,controller:this.props.controller,panel:t},n)}}},{key:"closeFieldPicker",value:function(e,t){this.closeFieldPickerCallback&&(this.closeFieldPickerCallback(e,t),this.closeFieldPickerCallback=null),this.props.showPropertiesButtons(!0),this.fieldPickerPropertyId=null,this.setState({showFieldPicker:!1})}},{key:"openFieldPicker",value:function(e,t){this.props.showPropertiesButtons(!1),this.fieldPickerPropertyId=e,this.closeFieldPickerCallback=t,this.setState({showFieldPicker:!0})}},{key:"fieldPicker",value:function(e){if(this.fieldPickerPropertyId&&this.fieldPickerPropertyId.name){var t,r=this.props.controller.getPropertyValue(this.fieldPickerPropertyId),n=this.props.controller.getFilteredDatasetMetadata(this.fieldPickerPropertyId),a=this.props.controller.getControl(this.fieldPickerPropertyId),i=o.getTableFieldIndex(a),s=a.subControls;-1!==i&&(t=s?s[i].dmImage:a.dmImage);var l=o.getFieldsFromControlValues(a,r);return A.default.createElement("div",{className:"properties-fp-table"},A.default.createElement(o.FieldPicker,{key:"field-picker-control",controller:this.props.controller,closeFieldPicker:this.closeFieldPicker,currentFields:l,fields:n,title:e,rightFlyout:this.props.rightFlyout,dmIcon:t}))}return A.default.createElement("div",null)}},{key:"genAlertsTab",value:function(e){var t=e.map((function(e){return{itemType:"linkText",text:e.text,textType:e.type,controlId:{name:e.id_ref}}}));return{text:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.ALERTS_TAB_TITLE),group:"alertMsgs",content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();!i.isEmpty_1(this.messages)&&"primaryTabs"===e[0].itemType&&e[0].tabs&&e[0].tabs.length>1&&(e=n.cloneDeep_1(e))[0].tabs.unshift(this.genAlertsTab(this.messages));var t=this.genUIContent(e),r=A.default.createElement("div",null),a=this.props.controller.getForm(),s=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.FIELDPICKER_SAVEBUTTON_LABEL)+" "+a.label;return this.props.rightFlyout&&this.state.showFieldPicker?r=A.default.createElement(Me,{showPropertiesButtons:!1,show:!0,title:s,light:this.props.controller.getLight()},this.fieldPicker(s)):this.state.showFieldPicker&&(t=this.fieldPicker(s)),A.default.createElement("div",{className:"properties-editor-form"},t,r)}}]),u}(A.default.Component),Rt=c.connect((function(e,t){return{activeTab:e.componentMetadataReducer.activeTab,messages:t.controller.getErrorMessages(!0,!0,!0)}}),(function(e,t){return{setActiveTab:function(t){e(we(t))}}}))(Ct),At=n._baseGet;var kt=function(e){return function(t){return null==e?void 0:At(e,t)}},wt=function(){function t(r){e._classCallCheck(this,t),this.resources=r}return e._createClass(t,[{key:"l10n",value:function(e,t){if(this.resources){var r=kt(this.resources)(e);if(r||""===r)return r}return t||e}},{key:"l10nResource",value:function(e){var t;return e&&(e.resource_key?(t=this.l10n(e.resource_key))&&t!==e.resource_key||!e.default||(t=e.default):e.default&&(t=e.default)),t}},{key:"l10nLabel",value:function(e,t){return this.l10nResource(e.label)?this.l10nResource(e.label):this.l10n(t+".label",t)}},{key:"l10nDesc",value:function(e,t){return this.l10nResource(e.description)?this.l10nResource(e.description):this.l10n(t+".desc",t)}},{key:"l10nValueLabel",value:function(e,t){var r=e+"."+t+".label";return this.l10n(r,t)}}]),t}(),Ot=function(){function t(){e._classCallCheck(this,t)}return e._createClass(t,null,[{key:"make",value:function(e){var r;return e&&((r=new t).default=e.default,r.resource_key=e.resource_key,e.placement&&(r.placement=e.placement),e.type&&(r.type=e.type)),r}}]),t}();function Pt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nt(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var Lt=function(){function t(r,o,n,a,i,s,l,u,c,p,d,f,h){e._classCallCheck(this,t),this.name=r,this.parameters=o,this.actions=n,this.type=a,this.label=Ot.make(i),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=u,this.subGroups=c,this.description=Ot.make(p),this.data=d,this.className=f,this.open=h}return e._createClass(t,[{key:"parameterNames",value:function(){return this.parameters}},{key:"actionIds",value:function(){return this.actions}},{key:"groupType",value:function(){return this.type?this.type:o.GroupType.CONTROLS}}],[{key:"makeGroup",value:function(e){if(e){var r;if(i.has_1(e,"group_info")){r=[];var o,n=Pt(e.group_info);try{for(n.s();!(o=n.n()).done;){var a=o.value,s=t.makeGroup(a);null!==s&&r.push(s)}}catch(e){n.e(e)}finally{n.f()}}return new t(kt(e)("id"),kt(e)("parameter_refs"),kt(e)("action_refs"),kt(e)("type"),kt(e)("label"),kt(e)("depends_on_ref"),kt(e)("insert_panels"),kt(e)("nested_panel"),r,kt(e)("description"),kt(e)("data"),kt(e)("class_name"),kt(e)("open"))}return null}}]),t}(),Dt=function(){function t(r){e._classCallCheck(this,t),this.groups=r}return e._createClass(t,null,[{key:"makeGroupMetadata",value:function(e,r){var n=[];if(e){var a,i=Pt(e);try{for(i.s();!(a=i.n()).done;){var s=a.value,l=Lt.makeGroup(s);null!==l&&n.push(l)}}catch(e){i.e(e)}finally{i.f()}}else n.push(new Lt(f.v4(),r,null,o.GroupType.CONTROLS));return new t(n)}}]),t}();function Mt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xt(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var Bt=e._createClass((function t(r,o,n,a,i,s){e._classCallCheck(this,t),this.name=r,this.label=o,this.description=n,this.actionType=a,this.data=i,this.image=s})),Ft=function(){function t(){e._classCallCheck(this,t)}return e._createClass(t,null,[{key:"makeActionDef",value:function(e){if(e){var r=new t;return r.id=e.id,r.label=Ot.make(e.label),r.description=Ot.make(e.description),r.control=e.control,r.data=e.data,r.image=e.image,r}return null}}]),t}(),Vt=function(){function t(r){e._classCallCheck(this,t),this.actionDefs=r}return e._createClass(t,[{key:"getAction",value:function(e){var t;return this.actionDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeActionMetadata",value:function(e){if(e){var r,o=[],n=Mt(e);try{for(n.s();!(r=n.n()).done;){var a=r.value,i=Ft.makeActionDef(a);i&&o.push(i)}}catch(e){n.e(e)}finally{n.f()}return new t(o)}return null}}]),t}();function Ut(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return jt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jt(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var zt=function(){function t(r){e._classCallCheck(this,t),r.id&&(this.name=r.id),r.label&&(this.label=Ot.make(r.label)),r.description&&(this.description=Ot.make(r.description)),r.type&&(this.type=r.type),r.role&&(this.role=r.role),r.valueRestriction&&(this.valueRestriction=r.valueRestriction),null!==r.defaultValue&&"undefined"!==o.toType(r.defaultValue)?r.defaultValue.parameter_ref?(this.defaultValue={},this.defaultValue.parameterRef=r.defaultValue.parameter_ref):this.defaultValue=r.defaultValue:void 0===r.defaultValue&&(this.isList()||this.isMapValue())&&(this.defaultValue=[]),"boolean"==typeof r.labelVisible&&(this.labelVisible=r.labelVisible),r.control&&(this.control=r.control),r.orientation&&(this.orientation=r.orientation),r.width&&(this.width=r.width),r.charLimit&&(this.charLimit=r.charLimit),r.placeHolderText&&(this.placeHolderText=Ot.make(r.placeHolderText)),r.separator&&(this.separator=r.separator),r.resource_key&&(this.resource_key=r.resource_key),"boolean"===o.toType(r.visible)?this.visible=r.visible:this.visible=!0,r.valueIcons&&(this.valueIcons=r.valueIcons),"boolean"===o.toType(r.sortable)&&(this.sortable=r.sortable),"boolean"===o.toType(r.filterable)&&(this.filterable=r.filterable),r.editStyle&&(this.editStyle=r.editStyle),"boolean"===o.toType(r.required)&&(this.required=r.required),r.numberGenerator&&(r.numberGenerator.label=Ot.make(r.numberGenerator.label),this.numberGenerator=r.numberGenerator),r.isKey&&(this.isKey=r.isKey),r.dmDefault&&(this.dmDefault=r.dmDefault),r.dmImage&&(this.dmImage=r.dmImage),r.language&&(this.language=r.language),"boolean"===o.toType(r.summary)&&(this.summary=r.summary),r.increment&&(this.increment=r.increment),r.textAfter&&(this.textAfter=Ot.make(r.textAfter)),r.textBefore&&(this.textBefore=Ot.make(r.textBefore)),"boolean"===o.toType(r.moveableRows)&&(this.moveableRows=r.moveableRows),r.generatedValues&&(this.generatedValues=r.generatedValues),r.dateFormat&&(this.dateFormat=r.dateFormat),r.timeFormat&&(this.timeFormat=r.timeFormat),r.customControlId&&(this.customControlId=r.customControlId),r.data&&(this.data=r.data),r.rows&&(this.rows=r.rows),r.displayChars&&(this.displayChars=r.displayChars),r.uionly&&(this.uionly=r.uionly),r.actionRef&&(this.actionRef=r.actionRef),"boolean"===o.toType(r.customValueAllowed)&&(this.customValueAllowed=r.customValueAllowed),r.className&&(this.className=r.className)}return e._createClass(t,[{key:"isList",value:function(){return!!this.type&&this.type.startsWith("array[")}},{key:"isMapValue",value:function(){return!!this.type&&this.type.startsWith("map[")}},{key:"isSubPanelEdit",value:function(){return this.editStyle===o.EditStyle.SUBPANEL}},{key:"isCompoundField",value:function(){return!(!this.role||!this.type)&&((this.type===o.Type.OBJECT||this.baseType()===o.Type.OBJECT)&&this.role===o.ParamRole.COLUMN)}},{key:"propType",value:function(){var e;for(var t in o.Type)this.baseType()===o.Type[t]&&(e=o.Type[t]);return e||(e=o.Type.STRUCTURE),e}},{key:"getRole",value:function(){return this.role?this.role:this.getValidValues()?o.ParamRole.ENUM:o.ParamRole.UNSPECIFIED}},{key:"baseType",value:function(){var e=this.type;return this.isList()?e.substring(6,this.type.length-1):this.isMapValue()?e.substring(e.indexOf(",")+1,this.type.length-1).trim():this.valueRestriction&&!this.type?o.Type.STRING:e}},{key:"getValidValues",value:function(){return this.valueRestriction?this.valueRestriction:this.type===o.Type.BOOLEAN?[!0,!1]:void 0}},{key:"getValidValueCount",value:function(){return this.getValidValues()?this.getValidValues().length:0}},{key:"getAdditionalText",value:function(e){return e.l10nResource(this.placeHolderText)}},{key:"getTextAfter",value:function(e){return e.l10nResource(this.textAfter)}},{key:"getTextAfterType",value:function(){return this.textAfter?this.textAfter.type:null}},{key:"getTextBefore",value:function(e){return e.l10nResource(this.textBefore)}},{key:"getTextBeforeType",value:function(){return this.textBefore?this.textBefore.type:null}},{key:"getControl",value:function(e){return this.control?this.control:e}},{key:"columns",value:function(e){return this.width?this.width:e}},{key:"separatorAfter",value:function(){return this.separator===o.Separator.AFTER}},{key:"separatorBefore",value:function(){return this.separator===o.Separator.BEFORE}}],[{key:"makeParameterDef",value:function(e,r,o){return e?new t({id:kt(e)("id"),label:kt(r)("label"),description:kt(r)("description"),type:kt(e)("type"),role:kt(e)("role"),valueRestriction:kt(e)("enum"),defaultValue:kt(e)("default"),labelVisible:kt(r)("label_visible"),control:kt(r)("control"),orientation:kt(r)("orientation"),width:kt(r)("width"),charLimit:kt(r)("char_limit"),placeHolderText:kt(r)("place_holder_text"),separator:kt(r)("separator"),resource_key:kt(r)("resource_key"),visible:kt(r)("visible"),valueIcons:kt(r)("value_icons"),sortable:kt(r)("sortable"),filterable:kt(r)("filterable"),editStyle:kt(r)("edit_style"),required:kt(e)("required"),numberGenerator:kt(r)("number_generator"),isKey:o,dmDefault:kt(r)("dm_default"),dmImage:kt(r)("dm_image"),language:kt(r)("language"),summary:kt(r)("summary"),increment:kt(r)("increment"),textAfter:kt(r)("text_after"),textBefore:kt(r)("text_before"),moveableRows:kt(r)("moveable_rows"),generatedValues:kt(r)("generated_values"),dateFormat:kt(r)("date_format"),timeFormat:kt(r)("time_format"),customControlId:kt(r)("custom_control_id"),data:kt(r)("data"),rows:kt(r)("rows"),displayChars:kt(r)("display_chars"),uionly:kt(e)("uionly"),actionRef:kt(r)("action_ref"),customValueAllowed:kt(r)("custom_value_allowed"),className:kt(r)("class_name")}):null}}]),t}();function Ht(e,t){if(t){var r,o=Ut(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e===n.parameter_ref)return n}}catch(e){o.e(e)}finally{o.f()}}return null}var Gt=function(){function t(r){e._classCallCheck(this,t),this.paramDefs=r}return e._createClass(t,[{key:"getParameter",value:function(e){var t;return this.paramDefs.forEach((function(r){r.name===e&&(t=r)})),t}},{key:"getParameters",value:function(){return this.paramDefs.map((function(e){return e.name}))}}],[{key:"makeParameterMetadata",value:function(e,r,o){var n=[];if(Array.isArray(e)){var a,i=Ut(e);try{for(i.s();!(a=i.n()).done;){var s=a.value,l=zt.makeParameterDef(s,Ht(s.id,r));l&&n.push(l)}}catch(e){i.e(e)}finally{i.f()}}if(Array.isArray(o)){var u,c=Ut(o);try{for(c.s();!(u=c.n()).done;){var p=u.value,d=zt.makeParameterDef(p,Ht(p.id,r));d&&(d.uionly=!0,n.push(d))}}catch(e){c.e(e)}finally{c.f()}}return new t(n)}}]),t}();function qt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Yt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yt(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var Kt=e._createClass((function t(r,o,n,a,i,s,l){e._classCallCheck(this,t),this.id=r,this.label=o,this.description=n,this.icon=a,this.carbonIcon=i,this.enabled=s,this.divider=l})),Wt=function(){function t(){e._classCallCheck(this,t)}return e._createClass(t,null,[{key:"makeButtonDef",value:function(e){if(e){var r=new t;return r.id=e.id,r.label=Ot.make(e.label),r.description=Ot.make(e.description),r.icon=e.icon,r.carbonIcon=e.carbon_icon,r.enabled=e.enabled,r.divider=e.divider,r}return null}}]),t}(),$t=function(){function t(r){e._classCallCheck(this,t),this.buttonDefs=r}return e._createClass(t,[{key:"getButton",value:function(e){var t;return this.buttonDefs.forEach((function(r){r.id===e&&(t=r)})),t}}],[{key:"makeButtonMetadata",value:function(e){if(e){var r,o=[],n=qt(e);try{for(n.s();!(r=n.n()).done;){var a=r.value,i=Wt.makeButtonDef(a);i&&o.push(i)}}catch(e){n.e(e)}finally{n.f()}return new t(o)}return null}}]),t}();function Xt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Jt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jt(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var Zt=function(){function t(r,o,n,a,i,s,l,u,c,p,d,f){e._classCallCheck(this,t),this.name=r,this.keyDefinition=o,this.parameterMetadata=n,this.moveableRows=a,this.label=Ot.make(i),this.rowSelection=s,this.buttons=d,this.addRemoveRows="boolean"!=typeof l||l,this.header="boolean"!=typeof u||u,"boolean"==typeof c&&(this.includeAllFields=c),Array.isArray(p)&&(this.layout=p),this.type=void 0===f?"array":f}return e._createClass(t,[{key:"parameterNames",value:function(){var e=[];if(this.parameterMetadata){var t,r=Xt(this.parameterMetadata.paramDefs);try{for(r.s();!(t=r.n()).done;){var o=t.value;e.push(o.name)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"hasSubPanel",value:function(){if(this.parameterMetadata){var e,t=Xt(this.parameterMetadata.paramDefs);try{for(t.s();!(e=t.n()).done;){if(e.value.isSubPanelEdit())return!0}}catch(e){t.e(e)}finally{t.f()}}return!1}},{key:"keyAttributeIndex",value:function(){return this.keyDefinition?0:-1}},{key:"defaultStructure",value:function(){var e=[];return this.parameterMetadata.paramDefs.forEach((function(t){e.push(t.defaultValue)})),this.keyDefinition&&e.unshift(this.keyDefinition.defaultValue),e}}],[{key:"makeStructure",value:function(e,r){return e?new t(kt(e)("id"),zt.makeParameterDef(kt(e)("key_definition"),kt(r)("key_definition"),!0),Gt.makeParameterMetadata(kt(e)("parameters"),kt(r)("parameters")),kt(r)("moveable_rows"),kt(r)("label"),kt(r)("row_selection"),kt(r)("add_remove_rows"),kt(r)("header"),kt(r)("include_all_fields"),kt(r)("layout"),$t.makeButtonMetadata(kt(r)("buttons")),kt(e)("type")):null}}]),t}();function Qt(e,t){if(t){var r,o=Xt(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e===n.complex_type_ref)return n}}catch(e){o.e(e)}finally{o.f()}}return null}var er=function(){function t(r){e._classCallCheck(this,t),this.structures=r}return e._createClass(t,[{key:"getStructure",value:function(e){var t;return this.structures.forEach((function(r){r.name===e&&(t=r)})),t}}],[{key:"makeStructureMetadata",value:function(e,r){if(e){var o,n=[],a=Xt(e);try{for(a.s();!(o=a.n()).done;){var i=o.value,s=Zt.makeStructure(i,Qt(i.id,r));null!==s&&n.push(s)}}catch(e){a.e(e)}finally{a.f()}return new t(n)}return null}}]),t}(),tr=function(){function t(r,o,n,a,i,s,l,u,c,p,d,f,h){e._classCallCheck(this,t),this.name=r,this.icon=o,this.editorSize=n,this.pixelWidth=a,this.label=i,this.labelEditable=s,this.help=l,this.description=Ot.make(u),this.structureMetadata=c,this.parameterMetadata=p,this.groupMetadata=d,this.actionMetadata=f,this.heading=h}return e._createClass(t,[{key:"editorSizeHint",value:function(e){return this.editorSize?this.editorSize:e||o.Size.SMALL}}],[{key:"makePropertyDef",value:function(e,r,o,n){var a=er.makeStructureMetadata(o,kt(n)("complex_type_info")),i=Gt.makeParameterMetadata(r,kt(n)("parameter_info"),kt(n)("ui_parameters")),s=Vt.makeActionMetadata(kt(n)("action_info")),u=Dt.makeGroupMetadata(kt(n)("group_info"),i.getParameters()),c=e&&e.title?e.title:"",p=e&&void 0!==e.editable?e.editable:l.DEFAULT_LABEL_EDITABLE;return new t(kt(n)("id"),kt(n)("icon"),kt(n)("editor_size"),kt(n)("pixel_width"),c,p,kt(n)("help"),kt(n)("description"),a,i,u,s,kt(n)("label"))}}]),t}(),rr=e._createClass((function t(r){e._classCallCheck(this,t),this.name=r.name,r.label&&(this.label=r.label),r.description&&(this.description=r.description),"boolean"==typeof r.labelVisible&&(this.labelVisible=r.labelVisible),r.controlType&&(this.controlType=r.controlType),r.valueDef&&(this.valueDef=r.valueDef),r.role&&(this.role=r.role),r.additionalText&&(this.additionalText=r.additionalText),r.orientation&&(this.orientation=r.orientation),r.values&&(this.values=r.values),r.valueLabels&&(this.valueLabels=r.valueLabels),r.valueIcons&&(this.valueIcons=r.valueIcons),"boolean"==typeof r.sortable&&(this.sortable=r.sortable),"boolean"==typeof r.filterable&&(this.filterable=r.filterable),r.language&&(this.language=r.language),r.charLimit&&(this.charLimit=r.charLimit),r.summary&&(this.summary=r.summary),r.increment&&(this.increment=r.increment),r.generatedValues&&(this.generatedValues={},r.generatedValues.operation&&(this.generatedValues.operation=r.generatedValues.operation),r.generatedValues.start_value&&(this.generatedValues.startValue=r.generatedValues.start_value)),r.dateFormat&&(this.dateFormat=r.dateFormat),r.timeFormat&&(this.timeFormat=r.timeFormat),r.customControlId&&(this.customControlId=r.customControlId),r.data&&(this.data=r.data),r.rows&&(this.rows=r.rows),r.displayChars&&(this.displayChars=r.displayChars),r.action&&(this.action=r.action),r.structureType&&(this.structureType=r.structureType),r.subControls&&(this.subControls=r.subControls),r.childItem&&(this.childItem=r.childItem),r.layout&&(this.layout=r.layout),"number"==typeof r.keyIndex&&(this.keyIndex=r.keyIndex),r.defaultRow&&(this.defaultRow=r.defaultRow),"boolean"==typeof r.moveableRows&&(this.moveableRows=r.moveableRows),"boolean"==typeof r.required&&(this.required=r.required),r.rowSelection&&(this.rowSelection=r.rowSelection),"boolean"==typeof r.addRemoveRows&&(this.addRemoveRows=r.addRemoveRows),"boolean"==typeof r.header&&(this.header=r.header),"boolean"==typeof r.uionly&&(this.uionly=r.uionly),"boolean"==typeof r.includeAllFields&&(this.includeAllFields=r.includeAllFields),r.dmImage&&(this.dmImage=r.dmImage),"boolean"==typeof r.visible&&(this.visible=r.visible),"number"==typeof r.width&&(this.width=r.width),r.editStyle?this.editStyle=r.editStyle:r.isKeyField||void 0===r.structureType||(this.editStyle=o.EditStyle.INLINE),r.dmDefault&&(this.dmDefault=r.dmDefault),r.dmImage&&(this.dmImage=r.dmImage),r.customValueAllowed&&(this.customValueAllowed=r.customValueAllowed),r.className&&(this.className=r.className),r.buttons&&(this.buttons=r.buttons)})),or=function(){function t(r){e._classCallCheck(this,t),this.id=kt(r)("id"),this.itemType=kt(r)("itemType"),this.tabs=kt(r)("tabs"),this.panel=kt(r)("panel"),this.control=kt(r)("control"),this.text=kt(r)("text"),this.textType=kt(r)("textType"),this.secondaryText=kt(r)("secondaryText"),this.dependsOn=kt(r)("dependsOn"),this.action=kt(r)("action"),this.className=kt(r)("className"),this.nestedPanel=kt(r)("nestedPanel")}return e._createClass(t,null,[{key:"makePrimaryTabs",value:function(e){return new t({itemType:o.ItemType.PRIMARY_TABS,tabs:e})}},{key:"makeSubTabs",value:function(e,r,n){return new t({itemType:o.ItemType.SUB_TABS,tabs:e,className:r,nestedPanel:n})}},{key:"makePanelSelector",value:function(e,r,n,a){return new t({id:e,itemType:o.ItemType.PANEL_SELECTOR,tabs:r,dependsOn:n,className:a})}},{key:"makePanel",value:function(e){return new t({itemType:o.ItemType.PANEL,panel:e})}},{key:"makeAdditionalLink",value:function(e,r,n){return new t({itemType:o.ItemType.ADDITIONAL_LINK,panel:n,text:e,secondaryText:r})}},{key:"makeControl",value:function(e){return new t({itemType:o.ItemType.CONTROL,control:e})}},{key:"makeAction",value:function(e){return new t({itemType:o.ItemType.ACTION,action:e})}},{key:"makeHSeparator",value:function(){return new t({itemType:o.ItemType.HORIZONTAL_SEPARATOR})}},{key:"makeStaticText",value:function(e,r){return new t({itemType:o.ItemType.STATIC_TEXT,text:e,textType:r})}},{key:"makeTextPanel",value:function(e,r,n,a,i){return new t({itemType:o.ItemType.TEXT_PANEL,panel:{id:e,label:r,description:n,className:a,nestedPanel:i}})}},{key:"makeCustomPanel",value:function(e,r){return new t({itemType:o.ItemType.CUSTOM_PANEL,panel:e,className:r})}}]),t}(),nr=e._createClass((function t(r,o,n){e._classCallCheck(this,t),this.text=r,this.group=o,this.content=n})),ar=function(){function t(r,n,a,i){e._classCallCheck(this,t),this.propType=r===o.Type.OBJECT?o.Type.STRUCTURE:r,this.isList=n,this.isMap=a,this.defaultValue=i}return e._createClass(t,null,[{key:"make",value:function(e){return new t(e.propType(),e.isList(),e.isMapValue(),e.defaultValue)}}]),t}(),ir=e._createClass((function t(r,o){e._classCallCheck(this,t),this.text=r,o&&(this.numberGenerator=o)})),sr=e._createClass((function t(r,o){e._classCallCheck(this,t),this.text=r,o&&(this.placement=o)})),lr=e._createClass((function t(r,o,n,a,i,s){var l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];e._classCallCheck(this,t),this.id=r,this.panelType=o,this.nestedPanel=a,this.uiItems=i,this.open=l,s&&(this.label=s),n&&(this.className=n)})),ur=e._createClass((function t(r,o,n,a,i){e._classCallCheck(this,t),this.id=r,this.panelType=o,this.nestedPanel=a,this.uiItems=i,n&&(this.className=n)})),cr=e._createClass((function t(r,o,n,a,i,s){e._classCallCheck(this,t),this.id=r,this.panelType=o,this.nestedPanel=a,this.parameters=i,this.data=s,n&&(this.className=n)})),pr=e._createClass((function t(r,o){e._classCallCheck(this,t),this.text=r,o.range&&(this.range=o.range)}));function dr(e,t,r){var o=r.l10nLabel(t,t.name);return new nr(o,t.name,fr(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r))}function fr(e,t,r,a,i){var s=r.name,l=null,u=null,c=r.className,p=n.get_1(r,"nestedPanel",!1);switch(r.groupType()){case o.GroupType.CONTROLS:return or.makePanel(new lr(s,o.PanelType.GENERAL,c,p,hr(e,t,r,a,i)));case o.GroupType.COLUMN_SELECTION:return or.makePanel(new lr(s,o.PanelType.COLUMN_SELECTION,c,p,hr(e,t,r,a,i)));case o.GroupType.ADDITIONAL:var d=new lr(s,o.PanelType.GENERAL,c,p,hr(e,t,r,a,i));return u=i.l10nLabel(r,r.name),or.makeAdditionalLink(u,u,d);case o.GroupType.SUB_TABS:var f=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var o=r.name;l=fr(e,t,r,a,i),u=i.l10nLabel(r,r.name),f.push(new nr(u,o,l))})),or.makeSubTabs(f,c,p);case o.GroupType.PANEL_SELECTOR:var h=mr(r,e,t,a,i);return or.makePanelSelector(s,h,r.dependsOn,c);case o.GroupType.PANELS:var m=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){l=fr(e,t,r,a,i),m.push(l)})),or.makePanel(new lr(s,o.PanelType.GENERAL,c,p,m));case o.GroupType.COLUMN_PANEL:var y=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){l=fr(e,t,r,a,i),y.push(l)})),or.makePanel(new lr(s,o.PanelType.COLUMN_PANEL,c,p,y));case o.GroupType.CUSTOM_PANEL:return or.makeCustomPanel(new cr(s,o.PanelType.CUSTOM,c,p,r.parameterNames(),r.data));case o.GroupType.SUMMARY_PANEL:u=i.l10nLabel(r,r.name);var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){l=fr(e,t,r,a,i),v.push(l)})),or.makePanel(new lr(s,o.PanelType.SUMMARY,c,p,v,u));case o.GroupType.ACTION_PANEL:return or.makePanel(new ur(s,o.PanelType.ACTION_PANEL,c,p,function(e,t,r,o,n){var a=[];Array.isArray(r.actionIds())&&r.actionIds().forEach((function(e){var r=or.makeAction(Er(t.getAction(e),n));a.push(r)}));return a}(0,t,r,0,i)));case o.GroupType.TEXT_PANEL:u=i.l10nResource(r.label);var g=i.l10nResource(r.description);return or.makeTextPanel(s,u,g,c,p);case o.GroupType.TWISTY_PANEL:u=i.l10nLabel(r,r.name);var b=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){l=fr(e,t,r,a,i),b.push(l)})),or.makePanel(new lr(s,o.PanelType.TWISTY_PANEL,c,p,b,u,r.open));default:return o.logger.warn("(Unknown group type '"+r.groupType()+"')"),null}}function hr(e,t,r,n,a){var i=[],s=[];return Array.isArray(r.parameterNames())?(r.parameterNames().forEach((function(l){var u,c=e.getParameter(l);if(c.propType()===o.Type.STRUCTURE&&n&&(u=n.getStructure(c.baseType())),!(r instanceof Zt)||r instanceof Zt&&c.isSubPanelEdit()){var p=vr(e,l,r,u,a,t,n),d=or.makeControl(p);if(c.separatorBefore()&&i.push(or.makeHSeparator()),c.textBefore&&i.push(or.makeStaticText(c.getTextBefore(a),c.getTextBeforeType())),i.push(d),c.textAfter&&i.push(or.makeStaticText(c.getTextAfter(a),c.getTextAfterType())),c.separatorAfter()&&i.push(or.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var f=0;f<r.subGroups.length;f++)d.control.controlType===o.ControlType.RADIOSET&&d.control.orientation===o.ORIENTATIONS.VERTICAL&&r.subGroups[f].type===o.GroupType.PANEL_SELECTOR&&!0===r.subGroups[f].insertPanels&&r.subGroups[f].dependsOn===d.control.name&&(s.push(r.subGroups[f].dependsOn),d.additionalItems=mr(r.subGroups[f],e,t,n,a))}})),Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){if(!function(e,t){if(t)for(var r=0;r<e.length;r++)if(e[r]===t)return!0;return!1}(s,r.dependsOn)){var o=fr(e,t,r,n,a);i.push(o)}})),i):i}function mr(e,t,r,o,n){var a=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach((function(e){var i=e.name,s=fr(t,r,e,o,n),l=n.l10nLabel(e,e.name);a.push(new nr(l,i,s))})),a}function yr(e,t){var r,n=e.getRole();if(e.isList()){var a=function(e){var t={};switch(e.getRole()){case o.ParamRole.TEXT:t.controlType=o.ControlType.TEXTAREA;break;case o.ParamRole.ENUM:e.getValidValueCount()<5?t.controlType=o.ControlType.CHECKBOXSET:t.controlType=o.ControlType.SOMEOFSELECT;break;case o.ParamRole.COLUMN:t.role=o.ParamRole.COLUMN,t.controlType=o.ControlType.SELECTCOLUMNS;break;default:t.controlType=o.ControlType.TEXTAREA}return t}(e);r=a.controlType,a.role&&(n=a.role)}else switch(e.getRole()){case o.ParamRole.TEXT:r=o.ControlType.TEXTAREA;break;case o.ParamRole.ENUM:r=e.getValidValueCount()>4||t&&!br(e)?o.ControlType.ONEOFSELECT:o.ControlType.RADIOSET;break;case o.ParamRole.COLUMN:n=o.ParamRole.COLUMN,r=t&&function(e){if(e.isList()||e.isMapValue())return br(e);return!1}(e)?o.ControlType.SELECTCOLUMNS:o.ControlType.SELECTCOLUMN;break;case o.ParamRole.EXPRESSION:r=o.ControlType.EXPRESSION;break;case o.ParamRole.EMAIL:n=o.ParamRole.EMAIL,r=o.ControlType.TEXTFIELD;break;case o.ParamRole.URL:n=o.ParamRole.URL,r=o.ControlType.TEXTFIELD;break;case o.ParamRole.COLOR:n=o.ParamRole.COLOR,r=o.ControlType.TEXTFIELD;break;default:r=o.ControlType.TEXTFIELD}return{controlType:r,role:n}}function vr(e,t,r,n,a,i,s,l){var u=void 0!==l,c=u?l:e.getParameter(t),p=c.getAdditionalText(a),d=c.orientation,f=c.required;c.numberGenerator&&(c.numberGenerator=new pr(a.l10nLabel(c.numberGenerator,c.name),c.numberGenerator));var h,m=new ir(a.l10nLabel(c,c.name),c.numberGenerator);c.description&&(h=new sr(a.l10nDesc(c,c.name),c.description?c.description.placement:null));var y,v,g,b,E,_,S,T,I,C,R,A,k,w,O=!0,P=c.moveableRows,N=c.structureType;if(u||c.getRole()!==o.ParamRole.CUSTOM)switch(c.propType()){case o.Type.STRING:var L=yr(c,u);v=L.controlType,y=L.role;break;case o.Type.PASSWORD:v=o.ControlType.PASSWORDFIELD;break;case o.Type.BOOLEAN:O=!1,v=o.ControlType.CHECKBOX;break;case o.Type.INTEGER:case o.Type.LONG:case o.Type.DOUBLE:v=c.isList()?o.ControlType.TEXTAREA:o.ControlType.NUMBERFIELD;break;case o.Type.DATE:y=o.Type.DATE,v=c.isList()?o.ControlType.TEXTAREA:o.ControlType.DATEFIELD;break;case o.Type.TIME:y=o.Type.TIME,v=c.isList()?o.ControlType.TEXTAREA:o.ControlType.TIMEFIELD;break;case o.Type.STRUCTURE:var D=u?s.getStructure(c.baseType()):n;if(D){if(D.hasSubPanel()&&(_=function(e,t,r){var n=new lr(e.name,o.PanelType.GENERAL,"properties-editstyle-sub-panel",!1,hr(e.parameterMetadata,e.actionMetadata,e,r,t)),a=t.l10nLabel(e,e.name);return or.makeAdditionalLink("...",a,n)}(D,a,s)),b=D.keyAttributeIndex(),E=D.defaultStructure(),g=[],D.parameterMetadata&&Array.isArray(D.parameterMetadata.paramDefs)&&D.parameterMetadata.paramDefs.forEach((function(e){var t=gr(e,a,s);g.push(t)})),(c.isMapValue()||c.isList())&&D.keyDefinition){var M=gr(D.keyDefinition,a,s);g.unshift(M)}c.isList()||c.isMapValue()?(!u&&r&&void 0!==r.groupType&&r.groupType()===o.GroupType.COLUMN_SELECTION||c.control===o.ControlType.STRUCTURETABLE||c.getRole()===o.ParamRole.COLUMN?(v=o.ControlType.STRUCTURETABLE,P=D.moveableRows,S=D.rowSelection,T=D.addRemoveRows,I=D.header,C=D.includeAllFields):(v=o.ControlType.STRUCTURELISTEDITOR,P=D.moveableRows,S=D.rowSelection,T=D.addRemoveRows,I=D.header),D.buttons&&(A=function(e,t){var r=[];return e.buttonDefs.forEach((function(o){r.push(function(e,t){var r,o;e.label&&(r=new ir(t.l10nLabel(e,e.id)));e.description&&(o=new sr(t.l10nDesc(e,e.description)));return new Kt(e.id,r,o,e.icon,e.carbonIcon,e.enabled,e.divider)}(e.getButton(o.id),t))})),r}(D.buttons,a))):(v=o.ControlType.STRUCTUREEDITOR,D.layout&&(R=D.layout)),N=D.type}else v=o.ControlType.TEXTFIELD;break;case o.Type.OBJECT:if(u)(y=c.getRole())===o.ParamRole.COLUMN?v=o.ControlType.SELECTCOLUMN:(o.logger.warn("Complex subControl type that is not a field! Name: "+c.name),v=o.ControlType.READONLY);else if(c.isCompoundField()){var x=yr(c,u);v=x.controlType,y=x.role}else o.logger.warn("Complex parameter type that is not a field! Name: "+c.name),v=o.ControlType.READONLY;break;default:y="???"+c.propType()+"???",v=o.ControlType.TEXTAREA}else v=o.ControlType.CUSTOM;c.getRole()===o.ParamRole.ENUM&&(k=function(e,t){if(Array.isArray(e.getValidValues())){var r;r=e.resource_key?e.resource_key:e.name;var o=[];return e.getValidValues().forEach((function(e){o.push(t.l10nValueLabel(r,String(e)))})),o}return[]}(c,a)),!u&&c.actionRef&&(w=Er(i.getAction(c.actionRef),a));var B={};return B.name=c.name,B.label=m,B.description=h,B.labelVisible="boolean"==typeof c.labelVisible?c.labelVisible:O,B.controlType=c.getControl(v),B.valueDef=ar.make(c),B.structureType=N,B.role=y,B.additionalText=p,B.orientation=d,B.values=c.getValidValues(),B.valueLabels=k,B.valueIcons=c.valueIcons,B.sortable=c.sortable,B.filterable=c.filterable,B.charLimit=c.charLimit,B.subControls=g,B.keyIndex=b,B.defaultRow=E,B.childItem=_,B.moveableRows=P,B.required=f,B.language=c.language,B.summary=c.summary,B.increment=c.increment,B.rowSelection=S,B.generatedValues=c.generatedValues,B.addRemoveRows=T,B.dateFormat=c.dateFormat,B.timeFormat=c.timeFormat,B.customControlId=c.customControlId,B.data=c.data,B.rows=c.rows,B.displayChars=c.displayChars,B.header=I,B.uionly=c.uionly,B.includeAllFields=C,B.layout=R,B.dmImage=c.dmImage,B.action=w,B.customValueAllowed=c.customValueAllowed,B.className=c.className,B.buttons=A,u&&(B.visible=c.visible,B.width=c.columns(8),B.editStyle=c.editStyle,B.isKeyField=c.isKey,B.dmDefault=c.dmDefault),new rr(B)}function gr(e,t,r){return vr(null,null,null,e.propType()===o.Type.STRUCTURE?r.getStructure(e.baseType()):null,t,null,r,e)}function br(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function Er(e,t){var r,o=new ir(t.l10nLabel(e,e.id));return e.description&&(r=new sr(t.l10nDesc(e,e.id))),new Bt(e.id,o,r,e.control,e.data,e.image)}function _r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Sr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sr(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Sr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function Tr(e,r){for(var o in e)i.has_1(e,o)&&"object"===t._typeof(e[o])&&null!==e[o]&&(e[o].message?e[o].message.default=r.l10nResource(e[o].message):Tr(e[o],r))}function Ir(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Cr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cr(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var Rr=function(){function t(r,o,n,a,i,s,l,u,c,p,d,f,h){e._classCallCheck(this,t),this.componentId=r,this.label=o,this.labelEditable=n,this.help=a,this.editorSize=i,this.pixelWidth=s,this.uiItems=l,this.buttons=u,this.data=c,this.conditions=p,this.resources=d,this.icon=f,this.heading=h}return e._createClass(t,null,[{key:"makeForm",value:function(e,r){var n,a,i=tr.makePropertyDef(kt(e)("titleDefinition"),kt(e)("parameters"),kt(e)("complex_types"),kt(e)("uihints")),s=kt(e)("resources"),l=kt(e)("conditions");if(i){var u=new wt(s),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var p,d=Ir(i.groupMetadata.groups);try{for(d.s();!(p=d.n()).done;){var f=p.value;c.push(dr(i,f,u))}}catch(e){d.e(e)}finally{d.f()}}var h={currentParameters:kt(e)("current_parameters"),uiCurrentParameters:kt(e)("current_ui_parameters"),datasetMetadata:kt(e)("dataset_metadata")},m=r?o.Size.LARGE:o.Size.SMALL;return new t(i.name,i.label,i.labelEditable,i.help,i.editorSizeHint(m),i.pixelWidth,[or.makePrimaryTabs(c)],(n=new Ar("ok","OK",!0,""),a=new Ar("cancel","Cancel",!1,""),[n,a]),h,function(e,t){if(e&&Array.isArray(e)){var r,o=_r(e);try{for(o.s();!(r=o.n()).done;)Tr(r.value,t)}catch(e){o.e(e)}finally{o.f()}}return e}(l,u),s,i.icon,u.l10nResource(i.heading))}return null}}]),t}();var Ar=e._createClass((function t(r,o,n,a){e._classCallCheck(this,t),this.id=r,this.text=o,this.isPrimary=n,this.url=a}));function kr(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var wr=function(r){t._inherits(n,r);var o=kr(n);function n(t,r,a,i,s){var l;return e._classCallCheck(this,n),(l=o.call(this,t)).newValues=t,l.initialValues=r,l.appData=a,l.applyPropertyChanges=i,l.propertiesActionLabel=s,l}return e._createClass(n,[{key:"do",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"undo",value:function(){this.applyPropertyChanges(this.initialValues.properties,this.appData,this.initialValues.additionalInfo,this.initialValues.undoInfo,this.initialValues.uiProperties)}},{key:"redo",value:function(){this.applyPropertyChanges(this.newValues.properties,this.appData,this.newValues.additionalInfo,this.newValues.undoInfo,this.newValues.uiProperties)}},{key:"getLabel",value:function(){return this.propertiesActionLabel}}]),n}(a.Action);var Or=function(e){return void 0===e},Pr=n._baseRest,Nr=o._isIterateeCall;var Lr=function(e){return Pr((function(t,r){var o=-1,n=r.length,a=n>1?r[n-1]:void 0,i=n>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(n--,a):void 0,i&&Nr(r[0],r[1],i)&&(a=n<3?void 0:a,n=1),t=Object(t);++o<n;){var s=r[o];s&&e(t,s,o,a)}return t}))},Dr=n._assignValue,Mr=n._copyObject,xr=Lr,Br=i.isArrayLike_1,Fr=i._isPrototype,Vr=n.keys_1,Ur=Object.prototype.hasOwnProperty,jr=xr((function(e,t){if(Fr(t)||Br(t))Mr(t,Vr(t),e);else for(var r in t)Ur.call(t,r)&&Dr(e,r,t[r])}));function zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.property&&t.property.propertyId?t.property.propertyId:null;switch(t.type){case"UPDATE_PROPERTY_VALUE":if(null===r)return e;var o=e;return void 0!==r.row?(void 0===o[r.name]&&(o[r.name]=[]),void 0!==r.col?(void 0===o[r.name][r.row]&&(o[r.name][r.row]=[]),void 0!==r.propertyId?Hr(r.propertyId,o[r.name][r.row][r.col],t.property.value):o[r.name][r.row][r.col]=t.property.value):void 0!==r.propertyId?Hr(r.propertyId,o[r.name][r.row],t.property.value):o[r.name][r.row]=t.property.value):o[r.name]=t.property.value,Object.assign({},e,o);case"SET_PROPERTY_VALUES":return Object.assign({},t.properties);case"REMOVE_PROPERTY_VALUE":var n=e;return null!==r&&void 0!==r.name&&delete n[r.name],Object.assign({},e,n);default:return e}}function Hr(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?Hr(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function Gr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_CONTROL_STATE":var r=e,o=t.state.propertyId;if(void 0===r[o.name]&&(r[o.name]={}),void 0!==o.row){var n=o.row.toString();if(void 0===r[o.name][n]&&(r[o.name][n]={}),void 0!==o.col){var a=o.col.toString();void 0===r[o.name][n][a]&&(r[o.name][n][a]={}),r[o.name][n][a]={value:t.state.value}}else r[o.name][n]={value:t.state.value}}else r[o.name]={value:t.state.value};return Object.assign({},e,r);case"SET_CONTROL_STATES":return Object.assign({},t.states);default:return e}}function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_PANEL_STATE":var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case"SET_PANEL_STATES":return Object.assign({},t.states);default:return e}}function Yr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_ACTION_STATE":var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case"SET_ACTION_STATES":return Object.assign({},t.states);default:return e}}function Kr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_ERROR_MESSAGE":var r=e,o=t.message.propertyId;if(void 0===r[o.name]&&(r[o.name]={}),void 0!==o.row){var n=o.row.toString();if(void 0===r[o.name][n]&&(r[o.name][n]={}),void 0!==o.col){var a=o.col.toString();void 0===r[o.name][n][a]&&(r[o.name][n][a]={}),r[o.name][n][a]=t.message.value}else r[o.name][n]=Object.assign({},t.message.value)}else r[o.name]=Object.assign({},t.message.value);return Object.assign({},e,r);case"CLEAR_ERROR_MESSAGE":var s=e;return s[t.message.propertyId.name]&&(void 0!==t.message.propertyId.row?void 0!==t.message.propertyId.col?delete s[t.message.propertyId.name][t.message.propertyId.row][t.message.propertyId.col]:delete s[t.message.propertyId.name][t.message.propertyId.row]:(delete s[t.message.propertyId.name].type,delete s[t.message.propertyId.name].text,delete s[t.message.propertyId.name].validation_id,delete s[t.message.propertyId.name].required,delete s[t.message.propertyId.name].propertyId,delete s[t.message.propertyId.name].displayError,i.isEmpty_1(s[t.message.propertyId.name])&&delete s[t.message.propertyId.name])),Object.assign({},e,s);case"SET_ERROR_MESSAGES":return Object.assign({},t.messages);default:return e}}function Wr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_DATASET_METADATA"===t.type?Object.assign({},e,t.datasetMetadata):e}function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_SELECTED_ROWS":var r=e,o=t.info.propertyId;if(r[o.name]||(r[o.name]={}),Number.isInteger(o.row)){var n=String(o.row);if(r[o.name][n]||(r[o.name][n]={}),Number.isInteger(o.col)){var a=String(o.col);r[o.name][n][a]||(r[o.name][n][a]={}),r[o.name][n][a].selectedRows=t.info.selectedRows}else r[o.name][n].selectedRows=t.info.selectedRows}else r[o.name].selectedRows=t.info.selectedRows;return Object.assign({},e,r);case"CLEAR_SELECTED_ROWS":var i=e,s=t.info.propertyId;if(t.info.propertyId){if(i[s.name])if(Number.isInteger(s.row)&&i[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&i[s.name][l][String(s.col)]?i[s.name][l][String(s.col)].selectedRows=[]:i[s.name][l].selectedRows=[]}else i[s.name].selectedRows=[];return Object.assign({},e,i)}return{};default:return e}}function Xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_STATIC_ROWS":var r=e,o=t.info.propertyId;if(r[o.name]||(r[o.name]={}),Number.isInteger(o.row)){var n=String(o.row);if(r[o.name][n]||(r[o.name][n]={}),Number.isInteger(o.col)){var a=String(o.col);r[o.name][n][a]||(r[o.name][n][a]={}),r[o.name][n][a].staticRows=t.info.staticRows}else r[o.name][n].staticRows=t.info.staticRows}else r[o.name].staticRows=t.info.staticRows;return Object.assign({},e,r);case"CLEAR_STATIC_ROWS":var i=e,s=t.info.propertyId;if(t.info.propertyId){if(i[s.name])if(Number.isInteger(s.row)&&i[s.name][String(s.row)]){var l=String(s.row);Number.isInteger(s.col)&&i[s.name][l][String(s.col)]?i[s.name][l][String(s.col)].staticRows=[]:i[s.name][l].staticRows=[]}else i[s.name].staticRows=[];return Object.assign({},e,i)}return{};default:return e}}function Jr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TITLE":var r=e;return r.title=t.title,Object.assign({},e,r);case"SET_ACTIVE_TAB":var o=e;return o.activeTab=t.activeTab,Object.assign({},e,o);default:return e}}function Zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if("DISABLE_ROW_MOVE_BUTTONS"===t.type){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function Qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if("SET_SAVE_BUTTON_DISABLE"===t.type){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function eo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.info&&t.info.propertyId?t.info.propertyId:null;switch(t.type){case"SET_ADD_REMOVE_ROWS":if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?to(r,o[r.name],"addRemoveRows",t.info.value):o[r.name].addRemoveRows=t.info.value,Object.assign({},e,o);case"SET_TABLE_BUTTON_ENABLED":if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?to(r,n[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):a.set_1(n[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value),Object.assign({},e,n);default:return e}}function to(e,t,r,o){void 0!==e.row&&(void 0===t[e.row]&&(t[e.row]={}),void 0!==e.col?(void 0===t[e.row][e.col]&&(t[e.row][e.col]={}),void 0!==e.propertyId?to(e.propertyId,t[e.row][e.col],r,o):a.set_1(t[e.row][e.col],r,o)):void 0!==e.propertyId?to(e.propertyId,t[e.row],r,o):a.set_1(t[e.row],r,o))}var ro=function(){function t(){e._classCallCheck(this,t),this.combinedReducer=m.combineReducers({propertiesReducer:zr,controlStatesReducer:Gr,panelStatesReducer:qr,errorMessagesReducer:Kr,datasetMetadataReducer:Wr,rowSelectionsReducer:$r,componentMetadataReducer:Jr,disableRowMoveButtonsReducer:Zr,actionStatesReducer:Yr,saveButtonDisableReducer:Qr,propertiesSettingsReducer:eo,rowFreezeReducer:Xr});var r=!1;"undefined"!=typeof window&&(r=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=m.createStore(this.combinedReducer,r)}return e._createClass(t,[{key:"dispatch",value:function(e){this.store.dispatch(e)}},{key:"getStore",value:function(){return this.store}},{key:"subscribe",value:function(e){this.store.subscribe(e)}},{key:"getPropertyValue",value:function(e){var t=this.store.getState().propertiesReducer[e.name];return this.getNestedPropertyValue(e,t)}},{key:"getNestedPropertyValue",value:function(e,t){if(void 0!==e.row&&null!=t){var r=t[e.row];return void 0!==e.col&&null!=r&&Array.isArray(r)?void 0!==e.index?r[e.col][e.index]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r[e.col]):r[e.col]:void 0!==e.propertyId?this.getNestedPropertyValue(e.propertyId,r):r}return t}},{key:"getPropertyValues",value:function(){var e=this.store.getState();return o.copy(e.propertiesReducer)}},{key:"setPropertyValues",value:function(e){this.store.dispatch(function(e){return{type:"SET_PROPERTY_VALUES",properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:"UPDATE_PROPERTY_VALUE",property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:"REMOVE_PROPERTY_VALUE",property:{propertyId:e}})}},{key:"getControlState",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];if(t&&("hidden"===t.value||"disabled"===t.value))return t;var r=void 0!==e.col?e.col.toString():null,o=void 0!==e.row?e.row.toString():null;return null!==r&&t&&t[r]&&(void 0!==t[r].value||t[r][o]&&(void 0!==t[r][o].value||void 0!==t[r][o].values))&&(t=t[r],null!==o&&t&&t[o]&&(void 0!==t[o].value||void 0!==t[o].values)&&(t=t[o])),t||null}},{key:"getControlStates",value:function(){var e=this.store.getState();return o.copy(e.controlStatesReducer)}},{key:"setControlStates",value:function(e){o.isEqual_1(this.getControlStates(),e)||this.store.dispatch(function(e){return{type:"SET_CONTROL_STATES",states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:"UPDATE_CONTROL_STATE",state:{propertyId:e,value:t}})}},{key:"getPanelState",value:function(e){if(void 0===e)return null;var t=this.store.getState().panelStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getPanelStates",value:function(){var e=this.store.getState();return o.copy(e.panelStatesReducer)}},{key:"setPanelStates",value:function(e){o.isEqual_1(this.getPanelStates(),e)||this.store.dispatch(function(e){return{type:"SET_PANEL_STATES",states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:"UPDATE_PANEL_STATE",state:{panelId:e,value:t}})}},{key:"getActionState",value:function(e){if(void 0===e)return null;var t=this.store.getState().actionStatesReducer[e.name];return t&&t.value?t.value:null}},{key:"getActionStates",value:function(){var e=this.store.getState();return o.copy(e.actionStatesReducer)}},{key:"setActionStates",value:function(e){o.isEqual_1(this.getActionStates(),e)||this.store.dispatch(function(e){return{type:"SET_ACTION_STATES",states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:"UPDATE_ACTION_STATE",state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:"SET_SAVE_BUTTON_DISABLE",disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"getFilteredEnumItems",value:function(e){if(void 0===e)return null;var t=this.store.getState().controlStatesReducer[e.name];return void 0!==e.col&&t&&t[e.col.toString()]&&(t=t[e.col.toString()],void 0!==e.row&&t[e.row.toString()]&&(t=t[e.row.toString()])),t?t.enumFilter:null}},{key:"getErrorMessage",value:function(e,t){if(void 0===e)return null;var r=this.store.getState().errorMessagesReducer[e.name];if(void 0!==e.row&&r){if(r=r[e.row.toString()],void 0!==e.col&&r)return r[e.col.toString()];if(r&&r.text)return r}var o=null,a=null;if(r&&r.text&&(o=r),r){var i=n.cloneDeep_1(r);a=this._getTableCellErrors(i,t)}return null!==o&&null!==a?o.text=o.text+" "+a.text:null===o&&(o=a),o}},{key:"_getTableCellErrors",value:function(e,t){var r=null,n=0,a=0;for(var s in e)if(i.has_1(e,s)&&"text"!==s){var u=e[s];if(u&&u.text&&(r=u,n+=u.type===l.CONDITION_MESSAGE_TYPE.ERROR?1:0,a+=u.type===l.CONDITION_MESSAGE_TYPE.WARNING?1:0),u)for(var c in u)if(i.has_1(u,c)&&"text"!==c){var p=u[c];p&&p.text&&(r=p,n+=p.type===l.CONDITION_MESSAGE_TYPE.ERROR?1:0,a+=p.type===l.CONDITION_MESSAGE_TYPE.WARNING?1:0)}}return n+a!==1&&r&&(r.type=n>0?l.CONDITION_MESSAGE_TYPE.ERROR:l.CONDITION_MESSAGE_TYPE.WARNING,r.text=n>0?o.formatMessage(t,l.MESSAGE_KEYS.TABLE_SUMMARY_ERROR,{errorMsgCount:n}):"",r.text+=a>0?o.formatMessage(t,l.MESSAGE_KEYS.TABLE_SUMMARY_WARNING,{warningMsgCount:a}):""),r}},{key:"getErrorMessages",value:function(){var e=this.store.getState();return o.copy(e.errorMessagesReducer)}},{key:"setErrorMessages",value:function(e){o.isEqual_1(this.getErrorMessages(),e)||this.store.dispatch(function(e){return{type:"SET_ERROR_MESSAGES",messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){o.isEqual_1(this.getErrorMessage(e),t)||this.store.dispatch({type:"UPDATE_ERROR_MESSAGE",message:{propertyId:e,value:t}})}},{key:"clearErrorMessage",value:function(e){null!==this.getErrorMessage(e)&&this.store.dispatch({type:"CLEAR_ERROR_MESSAGE",message:{propertyId:e}})}},{key:"setDatasetMetadata",value:function(e){this.store.dispatch(function(e){return{type:"SET_DATASET_METADATA",datasetMetadata:e}}(e))}},{key:"getDatasetMetadata",value:function(){return this.store.getState().datasetMetadataReducer}},{key:"getSelectedRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowSelectionsReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.selectedRows?t.selectedRows:[]}},{key:"updateSelectedRows",value:function(e,t){this.store.dispatch({type:"UPDATE_SELECTED_ROWS",info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:"CLEAR_SELECTED_ROWS",info:{propertyId:e}})}},{key:"getStaticRows",value:function(e){if(void 0===e)return[];var t=this.store.getState().rowFreezeReducer[e.name];return Number.isInteger(e.row)&&t&&(t=t[String(e.row)],Number.isInteger(e.col)&&t&&(t=t[String(e.col)])),t&&t.staticRows?t.staticRows:[]}},{key:"updateStaticRows",value:function(e,t){this.store.dispatch({type:"UPDATE_STATIC_ROWS",info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:"CLEAR_STATIC_ROWS",info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:"DISABLE_ROW_MOVE_BUTTONS",propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch(ke(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(we(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:"SET_ADD_REMOVE_ROWS",info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState();return!t.propertiesSettingsReducer[e.name]||(void 0!==e.row?oo(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",true):t.propertiesSettingsReducer[e.name].addRemoveRows)}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:"SET_TABLE_BUTTON_ENABLED",info:{propertyId:e,buttonId:t,value:r}})}},{key:"getTableButtons",value:function(e){var t=this.store.getState(),r={};return t.propertiesSettingsReducer[e.name]?void 0!==e.row?oo(e,t.propertiesSettingsReducer[e.name],"tableButtons",r):t.propertiesSettingsReducer[e.name].tableButtons||r:r}},{key:"getTableButtonEnabled",value:function(e,t){var r=this.store.getState();return!!r.propertiesSettingsReducer[e.name]&&(void 0!==e.row?oo(e,r.propertiesSettingsReducer[e.name],"tableButtons.".concat(t),false):r.propertiesSettingsReducer[e.name].tableButtons[t])}}]),t}();function oo(e,t,r,o){return void 0!==e.row&&t[e.row]?void 0!==e.col&&t[e.row][e.col]?void 0!==e.propertyId?oo(e.propertyId,t[e.row][e.col],r,o):n.get_1(t[e.row][e.col],r):void 0!==e.propertyId?oo(e.propertyId,t[e.row],r,o):n.get_1(t[e.row],r):o}function no(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ao(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ao(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function io(e,t,r){if(e.or)!function(e,t,r){for(var o=0;o<e.length;o++)io(e[o],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var o=0;o<e.length;o++)io(e[o],t,r)}(e.and,t,r);else{if(!e.condition)throw new Error("Failed to parse definition");!function(e,t,r){e.parameter_ref?(t.push(e.parameter_ref),e.parameter_2_ref&&t.push(e.parameter_2_ref)):t.push(r)}(e.condition,t,r)}}function so(e,t,r){if(t.label&&(t.summaryLabel=t.label.text),r&&(t.parentCategoryId=r),e.push(t),t.subControls)for(var o=0;o<t.subControls.length;o++){var n=t.subControls[o];n.parameterName=t.name,n.columnIndex=o,r&&(n.parentCategoryId=r),e.push(n)}}function lo(e,t,r,n,a){switch(r.itemType){case o.ItemType.CONTROL:var i=r.control;if(n&&(i.summaryPanelId=n),a&&(i.parentCategoryId=a),so(e,i,a),r.additionalItems){var s,l=no(r.additionalItems);try{for(l.s();!(s=l.n()).done;){lo(e,t,s.value.content,n,a)}}catch(e){l.e(e)}finally{l.f()}}break;case o.ItemType.ADDITIONAL_LINK:case o.ItemType.CHECKBOX_SELECTOR:case o.ItemType.PANEL:if(r.panel&&r.panel.uiItems){var u=n;r.panel.panelType===o.PanelType.SUMMARY&&(u=r.panel.id);var c,p=no(r.panel.uiItems);try{for(p.s();!(c=p.n()).done;){lo(e,t,c.value,u,a)}}catch(e){p.e(e)}finally{p.f()}}break;case o.ItemType.PRIMARY_TABS:case o.ItemType.PANEL_SELECTOR:case o.ItemType.SUB_TABS:if(r.tabs){var d,f=no(r.tabs);try{for(f.s();!(d=f.n()).done;){var h=d.value;lo(e,t,h.content,n,r.itemType===o.ItemType.PANEL_SELECTOR||r.itemType===o.ItemType.SUB_TABS?a:h.group)}}catch(e){f.e(e)}finally{f.f()}}break;case o.ItemType.CUSTOM_PANEL:if(r.panel&&r.panel.parameters){var m,y=no(r.panel.parameters);try{for(y.s();!(m=y.n()).done;){var v={name:m.value,controlType:"custom"};n&&(v.summaryPanelId=n),a&&(v.parentCategoryId=a),e.push(v)}}catch(e){y.e(e)}finally{y.f()}}break;case o.ItemType.ACTION:r.action&&r.action.name&&(t[r.action.name]=r.action);break;case o.ItemType.STATIC_TEXT:case o.ItemType.TEXT_PANEL:case o.ItemType.HORIZONTAL_SEPARATOR:break;default:o.logger.warn("Unknown UiItem type when parsing ui conditions: "+r.itemType)}return e}function uo(e,t,r){try{var n=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?io(t.evaluate,r,t.parameter_refs):io(t.evaluate,r,t.parameter_ref);var o=Array.from(new Set(r));return o.length>1?o:o[0]}throw new Error("Invalid validation schema")}(t[r]),a={params:n,definition:t};co(e.controls,n,a);var i=t[r].parameter_refs;t[r].group_refs?i=t[r].group_refs:t[r].action_refs?i=t[r].action_refs:t[r].target&&t[r].target.parameter_ref&&(i=[t[r].target.parameter_ref]),i&&co(e.refs,i,a)}catch(e){o.logger.info("Error parsing ui conditions: "+e)}return e}function co(e,t,r){if(!0===Array.isArray(t))for(var o=0;o<t.length;o++)void 0===e[t[o]]&&(e[t[o]]=[]),e[t[o]].push(r);else void 0===e[t]&&(e[t]=[]),e[t].push(r)}function po(e){var t={};if(e&&e.functions){var r=new wt(kt(e)("resources")),o=n.cloneDeep_1(e.functions);if(Array.isArray(o.function_info)&&Array.isArray(o.function_categories)){var a=o.parmsSet?o.function_info:function(e,t){return e.map((function(e){var r=e;return r.locLabel=t.l10nLabel(r,r.id),r.help=t.l10nDesc(r,r.locLabel),r.value=r.locLabel,Array.isArray(e.parameters)&&(r.locLabel&&-1!==r.locLabel.indexOf("?")?e.parameters.forEach((function(e){-1!==r.locLabel.indexOf("?")&&(r.locLabel=r.locLabel.replace("?"," "+t.l10nLabel(e,e.id)+" "))})):(r.value+="(",r.locLabel+="(",e.parameters.forEach((function(e,o){var n=o>0?", ":"";r.locLabel+=n+t.l10nLabel(e,e.id),r.value+=n+"?"})),r.locLabel+=")",r.value+=")")),r}))}(o.function_info,r);o.parmsSet=!0,t.functionCategories=[],o.function_categories.forEach((function(e){t.functionCategories[e.id]={},t.functionCategories[e.id].locLabel=r.l10nLabel(e,e.id),t.functionCategories[e.id].functionList=[],e.function_refs.forEach((function(r){var o=fo(r,a);o&&t.functionCategories[e.id].functionList.push(o)}))})),t.operators=[],o.operator_refs&&o.operator_refs.forEach((function(e){var r=fo(e,a);r&&t.operators.push(r)})),t.fields={field_categories:[],field_table_info:[]},e.fields&&(e.fields.field_categories&&e.fields.field_categories.forEach((function(e){e.locLabel=r.l10nLabel(e,e.id),e.field_columns.field_column_info.locLabel=r.l10nLabel(e.field_columns.field_column_info,e.id+".field_column_info"),e.field_columns.value_column_info.locLabel=r.l10nLabel(e.field_columns.value_column_info,e.id+".value_column_info"),e.field_columns.additional_column_info&&e.field_columns.additional_column_info.forEach((function(t){t.locLabel=r.l10nLabel(t,e.id+".additional_column_info."+t.id)})),t.fields.field_categories.push(e)})),e.fields.field_table_info&&e.fields.field_table_info.forEach((function(e){t.fields.field_table_info.push(e)})))}}return t}function fo(e,t){var r=t.find((function(t){return t.id===e}));return r||(o.logger.warn("Expression function information list, no function information found for "+e),null)}function ho(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return mo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function mo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function yo(e,t,r){switch(t.itemType){case o.ItemType.PRIMARY_TABS:case o.ItemType.SUB_TABS:if(t.tabs){var n,a=ho(t.tabs);try{for(a.s();!(n=a.n()).done;){yo(e,n.value.content,r)}}catch(e){a.e(e)}finally{a.f()}}break;case o.ItemType.TEXT_PANEL:case o.ItemType.PANEL:case o.ItemType.CUSTOM_PANEL:case o.ItemType.ADDITIONAL_LINK:case o.ItemType.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),vo(e,t.panel.id),t.panel.uiItems)){var i,s=ho(t.panel.uiItems);try{for(s.s();!(i=s.n()).done;){yo(e,i.value,t.panel.id)}}catch(e){s.e(e)}finally{s.f()}}break;case o.ItemType.CONTROL:if(e[r].controls.push(t.control.name),t.control.action&&e[r].actions.push(t.control.action.name),t.control.additionalItems){var l,u=ho(t.control.additionalItems);try{for(u.s();!(l=u.n()).done;){yo(e,l.value.content,r)}}catch(e){u.e(e)}finally{u.f()}}break;case o.ItemType.PANEL_SELECTOR:if(e[r].panels.push(t.id),vo(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var c,p=ho(t.tabs);try{for(p.s();!(c=p.n()).done;){yo(e,c.value.content,t.id)}}catch(e){p.e(e)}finally{p.f()}}break;case o.ItemType.ACTION:e[r].actions.push(t.action.name);break;case o.ItemType.STATIC_TEXT:case o.ItemType.HORIZONTAL_SEPARATOR:break;default:o.logger.warn("Unknown UiItem type when parsing ui conditions: "+t.itemType)}}function vo(e,t){i.has_1(e,t)&&o.logger.warn("Duplicate panel ids, each panel id must be unique. Panel id = "+t),e[t]={controls:[],panels:[],actions:[]}}var go=n._baseFlatten,bo=n._baseRest,Eo=a._baseUniq,_o=a.isArrayLikeObject_1,So=a.last_1,To=bo((function(e){var t=So(e);return t="function"==typeof t?t:void 0,Eo(go(e,1,_o,!0),void 0,t)})),Io=n._SetCache,Co=a._arrayIncludes,Ro=a._arrayIncludesWith,Ao=i._arrayMap,ko=i._baseUnary,wo=n._cacheHas,Oo=Math.min;var Po=function(e,t,r){for(var o=r?Ro:Co,n=e[0].length,a=e.length,i=a,s=Array(a),l=1/0,u=[];i--;){var c=e[i];i&&t&&(c=Ao(c,ko(t))),l=Oo(c.length,l),s[i]=!r&&(t||n>=120&&c.length>=120)?new Io(i&&c):void 0}c=e[0];var p=-1,d=s[0];e:for(;++p<n&&u.length<l;){var f=c[p],h=t?t(f):f;if(f=r||0!==f?f:0,!(d?wo(d,h):o(u,h,r))){for(i=a;--i;){var m=s[i];if(!(m?wo(m,h):o(e[i],h,r)))continue e}d&&d.push(h),u.push(f)}}return u},No=a.isArrayLikeObject_1;var Lo=function(e){return No(e)?e:[]},Do=i._arrayMap,Mo=Po,xo=n._baseRest,Bo=Lo,Fo=a.last_1,Vo=xo((function(e){var t=Fo(e),r=Do(e,Bo);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?Mo(r,void 0,t):[]}));function Uo(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return jo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function jo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function zo(e,r,o){var n=e;if(n.validation)return function(e,r,o){if(e.fail_message&&e.evaluate){var n=e.evaluate;n.isValidation=!0;var a=Go(n,r,o);return"object"===t._typeof(a)?a:a||function(e){if(e.focus_parameter_ref&&e.message)return{text:e.message.default,type:e.type};return"Failed to parse failedMessage"}(e.fail_message)}throw new Error("Invalid validation schema")}(n.validation,r,o);if(n.enabled)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Go(e.evaluate,t,r);throw new Error("Invalid enabled schema")}(n.enabled,r,o);if(n.visible)return function(e,t,r){if((e.parameter_refs||e.group_refs||e.action_refs)&&e.evaluate)return Go(e.evaluate,t,r);throw new Error("Invalid visible schema")}(n.visible,r,o);if(n.enum_filter)return function(e,t,r){if(e.target&&e.evaluate)return Go(e.evaluate,t,r);throw new Error("Invalid filteredEnum schema")}(n.enum_filter,r,o);if(n.allow_change)return function(e,t,r){if((e.parameter_refs||e.group_refs)&&e.evaluate)return Go(e.evaluate,t,r);throw new Error("Invalid allow change schema")}(n.allow_change,r,o);if(n.default_value)return function(e,t,r){if(e.parameter_ref&&e.value&&e.evaluate)return Go(e.evaluate,t,r);throw new Error("Invalid conditional default schema")}(n.default_value,r,o);throw new Error("Invalid user input validation definition schema")}function Ho(e,t,r,o){return t&&t.filter&&t.filter.evaluate?qo(e,t.filter,t.filter.evaluate,r,o):o}function Go(e,r,n){if(e.or)return function(e,t,r){for(var o=0;o<e.length;o++){if(!0===Go(e[o],t,r))return!0}return!1}(e.or,r,n);if(e.and)return function(e,r,o){for(var n=0;n<e.length;n++){var a=Go(e[n],r,o);if(!1===a)return!1;if("object"===t._typeof(a))return a}return!0}(e.and,r,n);if(e.condition)return function(e,t,r,n){var a=e.op,i=e.parameter_ref,s=e.parameter_2_ref,l=e.value,u={},c=r.getPropertiesConfig();n||"null"!==c.conditionDisabledPropertyHandling||(u.filterDisabled=!0);n||"null"!==c.conditionHiddenPropertyHandling||(u.filterHidden=!0);var p,d={param:i,id:Yo(t,i)};d.value=r.getPropertyValue(d.id,u,null),d.control=r.getControl(d.id),void 0===d.control&&o.logger.warn("Control not found when validating condition for "+i);void 0!==s&&((p={param:s,id:Yo(t,s)}).value=r.getPropertyValue(p.id,u,null),p.control=r.getControl(p.id));var f=r.getConditionOp(a);if(f)return f(d,p,l,r);return o.logger.warn("Ignoring unknown condition operation '"+a+"' for parameter_ref "+i),!0}(e.condition,r,n,e.isValidation);throw new Error("Failed to parse definition")}function qo(e,t,r,i,s){if(r.or)return function(e,t,r,n,a){var i,s=[],l=Uo(r);try{for(l.s();!(i=l.n()).done;){var u=qo(e,t,i.value,n,a);s=To(s,u,o.isEqual_1)}}catch(e){l.e(e)}finally{l.f()}return s}(e,t,r.or,i,s);if(r.and)return function(e,t,r,a,i){var s,l=n.cloneDeep_1(i),u=Uo(r);try{for(u.s();!(s=u.n()).done;){var c=qo(e,t,s.value,a,l);l=Vo(l,c,o.isEqual_1)}}catch(e){u.e(e)}finally{u.f()}return l}(e,t,r.and,i,s);if(r.condition)return function(e,t,r,i,s){var l=r.op,u=[];void 0!==r.value&&null!==r.value?u.push(r.value):Array.isArray(r.values)&&u.push.apply(u,a._toConsumableArray(r.values));switch(l){case"dmMeasurement":return function(e,t){var r=n.cloneDeep_1(e);r&&(r=r.filter((function(e){var r,o=Uo(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e.metadata&&e.metadata.measure===n)return!0}}catch(e){o.e(e)}finally{o.f()}return!1})));return r}(s,u);case"dmType":return function(e,t){var r=n.cloneDeep_1(e);r&&(r=r.filter((function(e){var r,o=Uo(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e.type===n)return!0}}catch(e){o.e(e)}finally{o.f()}return!1})));return r}(s,u);case"dmModelingRole":return function(e,t){var r=n.cloneDeep_1(e);r&&(r=r.filter((function(e){var r,o=Uo(t);try{for(o.s();!(r=o.n()).done;){var n=r.value;if(e.metadata&&e.metadata.modeling_role===n)return!0}}catch(e){o.e(e)}finally{o.f()}return!1})));return r}(s,u);case"dmSharedFields":return function(e,t,r,o){var n=o;t.parameter_refs&&(n=r.filterFieldsFromSharedProps(o,t.parameter_refs,e.name));return n}(e,t,i,s);default:return o.logger.warn("Ignoring unknown condition operation '"+l+"'"),s}}(e,t,r.condition,i,s);throw new Error("Failed to parse filter definition")}function Yo(e,t){var r={},o=t.indexOf("[");return o>-1?((r=n.cloneDeep_1(e)).name=t.substring(0,o),r.col=function(e){var t=e.indexOf("[");if(t>-1){var r=e.indexOf("]");return r>-1?parseInt(e.substring(t+1,r),10):-1}return-1}(t)):r.name=t,r}function Ko(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Wo(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wo(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function $o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.getControls();Jo(e,r,t)}function Xo(e){var t={controls:e.getControlStates(),panels:e.getPanelStates(),actions:e.getActionStates()},r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var o in t)if(i.has_1(t,o)){var n=t[o];if(!n.parameterName){var a=n.name?{name:n.name}:{name:n},s=e.getPropertyValue(a);if(n.subControls)if(n.valueDef.isList||n.valueDef.isMap){if(un(a,r,e),Array.isArray(s))for(var l=0;l<s.length;l++)for(var u=0;u<n.subControls.length;u++)a.row=l,a.col=u,un(a,r,e)}else for(var c={name:a.name},p=0;p<n.subControls.length;p++)c.col=p,un(c,r,e);else un(a,r,e)}}}(e,r,t),sn(e.panelTree,t,l.PANEL_TREE_ROOT);var o=tn(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var n,a=Ko(en(o,tn(e)));try{for(a.s();!(n=a.n()).done;){Qo(n.value,e,1)}}catch(e){a.e(e)}finally{a.f()}}function Jo(e,t,r){if(Object.keys(t).length>0)for(var o in t)if(i.has_1(t,o)){var n=t[o];if(!n.parameterName)Zo(n.name?{name:n.name}:{name:n},e,r)}}function Zo(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=t.getControl(e);if(a){var i=n.cloneDeep_1(e),s=t.getPropertyValue(i);if(Array.isArray(s)){if(ln(i,t,a,r),a.subControls)if(a.valueDef.isList||a.valueDef.isMap)for(var l=0;l<s.length;l++)for(var u=0;u<a.subControls.length;u++)i.row=l,i.col=u,ln(i,t,a.subControls[u],r);else for(var c=0;c<a.subControls.length;c++){var p={name:e.name,col:c};ln(p,t,a.subControls[c],r)}else if(void 0===i.row)for(var d=0;d<s.length;d++)i.row=d,i.col=0,ln(i,t,a,r)}else ln(i,t,a,r)}else o.logger.warn("Control not found for "+e.name)}function Qo(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=t.getControl(e);if(a){var i={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},s=n.cloneDeep_1(e),u=t.getPropertyValue(s);if(Array.isArray(u)&&a.subControls)if(a.valueDef.isList||a.valueDef.isMap){un(s,i,t);for(var c=0;c<u.length;c++)for(var p=0;p<a.subControls.length;p++)s.row=c,s.col=p,un(s,i,t)}else for(var d=0;d<a.subControls.length;d++)s.col=d,un(s,i,t);else un(s,i,t);var f=tn(t);t.setControlStates(i.controls),t.setPanelStates(i.panels),t.setActionStates(i.actions);var h,m=tn(t),y=en(f,m,r),v=Ko(y);try{for(v.s();!(h=v.n()).done;){var g=h.value;Qo(g,t,r+1)}}catch(e){v.e(e)}finally{v.f()}r>0&&sn(t.panelTree,i,l.PANEL_TREE_ROOT)}else o.logger.warn("Control not found for "+e.name)}function en(e,t,r){var n=[];if(r>10)return o.logger.warn("More than 10 iteration of processing conditions found. Check your conditions for loops. Updated properties: "+JSON.stringify(t)),[];var i,s=Ko(a.union_1(Object.keys(e),Object.keys(t)));try{for(s.s();!(i=s.n()).done;){var l=i.value,u=e[l],c=t[l];o.isEqual_1(u,c)||n.push({name:l})}}catch(e){s.e(e)}finally{s.f()}return n}function tn(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),i.isEmpty_1(r)?{}:e.getPropertyValues(r)}function rn(e,t,r){var o=e[t.name];o||(o={});var n=Object.assign({},o);if(!(void 0===t.row&&void 0===t.col)||n.value!==l.STATES.HIDDEN||r!==l.STATES.DISABLED&&r!==l.STATES.ENABLED?n.value=r:n.value=l.STATES.HIDDEN,void 0!==t.col){var a=t.col.toString();if(o[a]||(o[a]={}),void 0!==t.row){var i=t.row.toString();o[a][i]||(o[a][i]={}),o[a][i].value=n.value}else o[a].value=n.value}else o.value=n.value;e[t.name]=o}function on(e,t,r,o){var n=e[t.name];n||(n={}),n.values||(n.values={}),n.values[r]||(n.values[r]={});var a=Object.assign({},n);if(!(void 0===t.row&&void 0===t.col)||a.values[r].value!==l.STATES.HIDDEN||o!==l.STATES.DISABLED&&o!==l.STATES.ENABLED?a.values[r].value=o:a.values[r].value=l.STATES.HIDDEN,void 0!==t.col){var i=t.col.toString();if(n[i]||(n[i]={}),void 0!==t.row){var s=t.row.toString();n[i][s]||(n[i][s]={}),n[i][s].values||(n[i][s].values={}),n[i][s].values[r]||(n[i][s].values[r]={}),n[i][s].values[r].value=a.values[r].value}else n[i].values||(n[i].values={}),n[i].values[r]||(n[i].values[r]={}),n[i].values[r].value=a.values[r].value}else n.values[r]=a.values[r];e[t.name]=n}function nn(e,t){var r={name:e},o=e.indexOf("[");return o>-1&&(r.name=e.substring(0,o),r.col=parseInt(e.substring(o+1,e.indexOf("]")),10)),t&&(r.row=t.row),r}function an(e,t,r,o){for(var n in e)if(i.has_1(e,n)){var a=e[n],s=1e3*w.default(n)();if(!0===a.required&&_n(a,t,r,n,s,o),"date"!==a.role&&"time"!==a.role||Sn(a,t,n,s,o),"column"===a.role){var l=n;a.valueDef.isList&&(l+="[0]"),Tn(a,t,l,s,o)}if(a.subControls){for(var u={},c=0;c<a.subControls.length;c++){u[n+"["+c+"]"]=a.subControls[c]}an(u,t,r,o)}}}function sn(e,t,r,o){var n=t.panels[r],a=o?n&&n.value===l.STATES.DISABLED:n&&(n.value===l.STATES.HIDDEN||n.value===l.STATES.DISABLED);if(a&&e[r]){if(e[r].controls){var i,s=Ko(e[r].controls);try{for(s.s();!(i=s.n()).done;){var u=i.value;o?t.controls[u].value!==l.STATES.HIDDEN&&rn(t.controls,{name:u},n.value):rn(t.controls,{name:u},n.value)}}catch(e){s.e(e)}finally{s.f()}}if(e[r].actions){var c,p=Ko(e[r].actions);try{for(p.s();!(c=p.n()).done;){var d=c.value;o?t.actions[d].value!==l.STATES.HIDDEN&&rn(t.actions,{name:d},n.value):rn(t.actions,{name:d},n.value)}}catch(e){p.e(e)}finally{p.f()}}}if(e[r]&&e[r].panels){var f,h=Ko(e[r].panels);try{for(h.s();!(f=h.n()).done;){var m=f.value;a&&(o?t.panels[m].value!==l.STATES.HIDDEN&&rn(t.panels,{name:m},n.value):rn(t.panels,{name:m},n.value)),sn(e,t,m,o)}}catch(e){h.e(e)}finally{h.f()}}}function ln(e,r,a,s){var u=!1,c=r.getDefinitions(e,l.CONDITION_TYPE.VALIDATION,l.CONDITION_DEFINITION_INDEX.CONTROLS);if(c.length>0){var p=r.getRequiredDefinitionIds();try{var d,f=!1,h=Ko(c);try{for(h.s();!(d=h.n()).done;){var m=d.value,y=l.DEFAULT_VALIDATION_MESSAGE;f=zo(m.definition,e,r);var v=!1;"object"===t._typeof(f)&&(v=!0,y={type:f.type,text:f.text});var g=n.cloneDeep_1(e);if(m.definition.validation&&m.definition.validation.fail_message&&m.definition.validation.fail_message.focus_parameter_ref&&(g=nn(m.definition.validation.fail_message.focus_parameter_ref,g)),void 0!==g.col&&void 0===a.columnIndex&&delete g.col,y.validation_id=g.name,m.definition.validation&&m.definition.validation.id&&(y.validation_id=m.definition.validation.id),void 0===g.row&&delete g.row,y.propertyId=g,y.required=p.indexOf(m.definition.validation.id)>-1,s||(y.displayError=!1),r.getErrorMessage(g,!0,!0,!1)||(u=!1),v&&!u)r.updateErrorMessage(g,y),v&&(u=!0);else if(!v&&!u){var b=r.getErrorMessage(g,!1,!1,!1);i.isEmpty_1(b)||b.validation_id!==y.validation_id||r.updateErrorMessage(g,l.DEFAULT_VALIDATION_MESSAGE)}}}catch(e){h.e(e)}finally{h.f()}}catch(e){o.logger.warn("Error thrown in validation: "+e)}}}function un(e,t,r){cn(e,t,r,l.CONDITION_TYPE.VISIBLE),cn(e,t,r,l.CONDITION_TYPE.ENABLED),cn(e,t,r,l.CONDITION_TYPE.FILTEREDENUM)}function cn(e,t,r,o){pn(r.getDefinitions(e,o,l.CONDITION_DEFINITION_INDEX.CONTROLS),e,t,r,o)}function pn(e,t,r,n,a){if(e.length>0)try{e.forEach((function(o,i){var s=zo(o.definition,t,n);switch(a){case l.CONDITION_TYPE.VISIBLE:dn(s,o.definition.visible,t,r,n,!0);break;case l.CONDITION_TYPE.ENABLED:dn(s,o.definition.enabled,t,r,n,!1);break;case l.CONDITION_TYPE.FILTEREDENUM:var u=function(e,t){var r=e[t].definition.enum_filter.target.parameter_ref,o=!0;return e.forEach((function(e,n){n>t&&e.definition.enum_filter.target.parameter_ref===r&&(o=!1)})),o}(e,i);!function(e,t,r,o,n){if(e.enum_filter.target&&e.enum_filter.target.parameter_ref){var a=r.controls,i=nn(e.enum_filter.target.parameter_ref,t),s=a[i.name];if(s||(s={}),void 0!==i.col){var l=i.col.toString();if(s[l]||(s[l]={}),void 0!==i.row){var u=i.row.toString();s[l][u]||(s[l][u]={});var c=bn(e,o,s[l][u].enumFilter,s[l][u].enumFilterApplied,n);s[l][u].enumFilter=c.values,s[l][u].enumFilterApplied=c.filterApplied}else{var p=bn(e,o,s[l].enumFilter,s[l].enumFilterApplied,n);s[l].enumFilter=p.values,s[l].enumFilterApplied=p.filterApplied}}else{var d=bn(e,o,s.enumFilter,s.enumFilterApplied,n);s.enumFilter=d.values,s.enumFilterApplied=d.filterApplied}a[i.name]=s}}(o.definition,t,r,s,u)}}))}catch(e){o.logger.warn("Error thrown in validation: "+e)}}function dn(e,t,r,o,n,a){t.parameter_refs&&fn(e,t,r,o,n,a,t.parameter_refs,"control"),t.action_refs&&fn(e,t,r,o,n,a,t.action_refs,"action"),t.group_refs&&function(e,t,r,o,n,a){var i,s=a?l.STATES.VISIBLE:l.STATES.ENABLED,u=a?l.STATES.HIDDEN:l.STATES.DISABLED,c=a?l.STATES.ENABLED:l.STATES.HIDDEN,p=Ko(t.group_refs);try{for(p.s();!(i=p.n()).done;){var d=nn(i.value),f=En(o.panels,d);if(!0===e){if(d&&f!==s&&f!==c)vn(o,d,s,n)&&hn(o,d,s,n)}else if(d&&(a||!a&&f!==c)){vn(o,d,u,n)&&hn(o,d,u,n)}}}catch(e){p.e(e)}finally{p.f()}}(e,t,0,o,n,a)}function fn(e,t,r,o,n,a,i,s){var u,c=a?l.STATES.VISIBLE:l.STATES.ENABLED,p=a?l.STATES.HIDDEN:l.STATES.DISABLED,d=a?l.STATES.ENABLED:l.STATES.HIDDEN,f="control"===s?o.controls:o.actions,h=Ko(i);try{for(h.s();!(u=h.n()).done;){var m=nn(u.value,r),y=En(f,m);if(Array.isArray(t.values)){var v,g=Ko(t.values);try{for(g.s();!(v=g.n()).done;){var b=v.value;on(f,m,b,!0===e?c:p)}}catch(e){g.e(e)}finally{g.f()}}else!0===e?m&&y!==c&&y!==d&&rn(f,m,c):m&&(a||!a&&y!==d)&&gn(o,m,p,f)}}catch(e){h.e(e)}finally{h.f()}}function hn(e,t,r,o){if(o.panelTree[t.name]){var n,a=o.panelTree[t.name],i=Ko(a.panels);try{for(i.s();!(n=i.n()).done;){var s={name:n.value};rn(e.panels,s,r),hn(e,s,r,o),r===l.STATES.ENABLED?yn(s,o,l.CONDITION_TYPE.ENABLED,e):r===l.STATES.VISIBLE&&(e.panels[t.name].disabled&&sn(o.panelTree,e,t.name,!0),yn(s,o,l.CONDITION_TYPE.ENABLED,e),yn(s,o,l.CONDITION_TYPE.VISIBLE,e))}}catch(e){i.e(e)}finally{i.f()}var u,c=Ko(a.controls);try{for(c.s();!(u=c.n()).done;){mn(e,t,r,o,{name:u.value},e.controls)}}catch(e){c.e(e)}finally{c.f()}var p,d=Ko(a.actions);try{for(d.s();!(p=d.n()).done;){mn(e,t,r,o,{name:p.value},e.actions)}}catch(e){d.e(e)}finally{d.f()}}}function mn(e,t,r,o,n,a){rn(a,n,r),r===l.STATES.ENABLED?(yn(n,o,l.CONDITION_TYPE.ENABLED,e),yn(n,o,l.CONDITION_TYPE.VISIBLE,e)):r===l.STATES.VISIBLE&&(cn(n,e,o,l.CONDITION_TYPE.VISIBLE),yn(n,o,l.CONDITION_TYPE.VISIBLE,e),e.panels[t.name].value===l.STATES.DISABLED?rn(a,n,l.STATES.DISABLED):yn(n,o,l.CONDITION_TYPE.ENABLED,e))}function yn(e,t,r,o){var n=t.getDefinitions(e,r,l.CONDITION_DEFINITION_INDEX.REFS);n.length>0&&pn(n,e,o,t,r)}function vn(e,t,r,o,n){var a=t.name;if(!e.panels[a])return rn(e.panels,t,r),!0;var i=e.panels[a].value;return((i===l.STATES.ENABLED||i===l.STATES.VISIBLE)&&(r===l.STATES.DISABLED||r===l.STATES.HIDDEN)||i===l.STATES.DISABLED&&r===l.STATES.ENABLED||i===l.STATES.HIDDEN&&r===l.STATES.VISIBLE)&&(rn(e.panels,t,r),!0)}function gn(e,t,r,o){var n=t.name;if(o[n]){var a=o[n].value;void 0!==t.col&&(o[n][t.col]&&void 0!==t.row&&o[n][t.col][t.row]?a=o[n][t.col][t.row].value:rn(o,t,r)),((a===l.STATES.ENABLED||a===l.STATES.VISIBLE)&&(r===l.STATES.DISABLED||r===l.STATES.HIDDEN)||a===l.STATES.DISABLED&&r===l.STATES.ENABLED||a===l.STATES.DISABLED&&r===l.STATES.HIDDEN||a===l.STATES.HIDDEN&&r===l.STATES.VISIBLE)&&rn(o,t,r)}else rn(o,t,r)}function bn(e,t,r,o,n){var a={values:r,filterApplied:!n&&(o||!0)},i=null;return t&&(i=e.enum_filter.target.values),!i&&o||(a.values=i,a.filterApplied=!0),n&&(a.filterApplied=!1),a}function En(e,t){var r=e[t.name];return void 0!==t.col&&r&&(r=r[t.col.toString()],void 0!==t.row&&r&&(r=r[t.row.toString()])),r?r.value:null}function _n(e,t,r,n,a,i){var s=e.label&&e.label.text?e.label.text:n,u="required_"+n+"_"+a,c={params:n,definition:{validation:{id:u,fail_message:{type:"error",message:{default:o.formatMessage(i,l.MESSAGE_KEYS.REQUIRED_ERROR,{label:s})},focus_parameter_ref:n},evaluate:{condition:{parameter_ref:n,op:"isNotEmpty"}}}}};t.controls[n]?t.controls[n].push(c):t.controls[n]=[c],r.push(u)}function Sn(e,t,r,n,a){var i=e.dateFormat?e.dateFormat:e.timeFormat,s=e.dateFormat?l.DEFAULT_DATE_FORMAT:l.DEFAULT_TIME_FORMAT,u=i||s,c={params:r,definition:{validation:{id:"Format_"+r+"_"+n,fail_message:{type:"error",message:{default:o.formatMessage(a,l.MESSAGE_KEYS.DATETIME_FORMAT_ERROR,{role:e.role,format:u})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"isDateTime",value:e.role}}}}};t.controls[r]?t.controls[r].push(c):t.controls[r]=[c]}function Tn(e,t,r,n,a){var i=e.label&&e.label.text?e.label.text:r,s={params:r,definition:{validation:{id:"validField_"+r+"_"+n,fail_message:{type:"warning",message:{default:o.formatMessage(a,l.MESSAGE_KEYS.INVALID_FIELD_ERROR,{label:i})},focus_parameter_ref:r},evaluate:{or:[{condition:{parameter_ref:r,op:"colDoesExists"}},{condition:{parameter_ref:r,op:"isEmpty"}}]}}}};t.controls[r]?t.controls[r].push(s):t.controls[r]=[s]}function In(e,r,o){if(e.value)if("string"==typeof e.value)for(var n=0;n<r.length;n++){var a=r[n];if(a.name===e.value)return"type"===o?a.type:a.metadata[o]}else if("object"===t._typeof(e.value))for(var i=0;i<r.length;i++){var s=r[i];if(s.origName===e.value.field_name&&s.schema===e.value.link_ref)return"type"===o?s.type:s.metadata[o]}return null}var Cn=i._arrayMap,Rn=Po,An=n._baseRest,kn=Lo,wn=An((function(e){var t=Cn(e,kn);return t.length&&t[0]===e[0]?Rn(t):[]}));function On(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Pn=function(r){t._inherits(n,r);var o=On(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){if(!this.props.messageInfo||this.props.tableOnly&&!this.props.inTable)return null;var e=this.props.inTable?null:A.default.createElement("span",null,this.props.messageInfo.text),t=A.default.createElement("div",{className:"icon"},A.default.createElement(l.Icon,{type:this.props.messageInfo.type})),r=this.props.inTable?A.default.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},A.default.createElement(h,{id:f.v4()+"-table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,o=l.classNames("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===l.STATES.HIDDEN||this.props.state===l.STATES.DISABLED,inTable:this.props.inTable});return A.default.createElement("div",{className:o},r,e)}}]),n}(A.default.Component),Nn=Pn;function Ln(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Dn=function(r){t._inherits(a,r);var n=Ln(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)&&Array.isArray(this.props.controlOpts.values)&&this.props.control.controlType!==o.ControlType.CUSTOM){var t=wn(this.props.value,this.props.controlOpts.values);o.isEqual_1(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"render",value:function(){var e=this.props.value;if(this.props.control.values&&this.props.control.valueLabels){var r=this.props.control.values.indexOf(this.props.value);r>-1&&this.props.control.valueLabels[r]&&(e=this.props.control.valueLabels[r])}if(null==e?e="":"object"===t._typeof(e)&&e.link_ref?e=o.stringifyFieldValue(e,this.props.control):Array.isArray(e)?e=e.join(", "):"boolean"==typeof e&&(e=e.toString()),e=je(e),this.props.control.controlType===o.ControlType.CUSTOM)e=this.props.controller.getCustomControl(this.props.propertyId,this.props.control,{table:!0,editStyle:"summary"});else if(this.props.control.controlType===o.ControlType.TIMESTAMP||this.props.control.valueDef&&this.props.control.valueDef.propType===l.DATA_TYPE.TIMESTAMP){var n=new Date(e);e=b.isValid(n)?this.props.tableControl?A.default.createElement(g.FormattedDate,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):A.default.createElement(g.FormattedDate,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}var a=A.default.createElement("span",{className:"properties-field-type",disabled:this.props.state===l.STATES.DISABLED},e),i=a;if(this.props.tableControl){var s=!0;e&&(s=!1);var u=a;this.props.control.icon&&(u=A.default.createElement("div",{className:"properties-field-readonly"},A.default.createElement("div",{className:"properties-field-type-icon"},A.default.createElement(l.Icon,{type:this.props.control.icon})),a)),i=A.default.createElement(o.TruncatedContentTooltip,{content:u,tooltipText:e,disabled:s})}return A.default.createElement("div",{className:l.classNames("properties-readonly",{hide:this.props.state===l.STATES.HIDDEN}),"data-id":Be(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,i,A.default.createElement(Nn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(A.default.Component),Mn=c.connect((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(Dn);function xn(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Bn=function(r){t._inherits(a,r);var n=xn(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=Fe(t.control,t.controller.getMaxLengthForSingleLineControls()),r.id=xe(t.propertyId),r.isList=!1,r.props.control.valueDef&&(r.props.control.valueDef.isList&&(r.isList=!0),r.defaultValue=r.props.control.valueDef.defaultValue),r}return e._createClass(a,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.isList&&(t=Ve(t,", ")),0!==t.length||void 0!==this.defaultValue&&null!==this.defaultValue||(t=null),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=!1;if(this.isList){var r=Ue(e,", ");e=r.value,t=r.truncated}else t=0!==(e=je(e)).length&&e.length!==this.props.value.length;var n=l.classNames("properties-textfield","properties-input-control",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),a=null;if(t){var i={text:o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:l.TRUNCATE_LIMIT}),type:l.CONDITION_MESSAGE_TYPE.ERROR,validation_id:this.props.control.name};a=A.default.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,A.default.createElement(Mn,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,tableControl:this.props.tableControl}),"// TODO this could conflict with the below ValidationMessage.",A.default.createElement(Nn,{inTable:this.props.tableControl,state:"",messageInfo:i}))}else{var u=ze(this.props.messageInfo,this.props.tableControl);a=A.default.createElement(s.TextInput,l._extends({},u,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===l.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()}))}var c=a;if(this.props.tableControl){var p=f.v4()+"-tooltip-column-"+this.props.propertyId.toString(),d=!0;e&&this.props.state!==l.STATES.DISABLED&&(d=!1);var m=A.default.createElement("div",{className:"properties-tooltips"},String(e));c=A.default.createElement(h,{id:p,tip:m,direction:"bottom",className:"properties-tooltips",disable:d},a)}return A.default.createElement("div",{className:n,"data-id":Be(this.props.propertyId)},c,A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(A.default.Component),Fn=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Bn);function Vn(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Un=function(r){t._inherits(a,r);var n=Vn(a);function a(t){var r;e._classCallCheck(this,a),(r=n.call(this,t)).reactIntl=t.controller.getReactIntl(),r.valuesMap={},r.iconsMap={};for(var o=0;o<t.control.values.length;++o)r.valuesMap[t.control.values[o]]=t.control.valueLabels[o],void 0!==t.control.valueIcons&&(r.iconsMap[t.control.values[o]]=t.control.valueIcons[o]);return r}return e._createClass(a,[{key:"onClick",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId)===this.props.control.values[0]?this.props.control.values[1]:this.props.control.values[0];this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"renderIcon",value:function(){var e=null;if(void 0!==this.iconsMap[this.props.value]){var t=this.iconsMap[this.props.value];e="string"==typeof t&&".svg"===t.slice(t.length-4)?A.default.createElement(O.default,{className:"bx--btn__icon",src:t}):A.default.createElement("img",{className:"bx--btn__icon",src:t,alt:""})}return e}},{key:"render",value:function(){var e=this.valuesMap[this.props.value];void 0===e&&(e=this.props.value);var t=null,r=this.props.tableControl?"ghost":"tertiary";void 0!==e&&(t=A.default.createElement(s.Button,{kind:r,size:"small",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this),iconDescription:o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===l.STATES.DISABLED},e));var n=l.classNames("properties-toggletext",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return A.default.createElement("div",{"aria-label":this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",className:n,disabled:this.props.state===l.STATES.DISABLED,"data-id":Be(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,t,A.default.createElement(Nn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(A.default.Component),jn=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Un);function zn(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Hn=function(r){t._inherits(a,r);var n=zn(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=Fe(t.control,t.controller.getMaxLengthForMultiLineControls()),r.id=xe(r.props.propertyId),r}return e._createClass(a,[{key:"handleChange",value:function(e){var t=e.target.value;-1!==this.charLimit&&t&&(t=t.substring(0,this.charLimit)),this.props.control.valueDef&&this.props.control.valueDef.isList&&(t=Ve(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=Ue(e,"\n");e=t.value;var r=t.truncated,n=null,a=ze(this.props.messageInfo,this.props.tableControl),i=!1;if(a.warn&&(i=!0,a={}),r){var u={text:o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:l.TRUNCATE_LIMIT}),type:l.CONDITION_MESSAGE_TYPE.ERROR,validation_id:this.props.control.name};a=ze(u,this.props.tableControl),n=A.default.createElement("div",null,A.default.createElement(s.TextArea,l._extends({},a,{id:this.id,disabled:!0,placeholder:this.props.control.additionalText,value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()})),A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!i,state:"",messageInfo:u}))}else n=A.default.createElement(s.TextArea,l._extends({},a,{id:this.id,disabled:this.props.state===l.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()}));var c=n;if(this.props.tableControl){var p=f.v4()+"-tooltip-column-"+this.props.propertyId.toString(),d=!0;e&&this.props.state!==l.STATES.DISABLED&&(d=!1);var m=A.default.createElement("div",{className:"properties-tooltips"},String(e));c=A.default.createElement(h,{id:p,tip:m,direction:"bottom",className:"properties-tooltips",disable:d},n)}var y=l.classNames("properties-textarea",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return A.default.createElement("div",{className:y,"data-id":Be(this.props.propertyId)},c,A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!i,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(A.default.Component),Gn=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Hn);function qn(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Yn=function(r){t._inherits(a,r);var n=qn(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).onDirection=o.onDirection.bind(t._assertThisInitialized(o)),o.generateNumber=o.generateNumber.bind(t._assertThisInitialized(o)),o.id=xe(o.props.propertyId),o}return e._createClass(a,[{key:"onDirection",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId);null==t&&(t=0);var r=t.toString().split(".")[1];this.props.control.increment=this.props.control.increment?this.props.control.increment:1;var o=this.props.control.increment.toString().split(".")[1],n="up"===e?Number(t)+this.props.control.increment:Number(t)-this.props.control.increment;if(o){var a=o.length;r&&(a=r.length>=o.length?r.length:o.length),this.props.controller.updatePropertyValue(this.props.propertyId,Number(n.toFixed(a)))}else this.props.controller.updatePropertyValue(this.props.propertyId,n)}},{key:"handleChange",value:function(e,t){if("string"!=typeof t)if(e.target.validity&&e.target.validity.badInput)this.setState({invalid:!0});else{var r=e.target.value;null==r||""===r?this.props.controller.updatePropertyValue(this.props.propertyId,null):this.props.controller.updatePropertyValue(this.props.propertyId,Number(r))}else this.onDirection(t)}},{key:"generateNumber",value:function(){var e=this.props.control.label.numberGenerator,t=e.range&&e.range.min?e.range.min:1e4,r=e.range&&e.range.max?e.range.max:99999,o=Math.floor(Math.random()*(r-t+1)+t);this.props.controller.updatePropertyValue(this.props.propertyId,o)}},{key:"render",value:function(){var e=this,t="";null!==this.props.value&&void 0!==this.props.value&&(t=this.props.value);var r,n=this.props.state===l.STATES.DISABLED,a=this.props.state===l.STATES.HIDDEN;i.has_1(this.props.control,"label.numberGenerator")&&(r=A.default.createElement(s.Button,{className:l.classNames("properties-number-generator",{hide:a}),onClick:this.generateNumber,disabled:n,kind:"tertiary",renderIcon:p.Shuffle16,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var u=l.classNames("properties-numberfield",{"numberfield-with-number-generator":i.has_1(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:a},this.props.messageInfo?this.props.messageInfo.type:null),c=ze(this.props.messageInfo,this.props.tableControl);return A.default.createElement("div",{className:u,"data-id":Be(this.props.propertyId)},A.default.createElement(s.NumberInput,l._extends({},c,{ref:function(t){return e.numberInput=t},id:this.id,onChange:this.handleChange.bind(this),disabled:n,step:this.props.control.increment,value:t,placeholder:this.props.control.additionalText,label:this.props.controlItem,hideLabel:this.props.tableControl,allowEmpty:!0,light:this.props.controller.getLight(),hideSteppers:this.props.tableControl||this.props.control.controlType===o.ControlType.NUMBERFIELD})),r,A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(A.default.Component),Kn=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Yn),Wn=S.toNumber_1;var $n=function(e){return e?Infinity===(e=Wn(e))||-Infinity===e?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var Xn=function(e){var t=$n(e),r=t%1;return t==t?r?t-r:t:0},Jn=a._baseFindIndex,Zn=o._baseIteratee,Qn=Xn,ea=Math.max;var ta=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var n=null==r?0:Qn(r);return n<0&&(n=ea(o+n,0)),Jn(e,Zn(t),n)};function ra(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var oa=function(r){t._inherits(n,r);var o=ra(n);function n(r){var a;return e._classCallCheck(this,n),(a=o.call(this,r)).getCustomButtonEnabled=a.getCustomButtonEnabled.bind(t._assertThisInitialized(a)),a.customButtonIconCallback=a.customButtonIconCallback.bind(t._assertThisInitialized(a)),a.customButtonOnClick=a.customButtonOnClick.bind(t._assertThisInitialized(a)),a.convertToolbarConfig=a.convertToolbarConfig.bind(t._assertThisInitialized(a)),a}return e._createClass(n,[{key:"getCustomButtonEnabled",value:function(e,t){var r=void 0!==e&&e===l.STATES.DISABLED,o=this.props.customButtonsState&&void 0!==this.props.customButtonsState[t.id]?this.props.customButtonsState[t.id]:t.enabled||!1;return!r&&o}},{key:"customButtonIconCallback",value:function(e,t){var r,o=this.props.controller.getHandlers().buttonIconHandler;return o&&o({type:"customButtonIcon",propertyId:this.props.propertyId,buttonId:e,carbonIcon:t},(function(e){r=e})),r}},{key:"customButtonOnClick",value:function(e){var t=this.props.controller.getHandlers().buttonHandler;t&&t({type:"custom_button",propertyId:this.props.propertyId,buttonId:e})}},{key:"convertToolbarConfig",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[];return r.forEach((function(r){var n=t.getCustomButtonEnabled(e,r),a={action:r.id,enable:n};r.icon?a.iconEnabled=r.icon:r.carbonIcon&&(a.iconEnabled=t.customButtonIconCallback(r.id,r.carbonIcon)),r.label&&(a.label=r.label.text,a.incLabelWithIcon="before"),r.description&&(a.tooltip=r.description.text),r.divider&&"before"===r.divider&&o.push({divider:!0}),o.push(a),r.divider&&"after"===r.divider&&o.push({divider:!0})})),o}},{key:"render",value:function(){var e={leftBar:this.convertToolbarConfig(this.props.tableState,this.props.customButtons)};return A.default.createElement("div",{className:"properties-custom-table-buttons"},A.default.createElement(S.Toolbar,{config:e,instanceId:0,toolbarActionHandler:this.customButtonOnClick}))}}]),n}(A.default.Component);function na(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var aa=function(r){t._inherits(i,r);var a=na(i);function i(r){var o;return e._classCallCheck(this,i),(o=a.call(this,r)).showSubPanel=o.showSubPanel.bind(t._assertThisInitialized(o)),o.onSubPanelHidden=o.onSubPanelHidden.bind(t._assertThisInitialized(o)),o}return e._createClass(i,[{key:"onSubPanelHidden",value:function(e){e||(this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.setErrorMessages(this.initialMessages),this.props.controller.setControlStates(this.initialStates))}},{key:"showSubPanel",value:function(){this.initialControlValue=n.cloneDeep_1(this.props.controller.getPropertyValue(this.props.propertyId)),this.initialMessages=this.props.controller.getAllErrorMessages(),this.initialStates=this.props.controller.getControlStates(),this.subPanelInvoker.showSubDialog(this.props.title,this.props.panel,this.onSubPanelHidden)}},{key:"render",value:function(){var e=this,t=void 0!==this.props.disabled&&this.props.disabled,r=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.SUBPANEL_BUTTON_TOOLTIP),n=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.APPLYBUTTON_LABEL),a=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.REJECTBUTTON_LABEL),i=this.props.buttonIcon?this.props.buttonIcon:this.props.label||"";return A.default.createElement(Ze,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:n,rejectLabel:a,controller:this.props.controller},A.default.createElement("div",null,A.default.createElement(h,{id:f.v4()+"-tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},A.default.createElement(s.Button,{className:"properties-subpanel-button",type:"button",size:"small",kind:"secondary",onClick:this.showSubPanel,disabled:t,"aria-label":r},i))))}}]),i}(A.default.Component);function ia(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return sa(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sa(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function sa(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function la(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ua=function(r){t._inherits(i,r);var a=la(i);function i(r){var o;return e._classCallCheck(this,i),(o=a.call(this,r)).state={filterText:null,enableRemoveIcon:!1},o.onPanelContainer=[],o.allowColumnControls=!1,o.isReadonlyTable=o.isReadonlyTable.bind(t._assertThisInitialized(o)),o.indexOfColumn=o.indexOfColumn.bind(t._assertThisInitialized(o)),o.setCurrentControlValueSelected=o.setCurrentControlValueSelected.bind(t._assertThisInitialized(o)),o.setReadOnlyColumnValue=o.setReadOnlyColumnValue.bind(t._assertThisInitialized(o)),o.removeSelected=o.removeSelected.bind(t._assertThisInitialized(o)),o.updateRowSelections=o.updateRowSelections.bind(t._assertThisInitialized(o)),o.handleRowClick=o.handleRowClick.bind(t._assertThisInitialized(o)),o.createTable=o.createTable.bind(t._assertThisInitialized(o)),o.onFilter=o.onFilter.bind(t._assertThisInitialized(o)),o.onSort=o.onSort.bind(t._assertThisInitialized(o)),o.setScrollToRow=o.setScrollToRow.bind(t._assertThisInitialized(o)),o.includeInFilter=o.includeInFilter.bind(t._assertThisInitialized(o)),o.makeAddRemoveButtonPanel=o.makeAddRemoveButtonPanel.bind(t._assertThisInitialized(o)),o.makeEditButtonPanel=o.makeEditButtonPanel.bind(t._assertThisInitialized(o)),o.makeCustomButtonsPanel=o.makeCustomButtonsPanel.bind(t._assertThisInitialized(o)),o.buildChildItem=o.buildChildItem.bind(t._assertThisInitialized(o)),o.makeCells=o.makeCells.bind(t._assertThisInitialized(o)),o.checkedAll=o.checkedAll.bind(t._assertThisInitialized(o)),r.selectedRows&&r.selectedRows.length>0&&(o.scrollToRow=r.selectedRows[r.selectedRows.length-1]),o.selectSummaryPropertyName="table-multi-select-edit-property-"+r.control.name,r.controller.saveControls([{name:o.selectSummaryPropertyName}]),o.setSelectedSummaryRowValue(r.selectedRows),o}return e._createClass(i,[{key:"componentDidMount",value:function(){if(this.props.control.subControls){var e=this.setReadOnlyColumnValue();this.props.controller.updatePropertyValue(this.props.propertyId,e,!0)}}},{key:"componentDidUpdate",value:function(){this.isSelectSummaryEdit(this.props.selectedRows)&&this.updateSelectedRowsValues()}},{key:"componentWillUnmount",value:function(){this.props.controller.removePropertyValue({name:this.selectSummaryPropertyName})}},{key:"onFilter",value:function(e){this.setState({filterText:e})}},{key:"onSort",value:function(e){for(var t=this.props.value,r=-1,n=0;n<this.props.control.subControls.length;n++)if(this.props.control.subControls[n].name===e.column){r=n;break}r>-1&&(t=o.sortBy_1(t,(function(e){return e[r]})),e.direction===l.SORT_DIRECTION.DESC&&t.reverse(),this.setCurrentControlValueSelected(t,[]))}},{key:"getOnPanelContainer",value:function(e){return 0===this.onPanelContainer.length||0===e.length||this.isSelectSummaryEdit(e)?A.default.createElement("div",null):A.default.createElement("div",{className:"properties-onpanel-container"},this.onPanelContainer[e[0]])}},{key:"getDefaultRow",value:function(){var e=[];if(this.props.control.defaultRow){var t,r=ia(this.props.control.defaultRow);try{for(r.s();!(t=r.n()).done;){var o=t.value;null!=o&&o.parameterRef?e.push(this.props.controller.getPropertyValue({name:o.parameterRef})):e.push(o)}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"setScrollToRow",value:function(e){this.scrollToRow=e}},{key:"setCurrentControlValueSelected",value:function(e,t){var r=e;if(this.props.control.subControls&&(r=this.setReadOnlyColumnValue(e)),Array.isArray(r))for(var n=0;n<r.length;n++){var a=r[n];if(Array.isArray(a))for(var i=0;i<this.props.control.subControls.length;i++){var s=this.props.control.subControls[i];"column"===s.role&&"structure"===s.valueDef.propType&&(r[n][i]=o.fieldStringToValue(a[i],s,this.props.controller))}else"column"===this.props.control.role&&"structure"===this.props.control.valueDef.propType&&(r[n]=o.fieldStringToValue(a,this.props.control,this.props.controller))}this.props.controller.updatePropertyValue(this.props.propertyId,r);var l=Array.isArray(t)?t:[];this.updateRowSelections(l)}},{key:"setReadOnlyColumnValue",value:function(e){var t=e||this.props.value;if(!Array.isArray(t))return t;for(var r=0;r<t.length;r++)for(var n=0;n<this.props.control.subControls.length;n++){var a=this.props.control.subControls[n];if(a.controlType===o.ControlType.READONLY&&a.generatedValues&&"index"===a.generatedValues.operation){var i=void 0!==a.generatedValues.startValue?a.generatedValues.startValue+r:r+1;t[r][n]=i}}return t}},{key:"setSelectedSummaryRowValue",value:function(e){if(this.isSelectSummaryEdit(e)){var t={name:this.selectSummaryPropertyName},r=this.props.controller.getPropertyValue(t);r||(r=[this.getDefaultRow()],this.props.controller.updatePropertyValue(t,r,!0)),this.selectedSummaryRowValue=n.cloneDeep_1(r)}}},{key:"isSelectSummaryEdit",value:function(e){return this.props.control.rowSelection===l.ROW_SELECTION.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===o.ControlType.READONLYTABLE}},{key:"indexOfColumn",value:function(e){return ta(this.props.control.subControls,(function(t){return t.name===e}))}},{key:"handleRowClick",value:function(e,t){var r=this.props.selectedRows;if(this.props.control.rowSelection===l.ROW_SELECTION.SINGLE)r=[e];else if(!0===t.metaKey||!0===t.ctrlKey){var o=r.indexOf(e);o>=0?r.splice(o,1):r=r.concat(e)}else if(!0===t.shiftKey){for(var n=r.length>0?r[0]:e,a=(n>e?n:e)+1,i=[],s=n>e?e:n;s<a;s++)i.push(s);r=i}this.updateRowSelections(r)}},{key:"updateSelectedRowsValues",value:function(){var e=this,t={name:this.selectSummaryPropertyName},r=this.props.controller.getPropertyValue(t);r&&Array.isArray(r)&&(r[0].forEach((function(t,r){if(!o.isEqual_1(t,e.selectedSummaryRowValue[0][r])){var n=void 0===t?null:t;e.props.selectedRows.forEach((function(t){e.props.controller.updatePropertyValue({name:e.props.control.name,row:t,col:r},n,!0)}))}})),this.selectedSummaryRowValue=n.cloneDeep_1(r))}},{key:"updateRowSelections",value:function(e){this.props.controller.updateSelectedRows(this.props.propertyId,e),this.props.rightFlyout&&this.setState({enableRemoveIcon:0!==e.length}),this.setSelectedSummaryRowValue(e)}},{key:"removeSelected",value:function(){for(var e=this.props.value,t=this.props.selectedRows.sort((function(e,t){return t-e})),r=0;r<t.length;r++)e.splice(t[r],1),this.props.controller.removeErrorMessageRow({name:this.props.propertyId.name,row:t[r]});this.setCurrentControlValueSelected(e)}},{key:"_makeCell",value:function(e,t,r,a,i,s,u){var c={name:r,row:a,col:i},p=n.cloneDeep_1(this.props.propertyId),d=c;u||p.name===c.name||(d=this.props.controller.setChildPropertyId(p,c));var f,h={table:!0,allowColumnControls:this.allowColumnControls},m=this.props.controller.getControlFactory(),y=Object.assign({},e),v=y.className?y.className:"";if(e.dmImage){var g=this.props.controller.getDatasetMetadataFields(),b=o.stringifyFieldValue(this.props.controller.getPropertyValue(d),e,!0);y.icon=o.getDMFieldIcon(g,b,e.dmImage)}return this.isReadonlyTable()?f=A.default.createElement("div",{className:l.classNames("properties-table-cell-control",v)},A.default.createElement(Mn,{control:this.props.controller.getControl(d),propertyId:d,controller:this.props.controller,tableControl:!0})):e.editStyle===o.EditStyle.SUBPANEL||e.editStyle===o.EditStyle.ON_PANEL?u?f=A.default.createElement("div",null):(f=A.default.createElement("div",{className:l.classNames("properties-table-cell-control",v)},A.default.createElement(Mn,{control:this.props.controller.getControl(d),propertyId:d,controller:this.props.controller,tableControl:!0})),e.editStyle===o.EditStyle.ON_PANEL&&this.onPanelContainer[a].push(A.default.createElement("div",{key:i},A.default.createElement("br",null),m.createControlItem(e,d)))):(h.editStyle=o.EditStyle.INLINE,f=A.default.createElement("div",{className:l.classNames("properties-table-cell-control",v)},m.createControl(y,d,h))),{column:e.name,width:e.width,content:f,className:v,value:this.props.controller.getPropertyValue(d)}}},{key:"_getCustomCtrlContent",value:function(e,t,r,n){var a=r;return t.controlType===o.ControlType.CUSTOM&&(n.editStyle="summary",a=this.props.controller.getCustomControl(e,t,n)),a}},{key:"_getDisabledStatus",value:function(e,t){return void 0!==t&&t===l.STATES.DISABLED||this.props.controller.getControlState(e)===l.STATES.DISABLED}},{key:"includeInFilter",value:function(e){if(!this.state.filterText||0===this.state.filterText.length)return!0;for(var t=this.props.value,r=0;r<this.filterFields.length;r++)for(var o=0;o<this.props.control.subControls.length;o++){if(this.props.control.subControls[o].name===this.filterFields[r]){var n=t[e][o];if("string"==typeof n&&n.toLowerCase().indexOf(this.state.filterText.toLowerCase())>-1)return!0;break}}return!1}},{key:"hasFilter",value:function(){var e=!1;if(this.props.control.subControls){var t,r=ia(this.props.control.subControls);try{for(r.s();!(t=r.n()).done;){if(t.value.filterable){e=!0;break}}}catch(e){r.e(e)}finally{r.f()}}return e}},{key:"addOnClick",value:function(e){this.addOnClickCallback&&this.addOnClickCallback(e,this.onFieldPickerCloseCallback)}},{key:"makeSelectedEditRow",value:function(e){if(e&&Array.isArray(e)&&e.length>1){var t=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.MULTI_SELECTED_ROW_LABEL),r=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.MULTI_SELECTED_ROW_ACTION),n=e.length+" "+t+" "+r,a=[],i=!1===this.props.control.header?[]:this.makeHeader([],[]),s=this.props.controller.getPropertyValue({name:this.selectSummaryPropertyName});this.makeCells(a,s,null,this.selectSummaryPropertyName,!0);var u=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return A.default.createElement("div",{className:"properties-at-selectedEditRows"},A.default.createElement("div",{className:"properties-selectedEditRows-title"},A.default.createElement("span",null,n)),A.default.createElement(T.FlexibleTable,{showHeader:!1,columns:i,data:a,rows:0,scrollKey:this.selectSummaryPropertyName,tableLabel:u,summaryTable:!0,rowSelection:l.ROW_SELECTION.MULTIPLE,light:this.props.controller.getLight()}))}return null}},{key:"makeAddRemoveButtonPanel",value:function(e,t){this.onFieldPickerCloseCallback=t&&t.fieldPickerCloseFunction?t.fieldPickerCloseFunction.bind(this):null;var r=t&&t.removeButtonFunction?t.removeButtonFunction:this.removeSelected,n=t&&t.removeButtonLabel?t.removeButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.STRUCTURETABLE_REMOVEBUTTON_LABEL),a=!this.state.enableRemoveIcon||e===l.STATES.DISABLED,i=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var u=t&&t.addButtonLabel?t.addButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL);return e===l.STATES.DISABLED&&(i=!0,this.addOnClickCallback=null),A.default.createElement("div",{className:"properties-at-buttons-container"},A.default.createElement(s.Button,{className:"properties-remove-fields-button",disabled:a,onClick:r,size:"small",kind:"ghost",renderIcon:p.TrashCan16},n),A.default.createElement(s.Button,{className:"properties-add-fields-button",disabled:i,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:p.Add16},u))}},{key:"makeEditButtonPanel",value:function(e,t){var r=null;return t&&t.editCallback&&(this.editOnClickCallback=t.editCallback,r=A.default.createElement("div",{className:"properties-at-buttons-container"},A.default.createElement(s.Button,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:p.Edit16},t.label))),r}},{key:"makeCustomButtonsPanel",value:function(e,t){var r=null;return t&&(r=A.default.createElement("div",{className:"properties-at-buttons-container"},A.default.createElement(oa,{controller:this.props.controller,propertyId:this.props.propertyId,tableState:e,customButtons:t,customButtonsState:this.props.tableButtons}))),r}},{key:"editOnClick",value:function(e){this.editOnClickCallback&&this.editOnClickCallback(e)}},{key:"checkedAllValue",value:function(e,t){var r=this.props.value;if(Array.isArray(r)){for(var o=0;o<r.length;o++){var n={name:this.props.control.name,row:o,col:e};this.props.controller.getControlState(n)!==l.STATES.DISABLED&&this.props.controller.updatePropertyValue(n,t)}this.checkedAll[e]=t}}},{key:"checkedAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;for(var r=0;r<t.length;r++){var o={name:this.props.control.name,row:r,col:e};if(this.props.controller.getControlState(o)!==l.STATES.DISABLED&&!t[r][e])return!1}return!0}},{key:"disabledAll",value:function(e){var t=this.props.value;if(!Array.isArray(t))return!1;if(0===t.length)return!1;var r,o=ia(t);try{for(o.s();!(r=o.n()).done;){if(!1===r.value[e])return!1}}catch(e){o.e(e)}finally{o.f()}return!0}},{key:"createTable",value:function(e,t,r){var o=[],n=[],a=[];this.filterFields=a;var i=this.makeHeader(n,a),s=!1!==this.props.control.header,u=this.props.value;this.makeCells(o,u,e);var c,p=this.props.control.rowSelection===l.ROW_SELECTION.MULTIPLE?this.makeSelectedEditRow(this.props.selectedRows):null,d=A.default.createElement("div",null);r?d=this.makeCustomButtonsPanel(e,r):this.isReadonlyTable()?d=this.makeEditButtonPanel(e,t):this.props.addRemoveRows&&(d=this.makeAddRemoveButtonPanel(e,t)),Number.isInteger(this.scrollToRow)&&o.length>this.scrollToRow&&(c=this.scrollToRow,delete this.scrollToRow);var f,h=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";this.isReadonlyTable()&&this.props.control.rowSelection===l.ROW_SELECTION.SINGLE||(f=this.props.control.rowSelection===l.ROW_SELECTION.SINGLE?this.handleRowClick:this.updateRowSelections);var m=A.default.createElement(T.FlexibleTable,{sortable:n,filterable:a,columns:i,data:o,showHeader:s,scrollToRow:c,onFilter:this.onFilter,onSort:this.onSort,topRightPanel:d,selectedEditRow:p,scrollKey:this.props.control.name,tableState:e,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId),rows:this.props.control.rows,tableLabel:h,updateRowSelections:f,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,light:this.props.controller.getLight()});return A.default.createElement("div",null,m)}},{key:"makeHeader",value:function(e,t){for(var r=[],n=0;n<this.props.control.subControls.length;n++){var a=this.props.control.subControls[n],i=this.props.control.name+n,u=this.props.controller.getControlState({name:this.props.control.name,col:n}),c=u===l.STATES.DISABLED||u===l.STATES.HIDDEN,p=a.controlType===o.ControlType.CHECKBOX?A.default.createElement(s.Checkbox,{disabled:c,id:i,checked:this.checkedAll(n),onChange:this.checkedAllValue.bind(this,n),labelText:a.label.text}):a.label.text;a.visible&&a.controlType!==o.ControlType.HIDDEN&&(a.sortable&&e.push(a.name),r.push({key:a.name,label:p,width:a.width,description:a.description?a.description.text:null,operation:a.generatedValues&&a.generatedValues.operation?a.generatedValues.operation:null}),a.filterable&&t.push(a.name))}return this.props.control.childItem&&!this.isReadonlyTable()&&r.push({key:"subpanel",label:"",width:l.TABLE_SUBPANEL_BUTTON_WIDTH}),r}},{key:"makeCells",value:function(e,t,r,n,a){if(Array.isArray(t))for(var i=n||this.props.control.name,s=0;s<t.length;s++){var l=[];if(this.onPanelContainer[s]=[],this.includeInFilter(s)||a){for(var u=0;u<this.props.control.subControls.length;u++){var c=this.props.control.subControls[u];if(c.visible||c.editStyle===o.EditStyle.ON_PANEL){var p=this._makeCell(c,t,i,s,u,r,a);c.visible&&l.push(p)}}if(this.props.control.childItem&&!a&&!this.isReadonlyTable()){var d=this.buildChildItem(i,s,r);l.push(d)}e.push({columns:l})}}}},{key:"buildChildItem",value:function(e,t,r){var o={name:e,row:t},a=n.cloneDeep_1(this.props.propertyId),i=o;a.name!==o.name&&(i=this.props.controller.setChildPropertyId(a,o));var s=this.props.buildUIItem(t,this.props.control.childItem,i,this.indexOfColumn),u=A.default.createElement(l.Icon,{type:l.CARBON_ICONS.SETTINGS}),c=A.default.createElement("div",{className:"properties-table-subcell"},A.default.createElement(aa,{label:s.props.label,title:s.props.title,panel:s.props.panel,buttonIcon:u,disabled:r===l.STATES.DISABLED,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:l.TABLE_SUBPANEL_BUTTON_WIDTH,content:c}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=0!==e.selectedRows.length;return t.enableRemoveIcon!==r?{enableRemoveIcon:r}:{}}}]),i}(A.default.Component);function ca(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}ua.defaultProps={addRemoveRows:!0};var pa=function(r){t._inherits(a,r);var n=ca(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).getEmptyTableText=o.getEmptyTableText.bind(t._assertThisInitialized(o)),o.isReadonlyTable=o.isReadonlyTable.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"getEmptyTableText",value:function(){var e="".concat(this.props.control.name,".empty.table.text"),t=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.PROPERTIES_EMPTY_TABLE_TEXT,{button_label:this.props.emptyTableButtonLabel});return this.props.controller.getResource(e,t)}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===o.ControlType.READONLYTABLE}},{key:"render",value:function(){var e=this.getEmptyTableText();return A.default.createElement("div",{className:"properties-empty-table",disabled:this.props.disabled},A.default.createElement("span",null,e),A.default.createElement("br",null),A.default.createElement(s.Button,{className:"properties-empty-table-button",kind:"tertiary",size:"small",renderIcon:this.isReadonlyTable()?p.Edit16:p.Add16,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}]),a}(A.default.Component),da=pa;function fa(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ha=function(r){t._inherits(a,r);var n=fa(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).getTableRowMoveImages=o.getTableRowMoveImages.bind(t._assertThisInitialized(o)),o.topMoveRow=o.topMoveRow.bind(t._assertThisInitialized(o)),o.upMoveRow=o.upMoveRow.bind(t._assertThisInitialized(o)),o.downMoveRow=o.downMoveRow.bind(t._assertThisInitialized(o)),o.bottomMoveRow=o.bottomMoveRow.bind(t._assertThisInitialized(o)),o.getMoveableTableRows=o.getMoveableTableRows.bind(t._assertThisInitialized(o)),o.getLeastValue=o.getLeastValue.bind(t._assertThisInitialized(o)),o.getMaxValue=o.getMaxValue.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"getMoveableTableRows",value:function(){var e=null;if(void 0!==this.props.control.moveableRows&&this.props.control.moveableRows){var t=this.getTableRowMoveImages();e=A.default.createElement("div",{className:"properties-mr-button-container"},t)}var r=A.default.createElement("table",{role:"presentation",className:"properties-mr-table-container"},A.default.createElement("tbody",null,A.default.createElement("tr",{className:l.classNames("properties-mr-table-content",{disabled:this.props.disabled})},A.default.createElement("td",null,this.props.tableContainer),A.default.createElement("td",null,e))));return A.default.createElement("div",null,r)}},{key:"getTableRowMoveImages",value:function(){var e=this.props.controller.getSelectedRows(this.props.propertyId).sort(),t=this.props.controller.getPropertyValue(this.props.propertyId),r=!this.props.disableRowMoveButtons&&0!==e.length&&0!==e[0]&&!this.props.disabled,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled,a=this.props.controller.getStaticRows(this.props.propertyId).sort();e.length>0&&a.length>0&&a.includes(e[0])?(r=!1,n=!1):e[0]===a[a.length-1]+1?(r=!1,n=!this.props.disableRowMoveButtons&&0!==e.length&&e[e.length-1]!==t.length-1&&!this.props.disabled):e[0]===a[0]-1&&(n=!1);var i=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_TOP_DESCRIPTION),u=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_UP_DESCRIPTION),c=A.default.createElement("div",{key:"topImages"},A.default.createElement(s.Button,{className:"table-row-move-button",onClick:this.topMoveRow,disabled:!r,kind:"ghost",renderIcon:p.UpToTop24,iconDescription:i,tooltipPosition:"left",hasIconOnly:!0}),A.default.createElement(s.Button,{className:"table-row-move-button",onClick:this.upMoveRow,disabled:!r,kind:"ghost",renderIcon:p.ArrowUp24,iconDescription:u,tooltipPosition:"left",hasIconOnly:!0})),d=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_DOWN_DESCRIPTION),f=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_BOTTOM_DESCRIPTION);return[c,A.default.createElement("div",{key:"bottomImages"},A.default.createElement(s.Button,{className:"table-row-move-button",onClick:this.downMoveRow,disabled:!n,kind:"ghost",renderIcon:p.ArrowDown24,iconDescription:d,tooltipPosition:"left",hasIconOnly:!0}),A.default.createElement(s.Button,{className:"table-row-move-button",onClick:this.bottomMoveRow,disabled:!n,kind:"ghost",renderIcon:p.DownToBottom24,iconDescription:f,tooltipPosition:"left",hasIconOnly:!0}))]}},{key:"getLeastValue",value:function(){var e=0,t=this.props.controller.getStaticRows(this.props.propertyId).sort();return t&&t.length>0&&t.includes(0)&&(e=t[t.length-1]),e}},{key:"getMaxValue",value:function(){var e=this.props.controller.getPropertyValue(this.props.propertyId),t=e.length-1,r=this.props.controller.getStaticRows(this.props.propertyId).sort();return r&&r.length>0&&r.includes(e.length-1)&&(t=r[0]-1),t}},{key:"topMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),o=this.getLeastValue(),n=this.props.controller.getStaticRows(this.props.propertyId).sort(),a=t[0];a>o;a--)for(var i=0;i<=t.length-1;i++)if(n.length>0&&t[0]>o+1||0===n.length){var s=t.shift(),l=r[s-1];r[s-1]=r[s],r[s]=l,t.push(s-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,s,s-1)}t.length>0&&this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}},{key:"upMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.getLeastValue(),o=this.props.controller.getStaticRows(this.props.propertyId).sort();if(0!==t.length&&t[0]>r){for(var n=this.props.controller.getPropertyValue(this.props.propertyId),a=0;a<=t.length-1;a++)if(o.length>0&&t[0]>r+1){var i=t.shift(),s=n[i-1];n[i-1]=n[i],n[i]=s,t.push(i-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i-1)}else if(0===o.length){var l=t.shift();if(0!==l){var u=n[l-1];n[l-1]=n[l],n[l]=u,t.push(l-1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,l,l-1)}}this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(n,t)}}},{key:"downMoveRow",value:function(e){var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),o=this.getMaxValue();if(0!==t.length&&t[t.length-1]!==r.length-1){for(var n=t.length-1;n>=0;n--){var a=t.pop();if(a!==o){var i=r[a+1];r[a+1]=r[a],r[a]=i,t.unshift(a+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,a,a+1)}}t.length>1?this.props.setScrollToRow(t[t.length-1]):this.props.setScrollToRow(t[0]),this.props.setCurrentControlValueSelected(r,t)}}},{key:"bottomMoveRow",value:function(e){for(var t=this.props.controller.getSelectedRows(this.props.propertyId).sort((function(e,t){return e-t})),r=this.props.controller.getPropertyValue(this.props.propertyId),o=this.getMaxValue(),n=t[t.length-1];n<o;n++)for(var a=t.length-1;a>=0;a--){var i=t.pop(),s=r[i+1];r[i+1]=r[i],r[i]=s,t.unshift(i+1),this.props.controller.moveErrorMessageRows(this.props.propertyId.name,i,i+1)}t.length>0&&this.props.setScrollToRow(t[t.length-1]),this.props.setCurrentControlValueSelected(r,t)}},{key:"render",value:function(){return this.props.isEmptyTable&&this.props.addRemoveRows?A.default.createElement(da,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.props.emptyTableButtonLabel,emptyTableButtonClickHandler:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled}):this.getMoveableTableRows()}}]),a}(A.default.Component);ha.defaultProps={addRemoveRows:!0};var ma=c.connect((function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(ha);function ya(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var va=[o.Type.INTEGER,o.Type.DOUBLE,o.Type.LONG],ga=function(r){t._inherits(a,r);var n=ya(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).addRow=o.addRow.bind(t._assertThisInitialized(o)),o.reactIntl=r.controller.getReactIntl(),o}return e._createClass(a,[{key:"addRow",value:function(){var e=this.props.controller.getControlPropType(this.props.propertyId),t=va.indexOf(e)>-1?null:"",r=this.props.controller.getPropertyValue(this.props.propertyId);void 0===r&&(r=[]);var o=r.concat([t]);this.setCurrentControlValueSelected(o)}},{key:"makeCell",value:function(e,t,r,o){return va.indexOf(r)>-1?A.default.createElement("div",{className:"properties-table-cell-control"},A.default.createElement(Kn,{control:e,propertyId:t,controller:this.props.controller,controlItem:o,tableControl:!0})):A.default.createElement("div",{className:"properties-table-cell-control"},A.default.createElement(Fn,{control:e,propertyId:t,controller:this.props.controller,controlItem:o,tableControl:!0}))}},{key:"makeRows",value:function(e,t,r){var o=[];if(e)for(var n=0;n<e.length;n++){var a=[],i={name:this.props.control.name,row:n};if(this.props.propertyId.name!==i.name){var s=Object.assign({},this.props.propertyId);i=this.props.controller.setChildPropertyId(s,{name:this.props.control.name,row:n})}var l=this.props.controller.getControlPropType(i),u=void 0===r||0===r.length?"":r[0].label,c=this.makeCell({},i,l,u);a.push({key:n+"-0-value",column:"value",content:c}),o.push({key:n,onClickCallback:this.handleRowClick.bind(this,n,!1),columns:a,className:"list-table-row"})}return o}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"value",label:o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.LIST_TABLE_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={addButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},n=this.makeRows(this.props.value,this.props.state,t),a=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var s=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",u=A.default.createElement(T.FlexibleTable,{columns:t,data:n,scrollToRow:e,topRightPanel:a,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:s,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()}),c=A.default.createElement("div",null,A.default.createElement("div",{className:"properties-list-table"},u),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo}));return A.default.createElement("div",{"data-id":Be(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,A.default.createElement(ma,{tableContainer:c,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===l.STATES.DISABLED,isEmptyTable:i.isEmpty_1(this.props.value),emptyTableButtonLabel:r.addButtonLabel,emptyTableButtonClickHandler:this.addRow}))}}]),a}(ua);ga.propTypes={control:P.default.object.isRequired,propertyId:P.default.object.isRequired,controller:P.default.object.isRequired,controlItem:P.default.element,selectedRows:P.default.array,state:P.default.string,value:P.default.array,messageInfo:P.default.object,addRemoveRows:P.default.bool,tableButtons:P.default.object};var ba=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(ga);function Ea(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var _a=function(r){t._inherits(a,r);var n=Ea(a);function a(r){var i;return e._classCallCheck(this,a),(i=n.call(this,r)).reactIntl=r.controller.getReactIntl(),i.recentUseCat=o.formatMessage(i.reactIntl,l.MESSAGE_KEYS.EXPRESSION_RECENTLY_USED),i.recentUseCatInfo={id:i.recentUseCat,locLabel:i.recentUseCat,field_columns:{field_column_info:{locLabel:o.formatMessage(i.reactIntl,l.MESSAGE_KEYS.EXPRESSION_RECENTLY_USED_COLUMN)},value_column_info:{locLabel:o.formatMessage(i.reactIntl,l.MESSAGE_KEYS.EXPRESSION_VALUE_COLUMN)}}},i.inCategories=Object.keys(r.functionList),i.fields=i._makeDatasetFields(r.controller.getDatasetMetadataFields(),r.controller.getExpressionInfo().fields),i.state={fieldSelected:0,valueSelected:0,functionSelected:0,fieldTableSortSpec:null,valuesTableSortSpec:null,functionTableSortSpec:null,functionCategory:i.inCategories[0],selectedIndex:0,fieldCategory:"fields",currentFieldDataset:i.fields.field_table_info[0].field_value_groups},i.controller=r.controller,i.onFunctionCatChange=i.onFunctionCatChange.bind(t._assertThisInitialized(i)),i.onFieldCatChange=i.onFieldCatChange.bind(t._assertThisInitialized(i)),i.onFieldFilter=i.onFieldFilter.bind(t._assertThisInitialized(i)),i.onValueFilter=i.onValueFilter.bind(t._assertThisInitialized(i)),i.onFunctionFilter=i.onFunctionFilter.bind(t._assertThisInitialized(i)),i.language=r.language,i.onFieldTableClick=i.onFieldTableClick.bind(t._assertThisInitialized(i)),i.onFieldTableDblClick=i.onFieldTableDblClick.bind(t._assertThisInitialized(i)),i.onFunctionTableClick=i.onFunctionTableClick.bind(t._assertThisInitialized(i)),i.onFunctionTableDblClick=i.onFunctionTableDblClick.bind(t._assertThisInitialized(i)),i.onValueTableClick=i.onValueTableClick.bind(t._assertThisInitialized(i)),i.onValueTableDblClick=i.onValueTableDblClick.bind(t._assertThisInitialized(i)),i.sortTableRows=i.sortTableRows.bind(t._assertThisInitialized(i)),i}return e._createClass(a,[{key:"onSwitch",value:function(e,t){this.setState({selectedIndex:e.index})}},{key:"onFunctionCatChange",value:function(e){this.setState({functionCategory:e.selectedItem.value,functionSelected:0})}},{key:"onFieldCatChange",value:function(e){var t=[];if(e.selectedItem.value===this.recentUseCat)t=this.props.controller.getExpressionFieldsRecentlyUsed();else for(var r=0;r<this.fields.field_table_info.length;r++)e.selectedItem.value===this.fields.field_table_info[r].id&&(t=this.fields.field_table_info[r].field_value_groups);this.setState({fieldCategory:e.selectedItem.value,fieldSelected:0,currentFieldDataset:t})}},{key:"onFieldTableClick",value:function(e,t,r){this.setState({fieldSelected:r,valueSelected:0})}},{key:"onFieldTableDblClick",value:function(e,t,r){var o=this.state.currentFieldDataset[t],n=o.id;if(this.state.fieldCategory!==this.recentUseCat&&this.props.controller.updateExpressionFieldsRecentlyUsed(o),this.props.onChange){var a="CLEM"===this.language&&"globals"!==this.state.fieldCategory?"'":"";n=a+o.id+a,this.props.onChange(n)}}},{key:"onFieldFilter",value:function(e){this.setState({fieldFilterText:e})}},{key:"onValueTableClick",value:function(e,t,r){this.setState({valueSelected:r})}},{key:"onValueTableDblClick",value:function(e,t,r){if(this.props.onChange){var o=this.state.currentFieldDataset[this.state.fieldSelected];if(o.values){var n=o.values[t].value,a="string"==typeof n?'"'+n+'"':n;this.props.onChange(a)}else o.range&&this.props.onChange(0===t?o.range.min.value:o.range.max.value)}this.setState({valueSelected:t})}},{key:"onValueFilter",value:function(e){this.setState({valueFilterText:e})}},{key:"onFunctionTableClick",value:function(e,t,r){this.setState({functionSelected:r})}},{key:"onFunctionTableDblClick",value:function(e,t,r){var o;this.state.functionCategory===this.recentUseCat?o=this.props.controller.getExpressionRecentlyUsed()[t]:(o=this.props.functionList[this.state.functionCategory].functionList[t],this.props.controller.updateExpressionRecentlyUsed(o));var n=o.value;this.props.onChange&&this.props.onChange(n)}},{key:"onFunctionFilter",value:function(e){this.setState({functionFilterText:e})}},{key:"setSortColumn",value:function(e,t){switch(e){case"fieldTable":this.setState({fieldTableSortSpec:t});break;case"valuesTable":this.setState({valuesTableSortSpec:t});break;case"functionTable":this.setState({functionTableSortSpec:t})}}},{key:"sortTableRows",value:function(e,t){var r=0;if(e.length>0){for(var n=e[0].columns,a=0;a<n.length;a++)if(n[a].column===t.column){r=a;break}var i=o.sortBy_1(e,(function(e){return e.columns[r].value}));return t.direction===l.SORT_DIRECTION.DESC&&i.reverse(),i}return e}},{key:"createContentObject",value:function(e){var t=!0;e&&(t=!1);var r=A.default.createElement("span",{className:"properties-expr-table-cell"},e),n=A.default.createElement(o.TruncatedContentTooltip,{content:r,tooltipText:e,disabled:t});return A.default.createElement("div",{className:"properties-table-cell-control"},n)}},{key:"_makeDatasetFields",value:function(e,t){var r,n,a=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FIELD_COLUMN),i=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_STORAGE_COLUMN),s=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_VALUE_COLUMN),u={id:"fields",locLabel:o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FIELDS_DROPDOWN_TITLE),field_columns:{field_column_info:{locLabel:a},value_column_info:{locLabel:s},additional_column_info:[{id:"storage",locLabel:i}]}},c={id:"fields",field_value_groups:[]};e.forEach((function(e){var t={id:e.name,additional_column_entries:[{id:"storage",value:e.type}]};e.metadata.values&&(t.values=[],e.metadata.values.forEach((function(e){t.values.push({value:e})}))),e.metadata.range&&(t.range={},e.metadata.range.min&&(t.range.min={value:e.metadata.range.min}),e.metadata.range.max&&(t.range.max={value:e.metadata.range.max})),c.field_value_groups.push(t)}));for(var p=0;p<t.field_categories.length;p++)"fields"===t.field_categories[p].id&&(r=p);for(var d=0;d<t.field_table_info.length;d++)"fields"===t.field_table_info[d].id&&(n=d);return void 0!==r?t.field_categories[r]=u:t.field_categories.unshift(u),void 0!==n?t.field_table_info[n]=c:t.field_table_info.unshift(c),t}},{key:"_makeFieldAndValuesContent",value:function(){var e=this,t=this._makeFieldDropdown(),r=[],n=[],a=["fieldName"],i=null,s=null;if(this.state.fieldCategory===this.recentUseCat)i=this.recentUseCatInfo,s={id:this.recentUseCat,field_value_groups:this.props.controller.getExpressionFieldsRecentlyUsed()};else{for(var u=0;u<this.fields.field_categories.length;u++)this.state.fieldCategory===this.fields.field_categories[u].id&&(i=this.fields.field_categories[u]);for(var c=0;c<this.fields.field_table_info.length;c++)this.state.fieldCategory===this.fields.field_table_info[c].id&&(s=this.fields.field_table_info[c])}if(i&&(r.push({key:"fieldName",label:i.field_columns.field_column_info.locLabel}),n.push({key:"values",label:i.field_columns.value_column_info.locLabel}),i.field_columns.additional_column_info))for(var p=0;p<i.field_columns.additional_column_info.length;p++)a.push(i.field_columns.additional_column_info[p].id),r.push({key:i.field_columns.additional_column_info[p].id,label:i.field_columns.additional_column_info[p].locLabel});var d=[],f=[];if(s&&s.field_value_groups)for(var h=0;h<s.field_value_groups.length;h++){var m=s.field_value_groups[h],y=[];(!this.state.fieldFilterText||0===this.state.fieldFilterText.length||m.id.toLowerCase().indexOf(this.state.fieldFilterText.toLowerCase())>-1)&&(y.push({column:"fieldName",content:this.createContentObject(m.id),value:m.id}),m.additional_column_entries&&this._makeAdditionalColumnsContent(m,y),d.push({columns:y,rowKey:h}),h===this.state.fieldSelected&&(f=this._makeValuesContent(m,f)))}var v=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(v=(d=this.sortTableRows(d,this.state.fieldTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.fieldSelected})));var g=this.state.valueSelected;null!==this.state.valuesTableSortSpec&&(g=(f=this.sortTableRows(f,this.state.valuesTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.valueSelected})));var b=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FIELDS_TABLE_LABEL),E=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_VALUES_TABLE_LABEL);return A.default.createElement("div",{className:"properties-field-and-values-table-container"},t,A.default.createElement("div",{className:"properties-field-table-container"},A.default.createElement(T.FlexibleTable,{columns:r,data:d,sortable:a,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:l.EXPRESSION_TABLE_ROWS,tableLabel:b,rowSelection:l.ROW_SELECTION.SINGLE,updateRowSelections:this.onFieldTableClick,selectedRows:[v],onRowDoubleClick:this.onFieldTableDblClick,onSort:this.setSortColumn.bind(this,"fieldTable"),light:this.props.controller.getLight()})),A.default.createElement("div",{className:"properties-value-table-container"},A.default.createElement(T.FlexibleTable,{columns:n,data:f,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:l.EXPRESSION_TABLE_ROWS,tableLabel:E,rowSelection:l.ROW_SELECTION.SINGLE,updateRowSelections:this.onValueTableClick,selectedRows:[g],onRowDoubleClick:this.onValueTableDblClick,onSort:this.setSortColumn.bind(this,"valuesTable"),light:this.props.controller.getLight()})))}},{key:"_makeValuesContent",value:function(e,t){var r=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_MIN_LABEL),n=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_MAX_LABEL);if(e.values)for(var a=0;a<e.values.length;a++)this._addValueRow(e.values[a].value,a,t);else e.range&&(e.range.min&&this._addValueRow(r+": "+e.range.min.value,0,t),e.range.max&&this._addValueRow(n+": "+e.range.max.value,1,t));return t}},{key:"_addValueRow",value:function(e,t,r){if(!this.state.valueFilterText||0===this.state.valueFilterText.length||String(e).toLowerCase().indexOf(this.state.valueFilterText.toLowerCase())>-1){var o=[{column:"values",content:this.createContentObject(e),value:e}];r.push({columns:o,rowKey:t})}}},{key:"_makeFunctionsContent",value:function(){if(this.props.functionList){var e=Object.keys(this.props.functionList),t=this._makeFunctionDropdown(e),r=this._makeFunctionsTable(e);return A.default.createElement("div",{className:"properties-expression-function-table-container"},t,r)}return A.default.createElement("span",null,"formatMessage(this.reactIntl, MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS);")}},{key:"_makeAdditionalColumnsContent",value:function(e,t){for(var r=0;r<e.additional_column_entries.length;r++)t.push({column:e.additional_column_entries[r].id,content:this.createContentObject(e.additional_column_entries[r].value),value:e.additional_column_entries[r].value})}},{key:"_makeFunctionDropdown",value:function(e){var t=this,r=e.map((function(e,r){return{value:e,label:t.props.functionList[e].locLabel}})),n=r.slice(0,1),a=r.slice(1);r=n.concat({value:this.recentUseCat,label:this.recentUseCat},a);var i=this.state.functionCategory===this.recentUseCat?this.recentUseCat:this.props.functionList[this.state.functionCategory].locLabel,u=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.TABLE_SEARCH_HEADER),c={"close.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)};return A.default.createElement("div",{className:"properties-expression-function-select"},A.default.createElement(s.Dropdown,{id:"properties-expression-function-select-dropdown-"+f.v4(),light:this.props.controller.getLight(),label:i,items:r,onChange:this.onFunctionCatChange,translateWithId:function(e){return c[e]},titleText:u}))}},{key:"_makeFieldDropdown",value:function(){for(var e=[],t=0;t<this.fields.field_categories.length;t++)e.push({value:this.fields.field_categories[t].id,label:this.fields.field_categories[t].locLabel});var r=e.slice(0,1),n=e.slice(1),a=r.concat({value:this.recentUseCat,label:this.recentUseCat},n),i=this.state.fieldCategory===this.recentUseCat?this.recentUseCat:e[0].label,u=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.TABLE_SEARCH_HEADER),c={"close.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)};return A.default.createElement("div",{className:"properties-expression-field-select"},A.default.createElement(s.Dropdown,{id:"properties-expression-field-select-dropdown-"+f.v4(),light:this.props.controller.getLight(),label:i,items:a,onChange:this.onFieldCatChange,translateWithId:function(e){return c[e]},titleText:u}))}},{key:"_makeFunctionsTable",value:function(e){var t=this,r=[],n=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FUNCTION_COLUMN),a=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_RETURN_COLUMN);r.push({key:"function",label:n,width:73}),r.push({key:"return",label:a,width:27});var i=this._buildFunctionTable(this.state.functionCategory),s=i.rows,u=this.state.functionSelected;null!==this.state.functionTableSortSpec&&(u=(s=this.sortTableRows(s,this.state.functionTableSortSpec)).findIndex((function(e){return e.rowKey===t.state.functionSelected})));var c=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FUNCTIONS_TABLE_LABEL);return A.default.createElement("div",{className:"properties-functions-table-container"},A.default.createElement("div",{className:"properties-functions-table"},A.default.createElement(T.FlexibleTable,{columns:r,data:s,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:l.EXPRESSION_TABLE_ROWS,tableLabel:c,rowSelection:l.ROW_SELECTION.SINGLE,updateRowSelections:this.onFunctionTableClick,selectedRows:[u],onRowDoubleClick:this.onFunctionTableDblClick,onSort:this.setSortColumn.bind(this,"functionTable"),light:this.props.controller.getLight()})),A.default.createElement("div",{className:"properties-help-table-container"},i.helpContainer))}},{key:"_buildFunctionTable",value:function(e){var t={rows:[],helpContainer:A.default.createElement("div",null)},r=e===this.recentUseCat?this.props.controller.getExpressionRecentlyUsed():this.props.functionList[e].functionList;if(r)for(var o=0;o<r.length;o++){var n=r[o],a=[];(!this.state.functionFilterText||0===this.state.functionFilterText.length||n.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase())>-1)&&(a.push({column:"function",content:this.createContentObject(n.locLabel),value:n.locLabel}),a.push({column:"return",content:this.createContentObject(n.return_type),value:n.return_type}),t.rows.push({columns:a,rowKey:o}),o===this.state.functionSelected&&(t.helpContainer=A.default.createElement("div",{className:"properties-function-help-text"},A.default.createElement("span",{className:"properties-function-help-command"},n.locLabel,":"),A.default.createElement("br",null),A.default.createElement("br",null),A.default.createElement("span",null,n.help))))}return t}},{key:"render",value:function(){var e=this._makeFieldAndValuesContent(),t=this._makeFunctionsContent(),r=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FIELD_TAB),n=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.EXPRESSION_FUNCTIONS_TAB),a=null;return 0===this.state.selectedIndex?a=e:1===this.state.selectedIndex&&(a=t),A.default.createElement("div",{className:"properties-expression-selection-fieldOrFunction"},A.default.createElement("div",{className:"properties-expression-selection-content-switcher"},A.default.createElement(s.ContentSwitcher,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},A.default.createElement(s.Switch,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),A.default.createElement(s.Switch,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:n}))),a)}}]),a}(A.default.Component);function Sa(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ta=function(r){t._inherits(n,r);var o=Sa(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"onOperatorClick",value:function(e,t){this.props.onChange&&this.props.onChange(e)}},{key:"_makeOperatorContent",value:function(){var e=this;if(this.props.operatorList){var t=[];return this.props.operatorList.forEach((function(r,o){var n=f.v4()+"-tooltip-expression-operator",a=A.default.createElement("div",{className:"properties-tooltips"},r.help);t.push(A.default.createElement("div",{className:"properties-operator-tooltip-container",key:"expression-operator-"+o},A.default.createElement(h,{id:n,tip:a,direction:"bottom",className:"properties-tooltips"},A.default.createElement(s.Button,{className:l.classNames("properties-operator-button",{first:o%2==0,second:!(o%2==0)}),size:"small",kind:"tertiary",onClick:e.onOperatorClick.bind(e,r.value)},A.default.createElement("div",{className:"properties-operator-button-label"},r.locLabel)))))})),A.default.createElement("div",{className:"properties-operator-container"},t)}return A.default.createElement("div",null)}},{key:"render",value:function(){var e=this._makeOperatorContent();return A.default.createElement("div",{className:"properties-expression-selection-operator"},e)}}]),n}(A.default.Component);function Ia(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ca=function(r){t._inherits(n,r);var o=Ia(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){var e=A.default.createElement(_a,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=A.default.createElement(Ta,{controller:this.props.controller,onChange:this.props.onChange,operatorList:this.props.operatorList});return A.default.createElement("div",{className:"properties-expression-selection-container"},t,e)}}]),n}(A.default.Component);function Ra(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Aa,ka=function(r){t._inherits(a,r);var n=Ra(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).selection=[],o.expressionInfo=r.controller.getExpressionInfo(),o.editorDidMount=o.editorDidMount.bind(t._assertThisInitialized(o)),o.onChange=o.onChange.bind(t._assertThisInitialized(o)),o.onBlur=o.onBlur.bind(t._assertThisInitialized(o)),o.onSelectionChange=o.onSelectionChange.bind(t._assertThisInitialized(o)),o.lastCursorPos=null,o}return e._createClass(a,[{key:"onChange",value:function(e){var t="string"==typeof e?e:e.toString(),r=this.editor.getCursor(),o=1;if(this.editor.somethingSelected())o=0,this.editor.replaceSelection(t);else{var n=" ";this.lastCursorPos&&(this.editor.setCursor(this.lastCursorPos),r=this.lastCursorPos);var a=this.editor.getLine(r.line)[r.ch-1];-1!==["(","[","{"].indexOf(a)&&(n=""),this.editor.replaceSelection(n+t)}this._setSelection(t,r,o);var i=this.editor.getValue();this.props.controller.updatePropertyValue(this.props.propertyId,i,!0),this.lastCursorPos=this.editor.getCursor()}},{key:"onSelectionChange",value:function(e){this.selection=e}},{key:"onBlur",value:function(e,t){this.lastCursorPos=e.getCursor();var r=this.editor.getValue(),o=!1;this.expressionSelectionPanel&&this.expressionSelectionPanel.contains(t.relatedTarget)&&(o=!0),this.props.controller.updatePropertyValue(this.props.propertyId,r,o)}},{key:"editorDidMount",value:function(e,t){this.editor=e}},{key:"_setSelection",value:function(e,t,r){if("string"==typeof e){var o=e.indexOf("?");if(-1!==o){var n={anchor:{line:t.line,ch:t.ch+o+r+1},head:{line:t.line,ch:t.ch+o+r}};return void this.onSelectionChange([n])}}for(var a=this.editor.lineCount(),i=0;i<a;i++){var s=this.editor.getLine(i).indexOf("?");if(-1!==s){var l={anchor:{line:i,ch:s+1},head:{line:i,ch:s}};return void this.onSelectionChange([l])}}var u={anchor:{line:t.line,ch:t.ch+e.length+r},head:{line:t.line,ch:t.ch+e.length+r}};this.onSelectionChange([u])}},{key:"render",value:function(){var e=this,t=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.EXPRESSION_BUILDER_LABEL);return A.default.createElement("div",{className:"properties-expression-builder"},A.default.createElement(Xa,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,builder:!1,editorDidMount:this.editorDidMount,selectionRange:this.selection,onSelectionChange:this.onSelectionChange,onBlur:this.onBlur,height:96,expressionLabel:t}),A.default.createElement("div",{ref:function(t){return e.expressionSelectionPanel=t}},A.default.createElement(Ca,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}]),a}(A.default.Component);function wa(e,t){for(var r=e.length,o=0;o<r;++o)t(e[o])}function Oa(e,t,r){var o,n=e.getCursor(),a=r(e,n),i=a;/^[\w$_]*$/.test(a.string)||(a=i={start:n.ch,end:n.ch,string:"",state:a.state,className:":"===a.string?"python-type":null}),o||(o=[]),o.push(i);var s=function(e,t){var r=[],o=e.string;function n(e){0!==e.lastIndexOf(o,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function a(e){wa(Da,n),wa(La,n)}if(t){var i=t.pop(),s="";for("variable"===i.type?s=i.string:"variable-3"===i.type&&(s=":"+i.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&a()}return r}(a,o);return s.sort(),{list:s,from:Aa.Pos(n.line,a.start),to:Aa.Pos(n.line,a.end)}}function Pa(e){return Oa(e,0,(function(e,t){return e.getTokenAt(t)}))}var Na,La="and del from not while as elif global or with assert else if pass yieldbreak except import print class exec in raise continue finally is return def for lambda try".split(" "),Da="abs divmod input open staticmethod all enumerate int ord str any eval isinstance pow sum basestring execfile issubclass print superbin file iter property tuple bool filter len range typebytearray float list raw_input unichr callable format locals reduce unicodechr frozenset long reload vars classmethod getattr map repr xrangecmp globals max reversed zip compile hasattr memoryview round __import__complex hash min set apply delattr help next setattr bufferdict hex object slice coerce dir id oct sorted intern ".split(" ").join("() ").split(" ");function Ma(e,t){for(var r=e.length,o=0;o<r;++o)t(e[o])}function xa(e,t,r){var o,n=e.getCursor(),a=r(e,n),i=a;/^[\w$_]*$/.test(a.string)||(a=i={start:n.ch,end:n.ch,string:"",state:a.state,className:":"===a.string?"r-type":null}),o||(o=[]),o.push(i);var s=function(e,t){var r=[],o=e.string;function n(e){0!==e.lastIndexOf(o,0)||function(e,t){if(!Array.prototype.indexOf){for(var r=e.length;r--;)if(e[r]===t)return!0;return!1}return-1!==e.indexOf(t)}(r,e)||r.push(e)}function a(e){Ma(Ua,n),Ma(Va,n)}if(t){var i=t.pop(),s="";for("variable"===i.type?s=i.string:"variable-3"===i.type&&(s=":"+i.string);null!==s&&t.length;)s=s[t.pop().string];null!==s&&a()}return r}(a,o);return s.sort(),{list:s,from:Na.Pos(n.line,a.start),to:Na.Pos(n.line,a.end)}}function Ba(e){return xa(e,0,(function(e,t){return e.getTokenAt(t)}))}var Fa,Va="function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|"),Ua="zapsmall xzfile xtfrm xor writeLines writeChar writeBin write withVisible withRestarts withinwithCallingHandlers withAutoprint with while which weekdays warnings warning version Vectorize vector vapplyvalidUTF8 validEnc utf8ToInt UseMethod url unz untracemem untrace unsplit unserialize unname unlockBinding unloadNamespaceunlist unlink unique union undebug unclass typeof tryCatch try truncate trunc trimws trigammatransform tracingState tracemem traceback trace toupper toString topenv tolower textConnectionValue textConnectiontestPlatformEquivalence tempfile tempdir tcrossprod taskCallbackManager tapply tanpi tanh tan tabulate table T t system2 systemswitch sweep svd suspendInterrupts suppressWarnings suppressPackageStartupMessages suppressMessages summary sumsubstring substr substitute subset sub strwrap structure strtrim strtoi strsplit strrep strptime strftimestopifnot stop stdout stdin stderr startsWith standardGeneric srcref srcfilecopy srcfilealias srcfile sQuote sqrt sprintf splitsource sort solve socketSelect socketConnection sinpi sink sinh single sin simplify2array simpleWarning simpleMessage simpleErrorsimpleCondition signif signalCondition sign shQuote showConnections setwd setTimeLimit setSessionTimeLimit setNamespaceInfo setHooksetequal setdiff serialize sequence seq_len seq_along seq seek searchpaths search scan scale saveRDS save sapply sample rowSumsrowsum rownames rowMeans row round RNGversion length lchoose lbeta lazyLoadDBfetch lazyLoadDBexecRNGkind rm rle rev returnValue return retracemem restartFormals restartDescription requireNamespace require replicate replace repeatrep_len rep removeTaskCallback remove regmatches registerS3methods registerS3method regexpr regexec Reduce RecallreadRenviron readRDS readLines readline readChar readBin Re rcond rbind rawToChar rawToBits rawShift rawConnectionValue rawConnectionraw rapply rank range R_system_version quote quit quarters qr q pushBackLength pushBack psigamma provideDimnames prod prmatrix printprettyNum pretty Position polyroot pmin pmax pmatch pipe pi pcre_config paste0 paste parseNamespaceFile parsepackBits packageStartupMessage packageHasNamespace packageEvent package_version outer ordered order options open OlsonNamesoldClass objects nzchar numeric_version numeric NROW nrow normalizePath norm noquote nlevels ngettext NextMethod next Negate NCOL ncolnchar nargs namespaceImportMethods namespaceImportFrom namespaceImportClasses namespaceImport namespaceExportmonths mode Mod missing min mget message merge memDecompress memCompress mean max matrix match mapply MapmakeActiveBinding ls logical logb log2 log1p log10 log lockEnvironment lockBinding local loadNamespace loadingNamespaceInfo loadedNamespacesload list2env list license licence library libcurlVersion lgamma lfactorial levels LETTERS letters lengthslazyLoad lapply labels La_version La_library l10n_info kronecker kappa julian jitter isTRUE isSymmetric isSeekable isS4 isRestart isOpenISOdatetime ISOdate isNamespaceLoaded isNamespace isIncomplete isFALSE isdebugged isBaseNamespace isattyinvokeRestartInteractively invokeRestart invisible intToUtf8 intToBits intersect acosh acos abs abbreviateinteractive interaction integer inherits importIntoEnv Im ifelse if identity identical icuSetCollate icuGetCollate iconvlist iconv Igzfile gzcon gsub grouping grepRaw grepl grep gregexpr globalenv gl getwd gettextf gettext getTaskCallbackNames getSrcLines getRversiongetOption getNativeSymbolInfo getNamespaceVersion getNamespaceUsers getNamespaceName getNamespaceInfo getNamespaceImports getNamespaceExportsgetNamespace getLoadedDLLs getHook getExportedValue geterrmessage getElement getDLLRegisteredRoutines getConnection getCallingDLLegetCallingDLL getAllConnections get0 get gctorture2 gctorture gcinfo gc gamma function forwardsolve formatDL formatC formatformals forceAndCall force for flush floor findRestart findPackageEnv findInterval Find Filter file fifo factorial factor F extSoftVersionexpression expm1 exp exists evalq eval environmentName environmentIsLocked environment enquote endsWith EncodingencodeString enc2utf8 enc2native emptyenv eigen eapply dynGet duplicated dump droplevels drop dQuote dput double dontCheck dirname dirdigamma difftime diff dget determinant detach det deparse delayedAssign asNamespace asinh asindebugonce debuggingState debug date cut curlGetHeaders cumsum cumprod cummin cummax Cstack_info crossprod cospi cosh cos contributors Conjconflicts conditionMessage conditionCall computeRestarts complex comment commandArgs colSums colnames colMeans colcloseAllConnections close clearPushBack class choose chol2inv chol chkDots check_tzones chartr charToRaw charmatch character ceilingcbind cat casefold capabilities callCC call c bzfile by builtins browserText browserSetDebug browserCondition browser break bquote bodybitwXor bitwShiftR bitwShiftL bitwOr bitwNot bitwAnd bindtextdomain bindingIsLocked bindingIsActive beta besselY besselK besselJ besselIbasename baseenv backsolve autoloader autoload attributes attr attachNamespace attach atanh atan2 atan assign asS4 asS3arrayInd array args Arg apply append aperm anyNA anyDuplicated any allowInterrupts all alist agrepl agrep addTaskCallback addNA".split(" ");var ja="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" ");function za(e,t){return function(e,t,r,o){var n=e.getCursor(),a=r(e,n);if(/\b(?:string|comment)\b/.test(a.type))return null;a.state=Fa.innerMode(e.getMode(),a.state).state,/^[\w$_@]*$/.test(a.string)?a.end>n.ch&&(a.end=n.ch,a.string=a.string.slice(0,n.ch-a.start)):a={start:n.ch,end:n.ch,string:"",state:a.state,type:"."===a.string?"property":null};return{list:Ha(a,t),from:Fa.Pos(n.line,a.start),to:Fa.Pos(n.line,a.end)}}(e,ja,(function(e,t){return e.getTokenAt(t)}))}function Ha(e,t,r){for(var o=[],n=e.string,a=0;a<t.length;a++)0===t[a].lastIndexOf(n,0)&&-1===o.indexOf(t[a])&&o.push(t[a]);return o}function Ga(){var e="@BLANK @DIFF1 @DIFF2 @FIELD @FIELDS_BETWEEN @FIELDS_MATCHING @GLOBAL_MAX @GLOBAL_MEAN @GLOBAL_MIN @GLOBAL_SDEV @GLOBAL_SUM @INDEX @LAST_NON_BLANK @MAX @MEAN @MIN @MULTI_RESPONSE_SET @NULL @OFFSET @PARTITION_FIELD @PREDICTED @SDEV @SINCE @SINCE0 @SUM @TARGET @TESTING_PARTITION @THIS @TODAY @TRAINING_PARTITION @VALIDATION_PARTITION abs allbutfirst allbutlast alphabefore and arccos arccosh arcsin arcsinh arctan arctan2 arctanh area cdf_chisq cdf_f cdf_normal cdf_t close_to COND1 and COND2 COND1 or COND2 cos cosh count_equal count_greater_than count_less_than count_non_nulls count_not_equal count_nulls count_substring crosses date_before date_days_difference date_from_ywd date_in_days date_in_months date_in_weeks date_in_years date_iso_day date_iso_week date_iso_year date_months_difference date_weeks_difference date_years_difference datetime_date datetime_day datetime_day_name datetime_day_short_name datetime_hour datetime_in_seconds datetime_minute datetime_month datetime_month_name datetime_month_short_name datetime_now datetime_second datetime_time datetime_timestamp datetime_weekday datetime_year distance div endstring exp first_index first_non_null first_non_null_index fracof hasendstring hasmidstring hasstartstring hassubstring hassubstring if then else elseif endif integer_bitcount integer_leastbit integer_length intof is_date is_datetime is_integer is_number is_real is_string is_time is_timestamp isalphacode isendstring islowercode ismidstring isnumbercode isstartstring issubstring issubstring issubstring_count issubstring_lim isuppercode last last_index last_non_null last_non_null_index length locchar locchar_back log log10 lowertoupper max max_index max_n MEAN mean_n member min min_index min_n negate not num_points oneof or overlap pi random random0 rem replace replicate round sdev_n sign sin sinh skipchar skipchar_back soundex soundex_difference sqrt startstring stb_centroid_latitude stb_centroid_longitude stripchar strmember subscrs substring substring_between sum_n tan tanh testbit time_before time_hours_difference time_in_hours time_in_mins time_in_secs time_mins_difference".split(" "),t=/[\[\]{}\(\),;\:\.]/,r=/\d/,o=/[\w\.]/,n=/[\w\$_]/,a=/[+\-*&%=<>!?|\/]/;function i(i,s){var l=i.next();if("#"===l&&s.startOfLine)return i.skipToEnd(),"meta";if('"'===l)return function(e,t,r){var o,n=!1;for(;void 0!==(o=t.next());)if(o===e){n=!0;break}n&&(r.tokenize=null)}(l,i,s),"string";if("'"===l)return function(e,t,r){var o,n=!1;for(;void 0!==(o=t.next());)if(o===e){n=!0;break}n&&(r.tokenize=null)}(l,i,s),"variable";if(t.test(l))return null;if(r.test(l))return i.eatWhile(o),"number";if(a.test(l))return i.eatWhile(a),"operator";i.eatWhile(n);var u=i.current();return-1!==e.indexOf(u)?"keyword":"variable"}return{startState:function(){return{tokenize:null}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||i)(e,t)},electricChars:"{}"}}function qa(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ya(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ya(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Ya(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function Ka(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Wa=null;"undefined"!=typeof window&&void 0!==window.navigator&&(Wa=require("codemirror"),require("codemirror/addon/hint/show-hint"),require("codemirror/addon/display/placeholder"),require("codemirror/addon/display/autorefresh"),require("codemirror/mode/javascript/javascript"),require("codemirror/addon/hint/javascript-hint"),require("codemirror/addon/hint/sql-hint"),require("codemirror/mode/sql/sql"),require("codemirror/mode/python/python"),require("codemirror/mode/r/r"),function(e){(Aa=e).registerHelper("hint","python",Pa)}(Wa),function(e){(Na=e).registerHelper("hint","r",Ba)}(Wa),function(e){(Fa=e).registerHelper("hint","CLEM",za),Fa.defineMode("CLEM",Ga),Fa.defineMIME("text/x-CLEM","CLEM")}(Wa));var $a=function(r){t._inherits(a,r);var n=Ka(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).state={showExpressionBuilder:!1,validationInProgress:!1},o.origHint="",o.expressionInfo=o.props.controller.getExpressionInfo(),o.handleValidate=o.handleValidate.bind(t._assertThisInitialized(o)),o.hasValidate=o.hasValidate.bind(t._assertThisInitialized(o)),o.cancelExpressionBuilder=o.cancelExpressionBuilder.bind(t._assertThisInitialized(o)),o.hideExpressionBuilder=o.hideExpressionBuilder.bind(t._assertThisInitialized(o)),o.showExpressionBuilder=o.showExpressionBuilder.bind(t._assertThisInitialized(o)),o.editorDidMount=o.editorDidMount.bind(t._assertThisInitialized(o)),o.addonHints=o.addonHints.bind(t._assertThisInitialized(o)),o.getDatasetFields=o.getDatasetFields.bind(t._assertThisInitialized(o)),o.handleBlur=o.handleBlur.bind(t._assertThisInitialized(o)),o.handleKeyDown=o.handleKeyDown.bind(t._assertThisInitialized(o)),o.handleChange=function(e,t,r){if(Array.isArray(t.text)&&1===t.text.length&&1===t.text[0].length&&o.props.onSelectionChange){var n=t.removed[0].length>0?{line:t.from.line,ch:t.from.ch+1}:{line:t.to.line,ch:t.to.ch+1};o.props.onSelectionChange([{anchor:n,head:n}])}o.state.validateIcon&&(o.setState({validateIcon:null}),o.props.controller.updateErrorMessage(o.props.propertyId,l.DEFAULT_VALIDATION_MESSAGE))},o}return e._createClass(a,[{key:"componentDidUpdate",value:function(){var e=this;this.props.selectionRange&&this.props.selectionRange.length>0&&this.editor&&(this.props.selectionRange.forEach((function(t){e.editor.setSelection(t.anchor,t.head)})),this.editor.focus())}},{key:"componentWillUnmount",value:function(){this.origHint&&Wa&&Wa.registerHelper("hint",this.props.control.language,this.origHint)}},{key:"getDatasetFields",value:function(){var e,t=[],r=qa(this.props.controller.getDatasetMetadataFields());try{for(r.s();!(e=r.n()).done;){var o=e.value;t.push(o.name)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"addonHints",value:function(e,t){var r={},o=e.getCursor(),n=e.getTokenAt(o);if(this.origHint){r=this.origHint(e,t);for(var a=this.getDatasetFields(),i=0;i<a.length;++i){var s=a[i];(0===s.lastIndexOf(n.string,0)&&-1===r.list.indexOf(s)||" "===n.string&&null===n.type)&&r.list.unshift(s)}}return r}},{key:"editorDidMount",value:function(e,t){this.editor=e;var r=this.expressionEditorDiv?this.expressionEditorDiv.clientWidth:0,o=r>0?r/8.5:30,n=this.props.control.charLimit?Math.min(this.props.control.charLimit/o*26,390):104;n=this.props.control.rows?26*this.props.control.rows:n,n=this.props.height?this.props.height:n,this.editor.setSize(null,Math.max(Math.floor(n),104)),this.origHint=e.getHelper({line:0,ch:0},"hint");var a=this.props.control.language;switch(this.props.control.language){case"text/x-hive":a="sql";break;case"text/x-python":a="python";break;case"text/x-rsrc":a="r"}Wa&&Wa.registerHelper("hint",a,this.addonHints),this.props.editorDidMount&&this.props.editorDidMount(e,t)}},{key:"showExpressionBuilder",value:function(){this.initialControlValue=this.props.controller.getPropertyValue(this.props.propertyId),this.initialMessage=this.props.controller.getErrorMessage(this.props.propertyId),this.initialState=this.props.controller.getControlState(this.props.propertyId),this.setState({showExpressionBuilder:!0})}},{key:"hideExpressionBuilder",value:function(){this.setState({showExpressionBuilder:!1})}},{key:"cancelExpressionBuilder",value:function(){this.props.controller.updatePropertyValue(this.props.propertyId,this.initialControlValue),this.props.controller.updateErrorMessage(this.props.propertyId,this.initialMessage),this.props.controller.updateControlState(this.props.propertyId,this.initialState),this.hideExpressionBuilder()}},{key:"handleValidate",value:function(){var e=this;this.setState({validateIcon:null,validationInProgress:!0});var t=this.props.controller.getAppData();this.props.controller.getHandlers().validationHandler(this.props.controller,this.props.propertyId,this.props.value,t,(function(t){e.props.controller.updateErrorMessage(e.props.propertyId,t),e.setState({validateIcon:t.type,validationInProgress:!1})}))}},{key:"hasValidate",value:function(){return"function"==typeof this.props.controller.getHandlers().validationHandler}},{key:"handleKeyDown",value:function(e,t){if("Enter"===t.code&&this.props.selectionRange&&this.props.selectionRange.length>0&&this.props.onSelectionChange){var r={line:this.props.selectionRange[0].anchor.line+1,ch:0};this.props.onSelectionChange([{anchor:r,head:r}])}}},{key:"handleBlur",value:function(e,t){if(this.props.onBlur)this.props.onBlur(e,t);else{var r=this.editor.getValue(),o=t.relatedTarget&&t.relatedTarget.classList.contains("properties-expression-button");this.props.controller.updatePropertyValue(this.props.propertyId,r,o)}}},{key:"_showBuilderButton",value:function(){return this.props.builder&&this.props.rightFlyout&&this.expressionInfo.functionCategories&&Object.keys(this.expressionInfo.functionCategories).length>0}},{key:"render",value:function(){var e=this,t=this.props.messageInfo,r=t?t.type:l.CONDITION_MESSAGE_TYPE.INFO;r===l.CONDITION_MESSAGE_TYPE.SUCCESS&&(t=null);var n=this.props.state===l.STATES.DISABLED?"disabled":r,a=this.props.controller.getReactIntl(),i=this._showBuilderButton()?A.default.createElement(s.Button,{kind:"ghost",size:"small",className:"properties-expression-button",disabled:this.props.state===l.STATES.DISABLED,onClick:this.showExpressionBuilder,renderIcon:p.Calculator24,iconDescription:o.formatMessage(a,l.MESSAGE_KEYS.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,u=null;this.state.validateIcon&&(u=A.default.createElement("div",{className:"icon validateIcon"},A.default.createElement(l.Icon,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var c=this.state.validationInProgress?o.formatMessage(a,l.MESSAGE_KEYS.EXPRESSION_VALIDATING_LABEL):o.formatMessage(a,l.MESSAGE_KEYS.EXPRESSION_VALIDATE_LABEL),d=this.hasValidate()&&this.props.validateLink?A.default.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===l.STATES.DISABLED},A.default.createElement(s.Button,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===l.STATES.DISABLED||this.state.validationInProgress},c),u):null,f={mode:this.props.control.language,placeholder:this.props.control.additionalText,theme:n+" custom",readOnly:this.props.state===l.STATES.DISABLED&&"nocursor",extraKeys:{"Ctrl-Space":"autocomplete"},autoRefresh:!0},h=o.formatMessage(a,l.MESSAGE_KEYS.APPLYBUTTON_LABEL),m=o.formatMessage(a,l.MESSAGE_KEYS.REJECTBUTTON_LABEL),y=o.formatMessage(a,l.MESSAGE_KEYS.EXPRESSION_BUILDER_TITLE),v=this.state.showExpressionBuilder?A.default.createElement(Me,{cancelHandler:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,show:this.state.showExpressionBuilder,applyLabel:h,rejectLabel:m,title:y,light:this.props.controller.getLight()},A.default.createElement("div",null,A.default.createElement(ka,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId}))):null,g=l.classNames("properties-expression-editor ".concat(r),{"properties-light-disabled":!this.props.controller.getLight()}),b=A.default.createElement("div",{className:"properties-expression-link-container"},i,d),E=b;return this.props.expressionLabel&&(E=A.default.createElement("div",{className:"properties-expression-header"},A.default.createElement("div",{className:"properties-expression-title"},this.props.expressionLabel),b)),A.default.createElement("div",{className:"properties-expression-editor-wrapper"},this.props.controlItem,v,A.default.createElement("div",{className:"properties-editor-container"},E,A.default.createElement("div",{ref:function(t){return e.expressionEditorDiv=t},"data-id":Be(this.props.propertyId),className:g},A.default.createElement(I.UnControlled,{ref:function(t){return e.codeMirror=t},options:f,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,editorDidMount:this.editorDidMount,value:this.props.value}),A.default.createElement(Nn,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}]),a}(A.default.Component);$a.defaultProps={builder:!0,validateLink:!0};var Xa=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)($a);function Ja(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Za=function(r){t._inherits(n,r);var o=Ja(n);function n(t){var r;return e._classCallCheck(this,n),(r=o.call(this,t)).id=xe(r.props.propertyId),r}return e._createClass(n,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.target.value)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=l.classNames("properties-pwdfield","properties-input-control",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),r=ze(this.props.messageInfo,this.props.tableControl);return A.default.createElement("div",{className:t,"data-id":Be(this.props.propertyId)},A.default.createElement(s.PasswordInput,l._extends({},r,{autoComplete:"off",id:this.id,disabled:this.props.state===l.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:e,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight(),tooltipAlignment:"end"})),A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),n}(A.default.Component),Qa=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Za);function ei(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ti=function(r){t._inherits(n,r);var o=ei(n);function n(r){var a;if(e._classCallCheck(this,n),(a=o.call(this,r)).id=xe(a.props.propertyId),a.getDateFormat=a.getDateFormat.bind(t._assertThisInitialized(a)),a.handleChange=a.handleChange.bind(t._assertThisInitialized(a)),a.value=r.value,a.value){var i=b.parse(a.value,l.DEFAULT_DATE_FORMAT,new Date);b.isValid(i)&&(a.value=b.format(i,a.getDateFormat()))}else a.value="";return a}return e._createClass(n,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||l.DEFAULT_DATE_FORMAT;return e=e.replace(/Y/g,"y").replace(/D/g,"d")}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=b.parse(e.target.value,this.getDateFormat(),new Date);t=b.isValid(r)?b.format(r,l.DEFAULT_DATE_FORMAT):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=l.classNames("properties-datefield","properties-input-control",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=ze(this.props.messageInfo,this.props.tableControl);return A.default.createElement("div",{className:e,"data-id":Be(this.props.propertyId)},A.default.createElement(s.TextInput,l._extends({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===l.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()})),A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),n}(A.default.Component),ri=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(ti);function oi(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ni=function(r){t._inherits(n,r);var o=oi(n);function n(r){var a;if(e._classCallCheck(this,n),(a=o.call(this,r)).id=xe(r.propertyId),a.value=r.value,a.value){var i=b.parse(a.value,"HH:mm:ss:xxx",new Date);b.isValid(i)&&(a.value=b.format(i,a.getTimeFormat()))}else a.value="";return a.getTimeFormat=a.getTimeFormat.bind(t._assertThisInitialized(a)),a.handleChange=a.handleChange.bind(t._assertThisInitialized(a)),a}return e._createClass(n,[{key:"getTimeFormat",value:function(){return this.props.control.timeFormat||l.DEFAULT_TIME_FORMAT}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=b.parse(e.target.value,this.getTimeFormat(),new Date);t=b.isValid(r)?b.format(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=l.classNames("properties-timefield","properties-input-control",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=ze(this.props.messageInfo,this.props.tableControl);return A.default.createElement("div",{className:e,"data-id":Be(this.props.propertyId)},A.default.createElement(s.TextInput,l._extends({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===l.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:this.value,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()})),A.default.createElement(Nn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),n}(A.default.Component),ai=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(ni);function ii(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var si=function(r){t._inherits(n,r);var o=ii(n);function n(t){var r;return e._classCallCheck(this,n),(r=o.call(this,t)).id=xe(r.props.propertyId),r}return e._createClass(n,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e=this.props.control.label?this.props.control.label.text:"",t=f.v4()+"-tooltip-"+this.props.control.name,r="";this.props.control.description&&this.props.state!==l.STATES.DISABLED&&this.props.state!==l.STATES.HIDDEN&&!this.props.tableControl&&(r=A.default.createElement("span",null,this.props.control.description.text));var o=i.isEmpty_1(r)?"":A.default.createElement(h,{id:t,tip:r,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},A.default.createElement(l.Icon,{type:l.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"})),n=A.default.createElement("span",{className:"properties-checkbox-label"},e);return A.default.createElement("div",{className:l.classNames("properties-checkbox",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":Be(this.props.propertyId)},A.default.createElement(s.Checkbox,{disabled:this.props.state===l.STATES.DISABLED,id:this.id,labelText:n,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl}),o,A.default.createElement(Nn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}]),n}(A.default.Component),li=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(si);function ui(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ci=function(r){t._inherits(a,r);var n=ui(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).uuid=f.v4(),o.handleChange=o.handleChange.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){if(Array.isArray(this.props.value)){var t=wn(this.props.value,this.props.controlOpts.values);o.isEqual_1(this.props.value,t)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"handleChange",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId);null==r&&(r=[]);var o=r.indexOf(e);t&&o<0&&(r=r.concat([e])),!t&&o>=0&&r.splice(o,1);var n=r.concat();this.props.controller.updatePropertyValue(this.props.propertyId,n)}},{key:"render",value:function(){var e=this.props.value;null==e&&(e=[]);for(var t=[],r=0;r<this.props.control.values.length;r++){var o={name:this.props.propertyId.name,row:r},n=this.props.control.values[r],a=e.indexOf(n)>=0,i=this.props.state===l.STATES.DISABLED||!this.props.controlOpts.values.includes(n);t.push(A.default.createElement(s.Checkbox,{disabled:i,id:xe(o,this.uuid),key:n+r,labelText:this.props.control.valueLabels[r],onChange:this.handleChange.bind(this,n),checked:a}))}return A.default.createElement("fieldset",null,A.default.createElement("legend",null,this.props.controlItem),A.default.createElement("div",{className:l.classNames("properties-checkboxset",{hide:this.props.state===l.STATES.HIDDEN}),"data-id":Be(this.props.propertyId)},A.default.createElement("div",{className:l.classNames("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},t),A.default.createElement(Nn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo})))}}]),a}(A.default.Component),pi=c.connect((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(ci);function di(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return fi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fi(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function fi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function hi(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var mi=function(r){t._inherits(a,r);var n=hi(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).uuid=f.v4(),o.handleChange=o.handleChange.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0);var e=this.props.controller.getPropertyValue(this.props.propertyId);this.setEnabledStateOfOptionalPanels(e),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),void 0!==this.props.value&&null!==this.props.value&&this.handleCheckedDisabled(this.props.value,this.isRadioButtonDisabled(String(this.props.value)))}},{key:"setEnabledStateOfOptionalPanels",value:function(e){if(this.props.control.optionalPanels){var t=this.props.controlOpts,r=this.props.controller.getPanelStates();this.props.controller.parsePanelTree();for(var o=0;o<t.values.length;o++){rn(r,{name:t.values[o]},t.values[o]===e?l.STATES.ENABLED:l.STATES.DISABLED)}this.props.controller.setPanelStates(r),function(e,t){for(var r={controls:t.getControlStates(),panels:t.getPanelStates(),actions:t.getActionStates()},o=0;o<e.length;o++){var n=t.getPanelState({name:e[o]});hn(r,{name:e[o]},n,t)}t.setControlStates(r.controls),t.setPanelStates(r.panels),t.setActionStates(r.actions)}(t.values,this.props.controller)}}},{key:"getOptionalPanel",value:function(e){return this.props.control.optionalPanels?this.props.control.optionalPanels[e]:null}},{key:"updateValueFromFilterEnum",value:function(e){if(null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var t=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)&&(t=this.props.control.valueDef.defaultValue),this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"convertTargetValue",value:function(e){return"boolean"===this.props.control.valueDef.propType?"true"===e:"integer"===this.props.control.valueDef.propType||"long"===this.props.control.valueDef.propType||"double"===this.props.control.valueDef.propType?Number(e):e}},{key:"handleChange",value:function(e){var t=this.props.controller.getPropertyValue(this.props.propertyId),r=this.convertTargetValue(e);this.props.controller.updatePropertyValue(this.props.propertyId,r),t!==r&&this.setEnabledStateOfOptionalPanels(r)}},{key:"isRadioButtonDisabled",value:function(e){var t=this.props.valueStates;return!!(t&&t[e]&&t[e].value)&&t[e].value===l.STATES.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==l.STATES.DISABLED){var r,o=this.props.controller.getControl(this.props.propertyId),n=this.props.control.valueDef.defaultValue;if(n&&!this.isRadioButtonDisabled(n))r=n;else{var a,i=di(o.values);try{for(i.s();!(a=i.n()).done;){var s=a.value;if(s!==e&&!this.isRadioButtonDisabled(s)){r=s;break}}}catch(e){i.e(e)}finally{i.f()}}r&&this.props.controller.updatePropertyValue(this.props.propertyId,r)}}},{key:"render",value:function(){this.props.control.values||"radioset"!==this.props.control.controlType||(this.props.control.values=[!0,!1],this.props.control.valueLabels=["true","false"]);for(var e=[],t=this.props.controlOpts,r=0;r<t.values.length;r++){var n=t.values[r]===this.props.value,a="boolean"===this.props.control.valueDef.propType?String(t.values[r]):t.values[r],i=this.isRadioButtonDisabled(a),u=this.getOptionalPanel(a),c={name:this.props.propertyId.name,row:r};e.push(A.default.createElement("div",{key:r,className:"properties-radioset-panel"},A.default.createElement(s.RadioButton,{key:r,id:xe(c,this.uuid),disabled:this.props.state===l.STATES.DISABLED||i,labelText:t.valueLabels[r],value:a,onChange:this.handleChange,checked:n}),u))}return A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:l.classNames("properties-radioset ",{hide:this.props.state===l.STATES.HIDDEN})},A.default.createElement("div",{className:l.classNames("properties-radio-button-group",this.props.messageInfo?this.props.messageInfo.type:null,{horizontal:this.props.control.orientation!==o.ORIENTATIONS.VERTICAL}),disabled:this.props.state===l.STATES.DISABLED},e),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),a}(A.default.Component),yi=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),valueStates:t.controller.getControlValueStates(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(mi);function vi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return gi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gi(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function bi(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ei=function(r){t._inherits(a,r);var n=bi(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).emptyLabel="...",r.control.additionalText&&(o.emptyLabel=r.control.additionalText),o.reactIntl=r.controller.getReactIntl(),o.id=xe(o.props.propertyId),o.handleChange=o.handleChange.bind(t._assertThisInitialized(o)),o.handleComboOnChange=o.handleComboOnChange.bind(t._assertThisInitialized(o)),o.handleOnInputChange=o.handleOnInputChange.bind(t._assertThisInitialized(o)),o.genSchemaSelectOptions=o.genSchemaSelectOptions.bind(t._assertThisInitialized(o)),o.genSelectOptions=o.genSelectOptions.bind(t._assertThisInitialized(o)),o.genFieldSelectOptions=o.genFieldSelectOptions.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"getSelectedOption",value:function(e,t){var r=o.stringifyFieldValue(t,this.props.control),n=e.find((function(e){return e.value===r}));return null===(n=void 0===n?null:n)&&this.props.control.customValueAllowed&&(n={value:r,label:r}),n}},{key:"genSchemaSelectOptions",value:function(e){var t=[];if(t.push({value:"",label:this.emptyLabel}),Array.isArray(this.props.controlOpts)){var r,o=vi(this.props.controlOpts);try{for(o.s();!(r=o.n()).done;){var n=r.value;t.push({value:n,label:n})}}catch(e){o.e(e)}finally{o.f()}}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genFieldSelectOptions",value:function(e){var t=[];t.push({value:"",label:this.emptyLabel});var r,o=vi(this.props.controlOpts);try{for(o.s();!(r=o.n()).done;){var n=r.value;t.push({value:n.name,label:n.name})}}catch(e){o.e(e)}finally{o.f()}return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({value:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOption:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e){if(this.props.control.controlType===o.ControlType.ONEOFSELECT&&null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var t=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)?t=this.props.control.valueDef.defaultValue:this.props.control.customValueAllowed&&this.props.value&&(t=this.props.value),this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}}},{key:"handleChange",value:function(e){var t=this.props.tableControl?e.target.value:e.selectedItem.value;this.props.control.controlType===o.ControlType.SELECTCOLUMN&&(t=o.fieldStringToValue(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleComboOnChange",value:function(e){var t=e.selectedItem&&e.selectedItem.value?e.selectedItem.value:"";this.props.control.controlType===o.ControlType.SELECTCOLUMN&&(t=o.fieldStringToValue(t,this.props.control,this.props.controller)),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"handleOnInputChange",value:function(e){if(null!==e){var t=e;this.props.controller.updatePropertyValue(this.props.propertyId,t)}}},{key:"render",value:function(){var e;e=this.props.control.controlType===o.ControlType.SELECTSCHEMA?this.genSchemaSelectOptions(this.props.value):this.props.control.controlType===o.ControlType.SELECTCOLUMN?this.genFieldSelectOptions(this.props.value):this.genSelectOptions(this.props.value);var t={"close.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)},r=null,n=ze(this.props.messageInfo,this.props.tableControl);if(this.props.tableControl){var a=[],i=e.selectedOption&&e.selectedOption.value?e.selectedOption.value:"";e.selectedOption||a.push(A.default.createElement(s.SelectItem,{text:this.emptyLabel,key:this.id,value:""}));var u,c=vi(e.options);try{for(c.s();!(u=c.n()).done;){var p=u.value;a.push(A.default.createElement(s.SelectItem,{text:p.label,key:this.id+"-"+p.value,value:p.value}))}}catch(e){c.e(e)}finally{c.f()}r=A.default.createElement(s.Select,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===l.STATES.DISABLED,onChange:this.handleChange,value:i,light:this.props.controller.getLight()},a)}else r=this.props.control.customValueAllowed?A.default.createElement(s.ComboBox,l._extends({},n,{ariaLabel:this.props.control.label?this.props.control.label.text:"",id:"".concat(Be(this.props.propertyId),"-dropdown"),disabled:this.props.state===l.STATES.DISABLED,placeholder:e.selectedOption.label,selectedItem:e.selectedOption.label,items:e.options,onChange:this.handleComboOnChange,onInputChange:this.handleOnInputChange,light:this.props.controller.getLight(),translateWithId:function(e){return t[e]},titleText:this.props.controlItem})):A.default.createElement(s.Dropdown,l._extends({},n,{id:"".concat(Be(this.props.propertyId),"-dropdown"),disabled:this.props.state===l.STATES.DISABLED,type:"default",items:e.options,onChange:this.handleChange,selectedItem:e.selectedOption,label:this.emptyLabel,light:this.props.controller.getLight(),translateWithId:function(e){return t[e]},titleText:this.props.controlItem}));return A.default.createElement("div",{"data-id":Be(this.props.propertyId),className:l.classNames("properties-dropdown",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},r,A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}]),a}(A.default.Component),_i=c.connect((function(e,t){var r={value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)};return t.control.controlType===o.ControlType.SELECTSCHEMA?r.controlOpts=t.controller.getDatasetMetadataSchemas():t.control.controlType===o.ControlType.SELECTCOLUMN?r.controlOpts=t.controller.getFilteredDatasetMetadata(t.propertyId):r.controlOpts=t.controller.getFilteredEnumItems(t.propertyId,t.control),r}),null)(Ei);function Si(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ti=function(r){t._inherits(a,r);var n=Si(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).reactIntl=r.controller.getReactIntl(),o.getSelectedOption=o.getSelectedOption.bind(t._assertThisInitialized(o)),o.genSelectOptions=o.genSelectOptions.bind(t._assertThisInitialized(o)),o.handleOnChange=o.handleOnChange.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o.setShouldRender=o.setShouldRender.bind(t._assertThisInitialized(o)),o.state={shouldRender:!0},o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum(),this.setShouldRender(e)}},{key:"setShouldRender",value:function(e){!o.isEqual_1(this.props.controlOpts.values,e.controlOpts.values)&&this.state.shouldRender?this.setState({shouldRender:!1}):this.state.shouldRender||this.setState({shouldRender:!0})}},{key:"getSelectedOption",value:function(e,t){var r=o.stringifyFieldValue(t,this.props.control),n=[];return r&&r.forEach((function(t){return n.push(e.find((function(e){return e.value===t})))})),n}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({value:this.props.controlOpts.values[r],label:this.props.controlOpts.valueLabels[r]});return{options:t,selectedOptions:this.getSelectedOption(t,e)}}},{key:"updateValueFromFilterEnum",value:function(e){var t=wn(this.props.value,this.props.controlOpts.values);o.isEqual_1(t,this.props.value)||(i.isEmpty_1(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=wn(this.props.control.valueDef.defaultValue,this.props.controlOpts.values)),this.props.controller.updatePropertyValue(this.props.propertyId,t,e))}},{key:"handleOnChange",value:function(e){for(var t=[],r=0;r<e.selectedItems.length;r++)t.push(e.selectedItems[r].value);this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.genSelectOptions(this.props.value);if(!this.state.shouldRender)return null;var t={"close.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),n=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.MULTISELECT_DROPDOWN_EMPTY_LABEL),a="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL),u="";u=0===e.selectedOptions.length?this.props.controller.getResource(r,n):this.props.controller.getResource(a,i);var c=ze(this.props.messageInfo,this.props.tableControl),p=null;return p=this.props.control.filterable?A.default.createElement(s.FilterableMultiSelect,l._extends({},c,{id:"".concat(Be(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===l.STATES.DISABLED,translateWithId:function(e){return t[e]},items:e.options,initialSelectedItems:e.selectedOptions,onChange:this.handleOnChange,placeholder:u,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()})):A.default.createElement(s.MultiSelect,l._extends({},c,{id:"".concat(Be(this.props.propertyId),"-multiselect"),disabled:this.props.state===l.STATES.DISABLED,translateWithId:function(e){return t[e]},items:e.options,initialSelectedItems:e.selectedOptions,onChange:this.handleOnChange,label:u,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()})),A.default.createElement("div",{"data-id":Be(this.props.propertyId),className:l.classNames("properties-dropdown",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},p,A.default.createElement(Nn,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),a}(A.default.Component),Ii=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Ti);function Ci(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ri=function(r){t._inherits(a,r);var n=Ci(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).genSelectOptions=o.genSelectOptions.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o.updateSelections=o.updateSelections.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0)}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e){var t=wn(this.props.value,this.props.controlOpts.values);o.isEqual_1(t,this.props.value)||this.props.controller.updatePropertyValue(this.props.propertyId,t,e)}},{key:"updateSelections",value:function(e){for(var t=[],r=0;r<e.length;r++){var o=this.props.controlOpts.values[e[r]];t.push(o)}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"genSelectOptions",value:function(e){for(var t={options:[],selected:[]},r=0;r<this.props.controlOpts.values.length;r++){-1!==e.indexOf(this.props.controlOpts.values[r])&&t.selected.push(r);var o=[];o.push({column:"someofselect",state:this.props.state,content:this.props.controlOpts.valueLabels[r]}),t.options.push({className:"table-row",columns:o,disabled:this.props.state===l.STATES.DISABLED})}return t}},{key:"render",value:function(){var e=this.props.value;null==e&&(e=[]);var t=this.genSelectOptions(e),r=this.props.control.rows?this.props.control.rows:4,o=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:l.classNames("properties-someofselect ",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,A.default.createElement(T.FlexibleTable,{columns:[{key:"someofselect",label:""}],rows:r,data:t.options,scrollKey:this.props.control.name,tableLabel:o,selectedRows:t.selected,updateRowSelections:this.updateSelections,selectable:!0,showHeader:!1,light:this.props.controller.getLight()}),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),a}(A.default.Component),Ai=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),null)(Ri);function ki(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var wi=function(r){t._inherits(a,r);var n=ki(a);function a(r){var i;return e._classCallCheck(this,a),(i=n.call(this,r)).reactIntl=r.controller.getReactIntl(),i.emptyTableButtonClickHandler=i.addOnClick.bind(t._assertThisInitialized(i),i.props.propertyId),i.emptyTableButtonLabel=o.formatMessage(i.reactIntl,l.MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL),i}return e._createClass(a,[{key:"makeRows",value:function(e,t){var r=[];if(e)for(var n=0;n<e.length;n++){var a=[],i=void 0!==this.props.propertyId.row?{row:this.props.propertyId.row,index:n}:{row:n},s=Object.assign({},this.props.propertyId,i),l=Object.assign({},this.props.control);if(l.dmImage){var u=this.props.controller.getDatasetMetadataFields(),c=o.stringifyFieldValue(this.props.controller.getPropertyValue(s),l,!0),p=o.getDMFieldIcon(u,c,l.dmImage);l.icon=p}var d=A.default.createElement("div",{className:"properties-table-cell-control"},A.default.createElement(Mn,{control:l,propertyId:s,controller:this.props.controller,tableControl:!0}));a.push({key:n+"-0-field",column:"field",content:d}),r.push({key:n,onClickCallback:this.handleRowClick.bind(this,n,!1),columns:a,className:"column-select-table-row"})}return r}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){this.setCurrentControlValueSelected(e,t);var r=t[t.length-1];this.setScrollToRow(r)}}},{key:"makeHeader",value:function(){var e=[];return e.push({key:"field",label:o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.FIELDPICKER_FIELDCOLUMN_LABEL),description:null}),e}},{key:"render",value:function(){var e,t=this.makeHeader(),r={fieldPickerCloseFunction:this.onFieldPickerClose},o=this.makeRows(this.props.value,this.props.state),n=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&o.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var a=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",s=A.default.createElement(T.FlexibleTable,{columns:t,data:o,scrollToRow:e,topRightPanel:n,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:a,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()}),u=A.default.createElement("div",null,A.default.createElement("div",{className:"properties-column-select-table"},s),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo}));return A.default.createElement("div",{"data-id":Be(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,A.default.createElement(ma,{tableContainer:u,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===l.STATES.DISABLED,isEmptyTable:i.isEmpty_1(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler}))}}]),a}(ua);wi.propTypes={control:P.default.object.isRequired,propertyId:P.default.object.isRequired,controller:P.default.object.isRequired,controlItem:P.default.element,openFieldPicker:P.default.func.isRequired,selectedRows:P.default.array,state:P.default.string,value:P.default.array,messageInfo:P.default.object,addRemoveRows:P.default.bool,tableButtons:P.default.object};var Oi=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(wi);function Pi(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Ni=function(r){t._inherits(a,r);var o=Pi(a);function a(t){var r;return e._classCallCheck(this,a),(r=o.call(this,t)).controlFactory=new as(r.props.controller),r.controlFactory.setFunctions(r.props.openFieldPicker,r.props.buildUIItem),r}return e._createClass(a,[{key:"_getSubControlDef",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return this.props.control.subControls[t];return null}},{key:"_getColumnIndex",value:function(e){for(var t=0;t<this.props.control.subControls.length;t++)if(this.props.control.subControls[t].name===e)return t;return null}},{key:"_makeRow",value:function(e){for(var t=[],r=0;r<e.length;r++){var o=this._getSubControlDef(e[r]);if(o&&o.visible){var a={name:this.props.control.name,col:this._getColumnIndex(e[r])},i=n.cloneDeep_1(this.props.propertyId),s=a;i.name!==a.name&&(s=this.props.controller.setChildPropertyId(i,a)),t.push(this.controlFactory.createControlItem(o,s))}}return t}},{key:"_makeControls",value:function(){var e=[];if(Array.isArray(this.props.control.layout))for(var t=this.props.control.layout,r=0;r<t.length;r++)Array.isArray(t[r])&&e.push(this._makeRow(t[r]));else for(var o=0;o<this.props.control.subControls.length;o++)if(this.props.control.subControls[o].visible){var a={name:this.props.control.name,col:this._getColumnIndex(this.props.control.subControls[o].name)},i=n.cloneDeep_1(this.props.propertyId),s=a;i.name!==a.name&&(s=this.props.controller.setChildPropertyId(i,a)),e.push([this.controlFactory.createControlItem(this.props.control.subControls[o],s)])}return e}},{key:"_makeControlTable",value:function(e){for(var t=[],r=0;r<e.length;r++){for(var o=[],n=0;n<e[r].length;n++)o.push(A.default.createElement("td",{key:(1+r)*n,className:"properties-structureeditor-cell"},A.default.createElement("div",null,e[r][n])));t.push(A.default.createElement("tr",{key:1+r},o))}return A.default.createElement("table",{role:"presentation"},A.default.createElement("tbody",null,t))}},{key:"render",value:function(){var e=this._makeControlTable(this._makeControls());return A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:l.classNames("properties-structureeditor ",{hide:this.props.state===l.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},e,A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}]),a}(A.default.Component),Li=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId)}}),null)(Ni),Di=o._baseEach;var Mi=function(e,t){var r=[];return Di(e,(function(e,o,n){t(e,o,n)&&r.push(e)})),r};var xi=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}},Bi=n._arrayFilter,Fi=Mi,Vi=o._baseIteratee,Ui=i.isArray_1,ji=xi;var zi=function(e,t){return(Ui(e)?Bi:Fi)(e,ji(Vi(t)))};function Hi(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Gi(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gi(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Gi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function qi(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Yi=function(r){t._inherits(s,r);var a=qi(s);function s(r){var n;return e._classCallCheck(this,s),(n=a.call(this,r)).reactIntl=r.controller.getReactIntl(),n.addColumns=n.addColumns.bind(t._assertThisInitialized(n)),n.removeColumns=n.removeColumns.bind(t._assertThisInitialized(n)),n.getDefaultRow=n.getDefaultRow.bind(t._assertThisInitialized(n)),n.indexOfRow=n.indexOfRow.bind(t._assertThisInitialized(n)),n.emptyTableButtonClickHandler=n.addOnClick.bind(t._assertThisInitialized(n),n.props.propertyId),n.emptyTableButtonLabel=o.formatMessage(n.reactIntl,l.MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL),n}return e._createClass(s,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return ta(this.props.controller.getPropertyValue(this.props.propertyId),(function(r){return r[t]===e}))}},{key:"addColumns",value:function(e,t){for(var r=[],o=this.props.control.valueDef.isMap,a=0;a<e.length;a++){var i=e[a];if(this.indexOfRow(i)<0){var s=n.cloneDeep_1(this.props.control.defaultRow);o?s.unshift(i):s[this.props.control.keyIndex]=i,r.push(s)}}var l=this.props.controller.getPropertyValue(this.props.propertyId).concat(r);this.setCurrentControlValueSelected(l)}},{key:"removeColumns",value:function(e,t){var r=this.props.controller.getPropertyValue(this.props.propertyId),o=this.props.control.keyIndex,n=zi(r,(function(t){return e.indexOf(t[o])>=0}));this.setCurrentControlValueSelected(n)}},{key:"getDefaultRow",value:function(e){var t=[];if(this.props.value&&e)for(var r=o.getTableFieldIndex(this.props.control),n=0;n<this.props.value.length;n++){if(this.props.value[n][r]===e||this.props.value[n]===e)return this.props.value[n]}for(var a=0;a<this.props.control.subControls.length;a++){var i=this.props.control.subControls[a];if(i.role===o.ParamRole.COLUMN)t.push(e);else if(i.role===o.ParamRole.NEW_COLUMN)t.push(o.stringifyFieldValue(e,i).replace(".","_"));else if(void 0!==i.dmDefault)t.push(o.getDMDefault(i,e,this.props.controller.getDatasetMetadataFields()));else if(void 0!==this.props.control.defaultRow){var s=a;this.props.control.subControls.length!==this.props.control.defaultRow.length&&(s-=1);var l=this.props.control.defaultRow[s];this.props.control.subControls[s].valueDef.propType===o.Type.STRUCTURE?t.push([]):l&&l.parameterRef?t.push(this.props.controller.getPropertyValue({name:l.parameterRef})):t.push(l)}else i.valueDef&&i.valueDef.defaultValue?i.valueDef.defaultValue.parameterRef?t.push(this.props.controller.getPropertyValue({name:i.valueDef.defaultValue.parameterRef})):t.push(i.valueDef.defaultValue):t.push(null)}return t}},{key:"onFieldPickerClose",value:function(e,t){if(e&&t){var r,o=[],n=Hi(e);try{for(n.s();!(r=n.n()).done;){var a=r.value;o.push(this.getDefaultRow(a))}}catch(e){n.e(e)}finally{n.f()}this.setCurrentControlValueSelected(o,t);var i=t[t.length-1];this.setScrollToRow(i)}}},{key:"render",value:function(){var e={fieldPickerCloseFunction:this.onFieldPickerClose},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),o=A.default.createElement("div",null,A.default.createElement("div",{className:"properties-st properties-st-buttons"},r),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo})),n=this.getOnPanelContainer(this.props.selectedRows);return A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},A.default.createElement("div",{className:"properties-column-structure"},A.default.createElement(ma,{tableContainer:o,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===l.STATES.DISABLED,isEmptyTable:i.isEmpty_1(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler})),A.default.createElement("div",null,n))}}]),s}(ua);Yi.propTypes={buildUIItem:P.default.func,control:P.default.object.isRequired,propertyId:P.default.object.isRequired,controller:P.default.object.isRequired,openFieldPicker:P.default.func.isRequired,rightFlyout:P.default.bool,selectedRows:P.default.array,state:P.default.string,value:P.default.array,messageInfo:P.default.object,addRemoveRows:P.default.bool,tableButtons:P.default.object};var Ki=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Yi);function Wi(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var $i=function(r){t._inherits(a,r);var n=Wi(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).addRow=o.addRow.bind(t._assertThisInitialized(o)),o.allowColumnControls=!0,o}return e._createClass(a,[{key:"addRow",value:function(){var e=this.getDefaultRow(),t=this.props.controller.getPropertyValue(this.props.propertyId).concat([e]);this.setCurrentControlValueSelected(t)}},{key:"render",value:function(){var e={addButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},t=this.props.control&&this.props.control.buttons,r=this.createTable(this.props.state,e,t),n=A.default.createElement("div",null,A.default.createElement("div",{className:"properties-sle properties-sle-buttons"},r),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo})),a=this.getOnPanelContainer(this.props.selectedRows);return A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:"properties-sle-container"},A.default.createElement(ma,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===l.STATES.DISABLED,isEmptyTable:i.isEmpty_1(this.props.value),emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow})),A.default.createElement("div",null,a))}}]),a}(ua);$i.propTypes={buildUIItem:P.default.func,control:P.default.object.isRequired,propertyId:P.default.object.isRequired,controller:P.default.object.isRequired,rightFlyout:P.default.bool,selectedRows:P.default.array,state:P.default.string,value:P.default.array,messageInfo:P.default.object,addRemoveRows:P.default.bool,tableButtons:P.default.object};var Xi=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)($i);function Ji(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var Zi=function(r){t._inherits(a,r);var n=Ji(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).reactIntl=r.controller.getReactIntl(),o.editCallback=o.editCallback.bind(t._assertThisInitialized(o)),o.buttonHandler=o.props.controller.getHandlers().buttonHandler,o}return e._createClass(a,[{key:"editCallback",value:function(){this.buttonHandler&&this.buttonHandler({type:"edit",propertyId:this.props.propertyId})}},{key:"render",value:function(){var e="".concat(this.props.control.name,".edit.button.label"),t=o.formatMessage(this.reactIntl,l.MESSAGE_KEYS.READONLYTABLE_EDIT_BUTTON_LABEL),r=this.props.controller.getResource(e,t),n=this.buttonHandler?{editCallback:this.editCallback,label:r}:null,a=this.props.control&&this.props.control.buttons,s=this.createTable(this.props.state,n,a),u=A.default.createElement("div",null,A.default.createElement("div",{className:"properties-rt properties-rt-buttons"},s),A.default.createElement(Nn,{state:this.props.state,messageInfo:this.props.messageInfo}));return A.default.createElement("div",{"data-id":Be(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,A.default.createElement("div",{className:"properties-readonly-table"},A.default.createElement(ma,{tableContainer:u,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===l.STATES.DISABLED,isEmptyTable:i.isEmpty_1(this.props.value),emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback})))}}]),a}(ua);Zi.propTypes={buildUIItem:P.default.func,control:P.default.object.isRequired,propertyId:P.default.object.isRequired,controller:P.default.object.isRequired,controlItem:P.default.element,rightFlyout:P.default.bool,selectedRows:P.default.array,state:P.default.string,value:P.default.array,messageInfo:P.default.object,addRemoveRows:P.default.bool,tableButtons:P.default.object};var Qi=c.connect((function(e,t){return{value:t.controller.getPropertyValue(t.propertyId),state:t.controller.getControlState(t.propertyId),messageInfo:t.controller.getErrorMessage(t.propertyId),selectedRows:t.controller.getSelectedRows(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}),null)(Zi);function es(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ts=function(r){t._inherits(a,r);var n=es(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).actionFactory=new _t(r.props.controller),r.uuid=f.v4(),r}return e._createClass(a,[{key:"render",value:function(){if(this.props.control.controlType===o.ControlType.HIDDEN)return null;var e,t,r,n,a=this.props.state===l.STATES.HIDDEN,s=this.props.state===l.STATES.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible&&(this.props.control.description&&!i.isEmpty_1(this.props.control.description.text)&&("on_panel"===this.props.control.description.placement?t=A.default.createElement("div",{className:"properties-control-description"},this.props.control.description.text):r=A.default.createElement(h,{id:"".concat(this.uuid,"-tooltip-label-").concat(this.props.control.name),tip:this.props.control.description.text,direction:"bottom",disable:a||s,showToolTipOnClick:!0},A.default.createElement(l.Icon,{type:l.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"}))),this.props.control.required&&(n=A.default.createElement("span",{className:"properties-required-indicator"},"*")),e=A.default.createElement("div",{className:l.classNames("properties-label-container",{"table-control":!0===this.props.tableControl})},A.default.createElement("label",{className:"properties-control-label"},this.props.control.label.text),n,r));var u=this.actionFactory.generateAction(0,this.props.control.action),c=l.classNames("properties-control-item",{hide:a});return this.props.accessibleControls.includes(this.props.control.controlType)?A.default.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:c,disabled:s},e,t):A.default.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:c,disabled:s},e,t,u,this.props.controlObj)}}]),a}(A.default.Component),rs=c.connect((function(e,t){return{state:t.controller.getControlState(t.propertyId)}}),null)(ts),os=[o.ControlType.CHECKBOXSET,o.ControlType.HIDDEN,o.ControlType.DATEFIELD,o.ControlType.NUMBERFIELD,o.ControlType.SPINNER,o.ControlType.PASSWORDFIELD,o.ControlType.TEXTAREA,o.ControlType.TEXTFIELD,o.ControlType.TIMEFIELD,o.ControlType.TOGGLETEXT,o.ControlType.LIST,o.ControlType.SOMEOFSELECT,o.ControlType.SELECTCOLUMNS,o.ControlType.READONLY,o.ControlType.READONLYTABLE,o.ControlType.TIMESTAMP,o.ControlType.EXPRESSION,o.ControlType.CODE,o.ControlType.ONEOFSELECT,o.ControlType.MULTISELECT,o.ControlType.SELECTSCHEMA,o.ControlType.SELECTCOLUMN],ns=[o.ControlType.LIST,o.ControlType.READONLYTABLE,o.ControlType.SOMEOFSELECT,o.ControlType.SELECTCOLUMNS,o.ControlType.STRUCTURETABLE,o.ControlType.STRUCTURELISTEDITOR],as=function(){function t(r){e._classCallCheck(this,t),this.rightFlyout=!0,this.controller=r,this.actionFactory=new _t(this.controller)}return e._createClass(t,[{key:"setFunctions",value:function(e,t){this.genUIItem=t,this.openFieldPicker=e}},{key:"setRightFlyout",value:function(e){this.rightFlyout=e}},{key:"createControlItem",value:function(e,t,r){var o=this.createControl(e,t,r),n=this.controller.getControlState(t)===l.STATES.HIDDEN,a=e.className?e.className:"";return os.includes(e.controlType)?o:A.default.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:l.classNames("properties-ctrl-wrapper",{hide:n},a)},A.default.createElement(rs,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:o,accessibleControls:os,tableControl:ns.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){if(!e||!t)return null;var n,a=Be(t),s=this.controller.getControlState(t)===l.STATES.HIDDEN,u=this.actionFactory.generateAction(0,e.action),c={};switch(c.key=a,c.control=e,c.controller=this.controller,c.propertyId=t,c.controlItem=A.default.createElement(rs,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:os,tableControl:ns.includes(e.controlType)}),r&&(c.tableControl=r.table),e.controlType){case o.ControlType.HIDDEN:return null;case o.ControlType.TEXTFIELD:n=A.default.createElement(Fn,c);break;case o.ControlType.READONLY:case o.ControlType.TIMESTAMP:n=A.default.createElement(Mn,c);break;case o.ControlType.TEXTAREA:n=A.default.createElement(Gn,c);break;case o.ControlType.LIST:n=A.default.createElement(ba,c);break;case o.ControlType.EXPRESSION:n=A.default.createElement(Xa,l._extends({},c,{rightFlyout:this.rightFlyout}));break;case o.ControlType.CODE:n=A.default.createElement(Xa,l._extends({},c,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case o.ControlType.TOGGLETEXT:n=A.default.createElement(jn,c);break;case o.ControlType.PASSWORDFIELD:n=A.default.createElement(Qa,c);break;case o.ControlType.NUMBERFIELD:case o.ControlType.SPINNER:n=A.default.createElement(Kn,c);break;case o.ControlType.DATEFIELD:n=A.default.createElement(ri,c);break;case o.ControlType.TIMEFIELD:n=A.default.createElement(ai,c);break;case o.ControlType.CHECKBOX:n=A.default.createElement(li,c);break;case o.ControlType.CHECKBOXSET:n=r?A.default.createElement(Mn,c):A.default.createElement(pi,c);break;case o.ControlType.RADIOSET:n=A.default.createElement(yi,c);break;case o.ControlType.ONEOFSELECT:case o.ControlType.SELECTSCHEMA:n=A.default.createElement(_i,l._extends({},c,{rightFlyout:this.rightFlyout}));break;case o.ControlType.MULTISELECT:n=A.default.createElement(Ii,c);break;case o.ControlType.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?A.default.createElement(_i,l._extends({},c,{rightFlyout:this.rightFlyout})):A.default.createElement(Mn,c);break;case o.ControlType.SOMEOFSELECT:n=r?A.default.createElement(Mn,c):A.default.createElement(Ai,c);break;case o.ControlType.SELECTCOLUMNS:n=r?A.default.createElement(Mn,c):A.default.createElement(Oi,l._extends({},c,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case o.ControlType.STRUCTURETABLE:n=r?A.default.createElement(Mn,c):A.default.createElement(Ki,l._extends({},c,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case o.ControlType.STRUCTURELISTEDITOR:n=r?A.default.createElement(Mn,c):A.default.createElement(Xi,l._extends({},c,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case o.ControlType.READONLYTABLE:n=r?A.default.createElement(Mn,c):A.default.createElement(Qi,l._extends({},c,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case o.ControlType.CUSTOM:n=A.default.createElement("div",{className:"properties-custom-ctrl",key:a},this.controller.getCustomControl(t,e,r));break;case o.ControlType.STRUCTUREEDITOR:n=A.default.createElement(Li,l._extends({},c,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;default:n=A.default.createElement(Mn,c)}if(os.includes(e.controlType)){if(r)return n;var p=e.className?e.className:"";return A.default.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:l.classNames("properties-ctrl-wrapper",{hide:s,action:i.has_1(e,"action.image.placement")},p)},n,u)}return n}},{key:"createFormControl",value:function(e,t){if(!e)return null;var r=tr.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(r&&r.parameterMetadata){var n,a=new wt(e.resources),i=r.parameterMetadata.getParameter(t);return i.propType()===o.Type.STRUCTURE&&r.structureMetadata&&(n=r.structureMetadata.getStructure(i.baseType())),vr(r.parameterMetadata,t,null,n,a)}return null}}]),t}();function is(e,t,r,n){if(["structuretable","structureeditor","structurelisteditor"].indexOf(e.control.controlType)>=0){var a=o.toType(e.value);return"undefined"!==a&&"null"!==a&&String(e.value).length>0}return o.logger.warn("Ignoring unsupported condition operation 'cellNotEmpty' for control type "+e.control.controlType),!0}function ss(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ls(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ls(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function ls(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function us(e,t,r,n){if(["textfield"].indexOf(e.control.controlType)>=0){var a=n.getDatasetMetadataFields();if(!a)return!0;var i,s=!0,l=ss(a);try{for(l.s();!(i=l.n()).done;){var u=i.value;if(o.fieldValueMatchesProto(e.value,u)){s=!1;break}}}catch(e){l.e(e)}finally{l.f()}if(!s){var c,p=function(e,t){var r=[];if(void 0!==e.control.columnIndex){var n=t.getPropertyValue({name:e.id.name,row:e.id.row});Array.isArray(n)&&n.forEach((function(n,a){a!==e.control.columnIndex&&(t.getControl({name:e.id.name,col:a}).role===o.ParamRole.COLUMN&&r.push(n))}))}return r}(e,n),d=ss(p);try{for(d.s();!(c=d.n()).done;){var f=c.value;if(o.isEqual_1(e.value,f)){s=!0;break}}}catch(e){d.e(e)}finally{d.f()}}return s}return o.logger.warn("Ignoring unsupported condition operation 'colNotExists' for control type "+e.control.controlType),!0}function cs(e,t,r,n){var a=n.getDatasetMetadataFields();if(!a)return!1;var i=e.control.controlType;switch(i){case"selectcolumns":case"selectcolumn":if(Array.isArray(e.value)&&void 0!==e.control.editStyle){if(e.value.length>0){var s=!0;return e.value.forEach((function(e){s=s&&void 0!==ps(a,e)})),s}return!0}return void 0!==ps(a,e.value);default:return o.logger.warn("Ignoring unsupported condition operation 'colDoesExists' for control type "+i),!0}}function ps(e,t){return e.find((function(e){return o.fieldValueMatchesProto(t,e)}))}var ds=i._baseGetTag,fs=i.isArray_1,hs=i.isObjectLike_1;var ms=function(e){return"string"==typeof e||!fs(e)&&hs(e)&&"[object String]"==ds(e)},ys=i._arrayMap;var vs=function(e,t){return ys(t,(function(t){return e[t]}))},gs=n.keys_1;var bs=function(e){return null==e?[]:vs(e,gs(e))},Es=a._baseIndexOf,_s=i.isArrayLike_1,Ss=ms,Ts=Xn,Is=bs,Cs=Math.max;var Rs=function(e,t,r,o){e=_s(e)?e:Is(e),r=r&&!o?Ts(r):0;var n=e.length;return r<0&&(r=Cs(n+r,0)),Ss(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&Es(e,t,r)>-1};function As(e,r,n,a){if(["checkbox","numberfield","passwordfield"].indexOf(e.control.controlType)<0){var i=t._typeof(e.value);if(void 0!==r)switch(i){case"undefined":return!1;case"string":case"object":return Rs(e.value,r.value);default:return o.logger.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!1;case"string":case"object":return Rs(e.value,n);default:return o.logger.warn("Ignoring condition operation 'contains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation contains")}return o.logger.warn("Ignoring unsupported condition operation 'contains' for control type "+e.control.controlType),!0}function ks(e,r,n,a){if("passwordfield"!==e.control.controlType){var i=t._typeof(e.value);if(r){if(null===e.value||null===r.value)return e.value===r.value;switch(i){case"undefined":case"boolean":case"number":return e.value===r.value;case"string":return e.value.trim()===r.value.trim();case"object":return JSON.stringify(e.value)===JSON.stringify(r.value);default:return o.logger.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value===n;switch(i){case"undefined":case"boolean":case"number":return e.value===n;case"string":return e.value.trim()===n.toString().trim();case"object":return JSON.stringify(e.value)===JSON.stringify(n);default:return o.logger.warn("Ignoring condition operation 'equals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation equals")}return o.logger.warn("Ignoring unsupported condition operation 'equals' for control type "+e.control.controlType),!0}function ws(e,r,n,a){var i=t._typeof(e.value);switch(i){case"undefined":case"number":if(void 0!==r)return"number"==typeof r.value&&e.value>r.value;if(void 0!==n)return null===n||e.value>n;throw new Error("Insufficient parameter for condition operation 'greaterThan'");case"object":return null===e.value||null===r.value||null===n;default:return o.logger.warn("Ignoring condition operation 'greaterThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Os(e,r,n,a){var i=t._typeof(e.value);switch(i){case"undefined":return!0;case"boolean":return!1;case"string":return 0===e.value.trim().length;case"number":return null===e.value;case"object":return null===e.value||0===e.value.length;default:return o.logger.warn("Ignoring condition operation 'isEmpty' for parameter_ref "+e.param+" with input data type "+i),!0}}function Ps(e,r,n,a){var i=t._typeof(e.value);switch(i){case"undefined":return!1;case"boolean":return!0;case"string":return 0!==e.value.trim().length;case"number":return null!==e.value;case"object":return null!==e.value&&0!==e.value.length;default:return o.logger.warn("Ignoring condition operation 'isNotEmpty' for parameter_ref "+e.param+" with input data type "+i),!0}}function Ns(e,r,n,a){var i=t._typeof(e.value);switch(i){case"undefined":case"number":if(void 0!==r)return"number"==typeof r.value&&e.value<r.value;if(void 0!==n)return null===n||e.value<n;throw new Error("Insufficient parameter for condition operation 'lessThan'");case"object":return null===e.value||null===r.value||null===n;default:return o.logger.warn("Ignoring condition operation 'lessThan' for parameter_ref "+e.param+" with input data type "+i),!0}}function Ls(e,r,n,a){var i=t._typeof(e.value),s="";if(null!=r)s=r.value;else{if(null==n)return o.logger.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;s=n}return"string"===i||"undefined"===i?new RegExp(s).test(e.value):(o.logger.warn("Ignoring condition operation 'matches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Ds(e,r,n,a){if(["checkbox","numberfield","passwordfield"].indexOf(e.control.controlType)<0){var i=t._typeof(e.value);if(void 0!==r)switch(i){case"undefined":return!0;case"string":case"object":return!Rs(e.value,r.value);default:return o.logger.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!0;case"string":case"object":return!Rs(e.value,n);default:return o.logger.warn("Ignoring condition operation 'notContains' for parameter_ref "+e.param+" with input data type "+i),!0}throw new Error("Insufficient parameter for condition operation notContains")}return o.logger.warn("Ignoring unsupported condition operation 'notContains' for control type "+e.control.controlType),!0}function Ms(e,r,n,a){if("passwordfield"!==e.control.controlType){var i=t._typeof(e.value);if(r){if(null===e.value||null===r.value)return e.value!==r.value;switch(i){case"undefined":case"boolean":case"number":return e.value!==r.value;case"string":return e.value.trim()!==r.value.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(r.value);default:return o.logger.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===e.value||null===n)return e.value!==n;switch(i){case"undefined":case"boolean":case"number":return e.value!==n;case"string":return e.value.trim()!==n.trim();case"object":return JSON.stringify(e.value)!==JSON.stringify(n);default:return o.logger.warn("Ignoring condition operation 'notEquals' for parameter_ref "+e.param+" with input data type "+i),!0}}throw new Error("Insufficient parameter for condition operation notEquals")}return o.logger.warn("Ignoring unsupported condition operation 'notEquals' for control type "+e.control.controlType),!0}function xs(e,r,n,a){var i=t._typeof(e.value),s="";if(null!=r)s=r.value;else{if(null==n)return o.logger.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" no regular expression specified in condition."),!0;s=n}return"string"===i||"undefined"===i?!new RegExp(s).test(e.value):(o.logger.warn("Ignoring condition operation 'notMatches' for parameter_ref "+e.param+" with input data type "+i),!0)}function Bs(e,t,r,o){if(e.value){var n="time"===r?"HH:mm:ss:xxx":l.DEFAULT_DATE_FORMAT,a=b.parse(e.value,n,new Date);return b.isValid(a)}return!0}function Fs(e,r,n,a){"column"!==e.control.role&&o.logger.warn("Condition Operator dmTypeEquals only intended for use on columns");var i=a.getDatasetMetadataFields(),s=null;if(null!=r&&null!==r.value)"column"===r.control.role&&(s=In(r,i,"type")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof e.value||"object"===t._typeof(e.value)?In(e,i,"type")===s:(void 0!==e.value&&o.logger.warn("dmTypeEquals cannot handle the given type: "+t._typeof(e.value)),!1))}function Vs(e,r,n,a){"column"!==e.control.role&&o.logger.warn("Condition Operator dmTypeNotEquals only intended for use on columns");var i=a.getDatasetMetadataFields(),s=null;if(null!=r&&null!==r.value)"column"===r.control.role&&(s=In(r,i,"type")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof e.value||"object"===t._typeof(e.value)?In(e,i,"type")!==s:(void 0!==e.value&&o.logger.warn("dmTypeNotEquals cannot handle the given type: "+t._typeof(e.value)),!1))}function Us(e,r,n,a){"column"!==e.control.role&&o.logger.warn("Condition Operator dmMeasurementEquals only intended for use on columns");var i=a.getDatasetMetadataFields(),s=null;if(null!=r&&null!==r.value)"column"===r.control.role&&(s=In(r,i,"measure")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof e.value||"object"===t._typeof(e.value)?In(e,i,"measure")===s:(void 0!==e.value&&o.logger.warn("dmMeasurementEquals cannot handle the given type: "+t._typeof(e.value)),!1))}function js(e,r,n,a){"column"!==e.control.role&&o.logger.warn("Condition Operator dmMeasurementNotEquals only intended for use on columns");var i=a.getDatasetMetadataFields(),s=null;if(null!=r&&null!==r.value)"column"===r.control.role&&(s=In(r,i,"measure")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof e.value||"object"===t._typeof(e.value)?In(e,i,"measure")!==s:(void 0!==e.value&&o.logger.warn("dmMeasurementNotEquals cannot handle the given type: "+t._typeof(e.value)),!1))}function zs(e,r,n,a){"column"!==e.control.role&&o.logger.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=a.getDatasetMetadataFields(),s=null;if(null!=r&&null!==r.value)"column"===r.control.role&&(s=In(r,i,"modeling_role")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof e.value||"object"===t._typeof(e.value)?In(e,i,"modeling_role")===s:(void 0!==e.value&&o.logger.warn("dmRoleEquals cannot handle the given type: "+t._typeof(e.value)),!1))}function Hs(e,r,n,a){"column"!==e.control.role&&o.logger.warn("Condition Operator dmRoleEquals only intended for use on columns");var i=a.getDatasetMetadataFields(),s=null;if(null!=r&&null!==r.value)"column"===r.control.role&&(s=In(r,i,"modeling_role")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof e.value||"object"===t._typeof(e.value)?In(e,i,"modeling_role")!==s:(void 0!==e.value&&o.logger.warn("dmRoleEquals cannot handle the given type: "+t._typeof(e.value)),!1))}function Gs(e,t,r,n){var a,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?a=e.value.length:void 0!==e.value&&null!==e.value||(a=0),"number"==typeof i&&"number"==typeof a?a===i:(o.logger.warn("Ignoring condition operation 'lengthEquals' for parameter_ref "+e.param),!0)}function qs(e,t,r,n){var a,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?a=e.value.length:void 0!==e.value&&null!==e.value||(a=0),"number"==typeof i&&"number"==typeof a?a<i:(o.logger.warn("Ignoring condition operation 'lengthLessThan' for parameter_ref "+e.param),!0)}function Ys(e,t,r,n){var a,i=r;return t&&(i=t.value),"string"==typeof e.value||Array.isArray(e.value)?a=e.value.length:void 0!==e.value&&null!==e.value||(a=0),"number"==typeof i&&"number"==typeof a?a>i:(o.logger.warn("Ignoring condition operation 'lengthGreaterThan' for parameter_ref "+e.param),!0)}function Ks(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ws(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ws(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Ws(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function $s(e){var t={};if(t.cellNotEmpty=is,t.colNotExists=us,t.colDoesExists=cs,t.contains=As,t.equals=ks,t.greaterThan=ws,t.isEmpty=Os,t.isNotEmpty=Ps,t.lessThan=Ns,t.matches=Ls,t.notContains=Ds,t.notEquals=Ms,t.notMatches=xs,t.isDateTime=Bs,t.dmTypeEquals=Fs,t.dmTypeNotEquals=Vs,t.dmMeasurementEquals=Us,t.dmMeasurementNotEquals=js,t.dmRoleEquals=zs,t.dmRoleNotEquals=Hs,t.lengthEquals=Gs,t.lengthLessThan=qs,t.lengthGreaterThan=Ys,Array.isArray(e)){var r,n=Ks(e);try{for(n.s();!(r=n.n()).done;){var a=r.value;a&&"function"==typeof a.op&&"function"==typeof a.evaluate?t[a.op()]=a.evaluate:o.logger.warn("Custom operator missing require function of `op` or `evaluate`")}}catch(e){n.e(e)}finally{n.f()}}return t}function Xs(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Js(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Js(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw a}}}}function Js(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var Zs=function(){function t(){e._classCallCheck(this,t),this.propertiesStore=new ro,this.handlers={propertyListener:null,controllerHandler:null,actionHandler:null,buttonHandler:null,buttonIconHandler:null,titleChangeHandler:null},this.propertiesConfig={},this.visibleDefinitions={},this.enabledDefinitions={},this.validationDefinitions={},this.requiredDefinitionsIds=[],this.filterDefinitions={},this.filteredEnumDefinitions={},this.allowChangeDefinitions={},this.conditionalDefaultDefinitions={},this.panelTree={},this.controls={},this.actions={},this.customControls=[],this.summaryPanelControls={},this.controllerHandlerCalled=!1,this.commandStack=new v,this.custPropSumPanelValues={},this.controlFactory=new as(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=$s(),this.expressionFunctionInfo={},this.expressionRecentlyUsed=[],this.expressionFieldsRecentlyUsed=[],this.selectionListeners={}}return e._createClass(t,[{key:"getStore",value:function(){return this.propertiesStore.getStore()}},{key:"subscribe",value:function(e){this.propertiesStore.subscribe(e)}},{key:"getHandlers",value:function(){return this.handlers}},{key:"setHandlers",value:function(e){this.handlers=Object.assign(this.handlers,e),this.handlers.controllerHandler&&!this.controllerHandlerCalled&&(this.handlers.controllerHandler(this),this.controllerHandlerCalled=!0)}},{key:"setCommandStack",value:function(e){this.commandStack=e}},{key:"getCommandStack",value:function(){return this.commandStack}},{key:"setEditorSize",value:function(e){this.editorSize=e}},{key:"getEditorSize",value:function(){return this.editorSize}},{key:"setLight",value:function(e){this.light=e}},{key:"getLight",value:function(){return this.light}},{key:"setPropertiesConfig",value:function(e){this.propertiesConfig=e}},{key:"getPropertiesConfig",value:function(){return this.propertiesConfig}},{key:"setParamDef",value:function(e){var t=n.get_1(this.getPropertiesConfig(),"rightFlyout",!0),r=Rr.makeForm(e,!t);this.setForm(r)}},{key:"setForm",value:function(e,t){if(this.form=e,this.reactIntl=t,this.form){this.controls={},this.setControlStates({}),this.setErrorMessages({}),this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this._parseUiConditions();var r,o=[];!function(e,t,r){if(r.uiItems){var o,n=no(r.uiItems);try{for(n.s();!(o=n.n()).done;)lo(e,t,o.value)}catch(e){n.e(e)}finally{n.f()}}}(o,this.actions,this.form),this.saveControls(o),this._parseSummaryControls(o),this.parsePanelTree(),an(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var n={};this.form.data&&(r=this.form.data.datasetMetadata,n=this.form.data.uiCurrentParameters?jr({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(r),this.setPropertyValues(n,!0),this._addToControlValues(),this._addToControlValues(!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,i.isEmpty_1(this.uiItems)||i.isEmpty_1(this.uiItems[0].tabs)||this.propertiesStore.setActiveTab(this.uiItems[0].tabs[0].group),this.setTitle(this.form.label)}}},{key:"getForm",value:function(){return this.form}},{key:"getResource",value:function(e,t){return this.form&&this.form.resources&&this.form.resources[e]?this.form.resources[e]:t}},{key:"setAppData",value:function(e){this.appData=e}},{key:"getAppData",value:function(){return this.appData}},{key:"_parseUiConditions",value:function(){if(this.visibleDefinitions={controls:{},refs:{}},this.enabledDefinitions={controls:{},refs:{}},this.validationDefinitions={controls:{},refs:{}},this.filterDefinitions={controls:{},refs:{}},this.filteredEnumDefinitions={controls:{},refs:{}},this.allowChangeDefinitions={controls:{},refs:{}},this.conditionalDefaultDefinitions={controls:{},refs:{}},this.form.conditions){var e,t=Xs(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?uo(this.visibleDefinitions,r,l.CONDITION_TYPE.VISIBLE):r.enabled?uo(this.enabledDefinitions,r,l.CONDITION_TYPE.ENABLED):r.validation?uo(this.validationDefinitions,r,l.CONDITION_TYPE.VALIDATION):r.filter?uo(this.filterDefinitions,r,l.CONDITION_TYPE.FILTER):r.enum_filter?uo(this.filteredEnumDefinitions,r,l.CONDITION_TYPE.FILTEREDENUM):r.allow_change?uo(this.allowChangeDefinitions,r,l.CONDITION_TYPE.ALLOWCHANGE):r.default_value?uo(this.conditionalDefaultDefinitions,r,l.CONDITION_TYPE.CONDITIONALDEFAULT):o.logger.info("Invalid definition: "+JSON.stringify(r))}}catch(e){t.e(e)}finally{t.f()}}}},{key:"getDefinitions",value:function(e,t,r){var o;switch(t){case l.CONDITION_TYPE.VISIBLE:o=this.visibleDefinitions[r];break;case l.CONDITION_TYPE.ENABLED:o=this.enabledDefinitions[r];break;case l.CONDITION_TYPE.FILTEREDENUM:o=this.filteredEnumDefinitions[r];break;case l.CONDITION_TYPE.ALLOWCHANGE:o=this.allowChangeDefinitions[r];break;case l.CONDITION_TYPE.CONDITIONALDEFAULT:o=this.conditionalDefaultDefinitions[r];break;case l.CONDITION_TYPE.VALIDATION:o=this.validationDefinitions[r]}var n=[];for(var a in o)if(i.has_1(o,a)){var s=nn(a);s.name===e.name&&s.col===e.col&&(n=n.concat(o[a]))}return n}},{key:"getRequiredDefinitionIds",value:function(){return this.requiredDefinitionsIds}},{key:"convertPropertyId",value:function(e){return"string"==typeof e?{name:e}:this.convertNestedPropertyId(e)}},{key:"convertNestedPropertyId",value:function(e){var t;return e&&void 0!==e.col&&void 0===e.row?(void 0!==e.propertyId&&(t=this.convertNestedPropertyId(e.propertyId)),{name:e.name,row:e.col,propertyId:t}):e&&void 0!==e.col&&void 0!==e.row&&void 0!==e.propertyId?{name:e.name,row:e.row,col:e.col,propertyId:this.convertNestedPropertyId(e.propertyId)}:e}},{key:"updateLastChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.updateLastChildPropertyId(e.propertyId,t):(void 0!==t.row&&(e.row=t.row),void 0!==t.col&&(e.col=t.col),e)}},{key:"setChildPropertyId",value:function(e,t){return void 0!==e.propertyId?this.setChildPropertyId(e.propertyId,t):(e.propertyId=t,e)}},{key:"parsePanelTree",value:function(){this.panelTree={},this.panelTree[l.PANEL_TREE_ROOT]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var o,n=ho(t.uiItems);try{for(n.s();!(o=n.n()).done;)yo(e,o.value,r)}catch(e){n.e(e)}finally{n.f()}}}(this.panelTree,this.form,l.PANEL_TREE_ROOT)}},{key:"_addToControlValues",value:function(e){for(var t in this.controls)if(i.has_1(this.controls,t)){var r=this.controls[t],n={name:r.name},a=this.getPropertyValue(n);e?null!=a&&void 0!==a.parameterRef&&(a=this.getPropertyValue({name:a.parameterRef}),this.updatePropertyValue(n,a,!0)):"structuretable"===r.controlType&&!1===r.addRemoveRows&&!0===r.includeAllFields?(a=this._populateFieldData(a,r),this.updatePropertyValue(n,a,!0)):void 0!==r.valueDef&&void 0!==r.valueDef.defaultValue&&void 0===a?(a=r.valueDef.defaultValue,o.isSubControlStructureObjectType(r)&&(a=o.convertObjectStructureToArray(r.valueDef.isList,r.subControls,a)),this.updatePropertyValue(n,a,!0)):"structureeditor"===r.controlType&&(!a||Array.isArray(a)&&0===a.length)&&Array.isArray(r.defaultRow)&&this.updatePropertyValue(n,r.defaultRow,!0)}}},{key:"_populateFieldData",value:function(e,t){for(var r=this.getDatasetMetadataFields(),o=this._isMultiSchemaControl(t),n=[].concat(e),a=0;a<r.length;a++){var i=[];if(-1===this._indexOfField(r[a].name,e)){for(var s=0;s<t.subControls.length;s++)if(s===t.keyIndex){var l=o?{link_ref:r[a].schema,field_name:r[a].origName}:r[a].name;i.push(l)}else i.push(this._getDefaultSubControlValue(s,r[a].name,r,t));n.push(i)}}return n}},{key:"_isMultiSchemaControl",value:function(e){if(e.role===o.ParamRole.COLUMN&&e.valueDef.propType===o.Type.STRUCTURE)return!0;if("array"===o.toType(e.subControls))for(var t in e.subControls)if(i.has_1(e.subControls,t)){var r=e.subControls[t];if(r.role===o.ParamRole.COLUMN&&r.valueDef.propType===o.Type.STRUCTURE)return!0}return!1}},{key:"_canHaveMultipleSchemas",value:function(){for(var e in this.controls)if(i.has_1(this.controls,e)){var t=this.controls[e];if(this._isMultiSchemaControl(t))return!0}return!1}},{key:"_getDefaultSubControlValue",value:function(e,t,r,n){var a,i=n.subControls[e];return"undefined"!==o.toType(i.dmDefault)?a=o.getDMDefault(i,t,r):"undefined"!==o.toType(i.valueDef.defaultValue)?(a=i.valueDef.defaultValue).parameterRef&&(a=this.getPropertyValue({name:a.parameterRef})):a=i.values?i.values[0]:"string"===i.valueDef.propType?"":"boolean"!==i.valueDef.propType&&("enum"===i.valueDef.propType?i.values[0]:"integer"===i.valueDef.propType||"long"===i.valueDef.propType||"double"===i.valueDef.propType?0:"structure"===i.valueDef.propType?{}:null),a}},{key:"_indexOfField",value:function(e,t){for(var r=0;r<t.length;r++)if(t[r][0]===e)return r;return-1}},{key:"getUiItems",value:function(){return this.uiItems}},{key:"getReactIntl",value:function(){return this.reactIntl}},{key:"addSharedControls",value:function(e,t){this.sharedCtrlInfo.push({id:e,controlNames:t})}},{key:"getSharedCtrlInfo",value:function(){return this.sharedCtrlInfo}},{key:"isSummaryPanelShowing",value:function(){return this.isSummaryPanel}},{key:"setIsSummaryPanelShowing",value:function(e){this.isSummaryPanel=e}},{key:"increaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter++}},{key:"decreaseVisibleSubPanelCounter",value:function(){this.visibleSubPanelCounter--}},{key:"isSubPanelsShowing",value:function(){return this.visibleSubPanelCounter>0}},{key:"getTitle",value:function(){return this.propertiesStore.getTitle()}},{key:"setTitle",value:function(e){return this.propertiesStore.setTitle(e)}},{key:"setConditionOps",value:function(e){this.conditionOps=$s(e)}},{key:"getConditionOp",value:function(e){return this.conditionOps?this.conditionOps[e]:null}},{key:"getConditionOps",value:function(){return this.conditionOps}},{key:"getDatasetMetadata",value:function(){return this.propertiesStore.getDatasetMetadata().schemas}},{key:"getDatasetMetadataFields",value:function(){return this.propertiesStore.getDatasetMetadata().fields}},{key:"getDatasetMetadataSchemas",value:function(){return this.propertiesStore.getDatasetMetadata().schemaNames}},{key:"getFilteredDatasetMetadata",value:function(e){var t=this.getDatasetMetadataFields();return e&&(t=this._filterSharedDataset(e,t),t=function(e,t,r,n){var a=n;if(t&&Array.isArray(t[e.name]))try{for(var i=t[e.name],s=0;s<i.length;s++)a=Ho(e,t[e.name][s].definition,r,a)}catch(t){o.logger.warn("Error thrown in filter for propertyId ("+e.name+"): "+t)}return a}(e,this.filterDefinitions.controls,this,t)),t}},{key:"_filterSharedDataset",value:function(e,t){if(!this.sharedCtrlInfo||!e)return t;var r,o=e.name,n=[],a=Xs(this.sharedCtrlInfo);try{for(a.s();!(r=a.n()).done;){var i,s=r.value,l=Xs(s.controlNames);try{for(l.s();!(i=l.n()).done;){if(o===i.value.controlName){n=s.controlNames;break}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){a.e(e)}finally{a.f()}var u=n.map((function(e){return e.controlName}));return this.filterFieldsFromSharedProps(t,u,o)}},{key:"filterFieldsFromSharedProps",value:function(e,t,r){try{var n,a=[],i=Xs(t);try{for(i.s();!(n=i.n()).done;){var s=n.value;if(s!==r){var l=this.getControl({name:s}),u=this.getPropertyValue({name:s});if(Array.isArray(u)){var c,p=Xs(u);try{for(p.s();!(c=p.n()).done;){var d=c.value;if(Array.isArray(d)){var f=o.getTableFieldIndex(l);f>=0&&f<d.length&&a.push(o.stringifyFieldValue(d[f],l))}else a.push(o.stringifyFieldValue(d,l))}}catch(e){p.e(e)}finally{p.f()}}else a.push(o.stringifyFieldValue(u,l))}}}catch(e){i.e(e)}finally{i.f()}var h=Array.from(new Set(a));return e.filter((function(e){return-1===h.indexOf(e.name)}))}catch(e){o.logger.warn("Error filtering shared controls "+e)}return e}},{key:"setDatasetMetadata",value:function(e){var t=[],r=[];if(e){var o=n.cloneDeep_1(e);Array.isArray(o)||(o=[o]);for(var a=0;a<o.length;a++)o[a].name||(o[a].name=a.toString()),o[a].idx=a;var i,s=Xs(o);try{var l=function(){var e=i.value,t=o.filter((function(t){return t.name===e.name}));if(t&&t.length>1)for(var r=0;r<t.length;r++)t[r].name=t[r].name+"_"+t[r].idx};for(s.s();!(i=s.n()).done;)l()}catch(e){s.e(e)}finally{s.f()}var u,c=Xs(o);try{for(c.s();!(u=c.n()).done;){var p=u.value;if(t.push(p.name),p.fields){var d,f=Xs(p.fields);try{for(f.s();!(d=f.n()).done;){var h=d.value;h.schema=p.name,h.origName=h.name,r.push(h)}}catch(e){f.e(e)}finally{f.f()}}}}catch(e){c.e(e)}finally{c.f()}}if(void 0===this.multipleSchemas&&(this.multipleSchemas=this._canHaveMultipleSchemas()),this.multipleSchemas){var m,y=Xs(r);try{for(y.s();!(m=y.n()).done;){var v=m.value;v.name=v.schema+"."+v.origName}}catch(e){y.e(e)}finally{y.f()}}this.propertiesStore.setDatasetMetadata({schemas:e,fields:r,schemaNames:t})}},{key:"validateInput",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Zo(e,this,t)}},{key:"validatePropertiesValues",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];$o(this,e)}},{key:"getSelectedRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getSelectedRows(t)}},{key:"updateSelectedRows",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateSelectedRows(r,t),this._notifySelectionListener(r,t)}},{key:"clearSelectedRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearSelectedRows(t)}},{key:"setDisableRowMoveButtons",value:function(e){Array.isArray(e)&&this.propertiesStore.setDisableRowMoveButtons(e)}},{key:"getDisableRowMoveButtons",value:function(){return this.propertiesStore.getDisableRowMoveButtons()}},{key:"isDisableRowMoveButtons",value:function(e){var t=this.getDisableRowMoveButtons();return!!Array.isArray(t)&&t.some((function(t){return o.isEqual_1(t,e)}))}},{key:"addRowSelectionListener",value:function(e,t){var r=this.convertPropertyId(e),o=r.name;if(this.selectionListeners[o]||(this.selectionListeners[o]={}),Number.isInteger(r.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[o].listener=t}},{key:"removeRowSelectionListener",value:function(e){var t=this.convertPropertyId(e),r=t.name;if(Number.isInteger(t.row))throw new Error("Listening for row selection changes on controls within table cells is not currently supported");this.selectionListeners[r]&&delete this.selectionListeners[r]}},{key:"_notifySelectionListener",value:function(e,t){var r=this.convertPropertyId(e).name;this.selectionListeners[r]&&this.selectionListeners[r].listener(t)}},{key:"setExpressionInfo",value:function(e){this.expressionFunctionInfo=po(e)}},{key:"getExpressionInfo",value:function(){return this.expressionFunctionInfo}},{key:"getExpressionRecentlyUsed",value:function(){return this.expressionRecentlyUsed}},{key:"updateExpressionRecentlyUsed",value:function(e){var t=this.expressionRecentlyUsed.indexOf(e);-1===t?this.expressionRecentlyUsed.splice(0,0,e):(this.expressionRecentlyUsed.splice(t,1),this.expressionRecentlyUsed.unshift(e))}},{key:"clearExpressionRecentlyUsed",value:function(){this.expressionRecentlyUsed=[]}},{key:"getExpressionFieldsRecentlyUsed",value:function(){return this.expressionFieldsRecentlyUsed}},{key:"updateExpressionFieldsRecentlyUsed",value:function(e){var t=this.expressionFieldsRecentlyUsed.indexOf(e);-1===t?this.expressionFieldsRecentlyUsed.splice(0,0,e):(this.expressionFieldsRecentlyUsed.splice(t,1),this.expressionFieldsRecentlyUsed.unshift(e))}},{key:"clearExpressionFieldsRecentlyUsed",value:function(){this.expressionFieldsRecentlyUsed=[]}},{key:"getFilteredEnumItems",value:function(e,t){var r=this.propertiesStore.getFilteredEnumItems(e);if(Array.isArray(r)){for(var o={values:[],valueLabels:[]},n=function(e){o.values.push(r[e]);var n=r[e],a=t.values.findIndex((function(t){return t===r[e]}));a>-1&&(n=t.valueLabels[a]),o.valueLabels.push(n)},a=0;a<r.length;a++)n(a);return o}return t}},{key:"updatePropertyValue",value:function(e,t,r){var n=this.convertPropertyId(e),a=this.getPropertyValue(n);if(void 0===t?this.removePropertyValue(n):this.propertiesStore.updatePropertyValue(n,t),function(e,t){var r=!0;if(!t.getControl(e))return o.logger.warn("Control not found for "+e.name),r;var n=t.getDefinitions(e,l.CONDITION_TYPE.ALLOWCHANGE,l.CONDITION_DEFINITION_INDEX.CONTROLS);if(n.length>0)try{var a,i=Ko(n);try{for(i.s();!(a=i.n()).done;)if(!(r=zo(a.value.definition,e,t)))return r}catch(e){i.e(e)}finally{i.f()}}catch(e){o.logger.warn("Error thrown in validation: "+e)}return r}(e,this)){if(Qo(e,this),r||Zo(e,this,!0),this.handlers.propertyListener){var i=this._convertObjectStructure(n,t);this.handlers.propertyListener({action:l.ACTIONS.UPDATE_PROPERTY,property:n,value:i})}}else this.propertiesStore.updatePropertyValue(n,a)}},{key:"getPropertyValue",value:function(e,t,r){var n=this.convertPropertyId(e),a=this.propertiesStore.getPropertyValue(n),i=r,s=t&&(t.filterHiddenDisabled||t.filterHidden),u=t&&(t.filterHiddenDisabled||t.filterDisabled);if(s||u){var c=this.getControlState(n);if(c===l.STATES.DISABLED&&u||c===l.STATES.HIDDEN&&s)return i;if(i=o.copy(a),Array.isArray(i))for(var p=0;p<i.length;p++){var d=i[p];if(Array.isArray(d))for(var f=0;f<d.length;f++){var h={name:n.name,row:p,col:f},m=this.getControlState(h);(m===l.STATES.DISABLED&&u||m===l.STATES.HIDDEN&&s)&&(i[p][f]=null)}}return t&&!0===t.applyProperties?this._convertObjectStructure(n,i):i}return t&&!0===t.applyProperties?this._convertObjectStructure(n,a):a}},{key:"removePropertyValue",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.removePropertyValue(t)}},{key:"_convertObjectStructure",value:function(e,t){var r=this.getControl(e);if(o.isSubControlStructureObjectType(r)){var n=r.structureType&&"object"===r.structureType;return o.convertArrayStructureToObject(r.valueDef.isList,r.subControls,t,n)}return t}},{key:"getPropertyValues",value:function(e){var t=this.propertiesStore.getPropertyValues(),r=t;if(e&&(e.filterHiddenDisabled||e.filterHidden||e.filterDisabled)){var o={};for(var n in t)if(i.has_1(t,n)){var a=this.getPropertyValue({name:n},e);void 0!==a&&(o[n]=a)}r=o}if(e&&!0===e.applyProperties)for(var s in r)if(i.has_1(r,s)){var l=this.convertPropertyId(s),u=this.propertiesStore.getPropertyValue(l);r[s]=this._convertObjectStructure(l,u)}return r}},{key:"setPropertyValues",value:function(e,t){var r=this,a=n.cloneDeep_1(e);if(e){var s=this.getControls();Object.keys(a).forEach((function(t){if(o.isSubControlStructureObjectType(s[t])){var r=e[t],n=s[t],i=o.convertObjectStructureToArray(n.valueDef.isList,n.subControls,r);a[t]=i}}))}if(this.propertiesStore.setPropertyValues(a),t){var u={};i.isEmpty_1(a)||(Object.keys(a).forEach((function(e){!function(e,t,r){if(!t.getControl(e))return o.logger.warn("Control not found for "+e.name),null;var n=t.getDefinitions(e,l.CONDITION_TYPE.CONDITIONALDEFAULT,l.CONDITION_DEFINITION_INDEX.CONTROLS);if(n.length>0)try{var a,i=Ko(n);try{for(i.s();!(a=i.n()).done;){var s=a.value,u=s.definition.default_value.parameter_ref;u in r||zo(s.definition,e,t)&&(r[u]=s.definition.default_value.value)}}catch(e){i.e(e)}finally{i.f()}}catch(e){o.logger.warn("Error thrown in validation: "+e)}}({name:e},r,u)})),i.isEmpty_1(u)||Object.keys(u).forEach((function(e){if(!(e in a)){var t=r.getControl({name:e});o.isSubControlStructureObjectType(t)&&(u[e]=o.convertObjectStructureToArray(t.valueDef.isList,t.subControls,u[e])),r.propertiesStore.updatePropertyValue({name:e},u[e])}})))}Xo(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:l.ACTIONS.SET_PROPERTIES})}},{key:"setControlStates",value:function(e){this.propertiesStore.setControlStates(e)}},{key:"updateControlState",value:function(e,t){var r=this.convertPropertyId(e);this.propertiesStore.updateControlState(r,t)}},{key:"getControlState",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.value:""}},{key:"getControlStates",value:function(){return this.propertiesStore.getControlStates()}},{key:"getControlValueStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.values:{}}},{key:"getControlEnumFilterStates",value:function(e){var t=this.propertiesStore.getControlState(e);return t?t.enumFilter:{}}},{key:"setPanelStates",value:function(e){this.propertiesStore.setPanelStates(e)}},{key:"updatePanelState",value:function(e,t){this.propertiesStore.updatePanelState(e,t)}},{key:"getPanelState",value:function(e){return this.propertiesStore.getPanelState(e)}},{key:"getPanelStates",value:function(){return this.propertiesStore.getPanelStates()}},{key:"setActionStates",value:function(e){this.propertiesStore.setActionStates(e)}},{key:"updateActionState",value:function(e,t){this.propertiesStore.updateActionState(e,t)}},{key:"getActionState",value:function(e){return this.propertiesStore.getActionState(e)}},{key:"getActionStates",value:function(){return this.propertiesStore.getActionStates()}},{key:"getAction",value:function(e){return this.actions[e.name]}},{key:"setErrorMessages",value:function(e){this.propertiesStore.setErrorMessages(e)}},{key:"getErrorMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=this.convertPropertyId(e);if(t){var a=this.getControlState(n);if(a===l.STATES.DISABLED||a===l.STATES.HIDDEN)return null}var i=this.propertiesStore.getErrorMessage(n,this.reactIntl);return r&&i&&i.type===l.CONDITION_MESSAGE_TYPE.SUCCESS||o&&i&&!Or(i.displayError)&&!i.displayError?null:i}},{key:"getErrorMessages",value:function(e,t,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=this.propertiesStore.getErrorMessages();return o&&(n=this._filterDisplayErrors(n)),(e||t)&&(n=this._filterMessages(n,e,t,r)),n}},{key:"getAllErrorMessages",value:function(){return this.getErrorMessages(!1,!1,!1,!1)}},{key:"getRequiredErrorMessages",value:function(){var e=this.propertiesStore.getErrorMessages(),t=this._filterNonRequiredErrors(e);return this._filterHiddenDisabledErrors(t)}},{key:"_filterMessages",value:function(e,t,r,o){var n={},a=[];for(var s in e)if(i.has_1(e,s)){var l=this.getErrorMessage({name:s},r,o);l&&l.text&&(t?a.push({id_ref:s,validation_id:l.validation_id,type:l.type,text:l.text}):n[s]=l)}return t?a:n}},{key:"_filterDisplayErrors",value:function(e){return this._filterErrors(e,(function(e){return Or(e.displayError)||e.displayError}))}},{key:"_filterNonRequiredErrors",value:function(e){return this._filterErrors(e,(function(e){return!0===e.required}))}},{key:"_filterHiddenDisabledErrors",value:function(e){var t=this;return this._filterErrors(e,(function(e,r){var o=t.getControlState(r);return"hidden"!==o&&"disabled"!==o}))}},{key:"_filterErrors",value:function(e,t){var r={};return Object.keys(e).forEach((function(o){var n=e[o];if(n.text&&t(n,n.propertyId))r[o]=n;else for(var a in n)if(i.has_1(n,a)){var s=n[a];if(s&&s.text&&t(s,s.propertyId))void 0===r[o]&&(r[o]={}),r[o][a]=s;else for(var l in s)if(i.has_1(s,l)){var u=s[l];u&&u.text&&t(u,u.propertyId)&&(void 0===r[o]&&(r[o]={}),void 0===r[o][a]&&(r[o][a]={}),r[o][a][l]=u)}}})),r}},{key:"updateErrorMessage",value:function(e,t){var r=this.convertPropertyId(e);t&&"info"!==t.type?this.propertiesStore.updateErrorMessage(r,t):this.propertiesStore.clearErrorMessage(r)}},{key:"removeErrorMessageRow",value:function(e){var t=this.convertPropertyId(e),r=this.propertiesStore.getErrorMessages(),o=r[t.name];if(void 0!==o){for(var n=0,a=Object.keys(o);n<a.length;n++){var i=a[n],s=parseInt(i,10);s===t.row?delete r[t.name][s]:s>t.row&&(r=this._moveMessageRows(r,t.name,s,s-1))}this.setErrorMessages(r)}}},{key:"moveErrorMessageRows",value:function(e,t,r){var o=this.propertiesStore.getErrorMessages(),n=o[e];if(void 0!==n){var a=n[t],i=n[r];if(void 0!==a&&void 0!==i){(o=this._moveMessageRows(o,e,t,r))[e][t]={};for(var s=0,l=Object.keys(i);s<l.length;s++){var u=l[s];o[e][t][u]=i[u]}}else void 0!==a?o=this._moveMessageRows(o,e,t,r):void 0!==i&&(o=this._moveMessageRows(o,e,r,t));this.setErrorMessages(o)}}},{key:"_moveMessageRows",value:function(e,t,r,o){return e[t][o]=e[t][r],delete e[t][r],e}},{key:"saveControls",value:function(e){var t=this;e.forEach((function(e){void 0===e.columnIndex?(!i.has_1(t.controls,e.name)||i.has_1(t.controls,e.name)&&e.controlType!==o.ControlType.CUSTOM)&&(t.controls[e.name]=e):t.controls[e.parameterName][e.columnIndex]=e}))}},{key:"getControl",value:function(e){var t=this.controls[e.name];if(void 0!==e.col&&t){var r=this.controls[e.name][e.col.toString()];if(r)return r}return t}},{key:"getControlPropType",value:function(e){var t=this.getControl(e);return void 0!==t.valueDef?t.valueDef.propType:null}},{key:"updateControlEnumValues",value:function(e,t){var r=this.getControl(e);Array.isArray(t)&&r?(r.values=t.map((function(e){return e.value})),r.valueLabels=t.map((function(e){return e.label?e.label:e.value}))):o.logger.warn("properties-controller",new Error("updateControlEnumValues - control not found or valuesObj not valid"))}},{key:"getControls",value:function(){return this.controls}},{key:"setSaveButtonDisable",value:function(e){this.propertiesStore.setSaveButtonDisable(e)}},{key:"getSaveButtonDisable",value:function(){return this.propertiesStore.getSaveButtonDisable()}},{key:"isRequired",value:function(e){var t=this.getControl(e);if(t){var r=t.required;return r||!1}return!1}},{key:"isSummary",value:function(e){var t=this.getControl(e);if(t){var r=t.summary;return r||!1}return!1}},{key:"getControlType",value:function(e){var t=this.getControl(e);return t?t.controlType:null}},{key:"_parseSummaryControls",value:function(e){var t={};e.forEach((function(e){e.summaryPanelId&&(void 0===t[e.summaryPanelId]&&(t[e.summaryPanelId]=[]),void 0===e.columnIndex&&t[e.summaryPanelId].push(e.name))})),this.setSummaryPanelControls(t)}},{key:"setSummaryPanelControls",value:function(e){this.summaryPanelControls=e}},{key:"getSummaryPanelControls",value:function(e){return this.summaryPanelControls[e]}},{key:"updateCustPropSumPanelValue",value:function(e,t){void 0!==e.name&&(this.custPropSumPanelValues[e.name]=t)}},{key:"getCustPropSumPanelValue",value:function(e){var t=this.getControlState(e);return t===l.STATES.DISABLED||t===l.STATES.HIDDEN?null:this.custPropSumPanelValues[e.name]}},{key:"setControlInSummary",value:function(e,t,r){var o=this.getControl(e);o&&(o.summary=!0,o.summaryLabel=t)}},{key:"createControl",value:function(e,t,r){var o=this.controlFactory.createFormControl(t,r),n=[];return so(n,o,this.getControl(e).parentCategoryId),this.saveControls(n),this.controlFactory.createControlItem(o,e)}},{key:"getControlFactory",value:function(){return this.controlFactory}},{key:"setCustomControls",value:function(e){this.customControls=e}},{key:"getCustomControl",value:function(e,t,r){if(t.customControlId){var n,a=Xs(this.customControls);try{for(a.s();!(n=a.n()).done;){var i=n.value;if(i.id()===t.customControlId)try{return new i(e,this,t.data,r).renderControl()}catch(e){return o.logger.warn("Error thrown creating custom control: "+e),""}}}catch(e){a.e(e)}finally{a.f()}}return"Custom control not found: "+t.customControlId}},{key:"getMaxLengthForMultiLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForMultiLineControls?this.getPropertiesConfig().maxLengthForMultiLineControls:1024}},{key:"getMaxLengthForSingleLineControls",value:function(){return void 0!==this.getPropertiesConfig().maxLengthForSingleLineControls?this.getPropertiesConfig().maxLengthForSingleLineControls:128}},{key:"setInitialAddRemoveRows",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t];if(r.valueDef&&r.valueDef.propType===o.Type.STRUCTURE&&!Or(r.addRemoveRows)){var n={name:r.name};e.setAddRemoveRows(n,r.addRemoveRows)}}))}},{key:"setAddRemoveRows",value:function(e,t){this.propertiesStore.setAddRemoveRows(e,t)}},{key:"getAddRemoveRows",value:function(e){return this.propertiesStore.getAddRemoveRows(e)}},{key:"getStaticRows",value:function(e){var t=this.convertPropertyId(e);return this.propertiesStore.getStaticRows(t)}},{key:"updateStaticRows",value:function(e,t){var r=this.convertPropertyId(e),o=this.getPropertyValue(e),n=t.sort();this.validateSelectionValues(n,o)&&this.propertiesStore.updateStaticRows(r,n)}},{key:"clearStaticRows",value:function(e){var t=this.convertPropertyId(e);this.propertiesStore.clearStaticRows(t)}},{key:"setInitialTableButtonState",value:function(){var e=this;Object.keys(this.controls).forEach((function(t){var r=e.controls[t],o={name:r.name};Or(r.buttons)||r.buttons.forEach((function(t){e.setTableButtonEnabled(o,t.id,t.enabled||!1)})),r.subControls&&e.setInitialTableButtonSubControlState(o,r.subControls)}))}},{key:"setInitialTableButtonSubControlState",value:function(e,t){var r=this;t.forEach((function(t){var o=r.getPropertyValue(e);Or(t.buttons)||o.forEach((function(o,n){var a={name:e.name,row:n,col:t.columnIndex};t.buttons.forEach((function(e){r.setTableButtonEnabled(a,e.id,e.enabled||!1)}))}))}))}},{key:"setTableButtonEnabled",value:function(e,t,r){this.propertiesStore.setTableButtonEnabled(e,t,r)}},{key:"getTableButtons",value:function(e){return this.propertiesStore.getTableButtons(e)}},{key:"getTableButtonEnabled",value:function(e,t){return this.propertiesStore.getTableButtonEnabled(e,t)}},{key:"validateSelectionValues",value:function(e,t){var r=!1;e&&t.length>0?r=!(!e.slice(1).map((function(t,r){return t-e[r]})).every((function(e){return 1===e}))||!(e.includes(0)&&!e.includes(t.length-1)||!e.includes(0)&&e.includes(t.length-1))):r=!1;return r}}]),t}(),Qs={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-canvas/parameter-defs/parameter-defs-v3-schema.json",title:"Property Definitions Schema",description:"Watson Data Platform Property Definition Schema for the Common Properties editor",type:"object",properties:{titleDefinition:{type:"object",properties:{title:{type:"string"},editable:{description:"True if the title can be edited. False if the title should be readonly.",default:!0,type:"boolean"}}},current_parameters:{description:"Current parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},current_ui_parameters:{description:"Current UI only parameter set upon input. Keys are parameter names, values are their values.",type:"object",properties:{},additionalProperties:!0},parameters:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/parameters"},complex_types:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/properties/complex_types"},uihints:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#"},conditions:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#/properties/conditions"},dataset_metadata:{oneOf:[{description:"A single datarecord object. Deprecated.",$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"},{description:"An array of datarecord objects",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/datarecord-metadata/datarecord-metadata-v3-schema.json#"}}]},resources:{description:"Map of string resources.",type:"object",properties:{},additionalProperties:!0}}},el={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json#",description:"WDP UI Hints schema",title:"WDP UI Hints schema",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/uihints-v3-schema.json"]},label:{description:"External name of operator",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Description of operator",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to operation icon",type:"string"},group_info:{type:"array",items:{$ref:"#/definitions/group_definition"}},editor_size:{description:"Editor size for node edits",enum:["small","medium","large"]},pixel_width:{description:"Gives more control of editor panel width. The panel is shown at min size if editor_size is small and max size if editor_size is medium. If min and max are the same no sizing button is displayed.",type:"object",properties:{min:{description:"Minimum size in pixels for the right side editor flyout",type:"number"},max:{description:"Maximum size in pixels for the right side editor flyout",type:"number"}}},parameter_info:{items:{$ref:"#/definitions/parameter_definition"},type:"array"},complex_type_info:{items:{$ref:"#/definitions/complex_type_definition"},type:"array"},ui_parameters:{description:"List of UI only parameters",type:"array",items:{$ref:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#/definitions/parameter_definition"}},action_info:{items:{$ref:"#/definitions/action_definition"},type:"array"},help:{description:"Help information",type:"object",properties:{data:{description:"Data passed in the helpClickHandler.",type:"object",additionalProperties:!0}},additionalProperties:!0}},required:["id"],definitions:{group_definition:{description:"Grouping for parameters and groups",type:"object",properties:{id:{description:"Identifier for this group",type:"string"},type:{description:"The group type to be displayed",type:"string",enum:["controls","tabs","subTabs","panels","columnSelection","columnSelectionRecursive","panelSelector","customPanel","summaryPanel","actionPanel","textPanel","twistyPanel","columnPanel"]},depends_on_ref:{description:"Parameter name this group depends upon. Valid for panelSelector groups only.",type:"string"},insert_panels:{description:"Indicates whether panels, contained with a panelSelector, should be inserted between the radio buttons of a radio button set indicated by the depends_on_ref parameter.",type:"boolean"},nested_panel:{description:"Indicate whether panel should be nested. Nested panels are indented by 16px from the left and display left border. Default is false.",type:"boolean"},open:{description:"Used to determine if a panel is open or closed when UI is displayed. Currenty only supported with twistyPanel. Default is false.",type:"boolean"},label:{description:"Group label",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Group description. Used in a textPanel",type:"object",$ref:"#/definitions/resource_definition"},parameter_refs:{description:"List of parameters to be displayed",type:"array",items:{type:"string"}},action_refs:{description:"List of actions to be displayed. Used with an actionPanel",type:"array",items:{type:"string"}},data:{description:"Data passed to custom panel when group type is 'customPanel'",additionalProperties:!0,oneOf:[{type:"object"},{type:"array"}]},group_info:{items:{$ref:"#/definitions/group_definition"},type:"array"},class_name:{description:"Optional class name to set for this group",type:"string"}},required:["id"]},parameter_definition:{description:"Operator parameters hints",type:"object",properties:{parameter_ref:{description:"Parameter reference to base operator parameter definition",type:"string"},label:{description:"External name for parameter",type:"object",$ref:"#/definitions/resource_definition"},label_visible:{description:"Whether to display the label or not. If not displayed, the label can still be used by screen readers",type:"boolean",default:!0},description:{description:"Description of parameter with optional placement context",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{placement:{description:"Optional placement context for the text",enum:["as_tooltip","on_panel"],default:"as_tooltip"}}}]},control:{description:"Which control to use. In most cases the control gets to be determined and should not be set",type:"string",enum:["readonly","readonlyTable","textfield","passwordfield","textarea","expression","numberfield","spinner","checkbox","radioset","checkboxset","toggletext","oneofselect","multiselect","someofselect","selectcolumn","selectcolumns","selectschema","structuretable","structurelisteditor","structureeditor","custom","datefield","timefield","timestampfield","code","list","hidden"]},increment:{description:"Determines the increment/decrement value for the spinner control only",type:"number",default:1},orientation:{description:"Determines how the control is displayed",type:"string",enum:["vertical","horizontal"]},width:{description:"Percentage of group width the control should use",type:"number"},char_limit:{description:"Limits the number of characters a user can enter into the control for string parameters only",type:"number"},display_chars:{description:"This has been deprecated and is subject to removal. Limits the number of characters displayed for a text field in a column in a table. The text will have an ellipsis appended at this limit.",type:"number",default:64},separator:{description:"Determines where to put a separator relative to the current control",type:"string",enum:["before","after"]},visible:{description:"Determines whether to display parameter in control. Used in complex structures",type:"boolean"},place_holder_text:{description:"Text hint for the user displayed input controls",type:"object",$ref:"#/definitions/resource_definition"},text_before:{description:"Static text to be displayed before the control",type:"object",$ref:"#/definitions/text_definition"},text_after:{description:"Static text to be displayed after the control",type:"object",$ref:"#/definitions/text_definition"},resource_key:{description:"Used as a key for enum value labels",type:"string"},edit_style:{description:"Editing style of elements in a table",type:"string",enum:["subpanel","inline","on_panel"]},value_icons:{description:"For enumerated types, this defines the set of icons for the valid values. The ordering must be consistent with the order in the parameter enum attribute.",type:"array",items:{type:"string"}},sortable:{description:"Determines if this column values can be sorted into ascending/descending order in a table. Applies to structure parameters only.",type:"boolean"},filterable:{description:"Determines if this column values can be filtered so that only rows that match the filter in column values are shown in the table. Applies to structure parameters and multiselect control only.",type:"boolean"},language:{description:"The language for the expression editor syntax highlight and autocomplete workds. Applies to expression control type.",type:"string",enum:["CLEM","javascript","text/x-hive","text/x-rsrc","text/x-python"]},summary:{description:"Determines if this column values will be shown in the summaryPanel",type:"boolean"},generated_values:{description:"Generates values for a column in a 'readonly' parameter.",type:"object",properties:{operation:{description:"Currently only 'index' is supported which will auto-increment the integer column value starting at 1. The start value can be configured by setting a start_value.",type:"string",enum:["index"]},start_value:{description:"Optional start value to increment from when the 'type' is 'index'. If the start_value is not set, it will default to 1.",type:"integer"}},required:["operation"]},number_generator:{description:"Adds a number generation button beside the numeric control",type:"object",properties:{label:{description:"Number generator button label. It is visible on hover.",type:"object",$ref:"#/definitions/resource_definition"},range:{description:"Number generator range",type:"object",properties:{min:{description:"Maximum value for generated numbers",type:"number"}},required:["min","max"]}},required:["label"]},dm_default:{description:"Used within complex structures containing 'column' key_definition fields. This associates the subControl parameter with a field attribute in the current record schema.",type:"string",enum:["type","description","measure","modeling_role"]},dm_icon:{description:"This can be set to display an icon of the corresponding dm type in the `role`:`column' field of a table.",type:"string",enum:["measure","none"]},custom_control_id:{description:"Used to determine which custom control to use when control=custom.",type:"string"},data:{description:"Data passed to custom control when control=custom",type:"object",additionalProperties:!0},date_format:{description:"A format string such as YYYY-MM-DD which describes the display and entry format for a date field.",type:"string"},time_format:{description:"A format string such as HH:mm:ss which describes the display and entry format for a time field.",type:"string"},moveable_rows:{description:"Determines if rows can be moved up or down in a table or array of strings",type:"boolean"},rows:{description:"Number of rows to display in tables",type:"integer",default:4},action_ref:{description:"Determines an action should be added to the control",type:"string"},custom_value_allowed:{description:"Determines if a dropdown, outside of a table, can allow a custom value to be entered",type:"boolean"},class_name:{description:"Optional class name to set for this control",type:"string"}},required:["parameter_ref"]},complex_type_definition:{type:"object",description:"Complex parameters",properties:{complex_type_ref:{type:"string",description:"Name of complex type, can be referenced in other places."},label:{description:"External name used in subpanels",type:"object",$ref:"#/definitions/resource_definition"},key_definition:{$ref:"#/definitions/parameter_definition"},layout:{description:"Array of rows containing structure element names",type:"array",items:{description:"A single row of structure parameter names for laying out horizontally",type:"array",items:{description:"A parameter name within the current structure",type:"string"}}},parameters:{type:"array",description:"List of parameters",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}},add_remove_rows:{description:"Determines if the table can have rows added and removed",type:"boolean",default:!0},row_selection:{description:"Determines how many rows can be selected at a time. 'multiple-edit': select multiple rows and allow the editing of column values for all selected rows.",type:"string",enum:["single","multiple","multiple-edit"]},header:{description:"Determines if the table header should be displayed",type:"boolean",default:!0},include_all_fields:{description:"Use when `add_remove_rows` is false. Ensures the control contains a record for each field in the data model.",type:"boolean",default:!0},buttons:{description:"Display custom buttons in place of any buttons from the table. Will override 'add_remove_rows' and readonlyTable edit buttons.",type:"array",items:{$ref:"#/definitions/button_definition"}}},required:["complex_type_ref","parameters"]},action_definition:{description:"Actions that callback to application",type:"object",properties:{id:{description:"Identifier for this action",type:"string"},description:{description:"Description of action. Use for tooltip.",type:"object",$ref:"#/definitions/resource_definition"},control:{description:"The action type to be displayed",type:"string",enum:["button","image"]},label:{description:"Action label",type:"object",$ref:"#/definitions/resource_definition"},image:{description:"Properties for how the image will look. Use when control=image.",type:"object",properties:{url:{description:"image url to be used for action",type:"string"},placement:{description:"placement of the action image",enum:["right","left"]},size:{description:"pixel size of the image.",type:"object",properties:{height:{description:"image height in pixels",type:"number"},width:{description:"image width in pixels",type:"number"}}},tooltip_direction:{description:"Action image tooltip direction.",enum:["right","left","top","bottom"],default:"bottom"}}},data:{description:"Data returned when action called",type:"object",additionalProperties:!0}},required:["id"]},resource_definition:{description:"Localizable string resource",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},text_definition:{description:"Static text to be displayed before or after the control",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{type:{description:"Type of text message to display",enum:["info"]}}}]},button_definition:{description:"Button to be displayed after the table's search bar",type:"object",properties:{id:{description:"Button identifier used to idenify the button in the callback function",type:"string"},label:{description:"Button label to display. If an icon is specified as well, the icon will be shown to the right of the label.",type:"object",$ref:"#/definitions/resource_definition"},description:{description:"Tooltip text to display when the button is hovered",type:"object",$ref:"#/definitions/resource_definition"},icon:{description:"URL to .svg image to display",type:"string"},carbon_icon:{description:"Host provided name of Carbon icon to display. A callback function is required for the host application to return the jsx icon object imported from @carbon/icons-react library",type:"string"},enabled:{description:"Button will be enabled if true, disabled if false",type:"boolean",default:!1},divider:{description:"Display a divider before or after this button",type:"string",enum:["before","after"],default:"after"}},anyOf:[{required:["id","label"]},{required:["id","icon","description"]},{required:["id","carbon_icon","description"]}]}}},tl={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json#",title:"Watson Data Platform Validation Schema",description:"User Interface Condition schema for the Watson Data Platform",type:"object",properties:{json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/conditions-v3-schema.json"]},conditions:{type:"array",items:{$ref:"#/definitions/conditions_definition"}}},required:["conditions"],definitions:{conditions_definition:{type:"object",oneOf:[{$ref:"#/definitions/validation_definition"},{$ref:"#/definitions/enabled_definition"},{$ref:"#/definitions/visible_definition"},{$ref:"#/definitions/filter_definition"},{$ref:"#/definitions/enum_filter_definition"},{$ref:"#/definitions/allow_change_definition"},{$ref:"#/definitions/default_value_definition"}]},validation_definition:{properties:{validation:{description:"A single validation. The fail_message is displayed upon validation failure.",type:"object",properties:{id:{description:"Unique identifier. Required when multiple fail_message sections have the same focus_parameter_ref value.",type:"string"},fail_message:{description:"Error/warning",type:"object",$ref:"#/definitions/fail_message_definition"},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["fail_message","evaluate"]}},required:["validation"]},enabled_definition:{properties:{enabled:{description:"Enablement test. Disables controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["enabled"]},visible_definition:{properties:{visible:{description:"Visibility test. Hides controls if evaluate is false.",type:"object",properties:{parameter_refs:{description:"Array of parameter names affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},values:{description:"Optional array of enumeration item names to operate upon",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},group_refs:{description:"Array of group ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},action_refs:{description:"Array of action ids affected by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},anyOf:[{required:["parameter_refs"]},{required:["group_refs"]},{required:["action_refs"]}],required:["evaluate"]}},required:["visible"]},evaluate_definition:{oneOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]},or_definition:{description:"Container for 'or' operations",type:"object",properties:{or:{description:"The 'or' condition. Any sub-condition evaluates to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["or"]},and_definition:{description:"Container for 'and' operations",type:"object",properties:{and:{description:"The 'and' condition. All sub-conditions evaluate to true. Can nest any number of additional conditional types.",type:"array",items:{anyOf:[{$ref:"#/definitions/and_definition"},{$ref:"#/definitions/or_definition"},{$ref:"#/definitions/condition_definition"},{$ref:"#/definitions/filter_condition_definition"}]}}},required:["and"]},condition_definition:{description:"A parameter condition. Evaluates to true or false.",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",properties:{op:{description:"A single operator for the properties of the condition.",anyOf:[{enum:["isEmpty","isNotEmpty","greaterThan","lessThan","equals","notEquals","contains","notContains","colNotExists","cellNotEmpty","colDoesExist","isDateTime","dmTypeEquals","dmTypeNotEquals","dmMeasurementEquals","dmMeasurementNotEquals","dmRoleEquals","dmRoleNotEquals","matches","notMatches"]},{description:"The name of the custom operator",type:"string"}]},parameter_ref:{description:"The primary parameter - must be present",type:"string"},parameter_2_ref:{description:"Optional second parameter for multi-parameter validation",type:"string"},value:{description:"Optional value against which to compare the primary parameter value",oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"null"}]}},required:["op","parameter_ref"]}},required:["condition"]},fail_message_definition:{properties:{focus_parameter_ref:{description:"The parameter control to get the error/warning message.",type:"string"},message:{description:"User message",type:"object",$ref:"#/definitions/message_definition"},type:{enum:["error","warning","info"]}},required:["focus_parameter_ref","message"]},message_definition:{description:"User message",type:"object",properties:{default:{type:"string"},resource_key:{type:"string"}},anyOf:[{required:["default"]},{required:["resource_key"]}]},filter_definition:{properties:{filter:{description:"Filter test. Includes support for filtering the values to be displayed in a control",type:"object",properties:{parameter_ref:{description:"Parameter affected by this operation",type:"string"},parameter_refs:{description:"Parameters affected by this operation - exclusive with parameter_ref",type:"array",items:{type:"string"}},evaluate:{description:"Evaluates to return values included in a control",type:"object",$ref:"#/definitions/evaluate_definition"}},oneOf:[{required:["evaluate","parameter_ref"]},{required:["evaluate","parameter_refs"]}]}},required:["filter"]},enum_filter_definition:{properties:{enum_filter:{description:"Allows filtering of available enumeration options",type:"object",properties:{target:{description:"The target parameter information",type:"object",properties:{parameter_ref:{description:"The enumeration parameter affected by this operation",type:"string"},values:{description:"Array of available enumeration options when the condition evaluates to 'true'",type:"array",minItems:1,uniqueItems:!0}},required:["parameter_ref","values"]},evaluate:{description:"Evaluates to return values included in an enumeration control",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["target","evaluate"]}},required:["enum_filter"]},filter_condition_definition:{description:"Allows for filtering available fields in the data record schema(s)",type:"object",properties:{condition:{description:"The condition that is evaluated",type:"object",anyOf:[{properties:{op:{$ref:"#/definitions/filter_op_definition"},value:{description:"Value to compare against data record schema field attribute",type:"string"}},required:["op"]},{properties:{op:{$ref:"#/definitions/filter_op_definition"},values:{description:"Array of values which are compared to a data record schema field attribute",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0}},required:["op","values"]}]}},required:["condition"]},filter_op_definition:{description:"A single operator for comparing data record schema field attributes and sharing source fields",enum:["dmMeasurement","dmType","dmModelingRole","dmSharedFields"]},allow_change_definition:{properties:{allow_change:{description:"Allow change test. Allows a field value to be changed if evaluates to true.",type:"object",properties:{parameter_refs:{description:"Array of parameter names who values changes are allowed by this operation",type:"array",minItems:1,items:{type:"string"},uniqueItems:!0},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_refs","evaluate"]}},required:["allow_change"]},default_value_definition:{properties:{default_value:{description:"Set default value of the parameter_ref if condition evaluates to true.",type:"object",properties:{parameter_ref:{description:"Parameter whose default value is to be set.",type:"string"},value:{description:"This will be the default value of parameter_ref if condition evaluates to true.",type:["number","string","boolean","object","array"]},evaluate:{description:"Evaluates to a boolean result",type:"object",$ref:"#/definitions/evaluate_definition"}},required:["parameter_ref","value","evaluate"]}},required:["default_value"]}}},rl={$schema:"https://json-schema.org/draft-04/schema#",id:"https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json#",title:"Watson Data Platform Operator Schema",description:"Operator schema for the Watson Data Platform",type:"object",properties:{id:{description:"Operator identifier",type:"string"},json_schema:{description:"Refers to the JSON schema used to validate documents of this type",enum:["https://api.dataplatform.ibm.com/schemas/common-pipeline/operators/operator-v3-schema.json"]},operator_type:{description:"operator type",enum:["model","transformer","estimator","dataReader","dataWriter"]},input_ports:{description:"List of input ports. If no ports are defined this is a source operator that accepts no data inputs. If the input_ports array is missing a single input port with id 'input_port' is assumed which accepts only a single connection.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},output_ports:{description:"List of output ports. If no ports are defined this is a terminal operator that provides no data outputs. If the output_ports array is missing a single output port named 'output_port' is assumed which accepts multiple connections.",type:"array",minItems:0,items:{$ref:"#/definitions/port_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},app_data:{$ref:"#/definitions/app_data_def"}},required:["id","operator_type","parameters"],definitions:{parameter_definition:{description:"Operator parameters definition",type:"object",properties:{id:{description:"A unique name for the parameter.",type:"string"},required:{description:"Indication whether parameter is required or optional",type:"boolean",default:!1},role:{description:"Role of parameter",enum:["column","new_column","expression"]},type:{description:"Field type. Can be a primitive type (string, integer, double, date, time, timestamp, or custom), an array, or map containing those types(note arrays and maps can contain complex_types)",type:"string"},enum:{description:"List of valid values. Can be used instead of specifying type.",type:"array"},default:{description:"default value based on type of parameter",anyOf:[{$ref:"#/definitions/parameter_ref_definition"},{oneOf:[{type:"string"},{type:"number"},{type:"boolean"},{type:"array"},{type:"object"},{type:"null"}]}]}},anyOf:[{required:["id","type"]},{required:["id","enum"]},{required:["id","type","enum"]}]},parameter_ref_definition:{description:"Structure for parameter refs",type:"object",properties:{parameter_ref:{description:"Reference to another parameter.",type:"string"}},required:["parameter_ref"]},complex_type_definition:{description:"Structure for complex parameters",type:"object",properties:{id:{description:"Identifier of complex type, can be referenced in other places.",type:"string"},type:{description:"Used to determine how parameters in the complex_type stored. Valid values are array and object.",type:"string"},key_definition:{$ref:"#/definitions/parameter_definition"},parameters:{description:"List of parameters",type:"array",items:{anyOf:[{$ref:"#/definitions/parameter_definition"},{$ref:"#/definitions/complex_type_definition"}]}}},required:["id","parameters"]},port_definition:{description:"Operator ports support multiple differentiated connections for either inputs or outputs.",type:"object",properties:{id:{description:"Unique identifier within the node",type:"string"},cardinality:{description:"Property to capture how many connections are allowed for this port, e.g., min: 1, max:1 implies you must supply 1 and only 1; min:0, max:1 implies it is optional and a max of one, min:0, max:-1 means it is optional and you can may have any number of connections. The default value is 1:1 for inputs and 1:-1 for outputs.",type:"object",properties:{min:{description:"Minimum data sets that are required for this port",type:"integer",default:1},max:{description:"Maximum data sets that are allowed on this port. A negative value indicates unlimited. The default value is 1 for inputs and -1 for outputs.",type:"integer"}},additionalProperties:!1},parameters:{description:"List of parameters",type:"array",items:{$ref:"#/definitions/parameter_definition"}},complex_types:{description:"List of complex types",type:"array",items:{$ref:"#/definitions/complex_type_definition"}}}},app_data_def:{description:"Object containing application-specific data",type:"object",properties:{},additionalProperties:!0}}};function ol(e){var t=function(){var e=new C.Validator,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(Qs,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(el,r+"operators/uihints-v3-schema.json"),e.addSchema(tl,r+"operators/conditions-v3-schema.json"),e.addSchema(rl,r+"operators/operator-v3-schema.json"),e.addSchema(a.dataRecordMetadataV3Schema,r+"datarecord-metadata/datarecord-metadata-v3-schema.json"),e}();!function(e,t,r,o){var n=o.validate(e,t,{nestedErrors:!0});n&&n.errors&&n.errors.length>0&&console.error(n)}(e,Qs,0,t)}function nl(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var al=function(r){t._inherits(i,r);var a=nl(i);function i(r){var n;return e._classCallCheck(this,i),(n=a.call(this,r)).state={focused:!1,titleValidation:null},n.editTitleClickHandler=n.editTitleClickHandler.bind(t._assertThisInitialized(n)),n.helpClickHandler=n.helpClickHandler.bind(t._assertThisInitialized(n)),n.id=o.generateId(),n.textInputRef=A.default.createRef(),n.labelText=o.formatMessage(r.controller.getReactIntl(),l.MESSAGE_KEYS.TITLE_EDITOR_LABEL),n.textInputOnFocus=n.textInputOnFocus.bind(t._assertThisInitialized(n)),n.textInputOnBlur=n.textInputOnBlur.bind(t._assertThisInitialized(n)),n.headingEnabled=n.props.showHeading&&(n.props.heading||n.props.icon),n.handleTitleChange=n.handleTitleChange.bind(t._assertThisInitialized(n)),n.titleChangeHandler=n.props.controller.getHandlers().titleChangeHandler,n}return e._createClass(i,[{key:"_handleKeyPress",value:function(e){"Enter"===e.key&&this.textInputRef.current.blur()}},{key:"editTitleClickHandler",value:function(){this.textInputRef.current.focus()}},{key:"helpClickHandler",value:function(){this.props.helpClickHandler&&this.props.helpClickHandler(this.props.controller.getForm().componentId,this.props.help.data,this.props.controller.getAppData())}},{key:"textInputOnFocus",value:function(){this.setState({focused:!0})}},{key:"textInputOnBlur",value:function(){this.setState({focused:!1})}},{key:"handleTitleChange",value:function(e){var r=this;null!==this.state.titleValidation&&this.setState({titleValidation:null});var o=e.target.value;"function"==typeof this.titleChangeHandler&&this.titleChangeHandler(o,(function(e){e&&"object"===t._typeof(e)&&e.type&&e.message?r.setState({titleValidation:e}):r.setState({titleValidation:null})})),this.props.setTitle(o)}},{key:"render",value:function(){var e=this,t=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.TITLE_EDITOR_LABEL),r=o.formatMessage(this.props.controller.getReactIntl(),l.MESSAGE_KEYS.TITLE_EDITOR_HELPBUTTON_LABEL),a=[l.CONDITION_MESSAGE_TYPE.ERROR,l.CONDITION_MESSAGE_TYPE.WARNING],i=!1===this.props.labelEditable||this.state.focused?A.default.createElement("div",null):A.default.createElement(s.Button,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:p.Edit16,iconDescription:t,hasIconOnly:!0}),u=this.props.help?A.default.createElement(s.Button,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:this.helpClickHandler,tooltipPosition:"bottom",renderIcon:p.Information16,iconDescription:r,hasIconOnly:!0}):null,c=null;if(this.headingEnabled){var d=this.props.heading?A.default.createElement("div",{className:"properties-title-heading-label"},this.props.heading):null,f=this.props.icon&&"string"==typeof this.props.icon?A.default.createElement(O.default,{className:"properties-title-heading-icon",src:this.props.icon}):null;(d||f)&&(c=A.default.createElement("div",{className:"properties-title-heading"},f,d,u))}return A.default.createElement("div",{className:l.classNames("properties-title-editor",{"properties-title-with-heading":this.headingEnabled})},c,A.default.createElement("div",{className:l.classNames("properties-title-editor-input",{"properties-title-editor-with-help":this.props.help&&!this.headingEnabled&&!a.includes(n.get_1(this.state.titleValidation,"type"))})},A.default.createElement(s.TextInput,l._extends({id:this.id,ref:this.textInputRef,value:this.props.title,onChange:this.handleTitleChange,onKeyPress:function(t){return e._handleKeyPress(t)},readOnly:!1===this.props.labelEditable,labelText:this.labelText,hideLabel:!0,onFocus:this.textInputOnFocus,onBlur:this.textInputOnBlur,light:this.props.controller.getLight(),invalid:n.get_1(this.state.titleValidation,"type",null)===l.CONDITION_MESSAGE_TYPE.ERROR,invalidText:n.get_1(this.state.titleValidation,"message"),warn:n.get_1(this.state.titleValidation,"type",null)===l.CONDITION_MESSAGE_TYPE.WARNING,warnText:n.get_1(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"})),a.includes(n.get_1(this.state.titleValidation,"type"))?null:i),this.headingEnabled||a.includes(n.get_1(this.state.titleValidation,"type"))?null:u)}}]),i}(r.Component),il=c.connect((function(e,t){return{title:e.componentMetadataReducer.title}}),(function(e,t){return{setTitle:function(t){e(ke(t))}}}))(al),sl='/*\n * Copyright 2017-2022 Elyra Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n:export {\n flyoutWidthSmall: 320px;\n flyoutWidthMedium: 480px;\n flyoutWidthLarge: 640px;\n}';function ll(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ul=parseInt(sl.flyoutWidthSmall,10),cl=parseInt(sl.flyoutWidthMedium,10),pl=parseInt(sl.flyoutWidthLarge,10),dl=function(r){t._inherits(u,r);var a=ll(u);function u(r){var o;e._classCallCheck(this,u),(o=a.call(this,r)).propertiesController=new Zs,o.propertiesController.setPropertiesConfig(o.props.propertiesConfig),o.props.propertiesInfo.initialEditorSize&&o.propertiesController.setEditorSize(o.props.propertiesInfo.initialEditorSize),o.propertiesController.setCustomControls(r.customControls),o.propertiesController.setConditionOps(r.customConditionOps),o.propertiesController.setLight(r.light),o.propertiesController.setAppData(r.propertiesInfo.appData),o.propertiesController.setExpressionInfo(r.propertiesInfo.expressionInfo),o.propertiesController.setHandlers({controllerHandler:r.callbacks.controllerHandler,propertyListener:r.callbacks.propertyListener,actionHandler:r.callbacks.actionHandler,buttonHandler:r.callbacks.buttonHandler,buttonIconHandler:r.callbacks.buttonIconHandler,validationHandler:r.callbacks.validationHandler,titleChangeHandler:r.callbacks.titleChangeHandler}),o.setForm(r.propertiesInfo),o.previousErrorMessages={},o.propertiesController.validatePropertiesValues(!1),r.propertiesInfo.messages&&(o.propertiesController.validatePropertiesValues(!0),o.previousErrorMessages=o.propertiesController.getAllErrorMessages()),o.props.callbacks.propertyListener&&o.props.callbacks.propertyListener({action:l.ACTIONS.PROPERTIES_LOADED}),o.currentParameters=o.propertiesController.getPropertyValues();var n=o.getEditorSize();return o.state={showPropertiesButtons:!0,editorSize:n},o.applyPropertiesEditing=o.applyPropertiesEditing.bind(t._assertThisInitialized(o)),o.showPropertiesButtons=o.showPropertiesButtons.bind(t._assertThisInitialized(o)),o.updateEditorSize=o.updateEditorSize.bind(t._assertThisInitialized(o)),o.cancelHandler=o.cancelHandler.bind(t._assertThisInitialized(o)),o._getOverrideSize=o._getOverrideSize.bind(t._assertThisInitialized(o)),o._getResizeButton=o._getResizeButton.bind(t._assertThisInitialized(o)),o._isResizeButtonRequired=o._isResizeButtonRequired.bind(t._assertThisInitialized(o)),o.onBlur=o.onBlur.bind(t._assertThisInitialized(o)),o}return e._createClass(u,[{key:"componentDidMount",value:function(){this.props.callbacks.setPropertiesHasMounted()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.propertiesInfo&&(!o.isEqual_1(Object.keys(e.propertiesInfo),Object.keys(this.props.propertiesInfo))||e.propertiesInfo.formData&&!o.isEqual_1(e.propertiesInfo.formData,this.props.propertiesInfo.formData)||e.propertiesInfo.parameterDef&&!o.isEqual_1(e.propertiesInfo.parameterDef,this.props.propertiesInfo.parameterDef)||e.propertiesInfo.appData&&!o.isEqual_1(e.propertiesInfo.appData,this.props.propertiesInfo.appData))){this.setForm(e.propertiesInfo);var t=this.propertiesController.getForm().editorSize;this.state.editorSize!==t&&this.setState({editorSize:t}),this.currentParameters=this.propertiesController.getPropertyValues(),this.propertiesController.setAppData(e.propertiesInfo.appData),this.propertiesController.setCustomControls(e.customControls),this.propertiesController.setConditionOps(e.customConditionOps),this.previousErrorMessages={},e.propertiesInfo.messages&&(this.propertiesController.validatePropertiesValues(),this.previousErrorMessages=this.propertiesController.getAllErrorMessages())}}},{key:"onBlur",value:function(e){!this.props.propertiesConfig.applyOnBlur||!this.commonProperties||this.commonProperties.contains(e.relatedTarget)||this.propertiesController.isSummaryPanelShowing()||this.propertiesController.isSubPanelsShowing()||this.applyPropertiesEditing(!1)}},{key:"setForm",value:function(e){var t=null;e.formData&&0!==Object.keys(e.formData).length?t=e.formData:e.parameterDef&&(this.props.propertiesConfig.schemaValidation&&ol(e.parameterDef),t=Rr.makeForm(e.parameterDef,!this.props.propertiesConfig.rightFlyout)),t&&t.data&&t.data.inputDataModel&&!t.data.datasetMetadata&&(t.data.datasetMetadata=o.convertInputDataModel(t.data.inputDataModel)),this.propertiesController.setForm(t,this.props.intl),t&&(this.originalTitle=t.label),this.initialValueInfo={additionalInfo:{messages:[]},undoInfo:{}},this.uiParameterKeys=this._getUiOnlyKeys(),this.initialValueInfo=this._setValueInforProperties(this.initialValueInfo),e.messages&&(this.initialValueInfo.additionalInfo.messages=n.cloneDeep_1(e.messages)),this.initialValueInfo.undoInfo.properties=this.propertiesController.getPropertyValues(),this.initialValueInfo.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.initialValueInfo.additionalInfo.title=this.propertiesController.getTitle()}},{key:"getApplyButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.primary?this.props.propertiesConfig.buttonLabels.primary:this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout?o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_CLOSEBUTTON_LABEL):o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_APPLYBUTTON_LABEL)}},{key:"getRejectButtonLabel",value:function(){return this.props.propertiesConfig.buttonLabels&&this.props.propertiesConfig.buttonLabels.secondary?this.props.propertiesConfig.buttonLabels.secondary:o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_REJECTBUTTON_LABEL)}},{key:"getPropertiesActionLabel",value:function(){if(this.props.callbacks.propertiesActionLabelHandler){var e=this.props.callbacks.propertiesActionLabelHandler();if(e)return e}return o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_ACTION_LABEL)}},{key:"getEditorSize",value:function(){var e=this.propertiesController.getForm().editorSize,t=this.props.propertiesInfo.initialEditorSize;return e===o.Size.SMALL&&t===o.Size.LARGE||e===o.Size.MEDIUM&&t===o.Size.SMALL||e===o.Size.LARGE?e:t||e}},{key:"_getOverrideSize",value:function(){var e=this.propertiesController.getForm().pixelWidth,t=this.propertiesController.getForm().editorSize,r=null;return e&&(t===o.Size.SMALL?this.state.editorSize===o.Size.SMALL&&e.min?r=e.min:this.state.editorSize===o.Size.MEDIUM&&e.max&&(r=e.max):t===o.Size.MEDIUM?this.state.editorSize===o.Size.MEDIUM&&e.min?r=e.min:this.state.editorSize===o.Size.LARGE&&e.max&&(r=e.max):t===o.Size.LARGE&&e.max&&(r=e.max)),r}},{key:"_getResizeButton",value:function(){var e=A.default.createElement(l.Icon,{type:l.CARBON_ICONS.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===o.Size.SMALL?this.state.editorSize===o.Size.MEDIUM&&(e=A.default.createElement(l.Icon,{type:l.CARBON_ICONS.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===o.Size.MEDIUM&&this.state.editorSize===o.Size.LARGE&&(e=A.default.createElement(l.Icon,{type:l.CARBON_ICONS.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})),e}},{key:"_isResizeButtonRequired",value:function(){var e=this.propertiesController.getForm().pixelWidth;if(!1!==this.props.propertiesConfig.enableResize){if(e){if(!e.min&&!e.max)return o.logger.warn("Pixel width was provided but no min or max property was found in it."),!0;if(this.propertiesController.getForm().editorSize===o.Size.SMALL){if(e.min&&!e.max&&e.min>=cl)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+cl),!1;if(!e.min&&e.max&&e.max<=ul)return o.logger.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+ul),!1;if(e.min>=e.max)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to pixel width max size."),!1}else if(this.propertiesController.getForm().editorSize===o.Size.MEDIUM){if(e.min&&!e.max&&e.min>=pl)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+pl),!1;if(!e.min&&e.max&&e.max<=cl)return o.logger.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+cl),!1;if(e.min>=e.max)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to default max size."),!1}else if(this.propertiesController.getForm().editorSize===o.Size.LARGE)return!!e.min&&(o.logger.warn("No resize button shown. Pixel width min size ignored."),!1)}else if(this.propertiesController.getForm().editorSize===o.Size.LARGE)return!1;return!0}return!1}},{key:"_setValueInforProperties",value:function(e,t){var r=t&&!0===t.applyProperties,o=this.props.propertiesConfig.conditionReturnValueHandling===l.CONDITION_RETURN_VALUE_HANDLING.NULL,n=this.propertiesController.getPropertyValues({filterHiddenDisabled:o,applyProperties:r});return this.uiParameterKeys.length>0?(e.properties=ge(n,this.uiParameterKeys),e.uiProperties=G(n,this.uiParameterKeys)):e.properties=n,e}},{key:"_getUiOnlyKeys",value:function(){var e=[],t=this.propertiesController.getControls();if(Object.keys(t).length>0)for(var r in t){if(i.has_1(t,r))t[r].uionly&&e.push(r)}return e}},{key:"cancelHandler",value:function(e){this.props.callbacks.closePropertiesDialog&&this.props.callbacks.closePropertiesDialog(e)}},{key:"applyPropertiesEditing",value:function(e){this.propertiesController.validatePropertiesValues();var t=this.propertiesController.getAllErrorMessages();if(this.originalTitle!==this.propertiesController.getTitle()||this.currentParameters&&JSON.stringify(this.currentParameters)!==JSON.stringify(this.propertiesController.getPropertyValues())||JSON.stringify(this.previousErrorMessages)!==JSON.stringify(t)||this.props.propertiesConfig.applyPropertiesWithoutEdit){var r={additionalInfo:{},undoInfo:{}};(r=this._setValueInforProperties(r,{applyProperties:!0})).undoInfo.properties=this.propertiesController.getPropertyValues();var o=this.propertiesController.getErrorMessages(!0,!0,!0,!1);o&&(r.additionalInfo.messages=o),r.undoInfo.messages=this.propertiesController.getAllErrorMessages(),this.propertiesController.getTitle()&&(r.additionalInfo.title=this.propertiesController.getTitle());var a=this.getPropertiesActionLabel(),i=new wr(r,this.initialValueInfo,this.props.propertiesInfo.appData,this.props.callbacks.applyPropertyChanges,a);this.propertiesController.getCommandStack().do(i),this.currentParameters=this.propertiesController.getPropertyValues(),this.initialValueInfo=n.cloneDeep_1(r),this.previousErrorMessages=this.propertiesController.getAllErrorMessages()}e&&this.cancelHandler(l.APPLY)}},{key:"showPropertiesButtons",value:function(e){this.setState({showPropertiesButtons:e})}},{key:"updateEditorSize",value:function(e){this.setState({editorSize:e}),this.propertiesController.setEditorSize(e)}},{key:"resize",value:function(){this.propertiesController.getForm().editorSize===o.Size.SMALL?this.state.editorSize===o.Size.SMALL?this.updateEditorSize(o.Size.MEDIUM):this.updateEditorSize(o.Size.SMALL):this.propertiesController.getForm().editorSize===o.Size.MEDIUM&&(this.state.editorSize===o.Size.MEDIUM?this.updateEditorSize(o.Size.LARGE):this.updateEditorSize(o.Size.MEDIUM))}},{key:"render",value:function(){var e=this,t=this.cancelHandler.bind(this,l.CANCEL);this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout&&(t=null);var r=this.getApplyButtonLabel(),n=this.getRejectButtonLabel(),a=this.propertiesController.getForm();if(null!==a){var i=[],u=A.default.createElement("div",null),p=A.default.createElement("div",null),d=null,f=!1;if(this.props.propertiesConfig.rightFlyout&&(u=A.default.createElement(il,{labelEditable:a.labelEditable,help:a.help,controller:this.propertiesController,helpClickHandler:this.props.callbacks.helpClickHandler,icon:a.icon,heading:a.heading,showHeading:this.props.propertiesConfig.heading}),f=this.props.propertiesConfig.heading&&(a.icon||a.heading),p=A.default.createElement(Ae,{controller:this.propertiesController,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,applyLabel:r,rejectLabel:n,showPropertiesButtons:this.state.showPropertiesButtons,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}),this._isResizeButtonRequired())){var h=this._getResizeButton(),m=h.props&&"properties-resize-caret-left"===h.props.className?o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);d=A.default.createElement(s.Button,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":m},h)}var y=A.default.createElement(Rt,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout});i="Editing"===this.props.propertiesConfig.containerType?A.default.createElement(Ie,{applyLabel:r,rejectLabel:n,bsSize:this.state.editorSize,title:this.propertiesController.getTitle(),okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,showPropertiesButtons:this.state.showPropertiesButtons},y):"Custom"===this.props.propertiesConfig.containerType?A.default.createElement("div",{className:l.classNames("properties-custom-container",{"properties-custom-container-with-heading":f})},y):A.default.createElement(_e,{onHide:this.props.callbacks.closePropertiesDialog,title:this.propertiesController.getTitle(),bsSize:this.state.editorSize,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:t,showPropertiesButtons:this.state.showPropertiesButtons,applyLabel:r,rejectLabel:n},y);var v=l.classNames("properties-wrapper",{"properties-right-flyout":this.props.propertiesConfig.rightFlyout,"properties-light-enabled":this.props.light,"properties-light-disabled":!this.props.light},"properties-".concat(this.state.editorSize)),g=this._getOverrideSize(),b=null;return null!==g&&(b={width:g+"px"}),A.default.createElement(c.Provider,{store:this.propertiesController.getStore()},A.default.createElement("aside",{"aria-label":o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_LABEL),role:"complementary",ref:function(t){return e.commonProperties=t},className:v,tabIndex:"0",onBlur:this.onBlur,style:b},d,u,i,p))}return A.default.createElement("div",null)}}]),u}(A.default.Component),fl=g.injectIntl(dl,{forwardRef:!0});function hl(e){var r=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 o,n=t._getPrototypeOf(e);if(r){var a=t._getPrototypeOf(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return t._possibleConstructorReturn(this,o)}}var ml=function(r){t._inherits(a,r);var n=hl(a);function a(r){var o;return e._classCallCheck(this,a),(o=n.call(this,r)).state={hasError:!1,error:null,info:null},o.createPropertiesMainComponent=o.createPropertiesMainComponent.bind(t._assertThisInitialized(o)),o.revertState=o.revertState.bind(t._assertThisInitialized(o)),o.propertiesMainHasMounted=!1,o.setPropertiesHasMounted=o.setPropertiesHasMounted.bind(t._assertThisInitialized(o)),o.applyPropertiesEditing=o.applyPropertiesEditing.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"componentDidCatch",value:function(e,t){this.setState({hasError:!0,error:e,info:t})}},{key:"setPropertiesHasMounted",value:function(){this.propertiesMainHasMounted=!0}},{key:"applyPropertiesEditing",value:function(e){this.PropertiesMain.applyPropertiesEditing(e)}},{key:"createPropertiesMainComponent",value:function(){var e=this;return Object.assign(this.props.callbacks,{setPropertiesHasMounted:this.setPropertiesHasMounted}),A.default.createElement(fl,{ref:function(t){e.PropertiesMain=t},propertiesInfo:this.props.propertiesInfo,propertiesConfig:this.props.propertiesConfig,customPanels:this.props.customPanels,callbacks:this.props.callbacks,customControls:this.props.customControls,customConditionOps:this.props.customConditionOps,light:this.props.light})}},{key:"revertState",value:function(){this.setState({hasError:!1,error:null,info:null})}},{key:"displayAppropriateUIFallback",value:function(){var e,t,r={text:o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},n=A.default.createElement("div",{className:"properties-error-heading"},A.default.createElement(Nn,{messageInfo:r})),a=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_SUPPORT_MESSAGE),i=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_CLOSEBUTTON_LABEL),s=this.props.callbacks.closePropertiesDialog,u=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIESEDIT_REVERTBUTTON_LABEL),c=this.revertState,p=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_REVERT_MESSAGE),t=A.default.createElement("div",{className:"properties-modal-buttons"},A.default.createElement(o.PropertiesButtons,{className:"properties-error-display-close-button",okHandler:s,cancelHandler:c,showPropertiesButtons:!0,applyLabel:i,rejectLabel:u}))):(e=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_CLOSE_MESSAGE),t=A.default.createElement("div",{className:"properties-modal-buttons"},A.default.createElement(o.PropertiesButtons,{className:"properties-error-display-close-button",okHandler:s,showPropertiesButtons:!0,applyLabel:i}))),this.props.propertiesConfig.rightFlyout?A.default.createElement("aside",{"aria-label":p,role:"complementary",className:"properties-wrapper properties-right-flyout properties-small"},A.default.createElement("div",{className:"properties-flyout-error-container"},n,A.default.createElement("br",null),A.default.createElement("br",null),A.default.createElement("div",{className:"properties-error-content"},e,A.default.createElement("br",null),a)),t):A.default.createElement("aside",{"aria-label":p,role:"complementary",className:"properties-wrapper properties-custom-container"},A.default.createElement("div",{className:"properties-flyout-error-container"},n,A.default.createElement("br",null),A.default.createElement("br",null),A.default.createElement("div",{className:"properties-error-content"},e,A.default.createElement("br",null),a)),t)):(!0===this.propertiesMainHasMounted?(e=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_REVERT_MESSAGE),t=A.default.createElement(_e,{bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:u,okHandler:s,cancelHandler:c,title:n},A.default.createElement("div",{className:"properties-modal-container properties-error-content"},e,A.default.createElement("br",null),a))):(e=o.formatMessage(this.props.intl,l.MESSAGE_KEYS.PROPERTIES_CLOSE_MESSAGE),t=A.default.createElement("div",{className:"properties-modal-error"},A.default.createElement(_e,{okHandler:s,bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:"null",title:n},A.default.createElement("div",{className:"properties-modal-container properties-error-content"},e,A.default.createElement("br",null),a)))),t)}},{key:"render",value:function(){return this.state.hasError?this.displayAppropriateUIFallback():this.createPropertiesMainComponent()}}]),a}(A.default.Component);ml.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,applyOnBlur:!1,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128},callbacks:{},light:!0};var yl=g.injectIntl(ml,{forwardRef:!0});exports.Form=Rr,exports.PropertiesController=Zs,exports.commonProperties=yl;
2
- //# sourceMappingURL=common-properties-653e50e3.js.map