art-typeahead |
|
The main directive declaration. Example usage `< art-typeahead levels="tiers" pagination="true" trigger="callbackID(id, type, fullResponse)" source="dataEndpoint"> art-typeahead>` |
art-levels |
Object |
Mandatory. An object containing levels description. Object accepted: `[{name: "Organisation", icon: "fa fa-users", color: "#3f3f3f", bColor: "#a6b5bd"}]` |
art-levels-map |
Object |
Optional. A mapping object for each level or for any level, but if you to make a map for the second level, the object must look like [[],[{map}]]. When a map is set,
only the keys from the map will be displayed, you can also send a callback button for a row. A map example looks like this: `$scope.tiersMappings = [[{name: "Building Code", value: 'buildingCode'}, {name: "Building Name", value: 'name'}, {name: 'Action', value: $scope.customMapAction, actionName: 'Set Active Organisation'}]]`.
The callback function will send the item clicked back in the controller, you can do actions like activate something separate than the normal click / space call. |
art-display-all |
boolean |
Optional. If set to true it will display all the properties of the data received in a table |
art-trigger |
function |
Mandatory. A function to callback the choice selected in the controller, response consists of three parameters, `id`, `type` and 'fullResponse', the second being the level name and the third is the full response element from the source array. |
art-source |
promise-enabled function |
Mandatory. The service that is called to get the data, parameters are `type`, `query` and `pagination`, `type` is the current level, `pagination` is a Boolean. The logic is on you in the controller. The received data should be arrays like [{id: 12, name: 'SomeItem'}], preprocess in the controller if necessary. |
art-pagination |
boolean |
Optional. If `true`, there will be a load more list item, and the `source` call will contain a true pagination parameter. The logic is on you in the controller. |
art-min-query |
integer |
Optional. Query length to trigger a search. |
art-max-results |
integer |
Optional. Max results to show before displaying the user a message to user the search bar. Max results is tied with the art-call-size, their division must yield a number with no decimals, e.g. 25 results per page, show the max results message at 100 elements, 100 / 25 = 4.0 |
art-translations |
Object |
Optional. An object with translations for the whole component static messages / text. Get the object on the github page. |
art-call-size |
integer |
Optional. Number of items that the `art-source` service will give on each call. Defaults to 25 if not specified |
artTypeExternal |
Angular Service |
Optional. You can call this service to manipulate level actions inside the component. We have artTypeExternal.goBackToLevel(1) or artTypeExternal.goBackToItem({id: 25, name: 'Google', level: 0}) |