@sebgroup/green-angular 3.3.0 → 3.4.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 +55 -14
- package/esm2020/index.mjs +2 -1
- package/esm2020/lib/cell-table/cell-table-item.component.mjs +91 -0
- package/esm2020/lib/cell-table/cell-table.component.mjs +97 -0
- package/esm2020/lib/cell-table/cell-table.module.mjs +26 -0
- package/esm2020/lib/cell-table/cell-table.types.mjs +7 -0
- package/esm2020/lib/cell-table/cell-underline.directive.mjs +55 -0
- package/esm2020/lib/cell-table/index.mjs +4 -0
- package/esm2020/lib/green-angular.module.mjs +5 -1
- package/fesm2015/sebgroup-green-angular.mjs +266 -2
- package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
- package/fesm2020/sebgroup-green-angular.mjs +264 -2
- package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/cell-table/cell-table-item.component.d.ts +14 -0
- package/lib/cell-table/cell-table.component.d.ts +44 -0
- package/lib/cell-table/cell-table.module.d.ts +10 -0
- package/lib/cell-table/cell-table.types.d.ts +34 -0
- package/lib/cell-table/cell-underline.directive.d.ts +14 -0
- package/lib/cell-table/index.d.ts +3 -0
- package/lib/green-angular.module.d.ts +3 -2
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TableHeaderListValueType } from './cell-table.types';
|
|
2
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CellTableItemComponent {
|
|
5
|
+
private sanitizer;
|
|
6
|
+
row: any;
|
|
7
|
+
valueType: TableHeaderListValueType;
|
|
8
|
+
id: string;
|
|
9
|
+
constructor(sanitizer: DomSanitizer);
|
|
10
|
+
getSignColor: (value: string | number) => "" | "text-danger" | "text-success";
|
|
11
|
+
transformHTML(value: string): SafeHtml;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellTableItemComponent, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CellTableItemComponent, "[nggCellTableItem]", never, { "row": "row"; "valueType": "valueType"; "id": "id"; }, {}, never, never, false, never>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, QueryList } from '@angular/core';
|
|
2
|
+
import { TableHeaderListItem, TableHeaderListValueType, TableRow } from './cell-table.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NggCellTableComponent {
|
|
5
|
+
items: QueryList<ElementRef>;
|
|
6
|
+
/** Cell min-width to force same width on small screens */
|
|
7
|
+
minWidth?: number;
|
|
8
|
+
/** Make the most left element wrap */
|
|
9
|
+
overflowReverse: boolean;
|
|
10
|
+
/** Element class name */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** List of table headers */
|
|
13
|
+
headerList: TableHeaderListItem[];
|
|
14
|
+
/** List of data */
|
|
15
|
+
rows: TableRow[];
|
|
16
|
+
/** Make rows clickable and add arrow to the right */
|
|
17
|
+
clickableRows: boolean;
|
|
18
|
+
/** Label for the chevron of clickable rows */
|
|
19
|
+
clickLabel: string;
|
|
20
|
+
/** Callback when a row is clicked */
|
|
21
|
+
rowClicked: EventEmitter<TableRow>;
|
|
22
|
+
/**
|
|
23
|
+
* handles the logic for when a row is clicked
|
|
24
|
+
* @param {TableRowClickedEvent} value the TableRowClickedEvent
|
|
25
|
+
*/
|
|
26
|
+
handleClickRow: (value: TableRow) => void;
|
|
27
|
+
getValueTypeFromMain: () => TableHeaderListValueType;
|
|
28
|
+
getTableHeaderListValueFromNonMain: (header: TableHeaderListItem) => TableHeaderListValueType;
|
|
29
|
+
mainHeader: (row: TableRow) => {
|
|
30
|
+
value: any;
|
|
31
|
+
valueType: "string" | "number" | "date" | "datetime" | "bool" | "custom-html" | "sign" | "streamSign";
|
|
32
|
+
tableKeySelector: string;
|
|
33
|
+
} | {
|
|
34
|
+
value: string;
|
|
35
|
+
valueType: string;
|
|
36
|
+
tableKeySelector: string;
|
|
37
|
+
};
|
|
38
|
+
headerNoneMain: (headers: TableHeaderListItem[]) => TableHeaderListItem<Record<string, unknown>>[];
|
|
39
|
+
getTableKeySelector: (row: TableRow) => string;
|
|
40
|
+
trackByrowId(_: any, b: TableRow): string | number;
|
|
41
|
+
KeySelector(_: any, b: TableHeaderListItem): string;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NggCellTableComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NggCellTableComponent, "ngg-cell-table", never, { "minWidth": "minWidth"; "overflowReverse": "overflowReverse"; "className": "className"; "headerList": "headerList"; "rows": "rows"; "clickableRows": "clickableRows"; "clickLabel": "clickLabel"; }, { "rowClicked": "rowClicked"; }, never, never, false, never>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./cell-table.component";
|
|
3
|
+
import * as i2 from "./cell-table-item.component";
|
|
4
|
+
import * as i3 from "./cell-underline.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
export declare class NggCellTableModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NggCellTableModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NggCellTableModule, [typeof i1.NggCellTableComponent, typeof i2.CellTableItemComponent, typeof i3.SlidingUnderlineDirective], [typeof i4.CommonModule], [typeof i1.NggCellTableComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NggCellTableModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default class Table {
|
|
2
|
+
constructor(table: {
|
|
3
|
+
data: TableRow[];
|
|
4
|
+
header: TableHeaderListItem[];
|
|
5
|
+
});
|
|
6
|
+
data: TableRow[];
|
|
7
|
+
header: TableHeaderListItem[];
|
|
8
|
+
}
|
|
9
|
+
/** The type of a data the values in a column represent */
|
|
10
|
+
export declare type TableHeaderListValueType = 'number' | 'string' | 'date' | 'datetime' | 'bool' | 'custom-html' | 'sign' | 'streamSign' | '';
|
|
11
|
+
/** Table Header List Item Interface */
|
|
12
|
+
export interface TableHeaderListItem<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
13
|
+
/** The label displayed */
|
|
14
|
+
label: string;
|
|
15
|
+
/** the key selector corresponding to to the TableList Item which this column is targeting */
|
|
16
|
+
tableKeySelector: string;
|
|
17
|
+
/** the type of value: string, date or number */
|
|
18
|
+
valueType?: TableHeaderListValueType;
|
|
19
|
+
/** the main field for stacked table */
|
|
20
|
+
main?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface TableRow {
|
|
23
|
+
[prop: string]: any;
|
|
24
|
+
rowId: string | number;
|
|
25
|
+
}
|
|
26
|
+
/** The information on the currently selected sort: column name, type and asc/desc */
|
|
27
|
+
export interface SortInfo<T extends Record<string, unknown> = {
|
|
28
|
+
[k: string]: any;
|
|
29
|
+
}> {
|
|
30
|
+
/** column name */
|
|
31
|
+
column: keyof T;
|
|
32
|
+
/** is ascending (false for descending) */
|
|
33
|
+
isAscending: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ElementRef, SimpleChanges, OnChanges, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SlidingUnderlineDirective implements OnInit, OnChanges {
|
|
4
|
+
private element;
|
|
5
|
+
constructor(element: ElementRef<HTMLElement>);
|
|
6
|
+
nggSlidingUnderline: any;
|
|
7
|
+
key?: any;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
ngOnInit(): void;
|
|
10
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
11
|
+
addAnimation(current: any, previous: any): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SlidingUnderlineDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SlidingUnderlineDirective, "[nggSlidingUnderline]", never, { "nggSlidingUnderline": "nggSlidingUnderline"; "key": "key"; "disabled": "disabled"; }, {}, never, never, false, never>;
|
|
14
|
+
}
|
|
@@ -11,9 +11,10 @@ import * as i9 from "./segmented-control/segmented-control.module";
|
|
|
11
11
|
import * as i10 from "./slider/slider.module";
|
|
12
12
|
import * as i11 from "./context-menu/context-menu.module";
|
|
13
13
|
import * as i12 from "./in-page-wizard/in-page-wizard.module";
|
|
14
|
-
import * as i13 from "./
|
|
14
|
+
import * as i13 from "./cell-table/cell-table.module";
|
|
15
|
+
import * as i14 from "./shared/shared.module";
|
|
15
16
|
export declare class NggModule {
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NggModule, never>;
|
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NggModule, never, [typeof i1.CommonModule], [typeof i2.NggAccordionModule, typeof i3.NggBadgeModule, typeof i4.NggButtonModule, typeof i5.NggDatepickerModule, typeof i6.NggDropdownModule, typeof i7.NggModalModule, typeof i8.NggProgressCircleModule, typeof i9.NggSegmentedControlModule, typeof i10.NggSliderModule, typeof i11.NggContextMenuModule, typeof i12.NggInPageWizardModule, typeof i13.NggSharedModule]>;
|
|
18
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NggModule, never, [typeof i1.CommonModule], [typeof i2.NggAccordionModule, typeof i3.NggBadgeModule, typeof i4.NggButtonModule, typeof i5.NggDatepickerModule, typeof i6.NggDropdownModule, typeof i7.NggModalModule, typeof i8.NggProgressCircleModule, typeof i9.NggSegmentedControlModule, typeof i10.NggSliderModule, typeof i11.NggContextMenuModule, typeof i12.NggInPageWizardModule, typeof i13.NggCellTableModule, typeof i14.NggSharedModule]>;
|
|
18
19
|
static ɵinj: i0.ɵɵInjectorDeclaration<NggModule>;
|
|
19
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-angular",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/cdk": ">=15.2.9",
|
|
6
6
|
"@angular/common": ">=15.2.9",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"rxjs": ">=6.5.3"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@sebgroup/green-core": "^1.
|
|
15
|
-
"@sebgroup/chlorophyll": "^3.1.
|
|
14
|
+
"@sebgroup/green-core": "^1.8.0",
|
|
15
|
+
"@sebgroup/chlorophyll": "^3.1.1",
|
|
16
16
|
"@sebgroup/extract": "^3.0.1",
|
|
17
17
|
"tslib": "^2.3.1"
|
|
18
18
|
},
|