ScheduleTableExporter
This class transforms scheduler component into two arrays: rows and columns. Columns array contains objects with meta information about column: field name, column name, width and type of the rendered value, rows array contains arrays of cell values.
const exporter = new ScheduleTableExporter({ target : scheduler });
exporter.export()
// Output
{
columns : [
{ field : 'name', value : 'First name', type : 'string', width : 100 },
{ field : 'name', value : 'Task', type : 'string', width : 100, eventColumn : true },
{ field : 'startDate', value : 'Starts', type : 'date', width : 100, eventColumn : true },
{ field : 'endDate', value : 'Ends', type : 'date', width : 100, eventColumn : true }
],
rows : [
['Michael', 'Hand out dundies', Date, Date],
['Michael', 'Buy condo', Date, Date],
['Jim', 'Close sale to library', Date, Date]
]
}
How data is exported
Data is exported as in the base class with minor addition: every event is exported on a separate row, like demonstrated above.
In case there are unassigned events, by default they will be exported as well
// output
{
rows : [
['Michael', 'Hand out dundies', Date, Date],
['Michael', 'Buy condo', Date, Date],
['Jim', 'Close sale to library', Date, Date],
['', 'No resource assigned'],
['', 'Halloween prep', Date, Date],
['', 'New year prep', Date, Date]
]
}
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Set to
trueto include events that do not intersect the span of the current time axis. -
Set to
falseto not include unassigned events in the export.trueby default. -
Set to
falseto disable localization of this object. -
Specifies a default column width if no width specified
-
Set to
falseto export dates as they are displayed by Date column formatter -
When true and tree is being exported, node names are indented with indentationSymbol
-
This symbol (four spaces by default) is used to indent node names when indent is
true -
If true and the grid is grouped, shows the grouped value in the first column. True by default.
-
Target grid instance to export data from
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of Localizable class, or subclass thereof.
-
Identifies an object as an instance of ScheduleTableExporter class, or subclass thereof.
-
A class property getter for the default values of internal properties for this class.
-
An empty array that can be used as a default value.
-
An empty object that can be used as a default value.
-
Identifies an object as an instance of ScheduleTableExporter class, or subclass thereof.
-
Identifies an object as an instance of TableExporter class, or subclass thereof.
-
Returns a copy of the full configuration which was used to configure this object.
-
This property is set to
truebefore theconstructorreturns. -
This property is set to
trueon entry to the destroy method. It remains on the objects after returning fromdestroy(). If isDestroyed istrue, this property will also betrue, so there is no need to test for both (for example,comp.isDestroying || comp.isDestroyed). -
Get the global LocaleHelper
-
Get the global LocaleManager
Functions
Functions are methods available for calling on the class-
This optional class method is called when a class is mixed in using the mixin() method.
-
Registers this class type with its Factory