@shopgate/pwa-common 7.27.0-beta.3 → 7.27.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,6 +5,6 @@ var _excluded=["children","testId","className","disabled","onClick"];function _t
|
|
|
5
5
|
* @returns {Object}
|
|
6
6
|
*/function get(){var _this$props=this.props,children=_this$props.children,testId=_this$props.testId,className=_this$props.className,disabled=_this$props.disabled,onClick=_this$props.onClick,props=_objectWithoutProperties(_this$props,_excluded);var buttonProps=_extends({className:"".concat(className," ").concat(style," common__button"),disabled:disabled,onClick:disabled?null:onClick},props);return buttonProps;}/**
|
|
7
7
|
* Renders the component.
|
|
8
|
-
* @returns {JSX}
|
|
8
|
+
* @returns {JSX.Element}
|
|
9
9
|
*/},{key:"render",value:function render(){return(// eslint-disable-next-line react/button-has-type
|
|
10
10
|
React.createElement("button",_extends({"data-test-id":this.props.testId},this.buttonProps),this.props.children));}}]);}(Component);_defineProperty(Button,"defaultProps",{className:'',disabled:false,onClick:null,testId:'Button'});export default Button;
|
|
@@ -23,4 +23,4 @@ this.doComponentDidMount();}/**
|
|
|
23
23
|
*/function handleRef(ref){_get(_getPrototypeOf(MultiLineInput.prototype),"handleRef",this).call(this,ref);this.setBaseHeight();}/**
|
|
24
24
|
* Renders the component.
|
|
25
25
|
* @returns {JSX}
|
|
26
|
-
*/},{key:"render",value:function render(){var _this3=this;var _this$props=this.props,className=_this$props.className,password=_this$props.password,attributes=_this$props.attributes;var type=password?'password':this.props.type;var value=this.state.value;return React.createElement("textarea",_extends({id:this.props.id,name:this.props.name,ref:function ref(_ref){return _this3.handleRef(_ref);},className:classNames(className,'multiLineInput','common__multi-line-input'),type:type,value:value,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:
|
|
26
|
+
*/},{key:"render",value:function render(){var _this3=this;var _this$props=this.props,className=_this$props.className,password=_this$props.password,attributes=_this$props.attributes,disabled=_this$props.disabled,required=_this$props.required;var type=password?'password':this.props.type;var value=this.state.value;return React.createElement("textarea",_extends({id:this.props.id,name:this.props.name,ref:function ref(_ref){return _this3.handleRef(_ref);},className:classNames(className,'multiLineInput','common__multi-line-input'),type:type,value:value,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,required:required,disabled:disabled},attributes));}}]);}(SimpleInput);export default MultiLineInput;
|
|
@@ -45,7 +45,7 @@ var _sanitizedValue=_this2.props.onSanitize(_this2.props.value||'');_this2.state
|
|
|
45
45
|
newState.isValid=this.props.onValidate(newValue,false);}// Uncontrolled when setOwnState is true
|
|
46
46
|
if(setOwnState){this.setState(newState);}}/**
|
|
47
47
|
* Renders the component.
|
|
48
|
-
* @returns {JSX}
|
|
49
|
-
*/},{key:"render",value:function render(){var _this3=this;var _this$props=this.props,attributes=_this$props.attributes,className=_this$props.className,password=_this$props.password,onKeyPress=_this$props.onKeyPress,maxLength=_this$props.maxLength;var type=password?'password':this.props.type;var value=this.state.value;var autoComplete=this.props.autoComplete?'on':'off';var autoCorrect=this.props.autoCorrect?'on':'off';var InputComponent=this.props.inputComponent;return React.createElement(InputComponent,_extends({id:
|
|
48
|
+
* @returns {JSX.Element}
|
|
49
|
+
*/},{key:"render",value:function render(){var _this3=this;var _this$props=this.props,attributes=_this$props.attributes,className=_this$props.className,disabled=_this$props.disabled,id=_this$props.id,name=_this$props.name,password=_this$props.password,onKeyPress=_this$props.onKeyPress,maxLength=_this$props.maxLength,required=_this$props.required;var type=password?'password':this.props.type;var value=this.state.value;var autoComplete=this.props.autoComplete?'on':'off';var autoCorrect=this.props.autoCorrect?'on':'off';var InputComponent=this.props.inputComponent;return React.createElement(InputComponent,_extends({id:id,name:name,ref:function ref(_ref){return _this3.handleRef(_ref);},className:classNames(className,'simpleInput','common__simple-input'),type:type,inputMode:type==='number'?'decimal':null,pattern:type==='number'?'[0-9]*':null,min:type==='number'?0:null,step:type==='number'?'any':null,value:value,onKeyPress:onKeyPress// Use onInput for number fields to enable handling for invalid values
|
|
50
50
|
// (onChange might to be triggered when the input is invalid)
|
|
51
|
-
,onInput:type==='number'?this.handleChange:null,onChange:type!=='number'?this.handleChange:function(){},onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:
|
|
51
|
+
,onInput:type==='number'?this.handleChange:null,onChange:type!=='number'?this.handleChange:function(){},onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:disabled,autoCorrect:autoCorrect,autoComplete:autoComplete,maxLength:maxLength,required:required},attributes));}}]);}(Component);_defineProperty(SimpleInput,"defaultProps",{attributes:null,autoComplete:false,autoCorrect:false,className:'',disabled:false,id:null,isControlled:false,maxLength:'',name:null,onChange:function onChange(){},onFocusChange:function onFocusChange(){},onKeyPress:function onKeyPress(){},onSanitize:function onSanitize(value){return value;},onValidate:function onValidate(){return true;},password:false,required:false,setRef:function setRef(){},type:'text',validateOnBlur:true,value:'',inputComponent:'input'});export default SimpleInput;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-common",
|
|
3
|
-
"version": "7.27.
|
|
3
|
+
"version": "7.27.1-beta.1",
|
|
4
4
|
"description": "Common library for the Shopgate Connect PWA.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@redux-devtools/extension": "^3.3.0",
|
|
19
19
|
"@sentry/browser": "6.0.1",
|
|
20
|
-
"@shopgate/pwa-benchmark": "7.27.
|
|
20
|
+
"@shopgate/pwa-benchmark": "7.27.1-beta.1",
|
|
21
21
|
"@virtuous/conductor": "~2.5.0",
|
|
22
22
|
"@virtuous/react-conductor": "~2.5.0",
|
|
23
23
|
"@virtuous/redux-persister": "1.1.0-beta.7",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"url-search-params": "^0.10.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@shopgate/pwa-core": "7.27.
|
|
46
|
+
"@shopgate/pwa-core": "7.27.1-beta.1",
|
|
47
47
|
"@types/react-portal": "^3.0.9",
|
|
48
48
|
"lodash": "^4.17.4",
|
|
49
49
|
"prop-types": "~15.8.1",
|