spark-grid-vue3 0.0.13 → 0.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spark-grid-vue3",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "",
5
5
  "files": [
6
6
  "src"
package/src/SparkGrid.vue CHANGED
@@ -1,3 +1,3 @@
1
- <template src="./assets/DataTable.html"/>
2
- <script lang="ts" src="./assets/DataTable.ts"/>
3
- <style src="./assets/DataTable.scss" lang="scss"/>
1
+ <template src="./assets/SparkGrid.html"/>
2
+ <script lang="ts" src="./assets/SparkGrid.ts"/>
3
+ <style src="./assets/SparkGrid.scss" lang="scss"/>
@@ -62,8 +62,8 @@ const columnContent = (column: Column) => {
62
62
  label = props.grid.config.onBeforeHeaderCellMounted(column, props.grid)
63
63
  }
64
64
 
65
- if (column.onBeforeCellHeaderRendered) {
66
- label = column.onBeforeCellHeaderRendered(label, props.grid)
65
+ if (column.headerContentGetter) {
66
+ label = column.headerContentGetter(label, props.grid)
67
67
  }
68
68
 
69
69
  return label ?? column.label
@@ -28,8 +28,8 @@ export type OnRowEvent = (row: Row, grid: GridComponent) => void
28
28
  export type OnCellEvent = (value: any, column: Column, row: Row, grid: GridComponent) => any
29
29
  export type OnContextMenu = (value: any, column: Column, row: Row, grid: GridComponent) => ContextMenItem[]
30
30
  export type OnBeforeRowMounted = (row: Row, grid: GridComponent) => Row
31
- export type OnBeforeCellRendered = (value: any, row: Row, grid: GridComponent) => CellContent
32
- export type OnBeforeHeaderRendered = (value: any, grid: GridComponent) => CellContent
31
+ export type OnValueGetter = (value: any, row: Row, grid: GridComponent) => CellContent
32
+ export type OnHeaderContentGetter = (value: any, grid: GridComponent) => CellContent
33
33
  export type OnBeforeCellMounted = (value: CellContent, column: Column, row: Row, grid: GridComponent) => CellContent
34
34
  export type OnBeforeHeaderCellMounted = (column: Column, grid: GridComponent) => CellContent
35
35
  export type OnBeforeCellStyleMounted = (value: CellContent, column: Column, row: Row, grid: GridComponent) => { [key: string]: any }
@@ -47,8 +47,8 @@ export type Column = {
47
47
  searchType?: GridSearchType,
48
48
  searchConfig?: { [key: string]: any },
49
49
  searchTypeRenderer?: () => Component,
50
- onBeforeCellHeaderRendered?: OnBeforeHeaderRendered,
51
- onBeforeCellContentRendered?: OnBeforeCellRendered,
50
+ headerContentGetter?: OnHeaderContentGetter,
51
+ valueGetter?: OnValueGetter,
52
52
  onBeforeColumnStyleMounted?: OnBeforeColumnStyleMounted,
53
53
  orderByEnabled?: boolean,
54
54
  searchEnabled?: boolean,
@@ -7,8 +7,8 @@ export class CellValueGetter {
7
7
  return () => {
8
8
  let value = getValue(row, column.name)
9
9
 
10
- if (column.onBeforeCellContentRendered) {
11
- value = column.onBeforeCellContentRendered(value, row, grid)
10
+ if (column.valueGetter) {
11
+ value = column.valueGetter(value, row, grid)
12
12
  }
13
13
 
14
14
  if (grid.config.onBeforeCellMounted) {
File without changes
File without changes
File without changes