@gp-grid/core 0.20.0 → 0.22.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 +1 -0
- package/dist/index.d.ts +109 -32
- package/dist/index.js +1 -1315
- package/dist/styles.css +1 -1115
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ A framework-agnostic TypeScript library for building high-performance data grids
|
|
|
37
37
|
|
|
38
38
|
- [**@gp-grid/react**](https://www.npmjs.com/package/@gp-grid/react) | Official
|
|
39
39
|
- [**@gp-grid/vue**](https://www.npmjs.com/package/@gp-grid/vue) | Official
|
|
40
|
+
- [**@gp-grid/angular**](https://www.npmjs.com/package/@gp-grid/angular) | Official
|
|
40
41
|
|
|
41
42
|
## Philosophy
|
|
42
43
|
|
package/dist/index.d.ts
CHANGED
|
@@ -255,6 +255,14 @@ interface ColumnDefinition {
|
|
|
255
255
|
* for cells whose custom renderer already provides its own tooltip.
|
|
256
256
|
*/
|
|
257
257
|
tooltip?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Whether long cell text wraps onto additional lines instead of being
|
|
260
|
+
* truncated with an ellipsis. Wrapped text is clipped to the fixed row
|
|
261
|
+
* height (rows do not auto-grow) — use `peekable` (double-click) or the
|
|
262
|
+
* native `tooltip` to read the full value. Only affects the default text
|
|
263
|
+
* renderer, not custom `cellRenderer` output. Default: false.
|
|
264
|
+
*/
|
|
265
|
+
wrapText?: boolean;
|
|
258
266
|
/** Renderer key for adapter lookup, or inline renderer function */
|
|
259
267
|
cellRenderer?: string | ((params: CellRendererParams) => unknown);
|
|
260
268
|
editRenderer?: string | ((params: EditRendererParams) => unknown);
|
|
@@ -2904,37 +2912,6 @@ declare const labelsForSelectedValues: (entries: readonly DistinctValueEntry[],
|
|
|
2904
2912
|
*/
|
|
2905
2913
|
declare const rawValuesForLabels: (entries: readonly DistinctValueEntry[], labels: ReadonlySet<string>) => Set<CellValue>;
|
|
2906
2914
|
//#endregion
|
|
2907
|
-
//#region src/styles/variables.d.ts
|
|
2908
|
-
declare const variablesStyles: string;
|
|
2909
|
-
//#endregion
|
|
2910
|
-
//#region src/styles/container.d.ts
|
|
2911
|
-
declare const containerStyles: string;
|
|
2912
|
-
//#endregion
|
|
2913
|
-
//#region src/styles/header.d.ts
|
|
2914
|
-
declare const headerStyles: string;
|
|
2915
|
-
//#endregion
|
|
2916
|
-
//#region src/styles/cells.d.ts
|
|
2917
|
-
declare const cellStyles: string;
|
|
2918
|
-
//#endregion
|
|
2919
|
-
//#region src/styles/states.d.ts
|
|
2920
|
-
declare const statesStyles: string;
|
|
2921
|
-
//#endregion
|
|
2922
|
-
//#region src/styles/scrollbar.d.ts
|
|
2923
|
-
declare const scrollbarStyles: string;
|
|
2924
|
-
//#endregion
|
|
2925
|
-
//#region src/styles/filters.d.ts
|
|
2926
|
-
declare const filtersStyles: string;
|
|
2927
|
-
//#endregion
|
|
2928
|
-
//#region src/styles/row-drag.d.ts
|
|
2929
|
-
declare const rowDragStyles: string;
|
|
2930
|
-
//#endregion
|
|
2931
|
-
//#region src/styles/index.d.ts
|
|
2932
|
-
/**
|
|
2933
|
-
* Combined grid styles from all modules.
|
|
2934
|
-
* Use `@gp-grid/core/dist/styles.css` in your app instead of consuming this directly.
|
|
2935
|
-
*/
|
|
2936
|
-
declare const gridStyles: string;
|
|
2937
|
-
//#endregion
|
|
2938
2915
|
//#region src/state-reducer.d.ts
|
|
2939
2916
|
/**
|
|
2940
2917
|
* Apply a single instruction to mutable slot/header Maps and return
|
|
@@ -2944,6 +2921,106 @@ declare const gridStyles: string;
|
|
|
2944
2921
|
*/
|
|
2945
2922
|
declare const applyInstruction: <TData = unknown>(instruction: GridInstruction, slots: Map<string, SlotData<TData>>, headers: Map<number, HeaderData>) => Partial<GridState<TData>> | null;
|
|
2946
2923
|
//#endregion
|
|
2924
|
+
//#region src/i18n.d.ts
|
|
2925
|
+
/** Labels for the filter operator dropdowns, keyed by semantic meaning. */
|
|
2926
|
+
interface GridFilterOperatorLabels {
|
|
2927
|
+
/** Text operator: contains */
|
|
2928
|
+
contains: string;
|
|
2929
|
+
/** Text operator: does not contain */
|
|
2930
|
+
notContains: string;
|
|
2931
|
+
/** Text operator: starts with */
|
|
2932
|
+
startsWith: string;
|
|
2933
|
+
/** Text operator: ends with */
|
|
2934
|
+
endsWith: string;
|
|
2935
|
+
/** Shared "equals" (= for number/date, equals for text) */
|
|
2936
|
+
equals: string;
|
|
2937
|
+
/** Shared "does not equal" (!= / notEquals) */
|
|
2938
|
+
notEquals: string;
|
|
2939
|
+
/** Number/date operator: greater than */
|
|
2940
|
+
greaterThan: string;
|
|
2941
|
+
/** Number/date operator: less than */
|
|
2942
|
+
lessThan: string;
|
|
2943
|
+
/** Number operator: greater than or equal */
|
|
2944
|
+
greaterThanOrEqual: string;
|
|
2945
|
+
/** Number operator: less than or equal */
|
|
2946
|
+
lessThanOrEqual: string;
|
|
2947
|
+
/** Number/date operator: between */
|
|
2948
|
+
between: string;
|
|
2949
|
+
/** Shared "is blank" operator */
|
|
2950
|
+
blank: string;
|
|
2951
|
+
/** Shared "is not blank" operator */
|
|
2952
|
+
notBlank: string;
|
|
2953
|
+
}
|
|
2954
|
+
/**
|
|
2955
|
+
* All user-visible grid labels. Strings containing `{token}` placeholders are
|
|
2956
|
+
* templates interpolated by {@link formatLabel}; the documented tokens are
|
|
2957
|
+
* `{column}`, `{count}`, and `{message}`.
|
|
2958
|
+
*/
|
|
2959
|
+
interface GridLabels {
|
|
2960
|
+
/** Filter popup title template. Token: `{column}`. */
|
|
2961
|
+
filterTitle: string;
|
|
2962
|
+
/** Combination toggle: AND */
|
|
2963
|
+
and: string;
|
|
2964
|
+
/** Combination toggle: OR */
|
|
2965
|
+
or: string;
|
|
2966
|
+
/** Filter value input placeholder */
|
|
2967
|
+
valuePlaceholder: string;
|
|
2968
|
+
/** "between" second-input separator */
|
|
2969
|
+
betweenSeparator: string;
|
|
2970
|
+
/** "+ Add condition" button */
|
|
2971
|
+
addCondition: string;
|
|
2972
|
+
/** Remove-condition button glyph */
|
|
2973
|
+
removeCondition: string;
|
|
2974
|
+
/** Clear button */
|
|
2975
|
+
clear: string;
|
|
2976
|
+
/** Apply button */
|
|
2977
|
+
apply: string;
|
|
2978
|
+
/** Values mode toggle */
|
|
2979
|
+
valuesMode: string;
|
|
2980
|
+
/** Condition mode toggle */
|
|
2981
|
+
conditionMode: string;
|
|
2982
|
+
/** Values-mode search input placeholder */
|
|
2983
|
+
searchPlaceholder: string;
|
|
2984
|
+
/** Select all button */
|
|
2985
|
+
selectAll: string;
|
|
2986
|
+
/** Deselect all button */
|
|
2987
|
+
deselectAll: string;
|
|
2988
|
+
/** "(Blanks)" checkbox label */
|
|
2989
|
+
blanks: string;
|
|
2990
|
+
/** Too-many-values message template. Token: `{count}`. */
|
|
2991
|
+
tooManyValues: string;
|
|
2992
|
+
/** Empty grid message */
|
|
2993
|
+
emptyState: string;
|
|
2994
|
+
/** Error message prefix template. Token: `{message}`. */
|
|
2995
|
+
errorPrefix: string;
|
|
2996
|
+
/** Filter operator labels */
|
|
2997
|
+
operators: GridFilterOperatorLabels;
|
|
2998
|
+
}
|
|
2999
|
+
/** English defaults for every grid label. */
|
|
3000
|
+
declare const defaultGridLabels: GridLabels;
|
|
3001
|
+
/**
|
|
3002
|
+
* Merge a partial label set over the English defaults, producing a complete
|
|
3003
|
+
* `GridLabels`. Top-level keys are shallow-merged and `operators` is merged
|
|
3004
|
+
* one level deep; the defaults are never mutated.
|
|
3005
|
+
*/
|
|
3006
|
+
declare const resolveGridLabels: (overrides?: Partial<GridLabels>) => GridLabels;
|
|
3007
|
+
/**
|
|
3008
|
+
* Interpolate `{token}` placeholders in a label template. Unknown tokens are
|
|
3009
|
+
* left untouched and missing params are skipped, so this never throws.
|
|
3010
|
+
*/
|
|
3011
|
+
declare const formatLabel: (template: string, params?: Record<string, string | number>) => string;
|
|
3012
|
+
/** A single operator option rendered in a filter dropdown. */
|
|
3013
|
+
interface FilterOperatorOption<TOperator extends string = string> {
|
|
3014
|
+
value: TOperator;
|
|
3015
|
+
label: string;
|
|
3016
|
+
}
|
|
3017
|
+
/** Text filter operators in display order. */
|
|
3018
|
+
declare const getTextOperatorOptions: (labels: GridLabels) => FilterOperatorOption<TextFilterOperator>[];
|
|
3019
|
+
/** Number filter operators in display order. */
|
|
3020
|
+
declare const getNumberOperatorOptions: (labels: GridLabels) => FilterOperatorOption<NumberFilterOperator>[];
|
|
3021
|
+
/** Date filter operators in display order. */
|
|
3022
|
+
declare const getDateOperatorOptions: (labels: GridLabels) => FilterOperatorOption<DateFilterOperator>[];
|
|
3023
|
+
//#endregion
|
|
2947
3024
|
//#region src/adapter/pointer-event.d.ts
|
|
2948
3025
|
/**
|
|
2949
3026
|
* Convert a DOM PointerEvent into the framework-agnostic PointerEventData
|
|
@@ -3293,4 +3370,4 @@ declare class InputEventAdapter<TData = unknown> {
|
|
|
3293
3370
|
private dispatchCellDragStart;
|
|
3294
3371
|
}
|
|
3295
3372
|
//#endregion
|
|
3296
|
-
export { type AssignSlotInstruction, AutoScrollDriver, type BatchChangeSetters, type BatchInstructionListener, type CalculateFillHandlePositionParams, type CancelColumnMoveInstruction, type CancelColumnResizeInstruction, type CancelFillInstruction, type CancelRowDragInstruction, type CellDataType, type CellPointerAction, type CellPosition, type CellRange, type CellRendererParams, type CellValue, type CellValueChangedEvent, type CloseFilterPopupInstruction, type ColumnDefinition, type ColumnFilterModel, type ColumnMoveDragState, type ColumnResizeDragState, type ColumnScrollGeometry, type ColumnsChangedInstruction, type CommitColumnMoveInstruction, type CommitColumnResizeInstruction, type CommitEditInstruction, type CommitFillInstruction, type CommitRowDragInstruction, type ContainerBounds, type CreateSlotInstruction, type DataChangeListener, type DataErrorInstruction, type DataLoadedInstruction, type DataLoadingInstruction, type DataSource, type DataSourceLoadMode, DataSourceOwner, type DataSourceRange, type DataSourceRequest, type DataSourceResponse, type DateFilterCondition, type DateFilterOperator, type DestroySlotInstruction, type Direction, type DistinctValueEntry, type DragEndResult, type DragMoveResult, type DragState, EditManager, type EditManagerOptions, type EditRendererParams, type EditState, type FillHandlePosition, type FillHandleState, FillManager, type FillPointerAction, type FilterCombination, type FilterCondition, type FilterModel, type FilterPopupState, GridCore, type GridCoreOptions, type GridInstruction, type GridState, type HeaderData, type HeaderRendererParams, type HighlightContext, HighlightManager, type HighlightingOptions, IndexedDataStore, type IndexedDataStoreOptions, type InitialStateArgs, InputEventAdapter, type InputEventAdapterDeps, InputHandler, type InputHandlerDeps, type InputResult, type InstructionListener, type KeyEventData, type KeyboardResult, type MoveSlotInstruction, type MultiColumnSortedChunk, type MutableClientDataSourceOptions, type MutableDataSource, type NumberFilterCondition, type NumberFilterOperator, type OpenFilterPopupInstruction, ParallelSortManager, type ParallelSortOptions, PendingCellTapController, type PendingCellTapDeps, PendingRowDragController, type PendingRowDragDeps, type PointerEventData, type PopupPosition, ROW_DRAG_HOLD_MS, type RowCacheEviction, type RowCacheOptions, RowDataManager, type RowDataManagerOptions, type RowDragState, type RowId, type RowLoadingMode, type RowLoadingOptions, RowMutationManager, type RowMutationManagerOptions, type RowSortCache, type RowsAddedInstruction, type RowsRemovedInstruction, type RowsUpdatedInstruction, ScrollVirtualizationManager, type ScrollVirtualizationManagerOptions, SelectionManager, type SelectionState, type ServerDataSourceOptions, type SetActiveCellInstruction, type SetContentSizeInstruction, type SetHoverPositionInstruction, type SetSelectionRangeInstruction, type SlotData, type BatchInstructionListener$1 as SlotPoolBatchListener, SlotPoolManager, type SlotPoolManagerOptions, type SlotState, type SortDirection, SortFilterManager, type SortFilterManagerOptions, type SortModel, type SortedChunk, type StartColumnMoveInstruction, type StartColumnResizeInstruction, type StartEditInstruction, type StartFillInstruction, type StartPeekInstruction, type StartRowDragInstruction, type StopEditInstruction, type StopPeekInstruction, TAP_SLOP_PX, type TextFilterCondition, type TextFilterOperator, TouchScrollController, type TouchScrollDeps, type Transaction, TransactionManager, type TransactionManagerOptions, type TransactionProcessedInstruction, type TransactionResult, type UpdateColumnMoveInstruction, type UpdateColumnResizeInstruction, type UpdateFillInstruction, type UpdateHeaderInstruction, type UpdateRowDragInstruction, type VisibleColumnInfo, WorkerPool, type WorkerPoolOptions, applyBatchInstructions, applyInstruction, bindPeekSelectAll, buildCellClasses, calculateColumnPositions, calculateFillHandlePosition, calculateFilterPopupPosition, calculateScaledColumnPositions,
|
|
3373
|
+
export { type AssignSlotInstruction, AutoScrollDriver, type BatchChangeSetters, type BatchInstructionListener, type CalculateFillHandlePositionParams, type CancelColumnMoveInstruction, type CancelColumnResizeInstruction, type CancelFillInstruction, type CancelRowDragInstruction, type CellDataType, type CellPointerAction, type CellPosition, type CellRange, type CellRendererParams, type CellValue, type CellValueChangedEvent, type CloseFilterPopupInstruction, type ColumnDefinition, type ColumnFilterModel, type ColumnMoveDragState, type ColumnResizeDragState, type ColumnScrollGeometry, type ColumnsChangedInstruction, type CommitColumnMoveInstruction, type CommitColumnResizeInstruction, type CommitEditInstruction, type CommitFillInstruction, type CommitRowDragInstruction, type ContainerBounds, type CreateSlotInstruction, type DataChangeListener, type DataErrorInstruction, type DataLoadedInstruction, type DataLoadingInstruction, type DataSource, type DataSourceLoadMode, DataSourceOwner, type DataSourceRange, type DataSourceRequest, type DataSourceResponse, type DateFilterCondition, type DateFilterOperator, type DestroySlotInstruction, type Direction, type DistinctValueEntry, type DragEndResult, type DragMoveResult, type DragState, EditManager, type EditManagerOptions, type EditRendererParams, type EditState, type FillHandlePosition, type FillHandleState, FillManager, type FillPointerAction, type FilterCombination, type FilterCondition, type FilterModel, type FilterOperatorOption, type FilterPopupState, GridCore, type GridCoreOptions, type GridFilterOperatorLabels, type GridInstruction, type GridLabels, type GridState, type HeaderData, type HeaderRendererParams, type HighlightContext, HighlightManager, type HighlightingOptions, IndexedDataStore, type IndexedDataStoreOptions, type InitialStateArgs, InputEventAdapter, type InputEventAdapterDeps, InputHandler, type InputHandlerDeps, type InputResult, type InstructionListener, type KeyEventData, type KeyboardResult, type MoveSlotInstruction, type MultiColumnSortedChunk, type MutableClientDataSourceOptions, type MutableDataSource, type NumberFilterCondition, type NumberFilterOperator, type OpenFilterPopupInstruction, ParallelSortManager, type ParallelSortOptions, PendingCellTapController, type PendingCellTapDeps, PendingRowDragController, type PendingRowDragDeps, type PointerEventData, type PopupPosition, ROW_DRAG_HOLD_MS, type RowCacheEviction, type RowCacheOptions, RowDataManager, type RowDataManagerOptions, type RowDragState, type RowId, type RowLoadingMode, type RowLoadingOptions, RowMutationManager, type RowMutationManagerOptions, type RowSortCache, type RowsAddedInstruction, type RowsRemovedInstruction, type RowsUpdatedInstruction, ScrollVirtualizationManager, type ScrollVirtualizationManagerOptions, SelectionManager, type SelectionState, type ServerDataSourceOptions, type SetActiveCellInstruction, type SetContentSizeInstruction, type SetHoverPositionInstruction, type SetSelectionRangeInstruction, type SlotData, type BatchInstructionListener$1 as SlotPoolBatchListener, SlotPoolManager, type SlotPoolManagerOptions, type SlotState, type SortDirection, SortFilterManager, type SortFilterManagerOptions, type SortModel, type SortedChunk, type StartColumnMoveInstruction, type StartColumnResizeInstruction, type StartEditInstruction, type StartFillInstruction, type StartPeekInstruction, type StartRowDragInstruction, type StopEditInstruction, type StopPeekInstruction, TAP_SLOP_PX, type TextFilterCondition, type TextFilterOperator, TouchScrollController, type TouchScrollDeps, type Transaction, TransactionManager, type TransactionManagerOptions, type TransactionProcessedInstruction, type TransactionResult, type UpdateColumnMoveInstruction, type UpdateColumnResizeInstruction, type UpdateFillInstruction, type UpdateHeaderInstruction, type UpdateRowDragInstruction, type VisibleColumnInfo, WorkerPool, type WorkerPoolOptions, applyBatchInstructions, applyInstruction, bindPeekSelectAll, buildCellClasses, calculateColumnPositions, calculateFillHandlePosition, calculateFilterPopupPosition, calculateScaledColumnPositions, compareValues, computeValueHash, createClientDataSource, createDataSourceFromArray, createInitialState, createMutableClientDataSource, createServerDataSource, defaultGridLabels, detectBoundaryCollisions, evaluateColumnFilter, evaluateDateCondition, evaluateNumberCondition, evaluateTextCondition, findColumnAtX, findSlotForRow, formatCellValue, formatLabel, getDateOperatorOptions, getFieldValue, getNumberOperatorOptions, getTextOperatorOptions, getTotalWidth, groupDistinctValues, isBlankCellValue, isCellActive, isCellEditing, isCellInFillPreview, isCellSelected, isColumnInSelectionRange, isRowInSelectionRange, isRowVisible, isSameDay, kWayMerge, kWayMergeMultiColumn, labelsForSelectedValues, rawValueKey, rawValuesForLabels, resolveGridLabels, rowPassesFilter, scrollCellIntoView, setFieldValue, stringToSortableNumber, toPointerEventData };
|