{"id":18369646,"url":"https://github.com/forms-angular/fng-ui-select","last_synced_at":"2025-04-10T19:44:11.363Z","repository":{"id":23895767,"uuid":"27275427","full_name":"forms-angular/fng-ui-select","owner":"forms-angular","description":"Plugin to use the Angular UI ui-select control in forms-angular","archived":false,"fork":false,"pushed_at":"2024-03-28T23:46:00.000Z","size":3515,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T04:46:03.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/forms-angular.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}},"created_at":"2014-11-28T16:57:13.000Z","updated_at":"2024-04-19T12:44:29.842Z","dependencies_parsed_at":"2024-02-01T04:25:00.677Z","dependency_job_id":"9b9b2640-da28-4172-977a-bda1dedf00d5","html_url":"https://github.com/forms-angular/fng-ui-select","commit_stats":{"total_commits":332,"total_committers":4,"mean_commits":83.0,"dds":0.06325301204819278,"last_synced_commit":"4f7ae099da49362e2e435b2e7da5c9c10413ef9e"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forms-angular%2Ffng-ui-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forms-angular%2Ffng-ui-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forms-angular%2Ffng-ui-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forms-angular%2Ffng-ui-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forms-angular","download_url":"https://codeload.github.com/forms-angular/fng-ui-select/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248281425,"owners_count":21077423,"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":[],"created_at":"2024-11-05T23:30:18.465Z","updated_at":"2025-04-10T19:44:11.337Z","avatar_url":"https://github.com/forms-angular.png","language":"JavaScript","readme":"# fng-ui-select\n\nPlugin for forms-angular that adds ui-select (https://github.com/angular-ui/ui-select) support.\n\n## Usage\n\n    npm install fng-ui-select\n\nTo get all the dependencies at the top level of your node_modules run\n\n    npm dedupe\n\nAdd the following lines to your index.html (or equivalent) file.\n\n    \u003clink rel=\"stylesheet\" href=\"angular-ui-select/dist/select.css\"\u003e\n    \u003cscript src=\"angular-ui-select/dist/select.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"fng-ui-select/fng-ui-select.js\"\u003e\u003c/script\u003e\n\nIn your Mongoose schemas you can set up fields like this:\n\n    colour: {type: String, enum: ['Blue', 'Brown', 'Green', 'Hazel'], form: {directive: 'fng-ui-select'}}\n    lookup: {type: Schema.Types.ObjectId, ref: 'anotherModel', form: {directive: 'fng-ui-select'}},\n\nOptions can be added to a fngUiSelect object within the form object as follows:\n\n* _theme_ defaults to _select2_.  Other options are _bootstrap_ and _selectize_.  Bootstrap required Bootstrap 3 and will fall\nback to _select2_.\n* _fngAjax_  creates a control that queries the back end after each keystroke (with 100ms of debounce) for matches.\n    * Set to true to search the whole of the _ref_ collection (honouring any collection level filters)\n    * Assign a string starting with '/' to do your own query on the backend.  The search string will be in _req.query.q_ and the current value of the existing record in _req.query.e_.  The $index will be in _req.query.i_.\n    * Use a mongo search object (converted to JSON and escaped) to apply a filter to the default search over _ref_ collection.  For example to search \nonly amongst records where the value of *accountSuspended* is false you might do\n\n```\n    customer: {\n      type: Schema.Types.ObjectId\n      ref: 'customer', \n      form: {\n        directive: 'fng-ui-select',\n        fngUiSelect: {\n          fngAjax: escape(JSON.stringify( {accountSuspended:false} ))\n        } \n      }\n    }\n```\n    \nThe _text_ property of the result set will be used to populate the options, unless the _additional_ option is used, in which \ncase anything in the _additional_ property will be concatenated to the text.  This will be empty unless you are [overriding the\ndefault search behaviour](http://forms-angular.org/#/forms#search).\n \n* _forceMultiple_ when set to true on an array schema element will create multiple controls, rather than a single control\naccepting multiple selections\n* _deriveOptions_ a name of a function on the form scope that returns a property name on the scope that contains the options.  If these options will be in the form of objects which include an id and a text property you create a property _isObjects_ \non the specified form scope property with the value _true_. \n* _additional_ appends the contents of the _additional_ property (if any) in the result set from the lookup function\n* _noconvert_ inhibits the options being passed to forms-angular, so no automatic lookups are performed (sometimes useful when \nusing fng-ui-select in a directive on a forms-angular form. \n\n## Tests\n\ne2e tests require the forms-angular website (https://github.com/forms-angular/website)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforms-angular%2Ffng-ui-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforms-angular%2Ffng-ui-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforms-angular%2Ffng-ui-select/lists"}