@stonecrop/atable 0.2.57 → 0.2.59
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/assets/index.css +1 -1
- package/dist/atable.js +45 -45
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/src/types/index.d.ts +8 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/ARow.vue +2 -2
- package/src/components/ATable.vue +2 -2
- package/src/types/index.ts +8 -1
|
@@ -20,7 +20,14 @@ export type CellContext = {
|
|
|
20
20
|
table: TableDataStore['table'];
|
|
21
21
|
};
|
|
22
22
|
export type TableConfig = {
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The type of view to display the table in. Possible values:
|
|
25
|
+
* - `uncounted` - row numbers are not displayed in the table
|
|
26
|
+
* - `list` - row numbers are displayed in the table
|
|
27
|
+
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
28
|
+
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
29
|
+
*/
|
|
30
|
+
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree';
|
|
24
31
|
fullWidth?: boolean;
|
|
25
32
|
};
|
|
26
33
|
export type TableDisplay = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,cAAc,CAAA;AAEzC,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CA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AAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CACpC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/atable",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.59",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@vueuse/components": "^10.11.0",
|
|
38
38
|
"@vueuse/core": "^11.1.0",
|
|
39
39
|
"vue": "^3.5.6",
|
|
40
|
-
"@stonecrop/themes": "0.2.
|
|
41
|
-
"@stonecrop/utilities": "0.2.
|
|
40
|
+
"@stonecrop/themes": "0.2.59",
|
|
41
|
+
"@stonecrop/utilities": "0.2.59"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@microsoft/api-documenter": "^7.25.3",
|
package/src/components/ARow.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tr ref="rowEl" :tabindex="tabIndex" v-show="isRowVisible" class="table-row">
|
|
3
|
-
<!-- render numbered/tree view index -->
|
|
4
|
-
<slot name="index">
|
|
3
|
+
<!-- render numbered/tree view index; skip render for uncounted lists -->
|
|
4
|
+
<slot name="index" v-if="tableData.config.view !== 'uncounted'">
|
|
5
5
|
<td
|
|
6
6
|
v-if="tableData.config.view === 'list'"
|
|
7
7
|
:tabIndex="-1"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
spellcheck="false"
|
|
25
25
|
:pinned="col.pinned"
|
|
26
26
|
:rowIndex="rowIndex"
|
|
27
|
-
:colIndex="colIndex
|
|
27
|
+
:colIndex="colIndex"
|
|
28
28
|
:component="col.cellComponent"
|
|
29
29
|
:style="{
|
|
30
30
|
textAlign: col?.align || 'center',
|
|
@@ -151,7 +151,7 @@ const assignStickyCellWidths = () => {
|
|
|
151
151
|
// let colIndex: number
|
|
152
152
|
// const target = event?.target as HTMLTableCellElement
|
|
153
153
|
// if (event) {
|
|
154
|
-
// colIndex = target.cellIndex
|
|
154
|
+
// colIndex = target.cellIndex
|
|
155
155
|
// } else if (column && cellData) {
|
|
156
156
|
// colIndex = tableData.columns.indexOf(column)
|
|
157
157
|
// }
|
package/src/types/index.ts
CHANGED
|
@@ -26,7 +26,14 @@ export type CellContext = {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export type TableConfig = {
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* The type of view to display the table in. Possible values:
|
|
31
|
+
* - `uncounted` - row numbers are not displayed in the table
|
|
32
|
+
* - `list` - row numbers are displayed in the table
|
|
33
|
+
* - `list-expansion` - carets are displayed in the number column that expand/collapse the row inline
|
|
34
|
+
* - `tree` - carets are displayed in the number column that expand/collapse grouped rows
|
|
35
|
+
*/
|
|
36
|
+
view?: 'uncounted' | 'list' | 'list-expansion' | 'tree'
|
|
30
37
|
fullWidth?: boolean
|
|
31
38
|
}
|
|
32
39
|
|