@tedi-design-system/angular 6.4.0 → 6.5.0-rc.2
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/community/components/navigation/pagination/pagination.component.d.ts +3 -0
- package/community/components/navigation/pagination/pagination.component.d.ts.map +1 -1
- package/fesm2022/tedi-design-system-angular-community.mjs +3 -0
- package/fesm2022/tedi-design-system-angular-community.mjs.map +1 -1
- package/fesm2022/tedi-design-system-angular-tedi.mjs +3012 -784
- package/fesm2022/tedi-design-system-angular-tedi.mjs.map +1 -1
- package/package.json +2 -1
- package/tedi/components/buttons/collapse/collapse.component.d.ts +21 -5
- package/tedi/components/buttons/collapse/collapse.component.d.ts.map +1 -1
- package/tedi/components/buttons/collapse-button/collapse-button.component.d.ts +76 -0
- package/tedi/components/buttons/collapse-button/collapse-button.component.d.ts.map +1 -0
- package/tedi/components/buttons/index.d.ts +1 -0
- package/tedi/components/buttons/index.d.ts.map +1 -1
- package/tedi/components/content/index.d.ts +1 -0
- package/tedi/components/content/index.d.ts.map +1 -1
- package/tedi/components/content/table/index.d.ts +9 -0
- package/tedi/components/content/table/index.d.ts.map +1 -0
- package/tedi/components/content/table/row-span.utils.d.ts +10 -0
- package/tedi/components/content/table/row-span.utils.d.ts.map +1 -0
- package/tedi/components/content/table/table-columns-menu/index.d.ts +2 -0
- package/tedi/components/content/table/table-columns-menu/index.d.ts.map +1 -0
- package/tedi/components/content/table/table-columns-menu/table-columns-menu.component.d.ts +19 -0
- package/tedi/components/content/table/table-columns-menu/table-columns-menu.component.d.ts.map +1 -0
- package/tedi/components/content/table/table-header-button/index.d.ts +2 -0
- package/tedi/components/content/table/table-header-button/index.d.ts.map +1 -0
- package/tedi/components/content/table/table-header-button/table-header-button.component.d.ts +36 -0
- package/tedi/components/content/table/table-header-button/table-header-button.component.d.ts.map +1 -0
- package/tedi/components/content/table/table-toolbar/index.d.ts +2 -0
- package/tedi/components/content/table/table-toolbar/index.d.ts.map +1 -0
- package/tedi/components/content/table/table-toolbar/table-toolbar.component.d.ts +6 -0
- package/tedi/components/content/table/table-toolbar/table-toolbar.component.d.ts.map +1 -0
- package/tedi/components/content/table/table.component.d.ts +499 -0
- package/tedi/components/content/table/table.component.d.ts.map +1 -0
- package/tedi/components/content/table/table.context.d.ts +5 -0
- package/tedi/components/content/table/table.context.d.ts.map +1 -0
- package/tedi/components/content/table/table.persistence.d.ts +21 -0
- package/tedi/components/content/table/table.persistence.d.ts.map +1 -0
- package/tedi/components/content/table/table.types.d.ts +196 -0
- package/tedi/components/content/table/table.types.d.ts.map +1 -0
- package/tedi/components/helpers/empty-state/empty-state.component.d.ts +54 -0
- package/tedi/components/helpers/empty-state/empty-state.component.d.ts.map +1 -0
- package/tedi/components/helpers/empty-state/index.d.ts +2 -0
- package/tedi/components/helpers/empty-state/index.d.ts.map +1 -0
- package/tedi/components/helpers/index.d.ts +1 -0
- package/tedi/components/helpers/index.d.ts.map +1 -1
- package/tedi/components/navigation/index.d.ts +1 -0
- package/tedi/components/navigation/index.d.ts.map +1 -1
- package/tedi/components/navigation/pagination/index.d.ts +5 -0
- package/tedi/components/navigation/pagination/index.d.ts.map +1 -0
- package/tedi/components/navigation/pagination/pagination-option-picker-modal/pagination-option-picker-modal.component.d.ts +31 -0
- package/tedi/components/navigation/pagination/pagination-option-picker-modal/pagination-option-picker-modal.component.d.ts.map +1 -0
- package/tedi/components/navigation/pagination/pagination-results.directive.d.ts +17 -0
- package/tedi/components/navigation/pagination/pagination-results.directive.d.ts.map +1 -0
- package/tedi/components/navigation/pagination/pagination.component.d.ts +182 -0
- package/tedi/components/navigation/pagination/pagination.component.d.ts.map +1 -0
- package/tedi/components/navigation/pagination/pagination.types.d.ts +48 -0
- package/tedi/components/navigation/pagination/pagination.types.d.ts.map +1 -0
- package/tedi/components/navigation/pagination/pagination.utils.d.ts +24 -0
- package/tedi/components/navigation/pagination/pagination.utils.d.ts.map +1 -0
- package/tedi/components/overlay/dropdown/dropdown-item/dropdown-item.component.d.ts +14 -1
- package/tedi/components/overlay/dropdown/dropdown-item/dropdown-item.component.d.ts.map +1 -1
- package/tedi/components/overlay/modal/modal-header/modal-header.component.d.ts +15 -1
- package/tedi/components/overlay/modal/modal-header/modal-header.component.d.ts.map +1 -1
- package/tedi/components/overlay/modal/modal.component.d.ts +3 -3
- package/tedi/components/overlay/modal/modal.component.d.ts.map +1 -1
- package/tedi/components/overlay/modal/modal.service.d.ts.map +1 -1
- package/tedi/components/overlay/modal/modal.types.d.ts +9 -2
- package/tedi/components/overlay/modal/modal.types.d.ts.map +1 -1
- package/tedi/services/translation/translations.d.ts +108 -3
- package/tedi/services/translation/translations.d.ts.map +1 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import type { Signal, TemplateRef } from "@angular/core";
|
|
2
|
+
import type { CellContext, Column, ColumnDef, ColumnFiltersState, ColumnOrderState, ColumnSizingState, ExpandedState, PaginationState, RowSelectionState, SortingState, Table as TanstackTable, VisibilityState } from "@tanstack/angular-table";
|
|
3
|
+
import type { PaginationComponent } from "../../navigation/pagination/pagination.component";
|
|
4
|
+
import type { ComponentInputs } from "../../../types/inputs.type";
|
|
5
|
+
export type TableSize = "medium" | "small";
|
|
6
|
+
/**
|
|
7
|
+
* Selection mode for `<tedi-table>` row selection. `multiple` (default) shows
|
|
8
|
+
* a checkbox per row plus a select-all checkbox in the header. `single` shows
|
|
9
|
+
* a radio per row sharing one `name`, and no header control.
|
|
10
|
+
*/
|
|
11
|
+
export type TableSelectionMode = "multiple" | "single";
|
|
12
|
+
/**
|
|
13
|
+
* How an expandable row is toggled. `button` (default) only reacts to clicks
|
|
14
|
+
* on the chevron button. `row` lets a click anywhere on the row toggle
|
|
15
|
+
* expansion. Both render the chevron in the `secondary` (bordered) arrow style
|
|
16
|
+
* by default — override it with the table's `expandButtonVariant` input.
|
|
17
|
+
*/
|
|
18
|
+
export type TableExpandTrigger = "button" | "row";
|
|
19
|
+
/**
|
|
20
|
+
* Optional shape that columns can put in `columnDef.meta` to:
|
|
21
|
+
*
|
|
22
|
+
* - drive the column-filter aria-label when the header is non-textual (`label`),
|
|
23
|
+
* - align the column's `<th>` / `<td>` content horizontally (`align`) or vertically
|
|
24
|
+
* (`vAlign`) without wrapping every cell render in a styled span.
|
|
25
|
+
*/
|
|
26
|
+
export interface TableColumnMeta {
|
|
27
|
+
/** Accessible label used when the column header isn't a plain string. */
|
|
28
|
+
label?: string;
|
|
29
|
+
/** Horizontal alignment applied to every header / body / footer cell. */
|
|
30
|
+
align?: "left" | "center" | "right";
|
|
31
|
+
/** Vertical alignment applied to every header / body / footer cell. */
|
|
32
|
+
vAlign?: "top" | "middle" | "bottom";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Persistable state slices owned by Table. Each slice can be controlled via
|
|
36
|
+
* `state`/`stateChange`, defaulted via `defaultState`, or persisted via `persist`.
|
|
37
|
+
*/
|
|
38
|
+
export interface TableState {
|
|
39
|
+
columnVisibility?: VisibilityState;
|
|
40
|
+
columnOrder?: ColumnOrderState;
|
|
41
|
+
rowOrder?: string[];
|
|
42
|
+
columnSizing?: ColumnSizingState;
|
|
43
|
+
rowSelection?: RowSelectionState;
|
|
44
|
+
expanded?: ExpandedState;
|
|
45
|
+
columnFilters?: ColumnFiltersState;
|
|
46
|
+
sorting?: SortingState;
|
|
47
|
+
pagination?: PaginationState;
|
|
48
|
+
}
|
|
49
|
+
export type TableStatePatch = Partial<TableState> | ((prev: TableState) => Partial<TableState>);
|
|
50
|
+
export interface TablePersistOptions {
|
|
51
|
+
/** Storage key used to read/write persisted state. Must be stable per table. */
|
|
52
|
+
key: string;
|
|
53
|
+
/** Storage backend. Defaults to `window.localStorage` when available. */
|
|
54
|
+
storage?: Storage;
|
|
55
|
+
/**
|
|
56
|
+
* Subset of state slices to persist. Defaults to user-preference slices only:
|
|
57
|
+
* `columnVisibility`, `columnOrder`, `rowOrder`, `columnSizing`.
|
|
58
|
+
*/
|
|
59
|
+
include?: (keyof TableState)[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Inputs on `tedi-pagination` that the table manages itself or replaces with a
|
|
63
|
+
* differently typed version, so they are stripped from the forwarded shape.
|
|
64
|
+
*/
|
|
65
|
+
type TableManagedPaginationInputs = "pageCount" | "totalItems" | "pageSizeOptions";
|
|
66
|
+
/**
|
|
67
|
+
* All pagination inputs the consumer can pass through `pagination` /
|
|
68
|
+
* `paginationTop`. Mirrors `PaginationComponent`'s public inputs (except the
|
|
69
|
+
* state-driven ones owned by the table) and adds the table-specific
|
|
70
|
+
* `pageSize` / `pageSizeOptions` configuration.
|
|
71
|
+
*
|
|
72
|
+
* Note: `pageSize` lives on `PaginationComponent` as a `model()` and is therefore
|
|
73
|
+
* not part of `ComponentInputs` — we redeclare it here so consumers configure
|
|
74
|
+
* the initial/default page size via this options object.
|
|
75
|
+
*/
|
|
76
|
+
export type TablePaginationOptions = Partial<Omit<ComponentInputs<PaginationComponent>, TableManagedPaginationInputs>> & {
|
|
77
|
+
/** Rows per page. @default 10 */
|
|
78
|
+
pageSize?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Options rendered in the built-in page-size selector. Pass `false` to hide.
|
|
81
|
+
* @default [10, 25, 50]
|
|
82
|
+
*/
|
|
83
|
+
pageSizeOptions?: number[] | false;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Tuning knobs for the built-in filter popover. Forwarded by `filterable`
|
|
87
|
+
* when the consumer needs more than just "on / off".
|
|
88
|
+
*/
|
|
89
|
+
export interface TableFilterOptions {
|
|
90
|
+
/**
|
|
91
|
+
* Reset the in-popover draft to the applied filter value every time the
|
|
92
|
+
* popover closes. Useful for filters where stale draft state (a partially
|
|
93
|
+
* typed string, half-selected checkboxes) would confuse the user.
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
clearOnClose?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Context exposed by the built-in filter popover to the consumer's
|
|
100
|
+
* `filterTemplate`. The consumer binds inputs to `value` / `setValue` and
|
|
101
|
+
* optionally calls `apply()` / `clear()` (e.g. on Enter / Escape) — the
|
|
102
|
+
* popover's footer already wires Apply / Clear buttons.
|
|
103
|
+
*
|
|
104
|
+
* `$implicit` aliases the context itself, so `<ng-template let-ctx>` binds
|
|
105
|
+
* `ctx` to a full `TediTableFilterContext` (the consumer reads `ctx.value`,
|
|
106
|
+
* `ctx.setValue`, etc. through the same name).
|
|
107
|
+
*/
|
|
108
|
+
export interface TediTableFilterContext<TValue = unknown, TData = unknown> {
|
|
109
|
+
/**
|
|
110
|
+
* Aliases the context itself, so `let-ctx` binds the full context — keeps
|
|
111
|
+
* `ctx.value` / `ctx.setValue` / `ctx.column` discoverable without forcing
|
|
112
|
+
* the consumer to spell out `let-value="value"`, `let-setValue="setValue"`, etc.
|
|
113
|
+
*/
|
|
114
|
+
$implicit: TediTableFilterContext<TValue, TData>;
|
|
115
|
+
/** Current draft (what the input should bind to). */
|
|
116
|
+
value: TValue;
|
|
117
|
+
/** Write to the draft. Does not apply yet — call `apply()` to commit. */
|
|
118
|
+
setValue: (next: TValue) => void;
|
|
119
|
+
/** Commit the draft via `column.setFilterValue` and close the popover. */
|
|
120
|
+
apply: () => void;
|
|
121
|
+
/** Reset the filter (calls `setFilterValue(undefined)`) and close. */
|
|
122
|
+
clear: () => void;
|
|
123
|
+
/** TanStack `Column` for the column whose filter popover is open. */
|
|
124
|
+
column: Column<TData>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Angular-only extension to TanStack's `ColumnDef`. Supports body-level row
|
|
128
|
+
* spanning via the `rowSpan` callback and a one-flag opt-in to the built-in
|
|
129
|
+
* sort affordance via `sortable`.
|
|
130
|
+
*/
|
|
131
|
+
export type TediColumnDef<TData, TValue = unknown> = ColumnDef<TData, TValue> & {
|
|
132
|
+
/**
|
|
133
|
+
* Body-level row spanning. Return `>1` to emit `rowspan="N"` and skip the
|
|
134
|
+
* next `N-1` rows in this column; return `0` to skip rendering the cell
|
|
135
|
+
* entirely (covered by a previous spanning cell). Defaults to `1`.
|
|
136
|
+
*/
|
|
137
|
+
rowSpan?: number | ((info: CellContext<TData, TValue>) => number);
|
|
138
|
+
/**
|
|
139
|
+
* Opts the column into the built-in sort affordance. When `true` and the
|
|
140
|
+
* column's `header` is a string, the table renders a clickable sort button
|
|
141
|
+
* around the header title — the entire title becomes the affordance, an
|
|
142
|
+
* icon reflects the current sort direction, `aria-sort` is wired, and
|
|
143
|
+
* clicking toggles `asc → desc → none`.
|
|
144
|
+
*
|
|
145
|
+
* For fully custom sort UIs (e.g. combined sort + filter), provide a
|
|
146
|
+
* `TemplateRef` for `header` and call `column.toggleSorting()` yourself —
|
|
147
|
+
* the shorthand bows out when a non-string header is rendered.
|
|
148
|
+
*
|
|
149
|
+
* Pair with `sortingFn` on the same column to override the comparator
|
|
150
|
+
* (built-in: `'alphanumeric'`, `'text'`, `'datetime'`, `'basic'`, `'auto'`,
|
|
151
|
+
* or any `SortingFn`).
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
sortable?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Opts the column into the built-in filter popover. The table renders the
|
|
158
|
+
* trigger button (icon-only `filter_alt`), positions the popover, owns the
|
|
159
|
+
* in-popover draft state, and renders translated **Apply** / **Clear**
|
|
160
|
+
* actions in the footer. The consumer supplies the input UI through
|
|
161
|
+
* `filterTemplate`.
|
|
162
|
+
*
|
|
163
|
+
* Pass `true` for defaults, or `TableFilterOptions` to tune behaviour
|
|
164
|
+
* (e.g. `{ clearOnClose: true }` to discard half-typed drafts when the
|
|
165
|
+
* popover closes without applying). Requires `filterTemplate` when truthy.
|
|
166
|
+
*
|
|
167
|
+
* @default false
|
|
168
|
+
*/
|
|
169
|
+
filterable?: boolean | TableFilterOptions;
|
|
170
|
+
/**
|
|
171
|
+
* Input UI rendered inside the built-in filter popover. Receives a
|
|
172
|
+
* `TediTableFilterContext` with `value` / `setValue` for the draft and
|
|
173
|
+
* `apply()` / `clear()` for explicit commit + close. The footer Apply /
|
|
174
|
+
* Clear buttons cover the common path — call them from the template only
|
|
175
|
+
* for keyboard shortcuts (Enter, Escape).
|
|
176
|
+
*/
|
|
177
|
+
filterTemplate?: TemplateRef<TediTableFilterContext<unknown, TData>>;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Value exposed through `TEDI_TABLE_CONTEXT`. Sub-components like ColumnsMenu
|
|
181
|
+
* use it to read and mutate the table state without prop-drilling.
|
|
182
|
+
*/
|
|
183
|
+
export interface TediTableContextValue<TData = unknown> {
|
|
184
|
+
/** Signal exposing the current Tanstack table instance. Read inside computed/effect for reactivity. */
|
|
185
|
+
table: Signal<TanstackTable<TData>>;
|
|
186
|
+
/** Visual size of the table. */
|
|
187
|
+
size: Signal<TableSize>;
|
|
188
|
+
/** Stable id used as a prefix for synthetic ids. */
|
|
189
|
+
id: Signal<string>;
|
|
190
|
+
/** Merged table state signal. */
|
|
191
|
+
state: Signal<TableState>;
|
|
192
|
+
/** Id of the row currently under the pointer, or `null`. */
|
|
193
|
+
hoveredRowId: Signal<string | null>;
|
|
194
|
+
}
|
|
195
|
+
export {};
|
|
196
|
+
//# sourceMappingURL=table.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.types.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/content/table/table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACN,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,KAAK,IAAI,aAAa,EACtB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;A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;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAAC;IAC1C;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;CACtE,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,KAAK,GAAG,OAAO;IACpD,uGAAuG;IACvG,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACpC,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACxB,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACnB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC1B,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IconColor, IconSize } from "../../base/icon/icon.component";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type EmptyStateType = "separate" | "attached" | "inside";
|
|
4
|
+
export type EmptyStateSize = "default" | "small";
|
|
5
|
+
/**
|
|
6
|
+
* Communicates that there is nothing to display — empty search results, an
|
|
7
|
+
* unpopulated list, a freshly-created workspace — and optionally guides the
|
|
8
|
+
* user toward the next step via action buttons or a link.
|
|
9
|
+
*
|
|
10
|
+
* Description is projected via `<ng-content>`. Actions are projected via
|
|
11
|
+
* `<ng-content select="[tedi-empty-state-actions]">`.
|
|
12
|
+
*/
|
|
13
|
+
export declare class EmptyStateComponent {
|
|
14
|
+
/**
|
|
15
|
+
* Container variant — matches the Figma "Types" section.
|
|
16
|
+
* - `'separate'` (default) — full border + radius, stands on its own.
|
|
17
|
+
* - `'attached'` — top border omitted so the block sits flush beneath a
|
|
18
|
+
* preceding card or table (same width + same bottom-radius).
|
|
19
|
+
* - `'inside'` — no border, no radius; intended to be placed inside another
|
|
20
|
+
* container such as a `<tedi-card>` or `<tedi-table>`.
|
|
21
|
+
* @default separate
|
|
22
|
+
*/
|
|
23
|
+
readonly type: import("@angular/core").InputSignal<EmptyStateType>;
|
|
24
|
+
/**
|
|
25
|
+
* Padding scale. `default` = 24px, `small` = 16px.
|
|
26
|
+
* @default default
|
|
27
|
+
*/
|
|
28
|
+
readonly size: import("@angular/core").InputSignal<EmptyStateSize>;
|
|
29
|
+
/**
|
|
30
|
+
* Material icon name rendered above the text block. Pass `null` to hide.
|
|
31
|
+
* @default spa
|
|
32
|
+
*/
|
|
33
|
+
readonly icon: import("@angular/core").InputSignal<string | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Color of the icon. Defaults to brand so the empty state reads as a
|
|
36
|
+
* "fresh canvas" cue rather than a destructive state.
|
|
37
|
+
* @default brand
|
|
38
|
+
*/
|
|
39
|
+
readonly iconColor: import("@angular/core").InputSignal<IconColor>;
|
|
40
|
+
/**
|
|
41
|
+
* Size of the icon, in pixels.
|
|
42
|
+
* @default 36
|
|
43
|
+
*/
|
|
44
|
+
readonly iconSize: import("@angular/core").InputSignal<IconSize>;
|
|
45
|
+
/**
|
|
46
|
+
* Optional heading rendered above the description — appears as an `<h3>` in
|
|
47
|
+
* brand-primary text color.
|
|
48
|
+
*/
|
|
49
|
+
readonly heading: import("@angular/core").InputSignal<string | undefined>;
|
|
50
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "tedi-empty-state", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconColor": { "alias": "iconColor"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[tedi-empty-state-actions]"], true, never>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=empty-state.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.component.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/helpers/empty-state/empty-state.component.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAiB,QAAQ,EAAE,MAAM,gCAAgC,CAAC;;AAGpF,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AAChE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjD;;;;;;;GAOG;AACH,qBAaa,mBAAmB;IAC9B;;;;;;;;OAQG;IACH,QAAQ,CAAC,IAAI,sDAAqC;IAElD;;;OAGG;IACH,QAAQ,CAAC,IAAI,sDAAoC;IAEjD;;;OAGG;IACH,QAAQ,CAAC,IAAI,qDAA+B;IAE5C;;;;OAIG;IACH,QAAQ,CAAC,SAAS,iDAA6B;IAE/C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,gDAAuB;IAExC;;;OAGG;IACH,QAAQ,CAAC,OAAO,0DAAwC;IAExD,SAAS,CAAC,QAAQ,CAAC,WAAW,yCAM5B;yCAjDS,mBAAmB;2CAAnB,mBAAmB;CAkD/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/helpers/empty-state/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../tedi/components/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../tedi/components/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../tedi/components/navigation/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../tedi/components/navigation/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { PaginationComponent } from "./pagination.component";
|
|
2
|
+
export { TediPaginationResultsDirective } from "./pagination-results.directive";
|
|
3
|
+
export { usePagination, type UsePaginationArgs } from "./pagination.utils";
|
|
4
|
+
export type { PaginationBackground, PaginationDividerPosition, PaginationItem, PaginationItemType, PaginationLabels, PaginationVisibility, } from "./pagination.types";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/navigation/pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AfterViewInit } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface PaginationOptionPickerOption {
|
|
4
|
+
/** Value emitted when this option is selected. */
|
|
5
|
+
value: number;
|
|
6
|
+
/** Visible label inside the row. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Full accessible name for the row's button. */
|
|
9
|
+
ariaLabel: string;
|
|
10
|
+
}
|
|
11
|
+
export interface PaginationOptionPickerModalData {
|
|
12
|
+
/** Available options to choose from. */
|
|
13
|
+
options: PaginationOptionPickerOption[];
|
|
14
|
+
/** Currently selected value — drives the active styling and scroll-into-view target. */
|
|
15
|
+
selectedValue: number;
|
|
16
|
+
/** Optional heading rendered inside the modal header. Hidden when omitted. */
|
|
17
|
+
title?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class PaginationOptionPickerModalComponent implements AfterViewInit {
|
|
20
|
+
private readonly modalRef;
|
|
21
|
+
protected readonly data: PaginationOptionPickerModalData;
|
|
22
|
+
protected readonly itemSize = 48;
|
|
23
|
+
protected readonly ready: import("@angular/core").WritableSignal<boolean>;
|
|
24
|
+
private readonly viewport;
|
|
25
|
+
ngAfterViewInit(): void;
|
|
26
|
+
protected trackByValue(_: number, option: PaginationOptionPickerOption): number;
|
|
27
|
+
protected selectValue(value: number): void;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationOptionPickerModalComponent, never>;
|
|
29
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationOptionPickerModalComponent, "tedi-pagination-option-picker-modal", never, {}, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=pagination-option-picker-modal.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-option-picker-modal.component.d.ts","sourceRoot":"","sources":["../../../../../../tedi/components/navigation/pagination/pagination-option-picker-modal/pagination-option-picker-modal.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAOd,MAAM,eAAe,CAAC;;AAQvB,MAAM,WAAW,4BAA4B;IAC3C,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,+BAA+B;IAC9C,wCAAwC;IACxC,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACxC,wFAAwF;IACxF,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,qBAiBa,oCAAqC,YAAW,aAAa;IACxE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsC;IAC/D,SAAS,CAAC,QAAQ,CAAC,IAAI,kCAAuD;IAE9E,SAAS,CAAC,QAAQ,CAAC,QAAQ,MAAgB;IAC3C,SAAS,CAAC,QAAQ,CAAC,KAAK,kDAAiB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgD;IAEzE,eAAe,IAAI,IAAI;IAuCvB,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,4BAA4B,GAAG,MAAM;IAI/E,SAAS,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;yCAnD/B,oCAAoC;2CAApC,oCAAoC;CAsDhD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Marker directive that lets consumers fully replace the default
|
|
4
|
+
* "X results" label inside `<tedi-pagination>`.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```html
|
|
8
|
+
* <tedi-pagination [pageCount]="10" [totalItems]="1000">
|
|
9
|
+
* <span tediPaginationResults>1000+ tulemust</span>
|
|
10
|
+
* </tedi-pagination>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare class TediPaginationResultsDirective {
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TediPaginationResultsDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TediPaginationResultsDirective, "[tediPaginationResults]", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=pagination-results.directive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-results.directive.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/navigation/pagination/pagination-results.directive.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AACH,qBAIa,8BAA8B;yCAA9B,8BAA8B;2CAA9B,8BAA8B;CAAG"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { ButtonVariant } from "../../buttons/button/button.component";
|
|
2
|
+
import { PaginationBackground, PaginationDividerPosition, PaginationItem, PaginationLabels, PaginationVisibility } from "./pagination.types";
|
|
3
|
+
import { TediPaginationResultsDirective } from "./pagination-results.directive";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PaginationComponent {
|
|
6
|
+
/** Total number of pages. */
|
|
7
|
+
readonly pageCount: import("@angular/core").InputSignal<number>;
|
|
8
|
+
/**
|
|
9
|
+
* Current page (1-based). Two-way bindable with `[(page)]` or used
|
|
10
|
+
* one-way with `[page]` + `(pageChange)`.
|
|
11
|
+
* @default 1
|
|
12
|
+
*/
|
|
13
|
+
readonly page: import("@angular/core").ModelSignal<number>;
|
|
14
|
+
/**
|
|
15
|
+
* Total number of items across all pages. When set, the "{count} results"
|
|
16
|
+
* label is rendered to the left of the nav. Can be replaced entirely by
|
|
17
|
+
* projecting `[tediPaginationResults]` content.
|
|
18
|
+
*/
|
|
19
|
+
readonly totalItems: import("@angular/core").InputSignal<number | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Current page size. Two-way bindable with `[(pageSize)]` or used
|
|
22
|
+
* one-way with `[pageSize]` + `(pageSizeChange)`.
|
|
23
|
+
*/
|
|
24
|
+
readonly pageSize: import("@angular/core").ModelSignal<number | undefined>;
|
|
25
|
+
/** Options for the page-size select. Empty/undefined hides the select. */
|
|
26
|
+
readonly pageSizeOptions: import("@angular/core").InputSignal<number[]>;
|
|
27
|
+
/** Pages always shown at the start and end. @default 1 */
|
|
28
|
+
readonly boundaryCount: import("@angular/core").InputSignal<number>;
|
|
29
|
+
/** Pages shown on either side of the current page. @default 1 */
|
|
30
|
+
readonly siblingCount: import("@angular/core").InputSignal<number>;
|
|
31
|
+
/** Override any of the default text labels / aria labels. */
|
|
32
|
+
readonly labels: import("@angular/core").InputSignal<Partial<PaginationLabels> | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Background variant. `transparent` removes the surface fill and divider —
|
|
35
|
+
* use it when pagination sits on a non-white container.
|
|
36
|
+
* @default 'white'
|
|
37
|
+
*/
|
|
38
|
+
readonly background: import("@angular/core").InputSignal<PaginationBackground>;
|
|
39
|
+
/**
|
|
40
|
+
* Where the divider line sits relative to the pagination row.
|
|
41
|
+
* `'none'` removes the divider entirely. The `transparent` background
|
|
42
|
+
* variant overrides this and never renders a divider.
|
|
43
|
+
* @default 'top'
|
|
44
|
+
*/
|
|
45
|
+
readonly dividerPosition: import("@angular/core").InputSignal<PaginationDividerPosition>;
|
|
46
|
+
/**
|
|
47
|
+
* Hide the "X results" label even when `totalItems` is set or content is
|
|
48
|
+
* projected via `[tediPaginationResults]`. Pass a breakpoint name to hide
|
|
49
|
+
* only below that breakpoint.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
readonly hideResults: import("@angular/core").InputSignal<PaginationVisibility>;
|
|
53
|
+
/**
|
|
54
|
+
* Hide the page-size dropdown even when `pageSizeOptions` is non-empty.
|
|
55
|
+
* Pass a breakpoint name to hide only below that breakpoint.
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
readonly hidePageSize: import("@angular/core").InputSignal<PaginationVisibility>;
|
|
59
|
+
/**
|
|
60
|
+
* Hide the pager (prev/next + page list). Pass a breakpoint name to hide
|
|
61
|
+
* only below that breakpoint.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
readonly hidePager: import("@angular/core").InputSignal<PaginationVisibility>;
|
|
65
|
+
/**
|
|
66
|
+
* Hide the prev/next arrow buttons inside the pager. Pass a breakpoint
|
|
67
|
+
* name to hide only below that breakpoint. The page list / mobile picker
|
|
68
|
+
* stays visible.
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
readonly hideArrows: import("@angular/core").InputSignal<PaginationVisibility>;
|
|
72
|
+
/**
|
|
73
|
+
* Keep prev/next arrows rendered (but disabled) at the first/last page
|
|
74
|
+
* instead of removing them from the DOM. Useful when the pager should
|
|
75
|
+
* have a stable footprint regardless of position.
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
readonly disableArrowsAtBoundary: import("@angular/core").InputSignal<boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* Variant for the prev/next arrow buttons — accepts any `tedi-button`
|
|
81
|
+
* variant. Defaults to `neutral` for icon-only arrows; pair with
|
|
82
|
+
* `showArrowLabels` to render a regular button (e.g. `primary` with text).
|
|
83
|
+
* @default 'neutral'
|
|
84
|
+
*/
|
|
85
|
+
readonly arrowVariant: import("@angular/core").InputSignal<ButtonVariant>;
|
|
86
|
+
/**
|
|
87
|
+
* Render the `previous` / `next` labels as visible button text next to
|
|
88
|
+
* the arrow icon. When false (default) the buttons are icon-only and the
|
|
89
|
+
* labels are exposed only via `aria-label`.
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
92
|
+
readonly showArrowLabels: import("@angular/core").InputSignal<boolean>;
|
|
93
|
+
/**
|
|
94
|
+
* Material Symbols icon name for the previous-page arrow.
|
|
95
|
+
* @default 'arrow_back'
|
|
96
|
+
*/
|
|
97
|
+
readonly previousIcon: import("@angular/core").InputSignal<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Material Symbols icon name for the next-page arrow.
|
|
100
|
+
* @default 'arrow_forward'
|
|
101
|
+
*/
|
|
102
|
+
readonly nextIcon: import("@angular/core").InputSignal<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Show a heading inside the mobile page-jump / page-size picker modals.
|
|
105
|
+
* Uses the `pageTitle` / `pageSizeTitle` labels.
|
|
106
|
+
* @default true
|
|
107
|
+
*/
|
|
108
|
+
readonly showModalTitle: import("@angular/core").InputSignal<boolean>;
|
|
109
|
+
/** Emits whenever the user navigates to a different page. */
|
|
110
|
+
readonly pageChange: import("@angular/core").OutputEmitterRef<number>;
|
|
111
|
+
/** Emits when the user picks a different page size. */
|
|
112
|
+
readonly pageSizeChange: import("@angular/core").OutputEmitterRef<number>;
|
|
113
|
+
/** Detects the `[tediPaginationResults]` content-projection slot, if any. */
|
|
114
|
+
protected readonly customResults: import("@angular/core").Signal<TediPaginationResultsDirective | undefined>;
|
|
115
|
+
private readonly translationService;
|
|
116
|
+
private readonly breakpointService;
|
|
117
|
+
private readonly modalService;
|
|
118
|
+
/** True below `md` — pager swaps to the compact `current / total` picker. */
|
|
119
|
+
protected readonly useCompactPicker: import("@angular/core").Signal<boolean>;
|
|
120
|
+
protected readonly pageSizeInputId: string;
|
|
121
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
122
|
+
protected readonly currentPage: import("@angular/core").Signal<number>;
|
|
123
|
+
protected readonly items: import("@angular/core").Signal<PaginationItem[]>;
|
|
124
|
+
private static readonly EMPTY_NAV_ITEM;
|
|
125
|
+
protected readonly previousItem: import("@angular/core").Signal<PaginationItem>;
|
|
126
|
+
protected readonly nextItem: import("@angular/core").Signal<PaginationItem>;
|
|
127
|
+
protected readonly pageItems: import("@angular/core").Signal<PaginationItem[]>;
|
|
128
|
+
protected readonly mergedLabels: import("@angular/core").Signal<PaginationLabels>;
|
|
129
|
+
private readonly currentBreakpoint;
|
|
130
|
+
private static readonly BREAKPOINT_ORDER;
|
|
131
|
+
protected readonly isResultsHidden: import("@angular/core").Signal<boolean>;
|
|
132
|
+
protected readonly isPageSizeHidden: import("@angular/core").Signal<boolean>;
|
|
133
|
+
protected readonly isPagerHidden: import("@angular/core").Signal<boolean>;
|
|
134
|
+
protected readonly areArrowsHidden: import("@angular/core").Signal<boolean>;
|
|
135
|
+
protected readonly showResults: import("@angular/core").Signal<boolean>;
|
|
136
|
+
protected readonly showPageSizeSelect: import("@angular/core").Signal<boolean>;
|
|
137
|
+
protected readonly showPager: import("@angular/core").Signal<boolean>;
|
|
138
|
+
/**
|
|
139
|
+
* Whether the prev/next arrows should render at all. When false they're
|
|
140
|
+
* removed from the DOM. At the first/last page, individual arrows are
|
|
141
|
+
* additionally gated by `disableArrowsAtBoundary` — see `showPrevious`
|
|
142
|
+
* / `showNext`.
|
|
143
|
+
*/
|
|
144
|
+
protected readonly showArrows: import("@angular/core").Signal<boolean>;
|
|
145
|
+
/**
|
|
146
|
+
* Whether the previous-arrow button is rendered. Removed at the first
|
|
147
|
+
* page unless `disableArrowsAtBoundary` keeps it as a disabled button.
|
|
148
|
+
*/
|
|
149
|
+
protected readonly showPrevious: import("@angular/core").Signal<boolean>;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the next-arrow button is rendered. Removed at the last page
|
|
152
|
+
* unless `disableArrowsAtBoundary` keeps it as a disabled button.
|
|
153
|
+
*/
|
|
154
|
+
protected readonly showNext: import("@angular/core").Signal<boolean>;
|
|
155
|
+
private resolveVisibility;
|
|
156
|
+
protected readonly pageSizeSelectOptions: import("@angular/core").Signal<{
|
|
157
|
+
value: number;
|
|
158
|
+
label: string;
|
|
159
|
+
}[]>;
|
|
160
|
+
protected readonly mobileTriggerLabel: import("@angular/core").Signal<string>;
|
|
161
|
+
/**
|
|
162
|
+
* Accessible name for the mobile trigger button. Starts with the visible
|
|
163
|
+
* text (`{current} / {total}`) so WCAG 2.5.3 (Label in Name) is satisfied
|
|
164
|
+
* for voice-control users.
|
|
165
|
+
*/
|
|
166
|
+
protected readonly mobileTriggerAriaLabel: import("@angular/core").Signal<string>;
|
|
167
|
+
protected readonly mobilePageSizeAriaLabel: import("@angular/core").Signal<string>;
|
|
168
|
+
/** Whether the mobile page-jump picker modal is currently open. */
|
|
169
|
+
protected readonly isMobileModalOpen: import("@angular/core").WritableSignal<boolean>;
|
|
170
|
+
/** Whether the mobile page-size picker modal is currently open. */
|
|
171
|
+
protected readonly isPageSizeModalOpen: import("@angular/core").WritableSignal<boolean>;
|
|
172
|
+
protected readonly statusText: import("@angular/core").Signal<string>;
|
|
173
|
+
constructor();
|
|
174
|
+
protected handlePageChange(nextPage: number | null): void;
|
|
175
|
+
protected handlePageSizeChange(value: number | null): void;
|
|
176
|
+
protected openMobilePicker(): void;
|
|
177
|
+
protected openPageSizePicker(): void;
|
|
178
|
+
private openPickerModal;
|
|
179
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
180
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "tedi-pagination", never, { "pageCount": { "alias": "pageCount"; "required": true; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "totalItems": { "alias": "totalItems"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "boundaryCount": { "alias": "boundaryCount"; "required": false; "isSignal": true; }; "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "background": { "alias": "background"; "required": false; "isSignal": true; }; "dividerPosition": { "alias": "dividerPosition"; "required": false; "isSignal": true; }; "hideResults": { "alias": "hideResults"; "required": false; "isSignal": true; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; "isSignal": true; }; "hidePager": { "alias": "hidePager"; "required": false; "isSignal": true; }; "hideArrows": { "alias": "hideArrows"; "required": false; "isSignal": true; }; "disableArrowsAtBoundary": { "alias": "disableArrowsAtBoundary"; "required": false; "isSignal": true; }; "arrowVariant": { "alias": "arrowVariant"; "required": false; "isSignal": true; }; "showArrowLabels": { "alias": "showArrowLabels"; "required": false; "isSignal": true; }; "previousIcon": { "alias": "previousIcon"; "required": false; "isSignal": true; }; "nextIcon": { "alias": "nextIcon"; "required": false; "isSignal": true; }; "showModalTitle": { "alias": "showModalTitle"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; "pageSize": "pageSizeChange"; "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, ["customResults"], ["[tediPaginationResults]"], true, never>;
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=pagination.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.component.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/navigation/pagination/pagination.component.ts"],"names":[],"mappings":"AAcA,OAAO,EAAmB,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAQvF,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;;AAOhF,qBAaa,mBAAmB;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,SAAS,8CAA4B;IAE9C;;;;OAIG;IACH,QAAQ,CAAC,IAAI,8CAAoB;IAEjC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,0DAAwC;IAE3D;;;OAGG;IACH,QAAQ,CAAC,QAAQ,0DAAwC;IAEzD,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,gDAAuB;IAE/C,0DAA0D;IAC1D,QAAQ,CAAC,aAAa,8CAAoB;IAE1C,iEAAiE;IACjE,QAAQ,CAAC,YAAY,8CAAoB;IAEzC,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,6EAA2D;IAE1E;;;;OAIG;IACH,QAAQ,CAAC,UAAU,4DAAwC;IAE3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AAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAM1D,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAmClC,SAAS,CAAC,kBAAkB,IAAI,IAAI;IA2BpC,OAAO,CAAC,eAAe;yCAhZZ,mBAAmB;2CAAnB,mBAAmB;CA8Z/B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export type PaginationBackground = "white" | "transparent";
|
|
2
|
+
/**
|
|
3
|
+
* Visibility toggle for the results / page-size / pager / arrow slots.
|
|
4
|
+
* - `true` — always hidden
|
|
5
|
+
* - `false` (default) — always visible
|
|
6
|
+
* - `'sm'` / `'md'` / `'lg'` / `'xl'` / `'xxl'` — hidden below that breakpoint
|
|
7
|
+
*
|
|
8
|
+
* Mirrors the `boolean | breakpoint` pattern used by `tedi-modal`'s
|
|
9
|
+
* `fullscreen` input.
|
|
10
|
+
*/
|
|
11
|
+
export type PaginationVisibility = boolean | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
12
|
+
/**
|
|
13
|
+
* Where the divider sits relative to the pagination row.
|
|
14
|
+
* - `'top'` (default) — border on top, matches single-row layouts under content
|
|
15
|
+
* - `'bottom'` — border on bottom, for above-content placements
|
|
16
|
+
* - `'none'` — no divider, useful when the surrounding container already has one
|
|
17
|
+
*/
|
|
18
|
+
export type PaginationDividerPosition = "top" | "bottom" | "none";
|
|
19
|
+
export type PaginationItemType = "page" | "previous" | "next" | "ellipsis";
|
|
20
|
+
export interface PaginationItem {
|
|
21
|
+
type: PaginationItemType;
|
|
22
|
+
page: number | null;
|
|
23
|
+
selected: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface PaginationLabels {
|
|
27
|
+
/** Accessible label for the nav wrapper. @default 'Pagination' */
|
|
28
|
+
ariaLabel: string;
|
|
29
|
+
/** Previous button label (icon-only, used as aria-label). @default 'Previous page' */
|
|
30
|
+
previous: string;
|
|
31
|
+
/** Next button label (icon-only, used as aria-label). @default 'Next page' */
|
|
32
|
+
next: string;
|
|
33
|
+
/** aria-label for a numeric page button. @default (page) => 'Go to page {page}' */
|
|
34
|
+
pageAriaLabel: (page: number) => string;
|
|
35
|
+
/** aria-label for the currently active page. @default (page) => 'Current page, page {page}' */
|
|
36
|
+
currentPageAriaLabel: (page: number) => string;
|
|
37
|
+
/** Rendered to the left of the nav when `totalItems` is set. @default (count) => '{count} results' */
|
|
38
|
+
results: (count: number) => string;
|
|
39
|
+
/** Prefix label for the page-size select. @default 'Show per page' */
|
|
40
|
+
pageSize: string;
|
|
41
|
+
/** Announcement for the aria-live region when the page changes. @default (page, total) => 'Page {page} of {total}' */
|
|
42
|
+
pageStatus: (page: number, pageCount: number) => string;
|
|
43
|
+
/** Title shown above the page-jump modal on mobile when `showModalTitle` is true. @default 'Select page' */
|
|
44
|
+
pageTitle: string;
|
|
45
|
+
/** Title shown above the page-size modal on mobile when `showModalTitle` is true. @default 'Show per page' */
|
|
46
|
+
pageSizeTitle: string;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=pagination.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.types.d.ts","sourceRoot":"","sources":["../../../../../tedi/components/navigation/pagination/pagination.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,aAAa,CAAC;AAE3D;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,+FAA+F;IAC/F,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,sGAAsG;IACtG,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACnC,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,sHAAsH;IACtH,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACxD,4GAA4G;IAC5G,SAAS,EAAE,MAAM,CAAC;IAClB,8GAA8G;IAC9G,aAAa,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PaginationItem } from "./pagination.types";
|
|
2
|
+
export interface UsePaginationArgs {
|
|
3
|
+
/** 1-based current page. */
|
|
4
|
+
page: number;
|
|
5
|
+
/** Total page count. */
|
|
6
|
+
pageCount: number;
|
|
7
|
+
/** Pages always shown at the very start and very end. */
|
|
8
|
+
boundaryCount?: number;
|
|
9
|
+
/** Pages shown on either side of the current page. */
|
|
10
|
+
siblingCount?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Computes the ordered list of pagination items (previous, page-buttons,
|
|
14
|
+
* ellipsis, next).
|
|
15
|
+
*
|
|
16
|
+
* The algorithm targets a stable slot count: for any `pageCount` larger than
|
|
17
|
+
* the window size, the returned list always has the same number of page
|
|
18
|
+
* entries (`boundaryCount * 2 + siblingCount * 2 + 3`). As the current page
|
|
19
|
+
* moves toward a boundary, the corresponding ellipsis is swapped for an extra
|
|
20
|
+
* adjacent page number rather than collapsing the list — the visual row does
|
|
21
|
+
* not expand or contract as the user navigates.
|
|
22
|
+
*/
|
|
23
|
+
export declare function usePagination({ page, pageCount, boundaryCount, siblingCount, }: UsePaginationArgs): PaginationItem[];
|
|
24
|
+
//# sourceMappingURL=pagination.utils.d.ts.map
|