Skip to content

Commit afa630c

Browse files
committed
Merge branch 'develop' into feature/datasource-conns
2 parents a8176f6 + 7e8dcbc commit afa630c

File tree

9 files changed

+28
-8
lines changed

9 files changed

+28
-8
lines changed

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.6.16-alpha.2",
2+
"version": "2.6.16-alpha.4",
33
"npmClient": "yarn",
44
"packages": [
55
"packages/backend-core",

packages/bbui/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"@spectrum-css/vars": "3.0.1",
8585
"dayjs": "^1.10.4",
8686
"easymde": "^2.16.1",
87-
"svelte-flatpickr": "^3.3.2",
87+
"svelte-flatpickr": "3.2.3",
8888
"svelte-portal": "^1.0.0"
8989
},
9090
"resolutions": {

packages/frontend-core/src/components/grid/cells/DateCell.svelte

+17-4
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,30 @@
1313
let flatpickr
1414
let isOpen
1515
16-
// adding the 0- will turn a string like 00:00:00 into a valid ISO
16+
// Adding the 0- will turn a string like 00:00:00 into a valid ISO
1717
// date, but will make actual ISO dates invalid
18-
$: time = new Date(`0-${value}`)
19-
$: timeOnly = !isNaN(time) || schema?.timeOnly
18+
$: isTimeValue = !isNaN(new Date(`0-${value}`))
19+
$: timeOnly = isTimeValue || schema?.timeOnly
2020
$: dateOnly = schema?.dateOnly
2121
$: format = timeOnly
2222
? "HH:mm:ss"
2323
: dateOnly
2424
? "MMM D YYYY"
2525
: "MMM D YYYY, HH:mm"
2626
$: editable = focused && !readonly
27+
$: displayValue = getDisplayValue(value, format, timeOnly, isTimeValue)
28+
29+
const getDisplayValue = (value, format, timeOnly, isTimeValue) => {
30+
if (!value) {
31+
return ""
32+
}
33+
// Parse full date strings
34+
if (!timeOnly || !isTimeValue) {
35+
return dayjs(value).format(format)
36+
}
37+
// Otherwise must be a time string
38+
return dayjs(`0-${value}`).format(format)
39+
}
2740
2841
// Ensure we close flatpickr when unselected
2942
$: {
@@ -49,7 +62,7 @@
4962
<div class="container">
5063
<div class="value">
5164
{#if value}
52-
{dayjs(timeOnly ? time : value).format(format)}
65+
{displayValue}
5366
{/if}
5467
</div>
5568
{#if editable}

qa-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test:watch": "yarn run test --watch",
1515
"test:debug": "DEBUG=1 yarn run test",
1616
"test:notify": "node scripts/testResultsWebhook",
17-
"test:smoke": "yarn run test --testPathIgnorePatterns=/.+\\.nightly\\.spec\\.ts",
17+
"test:smoke": "yarn run test --testPathIgnorePatterns=/.+\\.integration\\.spec\\.ts",
1818
"test:ci": "start-server-and-test dev:built http://localhost:4001/health test:smoke",
1919
"serve": "start-server-and-test dev:built http://localhost:4001/health",
2020
"dev:built": "cd ../ && yarn dev:built"

yarn.lock

+8-1
Original file line numberDiff line numberDiff line change
@@ -22960,7 +22960,14 @@ svelte-dnd-action@^0.9.8:
2296022960
resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.22.tgz#003eee9dddb31d8c782f6832aec8b1507fff194d"
2296122961
integrity sha512-lOQJsNLM1QWv5mdxIkCVtk6k4lHCtLgfE59y8rs7iOM6erchbLC9hMEFYSveZz7biJV0mpg7yDSs4bj/RT/YkA==
2296222962

22963-
svelte-flatpickr@^3.1.0, svelte-flatpickr@^3.2.3, svelte-flatpickr@^3.3.2:
22963+
svelte-flatpickr@3.2.3:
22964+
version "3.2.3"
22965+
resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.2.3.tgz#db5dd7ad832ef83262b45e09737955ad3d591fc8"
22966+
integrity sha512-PNkqK4Napx8nTvCwkaUXdnKo8dISThaxEOK+szTUXcY6H0dQM0TSyuoMaVWY2yX7pM+PN5cpCQCcVe8YvTRFSw==
22967+
dependencies:
22968+
flatpickr "^4.5.2"
22969+
22970+
svelte-flatpickr@^3.1.0, svelte-flatpickr@^3.2.3:
2296422971
version "3.3.2"
2296522972
resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.3.2.tgz#f08bcde83d439cb30df6fd07b974d87371f130c1"
2296622973
integrity sha512-VNJLYyLRDplI63oWX5hJylzAJc2VhTh3z9SNecfjtuPZmP6FZPpg9Fw7rXpkEV2DPovIWj2PtaVxB6Kp9r423w==

0 commit comments

Comments
 (0)