@shtabapp/ui-kit 1.88.1 → 1.89.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/CHANGELOG.md +17 -0
- package/dist/components/STable/STable.types.d.ts +2 -3
- package/dist/components/STable/STable.types.d.ts.map +1 -1
- package/dist/components/STable/STable.vue.d.ts.map +1 -1
- package/dist/components/STable/STable.vue_vue_type_script_setup_true_lang.cjs +29 -14
- package/dist/components/STable/STable.vue_vue_type_script_setup_true_lang.js +30 -15
- package/dist/components/STable/parts/STableContentRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableContentRow.vue_vue_type_script_setup_true_lang.cjs +2 -0
- package/dist/components/STable/parts/STableContentRow.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableGroupRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableGroupRow.vue_vue_type_script_setup_true_lang.cjs +16 -6
- package/dist/components/STable/parts/STableGroupRow.vue_vue_type_script_setup_true_lang.js +16 -6
- package/dist/components/STable/parts/STablePlaceholderRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STablePlaceholderRow.vue_vue_type_script_setup_true_lang.cjs +6 -1
- package/dist/components/STable/parts/STablePlaceholderRow.vue_vue_type_script_setup_true_lang.js +6 -1
- package/dist/components/STable/parts/STableRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableRow.vue_vue_type_script_setup_true_lang.cjs +19 -9
- package/dist/components/STable/parts/STableRow.vue_vue_type_script_setup_true_lang.js +19 -9
- package/dist/components/STable/parts/STableSkeletonRow.vue.d.ts +2 -0
- package/dist/components/STable/parts/STableSkeletonRow.vue.d.ts.map +1 -1
- package/dist/components/STable/parts/STableSkeletonRow.vue_vue_type_script_setup_true_lang.cjs +21 -11
- package/dist/components/STable/parts/STableSkeletonRow.vue_vue_type_script_setup_true_lang.js +21 -11
- package/dist/components/STable/utils/useTableCellPlans.cjs +38 -7
- package/dist/components/STable/utils/useTableCellPlans.d.ts +1 -0
- package/dist/components/STable/utils/useTableCellPlans.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableCellPlans.js +39 -8
- package/dist/components/STable/utils/useTableColumnResize.cjs +2 -2
- package/dist/components/STable/utils/useTableColumnResize.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableColumnResize.js +2 -2
- package/dist/components/STable/utils/useTableColumns.cjs +14 -7
- package/dist/components/STable/utils/useTableColumns.d.ts +8 -1
- package/dist/components/STable/utils/useTableColumns.d.ts.map +1 -1
- package/dist/components/STable/utils/useTableColumns.js +14 -7
- package/dist/components/STable/utils/useTableContentWidths.cjs +63 -0
- package/dist/components/STable/utils/useTableContentWidths.d.ts +24 -0
- package/dist/components/STable/utils/useTableContentWidths.d.ts.map +1 -0
- package/dist/components/STable/utils/useTableContentWidths.js +63 -0
- package/dist/uikit-components.css +1 -1
- package/package.json +1 -1
package/dist/components/STable/parts/STablePlaceholderRow.vue_vue_type_script_setup_true_lang.cjs
CHANGED
|
@@ -6,7 +6,11 @@ var _hoisted_2 = {
|
|
|
6
6
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
7
7
|
role: "presentation"
|
|
8
8
|
};
|
|
9
|
-
var _hoisted_3 = [
|
|
9
|
+
var _hoisted_3 = [
|
|
10
|
+
"colspan",
|
|
11
|
+
"data-column-key",
|
|
12
|
+
"data-row-key"
|
|
13
|
+
];
|
|
10
14
|
var _hoisted_4 = {
|
|
11
15
|
key: 0,
|
|
12
16
|
class: "s-ui-table__cell-body"
|
|
@@ -42,6 +46,7 @@ var STablePlaceholderRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
42
46
|
key: 1,
|
|
43
47
|
class: (0, vue.normalizeClass)(cell.cellPlan.cellClass),
|
|
44
48
|
style: (0, vue.normalizeStyle)(cell.cellPlan.style),
|
|
49
|
+
colspan: cell.cellPlan.colspan,
|
|
45
50
|
"data-column-key": cell.cellPlan.descriptor.key,
|
|
46
51
|
"data-row-key": __props.rowKey
|
|
47
52
|
}, [!cell.cellPlan.descriptor.service ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4, [..._cache[0] || (_cache[0] = [(0, vue.createElementVNode)("span", { class: "s-ui-table__placeholder-bar" }, null, -1)])])) : (0, vue.createCommentVNode)("", true)], 14, _hoisted_3))], 64);
|
package/dist/components/STable/parts/STablePlaceholderRow.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -6,7 +6,11 @@ var _hoisted_2 = {
|
|
|
6
6
|
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
7
7
|
role: "presentation"
|
|
8
8
|
};
|
|
9
|
-
var _hoisted_3 = [
|
|
9
|
+
var _hoisted_3 = [
|
|
10
|
+
"colspan",
|
|
11
|
+
"data-column-key",
|
|
12
|
+
"data-row-key"
|
|
13
|
+
];
|
|
10
14
|
var _hoisted_4 = {
|
|
11
15
|
key: 0,
|
|
12
16
|
class: "s-ui-table__cell-body"
|
|
@@ -42,6 +46,7 @@ var STablePlaceholderRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE
|
|
|
42
46
|
key: 1,
|
|
43
47
|
class: normalizeClass(cell.cellPlan.cellClass),
|
|
44
48
|
style: normalizeStyle(cell.cellPlan.style),
|
|
49
|
+
colspan: cell.cellPlan.colspan,
|
|
45
50
|
"data-column-key": cell.cellPlan.descriptor.key,
|
|
46
51
|
"data-row-key": __props.rowKey
|
|
47
52
|
}, [!cell.cellPlan.descriptor.service ? (openBlock(), createElementBlock("div", _hoisted_4, [..._cache[0] || (_cache[0] = [createElementVNode("span", { class: "s-ui-table__placeholder-bar" }, null, -1)])])) : createCommentVNode("", true)], 14, _hoisted_3))], 64);
|
|
@@ -9,6 +9,8 @@ declare const __VLS_export: <TItem extends Record<string, unknown>>(__VLS_props:
|
|
|
9
9
|
rowExpanded?: boolean;
|
|
10
10
|
leadingPlans: readonly TSTableCellRenderPlan<TItem>[];
|
|
11
11
|
trailingPlans: readonly TSTableCellRenderPlan<TItem>[];
|
|
12
|
+
/** Филлер в теле; без него его место занимает последняя левая ячейка. */
|
|
13
|
+
filler?: boolean;
|
|
12
14
|
domId: string;
|
|
13
15
|
selected?: boolean;
|
|
14
16
|
indeterminate?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STableRow.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/parts/STableRow.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"STableRow.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/parts/STableRow.vue"],"names":[],"mappings":"AA8ZA,OAAO,EAAsB,KAAK,uBAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,KAAK,CAAA;AAI1F,OAAO,EAGL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAA;AAIxB,OAAO,EAAwB,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAI3F,QAAA,MAAM,YAAY,GAAK,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WAyjBO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB,CAAC;aAvjBjD,cAAc,CAAC,KAAK,CAAC;QAC1B,8FAA8F;kBACpF,MAAM;sBACF,OAAO;sBACP,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE;uBACtC,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE;QACtD,yEAAyE;iBAChE,OAAO;eACT,MAAM;mBACF,OAAO;wBACF,OAAO;wBACP,OAAO;iBACd,OAAO;mBACL,OAAO;oBACN,MAAM;QAClB,gFAAgF;mBACrE,eAAe;QAC1B,qFAAqF;mBAC1E,oBAAoB;wBACf,MAAM;QACtB,kFAAkF;wBAClE,aAAa;QAC7B,qDAAqD;iBAC5C,CAAC,UAAU,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,KAAK,IAAI;QACvE,iDAAiD;mBACtC,OAAO;QAClB,sCAAsC;uBACvB,QAAQ,GAAG,OAAO,GAAG,QAAQ;QAC5C,0EAA0E;sBAC5D,OAAO;QACrB,oFAAoF;4BAChE,MAAM;QAC1B,0EAA0E;sBAC5D,MAAM;QACpB,2DAA2D;yBAC1C,MAAM;QACvB,wFAAwF;mBAC7E,OAAO;;;;;;;KAkhBuE,CAAC,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC5J,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;wCA3e2B,oBAAoB,CAAC,KAAK,CAAC,KAAK,OAAO;;kBAE/D,CAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,KAAK,OAAO;yBACvC,CAAC,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,OAAO;oBACpD,CAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,KAAK,OAAO;mBAC/C,CAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,KAAK,OAAO;uBAC1C,CAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,KAAK,OAAO;;;EAye7D,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;wBACvD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -20,6 +20,7 @@ var _hoisted_1 = [
|
|
|
20
20
|
];
|
|
21
21
|
var _hoisted_2 = [
|
|
22
22
|
"id",
|
|
23
|
+
"colspan",
|
|
23
24
|
"aria-colindex",
|
|
24
25
|
"data-column-key",
|
|
25
26
|
"data-row-key",
|
|
@@ -36,8 +37,14 @@ var _hoisted_4 = {
|
|
|
36
37
|
key: 3,
|
|
37
38
|
class: "s-ui-table__cell-body-action"
|
|
38
39
|
};
|
|
39
|
-
var _hoisted_5 =
|
|
40
|
+
var _hoisted_5 = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
43
|
+
role: "presentation"
|
|
44
|
+
};
|
|
45
|
+
var _hoisted_6 = [
|
|
40
46
|
"id",
|
|
47
|
+
"colspan",
|
|
41
48
|
"aria-colindex",
|
|
42
49
|
"data-column-key",
|
|
43
50
|
"data-row-key",
|
|
@@ -46,11 +53,11 @@ var _hoisted_5 = [
|
|
|
46
53
|
"aria-readonly",
|
|
47
54
|
"tabindex"
|
|
48
55
|
];
|
|
49
|
-
var
|
|
56
|
+
var _hoisted_7 = {
|
|
50
57
|
key: 0,
|
|
51
58
|
class: "s-ui-table__right-edge"
|
|
52
59
|
};
|
|
53
|
-
var
|
|
60
|
+
var _hoisted_8 = {
|
|
54
61
|
key: 2,
|
|
55
62
|
class: "s-ui-table__cell-body-action"
|
|
56
63
|
};
|
|
@@ -65,6 +72,10 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
65
72
|
},
|
|
66
73
|
leadingPlans: {},
|
|
67
74
|
trailingPlans: {},
|
|
75
|
+
filler: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true
|
|
78
|
+
},
|
|
68
79
|
domId: {},
|
|
69
80
|
selected: {
|
|
70
81
|
type: Boolean,
|
|
@@ -252,6 +263,7 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
252
263
|
key: cellPlan.descriptor.key,
|
|
253
264
|
class: (0, vue.normalizeClass)(cellPlan.cellClass),
|
|
254
265
|
style: (0, vue.normalizeStyle)(cellPlan.style),
|
|
266
|
+
colspan: cellPlan.colspan,
|
|
255
267
|
"aria-colindex": cellPlan.descriptor.colIndex,
|
|
256
268
|
"data-column-key": cellPlan.descriptor.key,
|
|
257
269
|
"data-row-key": __props.row.key,
|
|
@@ -318,16 +330,14 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
318
330
|
(0, vue.unref)(slots)["cell-actions"] && !__props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4, [(0, vue.renderSlot)(_ctx.$slots, "cell-actions", (0, vue.mergeProps)({ ref_for: true }, buildCellSlotScope(cellPlan)))])) : (0, vue.createCommentVNode)("", true)
|
|
319
331
|
], 6))], 14, _hoisted_2);
|
|
320
332
|
}), 128)),
|
|
321
|
-
|
|
322
|
-
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
323
|
-
role: "presentation"
|
|
324
|
-
}, null, -1)),
|
|
333
|
+
__props.filler ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", _hoisted_5)) : (0, vue.createCommentVNode)("", true),
|
|
325
334
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.trailingPlans, (cellPlan) => {
|
|
326
335
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", {
|
|
327
336
|
id: buildCellId(cellPlan.descriptor.key),
|
|
328
337
|
key: cellPlan.descriptor.key,
|
|
329
338
|
class: (0, vue.normalizeClass)(cellPlan.cellClass),
|
|
330
339
|
style: (0, vue.normalizeStyle)(cellPlan.style),
|
|
340
|
+
colspan: cellPlan.colspan,
|
|
331
341
|
"aria-colindex": cellPlan.descriptor.colIndex,
|
|
332
342
|
"data-column-key": cellPlan.descriptor.key,
|
|
333
343
|
"data-row-key": __props.row.key,
|
|
@@ -335,7 +345,7 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
335
345
|
"aria-disabled": getCellAriaDisabled(cellPlan),
|
|
336
346
|
"aria-readonly": getCellAriaReadonly(cellPlan),
|
|
337
347
|
tabindex: getCellTabIndex(cellPlan.descriptor.key)
|
|
338
|
-
}, [cellPlan.descriptor.service === (0, vue.unref)(require_useTableColumns.ESTableServiceColumn).RIGHT_EDGE ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [!__props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div",
|
|
348
|
+
}, [cellPlan.descriptor.service === (0, vue.unref)(require_useTableColumns.ESTableServiceColumn).RIGHT_EDGE ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [!__props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_7, [(0, vue.renderSlot)(_ctx.$slots, "right-edge", (0, vue.mergeProps)({ ref_for: true }, buildRowSlotScope()))])) : (0, vue.createCommentVNode)("", true)], 64)) : __props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
339
349
|
key: 1,
|
|
340
350
|
class: "s-ui-table__cell-body",
|
|
341
351
|
style: (0, vue.normalizeStyle)(getCellBodyStyle(cellPlan))
|
|
@@ -350,7 +360,7 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vu
|
|
|
350
360
|
key: 1,
|
|
351
361
|
column: cellPlan.descriptor.column,
|
|
352
362
|
item: __props.row.item
|
|
353
|
-
}, null, 8, ["column", "item"])) : (0, vue.createCommentVNode)("", true), (0, vue.unref)(slots)["cell-actions"] && !__props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span",
|
|
363
|
+
}, null, 8, ["column", "item"])) : (0, vue.createCommentVNode)("", true), (0, vue.unref)(slots)["cell-actions"] && !__props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_8, [(0, vue.renderSlot)(_ctx.$slots, "cell-actions", (0, vue.mergeProps)({ ref_for: true }, buildCellSlotScope(cellPlan)))])) : (0, vue.createCommentVNode)("", true)], 6))], 14, _hoisted_6);
|
|
354
364
|
}), 128))
|
|
355
365
|
], 46, _hoisted_1);
|
|
356
366
|
};
|
|
@@ -20,6 +20,7 @@ var _hoisted_1 = [
|
|
|
20
20
|
];
|
|
21
21
|
var _hoisted_2 = [
|
|
22
22
|
"id",
|
|
23
|
+
"colspan",
|
|
23
24
|
"aria-colindex",
|
|
24
25
|
"data-column-key",
|
|
25
26
|
"data-row-key",
|
|
@@ -36,8 +37,14 @@ var _hoisted_4 = {
|
|
|
36
37
|
key: 3,
|
|
37
38
|
class: "s-ui-table__cell-body-action"
|
|
38
39
|
};
|
|
39
|
-
var _hoisted_5 =
|
|
40
|
+
var _hoisted_5 = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
43
|
+
role: "presentation"
|
|
44
|
+
};
|
|
45
|
+
var _hoisted_6 = [
|
|
40
46
|
"id",
|
|
47
|
+
"colspan",
|
|
41
48
|
"aria-colindex",
|
|
42
49
|
"data-column-key",
|
|
43
50
|
"data-row-key",
|
|
@@ -46,11 +53,11 @@ var _hoisted_5 = [
|
|
|
46
53
|
"aria-readonly",
|
|
47
54
|
"tabindex"
|
|
48
55
|
];
|
|
49
|
-
var
|
|
56
|
+
var _hoisted_7 = {
|
|
50
57
|
key: 0,
|
|
51
58
|
class: "s-ui-table__right-edge"
|
|
52
59
|
};
|
|
53
|
-
var
|
|
60
|
+
var _hoisted_8 = {
|
|
54
61
|
key: 2,
|
|
55
62
|
class: "s-ui-table__cell-body-action"
|
|
56
63
|
};
|
|
@@ -65,6 +72,10 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
65
72
|
},
|
|
66
73
|
leadingPlans: {},
|
|
67
74
|
trailingPlans: {},
|
|
75
|
+
filler: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true
|
|
78
|
+
},
|
|
68
79
|
domId: {},
|
|
69
80
|
selected: {
|
|
70
81
|
type: Boolean,
|
|
@@ -252,6 +263,7 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
252
263
|
key: cellPlan.descriptor.key,
|
|
253
264
|
class: normalizeClass(cellPlan.cellClass),
|
|
254
265
|
style: normalizeStyle(cellPlan.style),
|
|
266
|
+
colspan: cellPlan.colspan,
|
|
255
267
|
"aria-colindex": cellPlan.descriptor.colIndex,
|
|
256
268
|
"data-column-key": cellPlan.descriptor.key,
|
|
257
269
|
"data-row-key": __props.row.key,
|
|
@@ -318,16 +330,14 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
318
330
|
unref(slots)["cell-actions"] && !__props.placeholder ? (openBlock(), createElementBlock("span", _hoisted_4, [renderSlot(_ctx.$slots, "cell-actions", mergeProps({ ref_for: true }, buildCellSlotScope(cellPlan)))])) : createCommentVNode("", true)
|
|
319
331
|
], 6))], 14, _hoisted_2);
|
|
320
332
|
}), 128)),
|
|
321
|
-
|
|
322
|
-
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
323
|
-
role: "presentation"
|
|
324
|
-
}, null, -1)),
|
|
333
|
+
__props.filler ? (openBlock(), createElementBlock("td", _hoisted_5)) : createCommentVNode("", true),
|
|
325
334
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.trailingPlans, (cellPlan) => {
|
|
326
335
|
return openBlock(), createElementBlock("td", {
|
|
327
336
|
id: buildCellId(cellPlan.descriptor.key),
|
|
328
337
|
key: cellPlan.descriptor.key,
|
|
329
338
|
class: normalizeClass(cellPlan.cellClass),
|
|
330
339
|
style: normalizeStyle(cellPlan.style),
|
|
340
|
+
colspan: cellPlan.colspan,
|
|
331
341
|
"aria-colindex": cellPlan.descriptor.colIndex,
|
|
332
342
|
"data-column-key": cellPlan.descriptor.key,
|
|
333
343
|
"data-row-key": __props.row.key,
|
|
@@ -335,7 +345,7 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
335
345
|
"aria-disabled": getCellAriaDisabled(cellPlan),
|
|
336
346
|
"aria-readonly": getCellAriaReadonly(cellPlan),
|
|
337
347
|
tabindex: getCellTabIndex(cellPlan.descriptor.key)
|
|
338
|
-
}, [cellPlan.descriptor.service === unref(ESTableServiceColumn).RIGHT_EDGE ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [!__props.placeholder ? (openBlock(), createElementBlock("div",
|
|
348
|
+
}, [cellPlan.descriptor.service === unref(ESTableServiceColumn).RIGHT_EDGE ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [!__props.placeholder ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "right-edge", mergeProps({ ref_for: true }, buildRowSlotScope()))])) : createCommentVNode("", true)], 64)) : __props.placeholder ? (openBlock(), createElementBlock("div", {
|
|
339
349
|
key: 1,
|
|
340
350
|
class: "s-ui-table__cell-body",
|
|
341
351
|
style: normalizeStyle(getCellBodyStyle(cellPlan))
|
|
@@ -350,7 +360,7 @@ var STableRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
|
|
|
350
360
|
key: 1,
|
|
351
361
|
column: cellPlan.descriptor.column,
|
|
352
362
|
item: __props.row.item
|
|
353
|
-
}, null, 8, ["column", "item"])) : createCommentVNode("", true), unref(slots)["cell-actions"] && !__props.placeholder ? (openBlock(), createElementBlock("span",
|
|
363
|
+
}, null, 8, ["column", "item"])) : createCommentVNode("", true), unref(slots)["cell-actions"] && !__props.placeholder ? (openBlock(), createElementBlock("span", _hoisted_8, [renderSlot(_ctx.$slots, "cell-actions", mergeProps({ ref_for: true }, buildCellSlotScope(cellPlan)))])) : createCommentVNode("", true)], 6))], 14, _hoisted_6);
|
|
354
364
|
}), 128))
|
|
355
365
|
], 46, _hoisted_1);
|
|
356
366
|
};
|
|
@@ -3,6 +3,8 @@ declare const __VLS_export: <TItem extends Record<string, unknown>>(__VLS_props:
|
|
|
3
3
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
4
4
|
leadingPlans: readonly TSTableCellRenderPlan<TItem>[];
|
|
5
5
|
trailingPlans: readonly TSTableCellRenderPlan<TItem>[];
|
|
6
|
+
/** Филлер в теле; без него его место занимает последняя левая ячейка. */
|
|
7
|
+
filler?: boolean;
|
|
6
8
|
}> & (typeof globalThis extends {
|
|
7
9
|
__VLS_PROPS_FALLBACK: infer P;
|
|
8
10
|
} ? P : {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"STableSkeletonRow.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/parts/STableSkeletonRow.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"STableSkeletonRow.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/parts/STableSkeletonRow.vue"],"names":[],"mappings":"AA2DA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAErE,QAAA,MAAM,YAAY,GAAK,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3D,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,gBAAgB,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAClE;WAsGO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB;sBApGvC,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE;uBACtC,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE;QACtD,yEAAyE;iBAChE,OAAO;MAiGwD,GAAG,CAAC,OAAO,UAAU,SAAS;QAAE,oBAAoB,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,CAAC,GAAG,EAAE,CAAC;YAC1I,CAAC,OAAO,EAAE,EAAE,KAAK,IAAI;WACtB,GAAG;;kBAzFC,CAAC,KAAK,EAAE;YAAE,UAAU,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAA;SAAE,KAAK,OAAO;;UA2FnF,EAAE;EAEL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;wBACvD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
package/dist/components/STable/parts/STableSkeletonRow.vue_vue_type_script_setup_true_lang.cjs
CHANGED
|
@@ -5,12 +5,23 @@ var _hoisted_1 = {
|
|
|
5
5
|
class: "s-ui-table__row s-ui-table__row--skeleton",
|
|
6
6
|
"aria-hidden": "true"
|
|
7
7
|
};
|
|
8
|
-
var _hoisted_2 =
|
|
8
|
+
var _hoisted_2 = ["colspan"];
|
|
9
|
+
var _hoisted_3 = { class: "s-ui-table__cell-body" };
|
|
10
|
+
var _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
13
|
+
role: "presentation"
|
|
14
|
+
};
|
|
15
|
+
var _hoisted_5 = ["colspan"];
|
|
9
16
|
var STableSkeletonRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
10
17
|
__name: "STableSkeletonRow",
|
|
11
18
|
props: {
|
|
12
19
|
leadingPlans: {},
|
|
13
|
-
trailingPlans: {}
|
|
20
|
+
trailingPlans: {},
|
|
21
|
+
filler: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
}
|
|
14
25
|
},
|
|
15
26
|
setup(__props) {
|
|
16
27
|
return (_ctx, _cache) => {
|
|
@@ -19,25 +30,24 @@ var STableSkeletonRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
19
30
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", {
|
|
20
31
|
key: cellPlan.descriptor.key,
|
|
21
32
|
class: (0, vue.normalizeClass)(cellPlan.cellClass),
|
|
22
|
-
style: (0, vue.normalizeStyle)(cellPlan.style)
|
|
33
|
+
style: (0, vue.normalizeStyle)(cellPlan.style),
|
|
34
|
+
colspan: cellPlan.colspan
|
|
23
35
|
}, [cellPlan.descriptor.column ? (0, vue.renderSlot)(_ctx.$slots, "default", {
|
|
24
36
|
key: 0,
|
|
25
37
|
descriptor: cellPlan.descriptor
|
|
26
|
-
}, () => [(0, vue.createElementVNode)("div",
|
|
38
|
+
}, () => [(0, vue.createElementVNode)("div", _hoisted_3, [(0, vue.createVNode)((0, vue.unref)(_shtabapp_ui_kit_primitives.SSkeleton), {
|
|
27
39
|
class: "s-ui-table__skeleton",
|
|
28
40
|
type: cellPlan.descriptor.primary ? (0, vue.unref)(_shtabapp_ui_kit_primitives.ESSkeletonType).S_TABLE_ROW : (0, vue.unref)(_shtabapp_ui_kit_primitives.ESSkeletonType).S_TABLE_CELL
|
|
29
|
-
}, null, 8, ["type"])])]) : (0, vue.createCommentVNode)("", true)],
|
|
41
|
+
}, null, 8, ["type"])])]) : (0, vue.createCommentVNode)("", true)], 14, _hoisted_2);
|
|
30
42
|
}), 128)),
|
|
31
|
-
|
|
32
|
-
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
33
|
-
role: "presentation"
|
|
34
|
-
}, null, -1)),
|
|
43
|
+
__props.filler ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", _hoisted_4)) : (0, vue.createCommentVNode)("", true),
|
|
35
44
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.trailingPlans, (cellPlan) => {
|
|
36
45
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("td", {
|
|
37
46
|
key: cellPlan.descriptor.key,
|
|
38
47
|
class: (0, vue.normalizeClass)(cellPlan.cellClass),
|
|
39
|
-
style: (0, vue.normalizeStyle)(cellPlan.style)
|
|
40
|
-
|
|
48
|
+
style: (0, vue.normalizeStyle)(cellPlan.style),
|
|
49
|
+
colspan: cellPlan.colspan
|
|
50
|
+
}, null, 14, _hoisted_5);
|
|
41
51
|
}), 128))
|
|
42
52
|
]);
|
|
43
53
|
};
|
package/dist/components/STable/parts/STableSkeletonRow.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -5,12 +5,23 @@ var _hoisted_1 = {
|
|
|
5
5
|
class: "s-ui-table__row s-ui-table__row--skeleton",
|
|
6
6
|
"aria-hidden": "true"
|
|
7
7
|
};
|
|
8
|
-
var _hoisted_2 =
|
|
8
|
+
var _hoisted_2 = ["colspan"];
|
|
9
|
+
var _hoisted_3 = { class: "s-ui-table__cell-body" };
|
|
10
|
+
var _hoisted_4 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
13
|
+
role: "presentation"
|
|
14
|
+
};
|
|
15
|
+
var _hoisted_5 = ["colspan"];
|
|
9
16
|
var STableSkeletonRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
10
17
|
__name: "STableSkeletonRow",
|
|
11
18
|
props: {
|
|
12
19
|
leadingPlans: {},
|
|
13
|
-
trailingPlans: {}
|
|
20
|
+
trailingPlans: {},
|
|
21
|
+
filler: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
}
|
|
14
25
|
},
|
|
15
26
|
setup(__props) {
|
|
16
27
|
return (_ctx, _cache) => {
|
|
@@ -19,25 +30,24 @@ var STableSkeletonRow_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*
|
|
|
19
30
|
return openBlock(), createElementBlock("td", {
|
|
20
31
|
key: cellPlan.descriptor.key,
|
|
21
32
|
class: normalizeClass(cellPlan.cellClass),
|
|
22
|
-
style: normalizeStyle(cellPlan.style)
|
|
33
|
+
style: normalizeStyle(cellPlan.style),
|
|
34
|
+
colspan: cellPlan.colspan
|
|
23
35
|
}, [cellPlan.descriptor.column ? renderSlot(_ctx.$slots, "default", {
|
|
24
36
|
key: 0,
|
|
25
37
|
descriptor: cellPlan.descriptor
|
|
26
|
-
}, () => [createElementVNode("div",
|
|
38
|
+
}, () => [createElementVNode("div", _hoisted_3, [createVNode(unref(SSkeleton), {
|
|
27
39
|
class: "s-ui-table__skeleton",
|
|
28
40
|
type: cellPlan.descriptor.primary ? unref(ESSkeletonType).S_TABLE_ROW : unref(ESSkeletonType).S_TABLE_CELL
|
|
29
|
-
}, null, 8, ["type"])])]) : createCommentVNode("", true)],
|
|
41
|
+
}, null, 8, ["type"])])]) : createCommentVNode("", true)], 14, _hoisted_2);
|
|
30
42
|
}), 128)),
|
|
31
|
-
|
|
32
|
-
class: "s-ui-table__cell s-ui-table__filler-cell",
|
|
33
|
-
role: "presentation"
|
|
34
|
-
}, null, -1)),
|
|
43
|
+
__props.filler ? (openBlock(), createElementBlock("td", _hoisted_4)) : createCommentVNode("", true),
|
|
35
44
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.trailingPlans, (cellPlan) => {
|
|
36
45
|
return openBlock(), createElementBlock("td", {
|
|
37
46
|
key: cellPlan.descriptor.key,
|
|
38
47
|
class: normalizeClass(cellPlan.cellClass),
|
|
39
|
-
style: normalizeStyle(cellPlan.style)
|
|
40
|
-
|
|
48
|
+
style: normalizeStyle(cellPlan.style),
|
|
49
|
+
colspan: cellPlan.colspan
|
|
50
|
+
}, null, 14, _hoisted_5);
|
|
41
51
|
}), 128))
|
|
42
52
|
]);
|
|
43
53
|
};
|
|
@@ -82,11 +82,40 @@ var useTableCellPlans = ({ columnDescriptors, hasTreeStructure, expandColumnKey,
|
|
|
82
82
|
chevron: isExpandColumn(descriptor)
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Колонка управления колонками живёт только в шапке: в теле её ячейки не рисуются, место
|
|
87
|
+
* под кнопкой занимает последняя ячейка строки. Без других правых колонок это последняя
|
|
88
|
+
* левая ячейка — она растягивается и на филлер, иначе пустая ячейка у края строки липла
|
|
89
|
+
* бы поверх контента или торчала полосой; с правыми — последняя из них, прижатая к краю.
|
|
90
|
+
*/
|
|
91
|
+
const hasColumnsManager = (0, vue.computed)(() => {
|
|
92
|
+
return trailingDescriptors.value[trailingDescriptors.value.length - 1]?.service === require_useTableColumns.ESTableServiceColumn.COLUMNS_MANAGER;
|
|
93
|
+
});
|
|
94
|
+
const bodyTrailingDescriptors = (0, vue.computed)(() => {
|
|
95
|
+
return hasColumnsManager.value ? trailingDescriptors.value.slice(0, -1) : trailingDescriptors.value;
|
|
96
|
+
});
|
|
97
|
+
/** Филлер в теле есть, пока его место не забрала последняя левая ячейка. */
|
|
98
|
+
const bodyFiller = (0, vue.computed)(() => {
|
|
99
|
+
return !hasColumnsManager.value || bodyTrailingDescriptors.value.length > 0;
|
|
100
|
+
});
|
|
85
101
|
const leadingCellPlans = (0, vue.computed)(() => {
|
|
86
|
-
|
|
102
|
+
const cellPlans = leadingDescriptors.value.map(buildCellRenderPlan);
|
|
103
|
+
const lastPlan = cellPlans[cellPlans.length - 1];
|
|
104
|
+
if (bodyFiller.value || !lastPlan) return cellPlans;
|
|
105
|
+
return [...cellPlans.slice(0, -1), {
|
|
106
|
+
...lastPlan,
|
|
107
|
+
colspan: 3
|
|
108
|
+
}];
|
|
87
109
|
});
|
|
88
110
|
const trailingCellPlans = (0, vue.computed)(() => {
|
|
89
|
-
|
|
111
|
+
const cellPlans = bodyTrailingDescriptors.value.map(buildCellRenderPlan);
|
|
112
|
+
const lastPlan = cellPlans[cellPlans.length - 1];
|
|
113
|
+
if (!hasColumnsManager.value || !lastPlan) return cellPlans;
|
|
114
|
+
return [...cellPlans.slice(0, -1), {
|
|
115
|
+
...lastPlan,
|
|
116
|
+
colspan: 2,
|
|
117
|
+
style: { right: "0px" }
|
|
118
|
+
}];
|
|
90
119
|
});
|
|
91
120
|
return {
|
|
92
121
|
leadingDescriptors,
|
|
@@ -103,15 +132,17 @@ var useTableCellPlans = ({ columnDescriptors, hasTreeStructure, expandColumnKey,
|
|
|
103
132
|
cellPlan
|
|
104
133
|
};
|
|
105
134
|
};
|
|
135
|
+
const fillerEntries = bodyFiller.value ? [{
|
|
136
|
+
key: require_tableSizes.TABLE_FILLER_COLUMN_KEY,
|
|
137
|
+
cellPlan: void 0
|
|
138
|
+
}] : [];
|
|
106
139
|
return [
|
|
107
140
|
...leadingCellPlans.value.map(describe),
|
|
108
|
-
|
|
109
|
-
key: require_tableSizes.TABLE_FILLER_COLUMN_KEY,
|
|
110
|
-
cellPlan: void 0
|
|
111
|
-
},
|
|
141
|
+
...fillerEntries,
|
|
112
142
|
...trailingCellPlans.value.map(describe)
|
|
113
143
|
];
|
|
114
|
-
})
|
|
144
|
+
}),
|
|
145
|
+
bodyFiller
|
|
115
146
|
};
|
|
116
147
|
};
|
|
117
148
|
//#endregion
|
|
@@ -46,5 +46,6 @@ export declare const useTableCellPlans: <TItem extends Record<string, unknown>>(
|
|
|
46
46
|
leadingCellPlans: ComputedRef<TSTableCellRenderPlan<TItem>[]>;
|
|
47
47
|
trailingCellPlans: ComputedRef<TSTableCellRenderPlan<TItem>[]>;
|
|
48
48
|
rowCellPlans: ComputedRef<TSTableRowCellEntry<TItem>[]>;
|
|
49
|
+
bodyFiller: ComputedRef<boolean>;
|
|
49
50
|
};
|
|
50
51
|
//# sourceMappingURL=useTableCellPlans.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableCellPlans.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableCellPlans.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAIhF,OAAO,
|
|
1
|
+
{"version":3,"file":"useTableCellPlans.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableCellPlans.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAIhF,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAA;AAQ1B,MAAM,WAAW,yBAAyB,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9E,iBAAiB,EAAE,WAAW,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAChE,uEAAuE;IACvE,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC3C,eAAe,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACrD,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CACvD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,6EAKtE,yBAAyB,CAAC,KAAK,CAAC;;;;;;;;;;qCAyBO,uBAAuB,CAAC,KAAK,CAAC;;;;;;;;;uCAgB5B,uBAAuB,CAAC,KAAK,CAAC;;;;;;;;;;;;CAsHzE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ESTableColumnAlign, ESTableColumnSticky } from "../STable.types.js";
|
|
2
2
|
import { TABLE_FILLER_COLUMN_KEY } from "../constants/tableSizes.js";
|
|
3
|
-
import { TABLE_SERVICE_COLUMN_CSS_NAME } from "./useTableColumns.js";
|
|
3
|
+
import { ESTableServiceColumn, TABLE_SERVICE_COLUMN_CSS_NAME } from "./useTableColumns.js";
|
|
4
4
|
import { computed, toValue } from "vue";
|
|
5
5
|
//#region src/components/STable/utils/useTableCellPlans.ts
|
|
6
6
|
var CELL_ALIGN_CLASS = {
|
|
@@ -82,11 +82,40 @@ var useTableCellPlans = ({ columnDescriptors, hasTreeStructure, expandColumnKey,
|
|
|
82
82
|
chevron: isExpandColumn(descriptor)
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Колонка управления колонками живёт только в шапке: в теле её ячейки не рисуются, место
|
|
87
|
+
* под кнопкой занимает последняя ячейка строки. Без других правых колонок это последняя
|
|
88
|
+
* левая ячейка — она растягивается и на филлер, иначе пустая ячейка у края строки липла
|
|
89
|
+
* бы поверх контента или торчала полосой; с правыми — последняя из них, прижатая к краю.
|
|
90
|
+
*/
|
|
91
|
+
const hasColumnsManager = computed(() => {
|
|
92
|
+
return trailingDescriptors.value[trailingDescriptors.value.length - 1]?.service === ESTableServiceColumn.COLUMNS_MANAGER;
|
|
93
|
+
});
|
|
94
|
+
const bodyTrailingDescriptors = computed(() => {
|
|
95
|
+
return hasColumnsManager.value ? trailingDescriptors.value.slice(0, -1) : trailingDescriptors.value;
|
|
96
|
+
});
|
|
97
|
+
/** Филлер в теле есть, пока его место не забрала последняя левая ячейка. */
|
|
98
|
+
const bodyFiller = computed(() => {
|
|
99
|
+
return !hasColumnsManager.value || bodyTrailingDescriptors.value.length > 0;
|
|
100
|
+
});
|
|
85
101
|
const leadingCellPlans = computed(() => {
|
|
86
|
-
|
|
102
|
+
const cellPlans = leadingDescriptors.value.map(buildCellRenderPlan);
|
|
103
|
+
const lastPlan = cellPlans[cellPlans.length - 1];
|
|
104
|
+
if (bodyFiller.value || !lastPlan) return cellPlans;
|
|
105
|
+
return [...cellPlans.slice(0, -1), {
|
|
106
|
+
...lastPlan,
|
|
107
|
+
colspan: 3
|
|
108
|
+
}];
|
|
87
109
|
});
|
|
88
110
|
const trailingCellPlans = computed(() => {
|
|
89
|
-
|
|
111
|
+
const cellPlans = bodyTrailingDescriptors.value.map(buildCellRenderPlan);
|
|
112
|
+
const lastPlan = cellPlans[cellPlans.length - 1];
|
|
113
|
+
if (!hasColumnsManager.value || !lastPlan) return cellPlans;
|
|
114
|
+
return [...cellPlans.slice(0, -1), {
|
|
115
|
+
...lastPlan,
|
|
116
|
+
colspan: 2,
|
|
117
|
+
style: { right: "0px" }
|
|
118
|
+
}];
|
|
90
119
|
});
|
|
91
120
|
return {
|
|
92
121
|
leadingDescriptors,
|
|
@@ -103,15 +132,17 @@ var useTableCellPlans = ({ columnDescriptors, hasTreeStructure, expandColumnKey,
|
|
|
103
132
|
cellPlan
|
|
104
133
|
};
|
|
105
134
|
};
|
|
135
|
+
const fillerEntries = bodyFiller.value ? [{
|
|
136
|
+
key: TABLE_FILLER_COLUMN_KEY,
|
|
137
|
+
cellPlan: void 0
|
|
138
|
+
}] : [];
|
|
106
139
|
return [
|
|
107
140
|
...leadingCellPlans.value.map(describe),
|
|
108
|
-
|
|
109
|
-
key: TABLE_FILLER_COLUMN_KEY,
|
|
110
|
-
cellPlan: void 0
|
|
111
|
-
},
|
|
141
|
+
...fillerEntries,
|
|
112
142
|
...trailingCellPlans.value.map(describe)
|
|
113
143
|
];
|
|
114
|
-
})
|
|
144
|
+
}),
|
|
145
|
+
bodyFiller
|
|
115
146
|
};
|
|
116
147
|
};
|
|
117
148
|
//#endregion
|
|
@@ -13,8 +13,8 @@ var useTableColumnResize = ({ tableRootElement, scrollElement, columnDescriptors
|
|
|
13
13
|
return resizeSession.value?.columnKey;
|
|
14
14
|
});
|
|
15
15
|
const clampColumnWidth = (descriptor, nextWidth) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
16
|
+
const clampedMax = descriptor.maxWidth ? Math.min(descriptor.maxWidth, nextWidth) : nextWidth;
|
|
17
|
+
return Math.max(descriptor.minWidth, clampedMax);
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Live-запись ширины жеста и кумулятивных sticky-офсетов, без vdom.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableColumnResize.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableColumnResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAS/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAEhE,MAAM,WAAW,4BAA4B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjF,gBAAgB,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACzC,aAAa,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACtC,iBAAiB,EAAE,WAAW,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAChE,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAAA;IACrD,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAClC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvD,yEAAyE;IACzE,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B;AAUD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,4GAQzE,4BAA4B,CAAC,KAAK,CAAC;;
|
|
1
|
+
{"version":3,"file":"useTableColumnResize.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableColumnResize.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAS/F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAEhE,MAAM,WAAW,4BAA4B,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjF,gBAAgB,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACzC,aAAa,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACtC,iBAAiB,EAAE,WAAW,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;IAChE,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAAA;IACrD,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAClC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvD,yEAAyE;IACzE,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B;AAUD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,4GAQzE,4BAA4B,CAAC,KAAK,CAAC;;2CAkGU,YAAY,aAAa,MAAM;uCA+EnC,aAAa,aAAa,MAAM;4CAwB3B,MAAM;CAyCtD,CAAA"}
|
|
@@ -13,8 +13,8 @@ var useTableColumnResize = ({ tableRootElement, scrollElement, columnDescriptors
|
|
|
13
13
|
return resizeSession.value?.columnKey;
|
|
14
14
|
});
|
|
15
15
|
const clampColumnWidth = (descriptor, nextWidth) => {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
16
|
+
const clampedMax = descriptor.maxWidth ? Math.min(descriptor.maxWidth, nextWidth) : nextWidth;
|
|
17
|
+
return Math.max(descriptor.minWidth, clampedMax);
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Live-запись ширины жеста и кумулятивных sticky-офсетов, без vdom.
|
|
@@ -110,7 +110,7 @@ var distributeTableColumnWidths = (descriptors, viewportWidth) => {
|
|
|
110
110
|
} : descriptor;
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
|
-
var useTableColumns = ({ columns, columnOrder, columnWidths, hiddenColumns, hasIndicator, hasCheckbox, hasRightEdge, hasColumnsManager, columnsManagerWidth = 32, columnsResizable, columnsDraggable, viewportWidth }) => {
|
|
113
|
+
var useTableColumns = ({ columns, columnOrder, columnWidths, hiddenColumns, hasIndicator, hasCheckbox, hasRightEdge, hasColumnsManager, columnsManagerWidth = 32, columnsResizable, columnsDraggable, viewportWidth, contentWidths }) => {
|
|
114
114
|
const primaryColumnKey = (0, vue.computed)(() => {
|
|
115
115
|
const sourceColumns = (0, vue.toValue)(columns);
|
|
116
116
|
return sourceColumns.find((tableColumn) => tableColumn.primary)?.key ?? sourceColumns[0]?.key;
|
|
@@ -163,21 +163,27 @@ var useTableColumns = ({ columns, columnOrder, columnWidths, hiddenColumns, hasI
|
|
|
163
163
|
* Базовая ширина: модель (ресайз/автофит) → `width` конфига → дефолт. Колонка без явной
|
|
164
164
|
* ширины гибкая — заполняет свободную ширину вьюпорта; sticky-right всегда фиксированные.
|
|
165
165
|
*/
|
|
166
|
-
const resolveColumnBaseWidth = (tableColumn, isPrimaryColumn) => {
|
|
166
|
+
const resolveColumnBaseWidth = (tableColumn, isPrimaryColumn, minWidth) => {
|
|
167
167
|
const modelWidth = columnWidths.value?.[tableColumn.key];
|
|
168
168
|
if (modelWidth) return {
|
|
169
|
-
baseWidth: modelWidth,
|
|
169
|
+
baseWidth: Math.max(minWidth, modelWidth),
|
|
170
170
|
flexible: false
|
|
171
171
|
};
|
|
172
172
|
if (tableColumn.width) return {
|
|
173
|
-
baseWidth: tableColumn.width,
|
|
173
|
+
baseWidth: Math.max(minWidth, tableColumn.width),
|
|
174
174
|
flexible: false
|
|
175
175
|
};
|
|
176
176
|
return {
|
|
177
|
-
baseWidth: resolveDefaultColumnWidth(isPrimaryColumn),
|
|
177
|
+
baseWidth: Math.max(minWidth, resolveDefaultColumnWidth(isPrimaryColumn)),
|
|
178
178
|
flexible: tableColumn.sticky !== require_STable_types.ESTableColumnSticky.RIGHT
|
|
179
179
|
};
|
|
180
180
|
};
|
|
181
|
+
/** Нижняя граница ширины: `minWidth` конфига и замеренный несжимаемый контент ячеек. */
|
|
182
|
+
const resolveColumnMinWidth = (tableColumn) => {
|
|
183
|
+
const configMinWidth = tableColumn.minWidth ?? 60;
|
|
184
|
+
const contentWidth = contentWidths?.value[tableColumn.key] ?? 0;
|
|
185
|
+
return Math.max(configMinWidth, contentWidth);
|
|
186
|
+
};
|
|
181
187
|
/** Правые служебные колонки: right-edge, затем крайняя колонка управления колонками. */
|
|
182
188
|
const pushTrailingServiceColumns = (pushServiceColumn) => {
|
|
183
189
|
if ((0, vue.toValue)(hasRightEdge)) pushServiceColumn("rightEdge", 40);
|
|
@@ -220,14 +226,15 @@ var useTableColumns = ({ columns, columnOrder, columnWidths, hiddenColumns, hasI
|
|
|
220
226
|
const isPrimaryColumn = tableColumn.key === primaryColumnKey.value;
|
|
221
227
|
const isLeadingColumn = Boolean(tableColumn.leading) && !isPrimaryColumn;
|
|
222
228
|
const sticky = isPrimaryColumn || isLeadingColumn ? require_STable_types.ESTableColumnSticky.LEFT : tableColumn.sticky;
|
|
223
|
-
const
|
|
229
|
+
const minWidth = resolveColumnMinWidth(tableColumn);
|
|
230
|
+
const { baseWidth, flexible } = resolveColumnBaseWidth(tableColumn, isPrimaryColumn, minWidth);
|
|
224
231
|
descriptors.push({
|
|
225
232
|
key: tableColumn.key,
|
|
226
233
|
column: tableColumn,
|
|
227
234
|
width: baseWidth,
|
|
228
235
|
baseWidth,
|
|
229
236
|
flexible,
|
|
230
|
-
minWidth
|
|
237
|
+
minWidth,
|
|
231
238
|
maxWidth: tableColumn.maxWidth,
|
|
232
239
|
sticky,
|
|
233
240
|
align: tableColumn.align ?? require_STable_types.ESTableColumnAlign.LEFT,
|