@nova-ui/bits 15.0.9 → 15.0.11
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/esm2020/lib/table/table-row/table-row.component.mjs +80 -22
- package/esm2020/lib/table/table-state-handler.service.mjs +41 -3
- package/esm2020/lib/table/table.component.mjs +41 -6
- package/esm2020/lib/table/table.module.mjs +5 -1
- package/esm2020/lib/table/types.mjs +8 -2
- package/esm2020/lib/toolbar/toolbar.component.mjs +9 -3
- package/esm2020/services/theme-switch.service.mjs +4 -1
- package/fesm2015/nova-ui-bits.mjs +196 -30
- package/fesm2015/nova-ui-bits.mjs.map +1 -1
- package/fesm2020/nova-ui-bits.mjs +196 -32
- package/fesm2020/nova-ui-bits.mjs.map +1 -1
- package/lib/table/table-row/table-row.component.d.ts +5 -3
- package/lib/table/table-state-handler.service.d.ts +10 -2
- package/lib/table/table.component.d.ts +7 -1
- package/lib/table/table.module.d.ts +7 -6
- package/lib/table/types.d.ts +15 -0
- package/lib/toolbar/toolbar.component.d.ts +5 -1
- package/package.json +1 -1
- package/sdk/locale/messages.en.xlf +8 -8
|
@@ -4,7 +4,7 @@ import { Subscription } from "rxjs";
|
|
|
4
4
|
import { ISelectorState } from "../../../services/public-api";
|
|
5
5
|
import { SelectionType } from "../../selector/public-api";
|
|
6
6
|
import { TableStateHandlerService } from "../table-state-handler.service";
|
|
7
|
-
import { ClickableRowOptions, RowHeightOptions } from "../types";
|
|
7
|
+
import { ClickableRowOptions, RowHeightOptions, TableSelectionMode } from "../types";
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
/**
|
|
10
10
|
* @ignore
|
|
@@ -58,6 +58,7 @@ export declare class TableHeaderRowComponent extends CdkHeaderRow implements OnI
|
|
|
58
58
|
density: RowHeightOptions;
|
|
59
59
|
selectorState: ISelectorState;
|
|
60
60
|
selectable: boolean;
|
|
61
|
+
selectionMode: TableSelectionMode;
|
|
61
62
|
selectionChangeSubscription: Subscription;
|
|
62
63
|
dataSourceChangeSubscription: Subscription;
|
|
63
64
|
get isDensityDefault(): boolean;
|
|
@@ -87,17 +88,18 @@ export declare class TableRowComponent extends CdkRow implements OnInit, OnDestr
|
|
|
87
88
|
clickableRow: boolean;
|
|
88
89
|
clickableRowConfig: ClickableRowOptions;
|
|
89
90
|
selectable: boolean;
|
|
91
|
+
selectionMode: TableSelectionMode;
|
|
90
92
|
selectionChangeSubscription: Subscription;
|
|
91
93
|
get isSelected(): boolean;
|
|
92
94
|
get isDensityDefault(): boolean;
|
|
93
95
|
get isDensityCompact(): boolean;
|
|
94
96
|
get isDensityTiny(): boolean;
|
|
95
|
-
private
|
|
97
|
+
private rowSelectionElement;
|
|
96
98
|
private onDestroy$;
|
|
97
99
|
constructor(elementRef: ElementRef, tableStateHandlerService: TableStateHandlerService, changeDetectorRef: ChangeDetectorRef);
|
|
98
100
|
ngOnInit(): void;
|
|
99
101
|
rowClickHandler(target: HTMLElement): void;
|
|
100
|
-
|
|
102
|
+
rowSelected(): void;
|
|
101
103
|
/**
|
|
102
104
|
* We need to stop propagation of the checkbox click to prevent the row click handler from invoking the checkbox toggle functionality again
|
|
103
105
|
*/
|
|
@@ -5,6 +5,7 @@ import { ISelection, ISelectorState } from "../../services/public-api";
|
|
|
5
5
|
import { SelectionType } from "../selector/public-api";
|
|
6
6
|
import { SelectorService } from "../selector/selector.service";
|
|
7
7
|
import { ISortedItem } from "../sorter/public-api";
|
|
8
|
+
import { TableSelectionMode } from "./types";
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare const enum AlignmentClasses {
|
|
10
11
|
RIGHT = "align-right",
|
|
@@ -59,6 +60,7 @@ export declare class TableStateHandlerService {
|
|
|
59
60
|
dataSourceChanged: Subject<any[]>;
|
|
60
61
|
selectionChanged: Subject<ISelection>;
|
|
61
62
|
selectableChanged: Subject<boolean>;
|
|
63
|
+
selectionModeChanged: Subject<TableSelectionMode>;
|
|
62
64
|
columnWidthSubject: Subject<void>;
|
|
63
65
|
stickyHeaderChangedSubject: Subject<void>;
|
|
64
66
|
private _reorderable;
|
|
@@ -71,6 +73,7 @@ export declare class TableStateHandlerService {
|
|
|
71
73
|
private _dropCellWidth;
|
|
72
74
|
private _dragOverDirection;
|
|
73
75
|
private _selectable;
|
|
76
|
+
private _selectionMode;
|
|
74
77
|
private _hasVirtualScroll;
|
|
75
78
|
private _totalItems;
|
|
76
79
|
private _dataSource;
|
|
@@ -109,6 +112,8 @@ export declare class TableStateHandlerService {
|
|
|
109
112
|
set sortedColumn(columnToSort: ISortedItem);
|
|
110
113
|
set selectable(isSelectable: boolean);
|
|
111
114
|
get selectable(): boolean;
|
|
115
|
+
set selectionMode(mode: TableSelectionMode);
|
|
116
|
+
get selectionMode(): TableSelectionMode;
|
|
112
117
|
get hasVirtualScroll(): boolean;
|
|
113
118
|
set hasVirtualScroll(value: boolean);
|
|
114
119
|
set totalItems(paginationTotal: number);
|
|
@@ -119,6 +124,7 @@ export declare class TableStateHandlerService {
|
|
|
119
124
|
get selection(): ISelection;
|
|
120
125
|
get trackBy(): TrackByFunction<any>;
|
|
121
126
|
set trackBy(value: TrackByFunction<any>);
|
|
127
|
+
get selectionEnabled(): boolean;
|
|
122
128
|
/**
|
|
123
129
|
* Gets the width of the specified column
|
|
124
130
|
*
|
|
@@ -250,11 +256,13 @@ export declare class TableStateHandlerService {
|
|
|
250
256
|
/**
|
|
251
257
|
* Updates the selection object to either include or exclude the row based on the current selection
|
|
252
258
|
* type and the row's current selection state
|
|
253
|
-
* Then the selection object is
|
|
259
|
+
* Then the selection object is broadcast to all listeners of selectionChanged
|
|
254
260
|
*
|
|
255
261
|
* @param rowObject
|
|
256
262
|
*/
|
|
257
|
-
|
|
263
|
+
handleRowSelect(rowObject: Object): void;
|
|
264
|
+
private handleRowSelectSingle;
|
|
265
|
+
private handleRowSelectMulti;
|
|
258
266
|
/**
|
|
259
267
|
* Returns the current sorting state of the specified cell index
|
|
260
268
|
*
|
|
@@ -8,6 +8,7 @@ import { TableStateHandlerService } from "./table-state-handler.service";
|
|
|
8
8
|
import { IFilteringParticipants, ISelection } from "../../services/public-api";
|
|
9
9
|
import { ComponentChanges } from "../../types";
|
|
10
10
|
import { ISortedItem, SorterDirection } from "../sorter/public-api";
|
|
11
|
+
import { TableSelectionConfig } from "./types";
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
/** @dynamic */
|
|
13
14
|
export declare class TableComponent<T> extends CdkTable<T> implements OnInit, AfterViewInit, AfterContentInit, OnDestroy, OnChanges {
|
|
@@ -21,7 +22,11 @@ export declare class TableComponent<T> extends CdkTable<T> implements OnInit, Af
|
|
|
21
22
|
reorderable: boolean;
|
|
22
23
|
sortable: boolean;
|
|
23
24
|
resizable: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use selectionConfig instead.
|
|
27
|
+
*/
|
|
24
28
|
selectable: boolean;
|
|
29
|
+
selectionConfig: TableSelectionConfig;
|
|
25
30
|
totalItems: number;
|
|
26
31
|
get dataSource(): T[];
|
|
27
32
|
set dataSource(value: T[]);
|
|
@@ -44,10 +49,11 @@ export declare class TableComponent<T> extends CdkTable<T> implements OnInit, Af
|
|
|
44
49
|
ngOnInit(): void;
|
|
45
50
|
ngAfterViewInit(): void;
|
|
46
51
|
private changeSelection;
|
|
52
|
+
private changeSelectionMode;
|
|
47
53
|
private handleSortedColumn;
|
|
48
54
|
private onDataSourceChange;
|
|
49
55
|
ngOnDestroy(): void;
|
|
50
56
|
ngAfterContentInit(): void;
|
|
51
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, [null, null, null, { attribute: "role"; }, null, null, null, null, null, null, null, { optional: true; skipSelf: true; }]>;
|
|
52
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "nui-table, table[nui-table]", ["nuiTable"], { "reorderable": "reorderable"; "sortable": "sortable"; "resizable": "resizable"; "selectable": "selectable"; "totalItems": "totalItems"; "dataSource": "dataSource"; "selection": "selection"; "sortedColumn": "sortedColumn"; }, { "columnsOrderChange": "columnsOrderChange"; "sortOrderChanged": "sortOrderChanged"; "selectionChange": "selectionChange"; }, ["virtualFor"], ["caption", "colgroup, col"], false, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "nui-table, table[nui-table]", ["nuiTable"], { "reorderable": "reorderable"; "sortable": "sortable"; "resizable": "resizable"; "selectable": "selectable"; "selectionConfig": "selectionConfig"; "totalItems": "totalItems"; "dataSource": "dataSource"; "selection": "selection"; "sortedColumn": "sortedColumn"; }, { "columnsOrderChange": "columnsOrderChange"; "sortOrderChanged": "sortOrderChanged"; "selectionChange": "selectionChange"; }, ["virtualFor"], ["caption", "colgroup, col"], false, never>;
|
|
53
59
|
}
|
|
@@ -13,16 +13,17 @@ import * as i11 from "./table-virtual-scroll/table-virtual-scroll.directive";
|
|
|
13
13
|
import * as i12 from "./table-virtual-scroll/table-sticky-header.directive";
|
|
14
14
|
import * as i13 from "./table-virtual-scroll/slice-range.pipe";
|
|
15
15
|
import * as i14 from "../../common/common.module";
|
|
16
|
-
import * as i15 from "../
|
|
17
|
-
import * as i16 from "../
|
|
18
|
-
import * as i17 from "../
|
|
19
|
-
import * as i18 from "../
|
|
20
|
-
import * as i19 from "
|
|
16
|
+
import * as i15 from "../radio/radio.module";
|
|
17
|
+
import * as i16 from "../select/select.module";
|
|
18
|
+
import * as i17 from "../selector/selector.module";
|
|
19
|
+
import * as i18 from "../checkbox/checkbox.module";
|
|
20
|
+
import * as i19 from "../icon/icon.module";
|
|
21
|
+
import * as i20 from "@angular/cdk/table";
|
|
21
22
|
/**
|
|
22
23
|
* @ignore
|
|
23
24
|
*/
|
|
24
25
|
export declare class NuiTableModule {
|
|
25
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<NuiTableModule, never>;
|
|
26
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NuiTableModule, [typeof i1.TableComponent, typeof i2.TableHeaderRowDefDirective, typeof i3.TableResizerDirective, typeof i4.TableCellDefDirective, typeof i2.TableRowDefDirective, typeof i2.TableFooterRowDefDirective, typeof i2.TableHeaderRowComponent, typeof i2.TableRowComponent, typeof i2.TableFooterRowComponent, typeof i5.TableHeaderCellDefDirective, typeof i6.TableHeaderCellComponent, typeof i7.TableCellDirective, typeof i8.TableFooterCellDefDirective, typeof i9.TableFooterCellDirective, typeof i10.TableColumnDefDirective, typeof i11.TableVirtualScrollDirective, typeof i11.TableVirtualScrollLinearDirective, typeof i12.TableStickyHeaderDirective, typeof i13.SliceRangePipe], [typeof i14.NuiCommonModule, typeof i15.
|
|
27
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NuiTableModule, [typeof i1.TableComponent, typeof i2.TableHeaderRowDefDirective, typeof i3.TableResizerDirective, typeof i4.TableCellDefDirective, typeof i2.TableRowDefDirective, typeof i2.TableFooterRowDefDirective, typeof i2.TableHeaderRowComponent, typeof i2.TableRowComponent, typeof i2.TableFooterRowComponent, typeof i5.TableHeaderCellDefDirective, typeof i6.TableHeaderCellComponent, typeof i7.TableCellDirective, typeof i8.TableFooterCellDefDirective, typeof i9.TableFooterCellDirective, typeof i10.TableColumnDefDirective, typeof i11.TableVirtualScrollDirective, typeof i11.TableVirtualScrollLinearDirective, typeof i12.TableStickyHeaderDirective, typeof i13.SliceRangePipe], [typeof i14.NuiCommonModule, typeof i15.NuiRadioModule, typeof i16.NuiSelectModule, typeof i17.NuiSelectorModule, typeof i18.NuiCheckboxModule, typeof i19.NuiIconModule, typeof i20.CdkTableModule], [typeof i1.TableComponent, typeof i2.TableHeaderRowDefDirective, typeof i3.TableResizerDirective, typeof i4.TableCellDefDirective, typeof i2.TableRowDefDirective, typeof i2.TableFooterRowDefDirective, typeof i2.TableHeaderRowComponent, typeof i2.TableRowComponent, typeof i2.TableFooterRowComponent, typeof i5.TableHeaderCellDefDirective, typeof i6.TableHeaderCellComponent, typeof i7.TableCellDirective, typeof i8.TableFooterCellDefDirective, typeof i9.TableFooterCellDirective, typeof i10.TableColumnDefDirective, typeof i11.TableVirtualScrollDirective, typeof i11.TableVirtualScrollLinearDirective, typeof i12.TableStickyHeaderDirective, typeof i13.SliceRangePipe]>;
|
|
27
28
|
static ɵinj: i0.ɵɵInjectorDeclaration<NuiTableModule>;
|
|
28
29
|
}
|
package/lib/table/types.d.ts
CHANGED
|
@@ -6,3 +6,18 @@ export interface ClickableRowOptions {
|
|
|
6
6
|
clickableSelectors: string[];
|
|
7
7
|
ignoredSelectors: string[];
|
|
8
8
|
}
|
|
9
|
+
export declare enum TableSelectionMode {
|
|
10
|
+
None = "none",
|
|
11
|
+
Single = "single",
|
|
12
|
+
Radio = "radio",
|
|
13
|
+
Multi = "multi"
|
|
14
|
+
}
|
|
15
|
+
export interface ITableSelectionConfigEnabled {
|
|
16
|
+
enabled: true;
|
|
17
|
+
selectionMode: Exclude<TableSelectionMode, TableSelectionMode.None>;
|
|
18
|
+
}
|
|
19
|
+
export interface ITableSelectionConfigDisabled {
|
|
20
|
+
enabled: false;
|
|
21
|
+
selectionMode: TableSelectionMode.None;
|
|
22
|
+
}
|
|
23
|
+
export type TableSelectionConfig = ITableSelectionConfigEnabled | ITableSelectionConfigDisabled;
|
|
@@ -30,6 +30,10 @@ export declare class ToolbarComponent implements AfterViewInit, OnDestroy {
|
|
|
30
30
|
boxShadow: boolean;
|
|
31
31
|
toolbarContainer: ElementRef;
|
|
32
32
|
noEmptyMessage: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Passed to the toolbar menu
|
|
35
|
+
*/
|
|
36
|
+
appendToBody: boolean;
|
|
33
37
|
menu: MenuComponent;
|
|
34
38
|
toolbarButtons: QueryList<ButtonComponent>;
|
|
35
39
|
commandGroups: IToolbarGroupContent[];
|
|
@@ -56,5 +60,5 @@ export declare class ToolbarComponent implements AfterViewInit, OnDestroy {
|
|
|
56
60
|
get destructiveIsLastItem(): boolean;
|
|
57
61
|
private subscribeToToolbarStepsChanges;
|
|
58
62
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarComponent, never>;
|
|
59
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "nui-toolbar", never, { "selectionEnabled": "selectionEnabled"; "selectedItems": "selectedItems"; "boxShadow": "boxShadow"; "noEmptyMessage": "noEmptyMessage"; }, {}, ["groups", "items"], ["nui-toolbar-message", "*", ".nui-toolbar-embedded"], false, never>;
|
|
63
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "nui-toolbar", never, { "selectionEnabled": "selectionEnabled"; "selectedItems": "selectedItems"; "boxShadow": "boxShadow"; "noEmptyMessage": "noEmptyMessage"; "appendToBody": "appendToBody"; }, {}, ["groups", "items"], ["nui-toolbar-message", "*", ".nui-toolbar-embedded"], false, never>;
|
|
60
64
|
}
|
package/package.json
CHANGED
|
@@ -282,50 +282,50 @@
|
|
|
282
282
|
<source>No actions available for this selection</source>
|
|
283
283
|
<context-group purpose="location">
|
|
284
284
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.html</context>
|
|
285
|
-
<context context-type="linenumber">
|
|
285
|
+
<context context-type="linenumber">77</context>
|
|
286
286
|
</context-group>
|
|
287
287
|
</trans-unit>
|
|
288
288
|
<trans-unit id="61c69580e0de535a93a1053316c9cb9e8833e1ba" datatype="html">
|
|
289
289
|
<source>No actions available</source>
|
|
290
290
|
<context-group purpose="location">
|
|
291
291
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.html</context>
|
|
292
|
-
<context context-type="linenumber">
|
|
292
|
+
<context context-type="linenumber">80</context>
|
|
293
293
|
</context-group>
|
|
294
294
|
</trans-unit>
|
|
295
295
|
<trans-unit id="21275452006765587" datatype="html">
|
|
296
296
|
<source>Commands</source>
|
|
297
297
|
<context-group purpose="location">
|
|
298
298
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.ts</context>
|
|
299
|
-
<context context-type="linenumber">
|
|
299
|
+
<context context-type="linenumber">116</context>
|
|
300
300
|
</context-group>
|
|
301
301
|
</trans-unit>
|
|
302
302
|
<trans-unit id="5937251202465808296" datatype="html">
|
|
303
303
|
<source>More</source>
|
|
304
304
|
<context-group purpose="location">
|
|
305
305
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.ts</context>
|
|
306
|
-
<context context-type="linenumber">
|
|
306
|
+
<context context-type="linenumber">117</context>
|
|
307
307
|
</context-group>
|
|
308
308
|
</trans-unit>
|
|
309
309
|
<trans-unit id="6978872087774160354" datatype="html">
|
|
310
310
|
<source><x id="PH" equiv-text="this.selectedItems.current"/> of <x id="PH_1" equiv-text="this.selectedItems.total"/> selected</source>
|
|
311
311
|
<context-group purpose="location">
|
|
312
312
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.ts</context>
|
|
313
|
-
<context context-type="linenumber">
|
|
313
|
+
<context context-type="linenumber">278</context>
|
|
314
314
|
</context-group>
|
|
315
315
|
<context-group purpose="location">
|
|
316
316
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.ts</context>
|
|
317
|
-
<context context-type="linenumber">
|
|
317
|
+
<context context-type="linenumber">290</context>
|
|
318
318
|
</context-group>
|
|
319
319
|
</trans-unit>
|
|
320
320
|
<trans-unit id="1212103810249878842" datatype="html">
|
|
321
321
|
<source>All <x id="PH" equiv-text="this.selectedItems.total"/> selected</source>
|
|
322
322
|
<context-group purpose="location">
|
|
323
323
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.ts</context>
|
|
324
|
-
<context context-type="linenumber">
|
|
324
|
+
<context context-type="linenumber">279</context>
|
|
325
325
|
</context-group>
|
|
326
326
|
<context-group purpose="location">
|
|
327
327
|
<context context-type="sourcefile">src/lib/toolbar/toolbar.component.ts</context>
|
|
328
|
-
<context context-type="linenumber">
|
|
328
|
+
<context context-type="linenumber">289</context>
|
|
329
329
|
</context-group>
|
|
330
330
|
</trans-unit>
|
|
331
331
|
<trans-unit id="30f9348e78e8f5d7efcffd4bb265acf963d3907f" datatype="html">
|