{"id":21819476,"url":"https://github.com/blocka/vue-rule-builder","last_synced_at":"2025-04-14T02:29:36.761Z","repository":{"id":57396580,"uuid":"122049284","full_name":"blocka/vue-rule-builder","owner":"blocka","description":"A component for building complex rules","archived":false,"fork":false,"pushed_at":"2024-03-17T15:50:04.000Z","size":664,"stargazers_count":47,"open_issues_count":7,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T16:21:35.325Z","etag":null,"topics":["rule-builder","scoped-slot","vue"],"latest_commit_sha":null,"homepage":"https://blocka.github.io/vue-rule-builder/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blocka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-19T10:48:59.000Z","updated_at":"2025-03-20T11:29:03.000Z","dependencies_parsed_at":"2024-10-23T23:09:30.347Z","dependency_job_id":"dd095578-bfea-45f2-b82a-86ee1a3fda38","html_url":"https://github.com/blocka/vue-rule-builder","commit_stats":{"total_commits":35,"total_committers":2,"mean_commits":17.5,"dds":0.1428571428571429,"last_synced_commit":"cd135841407de43d4783224cd7910004fe837a0e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocka%2Fvue-rule-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocka%2Fvue-rule-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocka%2Fvue-rule-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocka%2Fvue-rule-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blocka","download_url":"https://codeload.github.com/blocka/vue-rule-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248752487,"owners_count":21156102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rule-builder","scoped-slot","vue"],"created_at":"2024-11-27T16:19:23.593Z","updated_at":"2025-04-14T02:29:36.743Z","avatar_url":"https://github.com/blocka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\nThis component can be used whenever you need a UI for created complex filters. The UI is used to build up a data structure which can be used to generate a query of some sort.\n\n# Installation\n\n`npm install vue-rule-builder` (or use yarn)\n\nTo use globally:\n\n```js\nimport RuleBuilder from 'vue-rule-builder'\n\nVue.use(RuleBuilder)\n```\n\nor `import { RuleBuilder } from 'vue-rule-builder'` for \"local\" installation.\n\nYou can import the built in stylesheet as well: `import 'vue-rule-builder/dist/styles.css`\n\nA rule consists of three fields, a name, operation and value\n`{ name: 'firstName', operation: 'startsWith', value: 'B' }`\n\nThe name and operation are arbitrary values, and you would have to have a parser which understands what those mean.\n\nRules can be put in a group:\n`{ all: true, rules: [] }`\n\nRules can be filtered further:\n```js\n{\nname: 'totalPayments',\nfilter: {\n\tall: true,\n\trules: [\n\t]\n}\n```\n\nThe basic component can takes two props, `filter` and `fields`. `filter` is a rule group, and fields is an array of `field`s. A `field` looks like:\n`{\nname: 'firstName',\nlabel: 'First Name',\noperations: [[\"Starts With\", \"startWith\"]]\n}`\n\nThe component will emit `update:filter` so you can use the `.sync` modifier.\n\nThe component comes with a built in UI, and there is a stylesheet which can be included as well, to get the default look and feel. Alternatively, a scoped slot can be provided instead, for the ultimate in flexibility.\n\nCheck out the storybook which demonstrates usage. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocka%2Fvue-rule-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocka%2Fvue-rule-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocka%2Fvue-rule-builder/lists"}