@conduction/nextcloud-vue 2.164.0 → 2.165.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.
Files changed (43) hide show
  1. package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue.js +1 -1
  2. package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue2.js.map +1 -1
  3. package/dist/esm/components/CnLinkCardsPage/CnLinkCardsPage.vue3.js.map +1 -1
  4. package/dist/esm/components/CnMailTab/CnMailTab.vue.js +1 -1
  5. package/dist/esm/components/CnMailTab/CnMailTab.vue2.js +43 -2
  6. package/dist/esm/components/CnMailTab/CnMailTab.vue2.js.map +1 -1
  7. package/dist/esm/components/CnMailTab/CnMailTab.vue3.js.map +1 -1
  8. package/dist/esm/components/CnModuleCard/CnModuleCard.vue.js +1 -1
  9. package/dist/esm/components/CnModuleCard/CnModuleCard.vue2.js.map +1 -1
  10. package/dist/esm/components/CnModuleCard/CnModuleCard.vue3.js.map +1 -1
  11. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
  12. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +7 -1
  13. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
  14. package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
  15. package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
  16. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +49 -1
  17. package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
  18. package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
  19. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue.js +1 -1
  20. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js +48 -8
  21. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js.map +1 -1
  22. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue3.js +33 -31
  23. package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue3.js.map +1 -1
  24. package/dist/esm/library-style.js +1 -1
  25. package/dist/esm/nextcloud-vue.css +203 -178
  26. package/dist/esm/utils/filterRangeLabel.js +5 -3
  27. package/dist/esm/utils/filterRangeLabel.js.map +1 -1
  28. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  29. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  30. package/dist/nextcloud-vue.cjs.js +303 -165
  31. package/dist/nextcloud-vue.cjs.js.map +2 -2
  32. package/dist/nextcloud-vue.css +203 -178
  33. package/package.json +1 -1
  34. package/src/components/CnLinkCardsPage/CnLinkCardsPage.vue +4 -0
  35. package/src/components/CnMailTab/CnMailTab.vue +43 -2
  36. package/src/components/CnModuleCard/CnModuleCard.vue +4 -0
  37. package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +7 -1
  38. package/src/components/CnStatWidget/CnStatWidget.vue +49 -1
  39. package/src/components/CnWeekStripWidget/CnWeekStripWidget.vue +60 -9
  40. package/src/css/look-board-detail.css +12 -5
  41. package/src/schemas/app-manifest-v2.schema.json +5 -3
  42. package/src/utils/filterRangeLabel.js +5 -3
  43. package/src/utils/validateManifestV2.compiled.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/nextcloud-vue",
3
- "version": "2.164.0",
3
+ "version": "2.165.0",
4
4
  "description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
5
5
  "homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
6
6
  "bugs": {
@@ -1144,7 +1144,11 @@ export default {
1144
1144
  list-style: none;
1145
1145
  }
1146
1146
 
1147
+ /* A list row is a link the boards draw in the main ink; the row hands the
1148
+ theme's link rule (`!important`) that ink. */
1147
1149
  .cn-link-cards-page__row {
1150
+ --nldesign-color-on-surface: var(--color-main-text);
1151
+ --nldesign-component-link-color: var(--color-main-text);
1148
1152
  display: flex;
1149
1153
  align-items: center;
1150
1154
  gap: 12px;
@@ -152,6 +152,28 @@ function keyOf(value) {
152
152
  return String(value)
153
153
  }
154
154
 
155
+ /**
156
+ * The template a `templates.preselect` rule picks: `"first"` the first one,
157
+ * `"only"` the one when the list holds exactly one, `{ field, value }` the
158
+ * first whose field holds the value.
159
+ *
160
+ * @param {object[]} list The templates.
161
+ * @param {string|object} rule The rule.
162
+ * @return {object|null} The template, or null.
163
+ */
164
+ function preselectedTemplate(list, rule) {
165
+ if (rule === 'first') {
166
+ return list[0] || null
167
+ }
168
+ if (rule === 'only') {
169
+ return list.length === 1 ? list[0] : null
170
+ }
171
+ if (rule && typeof rule === 'object' && typeof rule.field === 'string') {
172
+ return list.find((item) => item && item[rule.field] === rule.value) || null
173
+ }
174
+ return null
175
+ }
176
+
155
177
  /**
156
178
  * CnMailTab — the mail of one record: drafts in Nextcloud Mail, from a
157
179
  * template or empty, above the mail linked to the record.
@@ -169,7 +191,7 @@ function keyOf(value) {
169
191
  * "heading": "Email",
170
192
  * "description": "Mail linked to this case",
171
193
  * "hint": "The draft opens in Nextcloud Mail.",
172
- * "templates": { "url": "/apps/app/api/types/@object.type/templates", "responsePath": "results", "labelField": "name", "idField": "id" },
194
+ * "templates": { "url": "/apps/app/api/types/@object.type/templates", "responsePath": "results", "labelField": "name", "idField": "id", "preselect": "first" },
173
195
  * "noTemplatesText": "No templates for this type yet",
174
196
  * "draft": { "url": "/apps/app/api/records/@objectId/templates/{templateId}/draft", "blankTemplateId": "blank" },
175
197
  * "closedWhen": { "field": "endDate", "op": "notEmpty" },
@@ -182,7 +204,10 @@ function keyOf(value) {
182
204
  * URLs take the `@objectId` / `@object.<field>` tokens of `endpointSource`;
183
205
  * `{templateId}` in the draft URL is the chosen template's id, or
184
206
  * `blankTemplateId` for an empty draft. Without `templates` the row offers
185
- * the empty draft only; without `draft` there is no row. `closedWhen` is a
207
+ * the empty draft only; without `draft` there is no row. `templates.preselect`
208
+ * picks a template when the list is read (`"first"`, `"only"` or
209
+ * `{ field, value }`), so the template draft button is ready without a pick;
210
+ * a pick still in the list is kept. `closedWhen` is a
186
211
  * local visibleWhen condition on the record that disables drafting.
187
212
  * `linkedMail: false` leaves the linked mail to a separate `email`
188
213
  * integration card. `headerActions` puts buttons beside the heading:
@@ -443,6 +468,7 @@ export default {
443
468
  const payload = await fetchEndpointSource(this.templatesSource, this.tokenContext)
444
469
  const list = Array.isArray(payload) ? payload : (payload && Array.isArray(payload.results) ? payload.results : [])
445
470
  this.templates = list
471
+ this.applyPreselect()
446
472
  } catch (err) {
447
473
  // eslint-disable-next-line no-console
448
474
  console.warn('[CnMailTab] could not read the templates', err)
@@ -450,6 +476,21 @@ export default {
450
476
  }
451
477
  },
452
478
 
479
+ /**
480
+ * Keep a pick that is still in the list; otherwise select what `templates.preselect` picks.
481
+ *
482
+ * @return {void}
483
+ * @spec openspec/changes/mail-tab-template-preselect/specs/mail-tab-template-preselect/spec.md#requirement-the-mail-tab-can-preselect-a-template
484
+ */
485
+ applyPreselect() {
486
+ const idField = this.templateIdField
487
+ const picked = this.selectedTemplate
488
+ if (picked && this.templates.some((item) => item && item[idField] === picked[idField])) {
489
+ return
490
+ }
491
+ this.selectedTemplate = preselectedTemplate(this.templates, this.templatesSource && this.templatesSource.preselect)
492
+ },
493
+
453
494
  /** @return {Promise<void>} */
454
495
  draftFromTemplate() {
455
496
  return this.openDraft(this.selectedTemplate)
@@ -235,7 +235,11 @@ export default {
235
235
  text-decoration: none;
236
236
  }
237
237
 
238
+ /* The theme paints every link in its link colour (`!important`, through its
239
+ link tokens); the button hands it the main ink. */
238
240
  .cn-module-card__open {
241
+ --nldesign-color-on-surface: var(--color-main-text);
242
+ --nldesign-component-link-color: var(--color-main-text);
239
243
  border: 1px solid var(--color-border-dark);
240
244
  border-radius: var(--border-radius-element, 8px);
241
245
  background: var(--color-main-background);
@@ -1163,7 +1163,13 @@ export default {
1163
1163
  values[field.key] = formatTermDuration(raw, extension)
1164
1164
  continue
1165
1165
  }
1166
- values[field.key] = empty !== null ? empty : (enumLabel !== null ? enumLabel : formatValue(raw, prop || {}))
1166
+ if (empty === null && enumLabel === null && typeof raw === 'boolean') {
1167
+ // A fact reads yes/no as a word, as the boards draw it.
1168
+ values[field.key] = raw ? t('nextcloud-vue', 'Yes') : t('nextcloud-vue', 'No')
1169
+ continue
1170
+ }
1171
+ // A fact shows its text whole; the cell wraps.
1172
+ values[field.key] = empty !== null ? empty : (enumLabel !== null ? enumLabel : formatValue(raw, prop || {}, { truncate: Infinity }))
1167
1173
  }
1168
1174
  return values
1169
1175
  },
@@ -171,6 +171,7 @@ import { normalizeLook } from '../../composables/useLook.js'
171
171
  import widgetLink from '../../mixins/widgetLink.js'
172
172
  import { useObjectStore } from '../../store/useObjectStore.js'
173
173
  import { resolveObjectOpType } from '../../utils/actionsDispatcher.js'
174
+ import { daysUntil } from '../../utils/dateVariant.js'
174
175
  import { resolveObjectTokenContext } from '../../utils/detailObjectContext.js'
175
176
  import { aggFilterParam } from '../../utils/fetchAggregate.js'
176
177
  import { fetchListTotal, needsListEndpoint } from '../../utils/fetchFilterCounts.js'
@@ -2041,7 +2042,9 @@ export default {
2041
2042
  this.captionRatioParts = { num: num === undefined ? null : num, den }
2042
2043
  return
2043
2044
  }
2044
- const found = await this.fetchAggregate(axios, generateUrl, source, own.metric, own.field, own.filter || {}, own.via)
2045
+ const found = own.metric === 'daysSinceEarliest'
2046
+ ? await this.fetchDaysSinceEarliest(axios, generateUrl, source, own.field, own.filter || {})
2047
+ : await this.fetchAggregate(axios, generateUrl, source, own.metric, own.field, own.filter || {}, own.via)
2045
2048
  this.captionValue = found === null || found === undefined || Number.isNaN(Number(found)) ? null : Number(found)
2046
2049
  } catch {
2047
2050
  this.captionValue = null
@@ -2049,6 +2052,51 @@ export default {
2049
2052
  }
2050
2053
  },
2051
2054
 
2055
+ /**
2056
+ * The whole days from the earliest `field` date among the matching
2057
+ * records to today (`captionSource.metric: "daysSinceEarliest"`):
2058
+ * "longest: 9 days" over the days since each case entered its status.
2059
+ * One list read, ordered by the field, of the first record that has
2060
+ * it. 0 when no record matches, null when the date cannot be read.
2061
+ *
2062
+ * @spec openspec/changes/stat-caption-days-since-earliest/specs/stat-caption-days-since-earliest/spec.md#requirement-a-stat-caption-can-count-the-days-since-the-earliest-date
2063
+ * @param {object} axios The axios instance.
2064
+ * @param {(url: string, params?: object) => string} generateUrl The router helper.
2065
+ * @param {object} s The source (register/schema).
2066
+ * @param {string} field The date field.
2067
+ * @param {object} filter The filter map.
2068
+ * @return {Promise<number|null>} The days, or null.
2069
+ */
2070
+ async fetchDaysSinceEarliest(axios, generateUrl, s, field, filter) {
2071
+ if (typeof field !== 'string' || field === '') {
2072
+ return null
2073
+ }
2074
+ const params = {}
2075
+ for (const [key, value] of Object.entries(this.resolveSourceFilter(filter))) {
2076
+ if (value === null) {
2077
+ params[`${key}[isnull]`] = 'true'
2078
+ } else if (value && typeof value === 'object' && !Array.isArray(value)) {
2079
+ for (const [op, operand] of Object.entries(value)) {
2080
+ params[`${key}[${op}]`] = operand
2081
+ }
2082
+ } else if (value !== '' && value !== undefined) {
2083
+ params[key] = value
2084
+ }
2085
+ }
2086
+ params[`${field}[isnull]`] = 'false'
2087
+ params[`_order[${field}]`] = 'asc'
2088
+ params._limit = 1
2089
+ const url = generateUrl('/apps/openregister/api/objects/{register}/{schema}', { register: s.register, schema: s.schema })
2090
+ const res = await axios.get(url, { params })
2091
+ const first = Array.isArray(res?.data?.results) ? res.data.results[0] : undefined
2092
+ if (!first) {
2093
+ return 0
2094
+ }
2095
+ const raw = first[field] !== undefined ? first[field] : first['@self']?.[field]
2096
+ const days = daysUntil(raw, new Date())
2097
+ return days === null ? null : Math.max(0, -days)
2098
+ },
2099
+
2052
2100
  /**
2053
2101
  * Read the limit's own count (`content.limitSource`: `{ register?,
2054
2102
  * schema?, metric?, field?, filter?, via? }`, register and schema
@@ -3,7 +3,11 @@
3
3
  SPDX-License-Identifier: EUPL-1.2
4
4
  -->
5
5
  <template>
6
- <div class="cn-week-strip" :class="{ 'cn-week-strip--inset': inset }" data-testid="cn-week-strip">
6
+ <div
7
+ class="cn-week-strip"
8
+ :class="{ 'cn-week-strip--inset': inset }"
9
+ :lang="lang"
10
+ data-testid="cn-week-strip">
7
11
  <div v-if="loading" class="cn-week-strip__state" role="status">
8
12
  <NcLoadingIcon :size="20" />
9
13
  <span class="cn-week-strip__state-text">{{ loadingLabel }}</span>
@@ -128,9 +132,11 @@ export default {
128
132
  /**
129
133
  * The widget's configuration. `days` is `5` (working days, the
130
134
  * default) or `7`. `source` names the OpenRegister register and schema,
131
- * with an optional `filter` (the shared @-token grammar) and `limit`.
132
- * `dateField` is the field the items are bucketed by. `titleField` and
133
- * `metaFields` pick what each item shows. `itemRoute` is the route name
135
+ * with an optional `filter` (the shared @-token grammar), `limit` and
136
+ * `extend` (relations OpenRegister inlines, so a meta field can read
137
+ * `caseType.title`). `dateField` is the field the items are bucketed
138
+ * by. `titleField` and `metaFields` pick what each item shows; a meta
139
+ * entry that is a list of fields shows the first one that is filled. `itemRoute` is the route name
134
140
  * an item links to (with the record id as `params.id`). `lateWhen` is a
135
141
  * `{ op, value }` rule on the days until the date (default: before
136
142
  * today), `lateField` a boolean field that marks a record late.
@@ -138,13 +144,16 @@ export default {
138
144
  * `emptyText` is the text of a day without items. `weekOffset` moves
139
145
  * the strip whole weeks from the current one. `inset: true` draws the
140
146
  * strip inside the board's inset (16px above, 24px at the sides, 22px
141
- * below) instead of from card edge to card edge. `maxPerDay` caps the
147
+ * below) instead of from card edge to card edge. `lang` is the language
148
+ * of the item texts (a BCP 47 tag such as `nl`), so long words
149
+ * hyphenate by that language's rules; without it they follow the page.
150
+ * `maxPerDay` caps the
142
151
  * items a day shows; the rest sit behind "+N more", a link to
143
152
  * `moreRoute` (a route name or object) or, without one, a button that
144
153
  * opens the day in place. `moreLabel` replaces the text (`{count}` is
145
154
  * the number hidden).
146
155
  *
147
- * @type {{maxPerDay?: number, moreRoute?: (string|object), moreLabel?: string, days?: (5|7), inset?: boolean, source?: {register?: string, schema?: string, filter?: object, limit?: number}, dateField?: string, titleField?: string, metaFields?: Array<string>, itemRoute?: string, lateWhen?: {op?: string, value?: number}, lateField?: string, items?: Array<{title: string, meta?: string, date: string, route?: (string|object), href?: string, late?: boolean}>, emptyText?: string, weekOffset?: number}}
156
+ * @type {{lang?: string, maxPerDay?: number, moreRoute?: (string|object), moreLabel?: string, days?: (5|7), inset?: boolean, source?: {register?: string, schema?: string, filter?: object, limit?: number, extend?: Array<string>}, dateField?: string, titleField?: string, metaFields?: Array<(string|Array<string>)>, itemRoute?: string, lateWhen?: {op?: string, value?: number}, lateField?: string, items?: Array<{title: string, meta?: string, date: string, route?: (string|object), href?: string, late?: boolean}>, emptyText?: string, weekOffset?: number}}
148
157
  */
149
158
  content: {
150
159
  type: Object,
@@ -196,6 +205,18 @@ export default {
196
205
  return Boolean(this.content && this.content.inset === true)
197
206
  },
198
207
 
208
+ /**
209
+ * The language of the item texts (`content.lang`), or null to follow
210
+ * the page. Only a language tag is taken.
211
+ *
212
+ * @spec openspec/changes/week-strip-titles-hyphenate/specs/week-strip-titles-hyphenate/spec.md#requirement-a-week-strip-item-hyphenates-its-words
213
+ * @return {string|null}
214
+ */
215
+ lang() {
216
+ const value = this.content && this.content.lang
217
+ return typeof value === 'string' && /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(value) ? value : null
218
+ },
219
+
199
220
  /**
200
221
  * The translate function in use.
201
222
  *
@@ -498,9 +519,8 @@ export default {
498
519
  : objectDisplayName(row)
499
520
  const metaFields = Array.isArray(c.metaFields) ? c.metaFields : []
500
521
  const meta = metaFields
501
- .map((field) => objectFieldValue(row, field))
502
- .filter((value) => value !== undefined && value !== null && value !== '' && typeof value !== 'object')
503
- .map(String)
522
+ .map((field) => this.metaValue(row, field))
523
+ .filter((value) => value !== '')
504
524
  .join(' · ')
505
525
  const flagged = c.lateField ? objectFieldValue(row, c.lateField) === true : false
506
526
  const target = (c.itemRoute && id) ? { name: c.itemRoute, params: { id } } : null
@@ -515,6 +535,26 @@ export default {
515
535
  }
516
536
  },
517
537
 
538
+ /**
539
+ * The text of one meta entry: the field's value, or for a list of
540
+ * fields the first that holds a plain value. '' when none does.
541
+ *
542
+ * @param {object} row The record.
543
+ * @param {string|Array<string>} field A field path, or alternatives in order.
544
+ * @return {string}
545
+ * @spec openspec/changes/week-strip-meta-through-relation/specs/week-strip-meta-through-relation/spec.md#requirement-a-week-strip-item-can-name-a-field-of-a-related-record
546
+ */
547
+ metaValue(row, field) {
548
+ const fields = Array.isArray(field) ? field : [field]
549
+ for (const one of fields) {
550
+ const value = objectFieldValue(row, one)
551
+ if (value !== undefined && value !== null && value !== '' && typeof value !== 'object') {
552
+ return String(value)
553
+ }
554
+ }
555
+ return ''
556
+ },
557
+
518
558
  /**
519
559
  * One static manifest entry as a strip item.
520
560
  *
@@ -577,6 +617,10 @@ export default {
577
617
  _limit: Number.isInteger(s.limit) && s.limit > 0 ? s.limit : DEFAULT_LIMIT,
578
618
  [`_order[${this.dateField}]`]: 'asc',
579
619
  }
620
+ const extend = Array.isArray(s.extend) ? s.extend.filter((e) => typeof e === 'string' && e !== '') : []
621
+ if (extend.length > 0) {
622
+ params._extend = extend
623
+ }
580
624
  const filter = resolveFilterTokens(s.filter || {}, {})
581
625
  for (const [k, v] of Object.entries(filter || {})) {
582
626
  if (v && typeof v === 'object') {
@@ -777,15 +821,22 @@ export default {
777
821
  box-shadow: inset 3px 0 0 0 var(--color-element-error, var(--color-error));
778
822
  }
779
823
 
824
+ /* A long word in a narrow day breaks at a syllable with a hyphen, in the
825
+ language of the page or of `content.lang` ("Parkeer-vergunningen"). A word
826
+ the browser cannot hyphenate still breaks anywhere rather than overflow. */
780
827
  .cn-week-strip__title {
781
828
  font-size: 0.95em;
782
829
  line-height: 1.3;
830
+ -webkit-hyphens: auto;
831
+ hyphens: auto;
783
832
  overflow-wrap: anywhere;
784
833
  }
785
834
 
786
835
  .cn-week-strip__meta {
787
836
  font-size: 0.85em;
788
837
  color: var(--color-text-maxcontrast);
838
+ -webkit-hyphens: auto;
839
+ hyphens: auto;
789
840
  overflow-wrap: anywhere;
790
841
  }
791
842
 
@@ -1034,16 +1034,20 @@
1034
1034
  line (the theme's label weight token set to 600 here), the control 40px,
1035
1035
  21px of room above it so the raised label does not rise over what stands
1036
1036
  above (DqZaakEmail "E-mailsjabloon": NcSelect drew
1037
- the label inside a 44px field, 15px/700). The quick filter bar's dropdown
1038
- keeps NcSelect's own look.
1037
+ the label inside a 44px field, 15px/700). A plain CnDetailCard is a page
1038
+ card too (PqKassa "Prijsweergave", "Betaalwijze"). The quick filter bar's
1039
+ dropdown keeps NcSelect's own look.
1039
1040
  @spec openspec/changes/board-page-select-label-above/specs/board-page-select-label-above/spec.md#requirement-a-labelled-select-in-a-board-page-card-carries-its-label-above */
1040
- .cn-look-board .cn-detail-widget-host .v-select:not(.cn-quick-filter-bar__select):has(.input-field__label):not(.cn-look-nextcloud *) {
1041
+ .cn-look-board .cn-detail-widget-host .v-select:not(.cn-quick-filter-bar__select):has(.input-field__label):not(.cn-look-nextcloud *),
1042
+ .cn-look-board .cn-detail-card .v-select:not(.cn-quick-filter-bar__select):has(.input-field__label):not(.cn-look-nextcloud *) {
1041
1043
  --nldesign-component-form-field-label-font-weight: 600;
1042
1044
  margin-block: 21px 0;
1043
1045
  }
1044
1046
 
1045
1047
  .cn-look-board .cn-detail-widget-host .v-select:not(.cn-quick-filter-bar__select) .input-field__input + .input-field__label.input-field__label:not(.cn-look-nextcloud *),
1046
- .cn-look-board .cn-detail-widget-host .nc-select.v-select.select:not(.cn-quick-filter-bar__select) .vs__selected-options:has(.vs__selected) .vs__search .input-field__input + .input-field__label.input-field__label:not(.cn-look-nextcloud *) {
1048
+ .cn-look-board .cn-detail-widget-host .nc-select.v-select.select:not(.cn-quick-filter-bar__select) .vs__selected-options:has(.vs__selected) .vs__search .input-field__input + .input-field__label.input-field__label:not(.cn-look-nextcloud *),
1049
+ .cn-look-board .cn-detail-card .v-select:not(.cn-quick-filter-bar__select) .input-field__input + .input-field__label.input-field__label:not(.cn-look-nextcloud *),
1050
+ .cn-look-board .cn-detail-card .nc-select.v-select.select:not(.cn-quick-filter-bar__select) .vs__selected-options:has(.vs__selected) .vs__search .input-field__input + .input-field__label.input-field__label:not(.cn-look-nextcloud *) {
1047
1051
  inset-block-start: auto;
1048
1052
  inset-block-end: calc(100% + 4px);
1049
1053
  inset-inline: 0 auto;
@@ -1059,7 +1063,8 @@
1059
1063
  transition: none;
1060
1064
  }
1061
1065
 
1062
- .cn-look-board .cn-detail-widget-host .v-select:not(.cn-quick-filter-bar__select):has(.input-field__label) .input-field__main-wrapper:not(.cn-look-nextcloud *) {
1066
+ .cn-look-board .cn-detail-widget-host .v-select:not(.cn-quick-filter-bar__select):has(.input-field__label) .input-field__main-wrapper:not(.cn-look-nextcloud *),
1067
+ .cn-look-board .cn-detail-card .v-select:not(.cn-quick-filter-bar__select):has(.input-field__label) .input-field__main-wrapper:not(.cn-look-nextcloud *) {
1063
1068
  height: calc(var(--cn-field-height, 40px) + 2 * var(--border-width-input-focused, 2px));
1064
1069
  }
1065
1070
 
@@ -2026,6 +2031,8 @@
2026
2031
 
2027
2032
  .cn-look-board .cn-files-browser__side-card:not(.cn-look-nextcloud *) .cn-files-browser__side-facts {
2028
2033
  gap: 8px 16px;
2034
+ /* Nextcloud core pads every dl 12px 0. */
2035
+ padding: 0;
2029
2036
  }
2030
2037
 
2031
2038
  .cn-look-board .cn-files-browser__side-card:not(.cn-look-nextcloud *) .cn-files-browser__side-facts dd {
@@ -3,7 +3,7 @@
3
3
  "$id": "https://raw.githubusercontent.com/ConductionNL/nextcloud-vue/main/src/schemas/app-manifest-v2.schema.json",
4
4
  "title": "Conduction App Manifest v2",
5
5
  "description": "v2 schema for the JSON-driven page and navigation manifest consumed by @conduction/nextcloud-vue. Introduces a uniform widgets[] array on every page type with a per-slot grid coordinate system, a typed actions[] discriminator, and the required $schema field for version detection. v1 manifests continue to validate against app-manifest.schema.json (unchanged).",
6
- "version": "2.167.0",
6
+ "version": "2.168.0",
7
7
  "type": "object",
8
8
  "required": ["$schema", "version"],
9
9
  "allOf": [
@@ -3060,12 +3060,13 @@
3060
3060
  "register": { "type": "string" },
3061
3061
  "schema": { "type": "string" },
3062
3062
  "filter": { "type": "object", "additionalProperties": true },
3063
- "limit": { "type": "integer", "minimum": 1, "description": "Cap on the records fetched for the week (default 100)." }
3063
+ "limit": { "type": "integer", "minimum": 1, "description": "Cap on the records fetched for the week (default 100)." },
3064
+ "extend": { "type": "array", "items": { "type": "string" }, "description": "Relations OpenRegister inlines on each record (`_extend`), so a meta field can read a field of the related record, e.g. caseType.title." }
3064
3065
  }
3065
3066
  },
3066
3067
  "dateField": { "type": "string", "description": "The field the items are bucketed by. Required with a source." },
3067
3068
  "titleField": { "type": "string", "description": "The field shown as the item title. Defaults to the object's display name." },
3068
- "metaFields": { "type": "array", "items": { "type": "string" }, "description": "Fields shown under the title." },
3069
+ "metaFields": { "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" }, "minItems": 1 }] }, "description": "Fields shown under the title, joined with a middle dot. An entry that is a list of fields shows the first one that is filled (e.g. [\"caseType.shortName\", \"caseType.title\"])." },
3069
3070
  "itemRoute": { "type": "string", "description": "Route name an item links to; the record id goes in params.id." },
3070
3071
  "lateWhen": {
3071
3072
  "type": "object",
@@ -3096,6 +3097,7 @@
3096
3097
  },
3097
3098
  "emptyText": { "type": "string", "description": "Text of a day without items." },
3098
3099
  "weekOffset": { "type": "integer", "description": "Whole weeks from the current one (1 = next week)." },
3100
+ "lang": { "type": "string", "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$", "description": "Language of the item texts (BCP 47, e.g. nl), so long words hyphenate by its rules. Without it they follow the page." },
3099
3101
  "inset": { "type": "boolean", "default": false, "description": "Draw the strip inside the board's inset (16px above, 24px at the sides, 22px below) instead of from card edge to card edge (zuiddrecht-pixel-gaps-3). Theme hook --cn-widget-board-inset." }
3100
3102
  }
3101
3103
  }
@@ -68,7 +68,8 @@ function formatEnd(date, locale, options) {
68
68
  * The chip text for a range: "{from} through {to}", "from {from}" or "up to {to}".
69
69
  * Date ends get day and month in the locale; the month is written once when
70
70
  * both ends share month and year, the year only when an end is not in the
71
- * current one. Other values are written as they are.
71
+ * current one. An `@today` or `@today±Nd` end is written as the date it
72
+ * stands for. Other values are written as they are.
72
73
  *
73
74
  * @param {unknown} from The lower end, or null.
74
75
  * @param {unknown} to The upper end, or null.
@@ -77,10 +78,11 @@ function formatEnd(date, locale, options) {
77
78
  * @param {string} [options.locale] BCP 47 locale; the environment's when omitted.
78
79
  * @param {Date} [options.now] What counts as now, for the current year.
79
80
  * @return {string} The text.
81
+ * @spec openspec/changes/range-chip-reads-today-tokens/specs/range-chip-reads-today-tokens/spec.md#requirement-a-range-chip-writes-today-tokens-as-dates
80
82
  */
81
83
  export function rangeChipText(from, to, { translate, locale, now = new Date() }) {
82
- const fromDate = asDate(from)
83
- const toDate = asDate(to)
84
+ const fromDate = endDay(from, now)
85
+ const toDate = endDay(to, now)
84
86
  const year = now.getFullYear()
85
87
  const withYear = (fromDate && fromDate.getFullYear() !== year) || (toDate && toDate.getFullYear() !== year)
86
88
  const full = withYear ? { day: 'numeric', month: 'long', year: 'numeric' } : { day: 'numeric', month: 'long' }