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

14

Other

eventColumns: String[] | Object[]

An array of Event columns configuration used to specify columns width, headers name, and column fields to get the data from. 'field' config is required. If 'text' is missing, the 'field' config will be used instead.

For example:

eventColumns    : [
    { text : 'Task', field : 'name' },
    { text : 'Starts', field : 'startDate', width : 140 },
    { text : 'Ends', field : 'endDate', width : 140 }
]

Set to true to include events that do not intersect the span of the current time axis.

Set to false to not include unassigned events in the export. true by default.

resourceColumns: String[] | Object[]

An array of resource column configuration objects used to specify column widths, header text, and data fields to get the data from. 'field' config is required. If 'text' is missing, it will read it from the grid column or the 'field' config. If 'width' is missing, it will try to get it retrieved from the grid column or defaultColumnWidth config. If no columns provided the config will be generated from the scheduler columns (in horizontal mode).

For example:

resourceColumns : [
    'firstName', // field
    { text : 'Role', field : 'role', width : 140 }
]
columnsTableExporter
defaultColumnWidthTableExporter
indentTableExporter
indentationSymbolTableExporter
showGroupHeaderTableExporter
targetTableExporter

Misc

localeClassLocalizable
localizableLocalizable

Properties

10

Class hierarchy

isScheduleTableExporter: Boolean= truereadonly
Identifies an object as an instance of ScheduleTableExporter class, or subclass thereof.
isScheduleTableExporter: Boolean= truereadonlystatic
Identifies an object as an instance of ScheduleTableExporter class, or subclass thereof.
isLocalizableLocalizable
isTableExporterTableExporter

Lifecycle

configBase

Misc

localeHelperLocalizable
localeManagerLocalizable

Functions

18

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

exportTableExporter
LstaticLocalizable