@viamericas/viacheck-filters-check-details
v2.0.36
Published
Component that allow search
Maintainers
Readme
Welcome to component viacheck-filters-search
Hi! this is a guide where you can get technical information about this component.

This component allow to filter with multiple elements:
- Agency
- Chain
- Check Status
- Banks
- Cash Letter
- Date range
- Generate with Images
- Credit Applied
The component already includes dates validation and from needs to less than to and to can't be greater than today.
Filter values will be returned with a JSON as shown in this example.

Install
- npm i @viamericas/viacheck-filters-search
Parameters
<FiltersSearch
language="en"
nameLanguageJSON="translation"
agencies={agencies}
chains={chains}
checkStatus={checkStatus}
banks={banks}
hasElements={hasElements}
onClickSearch={onClickSearch}
onClickClean={onClickClean}
initialDateFrom={initialDateFrom}
initialDateTo={initialDateTo}
shortcutKey={shortcutKey}
activateShortCutKey={activateShortCutKey}
/>| Parameter | Description |
| --------------------- | -------------------------------------------------------------------------------------------------------------------- |
| language | this is the language that what we want to show in labels and control, currently has implemented Spanish and English. |
| nameLanguageJSON | this is the name of file that contain the translation, this file is located on locales folder |
| agencies | this is the array of agencies to show on agency control |
| chains | this is the array of chains to show on agency control |
| checkStatus | this is the array of checkStatus to show on agency control |
| banks | this is the array of banks to show on agency control |
| hasElements | object parameter to show or hide filter elements |
| onClickSearch | this method receive the result of click on search button |
| initialDateFrom | this is the initial date to from control |
| initialDateTo | this is the initial date to from control |
| shortcutKey | this is the key to action the search, by the default value it's Enter. |
| activateShortCutKey | this is boolean value, to activate the search with the key press action. by default it's false. |
Styles
Elements can be resized with this classes:
.filter-box .half-width {
flex: 1 1 calc(100% / 4);
min-width: 200px;
}
.filter-box .double-width {
flex: 1 1 calc(100% / 2);
min-width: 200px;
}
.filter-box .full-width {
flex-basis: 100%;
}Also elements can be reordered using his id:
#agencies-field {
order: 4;
}
#chain-id-field {
order: 3;
}
#check-id-field {
order: 2;
}
#check-status-field {
order: 5;
}
#cash-letter-field {
order: 6;
}
#banks-field {
order: 1;
}
Localization
Localization folder:

Result

you can see the example in the folder dev-test file with his parameters
Implement
The example of implementation is on test-dev folder file app.js
Development
To see the component working you can run the command npm run start:dev by default the solution compile the component and shows in 9009 port
Test
Currently we have to commands to test the application, both shows the same result:

The difference is the first (npm run test) run once the test and it is used in the push git command, and the second (npm run test:w) run on mode watch that mean it is listening changes in the application.
Build
npm run startandnpm run start:sourcecreates the build file without obfuscation, you can read easilynpm run buildit is the build on production mode, must be run before publish the package
Validate weight of package (93.04kb)
you can run the next commands to see the result of the bundle :
npm run build:debugnpm run analizedependences
and this is the result :

