eru-grid 0.0.29 → 0.0.31
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/fesm2022/eru-grid.mjs +456 -69
- package/fesm2022/eru-grid.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eru-grid.d.ts +58 -7
package/package.json
CHANGED
package/types/eru-grid.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ interface GridFeatures {
|
|
|
69
69
|
actionColumnPosition?: 'before' | 'after';
|
|
70
70
|
designMode?: boolean;
|
|
71
71
|
groupBar?: boolean;
|
|
72
|
+
wrapHeaders?: boolean;
|
|
72
73
|
headerRowHeight?: number;
|
|
73
74
|
dataRowHeight?: number;
|
|
74
75
|
cursorOnHover?: string;
|
|
@@ -97,6 +98,25 @@ interface GridConfiguration {
|
|
|
97
98
|
byDatatype?: Partial<Record<DataTypes, ColumnWidthConstraints>>;
|
|
98
99
|
};
|
|
99
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Descriptor emitted by the grid when a cell (select/status/etc.) needs its
|
|
103
|
+
* option list fetched from an external source. Consumers listen to
|
|
104
|
+
* EruGridStore.dynamicDataRequest() and reply via setDynamicData(key, data).
|
|
105
|
+
*
|
|
106
|
+
* `key` is the map key the result must be stored under (the cell reads its
|
|
107
|
+
* options from dynamicData.get(key)). For ENTITY_DATA the key is the field's
|
|
108
|
+
* entity_name; for API it is the field's api_name.
|
|
109
|
+
*/
|
|
110
|
+
interface DynamicDataRequest {
|
|
111
|
+
key: string;
|
|
112
|
+
optionType?: 'API' | 'ENTITY_DATA' | 'STATIC';
|
|
113
|
+
entityName?: string;
|
|
114
|
+
dEntityName?: string;
|
|
115
|
+
fieldName?: string;
|
|
116
|
+
apiName?: string;
|
|
117
|
+
apiField?: string;
|
|
118
|
+
search?: string;
|
|
119
|
+
}
|
|
100
120
|
interface Field {
|
|
101
121
|
name: string;
|
|
102
122
|
label: string;
|
|
@@ -133,8 +153,17 @@ interface Field {
|
|
|
133
153
|
enableDrilldown?: boolean;
|
|
134
154
|
open_status?: any[];
|
|
135
155
|
close_status?: any[];
|
|
156
|
+
data_length?: number;
|
|
157
|
+
start_value?: number;
|
|
158
|
+
end_value?: number;
|
|
159
|
+
emoji_value?: string;
|
|
160
|
+
max_files?: number;
|
|
161
|
+
allowed_file_types?: any[];
|
|
162
|
+
maxFileSize?: number;
|
|
163
|
+
default_country?: string;
|
|
136
164
|
}
|
|
137
165
|
type DataTypes = 'number' | 'textbox' | 'currency' | 'date' | 'datetime' | 'duration' | 'dropdown_single_select' | 'dropdown_multi_select' | 'location' | 'email' | 'people' | 'checkbox' | 'phone' | 'priority' | 'status' | 'progress' | 'attachment' | 'tag' | 'rating' | 'website';
|
|
166
|
+
declare const DATA_TYPES: DataTypes[];
|
|
138
167
|
type AggregationFunction = 'sum' | 'count' | 'avg' | 'min' | 'max';
|
|
139
168
|
interface PivotColumnGroupState {
|
|
140
169
|
[groupKey: string]: {
|
|
@@ -556,6 +585,10 @@ declare class EruGridStore {
|
|
|
556
585
|
private readonly _sortColumns;
|
|
557
586
|
private readonly _dataRequest;
|
|
558
587
|
private readonly _requestQueue;
|
|
588
|
+
private readonly _selectedDesignColumn;
|
|
589
|
+
readonly selectedDesignColumn: _angular_core.Signal<string | null>;
|
|
590
|
+
private readonly _columnDesignUpdate;
|
|
591
|
+
readonly columnDesignUpdate: _angular_core.Signal<Field[] | null>;
|
|
559
592
|
readonly columns: _angular_core.Signal<Field[]>;
|
|
560
593
|
readonly groups: _angular_core.Signal<RowGroup[]>;
|
|
561
594
|
readonly rows: _angular_core.Signal<Row[]>;
|
|
@@ -581,7 +614,7 @@ declare class EruGridStore {
|
|
|
581
614
|
readonly cellValueChange: _angular_core.Signal<CellValueChange | null>;
|
|
582
615
|
readonly sortColumns: _angular_core.Signal<string[]>;
|
|
583
616
|
readonly dataRequest: _angular_core.Signal<RowDataRequest | null>;
|
|
584
|
-
readonly dynamicDataRequest: _angular_core.Signal<
|
|
617
|
+
readonly dynamicDataRequest: _angular_core.Signal<DynamicDataRequest[] | null>;
|
|
585
618
|
readonly dynamicData: _angular_core.Signal<Map<string, any> | null>;
|
|
586
619
|
readonly selectedRows: _angular_core.Signal<Row[]>;
|
|
587
620
|
readonly totalSelectedCount: _angular_core.Signal<number>;
|
|
@@ -613,6 +646,8 @@ declare class EruGridStore {
|
|
|
613
646
|
getConfiguration(): GridConfiguration;
|
|
614
647
|
reorderColumns(fromIndex: number, toIndex: number): void;
|
|
615
648
|
updateColumnRequired(columnName: string, required: boolean): void;
|
|
649
|
+
updateColumnMeta(columnName: string, patch: Partial<Field>): void;
|
|
650
|
+
selectDesignColumn(columnName: string | null): void;
|
|
616
651
|
updateColumnWidth(columnName: string, field_size: number): void;
|
|
617
652
|
setCellValueChange(change: CellValueChange): void;
|
|
618
653
|
setGroups(groups: RowGroup[]): void;
|
|
@@ -769,11 +804,15 @@ declare class EruGridStore {
|
|
|
769
804
|
/**
|
|
770
805
|
* Set the dynamic data request
|
|
771
806
|
*/
|
|
772
|
-
setDynamicDataRequest(request: string): void;
|
|
807
|
+
setDynamicDataRequest(request: string | DynamicDataRequest): void;
|
|
773
808
|
/**
|
|
774
809
|
* Get the dynamic data request
|
|
775
810
|
*/
|
|
776
|
-
getDynamicDataRequest():
|
|
811
|
+
getDynamicDataRequest(): DynamicDataRequest[] | null;
|
|
812
|
+
/**
|
|
813
|
+
* True if a request for the given key is already pending.
|
|
814
|
+
*/
|
|
815
|
+
hasDynamicDataRequest(key: string): boolean;
|
|
777
816
|
removeDynamicDataRequest(key: string): void;
|
|
778
817
|
/**
|
|
779
818
|
* Set the dynamic data
|
|
@@ -999,6 +1038,7 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
999
1038
|
isSortable: _angular_core.Signal<boolean>;
|
|
1000
1039
|
showSortBar: _angular_core.Signal<boolean>;
|
|
1001
1040
|
showGroupBar: _angular_core.Signal<boolean>;
|
|
1041
|
+
wrapHeaders: _angular_core.Signal<boolean>;
|
|
1002
1042
|
headerRowHeight: _angular_core.Signal<number>;
|
|
1003
1043
|
dataRowHeight: _angular_core.Signal<number>;
|
|
1004
1044
|
cursorOnHover: _angular_core.Signal<string>;
|
|
@@ -1103,8 +1143,8 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1103
1143
|
* Request rows for a specific group via signal
|
|
1104
1144
|
*/
|
|
1105
1145
|
private requestRowsForGroup;
|
|
1106
|
-
|
|
1107
|
-
|
|
1146
|
+
isDesignMode(): boolean;
|
|
1147
|
+
onHeaderDesignClick(event: Event, column: Field): void;
|
|
1108
1148
|
trackByColumnFn(index: number, column: Field): string;
|
|
1109
1149
|
trackByGroupItemFn(index: number, groupItem: GroupItem): string;
|
|
1110
1150
|
trackByPivotRowFn(index: number, pivotRow: PivotRow): string;
|
|
@@ -1917,6 +1957,17 @@ declare class SelectComponent implements OnInit, AfterViewInit {
|
|
|
1917
1957
|
hasRequiredValidation(): boolean;
|
|
1918
1958
|
formatDisplayValue(): string;
|
|
1919
1959
|
trackByValueAndIndex(index: number, option: any): string;
|
|
1960
|
+
/**
|
|
1961
|
+
* Find the value of `field` anywhere within `obj` (top-down, first match).
|
|
1962
|
+
* Returns only primitive values so nested wrapper objects are skipped — the
|
|
1963
|
+
* option value/label must be a scalar, not an object.
|
|
1964
|
+
*/
|
|
1965
|
+
private findFieldValue;
|
|
1966
|
+
/**
|
|
1967
|
+
* First primitive (non-object) property value found in the object tree.
|
|
1968
|
+
* Used as a last resort when the configured field cannot be located.
|
|
1969
|
+
*/
|
|
1970
|
+
private firstPrimitiveValue;
|
|
1920
1971
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
1921
1972
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent, "eru-select", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "isEditable": { "alias": "isEditable"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "isDrillable": { "alias": "isDrillable"; "required": false; "isSignal": true; }; "columnWidth": { "alias": "columnWidth"; "required": false; "isSignal": true; }; "fieldSize": { "alias": "fieldSize"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "eruGridStore": { "alias": "eruGridStore"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "blur": "blur"; "focus": "focus"; "drilldownClick": "drilldownClick"; "editModeChange": "editModeChange"; }, never, never, true, never>;
|
|
1922
1973
|
}
|
|
@@ -2202,5 +2253,5 @@ declare class ThemeToggleComponent {
|
|
|
2202
2253
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ThemeToggleComponent, "eru-theme-toggle", never, {}, {}, never, never, true, never>;
|
|
2203
2254
|
}
|
|
2204
2255
|
|
|
2205
|
-
export { AttachmentComponent, CheckboxComponent, ColumnConstraintsService, CurrencyComponent, CustomVirtualScrollStrategy, DateComponent, DatetimeComponent, DurationComponent, EmailComponent, EruGridComponent, EruGridService, EruGridStore, LocationComponent, MATERIAL_MODULES, MATERIAL_PROVIDERS, NumberComponent, PRESET_CONFIG_DEFAULTS, PRESET_MANAGED_FIELDS, PeopleComponent, PhoneComponent, PriorityComponent, ProgressComponent, RatingComponent, SelectComponent, StatusComponent, TagComponent, TextareaComponent, TextboxComponent, ThemeService, ThemeToggleComponent, WebsiteComponent };
|
|
2206
|
-
export type { ActionClick, AggregationFunction, AttachmentConfig, BoardCardContext, CellValueChange, ColumnReorder, ColumnResize, ColumnWidthConstraints, CurrencyValidationResult, DataTypes, Drilldown, DurationValue, EmailValidationResult, Field, GridConfiguration, GridFeatures, GridMode, GridPreset, GridStyles, GridTokens, GroupItem$1 as GroupItem, LocationConfig, LocationValidationResult, NumberValidationResult, PeopleOption, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, RatingConfig, Row, RowDataRequest, RowDataResponse, RowGrandTotal, RowGroup, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
|
|
2256
|
+
export { AttachmentComponent, CheckboxComponent, ColumnConstraintsService, CurrencyComponent, CustomVirtualScrollStrategy, DATA_TYPES, DateComponent, DatetimeComponent, DurationComponent, EmailComponent, EruGridComponent, EruGridService, EruGridStore, LocationComponent, MATERIAL_MODULES, MATERIAL_PROVIDERS, NumberComponent, PRESET_CONFIG_DEFAULTS, PRESET_MANAGED_FIELDS, PeopleComponent, PhoneComponent, PriorityComponent, ProgressComponent, RatingComponent, SelectComponent, StatusComponent, TagComponent, TextareaComponent, TextboxComponent, ThemeService, ThemeToggleComponent, WebsiteComponent };
|
|
2257
|
+
export type { ActionClick, AggregationFunction, AttachmentConfig, BoardCardContext, CellValueChange, ColumnReorder, ColumnResize, ColumnWidthConstraints, CurrencyValidationResult, DataTypes, Drilldown, DurationValue, DynamicDataRequest, EmailValidationResult, Field, GridConfiguration, GridFeatures, GridMode, GridPreset, GridStyles, GridTokens, GroupItem$1 as GroupItem, LocationConfig, LocationValidationResult, NumberValidationResult, PeopleOption, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, RatingConfig, Row, RowDataRequest, RowDataResponse, RowGrandTotal, RowGroup, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
|