@udev-tn/rule-builder
v0.0.3
Published
The rule builder enables users to define specific conditions in order to find and categorize items from multiple datasets.
Readme
Rule builder
The rule builder enables users to define specific conditions in order to find and categorize items from multiple datasets.
Live DEMO: https://builders-ashen.vercel.app/
Features
- A nested representation of a rule can be created.
- Component inheritance for custom representation using
udTemplate="condition" - Dark, light theme
Usage
- Use it to construct a search query that is based on multiple conditions.
- Instead of a static selection, use it to save a segment.
- Use to help users create dynamic lists by making selected rules static rather than actual search results.
- Use when the search query includes an unknown number of unspecified terms.
Technologies
- Angular 16
- Typescript
Installation
- Use npm to install the package
$ npm install @udev-tn/rule-builder --save - You could now add into your module
importstheRuleBuilderModulein order to add all of the components.
import { RuleBuilderModule } from '@udev-tn/rule-builder';
@NgModule({
// ...
imports: [
// ...
RuleBuilderModule
]
})Input parameters
| Input | Required | Details | |-------|----------|-----------------------------------------------| | rule | Optional | A rule that will be presented in the builder. |
Output parameters
| Output | Details | |----------------|-------------------------------------------------------------------------------| | onValueChanges | A callback function is used to handle value changes during the build process. |
Contributing
- Make sure to open an issue first before adding any new feature or fix.
Clone the project and then proceed to install the necessary dependencies.
$ git clone https://gitlab.com/udev-tn/rule-builder.git
$ npm installCreate a new branch
$ git checkout -b feat/some-featureInclude tests to ensure that everything is functioning correctly.
$ npm testComplete the commit and push, and then create a merge request.
