@neovici/cosmoz-omnitable 8.13.0 → 8.14.0
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/cosmoz-omnitable-styles.js +1 -1
- package/cosmoz-omnitable.js +18 -4
- package/package.json +1 -1
|
@@ -348,7 +348,7 @@ export default `<style>
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
.itemRow[selected] {
|
|
351
|
-
background-color: var(--cosmoz-omnitable-selection-color, rgb(195, 212, 248))
|
|
351
|
+
background-color: var(--cosmoz-omnitable-selection-color, rgb(195, 212, 248));
|
|
352
352
|
@apply --cosmoz-omnitable-selected-row;
|
|
353
353
|
}
|
|
354
354
|
|
package/cosmoz-omnitable.js
CHANGED
|
@@ -15,7 +15,6 @@ import './cosmoz-omnitable-group-row';
|
|
|
15
15
|
import './cosmoz-omnitable-columns';
|
|
16
16
|
import styles from './cosmoz-omnitable-styles';
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import { PolymerElement } from '@polymer/polymer/polymer-element';
|
|
20
19
|
import { html } from '@polymer/polymer/lib/utils/html-tag';
|
|
21
20
|
import { html as litHtml } from 'lit-html';
|
|
@@ -96,11 +95,11 @@ class Omnitable extends hauntedPolymer(useOmnitable)(mixin({ isEmpty }, translat
|
|
|
96
95
|
>
|
|
97
96
|
<template slot="templates" data-type="item">
|
|
98
97
|
<div class="item-row-wrapper">
|
|
99
|
-
<div selected$="[[ selected ]]" class="itemRow">
|
|
98
|
+
<div selected$="[[ selected ]]" part="itemRow itemRow-[[ index ]]" data-index$="[[ index ]]" class="itemRow">
|
|
100
99
|
<input class="checkbox" type="checkbox" checked="[[ selected ]]" on-input="_onCheckboxChange" disabled$="[[ !_dataIsValid ]]" />
|
|
101
100
|
<cosmoz-omnitable-item-row columns="[[ columns ]]"
|
|
102
101
|
selected="[[ selected ]]" expanded="{{ expanded }}" item="[[ item ]]" group-on-column="[[ groupOnColumn ]]"
|
|
103
|
-
on-item-change="[[ onItemChange ]]">
|
|
102
|
+
on-item-change="[[ onItemChange ]]" on-click="onItemClick">
|
|
104
103
|
</cosmoz-omnitable-item-row>
|
|
105
104
|
<paper-icon-button
|
|
106
105
|
class="expand"
|
|
@@ -132,7 +131,7 @@ class Omnitable extends hauntedPolymer(useOmnitable)(mixin({ isEmpty }, translat
|
|
|
132
131
|
</div>
|
|
133
132
|
</div>
|
|
134
133
|
<div class="footer">
|
|
135
|
-
<div class="footer-controls">
|
|
134
|
+
<div class="footer-controls" part="footer-controls">
|
|
136
135
|
<cosmoz-autocomplete
|
|
137
136
|
label="[[ _('Group on', t) ]] [[ _computeSortDirection(groupOnDescending, t) ]]" placeholder="[[ _('No grouping', t) ]]"
|
|
138
137
|
source="[[ _onCompleteValues(columns, 'groupOn', groupOnColumn) ]]" value="[[ groupOnColumn ]]" limit="1" text-property="title"
|
|
@@ -546,6 +545,21 @@ class Omnitable extends hauntedPolymer(useOmnitable)(mixin({ isEmpty }, translat
|
|
|
546
545
|
value && close(); /* eslint-disable-line no-unused-expressions */
|
|
547
546
|
};
|
|
548
547
|
}
|
|
548
|
+
onItemClick(e){
|
|
549
|
+
const path = e.composedPath(),
|
|
550
|
+
hasLinks = path.slice(0, path.indexOf(e.currentTarget))
|
|
551
|
+
.find(e => e.matches?.('a'));
|
|
552
|
+
|
|
553
|
+
this.dispatchEvent(new window.CustomEvent('omnitable-item-click', {
|
|
554
|
+
bubbles: true,
|
|
555
|
+
composed: true,
|
|
556
|
+
detail: {
|
|
557
|
+
item: e.model.item,
|
|
558
|
+
index: e.model.index,
|
|
559
|
+
hasLinks
|
|
560
|
+
}
|
|
561
|
+
}));
|
|
562
|
+
}
|
|
549
563
|
}
|
|
550
564
|
customElements.define('cosmoz-omnitable', Omnitable);
|
|
551
565
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-omnitable",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.14.0",
|
|
4
4
|
"description": "[](https://travis-ci.org/Neovici/cosmoz-omnitable)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|