bitboss-ui 2.1.127 → 2.1.128
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/ai/BbTable.md +635 -2
- package/dist/components/BbTable/types.d.ts +32 -0
- package/dist/composables/useTableWidthContext.d.ts +35 -0
- package/dist/index.css +1 -1
- package/dist/index.js +9 -9
- package/dist/index240.js +1 -1
- package/dist/index270.js +1 -1
- package/dist/index325.js +34 -41
- package/dist/index326.js +40 -447
- package/dist/index327.js +632 -0
- package/dist/index329.js +5 -154
- package/dist/index330.js +155 -0
- package/dist/index332.js +5 -141
- package/dist/index333.js +142 -0
- package/dist/index335.js +5 -154
- package/dist/index336.js +155 -0
- package/dist/index338.js +5 -57
- package/dist/index339.js +57 -4
- package/dist/index340.js +4 -19
- package/dist/index341.js +20 -0
- package/dist/index343.js +5 -141
- package/dist/index344.js +142 -0
- package/dist/index346.js +5 -3
- package/dist/index347.js +3 -108
- package/dist/index348.js +109 -0
- package/dist/index350.js +5 -54
- package/dist/index351.js +54 -23
- package/dist/index352.js +12 -11
- package/dist/index353.js +22 -838
- package/dist/index354.js +811 -446
- package/dist/index355.js +472 -50
- package/dist/index356.js +51 -6
- package/dist/index357.js +7 -0
- package/package.json +1 -1
- package/dist/index328.js +0 -6
- package/dist/index331.js +0 -6
- package/dist/index334.js +0 -6
- package/dist/index337.js +0 -6
- package/dist/index342.js +0 -6
- package/dist/index345.js +0 -6
- package/dist/index349.js +0 -6
|
@@ -71,6 +71,28 @@ export type BbTableColumn<Item = any> = BaseColumn<Item> & {
|
|
|
71
71
|
* Defines the classes to be passed to the `<th>`.
|
|
72
72
|
*/
|
|
73
73
|
thClass?: Classes;
|
|
74
|
+
/**
|
|
75
|
+
* Freezes the column to a fixed width (numbers are treated as px). When
|
|
76
|
+
* omitted the column syncs its width to the parent table's matching track.
|
|
77
|
+
*/
|
|
78
|
+
width?: number | string;
|
|
79
|
+
/**
|
|
80
|
+
* For a nested table, where this column snaps onto the parent's grid. The
|
|
81
|
+
* parent's columns form snap points where `select` occupies `[0, 1]`, data
|
|
82
|
+
* column `k` occupies `[k + 1, k + 2]` and `actions` occupies `[N + 1, N + 2]`.
|
|
83
|
+
*
|
|
84
|
+
* - A single number is a start snap point that takes one parent track, e.g.
|
|
85
|
+
* `2` → `[2, 3]`. It may skip ahead (`5` jumps straight to the sixth track),
|
|
86
|
+
* and the next column resumes from where it ends.
|
|
87
|
+
* - A `[start, end]` pair snaps between two points; the width is the sum of
|
|
88
|
+
* the fractional parent tracks it covers, so `[3, 4.5]` is the full fourth
|
|
89
|
+
* track plus half of the fifth. `end` of `-1` runs to the end of the data
|
|
90
|
+
* region.
|
|
91
|
+
*
|
|
92
|
+
* When omitted the column chains from the previous column's end to the next
|
|
93
|
+
* whole snap point (a one-to-one inheritance by index).
|
|
94
|
+
*/
|
|
95
|
+
snap?: number | [start: number, end: number];
|
|
74
96
|
};
|
|
75
97
|
export type BbTableProps<Item = any> = {
|
|
76
98
|
/**
|
|
@@ -90,6 +112,16 @@ export type BbTableProps<Item = any> = {
|
|
|
90
112
|
* Text alignment of the columns.
|
|
91
113
|
*/
|
|
92
114
|
align?: 'left' | 'center' | 'right';
|
|
115
|
+
/**
|
|
116
|
+
* Stable id for this table's width context. When omitted a unique id is
|
|
117
|
+
* generated. Nested tables use the nearest ancestor id to inherit widths.
|
|
118
|
+
*/
|
|
119
|
+
id?: string;
|
|
120
|
+
/**
|
|
121
|
+
* When `true` (the default) unfrozen columns inherit their width from the
|
|
122
|
+
* parent table's matching track, accounting for `select`/`actions` columns.
|
|
123
|
+
*/
|
|
124
|
+
inheritColumnWidths?: boolean;
|
|
93
125
|
/**
|
|
94
126
|
* Boolean that defines whether to display a "Select all" checkbox.
|
|
95
127
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* A single table's entry in the shared width registry.
|
|
4
|
+
*
|
|
5
|
+
* `tracks` is keyed, not indexed, so structural columns participate too:
|
|
6
|
+
* `'select'`, the data-column index (`'0'`, `'1'`, …) and `'actions'`.
|
|
7
|
+
*/
|
|
8
|
+
export interface TableWidthNode {
|
|
9
|
+
id: string;
|
|
10
|
+
parentId: string | null;
|
|
11
|
+
/** Measured track widths as CSS lengths, keyed by track id. */
|
|
12
|
+
tracks: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export type TableWidthRegistry = Map<string, TableWidthNode>;
|
|
15
|
+
export interface UseTableWidthContextOptions {
|
|
16
|
+
/** Explicit table id. When omitted a stable unique id is generated. */
|
|
17
|
+
id?: MaybeRefOrGetter<string | undefined>;
|
|
18
|
+
/** This table's container element; used to find the parent table in the DOM. */
|
|
19
|
+
container: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useTableWidthContext(options: UseTableWidthContextOptions): {
|
|
22
|
+
id: import('vue').ComputedRef<string>;
|
|
23
|
+
parentId: import('vue').Ref<string | null, string | null>;
|
|
24
|
+
parentNode: import('vue').ComputedRef<TableWidthNode | null>;
|
|
25
|
+
parentHasTrack: (key: string) => boolean;
|
|
26
|
+
parentVar: (key: string, fallback?: string) => string;
|
|
27
|
+
node: {
|
|
28
|
+
id: string;
|
|
29
|
+
parentId: string | null;
|
|
30
|
+
tracks: Record<string, string>;
|
|
31
|
+
};
|
|
32
|
+
registry: TableWidthRegistry;
|
|
33
|
+
setTracks: (tracks: Record<string, string>) => void;
|
|
34
|
+
cssVars: import('vue').ComputedRef<Record<string, string>>;
|
|
35
|
+
};
|