/*! * * Wijmo Library 5.20251.40 * https://developer.mescius.com/wijmo * * Copyright(c) MESCIUS inc. All rights reserved. * * Licensed under the End-User License Agreement For MESCIUS Wijmo Software. * us.sales@mescius.com * https://developer.mescius.com/wijmo/licensing * */ /** * {@module wijmo.angular.grid} * AngularJS directives for wijmo.grid module */ /** * */ export declare var ___keepComment: any; import { WjDirective, WjLink } from 'wijmo/wijmo.angular.base'; import * as wjcGrid from 'wijmo/wijmo.grid'; /** * Angular module name, which can be used in the angular.module(moduleName) * function to obtain a reference to the module . */ export declare const ngModuleName = "wj.grid"; /** * AngularJS directive for the {@link FlexGrid} control. * * Use the wj-flex-grid directive to add grids to your AngularJS applications. * Note that directive and parameter names must be formatted as lower-case with dashes * instead of camel-case. For example: * *
<p>Here is a FlexGrid control:</p> * <wj-flex-grid items-source="data"> * <wj-flex-grid-column * header="Country" * binding="country"> * </wj-flex-grid-column> * <wj-flex-grid-column * header="Sales" * binding="sales"> * </wj-flex-grid-column> * <wj-flex-grid-column * header="Expenses" * binding="expenses"> * </wj-flex-grid-column> * <wj-flex-grid-column * header="Downloads" * binding="downloads"> * </wj-flex-grid-column> * </wj-flex-grid>* * The example below creates a FlexGrid control and binds it to a 'data' array * exposed by the controller. The grid has three columns, each corresponding to * a property of the objects contained in the source array. * * Example * * The wj-flex-grid directive supports the following attributes: * *
@
A value indicating whether to show a new row
* template so users can add items to the source collection.@
A value indicating whether the grid deletes the
* selected rows when the Delete key is pressed.@
An {@link AllowDragging} value indicating
* whether and how the user can drag rows and columns with the mouse.@
An {@link AllowMerging} value indicating
* which parts of the grid provide cell merging.@
An {@link AllowResizing} value indicating
* whether users are allowed to resize rows and columns with the mouse.@
A boolean value indicating whether users can sort
* columns by clicking the column headers.@
A boolean value indicating whether the grid generates
* columns automatically based on the items-source.@
The name of the property used to generate
* child rows in hierarchical grids (or an array of property names if items
* at different hierarchical levels use different names for their child items).=
A reference to the {@link FlexGrid} control
* created by this directive.=
A boolean value indicating whether row and column
* resizing should be deferred until the user releases the mouse button.@
The number of frozen (non-scrollable) columns in the grid.@
The number of frozen (non-scrollable) rows in the grid.@
The format string used to create the group
* header content.=
A {@link HeadersVisibility} value
* indicating whether the row and column headers are visible. =
A {@link HeadersFocusability} value
* indicatinf whether the row and column headers are focusible. @
Gets or sets a value that determines whether the grid should
* support Input Method Editors (IME) while not in edit mode.&
This event occurs after the binding has finished
* initializing the control with attribute values.=
A value indicating whether the binding has finished
* initializing the control with attribute values. =
A function that customizes
* cells on this grid.=
An array or {@link ICollectionView} object that
* contains the items shown on the grid.@
A boolean value indicating whether the user is
* prevented from editing grid cells by typing into them.=
A {@link MergeManager} object that specifies
* the merged extent of the specified cell.@
A {@link SelectionMode} value
* indicating whether and how the user can select cells.@
A boolean value indicating whether to insert group
* rows to delimit data groups.@
A boolean value indicating whether to display sort
* indicators in the column headers.@
A number specifying the index of row in the column
* header panel that shows and changes the current sort.@
The indentation, in pixels, used to offset row
* groups of different levels.&
Handler for the {@link FlexGrid.beginningEdit} event.&
Handler for the {@link FlexGrid.cellEditEnded} event.&
Handler for the {@link FlexGrid.cellEditEnding} event.&
Handler for the {@link FlexGrid.prepareCellForEdit} event.&
Handler for the {@link FlexGrid.resizingColumn} event.&
Handler for the {@link FlexGrid.resizedColumn} event.&
Handler for the {@link FlexGrid.draggedColumn} event.&
Handler for the {@link FlexGrid.draggingColumn} event.&
Handler for the {@link FlexGrid.sortedColumn} event.&
Handler for the {@link FlexGrid.sortingColumn} event.&
Handler for the {@link FlexGrid.deletingRow} event.&
Handler for the {@link FlexGrid.draggingRow} event.&
Handler for the {@link FlexGrid.draggedRow} event.&
Handler for the {@link FlexGrid.resizingRow} event.&
Handler for the {@link FlexGrid.resizedRow} event.&
Handler for the {@link FlexGrid.rowAdded} event.&
Handler for the {@link FlexGrid.rowEditEnded} event.&
Handler for the {@link FlexGrid.rowEditEnding} event.&
Handler for the {@link FlexGrid.loadedRows} event.&
Handler for the {@link FlexGrid.loadingRows} event.&
Handler for the {@link FlexGrid.groupCollapsedChanged} event.&
Handler for the {@link FlexGrid.groupCollapsedChanging} event.&
Handler for the {@link FlexGrid.itemsSourceChanged} event.&
Handler for the {@link FlexGrid.selectionChanging} event.&
Handler for the {@link FlexGrid.selectionChanged} event.&
Handler for the {@link FlexGrid.gotFocus} event.&
Handler for the {@link FlexGrid.lostFocus} event.&
Handler for the {@link FlexGrid.scrollPositionChanged} event.@
The {@link Aggregate} object to display in
* the group header rows for this column.@
The string value that sets the horizontal
* alignment of items in the column to left, right, or center.@
The value indicating whether the user can move
* the column to a new position with the mouse.@
The value indicating whether the user can sort
* the column by clicking its header.@
The value indicating whether the user can
* resize the column with the mouse.@
The value indicating whether the user can merge
* cells in the column.@
The name of the property to which the column is
* bound.@
The name of a CSS class to use when
* rendering the column.=
The {@link DataMap} object to use to convert raw
* values into display values for the column.@
The enumerated {@link DataType} value that indicates
* the type of value stored in the column.@
The format string to use to convert raw values
* into display values for the column (see {@link Globalize}).@
The string to display in the column header.@
The type attribute to specify the input element
* used to edit values in the column. The default is "tel" for numeric
* columns, and "text" for all other non-Boolean columns.@
The value indicating whether cells in the column
* contain HTML content rather than plain text.@
The value indicating whether the user is prevented
* from editing values in the column.@
The value indicating whether the column is selected.@
The mask string used to edit values in the
* column.@
The maximum width for the column.@
The minimum width for the column.@
The column name. You can use it to retrieve the
* column.@
The value indicating whether the column must contain
* non-null values.@
The value indicating whether to show drop-down buttons
* for editing based on the column's {@link DataMap}.@
The value indicating whether the column is visible.@
The width of the column in pixels or as a
* star value.@
The value indicating whether cells in the column wrap
* their content.@
The string which will be displayed when editing an empty cell.<wj-flex-grid items-source="data"> * <wj-flex-grid-cell-template cell-type="RowHeader"> * {{$row.index}} * </wj-flex-grid-cell-template> * <wj-flex-grid-cell-template cell-type="RowHeaderEdit"> * ... * </wj-flex-grid-cell-template> * * <wj-flex-grid-column header="Country" binding="country"> * <wj-flex-grid-cell-template cell-type="ColumnHeader"> * <img ng-src="resources/globe.png" /> * {{$col.header}} * </wj-flex-grid-cell-template> * <wj-flex-grid-cell-template cell-type="Cell"> * <img ng-src="resources/{{$item.country}}.png" /> * {{$item.country}} * </wj-flex-grid-cell-template> * </wj-flex-grid-column> * <wj-flex-grid-column header="Sales" binding="sales"></wj-flex-grid-column> * </wj-flex-grid>* * For more detailed information on specific cell type templates refer to the * documentation for the {@link CellTemplateType} enumeration. * * Note that the wj-flex-grid-column directive may also contain arbitrary content * that is treated as a template for a regular data cell (cell-type="Cell"). But if * a wj-flex-grid-cell-template directive exists and is set to cell-type="Cell" * under the wj-flex-grid-column directive, it takes priority and overrides the * arbitrary content. * * The wj-flex-grid-cell-template directive supports the following attributes: * *
@
* The {@link CellTemplateType} value defining the type of cell the template applies to.
* @
* Indicates whether the cell template will increase grid's default row height to accommodate
* cells content. Defaults to true.
* @
* Defines the style.overflow property value for cells.
* @
* For cell edit templates, indicates whether cell editing forcibly starts in full edit mode,
* regardless of how the editing was initiated. In full edit mode pressing cursor keys don't finish editing.
* Defaults to true.
* <wj-flex-grid-column header="Country" binding="country"> * <wj-flex-grid-cell-template cell-type="Cell"> * <img ng-src="resources/{{$item.country}}.png" /> * {{$item.country}} * </wj-flex-grid-cell-template> * </wj-flex-grid-column>* * For a hierarchical {@link FlexGrid} (that is, one with the childItemsPath property * specified), if no Group template is provided, non-header cells in group rows in * this {@link Column} also use this template. * * CellEdit * * Defines a template for a cell in edit mode. Must be a child of the {@link wijmo.angular.grid.WjFlexGridColumn} directive. * This cell type has an additional $value property available for binding. It contains the * original cell value before editing, and the updated value after editing. * For example, here is a template that uses the Wijmo {@link InputNumber} control as an editor * for the "Sales" column: * *
<wj-flex-grid-column header="Sales" binding="sales"> * <wj-flex-grid-cell-template cell-type="CellEdit"> * <wj-input-number value="$value" step="1"></wj-input-number> * </wj-flex-grid-cell-template> * </wj-flex-grid-column>* * ColumnHeader * * Defines a template for a column header cell. Must be a child of the {@link wijmo.angular.grid.WjFlexGridColumn} directive. * For example, this template adds an image to the header of the "Country" column: * *
<wj-flex-grid-column header="Country" binding="country"> * <wj-flex-grid-cell-template cell-type="ColumnHeader"> * <img ng-src="resources/globe.png" /> * {{$col.header}} * </wj-flex-grid-cell-template> * </wj-flex-grid-column>* * RowHeader * * Defines a template for a row header cell. Must be a child of the {@link wijmo.angular.grid.WjFlexGrid} directive. * For example, this template shows row indices in the row headers: * *
<wj-flex-grid items-source="data"> * <wj-flex-grid-cell-template cell-type="RowHeader"> * {{$row.index}} * </wj-flex-grid-cell-template> * </wj-flex-grid>* * Note that this template is applied to a row header cell, even if it is in a row that is * in edit mode. In order to provide an edit-mode version of a row header cell with alternate * content, define the RowHeaderEdit template. * * RowHeaderEdit * * Defines a template for a row header cell in edit mode. Must be a child of the * {@link wijmo.angular.grid.WjFlexGrid} directive. For example, this template shows dots in the header * of rows being edited: * *
<wj-flex-grid items-source="data"> * <wj-flex-grid-cell-template cell-type="RowHeaderEdit"> * ... * </wj-flex-grid-cell-template> * </wj-flex-grid>* * To add the standard edit-mode indicator to cells where the RowHeader template * applies, use the following RowHeaderEdit template: * *
<wj-flex-grid items-source="data"> * <wj-flex-grid-cell-template cell-type="RowHeaderEdit"> * {{✎}} * </wj-flex-grid-cell-template> * </wj-flex-grid>* * TopLeft * * Defines a template for the top left cell. Must be a child of the {@link wijmo.angular.grid.WjFlexGrid} directive. * For example, this template shows a down/right glyph in the top-left cell of the grid: * *
<wj-flex-grid items-source="data"> * <wj-flex-grid-cell-template cell-type="TopLeft"> * <span class="wj-glyph-down-right"></span> * </wj-flex-grid-cell-template> * </wj-flex-grid>* *
GroupHeader
* * Defines a template for a group header cell in a {@link GroupRow}, Must be a child of the {@link wijmo.angular.grid.WjFlexGridColumn} directive. * * The $row variable contains an instance of the GroupRow class. If the grouping comes * from the a {@link CollectionView}, the $item variable references the {@link CollectionViewGroup} object. * * For example, this template uses a checkbox element as an expand/collapse toggle: * *<wj-flex-grid-column header="Country" binding="country"> * <wj-flex-grid-cell-template cell-type="GroupHeader"> * <input type="checkbox" ng-model="$row.isCollapsed"/> * {{$item.name}} ({{$item.items.length}} items) * </wj-flex-grid-cell-template> * </wj-flex-grid-column>* * Group * * Defines a template for a regular cell (not a group header) in a {@link GroupRow}. Must be a child of the * {@link wijmo.angular.grid.WjFlexGridColumn} directive. This cell type has an additional $value varible available for * binding. In cases where columns have the aggregate property specified, it contains the unformatted * aggregate value. * * For example, this template shows an aggregate's value and kind for group row cells in the "Sales" * column: * *
<wj-flex-grid-column header="Sales" binding="sales" aggregate="Avg"> * <wj-flex-grid-cell-template cell-type="Group"> * Average: {{$value | number:2}} * </wj-flex-grid-cell-template> * </wj-flex-grid-column>* * ColumnFooter * * Defines a template for a regular cell in a columnFooters panel. Must be a child of the * {@link wijmo.angular.grid.WjFlexGridColumn} directive. This cell type has an additional $value * property available for binding that contains a cell value. * * For example, this template shows aggregate's value and kind for a footer cell in the "Sales" * column: * *
<wj-flex-grid-column header="Sales" binding="sales" aggregate="Avg"> * <wj-flex-grid-cell-template cell-type="ColumnFooter"> * Average: {{$value | number:2}} * </wj-flex-grid-cell-template> * </wj-flex-grid-column>* * BottomLeft * * Defines a template for the bottom left cells (at the intersection of the row header and column footer cells). * Must be a child of the {@link wijmo.angular.grid.WjFlexGrid} directive. * For example, this template shows a sigma glyph in the bottom-left cell of the grid: * *
<wj-flex-grid items-source="data"> * <wj-flex-grid-cell-template cell-type="BottomLeft"> * Σ * </wj-flex-grid-cell-template> * </wj-flex-grid>*/ export declare class WjFlexGridCellTemplate extends WjDirective { static _tagName: string; static _getTemplContextProp(templateType: CellTemplateType): string; constructor(); _initControl(element: any): any; _createLink(): WjLink; _getMetaDataId(): any; }