@conduction/nextcloud-vue 0.1.0-beta.16 → 0.1.0-beta.17
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/nextcloud-vue.cjs.js +21 -2
- package/dist/nextcloud-vue.cjs.js.map +1 -1
- package/dist/nextcloud-vue.css +29 -29
- package/dist/nextcloud-vue.esm.js +21 -2
- package/dist/nextcloud-vue.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CnAdvancedFormDialog/CnPropertyValueCell.vue +20 -1
|
@@ -46032,6 +46032,15 @@ var script$M = {
|
|
|
46032
46032
|
datetimeValue() {
|
|
46033
46033
|
const v = this.value;
|
|
46034
46034
|
if (!v) return null
|
|
46035
|
+
// Date-only strings (YYYY-MM-DD) are parsed as UTC midnight by the spec,
|
|
46036
|
+
// which shifts to the previous day in positive-UTC-offset timezones when
|
|
46037
|
+
// fed to a picker that renders in local time. Parse them as local midnight.
|
|
46038
|
+
if (this.schemaProp?.format === 'date'
|
|
46039
|
+
&& typeof v === 'string'
|
|
46040
|
+
&& /^\d{4}-\d{2}-\d{2}$/.test(v)) {
|
|
46041
|
+
const [year, month, day] = v.split('-').map(Number);
|
|
46042
|
+
return new Date(year, month - 1, day)
|
|
46043
|
+
}
|
|
46035
46044
|
const d = new Date(v);
|
|
46036
46045
|
return Number.isNaN(d.getTime()) ? null : d
|
|
46037
46046
|
},
|
|
@@ -46075,6 +46084,11 @@ var script$M = {
|
|
|
46075
46084
|
const v = this.value;
|
|
46076
46085
|
if (!v) return ''
|
|
46077
46086
|
const fmt = this.schemaProp?.format;
|
|
46087
|
+
// Same local-midnight parse as datetimeValue to avoid UTC-shift in display.
|
|
46088
|
+
if (fmt === 'date' && typeof v === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(v)) {
|
|
46089
|
+
const [year, month, day] = v.split('-').map(Number);
|
|
46090
|
+
return new Date(year, month - 1, day).toLocaleDateString()
|
|
46091
|
+
}
|
|
46078
46092
|
const d = new Date(v);
|
|
46079
46093
|
if (Number.isNaN(d.getTime())) return String(v)
|
|
46080
46094
|
if (fmt === 'date') return d.toLocaleDateString()
|
|
@@ -46144,7 +46158,12 @@ var script$M = {
|
|
|
46144
46158
|
}
|
|
46145
46159
|
const fmt = this.schemaProp?.format;
|
|
46146
46160
|
if (fmt === 'date') {
|
|
46147
|
-
|
|
46161
|
+
// Use local-time accessors — toISOString() converts to UTC first,
|
|
46162
|
+
// which shifts midnight local time to the previous day in UTC+n zones.
|
|
46163
|
+
const year = date.getFullYear();
|
|
46164
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
46165
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
46166
|
+
this.$emit('update:value', `${year}-${month}-${day}`);
|
|
46148
46167
|
return
|
|
46149
46168
|
}
|
|
46150
46169
|
if (fmt === 'time') {
|
|
@@ -46827,7 +46846,7 @@ __vue_render__$M._withStripped = true;
|
|
|
46827
46846
|
/* style */
|
|
46828
46847
|
const __vue_inject_styles__$M = undefined;
|
|
46829
46848
|
/* scoped */
|
|
46830
|
-
const __vue_scope_id__$M = "data-v-
|
|
46849
|
+
const __vue_scope_id__$M = "data-v-60085d3b";
|
|
46831
46850
|
/* module identifier */
|
|
46832
46851
|
const __vue_module_identifier__$M = undefined;
|
|
46833
46852
|
/* functional template */
|