@pretable/core 0.0.11 → 0.0.13

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/dist/index.d.cts CHANGED
@@ -99,6 +99,8 @@ interface PretableEditState {
99
99
  /** @public */
100
100
  type ColumnType = "text" | "number" | "date" | "enum" | "boolean";
101
101
  /** @public */
102
+ type ColumnAlign = "start" | "center" | "end";
103
+ /** @public */
102
104
  type FilterOperator = "contains" | "notContains" | "equals" | "notEquals" | "startsWith" | "endsWith" | "gt" | "gte" | "lt" | "lte" | "between" | "isAnyOf" | "isNoneOf" | "on" | "before" | "after" | "dateBetween" | "isEmpty" | "isNotEmpty";
103
105
  /** @public */
104
106
  type FilterValue = string | number | readonly [number, number] | readonly [string, string] | readonly string[] | null;
@@ -128,6 +130,11 @@ interface PretableColumn<TRow extends PretableRow = PretableRow> {
128
130
  step?: number;
129
131
  filterable?: boolean;
130
132
  type?: ColumnType;
133
+ /**
134
+ * Horizontal alignment of this column's cells and header label. Defaults to
135
+ * `"end"` for `type: "number"` and to the writing direction otherwise.
136
+ */
137
+ align?: ColumnAlign;
131
138
  options?: ColumnOption[];
132
139
  value?: (row: TRow) => unknown;
133
140
  format?: (input: PretableFormatInput<TRow>) => string;
@@ -533,4 +540,4 @@ interface PretableGrid<TRow extends PretableRow = PretableRow> {
533
540
  */
534
541
  declare function createGrid<TRow extends PretableRow = PretableRow>(options: PretableGridOptions<TRow>): PretableGrid<TRow>;
535
542
 
536
- export { type AutosizeOptions, type ColumnFilter, type ColumnOption, type ColumnType, type FilterOperator, type FilterValue, GROUP_COLUMN_ID, type PretableAggregateFormatInput, type PretableAggregateSpec, type PretableAggregator, type PretableCellAddress, type PretableCellRange, type PretableColumn, type PretableDataRow, type PretableEditInput, type PretableEditState, type PretableEditStatus, type PretableFocusDirection, type PretableFocusState, type PretableFormatInput, type PretableGrid, type PretableGridOptions, type PretableGridSnapshot, type PretableGroupColumnOptions, type PretableGroupRow, type PretableMoveFocusOptions, type PretableRow, type PretableRowRange, type PretableRowSelectionTriState, type PretableSelectionState, type PretableSortDirection, type PretableSortEntry, type PretableTransaction, type PretableViewportState, type PretableVisibleRow, createGrid };
543
+ export { type AutosizeOptions, type ColumnAlign, type ColumnFilter, type ColumnOption, type ColumnType, type FilterOperator, type FilterValue, GROUP_COLUMN_ID, type PretableAggregateFormatInput, type PretableAggregateSpec, type PretableAggregator, type PretableCellAddress, type PretableCellRange, type PretableColumn, type PretableDataRow, type PretableEditInput, type PretableEditState, type PretableEditStatus, type PretableFocusDirection, type PretableFocusState, type PretableFormatInput, type PretableGrid, type PretableGridOptions, type PretableGridSnapshot, type PretableGroupColumnOptions, type PretableGroupRow, type PretableMoveFocusOptions, type PretableRow, type PretableRowRange, type PretableRowSelectionTriState, type PretableSelectionState, type PretableSortDirection, type PretableSortEntry, type PretableTransaction, type PretableViewportState, type PretableVisibleRow, createGrid };
package/dist/index.d.ts CHANGED
@@ -99,6 +99,8 @@ interface PretableEditState {
99
99
  /** @public */
100
100
  type ColumnType = "text" | "number" | "date" | "enum" | "boolean";
101
101
  /** @public */
102
+ type ColumnAlign = "start" | "center" | "end";
103
+ /** @public */
102
104
  type FilterOperator = "contains" | "notContains" | "equals" | "notEquals" | "startsWith" | "endsWith" | "gt" | "gte" | "lt" | "lte" | "between" | "isAnyOf" | "isNoneOf" | "on" | "before" | "after" | "dateBetween" | "isEmpty" | "isNotEmpty";
103
105
  /** @public */
104
106
  type FilterValue = string | number | readonly [number, number] | readonly [string, string] | readonly string[] | null;
@@ -128,6 +130,11 @@ interface PretableColumn<TRow extends PretableRow = PretableRow> {
128
130
  step?: number;
129
131
  filterable?: boolean;
130
132
  type?: ColumnType;
133
+ /**
134
+ * Horizontal alignment of this column's cells and header label. Defaults to
135
+ * `"end"` for `type: "number"` and to the writing direction otherwise.
136
+ */
137
+ align?: ColumnAlign;
131
138
  options?: ColumnOption[];
132
139
  value?: (row: TRow) => unknown;
133
140
  format?: (input: PretableFormatInput<TRow>) => string;
@@ -533,4 +540,4 @@ interface PretableGrid<TRow extends PretableRow = PretableRow> {
533
540
  */
534
541
  declare function createGrid<TRow extends PretableRow = PretableRow>(options: PretableGridOptions<TRow>): PretableGrid<TRow>;
535
542
 
536
- export { type AutosizeOptions, type ColumnFilter, type ColumnOption, type ColumnType, type FilterOperator, type FilterValue, GROUP_COLUMN_ID, type PretableAggregateFormatInput, type PretableAggregateSpec, type PretableAggregator, type PretableCellAddress, type PretableCellRange, type PretableColumn, type PretableDataRow, type PretableEditInput, type PretableEditState, type PretableEditStatus, type PretableFocusDirection, type PretableFocusState, type PretableFormatInput, type PretableGrid, type PretableGridOptions, type PretableGridSnapshot, type PretableGroupColumnOptions, type PretableGroupRow, type PretableMoveFocusOptions, type PretableRow, type PretableRowRange, type PretableRowSelectionTriState, type PretableSelectionState, type PretableSortDirection, type PretableSortEntry, type PretableTransaction, type PretableViewportState, type PretableVisibleRow, createGrid };
543
+ export { type AutosizeOptions, type ColumnAlign, type ColumnFilter, type ColumnOption, type ColumnType, type FilterOperator, type FilterValue, GROUP_COLUMN_ID, type PretableAggregateFormatInput, type PretableAggregateSpec, type PretableAggregator, type PretableCellAddress, type PretableCellRange, type PretableColumn, type PretableDataRow, type PretableEditInput, type PretableEditState, type PretableEditStatus, type PretableFocusDirection, type PretableFocusState, type PretableFormatInput, type PretableGrid, type PretableGridOptions, type PretableGridSnapshot, type PretableGroupColumnOptions, type PretableGroupRow, type PretableMoveFocusOptions, type PretableRow, type PretableRowRange, type PretableRowSelectionTriState, type PretableSelectionState, type PretableSortDirection, type PretableSortEntry, type PretableTransaction, type PretableViewportState, type PretableVisibleRow, createGrid };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretable/core",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Framework-agnostic grid state primitives for Pretable.",
5
5
  "license": "MIT",
6
6
  "repository": {