@neovici/cosmoz-omnitable 13.14.1 → 13.14.3
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/render-footer.js +0 -3
- package/lib/use-footer.js +0 -2
- package/lib/use-omnitable.js +1 -3
- package/lib/use-public-interface.js +4 -3
- package/package.json +1 -1
package/lib/render-footer.js
CHANGED
|
@@ -4,7 +4,6 @@ import { saveAsCsvAction } from './save-as-csv-action';
|
|
|
4
4
|
import { saveAsXlsxAction } from './save-as-xlsx-action';
|
|
5
5
|
import { isEmpty } from '@neovici/cosmoz-utils/template';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line max-lines-per-function
|
|
8
7
|
export const renderFooter = ({
|
|
9
8
|
columns,
|
|
10
9
|
selectedItems,
|
|
@@ -12,12 +11,10 @@ export const renderFooter = ({
|
|
|
12
11
|
xlsxFilename,
|
|
13
12
|
xlsxSheetname,
|
|
14
13
|
topPlacement,
|
|
15
|
-
maxToolbarItems,
|
|
16
14
|
}) =>
|
|
17
15
|
html`<cosmoz-bottom-bar
|
|
18
16
|
id="bottomBar"
|
|
19
17
|
?active=${!isEmpty(selectedItems.length)}
|
|
20
|
-
?max-toolbar-items=${!isEmpty(maxToolbarItems)}
|
|
21
18
|
>
|
|
22
19
|
<slot name="info" slot="info">
|
|
23
20
|
${ngettext(
|
package/lib/use-footer.js
CHANGED
|
@@ -7,7 +7,6 @@ export const useFooter = ({ host, ...rest }) => {
|
|
|
7
7
|
xlsxFilename = 'omnitable.xlsx',
|
|
8
8
|
xlsxSheetname = 'Omnitable',
|
|
9
9
|
topPlacement = _defaultPlacement,
|
|
10
|
-
maxToolbarItems,
|
|
11
10
|
} = host;
|
|
12
11
|
|
|
13
12
|
return {
|
|
@@ -15,7 +14,6 @@ export const useFooter = ({ host, ...rest }) => {
|
|
|
15
14
|
xlsxFilename,
|
|
16
15
|
xlsxSheetname,
|
|
17
16
|
topPlacement,
|
|
18
|
-
maxToolbarItems,
|
|
19
17
|
...rest,
|
|
20
18
|
};
|
|
21
19
|
};
|
package/lib/use-omnitable.js
CHANGED
|
@@ -8,7 +8,6 @@ import { useHeader } from './use-header';
|
|
|
8
8
|
import { useList } from './use-list';
|
|
9
9
|
import { useFooter } from './use-footer';
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line max-lines-per-function
|
|
12
11
|
export const useOmnitable = (host) => {
|
|
13
12
|
const {
|
|
14
13
|
hashParam,
|
|
@@ -48,7 +47,6 @@ export const useOmnitable = (host) => {
|
|
|
48
47
|
resizeSpeedFactor,
|
|
49
48
|
sortAndGroupOptions,
|
|
50
49
|
}),
|
|
51
|
-
maxToolbarItems = isMini ? '0' : undefined,
|
|
52
50
|
dataIsValid = data && Array.isArray(data) && data.length > 0,
|
|
53
51
|
[selectedItems, setSelectedItems] = useState([]);
|
|
54
52
|
|
|
@@ -60,6 +58,7 @@ export const useOmnitable = (host) => {
|
|
|
60
58
|
filters,
|
|
61
59
|
setFilterState,
|
|
62
60
|
selectedItems,
|
|
61
|
+
isMini,
|
|
63
62
|
...sortAndGroupOptions,
|
|
64
63
|
});
|
|
65
64
|
|
|
@@ -95,7 +94,6 @@ export const useOmnitable = (host) => {
|
|
|
95
94
|
host,
|
|
96
95
|
selectedItems,
|
|
97
96
|
columns,
|
|
98
|
-
maxToolbarItems,
|
|
99
97
|
}),
|
|
100
98
|
};
|
|
101
99
|
};
|
|
@@ -87,20 +87,21 @@ export const usePublicInterface = ({ host, visibleData, filters, ...api }) => {
|
|
|
87
87
|
useNotifyProperty('visibleData', visibleData);
|
|
88
88
|
useNotifyProperty(
|
|
89
89
|
'sortedFilteredGroupedItems',
|
|
90
|
-
api.sortedFilteredGroupedItems
|
|
90
|
+
api.sortedFilteredGroupedItems,
|
|
91
91
|
);
|
|
92
92
|
useNotifyProperty('selectedItems', api.selectedItems);
|
|
93
93
|
useNotifyProperty('sortOn', api.sortOn);
|
|
94
94
|
useNotifyProperty('descending', api.descending);
|
|
95
|
+
useNotifyProperty('isMini', api.isMini);
|
|
95
96
|
|
|
96
97
|
const filterValues = useMemo(
|
|
97
98
|
() =>
|
|
98
99
|
Object.fromEntries(
|
|
99
100
|
Object.entries(filters)
|
|
100
101
|
.filter(([, { filter }]) => filter !== undefined)
|
|
101
|
-
.map(([key, { filter }]) => [key, filter])
|
|
102
|
+
.map(([key, { filter }]) => [key, filter]),
|
|
102
103
|
),
|
|
103
|
-
[filters]
|
|
104
|
+
[filters],
|
|
104
105
|
);
|
|
105
106
|
|
|
106
107
|
useNotifyProperty('filters', filterValues, Object.values(filterValues));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-omnitable",
|
|
3
|
-
"version": "13.14.
|
|
3
|
+
"version": "13.14.3",
|
|
4
4
|
"description": "[](https://travis-ci.org/Neovici/cosmoz-omnitable)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|