@neovici/cosmoz-omnitable 12.13.0 → 12.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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import './cosmoz-omnitable-column-list-data';
|
|
2
2
|
|
|
3
3
|
import { PolymerElement } from '@polymer/polymer/polymer-element';
|
|
4
|
-
import { html
|
|
4
|
+
import { html } from 'lit-html';
|
|
5
|
+
import { when } from 'lit-html/directives/when.js';
|
|
5
6
|
|
|
6
7
|
import { columnMixin } from './cosmoz-omnitable-column-mixin';
|
|
7
8
|
import {
|
|
@@ -23,6 +24,9 @@ import { columnSymbol } from './lib/use-dom-columns';
|
|
|
23
24
|
* @appliesMixin columnMixin
|
|
24
25
|
*/
|
|
25
26
|
class OmnitableColumnList extends listColumnMixin(columnMixin(PolymerElement)) {
|
|
27
|
+
static get properties() {
|
|
28
|
+
return { keepOpened: { type: Boolean } };
|
|
29
|
+
}
|
|
26
30
|
renderCell({ valuePath, textProperty }, { item, index }) {
|
|
27
31
|
return html`<cosmoz-omnitable-column-list-data
|
|
28
32
|
.items=${getTexts(item, valuePath, textProperty)}
|
|
@@ -42,17 +46,17 @@ class OmnitableColumnList extends listColumnMixin(columnMixin(PolymerElement)) {
|
|
|
42
46
|
></paper-input>`;
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
getConfig(column) {
|
|
50
|
+
return {
|
|
51
|
+
keepOpened: column.keepOpened,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
renderHeader(column, { filter, query }, setState, source) {
|
|
46
|
-
const spinner = column.loading
|
|
47
|
-
? html`<paper-spinner-lite
|
|
48
|
-
style="width: 20px; height: 20px; flex:none;"
|
|
49
|
-
suffix
|
|
50
|
-
slot="suffix"
|
|
51
|
-
active
|
|
52
|
-
></paper-spinner-lite>`
|
|
53
|
-
: nothing;
|
|
54
56
|
return html`<cosmoz-autocomplete-ui
|
|
55
57
|
class="external-values-${column.externalValues}"
|
|
58
|
+
.column=${column}
|
|
59
|
+
?keep-opened=${column.keepOpened}
|
|
56
60
|
.label=${column.title}
|
|
57
61
|
.source=${source}
|
|
58
62
|
.textProperty=${column.textProperty}
|
|
@@ -63,7 +67,15 @@ class OmnitableColumnList extends listColumnMixin(columnMixin(PolymerElement)) {
|
|
|
63
67
|
.onChange=${onChange(setState)}
|
|
64
68
|
.onFocus=${onFocus(setState)}
|
|
65
69
|
.onText=${onText(setState)}
|
|
66
|
-
>${
|
|
70
|
+
>${when(
|
|
71
|
+
column.loading,
|
|
72
|
+
() => html`<paper-spinner-lite
|
|
73
|
+
style="width: 20px; height: 20px; flex:none;"
|
|
74
|
+
suffix
|
|
75
|
+
slot="suffix"
|
|
76
|
+
active
|
|
77
|
+
></paper-spinner-lite>`
|
|
78
|
+
)}</cosmoz-autocomplete-ui
|
|
67
79
|
>`;
|
|
68
80
|
}
|
|
69
81
|
}
|
|
@@ -83,11 +83,14 @@ export default css`
|
|
|
83
83
|
position: relative;
|
|
84
84
|
overflow: hidden;
|
|
85
85
|
}
|
|
86
|
-
|
|
87
86
|
:host a {
|
|
88
87
|
color: var(--primary-link-color, inherit);
|
|
88
|
+
text-decoration: var(--cosmoz-omnitable-link-decoration, underline);
|
|
89
|
+
}
|
|
90
|
+
:host a:hover {
|
|
91
|
+
color: var(--primary-link-color, inherit);
|
|
92
|
+
text-decoration: var(--cosmoz-omnitable-link-decoration, underline);
|
|
89
93
|
}
|
|
90
|
-
|
|
91
94
|
/* The wrapping div that contains the header, the table content and the footer */
|
|
92
95
|
.mainContainer {
|
|
93
96
|
background-color: #fff;
|
|
@@ -125,6 +128,7 @@ export default css`
|
|
|
125
128
|
.header > cosmoz-omnitable-header-row {
|
|
126
129
|
flex: auto;
|
|
127
130
|
}
|
|
131
|
+
|
|
128
132
|
.header-cell {
|
|
129
133
|
--paper-input-container: {
|
|
130
134
|
padding-top: 0;
|
|
@@ -154,6 +158,7 @@ export default css`
|
|
|
154
158
|
cosmoz-omnitable-header-row {
|
|
155
159
|
white-space: nowrap;
|
|
156
160
|
}
|
|
161
|
+
|
|
157
162
|
cosmoz-omnitable-header-row > div {
|
|
158
163
|
display: inline-block;
|
|
159
164
|
box-sizing: border-box;
|
|
@@ -173,10 +178,8 @@ export default css`
|
|
|
173
178
|
width: 7px;
|
|
174
179
|
height: 30px;
|
|
175
180
|
margin-left: -3px;
|
|
176
|
-
|
|
177
181
|
background: transparent;
|
|
178
182
|
cursor: ew-resize;
|
|
179
|
-
|
|
180
183
|
z-index: 1000;
|
|
181
184
|
user-select: none;
|
|
182
185
|
}
|
|
@@ -276,7 +279,6 @@ export default css`
|
|
|
276
279
|
.tableContent-empty.overlay div.tableContent-empty-message {
|
|
277
280
|
padding-bottom: 0;
|
|
278
281
|
}
|
|
279
|
-
|
|
280
282
|
.tableContent-empty p {
|
|
281
283
|
font-size: 15px;
|
|
282
284
|
color: #ddd;
|
package/cosmoz-omnitable.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-omnitable",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.14.0",
|
|
4
4
|
"description": "[](https://travis-ci.org/Neovici/cosmoz-omnitable)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|