@budibase/bbui 1.2.40 → 1.2.41-alpha.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/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": "1.2.
|
|
4
|
+
"version": "1.2.41-alpha.0",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"svelte": "src/index.js",
|
|
7
7
|
"module": "dist/bbui.es.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
|
41
|
-
"@budibase/string-templates": "
|
|
41
|
+
"@budibase/string-templates": "1.2.41-alpha.0",
|
|
42
42
|
"@spectrum-css/actionbutton": "^1.0.1",
|
|
43
43
|
"@spectrum-css/actiongroup": "^1.0.1",
|
|
44
44
|
"@spectrum-css/avatar": "^3.0.2",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"svelte-flatpickr": "^3.2.3",
|
|
86
86
|
"svelte-portal": "^1.0.0"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "3120f90e92b0608afdf4e3096ba4767928d68661"
|
|
89
89
|
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
export let appendTo = undefined
|
|
17
17
|
export let timeOnly = false
|
|
18
18
|
export let ignoreTimezones = false
|
|
19
|
+
export let time24hr = false
|
|
19
20
|
|
|
20
21
|
const dispatch = createEventDispatcher()
|
|
21
22
|
const flatpickrId = `${uuid()}-wrapper`
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
enableTime: timeOnly || enableTime || false,
|
|
38
39
|
noCalendar: timeOnly || false,
|
|
39
40
|
altInput: true,
|
|
41
|
+
time_24hr: time24hr || false,
|
|
40
42
|
altFormat: timeOnly ? "H:i" : enableTime ? "F j Y, H:i" : "F j, Y",
|
|
41
43
|
wrap: true,
|
|
42
44
|
appendTo,
|
|
@@ -49,6 +51,12 @@
|
|
|
49
51
|
},
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
$: redrawOptions = {
|
|
55
|
+
timeOnly,
|
|
56
|
+
enableTime,
|
|
57
|
+
time24hr,
|
|
58
|
+
}
|
|
59
|
+
|
|
52
60
|
const handleChange = event => {
|
|
53
61
|
const [dates] = event.detail
|
|
54
62
|
const noTimezone = enableTime && !timeOnly && ignoreTimezones
|
|
@@ -142,7 +150,7 @@
|
|
|
142
150
|
}
|
|
143
151
|
</script>
|
|
144
152
|
|
|
145
|
-
{#key
|
|
153
|
+
{#key redrawOptions}
|
|
146
154
|
<Flatpickr
|
|
147
155
|
bind:flatpickr
|
|
148
156
|
value={parseDate(value)}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
$: toggleOption = makeToggleOption(selectedLookupMap, value)
|
|
24
24
|
|
|
25
25
|
const getFieldText = (value, map, placeholder) => {
|
|
26
|
-
if (value
|
|
26
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
27
27
|
if (!map) {
|
|
28
28
|
return ""
|
|
29
29
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
const getSelectedLookupMap = value => {
|
|
38
38
|
let map = {}
|
|
39
|
-
if (value
|
|
39
|
+
if (Array.isArray(value) && value.length > 0) {
|
|
40
40
|
value.forEach(option => {
|
|
41
41
|
if (option) {
|
|
42
42
|
map[option] = true
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
export let error = null
|
|
11
11
|
export let enableTime = true
|
|
12
12
|
export let timeOnly = false
|
|
13
|
+
export let time24hr = false
|
|
13
14
|
export let placeholder = null
|
|
14
15
|
export let appendTo = undefined
|
|
15
16
|
export let ignoreTimezones = false
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
{placeholder}
|
|
31
32
|
{enableTime}
|
|
32
33
|
{timeOnly}
|
|
34
|
+
{time24hr}
|
|
33
35
|
{appendTo}
|
|
34
36
|
{ignoreTimezones}
|
|
35
37
|
on:change={onChange}
|