This is an abstract class for all kinds of writers used in the Exporter plugin. It utilizes the strategy pattern to break the export work into several stages, and provide interfaces for all of them.
Implementations might choose some of the functions in this class to override, thus providing their own functionalities.
The Exporter will go through the grid line by line. So in every line, all the Views will be reached, and the header line is only handled once.
An argObj object is passed to most functions of this class. It carries context arguments that make sense when they are called.
Parameter | Type | Description |
---|---|---|
writerArgs | object |
Optional Any implementation of this class might accept a writerArgs object (optional), which contains some writer-specific arguments given by the user. |
Parameter | Type | Description |
---|---|---|
rowIndex | undefined | |
rowItem | undefined | |
cell | undefined | |
grid | undefined |
We have finished the entire grid travel. Do some clean up work if you need to.
undefined
After handling a line of data (not header).
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, row,rowIdx, spCols } |
undefined
The header line has been handled.
undefined
Before handling a subrow in a line (defined in the grid structure).
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, row,rowIdx, view,viewIdx, subrow,subrowIdx, spCols(if isHeader==false) } |
undefined
After handling a view.
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, view,viewIdx, spCols(if isHeader==false) } |
undefined
We are ready to go through all the contents(items).
Parameter | Type | Description |
---|---|---|
items | Array | All the items fetched from the store |
Before handling a line of data (not header).
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, row,rowIdx, spCols } |
We are going to start the travel in the grid. Is there anything we should do now?
Parameter | Type | Description |
---|---|---|
grid | EnhancedGrid |
Before handling a subrow in a line (defined in the grid structure).
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, row,rowIdx, view,viewIdx, subrow,subrowIdx, spCols(if isHeader==false) } |
Before handling a view.
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, view,viewIdx, spCols(if isHeader==false) } |
Handle a header cell or data cell.
Parameter | Type | Description |
---|---|---|
argObj | object | An object with at least the following context properties available: { grid,isHeader, row,rowIdx, view,viewIdx, subrow,subrowIdx, cell,cellIdx, spCols(if isHeader==false) } |
undefined
Export to a string.
The exported result string.