@leaflink/stash 53.4.4 → 53.4.6
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/Copy.js +1 -1
- package/dist/DataTable/index.js +2400 -0
- package/dist/DataTable/index.js.map +1 -0
- package/dist/MoreActions.js +1 -1
- package/dist/Table.js +180 -100
- package/dist/Table.js.map +1 -1
- package/dist/Table.vue.d.ts +12 -0
- package/dist/TableCell.js +18 -18
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +44 -38
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +10 -0
- package/dist/TableHeaderRow.js +33 -33
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +82 -74
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +9 -2
- package/dist/Tooltip.js +1 -1
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-WMPMxzO-.js → Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js} +2 -2
- package/dist/{Tooltip.vue_vue_type_script_setup_true_lang-WMPMxzO-.js.map → Tooltip.vue_vue_type_script_setup_true_lang-CFpM7Ldj.js.map} +1 -1
- package/dist/components.css +1 -1
- package/dist/index-DA70nQCT.js +424 -0
- package/dist/{index-B1Gkwuxd.js.map → index-DA70nQCT.js.map} +1 -1
- package/dist/useSortable.js +1 -1
- package/package.json +7 -1
- package/types/tanstack-vue-table.d.ts +18 -0
- package/dist/index-B1Gkwuxd.js +0 -277
package/dist/TableHeaderCell.js
CHANGED
|
@@ -1,72 +1,78 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as k, useCssModule as D, inject as h, computed as s, createElementBlock as b, openBlock as c, normalizeClass as n, unref as e, createElementVNode as T, renderSlot as g, createCommentVNode as d, createBlock as x } from "vue";
|
|
2
2
|
import "lodash-es/cloneDeep";
|
|
3
3
|
import "./Module.keys-DcqBbvvT.js";
|
|
4
4
|
import "lodash-es/get";
|
|
5
|
-
import
|
|
6
|
-
import { D as
|
|
5
|
+
import w from "./Icon.js";
|
|
6
|
+
import { D as y } from "./DataView.keys-aSOnA4AD.js";
|
|
7
7
|
import "./Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js";
|
|
8
8
|
import "lodash-es/uniqueId";
|
|
9
9
|
import "@leaflink/snitch";
|
|
10
|
-
import { T as
|
|
11
|
-
import { _ as
|
|
10
|
+
import { T as E } from "./Table.keys-LHQf6FEH.js";
|
|
11
|
+
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const A = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "relative h-4 w-3"
|
|
15
|
-
}, B = /* @__PURE__ */
|
|
15
|
+
}, B = /* @__PURE__ */ k({
|
|
16
16
|
__name: "TableHeaderCell",
|
|
17
17
|
props: {
|
|
18
|
-
sortId: { default: "" }
|
|
18
|
+
sortId: { default: "" },
|
|
19
|
+
schemaDrivenHeader: { default: void 0 }
|
|
19
20
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
21
|
+
setup(I) {
|
|
22
|
+
const r = I, t = D(), m = h(E.key);
|
|
23
|
+
if (!m)
|
|
23
24
|
throw new Error("TableHeaderCell must be used within a Table component");
|
|
24
|
-
const { density:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
),
|
|
28
|
-
function
|
|
29
|
-
|
|
25
|
+
const { density: p, hasActions: C } = m, a = s(() => !!r.schemaDrivenHeader), { currentSortId: H, currentSortOrder: v, updateCurrentSort: _ } = h(
|
|
26
|
+
y.key,
|
|
27
|
+
y.defaults
|
|
28
|
+
), l = s(() => a.value ? r.schemaDrivenHeader.column.getCanSort() : !!r.sortId), o = s(() => a.value ? !!r.schemaDrivenHeader.column.getIsSorted() : H.value === r.sortId), f = s(() => a.value ? r.schemaDrivenHeader.column.getIsSorted() : o.value && v.value ? v.value : !1);
|
|
29
|
+
function S(i) {
|
|
30
|
+
var u;
|
|
31
|
+
if (a.value) {
|
|
32
|
+
(u = r.schemaDrivenHeader.column.getToggleSortingHandler()) == null || u(i);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
l.value && typeof _ == "function" && _(r.sortId, { shouldEmit: !0 });
|
|
30
36
|
}
|
|
31
|
-
return (
|
|
32
|
-
class:
|
|
37
|
+
return (i, u) => (c(), b("th", {
|
|
38
|
+
class: n(["stash-table-header-cell border-b border-r border-ice-200 p-3 text-xs font-medium text-ice-900", [
|
|
33
39
|
e(t).root,
|
|
34
40
|
{
|
|
35
41
|
"bg-white": !o.value,
|
|
36
42
|
"stash-table-header-cell--sorted bg-blue-100": o.value,
|
|
37
|
-
[e(t)["root--density-compact"]]: e(
|
|
38
|
-
[e(t)["root--density-comfortable"]]: e(
|
|
39
|
-
[e(t)["has-actions"]]: e(
|
|
40
|
-
"cursor-pointer":
|
|
43
|
+
[e(t)["root--density-compact"]]: e(p) === "compact",
|
|
44
|
+
[e(t)["root--density-comfortable"]]: e(p) === "comfortable",
|
|
45
|
+
[e(t)["has-actions"]]: e(C),
|
|
46
|
+
"cursor-pointer": l.value
|
|
41
47
|
}
|
|
42
48
|
]]),
|
|
43
49
|
"data-test": "stash-table-header-cell",
|
|
44
|
-
onClick:
|
|
50
|
+
onClick: S
|
|
45
51
|
}, [
|
|
46
52
|
T("div", {
|
|
47
|
-
class:
|
|
53
|
+
class: n(["flex justify-between", e(t)["content-wrapper"]])
|
|
48
54
|
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
!o.value ||
|
|
55
|
+
g(i.$slots, "default"),
|
|
56
|
+
l.value ? (c(), b("div", A, [
|
|
57
|
+
!o.value || f.value === "asc" ? (c(), x(w, {
|
|
52
58
|
key: 0,
|
|
53
|
-
class:
|
|
59
|
+
class: n(["absolute text-ice-700", [e(t).caret, e(t)["caret-up"]]]),
|
|
54
60
|
"data-test": "icon|caret-up",
|
|
55
61
|
name: "caret-up",
|
|
56
62
|
size: "dense"
|
|
57
|
-
}, null, 8, ["class"])) :
|
|
58
|
-
!o.value ||
|
|
63
|
+
}, null, 8, ["class"])) : d("", !0),
|
|
64
|
+
!o.value || f.value === "desc" ? (c(), x(w, {
|
|
59
65
|
key: 1,
|
|
60
|
-
class:
|
|
66
|
+
class: n(["absolute text-ice-700", [e(t).caret, e(t)["caret-down"]]]),
|
|
61
67
|
"data-test": "icon|caret-down",
|
|
62
68
|
name: "caret-down",
|
|
63
69
|
size: "dense"
|
|
64
|
-
}, null, 8, ["class"])) :
|
|
65
|
-
])) :
|
|
70
|
+
}, null, 8, ["class"])) : d("", !0)
|
|
71
|
+
])) : d("", !0)
|
|
66
72
|
], 2)
|
|
67
73
|
], 2));
|
|
68
74
|
}
|
|
69
|
-
}), j = "_root_1xv85_5", z = "_caret_1xv85_21",
|
|
75
|
+
}), j = "_root_1xv85_5", z = "_caret_1xv85_21", M = {
|
|
70
76
|
root: j,
|
|
71
77
|
"has-actions": "_has-actions_1xv85_17",
|
|
72
78
|
"content-wrapper": "_content-wrapper_1xv85_17",
|
|
@@ -74,10 +80,10 @@ const A = {
|
|
|
74
80
|
"caret-down": "_caret-down_1xv85_25",
|
|
75
81
|
caret: z,
|
|
76
82
|
"root--density-comfortable": "_root--density-comfortable_1xv85_34"
|
|
77
|
-
},
|
|
78
|
-
$style:
|
|
79
|
-
},
|
|
83
|
+
}, O = {
|
|
84
|
+
$style: M
|
|
85
|
+
}, Q = /* @__PURE__ */ N(B, [["__cssModules", O]]);
|
|
80
86
|
export {
|
|
81
|
-
|
|
87
|
+
Q as default
|
|
82
88
|
};
|
|
83
89
|
//# sourceMappingURL=TableHeaderCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderCell.js","sources":["../src/components/TableHeaderCell/TableHeaderCell.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, inject, useCssModule } from 'vue';\n\n import { DATA_VIEW_INJECTION, SortValueDeserialized } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { TABLE_INJECTION } from '../Table/Table.vue';\n\n export interface TableHeaderCellProps {\n /**\n * A unique value correlated to the data in this header's column (without a leading hyphen/dash).\n * For example: `'product_name'` (with no leading dash/hyphen).\n */\n sortId?: SortValueDeserialized['id'];\n }\n\n const props = withDefaults(defineProps<TableHeaderCellProps>(), {\n sortId: '',\n });\n const classes = useCssModule();\n\n const tableInjection = inject(TABLE_INJECTION.key);\n if (!tableInjection) {\n throw new Error('TableHeaderCell must be used within a Table component');\n }\n\n const { density, hasActions } = tableInjection;\n\n // #region sorting\n const { currentSortId, currentSortOrder, updateCurrentSort } = inject(\n DATA_VIEW_INJECTION.key,\n DATA_VIEW_INJECTION.defaults,\n );\n const isSortable = computed(() => !!props.sortId);\n const isActiveSort = computed(() => currentSortId.value === props.sortId);\n\n function onRootClick() {\n if (isSortable.value && typeof updateCurrentSort === 'function') {\n updateCurrentSort(props.sortId, { shouldEmit: true });\n }\n }\n // #endregion sorting\n</script>\n\n<template>\n <th\n class=\"stash-table-header-cell border-b border-r border-ice-200 p-3 text-xs font-medium text-ice-900\"\n :class=\"[\n classes.root,\n {\n 'bg-white': !isActiveSort,\n 'stash-table-header-cell--sorted bg-blue-100': isActiveSort,\n [classes['root--density-compact']]: density === 'compact',\n [classes['root--density-comfortable']]: density === 'comfortable',\n [classes['has-actions']]: hasActions,\n 'cursor-pointer': isSortable,\n },\n ]\"\n data-test=\"stash-table-header-cell\"\n @click=\"onRootClick\"\n >\n <div class=\"flex justify-between\" :class=\"classes['content-wrapper']\">\n <!-- @slot default -->\n <slot></slot>\n <div v-if=\"isSortable\" class=\"relative h-4 w-3\">\n <Icon\n v-if=\"!isActiveSort ||
|
|
1
|
+
{"version":3,"file":"TableHeaderCell.js","sources":["../src/components/TableHeaderCell/TableHeaderCell.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import type { Header } from '@tanstack/vue-table';\n import { computed, inject, useCssModule } from 'vue';\n\n import { DATA_VIEW_INJECTION, SortValueDeserialized } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { TABLE_INJECTION } from '../Table/Table.vue';\n\n export interface TableHeaderCellProps {\n /**\n * A unique value correlated to the data in this header's column (without a leading hyphen/dash).\n * For example: `'product_name'` (with no leading dash/hyphen).\n */\n sortId?: SortValueDeserialized['id'];\n\n /**\n * TanStack header instance passed when Table is in schema-driven mode.\n * When provided, sorting is controlled by TanStack instead of DataView.\n * Typed as any so DataTable can pass Header<TData, unknown> without a type assertion.\n */\n schemaDrivenHeader?: Header<any, any>;\n }\n\n const props = withDefaults(defineProps<TableHeaderCellProps>(), {\n sortId: '',\n schemaDrivenHeader: undefined,\n });\n const classes = useCssModule();\n\n const tableInjection = inject(TABLE_INJECTION.key);\n if (!tableInjection) {\n throw new Error('TableHeaderCell must be used within a Table component');\n }\n\n const { density, hasActions } = tableInjection;\n\n const hasSchemaDrivenHeader = computed(() => !!props.schemaDrivenHeader);\n\n // #region sorting\n const { currentSortId, currentSortOrder, updateCurrentSort } = inject(\n DATA_VIEW_INJECTION.key,\n DATA_VIEW_INJECTION.defaults,\n );\n\n const isSortable = computed(() => {\n if (hasSchemaDrivenHeader.value) {\n return props.schemaDrivenHeader!.column.getCanSort();\n }\n return !!props.sortId;\n });\n\n const isActiveSort = computed(() => {\n if (hasSchemaDrivenHeader.value) {\n return !!props.schemaDrivenHeader!.column.getIsSorted();\n }\n return currentSortId.value === props.sortId;\n });\n\n const sortDirection = computed<'asc' | 'desc' | false>(() => {\n if (hasSchemaDrivenHeader.value) {\n return props.schemaDrivenHeader!.column.getIsSorted();\n }\n if (isActiveSort.value && currentSortOrder.value) {\n return currentSortOrder.value;\n }\n return false;\n });\n\n function onRootClick(event: MouseEvent) {\n if (hasSchemaDrivenHeader.value) {\n props.schemaDrivenHeader!.column.getToggleSortingHandler()?.(event);\n return;\n }\n\n if (isSortable.value && typeof updateCurrentSort === 'function') {\n updateCurrentSort(props.sortId, { shouldEmit: true });\n }\n }\n // #endregion sorting\n</script>\n\n<template>\n <th\n class=\"stash-table-header-cell border-b border-r border-ice-200 p-3 text-xs font-medium text-ice-900\"\n :class=\"[\n classes.root,\n {\n 'bg-white': !isActiveSort,\n 'stash-table-header-cell--sorted bg-blue-100': isActiveSort,\n [classes['root--density-compact']]: density === 'compact',\n [classes['root--density-comfortable']]: density === 'comfortable',\n [classes['has-actions']]: hasActions,\n 'cursor-pointer': isSortable,\n },\n ]\"\n data-test=\"stash-table-header-cell\"\n @click=\"onRootClick\"\n >\n <div class=\"flex justify-between\" :class=\"classes['content-wrapper']\">\n <!-- @slot default -->\n <slot></slot>\n <div v-if=\"isSortable\" class=\"relative h-4 w-3\">\n <Icon\n v-if=\"!isActiveSort || sortDirection === 'asc'\"\n class=\"absolute text-ice-700\"\n :class=\"[classes.caret, classes['caret-up']]\"\n data-test=\"icon|caret-up\"\n name=\"caret-up\"\n size=\"dense\"\n />\n <Icon\n v-if=\"!isActiveSort || sortDirection === 'desc'\"\n class=\"absolute text-ice-700\"\n :class=\"[classes.caret, classes['caret-down']]\"\n data-test=\"icon|caret-down\"\n name=\"caret-down\"\n size=\"dense\"\n />\n </div>\n </div>\n </th>\n</template>\n\n<style module>\n @reference \"../../../styles/main.css\";\n\n @layer utilities {\n .root {\n border-left: none;\n border-top: none;\n position: sticky;\n top: 0;\n z-index: 1;\n }\n\n .root:last-of-type {\n border-right: 0;\n }\n\n .has-actions:last-of-type .content-wrapper {\n justify-content: flex-end !important;\n }\n\n .caret-up {\n top: -5px;\n }\n\n .caret-down {\n top: 2px;\n }\n\n :global(.stash-table-header-cell--sorted) .caret {\n top: -2px; /* vertically center the caret icon */\n }\n\n @media (width >= theme(--breakpoint-lg)) {\n .root--density-comfortable:last-of-type {\n padding-right: 24px;\n }\n\n .root--density-comfortable:first-of-type:not(\n :global(.stash-table-header-row__selection-cell),\n :global(.stash-table-row__selection-cell)\n ) {\n padding-left: 24px;\n }\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","tableInjection","inject","TABLE_INJECTION","density","hasActions","hasSchemaDrivenHeader","computed","currentSortId","currentSortOrder","updateCurrentSort","DATA_VIEW_INJECTION","isSortable","isActiveSort","sortDirection","onRootClick","event","_a","_createElementBlock","_unref","_createElementVNode","_normalizeClass","_renderSlot","_ctx","_openBlock","_hoisted_1","_createBlock","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBE,UAAMA,IAAQC,GAIRC,IAAUC,EAAA,GAEVC,IAAiBC,EAAOC,EAAgB,GAAG;AACjD,QAAI,CAACF;AACH,YAAM,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,SAAAG,GAAS,YAAAC,EAAA,IAAeJ,GAE1BK,IAAwBC,EAAS,MAAM,CAAC,CAACV,EAAM,kBAAkB,GAGjE,EAAE,eAAAW,GAAe,kBAAAC,GAAkB,mBAAAC,EAAA,IAAsBR;AAAA,MAC7DS,EAAoB;AAAA,MACpBA,EAAoB;AAAA,IAAA,GAGhBC,IAAaL,EAAS,MACtBD,EAAsB,QACjBT,EAAM,mBAAoB,OAAO,WAAA,IAEnC,CAAC,CAACA,EAAM,MAChB,GAEKgB,IAAeN,EAAS,MACxBD,EAAsB,QACjB,CAAC,CAACT,EAAM,mBAAoB,OAAO,YAAA,IAErCW,EAAc,UAAUX,EAAM,MACtC,GAEKiB,IAAgBP,EAAiC,MACjDD,EAAsB,QACjBT,EAAM,mBAAoB,OAAO,YAAA,IAEtCgB,EAAa,SAASJ,EAAiB,QAClCA,EAAiB,QAEnB,EACR;AAED,aAASM,EAAYC,GAAmB;;AACtC,UAAIV,EAAsB,OAAO;AAC/B,SAAAW,IAAApB,EAAM,mBAAoB,OAAO,wBAAA,MAAjC,QAAAoB,EAA6DD;AAC7D;AAAA,MACF;AAEA,MAAIJ,EAAW,SAAS,OAAOF,KAAsB,cACnDA,EAAkBb,EAAM,QAAQ,EAAE,YAAY,IAAM;AAAA,IAExD;2BAKAqB,EAsCK,MAAA;AAAA,MArCH,UAAM,iGAA+F;AAAA,QACrFC,EAAApB,CAAA,EAAQ;AAAA;uBAAmCc,EAAA;AAAA,yDAAqEA,EAAA;AAAA,UAAuB,CAAAM,EAAApB,CAAA,6BAAmCoB,EAAAf,CAAA,MAAO;AAAA,UAAyB,CAAAe,EAAApB,CAAA,iCAAuCoB,EAAAf,CAAA,MAAO;AAAA,UAA6B,CAAAe,EAAApB,CAAA,mBAAyBoB,EAAAd,CAAA;AAAA,4BAAsCO,EAAA;AAAA,QAAA;AAAA;MAWpW,aAAU;AAAA,MACT,SAAOG;AAAA,IAAA;MAERK,EAqBM,OAAA;AAAA,QArBD,OAAKC,EAAA,CAAC,wBAA+BF,EAAApB,CAAA,EAAO,iBAAA,CAAA,CAAA;AAAA,MAAA;QAE/CuB,EAAaC,EAAA,QAAA,SAAA;AAAA,QACFX,EAAA,SAAXY,EAAA,GAAAN,EAiBM,OAjBNO,GAiBM;AAAA,UAfK,CAAAZ,EAAA,SAAgBC,EAAA,UAAa,cADtCY,EAOEC,GAAA;AAAA;YALA,UAAM,yBAAuB,CACpBR,KAAQ,OAAOA,EAAApB,CAAA,EAAO,UAAA,CAAA,CAAA,CAAA;AAAA,YAC/B,aAAU;AAAA,YACV,MAAK;AAAA,YACL,MAAK;AAAA,UAAA;UAGE,CAAAc,EAAA,SAAgBC,EAAA,UAAa,eADtCY,EAOEC,GAAA;AAAA;YALA,UAAM,yBAAuB,CACpBR,KAAQ,OAAOA,EAAApB,CAAA,EAAO,YAAA,CAAA,CAAA,CAAA;AAAA,YAC/B,aAAU;AAAA,YACV,MAAK;AAAA,YACL,MAAK;AAAA,UAAA;;;;;;;;;;;;;;;;"}
|
|
@@ -2,6 +2,7 @@ import { ComponentOptionsMixin } from 'vue';
|
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
4
|
import { ExtractPropTypes } from 'vue';
|
|
5
|
+
import { Header } from '@tanstack/vue-table';
|
|
5
6
|
import { PropType } from 'vue';
|
|
6
7
|
import { PublicProps } from 'vue';
|
|
7
8
|
|
|
@@ -34,10 +35,13 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
34
35
|
|
|
35
36
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TableHeaderCellProps>, {
|
|
36
37
|
sortId: string;
|
|
38
|
+
schemaDrivenHeader: undefined;
|
|
37
39
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TableHeaderCellProps>, {
|
|
38
40
|
sortId: string;
|
|
41
|
+
schemaDrivenHeader: undefined;
|
|
39
42
|
}>>> & Readonly<{}>, {
|
|
40
43
|
sortId: string;
|
|
44
|
+
schemaDrivenHeader: Header<any, any>;
|
|
41
45
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
42
46
|
default?(_: {}): any;
|
|
43
47
|
}>;
|
|
@@ -67,6 +71,12 @@ export declare interface TableHeaderCellProps {
|
|
|
67
71
|
* For example: `'product_name'` (with no leading dash/hyphen).
|
|
68
72
|
*/
|
|
69
73
|
sortId?: SortValueDeserialized['id'];
|
|
74
|
+
/**
|
|
75
|
+
* TanStack header instance passed when Table is in schema-driven mode.
|
|
76
|
+
* When provided, sorting is controlled by TanStack instead of DataView.
|
|
77
|
+
* Typed as any so DataTable can pass Header<TData, unknown> without a type assertion.
|
|
78
|
+
*/
|
|
79
|
+
schemaDrivenHeader?: Header<any, any>;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
export { }
|
package/dist/TableHeaderRow.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
3
|
-
import
|
|
4
|
-
import { D as
|
|
1
|
+
import { defineComponent as C, inject as h, computed as E, ref as R, createElementBlock as x, openBlock as l, createBlock as o, createCommentVNode as s, renderSlot as B, unref as e, normalizeClass as a, withCtx as I } from "vue";
|
|
2
|
+
import { t as S } from "./locale.js";
|
|
3
|
+
import $ from "./Checkbox.js";
|
|
4
|
+
import { D as f } from "./DataView.keys-aSOnA4AD.js";
|
|
5
|
+
import "lodash-es/uniqueId";
|
|
5
6
|
import "lodash-es/cloneDeep";
|
|
6
7
|
import "./Module.keys-DcqBbvvT.js";
|
|
7
|
-
import "lodash-es/uniqueId";
|
|
8
8
|
import "./Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js";
|
|
9
|
-
import { T as
|
|
10
|
-
import
|
|
11
|
-
import { _ as
|
|
12
|
-
const
|
|
9
|
+
import { T as v } from "./Table.keys-LHQf6FEH.js";
|
|
10
|
+
import i from "./TableHeaderCell.js";
|
|
11
|
+
import { _ as N } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const A = {
|
|
13
13
|
class: "stash-table-header-row",
|
|
14
14
|
"data-test": "stash-table-header-row"
|
|
15
|
-
},
|
|
15
|
+
}, H = /* @__PURE__ */ C({
|
|
16
16
|
__name: "TableHeaderRow",
|
|
17
17
|
props: {
|
|
18
18
|
allRowsSelected: { type: Boolean, default: !1 },
|
|
19
19
|
someRowsSelected: { type: Boolean, default: !1 }
|
|
20
20
|
},
|
|
21
21
|
emits: ["select"],
|
|
22
|
-
setup(
|
|
23
|
-
const c =
|
|
24
|
-
if (!
|
|
22
|
+
setup(_, { emit: b }) {
|
|
23
|
+
const c = _, y = b, m = h(v.key);
|
|
24
|
+
if (!m)
|
|
25
25
|
throw new Error("TableHeaderRow must be used within a Table component");
|
|
26
|
-
const { hasCustomExpandToggle:
|
|
27
|
-
function
|
|
28
|
-
|
|
26
|
+
const { hasCustomExpandToggle: k, isSchemaDriven: r, isExpandable: T, isSelectable: n } = m, p = E(() => (n == null ? void 0 : n.value) && !(r != null && r.value)), { hasToolbar: d } = h(f.key, f.defaults), u = R(0);
|
|
27
|
+
function w() {
|
|
28
|
+
y("select"), u.value++;
|
|
29
29
|
}
|
|
30
|
-
return (t,
|
|
31
|
-
e(
|
|
30
|
+
return (t, J) => (l(), x("tr", A, [
|
|
31
|
+
e(d) && p.value ? (l(), o(i, {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: a(["stash-table-header-row__selection-cell-empty", t.$style["row-control-cell"]]),
|
|
34
34
|
"data-test": "table-row-header|selection-cell-empty"
|
|
35
35
|
}, null, 8, ["class"])) : s("", !0),
|
|
36
|
-
!e(
|
|
36
|
+
!e(d) && p.value ? (l(), o(i, {
|
|
37
37
|
key: 1,
|
|
38
|
-
class: a(["stash-table-header-row__selection-cell min-w-
|
|
38
|
+
class: a(["stash-table-header-row__selection-cell min-w-12", t.$style["row-control-cell"]]),
|
|
39
39
|
"data-test": "table-row-header|selection-cell"
|
|
40
40
|
}, {
|
|
41
|
-
default:
|
|
42
|
-
e(
|
|
43
|
-
key:
|
|
41
|
+
default: I(() => [
|
|
42
|
+
e(d) ? s("", !0) : (l(), o($, {
|
|
43
|
+
key: u.value,
|
|
44
44
|
class: a(t.$style["row-selection-checkbox"]),
|
|
45
45
|
checked: c.allRowsSelected,
|
|
46
46
|
indeterminate: c.someRowsSelected && !c.allRowsSelected,
|
|
47
|
-
title: e(
|
|
48
|
-
"onUpdate:indeterminate":
|
|
49
|
-
"onUpdate:checked":
|
|
47
|
+
title: e(S)("ll.selectAll"),
|
|
48
|
+
"onUpdate:indeterminate": w,
|
|
49
|
+
"onUpdate:checked": w
|
|
50
50
|
}, null, 8, ["class", "checked", "indeterminate", "title"]))
|
|
51
51
|
]),
|
|
52
52
|
_: 1
|
|
53
53
|
}, 8, ["class"])) : s("", !0),
|
|
54
|
-
e(
|
|
54
|
+
e(T) && !e(k) ? (l(), o(i, {
|
|
55
55
|
key: 2,
|
|
56
56
|
class: a(t.$style["row-control-cell"]),
|
|
57
57
|
"data-test": "table-row-header-expansion-cell"
|
|
58
58
|
}, null, 8, ["class"])) : s("", !0),
|
|
59
|
-
|
|
59
|
+
B(t.$slots, "default")
|
|
60
60
|
]));
|
|
61
61
|
}
|
|
62
|
-
}),
|
|
62
|
+
}), g = {
|
|
63
63
|
"row-selection-checkbox": "_row-selection-checkbox_102yd_5",
|
|
64
64
|
"row-control-cell": "_row-control-cell_102yd_11"
|
|
65
|
-
},
|
|
66
|
-
$style:
|
|
67
|
-
},
|
|
65
|
+
}, j = {
|
|
66
|
+
$style: g
|
|
67
|
+
}, G = /* @__PURE__ */ N(H, [["__cssModules", j]]);
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
G as default
|
|
70
70
|
};
|
|
71
71
|
//# sourceMappingURL=TableHeaderRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeaderRow.js","sources":["../src/components/TableHeaderRow/TableHeaderRow.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject, ref } from 'vue';\n\n import { t } from '../../locale';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.keys';\n import { TABLE_INJECTION } from '../Table/Table.vue';\n import TableHeaderCell from '../TableHeaderCell/TableHeaderCell.vue';\n\n export interface TableHeaderRowProps {\n allRowsSelected?: boolean;\n someRowsSelected?: boolean;\n }\n\n const props = withDefaults(defineProps<TableHeaderRowProps>(), {\n allRowsSelected: false,\n someRowsSelected: false,\n });\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n const tableInjection = inject(TABLE_INJECTION.key);\n\n if (!tableInjection) {\n throw new Error('TableHeaderRow must be used within a Table component');\n }\n\n const { hasCustomExpandToggle, isExpandable, isSelectable } = tableInjection;\n\n const { hasToolbar } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n</script>\n\n<template>\n <tr class=\"stash-table-header-row\" data-test=\"stash-table-header-row\">\n <!-- This is just an empty cell to ensure proper alignment. \"Select all\" control should be in the toolbar. -->\n <TableHeaderCell\n v-if=\"hasToolbar &&
|
|
1
|
+
{"version":3,"file":"TableHeaderRow.js","sources":["../src/components/TableHeaderRow/TableHeaderRow.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, ref } from 'vue';\n\n import { t } from '../../locale';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.keys';\n import { TABLE_INJECTION } from '../Table/Table.vue';\n import TableHeaderCell from '../TableHeaderCell/TableHeaderCell.vue';\n\n export interface TableHeaderRowProps {\n allRowsSelected?: boolean;\n someRowsSelected?: boolean;\n }\n\n const props = withDefaults(defineProps<TableHeaderRowProps>(), {\n allRowsSelected: false,\n someRowsSelected: false,\n });\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n const tableInjection = inject(TABLE_INJECTION.key);\n\n if (!tableInjection) {\n throw new Error('TableHeaderRow must be used within a Table component');\n }\n\n const { hasCustomExpandToggle, isSchemaDriven, isExpandable, isSelectable } = tableInjection;\n\n const showSelectionCells = computed(() => isSelectable?.value && !isSchemaDriven?.value);\n\n const { hasToolbar } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n</script>\n\n<template>\n <tr class=\"stash-table-header-row\" data-test=\"stash-table-header-row\">\n <!-- This is just an empty cell to ensure proper alignment. \"Select all\" control should be in the toolbar. -->\n <TableHeaderCell\n v-if=\"hasToolbar && showSelectionCells\"\n class=\"stash-table-header-row__selection-cell-empty\"\n :class=\"$style['row-control-cell']\"\n data-test=\"table-row-header|selection-cell-empty\"\n />\n\n <TableHeaderCell\n v-if=\"!hasToolbar && showSelectionCells\"\n class=\"stash-table-header-row__selection-cell min-w-12\"\n :class=\"$style['row-control-cell']\"\n data-test=\"table-row-header|selection-cell\"\n >\n <Checkbox\n v-if=\"!hasToolbar\"\n :key=\"checkboxKey\"\n :class=\"$style['row-selection-checkbox']\"\n :checked=\"props.allRowsSelected\"\n :indeterminate=\"props.someRowsSelected && !props.allRowsSelected\"\n :title=\"t('ll.selectAll')\"\n @update:indeterminate=\"onSelect\"\n @update:checked=\"onSelect\"\n />\n </TableHeaderCell>\n\n <TableHeaderCell\n v-if=\"isExpandable && !hasCustomExpandToggle\"\n :class=\"$style['row-control-cell']\"\n data-test=\"table-row-header-expansion-cell\"\n />\n <!-- @slot default -->\n <slot></slot>\n </tr>\n</template>\n\n<style module>\n @reference \"../../../styles/main.css\";\n\n @layer utilities {\n .row-selection-checkbox label {\n padding: 0;\n min-height: --spacing(6);\n vertical-align: middle;\n }\n\n .row-control-cell {\n border-right: 0;\n }\n }\n</style>\n"],"names":["props","__props","emit","__emit","tableInjection","inject","TABLE_INJECTION","hasCustomExpandToggle","isSchemaDriven","isExpandable","isSelectable","showSelectionCells","computed","hasToolbar","DATA_VIEW_INJECTION","checkboxKey","ref","onSelect","_openBlock","_createElementBlock","_hoisted_1","_unref","_createBlock","TableHeaderCell","_normalizeClass","$style","Checkbox","t","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcE,UAAMA,IAAQC,GAKRC,IAAOC,GAIPC,IAAiBC,EAAOC,EAAgB,GAAG;AAEjD,QAAI,CAACF;AACH,YAAM,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,uBAAAG,GAAuB,gBAAAC,GAAgB,cAAAC,GAAc,cAAAC,MAAiBN,GAExEO,IAAqBC,EAAS,OAAMF,KAAA,gBAAAA,EAAc,UAAS,EAACF,KAAA,QAAAA,EAAgB,MAAK,GAEjF,EAAE,YAAAK,EAAA,IAAeR,EAAOS,EAAoB,KAAKA,EAAoB,QAAQ,GAE7EC,IAAcC,EAAI,CAAC;AAEzB,aAASC,IAAW;AAClB,MAAAf,EAAK,QAAQ,GAOba,EAAY;AAAA,IACd;sBAIAG,EAAA,GAAAC,EAkCK,MAlCLC,GAkCK;AAAA,MA/BKC,EAAAR,CAAA,KAAcF,EAAA,cADtBW,EAKEC,GAAA;AAAA;QAHA,OAAKC,EAAA,CAAC,gDACEC,EAAAA,OAAM,kBAAA,CAAA,CAAA;AAAA,QACd,aAAU;AAAA,MAAA;MAIH,CAAAJ,EAAAR,CAAA,KAAcF,EAAA,cADvBW,EAgBkBC,GAAA;AAAA;QAdhB,OAAKC,EAAA,CAAC,mDACEC,EAAAA,OAAM,kBAAA,CAAA,CAAA;AAAA,QACd,aAAU;AAAA,MAAA;mBAEV,MASE;AAAA,UAROJ,EAAAR,CAAA,sBADTS,EASEI,GAAA;AAAA,YAPC,KAAKX,EAAA;AAAA,YACL,SAAOU,EAAAA,OAAM,wBAAA,CAAA;AAAA,YACb,SAASzB,EAAM;AAAA,YACf,eAAeA,EAAM,oBAAgB,CAAKA,EAAM;AAAA,YAChD,OAAOqB,EAAAM,CAAA,EAAC,cAAA;AAAA,YACR,0BAAsBV;AAAA,YACtB,oBAAgBA;AAAA,UAAA;;;;MAKbI,EAAAZ,CAAA,MAAiBY,EAAAd,CAAA,UADzBe,EAIEC,GAAA;AAAA;QAFC,SAAOE,EAAAA,OAAM,kBAAA,CAAA;AAAA,QACd,aAAU;AAAA,MAAA;MAGZG,EAAaC,EAAA,QAAA,SAAA;AAAA,IAAA;;;;;;;;"}
|
package/dist/TableRow.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
1
|
+
import { defineComponent as P, useAttrs as q, useCssModule as z, useSlots as F, inject as J, computed as _, ref as O, watch as U, createElementBlock as f, openBlock as i, Fragment as T, createElementVNode as G, createCommentVNode as w, mergeProps as H, unref as e, createBlock as B, renderSlot as R, normalizeClass as c, withCtx as m, createVNode as h } from "vue";
|
|
2
|
+
import K from "lodash-es/uniqueId";
|
|
3
|
+
import { t as v } from "./locale.js";
|
|
4
|
+
import Q from "./Checkbox.js";
|
|
5
|
+
import { _ as W } from "./ChevronToggle.vue_vue_type_script_setup_true_lang-Ce_qOXfR.js";
|
|
6
|
+
import { _ as X } from "./Expand.vue_vue_type_script_setup_true_lang-BmNJA0Xy.js";
|
|
7
7
|
import "lodash-es/cloneDeep";
|
|
8
8
|
import "./Module.keys-DcqBbvvT.js";
|
|
9
9
|
import "./DataView.keys-aSOnA4AD.js";
|
|
10
10
|
import "./Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js";
|
|
11
|
-
import
|
|
12
|
-
import { T as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
11
|
+
import A from "./TableCell.js";
|
|
12
|
+
import { T as Y } from "./Table.keys-LHQf6FEH.js";
|
|
13
|
+
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const ee = /* @__PURE__ */ P({
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
__name: "TableRow",
|
|
17
17
|
props: {
|
|
@@ -22,81 +22,89 @@ const W = /* @__PURE__ */ D({
|
|
|
22
22
|
accentColor: { default: void 0 }
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:isSelected", "update:isExpanded"],
|
|
25
|
-
setup(
|
|
26
|
-
const o =
|
|
27
|
-
if (!
|
|
25
|
+
setup(C, { emit: $ }) {
|
|
26
|
+
const o = C, y = $, N = q(), l = z(), d = F(), k = J(Y.key);
|
|
27
|
+
if (!k)
|
|
28
28
|
throw new Error("TableRow must be used within a Table component");
|
|
29
|
-
const { hasActions:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
const { hasActions: I, hasCustomExpandToggle: E, isSchemaDriven: x, isExpandable: V, isSelectable: j, layout: p, isLoading: D } = k, b = _(() => j.value && !(x != null && x.value)), s = O(o.isExpanded), r = _(() => V.value && !!d.expansion);
|
|
30
|
+
function M(a) {
|
|
31
|
+
return Array.isArray(a) && a.every((t) => t != null && typeof t == "object" && "type" in t);
|
|
32
|
+
}
|
|
33
|
+
function g(a) {
|
|
34
|
+
return a.reduce((t, n) => n.type === T && M(n.children) ? t + g(n.children) : t + 1, 0);
|
|
35
|
+
}
|
|
36
|
+
const L = _(() => {
|
|
37
|
+
var n;
|
|
38
|
+
const a = ((n = d.default) == null ? void 0 : n.call(d, { toggleExpand: u })) ?? [];
|
|
39
|
+
let t = g(a);
|
|
40
|
+
return b.value && (t += 1), r.value && !E.value && (t += 1), t;
|
|
41
|
+
}), S = K("table-row-");
|
|
42
|
+
function u(a) {
|
|
43
|
+
if (!r.value)
|
|
36
44
|
throw new Error("Cannot call `toggleExpand` on a non-expandable row. Provide an `expansion` slot.");
|
|
37
|
-
const
|
|
38
|
-
|
|
45
|
+
const t = typeof a == "boolean" ? a : !s.value;
|
|
46
|
+
s.value = t, y("update:isExpanded", t);
|
|
39
47
|
}
|
|
40
|
-
return
|
|
48
|
+
return U(
|
|
41
49
|
() => o.isExpanded,
|
|
42
|
-
() =>
|
|
43
|
-
), (a,
|
|
44
|
-
|
|
50
|
+
() => u(o.isExpanded)
|
|
51
|
+
), (a, t) => (i(), f(T, null, [
|
|
52
|
+
G("tr", H({
|
|
45
53
|
class: ["stash-table-row", [
|
|
46
|
-
e(
|
|
47
|
-
e(
|
|
54
|
+
e(l).root,
|
|
55
|
+
e(l)[`layout--${e(p)}`],
|
|
48
56
|
{
|
|
49
|
-
[e(
|
|
50
|
-
[e(
|
|
51
|
-
[e(
|
|
52
|
-
"p-gutter": e(
|
|
53
|
-
"mb-6 shadow lg:mb-0 lg:shadow-none": e(
|
|
54
|
-
"pt-[60px]": e(
|
|
57
|
+
[e(l)["is-expandable"]]: r.value,
|
|
58
|
+
[e(l)["is-expanded"]]: s.value,
|
|
59
|
+
[e(l)["root--hidden-divider"]]: C.hideExpansionDivider,
|
|
60
|
+
"p-gutter": e(p) === "stack",
|
|
61
|
+
"mb-6 shadow lg:mb-0 lg:shadow-none": e(p) === "stack" && !r.value,
|
|
62
|
+
"pt-[60px]": e(I) && e(p) === "stack" && !b.value && !e(D),
|
|
55
63
|
"stash-table-row--accent": o.accentColor,
|
|
56
64
|
relative: o.accentColor
|
|
57
65
|
}
|
|
58
66
|
]],
|
|
59
67
|
"data-test": "stash-table-row"
|
|
60
|
-
}, e(
|
|
61
|
-
|
|
68
|
+
}, e(N)), [
|
|
69
|
+
b.value ? (i(), B(A, {
|
|
62
70
|
key: 0,
|
|
63
71
|
"is-control": "",
|
|
64
|
-
class: c(["stash-table-row__selection-cell min-w-
|
|
72
|
+
class: c(["stash-table-row__selection-cell min-w-12 lg:pl-3", e(l)["row-control-cell"]]),
|
|
65
73
|
"data-test": "stash-table-row|selection-cell"
|
|
66
74
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
|
|
69
|
-
class: c(e(
|
|
75
|
+
default: m(() => [
|
|
76
|
+
h(Q, {
|
|
77
|
+
class: c(e(l)["row-selection-checkbox"]),
|
|
70
78
|
checked: o.isSelected,
|
|
71
79
|
disabled: o.isSelectDisabled,
|
|
72
|
-
title: e(
|
|
73
|
-
"onUpdate:checked":
|
|
80
|
+
title: e(v)("ll.select.self"),
|
|
81
|
+
"onUpdate:checked": t[0] || (t[0] = (n) => y("update:isSelected", n))
|
|
74
82
|
}, null, 8, ["class", "checked", "disabled", "title"])
|
|
75
83
|
]),
|
|
76
84
|
_: 1
|
|
77
|
-
}, 8, ["class"])) :
|
|
78
|
-
|
|
85
|
+
}, 8, ["class"])) : w("", !0),
|
|
86
|
+
r.value && !e(E) ? (i(), B(A, {
|
|
79
87
|
key: 1,
|
|
80
|
-
class: c(["stash-table-row__toggle-expansion-cell px-0", e(
|
|
88
|
+
class: c(["stash-table-row__toggle-expansion-cell px-0", e(l)["row-control-cell"]]),
|
|
81
89
|
"data-test": "stash-table-row|custom-expansion-cell",
|
|
82
90
|
"is-control": ""
|
|
83
91
|
}, {
|
|
84
|
-
default:
|
|
85
|
-
|
|
86
|
-
"aria-controls": e(
|
|
87
|
-
"aria-label":
|
|
88
|
-
direction:
|
|
89
|
-
"is-expanded":
|
|
90
|
-
onClick:
|
|
92
|
+
default: m(() => [
|
|
93
|
+
h(W, {
|
|
94
|
+
"aria-controls": e(S),
|
|
95
|
+
"aria-label": s.value ? e(v)("ll.table.collapseRow") : e(v)("ll.table.expandRow"),
|
|
96
|
+
direction: s.value ? "up" : "down",
|
|
97
|
+
"is-expanded": s.value,
|
|
98
|
+
onClick: u
|
|
91
99
|
}, null, 8, ["aria-controls", "aria-label", "direction", "is-expanded"])
|
|
92
100
|
]),
|
|
93
101
|
_: 1
|
|
94
|
-
}, 8, ["class"])) :
|
|
95
|
-
|
|
96
|
-
isRowExpanded:
|
|
97
|
-
toggleExpand:
|
|
102
|
+
}, 8, ["class"])) : w("", !0),
|
|
103
|
+
R(a.$slots, "default", {
|
|
104
|
+
isRowExpanded: s.value,
|
|
105
|
+
toggleExpand: u
|
|
98
106
|
}),
|
|
99
|
-
o.accentColor ? (
|
|
107
|
+
o.accentColor ? (i(), f("div", {
|
|
100
108
|
key: 2,
|
|
101
109
|
"data-test": "stash-table-row|accent",
|
|
102
110
|
class: c({
|
|
@@ -108,31 +116,31 @@ const W = /* @__PURE__ */ D({
|
|
|
108
116
|
"top-0": o.accentColor,
|
|
109
117
|
"left-0": o.accentColor
|
|
110
118
|
})
|
|
111
|
-
}, null, 2)) :
|
|
119
|
+
}, null, 2)) : w("", !0)
|
|
112
120
|
], 16),
|
|
113
|
-
|
|
121
|
+
r.value ? (i(), f("tr", {
|
|
114
122
|
key: 0,
|
|
115
|
-
class: c(["stash-table-row stash-table-row--expandable", e(
|
|
123
|
+
class: c(["stash-table-row stash-table-row--expandable", e(l)["row-expansion"]]),
|
|
116
124
|
"data-test": "stash-table-row|expansion-row"
|
|
117
125
|
}, [
|
|
118
|
-
|
|
126
|
+
h(X, {
|
|
119
127
|
is: "td",
|
|
120
|
-
id: e(
|
|
121
|
-
class: c(["border-none bg-white px-3 py-0", e(
|
|
128
|
+
id: e(S),
|
|
129
|
+
class: c(["border-none bg-white px-3 py-0", e(l)["row-expansion-content"]]),
|
|
122
130
|
"data-test": "stash-table-row|expansion-cell",
|
|
123
|
-
colspan:
|
|
124
|
-
"is-expanded":
|
|
131
|
+
colspan: L.value,
|
|
132
|
+
"is-expanded": s.value
|
|
125
133
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
|
|
134
|
+
default: m(() => [
|
|
135
|
+
R(a.$slots, "expansion")
|
|
128
136
|
]),
|
|
129
137
|
_: 3
|
|
130
138
|
}, 8, ["id", "class", "colspan", "is-expanded"])
|
|
131
|
-
], 2)) :
|
|
139
|
+
], 2)) : w("", !0)
|
|
132
140
|
], 64));
|
|
133
141
|
}
|
|
134
|
-
}),
|
|
135
|
-
root:
|
|
142
|
+
}), oe = "_root_27247_5", te = {
|
|
143
|
+
root: oe,
|
|
136
144
|
"is-expandable": "_is-expandable_27247_12",
|
|
137
145
|
"root--hidden-divider": "_root--hidden-divider_27247_17",
|
|
138
146
|
"is-expanded": "_is-expanded_27247_17",
|
|
@@ -142,10 +150,10 @@ const W = /* @__PURE__ */ D({
|
|
|
142
150
|
"row-control-cell": "_row-control-cell_27247_64",
|
|
143
151
|
"row-expansion-content": "_row-expansion-content_27247_75",
|
|
144
152
|
"row-expansion": "_row-expansion_27247_75"
|
|
145
|
-
},
|
|
146
|
-
$style:
|
|
147
|
-
},
|
|
153
|
+
}, ae = {
|
|
154
|
+
$style: te
|
|
155
|
+
}, fe = /* @__PURE__ */ Z(ee, [["__cssModules", ae]]);
|
|
148
156
|
export {
|
|
149
|
-
|
|
157
|
+
fe as default
|
|
150
158
|
};
|
|
151
159
|
//# sourceMappingURL=TableRow.js.map
|