@neovici/cosmoz-omnitable 12.4.0 → 12.5.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 +71 -56
- package/cosmoz-omnitable.js +16 -3
- package/lib/settings/style.css.js +1 -1
- package/package.json +1 -1
|
@@ -76,7 +76,7 @@ const checkbox = css`
|
|
|
76
76
|
|
|
77
77
|
export { checkbox };
|
|
78
78
|
|
|
79
|
-
export default `
|
|
79
|
+
export default css`
|
|
80
80
|
:host {
|
|
81
81
|
display: flex;
|
|
82
82
|
flex-direction: column;
|
|
@@ -111,22 +111,26 @@ export default `
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
cosmoz-omnitable-header-row .external-values-false {
|
|
114
|
-
--paper-input-container-color: var(
|
|
114
|
+
--paper-input-container-color: var(
|
|
115
|
+
--cosmoz-omnitable-local-filter-header-color
|
|
116
|
+
);
|
|
115
117
|
}
|
|
116
118
|
|
|
117
119
|
cosmoz-omnitable-header-row .external-values-true {
|
|
118
|
-
--paper-input-container-color: var(
|
|
120
|
+
--paper-input-container-color: var(
|
|
121
|
+
--cosmoz-omnitable-remote-filter-header-color
|
|
122
|
+
);
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
.header > cosmoz-omnitable-header-row {
|
|
122
126
|
flex: auto;
|
|
123
127
|
}
|
|
124
128
|
.header-cell {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
--paper-input-container: {
|
|
130
|
+
padding-top: 0;
|
|
131
|
+
padding-bottom: 0;
|
|
132
|
+
--paper-font-caption_-_line-height: 18px;
|
|
133
|
+
}
|
|
130
134
|
}
|
|
131
135
|
|
|
132
136
|
cosmoz-omnitable-header-row {
|
|
@@ -167,7 +171,6 @@ export default `
|
|
|
167
171
|
position: relative;
|
|
168
172
|
}
|
|
169
173
|
|
|
170
|
-
|
|
171
174
|
cosmoz-omnitable-item-row {
|
|
172
175
|
display: flex;
|
|
173
176
|
white-space: nowrap;
|
|
@@ -285,7 +288,6 @@ export default `
|
|
|
285
288
|
left: 0;
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
|
|
289
291
|
.item-row-wrapper {
|
|
290
292
|
display: block;
|
|
291
293
|
width: 100%;
|
|
@@ -294,7 +296,10 @@ export default `
|
|
|
294
296
|
.itemRow {
|
|
295
297
|
border-bottom-color: var(--cosmoz-omnitable-border-color, #e1e2e5);
|
|
296
298
|
border-bottom-width: 1px;
|
|
297
|
-
border-bottom-style: var(
|
|
299
|
+
border-bottom-style: var(
|
|
300
|
+
--cosmoz-omnitable-item-row-border-bottom-style,
|
|
301
|
+
solid
|
|
302
|
+
);
|
|
298
303
|
/* set a min-height for rows so that rows with empty values are visible */
|
|
299
304
|
min-height: var(--item-row-min-height, 24px);
|
|
300
305
|
padding-right: 8px;
|
|
@@ -303,12 +308,15 @@ export default `
|
|
|
303
308
|
}
|
|
304
309
|
|
|
305
310
|
.itemRow[selected] {
|
|
306
|
-
background-color: var(
|
|
311
|
+
background-color: var(
|
|
312
|
+
--cosmoz-omnitable-selection-color,
|
|
313
|
+
rgb(195, 212, 248)
|
|
314
|
+
);
|
|
307
315
|
@apply --cosmoz-omnitable-selected-row;
|
|
308
316
|
}
|
|
309
317
|
|
|
310
318
|
.tableContent .itemRow-cell paper-dropdown-menu {
|
|
311
|
-
margin-top
|
|
319
|
+
margin-top: -20px;
|
|
312
320
|
}
|
|
313
321
|
|
|
314
322
|
cosmoz-omnitable-item-expand[expanded] {
|
|
@@ -328,7 +336,7 @@ export default `
|
|
|
328
336
|
.groupRow {
|
|
329
337
|
display: flex;
|
|
330
338
|
align-items: center;
|
|
331
|
-
background-color: #f5f6f9
|
|
339
|
+
background-color: #f5f6f9;
|
|
332
340
|
font-weight: 700;
|
|
333
341
|
color: #101010;
|
|
334
342
|
border-bottom: 1px solid var(--cosmoz-omnitable-border-color, #e1e2e5);
|
|
@@ -357,7 +365,7 @@ export default `
|
|
|
357
365
|
}
|
|
358
366
|
|
|
359
367
|
.groupRow-badge {
|
|
360
|
-
background: #
|
|
368
|
+
background: #8be5c6;
|
|
361
369
|
color: #fff;
|
|
362
370
|
line-height: 30px;
|
|
363
371
|
width: 30px;
|
|
@@ -403,8 +411,13 @@ export default `
|
|
|
403
411
|
overflow: initial;
|
|
404
412
|
}
|
|
405
413
|
|
|
414
|
+
.omnitable-cell-number {
|
|
415
|
+
font-variant-numeric: tabular-nums;
|
|
416
|
+
}
|
|
417
|
+
|
|
406
418
|
.itemRow:hover {
|
|
407
|
-
box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0,
|
|
419
|
+
box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0,
|
|
420
|
+
0 1px 2px 0 rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%);
|
|
408
421
|
}
|
|
409
422
|
.groupRow:hover .checkbox:not(:checked):not(:hover),
|
|
410
423
|
.itemRow:hover .checkbox:not(:checked):not(:hover) {
|
|
@@ -428,49 +441,51 @@ export default `
|
|
|
428
441
|
flex: none;
|
|
429
442
|
}
|
|
430
443
|
|
|
431
|
-
.expand,
|
|
444
|
+
.expand,
|
|
445
|
+
.fold {
|
|
432
446
|
color: rgba(0, 0, 0, 0.16);
|
|
433
447
|
}
|
|
434
448
|
|
|
435
|
-
.expand:hover,
|
|
449
|
+
.expand:hover,
|
|
450
|
+
.fold:hover {
|
|
436
451
|
color: #000;
|
|
437
452
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
453
|
+
|
|
454
|
+
.sg {
|
|
455
|
+
display: inline-flex;
|
|
456
|
+
width: 10px;
|
|
457
|
+
cursor: pointer;
|
|
458
|
+
align-items: center;
|
|
459
|
+
margin-top: 18px;
|
|
460
|
+
overflow: hidden;
|
|
461
|
+
flex: none;
|
|
462
|
+
background: none;
|
|
463
|
+
border: none;
|
|
464
|
+
outline: none;
|
|
465
|
+
color: inherit;
|
|
466
|
+
padding: 0;
|
|
467
|
+
}
|
|
468
|
+
.sg span {
|
|
469
|
+
display: none;
|
|
470
|
+
}
|
|
471
|
+
.sg svg {
|
|
472
|
+
display: block;
|
|
473
|
+
}
|
|
474
|
+
.sg[data-on] {
|
|
475
|
+
color: var(--cosmoz-omnitable-checkbox-checked-color, var(--primary-color));
|
|
476
|
+
}
|
|
477
|
+
.sg:not([data-on='desc']) {
|
|
478
|
+
transform: scaleY(-1);
|
|
479
|
+
}
|
|
480
|
+
:not(:hover) > * > .sg:not([data-on]) {
|
|
481
|
+
display: none;
|
|
482
|
+
}
|
|
483
|
+
.header-cell {
|
|
484
|
+
display: inline-flex;
|
|
485
|
+
position: relative;
|
|
486
|
+
}
|
|
487
|
+
.header-cell :not(.sg) {
|
|
488
|
+
min-width: 0;
|
|
489
|
+
flex: auto;
|
|
490
|
+
}
|
|
476
491
|
`;
|
package/cosmoz-omnitable.js
CHANGED
|
@@ -24,6 +24,7 @@ import { component } from 'haunted';
|
|
|
24
24
|
import { renderHeader } from './lib/render-header';
|
|
25
25
|
import { renderFooter } from './lib/render-footer';
|
|
26
26
|
import { renderList } from './lib/render-list';
|
|
27
|
+
import { notifyProperty } from '@neovici/cosmoz-utils/hooks/use-notify-property';
|
|
27
28
|
|
|
28
29
|
const Omnitable = (host) => {
|
|
29
30
|
const { header, list, footer } = useOmnitable(host);
|
|
@@ -48,9 +49,21 @@ const Omnitable = (host) => {
|
|
|
48
49
|
|
|
49
50
|
customElements.define(
|
|
50
51
|
'cosmoz-omnitable',
|
|
51
|
-
component(Omnitable, {
|
|
52
|
-
observedAttributes: [
|
|
53
|
-
|
|
52
|
+
class extends component(Omnitable, {
|
|
53
|
+
observedAttributes: [
|
|
54
|
+
'hash-param',
|
|
55
|
+
'sort-on',
|
|
56
|
+
'group-on',
|
|
57
|
+
'hide-select-all',
|
|
58
|
+
],
|
|
59
|
+
}) {
|
|
60
|
+
connectedCallback() {
|
|
61
|
+
super.connectedCallback();
|
|
62
|
+
notifyProperty(this, 'selectedItems', []);
|
|
63
|
+
notifyProperty(this, 'visibleData', []);
|
|
64
|
+
notifyProperty(this, 'sortedFilteredGroupedItems', []);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
54
67
|
);
|
|
55
68
|
|
|
56
69
|
const tmplt = `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neovici/cosmoz-omnitable",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.5.0",
|
|
4
4
|
"description": "[](https://travis-ci.org/Neovici/cosmoz-omnitable)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|