@datarailsshared/datarailsshared 1.6.234 → 1.6.238
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/assets/styles/_storybook-styles.scss +3 -0
- package/assets/styles/_styles.scss +3 -0
- package/datarailsshared-datarailsshared-1.6.238.tgz +0 -0
- package/esm2022/lib/decorators/decorators.mjs +26 -0
- package/esm2022/lib/dr-grid/components/cells/cell-action/cell-action.component.mjs +95 -0
- package/esm2022/lib/dr-grid/components/cells/cell-badge-status/cell-badge-status.component.mjs +49 -0
- package/esm2022/lib/dr-grid/components/cells/cell-button/cell-button.component.mjs +38 -0
- package/esm2022/lib/dr-grid/components/cells/cell-checkbox/cell-checkbox.component.mjs +50 -0
- package/esm2022/lib/dr-grid/components/cells/cell-children-list/cell-children-list.component.mjs +141 -0
- package/esm2022/lib/dr-grid/components/cells/cell-custom-template/cell-custom-template.component.mjs +28 -0
- package/esm2022/lib/dr-grid/components/cells/cell-icon-actions/cell-icon-actions.component.mjs +101 -0
- package/esm2022/lib/dr-grid/components/cells/cell-icon-text-edit/cell-icon-text-edit.component.mjs +130 -0
- package/esm2022/lib/dr-grid/components/cells/cell-link/cell-link.component.mjs +94 -0
- package/esm2022/lib/dr-grid/components/cells/cell-select/cell-select.component.mjs +45 -0
- package/esm2022/lib/dr-grid/components/cells/cell-set-as-default/cell-set-as-default.component.mjs +48 -0
- package/esm2022/lib/dr-grid/components/cells/cell-split-rows/cell-split-rows.component.mjs +99 -0
- package/esm2022/lib/dr-grid/components/cells/cell-toggle/cell-toggle.component.mjs +38 -0
- package/esm2022/lib/dr-grid/components/cells/tbl-header/tbl-header.component.mjs +169 -0
- package/esm2022/lib/dr-grid/components/dr-grid-columns-filter-popover/dr-grid-columns-filter-popover.component.mjs +87 -0
- package/esm2022/lib/dr-grid/components/dr-grid-no-rows/dr-grid-no-rows.component.mjs +10 -0
- package/esm2022/lib/dr-grid/components/dr-grid-pagination/dr-grid-pagination.component.mjs +150 -0
- package/esm2022/lib/dr-grid/components/dr-grid-toolbar/dr-grid-toolbar.component.mjs +194 -0
- package/esm2022/lib/dr-grid/components/tbl-toggle-button-header/tbl-toggle-button-header.component.mjs +46 -0
- package/esm2022/lib/dr-grid/dr-grid.component.mjs +364 -0
- package/esm2022/lib/dr-grid/dr-grid.mjs +26 -0
- package/esm2022/lib/dr-grid/models/dr-grid-events.mjs +9 -0
- package/esm2022/lib/dr-grid/models/dr-grid-theme.mjs +27 -0
- package/esm2022/lib/dr-grid/models/interfaces.mjs +6 -0
- package/esm2022/lib/dr-grid/services/abstract-single-grid.mjs +136 -0
- package/esm2022/lib/dr-grid/services/grid-utils.mjs +53 -0
- package/esm2022/lib/emoji-picker/emoji-picker.component.mjs +2 -2
- package/esm2022/lib/pipes/indeterminate/indeterminate.pipe.mjs +38 -0
- package/esm2022/local-api.mjs +6 -2
- package/fesm2022/datarailsshared-datarailsshared.mjs +2335 -265
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/decorators/decorators.d.ts +2 -0
- package/lib/dr-grid/components/cells/cell-action/cell-action.component.d.ts +37 -0
- package/lib/dr-grid/components/cells/cell-badge-status/cell-badge-status.component.d.ts +22 -0
- package/lib/dr-grid/components/cells/cell-button/cell-button.component.d.ts +19 -0
- package/lib/dr-grid/components/cells/cell-checkbox/cell-checkbox.component.d.ts +24 -0
- package/lib/dr-grid/components/cells/cell-children-list/cell-children-list.component.d.ts +21 -0
- package/lib/dr-grid/components/cells/cell-custom-template/cell-custom-template.component.d.ts +23 -0
- package/lib/dr-grid/components/cells/cell-icon-actions/cell-icon-actions.component.d.ts +35 -0
- package/lib/dr-grid/components/cells/cell-icon-text-edit/cell-icon-text-edit.component.d.ts +34 -0
- package/lib/dr-grid/components/cells/cell-link/cell-link.component.d.ts +33 -0
- package/lib/dr-grid/components/cells/cell-select/cell-select.component.d.ts +22 -0
- package/lib/dr-grid/components/cells/cell-set-as-default/cell-set-as-default.component.d.ts +16 -0
- package/lib/dr-grid/components/cells/cell-split-rows/cell-split-rows.component.d.ts +19 -0
- package/lib/dr-grid/components/cells/cell-toggle/cell-toggle.component.d.ts +15 -0
- package/lib/dr-grid/components/cells/tbl-header/tbl-header.component.d.ts +23 -0
- package/lib/dr-grid/components/dr-grid-columns-filter-popover/dr-grid-columns-filter-popover.component.d.ts +18 -0
- package/lib/dr-grid/components/dr-grid-no-rows/dr-grid-no-rows.component.d.ts +6 -0
- package/lib/dr-grid/components/dr-grid-pagination/dr-grid-pagination.component.d.ts +25 -0
- package/lib/dr-grid/components/dr-grid-toolbar/dr-grid-toolbar.component.d.ts +37 -0
- package/lib/dr-grid/components/tbl-toggle-button-header/tbl-toggle-button-header.component.d.ts +31 -0
- package/lib/dr-grid/dr-grid.component.d.ts +86 -0
- package/lib/dr-grid/dr-grid.d.ts +25 -0
- package/lib/dr-grid/models/dr-grid-events.d.ts +7 -0
- package/lib/dr-grid/models/dr-grid-theme.d.ts +3 -0
- package/lib/dr-grid/models/interfaces.d.ts +125 -0
- package/lib/dr-grid/services/abstract-single-grid.d.ts +37 -0
- package/lib/dr-grid/services/grid-utils.d.ts +11 -0
- package/lib/pipes/indeterminate/indeterminate.pipe.d.ts +12 -0
- package/local-api.d.ts +4 -1
- package/package.json +4 -2
- package/styles.css +7995 -0
- package/datarailsshared-datarailsshared-1.6.234.tgz +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { AgGridEvent, CellClickedEvent, CellRendererSelectorResult, CellStyleFunc, ColDef, Column, ColumnApi, ColumnState, CsvExportParams, DomLayoutType, ExportParams, FirstDataRenderedEvent, GetRowIdParams, GridApi as AgGridApi, GridOptions, ICellRendererParams, IHeaderParams, INoRowsOverlayComp, IRowNode, ProcessCellForExportParams, RowClickedEvent, RowSelectedEvent, RowDataTransaction, RowDataUpdatedEvent, RowHeightParams, RowNode, SelectionChangedEvent, SortDirection, ValueGetterFunc, ValueGetterParams, INoRowsOverlayParams, IRowModel, ValueFormatterParams } from 'ag-grid-community';
|
|
2
|
+
import { ICellRendererAngularComp, IHeaderAngularComp } from 'ag-grid-angular';
|
|
3
|
+
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
4
|
+
import { GridDrEventType } from './dr-grid-events';
|
|
5
|
+
import { IDropdownAction } from '../../models/dropdown';
|
|
6
|
+
export interface IGridRowModel extends IRowModel {
|
|
7
|
+
}
|
|
8
|
+
export interface IGridRowNode<TData = any> extends IRowNode<TData> {
|
|
9
|
+
}
|
|
10
|
+
export interface IGridRowClickedEvent<TData = any, TContext = any> extends RowClickedEvent<TData, TContext> {
|
|
11
|
+
}
|
|
12
|
+
export interface IGridRowSelectedEvent<TData = any, TContext = any> extends RowSelectedEvent<TData, TContext> {
|
|
13
|
+
}
|
|
14
|
+
export interface IGridGetRowIdParams<TData = any, TContext = any> extends GetRowIdParams<TData, TContext> {
|
|
15
|
+
}
|
|
16
|
+
export interface IGridRowHeightParams<TData = any, TContext = any> extends RowHeightParams<TData, TContext> {
|
|
17
|
+
}
|
|
18
|
+
export interface IGridRowDataTransaction<TData = any> extends RowDataTransaction<TData> {
|
|
19
|
+
}
|
|
20
|
+
export interface IGridRowDataUpdatedEvent<TData = any, TContext = any> extends RowDataUpdatedEvent<TData, TContext> {
|
|
21
|
+
}
|
|
22
|
+
export interface IGridNoRowsOverlayComp extends INoRowsOverlayComp {
|
|
23
|
+
}
|
|
24
|
+
export interface IGridNoRowsOverlayParams extends INoRowsOverlayParams {
|
|
25
|
+
api: GridApi;
|
|
26
|
+
columnApi: GridColumnApi;
|
|
27
|
+
content: any;
|
|
28
|
+
}
|
|
29
|
+
export interface IGridColDef<TData = any, TValue = any> extends ColDef<TData, TValue> {
|
|
30
|
+
}
|
|
31
|
+
export interface IGridValueGetterFunc<TData = any, TValue = any> extends ValueGetterFunc<TData, TValue> {
|
|
32
|
+
}
|
|
33
|
+
export interface IGridValueGetterParams<TData = any, TValue = any> extends ValueGetterParams<TData, TValue> {
|
|
34
|
+
}
|
|
35
|
+
export interface IGridColumnState extends ColumnState {
|
|
36
|
+
}
|
|
37
|
+
export interface IGridCellRendererComponent extends ICellRendererAngularComp {
|
|
38
|
+
}
|
|
39
|
+
export interface IGridCellRendererParams<TData = any, TValue = any, TContext = any> extends ICellRendererParams<TData, TValue, TContext> {
|
|
40
|
+
}
|
|
41
|
+
export interface IGridCellValueFormatterParams<TData = any, TValue = any> extends ValueFormatterParams<TData, TValue> {
|
|
42
|
+
}
|
|
43
|
+
export interface IGridHeaderAngularComponent extends IHeaderAngularComp {
|
|
44
|
+
}
|
|
45
|
+
export interface IGridHeaderParams<TData = any, TContext = any> extends IHeaderParams<TData, TContext> {
|
|
46
|
+
}
|
|
47
|
+
export interface IGridCellClickedEvent<TData = any, TValue = any> extends CellClickedEvent<TData, TValue> {
|
|
48
|
+
}
|
|
49
|
+
export interface IGridCellRendererSelectorResult extends CellRendererSelectorResult {
|
|
50
|
+
}
|
|
51
|
+
export interface IGridCellStyleFunc<TData = any, TValue = any> extends CellStyleFunc<TData, TValue> {
|
|
52
|
+
}
|
|
53
|
+
export interface IGridProcessCellForExportParams<TData = any, TContext = any> extends ProcessCellForExportParams<TData, TContext> {
|
|
54
|
+
}
|
|
55
|
+
export interface IGridOptions<TData = any> extends GridOptions<TData> {
|
|
56
|
+
}
|
|
57
|
+
export interface IGridEvent<TData = any, TContext = any> extends AgGridEvent<TData, TContext> {
|
|
58
|
+
api: GridApi<TData>;
|
|
59
|
+
columnApi: GridColumnApi;
|
|
60
|
+
}
|
|
61
|
+
export interface IGridFirstDataRenderedEvent<TData = any, TContext = any> extends FirstDataRenderedEvent<TData, TContext> {
|
|
62
|
+
}
|
|
63
|
+
export interface IGridSelectionChangedEvent<TData = any, TContext = any> extends SelectionChangedEvent<TData, TContext> {
|
|
64
|
+
}
|
|
65
|
+
export interface IGridExportParams<T> extends ExportParams<T> {
|
|
66
|
+
}
|
|
67
|
+
export interface IGridCsvExportParams extends CsvExportParams {
|
|
68
|
+
fromServer?: boolean;
|
|
69
|
+
request?: any;
|
|
70
|
+
}
|
|
71
|
+
export interface IGridDrEvent {
|
|
72
|
+
type: GridDrEventType;
|
|
73
|
+
data: IGridDrSortEvent | IGridDrUpdateParamsEvent | IGridDrFilterEvent | IGridDrMenuActionEvent | IGridDrUpdateRowEvent;
|
|
74
|
+
}
|
|
75
|
+
export interface IGridDrSortEvent {
|
|
76
|
+
sort: GridSortDirection;
|
|
77
|
+
header: IGridHeaderParams;
|
|
78
|
+
colId?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface IGridDrUpdateParamsEvent {
|
|
81
|
+
ordering?: string;
|
|
82
|
+
cleanOtherOrdering?: boolean;
|
|
83
|
+
filtering?: IGridDrFilterEvent;
|
|
84
|
+
}
|
|
85
|
+
export type IGridDrFilterEvent = Map<string, any>;
|
|
86
|
+
export type IGridDrMenuActionEvent = IDropdownAction<unknown>;
|
|
87
|
+
export type IGridDrUpdateRowEvent = any;
|
|
88
|
+
export interface IGridDrEvents {
|
|
89
|
+
_destroy$: Subject<any>;
|
|
90
|
+
_events$: BehaviorSubject<IGridDrEvent>;
|
|
91
|
+
emit: (e: IGridDrEvent) => void;
|
|
92
|
+
on: (type?: GridDrEventType) => Observable<IGridDrEvent | IGridDrSortEvent | IGridDrUpdateParamsEvent | IGridDrFilterEvent | IGridDrMenuActionEvent | IGridDrUpdateRowEvent>;
|
|
93
|
+
filtersMap: IGridDrFilterEvent;
|
|
94
|
+
}
|
|
95
|
+
export interface IGridParamsFilter {
|
|
96
|
+
}
|
|
97
|
+
export interface IGridDataWithPagination<T> {
|
|
98
|
+
count: number;
|
|
99
|
+
next: number;
|
|
100
|
+
previous: number;
|
|
101
|
+
results: T[];
|
|
102
|
+
}
|
|
103
|
+
export interface GridApi<TData = any> extends AgGridApi<TData> {
|
|
104
|
+
drEvents?: IGridDrEvents;
|
|
105
|
+
updateGridDomLayout?: () => void;
|
|
106
|
+
}
|
|
107
|
+
export type GridColumnApi = ColumnApi;
|
|
108
|
+
export type GridColumn<TValue = any> = Column<TValue>;
|
|
109
|
+
export type GridRowNode<TData = any> = RowNode<TData> & {
|
|
110
|
+
drRowParent?: boolean;
|
|
111
|
+
drRowChild?: boolean;
|
|
112
|
+
drRowChildFirst?: boolean;
|
|
113
|
+
drRowChildLast?: boolean;
|
|
114
|
+
drRowChildLastInTree?: boolean;
|
|
115
|
+
drCollapsed?: boolean;
|
|
116
|
+
drCollapse: () => void;
|
|
117
|
+
drExpand: (fromInit?: boolean) => void;
|
|
118
|
+
drChildNodes?: GridRowNode[];
|
|
119
|
+
};
|
|
120
|
+
export type GridSortDirection = SortDirection;
|
|
121
|
+
export type GridDomLayoutType = DomLayoutType;
|
|
122
|
+
export declare enum GridSortDirections {
|
|
123
|
+
ASC = "asc",
|
|
124
|
+
DESC = "desc"
|
|
125
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { GridApi, IGridDrFilterEvent, IGridDrMenuActionEvent, IGridParamsFilter } from '../models/interfaces';
|
|
5
|
+
import { DrGridPaginationComponent } from '../components/dr-grid-pagination/dr-grid-pagination.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class AbstractSingleGridComponent implements OnInit {
|
|
8
|
+
private _gridApi;
|
|
9
|
+
set gridApi(api: GridApi);
|
|
10
|
+
get gridApi(): GridApi;
|
|
11
|
+
readonly startLoading$: BehaviorSubject<boolean>;
|
|
12
|
+
count: number;
|
|
13
|
+
params: {
|
|
14
|
+
search?: string;
|
|
15
|
+
page?: number;
|
|
16
|
+
filter?: IGridParamsFilter;
|
|
17
|
+
filtering?: IGridDrFilterEvent;
|
|
18
|
+
ordering?: string;
|
|
19
|
+
};
|
|
20
|
+
pagination: DrGridPaginationComponent;
|
|
21
|
+
readonly router: Router;
|
|
22
|
+
protected constructor(injector: any);
|
|
23
|
+
onChangeParams(): void;
|
|
24
|
+
onAfterUpdateTableParams(): void;
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
getData<T>(fetch$: any, noLoad?: boolean): any;
|
|
27
|
+
onSearch($event: string): void;
|
|
28
|
+
pageChange(page: number): void;
|
|
29
|
+
onFilter($event: IGridParamsFilter): void;
|
|
30
|
+
subscribeOnSort(): void;
|
|
31
|
+
subscribeCustomFilter(): void;
|
|
32
|
+
subscribeOnUpdateTableParams(): void;
|
|
33
|
+
subscribeMenuAction(): void;
|
|
34
|
+
protected onMenuAction?(item: IGridDrMenuActionEvent): void;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSingleGridComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractSingleGridComponent, "dr-abstract-single-grid", never, {}, {}, never, never, false, never>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GridSortDirection } from '../models/interfaces';
|
|
2
|
+
export declare const getColumnSortingBySortType: (sort: GridSortDirection | null, columnName: string) => string;
|
|
3
|
+
export declare const getSortTypeByColumnSorting: (columnSorting: string, columnName: string) => GridSortDirection | null;
|
|
4
|
+
export declare const gridSumAggregation: (acc: number, value: number) => number;
|
|
5
|
+
export declare const gridSortNumber: (valueA: number, valueB: number) => number;
|
|
6
|
+
export declare const gridSortArrayByLength: (valueA: any[], valueB: any[]) => number;
|
|
7
|
+
export declare const gridSortDate: (valueA: string | number, valueB: string | number) => number;
|
|
8
|
+
export declare const gridSortWithSystem: (key: any) => (a: any, b: any, an: any, bn: any) => 0 | 1 | -1;
|
|
9
|
+
export declare const gridSortWithFormatter: (key: any, formatter: any, useObject?: any) => (a: any, b: any, an: any, bn: any) => 0 | 1 | -1;
|
|
10
|
+
export declare const gridSortWithSystemAndFormatter: (key: any, formatter: any, useObject?: any) => (a: any, b: any, an: any, bn: any) => 0 | 1 | -1;
|
|
11
|
+
export declare const gridSortArrayWithSystem: (key: any) => (a: any, b: any, an: any, bn: any) => 0 | 1 | -1;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class IndeterminatePipe<T> implements PipeTransform {
|
|
4
|
+
transform(arr: T[], field: string): boolean;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IndeterminatePipe<any>, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<IndeterminatePipe<any>, "indeterminate", true>;
|
|
7
|
+
}
|
|
8
|
+
export declare class AllCheckedPipe<T> implements PipeTransform {
|
|
9
|
+
transform(arr: T[], field: string): boolean;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AllCheckedPipe<any>, never>;
|
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AllCheckedPipe<any>, "allChecked", true>;
|
|
12
|
+
}
|
package/local-api.d.ts
CHANGED
|
@@ -107,8 +107,11 @@ export * from './lib/directives/click-outside/click-outside.directive';
|
|
|
107
107
|
export * from './lib/directives/dr-shine-animation/dr-shine-animation.directive';
|
|
108
108
|
export * from './lib/directives/let/let.directive';
|
|
109
109
|
export * from './lib/directives/ng-track-by-property/ng-track-by-property.directive';
|
|
110
|
+
export * from './lib/decorators/decorators';
|
|
110
111
|
export * from './lib/pipes/img/img.pipe';
|
|
111
112
|
export * from './lib/pipes/filter/filter.pipe';
|
|
113
|
+
export * from './lib/pipes/indeterminate/indeterminate.pipe';
|
|
114
|
+
export * from './lib/pipes/search/search.pipe';
|
|
112
115
|
export * from './lib/models/datePicker';
|
|
113
116
|
export { TAG_TYPES, ITag, IDateTag, IListTag, ITagForServer, IDynamicTag, TDynamicTagValue, TDynamicTag, TagTypes, TagsConfigSubType, TConnectedTags, } from './lib/models/serverTags';
|
|
114
117
|
export { ISpinnerOptions, SpinnerType, SpinnerSize } from './lib/models/spinnerOptions';
|
|
@@ -169,5 +172,5 @@ export * from './lib/dr-list-overflow/dr-list-overflow.component';
|
|
|
169
172
|
export * from './lib/text-overflow/text-overflow.component';
|
|
170
173
|
export * from './lib/truncate-text/truncate-text.directive';
|
|
171
174
|
export * from './lib/directives/autofocus/autofocus.directive';
|
|
172
|
-
export * from './lib/pipes/search/search.pipe';
|
|
173
175
|
export * from './lib/filter-dropdown/filter-dropdown.component';
|
|
176
|
+
export * from './lib/dr-grid/dr-grid';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datarailsshared/datarailsshared",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.238",
|
|
4
4
|
"description": "DataRails shared components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
"@codemirror/autocomplete": "^6.9.1",
|
|
41
41
|
"@types/codemirror": "5.60.10",
|
|
42
42
|
"codemirror": "5.65.15",
|
|
43
|
-
"@ctrl/ngx-emoji-mart": "9.3.0"
|
|
43
|
+
"@ctrl/ngx-emoji-mart": "9.3.0",
|
|
44
|
+
"ag-grid-angular": "^30.1.0",
|
|
45
|
+
"ag-grid-community": "^30.1.0"
|
|
44
46
|
},
|
|
45
47
|
"peerDependencies": {
|
|
46
48
|
"@angular/common": "^16.1.6",
|