@cdxoo/formik-utils
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -264,15 +264,16 @@ 'use strict'; | ||
var withField = function withField(options) { | ||
return function (ps) { | ||
var Control = options.Control, | ||
_options$DefaultWrapp = options.DefaultWrapper, | ||
DefaultWrapper = _options$DefaultWrapp === void 0 ? 'FieldWrapper' : _options$DefaultWrapp, | ||
_options$InArrayWrapp = options.InArrayWrapper, | ||
InArrayWrapper = _options$InArrayWrapp === void 0 ? 'ArrayItemFieldWrapper' : _options$InArrayWrapp, | ||
_options$NoneWrapper = options.NoneWrapper, | ||
NoneWrapper = _options$NoneWrapper === void 0 ? 'NoneWrapper' : _options$NoneWrapper, | ||
_options$type = options.type, | ||
type = _options$type === void 0 ? 'text' : _options$type, | ||
_options$fakeDefault = options.fakeDefault, | ||
fakeDefault = _options$fakeDefault === void 0 ? '' : _options$fakeDefault; | ||
var WithFieldComponent = function WithFieldComponent(ps) { | ||
var theme = React.useContext(ThemeContext); | ||
var Control = options.Control, | ||
_options$DefaultWrapp = options.DefaultWrapper, | ||
DefaultWrapper = _options$DefaultWrapp === void 0 ? 'FieldWrapper' : _options$DefaultWrapp, | ||
_options$InArrayWrapp = options.InArrayWrapper, | ||
InArrayWrapper = _options$InArrayWrapp === void 0 ? 'ArrayItemFieldWrapper' : _options$InArrayWrapp, | ||
_options$NoneWrapper = options.NoneWrapper, | ||
NoneWrapper = _options$NoneWrapper === void 0 ? 'NoneWrapper' : _options$NoneWrapper, | ||
_options$type = options.type, | ||
type = _options$type === void 0 ? 'text' : _options$type, | ||
_options$fakeDefault = options.fakeDefault, | ||
fakeDefault = _options$fakeDefault === void 0 ? '' : _options$fakeDefault; | ||
var DefaultWrapperComponent = theme[DefaultWrapper]; | ||
@@ -315,2 +316,5 @@ var InArrayWrapperComponent = theme[InArrayWrapper]; | ||
}; | ||
WithFieldComponent.Control = Control; | ||
return WithFieldComponent; | ||
}; | ||
@@ -317,0 +321,0 @@ |
@@ -256,15 +256,16 @@ import React, { useContext } from 'react'; | ||
var withField = function withField(options) { | ||
return function (ps) { | ||
var Control = options.Control, | ||
_options$DefaultWrapp = options.DefaultWrapper, | ||
DefaultWrapper = _options$DefaultWrapp === void 0 ? 'FieldWrapper' : _options$DefaultWrapp, | ||
_options$InArrayWrapp = options.InArrayWrapper, | ||
InArrayWrapper = _options$InArrayWrapp === void 0 ? 'ArrayItemFieldWrapper' : _options$InArrayWrapp, | ||
_options$NoneWrapper = options.NoneWrapper, | ||
NoneWrapper = _options$NoneWrapper === void 0 ? 'NoneWrapper' : _options$NoneWrapper, | ||
_options$type = options.type, | ||
type = _options$type === void 0 ? 'text' : _options$type, | ||
_options$fakeDefault = options.fakeDefault, | ||
fakeDefault = _options$fakeDefault === void 0 ? '' : _options$fakeDefault; | ||
var WithFieldComponent = function WithFieldComponent(ps) { | ||
var theme = useContext(ThemeContext); | ||
var Control = options.Control, | ||
_options$DefaultWrapp = options.DefaultWrapper, | ||
DefaultWrapper = _options$DefaultWrapp === void 0 ? 'FieldWrapper' : _options$DefaultWrapp, | ||
_options$InArrayWrapp = options.InArrayWrapper, | ||
InArrayWrapper = _options$InArrayWrapp === void 0 ? 'ArrayItemFieldWrapper' : _options$InArrayWrapp, | ||
_options$NoneWrapper = options.NoneWrapper, | ||
NoneWrapper = _options$NoneWrapper === void 0 ? 'NoneWrapper' : _options$NoneWrapper, | ||
_options$type = options.type, | ||
type = _options$type === void 0 ? 'text' : _options$type, | ||
_options$fakeDefault = options.fakeDefault, | ||
fakeDefault = _options$fakeDefault === void 0 ? '' : _options$fakeDefault; | ||
var DefaultWrapperComponent = theme[DefaultWrapper]; | ||
@@ -307,2 +308,5 @@ var InArrayWrapperComponent = theme[InArrayWrapper]; | ||
}; | ||
WithFieldComponent.Control = Control; | ||
return WithFieldComponent; | ||
}; | ||
@@ -309,0 +313,0 @@ |
{ | ||
"name": "@cdxoo/formik-utils", | ||
"description": "", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"main": "cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71066
681