@one-grid-core/angular 0.1.0-beta.5
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 +168 -0
- package/esm2022/lib/components/one-grid/one-grid.component.mjs +388 -0
- package/esm2022/lib/components/one-grid-body/one-grid-body.component.mjs +570 -0
- package/esm2022/lib/components/one-grid-cell-currency/one-grid-cell-currency.component.mjs +90 -0
- package/esm2022/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.mjs +31 -0
- package/esm2022/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.mjs +67 -0
- package/esm2022/lib/components/one-grid-checkbox/one-grid-checkbox.component.mjs +47 -0
- package/esm2022/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.mjs +62 -0
- package/esm2022/lib/components/one-grid-header/one-grid-header.component.mjs +140 -0
- package/esm2022/lib/components/one-grid-pagination/one-grid-pagination.component.mjs +76 -0
- package/esm2022/lib/components/one-grid-row-action/one-grid-row-action.component.mjs +193 -0
- package/esm2022/lib/components/one-grid-status/one-grid-status.component.mjs +35 -0
- package/esm2022/lib/core/directives/one-cell-input-validator.directive.mjs +71 -0
- package/esm2022/lib/core/directives/one-cell-renderer-component.directive.mjs +77 -0
- package/esm2022/lib/core/directives/one-cell-text-expand.directive.mjs +82 -0
- package/esm2022/lib/core/instants/one-grid-api.class.mjs +591 -0
- package/esm2022/lib/core/instants/one-row-node.class.mjs +90 -0
- package/esm2022/lib/core/models/constants/one-pagination.constant.mjs +2 -0
- package/esm2022/lib/core/models/one-column-def-types.model.mjs +2 -0
- package/esm2022/lib/core/models/one-event-types.model.mjs +2 -0
- package/esm2022/lib/core/models/one-filter.model.mjs +2 -0
- package/esm2022/lib/core/models/one-grid-types.model.mjs +2 -0
- package/esm2022/lib/core/models/one-master-detail.model.mjs +2 -0
- package/esm2022/lib/core/models/one-pagination-types.model.mjs +2 -0
- package/esm2022/lib/core/models/one-row.model.mjs +13 -0
- package/esm2022/lib/core/models/one-tree-data.model.mjs +2 -0
- package/esm2022/lib/core/models/one-validation.model.mjs +2 -0
- package/esm2022/lib/core/pipes/cell-action-button-enable.pipe.mjs +21 -0
- package/esm2022/lib/core/pipes/cell-action-button-visible.pipe.mjs +17 -0
- package/esm2022/lib/core/pipes/cell-disable-resolver.pipe.mjs +26 -0
- package/esm2022/lib/core/pipes/cell-editable.pipe.mjs +30 -0
- package/esm2022/lib/core/pipes/cell-field-value-empty.pipe.mjs +21 -0
- package/esm2022/lib/core/pipes/cell-field-value.pipe.mjs +25 -0
- package/esm2022/lib/core/pipes/cell-field.pipe.mjs +20 -0
- package/esm2022/lib/core/pipes/cell-invalid.pipe.mjs +21 -0
- package/esm2022/lib/core/pipes/cell-key.pipe.mjs +21 -0
- package/esm2022/lib/core/pipes/cell-level-padding.pipe.mjs +18 -0
- package/esm2022/lib/core/pipes/cell-number-value.pipe.mjs +19 -0
- package/esm2022/lib/core/pipes/cell-selected.pipe.mjs +20 -0
- package/esm2022/lib/core/pipes/cell-state-group-renderer.pipe.mjs +21 -0
- package/esm2022/lib/core/pipes/cell-state-renderer.pipe.mjs +24 -0
- package/esm2022/lib/core/pipes/cell-value-getter.pipe.mjs +23 -0
- package/esm2022/lib/core/pipes/column-sort-state.pipe.mjs +19 -0
- package/esm2022/lib/core/pipes/header-checkbox-checked.pipe.mjs +17 -0
- package/esm2022/lib/core/pipes/header-checkbox-disabled.pipe.mjs +17 -0
- package/esm2022/lib/core/pipes/header-checkbox-indeterminate.pipe.mjs +17 -0
- package/esm2022/lib/core/services/og-column.service.mjs +81 -0
- package/esm2022/lib/core/services/one-grid-cell.service.mjs +88 -0
- package/esm2022/lib/core/services/one-grid-event.service.mjs +42 -0
- package/esm2022/lib/core/services/one-grid-expansion.service.mjs +40 -0
- package/esm2022/lib/core/services/one-grid-row.service.mjs +29 -0
- package/esm2022/lib/core/services/one-grid-selection.service.mjs +54 -0
- package/esm2022/lib/core/services/one-grid-tree-data.service.mjs +59 -0
- package/esm2022/lib/helpers/one-cell.helper.mjs +42 -0
- package/esm2022/lib/helpers/one-column-def.helper.mjs +28 -0
- package/esm2022/lib/helpers/one-filter.helper.mjs +52 -0
- package/esm2022/lib/helpers/one-validation.helper.mjs +95 -0
- package/esm2022/lib/index.mjs +19 -0
- package/esm2022/lib/one-grid.module.mjs +142 -0
- package/esm2022/one-grid-core-angular.mjs +5 -0
- package/esm2022/public-api.mjs +5 -0
- package/fesm2022/one-grid-core-angular.mjs +3573 -0
- package/fesm2022/one-grid-core-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/one-grid/one-grid.component.d.ts +139 -0
- package/lib/components/one-grid-body/one-grid-body.component.d.ts +176 -0
- package/lib/components/one-grid-cell-currency/one-grid-cell-currency.component.d.ts +27 -0
- package/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.d.ts +16 -0
- package/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.d.ts +21 -0
- package/lib/components/one-grid-checkbox/one-grid-checkbox.component.d.ts +19 -0
- package/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.d.ts +24 -0
- package/lib/components/one-grid-header/one-grid-header.component.d.ts +41 -0
- package/lib/components/one-grid-pagination/one-grid-pagination.component.d.ts +21 -0
- package/lib/components/one-grid-row-action/one-grid-row-action.component.d.ts +59 -0
- package/lib/components/one-grid-status/one-grid-status.component.d.ts +15 -0
- package/lib/core/directives/one-cell-input-validator.directive.d.ts +15 -0
- package/lib/core/directives/one-cell-renderer-component.directive.d.ts +20 -0
- package/lib/core/directives/one-cell-text-expand.directive.d.ts +21 -0
- package/lib/core/instants/one-grid-api.class.d.ts +161 -0
- package/lib/core/instants/one-row-node.class.d.ts +49 -0
- package/lib/core/models/constants/one-pagination.constant.d.ts +1 -0
- package/lib/core/models/one-column-def-types.model.d.ts +139 -0
- package/lib/core/models/one-event-types.model.d.ts +78 -0
- package/lib/core/models/one-filter.model.d.ts +15 -0
- package/lib/core/models/one-grid-types.model.d.ts +48 -0
- package/lib/core/models/one-master-detail.model.d.ts +18 -0
- package/lib/core/models/one-pagination-types.model.d.ts +9 -0
- package/lib/core/models/one-row.model.d.ts +38 -0
- package/lib/core/models/one-tree-data.model.d.ts +9 -0
- package/lib/core/models/one-validation.model.d.ts +9 -0
- package/lib/core/pipes/cell-action-button-enable.pipe.d.ts +8 -0
- package/lib/core/pipes/cell-action-button-visible.pipe.d.ts +9 -0
- package/lib/core/pipes/cell-disable-resolver.pipe.d.ts +9 -0
- package/lib/core/pipes/cell-editable.pipe.d.ts +9 -0
- package/lib/core/pipes/cell-field-value-empty.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-field-value.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-field.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-invalid.pipe.d.ts +9 -0
- package/lib/core/pipes/cell-key.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-level-padding.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-number-value.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-selected.pipe.d.ts +7 -0
- package/lib/core/pipes/cell-state-group-renderer.pipe.d.ts +9 -0
- package/lib/core/pipes/cell-state-renderer.pipe.d.ts +8 -0
- package/lib/core/pipes/cell-value-getter.pipe.d.ts +9 -0
- package/lib/core/pipes/column-sort-state.pipe.d.ts +8 -0
- package/lib/core/pipes/header-checkbox-checked.pipe.d.ts +9 -0
- package/lib/core/pipes/header-checkbox-disabled.pipe.d.ts +9 -0
- package/lib/core/pipes/header-checkbox-indeterminate.pipe.d.ts +9 -0
- package/lib/core/services/og-column.service.d.ts +22 -0
- package/lib/core/services/one-grid-cell.service.d.ts +29 -0
- package/lib/core/services/one-grid-event.service.d.ts +17 -0
- package/lib/core/services/one-grid-expansion.service.d.ts +13 -0
- package/lib/core/services/one-grid-row.service.d.ts +15 -0
- package/lib/core/services/one-grid-selection.service.d.ts +17 -0
- package/lib/core/services/one-grid-tree-data.service.d.ts +10 -0
- package/lib/helpers/one-cell.helper.d.ts +26 -0
- package/lib/helpers/one-column-def.helper.d.ts +17 -0
- package/lib/helpers/one-filter.helper.d.ts +20 -0
- package/lib/helpers/one-validation.helper.d.ts +21 -0
- package/lib/index.d.ts +18 -0
- package/lib/one-grid.module.d.ts +45 -0
- package/package.json +48 -0
- package/public-api.d.ts +1 -0
- package/scss/_one-grid.scss +999 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CellFieldPipe implements PipeTransform {
|
|
4
|
+
transform(rowIndex: number, field: string): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellFieldPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellFieldPipe, "cellField", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneCellStates, OneColumnDef } from '../models/one-column-def-types.model';
|
|
3
|
+
import { OneRowNode } from '../instants/one-row-node.class';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CellInvalidPipe<T> implements PipeTransform {
|
|
6
|
+
transform(cellStates: OneCellStates, value: any, column: OneColumnDef<T>, node: OneRowNode<T>, allowedEdit: boolean, submitted: boolean): boolean;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellInvalidPipe<any>, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellInvalidPipe<any>, "cellInvalid", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CellKeyPipe implements PipeTransform {
|
|
4
|
+
transform(rowId?: string | null, field?: string | null): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellKeyPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellKeyPipe, "cellKey", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CellLevelPaddingPipe implements PipeTransform {
|
|
4
|
+
transform(level: number, factor: number): number;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellLevelPaddingPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellLevelPaddingPipe, "cellLevelPadding", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CellNumberValuePipe implements PipeTransform {
|
|
4
|
+
transform(value: any): number | undefined;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellNumberValuePipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellNumberValuePipe, "cellNumberValue", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CellSelectedPipe implements PipeTransform {
|
|
4
|
+
transform(selectedCells: Set<string>, rowId: string, field: string): boolean;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellSelectedPipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellSelectedPipe, "cellSelected", false>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneColumnDef } from '../models/one-column-def-types.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CellStateGroupRendererPipe<T> implements PipeTransform {
|
|
5
|
+
private _cellFieldValue;
|
|
6
|
+
transform(value: string, data: T, column: OneColumnDef): string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellStateGroupRendererPipe<any>, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellStateGroupRendererPipe<any>, "cellStateGroupRenderer", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneCellStates } from '../models/one-column-def-types.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CellStateRendererPipe implements PipeTransform {
|
|
5
|
+
transform(cellStates: OneCellStates | null | undefined, field: string): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellStateRendererPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellStateRendererPipe, "cellStateRenderer", false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneColumnDef } from '../models/one-column-def-types.model';
|
|
3
|
+
import { OneRowNode } from '../instants/one-row-node.class';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CellValueGetterPipe<T = any> implements PipeTransform {
|
|
6
|
+
transform(data: T, node: OneRowNode, column: OneColumnDef, context: any): string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CellValueGetterPipe<any>, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CellValueGetterPipe<any>, "cellValueGetter", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneSortModel } from '../models/one-grid-types.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ColumnSortStatePipe implements PipeTransform {
|
|
5
|
+
transform(field: string, sortModel: OneSortModel[]): 'asc' | 'desc' | null;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnSortStatePipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ColumnSortStatePipe, "columnSortState", false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneRowNode } from '../instants/one-row-node.class';
|
|
3
|
+
import { OneCheckboxState, RowSelectionMode } from '../models/one-event-types.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HeaderCheckboxCheckedPipe implements PipeTransform {
|
|
6
|
+
transform(rowNodes: OneRowNode[], selectionMode: RowSelectionMode, state: OneCheckboxState): boolean;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderCheckboxCheckedPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<HeaderCheckboxCheckedPipe, "headerCheckboxChecked", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneRowNode } from '../instants/one-row-node.class';
|
|
3
|
+
import { RowSelectionMode } from '../models/one-event-types.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HeaderCheckboxDisabledPipe implements PipeTransform {
|
|
6
|
+
transform(rowNodes: OneRowNode[], selectionMode: RowSelectionMode, allowedEdit: boolean): boolean;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderCheckboxDisabledPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<HeaderCheckboxDisabledPipe, "headerCheckboxDisabled", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { OneRowNode } from '../instants/one-row-node.class';
|
|
3
|
+
import { OneCheckboxState, RowSelectionMode } from '../models/one-event-types.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class HeaderCheckboxIndeterminatePipe implements PipeTransform {
|
|
6
|
+
transform(rowNodes: OneRowNode[], selectionMode: RowSelectionMode, state: OneCheckboxState): unknown;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderCheckboxIndeterminatePipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<HeaderCheckboxIndeterminatePipe, "headerCheckboxIndeterminate", false>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OneCellRendererParams, OneColumnDef, OneGroupColumnDef } from '../models/one-column-def-types.model';
|
|
2
|
+
import { ColumnChangedEvent } from '../models/one-event-types.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class OgColumnService {
|
|
5
|
+
private defaultColumnDef;
|
|
6
|
+
private columnDefs$;
|
|
7
|
+
private groupColumnDefs$;
|
|
8
|
+
initColumnDefs(defaultColumnDef: OneColumnDef, columnDefs: OneColumnDef[], groupColumnDefs: OneGroupColumnDef[]): void;
|
|
9
|
+
getColumnState(): ColumnChangedEvent;
|
|
10
|
+
setGroupColumnDefs(groupColumnDefs: OneGroupColumnDef[]): void;
|
|
11
|
+
setColumnDefs(columnDefs: OneColumnDef[]): void;
|
|
12
|
+
updateColumnDef(id: string, changes: Partial<OneColumnDef>): void;
|
|
13
|
+
reorderColumnDefs(fromIndex: number, toIndex: number): void;
|
|
14
|
+
/**
|
|
15
|
+
* Group Header Columns
|
|
16
|
+
*/
|
|
17
|
+
private recalculateGroups;
|
|
18
|
+
resolveGroupPresentation(col: OneGroupColumnDef, params?: OneCellRendererParams): OneGroupColumnDef;
|
|
19
|
+
resolveCellPresentation(col: OneColumnDef, params?: OneCellRendererParams): OneColumnDef;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OgColumnService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OgColumnService>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OneCellState, OneCellStates, OneColumnDef } from '../models/one-column-def-types.model';
|
|
2
|
+
import { OneRowNode } from '../instants/one-row-node.class';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class OneGridCellService {
|
|
5
|
+
private _cellFieldValueEmpty;
|
|
6
|
+
private _cellValueGetter;
|
|
7
|
+
private _cellFieldValue;
|
|
8
|
+
private _columnDefs;
|
|
9
|
+
private _context;
|
|
10
|
+
applyColumnDefs(columnDefs: OneColumnDef[], context: any): void;
|
|
11
|
+
/**
|
|
12
|
+
* Generate New Node States
|
|
13
|
+
*/
|
|
14
|
+
generateCellStates(node: OneRowNode): OneCellStates | null;
|
|
15
|
+
/**
|
|
16
|
+
* Generate New Node State Based on Column Field
|
|
17
|
+
*/
|
|
18
|
+
generateCellState(node: OneRowNode, column: OneColumnDef): OneCellState;
|
|
19
|
+
/**
|
|
20
|
+
* One Column Def Params Resolver
|
|
21
|
+
*/
|
|
22
|
+
editableFn: (column: OneColumnDef, node: OneRowNode) => boolean;
|
|
23
|
+
updatableFn: (column: OneColumnDef, node: OneRowNode) => boolean;
|
|
24
|
+
disableFn: (column: OneColumnDef, node: OneRowNode) => boolean;
|
|
25
|
+
dragableFn: (column: OneColumnDef, node: OneRowNode) => boolean;
|
|
26
|
+
valueGetterFn: (column: OneColumnDef, node: OneRowNode) => any;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridCellService, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OneGridCellService>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { EventPayloadMap, EventType } from '../models/one-event-types.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class OneGridEventService implements OnDestroy {
|
|
6
|
+
private events$;
|
|
7
|
+
private subscriptions;
|
|
8
|
+
dispatchEvent<K extends EventType>(type: K, payload: EventPayloadMap[K]): void;
|
|
9
|
+
addEventListener<K extends EventType>(type: K, handler: (payload: EventPayloadMap[K]) => void): () => void;
|
|
10
|
+
eventStream<K extends EventType>(type: K): Observable<EventPayloadMap[K]>;
|
|
11
|
+
/**
|
|
12
|
+
* Clear All Subscriptions
|
|
13
|
+
*/
|
|
14
|
+
ngOnDestroy(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridEventService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OneGridEventService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class OneGridExpansionService {
|
|
3
|
+
private _expandedIds;
|
|
4
|
+
private _collapsedIds;
|
|
5
|
+
getExpandedIds(): Set<string>;
|
|
6
|
+
getCollapsedIds(): Set<string>;
|
|
7
|
+
toggleExpanded(rowId: string, expanded: boolean): void;
|
|
8
|
+
isExpanded(rowId: string): boolean;
|
|
9
|
+
isCollapsed(rowId: string): boolean;
|
|
10
|
+
clear(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridExpansionService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OneGridExpansionService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OneGridGetRowIdParams } from '../models/one-grid-types.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class OneGridRowService {
|
|
4
|
+
private _getRowId;
|
|
5
|
+
/**
|
|
6
|
+
* Set Row Id Funciton
|
|
7
|
+
*/
|
|
8
|
+
setGetRowIdFn(getRowId: (params: OneGridGetRowIdParams) => string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Generate Unique Row ID
|
|
11
|
+
*/
|
|
12
|
+
generateRowId(data: any, rowIndex: number): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridRowService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OneGridRowService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OneCheckboxState, RowSelectionMode } from '../models/one-event-types.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class OneGridSelectionService {
|
|
4
|
+
private _selectedIds;
|
|
5
|
+
private _selectionMode;
|
|
6
|
+
getSelectedIds(): Set<string>;
|
|
7
|
+
setSelectedIds(rowIds: string[]): void;
|
|
8
|
+
getSelectionMode(): RowSelectionMode;
|
|
9
|
+
setSelectionMode(mode: RowSelectionMode): void;
|
|
10
|
+
toggleSelection(rowId: string, selected: boolean): void;
|
|
11
|
+
toggleAllSelection(allIds: string[], selected: boolean): void;
|
|
12
|
+
getSelectAllState(allIds: (string)[]): OneCheckboxState;
|
|
13
|
+
selectAll(rowIds: string[]): void;
|
|
14
|
+
deselectAll(): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridSelectionService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OneGridSelectionService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TreeNode } from '../models/one-tree-data.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class OneGridTreeDataService {
|
|
4
|
+
create<T>(tree: TreeNode<T>[], parentId: string | null, newNode: TreeNode<T>): TreeNode<T>[];
|
|
5
|
+
update<T>(tree: TreeNode<T>[], nodeId: string, updatedData: Partial<T>): TreeNode<T>[];
|
|
6
|
+
delete<T>(tree: TreeNode<T>[], nodeId: string): TreeNode<T>[];
|
|
7
|
+
find<T = any>(treeData: TreeNode<T>[], nodeId: string): TreeNode<T> | null;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridTreeDataService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OneGridTreeDataService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OneColumnDef } from "../core/models/one-column-def-types.model";
|
|
2
|
+
/**
|
|
3
|
+
* Generate Cell Field
|
|
4
|
+
*/
|
|
5
|
+
export declare function getCellField(rowIndex: number, field: string): string;
|
|
6
|
+
export declare function getCellKey(rowId: string, field: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Get Value From Data Field
|
|
9
|
+
*/
|
|
10
|
+
export declare function getFieldValue<T>(data: T, field: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve cell style (handles both static and function-based)
|
|
13
|
+
* @param column
|
|
14
|
+
* @param row
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveCellStyle(column: OneColumnDef, row: any): {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Resolve cell class (handles both static and function-based)
|
|
22
|
+
* @param column
|
|
23
|
+
* @param row
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveCellClass(column: OneColumnDef, row: any): string | string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OneCellRendererParams, OneColumnDef, OneValueGetterParams } from "../core/models/one-column-def-types.model";
|
|
2
|
+
/**
|
|
3
|
+
* Apply Default Column Definitions
|
|
4
|
+
*/
|
|
5
|
+
export declare function applyDefaultColumnDef<T>(columnDefs: OneColumnDef<T>[], defaultColumnDef: OneColumnDef<T>): OneColumnDef<T>[];
|
|
6
|
+
/**
|
|
7
|
+
* One Column Params Resolver (Cell Renderer)
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveOneCellRendererParams<T>(prop: boolean | ((params: any) => boolean), params: OneCellRendererParams<T>): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* One Column Params Resolver (Generics)
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveOneColumDefParams<R>(prop: R | ((params: any) => R), params: any): R;
|
|
14
|
+
/**
|
|
15
|
+
* One Column Params Resolver (Value Getter)
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveOneValueGetterParams<T, R>(prop: R | ((params: OneValueGetterParams<T>) => R), params: OneValueGetterParams<T>): R;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OneRowNode } from "../core/instants/one-row-node.class";
|
|
2
|
+
import { OneFilterModel } from "../core/models/one-filter.model";
|
|
3
|
+
/**
|
|
4
|
+
* Recursively filters a tree and updates each node's UI state.
|
|
5
|
+
*
|
|
6
|
+
* Rules:
|
|
7
|
+
* - A node is visible if it matches the filters or has a matching descendant.
|
|
8
|
+
* - A node is expanded if it has a matching descendant.
|
|
9
|
+
*
|
|
10
|
+
* @returns True if the current node or any descendant matches.
|
|
11
|
+
*/
|
|
12
|
+
export declare function filterTreeNode<T = any>(node: OneRowNode<T>, filters: OneFilterModel[] | null, quick: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Apply advanced per-column filters
|
|
15
|
+
*/
|
|
16
|
+
export declare function matchesAdvancedFilters<T = any>(node: OneRowNode<T>, filters: OneFilterModel[] | null): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Apply quick filter across all fields
|
|
19
|
+
*/
|
|
20
|
+
export declare function matchesQuickFilter<T = any>(node: OneRowNode<T>, quick: string): boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OneRowNode } from "../core/instants/one-row-node.class";
|
|
2
|
+
import { OneColumnDef } from "../core/models/one-column-def-types.model";
|
|
3
|
+
import { OneValidationRules, OneValidatorFn } from "../core/models/one-validation.model";
|
|
4
|
+
/**
|
|
5
|
+
* One Grid Validators
|
|
6
|
+
*/
|
|
7
|
+
export declare const Validators: {
|
|
8
|
+
required: (message?: string) => OneValidatorFn;
|
|
9
|
+
minLength: (min: number, message?: string) => OneValidatorFn;
|
|
10
|
+
maxLength: (max: number, message?: string) => OneValidatorFn;
|
|
11
|
+
pattern: (regex: RegExp, message?: string) => OneValidatorFn;
|
|
12
|
+
custom: (fn: (value: any, row?: any) => string | null) => OneValidatorFn;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* One Grid Validation Rules
|
|
16
|
+
*/
|
|
17
|
+
export declare const ValidationRules: OneValidationRules;
|
|
18
|
+
/**
|
|
19
|
+
* Helper fuction to return invalid cell on UI
|
|
20
|
+
*/
|
|
21
|
+
export declare function getCellError<T>(column: OneColumnDef<T>, node: OneRowNode, value: any, row: T): string | null;
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './helpers/one-column-def.helper';
|
|
2
|
+
export * from './helpers/one-validation.helper';
|
|
3
|
+
export * from './core/instants/one-grid-api.class';
|
|
4
|
+
export * from './core/instants/one-row-node.class';
|
|
5
|
+
export * from './core/services/one-grid-event.service';
|
|
6
|
+
export * from './core/services/one-grid-selection.service';
|
|
7
|
+
export * from './core/services/one-grid-expansion.service';
|
|
8
|
+
export * from './core/services/one-grid-cell.service';
|
|
9
|
+
export * from './core/services/one-grid-tree-data.service';
|
|
10
|
+
export * from './core/models/constants/one-pagination.constant';
|
|
11
|
+
export * from './core/models/one-column-def-types.model';
|
|
12
|
+
export * from './core/models/one-event-types.model';
|
|
13
|
+
export * from './core/models/one-grid-types.model';
|
|
14
|
+
export * from './core/models/one-pagination-types.model';
|
|
15
|
+
export * from './core/models/one-validation.model';
|
|
16
|
+
export * from './core/models/one-tree-data.model';
|
|
17
|
+
export * from './components/one-grid/one-grid.component';
|
|
18
|
+
export * from './one-grid.module';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/one-grid/one-grid.component";
|
|
3
|
+
import * as i2 from "./components/one-grid-header/one-grid-header.component";
|
|
4
|
+
import * as i3 from "./components/one-grid-body/one-grid-body.component";
|
|
5
|
+
import * as i4 from "./components/one-grid-checkbox/one-grid-checkbox.component";
|
|
6
|
+
import * as i5 from "./components/one-grid-checkbox-header/one-grid-checkbox-header.component";
|
|
7
|
+
import * as i6 from "./components/one-grid-row-action/one-grid-row-action.component";
|
|
8
|
+
import * as i7 from "./components/one-grid-pagination/one-grid-pagination.component";
|
|
9
|
+
import * as i8 from "./components/one-grid-status/one-grid-status.component";
|
|
10
|
+
import * as i9 from "./components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component";
|
|
11
|
+
import * as i10 from "./core/pipes/cell-field-value-empty.pipe";
|
|
12
|
+
import * as i11 from "./core/pipes/cell-value-getter.pipe";
|
|
13
|
+
import * as i12 from "./core/pipes/cell-field-value.pipe";
|
|
14
|
+
import * as i13 from "./core/pipes/cell-action-button-visible.pipe";
|
|
15
|
+
import * as i14 from "./core/pipes/cell-editable.pipe";
|
|
16
|
+
import * as i15 from "./core/pipes/cell-invalid.pipe";
|
|
17
|
+
import * as i16 from "./core/pipes/cell-selected.pipe";
|
|
18
|
+
import * as i17 from "./core/pipes/cell-action-button-enable.pipe";
|
|
19
|
+
import * as i18 from "./core/pipes/cell-number-value.pipe";
|
|
20
|
+
import * as i19 from "./core/pipes/cell-disable-resolver.pipe";
|
|
21
|
+
import * as i20 from "./core/pipes/cell-field.pipe";
|
|
22
|
+
import * as i21 from "./core/pipes/cell-key.pipe";
|
|
23
|
+
import * as i22 from "./core/pipes/cell-level-padding.pipe";
|
|
24
|
+
import * as i23 from "./core/pipes/column-sort-state.pipe";
|
|
25
|
+
import * as i24 from "./core/pipes/header-checkbox-disabled.pipe";
|
|
26
|
+
import * as i25 from "./core/pipes/header-checkbox-checked.pipe";
|
|
27
|
+
import * as i26 from "./core/pipes/header-checkbox-indeterminate.pipe";
|
|
28
|
+
import * as i27 from "./core/pipes/cell-state-renderer.pipe";
|
|
29
|
+
import * as i28 from "./core/pipes/cell-state-group-renderer.pipe";
|
|
30
|
+
import * as i29 from "./core/directives/one-cell-input-validator.directive";
|
|
31
|
+
import * as i30 from "./core/directives/one-cell-renderer-component.directive";
|
|
32
|
+
import * as i31 from "./core/directives/one-cell-text-expand.directive";
|
|
33
|
+
import * as i32 from "./components/one-grid-cell-currency/one-grid-cell-currency.component";
|
|
34
|
+
import * as i33 from "./components/one-grid-cell-option-menu/one-grid-cell-option-menu.component";
|
|
35
|
+
import * as i34 from "@angular/common";
|
|
36
|
+
import * as i35 from "@angular/forms";
|
|
37
|
+
import * as i36 from "@angular/cdk/scrolling";
|
|
38
|
+
import * as i37 from "@ng-bootstrap/ng-bootstrap";
|
|
39
|
+
import * as i38 from "@angular/cdk/drag-drop";
|
|
40
|
+
import * as i39 from "lucide-angular";
|
|
41
|
+
export declare class OneGridModule {
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OneGridModule, never>;
|
|
43
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<OneGridModule, [typeof i1.OneGridComponent, typeof i2.OneGridHeaderComponent, typeof i3.OneGridBodyComponent, typeof i4.OneGridCheckboxComponent, typeof i5.OneGridCheckboxHeaderComponent, typeof i6.OneGridRowActionComponent, typeof i7.OneGridPaginationComponent, typeof i8.OneGridStatusComponent, typeof i9.OneGridCellGroupRendererComponent, typeof i10.CellFieldValueEmptyPipe, typeof i11.CellValueGetterPipe, typeof i12.CellFieldValuePipe, typeof i13.CellActionButtonVisiblePipe, typeof i14.CellEditablePipe, typeof i15.CellInvalidPipe, typeof i16.CellSelectedPipe, typeof i17.CellActionButtonEnablePipe, typeof i18.CellNumberValuePipe, typeof i19.CellDisableResolverPipe, typeof i20.CellFieldPipe, typeof i21.CellKeyPipe, typeof i22.CellLevelPaddingPipe, typeof i23.ColumnSortStatePipe, typeof i24.HeaderCheckboxDisabledPipe, typeof i25.HeaderCheckboxCheckedPipe, typeof i26.HeaderCheckboxIndeterminatePipe, typeof i27.CellStateRendererPipe, typeof i28.CellStateGroupRendererPipe, typeof i29.OneCellInputValidatorDirective, typeof i30.OneCellRendererComponentDirective, typeof i31.OneCellTextExpandDirective, typeof i32.OneGridCellCurrencyComponent, typeof i33.OneGridCellOptionMenuComponent], [typeof i34.CommonModule, typeof i35.FormsModule, typeof i36.ScrollingModule, typeof i37.NgbTypeahead, typeof i37.NgbHighlight, typeof i35.ReactiveFormsModule, typeof i38.CdkDragPlaceholder, typeof i39.LucideAngularModule], [typeof i1.OneGridComponent]>;
|
|
44
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<OneGridModule>;
|
|
45
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@one-grid-core/angular",
|
|
3
|
+
"version": "0.1.0-beta.5",
|
|
4
|
+
"description": "OneGrid — a feature-rich Angular data grid component with tree data, master/detail, editing, selection, pagination, and virtual scrolling.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"grid",
|
|
8
|
+
"datagrid",
|
|
9
|
+
"table",
|
|
10
|
+
"tree",
|
|
11
|
+
"master-detail",
|
|
12
|
+
"virtual-scroll"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"author": "phanithdeveloper <phanithdeveloper@gmail.com>",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./scss/*": {
|
|
18
|
+
"sass": "./scss/*",
|
|
19
|
+
"default": "./scss/*"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"esm2022": "./esm2022/one-grid-core-angular.mjs",
|
|
27
|
+
"esm": "./esm2022/one-grid-core-angular.mjs",
|
|
28
|
+
"default": "./fesm2022/one-grid-core-angular.mjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@angular/common": ">=17.0.0",
|
|
33
|
+
"@angular/core": ">=17.0.0",
|
|
34
|
+
"@angular/forms": ">=17.0.0",
|
|
35
|
+
"@angular/cdk": ">=17.0.0",
|
|
36
|
+
"@ng-bootstrap/ng-bootstrap": ">=16.0.0",
|
|
37
|
+
"lucide-angular": ">=0.400.0",
|
|
38
|
+
"rxjs": "^6.5.3 || ^7.4.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"tslib": "^2.3.0",
|
|
42
|
+
"lodash": "^4.17.21",
|
|
43
|
+
"uuid": ">=9.0.0"
|
|
44
|
+
},
|
|
45
|
+
"sideEffects": false,
|
|
46
|
+
"module": "fesm2022/one-grid-core-angular.mjs",
|
|
47
|
+
"typings": "index.d.ts"
|
|
48
|
+
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/index';
|