@elyra/canvas 12.32.2 → 12.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/{_baseIteratee-eabd2a94.js → _baseIteratee-2a601011.js} +2 -2
  2. package/dist/{_baseIteratee-eabd2a94.js.map → _baseIteratee-2a601011.js.map} +1 -1
  3. package/dist/{_baseIteratee-e1311552.js → _baseIteratee-7fb1949c.js} +2 -2
  4. package/dist/{_baseIteratee-e1311552.js.map → _baseIteratee-7fb1949c.js.map} +1 -1
  5. package/dist/{canvas-constants-72222288.js → canvas-constants-29b7f65c.js} +2 -2
  6. package/dist/{canvas-constants-72222288.js.map → canvas-constants-29b7f65c.js.map} +1 -1
  7. package/dist/{canvas-constants-903046ab.js → canvas-constants-85883d4c.js} +2 -2
  8. package/dist/{canvas-constants-903046ab.js.map → canvas-constants-85883d4c.js.map} +1 -1
  9. package/dist/{canvas-controller-c0b65951.js → canvas-controller-273d4b5b.js} +2 -2
  10. package/dist/{canvas-controller-c0b65951.js.map → canvas-controller-273d4b5b.js.map} +1 -1
  11. package/dist/{canvas-controller-2df80dc3.js → canvas-controller-96abce12.js} +2 -2
  12. package/dist/{canvas-controller-2df80dc3.js.map → canvas-controller-96abce12.js.map} +1 -1
  13. package/dist/{canvas-logger-6f90b136.js → canvas-logger-34ca361a.js} +2 -2
  14. package/dist/{canvas-logger-6f90b136.js.map → canvas-logger-34ca361a.js.map} +1 -1
  15. package/dist/{canvas-logger-3bfbcf85.js → canvas-logger-fec87cd1.js} +2 -2
  16. package/dist/{canvas-logger-3bfbcf85.js.map → canvas-logger-fec87cd1.js.map} +1 -1
  17. package/dist/common-canvas-5ccce28e.js +2 -0
  18. package/dist/common-canvas-5ccce28e.js.map +1 -0
  19. package/dist/common-canvas-f471a9f3.js +2 -0
  20. package/dist/common-canvas-f471a9f3.js.map +1 -0
  21. package/dist/common-canvas.es.js +1 -1
  22. package/dist/common-canvas.js +1 -1
  23. package/dist/common-properties-51bd2ecc.js +2 -0
  24. package/dist/common-properties-51bd2ecc.js.map +1 -0
  25. package/dist/common-properties-e82771ef.js +2 -0
  26. package/dist/common-properties-e82771ef.js.map +1 -0
  27. package/dist/{context-menu-wrapper-5846a20e.js → context-menu-wrapper-19a1cf72.js} +2 -2
  28. package/dist/{context-menu-wrapper-5846a20e.js.map → context-menu-wrapper-19a1cf72.js.map} +1 -1
  29. package/dist/{context-menu-wrapper-ac5e8c7a.js → context-menu-wrapper-c3a98c63.js} +2 -2
  30. package/dist/{context-menu-wrapper-ac5e8c7a.js.map → context-menu-wrapper-c3a98c63.js.map} +1 -1
  31. package/dist/{createClass-826941b3.js → createClass-09bc08f7.js} +1 -1
  32. package/dist/createClass-09bc08f7.js.map +1 -0
  33. package/dist/{createClass-be661622.js → createClass-ffbbe837.js} +1 -1
  34. package/dist/createClass-ffbbe837.js.map +1 -0
  35. package/dist/{datarecord-metadata-v3-schema-64329ae4.js → datarecord-metadata-v3-schema-531c7b07.js} +2 -2
  36. package/dist/{datarecord-metadata-v3-schema-64329ae4.js.map → datarecord-metadata-v3-schema-531c7b07.js.map} +1 -1
  37. package/dist/{datarecord-metadata-v3-schema-dd7370da.js → datarecord-metadata-v3-schema-db5150c5.js} +2 -2
  38. package/dist/{datarecord-metadata-v3-schema-dd7370da.js.map → datarecord-metadata-v3-schema-db5150c5.js.map} +1 -1
  39. package/dist/{flexible-table-23d61157.js → flexible-table-8c6db0fc.js} +2 -2
  40. package/dist/flexible-table-8c6db0fc.js.map +1 -0
  41. package/dist/{flexible-table-4259d869.js → flexible-table-b9c08069.js} +2 -2
  42. package/dist/flexible-table-b9c08069.js.map +1 -0
  43. package/dist/{getPrototypeOf-3751add9.js → getPrototypeOf-012c454b.js} +2 -2
  44. package/dist/{getPrototypeOf-3751add9.js.map → getPrototypeOf-012c454b.js.map} +1 -1
  45. package/dist/{getPrototypeOf-1e698126.js → getPrototypeOf-5f227292.js} +2 -2
  46. package/dist/{getPrototypeOf-1e698126.js.map → getPrototypeOf-5f227292.js.map} +1 -1
  47. package/dist/{icon-04f858ce.js → icon-a9c3f51e.js} +2 -2
  48. package/dist/{icon-04f858ce.js.map → icon-a9c3f51e.js.map} +1 -1
  49. package/dist/{icon-8cc7816d.js → icon-de9c6b33.js} +2 -2
  50. package/dist/{icon-8cc7816d.js.map → icon-de9c6b33.js.map} +1 -1
  51. package/dist/{index-101f9560.js → index-9960d3bf.js} +2 -2
  52. package/dist/{index-101f9560.js.map → index-9960d3bf.js.map} +1 -1
  53. package/dist/{index-2788d55d.js → index-d4a58ddb.js} +2 -2
  54. package/dist/{index-2788d55d.js.map → index-d4a58ddb.js.map} +1 -1
  55. package/dist/lib/canvas-controller.es.js +1 -1
  56. package/dist/lib/canvas-controller.js +1 -1
  57. package/dist/lib/canvas.es.js +1 -1
  58. package/dist/lib/canvas.js +1 -1
  59. package/dist/lib/command-stack.es.js +1 -1
  60. package/dist/lib/command-stack.js +1 -1
  61. package/dist/lib/context-menu.es.js +1 -1
  62. package/dist/lib/context-menu.js +1 -1
  63. package/dist/lib/properties/field-picker.es.js +1 -1
  64. package/dist/lib/properties/field-picker.js +1 -1
  65. package/dist/lib/properties/flexible-table.es.js +1 -1
  66. package/dist/lib/properties/flexible-table.js +1 -1
  67. package/dist/lib/properties.es.js +1 -1
  68. package/dist/lib/properties.js +1 -1
  69. package/dist/lib/tooltip.es.js +1 -1
  70. package/dist/lib/tooltip.js +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-233c09a8.js +2 -0
  74. package/dist/toolbar-233c09a8.js.map +1 -0
  75. package/dist/toolbar-cdb38f4a.js +2 -0
  76. package/dist/toolbar-cdb38f4a.js.map +1 -0
  77. package/package.json +3 -3
  78. package/src/common-canvas/cc-central-items.jsx +81 -17
  79. package/src/common-canvas/cc-contents.jsx +3 -19
  80. package/src/common-canvas/cc-right-flyout.jsx +1 -1
  81. package/src/common-canvas/common-canvas.jsx +1 -50
  82. package/src/common-canvas/common-canvas.scss +23 -45
  83. package/src/common-canvas/svg-canvas-d3.js +2 -1
  84. package/src/common-canvas/svg-canvas-renderer.js +255 -90
  85. package/src/common-canvas/svg-canvas-utils-nodes.js +0 -4
  86. package/src/common-properties/components/flexible-table/flexible-table.jsx +5 -5
  87. package/src/common-properties/constants/constants.js +1 -1
  88. package/src/common-properties/controls/dropdown/dropdown.jsx +8 -1
  89. package/src/common-properties/controls/numberfield/numberfield.jsx +21 -2
  90. package/src/notification-panel/notification-panel.scss +1 -0
  91. package/src/toolbar/toolbar-action-item.jsx +1 -1
  92. package/stats.html +1 -1
  93. package/dist/common-canvas-55d8916f.js +0 -2
  94. package/dist/common-canvas-55d8916f.js.map +0 -1
  95. package/dist/common-canvas-8eb241dc.js +0 -2
  96. package/dist/common-canvas-8eb241dc.js.map +0 -1
  97. package/dist/common-properties-96c9c88a.js +0 -2
  98. package/dist/common-properties-96c9c88a.js.map +0 -1
  99. package/dist/common-properties-c5292c66.js +0 -2
  100. package/dist/common-properties-c5292c66.js.map +0 -1
  101. package/dist/createClass-826941b3.js.map +0 -1
  102. package/dist/createClass-be661622.js.map +0 -1
  103. package/dist/flexible-table-23d61157.js.map +0 -1
  104. package/dist/flexible-table-4259d869.js.map +0 -1
  105. package/dist/toolbar-12f6def6.js +0 -2
  106. package/dist/toolbar-12f6def6.js.map +0 -1
  107. package/dist/toolbar-55e2020e.js +0 -2
  108. package/dist/toolbar-55e2020e.js.map +0 -1
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("./createClass-826941b3.js"),t=require("./getPrototypeOf-1e698126.js"),r=require("react"),o=require("./index-101f9560.js"),n=require("./canvas-constants-903046ab.js"),a=require("./isArrayLikeObject-0cd02b77.js"),i=require("./datarecord-metadata-v3-schema-64329ae4.js"),s=require("./_baseIteratee-e1311552.js"),l=require("carbon-components-react"),p=require("react-portal"),u=require("react-intl"),c=require("react-redux"),d=require("@carbon/icons-react"),f=require("react-dom"),h=require("./icon-8cc7816d.js"),m=require("uuid"),y=require("./lib/tooltip.js"),v=require("./flexible-table-4259d869.js"),g=require("./extends-1b35a664.js"),E=require("redux"),b=require("seedrandom"),_=require("./lib/command-stack.js"),S=require("date-fns"),T=require("react-inlinesvg"),I=require("prop-types"),C=require("./toolbar-55e2020e.js"),R=require("react-codemirror2"),A=require("jsonschema");function k(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var O=k(r),w=k(f),N=k(b),P=k(T),D=k(I),L=a._baseGet,M=i._baseSet,x=a._castPath;var B=function(e,t,r){for(var o=-1,n=t.length,a={};++o<n;){var i=t[o],s=L(e,i);r(s,i)&&M(a,x(i,e),s)}return a},F=s.hasIn_1;var V=function(e,t){return B(e,t,(function(t,r){return F(e,r)}))},U=(0,i._flatRest)((function(e,t){return null==e?{}:V(e,t)}));function z(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 H=function(r){t._inherits(a,r);var n=z(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 s.CARBON_MODAL_SIZE_XSMALL;case o.Size.LARGE:case o.Size.MAX:return s.CARBON_MODAL_SIZE_LARGE;case o.Size.MEDIUM:default:return s.CARBON_MODAL_SIZE_SMALL}}},{key:"render",value:function(){var e=this.getCarbonModalSize();return O.default.createElement(p.Portal,null,O.default.createElement(l.Modal,{className:s.classNames("properties-modal",{noButtons:!1===this.props.showPropertiesButtons},this.props.classNames),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},O.default.createElement("div",{className:"properties-modal-children"},this.props.children)))}}]),a}(r.Component),j=H;function G(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 q=function(r){t._inherits(a,r);var n=G(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=O.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 O.default.createElement("div",{className:e},O.default.createElement("h2",null,this.props.title),O.default.createElement("div",{className:"properties-body"},this.props.children),t)}}]),a}(r.Component),Y=q;function K(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 W=function(r){t._inherits(a,r);var n=K(a);function a(){return e._classCallCheck(this,a),n.apply(this,arguments)}return e._createClass(a,[{key:"render",value:function(){var e=this.props.tearsheet?this.props.tearsheet.title:null,t=this.props.tearsheet?this.props.tearsheet.description:null,r=this.props.tearsheet?this.props.tearsheet.content:null,n=this.props.showPropertiesButtons&&!this.props.applyOnBlur,a=!Array.isArray(r),i=this.props.applyOnBlur?null:O.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 O.default.createElement(p.Portal,null,O.default.createElement(l.ComposedModal,{className:s.classNames("properties-tearsheet-panel",{"properties-tearsheet-stacked":this.props.stacked}),open:this.props.open,size:"lg","aria-label":o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_LABEL,{label:e}),preventCloseOnClickOutside:!0},null===e?null:O.default.createElement(l.ModalHeader,{className:s.classNames("properties-tearsheet-header",{"with-buttons":n},{"with-tabs":a},{"hide-close-button":"function"!=typeof this.props.onCloseCallback}),title:e,buttonOnClick:this.props.onCloseCallback},t?O.default.createElement("p",null,t):null),O.default.createElement(l.ModalBody,{className:s.classNames("properties-tearsheet-body",{"with-buttons":n},{"with-tabs":a})},r),i))}}]),a}(r.Component);W.defaultProps={open:!1,showPropertiesButtons:!1,applyOnBlur:!1,stacked:!1};var X=u.injectIntl(W);function $(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 J=function(r){t._inherits(a,r);var n=$(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 O.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);J.defaultProps={saveButtonEnabled:!0};var Z=c.connect((function(e,t){return{saveButtonEnabled:!t.controller.getSaveButtonDisable(),requiredErrorMessages:t.controller.getRequiredErrorMessages()}}),null)(J),Q=o._baseEach;var ee=function(e,t){var r=[];return Q(e,(function(e,o,n){t(e,o,n)&&r.push(e)})),r},te=a._arrayFilter,re=ee,oe=s._baseIteratee,ne=a.isArray_1;var ae=function(e,t){return(ne(e)?te:re)(e,oe(t))},ie="SET_PROPERTY_VALUES",se="UPDATE_PROPERTY_VALUE",le="REMOVE_PROPERTY_VALUE",pe="SET_CONTROL_STATES",ue="UPDATE_CONTROL_STATE",ce="SET_PANEL_STATES",de="UPDATE_PANEL_STATE",fe="SET_ACTION_STATES",he="UPDATE_ACTION_STATE",me="SET_ERROR_MESSAGES",ye="UPDATE_ERROR_MESSAGE",ve="CLEAR_ERROR_MESSAGE",ge="SET_DATASET_METADATA",Ee="UPDATE_SELECTED_ROWS",be="CLEAR_SELECTED_ROWS",_e="SET_TITLE",Se="SET_ACTIVE_TAB",Te="DISABLE_ROW_MOVE_BUTTONS",Ie="SET_SAVE_BUTTON_DISABLE",Ce="SET_WIDE_FLYOUT_PRIMARY_BUTTON_DISABLED",Re="SET_ADD_REMOVE_ROWS",Ae="UPDATE_STATIC_ROWS",ke="CLEAR_STATIC_ROWS",Oe="SET_TABLE_BUTTON_ENABLED",we="SET_HIDE_EDIT_BUTTON",Ne="SET_ACTIVE_TEARSHEET";function Pe(e){return{type:_e,title:e}}function De(e){return{type:Se,activeTab:e}}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 Me=function(r){t._inherits(n,r);var o=Le(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=O.default.createElement("div",{className:"properties-control-panel"})),e}}]),n}(O.default.Component),xe=c.connect((function(e,t){return{panel:t.panels[t.controller.getPropertyValue({name:t.dependsOn})]}}),null)(Me);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 Fe=function(r){t._inherits(a,r);var n=Be(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=w.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=O.default.createElement("div",{className:s.classNames("properties-wf-overlay",{show:this.props.show})});return this.props.show&&(this.props.title&&(e=O.default.createElement("div",{className:"properties-wf-title"},this.props.title)),t=O.default.createElement(o.PropertiesButtons,{okHandler:this.props.okHandler,cancelHandler:this.props.cancelHandler,showPropertiesButtons:this.props.showPropertiesButtons,applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,applyButtonEnabled:this.props.okButtonEnabled}),r=O.default.createElement("div",{className:"properties-wf-children"}," ",this.props.children," ")),O.default.createElement("div",{className:"properties-wf-modal",ref:function(e){return n.wideFlyout=e}},O.default.createElement(p.Portal,{node:this.commonPropertiesParent},a,O.default.createElement("div",{className:s.classNames("properties-wf-content",{show:this.props.show,"properties-light-disabled":!this.props.light}),style:this.state.style},e,r,t)))}}]),a}(r.Component);Fe.defaultProps={show:!1,okButtonEnabled:!0};var Ve=Fe;function Ue(e,t){var r=t||m.v4();return"".concat(ze(e),"-").concat(r)}function ze(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 He(e,t){var r=t;return e.charLimit&&(r=e.charLimit),r}function je(e,t){if(e.length>0){var r=e.split(t);return Array.isArray(r)?r:[r]}return[]}function Ge(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=qe(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 qe(e){return e.length>s.TRUNCATE_LIMIT?e.substring(0,s.TRUNCATE_LIMIT)+"...":e}function Ye(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 Ke(e){return e.controlType===o.ControlType.DATEPICKER||e.controlType===o.ControlType.DATEPICKERRANGE?e.dateFormat?e.dateFormat:s.DEFAULT_DATEPICKER_FORMAT:e.controlType===o.ControlType.DATEFIELD?e.dateFormat?e.dateFormat:s.DEFAULT_DATE_FORMAT:e.timeFormat?e.timeFormat:s.DEFAULT_TIME_FORMAT}function We(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 Xe(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 Xe(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 Xe(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 $e(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 Je=function(r){t._inherits(i,r);var n=$e(i);function i(r){var o;return e._classCallCheck(this,i),(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(i,[{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=We(t);try{for(n.s();!(r=n.n()).done;){var a=r.value,i={name:a},l=this.props.controller.getControl(i),p=this.props.controller.getPropertyValue(i,{filterHiddenDisabled:!0}),u=this.props.controller.getCustPropSumPanelValue(i),c=!1;null!=u&&(p=u.value,l.summaryLabel=u.label,c=!0);var d=[];if(Array.isArray(p)){var f=0;if(l.subControls)for(var h=0;h<l.subControls.length;h++){var m={name:i.name,col:h};(this.props.controller.isSummary(m)||c)&&f++}else l.summary&&(f=1);for(var y=0!==f?"calc((100% / "+f+") - 2px)":"100%",g=0;g<p.length;g++){var E=p[g],b=[];if(Array.isArray(E))for(var _=0;_<E.length;_++){var S={name:i.name,col:_};if(this.props.controller.isSummary(S)||c){var T=this._getSummaryDisplayValue(E[_],S),I=void 0===T?"":JSON.stringify(T).replace('"',"").replace(new RegExp('"',"g"),"")+" ";b.push(O.default.createElement("td",{key:"summary-table-data-"+_,className:"properties-summary-row-data ",style:{width:y}},O.default.createElement(v.TruncatedContentTooltip,{content:O.default.createElement("span",null,I),tooltipText:I,disabled:!1})))}}else if(this.props.controller.isSummary(i)||c){var C=this._getSummaryDisplayValue(E,i);b.push(O.default.createElement("td",{key:"summary-table-row-data-"+g,className:"properties-summary-row-data "},O.default.createElement(v.TruncatedContentTooltip,{content:O.default.createElement("span",null,C),tooltipText:C,disabled:!1})))}b.length>0&&d.push(O.default.createElement("tr",{key:"summary-table-row-"+g,className:"properties-summary-row"},b))}}else if(p&&(this.props.controller.isSummary(i)||c)){var R=this._getSummaryDisplayValue(p,i);d.push(O.default.createElement("tr",{key:"summary-row-"+a,className:"properties-summary-row"},O.default.createElement("td",{key:"summary-table-row-data-"+a,className:"properties-summary-rows-data"},R)))}if(d.length>0){var A=O.default.createElement("table",{role:"presentation",key:"summary-table-"+a,className:"properties-summary-table"},O.default.createElement("tbody",{key:"summary-body-"+a},d));if(d.length>10){var k=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.LONG_TABLE_SUMMARY_PLACEHOLDER);A=O.default.createElement("div",{className:"properties-summary-table"},O.default.createElement("span",null,k))}e.push(O.default.createElement("div",{key:"summary-container-"+a,className:"properties-summary-values"},O.default.createElement("span",{key:"summary-text-"+a,className:"properties-summary-label"},l.summaryLabel),A))}}}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,i=0;if(Array.isArray(t)&&t.forEach((function(t){var o=e.props.controller.getErrorMessage({name:t},!0);a.isEmpty_1(o)||(o.type===s.CONDITION_MESSAGE_TYPE.WARNING&&(i+=1),o.type===s.CONDITION_MESSAGE_TYPE.ERROR&&(n+=1)),a.isEmpty_1(o)||a.isEmpty_1(r)&&"error"===r.type||(r=o)})),!a.isEmpty_1(r)){var l="";return n>0&&0===i?l=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.CONTROL_SUMMARY_ERROR,{errorMsgCount:n}):n>0&&i>0?l=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.CONTROL_SUMMARY_ERROR_WARNING,{errorMsgCount:n,warningMsgCount:i}):0===n&&i>0&&(l=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.CONTROL_SUMMARY_WARNING,{warningMsgCount:i})),O.default.createElement(y,{id:"summary-icon",tip:l,className:"properties-tooltips"},O.default.createElement(h.Icon,{type:r.type,className:"properties-summary-link-icon ".concat(r.type)}))}return null}},{key:"render",value:function(){var e=this._getSummaryIconState(),t=O.default.createElement("div",{className:"properties-summary-link-container"},O.default.createElement(l.Button,{className:"properties-summary-link-button",onClick:this.handleLinkClicked,size:"small",kind:"ghost",renderIcon:d.Add16},this.props.panel.label),e),r=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.APPLYBUTTON_LABEL),n=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.REJECTBUTTON_LABEL),a=this.state.showWideFlyout?O.default.createElement(Ve,{cancelHandler:this.cancelWideFlyout,okHandler:this.hideWideFlyout,show:!0,applyLabel:r,rejectLabel:n,title:this.props.panel.label,light:this.props.controller.getLight(),okButtonEnabled:this.props.okButtonEnabled},O.default.createElement("div",null,this.props.children)):O.default.createElement("div",null),i=this.props.panel.className?this.props.panel.className:"",p=s.classNames("properties-summary-panel","properties-control-panel",{hide:this.props.panelState===s.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},i);return O.default.createElement("div",{className:p,disabled:this.props.panelState===s.STATES.DISABLED,"data-id":ze({name:this.props.panel.id})},a,t,this._getSummaryTables())}}]),i}(O.default.Component),Ze=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),okButtonEnabled:!t.controller.getWideFlyoutPrimaryButtonDisabled({name:t.panel.id})}}),null)(Je);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 et=function(r){t._inherits(n,r);var o=Qe(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===s.STATES.DISABLED;return O.default.createElement("div",{className:s.classNames("properties-twisty-panel",{hide:this.props.panelState===s.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),"data-id":ze({name:this.props.panel.id})},O.default.createElement(l.Accordion,{disabled:t},O.default.createElement(l.AccordionItem,{disabled:t,open:this.props.panel.open,title:this.props.panel.label},this.props.children)))}}]),n}(O.default.Component),tt=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(et);function rt(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 ot=function(r){t._inherits(n,r);var o=rt(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=[];if(this.state.subPanelVisible&&!this.props.rightFlyout){var t=this.props.controller.isTearsheetContainer()?"properties-subpanel-modal-in-tearsheet":"";e=O.default.createElement(j,{title:this.state.title,okHandler:this.hideSubDialog.bind(this,!0),cancelHandler:this.hideSubDialog.bind(this,!1),applyLabel:this.props.applyLabel,rejectLabel:this.props.rejectLabel,classNames:t},this.state.panel)}else this.props.rightFlyout&&this.state.subPanelVisible&&(e=O.default.createElement(Ve,{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()},O.default.createElement("div",null,this.state.panel)));return O.default.createElement("div",null,e,this.props.children)}}]),n}(O.default.Component);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)}}ot.defaultProps={rightFlyout:!1};var at=function(r){t._inherits(a,r);var n=nt(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(),s.MESSAGE_KEYS.APPLYBUTTON_LABEL),r=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.REJECTBUTTON_LABEL),n=O.default.createElement(l.Button,{className:"properties-subpanel-button",type:"button",small:!0,kind:"secondary",onClick:this.showSubPanel},this.props.label||"");return O.default.createElement(ot,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:t,rejectLabel:r,controller:this.props.controller},n)}}]),a}(O.default.Component);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 st=function(r){t._inherits(n,r);var o=it(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 O.default.createElement("div",{className:s.classNames("properties-column-panel",{hide:this.props.panelState===s.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},e),disabled:this.props.panelState===s.STATES.DISABLED,"data-id":ze({name:this.props.panel.id}),style:this.style},this.props.children)}}]),n}(O.default.Component),lt=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(st);function pt(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 ut=function(r){t._inherits(n,r);var o=pt(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?O.default.createElement("div",{className:s.classNames("properties-control-panel",{hide:this.props.panelState===s.STATES.HIDDEN},{"properties-control-nested-panel":this.props.panel.nestedPanel},{"tearsheet-container":this.props.controller.isTearsheetContainer()},e),disabled:this.props.panelState===s.STATES.DISABLED,"data-id":ze({name:this.props.panel.id})},this.props.children):null}}]),n}(O.default.Component),ct=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(ut);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(t){var r;return e._classCallCheck(this,n),(r=o.call(this,t)).state={activeTabId:""},r.uuid=m.v4(),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!==s.STATES.HIDDEN){var p=this.props.genUIItem(n,a.content);this.state.activeTabId===a.group&&i!==s.STATES.DISABLED&&(t=r),e.push(O.default.createElement(l.Tab,{id:"subtabs.tab.".concat(n,"-").concat(this.uuid),key:"subtabs.tab.".concat(n,"-").concat(this.uuid),disabled:i===s.STATES.DISABLED,className:s.classNames("properties-subtab",{"properties-leftnav-subtab-item":this.props.leftnav}),tabIndex:r,label:a.text,title:a.text,onClick:this.onClick.bind(this,a.group),"data-id":ze({name:a.group})},p)),r++}}return O.default.createElement("div",{className:s.classNames("properties-sub-tab-container",{vertical:!this.props.rightFlyout},{"properties-control-nested-panel":this.props.nestedPanel},{"properties-leftnav-container":this.props.leftnav},o)},O.default.createElement(l.Tabs,{className:s.classNames("properties-subtabs",{"properties-leftnav-subtabs":this.props.leftnav}),selected:t,light:this.props.controller.getLight(),tabContentClassName:"properties-subtab-panel"},e))}}]),n}(O.default.Component);ft.defaultProps={leftnav:!1};var ht=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(i,r);var n=mt(i);function i(){return e._classCallCheck(this,i),n.apply(this,arguments)}return e._createClass(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===s.STATES.HIDDEN,n=this.props.panelState===s.STATES.DISABLED,i=this.props.panel.label?O.default.createElement("div",{className:"panel-label"},this.props.panel.label):null;if(this.props.panel.description&&!a.isEmpty_1(this.props.panel.description.text)){var l=o.evaluateText(this.props.panel.description.text,this.props.controller);if("as_tooltip"===this.props.panel.description.placement){this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id});var p=O.default.createElement(y,{id:"tooltip-label-".concat(this.props.panel.id),tip:l,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},O.default.createElement(h.Icon,{type:s.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"}));i=O.default.createElement("div",{className:s.classNames("properties-label-container")},i,p)}else e=O.default.createElement("div",{className:"panel-description"},l)}return O.default.createElement("div",{className:s.classNames("properties-text-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),disabled:n},i,e)}}]),i}(r.Component),vt=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id}),propertyValues:t.controller.getPropertyValues()}}),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 Et=function(r){t._inherits(i,r);var n=gt(i);function i(){return e._classCallCheck(this,i),n.apply(this,arguments)}return e._createClass(i,[{key:"render",value:function(){var e,t=this.props.panel.className?this.props.panel.className:"",r=this.props.panelState===s.STATES.HIDDEN,n=this.props.panelState===s.STATES.DISABLED;if(this.props.panel.label){var i;if(this.props.panel.description&&!a.isEmpty_1(this.props.panel.description.text)){var l=o.evaluateText(this.props.panel.description.text,this.props.controller);this.props.panel.description.link&&(this.props.panel.description.link.propertyId={name:this.props.panel.id}),i=O.default.createElement(y,{id:"tooltip-label-".concat(this.props.panel.id),tip:l,link:this.props.panel.description.link?this.props.panel.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:r||n,showToolTipOnClick:!0},O.default.createElement(h.Icon,{type:s.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"}))}e=O.default.createElement("div",{className:s.classNames("properties-label-container")},O.default.createElement("label",{className:"properties-control-label"},this.props.panel.label),i)}return O.default.createElement("div",{className:s.classNames("properties-action-panel",{hide:r},{"properties-control-nested-panel":this.props.panel.nestedPanel},t),"data-id":ze({name:this.props.panel.id}),disabled:n},e,this.props.children)}}]),i}(r.Component),bt=c.connect((function(e,t){return{panelState:t.controller.getPanelState({name:t.panel.id})}}),null)(Et);function _t(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 St=function(r){t._inherits(n,r);var o=_t(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}return e._createClass(n,[{key:"getActionButtonKind",value:function(){if(!a.has_1(this.props,"action.button.kind"))return s.CARBON_BUTTON_KIND.TERTIARY;switch(this.props.action.button.kind){case s.CARBON_BUTTON_KIND.PRIMARY:return s.CARBON_BUTTON_KIND.PRIMARY;case s.CARBON_BUTTON_KIND.SECONDARY:return s.CARBON_BUTTON_KIND.SECONDARY;case s.CARBON_BUTTON_KIND.TERTIARY:return s.CARBON_BUTTON_KIND.TERTIARY;case s.CARBON_BUTTON_KIND.GHOST:return s.CARBON_BUTTON_KIND.GHOST;case s.CARBON_BUTTON_KIND.DANGER:return s.CARBON_BUTTON_KIND.DANGER;case s.CARBON_BUTTON_KIND.DANGER_TERTIARY:return s.CARBON_BUTTON_KIND.DANGER_TERTIARY;case s.CARBON_BUTTON_KIND.DANGER_GHOST:return s.CARBON_BUTTON_KIND.DANGER_GHOST;default:return s.CARBON_BUTTON_KIND.TERTIARY}}},{key:"getActionButtonSize",value:function(){if(!a.has_1(this.props,"action.button.size"))return s.CARBON_BUTTON_SIZE.SMALL;switch(this.props.action.button.size){case s.CARBON_BUTTON_SIZE.SMALL:return s.CARBON_BUTTON_SIZE.SMALL;case s.CARBON_BUTTON_SIZE.MEDIUM:return s.CARBON_BUTTON_SIZE.DEFAULT;case s.CARBON_BUTTON_SIZE.LARGE:return s.CARBON_BUTTON_SIZE.LARGE;case s.CARBON_BUTTON_SIZE.EXTRA_LARGE:return s.CARBON_BUTTON_SIZE.EXTRA_LARGE;default:return s.CARBON_BUTTON_SIZE.SMALL}}},{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=this.props.action.className?this.props.action.className:"",t=s.classNames("properties-action-button",{hide:this.props.state===s.STATES.HIDDEN},e),r=this.props.state===s.STATES.DISABLED,o=this.getActionButtonKind(),n=this.getActionButtonSize(),a=O.default.createElement(l.Button,{type:"button",size:n,kind:o,onClick:this.applyAction,disabled:r},this.props.action.label.text),i=a;if(this.props.action.description){var p="tooltip-action-"+this.props.action.name,u=O.default.createElement("div",{className:"properties-tooltips"},this.props.action.description.text);i=O.default.createElement(y,{id:p,tip:u,direction:"bottom",className:"properties-tooltips",disable:r},a)}return O.default.createElement("div",{className:t,"data-id":this.props.action.name},i)}}]),n}(O.default.Component),Tt=c.connect((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(St);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(n,r);var o=It(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}return e._createClass(n,[{key:"applyAction",value:function(){if(this.props.state!==s.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===s.STATES.DISABLED,o=this.props.action.className?this.props.action.className:"",n=s.classNames("properties-action-image",{left:"left"===this.props.action.image.placement},{right:"right"===this.props.action.image.placement},{hide:this.props.state===s.STATES.HIDDEN},{disabled:r},o),a=O.default.createElement("div",{"data-id":this.props.action.name},O.default.createElement("img",g._extends({src:this.props.action.image.url,onClick:this.applyAction},e,t))),i=a;if(this.props.action.description){var l="tooltip-action-"+this.props.action.name,p=O.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";i=O.default.createElement(y,{id:l,tip:p,direction:u,className:"properties-tooltips",disable:r},a)}return O.default.createElement("div",{className:n},i)}}]),n}(O.default.Component),Rt=c.connect((function(e,t){return{state:t.controller.getActionState(t.controller.convertPropertyId(t.action.name))}}),null)(Ct),At=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 O.default.createElement(Tt,{key:"action."+e,action:t,controller:this.controller});if("image"===t.actionType)return O.default.createElement(Rt,{key:"action."+e,action:t,controller:this.controller})}return null}}]),t}();function kt(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 Ot(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 Ot(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 Ot(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 wt(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 Nt="alertMsgs",Pt=function(r){t._inherits(p,r);var i=wt(p);function p(r){var o;return e._classCallCheck(this,p),(o=i.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 At(o.props.controller),o.FIRST_TEARSHEET_ID=null,o.TEARSHEETS={},o.visibleTearsheet=null,o}return e._createClass(p,[{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(e.group===Nt)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 a.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,n){for(var a=[],i=!1,p=0,u=t.filter((function(e){return e.content.itemType!==o.ItemType.TEARSHEET})),c=t.filter((function(e){return e.content.itemType===o.ItemType.TEARSHEET})).concat(u),d=0;d<c.length;d++){var f=c[d];if(this.props.controller.getPanelState({name:f.group})!==s.STATES.HIDDEN){0===d&&f.group===Nt&&(i=!0);var m=this.genUIItem(this._getContainerIndex(i,d),f.content,r,n),y=null;if(this.props.additionalComponents&&(y=this.props.additionalComponents[f.group]),1===c.length&&1===u.length)return O.default.createElement("div",{key:"cat."+e,className:"properties-single-category"},m,y);if(this.props.rightFlyout&&this.props.categoryView!==s.CATEGORY_VIEW.TABS){var v=O.default.createElement(h.Icon,{type:s.CARBON_ICONS.CHEVRONARROWS.DOWN,className:"properties-category-caret-down"}),g=!1;this.props.activeTab===f.group&&(v=O.default.createElement(h.Icon,{type:s.CARBON_ICONS.CHEVRONARROWS.UP,className:"properties-category-caret-up"}),g=!0),f.content.itemType!==o.ItemType.TEARSHEET&&1===u.length?a.push(O.default.createElement("div",{key:"cat."+e,className:"properties-single-category"},m,y)):a.push(O.default.createElement("div",{key:this._getContainerIndex(i,d)+"-"+e,className:s.classNames("properties-category-container",{"properties-hidden-container":f.content.itemType===o.ItemType.TEARSHEET})},O.default.createElement("button",{type:"button",onClick:this._showCategoryPanel.bind(this,f.group),className:s.classNames("properties-category-title",{"properties-light-enabled":this.props.controller.getLight()})},f.text,this._getMessageCountForCategory(f),v),O.default.createElement("div",{className:s.classNames("properties-category-content",{show:g})},m,y)))}else this.props.activeTab===f.group&&(p=d),a.push(O.default.createElement(l.Tab,{id:"tab."+this._getContainerIndex(i,d)+"-"+e,key:this._getContainerIndex(i,d)+"-"+e,tabIndex:d,label:ae([f.text,this._getMessageCountForCategory(f)]).join(""),title:ae([f.text,this._getMessageCountForCategory(f)]).join(""),className:s.classNames({"properties-hidden-container":f.content.itemType===o.ItemType.TEARSHEET}),onClick:this._modalTabsOnClick.bind(this,f.group)},m,y))}}return this.props.rightFlyout&&this.props.categoryView!==s.CATEGORY_VIEW.TABS?O.default.createElement("div",{key:"cat."+e,className:"properties-categories"},a):O.default.createElement(l.Tabs,{key:"tab."+e,className:"properties-primaryTabs",selected:p,light:this.props.controller.getLight(),tabContentClassName:s.classNames("properties-primary-tab-panel",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===s.CATEGORY_VIEW.TABS})},a)}},{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 O.default.createElement(xe,{key:"selectorPanel"+e,panels:s,dependsOn:r,controller:this.props.controller})}},{key:"generateAdditionalPanels",value:function(e,t,r,o,n,a){for(var i={},l=0;l<e.length;l++){var p=e[l],u="properties-control-panel";p.content&&"textPanel"===p.content.itemType&&(u=""),n&&(u+=" properties-control-nested-panel"),i[p.group]=O.default.createElement("div",{className:s.classNames(u,a),key:p.group+t},this.genUIItem(l,p.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="",p=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 d=n.cloneDeep_1(r);return this.props.controller.updateLastChildPropertyId(d,{col:a(t.control.name)}),this.ControlFactory.createControlItem(t.control,d)}return this.ControlFactory.createControlItem(t.control,c);case"additionalLink":var f=this.genPanel(e,t.panel,r,a);return O.default.createElement(at,{key:"sub-panel-button."+e,label:t.text,title:t.secondaryText,panel:f,controller:this.props.controller,rightFlyout:this.props.rightFlyout});case"staticText":return i=s.classNames("properties-static-text",t.textType),p="info"===t.textType?O.default.createElement("div",null,O.default.createElement(h.Icon,{type:s.CARBON_ICONS.INFORMATION,className:"properties-static-text-icon-info"})):null,u=O.default.createElement("div",{className:i},o.evaluateText(t.text,this.props.controller)),O.default.createElement("div",{key:"static-text."+e,className:"properties-static-text-container"},p,u);case"linkText":return i=s.classNames("properties-link-text-container",t.textType),"warning"===t.textType?p=O.default.createElement(h.Icon,{type:s.CONDITION_MESSAGE_TYPE.WARNING}):"error"===t.textType&&(p=O.default.createElement(h.Icon,{type:s.CONDITION_MESSAGE_TYPE.ERROR})),u=O.default.createElement(l.Link,{className:"properties-link-text",onClick:this._handleMessageClick.bind(this,t.controlId)},o.evaluateText(t.text,this.props.controller)),O.default.createElement("div",{key:"link-text."+e,className:i},p,u);case"hSeparator":return O.default.createElement("hr",{key:"h-separator."+e,className:"properties-h-separator"});case"panel":case"tearsheet":case"checkboxSelector":return this.genPanel(e,t.panel,r,a);case"subTabs":return O.default.createElement(ht,{key:"subtabs."+e,tabs:t.tabs,className:t.className,controller:this.props.controller,rightFlyout:this.props.rightFlyout,genUIItem:this.genUIItem,nestedPanel:t.nestedPanel,leftnav:this.props.controller.isTearsheetContainer()});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?O.default.createElement(vt,{key:"text-panel-"+e,panel:t.panel,controller:this.props.controller}):O.default.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType);default:return O.default.createElement("div",{key:"unknown."+e},"Unknown: ",t.itemType)}}},{key:"generateCustomPanel",value:function(e,t){if(this.props.customPanels){var r,n=kt(this.props.customPanels);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(i.id()===t.id)try{return O.default.createElement("div",{className:s.classNames("properties-custom-panel",{"properties-control-nested-panel":a.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){n.e(e)}finally{n.f()}}return O.default.createElement("div",{key:"custom."+e},"Panel Not Found: ",t.id)}},{key:"generateSharedControlNames",value:function(e){var t,r=kt(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=kt(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,a=this.genUIContent(t.uiItems,r,o),i="panel."+e;switch(t.panelType){case"columnSelection":return this.generateSharedControlNames(t),a=this.genUIContent(t.uiItems,r,o),O.default.createElement(ct,{key:i,controller:this.props.controller,panel:t},a);case"summary":return this.props.rightFlyout?O.default.createElement(Ze,{key:"summary-panel-"+i,controller:this.props.controller,panel:t},a):a;case"actionPanel":return O.default.createElement(bt,{key:"action-panel-"+e,controller:this.props.controller,panel:t},a);case"twisty":return O.default.createElement(tt,{key:i,controller:this.props.controller,panel:t},a);case"tearsheet":if(this.TEARSHEETS[t.id]={panel:t,title:t.label,description:t.description?t.description.text:null,content:a},null!==this.props.controller.getActiveTearsheet()?this.visibleTearsheet=this.TEARSHEETS[this.props.controller.getActiveTearsheet()]:this.visibleTearsheet=null,!this.FIRST_TEARSHEET_ID||this.FIRST_TEARSHEET_ID===t.id){this.FIRST_TEARSHEET_ID=t.id;return O.default.createElement(X,{open:null!==this.props.controller.getActiveTearsheet(),onCloseCallback:function(){n.props.controller.clearActiveTearsheet()},key:t.id,tearsheet:this.visibleTearsheet})}return null;case"column":return O.default.createElement(lt,{key:i,controller:this.props.controller,panel:t},a);default:return O.default.createElement(ct,{key:i,controller:this.props.controller,panel:t},a)}}},{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 O.default.createElement("div",{className:"properties-fp-table"},O.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 O.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(),s.MESSAGE_KEYS.ALERTS_TAB_TITLE),group:Nt,content:{itemType:"panel",panel:{id:"alerts-panel",panelType:"general",uiItems:t}}}}},{key:"render",value:function(){var e=this.props.controller.getUiItems();!a.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,r=this.genUIContent(e),i=O.default.createElement("div",null),l=this.props.controller.getForm(),p=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.FIELDPICKER_SAVEBUTTON_LABEL)+" "+l.label;return this.state.showFieldPicker&&(this.props.rightFlyout?i=O.default.createElement(Ve,{showPropertiesButtons:!1,show:!0,title:p,light:this.props.controller.getLight()},this.fieldPicker(p)):this.props.controller.isTearsheetContainer()?t=O.default.createElement(X,{open:!0,stacked:!0,tearsheet:{title:p,content:this.fieldPicker()}}):r=this.fieldPicker(p)),O.default.createElement("div",{className:s.classNames("properties-editor-form",{"tearsheet-container":this.props.controller.isTearsheetContainer()},{"right-flyout-tabs-view":this.props.rightFlyout&&this.props.categoryView===s.CATEGORY_VIEW.TABS},{"field-picker":this.state.showFieldPicker})},r,i,t)}}]),p}(O.default.Component),Dt=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(De(t))}}}))(Pt),Lt=a._baseGet;var Mt=function(e){return function(t){return null==e?void 0:Lt(e,t)}},xt=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=Mt(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)}},{key:"l10nValueDesc",value:function(e,t){var r=e+"."+t+".desc",o=this.l10n(r,t);return o!==t?o:null}}]),t}(),Bt=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),e.link&&(r.link=e.link)),r}}]),t}();function Ft(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 Vt(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 Vt(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 Vt(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 Ut=function(){function t(r,o,n,a,i,s,l,p,u,c,d,f,h){e._classCallCheck(this,t),this.name=r,this.parameters=o,this.actions=n,this.type=a,this.label=Bt.make(i),this.dependsOn=s,this.insertPanels=l,this.nestedPanel=p,this.subGroups=u,this.description=Bt.make(c),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(a.has_1(e,"group_info")){r=[];var o,n=Ft(e.group_info);try{for(n.s();!(o=n.n()).done;){var i=o.value,s=t.makeGroup(i);null!==s&&r.push(s)}}catch(e){n.e(e)}finally{n.f()}}return new t(Mt(e)("id"),Mt(e)("parameter_refs"),Mt(e)("action_refs"),Mt(e)("type"),Mt(e)("label"),Mt(e)("depends_on_ref"),Mt(e)("insert_panels"),Mt(e)("nested_panel"),r,Mt(e)("description"),Mt(e)("data"),Mt(e)("class_name"),Mt(e)("open"))}return null}}]),t}(),zt=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=Ft(e);try{for(i.s();!(a=i.n()).done;){var s=a.value,l=Ut.makeGroup(s);null!==l&&n.push(l)}}catch(e){i.e(e)}finally{i.f()}}else n.push(new Ut(m.v4(),r,null,o.GroupType.CONTROLS));return new t(n)}}]),t}();function Ht(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 Gt=e._createClass((function t(r,o,n,a,i,s,l,p){e._classCallCheck(this,t),this.name=r,this.label=o,this.description=n,this.actionType=a,this.data=i,this.image=s,this.button=l,this.className=p})),qt=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=Bt.make(e.label),r.description=Bt.make(e.description),r.control=e.control,r.data=e.data,r.image=e.image,r.button=e.button,r.className=e.class_name,r}return null}}]),t}(),Yt=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=Ht(e);try{for(n.s();!(r=n.n()).done;){var a=r.value,i=qt.makeActionDef(a);i&&o.push(i)}}catch(e){n.e(e)}finally{n.f()}return new t(o)}return null}}]),t}();function Kt(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 Wt(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 Wt(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 Wt(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 Xt=function(){function t(r){e._classCallCheck(this,t),r.id&&(this.name=r.id),r.label&&(this.label=Bt.make(r.label)),r.description&&(this.description=Bt.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=Bt.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),"boolean"===o.toType(r.resizable)&&(this.resizable=r.resizable),r.editStyle&&(this.editStyle=r.editStyle),"boolean"===o.toType(r.required)&&(this.required=r.required),r.numberGenerator&&(r.numberGenerator.label=Bt.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),r.enableMaximize&&(this.enableMaximize=r.enableMaximize),"boolean"===o.toType(r.summary)&&(this.summary=r.summary),r.increment&&(this.increment=r.increment),r.textAfter&&(this.textAfter=Bt.make(r.textAfter)),r.textBefore&&(this.textBefore=Bt.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:Mt(e)("id"),enableMaximize:Mt(r)("enable_maximize"),label:Mt(r)("label"),description:Mt(r)("description"),type:Mt(e)("type"),role:Mt(e)("role"),valueRestriction:Mt(e)("enum"),defaultValue:Mt(e)("default"),labelVisible:Mt(r)("label_visible"),control:Mt(r)("control"),orientation:Mt(r)("orientation"),width:Mt(r)("width"),charLimit:Mt(r)("char_limit"),placeHolderText:Mt(r)("place_holder_text"),separator:Mt(r)("separator"),resource_key:Mt(r)("resource_key"),visible:Mt(r)("visible"),valueIcons:Mt(r)("value_icons"),sortable:Mt(r)("sortable"),filterable:Mt(r)("filterable"),resizable:Mt(r)("resizable"),editStyle:Mt(r)("edit_style"),required:Mt(e)("required"),numberGenerator:Mt(r)("number_generator"),isKey:o,dmDefault:Mt(r)("dm_default"),dmImage:Mt(r)("dm_image"),language:Mt(r)("language"),summary:Mt(r)("summary"),increment:Mt(r)("increment"),textAfter:Mt(r)("text_after"),textBefore:Mt(r)("text_before"),moveableRows:Mt(r)("moveable_rows"),generatedValues:Mt(r)("generated_values"),dateFormat:Mt(r)("date_format"),timeFormat:Mt(r)("time_format"),customControlId:Mt(r)("custom_control_id"),data:Mt(r)("data"),rows:Mt(r)("rows"),displayChars:Mt(r)("display_chars"),uionly:Mt(e)("uionly"),actionRef:Mt(r)("action_ref"),customValueAllowed:Mt(r)("custom_value_allowed"),className:Mt(r)("class_name")}):null}}]),t}();function $t(e,t){if(t){var r,o=Kt(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 Jt=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=Kt(e);try{for(i.s();!(a=i.n()).done;){var s=a.value,l=Xt.makeParameterDef(s,$t(s.id,r));l&&n.push(l)}}catch(e){i.e(e)}finally{i.f()}}if(Array.isArray(o)){var p,u=Kt(o);try{for(u.s();!(p=u.n()).done;){var c=p.value,d=Xt.makeParameterDef(c,$t(c.id,r));d&&(d.uionly=!0,n.push(d))}}catch(e){u.e(e)}finally{u.f()}}return new t(n)}}]),t}();function Zt(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 Qt(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 Qt(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 Qt(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 er=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})),tr=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=Bt.make(e.label),r.description=Bt.make(e.description),r.icon=e.icon,r.carbonIcon=e.carbon_icon,r.enabled=e.enabled,r.divider=e.divider,r}return null}}]),t}(),rr=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=Zt(e);try{for(n.s();!(r=n.n()).done;){var a=r.value,i=tr.makeButtonDef(a);i&&o.push(i)}}catch(e){n.e(e)}finally{n.f()}return new t(o)}return null}}]),t}();function or(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 nr(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 nr(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 nr(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 ar=function(){function t(r,o,n,a,i,s,l,p,u,c,d,f){e._classCallCheck(this,t),this.name=r,this.keyDefinition=o,this.parameterMetadata=n,this.moveableRows=a,this.label=Bt.make(i),this.rowSelection=s,this.buttons=d,this.addRemoveRows="boolean"!=typeof l||l,this.header="boolean"!=typeof p||p,"boolean"==typeof u&&(this.includeAllFields=u),Array.isArray(c)&&(this.layout=c),this.type=void 0===f?"array":f}return e._createClass(t,[{key:"parameterNames",value:function(){var e=[];if(this.parameterMetadata){var t,r=or(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=or(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(Mt(e)("id"),Xt.makeParameterDef(Mt(e)("key_definition"),Mt(r)("key_definition"),!0),Jt.makeParameterMetadata(Mt(e)("parameters"),Mt(r)("parameters")),Mt(r)("moveable_rows"),Mt(r)("label"),Mt(r)("row_selection"),Mt(r)("add_remove_rows"),Mt(r)("header"),Mt(r)("include_all_fields"),Mt(r)("layout"),rr.makeButtonMetadata(Mt(r)("buttons")),Mt(e)("type")):null}}]),t}();function ir(e,t){if(t){var r,o=or(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 sr=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=or(e);try{for(a.s();!(o=a.n()).done;){var i=o.value,s=ar.makeStructure(i,ir(i.id,r));null!==s&&n.push(s)}}catch(e){a.e(e)}finally{a.f()}return new t(n)}return null}}]),t}(),lr=function(){function t(r,o,n,a,i,s,l,p,u,c,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=Bt.make(p),this.structureMetadata=u,this.parameterMetadata=c,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=sr.makeStructureMetadata(o,Mt(n)("complex_type_info")),i=Jt.makeParameterMetadata(r,Mt(n)("parameter_info"),Mt(n)("ui_parameters")),l=Yt.makeActionMetadata(Mt(n)("action_info")),p=zt.makeGroupMetadata(Mt(n)("group_info"),i.getParameters()),u=e&&e.title?e.title:null,c=e&&void 0!==e.editable?e.editable:s.DEFAULT_LABEL_EDITABLE;return new t(Mt(n)("id"),Mt(n)("icon"),Mt(n)("editor_size"),Mt(n)("pixel_width"),u,c,Mt(n)("help"),Mt(n)("description"),a,i,p,l,Mt(n)("label"))}}]),t}(),pr=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.valueDescs&&(this.valueDescs=r.valueDescs),r.valueIcons&&(this.valueIcons=r.valueIcons),"boolean"==typeof r.sortable&&(this.sortable=r.sortable),"boolean"==typeof r.filterable&&(this.filterable=r.filterable),"boolean"==typeof r.resizable&&(this.resizable=r.resizable),r.language&&(this.language=r.language),r.enableMaximize&&(this.enableMaximize=r.enableMaximize),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.hideEditButton&&(this.hideEditButton=r.hideEditButton),"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),this.light=a.get_1(r,"light",!0)}));function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function cr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach((function(t){n._defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var dr=function(){function t(r){e._classCallCheck(this,t),this.id=Mt(r)("id"),this.itemType=Mt(r)("itemType"),this.tabs=Mt(r)("tabs"),this.panel=Mt(r)("panel"),this.control=Mt(r)("control"),this.text=Mt(r)("text"),this.textType=Mt(r)("textType"),this.secondaryText=Mt(r)("secondaryText"),this.dependsOn=Mt(r)("dependsOn"),this.action=Mt(r)("action"),this.className=Mt(r)("className"),this.nestedPanel=Mt(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})}},{key:"makeTearsheetPanel",value:function(e,r){return new t({itemType:o.ItemType.TEARSHEET,panel:cr(cr({},e),{},{description:r})})}}]),t}(),fr=e._createClass((function t(r,o,n){e._classCallCheck(this,t),this.text=r,this.group=o,this.content=n})),hr=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}(),mr=e._createClass((function t(r,o){e._classCallCheck(this,t),this.text=r,o&&(this.numberGenerator=o)})),yr=e._createClass((function t(r,o,n){e._classCallCheck(this,t),this.text=r,o&&(this.placement=o),n&&(this.link=n)})),vr=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)})),gr=e._createClass((function t(r,o,n,a,i,s,l){e._classCallCheck(this,t),this.id=r,this.panelType=o,this.nestedPanel=a,this.uiItems=i,n&&(this.className=n),s&&(this.label=s),l&&(this.description=l)})),Er=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)})),br=e._createClass((function t(r,o){e._classCallCheck(this,t),this.text=r,o.range&&(this.range=o.range)}));function _r(e,t,r,o){var n=r.l10nLabel(t,t.name),a={light:!0,containerType:o};return new fr(n,t.name,Sr(e.parameterMetadata,e.actionMetadata,t,e.structureMetadata,r,a))}function Sr(e,t,r,n,i,s){var l=r.name,p=null,u=null,c=r.className,d=a.get_1(r,"nestedPanel",!1);switch(r.groupType()){case o.GroupType.CONTROLS:return dr.makePanel(new vr(l,o.PanelType.GENERAL,c,d,Tr(e,t,r,n,i,s)));case o.GroupType.COLUMN_SELECTION:return dr.makePanel(new vr(l,o.PanelType.COLUMN_SELECTION,c,d,Tr(e,t,r,n,i,s)));case o.GroupType.ADDITIONAL:var f=new vr(l,o.PanelType.GENERAL,c,d,Tr(e,t,r,n,i,s));return u=i.l10nLabel(r,r.name),dr.makeAdditionalLink(u,u,f);case o.GroupType.SUB_TABS:var h=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var o=r.name;p=Sr(e,t,r,n,i,s),u=i.l10nLabel(r,r.name),h.push(new fr(u,o,p))})),dr.makeSubTabs(h,c,d);case o.GroupType.PANEL_SELECTOR:var m=Ir(r,e,t,n,i,s);return dr.makePanelSelector(l,m,r.dependsOn,c);case o.GroupType.PANELS:var y=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){p=Sr(e,t,r,n,i,s),y.push(p)})),dr.makePanel(new vr(l,o.PanelType.GENERAL,c,d,y));case o.GroupType.COLUMN_PANEL:var v=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){p=Sr(e,t,r,n,i,s),v.push(p)})),dr.makePanel(new vr(l,o.PanelType.COLUMN_PANEL,c,d,v));case o.GroupType.CUSTOM_PANEL:return dr.makeCustomPanel(new Er(l,o.PanelType.CUSTOM,c,d,r.parameterNames(),r.data));case o.GroupType.SUMMARY_PANEL:u=i.l10nLabel(r,r.name);var g=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){p=Sr(e,t,r,n,i,s),g.push(p)})),dr.makePanel(new vr(l,o.PanelType.SUMMARY,c,d,g,u));case o.GroupType.ACTION_PANEL:var E;return u=i.l10nResource(r.label),r.description&&(E=new yr(i.l10nResource(r.description),null,r.description?r.description.link:null)),dr.makePanel(new gr(l,o.PanelType.ACTION_PANEL,c,d,function(e,t,r,o,n){var a=[];Array.isArray(r.actionIds())&&r.actionIds().forEach((function(e){var r=dr.makeAction(Or(t.getAction(e),n));a.push(r)}));return a}(0,t,r,0,i),u,E));case o.GroupType.TEXT_PANEL:var b;return u=i.l10nResource(r.label),r.description&&(b=new yr(i.l10nResource(r.description),r.description?r.description.placement:null,r.description?r.description.link:null)),dr.makeTextPanel(l,u,b,c,d);case o.GroupType.TWISTY_PANEL:u=i.l10nLabel(r,r.name);var _=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){p=Sr(e,t,r,n,i,s),_.push(p)})),dr.makePanel(new vr(l,o.PanelType.TWISTY_PANEL,c,d,_,u,r.open));case o.GroupType.TEARSHEET_PANEL:var S;u=i.l10nLabel(r,r.name),r.description&&(S=new yr(i.l10nResource(r.description)));var T=[];return Array.isArray(r.subGroups)&&r.subGroups.forEach((function(r){var o=Object.assign({},s,{light:!1});p=Sr(e,t,r,n,i,o),T.push(p)})),dr.makeTearsheetPanel(new vr(l,o.PanelType.TEARSHEET,c,d,T,u,!1),S);default:return o.logger.warn("(Unknown group type '"+r.groupType()+"')"),null}}function Tr(e,t,r,n,a,i){var s=[],l=[];return Array.isArray(r.parameterNames())?(r.parameterNames().forEach((function(p){var u,c=e.getParameter(p);if(c.propType()===o.Type.STRUCTURE&&n&&(u=n.getStructure(c.baseType())),!(r instanceof ar)||r instanceof ar&&c.isSubPanelEdit()){var d=Rr(e,p,r,u,a,t,n,null,i),f=dr.makeControl(d);if(c.separatorBefore()&&s.push(dr.makeHSeparator()),c.textBefore&&s.push(dr.makeStaticText(c.getTextBefore(a),c.getTextBeforeType())),s.push(f),c.textAfter&&s.push(dr.makeStaticText(c.getTextAfter(a),c.getTextAfterType())),c.separatorAfter()&&s.push(dr.makeHSeparator()),r.subGroups&&r.subGroups.length>0)for(var h=0;h<r.subGroups.length;h++)f.control.controlType===o.ControlType.RADIOSET&&f.control.orientation===o.ORIENTATIONS.VERTICAL&&r.subGroups[h].type===o.GroupType.PANEL_SELECTOR&&!0===r.subGroups[h].insertPanels&&r.subGroups[h].dependsOn===f.control.name&&(l.push(r.subGroups[h].dependsOn),f.additionalItems=Ir(r.subGroups[h],e,t,n,a,i))}})),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}(l,r.dependsOn)){var o=Sr(e,t,r,n,a,i);s.push(o)}})),s):s}function Ir(e,t,r,o,n,a){var i=[];return Array.isArray(e.subGroups)&&e.subGroups.forEach((function(e){var s=e.name,l=Sr(t,r,e,o,n,a),p=n.l10nLabel(e,e.name);i.push(new fr(p,s,l))})),i}function Cr(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&&!kr(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 kr(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 Rr(e,t,r,n,a,i,l,p,u){var c=void 0!==p&&p,d=c?p:e.getParameter(t),f=d.getAdditionalText(a),h=d.orientation,m=d.required;d.numberGenerator&&(d.numberGenerator=new br(a.l10nLabel(d.numberGenerator,d.name),d.numberGenerator));var y,v=new mr(a.l10nLabel(d,d.name),d.numberGenerator);d.description&&(y=new yr(a.l10nDesc(d,d.name),d.description?d.description.placement:null,d.description?d.description.link:null));var g,E,b,_,S,T,I,C,R,A,k,O,w,N,P,D=!0,L=d.moveableRows,M=d.structureType;if(c||d.getRole()!==o.ParamRole.CUSTOM)switch(d.propType()){case o.Type.STRING:var x=Cr(d,c);E=x.controlType,g=x.role;break;case o.Type.PASSWORD:E=o.ControlType.PASSWORDFIELD;break;case o.Type.BOOLEAN:d.control&&d.control!==o.ControlType.CHECKBOX||(D=!1,E=o.ControlType.CHECKBOX);break;case o.Type.INTEGER:case o.Type.LONG:case o.Type.DOUBLE:E=d.isList()?o.ControlType.TEXTAREA:o.ControlType.NUMBERFIELD;break;case o.Type.DATE:g=o.Type.DATE,E=d.control===o.ControlType.DATEPICKER?o.ControlType.DATEPICKER:d.control===o.ControlType.DATEPICKERRANGE?o.ControlType.DATEPICKERRANGE:d.isList()?o.ControlType.TEXTAREA:o.ControlType.DATEFIELD;break;case o.Type.TIME:g=o.Type.TIME,E=d.isList()?o.ControlType.TEXTAREA:o.ControlType.TIMEFIELD;break;case o.Type.TIMESTAMP:E=o.ControlType.TIMESTAMP;break;case o.Type.STRUCTURE:var B=c&&l?l.getStructure(d.baseType()):n;if(B){if(B.hasSubPanel()&&(T=function(e,t,r,n){var a=new vr(e.name,o.PanelType.GENERAL,"properties-editstyle-sub-panel",!1,Tr(e.parameterMetadata,e.actionMetadata,e,r,t,n)),i=t.l10nLabel(e,e.name);return dr.makeAdditionalLink("...",i,a)}(B,a,l,u)),_=B.keyAttributeIndex(),S=B.defaultStructure(),b=[],B.parameterMetadata&&Array.isArray(B.parameterMetadata.paramDefs)&&B.parameterMetadata.paramDefs.forEach((function(e){var t=Ar(e,a,l,u);b.push(t)})),(d.isMapValue()||d.isList())&&B.keyDefinition){var F=Ar(B.keyDefinition,a,l,u);b.unshift(F)}d.isList()||d.isMapValue()?(!c&&r&&void 0!==r.groupType&&r.groupType()===o.GroupType.COLUMN_SELECTION||d.control===o.ControlType.STRUCTURETABLE||d.getRole()===o.ParamRole.COLUMN?(E=o.ControlType.STRUCTURETABLE,L=B.moveableRows,I=B.rowSelection,C=B.addRemoveRows,R=B.header,A=B.includeAllFields):(E=o.ControlType.STRUCTURELISTEDITOR,L=B.moveableRows,I=B.rowSelection,C=B.addRemoveRows,R=B.header),B.buttons&&(O=function(e,t){var r=[];return e.buttonDefs.forEach((function(o){r.push(function(e,t){var r,o;e.label&&(r=new mr(t.l10nLabel(e,e.id)));e.description&&(o=new yr(t.l10nDesc(e,e.description)));return new er(e.id,r,o,e.icon,e.carbonIcon,e.enabled,e.divider)}(e.getButton(o.id),t))})),r}(B.buttons,a))):(E=o.ControlType.STRUCTUREEDITOR,B.layout&&(k=B.layout)),M=B.type}else E=o.ControlType.TEXTFIELD;break;case o.Type.OBJECT:if(c)(g=d.getRole())===o.ParamRole.COLUMN?E=o.ControlType.SELECTCOLUMN:(o.logger.warn("Complex subControl type that is not a field! Name: "+d.name),E=o.ControlType.READONLY);else if(d.isCompoundField()){var V=Cr(d,c);E=V.controlType,g=V.role}else o.logger.warn("Complex parameter type that is not a field! Name: "+d.name),E=o.ControlType.READONLY;break;default:g="???"+d.propType()+"???",E=o.ControlType.TEXTAREA}else E=o.ControlType.CUSTOM;d.getRole()===o.ParamRole.ENUM&&(w=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[]}(d,a)),d.getRole()===o.ParamRole.ENUM&&(N=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.l10nValueDesc(r,String(e)))})),o}return[]}(d,a)),!c&&d.actionRef&&(P=Or(i.getAction(d.actionRef),a));var U,z,H,j={};return j.name=d.name,j.label=v,j.description=y,j.labelVisible="boolean"==typeof d.labelVisible?d.labelVisible:D,j.controlType=d.getControl(E),j.valueDef=hr.make(d),j.structureType=M,j.role=g,j.additionalText=f,j.orientation=h,j.values=d.getValidValues(),j.valueLabels=w,j.valueDescs=N,j.valueIcons=d.valueIcons,j.sortable=d.sortable,j.filterable=d.filterable,j.resizable=d.resizable,j.charLimit=d.charLimit,j.subControls=b,j.keyIndex=_,j.defaultRow=S,j.childItem=T,j.moveableRows=L,j.required=m,j.language=d.language,j.enableMaximize=d.enableMaximize,j.summary=d.summary,j.increment=d.increment,j.rowSelection=I,j.generatedValues=d.generatedValues,j.addRemoveRows=C,j.dateFormat=d.dateFormat,j.timeFormat=d.timeFormat,j.customControlId=d.customControlId,j.data=d.data,j.rows=d.rows,j.displayChars=d.displayChars,j.header=R,j.uionly=d.uionly,j.includeAllFields=A,j.layout=k,j.dmImage=d.dmImage,j.action=P,j.customValueAllowed=d.customValueAllowed,j.className=d.className,j.buttons=O,j.light=(U=u.light,z=u.containerType,H=d.isSubPanelEdit(),U&&(z!==s.CONTAINER_TYPE.TEARSHEET||z===s.CONTAINER_TYPE.TEARSHEET&&H)),c&&(j.visible=d.visible,j.width=d.columns(8),j.editStyle=d.editStyle,j.isKeyField=d.isKey,j.dmDefault=d.dmDefault),new pr(j)}function Ar(e,t,r,n){return Rr(null,null,null,e.propType()===o.Type.STRUCTURE&&r?r.getStructure(e.baseType()):null,t,null,r,e,n)}function kr(e){return"on_panel"===e.editStyle||"subpanel"===e.editStyle}function Or(e,t){var r,o=new mr(t.l10nLabel(e,e.id));return e.description&&(r=new yr(t.l10nDesc(e,e.id))),new Gt(e.id,o,r,e.control,e.data,e.image,e.button,e.className)}function wr(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 Nr(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 Nr(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 Nr(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 Pr(t,r){for(var o in t)a.has_1(t,o)&&"object"===e._typeof(t[o])&&null!==t[o]&&(t[o].message?t[o].message.default=r.l10nResource(t[o].message):Pr(t[o],r))}function Dr(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 Lr(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 Lr(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 Lr(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 Mr=function(){function t(r,o,n,a,i,s,l,p,u,c,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=p,this.data=u,this.conditions=c,this.resources=d,this.icon=f,this.heading=h}return e._createClass(t,null,[{key:"makeForm",value:function(e,r){var n,a,i=lr.makePropertyDef(Mt(e)("titleDefinition"),Mt(e)("parameters"),Mt(e)("complex_types"),Mt(e)("uihints")),l=Mt(e)("resources"),p=Mt(e)("conditions");if(i){var u=new xt(l),c=[];if(i.groupMetadata&&i.groupMetadata.groups){var d,f=Dr(i.groupMetadata.groups);try{for(f.s();!(d=f.n()).done;){var h=d.value;c.push(_r(i,h,u,r))}}catch(e){f.e(e)}finally{f.f()}}var m={currentParameters:Mt(e)("current_parameters"),uiCurrentParameters:Mt(e)("current_ui_parameters"),datasetMetadata:Mt(e)("dataset_metadata")},y=r===s.CONTAINER_TYPE.TEARSHEET||r===s.CONTAINER_TYPE.MODAL?o.Size.LARGE:o.Size.SMALL;return new t(i.name,i.label,i.labelEditable,i.help,i.editorSizeHint(y),i.pixelWidth,[dr.makePrimaryTabs(c)],(n=new xr("ok","OK",!0,""),a=new xr("cancel","Cancel",!1,""),[n,a]),m,function(e,t){if(e&&Array.isArray(e)){var r,o=wr(e);try{for(o.s();!(r=o.n()).done;)Pr(r.value,t)}catch(e){o.e(e)}finally{o.f()}}return e}(p,u),l,i.icon,u.l10nResource(i.heading))}return null}}]),t}();var xr=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 Br(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 Fr=function(r){t._inherits(n,r);var o=Br(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}(i.Action),Vr=a._baseRest,Ur=o._isIterateeCall;var zr=function(e){return Vr((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&&Ur(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}))},Hr=n._assignValue,jr=n._copyObject,Gr=zr,qr=a.isArrayLike_1,Yr=a._isPrototype,Kr=a.keys_1,Wr=Object.prototype.hasOwnProperty,Xr=Gr((function(e,t){if(Yr(t)||qr(t))jr(t,Kr(t),e);else for(var r in t)Wr.call(t,r)&&Hr(e,r,t[r])}));function $r(){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 se: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?Jr(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?Jr(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 ie:return Object.assign({},t.properties);case le:var n=e;return null!==r&&void 0!==r.name&&delete n[r.name],Object.assign({},e,n);default:return e}}function Jr(e,t,r){void 0!==e.row&&(void 0!==e.col?(void 0===t[e.row]&&(t[e.row]=[]),void 0!==e.propertyId?Jr(e.propertyId,t[e.row][e.col],r):t[e.row][e.col]=r):t[e.row]=r)}function Zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ue: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 pe: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 de:var r=e;return r[t.state.panelId.name]={value:t.state.value},Object.assign({},e,r);case ce:return Object.assign({},t.states);default:return e}}function eo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case he:var r=e;return r[t.state.actionId.name]={value:t.state.value},Object.assign({},e,r);case fe:return Object.assign({},t.states);default:return e}}function to(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case ye: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 i=o.col.toString();void 0===r[o.name][n][i]&&(r[o.name][n][i]={}),r[o.name][n][i]=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 ve: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,a.isEmpty_1(s[t.message.propertyId.name])&&delete s[t.message.propertyId.name])),Object.assign({},e,s);case me:return Object.assign({},t.messages);default:return e}}function ro(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===ge?Object.assign({},e,t.datasetMetadata):e}function oo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ee: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 be: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 no(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Ae: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 ke: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 ao(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case _e:var r=e;return r.title=t.title,Object.assign({},e,r);case Se:var o=e;return o.activeTab=t.activeTab,Object.assign({},e,o);default:return e}}function io(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Te){var r=e;return r.propertyIds=t.propertyIds,Object.assign({},e,r)}return e}function so(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Ie){var r=e;return r.disable=t.disableState,Object.assign({},e,r)}return e}function lo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(t.type===Ce){var r=e;return r[t.info.panelId.name]=t.info.disableState,Object.assign({},e,r)}return e}function po(){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 Re:if(null===r)return e;var o=e;return void 0===o[r.name]&&(o[r.name]={}),void 0!==r.row?uo(r,o[r.name],"addRemoveRows",t.info.value):o[r.name].addRemoveRows=t.info.value,Object.assign({},e,o);case Oe:if(null===r)return e;var n=e;return void 0===n[r.name]&&(n[r.name]={}),void 0!==r.row?uo(r,n[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value):i.set_1(n[r.name],"tableButtons.".concat(t.info.buttonId),t.info.value),Object.assign({},e,n);case we:if(null===r)return e;var a=e;return void 0===a[r.name]&&(a[r.name]={}),void 0!==r.row?uo(r,a[r.name],"hideEditButton",t.info.value):a[r.name].hideEditButton=t.info.value,Object.assign({},e,a);default:return e}}function uo(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?uo(e.propertyId,t[e.row][e.col],r,o):i.set_1(t[e.row][e.col],r,o)):void 0!==e.propertyId?uo(e.propertyId,t[e.row],r,o):i.set_1(t[e.row],r,o))}function co(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return t.type===Ne?Object.assign({},e,t.tearsheetId):e}var fo=function(){function t(){e._classCallCheck(this,t),this.combinedReducer=E.combineReducers({propertiesReducer:$r,controlStatesReducer:Zr,panelStatesReducer:Qr,errorMessagesReducer:to,datasetMetadataReducer:ro,rowSelectionsReducer:oo,componentMetadataReducer:ao,disableRowMoveButtonsReducer:io,actionStatesReducer:eo,wideFlyoutPrimaryButtonDisableReducer:lo,tearsheetStatesReducer:co,saveButtonDisableReducer:so,propertiesSettingsReducer:po,rowFreezeReducer:no});var r=!1;"undefined"!=typeof window&&(r=window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__()),this.store=E.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:ie,properties:e}}(e))}},{key:"updatePropertyValue",value:function(e,t){this.store.dispatch({type:se,property:{propertyId:e,value:t}})}},{key:"removePropertyValue",value:function(e){this.store.dispatch({type:le,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:pe,states:e}}(e))}},{key:"updateControlState",value:function(e,t){this.store.dispatch({type:ue,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:ce,states:e}}(e))}},{key:"updatePanelState",value:function(e,t){this.store.dispatch({type:de,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:fe,states:e}}(e))}},{key:"updateActionState",value:function(e,t){this.store.dispatch({type:he,state:{actionId:e,value:t}})}},{key:"setSaveButtonDisable",value:function(e){this.store.dispatch(function(e){return{type:Ie,disableState:e}}(e))}},{key:"getSaveButtonDisable",value:function(){return this.store.getState().saveButtonDisableReducer.disable}},{key:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.store.dispatch({type:Ce,info:{panelId:e,disableState:t}})}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){if(void 0===e)return null;var t=this.store.getState().wideFlyoutPrimaryButtonDisableReducer[e.name];return void 0!==t?t:null}},{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,i=0;for(var l in e)if(a.has_1(e,l)&&"text"!==l){var p=e[l];if(p&&p.text&&(r=p,n+=p.type===s.CONDITION_MESSAGE_TYPE.ERROR?1:0,i+=p.type===s.CONDITION_MESSAGE_TYPE.WARNING?1:0),p)for(var u in p)if(a.has_1(p,u)&&"text"!==u){var c=p[u];c&&c.text&&(r=c,n+=c.type===s.CONDITION_MESSAGE_TYPE.ERROR?1:0,i+=c.type===s.CONDITION_MESSAGE_TYPE.WARNING?1:0)}}return n+i!==1&&r&&(r.type=n>0?s.CONDITION_MESSAGE_TYPE.ERROR:s.CONDITION_MESSAGE_TYPE.WARNING,r.text=n>0?o.formatMessage(t,s.MESSAGE_KEYS.TABLE_SUMMARY_ERROR,{errorMsgCount:n}):"",r.text+=i>0?o.formatMessage(t,s.MESSAGE_KEYS.TABLE_SUMMARY_WARNING,{warningMsgCount:i}):""),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:me,messages:e}}(e))}},{key:"updateErrorMessage",value:function(e,t){o.isEqual_1(this.getErrorMessage(e),t)||this.store.dispatch({type:ye,message:{propertyId:e,value:t}})}},{key:"clearErrorMessage",value:function(e){null!==this.getErrorMessage(e)&&this.store.dispatch({type:ve,message:{propertyId:e}})}},{key:"setDatasetMetadata",value:function(e){this.store.dispatch(function(e){return{type:ge,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:Ee,info:{propertyId:e,selectedRows:t}})}},{key:"clearSelectedRows",value:function(e){this.store.dispatch({type:be,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:Ae,info:{propertyId:e,staticRows:t}})}},{key:"clearStaticRows",value:function(e){this.store.dispatch({type:ke,info:{propertyId:e}})}},{key:"setDisableRowMoveButtons",value:function(e){this.store.dispatch(function(e){return{type:Te,propertyIds:e}}(e))}},{key:"getDisableRowMoveButtons",value:function(){return this.store.getState().disableRowMoveButtonsReducer.propertyIds}},{key:"setTitle",value:function(e){this.store.dispatch(Pe(e))}},{key:"getTitle",value:function(){return this.store.getState().componentMetadataReducer.title}},{key:"setActiveTab",value:function(e){this.store.dispatch(De(e))}},{key:"getActiveTab",value:function(){return this.store.getState().componentMetadataReducer.activeTab}},{key:"setAddRemoveRows",value:function(e,t){this.store.dispatch({type:Re,info:{propertyId:e,value:t}})}},{key:"getAddRemoveRows",value:function(e){var t=this.store.getState();return!t.propertiesSettingsReducer[e.name]||(void 0!==e.row?ho(e,t.propertiesSettingsReducer[e.name],"addRemoveRows",true):t.propertiesSettingsReducer[e.name].addRemoveRows)}},{key:"setTableButtonEnabled",value:function(e,t,r){this.store.dispatch({type:Oe,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?ho(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?ho(e,r.propertiesSettingsReducer[e.name],"tableButtons.".concat(t),false):r.propertiesSettingsReducer[e.name].tableButtons[t])}},{key:"setHideEditButton",value:function(e,t){this.store.dispatch({type:we,info:{propertyId:e,value:t}})}},{key:"getHideEditButton",value:function(e){var t=this.store.getState();return!!t.propertiesSettingsReducer[e.name]&&(void 0!==e.row?ho(e,t.propertiesSettingsReducer[e.name],"hideEditButton",false):t.propertiesSettingsReducer[e.name].hideEditButton)}},{key:"setActiveTearsheetId",value:function(e){this.store.dispatch(function(e){return{type:Ne,tearsheetId:e}}({tearsheetId:e}))}},{key:"getActiveTearsheetId",value:function(){var e=this.store.getState().tearsheetStatesReducer.tearsheetId;return void 0!==e?e:null}}]),t}();function ho(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?ho(e.propertyId,t[e.row][e.col],r,o):a.get_1(t[e.row][e.col],r):void 0!==e.propertyId?ho(e.propertyId,t[e.row],r,o):a.get_1(t[e.row],r):o}function mo(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 yo(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 yo(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 yo(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 vo(e,t,r){if(e.or)!function(e,t,r){for(var o=0;o<e.length;o++)vo(e[o],t,r)}(e.or,t,r);else if(e.and)!function(e,t,r){for(var o=0;o<e.length;o++)vo(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 go(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 Eo(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),go(e,i,a),r.additionalItems){var s,l=mo(r.additionalItems);try{for(l.s();!(s=l.n()).done;){Eo(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.TEARSHEET:case o.ItemType.PANEL:if(r.panel&&r.panel.uiItems){var p=n;r.panel.panelType===o.PanelType.SUMMARY&&(p=r.panel.id);var u,c=mo(r.panel.uiItems);try{for(c.s();!(u=c.n()).done;){Eo(e,t,u.value,p,a)}}catch(e){c.e(e)}finally{c.f()}}break;case o.ItemType.PRIMARY_TABS:case o.ItemType.PANEL_SELECTOR:case o.ItemType.SUB_TABS:if(r.tabs){var d,f=mo(r.tabs);try{for(f.s();!(d=f.n()).done;){var h=d.value;Eo(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=mo(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 bo(e,t,r){try{var n=function(e){var t=e;if(t.evaluate){var r=[];t.parameter_refs?vo(t.evaluate,r,t.parameter_refs):vo(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};_o(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&&_o(e.refs,i,a)}catch(e){o.logger.info("Error parsing ui conditions: "+e)}return e}function _o(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 So(e){var t={};if(e&&e.functions){var r=new xt(Mt(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;if(r.locLabel=t.l10nLabel(r,r.id),r.help=t.l10nDesc(r,r.locLabel),r.value=r.locLabel,r.return_type_label){var o=Bt.make(r.return_type_label);r.locReturnType=t.l10nResource(o)}return 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=To(r,a);o&&t.functionCategories[e.id].functionList.push(o)}))})),t.operators=[],o.operator_refs&&o.operator_refs.forEach((function(e){var r=To(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");var o=r.l10nDesc(e.field_columns.field_column_info,e.id+".field_column_info");o!==e.id+".field_column_info"&&(e.field_columns.field_column_info.descLabel=o);var n=r.l10nDesc(e.field_columns.value_column_info,e.id+".value_column_info");n!==e.id+".value_column_info"&&(e.field_columns.value_column_info.descLabel=n),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 e&&e.resources&&(t.resources=e.resources),t}function To(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 Io(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 Co(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 Co(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 Co(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 Ro(e,t,r){switch(t.itemType){case o.ItemType.PRIMARY_TABS:case o.ItemType.SUB_TABS:if(t.tabs){var n,a=Io(t.tabs);try{for(a.s();!(n=a.n()).done;){Ro(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.TEARSHEET:case o.ItemType.CHECKBOX_SELECTOR:if(t.panel&&t.panel.id&&(e[r].panels.push(t.panel.id),Ao(e,t.panel.id),t.panel.uiItems)){var i,s=Io(t.panel.uiItems);try{for(s.s();!(i=s.n()).done;){Ro(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,p=Io(t.control.additionalItems);try{for(p.s();!(l=p.n()).done;){Ro(e,l.value.content,r)}}catch(e){p.e(e)}finally{p.f()}}break;case o.ItemType.PANEL_SELECTOR:if(e[r].panels.push(t.id),Ao(e,t.id),t.dependsOn&&e[t.id].controls.push(t.dependsOn),t.tabs){var u,c=Io(t.tabs);try{for(c.s();!(u=c.n()).done;){Ro(e,u.value.content,t.id)}}catch(e){c.e(e)}finally{c.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 Ao(e,t){a.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 ko=a._baseFlatten,Oo=a._baseRest,wo=i._baseUniq,No=a.isArrayLikeObject_1,Po=a.last_1,Do=Oo((function(e){var t=Po(e);return t="function"==typeof t?t:void 0,wo(ko(e,1,No,!0),void 0,t)})),Lo=a._SetCache,Mo=a._arrayIncludes,xo=a._arrayIncludesWith,Bo=a._arrayMap,Fo=a._baseUnary,Vo=a._cacheHas,Uo=Math.min;var zo=function(e,t,r){for(var o=r?xo:Mo,n=e[0].length,a=e.length,i=a,s=Array(a),l=1/0,p=[];i--;){var u=e[i];i&&t&&(u=Bo(u,Fo(t))),l=Uo(u.length,l),s[i]=!r&&(t||n>=120&&u.length>=120)?new Lo(i&&u):void 0}u=e[0];var c=-1,d=s[0];e:for(;++c<n&&p.length<l;){var f=u[c],h=t?t(f):f;if(f=r||0!==f?f:0,!(d?Vo(d,h):o(p,h,r))){for(i=a;--i;){var m=s[i];if(!(m?Vo(m,h):o(e[i],h,r)))continue e}d&&d.push(h),p.push(f)}}return p},Ho=a.isArrayLikeObject_1;var jo=function(e){return Ho(e)?e:[]},Go=a._arrayMap,qo=zo,Yo=a._baseRest,Ko=jo,Wo=a.last_1,Xo=Yo((function(e){var t=Wo(e),r=Go(e,Ko);return(t="function"==typeof t?t:void 0)&&r.pop(),r.length&&r[0]===e[0]?qo(r,void 0,t):[]}));function $o(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(t,r,o){var n=t;if(n.validation)return function(t,r,o){if(t.fail_message&&t.evaluate){var n=t.evaluate;n.isValidation=!0;var a=en(n,r,o);return"object"===e._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"}(t.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 en(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 en(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 en(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 en(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 en(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 Qo(e,t,r,o){return t&&t.filter&&t.filter.evaluate?tn(e,t.filter,t.filter.evaluate,r,o):o}function en(t,r,n){if(t.or)return function(e,t,r){for(var o=0;o<e.length;o++){if(!0===en(e[o],t,r))return!0}return!1}(t.or,r,n);if(t.and)return function(t,r,o){for(var n=0;n<t.length;n++){var a=en(t[n],r,o);if(!1===a)return!1;if("object"===e._typeof(a))return a}return!0}(t.and,r,n);if(t.condition)return function(e,t,r,n){var a=e.op,i=e.parameter_ref,s=e.parameter_2_ref,l=e.value,p={},u=r.getPropertiesConfig();n||"null"!==u.conditionDisabledPropertyHandling||(p.filterDisabled=!0);n||"null"!==u.conditionHiddenPropertyHandling||(p.filterHidden=!0);var c,d={param:i,id:rn(t,i)};d.value=r.getPropertyValue(d.id,p,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&&((c={param:s,id:rn(t,s)}).value=r.getPropertyValue(c.id,p,null),c.control=r.getControl(c.id));var f=r.getConditionOp(a);if(f)return f(d,c,l,r);return o.logger.warn("Ignoring unknown condition operation '"+a+"' for parameter_ref "+i),!0}(t.condition,r,n,t.isValidation);throw new Error("Failed to parse definition")}function tn(e,t,r,a,s){if(r.or)return function(e,t,r,n,a){var i,s=[],l=$o(r);try{for(l.s();!(i=l.n()).done;){var p=tn(e,t,i.value,n,a);s=Do(s,p,o.isEqual_1)}}catch(e){l.e(e)}finally{l.f()}return s}(e,t,r.or,a,s);if(r.and)return function(e,t,r,a,i){var s,l=n.cloneDeep_1(i),p=$o(r);try{for(p.s();!(s=p.n()).done;){var u=tn(e,t,s.value,a,l);l=Xo(l,u,o.isEqual_1)}}catch(e){p.e(e)}finally{p.f()}return l}(e,t,r.and,a,s);if(r.condition)return function(e,t,r,a,s){var l=r.op,p=[];void 0!==r.value&&null!==r.value?p.push(r.value):Array.isArray(r.values)&&p.push.apply(p,i._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=$o(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,p);case"dmType":return function(e,t){var r=n.cloneDeep_1(e);r&&(r=r.filter((function(e){var r,o=$o(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,p);case"dmModelingRole":return function(e,t){var r=n.cloneDeep_1(e);r&&(r=r.filter((function(e){var r,o=$o(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,p);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,a,s);default:var u=a.getConditionOp(l);return u&&e.name===t.parameter_ref?u(e,r,a,s):(o.logger.warn("Ignoring unknown condition operation '"+l+"'"),s)}}(e,t,r.condition,a,s);throw new Error("Failed to parse filter definition")}function rn(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 on(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 nn(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 nn(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 nn(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 an(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.getControls();!function(e,t,r){if(Object.keys(t).length>0)for(var o in t)if(a.has_1(t,o)){var n=t[o];if(!n.parameterName)ln(n.name?{name:n.name}:{name:n},e,r)}}(e,r,t)}function sn(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(a.has_1(t,o)){var n=t[o];if(!n.parameterName){var i=n.name?{name:n.name}:{name:n},s=e.getPropertyValue(i);if(n.subControls)if(n.valueDef.isList||n.valueDef.isMap){if(gn(i,r,e),Array.isArray(s))for(var l=0;l<s.length;l++)for(var p=0;p<n.subControls.length;p++)i.row=l,i.col=p,gn(i,r,e)}else for(var u={name:i.name},c=0;c<n.subControls.length;c++)u.col=c,gn(u,r,e);else gn(i,r,e)}}}(e,r,t),yn(e.panelTree,t,s.PANEL_TREE_ROOT);var o=cn(e);e.setControlStates(t.controls),e.setPanelStates(t.panels),e.setActionStates(t.actions);var n,i=on(un(o,cn(e)));try{for(i.s();!(n=i.n()).done;){pn(n.value,e,1)}}catch(e){i.e(e)}finally{i.f()}}function ln(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(vn(i,t,a,r),a.subControls)if(a.valueDef.isList||a.valueDef.isMap)for(var l=0;l<s.length;l++)for(var p=0;p<a.subControls.length;p++)i.row=l,i.col=p,vn(i,t,a.subControls[p],r);else for(var u=0;u<a.subControls.length;u++){vn({name:e.name,col:u},t,a.subControls[u],r)}else if(void 0===i.row)for(var c=0;c<s.length;c++)i.row=c,i.col=0,vn(i,t,a,r)}else vn(i,t,a,r)}else o.logger.warn("Control not found for "+e.name)}function pn(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()},l=n.cloneDeep_1(e),p=t.getPropertyValue(l);if(Array.isArray(p)&&a.subControls)if(a.valueDef.isList||a.valueDef.isMap){gn(l,i,t);for(var u=0;u<p.length;u++)for(var c=0;c<a.subControls.length;c++)l.row=u,l.col=c,gn(l,i,t)}else for(var d=0;d<a.subControls.length;d++)l.col=d,gn(l,i,t);else gn(l,i,t);var f=cn(t);t.setControlStates(i.controls),t.setPanelStates(i.panels),t.setActionStates(i.actions);var h,m=on(un(f,cn(t),r));try{for(m.s();!(h=m.n()).done;){pn(h.value,t,r+1)}}catch(e){m.e(e)}finally{m.f()}r>0&&yn(t.panelTree,i,s.PANEL_TREE_ROOT)}else o.logger.warn("Control not found for "+e.name)}function un(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 a,s=on(i.union_1(Object.keys(e),Object.keys(t)));try{for(s.s();!(a=s.n()).done;){var l=a.value,p=e[l],u=t[l];o.isEqual_1(p,u)||n.push({name:l})}}catch(e){s.e(e)}finally{s.f()}return n}function cn(e){var t=e.getPropertiesConfig(),r={};return"null"===t.conditionDisabledPropertyHandling&&(r.filterDisabled=!0),"null"===t.conditionHiddenPropertyHandling&&(r.filterHidden=!0),a.isEmpty_1(r)?{}:e.getPropertyValues(r)}function dn(e,t,r,o){var n=e[t.name];n||(n={});var a=Object.assign({},n);if(!(void 0===t.row&&void 0===t.col)||a.value!==s.STATES.HIDDEN||r!==s.STATES.DISABLED&&r!==s.STATES.ENABLED?a.value=r:a.value=s.STATES.HIDDEN,void 0!==t.col){var i=t.col.toString();if(n[i]||(n[i]={}),void 0!==t.row){var l=t.row.toString();n[i][l]||(n[i][l]={}),n[i][l].value=a.value}else{n[i].value=a.value;var p="hidden"===r,u=o.getColumnVisibility(t,t.col)!==!p;void 0!==o&&u&&o.toggleColumnVisibility(t,t.col,!p)}}else n.value=a.value;e[t.name]=n}function fn(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!==s.STATES.HIDDEN||o!==s.STATES.DISABLED&&o!==s.STATES.ENABLED?a.values[r].value=o:a.values[r].value=s.STATES.HIDDEN,void 0!==t.col){var i=t.col.toString();if(n[i]||(n[i]={}),void 0!==t.row){var l=t.row.toString();n[i][l]||(n[i][l]={}),n[i][l].values||(n[i][l].values={}),n[i][l].values[r]||(n[i][l].values[r]={}),n[i][l].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 hn(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 mn(e,t,r,o){for(var n in e)if(a.has_1(e,n)){var i=e[n],s=1e3*N.default(n)();if(!0===i.required&&wn(i,t,r,n,s,o),"date"!==i.role&&"time"!==i.role||Nn(i,t,n,s,o),"column"===i.role){var l=n;i.valueDef.isList&&(l+="[0]"),Pn(i,t,l,s,o)}if(i.subControls){for(var p={},u=0;u<i.subControls.length;u++){p[n+"["+u+"]"]=i.subControls[u]}mn(p,t,r,o)}}}function yn(e,t,r,o){var n=t.panels[r],a=o?n&&n.value===s.STATES.DISABLED:n&&(n.value===s.STATES.HIDDEN||n.value===s.STATES.DISABLED);if(a&&e[r]){if(e[r].controls){var i,l=on(e[r].controls);try{for(l.s();!(i=l.n()).done;){var p=i.value;o?t.controls[p].value!==s.STATES.HIDDEN&&dn(t.controls,{name:p},n.value):dn(t.controls,{name:p},n.value)}}catch(e){l.e(e)}finally{l.f()}}if(e[r].actions){var u,c=on(e[r].actions);try{for(c.s();!(u=c.n()).done;){var d=u.value;o?t.actions[d].value!==s.STATES.HIDDEN&&dn(t.actions,{name:d},n.value):dn(t.actions,{name:d},n.value)}}catch(e){c.e(e)}finally{c.f()}}}if(e[r]&&e[r].panels){var f,h=on(e[r].panels);try{for(h.s();!(f=h.n()).done;){var m=f.value;a&&(o?t.panels[m].value!==s.STATES.HIDDEN&&dn(t.panels,{name:m},n.value):dn(t.panels,{name:m},n.value)),yn(e,t,m,o)}}catch(e){h.e(e)}finally{h.f()}}}function vn(t,r,i,l){var p=!1,u=r.getDefinitions(t,s.CONDITION_TYPE.VALIDATION,s.CONDITION_DEFINITION_INDEX.CONTROLS);if(u.length>0){var c=r.getRequiredDefinitionIds();try{var d,f=!1,h=on(u);try{for(h.s();!(d=h.n()).done;){var m=d.value,y=s.DEFAULT_VALIDATION_MESSAGE;f=Zo(m.definition,t,r);var v=!1;"object"===e._typeof(f)&&(v=!0,y={type:f.type,text:f.text});var g=n.cloneDeep_1(t);if(m.definition.validation&&m.definition.validation.fail_message&&m.definition.validation.fail_message.focus_parameter_ref&&(g=hn(m.definition.validation.fail_message.focus_parameter_ref,g)),void 0!==g.col&&void 0===i.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=c.indexOf(m.definition.validation.id)>-1,l||m.alwaysShow||(y.displayError=!1),r.getErrorMessage(g,!0,!0,!1)||(p=!1),void 0!==g.row||void 0!==g.col){var E=r.convertPropertyId(g.name);null!==r.getErrorMessage(E)&&r.updateErrorMessage(E,null)}if(v&&!p)r.updateErrorMessage(g,y),v&&(p=!0);else if(!v&&!p){var b=r.getErrorMessage(g,!1,!1,!1);a.isEmpty_1(b)||b.validation_id!==y.validation_id||r.updateErrorMessage(g,s.DEFAULT_VALIDATION_MESSAGE)}}}catch(e){h.e(e)}finally{h.f()}}catch(e){o.logger.warn("Error thrown in validation: "+e)}}}function gn(e,t,r){En(e,t,r,s.CONDITION_TYPE.VISIBLE),En(e,t,r,s.CONDITION_TYPE.ENABLED),En(e,t,r,s.CONDITION_TYPE.FILTEREDENUM)}function En(e,t,r,o){bn(r.getDefinitions(e,o,s.CONDITION_DEFINITION_INDEX.CONTROLS),e,t,r,o)}function bn(e,t,r,n,a){if(e.length>0)try{e.forEach((function(o,i){var l=Zo(o.definition,t,n);switch(a){case s.CONDITION_TYPE.VISIBLE:_n(l,o.definition.visible,t,r,n,!0);break;case s.CONDITION_TYPE.ENABLED:_n(l,o.definition.enabled,t,r,n,!1);break;case s.CONDITION_TYPE.FILTEREDENUM:var p=function(e,t){var r=e[t],o=r.definition.enum_filter.target.parameter_ref,n=!0;return e.forEach((function(e,r){r>t&&e.definition.enum_filter.target.parameter_ref===o&&(n=!1)})),n}(e,i);!function(e,t,r,o,n){if(e.enum_filter.target&&e.enum_filter.target.parameter_ref){var a=r.controls,i=hn(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 p=i.row.toString();s[l][p]||(s[l][p]={});var u=kn(e,o,s[l][p].enumFilter,s[l][p].enumFilterApplied,n);s[l][p].enumFilter=u.values,s[l][p].enumFilterApplied=u.filterApplied}else{var c=kn(e,o,s[l].enumFilter,s[l].enumFilterApplied,n);s[l].enumFilter=c.values,s[l].enumFilterApplied=c.filterApplied}}else{var d=kn(e,o,s.enumFilter,s.enumFilterApplied,n);s.enumFilter=d.values,s.enumFilterApplied=d.filterApplied}a[i.name]=s}}(o.definition,t,r,l,p)}}))}catch(e){o.logger.warn("Error thrown in validation: "+e)}}function _n(e,t,r,o,n,a){t.parameter_refs&&Sn(e,t,r,o,n,a,t.parameter_refs,"control"),t.action_refs&&Sn(e,t,r,o,n,a,t.action_refs,"action"),t.group_refs&&function(e,t,r,o,n,a){var i,l=a?s.STATES.VISIBLE:s.STATES.ENABLED,p=a?s.STATES.HIDDEN:s.STATES.DISABLED,u=a?s.STATES.ENABLED:s.STATES.HIDDEN,c=on(t.group_refs);try{for(c.s();!(i=c.n()).done;){var d=hn(i.value),f=On(o.panels,d);if(!0===e){if(d&&f!==l&&f!==u)Rn(o,d,l,n)&&Tn(o,d,l,n)}else if(d&&(a||!a&&f!==u)){Rn(o,d,p,n)&&Tn(o,d,p,n)}}}catch(e){c.e(e)}finally{c.f()}}(e,t,0,o,n,a)}function Sn(e,t,r,o,n,a,i,l){var p,u=a?s.STATES.VISIBLE:s.STATES.ENABLED,c=a?s.STATES.HIDDEN:s.STATES.DISABLED,d=a?s.STATES.ENABLED:s.STATES.HIDDEN,f="control"===l?o.controls:o.actions,h=on(i);try{for(h.s();!(p=h.n()).done;){var m=hn(p.value,r),y=On(f,m);if(Array.isArray(t.values)){var v,g=on(t.values);try{for(g.s();!(v=g.n()).done;){var E=v.value;fn(f,m,E,!0===e?u:c)}}catch(e){g.e(e)}finally{g.f()}}else!0===e?m&&y!==u&&y!==d&&dn(f,m,u,n):m&&(a||!a&&y!==d)&&An(o,m,c,f,n)}}catch(e){h.e(e)}finally{h.f()}}function Tn(e,t,r,o){if(o.panelTree[t.name]){var n,a=o.panelTree[t.name],i=on(a.panels);try{for(i.s();!(n=i.n()).done;){var l={name:n.value};dn(e.panels,l,r),Tn(e,l,r,o),r===s.STATES.ENABLED?Cn(l,o,s.CONDITION_TYPE.ENABLED,e):r===s.STATES.VISIBLE&&(e.panels[t.name].disabled&&yn(o.panelTree,e,t.name,!0),Cn(l,o,s.CONDITION_TYPE.ENABLED,e),Cn(l,o,s.CONDITION_TYPE.VISIBLE,e))}}catch(e){i.e(e)}finally{i.f()}var p,u=on(a.controls);try{for(u.s();!(p=u.n()).done;){In(e,t,r,o,{name:p.value},e.controls)}}catch(e){u.e(e)}finally{u.f()}var c,d=on(a.actions);try{for(d.s();!(c=d.n()).done;){In(e,t,r,o,{name:c.value},e.actions)}}catch(e){d.e(e)}finally{d.f()}}}function In(e,t,r,o,n,a){dn(a,n,r),r===s.STATES.ENABLED?(Cn(n,o,s.CONDITION_TYPE.ENABLED,e),Cn(n,o,s.CONDITION_TYPE.VISIBLE,e)):r===s.STATES.VISIBLE&&(En(n,e,o,s.CONDITION_TYPE.VISIBLE),Cn(n,o,s.CONDITION_TYPE.VISIBLE,e),e.panels[t.name].value===s.STATES.DISABLED?dn(a,n,s.STATES.DISABLED):Cn(n,o,s.CONDITION_TYPE.ENABLED,e))}function Cn(e,t,r,o){var n=t.getDefinitions(e,r,s.CONDITION_DEFINITION_INDEX.REFS);n.length>0&&bn(n,e,o,t,r)}function Rn(e,t,r,o,n){var a=t.name;if(!e.panels[a])return dn(e.panels,t,r),!0;var i=e.panels[a].value;return((i===s.STATES.ENABLED||i===s.STATES.VISIBLE)&&(r===s.STATES.DISABLED||r===s.STATES.HIDDEN)||i===s.STATES.DISABLED&&r===s.STATES.ENABLED||i===s.STATES.HIDDEN&&r===s.STATES.VISIBLE)&&(dn(e.panels,t,r),!0)}function An(e,t,r,o,n){var a=t.name;if(o[a]){var i=o[a].value;void 0!==t.col&&(o[a][t.col]&&void 0!==t.row&&o[a][t.col][t.row]?i=o[a][t.col][t.row].value:dn(o,t,r,n)),((i===s.STATES.ENABLED||i===s.STATES.VISIBLE)&&(r===s.STATES.DISABLED||r===s.STATES.HIDDEN)||i===s.STATES.DISABLED&&r===s.STATES.ENABLED||i===s.STATES.DISABLED&&r===s.STATES.HIDDEN||i===s.STATES.HIDDEN&&r===s.STATES.VISIBLE)&&dn(o,t,r,n)}else dn(o,t,r,n)}function kn(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 On(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 wn(e,t,r,n,a,i){var l=e.label&&e.label.text?e.label.text:n,p="required_"+n+"_"+a,u={params:n,definition:{validation:{id:p,fail_message:{type:"error",message:{default:o.formatMessage(i,s.MESSAGE_KEYS.REQUIRED_ERROR,{label:l})},focus_parameter_ref:n},evaluate:{condition:{parameter_ref:n,op:"isNotEmpty"}}}}};t.controls[n]?t.controls[n].push(u):t.controls[n]=[u],r.push(p)}function Nn(e,t,r,n,a){var i=Ke(e),l={params:r,definition:{validation:{id:"Format_"+r+"_"+n,fail_message:{type:"error",message:{default:o.formatMessage(a,s.MESSAGE_KEYS.DATETIME_FORMAT_ERROR,{role:e.role,format:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"isDateTime",value:e.role}}}}};t.controls[r]?t.controls[r].push(l):t.controls[r]=[l]}function Pn(e,t,r,n,a){var i=e.label&&e.label.text?e.label.text:r,l={params:r,definition:{validation:{id:"validField_"+r+"_"+n,fail_message:{type:"warning",message:{default:o.formatMessage(a,s.MESSAGE_KEYS.INVALID_FIELD_ERROR,{label:i})},focus_parameter_ref:r},evaluate:{condition:{parameter_ref:r,op:"colDoesExists"}}}},alwaysShow:!0};t.controls[r]?t.controls[r].push(l):t.controls[r]=[l]}function Dn(t,r,o){if(t.value)if("string"==typeof t.value)for(var n=0;n<r.length;n++){var a=r[n];if(a.name===t.value)return"type"===o?a.type:a.metadata[o]}else if("object"===e._typeof(t.value))for(var i=0;i<r.length;i++){var s=r[i];if(s.origName===t.value.field_name&&s.schema===t.value.link_ref)return"type"===o?s.type:s.metadata[o]}return null}var Ln=a._arrayMap,Mn=zo,xn=a._baseRest,Bn=jo,Fn=xn((function(e){var t=Ln(e,Bn);return t.length&&t[0]===e[0]?Mn(t):[]}));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(n,r);var o=Vn(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:O.default.createElement("span",null,this.props.messageInfo.text),t=O.default.createElement("div",{className:"icon"},O.default.createElement(h.Icon,{type:this.props.messageInfo.type})),r=this.props.inTable?O.default.createElement("div",{className:"properties-tooltips-container table-cell-msg-icon"},O.default.createElement(y,{id:"table-cell-msg-icon",tip:this.props.messageInfo.text,direction:"bottom",className:"properties-tooltips"},t)):null,o=s.classNames("properties-validation-message",this.props.messageInfo.type,{hide:this.props.state===s.STATES.HIDDEN||this.props.state===s.STATES.DISABLED,inTable:this.props.inTable});return O.default.createElement("div",{className:o},r,e)}}]),n}(O.default.Component),zn=Un,Hn={Y:"([1-9][0-9][0-9][0-9])",y:"([0-9][0-9])",m:"([0][1-9]|[1][0-2])",n:"([1-9]|[1-2][0-2])",d:"([0][1-9]|[1-2][0-9]|3[01])",j:"([1-9]|[1-2][0-9]|3[01])"};function jn(e,t){var r=new Date(e);if(!isNaN(r)){var o=r.getFullYear().toString(),n=(r.getMonth()+1).toString();1===n.length&&(n="0"+n);var a=r.getDate().toString();1===a.length&&(a="0"+a);var i=t;return i=(i=(i=(i=(i=(i=i.replace("Y",o)).replace("y",o.substring(2))).replace("m",n)).replace("n",parseInt(n,10))).replace("d",a)).replace("j",parseInt(a,10))}return e}function Gn(e,t){var r=new Date(e);if(!isNaN(r)){if(e instanceof Date)return r.toISOString();if("string"==typeof e&&e.trim().length>0&&t){var o=function(e){var t=e;return"^"+(t=(t=(t=(t=(t=(t=(t=t.replace("Y",Hn.Y)).replace("y",Hn.y)).replace("m",Hn.m)).replace("n",Hn.n)).replace("d",Hn.d)).replace("j",Hn.j)).replaceAll(".","[.]"))+"$"}(t),n=function(e,t,r){var o="",n="",a="",i=e.match(t);if(i){for(var s=1,l=0;l<r.length;l++){switch(r.charAt(l)){case"Y":case"y":o=i[s],s++;break;case"m":case"n":n=i[s],s++;break;case"d":case"j":a=i[s],s++}}return{year:o,month:n,day:a}}return null}(e,o,t),a=n.year,i=n.month,s=n.day;return new Date("".concat(a,"-").concat(i,"-").concat(s,"T00:00:00.00")).toISOString()}}return e}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)).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=Fn(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 t=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]&&(t=this.props.control.valueLabels[r])}if(null==t?t="":"object"===e._typeof(t)&&t.link_ref?t=o.stringifyFieldValue(t,this.props.control):Array.isArray(t)?t=t.join(", "):"boolean"==typeof t&&(t=t.toString()),t=qe(t),this.props.control.controlType===o.ControlType.CUSTOM)t=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===s.DATA_TYPE.TIMESTAMP){var n=new Date(t);t=S.isValid(n)?this.props.tableControl?O.default.createElement(u.FormattedDate,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}):O.default.createElement(u.FormattedDate,{value:n,day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric",weekday:"long"}):""}else if(this.props.control.controlType===o.ControlType.DATEPICKER)t=t?jn(t,this.props.control.dateFormat):"";else if(this.props.control.controlType===o.ControlType.DATEPICKERRANGE){t=[this.props.value&&this.props.value[0]?jn(this.props.value[0],this.props.control.dateFormat):"",this.props.value&&this.props.value[1]?jn(this.props.value[1],this.props.control.dateFormat):""].toString()}var a=O.default.createElement("span",{className:"properties-field-type",disabled:this.props.state===s.STATES.DISABLED},t),i=a;if(this.props.tableControl){var l=!0;t&&(l=!1);var p=a;this.props.control.icon&&(p=O.default.createElement("div",{className:"properties-field-readonly"},O.default.createElement("div",{className:"properties-field-type-icon"},O.default.createElement(h.Icon,{type:this.props.control.icon})),a)),i=O.default.createElement(v.TruncatedContentTooltip,{content:p,tooltipText:t,disabled:l})}return O.default.createElement("div",{className:s.classNames("properties-readonly",{hide:this.props.state===s.STATES.HIDDEN}),"data-id":ze(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,i,O.default.createElement(zn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),Kn=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)(Yn);function Wn(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 Xn=function(r){t._inherits(a,r);var n=Wn(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=He(t.control,t.controller.getMaxLengthForSingleLineControls()),r.uuid=m.v4(),r.id=Ue(t.propertyId,r.uuid),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=je(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,t=this.props.value?this.props.value:"",r=!1;if(this.isList){var n=Ge(t,", ");t=n.value,r=n.truncated}else r=0!==(t=qe(t)).length&&t.length!==this.props.value.length;var a=s.classNames("properties-textfield","properties-input-control",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),i=null;if(r){var p={text:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:s.TRUNCATE_LIMIT}),type:s.CONDITION_MESSAGE_TYPE.ERROR,validation_id:this.props.control.name};i=O.default.createElement("div",{className:"properties-textinput-readonly"},this.props.tableControl?null:this.props.controlItem,O.default.createElement(Kn,{control:this.props.control,propertyId:this.props.propertyId,controller:this.props.controller,tableControl:this.props.tableControl}),"// TODO this could conflict with the below ValidationMessage.",O.default.createElement(zn,{inTable:this.props.tableControl,state:"",messageInfo:p}))}else{var u=Ye(this.props.messageInfo,this.props.tableControl);i=O.default.createElement(l.TextInput,g._extends({},u,{autoComplete:!0===this.props.tableControl?"off":"on",id:this.id,disabled:this.props.state===s.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:t,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,ref:function(t){return e.textInputRef=t}}))}var c=i;if(this.props.tableControl){var d={};this.textInputRef&&(d.truncatedRef=this.textInputRef);var f=!0;t&&this.props.state!==s.STATES.DISABLED&&(f=!1),c=O.default.createElement(v.TruncatedContentTooltip,g._extends({},d,{content:i,tooltipText:t,disabled:f}))}return O.default.createElement("div",{className:a,"data-id":ze(this.props.propertyId)},c,O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),$n=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)(Xn);function Jn(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 Zn=function(r){t._inherits(a,r);var n=Jn(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)?O.default.createElement(P.default,{className:"bx--btn__icon",src:t}):O.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=O.default.createElement(l.Button,{kind:r,size:"small",onClick:this.onClick.bind(this),renderIcon:this.renderIcon.bind(this),iconDescription:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TOGGLETEXT_ICON_DESCRIPTION,{toggletext_label:this.props.value}),disabled:this.props.state===s.STATES.DISABLED},e));var n=s.classNames("properties-toggletext",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return O.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===s.STATES.DISABLED,"data-id":ze(this.props.propertyId)},this.props.tableControl?null:this.props.controlItem,t,O.default.createElement(zn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),Qn=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)(Zn);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 ta=function(r){t._inherits(a,r);var n=ea(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).reactIntl=t.controller.getReactIntl(),r.charLimit=He(t.control,t.controller.getMaxLengthForMultiLineControls()),r.uuid=m.v4(),r.id=Ue(r.props.propertyId,r.uuid),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=je(t,"\n")),this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=this.props.value?this.props.value:"",t=Ge(e,"\n");e=t.value;var r=t.truncated,n=null,a=Ye(this.props.messageInfo,this.props.tableControl),i=!1;if(a.warn&&(i=!0,a={}),r){var p={text:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TRUNCATE_LONG_STRING_ERROR,{truncate_limit:s.TRUNCATE_LIMIT}),type:s.CONDITION_MESSAGE_TYPE.ERROR,validation_id:this.props.control.name};a=Ye(p,this.props.tableControl),n=O.default.createElement("div",null,O.default.createElement(l.TextArea,g._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()&&this.props.control.light})),O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!i,state:"",messageInfo:p}))}else n=O.default.createElement(l.TextArea,g._extends({},a,{id:this.id,disabled:this.props.state===s.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()&&this.props.control.light}));var u=n;if(this.props.tableControl){var c=!0;e&&this.props.state!==s.STATES.DISABLED&&(c=!1);var d=O.default.createElement("div",{className:"properties-tooltips"},String(e));u=O.default.createElement(y,{id:"tooltip-column-textarea",tip:d,direction:"bottom",className:"properties-tooltips",disable:c},n)}var f=s.classNames("properties-textarea",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return O.default.createElement("div",{className:f,"data-id":ze(this.props.propertyId)},u,O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!i,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),ra=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)(ta);function oa(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 na=function(r){t._inherits(i,r);var n=oa(i);function i(r){var o;return e._classCallCheck(this,i),(o=n.call(this,r)).onDirection=o.onDirection.bind(t._assertThisInitialized(o)),o.generateNumber=o.generateNumber.bind(t._assertThisInitialized(o)),o.id=Ue(o.props.propertyId),o.reactIntl=r.controller.getReactIntl(),o}return e._createClass(i,[{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||!isFinite(e.target.value)){if(null===this.props.controller.getErrorMessage(this.props.propertyId)){var r={type:"error",text:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.INVALID_NUMBER_ERROR),propertyId:this.props.propertyId,validation_id:"invalid_number"};this.props.controller.updateErrorMessage(this.props.propertyId,r)}}else{null!==this.props.controller.getErrorMessage(this.props.propertyId)&&"invalid_number"===this.props.controller.getErrorMessage(this.props.propertyId).validation_id&&this.props.controller.updateErrorMessage(this.props.propertyId,null);var n=e.target.value;null==n||""===n?this.props.controller.updatePropertyValue(this.props.propertyId,null):this.props.controller.updatePropertyValue(this.props.propertyId,Number(n))}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===s.STATES.DISABLED,i=this.props.state===s.STATES.HIDDEN;a.has_1(this.props.control,"label.numberGenerator")&&(r=O.default.createElement(l.Button,{className:s.classNames("properties-number-generator",{hide:i}),onClick:this.generateNumber,disabled:n,kind:"tertiary",renderIcon:d.Shuffle16,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:this.props.control.label.numberGenerator.text,hasIconOnly:!0}));var p=s.classNames("properties-numberfield",{"numberfield-with-number-generator":a.has_1(this.props.control,"label.numberGenerator")?this.props.control.label.numberGenerator:null},{hide:i},this.props.messageInfo?this.props.messageInfo.type:null),u=Ye(this.props.messageInfo,this.props.tableControl);return O.default.createElement("div",{className:p,"data-id":ze(this.props.propertyId)},O.default.createElement(l.NumberInput,g._extends({},u,{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()&&this.props.control.light,hideSteppers:this.props.tableControl||this.props.control.controlType===o.ControlType.NUMBERFIELD})),r,O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),i}(O.default.Component),aa=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)(na),ia=a._baseFindIndex,sa=s._baseIteratee,la=C.toInteger_1,pa=Math.max;var ua=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var n=null==r?0:la(r);return n<0&&(n=pa(o+n,0)),ia(e,sa(t),n)};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)}}var da=function(r){t._inherits(n,r);var o=ca(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===s.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=[];return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((function(o){var n=t.getCustomButtonEnabled(e,o),a={action:o.id,enable:n};o.icon?a.iconEnabled=o.icon:o.carbonIcon&&(a.iconEnabled=t.customButtonIconCallback(o.id,o.carbonIcon)),o.label&&(a.label=o.label.text,a.incLabelWithIcon="before",a.kind="ghost"),o.description&&(a.tooltip=o.description.text),o.divider&&"before"===o.divider&&r.push({divider:!0}),r.push(a),o.divider&&"after"===o.divider&&r.push({divider:!0})})),r}},{key:"render",value:function(){var e={leftBar:this.convertToolbarConfig(this.props.tableState,this.props.customButtons)};return O.default.createElement("div",{className:"properties-custom-table-buttons"},O.default.createElement(C.Toolbar,{config:e,instanceId:0,size:"sm",toolbarActionHandler:this.customButtonOnClick}))}}]),n}(O.default.Component),fa=da;function ha(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 ma=function(r){t._inherits(i,r);var a=ha(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(),s.MESSAGE_KEYS.SUBPANEL_BUTTON_TOOLTIP),n=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.APPLYBUTTON_LABEL),a=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.REJECTBUTTON_LABEL);return O.default.createElement(ot,{ref:function(t){return e.subPanelInvoker=t},rightFlyout:this.props.rightFlyout,applyLabel:n,rejectLabel:a,controller:this.props.controller},O.default.createElement(y,{id:"tooltip-subpanel-cell",tip:r,direction:"left",className:"properties-tooltips icon-tooltip"},O.default.createElement(l.Button,{className:"properties-subpanel-button",kind:"ghost",renderIcon:d.Settings16,onClick:this.showSubPanel,disabled:t,iconDescription:r,hasIconOnly:!0})))}}]),i}(O.default.Component);function ya(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 va(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 va(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 va(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 ga(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 Ea=function(r){t._inherits(i,r);var a=ga(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)),o.isLightTheme=o.isLightTheme.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.uuid=m.v4(),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,s.UPDATE_TYPE.INITIAL_LOAD)}}},{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===s.SORT_DIRECTION.DESC&&t.reverse(),this.setCurrentControlValueSelected(t,[]))}},{key:"getOnPanelContainer",value:function(e){return 0===this.onPanelContainer.length||0===e.length||this.isSelectSummaryEdit(e)?O.default.createElement("div",null):O.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=ya(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===s.ROW_SELECTION.MULTIPLE&&e.length>1}},{key:"isReadonlyTable",value:function(){return this.props.control.controlType===o.ControlType.READONLYTABLE}},{key:"indexOfColumn",value:function(e){return ua(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===s.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=[],l=n>e?e:n;l<a;l++)i.push(l);r=i}this.updateRowSelections(r)}},{key:"updateSelectedRowsValues",value:function(){var e=this,t={name:this.selectSummaryPropertyName},r=this.props.controller.getControl({name:this.props.control.name}),a=this.props.controller.getPropertyValue(t);a&&Array.isArray(a)&&(a[0].forEach((function(t,n){if(null!==t&&!o.isEqual_1(t,e.selectedSummaryRowValue[0][n])){var a=void 0===t?null:t;e.props.selectedRows.forEach((function(t){e.props.controller.updatePropertyValue({name:e.props.control.name,row:t,col:n},a,!0)})),r.subControls[n].controlType===o.ControlType.ONEOFSELECT&&e.props.controller.updatePropertyValue({name:e.selectSummaryPropertyName,row:0,col:n},null)}})),this.selectedSummaryRowValue=n.cloneDeep_1(a))}},{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,l,p){var u={name:r,row:a,col:i},c=n.cloneDeep_1(this.props.propertyId),d=u;p||c.name===u.name||(d=this.props.controller.setChildPropertyId(c,u));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(),E=o.stringifyFieldValue(this.props.controller.getPropertyValue(d),e,!0);y.icon=o.getDMFieldIcon(g,E,e.dmImage)}return this.isReadonlyTable()?f=O.default.createElement("div",{className:s.classNames("properties-table-cell-control",v)},O.default.createElement(Kn,{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?p?f=O.default.createElement("div",null):(f=O.default.createElement("div",{className:s.classNames("properties-table-cell-control",v)},O.default.createElement(Kn,{control:this.props.controller.getControl(d),propertyId:d,controller:this.props.controller,tableControl:!0})),e.editStyle===o.EditStyle.ON_PANEL&&this.onPanelContainer[a].push(O.default.createElement("div",{key:i},O.default.createElement("br",null),m.createControlItem(e,d)))):(h.editStyle=o.EditStyle.INLINE,f=O.default.createElement("div",{className:s.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),resizable:e.resizable}}},{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===s.STATES.DISABLED||this.props.controller.getControlState(e)===s.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=ya(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:"isLightTheme",value:function(){return this.props.controller.getLight()&&this.props.control.light}},{key:"makeSelectedEditRow",value:function(e){if(e&&Array.isArray(e)&&e.length>1){var t=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.MULTI_SELECTED_ROW_LABEL),r=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.MULTI_SELECTED_ROW_ACTION),n=e.length+" "+t+" "+r,a=[],i=!1===this.props.control.header?[]:this.makeHeader([],[]),l=this.props.controller.getPropertyValue({name:this.selectSummaryPropertyName});this.makeCells(a,l,null,this.selectSummaryPropertyName,!0);var p=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return O.default.createElement("div",{className:"properties-at-selectedEditRows"},O.default.createElement("div",{className:"properties-selectedEditRows-title"},O.default.createElement("span",null,n)),O.default.createElement(v.FlexibleTable,{showHeader:!1,columns:i,data:a,rows:0,scrollKey:this.selectSummaryPropertyName,tableLabel:p,summaryTable:!0,rowSelection:s.ROW_SELECTION.MULTIPLE,light:this.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText}))}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(),s.MESSAGE_KEYS.STRUCTURETABLE_REMOVEBUTTON_LABEL),a=!this.state.enableRemoveIcon||e===s.STATES.DISABLED,i=!1;this.addOnClickCallback=t&&t.addButtonFunction?t.addButtonFunction:this.props.openFieldPicker;var p=t&&t.addButtonLabel?t.addButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL);return e===s.STATES.DISABLED&&(i=!0,this.addOnClickCallback=null),O.default.createElement("div",{className:"properties-at-buttons-container"},O.default.createElement(l.Button,{className:"properties-remove-fields-button",disabled:a,onClick:r,size:"small",kind:"ghost",renderIcon:d.TrashCan16},n),O.default.createElement(l.Button,{className:"properties-add-fields-button",disabled:i,onClick:this.addOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:d.Add16},p))}},{key:"makeEditButtonPanel",value:function(e,t){var r=null;return t&&t.editCallback&&(this.editOnClickCallback=t.editCallback,r=O.default.createElement("div",{className:"properties-at-buttons-container"},O.default.createElement(l.Button,{className:"properties-edit-button",onClick:this.editOnClick.bind(this,this.props.propertyId),size:"small",kind:"ghost",renderIcon:d.Edit16},t.label))),r}},{key:"makeCustomButtonsPanel",value:function(e,t){var r=null;return t&&(r=O.default.createElement("div",{className:"properties-at-buttons-container"},O.default.createElement(fa,{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)!==s.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)!==s.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=ya(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),l=!1!==this.props.control.header,p=this.props.value;this.makeCells(o,p,e);var u,c=this.props.control.rowSelection===s.ROW_SELECTION.MULTIPLE?this.makeSelectedEditRow(this.props.selectedRows):null,d=null;r?d=this.makeCustomButtonsPanel(e,r):this.isReadonlyTable()?this.props.hideEditButton||(d=this.makeEditButtonPanel(e,t)):this.props.addRemoveRows&&(d=this.makeAddRemoveButtonPanel(e,t)),Number.isInteger(this.scrollToRow)&&o.length>this.scrollToRow&&(u=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===s.ROW_SELECTION.SINGLE||(f=this.props.control.rowSelection===s.ROW_SELECTION.SINGLE?this.handleRowClick:this.updateRowSelections);var m=O.default.createElement(v.FlexibleTable,{sortable:n,filterable:a,columns:i,data:o,showHeader:l,scrollToRow:u,onFilter:this.onFilter,onSort:this.onSort,topRightPanel:d,selectedEditRow:c,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.isLightTheme(),emptyTablePlaceholder:this.props.control.additionalText});return O.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.controller.getControlState({name:this.props.control.name,col:n}),p=i===s.STATES.DISABLED||i===s.STATES.HIDDEN,u=a.controlType===o.ControlType.CHECKBOX?O.default.createElement(l.Checkbox,{disabled:p,id:"properties-at-header-cb-".concat(this.uuid,"-").concat(this.props.control.name,"=").concat(n),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:u,width:a.width,description:a.description?a.description.text:null,resizable:!!a.resizable&&a.resizable,operation:a.generatedValues&&a.generatedValues.operation?a.generatedValues.operation:null,disabled:p}),a.filterable&&t.push(a.name))}return this.props.control.childItem&&!this.isReadonlyTable()&&r.push({key:"subpanel",label:"",width:s.TABLE_SUBPANEL_BUTTON_WIDTH,staticWidth:!0}),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 p=0;p<this.props.control.subControls.length;p++){var u=this.props.control.subControls[p];if(u.visible||u.editStyle===o.EditStyle.ON_PANEL){var c=this._makeCell(u,t,i,s,p,r,a);u.visible&&l.push(c)}}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 l=this.props.buildUIItem(t,this.props.control.childItem,i,this.indexOfColumn),p=O.default.createElement("div",{className:"properties-table-subcell"},O.default.createElement(ma,{label:l.props.label,title:l.props.title,panel:l.props.panel,disabled:r===s.STATES.DISABLED,controller:this.props.controller,propertyId:this.props.propertyId,rightFlyout:this.props.rightFlyout}));return{column:"subpanel",width:s.TABLE_SUBPANEL_BUTTON_WIDTH,content:p}}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=0!==e.selectedRows.length;return t.enableRemoveIcon!==r?{enableRemoveIcon:r}:{}}}]),i}(O.default.Component);function ba(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)}}Ea.defaultProps={addRemoveRows:!0,hideEditButton:!1};var _a=function(r){t._inherits(a,r);var n=ba(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(),s.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 O.default.createElement("div",{className:"properties-empty-table",disabled:this.props.disabled},O.default.createElement("span",null,e),O.default.createElement("br",null),O.default.createElement(l.Button,{className:"properties-empty-table-button",kind:"tertiary",size:"small",renderIcon:this.isReadonlyTable()?d.Edit16:d.Add16,onClick:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled},this.props.emptyTableButtonLabel))}}]),a}(O.default.Component),Sa=_a;function Ta(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 Ia=function(r){t._inherits(a,r);var n=Ta(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=O.default.createElement("div",{className:"properties-mr-button-container"},t)}var r=O.default.createElement("table",{role:"presentation",className:"properties-mr-table-container"},O.default.createElement("tbody",null,O.default.createElement("tr",{className:s.classNames("properties-mr-table-content",{disabled:this.props.disabled})},O.default.createElement("td",null,this.props.tableContainer),O.default.createElement("td",null,e))));return O.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(),s.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_TOP_DESCRIPTION),p=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_UP_DESCRIPTION),u=O.default.createElement("div",{key:"topImages"},O.default.createElement(l.Button,{className:"table-row-move-button",onClick:this.topMoveRow,disabled:!r,kind:"ghost",renderIcon:d.UpToTop24,iconDescription:i,tooltipPosition:"left",hasIconOnly:!0}),O.default.createElement(l.Button,{className:"table-row-move-button",onClick:this.upMoveRow,disabled:!r,kind:"ghost",renderIcon:d.ArrowUp24,iconDescription:p,tooltipPosition:"left",hasIconOnly:!0})),c=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_DOWN_DESCRIPTION),f=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.MOVEABLE_TABLE_BUTTON_BOTTOM_DESCRIPTION);return[u,O.default.createElement("div",{key:"bottomImages"},O.default.createElement(l.Button,{className:"table-row-move-button",onClick:this.downMoveRow,disabled:!n,kind:"ghost",renderIcon:d.ArrowDown24,iconDescription:c,tooltipPosition:"left",hasIconOnly:!0}),O.default.createElement(l.Button,{className:"table-row-move-button",onClick:this.bottomMoveRow,disabled:!n,kind:"ghost",renderIcon:d.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 p=n[l-1];n[l-1]=n[l],n[l]=p,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?O.default.createElement(Sa,{control:this.props.control,controller:this.props.controller,emptyTableButtonLabel:this.props.emptyTableButtonLabel,emptyTableButtonClickHandler:this.props.emptyTableButtonClickHandler,disabled:this.props.disabled}):this.getMoveableTableRows()}}]),a}(O.default.Component);Ia.defaultProps={addRemoveRows:!0};var Ca=c.connect((function(e,t){return{disableRowMoveButtons:t.controller.isDisableRowMoveButtons(t.propertyId),addRemoveRows:t.controller.getAddRemoveRows(t.propertyId),tableButtons:t.controller.getTableButtons(t.propertyId)}}))(Ia);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=[o.Type.INTEGER,o.Type.DOUBLE,o.Type.LONG],ka=function(r){t._inherits(i,r);var n=Ra(i);function i(r){var o;return e._classCallCheck(this,i),(o=n.call(this,r)).addRow=o.addRow.bind(t._assertThisInitialized(o)),o.reactIntl=r.controller.getReactIntl(),o}return e._createClass(i,[{key:"addRow",value:function(){var e=this.props.controller.getControlPropType(this.props.propertyId),t=Aa.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 Aa.indexOf(r)>-1?O.default.createElement("div",{className:"properties-table-cell-control"},O.default.createElement(aa,{control:e,propertyId:t,controller:this.props.controller,controlItem:o,tableControl:!0})):O.default.createElement("div",{className:"properties-table-cell-control"},O.default.createElement($n,{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),p=void 0===r||0===r.length?"":r[0].label,u=this.makeCell({},i,l,p);a.push({key:n+"-0-value",column:"value",content:u}),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,s.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(),s.MESSAGE_KEYS.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.STRUCTURELISTEDITOR_REMOVEBUTTON_LABEL),addButtonFunction:this.addRow},n=this.makeRows(this.props.value,this.props.state,t),i=this.makeAddRemoveButtonPanel(this.props.state,r);Number.isInteger(this.scrollToRow)&&n.length>this.scrollToRow&&(e=this.scrollToRow,delete this.scrollToRow);var l=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",p=O.default.createElement(v.FlexibleTable,{columns:t,data:n,scrollToRow:e,topRightPanel:i,scrollKey:this.props.control.name,tableState:this.props.state,messageInfo:this.props.messageInfo,rows:this.props.control.rows,tableLabel:l,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),u=O.default.createElement("div",null,O.default.createElement("div",{className:"properties-list-table"},p),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo}));return O.default.createElement("div",{"data-id":ze(this.props.propertyId),className:"properties-list-control"},this.props.controlItem,O.default.createElement(Ca,{tableContainer:u,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===s.STATES.DISABLED,isEmptyTable:a.isEmpty_1(this.props.value),emptyTableButtonLabel:r.addButtonLabel,emptyTableButtonClickHandler:this.addRow}))}}]),i}(Ea);ka.propTypes={control:D.default.object.isRequired,propertyId:D.default.object.isRequired,controller:D.default.object.isRequired,controlItem:D.default.element,selectedRows:D.default.array,state:D.default.string,value:D.default.array,messageInfo:D.default.object,addRemoveRows:D.default.bool,tableButtons:D.default.object};var Oa=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)}}))(ka);function wa(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 Na=new RegExp("[0-9- _$]","g"),Pa=function(r){t._inherits(i,r);var n=wa(i);function i(r){var l;return e._classCallCheck(this,i),(l=n.call(this,r)).uuid=m.v4(),l.reactIntl=r.controller.getReactIntl(),l.valueColumn=o.formatMessage(l.reactIntl,s.MESSAGE_KEYS.EXPRESSION_VALUE_COLUMN),l.valueColumnDesc=o.formatMessage(l.reactIntl,s.MESSAGE_KEYS.EXPRESSION_VALUE_COLUMN_DESCRIPTION),l.recentUseCat=o.formatMessage(l.reactIntl,s.MESSAGE_KEYS.EXPRESSION_RECENTLY_USED),l.recentUseCatInfo={id:l.recentUseCat,locLabel:l.recentUseCat,field_columns:{field_column_info:{locLabel:o.formatMessage(l.reactIntl,s.MESSAGE_KEYS.EXPRESSION_RECENTLY_USED_COLUMN)},value_column_info:{locLabel:l.valueColumn,descLabel:l.valueColumnDesc}}},l.inCategories=Object.keys(r.functionList),l.fields=l._makeDatasetFields(r.controller.getDatasetMetadataFields(),r.controller.getExpressionInfo().fields),l.resources=a.get_1(r.controller.getExpressionInfo(),"resources",{}),l.state={fieldSelected:0,valueSelected:0,functionSelected:0,fieldTableSortSpec:null,valuesTableSortSpec:null,functionTableSortSpec:null,functionCategory:l.inCategories[0],selectedIndex:0,fieldCategory:"fields",currentFieldDataset:l.fields.field_table_info[0].field_value_groups},l.controller=r.controller,l.onFunctionCatChange=l.onFunctionCatChange.bind(t._assertThisInitialized(l)),l.onFieldCatChange=l.onFieldCatChange.bind(t._assertThisInitialized(l)),l.onFieldFilter=l.onFieldFilter.bind(t._assertThisInitialized(l)),l.onValueFilter=l.onValueFilter.bind(t._assertThisInitialized(l)),l.onFunctionFilter=l.onFunctionFilter.bind(t._assertThisInitialized(l)),l.language=r.language,l.onFieldTableClick=l.onFieldTableClick.bind(t._assertThisInitialized(l)),l.onFieldTableDblClick=l.onFieldTableDblClick.bind(t._assertThisInitialized(l)),l.onFunctionTableClick=l.onFunctionTableClick.bind(t._assertThisInitialized(l)),l.onFunctionTableDblClick=l.onFunctionTableDblClick.bind(t._assertThisInitialized(l)),l.onValueTableClick=l.onValueTableClick.bind(t._assertThisInitialized(l)),l.onValueTableDblClick=l.onValueTableDblClick.bind(t._assertThisInitialized(l)),l.sortTableRows=l.sortTableRows.bind(t._assertThisInitialized(l)),l.shouldQuoteField=l.shouldQuoteField.bind(t._assertThisInitialized(l)),l}return e._createClass(i,[{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?"'":"";this.shouldQuoteField(o.id)&&(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],n='"';if(o.values){var a=o.values[t].value,i="string"==typeof a?n+a+n:a;this.props.onChange(i)}else if(o.range){var s="string"==typeof o.range.min.value?n+o.range.min.value+n:o.range.min.value,l="string"==typeof o.range.max.value?n+o.range.max.value+n:o.range.max.value;this.props.onChange(0===t?s:l)}}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===s.SORT_DIRECTION.DESC&&i.reverse(),i}return e}},{key:"shouldQuoteField",value:function(e){return null!==e.match(Na)}},{key:"createContentObject",value:function(e){var t=!0;e&&(t=!1);var r=O.default.createElement("span",{className:"properties-expr-table-cell"},e),o=O.default.createElement(v.TruncatedContentTooltip,{content:r,tooltipText:e,disabled:t});return O.default.createElement("div",{className:"properties-table-cell-control"},o)}},{key:"_makeDatasetFields",value:function(e,t){var r,n,a=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FIELD_COLUMN),i=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FIELD_COLUMN_DESCRIPTION),l=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_STORAGE_COLUMN),p={id:"fields",locLabel:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FIELDS_DROPDOWN_TITLE),field_columns:{field_column_info:{locLabel:a,descLabel:i},value_column_info:{locLabel:this.valueColumn,descLabel:this.valueColumnDesc},additional_column_info:[{id:"storage",locLabel:l}]}},u={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})),u.field_value_groups.push(t)}));for(var c=0;c<t.field_categories.length;c++)"fields"===t.field_categories[c].id&&(r=c);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]=p:t.field_categories.unshift(p),void 0!==n?t.field_table_info[n]=u:t.field_table_info.unshift(u),t}},{key:"_makeFieldAndValuesContent",value:function(){var e=this,t=this._makeFieldDropdown(),r=[],n=[],i=["fieldName"],l=null,p=null;if(this.state.fieldCategory===this.recentUseCat)l=this.recentUseCatInfo,p={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&&(l=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&&(p=this.fields.field_table_info[c])}if(l&&(r.push({key:"fieldName",label:l.field_columns.field_column_info.locLabel,description:l.field_columns.field_column_info.descLabel,resizable:!0}),n.push({key:"values",label:l.field_columns.value_column_info.locLabel,description:l.field_columns.value_column_info.descLabel}),l.field_columns.additional_column_info))for(var d=0;d<l.field_columns.additional_column_info.length;d++)i.push(l.field_columns.additional_column_info[d].id),r.push({key:l.field_columns.additional_column_info[d].id,label:l.field_columns.additional_column_info[d].locLabel});var f=[],h=[];if(p&&p.field_value_groups)for(var m=0;m<p.field_value_groups.length;m++){var y=p.field_value_groups[m],g=[];(!this.state.fieldFilterText||0===this.state.fieldFilterText.length||y.id.toLowerCase().indexOf(this.state.fieldFilterText.toLowerCase())>-1)&&(g.push({column:"fieldName",content:this.createContentObject(y.id),value:y.id}),y.additional_column_entries&&this._makeAdditionalColumnsContent(y,g),f.push({columns:g,rowKey:m}),m===this.state.fieldSelected&&(h=this._makeValuesContent(y,h)))}var E=this.state.fieldSelected;null!==this.state.fieldTableSortSpec&&(E=(f=this.sortTableRows(f,this.state.fieldTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.fieldSelected})));var b=this.state.valueSelected;null!==this.state.valuesTableSortSpec&&(b=(h=this.sortTableRows(h,this.state.valuesTableSortSpec)).findIndex((function(t){return t.rowKey===e.state.valueSelected})));var _=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FIELDS_TABLE_LABEL),S=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_VALUES_TABLE_LABEL),T=a.get_1(this.resources,s.MESSAGE_KEYS.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL,o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FIELDS_EMPTY_TABLE_LABEL)),I=a.get_1(this.resources,s.MESSAGE_KEYS.EXPRESSION_VALUES_EMPTY_TABLE_LABEL,o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_VALUES_EMPTY_TABLE_LABEL));return O.default.createElement("div",{className:"properties-field-and-values-table-container"},t,O.default.createElement("div",{className:"properties-field-table-container"},O.default.createElement(v.FlexibleTable,{columns:r,data:f,sortable:i,filterable:["fieldName"],onFilter:this.onFieldFilter,rows:s.EXPRESSION_TABLE_ROWS,tableLabel:_,rowSelection:s.ROW_SELECTION.SINGLE,updateRowSelections:this.onFieldTableClick,selectedRows:[E],onRowDoubleClick:this.onFieldTableDblClick,onSort:this.setSortColumn.bind(this,"fieldTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:T})),O.default.createElement("div",{className:"properties-value-table-container"},O.default.createElement(v.FlexibleTable,{columns:n,data:h,sortable:["values"],filterable:["values"],onFilter:this.onValueFilter,rows:s.EXPRESSION_TABLE_ROWS,tableLabel:S,rowSelection:s.ROW_SELECTION.SINGLE,updateRowSelections:this.onValueTableClick,selectedRows:[b],onRowDoubleClick:this.onValueTableDblClick,onSort:this.setSortColumn.bind(this,"valuesTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:I})))}},{key:"_makeValuesContent",value:function(e,t){var r=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_MIN_LABEL),n=o.formatMessage(this.reactIntl,s.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 O.default.createElement("div",{className:"properties-expression-function-table-container"},t,r)}return O.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,p=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TABLE_SEARCH_HEADER),u={"close.menu":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)};return O.default.createElement("div",{className:"properties-expression-function-select"},O.default.createElement(l.Dropdown,{id:"properties-expression-function-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:r,onChange:this.onFunctionCatChange,translateWithId:function(e){return u[e]},titleText:p}))}},{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,p=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TABLE_SEARCH_HEADER),u={"close.menu":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU)};return O.default.createElement("div",{className:"properties-expression-field-select"},O.default.createElement(l.Dropdown,{id:"properties-expression-field-select-dropdown-"+this.uuid,light:this.props.controller.getLight(),label:i,items:a,onChange:this.onFieldCatChange,translateWithId:function(e){return u[e]},titleText:p}))}},{key:"_makeFunctionsTable",value:function(e){var t=this,r=[],n=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FUNCTION_COLUMN),i=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_RETURN_COLUMN);r.push({key:"function",label:n,width:73,resizable:!0}),r.push({key:"return",label:i,width:27});var l=this._buildFunctionTable(this.state.functionCategory),p=l.rows,u=this.state.functionSelected;null!==this.state.functionTableSortSpec&&(u=(p=this.sortTableRows(p,this.state.functionTableSortSpec)).findIndex((function(e){return e.rowKey===t.state.functionSelected})));var c=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FUNCTIONS_TABLE_LABEL),d=a.get_1(this.resources,s.MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS,o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_NO_FUNCTIONS));return O.default.createElement("div",{className:"properties-functions-table-container"},O.default.createElement("div",{className:"properties-functions-table"},O.default.createElement(v.FlexibleTable,{columns:r,data:p,sortable:["function","return"],filterable:["function"],onFilter:this.onFunctionFilter,rows:s.EXPRESSION_TABLE_ROWS,tableLabel:c,rowSelection:s.ROW_SELECTION.SINGLE,updateRowSelections:this.onFunctionTableClick,selectedRows:[u],onRowDoubleClick:this.onFunctionTableDblClick,onSort:this.setSortColumn.bind(this,"functionTable"),light:this.props.controller.getLight(),emptyTablePlaceholder:d})),O.default.createElement("div",{className:"properties-help-table-container"},l.helpContainer))}},{key:"_buildFunctionTable",value:function(e){var t={rows:[],helpContainer:O.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=[];if(!this.state.functionFilterText||0===this.state.functionFilterText.length||n.locLabel.toLowerCase().indexOf(this.state.functionFilterText.toLowerCase())>-1){var i=n.locReturnType?n.locReturnType:n.return_type;a.push({column:"function",content:this.createContentObject(n.locLabel),value:n.locLabel}),a.push({column:"return",content:this.createContentObject(i),value:i}),t.rows.push({columns:a,rowKey:o}),o===this.state.functionSelected&&(t.helpContainer=O.default.createElement("div",{className:"properties-function-help-text"},O.default.createElement("span",{className:"properties-function-help-command"},n.locLabel,":"),O.default.createElement("br",null),O.default.createElement("br",null),O.default.createElement("span",null,n.help)))}}return t}},{key:"render",value:function(){var e=this._makeFieldAndValuesContent(),t=this._makeFunctionsContent(),r=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FIELD_TAB),n=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_FUNCTIONS_TAB),a=null;return 0===this.state.selectedIndex?a=e:1===this.state.selectedIndex&&(a=t),O.default.createElement("div",{className:"properties-expression-selection-fieldOrFunction"},O.default.createElement("div",{className:"properties-expression-selection-content-switcher"},O.default.createElement(l.ContentSwitcher,{onChange:this.onSwitch.bind(this),selectedIndex:this.state.selectedIndex},O.default.createElement(l.Switch,{key:0,name:"expresson-builder-fields-tab",className:"expresson-builder-fields-tab",text:r}),O.default.createElement(l.Switch,{key:1,name:"expresson-builder-function-tab",className:"expresson-builder-function-tab",text:n}))),a)}}]),i}(O.default.Component);function Da(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 La=function(r){t._inherits(n,r);var o=Da(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="tooltip-expression-operator-".concat(o),a=O.default.createElement("div",{className:"properties-tooltips"},r.help);t.push(O.default.createElement("div",{className:"properties-operator-tooltip-container",key:"expression-operator-"+o},O.default.createElement(y,{id:n,tip:a,direction:"bottom",className:"properties-tooltips"},O.default.createElement(l.Button,{className:s.classNames("properties-operator-button",{first:o%2==0,second:!(o%2==0)}),size:"small",kind:"tertiary",onClick:e.onOperatorClick.bind(e,r.value)},O.default.createElement("div",{className:"properties-operator-button-label"},r.locLabel)))))})),O.default.createElement("div",{className:"properties-operator-container"},t)}return O.default.createElement("div",null)}},{key:"render",value:function(){var e=this._makeOperatorContent();return O.default.createElement("div",{className:"properties-expression-selection-operator"},e)}}]),n}(O.default.Component);function Ma(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 xa=function(r){t._inherits(n,r);var o=Ma(n);function n(){return e._classCallCheck(this,n),o.apply(this,arguments)}return e._createClass(n,[{key:"render",value:function(){var e=O.default.createElement(Pa,{controller:this.props.controller,onChange:this.props.onChange,functionList:this.props.functionList,language:this.props.language}),t=O.default.createElement(La,{controller:this.props.controller,onChange:this.props.onChange,operatorList:this.props.operatorList});return O.default.createElement("div",{className:"properties-expression-selection-container"},t,e)}}]),n}(O.default.Component);function Ba(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 Fa=function(r){t._inherits(a,r);var n=Ba(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.props.controller.getPropertyValue(this.props.propertyId),n=this.editor.getValue(),a=this.expressionSelectionPanel&&t&&this.expressionSelectionPanel.contains(t.relatedTarget);o.isEqual_1(r,n)&&a||this.props.controller.updatePropertyValue(this.props.propertyId,n,a)}},{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 p={anchor:{line:t.line,ch:t.ch+e.length+r},head:{line:t.line,ch:t.ch+e.length+r}};this.onSelectionChange([p])}},{key:"render",value:function(){var e=this,t=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.EXPRESSION_BUILDER_LABEL);return O.default.createElement("div",{className:"properties-expression-builder"},O.default.createElement(ui,{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}),O.default.createElement("div",{ref:function(t){return e.expressionSelectionPanel=t}},O.default.createElement(xa,{controller:this.props.controller,onChange:this.onChange,functionList:this.expressionInfo.functionCategories,operatorList:this.expressionInfo.operators,language:this.props.control.language})))}}]),a}(O.default.Component);function Va(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,za=function(r){t._inherits(a,r);var n=Va(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).buttonHandler=t.controller.getHandlers().buttonHandler||function(){return null},r.reactIntl=t.controller.getReactIntl(),r}return e._createClass(a,[{key:"render",value:function(){var e=this;return O.default.createElement("div",{className:"properties-expression-toggle"},O.default.createElement("div",{className:"properties-expression-toggle-absolute"},this.props.enableMaximize?O.default.createElement(l.Button,{className:"maximize",type:"button",size:"small",kind:"ghost",renderIcon:d.Maximize16,hasIconOnly:!0,iconDescription:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_MAXIMIZE_LABEL),onClick:function(){!e.buttonHandler({type:"maximize_tearsheet",propertyId:e.props.control.data||{}})&&e.props.control.data&&e.props.control.data.tearsheet_ref&&e.props.controller.setActiveTearsheet(e.props.control.data.tearsheet_ref)}}):O.default.createElement(l.Button,{type:"button",className:"minimize",size:"small",kind:"ghost",hasIconOnly:!0,renderIcon:d.Minimize16,iconDescription:o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.EXPRESSION_MINIMIZE_LABEL),onClick:function(){return e.props.controller.clearActiveTearsheet()}})))}}]),a}(O.default.Component),Ha=u.injectIntl(za);function ja(e,t){for(var r=e.length,o=0;o<r;++o)t(e[o])}function Ga(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){ja(Wa,n),ja(Ka,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:Ua.Pos(n.line,a.start),to:Ua.Pos(n.line,a.end)}}function qa(e){return Ga(e,0,(function(e,t){return e.getTokenAt(t)}))}var Ya,Ka="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(" "),Wa="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 Xa(e,t){for(var r=e.length,o=0;o<r;++o)t(e[o])}function $a(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){Xa(ei,n),Xa(Qa,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:Ya.Pos(n.line,a.start),to:Ya.Pos(n.line,a.end)}}function Ja(e){return $a(e,0,(function(e,t){return e.getTokenAt(t)}))}var Za,Qa="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("|"),ei="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 ti="@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 ri(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=Za.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:oi(a,t),from:Za.Pos(n.line,a.start),to:Za.Pos(n.line,a.end)}}(e,ti,(function(e,t){return e.getTokenAt(t)}))}function oi(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 ni(){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 p=i.current();return-1!==e.indexOf(p)?"keyword":"variable"}return{startState:function(){return{tokenize:null}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||i)(e,t)},electricChars:"{}"}}function ai(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 ii(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 ii(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 ii(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 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 li=null;"undefined"!=typeof window&&void 0!==window.navigator&&(li=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){(Ua=e).registerHelper("hint","python",qa)}(li),function(e){(Ya=e).registerHelper("hint","r",Ja)}(li),function(e){(Za=e).registerHelper("hint","CLEM",ri),Za.defineMode("CLEM",ni),Za.defineMIME("text/x-CLEM","CLEM")}(li));var pi=function(r){t._inherits(i,r);var n=si(i);function i(r){var o;return e._classCallCheck(this,i),(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,s.DEFAULT_VALIDATION_MESSAGE))},o}return e._createClass(i,[{key:"componentDidUpdate",value:function(e){var t=this;this.props.selectionRange&&this.props.selectionRange.length>0&&!o.isEqual_1(e.selectionRange,this.props.selectionRange)&&this.editor&&(this.props.selectionRange.forEach((function(e){t.editor.setSelection(e.anchor,e.head)})),this.editor.focus())}},{key:"componentWillUnmount",value:function(){this.origHint&&li&&li.registerHelper("hint",this.props.control.language,this.origHint)}},{key:"getDatasetFields",value:function(){var e,t=[],r=ai(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"}li&&li.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}),e.editor.display.input.blur()}))}},{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&&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:s.CONDITION_MESSAGE_TYPE.INFO;r===s.CONDITION_MESSAGE_TYPE.SUCCESS&&(t=null);var n=this.props.state===s.STATES.DISABLED?"disabled":r,i=this.props.controller.getReactIntl(),p=this._showBuilderButton()?O.default.createElement(l.Button,{kind:"ghost",size:"small",className:"properties-expression-button",disabled:this.props.state===s.STATES.DISABLED,onClick:this.showExpressionBuilder,renderIcon:d.Calculator24,iconDescription:o.formatMessage(i,s.MESSAGE_KEYS.EXPRESSION_BUILDER_ICON_DESCRIPTION),tooltipPosition:"right",hasIconOnly:!0}):null,u=null;this.state.validateIcon&&(u=O.default.createElement("div",{className:"icon validateIcon"},O.default.createElement(h.Icon,{type:this.state.validateIcon,className:"properties-validation-icon-".concat(this.state.validateIcon)})));var c=this.state.validationInProgress?o.formatMessage(i,s.MESSAGE_KEYS.EXPRESSION_VALIDATING_LABEL):o.formatMessage(i,s.MESSAGE_KEYS.EXPRESSION_VALIDATE_LABEL),f=this.hasValidate()&&this.props.validateLink?O.default.createElement("div",{className:"properties-expression-validate",disabled:this.props.state===s.STATES.DISABLED},O.default.createElement(l.Button,{className:"validateLink",kind:"ghost",onClick:this.handleValidate,disabled:this.props.state===s.STATES.DISABLED||this.state.validationInProgress},c),u):null,m={mode:this.props.control.language,placeholder:this.props.control.additionalText,theme:n+" custom",readOnly:this.props.state===s.STATES.DISABLED&&"nocursor",extraKeys:{"Ctrl-Space":"autocomplete"},autoRefresh:!0,lineNumbers:!0},y=o.formatMessage(i,s.MESSAGE_KEYS.APPLYBUTTON_LABEL),v=o.formatMessage(i,s.MESSAGE_KEYS.REJECTBUTTON_LABEL),g=o.formatMessage(i,s.MESSAGE_KEYS.EXPRESSION_BUILDER_TITLE),E=this.state.showExpressionBuilder?O.default.createElement(Ve,{cancelHandler:this.cancelExpressionBuilder,okHandler:this.hideExpressionBuilder,show:this.state.showExpressionBuilder,applyLabel:y,rejectLabel:v,title:g,light:this.props.controller.getLight()&&this.props.control.light},O.default.createElement("div",null,O.default.createElement(Fa,{control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId}))):null,b=s.classNames("properties-expression-editor ".concat(r),{"properties-light-disabled":!this.props.control.light||!this.props.controller.getLight()}),_=O.default.createElement("div",{className:"properties-expression-link-container"},p,f),S=_;this.props.expressionLabel&&(S=O.default.createElement("div",{className:"properties-expression-header"},O.default.createElement("div",{className:"properties-expression-title"},this.props.expressionLabel),_));var T=null;if(this.props.control.enableMaximize){var I=this.props.controller.getActiveTearsheet()===a.get_1(this,"props.control.data.tearsheet_ref");T=O.default.createElement(Ha,{control:this.props.control,controller:this.props.controller,enableMaximize:!I})}return O.default.createElement("div",{className:"properties-expression-editor-wrapper"},this.props.controlItem,E,O.default.createElement("div",{className:"properties-editor-container"},S,T,O.default.createElement("div",{ref:function(t){return e.expressionEditorDiv=t},"data-id":ze(this.props.propertyId),className:b},O.default.createElement(R.UnControlled,{ref:function(t){return e.codeMirror=t},options:m,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,editorDidMount:this.editorDidMount,value:this.props.value}),O.default.createElement(zn,{state:this.props.state,messageInfo:t,inTable:this.props.tableControl}))))}}]),i}(O.default.Component);pi.defaultProps={builder:!0,validateLink:!0};var ui=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)(pi);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 di=function(r){t._inherits(a,r);var n=ci(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).id=Ue(r.props.propertyId),r}return e._createClass(a,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e.target.value)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".passwordShow.tooltip"),t="".concat(this.props.control.name,".passwordHide.tooltip"),r=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.SHOW_PASSWORD_TOOLTIP),n=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.HIDE_PASSWORD_TOOLTIP),a=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),p=this.props.value?this.props.value:"",u=s.classNames("properties-pwdfield","properties-input-control",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),c=Ye(this.props.messageInfo,this.props.tableControl);return O.default.createElement("div",{className:u,"data-id":ze(this.props.propertyId)},O.default.createElement(l.PasswordInput,g._extends({},c,{autoComplete:"off",id:this.id,disabled:this.props.state===s.STATES.DISABLED,placeholder:this.props.control.additionalText,onChange:this.handleChange.bind(this),value:p,labelText:this.props.controlItem,hideLabel:this.props.tableControl,light:this.props.controller.getLight()&&this.props.control.light,tooltipAlignment:"end",showPasswordLabel:a,hidePasswordLabel:i})),O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),fi=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)(di);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(n,r);var o=hi(n);function n(r){var a;if(e._classCallCheck(this,n),(a=o.call(this,r)).id=Ue(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=S.parse(a.value,s.DEFAULT_DATE_FORMAT,new Date);S.isValid(i)&&(a.value=S.format(i,a.getDateFormat()))}else a.value="";return a}return e._createClass(n,[{key:"getDateFormat",value:function(){var e=this.props.control.dateFormat||s.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=S.parse(e.target.value,this.getDateFormat(),new Date);t=S.isValid(r)?S.format(r,s.DEFAULT_DATE_FORMAT):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=s.classNames("properties-datefield","properties-input-control",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Ye(this.props.messageInfo,this.props.tableControl);return O.default.createElement("div",{className:e,"data-id":ze(this.props.propertyId)},O.default.createElement(l.TextInput,g._extends({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===s.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()&&this.props.control.light})),O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),n}(O.default.Component),yi=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)(mi);function vi(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 gi=function(r){t._inherits(n,r);var o=vi(n);function n(r){var a;return e._classCallCheck(this,n),(a=o.call(this,r)).id=Ue(r.propertyId),a.locale=r.controller.getLocale(),a.dateFormat=Ke(r.control),a.state={value:r.value?jn(r.value,a.dateFormat):""},a.getDatepickerSize=a.getDatepickerSize.bind(t._assertThisInitialized(a)),a}return e._createClass(n,[{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleChange",value:function(e){if(e.length>0){var t=Gn(e[0]),r=jn(e[0],this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,t),this.setState({value:r})}else this.props.controller.updatePropertyValue(this.props.propertyId,""),this.setState({value:""})}},{key:"handleInputChange",value:function(e){var t=e.target.value;this.setState({value:t})}},{key:"render",value:function(){var e=this.props.controller.getResource("".concat(this.props.control.name,".helper"),null),t=s.classNames("properties-datepicker","properties-input-control",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),r=Ye(this.props.messageInfo,this.props.tableControl);return O.default.createElement("div",{className:t,"data-id":ze(this.props.propertyId)},O.default.createElement(l.DatePicker,{className:"properties-datepicker-wrapper-parent",datePickerType:s.DATEPICKER_TYPE.SINGLE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleChange.bind(this),locale:this.locale},O.default.createElement(l.DatePickerInput,g._extends({},r,{id:this.id,className:"properties-datepicker-wrapper-input",placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&this.props.controlItem,disabled:this.props.state===s.STATES.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputChange.bind(this),value:this.state.value,helperText:!this.props.tableControl&&e}))),O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),n}(O.default.Component),Ei=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)(gi);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 _i=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)).reactIntl=r.controller.getReactIntl(),o.id=Ue(o.props.propertyId),o.locale=r.controller.getLocale(),o.uuid=m.v4(),o.dateFormat=Ke(r.control),o.state={valueStart:r.value&&r.value[0]?jn(r.value[0],o.dateFormat):"",valueEnd:r.value&&r.value[1]?jn(r.value[1],o.dateFormat):""},o.getDatepickerSize=o.getDatepickerSize.bind(t._assertThisInitialized(o)),o.createInfoDesc=o.createInfoDesc.bind(t._assertThisInitialized(o)),o}return e._createClass(a,[{key:"onStartBlur",value:function(e){var t=Gn(e.target.value,this.dateFormat),r=Gn(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"onEndBlur",value:function(e){var t=Gn(e.target.value,this.dateFormat),r=Gn(this.state.valueEnd,this.dateFormat);this.props.controller.updatePropertyValue(this.props.propertyId,[t,r])}},{key:"getDatepickerSize",value:function(){return this.props.tableControl?"sm":"md"}},{key:"handleDateRangeChange",value:function(e){if(e[0]){var t=Gn(e[0]),r=jn(e[0],this.dateFormat),o="",n="";e[1]&&(o=Gn(e[1]),n=jn(e[1],this.dateFormat)),this.props.controller.updatePropertyValue(this.props.propertyId,[t,o]),this.setState({valueStart:r,valueEnd:n})}}},{key:"handleInputStartChange",value:function(e){this.setState({valueStart:e.target.value})}},{key:"handleInputEndChange",value:function(e){this.setState({valueEnd:e.target.value})}},{key:"createInfoDesc",value:function(e,t,r){return t?O.default.createElement("div",{className:"properties-label-container"},e,O.default.createElement(y,{id:"".concat(this.uuid,"-tooltip-label-").concat(this.props.control.name,"-").concat(r),tip:t,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:this.props.state===s.STATES.DISABLED,showToolTipOnClick:!0},O.default.createElement(h.Icon,{type:s.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"}))):e}},{key:"render",value:function(){var e="".concat(this.props.control.name,".range.start.label"),t="".concat(this.props.control.name,".range.start.desc"),r="".concat(this.props.control.name,".range.start.helper"),n="".concat(this.props.control.name,".range.end.label"),a="".concat(this.props.control.name,".range.end.desc"),i="".concat(this.props.control.name,".range.end.helper"),p=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DATEPICKER_RANGE_START_LABEL),u=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DATEPICKER_RANGE_END_LABEL),c=this.props.controller.getResource(e,p),d=this.props.controller.getResource(t,null),f=this.props.controller.getResource(r,null),h=this.props.controller.getResource(n,u),m=this.props.controller.getResource(a,null),y=this.props.controller.getResource(i,null);c=this.createInfoDesc(c,d,"start"),h=this.createInfoDesc(h,m,"end");var v=s.classNames("properties-datepicker-range","properties-input-control",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),E=Ye(this.props.messageInfo,this.props.tableControl);return O.default.createElement("div",{className:v,"data-id":ze(this.props.propertyId)},O.default.createElement(l.DatePicker,{datePickerType:s.DATEPICKER_TYPE.RANGE,dateFormat:this.dateFormat,light:this.props.controller.getLight()&&this.props.control.light,onChange:this.handleDateRangeChange.bind(this),locale:this.locale,allowInput:!0},O.default.createElement(l.DatePickerInput,g._extends({},E,{id:"".concat(this.id,"-start"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&c,disabled:this.props.state===s.STATES.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputStartChange.bind(this),value:this.state.valueStart,onBlur:this.onStartBlur.bind(this),helperText:!this.props.tableControl&&f})),O.default.createElement(l.DatePickerInput,g._extends({},E,{id:"".concat(this.id,"-end"),placeholder:this.props.control.additionalText,labelText:!this.props.tableControl&&h,disabled:this.props.state===s.STATES.DISABLED,size:this.getDatepickerSize(),onChange:this.handleInputEndChange.bind(this),value:this.state.valueEnd,onBlur:this.onEndBlur.bind(this),helperText:!this.props.tableControl&&y}))),O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),Si=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)(_i);function Ti(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 Ii=function(r){t._inherits(n,r);var o=Ti(n);function n(r){var a;if(e._classCallCheck(this,n),(a=o.call(this,r)).id=Ue(r.propertyId),a.value=r.value,a.value){var i=S.parse(a.value,"HH:mm:ss:xxx",new Date);S.isValid(i)&&(a.value=S.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||s.DEFAULT_TIME_FORMAT}},{key:"handleChange",value:function(e){var t=null;if(this.value="",e.target.value){this.value=e.target.value;var r=S.parse(e.target.value,this.getTimeFormat(),new Date);t=S.isValid(r)?S.format(r,"HH:mm:ss:xxx"):e.target.value}this.props.controller.updatePropertyValue(this.props.propertyId,t)}},{key:"render",value:function(){var e=s.classNames("properties-timefield","properties-input-control",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),t=Ye(this.props.messageInfo,this.props.tableControl);return O.default.createElement("div",{className:e,"data-id":ze(this.props.propertyId)},O.default.createElement(l.TextInput,g._extends({},t,{autoComplete:"off",id:this.id,disabled:this.props.state===s.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()&&this.props.control.light})),O.default.createElement(zn,{inTable:this.props.tableControl,tableOnly:!0,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),n}(O.default.Component),Ci=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)(Ii);function Ri(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 Ai=function(r){t._inherits(n,r);var o=Ri(n);function n(t){var r;return e._classCallCheck(this,n),(r=o.call(this,t)).id=Ue(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="tooltip-"+this.props.control.name,r="";this.props.control.description&&this.props.state!==s.STATES.DISABLED&&this.props.state!==s.STATES.HIDDEN&&!this.props.tableControl&&(r=O.default.createElement("span",null,this.props.control.description.text),this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId));var o=a.isEmpty_1(r)?"":O.default.createElement(y,{id:t,tip:r,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0},O.default.createElement(h.Icon,{type:s.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"})),n=O.default.createElement("span",{className:"properties-checkbox-label"},e);return O.default.createElement("div",{className:s.classNames("properties-checkbox",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null),"data-id":ze(this.props.propertyId)},O.default.createElement(l.Checkbox,{disabled:this.props.state===s.STATES.DISABLED,id:this.id,labelText:n,onChange:this.handleChange.bind(this),checked:Boolean(this.props.value),hideLabel:this.props.tableControl}),o,O.default.createElement(zn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.controller.getErrorMessage(this.props.propertyId)}))}}]),n}(O.default.Component),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)}}),null)(Ai);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 wi=function(r){t._inherits(a,r);var n=Oi(a);function a(t){var r;return e._classCallCheck(this,a),(r=n.call(this,t)).id=Ue(r.props.propertyId),r}return e._createClass(a,[{key:"handleChange",value:function(e){this.props.controller.updatePropertyValue(this.props.propertyId,e)}},{key:"render",value:function(){var e="".concat(this.props.control.name,".toggle.on.label"),t="".concat(this.props.control.name,".toggle.off.label"),r=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TOGGLE_ON_LABEL),n=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.TOGGLE_OFF_LABEL),a=this.props.controller.getResource(e,r),i=this.props.controller.getResource(t,n),p=this.props.tableControl?"sm":"md",u=O.default.createElement(l.Toggle,{id:this.id,size:p,disabled:this.props.state===s.STATES.DISABLED,toggled:Boolean(this.props.value),labelB:a,labelA:i,onToggle:this.handleChange.bind(this),labelText:this.props.tableControl?null:this.props.controlItem}),c=s.classNames("properties-toggle",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null);return O.default.createElement("div",{className:c,"data-id":ze(this.props.propertyId)},u,O.default.createElement(zn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo}))}}]),a}(O.default.Component),Ni=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)(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 Di=function(r){t._inherits(i,r);var n=Pi(i);function i(r){var o;return e._classCallCheck(this,i),(o=n.call(this,r)).uuid=m.v4(),o.handleChange=o.handleChange.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o}return e._createClass(i,[{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=Fn(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.state===s.STATES.HIDDEN,t=this.props.value;null==t&&(t=[]);for(var r=[],o=0;o<this.props.control.values.length;o++){var n=this.props.control.values[o],i=this.props.state===s.STATES.DISABLED||!this.props.controlOpts.values.includes(n),p=null;if(Array.isArray(this.props.control.valueDescs)&&!a.isEmpty_1(this.props.control.valueDescs[o])&&!this.props.tableControl){var u=O.default.createElement("span",null,this.props.control.valueDescs[o]);p=O.default.createElement(y,{id:"tooltip-".concat(o),tip:u,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:e||i},O.default.createElement(d.Information16,{disabled:i,className:"properties-control-description-icon-info"}))}var c={name:this.props.propertyId.name,row:o},f=t.indexOf(n)>=0;r.push(O.default.createElement("div",{className:"properties-checkbox-tooltip-container",key:Ue(c,this.uuid)},O.default.createElement(l.Checkbox,{disabled:i,id:Ue(c,this.uuid),key:n+o,labelText:this.props.control.valueLabels[o],onChange:this.handleChange.bind(this,n),checked:f}),p))}return O.default.createElement("fieldset",null,O.default.createElement("legend",null,this.props.controlItem),O.default.createElement("div",{className:s.classNames("properties-checkboxset",{hide:this.props.state===s.STATES.HIDDEN}),"data-id":ze(this.props.propertyId)},O.default.createElement("div",{className:s.classNames("properties-checkboxset-container",this.props.messageInfo?this.props.messageInfo.type:null)},r),O.default.createElement(zn,{inTable:this.props.tableControl,state:this.props.state,messageInfo:this.props.messageInfo})))}}]),i}(O.default.Component),Li=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)(Di);function Mi(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 xi(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 xi(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 xi(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 Fi=function(r){t._inherits(i,r);var n=Bi(i);function i(r){var o;return e._classCallCheck(this,i),(o=n.call(this,r)).uuid=m.v4(),o.handleChange=o.handleChange.bind(t._assertThisInitialized(o)),o.updateValueFromFilterEnum=o.updateValueFromFilterEnum.bind(t._assertThisInitialized(o)),o}return e._createClass(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,s.UPDATE_TYPE.INITIAL_LOAD);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++){var n=t.values[o];dn(r,{name:n},t.values[o]===e?s.STATES.ENABLED:s.STATES.DISABLED,n)}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]});Tn(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,t){if(null!==this.props.value&&void 0!==this.props.value&&!this.props.controlOpts.values.includes(this.props.value)){var r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)&&(r=this.props.control.valueDef.defaultValue),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{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===s.STATES.DISABLED}},{key:"handleCheckedDisabled",value:function(e,t){if(null!=e&&t&&this.props.state!==s.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=Mi(o.values);try{for(i.s();!(a=i.n()).done;){var l=a.value;if(l!==e&&!this.isRadioButtonDisabled(l)){r=l;break}}}catch(e){i.e(e)}finally{i.f()}}r&&this.props.controller.updatePropertyValue(this.props.propertyId,r)}}},{key:"render",value:function(){var e=this.props.state===s.STATES.DISABLED,t=this.props.state===s.STATES.HIDDEN;this.props.control.values||"radioset"!==this.props.control.controlType||(this.props.control.values=[!0,!1],this.props.control.valueLabels=["true","false"]);for(var r=[],n=this.props.controlOpts,i=0;i<n.values.length;i++){var p=null;if(Array.isArray(this.props.control.valueDescs)&&!a.isEmpty_1(this.props.control.valueDescs[i])&&!this.props.tableControl){var u=O.default.createElement("span",null,this.props.control.valueDescs[i]);p=O.default.createElement(y,{id:"tooltip-".concat(i),tip:u,direction:"bottom",className:"properties-tooltips",showToolTipOnClick:!0,disable:t||e},O.default.createElement(d.Information16,{disabled:e,className:"properties-control-description-icon-info"}))}var c=n.values[i]===this.props.value,f="boolean"===this.props.control.valueDef.propType?String(n.values[i]):n.values[i],h=this.isRadioButtonDisabled(f),m=this.getOptionalPanel(f),v={name:this.props.propertyId.name,row:i};r.push(O.default.createElement("div",{key:i,className:"properties-radioset-panel"},O.default.createElement("div",{className:"properties-radioset-tooltip"},O.default.createElement(l.RadioButton,{key:i,id:Ue(v,this.uuid),disabled:e||h,labelText:n.valueLabels[i],value:f,onChange:this.handleChange,checked:c}),p),m))}return O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:s.classNames("properties-radioset ",{hide:this.props.state===s.STATES.HIDDEN})},O.default.createElement("div",{className:s.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===s.STATES.DISABLED},r),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(O.default.Component),Vi=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)(Fi);function Ui(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 zi(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 zi(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 zi(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 ji=function(r){t._inherits(i,r);var n=Hi(i);function i(r){var o;if(e._classCallCheck(this,i),(o=n.call(this,r)).reactIntl=r.controller.getReactIntl(),o.emptyLabel="...",o.disableEmptyListDropdown=!1,a.isEmpty_1(r.controlOpts)){var s="".concat(o.props.control.name,".emptyList.placeholder"),l=r.controller.getResource(s);l&&(o.emptyLabel=l,o.disableEmptyListDropdown=!0)}else r.control.additionalText&&(o.emptyLabel=r.control.additionalText);return o.id=Ue(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(i,[{key:"componentDidMount",value:function(){this.updateValueFromFilterEnum(!0,s.UPDATE_TYPE.INITIAL_LOAD)}},{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)&&r||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=Ui(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=Ui(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,t){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 r=null;this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&this.props.controlOpts.values.includes(this.props.control.valueDef.defaultValue)?r=this.props.control.valueDef.defaultValue:this.props.control.customValueAllowed&&this.props.value&&(r=this.props.value),this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}}},{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,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU),"clear.selection":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARSELECTION)},r=null,n=Ye(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(O.default.createElement(l.SelectItem,{text:this.emptyLabel,key:this.id,value:""}));var p,u=Ui(e.options);try{for(u.s();!(p=u.n()).done;){var c=p.value;a.push(O.default.createElement(l.SelectItem,{text:c.label,key:this.id+"-"+c.value,value:c.value}))}}catch(e){u.e(e)}finally{u.f()}r=O.default.createElement(l.Select,{id:this.id,hideLabel:!0,inline:!0,labelText:this.props.control.label?this.props.control.label.text:"",disabled:this.props.state===s.STATES.DISABLED||this.disableEmptyListDropdown,onChange:this.handleChange,value:i,light:this.props.controller.getLight()&&this.props.control.light},a)}else r=this.props.control.customValueAllowed?O.default.createElement(l.ComboBox,g._extends({},n,{ariaLabel:this.props.control.label?this.props.control.label.text:"",id:"".concat(ze(this.props.propertyId),"-dropdown"),disabled:this.props.state===s.STATES.DISABLED||this.disableEmptyListDropdown,placeholder:e.selectedOption.label,selectedItem:e.selectedOption.label,items:e.options,onChange:this.handleComboOnChange,onInputChange:this.handleOnInputChange,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem})):O.default.createElement(l.Dropdown,g._extends({},n,{id:"".concat(ze(this.props.propertyId),"-dropdown"),disabled:this.props.state===s.STATES.DISABLED||this.disableEmptyListDropdown,type:"default",items:e.options,onChange:this.handleChange,selectedItem:e.selectedOption,label:this.emptyLabel,light:this.props.controller.getLight()&&this.props.control.light,translateWithId:function(e){return t[e]},titleText:this.props.controlItem}));return O.default.createElement("div",{"data-id":ze(this.props.propertyId),className:s.classNames("properties-dropdown",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},r,O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl,tableOnly:!0}))}}]),i}(O.default.Component),Gi=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)(ji);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(i,r);var n=qi(i);function i(r){var o;return e._classCallCheck(this,i),(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(i,[{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.id===t})))})),n}},{key:"genSelectOptions",value:function(e){for(var t=[],r=0;r<this.props.controlOpts.values.length;r++)t.push({id: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=Fn(this.props.value,this.props.controlOpts.values);o.isEqual_1(t,this.props.value)||(a.isEmpty_1(t)&&this.props.control.valueDef&&this.props.control.valueDef.defaultValue&&(t=Fn(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].id);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,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLOSEMENU),"open.menu":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_OPENMENU),"clear.all":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARALL),"clear.selection":o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.DROPDOWN_TOOLTIP_CLEARSELECTION)},r="".concat(this.props.control.name,".multiselect.dropdown.empty.label"),n=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.MULTISELECT_DROPDOWN_EMPTY_LABEL),a="".concat(this.props.control.name,".multiselect.dropdown.options.selected.label"),i=o.formatMessage(this.reactIntl,s.MESSAGE_KEYS.MULTISELECT_DROPDOWN_OPTIONS_SELECTED_LABEL),p="";p=0===e.selectedOptions.length?this.props.controller.getResource(r,n):this.props.controller.getResource(a,i);var u=Ye(this.props.messageInfo,this.props.tableControl),c=null;return c=this.props.control.filterable?O.default.createElement(l.FilterableMultiSelect,g._extends({},u,{id:"".concat(ze(this.props.propertyId),"-multiselect-filterable"),disabled:this.props.state===s.STATES.DISABLED,translateWithId:function(e){return t[e]},items:e.options,initialSelectedItems:e.selectedOptions,onChange:this.handleOnChange,placeholder:p,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})):O.default.createElement(l.MultiSelect,g._extends({},u,{id:"".concat(ze(this.props.propertyId),"-multiselect"),disabled:this.props.state===s.STATES.DISABLED,translateWithId:function(e){return t[e]},items:e.options,selectedItems:e.selectedOptions,onChange:this.handleOnChange,label:p,titleText:this.props.tableControl?null:this.props.controlItem,light:this.props.controller.getLight()&&this.props.control.light})),O.default.createElement("div",{"data-id":ze(this.props.propertyId),className:s.classNames("properties-dropdown",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},c,O.default.createElement(zn,{state:this.props.state,tableOnly:!0,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),i}(O.default.Component),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),controlOpts:t.controller.getFilteredEnumItems(t.propertyId,t.control)}}),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 Xi=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)).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,s.UPDATE_TYPE.INITIAL_LOAD)}},{key:"componentDidUpdate",value:function(e){o.isEqual_1(this.props.controlOpts,e.controlOpts)||this.updateValueFromFilterEnum()}},{key:"updateValueFromFilterEnum",value:function(e,t){var r=Fn(this.props.value,this.props.controlOpts.values);o.isEqual_1(r,this.props.value)||this.props.controller.updatePropertyValue(this.props.propertyId,r,e,t)}},{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===s.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:5.5,o=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"";return O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:s.classNames("properties-someofselect ",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},this.props.controlItem,O.default.createElement(v.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()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:this.props.tableControl}))}}]),a}(O.default.Component),$i=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)(Xi);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(i,r);var n=Ji(i);function i(r){var a;return e._classCallCheck(this,i),(a=n.call(this,r)).reactIntl=r.controller.getReactIntl(),a.emptyTableButtonClickHandler=a.addOnClick.bind(t._assertThisInitialized(a),a.props.propertyId),a.emptyTableButtonLabel=o.formatMessage(a.reactIntl,s.MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL),a}return e._createClass(i,[{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 p=this.props.controller.getDatasetMetadataFields(),u=o.stringifyFieldValue(this.props.controller.getPropertyValue(s),l,!0),c=o.getDMFieldIcon(p,u,l.dmImage);l.icon=c}var d=O.default.createElement("div",{className:"properties-table-cell-control"},O.default.createElement(Kn,{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,s.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 i=this.props.control.label&&this.props.control.label.text?this.props.control.label.text:"",l=O.default.createElement(v.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:i,selectedRows:this.props.selectedRows,rowSelection:this.props.control.rowSelection,updateRowSelections:this.updateRowSelections,light:this.props.controller.getLight()&&this.props.control.light,emptyTablePlaceholder:this.props.control.additionalText}),p=O.default.createElement("div",null,O.default.createElement("div",{className:"properties-column-select-table"},l),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo}));return O.default.createElement("div",{"data-id":ze(this.props.propertyId),className:"properties-column-select"},this.props.controlItem,O.default.createElement(Ca,{tableContainer:p,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===s.STATES.DISABLED,isEmptyTable:a.isEmpty_1(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler}))}}]),i}(Ea);Zi.propTypes={control:D.default.object.isRequired,propertyId:D.default.object.isRequired,controller:D.default.object.isRequired,controlItem:D.default.element,openFieldPicker:D.default.func.isRequired,selectedRows:D.default.array,state:D.default.string,value:D.default.array,messageInfo:D.default.object,addRemoveRows:D.default.bool,tableButtons:D.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 o=es(a);function a(t){var r;return e._classCallCheck(this,a),(r=o.call(this,t)).controlFactory=new Rs(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(O.default.createElement("td",{key:(1+r)*n,className:"properties-structureeditor-cell"},O.default.createElement("div",null,e[r][n])));t.push(O.default.createElement("tr",{key:1+r},o))}return O.default.createElement("table",{role:"presentation"},O.default.createElement("tbody",null,t))}},{key:"render",value:function(){var e=this._makeControlTable(this._makeControls());return O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:s.classNames("properties-structureeditor ",{hide:this.props.state===s.STATES.HIDDEN},this.props.messageInfo?this.props.messageInfo.type:null)},e,O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo,inTable:!1}))}}]),a}(O.default.Component),rs=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)(ts);var os=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)}},ns=a._arrayFilter,as=ee,is=s._baseIteratee,ss=a.isArray_1,ls=os;var ps=function(e,t){return(ss(e)?ns:as)(e,ls(is(t)))};function us(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 cs(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 cs(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 cs(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 ds(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 fs=function(r){t._inherits(l,r);var i=ds(l);function l(r){var n;return e._classCallCheck(this,l),(n=i.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,s.MESSAGE_KEYS.STRUCTURETABLE_ADDBUTTON_LABEL),n}return e._createClass(l,[{key:"indexOfRow",value:function(e){var t=this.props.control.keyIndex;return ua(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=ps(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=us(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=O.default.createElement("div",null,O.default.createElement("div",{className:"properties-st properties-st-buttons"},r),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo})),n=this.getOnPanelContainer(this.props.selectedRows);return O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:"properties-column-structure-wrapper"},O.default.createElement("div",{className:"properties-column-structure"},O.default.createElement(Ca,{tableContainer:o,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===s.STATES.DISABLED,isEmptyTable:a.isEmpty_1(this.props.value),emptyTableButtonLabel:this.emptyTableButtonLabel,emptyTableButtonClickHandler:this.emptyTableButtonClickHandler})),O.default.createElement("div",null,n))}}]),l}(Ea);fs.propTypes={buildUIItem:D.default.func,control:D.default.object.isRequired,propertyId:D.default.object.isRequired,controller:D.default.object.isRequired,openFieldPicker:D.default.func.isRequired,rightFlyout:D.default.bool,selectedRows:D.default.array,state:D.default.string,value:D.default.array,messageInfo:D.default.object,addRemoveRows:D.default.bool,tableButtons:D.default.object};var hs=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)(fs);function ms(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 ys=function(r){t._inherits(i,r);var n=ms(i);function i(r){var o;return e._classCallCheck(this,i),(o=n.call(this,r)).addRow=o.addRow.bind(t._assertThisInitialized(o)),o.allowColumnControls=!0,o}return e._createClass(i,[{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(),s.MESSAGE_KEYS.STRUCTURELISTEDITOR_ADDBUTTON_LABEL),removeButtonLabel:o.formatMessage(this.props.controller.getReactIntl(),s.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=O.default.createElement("div",null,O.default.createElement("div",{className:"properties-sle properties-sle-buttons"},r),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo})),i=this.getOnPanelContainer(this.props.selectedRows);return O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:"properties-sle-wrapper"},O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:"properties-sle-container"},O.default.createElement(Ca,{tableContainer:n,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===s.STATES.DISABLED,isEmptyTable:a.isEmpty_1(this.props.value),emptyTableButtonLabel:e.addButtonLabel,emptyTableButtonClickHandler:this.addRow})),O.default.createElement("div",null,i))}}]),i}(Ea);ys.propTypes={buildUIItem:D.default.func,control:D.default.object.isRequired,propertyId:D.default.object.isRequired,controller:D.default.object.isRequired,rightFlyout:D.default.bool,selectedRows:D.default.array,state:D.default.string,value:D.default.array,messageInfo:D.default.object,addRemoveRows:D.default.bool,tableButtons:D.default.object};var vs=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)(ys);function gs(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 Es=function(r){t._inherits(i,r);var n=gs(i);function i(r){var o;return e._classCallCheck(this,i),(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(i,[{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,s.MESSAGE_KEYS.READONLYTABLE_EDIT_BUTTON_LABEL),r=this.props.controller.getResource(e,t),n=this.buttonHandler?{editCallback:this.editCallback,label:r}:null,i=this.props.control&&this.props.control.buttons,l=this.createTable(this.props.state,n,i),p=O.default.createElement("div",null,O.default.createElement("div",{className:"properties-rt properties-rt-buttons"},l),O.default.createElement(zn,{state:this.props.state,messageInfo:this.props.messageInfo}));return O.default.createElement("div",{"data-id":ze(this.props.control,this.props.propertyId),className:"properties-readonly-table-wrapper"},this.props.controlItem,O.default.createElement("div",{className:"properties-readonly-table"},O.default.createElement(Ca,{tableContainer:p,control:this.props.control,controller:this.props.controller,propertyId:this.props.propertyId,setScrollToRow:this.setScrollToRow,setCurrentControlValueSelected:this.setCurrentControlValueSelected,disabled:this.props.state===s.STATES.DISABLED,isEmptyTable:a.isEmpty_1(this.props.value),emptyTableButtonLabel:r,emptyTableButtonClickHandler:this.editCallback})))}}]),i}(Ea);Es.propTypes={buildUIItem:D.default.func,control:D.default.object.isRequired,propertyId:D.default.object.isRequired,controller:D.default.object.isRequired,controlItem:D.default.element,rightFlyout:D.default.bool,selectedRows:D.default.array,state:D.default.string,value:D.default.array,messageInfo:D.default.object,addRemoveRows:D.default.bool,tableButtons:D.default.object,hideEditButton:D.default.bool};var bs=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),hideEditButton:t.controller.getHideEditButton(t.propertyId)}}),null)(Es);function _s(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 Ss=function(r){t._inherits(i,r);var n=_s(i);function i(t){var r;return e._classCallCheck(this,i),(r=n.call(this,t)).actionFactory=new At(r.props.controller),r.showRequiredIndicator=!t.controller||a.get_1(t.controller.getPropertiesConfig(),"showRequiredIndicator",!0),r}return e._createClass(i,[{key:"render",value:function(){if(this.props.control.controlType===o.ControlType.HIDDEN)return null;var e,t,r,n,i=this.props.state===s.STATES.HIDDEN,l=this.props.state===s.STATES.DISABLED;this.props.control.label&&!1!==this.props.control.labelVisible&&(this.props.control.description&&!a.isEmpty_1(this.props.control.description.text)&&("on_panel"===this.props.control.description.placement?t=O.default.createElement("div",{className:"properties-control-description"},this.props.control.description.text):(this.props.control.description.link&&(this.props.control.description.link.propertyId=this.props.propertyId),r=O.default.createElement(y,{id:"tooltip-label-".concat(this.props.control.name),tip:this.props.control.description.text,link:this.props.control.description.link?this.props.control.description.link:null,tooltipLinkHandler:this.props.controller.getHandlers().tooltipLinkHandler,direction:"bottom",disable:i||l,showToolTipOnClick:!0},O.default.createElement(h.Icon,{type:s.CARBON_ICONS.INFORMATION,className:"properties-control-description-icon-info"})))),this.showRequiredIndicator&&this.props.control.required?n=O.default.createElement("span",{className:"properties-indicator"},o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.LABEL_INDICATOR_REQUIRED)):this.showRequiredIndicator||"required"in this.props.control||(n=O.default.createElement("span",{className:"properties-indicator"},o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.LABEL_INDICATOR_OPTIONAL))),e=O.default.createElement("div",{className:s.classNames("properties-label-container",{"table-control":!0===this.props.tableControl})},O.default.createElement("label",{className:"properties-control-label"},this.props.control.label.text),n,r));var p=this.actionFactory.generateAction(0,this.props.control.action),u=s.classNames("properties-control-item",{hide:i});return this.props.accessibleControls.includes(this.props.control.controlType)?O.default.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:u,disabled:l},e,t):O.default.createElement("div",{"data-id":"properties-ci-"+this.props.control.name,className:u,disabled:l},e,t,this.props.controlObj,p)}}]),i}(O.default.Component),Ts=c.connect((function(e,t){return{state:t.controller.getControlState(t.propertyId)}}),null)(Ss),Is=[o.ControlType.CHECKBOXSET,o.ControlType.HIDDEN,o.ControlType.DATEFIELD,o.ControlType.DATEPICKER,o.ControlType.DATEPICKERRANGE,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.TOGGLE,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],Cs=[o.ControlType.LIST,o.ControlType.READONLYTABLE,o.ControlType.SOMEOFSELECT,o.ControlType.SELECTCOLUMNS,o.ControlType.STRUCTURETABLE,o.ControlType.STRUCTURELISTEDITOR],Rs=function(){function t(r){e._classCallCheck(this,t),this.rightFlyout=!!r&&a.get_1(r.getPropertiesConfig(),"rightFlyout",!1),this.controller=r,this.actionFactory=new At(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){if(this.controller.getControlState(t)===s.STATES.HIDDEN)return null;var o=this.createControl(e,t,r),n=e.className?e.className:"";return Is.includes(e.controlType)?o:O.default.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:s.classNames("properties-ctrl-wrapper",n)},O.default.createElement(Ts,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,controlObj:o,accessibleControls:Is,tableControl:Cs.includes(e.controlType)}))}},{key:"createControl",value:function(e,t,r){if(!e||!t)return null;var n,i=ze(t),l=this.controller.getControlState(t)===s.STATES.HIDDEN,p=this.actionFactory.generateAction(0,e.action),u={};switch(u.key=i,u.control=e,u.controller=this.controller,u.propertyId=t,u.controlItem=O.default.createElement(Ts,{key:"ctrl-item-"+e.name,controller:this.controller,propertyId:t,control:e,accessibleControls:Is,tableControl:Cs.includes(e.controlType)}),r&&(u.tableControl=r.table),e.controlType){case o.ControlType.HIDDEN:return null;case o.ControlType.TEXTFIELD:n=O.default.createElement($n,u);break;case o.ControlType.READONLY:case o.ControlType.TIMESTAMP:n=O.default.createElement(Kn,u);break;case o.ControlType.TEXTAREA:n=O.default.createElement(ra,u);break;case o.ControlType.TOGGLE:n=O.default.createElement(Ni,u);break;case o.ControlType.LIST:n=O.default.createElement(Oa,u);break;case o.ControlType.EXPRESSION:n=O.default.createElement(ui,g._extends({},u,{rightFlyout:this.rightFlyout}));break;case o.ControlType.CODE:n=O.default.createElement(ui,g._extends({},u,{builder:!1,validateLink:!1,rightFlyout:this.rightFlyout}));break;case o.ControlType.TOGGLETEXT:n=O.default.createElement(Qn,u);break;case o.ControlType.PASSWORDFIELD:n=O.default.createElement(fi,u);break;case o.ControlType.NUMBERFIELD:case o.ControlType.SPINNER:n=O.default.createElement(aa,u);break;case o.ControlType.DATEFIELD:n=O.default.createElement(yi,u);break;case o.ControlType.DATEPICKER:n=O.default.createElement(Ei,u);break;case o.ControlType.DATEPICKERRANGE:n=O.default.createElement(Si,u);break;case o.ControlType.TIMEFIELD:n=O.default.createElement(Ci,u);break;case o.ControlType.CHECKBOX:n=O.default.createElement(ki,u);break;case o.ControlType.CHECKBOXSET:n=r?O.default.createElement(Kn,u):O.default.createElement(Li,u);break;case o.ControlType.RADIOSET:n=O.default.createElement(Vi,u);break;case o.ControlType.ONEOFSELECT:case o.ControlType.SELECTSCHEMA:n=O.default.createElement(Gi,g._extends({},u,{rightFlyout:this.rightFlyout}));break;case o.ControlType.MULTISELECT:n=O.default.createElement(Ki,u);break;case o.ControlType.SELECTCOLUMN:n=!r||r&&r.allowColumnControls?O.default.createElement(Gi,g._extends({},u,{rightFlyout:this.rightFlyout})):O.default.createElement(Kn,u);break;case o.ControlType.SOMEOFSELECT:n=r?O.default.createElement(Kn,u):O.default.createElement($i,u);break;case o.ControlType.SELECTCOLUMNS:n=r?O.default.createElement(Kn,u):O.default.createElement(Qi,g._extends({},u,{openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case o.ControlType.STRUCTURETABLE:n=r?O.default.createElement(Kn,u):O.default.createElement(hs,g._extends({},u,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;case o.ControlType.STRUCTURELISTEDITOR:n=r?O.default.createElement(Kn,u):O.default.createElement(vs,g._extends({},u,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case o.ControlType.READONLYTABLE:n=r?O.default.createElement(Kn,u):O.default.createElement(bs,g._extends({},u,{buildUIItem:this.genUIItem,rightFlyout:this.rightFlyout}));break;case o.ControlType.CUSTOM:n=O.default.createElement("div",{className:"properties-custom-ctrl",key:i},this.controller.getCustomControl(t,e,r));break;case o.ControlType.STRUCTUREEDITOR:n=O.default.createElement(rs,g._extends({},u,{buildUIItem:this.genUIItem,openFieldPicker:this.openFieldPicker,rightFlyout:this.rightFlyout}));break;default:n=O.default.createElement(Kn,u)}if(Is.includes(e.controlType)){if(r)return n;var c=e.className?e.className:"";return O.default.createElement("div",{key:"properties-ctrl-"+e.name,"data-id":"properties-ctrl-"+e.name,className:s.classNames("properties-ctrl-wrapper",{hide:l,action:a.has_1(e,"action.image.placement")},c)},n,p)}return n}},{key:"createFormControl",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.CONTAINER_TYPE.CUSTOM;if(!e)return null;var a=lr.makePropertyDef(null,e.parameters,e.complex_types,e.uihints);if(a&&a.parameterMetadata){var i,l=new xt(e.resources),p=a.parameterMetadata.getParameter(t);p.propType()===o.Type.STRUCTURE&&a.structureMetadata&&(i=a.structureMetadata.getStructure(p.baseType()));var u={light:r,containerType:n};return Rr(a.parameterMetadata,t,null,i,l,null,null,null,u)}return null}}]),t}();function As(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 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 Os(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 Os(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 Os(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 ws(e,t,r,n){if(["textfield"].indexOf(e.control.controlType)>=0){var a=n.getDatasetMetadataFields();if(!a)return!0;var i,s=!0,l=ks(a);try{for(l.s();!(i=l.n()).done;){var p=i.value;if(o.fieldValueMatchesProto(e.value,p)){s=!1;break}}}catch(e){l.e(e)}finally{l.f()}if(!s){var u,c=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=ks(c);try{for(d.s();!(u=d.n()).done;){var f=u.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 Ns(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!(null!=t&&!a.isEmpty_1(t))||e.find((function(e){return o.fieldValueMatchesProto(t,e)}))}var Ds=a._arrayMap;var Ls=function(e,t){return Ds(t,(function(t){return e[t]}))},Ms=a.keys_1;var xs=function(e){return null==e?[]:Ls(e,Ms(e))},Bs=a._baseIndexOf,Fs=a.isArrayLike_1,Vs=o.isString_1,Us=C.toInteger_1,zs=xs,Hs=Math.max;var js=function(e,t,r,o){e=Fs(e)?e:zs(e),r=r&&!o?Us(r):0;var n=e.length;return r<0&&(r=Hs(n+r,0)),Vs(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&Bs(e,t,r)>-1};function Gs(t,r,n,a){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(t.control.controlType)<0){var i=e._typeof(t.value);if(void 0!==r)switch(i){case"undefined":return!1;case"string":case"object":return js(t.value,r.value);default:return o.logger.warn("Ignoring condition operation 'contains' for parameter_ref "+t.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!1;case"string":case"object":return js(t.value,n);default:return o.logger.warn("Ignoring condition operation 'contains' for parameter_ref "+t.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 "+t.control.controlType),!0}function qs(t,r,n,a){if("passwordfield"!==t.control.controlType){var i=e._typeof(t.value);if(r){if(null===t.value||null===r.value)return t.value===r.value;switch(i){case"undefined":case"boolean":case"number":return t.value===r.value;case"string":return t.value.trim()===r.value.trim();case"object":return JSON.stringify(t.value)===JSON.stringify(r.value);default:return o.logger.warn("Ignoring condition operation 'equals' for parameter_ref "+t.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===t.value||null===n)return t.value===n;switch(i){case"undefined":case"boolean":case"number":return t.value===n;case"string":return t.value.trim()===n.toString().trim();case"object":return JSON.stringify(t.value)===JSON.stringify(n);default:return o.logger.warn("Ignoring condition operation 'equals' for parameter_ref "+t.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 "+t.control.controlType),!0}function Ys(t,r,n,a){var i=e._typeof(t.value);switch(i){case"undefined":case"number":if(void 0!==r)return"number"==typeof r.value&&t.value>r.value;if(void 0!==n)return null===n||t.value>n;throw new Error("Insufficient parameter for condition operation 'greaterThan'");case"object":return null===t.value||null===r.value||null===n;case"string":if(t.control&&t.control.controlType===o.ControlType.DATEPICKER){var s=new Date(t.value);if(!isNaN(s)&&r){var l=new Date(r.value);if(!isNaN(l))return s.getTime()>l.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}if(!isNaN(s)&&n){var p=new Date(n);if(!isNaN(p))return s.getTime()>p.getTime();throw new Error("Insufficient parameter for condition operation 'greaterThan'")}throw new Error("Insufficient parameter for condition operation 'greaterThan'")}return!0;default:return o.logger.warn("Ignoring condition operation 'greaterThan' for parameter_ref "+t.param+" with input data type "+i),!0}}function Ks(t,r,n,a){var i=a.getPropertiesConfig(),s=e._typeof(t.value);switch(s){case"undefined":return!0;case"boolean":return!1;case"string":return i.trimSpaces?0===t.value.trim().length:0===t.value.length;case"number":return null===t.value;case"object":if(t.control&&t.control.controlType===o.ControlType.DATEPICKERRANGE){var l=t.value[0].trim(),p=t.value[1].trim();return""===l&&""===p}return null===t.value||0===t.value.length;default:return o.logger.warn("Ignoring condition operation 'isEmpty' for parameter_ref "+t.param+" with input data type "+s),!0}}function Ws(t,r,n,a){var i=a.getPropertiesConfig(),s=e._typeof(t.value);switch(s){case"undefined":return!1;case"boolean":return!0;case"string":return i.trimSpaces?0!==t.value.trim().length:0!==t.value.length;case"number":return null!==t.value;case"object":return t.control&&t.control.controlType===o.ControlType.DATEPICKERRANGE?""!==t.value[0].trim()||""!==t.value[1].trim():null!==t.value&&0!==t.value.length;default:return o.logger.warn("Ignoring condition operation 'isNotEmpty' for parameter_ref "+t.param+" with input data type "+s),!0}}function Xs(t,r,n,a){var i=e._typeof(t.value);switch(i){case"undefined":case"number":if(void 0!==r)return"number"==typeof r.value&&t.value<r.value;if(void 0!==n)return null===n||t.value<n;throw new Error("Insufficient parameter for condition operation 'lessThan'");case"object":return null===t.value||null===r.value||null===n;case"string":if(t.control&&t.control.controlType===o.ControlType.DATEPICKER){var s=new Date(t.value);if(!isNaN(s)&&r){var l=new Date(r.value);if(!isNaN(l))return s.getTime()<l.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}if(!isNaN(s)&&n){var p=new Date(n);if(!isNaN(p))return s.getTime()<p.getTime();throw new Error("Insufficient parameter for condition operation 'lessThan'")}throw new Error("Insufficient parameter for condition operation 'lessThan'")}return!0;default:return o.logger.warn("Ignoring condition operation 'lessThan' for parameter_ref "+t.param+" with input data type "+i),!0}}function $s(t,r,n,a){var i=e._typeof(t.value),s="";if(null!=r)s=r.value;else{if(null==n)return o.logger.warn("Ignoring condition operation 'matches' for parameter_ref "+t.param+" no regular expression specified in condition."),!0;s=n}return"string"===i||"undefined"===i?new RegExp(s).test(t.value):(o.logger.warn("Ignoring condition operation 'matches' for parameter_ref "+t.param+" with input data type "+i),!0)}function Js(t,r,n,a){if(["checkbox","numberfield","passwordfield","datepicker","datepickerRange"].indexOf(t.control.controlType)<0){var i=e._typeof(t.value);if(void 0!==r)switch(i){case"undefined":return!0;case"string":case"object":return!js(t.value,r.value);default:return o.logger.warn("Ignoring condition operation 'notContains' for parameter_ref "+t.param+" with input data type "+i),!0}else if(void 0!==n)switch(i){case"undefined":return!0;case"string":case"object":return!js(t.value,n);default:return o.logger.warn("Ignoring condition operation 'notContains' for parameter_ref "+t.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 "+t.control.controlType),!0}function Zs(t,r,n,a){if("passwordfield"!==t.control.controlType){var i=e._typeof(t.value);if(r){if(null===t.value||null===r.value)return t.value!==r.value;switch(i){case"undefined":case"boolean":case"number":return t.value!==r.value;case"string":return t.value.trim()!==r.value.trim();case"object":return JSON.stringify(t.value)!==JSON.stringify(r.value);default:return o.logger.warn("Ignoring condition operation 'notEquals' for parameter_ref "+t.param+" with input data type "+i),!0}}else if(void 0!==n){if(null===t.value||null===n)return t.value!==n;switch(i){case"undefined":case"boolean":case"number":return t.value!==n;case"string":return t.value.trim()!==n.trim();case"object":return JSON.stringify(t.value)!==JSON.stringify(n);default:return o.logger.warn("Ignoring condition operation 'notEquals' for parameter_ref "+t.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 "+t.control.controlType),!0}function Qs(t,r,n,a){var i=e._typeof(t.value),s="";if(null!=r)s=r.value;else{if(null==n)return o.logger.warn("Ignoring condition operation 'notMatches' for parameter_ref "+t.param+" no regular expression specified in condition."),!0;s=n}return"string"===i||"undefined"===i?!new RegExp(s).test(t.value):(o.logger.warn("Ignoring condition operation 'notMatches' for parameter_ref "+t.param+" with input data type "+i),!0)}function el(e,t,r,n){if(e.value){if(e.control&&e.control.controlType!==o.ControlType.DATEPICKER&&e.control.controlType!==o.ControlType.DATEPICKERRANGE){var a="time"===r?"HH:mm:ss:xxx":s.DEFAULT_DATE_FORMAT,i=S.parse(e.value,a,new Date);return S.isValid(i)}return!0}return!0}function tl(t,r,n,a){"column"!==t.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=Dn(r,i,"type")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof t.value||"object"===e._typeof(t.value)?Dn(t,i,"type")===s:(void 0!==t.value&&o.logger.warn("dmTypeEquals cannot handle the given type: "+e._typeof(t.value)),!1))}function rl(t,r,n,a){"column"!==t.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=Dn(r,i,"type")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof t.value||"object"===e._typeof(t.value)?Dn(t,i,"type")!==s:(void 0!==t.value&&o.logger.warn("dmTypeNotEquals cannot handle the given type: "+e._typeof(t.value)),!1))}function ol(t,r,n,a){"column"!==t.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=Dn(r,i,"measure")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof t.value||"object"===e._typeof(t.value)?Dn(t,i,"measure")===s:(void 0!==t.value&&o.logger.warn("dmMeasurementEquals cannot handle the given type: "+e._typeof(t.value)),!1))}function nl(t,r,n,a){"column"!==t.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=Dn(r,i,"measure")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof t.value||"object"===e._typeof(t.value)?Dn(t,i,"measure")!==s:(void 0!==t.value&&o.logger.warn("dmMeasurementNotEquals cannot handle the given type: "+e._typeof(t.value)),!1))}function al(t,r,n,a){"column"!==t.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=Dn(r,i,"modeling_role")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof t.value||"object"===e._typeof(t.value)?Dn(t,i,"modeling_role")===s:(void 0!==t.value&&o.logger.warn("dmRoleEquals cannot handle the given type: "+e._typeof(t.value)),!1))}function il(t,r,n,a){"column"!==t.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=Dn(r,i,"modeling_role")),null===s&&(s=r.value);else{if(null==n)return!1;s=n}return!!i&&("string"==typeof t.value||"object"===e._typeof(t.value)?Dn(t,i,"modeling_role")!==s:(void 0!==t.value&&o.logger.warn("dmRoleEquals cannot handle the given type: "+e._typeof(t.value)),!1))}function sl(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 ll(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 pl(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 ul(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 cl(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 cl(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 cl(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 dl(e){var t={};if(t.cellNotEmpty=As,t.colNotExists=ws,t.colDoesExists=Ns,t.contains=Gs,t.equals=qs,t.greaterThan=Ys,t.isEmpty=Ks,t.isNotEmpty=Ws,t.lessThan=Xs,t.matches=$s,t.notContains=Js,t.notEquals=Zs,t.notMatches=Qs,t.isDateTime=el,t.dmTypeEquals=tl,t.dmTypeNotEquals=rl,t.dmMeasurementEquals=ol,t.dmMeasurementNotEquals=nl,t.dmRoleEquals=al,t.dmRoleNotEquals=il,t.lengthEquals=sl,t.lengthLessThan=ll,t.lengthGreaterThan=pl,Array.isArray(e)){var r,n=ul(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 fl(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 hl(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 hl(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 hl(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 ml=function(){function t(){e._classCallCheck(this,t),this.propertiesStore=new fo,this.handlers={propertyListener:null,controllerHandler:null,actionHandler:null,buttonHandler:null,buttonIconHandler:null,titleChangeHandler:null,tooltipLinkHandler: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 _,this.custPropSumPanelValues={},this.controlFactory=new Rs(this),this.sharedCtrlInfo=[],this.isSummaryPanel=!1,this.visibleSubPanelCounter=0,this.conditionOps=dl(),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:"getLocale",value:function(){return a.get_1(this.propertiesConfig,"locale",s.DEFAULT_LOCALE)}},{key:"isTearsheetContainer",value:function(){return"Tearsheet"===this.propertiesConfig.containerType}},{key:"setParamDef",value:function(e){var t=a.get_1(this.getPropertiesConfig(),"containerType"),r=a.get_1(this.getPropertiesConfig(),"convertTypes"),o=Mr.makeForm(e,t,r);this.setForm(o)}},{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,n=[];!function(e,t,r){if(r.uiItems){var o,n=mo(r.uiItems);try{for(n.s();!(o=n.n()).done;)Eo(e,t,o.value)}catch(e){n.e(e)}finally{n.f()}}}(n,this.actions,this.form),this.saveControls(n),this._parseSummaryControls(n),this.parsePanelTree(),mn(this.controls,this.validationDefinitions,this.requiredDefinitionsIds,t);var i={};if(this.form.data&&(r=this.form.data.datasetMetadata,i=this.form.data.uiCurrentParameters?Xr({},this.form.data.currentParameters,this.form.data.uiCurrentParameters):this.form.data.currentParameters),this.setDatasetMetadata(r),this.setPropertyValues(i,!0),this._addToControlValues(),this._addToControlValues(!0),this.setInitialAddRemoveRows(),this.setInitialTableButtonState(),this.uiItems=this.form.uiItems,!a.isEmpty_1(this.uiItems)&&!a.isEmpty_1(this.uiItems[0].tabs)){var s=this.uiItems[0].tabs.filter((function(e){return e.content.itemType!==o.ItemType.TEARSHEET}));s.length&&this.propertiesStore.setActiveTab(s[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=fl(this.form.conditions);try{for(t.s();!(e=t.n()).done;){var r=e.value;r.visible?bo(this.visibleDefinitions,r,s.CONDITION_TYPE.VISIBLE):r.enabled?bo(this.enabledDefinitions,r,s.CONDITION_TYPE.ENABLED):r.validation?bo(this.validationDefinitions,r,s.CONDITION_TYPE.VALIDATION):r.filter?bo(this.filterDefinitions,r,s.CONDITION_TYPE.FILTER):r.enum_filter?bo(this.filteredEnumDefinitions,r,s.CONDITION_TYPE.FILTEREDENUM):r.allow_change?bo(this.allowChangeDefinitions,r,s.CONDITION_TYPE.ALLOWCHANGE):r.default_value?bo(this.conditionalDefaultDefinitions,r,s.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 s.CONDITION_TYPE.VISIBLE:o=this.visibleDefinitions[r];break;case s.CONDITION_TYPE.ENABLED:o=this.enabledDefinitions[r];break;case s.CONDITION_TYPE.FILTEREDENUM:o=this.filteredEnumDefinitions[r];break;case s.CONDITION_TYPE.ALLOWCHANGE:o=this.allowChangeDefinitions[r];break;case s.CONDITION_TYPE.CONDITIONALDEFAULT:o=this.conditionalDefaultDefinitions[r];break;case s.CONDITION_TYPE.VALIDATION:o=this.validationDefinitions[r]}var n=[];for(var i in o)if(a.has_1(o,i)){var l=hn(i);l.name===e.name&&l.col===e.col&&(n=n.concat(o[i]))}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[s.PANEL_TREE_ROOT]={controls:[],panels:[],actions:[]},function(e,t,r){if(t.uiItems){var o,n=Io(t.uiItems);try{for(n.s();!(o=n.n()).done;)Ro(e,o.value,r)}catch(e){n.e(e)}finally{n.f()}}}(this.panelTree,this.form,s.PANEL_TREE_ROOT)}},{key:"_addToControlValues",value:function(e){for(var t in this.controls)if(a.has_1(this.controls,t)){var r=this.controls[t],n={name:r.name},i=this.getPropertyValue(n);e?null!=i&&void 0!==i.parameterRef&&(i=this.getPropertyValue({name:i.parameterRef}),this.updatePropertyValue(n,i,!0,s.UPDATE_TYPE.INITIAL_LOAD)):"structuretable"===r.controlType&&!1===r.addRemoveRows&&!0===r.includeAllFields?(i=this._populateFieldData(i,r),this.updatePropertyValue(n,i,!0,s.UPDATE_TYPE.INITIAL_LOAD)):void 0!==r.valueDef&&void 0!==r.valueDef.defaultValue&&void 0===i?(i=r.valueDef.defaultValue,o.isSubControlStructureObjectType(r)&&(i=o.convertObjectStructureToArray(r.valueDef.isList,r.subControls,i)),this.updatePropertyValue(n,i,!0,s.UPDATE_TYPE.INITIAL_LOAD)):"structureeditor"===r.controlType&&(!i||Array.isArray(i)&&0===i.length)&&Array.isArray(r.defaultRow)&&this.updatePropertyValue(n,r.defaultRow,!0,s.UPDATE_TYPE.INITIAL_LOAD)}}},{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(a.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(a.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=dl(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=Qo(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=fl(this.sharedCtrlInfo);try{for(a.s();!(r=a.n()).done;){var i,s=r.value,l=fl(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 p=n.map((function(e){return e.controlName}));return this.filterFieldsFromSharedProps(t,p,o)}},{key:"filterFieldsFromSharedProps",value:function(e,t,r){try{var n,a=[],i=fl(t);try{for(i.s();!(n=i.n()).done;){var s=n.value;if(s!==r){var l=this.getControl({name:s}),p=this.getPropertyValue({name:s});if(Array.isArray(p)){var u,c=fl(p);try{for(c.s();!(u=c.n()).done;){var d=u.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){c.e(e)}finally{c.f()}}else a.push(o.stringifyFieldValue(p,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=fl(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 p,u=fl(o);try{for(u.s();!(p=u.n()).done;){var c=p.value;if(t.push(c.name),c.fields){var d,f=fl(c.fields);try{for(f.s();!(d=f.n()).done;){var h=d.value;h.schema=c.name,h.origName=h.name,r.push(h)}}catch(e){f.e(e)}finally{f.f()}}}}catch(e){u.e(e)}finally{u.f()}}if(void 0===this.multipleSchemas&&(this.multipleSchemas=this._canHaveMultipleSchemas()),this.multipleSchemas){var m,y=fl(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){ln(e,this,!(arguments.length>1&&void 0!==arguments[1])||arguments[1])}},{key:"validatePropertiesValues",value:function(){an(this,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{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=So(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,n){var a=this.convertPropertyId(e),i=this.getPropertyValue(a);if(void 0===t?this.removePropertyValue(a):this.propertiesStore.updatePropertyValue(a,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,s.CONDITION_TYPE.ALLOWCHANGE,s.CONDITION_DEFINITION_INDEX.CONTROLS);if(n.length>0)try{var a,i=on(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(pn(e,this),r||ln(e,this,!0),this.handlers.propertyListener){var l=this._convertObjectStructure(a,t),p={action:s.ACTIONS.UPDATE_PROPERTY,property:a,value:l,previousValue:i};void 0!==n&&(p.type=n),this.handlers.propertyListener(p)}}else this.propertiesStore.updatePropertyValue(a,i)}},{key:"getPropertyValue",value:function(e,t,r){var n=this.convertPropertyId(e),a=this.propertiesStore.getPropertyValue(n),i=r,l=t&&(t.filterHiddenDisabled||t.filterHidden),p=t&&(t.filterHiddenDisabled||t.filterDisabled),u=t&&t.filterHiddenControls;if(l||p||u){var c=this.getControlState(n),d=this.getControlType(n);if(c===s.STATES.DISABLED&&p||c===s.STATES.HIDDEN&&l||d===o.ControlType.HIDDEN&&u)return i;if(i=o.copy(a),Array.isArray(i))for(var f=0;f<i.length;f++){var h=i[f];if(Array.isArray(h))for(var m=0;m<h.length;m++){var y={name:n.name,row:f,col:m},v=this.getControlState(y),g=this.getControlType(y);(v===s.STATES.DISABLED&&p||v===s.STATES.HIDDEN&&l||g===o.ControlType.HIDDEN&&u)&&(i[f][m]=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||e.filterHiddenControls||e.valueFilters)){var o={};for(var n in t)if(a.has_1(t,n)){var i=this.getPropertyValue({name:n},e),s=Array.isArray(e.valueFilters)?e.valueFilters:[];void 0===i||s.includes(i)||(o[n]=i)}r=o}if(e&&!0===e.applyProperties)for(var l in r)if(a.has_1(r,l)){var p=this.convertPropertyId(l),u=this.propertiesStore.getPropertyValue(p);r[l]=this._convertObjectStructure(p,u)}return r}},{key:"setPropertyValues",value:function(e,t){var r=this,i=n.cloneDeep_1(e);if(e){var l=this.getControls();Object.keys(i).forEach((function(t){if(o.isSubControlStructureObjectType(l[t])){var r=e[t],n=l[t],a=o.convertObjectStructureToArray(n.valueDef.isList,n.subControls,r);i[t]=a}})),a.get_1(this.getPropertiesConfig(),"convertValueDataTypes")&&(i=o.convertValueDataTypes(i,l))}if(this.propertiesStore.setPropertyValues(i),t){var p={};a.isEmpty_1(i)||(Object.keys(i).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,s.CONDITION_TYPE.CONDITIONALDEFAULT,s.CONDITION_DEFINITION_INDEX.CONTROLS);if(n.length>0)try{var a,i=on(n);try{for(i.s();!(a=i.n()).done;){var l=a.value,p=l.definition.default_value.parameter_ref;p in r||Zo(l.definition,e,t)&&(r[p]=l.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,p)})),a.isEmpty_1(p)||Object.keys(p).forEach((function(e){if(!(e in i)){var t=r.getControl({name:e});o.isSubControlStructureObjectType(t)&&(p[e]=o.convertObjectStructureToArray(t.valueDef.isList,t.subControls,p[e])),r.propertiesStore.updatePropertyValue({name:e},p[e])}})))}sn(this),this.handlers.propertyListener&&this.handlers.propertyListener({action:s.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:"clearActiveTearsheet",value:function(){this.propertiesStore.setActiveTearsheetId(null)}},{key:"setActiveTearsheet",value:function(e){this.propertiesStore.setActiveTearsheetId(e)}},{key:"getActiveTearsheet",value:function(){return this.propertiesStore.getActiveTearsheetId()||null}},{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],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=this.convertPropertyId(e);if(t){var i=this.getControlState(a),l=this.getControlType(a);if(i===s.STATES.DISABLED||i===s.STATES.HIDDEN||l===o.ControlType.HIDDEN)return null}var p=this.propertiesStore.getErrorMessage(a,this.reactIntl);return r&&p&&p.type===s.CONDITION_MESSAGE_TYPE.SUCCESS||n&&p&&!o.isUndefined_1(p.displayError)&&!p.displayError?null:p}},{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={},i=[];for(var s in e)if(a.has_1(e,s)){var l=this.getErrorMessage({name:s},r,o);l&&l.text&&(t?i.push({id_ref:s,validation_id:l.validation_id,type:l.type,text:l.text}):n[s]=l)}return t?i:n}},{key:"_filterDisplayErrors",value:function(e){return this._filterErrors(e,(function(e){return o.isUndefined_1(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 n=t.getControlState(r),a=t.getControlType(r);return n!==s.STATES.HIDDEN&&n!==s.STATES.DISABLED&&a!==o.ControlType.HIDDEN}))}},{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 i in n)if(a.has_1(n,i)){var s=n[i];if(s&&s.text&&t(s,s.propertyId))void 0===r[o]&&(r[o]={}),r[o][i]=s;else for(var l in s)if(a.has_1(s,l)){var p=s[l];p&&p.text&&t(p,p.propertyId)&&(void 0===r[o]&&(r[o]={}),void 0===r[o][i]&&(r[o][i]={}),r[o][i][l]=p)}}})),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 p=l[s];o[e][t][p]=i[p]}}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?(!a.has_1(t.controls,e.name)||a.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:"setWideFlyoutPrimaryButtonDisabled",value:function(e,t){this.propertiesStore.setWideFlyoutPrimaryButtonDisabled(e,t)}},{key:"getWideFlyoutPrimaryButtonDisabled",value:function(e){return this.propertiesStore.getWideFlyoutPrimaryButtonDisabled(e)}},{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){if(void 0===e)return null;var t=this.getControl(e);return t?t.controlType:null}},{key:"getColumnVisibility",value:function(e,t){return this.controls[e.name][t].visible}},{key:"toggleColumnVisibility",value:function(e,t,r){this.controls[e.name][t].visible=r}},{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===s.STATES.DISABLED||t===s.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=a.get_1(this.getPropertiesConfig(),"containerType"),n=this.controlFactory.createFormControl(t,r,this.getLight(),o),i=[];return go(i,n,this.getControl(e).parentCategoryId),this.saveControls(i),this.controlFactory.createControlItem(n,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=fl(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&&!o.isUndefined_1(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:"setHideEditButton",value:function(e,t){this.propertiesStore.setHideEditButton(e,t)}},{key:"getHideEditButton",value:function(e){return this.propertiesStore.getHideEditButton(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],n={name:r.name};o.isUndefined_1(r.buttons)||r.buttons.forEach((function(t){e.setTableButtonEnabled(n,t.id,t.enabled||!1)})),r.subControls&&e.setInitialTableButtonSubControlState(n,r.subControls)}))}},{key:"setInitialTableButtonSubControlState",value:function(e,t){var r=this;t.forEach((function(t){var n=r.getPropertyValue(e);o.isUndefined_1(t.buttons)||n.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}(),yl={$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}}},vl={$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","tearsheetPanel","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 and tearsheetPanel",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 and optional link",type:"object",allOf:[{$ref:"#/definitions/resource_definition"},{properties:{placement:{description:"Optional placement context for the text",enum:["as_tooltip","on_panel"],default:"as_tooltip"},link:{description:"Optional link in the description. tooltipLinkHandler callback must be defined whenever link object is added in uiHints.",type:"object",properties:{id:{description:"link id",type:"string"},data:{description:"Data passed to the tooltipLinkHandler callback",type:"object",additionalProperties:!0}},required:["id"]}}}]},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","toggle","oneofselect","multiselect","someofselect","selectcolumn","selectcolumns","selectschema","structuretable","structurelisteditor","structureeditor","custom","datefield","datepicker","datepickerRange","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"},resizable:{description:"Determines if this column can be resized in a table. When a column is resized, width of all the columns to the right of resized column is adjusted. Applies to structure parameters only.",type:"boolean",default:!1},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","text/x-sql"]},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"},enable_maximize:{description:"Determines if maximize/minimze buttons are shown for code control",type:"boolean"}},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"]},class_name:{description:"Optional class name to set for this action",type:"string"},label:{description:"Action label",type:"object",$ref:"#/definitions/resource_definition"},button:{description:"Properties for button kind and size. Use when control=button.",type:"object",properties:{kind:{description:"button kind",type:"string",enum:["primary","secondary","tertiary","ghost","danger","danger--tertiary","danger--ghost"],default:"tertiary"},size:{description:"button size",enum:["sm","md","lg","xl"],default:"sm"}}},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"]}]}}},gl={$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"]}}},El={$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 bl(e){var t=function(){var e=new A.Validator,t="https://api.dataplatform.ibm.com/schemas/common-canvas/",r="https://api.dataplatform.ibm.com/schemas/common-pipeline/";return e.addSchema(yl,t+"parameter-defs/pipeline-flow-v3-schema.json"),e.addSchema(vl,r+"operators/uihints-v3-schema.json"),e.addSchema(gl,r+"operators/conditions-v3-schema.json"),e.addSchema(El,r+"operators/operator-v3-schema.json"),e.addSchema(i.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,yl,0,t)}function _l(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 Sl=function(r){t._inherits(i,r);var n=_l(i);function i(r){var a;return e._classCallCheck(this,i),(a=n.call(this,r)).state={focused:!1,titleValidation:null},a.editTitleClickHandler=a.editTitleClickHandler.bind(t._assertThisInitialized(a)),a.helpClickHandler=a.helpClickHandler.bind(t._assertThisInitialized(a)),a.id=o.generateId(),a.textInputRef=O.default.createRef(),a.labelText=o.formatMessage(r.controller.getReactIntl(),s.MESSAGE_KEYS.TITLE_EDITOR_LABEL),a.textInputOnFocus=a.textInputOnFocus.bind(t._assertThisInitialized(a)),a.textInputOnBlur=a.textInputOnBlur.bind(t._assertThisInitialized(a)),a.headingEnabled=a.props.showHeading&&(a.props.heading||a.props.icon),a.handleTitleChange=a.handleTitleChange.bind(t._assertThisInitialized(a)),a.titleChangeHandler=a.props.controller.getHandlers().titleChangeHandler,a}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(t){var r=this;null!==this.state.titleValidation&&this.setState({titleValidation:null});var o=t.target.value;"function"==typeof this.titleChangeHandler&&this.titleChangeHandler(o,(function(t){t&&"object"===e._typeof(t)&&t.type&&t.message?r.setState({titleValidation:t}):r.setState({titleValidation:null})})),this.props.setTitle(o)}},{key:"render",value:function(){var e=this;if(null===this.props.title)return null;var t=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.TITLE_EDITOR_LABEL),r=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.TITLE_EDITOR_HELPBUTTON_LABEL),n=o.formatMessage(this.props.controller.getReactIntl(),s.MESSAGE_KEYS.PROPERTIESEDIT_CLOSEBUTTON_LABEL),i=[s.CONDITION_MESSAGE_TYPE.ERROR,s.CONDITION_MESSAGE_TYPE.WARNING],p=a.get_1(this.state.titleValidation,"type",null)===s.CONDITION_MESSAGE_TYPE.WARNING,u=a.get_1(this.state.titleValidation,"type",null)===s.CONDITION_MESSAGE_TYPE.ERROR,c=!1===this.props.labelEditable||this.state.focused?O.default.createElement("div",null):O.default.createElement(l.Button,{kind:"ghost",className:"properties-title-editor-btn edit","data-id":"edit",onClick:this.editTitleClickHandler,tooltipPosition:"bottom",tooltipAlignment:"end",renderIcon:d.Edit16,size:"small",iconDescription:t,hasIconOnly:!0}),f=this.props.help?O.default.createElement(l.Button,{kind:"ghost",className:"properties-title-editor-btn help","data-id":"help",onClick:this.helpClickHandler,tooltipPosition:"bottom",renderIcon:d.Help16,size:"small",iconDescription:r,hasIconOnly:!0}):null,h=this.props.closeHandler?O.default.createElement("div",{className:"properties-close-button"},O.default.createElement(l.Button,{kind:"ghost",size:"small","data-id":"close",onClick:this.props.closeHandler,tooltipPosition:"left",renderIcon:d.Close16,iconDescription:n,hasIconOnly:!0})):null,m=null;if(this.headingEnabled){var y=this.props.heading?O.default.createElement("div",{className:"properties-title-heading-label"},this.props.heading):null,v=this.props.icon&&"string"==typeof this.props.icon?O.default.createElement(P.default,{className:"properties-title-heading-icon",src:this.props.icon}):null;(y||v)&&(m=O.default.createElement("div",{className:"properties-title-heading"},v,y,f))}return O.default.createElement("div",{className:s.classNames("properties-title-editor",{"properties-title-with-heading":this.headingEnabled},{"properties-title-right-flyout-tabs-view":this.props.rightFlyoutTabsView})},h,m,O.default.createElement("div",{className:s.classNames("properties-title-editor-input",{"properties-title-editor-with-help":this.props.help&&!this.headingEnabled&&!i.includes(a.get_1(this.state.titleValidation,"type")),"properties-title-editor-with-warning":p,"properties-title-editor-with-error":u})},O.default.createElement(l.TextInput,g._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,size:"sm",onFocus:this.textInputOnFocus,onBlur:this.textInputOnBlur,light:this.props.controller.getLight(),invalid:u,invalidText:a.get_1(this.state.titleValidation,"message"),warn:p,warnText:a.get_1(this.state.titleValidation,"message")},this.state.focused&&{className:"properties-title-editor-focused"})),i.includes(a.get_1(this.state.titleValidation,"type"))?null:c),this.headingEnabled||i.includes(a.get_1(this.state.titleValidation,"type"))?null:f)}}]),i}(r.Component),Tl=c.connect((function(e,t){return{title:e.componentMetadataReducer.title}}),(function(e,t){return{setTitle:function(t){e(Pe(t))}}}))(Sl),Il='/*\n * Copyright 2017-2023 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 flyoutWidthMax: 900px;\n}';function Cl(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 Rl=parseInt(Il.flyoutWidthSmall,10),Al=parseInt(Il.flyoutWidthMedium,10),kl=parseInt(Il.flyoutWidthLarge,10),Ol=parseInt(Il.flyoutWidthMax,10),wl=function(r){t._inherits(u,r);var p=Cl(u);function u(r){var o;e._classCallCheck(this,u),(o=p.call(this,r)).propertiesController=new ml,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,tooltipLinkHandler:r.callbacks.tooltipLinkHandler}),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:s.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())}e.propertiesConfig&&!o.isEqual_1(e.propertiesConfig,this.propertiesController.getPropertiesConfig())&&this.propertiesController.setPropertiesConfig(e.propertiesConfig)}},{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&&bl(e.parameterDef),t=Mr.makeForm(e.parameterDef,this.props.propertiesConfig.containerType)),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:o.formatMessage(this.props.intl,s.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,s.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,s.MESSAGE_KEYS.PROPERTIES_ACTION_LABEL,{node_label:this.propertiesController.getTitle()})}},{key:"getEditorSize",value:function(){var e=this.propertiesController.getForm().editorSize,t=this.props.propertiesInfo.initialEditorSize;return(e!==o.Size.SMALL||t!==o.Size.LARGE&&t!==o.Size.MAX)&&(e!==o.Size.MEDIUM||t!==o.Size.SMALL&&t!==o.Size.MAX)&&(e!==o.Size.LARGE||t!==o.Size.SMALL&&t!==o.Size.MEDIUM)?e===o.Size.MAX?e:t||e: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?this.state.editorSize===o.Size.LARGE&&e.min?r=e.min:this.state.editorSize===o.Size.MAX&&e.max&&(r=e.max):t===o.Size.MAX&&e.max&&(r=e.max)),r}},{key:"_getResizeButton",value:function(){var e=O.default.createElement(h.Icon,{type:s.CARBON_ICONS.CHEVRONARROWS.LEFT,className:"properties-resize-caret-left"});return this.propertiesController.getForm().editorSize===o.Size.SMALL?this.state.editorSize===o.Size.MEDIUM&&(e=O.default.createElement(h.Icon,{type:s.CARBON_ICONS.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===o.Size.MEDIUM?this.state.editorSize===o.Size.LARGE&&(e=O.default.createElement(h.Icon,{type:s.CARBON_ICONS.CHEVRONARROWS.RIGHT,className:"properties-resize-caret-right"})):this.propertiesController.getForm().editorSize===o.Size.LARGE&&this.state.editorSize===o.Size.MAX&&(e=O.default.createElement(h.Icon,{type:s.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>=Al)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+Al),!1;if(!e.min&&e.max&&e.max<=Rl)return o.logger.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Rl),!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>=kl)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+kl),!1;if(!e.min&&e.max&&e.max<=Al)return o.logger.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+Al),!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){if(e.min&&!e.max&&e.min>=Ol)return o.logger.warn("No resize button shown. Pixel width min size is greater than or equal to default max size: "+Ol),!1;if(!e.min&&e.max&&e.max<=kl)return o.logger.warn("No resize button shown. Pixel width max size is less than or equal to default min size: "+kl),!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.MAX)return!!e.min&&(o.logger.warn("No resize button shown. Pixel width min size ignored."),!1)}else if(this.propertiesController.getForm().editorSize===o.Size.MAX)return!1;return!0}return!1}},{key:"_setValueInforProperties",value:function(e,t){var r=t&&!0===t.applyProperties,o=this.props.propertiesConfig.conditionReturnValueHandling===s.CONDITION_RETURN_VALUE_HANDLING.NULL,n=this.propertiesController.getPropertyValues({filterHiddenDisabled:o,applyProperties:r,valueFilters:this.props.propertiesConfig.returnValueFiltering});return this.uiParameterKeys.length>0?(e.properties=i.omit_1(n,this.uiParameterKeys),e.uiProperties=U(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(a.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 Fr(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(s.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):this.propertiesController.getForm().editorSize===o.Size.LARGE&&(this.state.editorSize===o.Size.LARGE?this.updateEditorSize(o.Size.MAX):this.updateEditorSize(o.Size.LARGE))}},{key:"render",value:function(){var e=this,t=this.props.propertiesConfig.applyOnBlur&&this.props.propertiesConfig.rightFlyout,r=this.cancelHandler.bind(this,s.CANCEL);t&&(r=null);var n=this.getApplyButtonLabel(),a=this.getRejectButtonLabel(),i=this.propertiesController.getTitle(),p=this.propertiesController.getForm();if(null!==p){var u=[],d=O.default.createElement("div",null),f=O.default.createElement("div",null),h=null,m=!1;if(this.props.propertiesConfig.rightFlyout&&(d=O.default.createElement(Tl,{labelEditable:p.labelEditable,help:p.help,controller:this.propertiesController,helpClickHandler:this.props.callbacks.helpClickHandler,closeHandler:t?this.applyPropertiesEditing.bind(this,!0):null,icon:p.icon,heading:p.heading,showHeading:this.props.propertiesConfig.heading,rightFlyoutTabsView:this.props.propertiesConfig.categoryView===s.CATEGORY_VIEW.TABS}),m=this.props.propertiesConfig.heading&&(p.icon||p.heading),f=O.default.createElement(Z,{controller:this.propertiesController,okHandler:t?null:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,applyLabel:n,rejectLabel:a,showPropertiesButtons:this.state.showPropertiesButtons,disableSaveOnRequiredErrors:this.props.propertiesConfig.disableSaveOnRequiredErrors}),this._isResizeButtonRequired())){var y=this._getResizeButton(),v=y.props&&"properties-resize-caret-left"===y.props.className?o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIESEDIT_RESIZEBUTTON_EXPAND_LABEL):o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIESEDIT_RESIZEBUTTON_CONTRACT_LABEL);h=O.default.createElement(l.Button,{kind:"ghost",className:"properties-btn-resize",onClick:this.resize.bind(this),"aria-label":v},y)}var g=O.default.createElement(Dt,{key:"editor-form-key",controller:this.propertiesController,additionalComponents:this.props.propertiesInfo.additionalComponents,showPropertiesButtons:this.showPropertiesButtons,customPanels:this.props.customPanels,rightFlyout:this.props.propertiesConfig.rightFlyout,categoryView:this.props.propertiesConfig.categoryView});u="Editing"===this.props.propertiesConfig.containerType?O.default.createElement(Y,{applyLabel:n,rejectLabel:a,bsSize:this.state.editorSize,title:i,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons},g):"Custom"===this.props.propertiesConfig.containerType?O.default.createElement("div",{className:s.classNames("properties-custom-container",{"properties-custom-container-with-heading":!t&&m,"properties-custom-container-applyOnBlur":t&&!m,"properties-custom-container-applyOnBlur-with-heading":t&&m})},g):"Tearsheet"===this.props.propertiesConfig.containerType?O.default.createElement(X,{open:!0,onCloseCallback:this.props.propertiesConfig.applyOnBlur?this.applyPropertiesEditing.bind(this,!0):null,tearsheet:{title:i,content:g},applyLabel:n,rejectLabel:a,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyOnBlur:this.props.propertiesConfig.applyOnBlur}):O.default.createElement(j,{onHide:this.props.callbacks.closePropertiesDialog,title:i,bsSize:this.state.editorSize,okHandler:this.applyPropertiesEditing.bind(this,!0),cancelHandler:r,showPropertiesButtons:this.state.showPropertiesButtons,applyLabel:n,rejectLabel:a},g);var E=s.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)),b=this._getOverrideSize(),_=null;return null!==b&&(_={width:b+"px"}),O.default.createElement(c.Provider,{store:this.propertiesController.getStore()},O.default.createElement("aside",{"aria-label":o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_LABEL,{label:i}),role:"complementary",ref:function(t){return e.commonProperties=t},className:E,onBlur:this.onBlur,style:_},h,d,u,f))}return O.default.createElement("div",null)}}]),u}(O.default.Component),Nl=u.injectIntl(wl,{forwardRef:!0});function Pl(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 Dl=function(r){t._inherits(a,r);var n=Pl(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}),O.default.createElement(Nl,{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,s.MESSAGE_KEYS.PROPERTIES_UNEXPECTED_MESSAGE),type:"error"},n=O.default.createElement("div",{className:"properties-error-heading"},O.default.createElement(zn,{messageInfo:r})),a=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_SUPPORT_MESSAGE),i=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIESEDIT_CLOSEBUTTON_LABEL),l=this.props.callbacks.closePropertiesDialog,p=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIESEDIT_REVERTBUTTON_LABEL),u=this.revertState,c=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_ERROR_LABEL);return"Custom"===this.props.propertiesConfig.containerType?(!0===this.propertiesMainHasMounted?(e=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_REVERT_MESSAGE),t=O.default.createElement("div",{className:"properties-modal-buttons"},O.default.createElement(o.PropertiesButtons,{className:"properties-error-display-close-button",okHandler:l,cancelHandler:u,showPropertiesButtons:!0,applyLabel:i,rejectLabel:p}))):(e=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_CLOSE_MESSAGE),t=O.default.createElement("div",{className:"properties-modal-buttons"},O.default.createElement(o.PropertiesButtons,{className:"properties-error-display-close-button",okHandler:l,showPropertiesButtons:!0,applyLabel:i}))),this.props.propertiesConfig.rightFlyout?O.default.createElement("aside",{"aria-label":c,role:"complementary",className:"properties-wrapper properties-right-flyout properties-small"},O.default.createElement("div",{className:"properties-flyout-error-container"},n,O.default.createElement("br",null),O.default.createElement("br",null),O.default.createElement("div",{className:"properties-error-content"},e,O.default.createElement("br",null),a)),t):O.default.createElement("aside",{"aria-label":c,role:"complementary",className:"properties-wrapper properties-custom-container"},O.default.createElement("div",{className:"properties-flyout-error-container"},n,O.default.createElement("br",null),O.default.createElement("br",null),O.default.createElement("div",{className:"properties-error-content"},e,O.default.createElement("br",null),a)),t)):(!0===this.propertiesMainHasMounted?(e=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_REVERT_MESSAGE),t=O.default.createElement(j,{bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:p,okHandler:l,cancelHandler:u,title:n},O.default.createElement("div",{className:"properties-modal-container properties-error-content"},e,O.default.createElement("br",null),a))):(e=o.formatMessage(this.props.intl,s.MESSAGE_KEYS.PROPERTIES_CLOSE_MESSAGE),t=O.default.createElement("div",{className:"properties-modal-error"},O.default.createElement(j,{okHandler:l,bsSize:"large",showPropertiesButtons:!0,applyLabel:i,rejectLabel:"null",title:n},O.default.createElement("div",{className:"properties-modal-container properties-error-content"},e,O.default.createElement("br",null),a)))),t)}},{key:"render",value:function(){return this.state.hasError?this.displayAppropriateUIFallback():this.createPropertiesMainComponent()}}]),a}(O.default.Component);Dl.defaultProps={propertiesConfig:{containerType:"Custom",rightFlyout:!0,categoryView:s.CATEGORY_VIEW.ACCORDIONS,applyOnBlur:!1,trimSpaces:!0,disableSaveOnRequiredErrors:!1,enableResize:!0,conditionReturnValueHandling:"value",schemaValidation:!1,applyPropertiesWithoutEdit:!1,maxLengthForMultiLineControls:1024,maxLengthForSingleLineControls:128,convertValueDataTypes:!1,showRequiredIndicator:!0,locale:s.DEFAULT_LOCALE},callbacks:{},light:!0};var Ll=u.injectIntl(Dl,{forwardRef:!0});exports.Form=Mr,exports.PropertiesController=ml,exports.commonProperties=Ll;
2
- //# sourceMappingURL=common-properties-c5292c66.js.map