@budibase/bbui 2.6.7 → 2.6.8-alpha.10
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/dist/bbui.es.js +1 -1
- package/dist/bbui.es.js.map +1 -1
- package/package.json +4 -4
- package/src/Form/Core/DatePicker.svelte +13 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/bbui",
|
|
3
3
|
"description": "A UI solution used in the different Budibase projects.",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.8-alpha.10",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
|
41
|
-
"@budibase/shared-core": "
|
|
42
|
-
"@budibase/string-templates": "
|
|
41
|
+
"@budibase/shared-core": "2.6.8-alpha.10",
|
|
42
|
+
"@budibase/string-templates": "2.6.8-alpha.10",
|
|
43
43
|
"@spectrum-css/accordion": "3.0.24",
|
|
44
44
|
"@spectrum-css/actionbutton": "1.0.1",
|
|
45
45
|
"@spectrum-css/actiongroup": "1.0.1",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"resolutions": {
|
|
91
91
|
"loader-utils": "1.4.1"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "bcc68ebca7f6a471883eca92678c9ab4ab34dc2a"
|
|
94
94
|
}
|
|
@@ -18,10 +18,14 @@
|
|
|
18
18
|
export let ignoreTimezones = false
|
|
19
19
|
export let time24hr = false
|
|
20
20
|
export let range = false
|
|
21
|
+
export let flatpickr
|
|
22
|
+
export let useKeyboardShortcuts = true
|
|
23
|
+
|
|
21
24
|
const dispatch = createEventDispatcher()
|
|
22
25
|
const flatpickrId = `${uuid()}-wrapper`
|
|
26
|
+
|
|
23
27
|
let open = false
|
|
24
|
-
let
|
|
28
|
+
let flatpickrOptions
|
|
25
29
|
|
|
26
30
|
// Another classic flatpickr issue. Errors were randomly being thrown due to
|
|
27
31
|
// flatpickr internal code. Making sure that "destroy" is a valid function
|
|
@@ -59,6 +63,8 @@
|
|
|
59
63
|
dispatch("change", timestamp.toISOString())
|
|
60
64
|
}
|
|
61
65
|
},
|
|
66
|
+
onOpen: () => dispatch("open"),
|
|
67
|
+
onClose: () => dispatch("close"),
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
$: redrawOptions = {
|
|
@@ -113,12 +119,16 @@
|
|
|
113
119
|
|
|
114
120
|
const onOpen = () => {
|
|
115
121
|
open = true
|
|
116
|
-
|
|
122
|
+
if (useKeyboardShortcuts) {
|
|
123
|
+
document.addEventListener("keyup", clearDateOnBackspace)
|
|
124
|
+
}
|
|
117
125
|
}
|
|
118
126
|
|
|
119
127
|
const onClose = () => {
|
|
120
128
|
open = false
|
|
121
|
-
|
|
129
|
+
if (useKeyboardShortcuts) {
|
|
130
|
+
document.removeEventListener("keyup", clearDateOnBackspace)
|
|
131
|
+
}
|
|
122
132
|
|
|
123
133
|
// Manually blur all input fields since flatpickr creates a second
|
|
124
134
|
// duplicate input field.
|