@neovici/cosmoz-omnitable 12.26.0 → 12.26.1
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/lib/use-dom-columns.js +79 -75
- package/package.json +1 -1
package/lib/use-dom-columns.js
CHANGED
|
@@ -14,7 +14,7 @@ const columnSymbol = Symbol('column'),
|
|
|
14
14
|
// eslint-disable-next-line no-console
|
|
15
15
|
console.error(
|
|
16
16
|
'The name attribute needs to be set on all columns! Missing on column',
|
|
17
|
-
column
|
|
17
|
+
column,
|
|
18
18
|
);
|
|
19
19
|
});
|
|
20
20
|
|
|
@@ -29,7 +29,7 @@ const columnSymbol = Symbol('column'),
|
|
|
29
29
|
// eslint-disable-next-line no-console
|
|
30
30
|
console.error(
|
|
31
31
|
'The name attribute needs to be unique among all columns! Not unique on column',
|
|
32
|
-
column
|
|
32
|
+
column,
|
|
33
33
|
);
|
|
34
34
|
});
|
|
35
35
|
return ok;
|
|
@@ -50,79 +50,83 @@ const columnSymbol = Symbol('column'),
|
|
|
50
50
|
: domColumns.filter((column) => !column.disabled);
|
|
51
51
|
|
|
52
52
|
// eslint-disable-next-line max-lines-per-function
|
|
53
|
-
return columns.map((column) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
53
|
+
return columns.map((column) => {
|
|
54
|
+
const valuePath = column.valuePath ?? column.name;
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
name: column.name,
|
|
58
|
+
title: column.title,
|
|
59
|
+
|
|
60
|
+
valuePath,
|
|
61
|
+
groupOn: column.groupOn ?? valuePath,
|
|
62
|
+
sortOn: column.sortOn ?? valuePath,
|
|
63
|
+
|
|
64
|
+
minWidth: column.minWidth,
|
|
65
|
+
width: column.width,
|
|
66
|
+
flex: column.flex,
|
|
67
|
+
priority: column.priority,
|
|
68
|
+
|
|
69
|
+
getString: column.getString,
|
|
70
|
+
getComparableValue: column.getComparableValue,
|
|
71
|
+
serializeFilter: column.serializeFilter,
|
|
72
|
+
deserializeFilter: column.deserializeFilter,
|
|
73
|
+
toXlsxValue: column.toXlsxValue,
|
|
74
|
+
|
|
75
|
+
renderHeader: column.renderHeader,
|
|
76
|
+
renderCell: column.renderCell,
|
|
77
|
+
renderEditCell: column.renderEditCell,
|
|
78
|
+
renderGroup: column.renderGroup,
|
|
79
|
+
cellTitleFn: column.cellTitleFn,
|
|
80
|
+
getFilterFn: column.getFilterFn,
|
|
81
|
+
headerCellClass: column.headerCellClass,
|
|
82
|
+
cellClass: column.cellClass,
|
|
83
|
+
|
|
84
|
+
editable: column.editable,
|
|
85
|
+
|
|
86
|
+
values: column.values,
|
|
87
|
+
source: memooize(column.computeSource),
|
|
88
|
+
|
|
89
|
+
noLocalFilter: column.noLocalFilter,
|
|
90
|
+
|
|
91
|
+
// @deprecated
|
|
92
|
+
loading: column.loading,
|
|
93
|
+
externalValues: column.externalValues,
|
|
94
|
+
computeSource: column.computeSource,
|
|
95
|
+
|
|
96
|
+
// boolean columns
|
|
97
|
+
trueLabel: column.trueLabel,
|
|
98
|
+
falseLabel: column.falseLabel,
|
|
99
|
+
|
|
100
|
+
// list columns
|
|
101
|
+
valueProperty: column.valueProperty,
|
|
102
|
+
textProperty: column.textProperty,
|
|
103
|
+
emptyLabel: column.emptyLabel,
|
|
104
|
+
emptyValue: column.emptyValue,
|
|
105
|
+
|
|
106
|
+
// range columns
|
|
107
|
+
min: column.min,
|
|
108
|
+
max: column.max,
|
|
109
|
+
locale: column.locale,
|
|
110
|
+
autoupdate: column.autoupdate,
|
|
111
|
+
|
|
112
|
+
// number columns
|
|
113
|
+
maximumFractionDigits: column.maximumFractionDigits,
|
|
114
|
+
minimumFractionDigits: column.minimumFractionDigits,
|
|
115
|
+
|
|
116
|
+
// amount columns
|
|
117
|
+
currency: column.currency,
|
|
118
|
+
rates: column.rates,
|
|
119
|
+
autodetect: column.autodetect,
|
|
120
|
+
|
|
121
|
+
// treenode columns
|
|
122
|
+
ownerTree: column.ownerTree,
|
|
123
|
+
keyProperty: column.keyProperty,
|
|
124
|
+
|
|
125
|
+
...column.getConfig?.(column),
|
|
126
|
+
|
|
127
|
+
[columnSymbol]: column,
|
|
128
|
+
};
|
|
129
|
+
});
|
|
126
130
|
},
|
|
127
131
|
useDOMColumns = (host, { enabledColumns }) => {
|
|
128
132
|
const [columns, setColumns] = useState([]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-omnitable",
|
|
3
|
-
"version": "12.26.
|
|
3
|
+
"version": "12.26.1",
|
|
4
4
|
"description": "[](https://travis-ci.org/Neovici/cosmoz-omnitable)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|