@vaadin/date-picker 23.0.0-beta2 → 23.0.0-beta3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-picker",
|
|
3
|
-
"version": "23.0.0-
|
|
3
|
+
"version": "23.0.0-beta3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,23 +33,22 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
36
|
-
"@polymer/iron-media-query": "^3.0.0",
|
|
37
36
|
"@polymer/polymer": "^3.2.0",
|
|
38
|
-
"@vaadin/button": "23.0.0-
|
|
39
|
-
"@vaadin/component-base": "23.0.0-
|
|
40
|
-
"@vaadin/field-base": "23.0.0-
|
|
41
|
-
"@vaadin/input-container": "23.0.0-
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "23.0.0-
|
|
43
|
-
"@vaadin/vaadin-material-styles": "23.0.0-
|
|
44
|
-
"@vaadin/vaadin-overlay": "23.0.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "23.0.0-
|
|
37
|
+
"@vaadin/button": "23.0.0-beta3",
|
|
38
|
+
"@vaadin/component-base": "23.0.0-beta3",
|
|
39
|
+
"@vaadin/field-base": "23.0.0-beta3",
|
|
40
|
+
"@vaadin/input-container": "23.0.0-beta3",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "23.0.0-beta3",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "23.0.0-beta3",
|
|
43
|
+
"@vaadin/vaadin-overlay": "23.0.0-beta3",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "23.0.0-beta3"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
49
|
-
"@vaadin/dialog": "23.0.0-
|
|
50
|
-
"@vaadin/polymer-legacy-adapter": "23.0.0-
|
|
48
|
+
"@vaadin/dialog": "23.0.0-beta3",
|
|
49
|
+
"@vaadin/polymer-legacy-adapter": "23.0.0-beta3",
|
|
51
50
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
52
51
|
"sinon": "^9.2.0"
|
|
53
52
|
},
|
|
54
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "4c87216666541f9eb58f56c475964727822aad53"
|
|
55
54
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import '@polymer/iron-media-query/iron-media-query.js';
|
|
7
6
|
import './vaadin-date-picker-overlay.js';
|
|
8
7
|
import './vaadin-date-picker-overlay-content.js';
|
|
9
8
|
import { dashToCamelCase } from '@polymer/polymer/lib/utils/case-map.js';
|
|
@@ -98,8 +97,6 @@ class DatePickerLight extends ThemableMixin(DatePickerMixin(PolymerElement)) {
|
|
|
98
97
|
</vaadin-date-picker-overlay-content>
|
|
99
98
|
</template>
|
|
100
99
|
</vaadin-date-picker-overlay>
|
|
101
|
-
|
|
102
|
-
<iron-media-query query="[[_fullscreenMediaQuery]]" query-matches="{{_fullscreen}}"> </iron-media-query>
|
|
103
100
|
`;
|
|
104
101
|
}
|
|
105
102
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { isIOS } from '@vaadin/component-base/src/browser-utils.js';
|
|
7
7
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
8
8
|
import { KeyboardMixin } from '@vaadin/component-base/src/keyboard-mixin.js';
|
|
9
|
+
import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
|
|
9
10
|
import { DelegateFocusMixin } from '@vaadin/field-base/src/delegate-focus-mixin.js';
|
|
10
11
|
import { InputMixin } from '@vaadin/field-base/src/input-mixin.js';
|
|
11
12
|
import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
|
|
@@ -417,6 +418,12 @@ export const DatePickerMixin = (subclass) =>
|
|
|
417
418
|
}
|
|
418
419
|
});
|
|
419
420
|
|
|
421
|
+
this.addController(
|
|
422
|
+
new MediaQueryController(this._fullscreenMediaQuery, (matches) => {
|
|
423
|
+
this._fullscreen = matches;
|
|
424
|
+
})
|
|
425
|
+
);
|
|
426
|
+
|
|
420
427
|
this.addController(new VirtualKeyboardController(this));
|
|
421
428
|
}
|
|
422
429
|
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import '@polymer/iron-media-query/iron-media-query.js';
|
|
7
6
|
import '@vaadin/button/src/vaadin-button.js';
|
|
8
7
|
import './vaadin-month-calendar.js';
|
|
9
8
|
import './vaadin-infinite-scroller.js';
|
|
10
9
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
11
10
|
import { timeOut } from '@vaadin/component-base/src/async.js';
|
|
11
|
+
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
12
12
|
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
13
13
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
14
14
|
import { addListener, setTouchAction } from '@vaadin/component-base/src/gestures.js';
|
|
15
|
+
import { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';
|
|
15
16
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
16
17
|
import { dateEquals, extractDateParts, getClosestDate } from './vaadin-date-picker-helper.js';
|
|
17
18
|
|
|
@@ -19,7 +20,7 @@ import { dateEquals, extractDateParts, getClosestDate } from './vaadin-date-pick
|
|
|
19
20
|
* @extends HTMLElement
|
|
20
21
|
* @private
|
|
21
22
|
*/
|
|
22
|
-
class DatePickerOverlayContent extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
23
|
+
class DatePickerOverlayContent extends ControllerMixin(ThemableMixin(DirMixin(PolymerElement))) {
|
|
23
24
|
static get template() {
|
|
24
25
|
return html`
|
|
25
26
|
<style>
|
|
@@ -223,7 +224,6 @@ class DatePickerOverlayContent extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
223
224
|
[[i18n.cancel]]
|
|
224
225
|
</vaadin-button>
|
|
225
226
|
</div>
|
|
226
|
-
<iron-media-query query="(min-width: 375px)" query-matches="{{_desktopMode}}"></iron-media-query>
|
|
227
227
|
`;
|
|
228
228
|
}
|
|
229
229
|
|
|
@@ -268,6 +268,11 @@ class DatePickerOverlayContent extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
268
268
|
|
|
269
269
|
_desktopMode: Boolean,
|
|
270
270
|
|
|
271
|
+
_desktopMediaQuery: {
|
|
272
|
+
type: String,
|
|
273
|
+
value: '(min-width: 375px)'
|
|
274
|
+
},
|
|
275
|
+
|
|
271
276
|
_translateX: {
|
|
272
277
|
observer: '_translateXChanged'
|
|
273
278
|
},
|
|
@@ -329,6 +334,12 @@ class DatePickerOverlayContent extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
329
334
|
'tap',
|
|
330
335
|
this._toggleYearScroller.bind(this)
|
|
331
336
|
);
|
|
337
|
+
|
|
338
|
+
this.addController(
|
|
339
|
+
new MediaQueryController(this._desktopMediaQuery, (matches) => {
|
|
340
|
+
this._desktopMode = matches;
|
|
341
|
+
})
|
|
342
|
+
);
|
|
332
343
|
}
|
|
333
344
|
|
|
334
345
|
/**
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Copyright (c) 2016 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import '@polymer/iron-media-query/iron-media-query.js';
|
|
7
6
|
import '@vaadin/input-container/src/vaadin-input-container.js';
|
|
8
7
|
import './vaadin-date-picker-overlay.js';
|
|
9
8
|
import './vaadin-date-picker-overlay-content.js';
|
|
@@ -185,8 +184,6 @@ class DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(Element
|
|
|
185
184
|
></vaadin-date-picker-overlay-content>
|
|
186
185
|
</template>
|
|
187
186
|
</vaadin-date-picker-overlay>
|
|
188
|
-
|
|
189
|
-
<iron-media-query query="[[_fullscreenMediaQuery]]" query-matches="{{_fullscreen}}"> </iron-media-query>
|
|
190
187
|
`;
|
|
191
188
|
}
|
|
192
189
|
|