@conduction/nextcloud-vue 2.174.0 → 2.176.1

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 (203) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +114 -11
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +67 -17
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue.js +9 -0
  7. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue.js.map +1 -0
  8. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue2.js +352 -0
  9. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue2.js.map +1 -0
  10. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue3.js +266 -0
  11. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue3.js.map +1 -0
  12. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
  13. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +323 -7
  14. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
  15. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js +113 -59
  16. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
  17. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue.js +1 -1
  18. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue2.js +210 -5
  19. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue2.js.map +1 -1
  20. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue3.js +134 -46
  21. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue3.js.map +1 -1
  22. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue.js +9 -0
  23. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue.js.map +1 -0
  24. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue2.js +385 -0
  25. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue2.js.map +1 -0
  26. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue3.js +277 -0
  27. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue3.js.map +1 -0
  28. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
  29. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js +175 -20
  30. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
  31. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js +30 -8
  32. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
  33. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue.js +1 -1
  34. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue2.js +72 -6
  35. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue2.js.map +1 -1
  36. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue3.js +48 -14
  37. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue3.js.map +1 -1
  38. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue.js +1 -1
  39. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js +255 -10
  40. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js.map +1 -1
  41. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js +70 -28
  42. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js.map +1 -1
  43. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +55 -6
  44. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  45. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  46. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue.js +9 -0
  47. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue.js.map +1 -0
  48. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue2.js +175 -0
  49. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue2.js.map +1 -0
  50. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue3.js +114 -0
  51. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue3.js.map +1 -0
  52. package/dist/esm/components/CnDurationField/CnDurationField.vue.js +1 -1
  53. package/dist/esm/components/CnDurationField/CnDurationField.vue2.js +218 -4
  54. package/dist/esm/components/CnDurationField/CnDurationField.vue2.js.map +1 -1
  55. package/dist/esm/components/CnDurationField/CnDurationField.vue3.js +133 -44
  56. package/dist/esm/components/CnDurationField/CnDurationField.vue3.js.map +1 -1
  57. package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
  58. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  59. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +5 -1
  60. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  61. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue.js +9 -0
  62. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue.js.map +1 -0
  63. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue2.js +113 -0
  64. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue2.js.map +1 -0
  65. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue3.js +43 -0
  66. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue3.js.map +1 -0
  67. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +40 -1
  68. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  69. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  70. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue.js +1 -1
  71. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js +110 -1
  72. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js.map +1 -1
  73. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js +60 -18
  74. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js.map +1 -1
  75. package/dist/esm/components/CnMenuTreeNode/CnMenuTreeNode.vue2.js +2 -2
  76. package/dist/esm/components/CnMenuTreeNode/CnMenuTreeNode.vue2.js.map +1 -1
  77. package/dist/esm/components/CnObjectKanban/CnObjectKanban.vue2.js +2 -2
  78. package/dist/esm/components/CnObjectKanban/CnObjectKanban.vue2.js.map +1 -1
  79. package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js +2 -2
  80. package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js.map +1 -1
  81. package/dist/esm/components/CnQrCode/CnQrCode.vue.js +9 -0
  82. package/dist/esm/components/CnQrCode/CnQrCode.vue.js.map +1 -0
  83. package/dist/esm/components/CnQrCode/CnQrCode.vue2.js +241 -0
  84. package/dist/esm/components/CnQrCode/CnQrCode.vue2.js.map +1 -0
  85. package/dist/esm/components/CnQrCode/CnQrCode.vue3.js +75 -0
  86. package/dist/esm/components/CnQrCode/CnQrCode.vue3.js.map +1 -0
  87. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue.js +1 -1
  88. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue2.js +34 -3
  89. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue2.js.map +1 -1
  90. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue3.js +81 -19
  91. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue3.js.map +1 -1
  92. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  93. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +11 -0
  94. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  95. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +112 -88
  96. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  97. package/dist/esm/components/CnRevealField/CnRevealField.vue.js +9 -0
  98. package/dist/esm/components/CnRevealField/CnRevealField.vue.js.map +1 -0
  99. package/dist/esm/components/CnRevealField/CnRevealField.vue2.js +157 -0
  100. package/dist/esm/components/CnRevealField/CnRevealField.vue2.js.map +1 -0
  101. package/dist/esm/components/CnRevealField/CnRevealField.vue3.js +116 -0
  102. package/dist/esm/components/CnRevealField/CnRevealField.vue3.js.map +1 -0
  103. package/dist/esm/components/CnStorePage/CnStorePage.vue.js +1 -1
  104. package/dist/esm/components/CnStorePage/CnStorePage.vue2.js +3 -3
  105. package/dist/esm/components/CnStorePage/CnStorePage.vue2.js.map +1 -1
  106. package/dist/esm/components/CnStorePage/CnStorePage.vue3.js +5 -5
  107. package/dist/esm/components/CnStorePage/CnStorePage.vue3.js.map +1 -1
  108. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue.js +1 -1
  109. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue2.js +6 -6
  110. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue2.js.map +1 -1
  111. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue3.js +1 -1
  112. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue3.js.map +1 -1
  113. package/dist/esm/components/CnTextWidget/CnTextWidget.vue.js +1 -1
  114. package/dist/esm/components/CnTextWidget/CnTextWidget.vue2.js +43 -3
  115. package/dist/esm/components/CnTextWidget/CnTextWidget.vue2.js.map +1 -1
  116. package/dist/esm/components/CnTextWidget/CnTextWidget.vue3.js +19 -12
  117. package/dist/esm/components/CnTextWidget/CnTextWidget.vue3.js.map +1 -1
  118. package/dist/esm/components/CnTransferCard/CnTransferCard.vue.js +9 -0
  119. package/dist/esm/components/CnTransferCard/CnTransferCard.vue.js.map +1 -0
  120. package/dist/esm/components/CnTransferCard/CnTransferCard.vue2.js +87 -0
  121. package/dist/esm/components/CnTransferCard/CnTransferCard.vue2.js.map +1 -0
  122. package/dist/esm/components/CnTransferCard/CnTransferCard.vue3.js +126 -0
  123. package/dist/esm/components/CnTransferCard/CnTransferCard.vue3.js.map +1 -0
  124. package/dist/esm/components/CnTreeView/CnTreeNode.vue.js +1 -1
  125. package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js +66 -1
  126. package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js.map +1 -1
  127. package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js +129 -29
  128. package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js.map +1 -1
  129. package/dist/esm/components/CnTreeView/CnTreeView.vue.js +1 -1
  130. package/dist/esm/components/CnTreeView/CnTreeView.vue2.js +158 -6
  131. package/dist/esm/components/CnTreeView/CnTreeView.vue2.js.map +1 -1
  132. package/dist/esm/components/CnTreeView/CnTreeView.vue3.js +100 -39
  133. package/dist/esm/components/CnTreeView/CnTreeView.vue3.js.map +1 -1
  134. package/dist/esm/index.js +8 -0
  135. package/dist/esm/index.js.map +1 -1
  136. package/dist/esm/l10n/en.json.js +79 -14
  137. package/dist/esm/l10n/en.json.js.map +1 -1
  138. package/dist/esm/l10n/nl.json.js +79 -14
  139. package/dist/esm/l10n/nl.json.js.map +1 -1
  140. package/dist/esm/library-style.js +1 -1
  141. package/dist/esm/nextcloud-vue.css +1162 -523
  142. package/dist/esm/node_modules/vuedraggable/dist/vuedraggable.umd.js +2 -2
  143. package/dist/esm/utils/captureLocation.js +32 -0
  144. package/dist/esm/utils/captureLocation.js.map +1 -0
  145. package/dist/esm/utils/childRecordTotals.js +157 -0
  146. package/dist/esm/utils/childRecordTotals.js.map +1 -0
  147. package/dist/esm/utils/isoDuration.js +51 -1
  148. package/dist/esm/utils/isoDuration.js.map +1 -1
  149. package/dist/esm/utils/parentCrumb.js +86 -0
  150. package/dist/esm/utils/parentCrumb.js.map +1 -0
  151. package/dist/esm/utils/qr.js +649 -0
  152. package/dist/esm/utils/qr.js.map +1 -0
  153. package/dist/esm/utils/schema.js +3 -0
  154. package/dist/esm/utils/schema.js.map +1 -1
  155. package/dist/esm/utils/templateVariables.js +54 -0
  156. package/dist/esm/utils/templateVariables.js.map +1 -0
  157. package/dist/nextcloud-vue.cjs.js +21125 -15025
  158. package/dist/nextcloud-vue.cjs.js.map +2 -2
  159. package/dist/nextcloud-vue.css +1162 -523
  160. package/l10n/en.json +79 -14
  161. package/l10n/nl.json +79 -14
  162. package/package.json +1 -1
  163. package/src/components/CnActionDialog/CnActionDialog.vue +156 -9
  164. package/src/components/CnBlockListEditor/CnBlockListEditor.vue +615 -0
  165. package/src/components/CnBlockListEditor/index.js +9 -0
  166. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +377 -10
  167. package/src/components/CnChildRecordsField/CnChildRecordsField.vue +306 -15
  168. package/src/components/CnChoiceMatrix/CnChoiceMatrix.vue +710 -0
  169. package/src/components/CnChoiceMatrix/index.js +9 -0
  170. package/src/components/CnCountdownWidget/CnCountdownWidget.vue +223 -28
  171. package/src/components/CnCreateFormWidget/CnCreateFormWidget.vue +97 -6
  172. package/src/components/CnDataMatrix/CnDataMatrix.vue +304 -17
  173. package/src/components/CnDetailPage/CnDetailPage.vue +55 -6
  174. package/src/components/CnDisplayScreen/CnDisplayScreen.vue +308 -0
  175. package/src/components/CnDisplayScreen/index.js +9 -0
  176. package/src/components/CnDurationField/CnDurationField.vue +330 -5
  177. package/src/components/CnFormDialog/CnFormDialog.vue +4 -0
  178. package/src/components/CnGeoCaptureField/CnGeoCaptureField.vue +148 -0
  179. package/src/components/CnGeoCaptureField/index.js +9 -0
  180. package/src/components/CnIndexPage/CnIndexPage.vue +40 -1
  181. package/src/components/CnMarkdownEditor/CnMarkdownEditor.vue +139 -1
  182. package/src/components/CnQrCode/CnQrCode.vue +321 -0
  183. package/src/components/CnQrCode/index.js +9 -0
  184. package/src/components/CnReadinessChecklist/CnReadinessChecklist.vue +80 -3
  185. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +34 -1
  186. package/src/components/CnRevealField/CnRevealField.vue +273 -0
  187. package/src/components/CnRevealField/index.js +9 -0
  188. package/src/components/CnStorePage/CnStorePage.vue +8 -8
  189. package/src/components/CnStorePage/CnStorePublishDialog.vue +7 -7
  190. package/src/components/CnTextWidget/CnTextWidget.vue +62 -3
  191. package/src/components/CnTransferCard/CnTransferCard.vue +205 -0
  192. package/src/components/CnTransferCard/index.js +9 -0
  193. package/src/components/CnTreeView/CnTreeNode.vue +145 -2
  194. package/src/components/CnTreeView/CnTreeView.vue +210 -6
  195. package/src/components/index.js +7 -0
  196. package/src/index.js +8 -0
  197. package/src/utils/captureLocation.js +29 -0
  198. package/src/utils/childRecordTotals.js +153 -0
  199. package/src/utils/isoDuration.js +50 -0
  200. package/src/utils/parentCrumb.js +83 -0
  201. package/src/utils/qr.js +681 -0
  202. package/src/utils/schema.js +3 -0
  203. package/src/utils/templateVariables.js +51 -0
@@ -0,0 +1,273 @@
1
+ <!--
2
+ - SPDX-FileCopyrightText: 2026 Conduction B.V.
3
+ - SPDX-License-Identifier: EUPL-1.2
4
+ -->
5
+ <template>
6
+ <div class="cn-reveal-field" data-testid="cn-reveal-field">
7
+ <div class="cn-reveal-field__row">
8
+ <span :id="labelId" class="cn-reveal-field__label">{{ label }}</span>
9
+ <span
10
+ class="cn-reveal-field__value"
11
+ :class="{ 'cn-reveal-field__value--masked': !revealed }"
12
+ :aria-labelledby="labelId"
13
+ aria-live="polite"
14
+ data-testid="cn-reveal-value">{{ revealed ? revealedValue : maskedValue }}</span>
15
+ <NcButton
16
+ v-if="!askingReason"
17
+ variant="tertiary"
18
+ :aria-label="revealed ? t('nextcloud-vue', 'Hide {label}', { label }) : t('nextcloud-vue', 'Show {label}', { label })"
19
+ :disabled="loading"
20
+ data-testid="cn-reveal-toggle"
21
+ @click="toggle">
22
+ <template v-if="loading" #icon>
23
+ <NcLoadingIcon :size="20" />
24
+ </template>
25
+ {{ revealed ? t('nextcloud-vue', 'Hide') : t('nextcloud-vue', 'Show') }}
26
+ </NcButton>
27
+ </div>
28
+
29
+ <form
30
+ v-if="askingReason"
31
+ class="cn-reveal-field__reason"
32
+ data-testid="cn-reveal-reason"
33
+ @submit.prevent="submitReason">
34
+ <NcTextField
35
+ ref="reasonField"
36
+ :modelValue="reason"
37
+ :label="reasonLabel || t('nextcloud-vue', 'Why do you need to see this?')"
38
+ required
39
+ data-testid="cn-reveal-reason-input"
40
+ @update:modelValue="reason = $event" />
41
+ <div class="cn-reveal-field__reason-actions">
42
+ <NcButton variant="tertiary" data-testid="cn-reveal-reason-cancel" @click="cancelReason">
43
+ {{ t('nextcloud-vue', 'Cancel') }}
44
+ </NcButton>
45
+ <NcButton
46
+ type="submit"
47
+ variant="primary"
48
+ :disabled="reason.trim() === '' || loading"
49
+ data-testid="cn-reveal-reason-submit">
50
+ {{ t('nextcloud-vue', 'Show') }}
51
+ </NcButton>
52
+ </div>
53
+ </form>
54
+
55
+ <p v-if="error"
56
+ class="cn-reveal-field__error"
57
+ role="alert"
58
+ data-testid="cn-reveal-error">
59
+ {{ error }}
60
+ </p>
61
+ <p v-if="note" class="cn-reveal-field__note" data-testid="cn-reveal-note">
62
+ {{ note }}
63
+ </p>
64
+ </div>
65
+ </template>
66
+
67
+ <script>
68
+ import { translate as t } from '@nextcloud/l10n'
69
+ import { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue'
70
+
71
+ let uid = 0
72
+
73
+ /**
74
+ * CnRevealField — a protected value shown masked until the user asks to see
75
+ * it (board DqContact: "BSN *****4001 Tonen", "Het tonen van het BSN wordt
76
+ * gelogd.").
77
+ *
78
+ * The component never holds the value until the user asks: `load` fetches it
79
+ * on every reveal, so the server can log each viewing. With `requireReason`
80
+ * the user first states why, and `load` receives that reason. Hide masks the
81
+ * value again and drops it; the next Show calls `load` again.
82
+ *
83
+ * ```vue
84
+ * <CnRevealField
85
+ * label="BSN"
86
+ * masked-value="*****4001"
87
+ * :load="(reason) => api.revealBsn(person.id, reason)"
88
+ * require-reason
89
+ * note="Het tonen van het BSN wordt gelogd." />
90
+ * ```
91
+ *
92
+ * @event revealed Emitted once the value shows, with `{ reason }`.
93
+ * @event hidden Emitted when the user masks the value again.
94
+ */
95
+ export default {
96
+ name: 'CnRevealField',
97
+
98
+ components: {
99
+ NcButton,
100
+ NcLoadingIcon,
101
+ NcTextField,
102
+ },
103
+
104
+ props: {
105
+ /** What the value is, already translated ("BSN"). */
106
+ label: { type: String, required: true },
107
+ /** What shows while the value is hidden, such as the last digits behind stars. */
108
+ maskedValue: { type: String, default: '••••••' },
109
+ /**
110
+ * Fetches the value: `(reason) => string | Promise<string>`. Called on
111
+ * every reveal; `reason` is '' unless `requireReason` is set.
112
+ */
113
+ load: { type: Function, required: true },
114
+ /** Ask why the user needs the value before it is fetched. */
115
+ requireReason: { type: Boolean, default: false },
116
+ /** Label of the reason field, already translated; the library default is "Why do you need to see this?". */
117
+ reasonLabel: { type: String, default: '' },
118
+ /** A line under the value, already translated, such as that showing it is logged. */
119
+ note: { type: String, default: '' },
120
+ },
121
+
122
+ emits: ['revealed', 'hidden'],
123
+
124
+ data() {
125
+ uid += 1
126
+ return {
127
+ labelId: `cn-reveal-field-${uid}`,
128
+ revealed: false,
129
+ revealedValue: '',
130
+ askingReason: false,
131
+ reason: '',
132
+ loading: false,
133
+ error: '',
134
+ }
135
+ },
136
+
137
+ methods: {
138
+ t,
139
+
140
+ /**
141
+ * Show or hide the value. Showing asks the reason first when
142
+ * `requireReason` is set.
143
+ *
144
+ * @return {Promise<void>|void}
145
+ */
146
+ toggle() {
147
+ if (this.revealed) {
148
+ this.hide()
149
+ return undefined
150
+ }
151
+ if (this.requireReason) {
152
+ this.askingReason = true
153
+ this.error = ''
154
+ this.$nextTick(() => this.$refs.reasonField?.focus?.())
155
+ return undefined
156
+ }
157
+ return this.reveal('')
158
+ },
159
+
160
+ /**
161
+ * Reveal with the typed reason.
162
+ *
163
+ * @return {Promise<void>|void}
164
+ */
165
+ submitReason() {
166
+ const reason = this.reason.trim()
167
+ if (reason === '') {
168
+ return undefined
169
+ }
170
+ return this.reveal(reason)
171
+ },
172
+
173
+ /**
174
+ * Close the reason form without fetching.
175
+ *
176
+ * @return {void}
177
+ */
178
+ cancelReason() {
179
+ this.askingReason = false
180
+ this.reason = ''
181
+ },
182
+
183
+ /**
184
+ * Fetch the value through `load` and show it; a failure keeps the
185
+ * value masked and says so.
186
+ *
187
+ * @param {string} reason Why the user asked, or ''.
188
+ * @return {Promise<void>}
189
+ */
190
+ async reveal(reason) {
191
+ this.loading = true
192
+ this.error = ''
193
+ try {
194
+ const value = await this.load(reason)
195
+ if (value === null || value === undefined || value === '') {
196
+ throw new Error('empty')
197
+ }
198
+ this.revealedValue = String(value)
199
+ this.revealed = true
200
+ this.askingReason = false
201
+ this.reason = ''
202
+ this.$emit('revealed', { reason })
203
+ } catch {
204
+ this.error = t('nextcloud-vue', 'The value could not be shown. Try again later.')
205
+ } finally {
206
+ this.loading = false
207
+ }
208
+ },
209
+
210
+ /**
211
+ * Mask the value again and drop it.
212
+ *
213
+ * @return {void}
214
+ */
215
+ hide() {
216
+ this.revealed = false
217
+ this.revealedValue = ''
218
+ this.$emit('hidden')
219
+ },
220
+ },
221
+ }
222
+ </script>
223
+
224
+ <style scoped>
225
+ .cn-reveal-field {
226
+ display: flex;
227
+ flex-direction: column;
228
+ gap: 6px;
229
+ }
230
+
231
+ .cn-reveal-field__row {
232
+ align-items: center;
233
+ display: flex;
234
+ flex-wrap: wrap;
235
+ gap: 4px 12px;
236
+ }
237
+
238
+ .cn-reveal-field__label {
239
+ color: var(--color-text-maxcontrast);
240
+ }
241
+
242
+ .cn-reveal-field__value {
243
+ font-variant-numeric: tabular-nums;
244
+ font-weight: 500;
245
+ }
246
+
247
+ .cn-reveal-field__value--masked {
248
+ letter-spacing: 0.08em;
249
+ }
250
+
251
+ .cn-reveal-field__reason {
252
+ display: flex;
253
+ flex-direction: column;
254
+ gap: 8px;
255
+ }
256
+
257
+ .cn-reveal-field__reason-actions {
258
+ display: flex;
259
+ gap: 8px;
260
+ justify-content: flex-end;
261
+ }
262
+
263
+ .cn-reveal-field__error {
264
+ color: var(--color-error-text, var(--color-error));
265
+ margin: 0;
266
+ }
267
+
268
+ .cn-reveal-field__note {
269
+ color: var(--color-text-maxcontrast);
270
+ font-size: 0.9em;
271
+ margin: 0;
272
+ }
273
+ </style>
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: 2026 Conduction B.V.
3
+ * SPDX-License-Identifier: EUPL-1.2
4
+ */
5
+
6
+ import CnRevealField from './CnRevealField.vue'
7
+
8
+ export { CnRevealField }
9
+ export default CnRevealField
@@ -114,8 +114,8 @@
114
114
  v-model="query"
115
115
  type="search"
116
116
  class="cn-store-page__lens-search-input"
117
- :placeholder="t('nextcloud-vue', 'Search the store')"
118
- :aria-label="t('nextcloud-vue', 'Search the store')"
117
+ :placeholder="t('nextcloud-vue', 'Search the marketplace')"
118
+ :aria-label="t('nextcloud-vue', 'Search the marketplace')"
119
119
  :disabled="offline"
120
120
  data-testid="store-search"
121
121
  @input="onSearchInput">
@@ -124,7 +124,7 @@
124
124
  <div v-else class="cn-store-page__controls">
125
125
  <NcTextField
126
126
  v-model="query"
127
- :label="t('nextcloud-vue', 'Search the store')"
127
+ :label="t('nextcloud-vue', 'Search the marketplace')"
128
128
  :disabled="offline"
129
129
  data-testid="store-search"
130
130
  @update:modelValue="onSearchInput" />
@@ -294,10 +294,10 @@
294
294
  <aside v-if="isBoardLook && !loading && !offline && !unreachable" class="cn-store-page__aside">
295
295
  <section class="cn-store-page__side-card" data-testid="store-installed">
296
296
  <h2 class="cn-store-page__side-title">
297
- {{ t('nextcloud-vue', 'Installed from this store') }}
297
+ {{ t('nextcloud-vue', 'Installed from this marketplace') }}
298
298
  </h2>
299
299
  <p v-if="installedCards.length === 0" class="cn-store-page__side-note">
300
- {{ t('nextcloud-vue', 'Nothing from this store is installed yet.') }}
300
+ {{ t('nextcloud-vue', 'Nothing from this marketplace is installed yet.') }}
301
301
  </p>
302
302
  <ul v-else class="cn-store-page__installed">
303
303
  <li v-for="card in installedCards" :key="card.slug">
@@ -625,7 +625,7 @@ export default {
625
625
  * @return {string} The heading to render.
626
626
  */
627
627
  resolvedTitle() {
628
- return this.title || this.page?.title || t('nextcloud-vue', 'Store')
628
+ return this.title || this.page?.title || t('nextcloud-vue', 'Marketplace')
629
629
  },
630
630
 
631
631
  /**
@@ -924,7 +924,7 @@ export default {
924
924
  notConfiguredMessage() {
925
925
  const base = t(
926
926
  'nextcloud-vue',
927
- 'No store registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.',
927
+ 'No marketplace registry is configured, so nothing was requested from the network. An administrator can connect one under Administration settings.',
928
928
  )
929
929
 
930
930
  return this.builtIn.length > 0
@@ -938,7 +938,7 @@ export default {
938
938
  * @return {string} The unreachable note.
939
939
  */
940
940
  unreachableMessage() {
941
- const base = t('nextcloud-vue', 'The store registry did not answer.')
941
+ const base = t('nextcloud-vue', 'The marketplace registry did not answer.')
942
942
 
943
943
  return this.builtIn.length > 0
944
944
  ? `${base} ${t('nextcloud-vue', 'The items below ship with this app.')}`
@@ -18,7 +18,7 @@
18
18
  -->
19
19
  <template>
20
20
  <CnDialog
21
- :name="t('nextcloud-vue', 'Publish to the store')"
21
+ :name="t('nextcloud-vue', 'Publish to the marketplace')"
22
22
  :subtitle="t('nextcloud-vue', 'Share a template built from your own configuration with the registry.')"
23
23
  data-testid="store-publish-dialog"
24
24
  @closing="$emit('close')">
@@ -223,7 +223,7 @@ export default {
223
223
  })
224
224
  const body = await response.json()
225
225
  if (body.outcome === 'ok') {
226
- showSuccess(t('nextcloud-vue', 'Published to the store.'))
226
+ showSuccess(t('nextcloud-vue', 'Published to the marketplace.'))
227
227
  this.$emit('published', body.slug)
228
228
  return
229
229
  }
@@ -244,14 +244,14 @@ export default {
244
244
  */
245
245
  outcomeMessage(body, status) {
246
246
  if (status === 403) {
247
- return t('nextcloud-vue', 'You may not publish to this store.')
247
+ return t('nextcloud-vue', 'You may not publish to this marketplace.')
248
248
  }
249
249
  const messages = {
250
- not_configured: t('nextcloud-vue', 'No store registry is configured. An administrator connects one under Administration settings.'),
251
- store_unreachable: t('nextcloud-vue', 'The store registry did not answer. Try again later.'),
252
- store_rejected: t('nextcloud-vue', 'The store registry refused the item.'),
250
+ not_configured: t('nextcloud-vue', 'No marketplace registry is configured. An administrator connects one under Administration settings.'),
251
+ store_unreachable: t('nextcloud-vue', 'The marketplace registry did not answer. Try again later.'),
252
+ store_rejected: t('nextcloud-vue', 'The marketplace registry refused the item.'),
253
253
  too_large: t('nextcloud-vue', 'The item is too large to publish.'),
254
- rate_limited: t('nextcloud-vue', 'The store registry is busy. Try again in a minute.'),
254
+ rate_limited: t('nextcloud-vue', 'The marketplace registry is busy. Try again in a minute.'),
255
255
  }
256
256
  return messages[body?.outcome] || body?.message || t('nextcloud-vue', 'The item could not be published.')
257
257
  },
@@ -48,6 +48,11 @@
48
48
  </tr>
49
49
  </tbody>
50
50
  </table>
51
+ <pre
52
+ v-else-if="monospace && hasText"
53
+ class="cn-text-widget__mono"
54
+ data-testid="cn-text-widget-mono"
55
+ :style="monoStyle">{{ text }}</pre>
51
56
  <div
52
57
  v-else-if="hasText"
53
58
  class="cn-text-widget__content"
@@ -127,6 +132,11 @@ function ensureDomPurifyHook() {
127
132
  * attributes. Merge-swallowed cells are hidden via `v-show` so the visual
128
133
  * grid stays rectangular.
129
134
  *
135
+ * With `monospace: true` the text is shown as typed, in a fixed-width font
136
+ * with its spaces and line breaks kept, and is never parsed as HTML or
137
+ * markdown: a receipt or a log line. `textField` reads the text from that
138
+ * field of the detail page's object instead of `text`.
139
+ *
130
140
  * Registered as the `text` dashboard widget type via the renderer's
131
141
  * `index.js`.
132
142
  */
@@ -143,26 +153,61 @@ export default {
143
153
  props: {
144
154
  /**
145
155
  * Persisted widget content blob: `{text, fontSize, color,
146
- * backgroundColor, textAlign, contentMode, tableMode, tableData, link}`.
156
+ * backgroundColor, textAlign, contentMode, tableMode, tableData, link,
157
+ * monospace, textField}`.
147
158
  * All keys are optional; missing keys collapse to documented defaults.
148
159
  * `text` and `link.label` go through the app's translate function.
149
160
  * `link` is `{label, route}` (a page id, or a path starting with `/`) or
150
161
  * `{label, href}` (an external URL), drawn under the text.
162
+ * `monospace` shows the text as typed in a fixed-width font;
163
+ * `textField` reads the text from that field of `objectData`.
151
164
  *
152
- * @type {{text: string, fontSize: string, color: string, backgroundColor: string, textAlign: string, contentMode: string, tableMode: boolean, tableData: object, link: {label: string, route: string, href: string}}}
165
+ * @type {{text: string, fontSize: string, color: string, backgroundColor: string, textAlign: string, contentMode: string, tableMode: boolean, tableData: object, link: {label: string, route: string, href: string}, monospace: boolean, textField: string}}
153
166
  */
154
167
  content: {
155
168
  type: Object,
156
169
  default: () => ({}),
157
170
  },
171
+
172
+ /** The detail page's object, which `content.textField` reads from. */
173
+ objectData: {
174
+ type: Object,
175
+ default: null,
176
+ },
158
177
  },
159
178
 
160
179
  computed: {
161
- /** The author text through the app's translate function, or '' when absent / non-string. */
180
+ /**
181
+ * The text: `content.textField` of the object as it is, else `content.text` translated; '' when absent.
182
+ *
183
+ * @spec openspec/changes/text-widget-monospace/tasks.md#task-2
184
+ */
162
185
  text() {
186
+ const field = this.content?.textField
187
+ if (typeof field === 'string' && field !== '') {
188
+ const value = this.objectData?.[field]
189
+ return value === undefined || value === null ? '' : String(value)
190
+ }
163
191
  return typeof this.content?.text === 'string' ? this.tr(this.content.text) : ''
164
192
  },
165
193
 
194
+ /**
195
+ * Whether the text shows as typed, in a fixed-width font.
196
+ *
197
+ * @spec openspec/changes/text-widget-monospace/tasks.md#task-1
198
+ */
199
+ monospace() {
200
+ return this.content?.monospace === true
201
+ },
202
+
203
+ /** Inline style for the fixed-width text. */
204
+ monoStyle() {
205
+ return {
206
+ 'font-size': this.fontSize,
207
+ color: this.color,
208
+ }
209
+ },
210
+
166
211
  /**
167
212
  * The link under the text, from `content.link`: `{ label, route }`
168
213
  * (a page id, or a router path when it starts with `/`) or
@@ -438,6 +483,20 @@ export default {
438
483
  }
439
484
 
440
485
  .cn-text-widget__content,
486
+ .cn-text-widget__mono {
487
+ width: 100%;
488
+ margin: 0;
489
+ padding: 12px;
490
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
491
+ line-height: 1.4;
492
+ white-space: pre-wrap;
493
+ overflow-wrap: anywhere;
494
+ text-align: start;
495
+ background: var(--color-background-dark);
496
+ border: 1px solid var(--color-border);
497
+ border-radius: var(--border-radius);
498
+ }
499
+
441
500
  .cn-text-widget__placeholder {
442
501
  /* Safety net — ensures long URLs / words inside the sanitised HTML wrap
443
502
  rather than overflowing horizontally. */
@@ -0,0 +1,205 @@
1
+ <!--
2
+ - SPDX-FileCopyrightText: 2026 Conduction B.V.
3
+ - SPDX-License-Identifier: EUPL-1.2
4
+ -->
5
+ <template>
6
+ <section class="cn-transfer-card" data-testid="cn-transfer-card">
7
+ <header v-if="title || subtitle" class="cn-transfer-card__header">
8
+ <h3 v-if="title" class="cn-transfer-card__title">
9
+ {{ title }}
10
+ </h3>
11
+ <span v-if="subtitle" class="cn-transfer-card__muted">{{ subtitle }}</span>
12
+ </header>
13
+
14
+ <div class="cn-transfer-card__progress">
15
+ <span class="cn-transfer-card__line">
16
+ <strong data-testid="cn-transfer-amount">{{ amountText }}</strong>
17
+ <span v-if="remainingText && !paused" class="cn-transfer-card__muted" data-testid="cn-transfer-remaining">{{ remainingText }}</span>
18
+ </span>
19
+ <NcProgressBar
20
+ :value="percent"
21
+ :aria-label="amountText"
22
+ data-testid="cn-transfer-bar" />
23
+ <span v-if="hint" class="cn-transfer-card__muted" data-testid="cn-transfer-hint">{{ hint }}</span>
24
+ </div>
25
+
26
+ <p v-if="paused"
27
+ class="cn-transfer-card__paused"
28
+ role="status"
29
+ data-testid="cn-transfer-paused">
30
+ {{ pausedText || t('nextcloud-vue', 'The connection dropped. It carries on from where it stopped.') }}
31
+ </p>
32
+
33
+ <ul v-if="items.length > 0" class="cn-transfer-card__items">
34
+ <li v-for="item in items"
35
+ :key="item.id ?? item.label"
36
+ class="cn-transfer-card__item"
37
+ data-testid="cn-transfer-item">
38
+ <span>{{ item.label }}</span>
39
+ <span class="cn-transfer-card__muted">{{ item.state }}</span>
40
+ </li>
41
+ </ul>
42
+
43
+ <div v-if="paused || $slots.actions" class="cn-transfer-card__actions">
44
+ <NcButton v-if="paused"
45
+ variant="primary"
46
+ data-testid="cn-transfer-resume"
47
+ @click="$emit('resume')">
48
+ {{ resumeLabel || t('nextcloud-vue', 'Resume') }}
49
+ </NcButton>
50
+ <!-- @slot actions Further buttons under the card. -->
51
+ <slot name="actions" />
52
+ </div>
53
+
54
+ <p v-if="note" class="cn-transfer-card__muted cn-transfer-card__note" data-testid="cn-transfer-note">
55
+ {{ note }}
56
+ </p>
57
+ </section>
58
+ </template>
59
+
60
+ <script>
61
+ import { translate as t } from '@nextcloud/l10n'
62
+ import { NcButton, NcProgressBar } from '@nextcloud/vue'
63
+
64
+ /**
65
+ * CnTransferCard: a transfer that takes a while, such as taking a day's work
66
+ * offline (board DqInspectie "Dag synchroniseren": "32 MB van 48 MB gedownload",
67
+ * "nog ca. 6 minuten", a row per part, and resuming after a dropped connection).
68
+ *
69
+ * The host owns the transfer and passes where it stands. The card holds no
70
+ * state, so the same card serves a download, an upload or a sync.
71
+ *
72
+ * ```vue
73
+ * <CnTransferCard
74
+ * title="Sync the day"
75
+ * :done="32"
76
+ * :total="48"
77
+ * unit="MB"
78
+ * remaining-text="about 6 minutes left"
79
+ * :items="[{ id: 'cases', label: 'Cases of 4 addresses', state: 'Done' }]"
80
+ * @resume="resume" />
81
+ * ```
82
+ *
83
+ * @event resume The user pressed Resume on a paused transfer.
84
+ * @spec openspec/changes/transfer-card/specs/transfer-card/spec.md
85
+ */
86
+ export default {
87
+ name: 'CnTransferCard',
88
+
89
+ components: { NcButton, NcProgressBar },
90
+
91
+ props: {
92
+ /** Title, already translated. */
93
+ title: { type: String, default: '' },
94
+ /** A line under the title, already translated. */
95
+ subtitle: { type: String, default: '' },
96
+ /** How much has been transferred. */
97
+ done: { type: Number, default: 0 },
98
+ /** How much there is in total. */
99
+ total: { type: Number, default: 0 },
100
+ /** The unit of `done` and `total`, such as "MB". */
101
+ unit: { type: String, default: '' },
102
+ /** The amount line, already translated, with `{done}`, `{total}` and `{unit}`; the library default is "{done} {unit} of {total} {unit}". */
103
+ amountTemplate: { type: String, default: '' },
104
+ /** How long it will still take, already translated. */
105
+ remainingText: { type: String, default: '' },
106
+ /** A line under the bar, already translated. */
107
+ hint: { type: String, default: '' },
108
+ /** The parts: `{ id?, label, state }`, both already translated. */
109
+ items: { type: Array, default: () => [] },
110
+ /** The transfer stopped and can carry on. */
111
+ paused: { type: Boolean, default: false },
112
+ /** Says why it stopped, already translated. */
113
+ pausedText: { type: String, default: '' },
114
+ /** Label of the Resume button, already translated. */
115
+ resumeLabel: { type: String, default: '' },
116
+ /** A line at the end of the card, already translated. */
117
+ note: { type: String, default: '' },
118
+ },
119
+
120
+ emits: ['resume'],
121
+
122
+ computed: {
123
+ /** @return {number} Progress in percent, from 0 to 100; 0 with no total. */
124
+ percent() {
125
+ if (!(this.total > 0)) {
126
+ return 0
127
+ }
128
+ return Math.min(100, Math.max(0, Math.round((this.done / this.total) * 100)))
129
+ },
130
+
131
+ /** @return {string} The amount in words. */
132
+ amountText() {
133
+ const values = { done: String(this.done), total: String(this.total), unit: this.unit }
134
+ if (this.amountTemplate) {
135
+ return this.amountTemplate.replace(/\{(done|total|unit)\}/g, (match, key) => values[key])
136
+ }
137
+ return t('nextcloud-vue', '{done} {unit} of {total} {unit}', values)
138
+ },
139
+ },
140
+
141
+ methods: {
142
+ t,
143
+ },
144
+ }
145
+ </script>
146
+
147
+ <style scoped>
148
+ .cn-transfer-card {
149
+ background: var(--color-main-background);
150
+ border: 1px solid var(--color-border);
151
+ border-radius: var(--border-radius-large);
152
+ display: flex;
153
+ flex-direction: column;
154
+ gap: 12px;
155
+ padding: 16px 20px;
156
+ }
157
+
158
+ .cn-transfer-card__header,
159
+ .cn-transfer-card__progress {
160
+ display: flex;
161
+ flex-direction: column;
162
+ gap: 4px;
163
+ }
164
+
165
+ .cn-transfer-card__title {
166
+ font-size: 1.1em;
167
+ margin: 0;
168
+ }
169
+
170
+ .cn-transfer-card__muted {
171
+ color: var(--color-text-maxcontrast);
172
+ }
173
+
174
+ .cn-transfer-card__line,
175
+ .cn-transfer-card__item {
176
+ display: flex;
177
+ flex-wrap: wrap;
178
+ gap: 4px 12px;
179
+ justify-content: space-between;
180
+ }
181
+
182
+ .cn-transfer-card__paused,
183
+ .cn-transfer-card__note {
184
+ margin: 0;
185
+ }
186
+
187
+ .cn-transfer-card__items {
188
+ display: flex;
189
+ flex-direction: column;
190
+ list-style: none;
191
+ margin: 0;
192
+ padding: 0;
193
+ }
194
+
195
+ .cn-transfer-card__item {
196
+ border-top: 1px solid var(--color-border);
197
+ padding: 8px 0;
198
+ }
199
+
200
+ .cn-transfer-card__actions {
201
+ display: flex;
202
+ flex-wrap: wrap;
203
+ gap: 8px;
204
+ }
205
+ </style>