Merge branch 'develop' into feature/datasource-conns
This commit is contained in:
commit
04a28c761b
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.6.16-alpha.2",
|
"version": "2.6.16-alpha.4",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/backend-core",
|
"packages/backend-core",
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
"@spectrum-css/vars": "3.0.1",
|
"@spectrum-css/vars": "3.0.1",
|
||||||
"dayjs": "^1.10.4",
|
"dayjs": "^1.10.4",
|
||||||
"easymde": "^2.16.1",
|
"easymde": "^2.16.1",
|
||||||
"svelte-flatpickr": "^3.3.2",
|
"svelte-flatpickr": "3.2.3",
|
||||||
"svelte-portal": "^1.0.0"
|
"svelte-portal": "^1.0.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
let flatpickr
|
let flatpickr
|
||||||
let isOpen
|
let isOpen
|
||||||
|
|
||||||
// adding the 0- will turn a string like 00:00:00 into a valid ISO
|
// Adding the 0- will turn a string like 00:00:00 into a valid ISO
|
||||||
// date, but will make actual ISO dates invalid
|
// date, but will make actual ISO dates invalid
|
||||||
$: time = new Date(`0-${value}`)
|
$: isTimeValue = !isNaN(new Date(`0-${value}`))
|
||||||
$: timeOnly = !isNaN(time) || schema?.timeOnly
|
$: timeOnly = isTimeValue || schema?.timeOnly
|
||||||
$: dateOnly = schema?.dateOnly
|
$: dateOnly = schema?.dateOnly
|
||||||
$: format = timeOnly
|
$: format = timeOnly
|
||||||
? "HH:mm:ss"
|
? "HH:mm:ss"
|
||||||
|
@ -24,6 +24,19 @@
|
||||||
? "MMM D YYYY"
|
? "MMM D YYYY"
|
||||||
: "MMM D YYYY, HH:mm"
|
: "MMM D YYYY, HH:mm"
|
||||||
$: editable = focused && !readonly
|
$: editable = focused && !readonly
|
||||||
|
$: displayValue = getDisplayValue(value, format, timeOnly, isTimeValue)
|
||||||
|
|
||||||
|
const getDisplayValue = (value, format, timeOnly, isTimeValue) => {
|
||||||
|
if (!value) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
// Parse full date strings
|
||||||
|
if (!timeOnly || !isTimeValue) {
|
||||||
|
return dayjs(value).format(format)
|
||||||
|
}
|
||||||
|
// Otherwise must be a time string
|
||||||
|
return dayjs(`0-${value}`).format(format)
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure we close flatpickr when unselected
|
// Ensure we close flatpickr when unselected
|
||||||
$: {
|
$: {
|
||||||
|
@ -49,7 +62,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="value">
|
<div class="value">
|
||||||
{#if value}
|
{#if value}
|
||||||
{dayjs(timeOnly ? time : value).format(format)}
|
{displayValue}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if editable}
|
{#if editable}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"test:watch": "yarn run test --watch",
|
"test:watch": "yarn run test --watch",
|
||||||
"test:debug": "DEBUG=1 yarn run test",
|
"test:debug": "DEBUG=1 yarn run test",
|
||||||
"test:notify": "node scripts/testResultsWebhook",
|
"test:notify": "node scripts/testResultsWebhook",
|
||||||
"test:smoke": "yarn run test --testPathIgnorePatterns=/.+\\.nightly\\.spec\\.ts",
|
"test:smoke": "yarn run test --testPathIgnorePatterns=/.+\\.integration\\.spec\\.ts",
|
||||||
"test:ci": "start-server-and-test dev:built http://localhost:4001/health test:smoke",
|
"test:ci": "start-server-and-test dev:built http://localhost:4001/health test:smoke",
|
||||||
"serve": "start-server-and-test dev:built http://localhost:4001/health",
|
"serve": "start-server-and-test dev:built http://localhost:4001/health",
|
||||||
"dev:built": "cd ../ && yarn dev:built"
|
"dev:built": "cd ../ && yarn dev:built"
|
||||||
|
|
|
@ -22960,7 +22960,14 @@ svelte-dnd-action@^0.9.8:
|
||||||
resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.22.tgz#003eee9dddb31d8c782f6832aec8b1507fff194d"
|
resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.22.tgz#003eee9dddb31d8c782f6832aec8b1507fff194d"
|
||||||
integrity sha512-lOQJsNLM1QWv5mdxIkCVtk6k4lHCtLgfE59y8rs7iOM6erchbLC9hMEFYSveZz7biJV0mpg7yDSs4bj/RT/YkA==
|
integrity sha512-lOQJsNLM1QWv5mdxIkCVtk6k4lHCtLgfE59y8rs7iOM6erchbLC9hMEFYSveZz7biJV0mpg7yDSs4bj/RT/YkA==
|
||||||
|
|
||||||
svelte-flatpickr@^3.1.0, svelte-flatpickr@^3.2.3, svelte-flatpickr@^3.3.2:
|
svelte-flatpickr@3.2.3:
|
||||||
|
version "3.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.2.3.tgz#db5dd7ad832ef83262b45e09737955ad3d591fc8"
|
||||||
|
integrity sha512-PNkqK4Napx8nTvCwkaUXdnKo8dISThaxEOK+szTUXcY6H0dQM0TSyuoMaVWY2yX7pM+PN5cpCQCcVe8YvTRFSw==
|
||||||
|
dependencies:
|
||||||
|
flatpickr "^4.5.2"
|
||||||
|
|
||||||
|
svelte-flatpickr@^3.1.0, svelte-flatpickr@^3.2.3:
|
||||||
version "3.3.2"
|
version "3.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.3.2.tgz#f08bcde83d439cb30df6fd07b974d87371f130c1"
|
resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.3.2.tgz#f08bcde83d439cb30df6fd07b974d87371f130c1"
|
||||||
integrity sha512-VNJLYyLRDplI63oWX5hJylzAJc2VhTh3z9SNecfjtuPZmP6FZPpg9Fw7rXpkEV2DPovIWj2PtaVxB6Kp9r423w==
|
integrity sha512-VNJLYyLRDplI63oWX5hJylzAJc2VhTh3z9SNecfjtuPZmP6FZPpg9Fw7rXpkEV2DPovIWj2PtaVxB6Kp9r423w==
|
||||||
|
|
Loading…
Reference in New Issue