@angular/cdk 8.0.0-beta.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/_overlay.scss +4 -4
- package/bundles/cdk-a11y.umd.js +227 -79
- package/bundles/cdk-a11y.umd.js.map +1 -1
- package/bundles/cdk-a11y.umd.min.js +1 -1
- package/bundles/cdk-a11y.umd.min.js.map +1 -1
- package/bundles/cdk-accordion.umd.js +20 -8
- package/bundles/cdk-accordion.umd.js.map +1 -1
- package/bundles/cdk-accordion.umd.min.js.map +1 -1
- package/bundles/cdk-bidi.umd.js +5 -5
- package/bundles/cdk-bidi.umd.min.js +1 -1
- package/bundles/cdk-bidi.umd.min.js.map +1 -1
- package/bundles/cdk-coercion.umd.js +5 -5
- package/bundles/cdk-collections.umd.js +38 -15
- package/bundles/cdk-collections.umd.js.map +1 -1
- package/bundles/cdk-collections.umd.min.js +1 -1
- package/bundles/cdk-collections.umd.min.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.js +571 -180
- package/bundles/cdk-drag-drop.umd.js.map +1 -1
- package/bundles/cdk-drag-drop.umd.min.js +2 -2
- package/bundles/cdk-drag-drop.umd.min.js.map +1 -1
- package/bundles/cdk-keycodes.umd.js +7 -3
- package/bundles/cdk-keycodes.umd.js.map +1 -1
- package/bundles/cdk-keycodes.umd.min.js.map +1 -1
- package/bundles/cdk-layout.umd.js +83 -30
- package/bundles/cdk-layout.umd.js.map +1 -1
- package/bundles/cdk-layout.umd.min.js +1 -1
- package/bundles/cdk-layout.umd.min.js.map +1 -1
- package/bundles/cdk-observers.umd.js +30 -11
- package/bundles/cdk-observers.umd.js.map +1 -1
- package/bundles/cdk-observers.umd.min.js +1 -1
- package/bundles/cdk-observers.umd.min.js.map +1 -1
- package/bundles/cdk-overlay.umd.js +229 -108
- package/bundles/cdk-overlay.umd.js.map +1 -1
- package/bundles/cdk-overlay.umd.min.js +2 -2
- package/bundles/cdk-overlay.umd.min.js.map +1 -1
- package/bundles/cdk-platform.umd.js +17 -10
- package/bundles/cdk-platform.umd.js.map +1 -1
- package/bundles/cdk-platform.umd.min.js +1 -1
- package/bundles/cdk-platform.umd.min.js.map +1 -1
- package/bundles/cdk-portal.umd.js +32 -13
- package/bundles/cdk-portal.umd.js.map +1 -1
- package/bundles/cdk-portal.umd.min.js.map +1 -1
- package/bundles/cdk-scrolling.umd.js +184 -62
- package/bundles/cdk-scrolling.umd.js.map +1 -1
- package/bundles/cdk-scrolling.umd.min.js +1 -1
- package/bundles/cdk-scrolling.umd.min.js.map +1 -1
- package/bundles/cdk-stepper.umd.js +30 -12
- package/bundles/cdk-stepper.umd.js.map +1 -1
- package/bundles/cdk-stepper.umd.min.js.map +1 -1
- package/bundles/cdk-table.umd.js +384 -74
- package/bundles/cdk-table.umd.js.map +1 -1
- package/bundles/cdk-table.umd.min.js +1 -1
- package/bundles/cdk-table.umd.min.js.map +1 -1
- package/bundles/cdk-text-field.umd.js +61 -21
- package/bundles/cdk-text-field.umd.js.map +1 -1
- package/bundles/cdk-text-field.umd.min.js +1 -1
- package/bundles/cdk-text-field.umd.min.js.map +1 -1
- package/bundles/cdk-tree.umd.js +85 -29
- package/bundles/cdk-tree.umd.js.map +1 -1
- package/bundles/cdk-tree.umd.min.js.map +1 -1
- package/bundles/cdk.umd.js +2 -2
- package/bundles/cdk.umd.js.map +1 -1
- package/bundles/cdk.umd.min.js +1 -1
- package/bundles/cdk.umd.min.js.map +1 -1
- package/drag-drop/typings/directives/drag.d.ts +11 -2
- package/drag-drop/typings/drag-events.d.ts +17 -0
- package/drag-drop/typings/drag-ref.d.ts +9 -5
- package/drag-drop/typings/drop-list-ref.d.ts +9 -3
- package/drag-drop/typings/index.metadata.json +1 -1
- package/esm2015/a11y.js +229 -81
- package/esm2015/a11y.js.map +1 -1
- package/esm2015/accordion.js +22 -10
- package/esm2015/accordion.js.map +1 -1
- package/esm2015/bidi.js +8 -8
- package/esm2015/cdk.js +4 -4
- package/esm2015/cdk.js.map +1 -1
- package/esm2015/coercion.js +7 -7
- package/esm2015/collections.js +41 -18
- package/esm2015/collections.js.map +1 -1
- package/esm2015/drag-drop.js +540 -181
- package/esm2015/drag-drop.js.map +1 -1
- package/esm2015/keycodes.js +9 -5
- package/esm2015/keycodes.js.map +1 -1
- package/esm2015/layout.js +89 -36
- package/esm2015/layout.js.map +1 -1
- package/esm2015/observers.js +33 -14
- package/esm2015/observers.js.map +1 -1
- package/esm2015/overlay.js +232 -110
- package/esm2015/overlay.js.map +1 -1
- package/esm2015/platform.js +20 -13
- package/esm2015/platform.js.map +1 -1
- package/esm2015/portal.js +34 -15
- package/esm2015/portal.js.map +1 -1
- package/esm2015/scrolling.js +180 -58
- package/esm2015/scrolling.js.map +1 -1
- package/esm2015/stepper.js +32 -14
- package/esm2015/stepper.js.map +1 -1
- package/esm2015/table.js +369 -69
- package/esm2015/table.js.map +1 -1
- package/esm2015/text-field.js +64 -24
- package/esm2015/text-field.js.map +1 -1
- package/esm2015/tree.js +86 -30
- package/esm2015/tree.js.map +1 -1
- package/esm5/a11y.es5.js +230 -82
- package/esm5/a11y.es5.js.map +1 -1
- package/esm5/accordion.es5.js +22 -10
- package/esm5/accordion.es5.js.map +1 -1
- package/esm5/bidi.es5.js +8 -8
- package/esm5/cdk.es5.js +4 -4
- package/esm5/cdk.es5.js.map +1 -1
- package/esm5/coercion.es5.js +7 -7
- package/esm5/collections.es5.js +42 -19
- package/esm5/collections.es5.js.map +1 -1
- package/esm5/drag-drop.es5.js +574 -183
- package/esm5/drag-drop.es5.js.map +1 -1
- package/esm5/keycodes.es5.js +9 -5
- package/esm5/keycodes.es5.js.map +1 -1
- package/esm5/layout.es5.js +86 -33
- package/esm5/layout.es5.js.map +1 -1
- package/esm5/observers.es5.js +33 -14
- package/esm5/observers.es5.js.map +1 -1
- package/esm5/overlay.es5.js +232 -111
- package/esm5/overlay.es5.js.map +1 -1
- package/esm5/platform.es5.js +20 -13
- package/esm5/platform.es5.js.map +1 -1
- package/esm5/portal.es5.js +34 -15
- package/esm5/portal.es5.js.map +1 -1
- package/esm5/scrolling.es5.js +187 -65
- package/esm5/scrolling.es5.js.map +1 -1
- package/esm5/stepper.es5.js +32 -14
- package/esm5/stepper.es5.js.map +1 -1
- package/esm5/table.es5.js +386 -72
- package/esm5/table.es5.js.map +1 -1
- package/esm5/text-field.es5.js +64 -24
- package/esm5/text-field.es5.js.map +1 -1
- package/esm5/tree.es5.js +87 -31
- package/esm5/tree.es5.js.map +1 -1
- package/layout/typings/breakpoints-observer.d.ts +3 -3
- package/layout/typings/index.metadata.json +1 -1
- package/layout/typings/media-matcher.d.ts +2 -2
- package/overlay/typings/index.metadata.json +1 -1
- package/overlay/typings/position/flexible-connected-position-strategy.d.ts +1 -3
- package/package.json +8 -8
- package/portal/typings/portal.d.ts +2 -2
- package/schematics/ng-update/data/attribute-selectors.js +1 -1
- package/schematics/ng-update/data/attribute-selectors.js.map +1 -1
- package/schematics/ng-update/data/class-names.js +3 -3
- package/schematics/ng-update/data/class-names.js.map +1 -1
- package/schematics/ng-update/data/constructor-checks.js +1 -1
- package/schematics/ng-update/data/constructor-checks.js.map +1 -1
- package/schematics/ng-update/data/input-names.js +1 -1
- package/schematics/ng-update/data/input-names.js.map +1 -1
- package/schematics/ng-update/data/method-call-checks.js +1 -1
- package/schematics/ng-update/data/method-call-checks.js.map +1 -1
- package/schematics/ng-update/data/property-names.js +4 -4
- package/schematics/ng-update/data/property-names.js.map +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js +1 -1
- package/schematics/ng-update/upgrade-rules/signature-check/constructorSignatureCheckRule.js.map +1 -1
- package/schematics/tsconfig.tsbuildinfo +5811 -0
- package/schematics/utils/ast.d.ts +1 -1
- package/schematics/utils/build-component.js +1 -1
- package/schematics/utils/build-component.js.map +1 -1
- package/schematics/utils/get-project.d.ts +1 -1
- package/schematics/utils/project-main-file.d.ts +1 -1
- package/schematics/utils/project-style-file.d.ts +1 -1
- package/schematics/utils/project-targets.d.ts +1 -1
- package/schematics/utils/schematic-options.d.ts +1 -1
- package/table/typings/cell.d.ts +3 -2
- package/table/typings/index.metadata.json +1 -1
- package/table/typings/public-api.d.ts +1 -0
- package/table/typings/row.d.ts +5 -4
- package/table/typings/sticky-styler.d.ts +5 -5
- package/table/typings/table-errors.d.ts +10 -0
- package/table/typings/text-column.d.ts +80 -0
- package/typings/drag-drop/directives/drag.d.ts +11 -2
- package/typings/drag-drop/drag-events.d.ts +17 -0
- package/typings/drag-drop/drag-ref.d.ts +9 -5
- package/typings/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/drag-drop/directives/drag.d.ts +11 -2
- package/typings/esm5/drag-drop/drag-events.d.ts +17 -0
- package/typings/esm5/drag-drop/drag-ref.d.ts +9 -5
- package/typings/esm5/drag-drop/drop-list-ref.d.ts +9 -3
- package/typings/esm5/drag-drop/index.metadata.json +1 -1
- package/typings/esm5/index.metadata.json +1 -1
- package/typings/esm5/layout/breakpoints-observer.d.ts +3 -3
- package/typings/esm5/layout/index.metadata.json +1 -1
- package/typings/esm5/layout/media-matcher.d.ts +2 -2
- package/typings/esm5/overlay/index.metadata.json +1 -1
- package/typings/esm5/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/esm5/portal/portal.d.ts +2 -2
- package/typings/esm5/table/cell.d.ts +3 -2
- package/typings/esm5/table/index.metadata.json +1 -1
- package/typings/esm5/table/public-api.d.ts +1 -0
- package/typings/esm5/table/row.d.ts +5 -4
- package/typings/esm5/table/sticky-styler.d.ts +5 -5
- package/typings/esm5/table/table-errors.d.ts +10 -0
- package/typings/esm5/table/text-column.d.ts +80 -0
- package/typings/index.metadata.json +1 -1
- package/typings/layout/breakpoints-observer.d.ts +3 -3
- package/typings/layout/index.metadata.json +1 -1
- package/typings/layout/media-matcher.d.ts +2 -2
- package/typings/overlay/index.metadata.json +1 -1
- package/typings/overlay/position/flexible-connected-position-strategy.d.ts +1 -3
- package/typings/portal/portal.d.ts +2 -2
- package/typings/schematics/utils/ast.d.ts +1 -1
- package/typings/schematics/utils/get-project.d.ts +1 -1
- package/typings/schematics/utils/project-main-file.d.ts +1 -1
- package/typings/schematics/utils/project-style-file.d.ts +1 -1
- package/typings/schematics/utils/project-targets.d.ts +1 -1
- package/typings/schematics/utils/schematic-options.d.ts +1 -1
- package/typings/table/cell.d.ts +3 -2
- package/typings/table/index.metadata.json +1 -1
- package/typings/table/public-api.d.ts +1 -0
- package/typings/table/row.d.ts +5 -4
- package/typings/table/sticky-styler.d.ts +5 -5
- package/typings/table/table-errors.d.ts +10 -0
- package/typings/table/text-column.d.ts +80 -0
package/typings/table/row.d.ts
CHANGED
|
@@ -36,9 +36,9 @@ export declare abstract class BaseRowDef implements OnChanges {
|
|
|
36
36
|
extractCellTemplate(column: CdkColumnDef): TemplateRef<any>;
|
|
37
37
|
}
|
|
38
38
|
/** @docs-private */
|
|
39
|
-
|
|
39
|
+
declare class CdkHeaderRowDefBase extends BaseRowDef {
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
declare const _CdkHeaderRowDefBase: CanStickCtor & typeof CdkHeaderRowDefBase;
|
|
42
42
|
/**
|
|
43
43
|
* Header row definition for the CDK table.
|
|
44
44
|
* Captures the header row's template and other header properties such as the columns to display.
|
|
@@ -48,9 +48,9 @@ export declare class CdkHeaderRowDef extends _CdkHeaderRowDefBase implements Can
|
|
|
48
48
|
ngOnChanges(changes: SimpleChanges): void;
|
|
49
49
|
}
|
|
50
50
|
/** @docs-private */
|
|
51
|
-
|
|
51
|
+
declare class CdkFooterRowDefBase extends BaseRowDef {
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
declare const _CdkFooterRowDefBase: CanStickCtor & typeof CdkFooterRowDefBase;
|
|
54
54
|
/**
|
|
55
55
|
* Footer row definition for the CDK table.
|
|
56
56
|
* Captures the footer row's template and other footer properties such as the columns to display.
|
|
@@ -144,3 +144,4 @@ export declare class CdkFooterRow {
|
|
|
144
144
|
/** Data row template container that contains the cell outlet. Adds the right class and role. */
|
|
145
145
|
export declare class CdkRow {
|
|
146
146
|
}
|
|
147
|
+
export {};
|
|
@@ -21,20 +21,20 @@ export declare const STICKY_DIRECTIONS: StickyDirection[];
|
|
|
21
21
|
* @docs-private
|
|
22
22
|
*/
|
|
23
23
|
export declare class StickyStyler {
|
|
24
|
-
private
|
|
25
|
-
private
|
|
24
|
+
private _isNativeHtmlTable;
|
|
25
|
+
private _stickCellCss;
|
|
26
26
|
direction: Direction;
|
|
27
27
|
private _isBrowser;
|
|
28
28
|
/**
|
|
29
|
-
* @param
|
|
29
|
+
* @param _isNativeHtmlTable Whether the sticky logic should be based on a table
|
|
30
30
|
* that uses the native `<table>` element.
|
|
31
|
-
* @param
|
|
31
|
+
* @param _stickCellCss The CSS class that will be applied to every row/cell that has
|
|
32
32
|
* sticky positioning applied.
|
|
33
33
|
* @param direction The directionality context of the table (ltr/rtl); affects column positioning
|
|
34
34
|
* by reversing left/right positions.
|
|
35
35
|
* @param _isBrowser Whether the table is currently being rendered on the server or the client.
|
|
36
36
|
*/
|
|
37
|
-
constructor(
|
|
37
|
+
constructor(_isNativeHtmlTable: boolean, _stickCellCss: string, direction: Direction, _isBrowser?: boolean);
|
|
38
38
|
/**
|
|
39
39
|
* Clears the sticky positioning styles from the row and its cells by resetting the `position`
|
|
40
40
|
* style, setting the zIndex to 0, and unsetting each provided sticky direction.
|
|
@@ -36,3 +36,13 @@ export declare function getTableMissingRowDefsError(): Error;
|
|
|
36
36
|
* @docs-private
|
|
37
37
|
*/
|
|
38
38
|
export declare function getTableUnknownDataSourceError(): Error;
|
|
39
|
+
/**
|
|
40
|
+
* Returns an error to be thrown when the text column cannot find a parent table to inject.
|
|
41
|
+
* @docs-private
|
|
42
|
+
*/
|
|
43
|
+
export declare function getTableTextColumnMissingParentTableError(): Error;
|
|
44
|
+
/**
|
|
45
|
+
* Returns an error to be thrown when a table text column doesn't have a name.
|
|
46
|
+
* @docs-private
|
|
47
|
+
*/
|
|
48
|
+
export declare function getTableTextColumnMissingNameError(): Error;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { InjectionToken, OnDestroy, OnInit } from '@angular/core';
|
|
9
|
+
import { CdkCellDef, CdkColumnDef, CdkHeaderCellDef } from './cell';
|
|
10
|
+
import { CdkTable } from './table';
|
|
11
|
+
/** Configurable options for `CdkTextColumn`. */
|
|
12
|
+
export interface TextColumnOptions<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Default function that provides the header text based on the column name if a header
|
|
15
|
+
* text is not provided.
|
|
16
|
+
*/
|
|
17
|
+
defaultHeaderTextTransform?: (name: string) => string;
|
|
18
|
+
/** Default data accessor to use if one is not provided. */
|
|
19
|
+
defaultDataAccessor?: (data: T, name: string) => string;
|
|
20
|
+
}
|
|
21
|
+
/** Injection token that can be used to specify the text column options. */
|
|
22
|
+
export declare const TEXT_COLUMN_OPTIONS: InjectionToken<TextColumnOptions<any>>;
|
|
23
|
+
/**
|
|
24
|
+
* Column that simply shows text content for the header and row cells. Assumes that the table
|
|
25
|
+
* is using the native table implementation (`<table>`).
|
|
26
|
+
*
|
|
27
|
+
* By default, the name of this column will be the header text and data property accessor.
|
|
28
|
+
* The header text can be overridden with the `headerText` input. Cell values can be overridden with
|
|
29
|
+
* the `dataAccessor` input. Change the text justification to the start or end using the `justify`
|
|
30
|
+
* input.
|
|
31
|
+
*/
|
|
32
|
+
export declare class CdkTextColumn<T> implements OnDestroy, OnInit {
|
|
33
|
+
private _table;
|
|
34
|
+
private _options;
|
|
35
|
+
/** Column name that should be used to reference this column. */
|
|
36
|
+
name: string;
|
|
37
|
+
_name: string;
|
|
38
|
+
/**
|
|
39
|
+
* Text label that should be used for the column header. If this property is not
|
|
40
|
+
* set, the header text will default to the column name with its first letter capitalized.
|
|
41
|
+
*/
|
|
42
|
+
headerText: string;
|
|
43
|
+
/**
|
|
44
|
+
* Accessor function to retrieve the data rendered for each cell. If this
|
|
45
|
+
* property is not set, the data cells will render the value found in the data's property matching
|
|
46
|
+
* the column's name. For example, if the column is named `id`, then the rendered value will be
|
|
47
|
+
* value defined by the data's `id` property.
|
|
48
|
+
*/
|
|
49
|
+
dataAccessor: (data: T, name: string) => string;
|
|
50
|
+
/** Alignment of the cell values. */
|
|
51
|
+
justify: 'start' | 'end';
|
|
52
|
+
/** @docs-private */
|
|
53
|
+
columnDef: CdkColumnDef;
|
|
54
|
+
/**
|
|
55
|
+
* The column cell is provided to the column during `ngOnInit` with a static query.
|
|
56
|
+
* Normally, this will be retrieved by the column using `ContentChild`, but that assumes the
|
|
57
|
+
* column definition was provided in the same view as the table, which is not the case with this
|
|
58
|
+
* component.
|
|
59
|
+
* @docs-private
|
|
60
|
+
*/
|
|
61
|
+
cell: CdkCellDef;
|
|
62
|
+
/**
|
|
63
|
+
* The column headerCell is provided to the column during `ngOnInit` with a static query.
|
|
64
|
+
* Normally, this will be retrieved by the column using `ContentChild`, but that assumes the
|
|
65
|
+
* column definition was provided in the same view as the table, which is not the case with this
|
|
66
|
+
* component.
|
|
67
|
+
* @docs-private
|
|
68
|
+
*/
|
|
69
|
+
headerCell: CdkHeaderCellDef;
|
|
70
|
+
constructor(_table: CdkTable<T>, _options: TextColumnOptions<T>);
|
|
71
|
+
ngOnInit(): void;
|
|
72
|
+
ngOnDestroy(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a default header text. Use the options' header text transformation function if one
|
|
75
|
+
* has been provided. Otherwise simply capitalize the column name.
|
|
76
|
+
*/
|
|
77
|
+
_createDefaultHeaderText(): string;
|
|
78
|
+
/** Synchronizes the column definition name with the text column name. */
|
|
79
|
+
private _syncColumnDefName;
|
|
80
|
+
}
|