@shtabapp/ui-kit 1.88.2 → 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.
Files changed (35) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/components/STable/STable.types.d.ts +2 -3
  3. package/dist/components/STable/STable.types.d.ts.map +1 -1
  4. package/dist/components/STable/STable.vue.d.ts.map +1 -1
  5. package/dist/components/STable/STable.vue_vue_type_script_setup_true_lang.cjs +23 -13
  6. package/dist/components/STable/STable.vue_vue_type_script_setup_true_lang.js +23 -13
  7. package/dist/components/STable/parts/STableContentRow.vue.d.ts.map +1 -1
  8. package/dist/components/STable/parts/STableContentRow.vue_vue_type_script_setup_true_lang.cjs +2 -0
  9. package/dist/components/STable/parts/STableContentRow.vue_vue_type_script_setup_true_lang.js +2 -0
  10. package/dist/components/STable/parts/STableGroupRow.vue.d.ts +2 -0
  11. package/dist/components/STable/parts/STableGroupRow.vue.d.ts.map +1 -1
  12. package/dist/components/STable/parts/STableGroupRow.vue_vue_type_script_setup_true_lang.cjs +16 -6
  13. package/dist/components/STable/parts/STableGroupRow.vue_vue_type_script_setup_true_lang.js +16 -6
  14. package/dist/components/STable/parts/STablePlaceholderRow.vue.d.ts.map +1 -1
  15. package/dist/components/STable/parts/STablePlaceholderRow.vue_vue_type_script_setup_true_lang.cjs +6 -1
  16. package/dist/components/STable/parts/STablePlaceholderRow.vue_vue_type_script_setup_true_lang.js +6 -1
  17. package/dist/components/STable/parts/STableRow.vue.d.ts +2 -0
  18. package/dist/components/STable/parts/STableRow.vue.d.ts.map +1 -1
  19. package/dist/components/STable/parts/STableRow.vue_vue_type_script_setup_true_lang.cjs +19 -9
  20. package/dist/components/STable/parts/STableRow.vue_vue_type_script_setup_true_lang.js +19 -9
  21. package/dist/components/STable/parts/STableSkeletonRow.vue.d.ts +2 -0
  22. package/dist/components/STable/parts/STableSkeletonRow.vue.d.ts.map +1 -1
  23. package/dist/components/STable/parts/STableSkeletonRow.vue_vue_type_script_setup_true_lang.cjs +21 -11
  24. package/dist/components/STable/parts/STableSkeletonRow.vue_vue_type_script_setup_true_lang.js +21 -11
  25. package/dist/components/STable/utils/useTableCellPlans.cjs +38 -7
  26. package/dist/components/STable/utils/useTableCellPlans.d.ts +1 -0
  27. package/dist/components/STable/utils/useTableCellPlans.d.ts.map +1 -1
  28. package/dist/components/STable/utils/useTableCellPlans.js +39 -8
  29. package/dist/components/STable/utils/useTableColumns.d.ts +2 -0
  30. package/dist/components/STable/utils/useTableColumns.d.ts.map +1 -1
  31. package/dist/components/STable/utils/useTableContentWidths.cjs +3 -1
  32. package/dist/components/STable/utils/useTableContentWidths.d.ts.map +1 -1
  33. package/dist/components/STable/utils/useTableContentWidths.js +3 -1
  34. package/dist/uikit-components.css +1 -1
  35. package/package.json +1 -1
@@ -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 _hoisted_6 = {
56
+ var _hoisted_7 = {
50
57
  key: 0,
51
58
  class: "s-ui-table__right-edge"
52
59
  };
53
- var _hoisted_7 = {
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
- _cache[6] || (_cache[6] = (0, vue.createElementVNode)("td", {
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", _hoisted_6, [(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", {
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", _hoisted_7, [(0, vue.renderSlot)(_ctx.$slots, "cell-actions", (0, vue.mergeProps)({ ref_for: true }, buildCellSlotScope(cellPlan)))])) : (0, vue.createCommentVNode)("", true)], 6))], 14, _hoisted_5);
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 _hoisted_6 = {
56
+ var _hoisted_7 = {
50
57
  key: 0,
51
58
  class: "s-ui-table__right-edge"
52
59
  };
53
- var _hoisted_7 = {
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
- _cache[6] || (_cache[6] = createElementVNode("td", {
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", _hoisted_6, [renderSlot(_ctx.$slots, "right-edge", mergeProps({ ref_for: true }, buildRowSlotScope()))])) : createCommentVNode("", true)], 64)) : __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", _hoisted_7, [renderSlot(_ctx.$slots, "cell-actions", mergeProps({ ref_for: true }, buildCellSlotScope(cellPlan)))])) : createCommentVNode("", true)], 6))], 14, _hoisted_5);
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":"AAmDA,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;WA4FO,OAAO,KAAK,EAAE,WAAW,GAAG,mBAAmB;sBA1FvC,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE;uBACtC,SAAS,qBAAqB,CAAC,KAAK,CAAC,EAAE;MAyFkB,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;;kBArFC,CAAC,KAAK,EAAE;YAAE,UAAU,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,YAAY,CA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AAG,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"}
@@ -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 = { class: "s-ui-table__cell-body" };
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", _hoisted_2, [(0, vue.createVNode)((0, vue.unref)(_shtabapp_ui_kit_primitives.SSkeleton), {
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)], 6);
41
+ }, null, 8, ["type"])])]) : (0, vue.createCommentVNode)("", true)], 14, _hoisted_2);
30
42
  }), 128)),
31
- _cache[0] || (_cache[0] = (0, vue.createElementVNode)("td", {
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
- }, null, 6);
48
+ style: (0, vue.normalizeStyle)(cellPlan.style),
49
+ colspan: cellPlan.colspan
50
+ }, null, 14, _hoisted_5);
41
51
  }), 128))
42
52
  ]);
43
53
  };
@@ -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 = { class: "s-ui-table__cell-body" };
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", _hoisted_2, [createVNode(unref(SSkeleton), {
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)], 6);
41
+ }, null, 8, ["type"])])]) : createCommentVNode("", true)], 14, _hoisted_2);
30
42
  }), 128)),
31
- _cache[0] || (_cache[0] = createElementVNode("td", {
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
- }, null, 6);
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
- return leadingDescriptors.value.map(buildCellRenderPlan);
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
- return trailingDescriptors.value.map(buildCellRenderPlan);
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,EAEL,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;;;;;;;;;;;CA2EzE,CAAA"}
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
- return leadingDescriptors.value.map(buildCellRenderPlan);
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
- return trailingDescriptors.value.map(buildCellRenderPlan);
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
@@ -52,6 +52,8 @@ export type TSTableCellRenderPlan<TItem extends Record<string, unknown> = Record
52
52
  right?: string;
53
53
  '--s-ui-table-cell-inline-offset'?: string;
54
54
  };
55
+ /** Ячейка тела занимает и место колонки управления колонками (а без правых колонок — филлера). */
56
+ colspan?: number;
55
57
  /** В этой колонке рисуются шеврон дерева и отступ уровня. */
56
58
  chevron: boolean;
57
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableColumns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAExE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAW7F,oBAAY,oBAAoB;IAC9B,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,UAAU,cAAc;IACxB,oEAAoE;IACpE,eAAe,mBAAmB;CACnC;AAED,2DAA2D;AAC3D,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAK9E,CAAA;AAcD,MAAM,MAAM,uBAAuB,CACjC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAC7D;IACF,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IAC7B,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAA;IACjB,8EAA8E;IAC9E,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAA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,YAAY,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACvC,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACtC,YAAY,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACvC,+EAA+E;IAC/E,iBAAiB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC5C,qBAAqB;IACrB,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAC9C,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC3C,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC3C,gGAAgG;IAChG,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAC5C;AA6ID,eAAO,MAAM,eAAe,GAAI,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,2MAcpE,uBAAuB,CAAC,KAAK,CAAC;;;;;;;;CA4RhC,CAAA"}
@@ -32,7 +32,9 @@ var useTableContentWidths = ({ scrollElement }) => {
32
32
  if (!(cellBody instanceof HTMLElement) || !cell || !columnKey) return;
33
33
  const overflow = cellBody.scrollWidth - cellBody.clientWidth;
34
34
  if (overflow <= 0 || cell.matches(":hover, :focus-within")) return;
35
- const neededWidth = Math.min(640, Math.ceil(cell.offsetWidth + overflow));
35
+ const headerCell = container.querySelector(`thead th[data-column-key="${CSS.escape(columnKey)}"]`);
36
+ const columnWidth = headerCell instanceof HTMLElement ? headerCell.offsetWidth : cell.offsetWidth;
37
+ const neededWidth = Math.min(640, Math.ceil(columnWidth + overflow));
36
38
  if (neededWidth > (nextWidths[columnKey] ?? contentWidths.value[columnKey] ?? 0)) nextWidths[columnKey] = neededWidth;
37
39
  });
38
40
  if (Object.keys(nextWidths).length > 0) contentWidths.value = {
@@ -1 +1 @@
1
- {"version":3,"file":"useTableContentWidths.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableContentWidths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAKzD,MAAM,WAAW,6BAA6B;IAC5C,aAAa,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;CAChE;AAMD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,GAAI,mBAAmB,6BAA6B;;;CAgErF,CAAA"}
1
+ {"version":3,"file":"useTableContentWidths.d.ts","sourceRoot":"","sources":["../../../../src/components/STable/utils/useTableContentWidths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAKzD,MAAM,WAAW,6BAA6B;IAC5C,aAAa,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;CAChE;AAMD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,GAAI,mBAAmB,6BAA6B;;;CAsErF,CAAA"}
@@ -32,7 +32,9 @@ var useTableContentWidths = ({ scrollElement }) => {
32
32
  if (!(cellBody instanceof HTMLElement) || !cell || !columnKey) return;
33
33
  const overflow = cellBody.scrollWidth - cellBody.clientWidth;
34
34
  if (overflow <= 0 || cell.matches(":hover, :focus-within")) return;
35
- const neededWidth = Math.min(640, Math.ceil(cell.offsetWidth + overflow));
35
+ const headerCell = container.querySelector(`thead th[data-column-key="${CSS.escape(columnKey)}"]`);
36
+ const columnWidth = headerCell instanceof HTMLElement ? headerCell.offsetWidth : cell.offsetWidth;
37
+ const neededWidth = Math.min(640, Math.ceil(columnWidth + overflow));
36
38
  if (neededWidth > (nextWidths[columnKey] ?? contentWidths.value[columnKey] ?? 0)) nextWidths[columnKey] = neededWidth;
37
39
  });
38
40
  if (Object.keys(nextWidths).length > 0) contentWidths.value = {