bitboss-ui 2.1.130 → 2.1.131
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 +33 -82
- package/dist/index.css +1 -1
- package/dist/index109.js +9 -9
- package/dist/index110.js +18 -18
- package/dist/index118.js +1 -1
- package/dist/index124.js +3 -3
- package/dist/index126.js +310 -323
- package/dist/index134.js +1 -1
- package/dist/index136.js +4 -4
- package/dist/index138.js +1 -1
- package/dist/index14.js +1 -1
- package/dist/index142.js +2 -2
- package/dist/index146.js +1 -1
- package/dist/index148.js +2 -2
- package/dist/index150.js +1 -1
- package/dist/index16.js +3 -3
- package/dist/index18.js +3 -3
- package/dist/index20.js +9 -9
- package/dist/index22.js +14 -14
- package/dist/index224.js +2 -138
- package/dist/index225.js +138 -2
- package/dist/index226.js +2 -2
- package/dist/index227.js +1 -1
- package/dist/index228.js +1 -1
- package/dist/index229.js +3 -32
- package/dist/index230.js +12 -27
- package/dist/index231.js +375 -0
- package/dist/index233.js +160 -2
- package/dist/index235.js +25 -13
- package/dist/index236.js +2 -86
- package/dist/index237.js +4 -0
- package/dist/index238.js +2 -30
- package/dist/index239.js +6 -17
- package/dist/index24.js +10 -10
- package/dist/index240.js +2 -17
- package/dist/index241.js +7 -51
- package/dist/index242.js +3 -18
- package/dist/index243.js +34 -3
- package/dist/index244.js +5 -12
- package/dist/index245.js +4 -4
- package/dist/index246.js +4 -4
- package/dist/index247.js +4 -4
- package/dist/index248.js +4 -4
- package/dist/index249.js +5 -5
- package/dist/index250.js +3 -5
- package/dist/index251.js +8 -3
- package/dist/index252.js +3 -8
- package/dist/index253.js +16 -158
- package/dist/index254.js +14 -0
- package/dist/index255.js +51 -5
- package/dist/index256.js +18 -2
- package/dist/index257.js +12 -6
- package/dist/index258.js +17 -268
- package/dist/index259.js +30 -52
- package/dist/index26.js +3 -3
- package/dist/index260.js +18 -52
- package/dist/index261.js +4 -32
- package/dist/index262.js +100 -54
- package/dist/index264.js +94 -367
- package/dist/index266.js +107 -4
- package/dist/index267.js +12 -6
- package/dist/index268.js +11 -2
- package/dist/index269.js +9 -12
- package/dist/index270.js +2 -12
- package/dist/index271.js +3 -9
- package/dist/index272.js +86 -23
- package/dist/index274.js +9 -3
- package/dist/index275.js +23 -11
- package/dist/index276.js +22 -33
- package/dist/index277.js +13 -3
- package/dist/index278.js +7 -25
- package/dist/index279.js +8 -3
- package/dist/index28.js +1 -1
- package/dist/index280.js +5 -20
- package/dist/index281.js +2 -9
- package/dist/index282.js +186 -42
- package/dist/index283.js +3 -53
- package/dist/index284.js +32 -17
- package/dist/index285.js +28 -12
- package/dist/index287.js +11 -0
- package/dist/index288.js +44 -100
- package/dist/index289.js +55 -0
- package/dist/index290.js +2 -107
- package/dist/index291.js +5 -9
- package/dist/index292.js +6 -6
- package/dist/index293.js +266 -14
- package/dist/index294.js +52 -5
- package/dist/index295.js +52 -188
- package/dist/index296.js +32 -3
- package/dist/index297.js +59 -20
- package/dist/index298.js +3 -6
- package/dist/index299.js +20 -66
- package/dist/index30.js +3 -3
- package/dist/index300.js +67 -3
- package/dist/index301.js +6 -10
- package/dist/index302.js +4 -3
- package/dist/index303.js +20 -2
- package/dist/index304.js +6 -7
- package/dist/index305.js +16 -7
- package/dist/index306.js +4 -3
- package/dist/index307.js +7 -17
- package/dist/index308.js +3 -28
- package/dist/index309.js +4 -4
- package/dist/index310.js +2 -7
- package/dist/index312.js +6 -3
- package/dist/index313.js +5 -0
- package/dist/index314.js +280 -7
- package/dist/index315.js +2 -3
- package/dist/index316.js +125 -3
- package/dist/index317.js +2 -3
- package/dist/index318.js +13 -278
- package/dist/index319.js +2 -2
- package/dist/index32.js +2 -2
- package/dist/index324.js +17 -25
- package/dist/index326.js +3 -2
- package/dist/index327.js +3 -2
- package/dist/index328.js +17 -2
- package/dist/index329.js +28 -2
- package/dist/index330.js +3 -2
- package/dist/index331.js +3 -125
- package/dist/index332.js +2 -2
- package/dist/index333.js +4 -15
- package/dist/index334.js +5 -2
- package/dist/index335.js +25 -17
- package/dist/index337.js +2 -3
- package/dist/index338.js +2 -3
- package/dist/index339.js +1 -1
- package/dist/index34.js +8 -8
- package/dist/index340.js +2 -4
- package/dist/index341.js +2 -719
- package/dist/index342.js +2 -366
- package/dist/index343.js +719 -57
- package/dist/index344.js +366 -6
- package/dist/index345.js +57 -2
- package/dist/index348.js +221 -86
- package/dist/index349.js +6 -5
- package/dist/index350.js +34 -6
- package/dist/index351.js +128 -17
- package/dist/index352.js +397 -7
- package/dist/index353.js +90 -12
- package/dist/index354.js +200 -5
- package/dist/index355.js +259 -7
- package/dist/index356.js +6 -34
- package/dist/index357.js +17 -128
- package/dist/index358.js +7 -397
- package/dist/index359.js +14 -199
- package/dist/index36.js +4 -4
- package/dist/index360.js +5 -259
- package/dist/index361.js +7 -22
- package/dist/index362.js +136 -0
- package/dist/index363.js +21 -133
- package/dist/index365.js +1 -1
- package/dist/index366.js +2 -228
- package/dist/index370.js +1 -1
- package/dist/index38.js +21 -21
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +8 -8
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index60.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index68.js +1 -1
- package/dist/index74.js +4 -4
- package/dist/index82.js +6 -6
- package/dist/index84.js +1 -1
- package/dist/index86.js +2 -2
- package/dist/index88.js +3 -3
- package/dist/index90.js +1 -1
- package/dist/index93.js +3 -3
- package/dist/index95.js +2 -2
- package/dist/index97.js +5 -5
- package/dist/index99.js +1 -1
- package/package.json +1 -1
- package/dist/index232.js +0 -4
- package/dist/index234.js +0 -4
- package/dist/index263.js +0 -6
- package/dist/index273.js +0 -25
- package/dist/index286.js +0 -108
- package/dist/index311.js +0 -4
- package/dist/index364.js +0 -4
package/dist/ai/BbTable.md
CHANGED
|
@@ -31,11 +31,7 @@
|
|
|
31
31
|
<col
|
|
32
32
|
v-for="track in columnTracks"
|
|
33
33
|
:key="track.key"
|
|
34
|
-
:style="{
|
|
35
|
-
width: track.width,
|
|
36
|
-
minWidth: track.locked ? track.width : undefined,
|
|
37
|
-
maxWidth: track.locked ? track.width : undefined,
|
|
38
|
-
}"
|
|
34
|
+
:style="{ width: track.width }"
|
|
39
35
|
/>
|
|
40
36
|
</colgroup>
|
|
41
37
|
<thead>
|
|
@@ -570,29 +566,6 @@ const toLength = (width: number | string) => {
|
|
|
570
566
|
return /^-?\d*\.?\d+$/.test(trimmed) ? `${trimmed}px` : trimmed;
|
|
571
567
|
};
|
|
572
568
|
|
|
573
|
-
/**
|
|
574
|
-
* Resolves a CSS length to px in the context of `host`.
|
|
575
|
-
* Returns `null` when the value cannot be resolved reliably.
|
|
576
|
-
*/
|
|
577
|
-
const resolveLengthToPx = (
|
|
578
|
-
width: number | string,
|
|
579
|
-
host: HTMLElement
|
|
580
|
-
): number | null => {
|
|
581
|
-
const length = toLength(width);
|
|
582
|
-
if (/^-?\d*\.?\d+px$/.test(length)) return parseFloat(length);
|
|
583
|
-
|
|
584
|
-
const probe = document.createElement('div');
|
|
585
|
-
probe.style.position = 'absolute';
|
|
586
|
-
probe.style.visibility = 'hidden';
|
|
587
|
-
probe.style.pointerEvents = 'none';
|
|
588
|
-
probe.style.width = length;
|
|
589
|
-
host.appendChild(probe);
|
|
590
|
-
const px = probe.getBoundingClientRect().width;
|
|
591
|
-
host.removeChild(probe);
|
|
592
|
-
|
|
593
|
-
return Number.isFinite(px) && px > 0 ? px : null;
|
|
594
|
-
};
|
|
595
|
-
|
|
596
569
|
/** Number of data columns the parent renders (numeric track keys). */
|
|
597
570
|
const parentDataColumns = computed(() => {
|
|
598
571
|
const tracks = parentNode.value?.tracks;
|
|
@@ -803,10 +776,10 @@ const columnTracks = computed(() => {
|
|
|
803
776
|
fixedLayout.value && structuralFit[key]
|
|
804
777
|
? (structuralFit[key] as string)
|
|
805
778
|
: sync(key);
|
|
806
|
-
const tracks: { key: string; width: string
|
|
779
|
+
const tracks: { key: string; width: string }[] = [];
|
|
807
780
|
|
|
808
781
|
if (props.selectable) {
|
|
809
|
-
tracks.push({ key: 'select', width: structural('select')
|
|
782
|
+
tracks.push({ key: 'select', width: structural('select') });
|
|
810
783
|
}
|
|
811
784
|
|
|
812
785
|
const lastIndex = props.columns.length - 1;
|
|
@@ -820,7 +793,7 @@ const columnTracks = computed(() => {
|
|
|
820
793
|
// track plus the folded edge region plus any deficit. Skipped when the
|
|
821
794
|
// table overflows: there is no leftover then, and it must content-size.
|
|
822
795
|
if (index === fillColumnIndex.value && !overflowsParent.value) {
|
|
823
|
-
tracks.push({ key, width: 'auto'
|
|
796
|
+
tracks.push({ key, width: 'auto' });
|
|
824
797
|
return;
|
|
825
798
|
}
|
|
826
799
|
|
|
@@ -855,11 +828,11 @@ const columnTracks = computed(() => {
|
|
|
855
828
|
? `calc(${[...offsets, span ?? '0px'].join(' + ')})`
|
|
856
829
|
: (span ?? 'auto');
|
|
857
830
|
|
|
858
|
-
tracks.push({ key, width
|
|
831
|
+
tracks.push({ key, width });
|
|
859
832
|
});
|
|
860
833
|
|
|
861
834
|
if (props.actions) {
|
|
862
|
-
tracks.push({ key: 'actions', width: structural('actions')
|
|
835
|
+
tracks.push({ key: 'actions', width: structural('actions') });
|
|
863
836
|
}
|
|
864
837
|
|
|
865
838
|
return tracks;
|
|
@@ -931,19 +904,27 @@ const measureStructuralFit = () => {
|
|
|
931
904
|
const fit = (selector: string) => {
|
|
932
905
|
let max = 0;
|
|
933
906
|
table.querySelectorAll<HTMLElement>(selector).forEach((cell) => {
|
|
934
|
-
//
|
|
935
|
-
// actions cell holds several side-by-side controls
|
|
936
|
-
//
|
|
937
|
-
//
|
|
938
|
-
//
|
|
939
|
-
|
|
940
|
-
|
|
907
|
+
// Sum each child's own intrinsic width (plus horizontal margins) — an
|
|
908
|
+
// actions cell holds several side-by-side controls and the column must
|
|
909
|
+
// fit them all. Crucially this is *not* their shared extent: the extent
|
|
910
|
+
// depends on how the cell spreads them across its width, which feeds the
|
|
911
|
+
// column width back into its own measurement and runs away into the
|
|
912
|
+
// thousands. A child's own width does not depend on the cell, so this
|
|
913
|
+
// converges. Out-of-flow children (e.g. an `sr-only` label parked far
|
|
914
|
+
// off-screen) are skipped so they cannot inflate the result.
|
|
915
|
+
let content = 0;
|
|
941
916
|
cell.querySelectorAll<HTMLElement>(':scope > *').forEach((child) => {
|
|
942
|
-
const
|
|
943
|
-
|
|
944
|
-
|
|
917
|
+
const childStyle = getComputedStyle(child);
|
|
918
|
+
if (
|
|
919
|
+
childStyle.position === 'absolute' ||
|
|
920
|
+
childStyle.position === 'fixed'
|
|
921
|
+
)
|
|
922
|
+
return;
|
|
923
|
+
const margin =
|
|
924
|
+
parseFloat(childStyle.marginLeft) +
|
|
925
|
+
parseFloat(childStyle.marginRight);
|
|
926
|
+
content += child.getBoundingClientRect().width + (margin || 0);
|
|
945
927
|
});
|
|
946
|
-
const content = right > left ? right - left : 0;
|
|
947
928
|
const style = getComputedStyle(cell);
|
|
948
929
|
const padding =
|
|
949
930
|
parseFloat(style.paddingLeft) + parseFloat(style.paddingRight);
|
|
@@ -1016,19 +997,6 @@ const fillValue = ref(0);
|
|
|
1016
997
|
*/
|
|
1017
998
|
const naturalTotalWidth = ref<string | null>(null);
|
|
1018
999
|
|
|
1019
|
-
/**
|
|
1020
|
-
* Width budget for probe distribution. Prefer the immediate parent's visible
|
|
1021
|
-
* width (the scroll viewport) over this table's own offset width so a
|
|
1022
|
-
* max-content growth loop in ancestors cannot recursively inflate probe output.
|
|
1023
|
-
*/
|
|
1024
|
-
const probeViewportWidth = (container: HTMLElement): number => {
|
|
1025
|
-
const parentWidth = container.parentElement?.clientWidth ?? 0;
|
|
1026
|
-
const selfWidth = container.clientWidth || container.getBoundingClientRect().width;
|
|
1027
|
-
const fallback = container.offsetWidth;
|
|
1028
|
-
const width = parentWidth || selfWidth || fallback;
|
|
1029
|
-
return Number.isFinite(width) && width > 0 ? width : 0;
|
|
1030
|
-
};
|
|
1031
|
-
|
|
1032
1000
|
const runNaturalWidthProbe = () => {
|
|
1033
1001
|
const container = containerRef.value;
|
|
1034
1002
|
if (!container || !fixedLayout.value) return;
|
|
@@ -1041,8 +1009,7 @@ const runNaturalWidthProbe = () => {
|
|
|
1041
1009
|
)
|
|
1042
1010
|
return;
|
|
1043
1011
|
|
|
1044
|
-
const containerWidth =
|
|
1045
|
-
if (containerWidth <= 0) return;
|
|
1012
|
+
const containerWidth = container.offsetWidth;
|
|
1046
1013
|
const dataOffset = props.selectable ? 1 : 0;
|
|
1047
1014
|
|
|
1048
1015
|
// ── Real-table measurements ────────────────────────────────────────────
|
|
@@ -1054,21 +1021,17 @@ const runNaturalWidthProbe = () => {
|
|
|
1054
1021
|
? parseFloat(structuralFit.actions)
|
|
1055
1022
|
: 0;
|
|
1056
1023
|
|
|
1057
|
-
// Live rendered widths from the fixed-layout table.
|
|
1058
|
-
//
|
|
1059
|
-
//
|
|
1060
|
-
// `
|
|
1061
|
-
//
|
|
1024
|
+
// Live rendered widths from the fixed-layout table. `frozenTotal` (declared
|
|
1025
|
+
// widths) feeds the stable min-width floor; `nonFlexTotal` (frozen + inherited)
|
|
1026
|
+
// is what the flex columns share the remainder of. The inherited part is only
|
|
1027
|
+
// used for that `available` figure — never fed back into min-width, since those
|
|
1028
|
+
// widths stretch with the table and would otherwise lock min-width above
|
|
1029
|
+
// max-content and force a spurious uniform stretch on every column.
|
|
1062
1030
|
const realThs = headerCells();
|
|
1063
1031
|
let frozenTotal = 0;
|
|
1064
1032
|
let nonFlexTotal = 0;
|
|
1065
1033
|
props.columns.forEach((col, i) => {
|
|
1066
|
-
const
|
|
1067
|
-
realThs[dataOffset + i]?.getBoundingClientRect().width ?? 0;
|
|
1068
|
-
const declaredFrozenWidth =
|
|
1069
|
-
col.width != null ? resolveLengthToPx(col.width, container) : null;
|
|
1070
|
-
const width = declaredFrozenWidth ?? renderedWidth;
|
|
1071
|
-
|
|
1034
|
+
const width = realThs[dataOffset + i]?.getBoundingClientRect().width ?? 0;
|
|
1072
1035
|
if (col.width != null) frozenTotal += width;
|
|
1073
1036
|
if (!isFlexColumn(i)) nonFlexTotal += width;
|
|
1074
1037
|
});
|
|
@@ -2171,22 +2134,10 @@ export type BbTableSlots<Item = any> = {
|
|
|
2171
2134
|
width: 100%;
|
|
2172
2135
|
|
|
2173
2136
|
thead {
|
|
2174
|
-
th {
|
|
2175
|
-
box-sizing: border-box;
|
|
2176
|
-
min-width: 0;
|
|
2177
|
-
}
|
|
2178
|
-
|
|
2179
2137
|
.bb-table-header--actions {
|
|
2180
2138
|
width: auto;
|
|
2181
2139
|
}
|
|
2182
2140
|
}
|
|
2183
|
-
|
|
2184
|
-
tbody {
|
|
2185
|
-
td {
|
|
2186
|
-
box-sizing: border-box;
|
|
2187
|
-
min-width: 0;
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
2141
|
}
|
|
2191
2142
|
}
|
|
2192
2143
|
|