@aures5g/vue-component-library 3.67.0 → 3.69.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/dist/src/components/table/TableHeaderCell.vue.d.ts +1 -0
- package/dist/src/components/table/TableHeaderRowItem.vue.d.ts +1 -0
- package/dist/src/components/table/sortCycle.d.ts +44 -9
- package/dist/src/components/table/uiTable.types.d.ts +1 -0
- package/dist/vue-component-library.js +878 -857
- package/dist/vue-component-library.umd.cjs +14 -14
- package/package.json +1 -1
|
@@ -4,14 +4,49 @@ export type SortState = {
|
|
|
4
4
|
direction: SortDirections;
|
|
5
5
|
} | null;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Local click-count state for the header sort cycle (Bug #76979 / #76979
|
|
8
|
+
* follow-up). Tracks ONLY "which field was clicked, how many times in a
|
|
9
|
+
* row" — never the resulting `direction`, and never anything read back from
|
|
10
|
+
* the externally-bound `sortModel`. This is deliberate: a view can have its
|
|
11
|
+
* own default sort (`useDefineSort`'s `defaultSort`), so `sortModel` can
|
|
12
|
+
* already read e.g. `{ field: 'make', direction: 'asc' }` before the user
|
|
13
|
+
* has ever clicked anything. An earlier version of this state machine
|
|
14
|
+
* derived the next step from that externally-visible `direction` alone
|
|
15
|
+
* (`current.direction === DESC ? ASC : off`) — for a column whose default
|
|
16
|
+
* sort direction happens to be ASC (not DESC), the very first click was
|
|
17
|
+
* indistinguishable from "already at the ASC step, 3rd click coming up" and
|
|
18
|
+
* immediately reset the sort back to that same default (`off` -> `resetSort()`
|
|
19
|
+
* -> the identical default), so clicking such a column appeared to do
|
|
20
|
+
* nothing on the 1st click and never flipped on the 2nd (confirmed live: PR
|
|
21
|
+
* 11389, build 79082 — every system view's own default-sorted column, e.g.
|
|
22
|
+
* `make` on `basicView`, failed both checks in `view-suite.ts`).
|
|
23
|
+
* Deriving purely from click COUNT (this file), independent of whatever
|
|
24
|
+
* `sortModel` happened to already contain, cannot exhibit that ambiguity.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SORT_CLICK_STEP: {
|
|
27
|
+
readonly FIRST: 1;
|
|
28
|
+
readonly SECOND: 2;
|
|
29
|
+
};
|
|
30
|
+
type SortClickStep = (typeof SORT_CLICK_STEP)[keyof typeof SORT_CLICK_STEP];
|
|
31
|
+
export type SortClickState = {
|
|
32
|
+
field: string;
|
|
33
|
+
step: SortClickStep;
|
|
34
|
+
} | null;
|
|
35
|
+
/**
|
|
36
|
+
* Pure click-count state machine for the header sort click cycle.
|
|
8
37
|
*
|
|
9
|
-
* Single-column sort: clicking a column other than the currently
|
|
10
|
-
* always
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
38
|
+
* Single-column sort: clicking a column other than the one currently being
|
|
39
|
+
* cycled always restarts the cycle on that column (FIRST) — the previous
|
|
40
|
+
* column's cycle is dropped entirely, regardless of what `sortModel`
|
|
41
|
+
* currently shows for it. Clicking the SAME column advances FIRST -> SECOND
|
|
42
|
+
* -> off (null); off -> FIRST restarts it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function nextSortClickState(current: SortClickState, clickedField: string): SortClickState;
|
|
45
|
+
/**
|
|
46
|
+
* Maps a click-count state to the `sortModel` value `TableHeaderRow.vue`
|
|
47
|
+
* should assign: FIRST -> DESC, SECOND -> ASC, off (null) -> null (the
|
|
48
|
+
* parent's `sortModel` setter already treats `null` as "reset to the view's
|
|
49
|
+
* default sort").
|
|
16
50
|
*/
|
|
17
|
-
export declare function
|
|
51
|
+
export declare function sortClickStateToSortModel(state: SortClickState): SortState;
|
|
52
|
+
export {};
|