@neovici/cosmoz-omnitable 12.26.3 → 12.27.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,5 +1,5 @@
1
1
  /* eslint-disable no-return-assign */
2
- import '@polymer/paper-input/paper-input';
2
+ import '@neovici/cosmoz-input';
3
3
  import '@polymer/paper-dropdown-menu/paper-dropdown-menu';
4
4
  import './ui-helpers/cosmoz-clear-button';
5
5
 
@@ -9,7 +9,16 @@ import { html } from 'lit-html';
9
9
  import { columnMixin } from './cosmoz-omnitable-column-mixin';
10
10
  import { defaultComputeSource } from './lib/utils-data';
11
11
  import './lib/cosmoz-omnitable-amount-range-input';
12
- import { getComparableValue, getCurrency, applySingleFilter, getString, getInputString, toAmount, toHashString, fromHashString } from './lib/utils-amount';
12
+ import {
13
+ getComparableValue,
14
+ getCurrency,
15
+ applySingleFilter,
16
+ getString,
17
+ getInputString,
18
+ toAmount,
19
+ toHashString,
20
+ fromHashString,
21
+ } from './lib/utils-amount';
13
22
  import { get } from '@polymer/polymer/lib/utils/path';
14
23
 
15
24
  /**
@@ -29,13 +38,12 @@ class OmnitableColumnAmount extends columnMixin(PolymerElement) {
29
38
  rates: { type: Object, notify: true },
30
39
  width: { type: String, value: '70px' },
31
40
  cellClass: { type: String, value: 'amount-cell align-right' },
32
- headerCellClass: { type: String, value: 'amount-header-cell' }
41
+ headerCellClass: { type: String, value: 'amount-header-cell' },
33
42
  };
34
43
  }
35
44
 
36
45
  getFilterFn(column, filter) {
37
- const
38
- min = getComparableValue({ ...column, valuePath: 'min' }, filter),
46
+ const min = getComparableValue({ ...column, valuePath: 'min' }, filter),
39
47
  max = getComparableValue({ ...column, valuePath: 'max' }, filter);
40
48
 
41
49
  if (min == null && max == null) {
@@ -64,8 +72,7 @@ class OmnitableColumnAmount extends columnMixin(PolymerElement) {
64
72
  if (filter == null) {
65
73
  return;
66
74
  }
67
- const
68
- min = toAmount(rates, filter.min),
75
+ const min = toAmount(rates, filter.min),
69
76
  max = toAmount(rates, filter.max);
70
77
 
71
78
  if (min == null && max == null) {
@@ -86,51 +93,52 @@ class OmnitableColumnAmount extends columnMixin(PolymerElement) {
86
93
 
87
94
  return {
88
95
  min: fromHashString(matches[1]),
89
- max: fromHashString(matches[2])
96
+ max: fromHashString(matches[2]),
90
97
  };
91
98
  }
92
99
 
93
100
  renderCell(column, { item }) {
94
- return html`<span>${ column.getString(column, item) }</span>`;
101
+ return html`<span>${column.getString(column, item)}</span>`;
95
102
  }
96
103
 
97
104
  renderEditCell(column, { item }, onItemChange) {
98
- const onChange = event => onItemChange({
99
- amount: event.target.value,
100
- currency: get(item, column.valuePath)?.currency
101
- });
102
-
103
- return html`<paper-input no-label-float type="number" @change=${ onChange } .value=${ getInputString(column, item) }>
104
- <div slot="suffix">${ getCurrency(column, item) }</div>
105
- </paper-input>`;
105
+ const onChange = (event) =>
106
+ onItemChange({
107
+ amount: event.target.value,
108
+ currency: get(item, column.valuePath)?.currency,
109
+ });
110
+
111
+ return html`<cosmoz-input
112
+ no-label-float
113
+ type="number"
114
+ @change=${onChange}
115
+ .value=${getInputString(column, item)}
116
+ >
117
+ <div slot="suffix">${getCurrency(column, item)}</div>
118
+ </cosmoz-input>`;
106
119
  }
107
120
 
108
121
  renderHeader(
109
- { title,
110
- min,
111
- max,
112
- locale,
113
- rates,
114
- currency,
115
- autoupdate,
116
- autodetect },
122
+ { title, min, max, locale, rates, currency, autoupdate, autodetect },
117
123
  { filter },
118
124
  setState,
119
- source
125
+ source,
120
126
  ) {
121
127
  return html`<cosmoz-omnitable-amount-range-input
122
- .title=${ title }
123
- .filter=${ filter }
124
- .values=${ source }
125
- .rates=${ rates }
126
- .min=${ min }
127
- .max=${ max }
128
- .locale=${ locale }
129
- .currency=${ currency }
130
- .autoupdate=${ autoupdate }
131
- .autodetect=${ autodetect }
132
- @filter-changed=${ ({ detail: { value }}) => setState(state => ({ ...state, filter: value })) }
133
- @header-focused-changed=${ ({ detail: { value }}) => setState(state => ({ ...state, headerFocused: value })) }
128
+ .title=${title}
129
+ .filter=${filter}
130
+ .values=${source}
131
+ .rates=${rates}
132
+ .min=${min}
133
+ .max=${max}
134
+ .locale=${locale}
135
+ .currency=${currency}
136
+ .autoupdate=${autoupdate}
137
+ .autodetect=${autodetect}
138
+ @filter-changed=${({ detail: { value } }) =>
139
+ setState((state) => ({ ...state, filter: value }))}
140
+ @header-focused-changed=${({ detail: { value } }) =>
141
+ setState((state) => ({ ...state, headerFocused: value }))}
134
142
  ></cosmoz-omnitable-amount-range-input>`;
135
143
  }
136
144
 
@@ -20,7 +20,7 @@ import { get } from '@polymer/polymer/lib/utils/path';
20
20
 
21
21
  export const getComparableValue = (
22
22
  { valuePath, textProperty, valueProperty },
23
- item
23
+ item,
24
24
  ) => {
25
25
  const property = textProperty ? strProp(textProperty) : prop(valueProperty),
26
26
  values = array(valuePath && get(item, valuePath)).map(property);
@@ -33,7 +33,7 @@ export const getComparableValue = (
33
33
  * @appliesMixin columnMixin
34
34
  */
35
35
  class OmnitableColumnAutocomplete extends listColumnMixin(
36
- columnMixin(PolymerElement)
36
+ columnMixin(PolymerElement),
37
37
  ) {
38
38
  static get properties() {
39
39
  return {
@@ -63,12 +63,12 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
63
63
 
64
64
  renderEditCell(column, { item }, onItemChange) {
65
65
  const onChange = (event) => onItemChange(event.target.value);
66
- return html`<paper-input
66
+ return html`<cosmoz-input
67
67
  no-label-float
68
68
  type="text"
69
69
  @change=${onChange}
70
70
  .value=${getString(column, item)}
71
- ></paper-input>`;
71
+ ></cosmoz-input>`;
72
72
  }
73
73
 
74
74
  renderHeader(column, { filter, query }, setState, source) {
@@ -89,12 +89,13 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
89
89
  .onText=${onText(setState)}
90
90
  >${when(
91
91
  column.loading,
92
- () => html`<paper-spinner-lite
93
- style="width: 20px; height: 20px; flex:none;"
94
- suffix
95
- slot="suffix"
96
- active
97
- ></paper-spinner-lite>`
92
+ () =>
93
+ html`<paper-spinner-lite
94
+ style="width: 20px; height: 20px; flex:none;"
95
+ suffix
96
+ slot="suffix"
97
+ active
98
+ ></paper-spinner-lite>`,
98
99
  )}</cosmoz-autocomplete-ui
99
100
  >`;
100
101
  }
@@ -105,5 +106,5 @@ class OmnitableColumnAutocomplete extends listColumnMixin(
105
106
  }
106
107
  customElements.define(
107
108
  'cosmoz-omnitable-column-autocomplete',
108
- OmnitableColumnAutocomplete
109
+ OmnitableColumnAutocomplete,
109
110
  );
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-return-assign */
2
- import '@polymer/paper-input/paper-input';
2
+ import '@neovici/cosmoz-input';
3
3
  import '@polymer/paper-dropdown-menu/paper-dropdown-menu';
4
4
 
5
5
  import './ui-helpers/cosmoz-clear-button';
@@ -88,12 +88,12 @@ class OmnitableColumnDate extends columnMixin(PolymerElement) {
88
88
  renderEditCell(column, { item }, onItemChange) {
89
89
  const onChange = event => onItemChange(fromInputString(event.target.value));
90
90
 
91
- return html`<paper-input
91
+ return html`<cosmoz-input
92
92
  no-label-float
93
93
  type="date"
94
94
  @change=${ onChange }
95
95
  .value=${ getInputString(column, item) }
96
- ></paper-input>`;
96
+ ></cosmoz-input>`;
97
97
  }
98
98
 
99
99
  renderHeader(
@@ -96,7 +96,7 @@ class OmnitableColumnDatetime extends columnMixin(PolymerElement) {
96
96
 
97
97
  renderEditCell(column, { item }, onItemChange) {
98
98
  const onChange = event => onItemChange(fromInputString(event.target.value));
99
- return html`<paper-input no-label-float type="text" @change=${ onChange } .value=${ getString(column, item) }></paper-input>`;
99
+ return html`<cosmoz-input no-label-float type="text" @change=${ onChange } .value=${ getString(column, item) }></cosmoz-input>`;
100
100
  }
101
101
 
102
102
  // eslint-disable-next-line max-lines-per-function
@@ -52,12 +52,12 @@ class OmnitableColumnList extends listColumnMixin(columnMixin(PolymerElement)) {
52
52
  const onChange = (event) =>
53
53
  onItemChange(event.target.value.split(/,\s*/gu));
54
54
 
55
- return html`<paper-input
55
+ return html`<cosmoz-input
56
56
  no-label-float
57
57
  type="text"
58
- @change=${onChange}
59
58
  .value=${getString(column, item)}
60
- ></paper-input>`;
59
+ @change=${onChange}
60
+ ></cosmoz-input>`;
61
61
  }
62
62
 
63
63
  renderHeader(column, { filter, query }, setState, source) {
@@ -79,12 +79,13 @@ class OmnitableColumnList extends listColumnMixin(columnMixin(PolymerElement)) {
79
79
  .onText=${onText(setState)}
80
80
  >${when(
81
81
  column.loading,
82
- () => html`<paper-spinner-lite
83
- style="width: 20px; height: 20px; flex:none;"
84
- suffix
85
- slot="suffix"
86
- active
87
- ></paper-spinner-lite>`
82
+ () =>
83
+ html`<paper-spinner-lite
84
+ style="width: 20px; height: 20px; flex:none;"
85
+ suffix
86
+ slot="suffix"
87
+ active
88
+ ></paper-spinner-lite>`,
88
89
  )}</cosmoz-autocomplete-ui
89
90
  >`;
90
91
  }
@@ -1,4 +1,4 @@
1
- import '@polymer/paper-input/paper-input';
1
+ import '@neovici/cosmoz-input';
2
2
  import '@polymer/paper-dropdown-menu/paper-dropdown-menu';
3
3
  import './ui-helpers/cosmoz-clear-button';
4
4
 
@@ -9,10 +9,16 @@ import { columnMixin } from './cosmoz-omnitable-column-mixin';
9
9
 
10
10
  import './lib/cosmoz-omnitable-number-range-input';
11
11
  import { defaultComputeSource } from './lib/utils-data';
12
- import { applySingleFilter, getComparableValue, getInputString, getString, toHashString, toNumber } from './lib/utils-number';
12
+ import {
13
+ applySingleFilter,
14
+ getComparableValue,
15
+ getInputString,
16
+ getString,
17
+ toHashString,
18
+ toNumber,
19
+ } from './lib/utils-number';
13
20
  import { get } from '@polymer/polymer/lib/utils/path';
14
21
 
15
-
16
22
  /**
17
23
  * @polymer
18
24
  * @customElement
@@ -30,13 +36,12 @@ class OmnitableColumnNumber extends columnMixin(PolymerElement) {
30
36
  minWidth: { type: String, value: '30px' },
31
37
  headerCellClass: { type: String, value: 'number-header-cell' },
32
38
  maximumFractionDigits: { type: Number, value: null },
33
- minimumFractionDigits: { type: Number, value: null } // browser default 0 for numbers, currency-specific or 2 for currency
39
+ minimumFractionDigits: { type: Number, value: null }, // browser default 0 for numbers, currency-specific or 2 for currency
34
40
  };
35
41
  }
36
42
 
37
43
  getFilterFn(column, filter) {
38
- const
39
- min = getComparableValue({ ...column, valuePath: 'min' }, filter),
44
+ const min = getComparableValue({ ...column, valuePath: 'min' }, filter),
40
45
  max = getComparableValue({ ...column, valuePath: 'max' }, filter);
41
46
 
42
47
  if (min == null && max == null) {
@@ -86,44 +91,55 @@ class OmnitableColumnNumber extends columnMixin(PolymerElement) {
86
91
 
87
92
  return {
88
93
  min: toNumber(matches[1]),
89
- max: toNumber(matches[2])
94
+ max: toNumber(matches[2]),
90
95
  };
91
96
  }
92
97
 
93
98
  renderCell(column, { item }) {
94
- return html`<div class="omnitable-cell-number">${ getString(column, item) }</div>`;
99
+ return html`<div class="omnitable-cell-number">
100
+ ${getString(column, item)}
101
+ </div>`;
95
102
  }
96
103
 
97
104
  renderEditCell(column, { item }, onItemChange) {
98
- const onChange = event => onItemChange(event.target.value);
99
-
100
- return html`<paper-input no-label-float type="number" @change=${ onChange } .value=${ getInputString(column, item) }></paper-input>`;
105
+ const onChange = (event) => onItemChange(event.target.value);
106
+
107
+ return html`<cosmoz-input
108
+ no-label-float
109
+ type="number"
110
+ @change=${onChange}
111
+ .value=${getInputString(column, item)}
112
+ ></cosmoz-input>`;
101
113
  }
102
114
 
103
115
  renderHeader(
104
- { title,
116
+ {
117
+ title,
105
118
  min,
106
119
  max,
107
120
  locale,
108
121
  maximumFractionDigits,
109
122
  minimumFractionDigits,
110
- autoupdate },
123
+ autoupdate,
124
+ },
111
125
  { filter },
112
126
  setState,
113
- source
127
+ source,
114
128
  ) {
115
129
  return html`<cosmoz-omnitable-number-range-input
116
- .title=${ title }
117
- .filter=${ filter }
118
- .values=${ source }
119
- .min=${ min }
120
- .max=${ max }
121
- .locale=${ locale }
122
- .maximumFractionDigits=${ maximumFractionDigits }
123
- .minimumFractionDigsits=${ minimumFractionDigits }
124
- .autoupdate=${ autoupdate }
125
- @filter-changed=${ ({ detail: { value }}) => setState(state => ({ ...state, filter: value })) }
126
- @header-focused-changed=${ ({ detail: { value }}) => setState(state => ({ ...state, headerFocused: value })) }
130
+ .title=${title}
131
+ .filter=${filter}
132
+ .values=${source}
133
+ .min=${min}
134
+ .max=${max}
135
+ .locale=${locale}
136
+ .maximumFractionDigits=${maximumFractionDigits}
137
+ .minimumFractionDigsits=${minimumFractionDigits}
138
+ .autoupdate=${autoupdate}
139
+ @filter-changed=${({ detail: { value } }) =>
140
+ setState((state) => ({ ...state, filter: value }))}
141
+ @header-focused-changed=${({ detail: { value } }) =>
142
+ setState((state) => ({ ...state, headerFocused: value }))}
127
143
  ></cosmoz-omnitable-number-range-input>`;
128
144
  }
129
145
 
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-return-assign */
2
2
  import '@polymer/paper-dropdown-menu/paper-dropdown-menu';
3
- import '@polymer/paper-input/paper-input';
3
+ import '@neovici/cosmoz-input';
4
4
 
5
5
  import './ui-helpers/cosmoz-clear-button';
6
6
 
@@ -8,7 +8,15 @@ import { PolymerElement } from '@polymer/polymer/polymer-element';
8
8
  import { html } from 'lit-html';
9
9
 
10
10
  import { columnMixin } from './cosmoz-omnitable-column-mixin';
11
- import { getComparableValue, getString, toXlsxValue, applySingleFilter, toDate, toHashString, fromHashString } from './lib/utils-time';
11
+ import {
12
+ getComparableValue,
13
+ getString,
14
+ toXlsxValue,
15
+ applySingleFilter,
16
+ toDate,
17
+ toHashString,
18
+ fromHashString,
19
+ } from './lib/utils-time';
12
20
  import './lib/cosmoz-omnitable-time-range-input';
13
21
  import { defaultComputeSource } from './lib/utils-data';
14
22
 
@@ -32,13 +40,12 @@ class OmnitableColumnTime extends columnMixin(PolymerElement) {
32
40
  * 1 => full seconds
33
41
  * 0.1 => milliseconds
34
42
  */
35
- filterStep: { type: String, value: '1' }
43
+ filterStep: { type: String, value: '1' },
36
44
  };
37
45
  }
38
46
 
39
47
  getFilterFn(column, filter) {
40
- const
41
- min = getComparableValue({ ...column, valuePath: 'min' }, filter),
48
+ const min = getComparableValue({ ...column, valuePath: 'min' }, filter),
42
49
  max = getComparableValue({ ...column, valuePath: 'max' }, filter);
43
50
 
44
51
  if (min == null && max == null) {
@@ -88,7 +95,7 @@ class OmnitableColumnTime extends columnMixin(PolymerElement) {
88
95
 
89
96
  return {
90
97
  min: fromHashString(matches[1]),
91
- max: fromHashString(matches[2])
98
+ max: fromHashString(matches[2]),
92
99
  };
93
100
  }
94
101
 
@@ -97,30 +104,33 @@ class OmnitableColumnTime extends columnMixin(PolymerElement) {
97
104
  }
98
105
 
99
106
  renderEditCell(column, { item }, onItemChange) {
100
- const onChange = event => onItemChange(event.target.value);
101
- return html`<paper-input no-label-float type="text" @change=${ onChange } .value=${ getString(column, item) }></paper-input>`;
107
+ const onChange = (event) => onItemChange(event.target.value);
108
+ return html`<cosmoz-input
109
+ no-label-float
110
+ type="text"
111
+ @change=${onChange}
112
+ .value=${getString(column, item)}
113
+ ></cosmoz-input>`;
102
114
  }
103
115
 
104
116
  renderHeader(
105
- { title,
106
- min,
107
- max,
108
- locale,
109
- filterStep },
117
+ { title, min, max, locale, filterStep },
110
118
  { filter },
111
119
  setState,
112
- source
120
+ source,
113
121
  ) {
114
122
  return html`<cosmoz-omnitable-time-range-input
115
- .title=${ title }
116
- .filter=${ filter }
117
- .values=${ source }
118
- .min=${ min }
119
- .max=${ max }
120
- .locale=${ locale }
121
- .filterStep=${ filterStep }
122
- @filter-changed=${ ({ detail: { value }}) => setState(state => ({ ...state, filter: value })) }
123
- @header-focused-changed=${ ({ detail: { value }}) => setState(state => ({ ...state, headerFocused: value })) }
123
+ .title=${title}
124
+ .filter=${filter}
125
+ .values=${source}
126
+ .min=${min}
127
+ .max=${max}
128
+ .locale=${locale}
129
+ .filterStep=${filterStep}
130
+ @filter-changed=${({ detail: { value } }) =>
131
+ setState((state) => ({ ...state, filter: value }))}
132
+ @header-focused-changed=${({ detail: { value } }) =>
133
+ setState((state) => ({ ...state, headerFocused: value }))}
124
134
  ></cosmoz-omnitable-time-range-input>`;
125
135
  }
126
136
 
@@ -1,41 +1,42 @@
1
1
  /* eslint-disable no-return-assign */
2
- import '@polymer/iron-icon/iron-icon';
3
- import '@polymer/paper-input/paper-input';
2
+ import '@neovici/cosmoz-input';
4
3
  import './ui-helpers/cosmoz-clear-button';
5
4
 
6
- import { applySingleFilter, columnMixin, getString } from './cosmoz-omnitable-column-mixin';
5
+ import {
6
+ applySingleFilter,
7
+ columnMixin,
8
+ getString,
9
+ } from './cosmoz-omnitable-column-mixin';
7
10
  import { PolymerElement } from '@polymer/polymer/polymer-element';
8
11
  import { html } from 'lit-html';
9
12
 
10
- const
11
- onChange = setState => event => setState(state => {
12
- // skip the event emitted during paper-input initialization
13
- if(state.inputValue === undefined && event.target.value === '') {
14
- return state;
15
- }
16
-
17
- clearTimeout(state.t);
18
- const t = setTimeout(() => setState(state => ({ ...state, filter: state.inputValue })), 1000);
19
- return { ...state, inputValue: event.target.value, t };
20
- }),
21
-
22
- onBlur = setState => () =>
23
- setState(state => ({ ...state, filter: state.inputValue })),
13
+ const onChange = (setState) => (event) =>
14
+ setState((state) => {
15
+ // skip the event emitted during cosmoz-input initialization
16
+ if (state.inputValue === undefined && event.target.value === '') {
17
+ return state;
18
+ }
24
19
 
25
- onKeyDown = setState => event => {
20
+ clearTimeout(state.t);
21
+ const t = setTimeout(
22
+ () => setState((state) => ({ ...state, filter: state.inputValue })),
23
+ 1000,
24
+ );
25
+ return { ...state, inputValue: event.target.value, t };
26
+ }),
27
+ onBlur = (setState) => () =>
28
+ setState((state) => ({ ...state, filter: state.inputValue })),
29
+ onKeyDown = (setState) => (event) => {
26
30
  if (event.keyCode === 13) {
27
31
  event.preventDefault();
28
- setState(state => ({ ...state, filter: state.inputValue }));
32
+ setState((state) => ({ ...state, filter: state.inputValue }));
29
33
  }
30
34
  },
31
-
32
- onFocus = setState => event =>
33
- setState(state => ({ ...state, headerFocused: event.detail.value })),
34
-
35
- resetFilter = setState => () =>
36
- setState(state => ({ ...state, filter: null, inputValue: null })),
37
-
38
- hasFilter = filter => filter != null && filter !== '';
35
+ onFocus = (setState) => (event) =>
36
+ setState((state) => ({ ...state, headerFocused: event.detail.value })),
37
+ resetFilter = (setState) => () =>
38
+ setState((state) => ({ ...state, filter: null, inputValue: null })),
39
+ hasFilter = (filter) => filter != null && filter !== '';
39
40
 
40
41
  /**
41
42
  * @polymer
@@ -47,7 +48,7 @@ class OmnitableColumn extends columnMixin(PolymerElement) {
47
48
  return {
48
49
  minWidth: { type: String, value: '55px' },
49
50
  editMinWidth: { type: String, value: '55px' },
50
- inputValue: { type: Object, notify: true }
51
+ inputValue: { type: Object, notify: true },
51
52
  };
52
53
  }
53
54
 
@@ -59,26 +60,37 @@ class OmnitableColumn extends columnMixin(PolymerElement) {
59
60
  }
60
61
 
61
62
  renderCell(column, { item }) {
62
- return html`<span class="default-column">${ getString(column, item) }</span>`;
63
+ return html`<span class="default-column">${getString(column, item)}</span>`;
63
64
  }
64
65
 
65
66
  renderEditCell(column, { item }, onItemChange) {
66
- const onChange = event => onItemChange(event.target.value);
67
- return html`<paper-input no-label-float type="text" @change=${ onChange } .value=${ getString(column, item) }></paper-input>`;
67
+ const onChange = (event) => onItemChange(event.target.value);
68
+ return html`<cosmoz-input
69
+ no-label-float
70
+ type="text"
71
+ @change=${onChange}
72
+ .value=${getString(column, item)}
73
+ ></cosmoz-input>`;
68
74
  }
69
75
 
70
76
  renderHeader(column, { filter, inputValue, headerFocused }, setState) {
71
- return html`<paper-input
72
- label=${ column.title }
73
- .value=${ inputValue ?? filter }
74
- @value-changed=${ onChange(setState) }
75
- focused=${ headerFocused }
76
- @focused-changed=${ onFocus(setState) }
77
- @keydown=${ onKeyDown(setState) }
78
- @blur=${ onBlur(setState) }
77
+ return html`<cosmoz-input
78
+ label=${column.title}
79
+ .value=${inputValue ?? filter}
80
+ @value-changed=${onChange(setState)}
81
+ focused=${headerFocused}
82
+ @focused-changed=${onFocus(setState)}
83
+ @keydown=${onKeyDown(setState)}
84
+ @blur=${onBlur(setState)}
79
85
  >
80
- <cosmoz-clear-button suffix slot="suffix" ?visible=${ hasFilter(filter) } light @click=${ resetFilter(setState) }></cosmoz-clear-button>
81
- </paper-input>`;
86
+ <cosmoz-clear-button
87
+ suffix
88
+ slot="suffix"
89
+ ?visible=${hasFilter(filter)}
90
+ light
91
+ @click=${resetFilter(setState)}
92
+ ></cosmoz-clear-button>
93
+ </cosmoz-input>`;
82
94
  }
83
95
 
84
96
  legacyFilterToState(filter) {
@@ -518,7 +518,7 @@ export default css`
518
518
  display: inline-flex;
519
519
  position: relative;
520
520
  }
521
- .header-cell :not(.sg) {
521
+ .header-cell :not(.sg,cosmoz-clear-button) {
522
522
  min-width: 0;
523
523
  flex: auto;
524
524
  }
@@ -57,6 +57,8 @@ customElements.define(
57
57
  'hash-param',
58
58
  'sort-on',
59
59
  'group-on',
60
+ 'descending',
61
+ 'group-on-descending',
60
62
  'hide-select-all',
61
63
  'settings-id',
62
64
  'no-local',