@neovici/cosmoz-omnitable 14.12.0 → 14.12.2
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/README.md +1 -2
- package/cosmoz-omnitable-column-boolean.js +81 -62
- package/cosmoz-omnitable-column-list-data.js +57 -49
- package/cosmoz-omnitable-column-list-horizontal.js +42 -26
- package/cosmoz-omnitable-group-row.js +10 -2
- package/cosmoz-omnitable-item-expand-line.js +1 -1
- package/grouped-list/cosmoz-grouped-list-row.js +1 -1
- package/grouped-list/use-cosmoz-grouped-list.js +12 -11
- package/grouped-list/use-selected-items.js +25 -25
- package/grouped-list/use-weak-state.js +2 -2
- package/grouped-list/utils.js +11 -9
- package/lib/compute-layout.js +3 -1
- package/lib/cosmoz-omnitable-amount-range-input.js +100 -97
- package/lib/cosmoz-omnitable-date-input-mixin.js +23 -13
- package/lib/cosmoz-omnitable-date-range-input.js +85 -78
- package/lib/cosmoz-omnitable-datetime-range-input.js +85 -78
- package/lib/cosmoz-omnitable-number-range-input.js +34 -27
- package/lib/cosmoz-omnitable-range-input-mixin.js +7 -10
- package/lib/cosmoz-omnitable-time-range-input.js +54 -30
- package/lib/layout.js +12 -14
- package/lib/polymer-haunted-render-mixin.js +14 -13
- package/lib/save-as-csv-action.js +31 -27
- package/lib/save-as-xlsx-action.js +13 -11
- package/lib/settings/cosmoz-omnitable-sort-group.js +1 -1
- package/lib/settings/drivers/context.js +1 -1
- package/lib/use-hash-state.js +1 -1
- package/lib/use-processed-items.js +20 -20
- package/lib/utils-amount.js +17 -26
- package/lib/utils-data.js +24 -24
- package/lib/utils-date.js +18 -34
- package/lib/utils-datetime.js +10 -15
- package/lib/utils-number.js +28 -29
- package/lib/utils-time.js +21 -24
- package/lib/utils.js +14 -0
- package/package.json +8 -2
|
@@ -10,12 +10,12 @@ export const useWeakState = () => {
|
|
|
10
10
|
Object.assign(itemState, callFn(newItemState, itemState));
|
|
11
11
|
return [state];
|
|
12
12
|
}),
|
|
13
|
-
[]
|
|
13
|
+
[],
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
return {
|
|
17
17
|
setItemState,
|
|
18
18
|
state: wrapper[0],
|
|
19
|
-
signal: wrapper
|
|
19
|
+
signal: wrapper,
|
|
20
20
|
};
|
|
21
21
|
};
|
package/grouped-list/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const symbols = {
|
|
2
|
-
group: Symbol('group')
|
|
2
|
+
group: Symbol('group'),
|
|
3
3
|
},
|
|
4
4
|
getItemState = (item, itemsState) => {
|
|
5
5
|
if (!itemsState.has(item)) {
|
|
@@ -8,22 +8,24 @@ const symbols = {
|
|
|
8
8
|
|
|
9
9
|
return itemsState.get(item);
|
|
10
10
|
},
|
|
11
|
-
isExpanded = (item, itemsState) =>
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
isExpanded = (item, itemsState) =>
|
|
12
|
+
Boolean(getItemState(item, itemsState).expanded),
|
|
13
|
+
isFolded = (group, itemsState) =>
|
|
14
|
+
Boolean(getItemState(group, itemsState).folded),
|
|
15
|
+
isGroup = (item) => (item ? item.items instanceof Array : false),
|
|
14
16
|
/**
|
|
15
17
|
* Asserts that data is either all items or all groups, never mixed.
|
|
16
18
|
* @param {Array} data the data
|
|
17
19
|
* @return {void}
|
|
18
20
|
*/
|
|
19
|
-
_assertDataIsHomogeneous = data => {
|
|
21
|
+
_assertDataIsHomogeneous = (data) => {
|
|
20
22
|
if (!Array.isArray(data) || data.length === 0) {
|
|
21
23
|
return;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const firstItemIsAGroup = Array.isArray(data[0].items),
|
|
25
27
|
isHomogeneous = data.every(
|
|
26
|
-
group => Array.isArray(group.items) === firstItemIsAGroup
|
|
28
|
+
(group) => Array.isArray(group.items) === firstItemIsAGroup,
|
|
27
29
|
);
|
|
28
30
|
|
|
29
31
|
if (!isHomogeneous) {
|
|
@@ -58,7 +60,7 @@ const symbols = {
|
|
|
58
60
|
}
|
|
59
61
|
return acc.concat(
|
|
60
62
|
item,
|
|
61
|
-
item.items.map(i => Object.assign(i, { [symbols.group]: item }))
|
|
63
|
+
item.items.map((i) => Object.assign(i, { [symbols.group]: item })),
|
|
62
64
|
);
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -72,7 +74,7 @@ const symbols = {
|
|
|
72
74
|
|
|
73
75
|
return flatData;
|
|
74
76
|
},
|
|
75
|
-
callFn = (fn, ...args) => typeof fn === 'function' ? fn(...args) : fn,
|
|
77
|
+
callFn = (fn, ...args) => (typeof fn === 'function' ? fn(...args) : fn),
|
|
76
78
|
byReference = (a, b) => a === b;
|
|
77
79
|
|
|
78
80
|
export {
|
|
@@ -83,5 +85,5 @@ export {
|
|
|
83
85
|
isFolded,
|
|
84
86
|
isGroup,
|
|
85
87
|
callFn,
|
|
86
|
-
byReference
|
|
88
|
+
byReference,
|
|
87
89
|
};
|
package/lib/compute-layout.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { layout } from './layout';
|
|
2
|
+
import { findLastIndex } from './utils';
|
|
2
3
|
|
|
3
4
|
const _toCss = (layout, config) => {
|
|
4
|
-
const lastVisibleIndex =
|
|
5
|
+
const lastVisibleIndex = findLastIndex(
|
|
6
|
+
layout,
|
|
5
7
|
(width) => width != null && width > 0,
|
|
6
8
|
),
|
|
7
9
|
generateCellCSS = (itemName, width) =>
|
|
@@ -46,103 +46,106 @@ class AmountRangeInput extends rangeInputMixin(
|
|
|
46
46
|
this._onDropdownOpenedChanged(event);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
49
|
+
return html`
|
|
50
|
+
<style>
|
|
51
|
+
paper-dropdown-menu {
|
|
52
|
+
--iron-icon-width: 0;
|
|
53
|
+
display: block;
|
|
54
|
+
text-align: right;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.dropdown-content h3 {
|
|
58
|
+
font-weight: 500;
|
|
59
|
+
font-size: 13px;
|
|
60
|
+
margin: 0;
|
|
61
|
+
font-family: var(
|
|
62
|
+
--cosmoz-input-font-family,
|
|
63
|
+
var(--paper-font-subhead_-_font-family, 'Inter', sans-serif)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.dropdown-content {
|
|
68
|
+
padding: 10px 10px 10px 10px;
|
|
69
|
+
min-width: 150px;
|
|
70
|
+
text-align: left;
|
|
71
|
+
background: var(--cosmoz-omnitable-amount-input-background, #ffffff);
|
|
72
|
+
border-radius: 6px;
|
|
73
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
74
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
75
|
+
box-shadow:
|
|
76
|
+
0 4px 24px 0 rgba(0, 0, 0, 0.18),
|
|
77
|
+
0 1.5px 6px 0 rgba(0, 0, 0, 0.1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
cosmoz-input[type='number'] {
|
|
81
|
+
background: var(--cosmoz-omnitable-amount-input-background, #ffffff);
|
|
82
|
+
border-radius: 6px;
|
|
83
|
+
border: 1px solid #d1d1d6;
|
|
84
|
+
box-shadow: 0 1px 2px 0 rgba(60, 60, 60, 0.04);
|
|
85
|
+
padding: 2px 8px;
|
|
86
|
+
margin-bottom: 6px;
|
|
87
|
+
min-height: 28px;
|
|
88
|
+
transition:
|
|
89
|
+
border-color 0.2s,
|
|
90
|
+
box-shadow 0.2s;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
cosmoz-input[type='number']:focus-within {
|
|
94
|
+
border-color: var(--cz-accent-color, #007aff);
|
|
95
|
+
box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.15);
|
|
96
|
+
background: var(--cosmoz-omnitable-amount-input-background, #ffffff);
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
99
|
+
<cosmoz-clear-button
|
|
100
|
+
@click=${() => this.resetFilter()}
|
|
101
|
+
?visible=${this.hasFilter()}
|
|
102
|
+
></cosmoz-clear-button>
|
|
103
|
+
<paper-dropdown-menu
|
|
104
|
+
label=${this.title}
|
|
105
|
+
placeholder=${ifDefined(this._filterText)}
|
|
106
|
+
class="external-values-${this.externalValues}"
|
|
107
|
+
title=${this._tooltip}
|
|
108
|
+
horizontal-align="right"
|
|
109
|
+
?opened=${this.headerFocused}
|
|
110
|
+
@opened-changed=${onOpenedChanged}
|
|
111
|
+
>
|
|
112
|
+
<div class="dropdown-content" slot="dropdown-content">
|
|
113
|
+
<h3 style="margin: 0;">${this.title}</h3>
|
|
114
|
+
<cosmoz-input
|
|
115
|
+
class=${this._fromClasses}
|
|
116
|
+
type="number"
|
|
117
|
+
title=${_('Minimum amount')}
|
|
118
|
+
label=${_('Min amount')}
|
|
119
|
+
.value=${this._filterInput?.min}
|
|
120
|
+
@value-changed=${(event) => {
|
|
121
|
+
this.set('_filterInput.min', event.detail.value);
|
|
122
|
+
}}
|
|
123
|
+
@blur=${(event) => this._onBlur(event)}
|
|
124
|
+
@keydown=${(event) => this._onKeyDown(event)}
|
|
125
|
+
min=${this._toInputStringAmount(this._limit.fromMin)}
|
|
126
|
+
max=${this._toInputStringAmount(this._limit.fromMax)}
|
|
127
|
+
>
|
|
128
|
+
<div slot="suffix" suffix>${this.filter?.min?.currency}</div>
|
|
129
|
+
</cosmoz-input>
|
|
130
|
+
<cosmoz-input
|
|
131
|
+
class=${this._toClasses}
|
|
132
|
+
type="number"
|
|
133
|
+
title=${_('Maximum amount')}
|
|
134
|
+
label=${_('Max amount')}
|
|
135
|
+
.value=${this._filterInput?.max}
|
|
136
|
+
@value-changed=${(event) => {
|
|
137
|
+
this.set('_filterInput.max', event.detail.value);
|
|
138
|
+
}}
|
|
139
|
+
@blur=${(event) => this._onBlur(event)}
|
|
140
|
+
@keydown=${(event) => this._onKeyDown(event)}
|
|
141
|
+
min=${this._toInputStringAmount(this._limit.toMin)}
|
|
142
|
+
max=${this._toInputStringAmount(this._limit.toMax)}
|
|
143
|
+
>
|
|
144
|
+
<div slot="suffix" suffix>${this.filter?.max?.currency}</div>
|
|
145
|
+
</cosmoz-input>
|
|
146
|
+
</div>
|
|
147
|
+
</paper-dropdown-menu>
|
|
148
|
+
`;
|
|
146
149
|
}
|
|
147
150
|
|
|
148
151
|
/**
|
|
@@ -8,7 +8,9 @@ import { rangeInputMixin } from './cosmoz-omnitable-range-input-mixin';
|
|
|
8
8
|
* @param {class} base The base class
|
|
9
9
|
* @returns {class} The base class with the mixin applied
|
|
10
10
|
*/
|
|
11
|
-
export const dateInputMixin =
|
|
11
|
+
export const dateInputMixin = (
|
|
12
|
+
base, // eslint-disable-line max-lines-per-function
|
|
13
|
+
) =>
|
|
12
14
|
/**
|
|
13
15
|
* @polymer
|
|
14
16
|
* @mixinClass
|
|
@@ -18,23 +20,23 @@ export const dateInputMixin = base => // eslint-disable-line max-lines-per-funct
|
|
|
18
20
|
return {
|
|
19
21
|
max: {
|
|
20
22
|
type: Date,
|
|
21
|
-
value: null
|
|
23
|
+
value: null,
|
|
22
24
|
},
|
|
23
25
|
|
|
24
26
|
min: {
|
|
25
27
|
type: Date,
|
|
26
|
-
value: null
|
|
28
|
+
value: null,
|
|
27
29
|
},
|
|
28
30
|
|
|
29
31
|
_filterText: {
|
|
30
32
|
type: String,
|
|
31
|
-
computed: '_computeFilterText(filter.*, formatter)'
|
|
33
|
+
computed: '_computeFilterText(filter.*, formatter)',
|
|
32
34
|
},
|
|
33
35
|
|
|
34
36
|
formatter: {
|
|
35
37
|
type: Object,
|
|
36
|
-
computed: '_computeFormatter(locale)'
|
|
37
|
-
}
|
|
38
|
+
computed: '_computeFormatter(locale)',
|
|
39
|
+
},
|
|
38
40
|
};
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -46,7 +48,8 @@ export const dateInputMixin = base => // eslint-disable-line max-lines-per-funct
|
|
|
46
48
|
* @param {Function} limitFunc Function used to limit the date (Math.min|Math.max)
|
|
47
49
|
* @returns {Date|void} Value converted to date optionaly limitated
|
|
48
50
|
*/
|
|
49
|
-
toDate(value, limit, limitFunc) {
|
|
51
|
+
toDate(value, limit, limitFunc) {
|
|
52
|
+
// eslint-disable-line max-statements
|
|
50
53
|
if (value == null || value === '') {
|
|
51
54
|
return;
|
|
52
55
|
}
|
|
@@ -120,10 +123,10 @@ export const dateInputMixin = base => // eslint-disable-line max-lines-per-funct
|
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
/**
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
* Computes the local timezone and adds it to a local ISO string
|
|
127
|
+
* @param {String} localISOString an ISO date string, without timezone info
|
|
128
|
+
* @return {String} an ISO date string, with timezone info
|
|
129
|
+
*/
|
|
127
130
|
getAbsoluteISOString(localISOString) {
|
|
128
131
|
// Most browsers use local timezone when no timezone is specified
|
|
129
132
|
// but Safari uses UTC, so we set it implicitly
|
|
@@ -141,7 +144,9 @@ export const dateInputMixin = base => // eslint-disable-line max-lines-per-funct
|
|
|
141
144
|
*/
|
|
142
145
|
_getTimezoneString(localISOString) {
|
|
143
146
|
const off = -new Date(localISOString).getTimezoneOffset() / 60;
|
|
144
|
-
return (
|
|
147
|
+
return (
|
|
148
|
+
(off < 0 ? '-' : '+') + ['0', Math.abs(off)].join('').substr(-2) + ':00'
|
|
149
|
+
);
|
|
145
150
|
}
|
|
146
151
|
|
|
147
152
|
renderValue(value, formatter = this.formatter) {
|
|
@@ -174,7 +179,12 @@ export const dateInputMixin = base => // eslint-disable-line max-lines-per-funct
|
|
|
174
179
|
oldValue = this.get(this.valuePath, item),
|
|
175
180
|
date = this._fromInputString(value);
|
|
176
181
|
this.set(this.valuePath, date, item);
|
|
177
|
-
this._fireItemChangeEvent(
|
|
182
|
+
this._fireItemChangeEvent(
|
|
183
|
+
item,
|
|
184
|
+
this.valuePath,
|
|
185
|
+
oldValue,
|
|
186
|
+
this.renderValue.bind(this),
|
|
187
|
+
);
|
|
178
188
|
}
|
|
179
189
|
|
|
180
190
|
_toLocalISOString(date) {
|
|
@@ -11,88 +11,95 @@ class DateRangeInput extends dateInputMixin(
|
|
|
11
11
|
) {
|
|
12
12
|
// eslint-disable-next-line max-lines-per-function
|
|
13
13
|
render() {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
return html`
|
|
15
|
+
<style>
|
|
16
|
+
paper-dropdown-menu {
|
|
17
|
+
--iron-icon-width: 0;
|
|
18
|
+
display: block;
|
|
19
|
+
text-align: right;
|
|
20
|
+
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
.dropdown-content h3 {
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
font-size: 13px;
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-family: var(
|
|
27
|
+
--cosmoz-input-font-family,
|
|
28
|
+
var(--paper-font-subhead_-_font-family, 'Inter', sans-serif)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
.dropdown-content {
|
|
33
|
+
padding: 10px 10px 10px 10px;
|
|
34
|
+
min-width: 120px;
|
|
35
|
+
text-align: left;
|
|
36
|
+
background: var(--cosmoz-omnitable-amount-input-background, #ffffff);
|
|
37
|
+
border-radius: 6px;
|
|
38
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
39
|
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
|
40
|
+
box-shadow:
|
|
41
|
+
0 4px 24px 0 rgba(0, 0, 0, 0.18),
|
|
42
|
+
0 1.5px 6px 0 rgba(0, 0, 0, 0.1);
|
|
43
|
+
}
|
|
39
44
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
cosmoz-input[type='date'] {
|
|
46
|
+
background: var(--cosmoz-omnitable-amount-input-background, #ffffff);
|
|
47
|
+
border-radius: 6px;
|
|
48
|
+
border: 1px solid #d1d1d6;
|
|
49
|
+
box-shadow: 0 1px 2px 0 rgba(60, 60, 60, 0.04);
|
|
50
|
+
padding: 2px 8px;
|
|
51
|
+
margin-bottom: 6px;
|
|
52
|
+
min-height: 28px;
|
|
53
|
+
transition:
|
|
54
|
+
border-color 0.2s,
|
|
55
|
+
box-shadow 0.2s;
|
|
56
|
+
}
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
58
|
+
cosmoz-input[type='date']:focus-within {
|
|
59
|
+
border-color: var(--cz-accent-color, #007aff);
|
|
60
|
+
box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.15);
|
|
61
|
+
background: var(--cosmoz-omnitable-amount-input-background, #ffffff);
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
64
|
+
<cosmoz-clear-button
|
|
65
|
+
@click=${() => this.resetFilter()}
|
|
66
|
+
?visible=${this.hasFilter()}
|
|
67
|
+
></cosmoz-clear-button>
|
|
68
|
+
<paper-dropdown-menu
|
|
69
|
+
label=${this.title}
|
|
70
|
+
placeholder=${ifDefined(this._filterText)}
|
|
71
|
+
class="external-values-${this.externalValues}"
|
|
72
|
+
title=${this._tooltip}
|
|
73
|
+
horizontal-align="right"
|
|
74
|
+
?opened=${this.headerFocused}
|
|
75
|
+
@opened-changed=${(event) => {
|
|
76
|
+
// TODO: check ots integration
|
|
77
|
+
this.headerFocused = event.detail.value;
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
<div class="dropdown-content" slot="dropdown-content">
|
|
81
|
+
<h3 style="margin: 0;">${this.title}</h3>
|
|
82
|
+
<cosmoz-input
|
|
83
|
+
type="date"
|
|
84
|
+
label=${_('From date')}
|
|
85
|
+
min=${this._toInputString(this._limit.fromMin)}
|
|
86
|
+
max=${this._toInputString(this._limit.fromMax)}
|
|
87
|
+
.value=${this._filterInput?.min}
|
|
88
|
+
@value-changed=${(event) =>
|
|
89
|
+
this.set('_filterInput.min', event.detail.value)}
|
|
90
|
+
></cosmoz-input>
|
|
91
|
+
<cosmoz-input
|
|
92
|
+
type="date"
|
|
93
|
+
label=${_('Until date')}
|
|
94
|
+
min=${this._toInputString(this._limit.toMin)}
|
|
95
|
+
max=${this._toInputString(this._limit.toMax)}
|
|
96
|
+
.value=${this._filterInput?.max}
|
|
97
|
+
@value-changed=${(event) =>
|
|
98
|
+
this.set('_filterInput.max', event.detail.value)}
|
|
99
|
+
></cosmoz-input>
|
|
100
|
+
</div>
|
|
101
|
+
</paper-dropdown-menu>
|
|
102
|
+
`;
|
|
96
103
|
}
|
|
97
104
|
|
|
98
105
|
_fromInputString(value, property) {
|