@comparaonline/ui-wizard-form
Advanced tools
Comparing version 1.1.16 to 1.1.17
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("tslib")},function(e,t){e.exports=require("@material-ui/core/styles")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importStar(r(4));t.mutators=i;var o=n.__importStar(r(8));t.WizardFormLayout=o;var u=r(14);t.WizardForm=u.WizardForm},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.setField=n.setField;var i=r(6);t.setFields=i.setFields;var o=r(7);t.clearFields=o.clearFields},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.setField=function(e,t,r){var n=e[0],i=e[1];return(0,r.changeValue)(t,n,function(){return i})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.setFields=function(e,t,r){var n=e[0],i=r.changeValue;return Object.keys(n).map(function(e){return i(t,e,function(){return n[e]})})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.clearFields=function(e,t,r){var n=r.changeValue;e.map(function(e){return n(t,e,function(){})})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9);t.Actions=n.Actions;var i=r(10);t.Wrapper=i.Wrapper;var o=r(11);t.FloatingButton=o.FloatingButton},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(0)),o=r(2);t.styles=function(e){var t=4*e.spacing.unit;return o.createStyles({actions:{margin:"auto",marginTop:t,marginBottom:t,textAlign:"center"}})};t.Actions=o.withStyles(t.styles)(function(e){var t=e.classes,r=e.children,o=n.__rest(e,["classes","children"]);return i.default.createElement("div",n.__assign({className:t.actions},o),r)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(0)),o=r(2);t.styles=function(e){var t;return{wrapper:(t={margin:"0 auto",maxWidth:48*e.spacing.unit,padding:"0 "+3*e.spacing.unit+"px",width:"100%"},t[e.breakpoints.up("sm")]={maxWidth:85*e.spacing.unit,padding:"0 "+10*e.spacing.unit+"px"},t)}};t.Wrapper=o.withStyles(t.styles)(function(e){var t=e.classes,r=e.children,o=n.__rest(e,["classes","children"]);return i.default.createElement("div",n.__assign({className:t.wrapper},o),r)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importStar(r(0)),o=n.__importDefault(r(12)),u=r(2),s=r(13),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPreviousStep=function(){(0,t.props.previous)()},t}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.isFirstStep,r=e.children,n=e.classes;return i.default.createElement("div",{className:n.container},!t()&&i.default.createElement(o.default,{smDown:!0},i.default.createElement("span",{onClick:this.onPreviousStep,role:"button"},i.default.createElement(s.FontAwesomeIcon,{icon:["fal","chevron-left"],size:"5x",className:n.chevron}))),r)},t}(i.Component);t.FloatingButton=u.withStyles(function(e){var t=e.spacing,r=e.palette;return u.createStyles({container:{position:"relative"},chevron:{position:"absolute",top:15*t.unit,left:10*t.unit,color:r.text.hint,"&:hover":{cursor:"pointer"}}})})(a)},function(e,t){e.exports=require("@material-ui/core/Hidden")},function(e,t){e.exports=require("@comparaonline/ui-offer-icons")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(0)),o=r(15),u=r(16),s=function(e){var t=e.step,r=n.__rest(e,["step"]);if(!t.render)return i.default.createElement("div",null);var o=r.goTo,u=r.isLoading,s=r.previous,a=r.setLoading,c=r.isFirstStep,l=r.isLastStep,d=r.formRenderProps,p=r.values,f=t.render(n.__assign({goTo:o,isLoading:u,previous:s,setLoading:a,id:t.id,isFirst:c(),isLast:l()},d,{values:p}));return i.default.createElement("div",null,f)};t.WizardForm=function(e){var t=e.currentStep,r=e.formProps,a=e.goTo,c=e.router,l=e.stepId,d=e.stepsHistory,p=n.__rest(e,["currentStep","formProps","goTo","router","stepId","stepsHistory"]);if(c&&l){var f=d.filter(function(e){return e.render}).map(function(e){return e.id});u.useRedirectBack({stepId:l,currentStep:t,router:c,goTo:a,stepIdsHistory:f}),u.useRedirectToActiveStep({stepId:l,currentStep:t,router:c})}return i.default.createElement(o.Form,n.__assign({},r),function(e){var r=e.handleSubmit,o=e.values,u=n.__rest(e,["handleSubmit","values"]);return i.default.createElement("form",{noValidate:!0,onSubmit:r},s(n.__assign({},p,{goTo:a,values:o,formRenderProps:u,step:t})))})}},function(e,t){e.exports=require("react-final-form")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(17);t.useRedirectBack=n.useRedirectBack;var i=r(18);t.useRedirectToActiveStep=i.useRedirectToActiveStep},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.useRedirectBack=function(e){var t=e.stepId,r=e.currentStep,i=e.goTo,o=e.stepIdsHistory,u=e.router;return n.useEffect(function(){t!==r.id&&(o.indexOf(t)>-1?i(t):u.replace(r.id))},[t])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.useRedirectToActiveStep=function(e){var t=e.currentStep,r=e.stepId,i=e.router;n.useEffect(function(){t.render&&r!==t.id&&i.push(t.id)},[t.id])}}]); | ||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("tslib")},function(e,t){e.exports=require("@material-ui/core/styles")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importStar(r(4));t.mutators=i;var o=n.__importStar(r(8));t.WizardFormLayout=o;var u=r(15);t.WizardForm=u.WizardForm},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(5);t.setField=n.setField;var i=r(6);t.setFields=i.setFields;var o=r(7);t.clearFields=o.clearFields},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.setField=function(e,t,r){var n=e[0],i=e[1];return(0,r.changeValue)(t,n,function(){return i})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.setFields=function(e,t,r){var n=e[0],i=r.changeValue;return Object.keys(n).map(function(e){return i(t,e,function(){return n[e]})})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.clearFields=function(e,t,r){var n=r.changeValue;e.map(function(e){return n(t,e,function(){})})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(9);t.Actions=n.Actions;var i=r(10);t.Wrapper=i.Wrapper;var o=r(11);t.FloatingButton=o.FloatingButton},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(0)),o=r(2);t.styles=function(e){var t=4*e.spacing.unit;return o.createStyles({actions:{margin:"auto",marginTop:t,marginBottom:t,textAlign:"center"}})};t.Actions=o.withStyles(t.styles)(function(e){var t=e.classes,r=e.children,o=n.__rest(e,["classes","children"]);return i.default.createElement("div",n.__assign({className:t.actions},o),r)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(0)),o=r(2);t.styles=function(e){var t;return{wrapper:(t={margin:"0 auto",maxWidth:48*e.spacing.unit,padding:"0 "+3*e.spacing.unit+"px",width:"100%"},t[e.breakpoints.up("sm")]={maxWidth:85*e.spacing.unit,padding:"0 "+10*e.spacing.unit+"px"},t)}};t.Wrapper=o.withStyles(t.styles)(function(e){var t=e.classes,r=e.children,o=n.__rest(e,["classes","children"]);return i.default.createElement("div",n.__assign({className:t.wrapper},o),r)})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importStar(r(0)),o=n.__importDefault(r(12)),u=r(2),s=r(13),a=r(14),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPreviousStep=function(){(0,t.props.previous)()},t}return n.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.isFirstStep,r=e.children,n=e.classes;return i.default.createElement("div",{className:n.container},!t()&&i.default.createElement(o.default,{smDown:!0},i.default.createElement("span",{onClick:this.onPreviousStep,role:"button"},i.default.createElement(s.FontAwesomeIcon,{icon:a.faChevronLeft,size:"5x",className:n.chevron}))),r)},t}(i.Component);t.FloatingButton=u.withStyles(function(e){var t=e.spacing,r=e.palette;return u.createStyles({container:{position:"relative"},chevron:{position:"absolute",top:15*t.unit,left:10*t.unit,color:r.text.hint,"&:hover":{cursor:"pointer"}}})})(c)},function(e,t){e.exports=require("@material-ui/core/Hidden")},function(e,t){e.exports=require("@fortawesome/react-fontawesome")},function(e,t){e.exports=require("@fortawesome/pro-light-svg-icons/faChevronLeft")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(0)),o=r(16),u=r(17),s=function(e){var t=e.step,r=n.__rest(e,["step"]);if(!t.render)return i.default.createElement("div",null);var o=r.goTo,u=r.isLoading,s=r.previous,a=r.setLoading,c=r.isFirstStep,l=r.isLastStep,d=r.formRenderProps,p=r.values,f=t.render(n.__assign({goTo:o,isLoading:u,previous:s,setLoading:a,id:t.id,isFirst:c(),isLast:l()},d,{values:p}));return i.default.createElement("div",null,f)};t.WizardForm=function(e){var t=e.currentStep,r=e.formProps,a=e.goTo,c=e.router,l=e.stepId,d=e.stepsHistory,p=n.__rest(e,["currentStep","formProps","goTo","router","stepId","stepsHistory"]);if(c&&l){var f=d.filter(function(e){return e.render}).map(function(e){return e.id});u.useRedirectBack({stepId:l,currentStep:t,router:c,goTo:a,stepIdsHistory:f}),u.useRedirectToActiveStep({stepId:l,currentStep:t,router:c})}return i.default.createElement(o.Form,n.__assign({},r),function(e){var r=e.handleSubmit,o=e.values,u=n.__rest(e,["handleSubmit","values"]);return i.default.createElement("form",{noValidate:!0,onSubmit:r},s(n.__assign({},p,{goTo:a,values:o,formRenderProps:u,step:t})))})}},function(e,t){e.exports=require("react-final-form")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(18);t.useRedirectBack=n.useRedirectBack;var i=r(19);t.useRedirectToActiveStep=i.useRedirectToActiveStep},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.useRedirectBack=function(e){var t=e.stepId,r=e.currentStep,i=e.goTo,o=e.stepIdsHistory,u=e.router;return n.useEffect(function(){t!==r.id&&(o.indexOf(t)>-1?i(t):u.replace(r.id))},[t])}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);t.useRedirectToActiveStep=function(e){var t=e.currentStep,r=e.stepId,i=e.router;n.useEffect(function(){t.render&&r!==t.id&&i.push(t.id)},[t.id])}}]); | ||
//# sourceMappingURL=ui-wizard-form.js.map |
{ | ||
"name": "@comparaonline/ui-wizard-form", | ||
"author": "Esteban Martini", | ||
"version": "1.1.16", | ||
"version": "1.1.17", | ||
"main": "dist/ui-wizard-form.js", | ||
@@ -21,2 +21,4 @@ "types": "dist/index.d.ts", | ||
"@comparaonline/ui-tsconfig": "^0.27.10", | ||
"@fortawesome/pro-light-svg-icons": "^5.11.2", | ||
"@fortawesome/react-fontawesome": "^0.1.7", | ||
"@material-ui/core": "^3.9.3", | ||
@@ -35,3 +37,2 @@ "@types/enzyme": "^3.1.14", | ||
"dependencies": { | ||
"@comparaonline/ui-offer-icons": "^5.4.4", | ||
"@comparaonline/ui-wizard-form-manager": "^1.0.27", | ||
@@ -45,2 +46,4 @@ "@types/react": "^16.8.0", | ||
"peerDependencies": { | ||
"@fortawesome/pro-light-svg-icons": "^5.11.2", | ||
"@fortawesome/react-fontawesome": "^0.1.7", | ||
"@material-ui/core": "^3.9.3", | ||
@@ -50,3 +53,3 @@ "react": "^16.8.0", | ||
}, | ||
"gitHead": "ede7e2e24adeb1cadd8825dda2e43e405daaed03" | ||
"gitHead": "7edbc6e83f170e786edb5fa9a3573d0f40c8a510" | ||
} |
Sorry, the diff of this file is not supported yet
31723
11
16
+ Added@fortawesome/fontawesome-common-types@6.6.0(transitive)
+ Added@fortawesome/fontawesome-svg-core@6.6.0(transitive)
- Removed@comparaonline/ui-offer-icons@^5.4.4
- Removed@comparaonline/offers-models@6.9.8(transitive)
- Removed@comparaonline/offers-models-constants@2.13.0(transitive)
- Removed@comparaonline/ui-offer-icons@5.8.0(transitive)
- Removed@fortawesome/fontawesome-common-types@0.3.0(transitive)
- Removed@fortawesome/fontawesome-svg-core@1.3.0(transitive)