@elliemae/ds-datagrids 1.58.0-rc.2 → 1.58.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.
- package/cjs/plugins/editable/EditableComponents/ComboBox.js +2 -4
- package/cjs/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/cjs/plugins/editable/EditableComponents/TextBox.js +2 -4
- package/cjs/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/cjs/plugins/editable/EditableComponents/index.js +0 -1
- package/cjs/plugins/editable/EditableComponents/index.js.map +1 -1
- package/esm/plugins/editable/EditableComponents/ComboBox.js +2 -3
- package/esm/plugins/editable/EditableComponents/ComboBox.js.map +1 -1
- package/esm/plugins/editable/EditableComponents/TextBox.js +2 -3
- package/esm/plugins/editable/EditableComponents/TextBox.js.map +1 -1
- package/esm/plugins/editable/EditableComponents/index.js +0 -1
- package/esm/plugins/editable/EditableComponents/index.js.map +1 -1
- package/package.json +15 -15
|
@@ -7,7 +7,6 @@ var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitializ
|
|
|
7
7
|
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
8
8
|
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
9
9
|
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
10
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
10
|
var React = require('react');
|
|
12
11
|
var dsForm = require('@elliemae/ds-form');
|
|
13
12
|
|
|
@@ -20,7 +19,6 @@ var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assert
|
|
|
20
19
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
21
20
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
22
21
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
23
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
24
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
23
|
|
|
26
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
|
|
@@ -86,11 +84,11 @@ var ComboBox = /*#__PURE__*/function (_Component) {
|
|
|
86
84
|
return ComboBox;
|
|
87
85
|
}(React.Component);
|
|
88
86
|
|
|
89
|
-
|
|
87
|
+
ComboBox.defaultProps = {
|
|
90
88
|
onValue: function onValue() {
|
|
91
89
|
return null;
|
|
92
90
|
}
|
|
93
|
-
}
|
|
91
|
+
};
|
|
94
92
|
|
|
95
93
|
module.exports = ComboBox;
|
|
96
94
|
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nexport default class ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange(value) {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur() {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n"],"names":["ComboBox","props","state","value","onValue","setTimeout","setState","React","DSComboBox","handleBlur","handleChange","e","stopPropagation","Component"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nexport default class ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange(value) {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur() {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n"],"names":["ComboBox","props","state","value","onValue","setTimeout","setState","React","DSComboBox","handleBlur","handleChange","e","stopPropagation","Component","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAGqBA;;;;;AAKnB,oBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;AACA,UAAKC,KAAL,GAAa;AAAEC,MAAAA,KAAK,EAAEF,KAAK,CAACE;AAAf,KAAb;AAFiB;AAAA;AAAA;AAGlB;;;;WAED,sBAAaA,KAAb,EAAoB;AAClB,UAAQC,OAAR,GAAoB,KAAKH,KAAzB,CAAQG,OAAR,CADkB;AAIlB;AACA;;AACAC,MAAAA,UAAU,CAAC;AAAA,eAAMD,OAAO,CAACD,KAAD,CAAb;AAAA,OAAD,EAAuB,CAAvB,CAAV;AACA,WAAKG,QAAL,CAAc;AAAEH,QAAAA,KAAK,EAALA;AAAF,OAAd;AACD;;;WAED,sBAAa;AACX,UAAQC,OAAR,GAAoB,KAAKH,KAAzB,CAAQG,OAAR;AACA,UAAQD,KAAR,GAAkB,KAAKD,KAAvB,CAAQC,KAAR;AACAC,MAAAA,OAAO,CAACD,KAAD,CAAP;AACD;;;WAED,kBAAS;AACP,UAAQA,KAAR,GAAkB,KAAKD,KAAvB,CAAQC,KAAR;AACA,0BACEI,wCAACC,iBAAD,mCACM,KAAKP,KADX;AAEE,QAAA,UAAU,MAFZ;AAGE,QAAA,MAAM,EAAE,KAAKQ,UAHf;AAIE,QAAA,QAAQ,EAAE,KAAKC,YAJjB;AAKE,QAAA,OAAO,EAAE,iBAACC,CAAD;AAAA,iBAAOA,CAAC,CAACC,eAAF,EAAP;AAAA,SALX;AAME,QAAA,KAAK,EAAET;AANT,SADF;AAUD;;;;EAtCmCU;;AAAjBb,SACZc,eAAe;AACpBV,EAAAA,OAAO,EAAE;AAAA,WAAM,IAAN;AAAA;AADW;;;;"}
|
|
@@ -7,7 +7,6 @@ var _assertThisInitialized = require('@babel/runtime/helpers/assertThisInitializ
|
|
|
7
7
|
var _inherits = require('@babel/runtime/helpers/inherits');
|
|
8
8
|
var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
9
9
|
var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
|
|
10
|
-
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
11
10
|
var React = require('react');
|
|
12
11
|
var dsForm = require('@elliemae/ds-form');
|
|
13
12
|
|
|
@@ -20,7 +19,6 @@ var _assertThisInitialized__default = /*#__PURE__*/_interopDefaultLegacy(_assert
|
|
|
20
19
|
var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
21
20
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
22
21
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
23
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
24
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
23
|
|
|
26
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default['default'](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default['default'](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default['default'](this, result); }; }
|
|
@@ -117,11 +115,11 @@ var TextBox = /*#__PURE__*/function (_Component) {
|
|
|
117
115
|
return TextBox;
|
|
118
116
|
}(React.Component);
|
|
119
117
|
|
|
120
|
-
|
|
118
|
+
TextBox.defaultProps = {
|
|
121
119
|
onValue: function onValue() {
|
|
122
120
|
return null;
|
|
123
121
|
}
|
|
124
|
-
}
|
|
122
|
+
};
|
|
125
123
|
|
|
126
124
|
module.exports = TextBox;
|
|
127
125
|
//# sourceMappingURL=TextBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nexport default class TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp({ key, target: { value } }) {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown(e) {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur(e) {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange({ target: { value } }) {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n"],"names":["TextBox","props","inputRef","React","createRef","state","value","setTimeout","current","focus","key","target","onValue","e","preventDefault","setState","DSTextBox","handleBlur","handleChange","stopPropagation","handleKeyUp","handleKeyDown","Component"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nexport default class TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp({ key, target: { value } }) {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown(e) {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur(e) {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange({ target: { value } }) {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n"],"names":["TextBox","props","inputRef","React","createRef","state","value","setTimeout","current","focus","key","target","onValue","e","preventDefault","setState","DSTextBox","handleBlur","handleChange","stopPropagation","handleKeyUp","handleKeyDown","Component","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;IAMqBA;;;;;AAKnB,mBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;AACA,UAAKC,QAAL,gBAAgBC,yBAAK,CAACC,SAAN,EAAhB;AACA,UAAKC,KAAL,GAAa;AAAEC,MAAAA,KAAK,EAAEL,KAAK,CAACK;AAAf,KAAb;AAHiB;AAAA;AAAA;AAAA;AAAA;AAIlB;;;;WAED,6BAAoB;AAAA;;AAClBC,MAAAA,UAAU,CAAC,YAAM;AACf,YAAI,MAAI,CAACL,QAAL,IAAiB,MAAI,CAACA,QAAL,CAAcM,OAAnC,EAA4C;AAC1C,UAAA,MAAI,CAACN,QAAL,CAAcM,OAAd,CAAsBC,KAAtB;AACD;AACF,OAJS,EAIP,EAJO,CAAV;AAKD;;;WAED,2BAAwC;AAAA,UAA1BC,GAA0B,QAA1BA,GAA0B;AAAA,UAAXJ,KAAW,QAArBK,MAAqB,CAAXL,KAAW;AACtC,UAAQM,OAAR,GAAoB,KAAKX,KAAzB,CAAQW,OAAR;;AACA,UAAIF,GAAG,KAAK,OAAZ,EAAqB;AACnBE,QAAAA,OAAO,CAACN,KAAD,CAAP;AACD;AACF;;;WAED,uBAAcO,CAAd,EAAiB;AACf;AACA,UAAIA,CAAC,CAACH,GAAF,KAAU,OAAd,EAAuB;AACrBG,QAAAA,CAAC,CAACC,cAAF;AACD;AACF;;;WAED,oBAAWD,CAAX,EAAc;AACZ,UAAQD,OAAR,GAAoB,KAAKX,KAAzB,CAAQW,OAAR;AACA,UACYN,KADZ,GAEIO,CAFJ,CACEF,MADF,CACYL,KADZ;AAGAM,MAAAA,OAAO,CAACN,KAAD,CAAP;AACD;;;WAED,6BAAoC;AAAA,UAAXA,KAAW,SAArBK,MAAqB,CAAXL,KAAW;AAClC,WAAKS,QAAL,CAAc;AAAET,QAAAA,KAAK,EAALA;AAAF,OAAd;AACD;;;WAED,kBAAS;AACP,UAAQA,KAAR,GAAkB,KAAKD,KAAvB,CAAQC,KAAR;AACA,0BACEH,wCAACa,gBAAD;AACE,uBAAY;AADd,SAEM,KAAKf,KAFX;AAGE,QAAA,QAAQ,EAAE,KAAKC,QAHjB;AAIE,QAAA,MAAM,EAAE,KAAKe,UAJf;AAKE,QAAA,QAAQ,EAAE,KAAKC,YALjB;AAME,QAAA,OAAO,EAAE,iBAACL,CAAD;AAAA,iBAAOA,CAAC,CAACM,eAAF,EAAP;AAAA,SANX;AAOE,QAAA,OAAO,EAAE,KAAKC,WAPhB;AAQE,QAAA,SAAS,EAAE,KAAKC,aARlB;AASE,QAAA,KAAK,EAAEf;AATT,SADF;AAaD;;;;EA5DkCgB;;AAAhBtB,QACZuB,eAAe;AACpBX,EAAAA,OAAO,EAAE;AAAA,WAAM,IAAN;AAAA;AADW;;;;"}
|
|
@@ -11,7 +11,6 @@ require('@babel/runtime/helpers/assertThisInitialized');
|
|
|
11
11
|
require('@babel/runtime/helpers/inherits');
|
|
12
12
|
require('@babel/runtime/helpers/possibleConstructorReturn');
|
|
13
13
|
require('@babel/runtime/helpers/getPrototypeOf');
|
|
14
|
-
require('@babel/runtime/helpers/defineProperty');
|
|
15
14
|
require('react');
|
|
16
15
|
require('@elliemae/ds-form');
|
|
17
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,6 @@ import _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitial
|
|
|
5
5
|
import _inherits from '@babel/runtime/helpers/esm/inherits';
|
|
6
6
|
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
|
|
7
7
|
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
|
|
8
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
9
8
|
import React, { Component } from 'react';
|
|
10
9
|
import { DSComboBox } from '@elliemae/ds-form';
|
|
11
10
|
|
|
@@ -72,11 +71,11 @@ var ComboBox = /*#__PURE__*/function (_Component) {
|
|
|
72
71
|
return ComboBox;
|
|
73
72
|
}(Component);
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
ComboBox.defaultProps = {
|
|
76
75
|
onValue: function onValue() {
|
|
77
76
|
return null;
|
|
78
77
|
}
|
|
79
|
-
}
|
|
78
|
+
};
|
|
80
79
|
|
|
81
80
|
export { ComboBox as default };
|
|
82
81
|
//# sourceMappingURL=ComboBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nexport default class ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange(value) {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur() {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n"],"names":["ComboBox","props","state","value","onValue","setTimeout","setState","handleBlur","handleChange","e","stopPropagation","Component"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComboBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/ComboBox.tsx"],"sourcesContent":["import React, { Component } from 'react';\nimport { DSComboBox } from '@elliemae/ds-form';\n\nexport default class ComboBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.state = { value: props.value };\n }\n\n handleChange(value) {\n const { onValue } = this.props;\n\n // some how this is executed before handleBlur, and handleBlur before the value is set\n // causing the value to be the same as the prevProp\n // todo: find a better solution to this\n setTimeout(() => onValue(value), 1);\n this.setState({ value });\n }\n\n handleBlur() {\n const { onValue } = this.props;\n const { value } = this.state;\n onValue(value);\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSComboBox\n {...this.props}\n menuIsOpen\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n value={value}\n />\n );\n }\n}\n"],"names":["ComboBox","props","state","value","onValue","setTimeout","setState","handleBlur","handleChange","e","stopPropagation","Component","defaultProps"],"mappings":";;;;;;;;;;;;;;IAGqBA;;;;;AAKnB,oBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;AACA,UAAKC,KAAL,GAAa;AAAEC,MAAAA,KAAK,EAAEF,KAAK,CAACE;AAAf,KAAb;AAFiB;AAAA;AAAA;AAGlB;;;;WAED,sBAAaA,KAAb,EAAoB;AAClB,UAAQC,OAAR,GAAoB,KAAKH,KAAzB,CAAQG,OAAR,CADkB;AAIlB;AACA;;AACAC,MAAAA,UAAU,CAAC;AAAA,eAAMD,OAAO,CAACD,KAAD,CAAb;AAAA,OAAD,EAAuB,CAAvB,CAAV;AACA,WAAKG,QAAL,CAAc;AAAEH,QAAAA,KAAK,EAALA;AAAF,OAAd;AACD;;;WAED,sBAAa;AACX,UAAQC,OAAR,GAAoB,KAAKH,KAAzB,CAAQG,OAAR;AACA,UAAQD,KAAR,GAAkB,KAAKD,KAAvB,CAAQC,KAAR;AACAC,MAAAA,OAAO,CAACD,KAAD,CAAP;AACD;;;WAED,kBAAS;AACP,UAAQA,KAAR,GAAkB,KAAKD,KAAvB,CAAQC,KAAR;AACA,0BACE,oBAAC,UAAD,eACM,KAAKF,KADX;AAEE,QAAA,UAAU,MAFZ;AAGE,QAAA,MAAM,EAAE,KAAKM,UAHf;AAIE,QAAA,QAAQ,EAAE,KAAKC,YAJjB;AAKE,QAAA,OAAO,EAAE,iBAACC,CAAD;AAAA,iBAAOA,CAAC,CAACC,eAAF,EAAP;AAAA,SALX;AAME,QAAA,KAAK,EAAEP;AANT,SADF;AAUD;;;;EAtCmCQ;;AAAjBX,SACZY,eAAe;AACpBR,EAAAA,OAAO,EAAE;AAAA,WAAM,IAAN;AAAA;AADW;;;;"}
|
|
@@ -5,7 +5,6 @@ import _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitial
|
|
|
5
5
|
import _inherits from '@babel/runtime/helpers/esm/inherits';
|
|
6
6
|
import _possibleConstructorReturn from '@babel/runtime/helpers/esm/possibleConstructorReturn';
|
|
7
7
|
import _getPrototypeOf from '@babel/runtime/helpers/esm/getPrototypeOf';
|
|
8
|
-
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
9
8
|
import React, { Component } from 'react';
|
|
10
9
|
import { DSTextBox } from '@elliemae/ds-form';
|
|
11
10
|
|
|
@@ -103,11 +102,11 @@ var TextBox = /*#__PURE__*/function (_Component) {
|
|
|
103
102
|
return TextBox;
|
|
104
103
|
}(Component);
|
|
105
104
|
|
|
106
|
-
|
|
105
|
+
TextBox.defaultProps = {
|
|
107
106
|
onValue: function onValue() {
|
|
108
107
|
return null;
|
|
109
108
|
}
|
|
110
|
-
}
|
|
109
|
+
};
|
|
111
110
|
|
|
112
111
|
export { TextBox as default };
|
|
113
112
|
//# sourceMappingURL=TextBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nexport default class TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp({ key, target: { value } }) {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown(e) {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur(e) {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange({ target: { value } }) {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n"],"names":["TextBox","props","inputRef","React","createRef","state","value","setTimeout","current","focus","key","target","onValue","e","preventDefault","setState","handleBlur","handleChange","stopPropagation","handleKeyUp","handleKeyDown","Component"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextBox.js","sources":["../../../../../src/plugins/editable/EditableComponents/TextBox.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\n/* eslint-disable react/static-property-placement */\nimport React, { Component } from 'react';\nimport { DSTextBox } from '@elliemae/ds-form';\n\n// todo: redo with hooks\nexport default class TextBox extends Component {\n static defaultProps = {\n onValue: () => null,\n };\n\n constructor(props) {\n super(props);\n this.inputRef = React.createRef();\n this.state = { value: props.value };\n }\n\n componentDidMount() {\n setTimeout(() => {\n if (this.inputRef && this.inputRef.current) {\n this.inputRef.current.focus();\n }\n }, 50);\n }\n\n handleKeyUp({ key, target: { value } }) {\n const { onValue } = this.props;\n if (key === 'Enter') {\n onValue(value);\n }\n }\n\n handleKeyDown(e) {\n // PUI-2553 prevent form submit on `Enter` keypress\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }\n\n handleBlur(e) {\n const { onValue } = this.props;\n const {\n target: { value },\n } = e;\n onValue(value);\n }\n\n handleChange({ target: { value } }) {\n this.setState({ value });\n }\n\n render() {\n const { value } = this.state;\n return (\n <DSTextBox\n data-testid=\"ds-datagrids-editable-text-box\"\n {...this.props}\n innerRef={this.inputRef}\n onBlur={this.handleBlur}\n onChange={this.handleChange}\n onClick={(e) => e.stopPropagation()}\n onKeyUp={this.handleKeyUp}\n onKeyDown={this.handleKeyDown}\n value={value}\n />\n );\n }\n}\n"],"names":["TextBox","props","inputRef","React","createRef","state","value","setTimeout","current","focus","key","target","onValue","e","preventDefault","setState","handleBlur","handleChange","stopPropagation","handleKeyUp","handleKeyDown","Component","defaultProps"],"mappings":";;;;;;;;;;;;;;IAMqBA;;;;;AAKnB,mBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;AACA,UAAKC,QAAL,gBAAgBC,KAAK,CAACC,SAAN,EAAhB;AACA,UAAKC,KAAL,GAAa;AAAEC,MAAAA,KAAK,EAAEL,KAAK,CAACK;AAAf,KAAb;AAHiB;AAAA;AAAA;AAAA;AAAA;AAIlB;;;;WAED,6BAAoB;AAAA;;AAClBC,MAAAA,UAAU,CAAC,YAAM;AACf,YAAI,MAAI,CAACL,QAAL,IAAiB,MAAI,CAACA,QAAL,CAAcM,OAAnC,EAA4C;AAC1C,UAAA,MAAI,CAACN,QAAL,CAAcM,OAAd,CAAsBC,KAAtB;AACD;AACF,OAJS,EAIP,EAJO,CAAV;AAKD;;;WAED,2BAAwC;AAAA,UAA1BC,GAA0B,QAA1BA,GAA0B;AAAA,UAAXJ,KAAW,QAArBK,MAAqB,CAAXL,KAAW;AACtC,UAAQM,OAAR,GAAoB,KAAKX,KAAzB,CAAQW,OAAR;;AACA,UAAIF,GAAG,KAAK,OAAZ,EAAqB;AACnBE,QAAAA,OAAO,CAACN,KAAD,CAAP;AACD;AACF;;;WAED,uBAAcO,CAAd,EAAiB;AACf;AACA,UAAIA,CAAC,CAACH,GAAF,KAAU,OAAd,EAAuB;AACrBG,QAAAA,CAAC,CAACC,cAAF;AACD;AACF;;;WAED,oBAAWD,CAAX,EAAc;AACZ,UAAQD,OAAR,GAAoB,KAAKX,KAAzB,CAAQW,OAAR;AACA,UACYN,KADZ,GAEIO,CAFJ,CACEF,MADF,CACYL,KADZ;AAGAM,MAAAA,OAAO,CAACN,KAAD,CAAP;AACD;;;WAED,6BAAoC;AAAA,UAAXA,KAAW,SAArBK,MAAqB,CAAXL,KAAW;AAClC,WAAKS,QAAL,CAAc;AAAET,QAAAA,KAAK,EAALA;AAAF,OAAd;AACD;;;WAED,kBAAS;AACP,UAAQA,KAAR,GAAkB,KAAKD,KAAvB,CAAQC,KAAR;AACA,0BACE,oBAAC,SAAD;AACE,uBAAY;AADd,SAEM,KAAKL,KAFX;AAGE,QAAA,QAAQ,EAAE,KAAKC,QAHjB;AAIE,QAAA,MAAM,EAAE,KAAKc,UAJf;AAKE,QAAA,QAAQ,EAAE,KAAKC,YALjB;AAME,QAAA,OAAO,EAAE,iBAACJ,CAAD;AAAA,iBAAOA,CAAC,CAACK,eAAF,EAAP;AAAA,SANX;AAOE,QAAA,OAAO,EAAE,KAAKC,WAPhB;AAQE,QAAA,SAAS,EAAE,KAAKC,aARlB;AASE,QAAA,KAAK,EAAEd;AATT,SADF;AAaD;;;;EA5DkCe;;AAAhBrB,QACZsB,eAAe;AACpBV,EAAAA,OAAO,EAAE;AAAA,WAAM,IAAN;AAAA;AADW;;;;"}
|
|
@@ -7,7 +7,6 @@ import '@babel/runtime/helpers/esm/assertThisInitialized';
|
|
|
7
7
|
import '@babel/runtime/helpers/esm/inherits';
|
|
8
8
|
import '@babel/runtime/helpers/esm/possibleConstructorReturn';
|
|
9
9
|
import '@babel/runtime/helpers/esm/getPrototypeOf';
|
|
10
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
11
10
|
import 'react';
|
|
12
11
|
import '@elliemae/ds-form';
|
|
13
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-datagrids",
|
|
3
|
-
"version": "1.58.0
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Data Grids",
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -20,20 +20,20 @@
|
|
|
20
20
|
"directory": "dist"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@elliemae/ds-basic": "1.58.0
|
|
24
|
-
"@elliemae/ds-classnames": "1.58.0
|
|
25
|
-
"@elliemae/ds-controlled-form": "1.58.0
|
|
26
|
-
"@elliemae/ds-datagrids": "1.58.0
|
|
27
|
-
"@elliemae/ds-date-picker": "1.58.0
|
|
28
|
-
"@elliemae/ds-date-range-picker": "1.58.0
|
|
29
|
-
"@elliemae/ds-dropdownmenu": "1.58.0
|
|
30
|
-
"@elliemae/ds-filterbar": "1.58.0
|
|
31
|
-
"@elliemae/ds-grid": "1.58.0
|
|
32
|
-
"@elliemae/ds-icons": "1.58.0
|
|
33
|
-
"@elliemae/ds-menu": "1.58.0
|
|
34
|
-
"@elliemae/ds-shared": "1.58.0
|
|
35
|
-
"@elliemae/ds-system": "1.58.0
|
|
36
|
-
"@elliemae/ds-utilities": "1.58.0
|
|
23
|
+
"@elliemae/ds-basic": "1.58.0",
|
|
24
|
+
"@elliemae/ds-classnames": "1.58.0",
|
|
25
|
+
"@elliemae/ds-controlled-form": "1.58.0",
|
|
26
|
+
"@elliemae/ds-datagrids": "1.58.0",
|
|
27
|
+
"@elliemae/ds-date-picker": "1.58.0",
|
|
28
|
+
"@elliemae/ds-date-range-picker": "1.58.0",
|
|
29
|
+
"@elliemae/ds-dropdownmenu": "1.58.0",
|
|
30
|
+
"@elliemae/ds-filterbar": "1.58.0",
|
|
31
|
+
"@elliemae/ds-grid": "1.58.0",
|
|
32
|
+
"@elliemae/ds-icons": "1.58.0",
|
|
33
|
+
"@elliemae/ds-menu": "1.58.0",
|
|
34
|
+
"@elliemae/ds-shared": "1.58.0",
|
|
35
|
+
"@elliemae/ds-system": "1.58.0",
|
|
36
|
+
"@elliemae/ds-utilities": "1.58.0",
|
|
37
37
|
"comparejs": "~1.0.3",
|
|
38
38
|
"memoize-one": "~5.1.1",
|
|
39
39
|
"moment": "~2.29.1",
|