- lightReport
- reportFilter
- reportGrid
- reportQuery
- tagsFilter
An angular wrapper for Stork-Tags input component, handles component events of Added\Removed and executes call for suggestions on demand.
- OnLoadedCallback :
function
'onLoaded' callback.
- OnSelectCallback :
function
'onSelect' callback.
- OnDoubleSelectCallback :
function
'onDoubleSelect' callback.
- OnClickCallback :
function
'onClick' callback.
- OnSortCallback :
function
'onSort' callback.
- OnColumnResizeCallback :
function
'onColumnResize' callback.
- OnScrollHitBottomCallback :
function
'onScrollHitBottom' callback.
Kind: global class
Access: public
Properties
Name | Type | Default | Description |
---|---|---|---|
[lightReport] | BaseReportService |
Light report service instance. you may use lightReportFactory to init such instance. | |
[gridSettings] | gridSettings |
||
[reportAutoQuery] | string |
true |
Auto submit the query on filter change. |
[reportSubmitLabel] | string |
"Submit" |
The submit button label. |
[sortDirections] | string |
The possible states of sorting | |
[onLoaded] | OnLoadedCallback |
onLoaded allows you to specify custom behavior when an element is loaded. | |
[onSelect] | OnSelectCallback |
onSelect allows you to specify custom behavior when an element is selected. | |
[onDoubleSelect] | OnDoubleSelectCallback |
onDoubleSelect allows you to specify custom behavior when an element is double selected. | |
[onClick] | OnClickCallback |
onClick allows you to specify custom behavior when an element is fully clicked. | |
[onSort] | OnSortCallback |
onSort allows you to specify custom behavior when an element is sorted, return true\false in order to execute internal sort after override. | |
[onColumnResize] | OnColumnResizeCallback |
onColumnResize allows you to specify custom behavior when an column resize. |
Light report component main entry directive. End to end(server<-->client) reports components, used as rest on demand or local self contained data presentation report.
- If you don't use the AutoApplyQuery but rather wish to use the form manual submit mode make sure to sign any buttons(if any) with type='button' other wise it will trigger the submit.
Example
<div light-report="lightReportFactory"
data-report-auto-apply-query="true"
data-report-submit-label="Submit">
Select Tenor:
<select id="tenorSelect"
ng-model="selectedTenor"
ng-options="tenor.label for tenor in tenors track by tenor.value"
report-filter="tenorFilter"
data-filter-value="selectedTenor.value"
data-filter-field="tenor"
data-filter-type="reportFilterService.FIELD">
</select>
</div>
Kind: static method of lightReport
Access: private
Param |
---|
event |
message |
Kind: static method of lightReport
Access: private
Param |
---|
result |
isAppended |
Kind: global class
Access: public
new reportFilter([reportFilter], [filterKey], filterField, [filterValue], [filterType], [filterFrom], [filterTo])
Report Filter
Supports light report query input fields for data filtering. Adding the report filter to any of the trunscluded query elements will bind the ngModel to the ReportModel query filters.
Param | Type | Description |
---|---|---|
[reportFilter] | string |
populates bound object with api property. |
[filterKey] | bool |
key in case of multiple filter elements as in case of IN range filter, if not set will use FilterField + 'Filter' as key. |
filterField | string |
the field\column name to be filtered. |
[filterValue] | string | number | bool |
used in case ngModel is not authentic as direct field value. |
[filterType] | string |
(ReportFilterService.FIELD |
[filterFrom] | bool |
used in range\date_range filter, marks the field as the start element in the range of from -> to. |
[filterTo] | bool |
used in range\date_range filter, marks the field as the end element in the range of from -> to |
Example
Field Filter:
<select ng-model="selectedName"
ng-options="name in names"
report-filter="name"
data-filter-value="selectedTenor.value"
data-filter-field="tenor"
data-filter-type="reportFilterService.FIELD">
</select>
Range Filter:
<input filter='key' filterFrom/>
<input filter='key' filterTo/>
Kind: global class
Access: public
Properties
Name | Type | Description |
---|---|---|
[gridSettings] | gridSettings |
|
[onLoaded] | OnLoadedCallback |
report grid load complete. |
[onSelect] | OnSelectCallback |
element is selected. |
[onDoubleSelect] | OnDoubleSelectCallback |
element is double selected. |
[onClick] | OnClickCallback |
element is fully clicked. |
[onSort] | OnSortCallback |
column sort call back. |
[onColumnResize] | OnColumnResizeCallback |
column resize call back. |
[onScrollHitBottom] | OnScrollHitBottomCallback |
on scroll hit bottom defined by gridSettings.infiniteScrollTolerance. |
Report grid wraps the 3rd party grid components to normalize light reports required functionality and behavior, dispatching proper grid load and events flow.
Example
<div class="lightReportGrid"
ng-model="reportService.reportModel.data"
report-grid
data-grid-settings="gridSettings"
data-on-loaded="onGridLoadedHandler"
data-on-sort="onGridSortHandler"
data-on-select="onSelect"
data-on-double-select="onDoubleSelect"
data-on-click="onClick"
data-on-column-resize="onColumnResize"
data-on-scroll-hit-bottom="onScrollHitBottom">
</div>
Grid sort event handler, triggers bound onSort call back with field and direction parameters. Direction values: asc, desc or null for no direction.
Kind: static method of reportGrid
Access: public
Param |
---|
event |
Kind: global class
Access: public
Report Query
Emits lightReportEvents.APPLY_QUERY event if reportAutoQuery property is true.
Param | Type | Description |
---|---|---|
queryModel | ReportQueryModel |
used in range\date_range filter, marks the field as the end element in the range of from -> to |
reportAutoQuery |
Filter change handler, if reportAutoQuery is active non partial filters will trigger. expected message fields:
Kind: static method of reportQuery
Returns: JSON
- - filter result
Access: private
Param | Type | Description |
---|---|---|
event | object |
|
message | object |
|
message.key | string |
filter key |
message.type | string |
[ReportFilterService] |
[message.field] | string |
|
[message.data] | string |
|
[message.from] | number | date |
Range input from |
[message.to] | number | date |
Range input to |
Filter remove handler. expected message fields:
Kind: static method of reportQuery
Access: private
Param | Type | Description |
---|---|---|
key | string |
filter key |
Kind: static method of reportQuery
Access: private
An angular wrapper for Stork-Tags input component, handles component events of Added\Removed and executes call for suggestions on demand.
Kind: global class
Access: public
Properties
Name | Type | Description |
---|---|---|
getSuggestions | function |
function executed to with current queryString, existingTags and callback for results. function getSuggestions(queryString, existingTags, callback) |
placeholder | string |
placeholder for the input field. |
settings | tagsFilterSettings |
function to be delivered by user for suggestions on user input change.
Kind: static method of tagsFilter
Param | Type | Description |
---|---|---|
queryString | String |
user input |
existingTags | Array |
existing tags |
callback | function |
results ready callback |
Kind: static typedef of tagsFilter
Access: public
Properties
Name | Type | Default | Description |
---|---|---|---|
[suggestionsHandler] | suggestionsHandler |
operand type. | |
[element] | HTMLElement |
hosting element |
html container element. |
storkTagsInput | |||
[placeholder] | String |
'' |
placeholder text for the input field. |
[rechooseRemove] | Boolean |
true |
|
[inputMinWidth] | number |
110 |
'onLoaded' callback.
Kind: global typedef
Param | Type | Description |
---|---|---|
grid | grid |
The grid component |
setColumns | function |
Replace existing grid columns. |
setData | function |
Replace grid data. |
refresh | function |
Refresh grid display. |
'onSelect' callback.
Kind: global typedef
Param | Type | Description |
---|---|---|
dataIndex | int |
Selected record index. |
rowData | object |
Selected row record. |
column | String |
Selected record column. |
isSelect | boolean |
Is record selected. |
'onDoubleSelect' callback.
Kind: global typedef
Param | Type | Description |
---|---|---|
dataIndex | int |
Selected record index. |
rowData | object |
Selected row record. |
column | String |
Selected record column. |
isSelect | boolean |
Is record selected. |
'onClick' callback.
Kind: global typedef
Param | Type | Description |
---|---|---|
dataIndex | int |
Selected record index. |
rowData | object |
Selected row record. |
column | String |
Selected record column. |
isSelect | boolean |
Is record selected. |
'onSort' callback.
Kind: global typedef
Param | Type | Default | Description |
---|---|---|---|
field | string |
Selected record index. | |
direction | string |
"asc\desc" |
Selected row record. |
'onColumnResize' callback.
Kind: global typedef
Param | Type | Description |
---|---|---|
column | string |
Selected column. |
index | int |
Selected row record. |
width | int |
column width. |
'onScrollHitBottom' callback.
Kind: global typedef
Param | Type | Description |
---|---|---|
column | string |
Selected column. |
index | int |
Selected row record. |
width | int |
column width. |