-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
216 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,31 @@ | ||
/* THIS IS A BIT-AUTO-GENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. */ | ||
|
||
{ | ||
"assets": { | ||
"files": [ | ||
{ | ||
"relativePath": "src/assets/north_west-24px.svg", | ||
"test": false, | ||
"name": "north_west-24px.svg" | ||
} | ||
], | ||
"mainFile": "src/assets/north_west-24px.svg", | ||
"trackDir": "src/assets", | ||
"origin": "AUTHORED", | ||
"exported": false | ||
}, | ||
"cart-product": { | ||
"files": [ | ||
{ | ||
"relativePath": "src/components/CartProduct.tsx", | ||
"test": false, | ||
"name": "CartProduct.tsx" | ||
} | ||
], | ||
"mainFile": "src/components/CartProduct.tsx", | ||
"origin": "AUTHORED", | ||
"exported": false | ||
}, | ||
"inventures.react-lib/[email protected]": { | ||
"files": [ | ||
{ | ||
|
@@ -50,5 +75,98 @@ | |
"origin": "AUTHORED", | ||
"exported": true | ||
}, | ||
"search-bar": { | ||
"files": [ | ||
{ | ||
"relativePath": "src/components/searchBar.tsx", | ||
"test": false, | ||
"name": "searchBar.tsx" | ||
} | ||
], | ||
"mainFile": "src/components/searchBar.tsx", | ||
"origin": "AUTHORED", | ||
"exported": false | ||
}, | ||
"use-input": { | ||
"files": [ | ||
{ | ||
"relativePath": "src/hooks/useInput.hooks.ts", | ||
"test": false, | ||
"name": "useInput.hooks.ts" | ||
} | ||
], | ||
"mainFile": "src/hooks/useInput.hooks.ts", | ||
"origin": "AUTHORED", | ||
"exported": false | ||
}, | ||
"use-search-bar": { | ||
"files": [ | ||
{ | ||
"relativePath": "src/hooks/useSearchBar.hooks.ts", | ||
"test": false, | ||
"name": "useSearchBar.hooks.ts" | ||
} | ||
], | ||
"mainFile": "src/hooks/useSearchBar.hooks.ts", | ||
"origin": "AUTHORED", | ||
"exported": false | ||
}, | ||
"validators": { | ||
"files": [ | ||
{ | ||
"relativePath": "src/validators/DateValidator.ts", | ||
"test": false, | ||
"name": "DateValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/EmailValidator.ts", | ||
"test": false, | ||
"name": "EmailValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/LengthValidator.ts", | ||
"test": false, | ||
"name": "LengthValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/NumericValidator.ts", | ||
"test": false, | ||
"name": "NumericValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/RegexValidator.ts", | ||
"test": false, | ||
"name": "RegexValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/RequiredValidator.ts", | ||
"test": false, | ||
"name": "RequiredValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/RutFormatValidator.ts", | ||
"test": false, | ||
"name": "RutFormatValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/RutValidator.ts", | ||
"test": false, | ||
"name": "RutValidator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/Validator.ts", | ||
"test": false, | ||
"name": "Validator.ts" | ||
}, | ||
{ | ||
"relativePath": "src/validators/index.ts", | ||
"test": false, | ||
"name": "index.ts" | ||
} | ||
], | ||
"mainFile": "src/validators/index.ts", | ||
"origin": "AUTHORED", | ||
"exported": false | ||
}, | ||
"version": "14.8.7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ yarn-error.log* | |
|
||
storybook-static | ||
|
||
dist | ||
dist | ||
dist.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* File Created: Friday, 14th August 2020 3:09:48 pm | ||
* Author: Esperanza Horn ([email protected]) | ||
* ----- | ||
* Last Modified: Friday, 4th September 2020 4:10:56 pm | ||
* Modified By: Esperanza Horn (esperanza@inventures.cl) | ||
* Last Modified: Wednesday, 9th September 2020 11:37:58 am | ||
* Modified By: Gabriel Ulloa (gabriel@inventures.cl) | ||
* ----- | ||
* Copyright 2020 - 2020 Incrementa Ventures SpA. ALL RIGHTS RESERVED | ||
* Terms and conditions defined in license.txt | ||
|
@@ -37,17 +37,14 @@ export class LengthValidator extends Validator { | |
} | ||
|
||
validate(input: string) { | ||
// remove whitespaces from mask: | ||
const parsedInput = input.replace(/ /g, ''); | ||
// In case of single required length | ||
if (this.requiredLength) { | ||
return Boolean(parsedInput.length === this.requiredLength); | ||
return Boolean(input.length === this.requiredLength); | ||
} | ||
// In case of range length | ||
if (!this.minLength || !this.maxLength) return false; | ||
return Boolean( | ||
parsedInput.length >= this.minLength && | ||
parsedInput.length <= this.maxLength, | ||
input.length >= this.minLength && input.length <= this.maxLength, | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5183,6 +5183,15 @@ cliui@^5.0.0: | |
strip-ansi "^5.2.0" | ||
wrap-ansi "^5.1.0" | ||
|
||
cliui@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" | ||
integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== | ||
dependencies: | ||
string-width "^4.2.0" | ||
strip-ansi "^6.0.0" | ||
wrap-ansi "^6.2.0" | ||
|
||
clone-deep@^0.2.4: | ||
version "0.2.4" | ||
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-0.2.4.tgz#4e73dd09e9fb971cc38670c5dced9c1896481cc6" | ||
|
@@ -5517,6 +5526,18 @@ copy-to-clipboard@^3.0.8: | |
dependencies: | ||
toggle-selection "^1.0.6" | ||
|
||
copyfiles@^2.3.0: | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.3.0.tgz#1c26ebbe3d46bba2d309a3fd8e3aaccf53af8c76" | ||
integrity sha512-73v7KFuDFJ/ofkQjZBMjMBFWGgkS76DzXvBMUh7djsMOE5EELWtAO/hRB6Wr5Vj5Zg+YozvoHemv0vnXpqxmOQ== | ||
dependencies: | ||
glob "^7.0.5" | ||
minimatch "^3.0.3" | ||
mkdirp "^1.0.4" | ||
noms "0.0.0" | ||
through2 "^2.0.1" | ||
yargs "^15.3.1" | ||
|
||
core-js-compat@^3.6.2: | ||
version "3.6.5" | ||
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.6.5.tgz#2a51d9a4e25dfd6e690251aa81f99e3c05481f1c" | ||
|
@@ -7781,7 +7802,7 @@ glob-to-regexp@^0.3.0: | |
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" | ||
integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= | ||
|
||
glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: | ||
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: | ||
version "7.1.6" | ||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" | ||
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== | ||
|
@@ -8956,6 +8977,11 @@ is_js@^0.9.0: | |
resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d" | ||
integrity sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0= | ||
|
||
[email protected]: | ||
version "0.0.1" | ||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" | ||
integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= | ||
|
||
[email protected], isarray@^1.0.0, isarray@~1.0.0: | ||
version "1.0.0" | ||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" | ||
|
@@ -10576,7 +10602,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: | |
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" | ||
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= | ||
|
||
[email protected], minimatch@^3.0.2, minimatch@^3.0.4: | ||
[email protected], minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: | ||
version "3.0.4" | ||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" | ||
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== | ||
|
@@ -10840,6 +10866,14 @@ node-releases@^1.1.52, node-releases@^1.1.60: | |
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.60.tgz#6948bdfce8286f0b5d0e5a88e8384e954dfe7084" | ||
integrity sha512-gsO4vjEdQaTusZAEebUWp2a5d7dF5DYoIpDG7WySnk7BuZDW+GPpHXoXXuYawRBr/9t5q54tirPz79kFIWg4dA== | ||
|
||
[email protected]: | ||
version "0.0.0" | ||
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" | ||
integrity sha1-2o69nzr51nYJGbJ9nNyAkqczKFk= | ||
dependencies: | ||
inherits "^2.0.1" | ||
readable-stream "~1.0.31" | ||
|
||
normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: | ||
version "2.5.0" | ||
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" | ||
|
@@ -13128,6 +13162,16 @@ readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable | |
string_decoder "^1.1.1" | ||
util-deprecate "^1.0.1" | ||
|
||
readable-stream@~1.0.31: | ||
version "1.0.34" | ||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" | ||
integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= | ||
dependencies: | ||
core-util-is "~1.0.0" | ||
inherits "~2.0.1" | ||
isarray "0.0.1" | ||
string_decoder "~0.10.x" | ||
|
||
readdirp@^2.2.1: | ||
version "2.2.1" | ||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" | ||
|
@@ -14332,6 +14376,11 @@ string_decoder@^1.0.0, string_decoder@^1.1.1: | |
dependencies: | ||
safe-buffer "~5.2.0" | ||
|
||
string_decoder@~0.10.x: | ||
version "0.10.31" | ||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" | ||
integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= | ||
|
||
string_decoder@~1.1.1: | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" | ||
|
@@ -14650,7 +14699,7 @@ throttle-debounce@^2.1.0: | |
resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz#fd31865e66502071e411817e241465b3e9c372e2" | ||
integrity sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ== | ||
|
||
through2@^2.0.0: | ||
through2@^2.0.0, through2@^2.0.1: | ||
version "2.0.5" | ||
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" | ||
integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== | ||
|
@@ -15792,6 +15841,15 @@ wrap-ansi@^5.1.0: | |
string-width "^3.0.0" | ||
strip-ansi "^5.0.0" | ||
|
||
wrap-ansi@^6.2.0: | ||
version "6.2.0" | ||
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" | ||
integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== | ||
dependencies: | ||
ansi-styles "^4.0.0" | ||
string-width "^4.1.0" | ||
strip-ansi "^6.0.0" | ||
|
||
wrappy@1: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" | ||
|
@@ -15897,6 +15955,14 @@ yargs-parser@^13.1.2: | |
camelcase "^5.0.0" | ||
decamelize "^1.2.0" | ||
|
||
yargs-parser@^18.1.2: | ||
version "18.1.3" | ||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" | ||
integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== | ||
dependencies: | ||
camelcase "^5.0.0" | ||
decamelize "^1.2.0" | ||
|
||
yargs@^13.3.0, yargs@^13.3.2: | ||
version "13.3.2" | ||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" | ||
|
@@ -15913,6 +15979,23 @@ yargs@^13.3.0, yargs@^13.3.2: | |
y18n "^4.0.0" | ||
yargs-parser "^13.1.2" | ||
|
||
yargs@^15.3.1: | ||
version "15.4.1" | ||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" | ||
integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== | ||
dependencies: | ||
cliui "^6.0.0" | ||
decamelize "^1.2.0" | ||
find-up "^4.1.0" | ||
get-caller-file "^2.0.1" | ||
require-directory "^2.1.1" | ||
require-main-filename "^2.0.0" | ||
set-blocking "^2.0.0" | ||
string-width "^4.2.0" | ||
which-module "^2.0.0" | ||
y18n "^4.0.0" | ||
yargs-parser "^18.1.2" | ||
|
||
yargs@~3.10.0: | ||
version "3.10.0" | ||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" | ||
|