@conduction/nextcloud-vue 2.151.0 → 2.153.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 (147) hide show
  1. package/dist/esm/components/CnAiCompanion/CnAiFloatingButton.vue2.js +13 -1
  2. package/dist/esm/components/CnAiCompanion/CnAiFloatingButton.vue2.js.map +1 -1
  3. package/dist/esm/components/CnAiCompanion/CnAiFloatingButton.vue3.js +1 -1
  4. package/dist/esm/components/CnAiCompanion/CnAiFloatingButton.vue3.js.map +1 -1
  5. package/dist/esm/components/CnAiCompanion/CnAiInput.vue2.js.map +1 -1
  6. package/dist/esm/components/CnAiCompanion/CnAiInput.vue3.js.map +1 -1
  7. package/dist/esm/components/CnAttentionFlagWidget/CnAttentionFlagWidget.vue.js +1 -1
  8. package/dist/esm/components/CnAttentionFlagWidget/CnAttentionFlagWidget.vue2.js.map +1 -1
  9. package/dist/esm/components/CnAttentionFlagWidget/CnAttentionFlagWidget.vue3.js +1 -1
  10. package/dist/esm/components/CnAttentionFlagWidget/CnAttentionFlagWidget.vue3.js.map +1 -1
  11. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
  12. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +30 -5
  13. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
  14. package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
  15. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue.js +1 -1
  16. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js +38 -0
  17. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js.map +1 -1
  18. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js.map +1 -1
  19. package/dist/esm/components/CnConversationThread/CnConversationThread.vue.js +1 -1
  20. package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js +2 -1
  21. package/dist/esm/components/CnConversationThread/CnConversationThread.vue2.js.map +1 -1
  22. package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js +33 -25
  23. package/dist/esm/components/CnConversationThread/CnConversationThread.vue3.js.map +1 -1
  24. package/dist/esm/components/CnConversationThread/CnConversationWidget.vue.js +1 -1
  25. package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js +22 -2
  26. package/dist/esm/components/CnConversationThread/CnConversationWidget.vue2.js.map +1 -1
  27. package/dist/esm/components/CnConversationThread/CnConversationWidget.vue3.js.map +1 -1
  28. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  29. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  30. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  31. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js +1 -1
  32. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js +7 -1
  33. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js.map +1 -1
  34. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js.map +1 -1
  35. package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue.js +1 -1
  36. package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue2.js +2 -1
  37. package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue2.js.map +1 -1
  38. package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue3.js +6 -2
  39. package/dist/esm/components/CnExportsWidget/CnExportsWidget.vue3.js.map +1 -1
  40. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue.js +1 -1
  41. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js.map +1 -1
  42. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js.map +1 -1
  43. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue.js +1 -1
  44. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js +3 -1
  45. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
  46. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js +31 -9
  47. package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
  48. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +21 -3
  49. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  50. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  51. package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
  52. package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +20 -0
  53. package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
  54. package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
  55. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue.js +1 -1
  56. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js.map +1 -1
  57. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js.map +1 -1
  58. package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue.js +1 -1
  59. package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue2.js +18 -1
  60. package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue2.js.map +1 -1
  61. package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue3.js +4 -2
  62. package/dist/esm/components/CnPlanWidget/CnPlanWidget.vue3.js.map +1 -1
  63. package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue.js +1 -1
  64. package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue2.js +25 -3
  65. package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue2.js.map +1 -1
  66. package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue3.js +1 -1
  67. package/dist/esm/components/CnPlanWidget/CnPlanWidgetRow.vue3.js.map +1 -1
  68. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  69. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +31 -1
  70. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  71. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +102 -97
  72. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  73. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue.js +1 -1
  74. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue2.js +33 -0
  75. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue2.js.map +1 -1
  76. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue3.js +2 -2
  77. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue3.js.map +1 -1
  78. package/dist/esm/components/CnSettingsField/CnSettingsField.vue.js +1 -1
  79. package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js +2 -1
  80. package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js.map +1 -1
  81. package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js +15 -13
  82. package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js.map +1 -1
  83. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue.js +1 -1
  84. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js +27 -0
  85. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js.map +1 -1
  86. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js +6 -6
  87. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js.map +1 -1
  88. package/dist/esm/components/CnStepper/CnStepper.vue.js +1 -1
  89. package/dist/esm/components/CnStepper/CnStepper.vue2.js.map +1 -1
  90. package/dist/esm/components/CnStepper/CnStepper.vue3.js.map +1 -1
  91. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue.js +1 -1
  92. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue2.js.map +1 -1
  93. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue3.js +14 -14
  94. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue3.js.map +1 -1
  95. package/dist/esm/composables/indexSources.js +4 -1
  96. package/dist/esm/composables/indexSources.js.map +1 -1
  97. package/dist/esm/l10n/en.json.js +30 -1
  98. package/dist/esm/l10n/en.json.js.map +1 -1
  99. package/dist/esm/l10n/nl.json.js +31 -2
  100. package/dist/esm/l10n/nl.json.js.map +1 -1
  101. package/dist/esm/library-style.js +1 -1
  102. package/dist/esm/nextcloud-vue.css +1129 -567
  103. package/dist/esm/utils/fillTemplate.js +12 -2
  104. package/dist/esm/utils/fillTemplate.js.map +1 -1
  105. package/dist/esm/utils/libraryTranslate.js +19 -1
  106. package/dist/esm/utils/libraryTranslate.js.map +1 -1
  107. package/dist/esm/utils/savedViewSummary.js +109 -4
  108. package/dist/esm/utils/savedViewSummary.js.map +1 -1
  109. package/dist/nextcloud-vue.cjs.js +1096 -592
  110. package/dist/nextcloud-vue.cjs.js.map +2 -2
  111. package/dist/nextcloud-vue.css +1129 -567
  112. package/l10n/en.json +30 -1
  113. package/l10n/nl.json +31 -2
  114. package/package.json +1 -1
  115. package/src/components/CnAiCompanion/CnAiFloatingButton.vue +14 -2
  116. package/src/components/CnAiCompanion/CnAiInput.vue +19 -0
  117. package/src/components/CnAttentionFlagWidget/CnAttentionFlagWidget.vue +7 -1
  118. package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +30 -5
  119. package/src/components/CnBannerWidget/CnBannerWidget.vue +38 -0
  120. package/src/components/CnConversationThread/CnConversationThread.vue +7 -1
  121. package/src/components/CnConversationThread/CnConversationWidget.vue +22 -2
  122. package/src/components/CnDashboardPage/CnDashboardPage.vue +17 -0
  123. package/src/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue +16 -1
  124. package/src/components/CnExportsWidget/CnExportsWidget.vue +5 -1
  125. package/src/components/CnFeaturesBoard/CnFeaturesBoard.vue +2 -0
  126. package/src/components/CnFieldListWidget/CnFieldListWidget.vue +18 -4
  127. package/src/components/CnIndexPage/CnIndexPage.vue +21 -3
  128. package/src/components/CnMapWidget/CnMapWidget.vue +20 -0
  129. package/src/components/CnNotificationMatrix/CnNotificationMatrix.vue +23 -0
  130. package/src/components/CnPlanWidget/CnPlanWidget.vue +20 -1
  131. package/src/components/CnPlanWidget/CnPlanWidgetRow.vue +26 -4
  132. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +73 -5
  133. package/src/components/CnSavedViewLookFields/CnSavedViewLookFields.vue +35 -2
  134. package/src/components/CnSettingsField/CnSettingsField.vue +5 -3
  135. package/src/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue +31 -4
  136. package/src/components/CnStepper/CnStepper.vue +7 -5
  137. package/src/components/CnTimelineWidget/CnTimelineManage.vue +9 -4
  138. package/src/composables/indexSources.js +4 -1
  139. package/src/css/dialog.css +18 -3
  140. package/src/css/form-field.css +11 -0
  141. package/src/css/look-board-detail.css +124 -1
  142. package/src/css/look-board-index.css +75 -9
  143. package/src/css/look-board.css +242 -6
  144. package/src/css/patches.css +5 -5
  145. package/src/utils/fillTemplate.js +12 -2
  146. package/src/utils/libraryTranslate.js +18 -0
  147. package/src/utils/savedViewSummary.js +109 -4
@@ -2,7 +2,7 @@ import script from './CnSavedViewLookFields.vue2.js';
2
2
  import { render } from './CnSavedViewLookFields.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-4ca6e8b8";
5
+ script.__scopeId = "data-v-6fab246c";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -77,6 +77,39 @@ var script = {
77
77
 
78
78
  t: translate,
79
79
 
80
+ /**
81
+ * The accessible name of an icon option: what it shows, in words.
82
+ *
83
+ * @param {string} name An icon name.
84
+ * @return {string} Its label, or the name when it has none.
85
+ * @spec openspec/changes/saved-view-icon-labels/specs/saved-view-icon-labels/spec.md#requirement-an-icon-option-is-named-in-words
86
+ */
87
+ iconLabel(name) {
88
+ const labels = {
89
+ FilterVariant: translate('nextcloud-vue', 'Filter'),
90
+ ClockOutline: translate('nextcloud-vue', 'Clock'),
91
+ ClockAlertOutline: translate('nextcloud-vue', 'Clock with warning'),
92
+ CalendarClockOutline: translate('nextcloud-vue', 'Calendar with clock'),
93
+ CalendarOutline: translate('nextcloud-vue', 'Calendar'),
94
+ AccountOutline: translate('nextcloud-vue', 'Person'),
95
+ AccountGroupOutline: translate('nextcloud-vue', 'Group'),
96
+ FolderOutline: translate('nextcloud-vue', 'Folder'),
97
+ FileDocumentOutline: translate('nextcloud-vue', 'Document'),
98
+ AlertCircleOutline: translate('nextcloud-vue', 'Attention'),
99
+ CheckCircleOutline: translate('nextcloud-vue', 'Ready'),
100
+ EmailOutline: translate('nextcloud-vue', 'Email'),
101
+ MapMarkerOutline: translate('nextcloud-vue', 'Location'),
102
+ TagOutline: translate('nextcloud-vue', 'Label'),
103
+ BellOutline: translate('nextcloud-vue', 'Bell'),
104
+ ScaleBalance: translate('nextcloud-vue', 'Scales'),
105
+ BriefcaseOutline: translate('nextcloud-vue', 'Briefcase'),
106
+ EyeOutline: translate('nextcloud-vue', 'Eye'),
107
+ LockOutline: translate('nextcloud-vue', 'Lock'),
108
+ CurrencyEur: translate('nextcloud-vue', 'Euro'),
109
+ };
110
+ return labels[name] || name
111
+ },
112
+
80
113
  /**
81
114
  * @param {string} name An icon name.
82
115
  * @return {object|null} Its component.
@@ -1 +1 @@
1
- {"version":3,"file":"CnSavedViewLookFields.vue2.js","sources":["../../../../src/components/CnSavedViewLookFields/CnSavedViewLookFields.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-saved-view-look\" data-testid=\"cn-saved-view-look-fields\">\n\t\t<NcTextField\n\t\t\t:modelValue=\"description\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\t:helperText=\"t('nextcloud-vue', 'Shown when you point at the view in the menu.')\"\n\t\t\tdata-testid=\"cn-saved-view-description\"\n\t\t\t@update:modelValue=\"onDescription\" />\n\t\t<div\n\t\t\tclass=\"cn-saved-view-look__icons\"\n\t\t\trole=\"radiogroup\"\n\t\t\t:aria-label=\"t('nextcloud-vue', 'Icon')\"\n\t\t\tdata-testid=\"cn-saved-view-icon\">\n\t\t\t<span class=\"cn-saved-view-look__label\" aria-hidden=\"true\">{{ t('nextcloud-vue', 'Icon') }}</span>\n\t\t\t<button\n\t\t\t\tv-for=\"name in iconNames\"\n\t\t\t\t:key=\"name\"\n\t\t\t\ttype=\"button\"\n\t\t\t\trole=\"radio\"\n\t\t\t\tclass=\"cn-saved-view-look__icon\"\n\t\t\t\t:class=\"{ 'cn-saved-view-look__icon--chosen': name === chosenIcon }\"\n\t\t\t\t:aria-checked=\"name === chosenIcon ? 'true' : 'false'\"\n\t\t\t\t:aria-label=\"name\"\n\t\t\t\t:title=\"name\"\n\t\t\t\t:data-icon=\"name\"\n\t\t\t\t@click=\"onIcon(name)\">\n\t\t\t\t<component :is=\"componentOf(name)\" :size=\"20\" />\n\t\t\t</button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcTextField } from '@nextcloud/vue'\nimport { SAVED_VIEW_ICONS, SAVED_VIEW_MENU_DEFAULT_ICON } from '../../utils/savedViewMenu.js'\nimport { getSemanticIconComponent } from '../CnIcon/semanticIcons.js'\n\n/**\n * CnSavedViewLookFields — a saved view's description and icon, in the save\n * and edit dialogs. The description is the tooltip on the view's menu entry;\n * the icon stands before it in the menu. The icons are a short list from the\n * shared semantic vocabulary, so every one resolves in the menu without the\n * app registering it. Choosing the menu's own default icon stores none.\n *\n * @event {string} update:description The typed description.\n * @event {string} update:icon The chosen icon name, '' for the default.\n * @spec openspec/changes/saved-view-icon-description-count/specs/saved-view-icon-description-count/spec.md#requirement-a-saved-view-has-an-icon-and-a-description\n */\nexport default {\n\tname: 'CnSavedViewLookFields',\n\n\tcomponents: { NcTextField },\n\n\tprops: {\n\t\t/** The view's description. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The view's icon name, '' for the menu's default. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:description', 'update:icon'],\n\n\tcomputed: {\n\t\t/** @return {string} The icon the menu falls back to. */\n\t\tdefaultIcon() {\n\t\t\treturn SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\n\t\t/** @return {Array<string>} The icons offered, the default first. */\n\t\ticonNames() {\n\t\t\treturn SAVED_VIEW_ICONS\n\t\t},\n\n\t\t/** @return {string} The icon shown as chosen. */\n\t\tchosenIcon() {\n\t\t\treturn this.icon && SAVED_VIEW_ICONS.includes(this.icon) ? this.icon : SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Pass the typed description on.\n\t\t *\n\t\t * @param {string} value The description.\n\t\t * @return {void}\n\t\t */\n\t\tonDescription(value) {\n\t\t\t/** @event update:description The typed description. */\n\t\t\tthis.$emit('update:description', value)\n\t\t},\n\n\t\t/**\n\t\t * Pass the chosen icon on; the menu's own default icon is stored as none.\n\t\t *\n\t\t * @param {string} name The icon name.\n\t\t * @return {void}\n\t\t */\n\t\tonIcon(name) {\n\t\t\t/** @event update:icon The chosen icon name, '' for the menu's default. */\n\t\t\tthis.$emit('update:icon', name === this.defaultIcon ? '' : name)\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * @param {string} name An icon name.\n\t\t * @return {object|null} Its component.\n\t\t */\n\t\tcomponentOf(name) {\n\t\t\treturn getSemanticIconComponent(name)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-saved-view-look {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-saved-view-look__icons {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n}\n\n.cn-saved-view-look__label {\n\tflex: 0 0 100%;\n\tfont-weight: 600;\n}\n\n.cn-saved-view-look__icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--default-clickable-area);\n\theight: var(--default-clickable-area);\n\tpadding: 0;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-element, 8px);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tcursor: pointer;\n}\n\n.cn-saved-view-look__icon--chosen {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-saved-view-look__icon:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n}\n</style>\n"],"names":["t"],"mappings":";;;;;AA2CA;AACC;AACA;;AAEA;;AAEA;;;AAGA;;AAED,aAAe;CACd,IAAI,EAAE,uBAAuB;;CAE7B,UAAU,EAAE,EAAE,WAAU,EAAG;;AAE3B,CAAA,KAAK,EAAE;;EAEN,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;EACA,IAAI,EAAE;GACL,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;EACD;;AAED,CAAA,KAAK,EAAE,CAAC,oBAAoB,EAAE,aAAa,CAAC;;AAE5C,CAAA,QAAQ,EAAE;AACT;EACA,WAAW,GAAG;AACb,GAAA,OAAO,4BAA2B;GAClC;;;EAGD,SAAS,GAAG;AACX,GAAA,OAAO,gBAAe;GACtB;;AAED;EACA,UAAU,GAAG;AACZ,GAAA,OAAO,IAAI,CAAC,IAAK,IAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAA,GAAI,IAAI,CAAC,OAAO,4BAA2B;GAClG;EACD;;AAED,CAAA,OAAO,EAAE;AACR;;AAEC;AACA;;;AAGD,EAAA,aAAa,CAAC,KAAK,EAAE;;AAEpB,GAAA,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,EAAA;GACtC;;AAED;;AAEC;AACA;;;EAGD,MAAM,CAAC,IAAI,EAAE;;GAEZ,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,SAAS,IAAI,CAAC,WAAY,GAAE,EAAC,GAAI,IAAI,EAAA;GAC/D;;KAEDA,SAAC;;AAED;;AAEC;;AAED,EAAA,WAAW,CAAC,IAAI,EAAE;AACjB,GAAA,OAAO,wBAAwB,CAAC,IAAI,CAAA;GACpC;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnSavedViewLookFields.vue2.js","sources":["../../../../src/components/CnSavedViewLookFields/CnSavedViewLookFields.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-saved-view-look\" data-testid=\"cn-saved-view-look-fields\">\n\t\t<NcTextField\n\t\t\t:modelValue=\"description\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\t:helperText=\"t('nextcloud-vue', 'Shown when you point at the view in the menu.')\"\n\t\t\tdata-testid=\"cn-saved-view-description\"\n\t\t\t@update:modelValue=\"onDescription\" />\n\t\t<div\n\t\t\tclass=\"cn-saved-view-look__icons\"\n\t\t\trole=\"radiogroup\"\n\t\t\t:aria-label=\"t('nextcloud-vue', 'Icon')\"\n\t\t\tdata-testid=\"cn-saved-view-icon\">\n\t\t\t<span class=\"cn-saved-view-look__label\" aria-hidden=\"true\">{{ t('nextcloud-vue', 'Icon') }}</span>\n\t\t\t<button\n\t\t\t\tv-for=\"name in iconNames\"\n\t\t\t\t:key=\"name\"\n\t\t\t\ttype=\"button\"\n\t\t\t\trole=\"radio\"\n\t\t\t\tclass=\"cn-saved-view-look__icon\"\n\t\t\t\t:class=\"{ 'cn-saved-view-look__icon--chosen': name === chosenIcon }\"\n\t\t\t\t:aria-checked=\"name === chosenIcon ? 'true' : 'false'\"\n\t\t\t\t:aria-label=\"iconLabel(name)\"\n\t\t\t\t:title=\"iconLabel(name)\"\n\t\t\t\t:data-icon=\"name\"\n\t\t\t\t@click=\"onIcon(name)\">\n\t\t\t\t<component :is=\"componentOf(name)\" :size=\"20\" />\n\t\t\t</button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcTextField } from '@nextcloud/vue'\nimport { SAVED_VIEW_ICONS, SAVED_VIEW_MENU_DEFAULT_ICON } from '../../utils/savedViewMenu.js'\nimport { getSemanticIconComponent } from '../CnIcon/semanticIcons.js'\n\n/**\n * CnSavedViewLookFields — a saved view's description and icon, in the save\n * and edit dialogs. The description is the tooltip on the view's menu entry;\n * the icon stands before it in the menu. The icons are a short list from the\n * shared semantic vocabulary, so every one resolves in the menu without the\n * app registering it. Choosing the menu's own default icon stores none.\n *\n * @event {string} update:description The typed description.\n * @event {string} update:icon The chosen icon name, '' for the default.\n * @spec openspec/changes/saved-view-icon-description-count/specs/saved-view-icon-description-count/spec.md#requirement-a-saved-view-has-an-icon-and-a-description\n */\nexport default {\n\tname: 'CnSavedViewLookFields',\n\n\tcomponents: { NcTextField },\n\n\tprops: {\n\t\t/** The view's description. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The view's icon name, '' for the menu's default. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:description', 'update:icon'],\n\n\tcomputed: {\n\t\t/** @return {string} The icon the menu falls back to. */\n\t\tdefaultIcon() {\n\t\t\treturn SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\n\t\t/** @return {Array<string>} The icons offered, the default first. */\n\t\ticonNames() {\n\t\t\treturn SAVED_VIEW_ICONS\n\t\t},\n\n\t\t/** @return {string} The icon shown as chosen. */\n\t\tchosenIcon() {\n\t\t\treturn this.icon && SAVED_VIEW_ICONS.includes(this.icon) ? this.icon : SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Pass the typed description on.\n\t\t *\n\t\t * @param {string} value The description.\n\t\t * @return {void}\n\t\t */\n\t\tonDescription(value) {\n\t\t\t/** @event update:description The typed description. */\n\t\t\tthis.$emit('update:description', value)\n\t\t},\n\n\t\t/**\n\t\t * Pass the chosen icon on; the menu's own default icon is stored as none.\n\t\t *\n\t\t * @param {string} name The icon name.\n\t\t * @return {void}\n\t\t */\n\t\tonIcon(name) {\n\t\t\t/** @event update:icon The chosen icon name, '' for the menu's default. */\n\t\t\tthis.$emit('update:icon', name === this.defaultIcon ? '' : name)\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * The accessible name of an icon option: what it shows, in words.\n\t\t *\n\t\t * @param {string} name An icon name.\n\t\t * @return {string} Its label, or the name when it has none.\n\t\t * @spec openspec/changes/saved-view-icon-labels/specs/saved-view-icon-labels/spec.md#requirement-an-icon-option-is-named-in-words\n\t\t */\n\t\ticonLabel(name) {\n\t\t\tconst labels = {\n\t\t\t\tFilterVariant: t('nextcloud-vue', 'Filter'),\n\t\t\t\tClockOutline: t('nextcloud-vue', 'Clock'),\n\t\t\t\tClockAlertOutline: t('nextcloud-vue', 'Clock with warning'),\n\t\t\t\tCalendarClockOutline: t('nextcloud-vue', 'Calendar with clock'),\n\t\t\t\tCalendarOutline: t('nextcloud-vue', 'Calendar'),\n\t\t\t\tAccountOutline: t('nextcloud-vue', 'Person'),\n\t\t\t\tAccountGroupOutline: t('nextcloud-vue', 'Group'),\n\t\t\t\tFolderOutline: t('nextcloud-vue', 'Folder'),\n\t\t\t\tFileDocumentOutline: t('nextcloud-vue', 'Document'),\n\t\t\t\tAlertCircleOutline: t('nextcloud-vue', 'Attention'),\n\t\t\t\tCheckCircleOutline: t('nextcloud-vue', 'Ready'),\n\t\t\t\tEmailOutline: t('nextcloud-vue', 'Email'),\n\t\t\t\tMapMarkerOutline: t('nextcloud-vue', 'Location'),\n\t\t\t\tTagOutline: t('nextcloud-vue', 'Label'),\n\t\t\t\tBellOutline: t('nextcloud-vue', 'Bell'),\n\t\t\t\tScaleBalance: t('nextcloud-vue', 'Scales'),\n\t\t\t\tBriefcaseOutline: t('nextcloud-vue', 'Briefcase'),\n\t\t\t\tEyeOutline: t('nextcloud-vue', 'Eye'),\n\t\t\t\tLockOutline: t('nextcloud-vue', 'Lock'),\n\t\t\t\tCurrencyEur: t('nextcloud-vue', 'Euro'),\n\t\t\t}\n\t\t\treturn labels[name] || name\n\t\t},\n\n\t\t/**\n\t\t * @param {string} name An icon name.\n\t\t * @return {object|null} Its component.\n\t\t */\n\t\tcomponentOf(name) {\n\t\t\treturn getSemanticIconComponent(name)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-saved-view-look {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-saved-view-look__icons {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n}\n\n.cn-saved-view-look__label {\n\tflex: 0 0 100%;\n\tfont-weight: 600;\n}\n\n.cn-saved-view-look__icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--default-clickable-area);\n\theight: var(--default-clickable-area);\n\tpadding: 0;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-element, 8px);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tcursor: pointer;\n}\n\n.cn-saved-view-look__icon--chosen {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-saved-view-look__ic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ACjB,GAAA,OAAO,wBAAwB,CAAC,IAAI,CAAA;GACpC;EACD;AACF;;;;"}
@@ -37,8 +37,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
37
37
  role: "radio",
38
38
  class: normalizeClass(["cn-saved-view-look__icon", { 'cn-saved-view-look__icon--chosen': name === $options.chosenIcon }]),
39
39
  "aria-checked": name === $options.chosenIcon ? 'true' : 'false',
40
- "aria-label": name,
41
- title: name,
40
+ "aria-label": $options.iconLabel(name),
41
+ title: $options.iconLabel(name),
42
42
  "data-icon": name,
43
43
  onClick: $event => ($options.onIcon(name))
44
44
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"CnSavedViewLookFields.vue3.js","sources":["../../../../src/components/CnSavedViewLookFields/CnSavedViewLookFields.vue?vue&type=template&id=4ca6e8b8&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-saved-view-look\" data-testid=\"cn-saved-view-look-fields\">\n\t\t<NcTextField\n\t\t\t:modelValue=\"description\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\t:helperText=\"t('nextcloud-vue', 'Shown when you point at the view in the menu.')\"\n\t\t\tdata-testid=\"cn-saved-view-description\"\n\t\t\t@update:modelValue=\"onDescription\" />\n\t\t<div\n\t\t\tclass=\"cn-saved-view-look__icons\"\n\t\t\trole=\"radiogroup\"\n\t\t\t:aria-label=\"t('nextcloud-vue', 'Icon')\"\n\t\t\tdata-testid=\"cn-saved-view-icon\">\n\t\t\t<span class=\"cn-saved-view-look__label\" aria-hidden=\"true\">{{ t('nextcloud-vue', 'Icon') }}</span>\n\t\t\t<button\n\t\t\t\tv-for=\"name in iconNames\"\n\t\t\t\t:key=\"name\"\n\t\t\t\ttype=\"button\"\n\t\t\t\trole=\"radio\"\n\t\t\t\tclass=\"cn-saved-view-look__icon\"\n\t\t\t\t:class=\"{ 'cn-saved-view-look__icon--chosen': name === chosenIcon }\"\n\t\t\t\t:aria-checked=\"name === chosenIcon ? 'true' : 'false'\"\n\t\t\t\t:aria-label=\"name\"\n\t\t\t\t:title=\"name\"\n\t\t\t\t:data-icon=\"name\"\n\t\t\t\t@click=\"onIcon(name)\">\n\t\t\t\t<component :is=\"componentOf(name)\" :size=\"20\" />\n\t\t\t</button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcTextField } from '@nextcloud/vue'\nimport { SAVED_VIEW_ICONS, SAVED_VIEW_MENU_DEFAULT_ICON } from '../../utils/savedViewMenu.js'\nimport { getSemanticIconComponent } from '../CnIcon/semanticIcons.js'\n\n/**\n * CnSavedViewLookFields — a saved view's description and icon, in the save\n * and edit dialogs. The description is the tooltip on the view's menu entry;\n * the icon stands before it in the menu. The icons are a short list from the\n * shared semantic vocabulary, so every one resolves in the menu without the\n * app registering it. Choosing the menu's own default icon stores none.\n *\n * @event {string} update:description The typed description.\n * @event {string} update:icon The chosen icon name, '' for the default.\n * @spec openspec/changes/saved-view-icon-description-count/specs/saved-view-icon-description-count/spec.md#requirement-a-saved-view-has-an-icon-and-a-description\n */\nexport default {\n\tname: 'CnSavedViewLookFields',\n\n\tcomponents: { NcTextField },\n\n\tprops: {\n\t\t/** The view's description. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The view's icon name, '' for the menu's default. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:description', 'update:icon'],\n\n\tcomputed: {\n\t\t/** @return {string} The icon the menu falls back to. */\n\t\tdefaultIcon() {\n\t\t\treturn SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\n\t\t/** @return {Array<string>} The icons offered, the default first. */\n\t\ticonNames() {\n\t\t\treturn SAVED_VIEW_ICONS\n\t\t},\n\n\t\t/** @return {string} The icon shown as chosen. */\n\t\tchosenIcon() {\n\t\t\treturn this.icon && SAVED_VIEW_ICONS.includes(this.icon) ? this.icon : SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Pass the typed description on.\n\t\t *\n\t\t * @param {string} value The description.\n\t\t * @return {void}\n\t\t */\n\t\tonDescription(value) {\n\t\t\t/** @event update:description The typed description. */\n\t\t\tthis.$emit('update:description', value)\n\t\t},\n\n\t\t/**\n\t\t * Pass the chosen icon on; the menu's own default icon is stored as none.\n\t\t *\n\t\t * @param {string} name The icon name.\n\t\t * @return {void}\n\t\t */\n\t\tonIcon(name) {\n\t\t\t/** @event update:icon The chosen icon name, '' for the menu's default. */\n\t\t\tthis.$emit('update:icon', name === this.defaultIcon ? '' : name)\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * @param {string} name An icon name.\n\t\t * @return {object|null} Its component.\n\t\t */\n\t\tcomponentOf(name) {\n\t\t\treturn getSemanticIconComponent(name)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-saved-view-look {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-saved-view-look__icons {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n}\n\n.cn-saved-view-look__label {\n\tflex: 0 0 100%;\n\tfont-weight: 600;\n}\n\n.cn-saved-view-look__icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--default-clickable-area);\n\theight: var(--default-clickable-area);\n\tpadding: 0;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-element, 8px);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tcursor: pointer;\n}\n\n.cn-saved-view-look__icon--chosen {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-saved-view-look__icon:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_normalizeClass"],"mappings":";;;AASM,EAAA,KAAK,EAAC,oBAAU;AAAA,EAAA,aAAA,EAAA,2BAAA;;;;AAab,EAAA,KAAK,EAAC,2BAAC;AAAA,EAAA,aAAA,EAAA,MAAA;;;;;;;AAbb,EAAA,QAAAA,SAAA,EAAA,EAAAC,kBAAA,QAAA;IACAC,WAMqC,CAAA,sBAAA,EAAA;AALpC,MAAA,UAAU,EAAE,MAAW,CAAA,WAAA;AACvB,MAAA,KAAK,EAAE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,aAAA,CAAA;AACR,MAAA,YAAC,EAAA,IAAA;AACD,MAAA,UAAU,EAAE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,+CAAA,CAAA;AACd,MAAA,aAAW,EAAC,2BAAI;AACf,MAAA,qBAAiB,EAAE,QAAa,CAAA,aAAA;;IACjCC;AACA,MAAA,OAAM,2BAA2B;AACjC,MAAA,IAAI,EAAC,YAAC;AACL,MAAA,YAAU,EAAE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,MAAA,CAAA;mBACH,EAAA,oBAAA;;wBACE,CAAA,MAAA,YAAA,EAAAC,eAAA,CAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA,EAAA,CAAA,YAAA;sEAEG,QAAS,CAAA,SAAA,EAAA,CAAjB,IAAI,KAAA;;AACV,UAAA,GAAG,EAAE,IAAI;AACV,UAAA,IAAI,EAAC,QAAQ;AACb,UAAA,IAAI,EAAC,OAAO;AACZ,UAAA,KAAK,EAACC,cAAA,CAAA,CAAA,0BAAM,EACI,EAAA,kCAAA,EAAA,IAAA,KAAA,QAAA,CAAA,UAAA,EAAA,CAAA,CAAA;UACf,cAAY,EAAE,IAAI,KAAE,QAAA,CAAA,UAAA,GAAA,MAAA,GAAA,OAAA;AACpB,UAAA,YAAU,EAAE,IAAI;AAChB,UAAA,KAAK,EAAC,IAAA;AACN,UAAA,WAAE,EAAA,IAAA;UACF,OAAC,EAAA,MAAA,KAAA,QAAA,CAAA,MAAA,CAAA,IAAA,CAAA,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnSavedViewLookFields.vue3.js","sources":["../../../../src/components/CnSavedViewLookFields/CnSavedViewLookFields.vue?vue&type=template&id=6fab246c&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-saved-view-look\" data-testid=\"cn-saved-view-look-fields\">\n\t\t<NcTextField\n\t\t\t:modelValue=\"description\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\"\n\t\t\t:labelVisible=\"true\"\n\t\t\t:helperText=\"t('nextcloud-vue', 'Shown when you point at the view in the menu.')\"\n\t\t\tdata-testid=\"cn-saved-view-description\"\n\t\t\t@update:modelValue=\"onDescription\" />\n\t\t<div\n\t\t\tclass=\"cn-saved-view-look__icons\"\n\t\t\trole=\"radiogroup\"\n\t\t\t:aria-label=\"t('nextcloud-vue', 'Icon')\"\n\t\t\tdata-testid=\"cn-saved-view-icon\">\n\t\t\t<span class=\"cn-saved-view-look__label\" aria-hidden=\"true\">{{ t('nextcloud-vue', 'Icon') }}</span>\n\t\t\t<button\n\t\t\t\tv-for=\"name in iconNames\"\n\t\t\t\t:key=\"name\"\n\t\t\t\ttype=\"button\"\n\t\t\t\trole=\"radio\"\n\t\t\t\tclass=\"cn-saved-view-look__icon\"\n\t\t\t\t:class=\"{ 'cn-saved-view-look__icon--chosen': name === chosenIcon }\"\n\t\t\t\t:aria-checked=\"name === chosenIcon ? 'true' : 'false'\"\n\t\t\t\t:aria-label=\"iconLabel(name)\"\n\t\t\t\t:title=\"iconLabel(name)\"\n\t\t\t\t:data-icon=\"name\"\n\t\t\t\t@click=\"onIcon(name)\">\n\t\t\t\t<component :is=\"componentOf(name)\" :size=\"20\" />\n\t\t\t</button>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcTextField } from '@nextcloud/vue'\nimport { SAVED_VIEW_ICONS, SAVED_VIEW_MENU_DEFAULT_ICON } from '../../utils/savedViewMenu.js'\nimport { getSemanticIconComponent } from '../CnIcon/semanticIcons.js'\n\n/**\n * CnSavedViewLookFields — a saved view's description and icon, in the save\n * and edit dialogs. The description is the tooltip on the view's menu entry;\n * the icon stands before it in the menu. The icons are a short list from the\n * shared semantic vocabulary, so every one resolves in the menu without the\n * app registering it. Choosing the menu's own default icon stores none.\n *\n * @event {string} update:description The typed description.\n * @event {string} update:icon The chosen icon name, '' for the default.\n * @spec openspec/changes/saved-view-icon-description-count/specs/saved-view-icon-description-count/spec.md#requirement-a-saved-view-has-an-icon-and-a-description\n */\nexport default {\n\tname: 'CnSavedViewLookFields',\n\n\tcomponents: { NcTextField },\n\n\tprops: {\n\t\t/** The view's description. */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The view's icon name, '' for the menu's default. */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:description', 'update:icon'],\n\n\tcomputed: {\n\t\t/** @return {string} The icon the menu falls back to. */\n\t\tdefaultIcon() {\n\t\t\treturn SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\n\t\t/** @return {Array<string>} The icons offered, the default first. */\n\t\ticonNames() {\n\t\t\treturn SAVED_VIEW_ICONS\n\t\t},\n\n\t\t/** @return {string} The icon shown as chosen. */\n\t\tchosenIcon() {\n\t\t\treturn this.icon && SAVED_VIEW_ICONS.includes(this.icon) ? this.icon : SAVED_VIEW_MENU_DEFAULT_ICON\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Pass the typed description on.\n\t\t *\n\t\t * @param {string} value The description.\n\t\t * @return {void}\n\t\t */\n\t\tonDescription(value) {\n\t\t\t/** @event update:description The typed description. */\n\t\t\tthis.$emit('update:description', value)\n\t\t},\n\n\t\t/**\n\t\t * Pass the chosen icon on; the menu's own default icon is stored as none.\n\t\t *\n\t\t * @param {string} name The icon name.\n\t\t * @return {void}\n\t\t */\n\t\tonIcon(name) {\n\t\t\t/** @event update:icon The chosen icon name, '' for the menu's default. */\n\t\t\tthis.$emit('update:icon', name === this.defaultIcon ? '' : name)\n\t\t},\n\n\t\tt,\n\n\t\t/**\n\t\t * The accessible name of an icon option: what it shows, in words.\n\t\t *\n\t\t * @param {string} name An icon name.\n\t\t * @return {string} Its label, or the name when it has none.\n\t\t * @spec openspec/changes/saved-view-icon-labels/specs/saved-view-icon-labels/spec.md#requirement-an-icon-option-is-named-in-words\n\t\t */\n\t\ticonLabel(name) {\n\t\t\tconst labels = {\n\t\t\t\tFilterVariant: t('nextcloud-vue', 'Filter'),\n\t\t\t\tClockOutline: t('nextcloud-vue', 'Clock'),\n\t\t\t\tClockAlertOutline: t('nextcloud-vue', 'Clock with warning'),\n\t\t\t\tCalendarClockOutline: t('nextcloud-vue', 'Calendar with clock'),\n\t\t\t\tCalendarOutline: t('nextcloud-vue', 'Calendar'),\n\t\t\t\tAccountOutline: t('nextcloud-vue', 'Person'),\n\t\t\t\tAccountGroupOutline: t('nextcloud-vue', 'Group'),\n\t\t\t\tFolderOutline: t('nextcloud-vue', 'Folder'),\n\t\t\t\tFileDocumentOutline: t('nextcloud-vue', 'Document'),\n\t\t\t\tAlertCircleOutline: t('nextcloud-vue', 'Attention'),\n\t\t\t\tCheckCircleOutline: t('nextcloud-vue', 'Ready'),\n\t\t\t\tEmailOutline: t('nextcloud-vue', 'Email'),\n\t\t\t\tMapMarkerOutline: t('nextcloud-vue', 'Location'),\n\t\t\t\tTagOutline: t('nextcloud-vue', 'Label'),\n\t\t\t\tBellOutline: t('nextcloud-vue', 'Bell'),\n\t\t\t\tScaleBalance: t('nextcloud-vue', 'Scales'),\n\t\t\t\tBriefcaseOutline: t('nextcloud-vue', 'Briefcase'),\n\t\t\t\tEyeOutline: t('nextcloud-vue', 'Eye'),\n\t\t\t\tLockOutline: t('nextcloud-vue', 'Lock'),\n\t\t\t\tCurrencyEur: t('nextcloud-vue', 'Euro'),\n\t\t\t}\n\t\t\treturn labels[name] || name\n\t\t},\n\n\t\t/**\n\t\t * @param {string} name An icon name.\n\t\t * @return {object|null} Its component.\n\t\t */\n\t\tcomponentOf(name) {\n\t\t\treturn getSemanticIconComponent(name)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-saved-view-look {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 12px;\n}\n\n.cn-saved-view-look__icons {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 4px;\n}\n\n.cn-saved-view-look__label {\n\tflex: 0 0 100%;\n\tfont-weight: 600;\n}\n\n.cn-saved-view-look__icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: var(--default-clickable-area);\n\theight: var(--default-clickable-area);\n\tpadding: 0;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-element, 8px);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n\tcursor: pointer;\n}\n\n.cn-saved-view-look__icon--chosen {\n\tborder-color: var(--color-primary-element);\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n}\n\n.cn-saved-view-look__icon:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: 2px;\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_createElementVNode","_toDisplayString","_normalizeClass"],"mappings":";;;AASM,EAAA,KAAK,EAAC,oBAAU;AAAA,EAAA,aAAA,EAAA,2BAAA;;;;AAab,EAAA,KAAK,EAAC,2BAAC;AAAA,EAAA,aAAA,EAAA,MAAA;;;;;;;AAbb,EAAA,QAAAA,SAAA,EAAA,EAAAC,kBAAA,QAAA;IACAC,WAMqC,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5
- script.__scopeId = "data-v-d11dd994";
5
+ script.__scopeId = "data-v-2c11c1cc";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -3,6 +3,7 @@ import { getDayNames, translate } from '@nextcloud/l10n';
3
3
  import { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField } from '@nextcloud/vue';
4
4
  import Close from 'vue-material-design-icons/Close.vue';
5
5
  import Plus from 'vue-material-design-icons/Plus.vue';
6
+ import Upload from 'vue-material-design-icons/Upload.vue';
6
7
  import { prefixUrl, buildHeaders } from '../../utils/headers.js';
7
8
  import { readPath } from '../../utils/readPath.js';
8
9
  import { serverErrorMessage } from '../../utils/serverErrorMessage.js';
@@ -53,7 +54,7 @@ const INPUT_TYPES = ['password', 'date', 'datetime-local', 'email', 'url'];
53
54
  var script = {
54
55
  name: 'CnSettingsField',
55
56
 
56
- components: { Close, NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField, Plus },
57
+ components: { Close, NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField, Plus, Upload },
57
58
 
58
59
  props: {
59
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"CnSettingsField.vue2.js","sources":["../../../../src/components/CnSettingsField/CnSettingsField.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-settings-field\" :class=\"`cn-settings-field--${kind}`\" :data-testid=\"`cn-settings-field-${field.key}`\">\n\t\t<h3 v-if=\"kind === 'heading'\" class=\"cn-settings-field__heading\">\n\t\t\t{{ label }}\n\t\t</h3>\n\t\t<NcNoteCard\n\t\t\tv-else-if=\"kind === 'status'\"\n\t\t\t:type=\"statusTone\"\n\t\t\t:role=\"statusTone === 'error' || statusTone === 'warning' ? 'alert' : 'status'\"\n\t\t\t:data-testid=\"`cn-settings-field-status-${field.key}`\">\n\t\t\t{{ field.text }}\n\t\t</NcNoteCard>\n\t\t<div v-else-if=\"kind === 'note'\" class=\"cn-settings-field__note\">\n\t\t\t<span class=\"cn-settings-field__note-label\">{{ label }}</span>\n\t\t\t<p class=\"cn-settings-field__note-text\" :data-testid=\"`cn-settings-field-note-${field.key}`\">\n\t\t\t\t{{ field.text }}\n\t\t\t</p>\n\t\t</div>\n\t\t<div v-else-if=\"kind === 'action'\" class=\"cn-settings-field__action\">\n\t\t\t<div class=\"cn-settings-field__action-row\">\n\t\t\t\t<NcButton v-if=\"field.href\"\n\t\t\t\t\t:href=\"actionHref\"\n\t\t\t\t\t:target=\"field.target || undefined\"\n\t\t\t\t\t:rel=\"field.target === '_blank' ? 'noopener noreferrer' : undefined\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-action-${field.key}`\">\n\t\t\t\t\t{{ label }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else\n\t\t\t\t\t:disabled=\"field.readOnly || field.actionBusy\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-action-${field.key}`\"\n\t\t\t\t\t@click=\"runAction\">\n\t\t\t\t\t<template v-if=\"field.actionBusy\" #icon>\n\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ label }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<NcNoteCard v-if=\"field.actionResult\"\n\t\t\t\t:type=\"field.actionResult.type\"\n\t\t\t\t:role=\"field.actionResult.type === 'error' ? 'alert' : 'status'\"\n\t\t\t\t:data-testid=\"`cn-settings-field-action-result-${field.key}`\">\n\t\t\t\t{{ field.actionResult.text }}\n\t\t\t</NcNoteCard>\n\t\t</div>\n\t\t<fieldset v-else-if=\"kind === 'radio'\"\n\t\t\tclass=\"cn-settings-field__radio\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<template v-for=\"option in normalizedOptions\" :key=\"String(option.value)\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t:name=\"inputId\"\n\t\t\t\t\t:value=\"String(option.value)\"\n\t\t\t\t\t:modelValue=\"modelValue === null || modelValue === undefined ? '' : String(modelValue)\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-option-${field.key}-${option.value}`\"\n\t\t\t\t\t@update:modelValue=\"emitValue(option.value)\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<p v-if=\"option.description\" class=\"cn-settings-field__option-description\">\n\t\t\t\t\t{{ option.description }}\n\t\t\t\t</p>\n\t\t\t</template>\n\t\t</fieldset>\n\t\t<fieldset v-else-if=\"kind === 'checkboxes'\"\n\t\t\tclass=\"cn-settings-field__radio\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<template v-for=\"option in normalizedOptions\" :key=\"String(option.value)\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:modelValue=\"listValue.some((entry) => String(entry) === String(option.value))\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-option-${field.key}-${option.value}`\"\n\t\t\t\t\t@update:modelValue=\"toggleOption(option.value, $event)\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<p v-if=\"option.description\" class=\"cn-settings-field__option-description\">\n\t\t\t\t\t{{ option.description }}\n\t\t\t\t</p>\n\t\t\t</template>\n\t\t</fieldset>\n\t\t<fieldset v-else-if=\"kind === 'pairs'\"\n\t\t\tclass=\"cn-settings-field__pairs\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<div v-for=\"(row, index) in pairRows\"\n\t\t\t\t:key=\"index\"\n\t\t\t\tclass=\"cn-settings-field__pair\"\n\t\t\t\t:data-testid=\"`cn-settings-field-pair-${field.key}`\">\n\t\t\t\t<NcTextField\n\t\t\t\t\t:label=\"pairKeyLabel\"\n\t\t\t\t\t:modelValue=\"row.key\"\n\t\t\t\t\t:maxlength=\"field.keyMaxLength\"\n\t\t\t\t\t@update:modelValue=\"setPair(index, 'key', $event)\" />\n\t\t\t\t<NcSelect v-if=\"field.valueSource\"\n\t\t\t\t\t:modelValue=\"sourceOption(row.value)\"\n\t\t\t\t\t:options=\"sourceOptions\"\n\t\t\t\t\t:inputLabel=\"pairValueLabel\"\n\t\t\t\t\t:loading=\"sourceLoading\"\n\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t@update:modelValue=\"setPair(index, 'value', $event ? $event.value : '')\" />\n\t\t\t\t<NcTextField v-else\n\t\t\t\t\t:label=\"pairValueLabel\"\n\t\t\t\t\t:type=\"field.valueType === 'number' ? 'number' : 'text'\"\n\t\t\t\t\t:modelValue=\"row.value === null || row.value === undefined ? '' : String(row.value)\"\n\t\t\t\t\t@update:modelValue=\"setPair(index, 'value', $event)\" />\n\t\t\t\t<NcButton\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t:ariaLabel=\"t('nextcloud-vue', 'Remove {name}', { name: row.key || pairKeyLabel })\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-pair-remove-${field.key}`\"\n\t\t\t\t\t@click=\"removePair(index)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Close :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"sourceTruncated\"\n\t\t\t\tclass=\"cn-settings-field__hint\"\n\t\t\t\t:data-testid=\"`cn-settings-field-pairs-truncated-${field.key}`\">\n\t\t\t\t{{ t('nextcloud-vue', 'Only the first {count} choices are listed.', { count: sourceOptions.length }) }}\n\t\t\t</p>\n\t\t\t<NcButton\n\t\t\t\t:data-testid=\"`cn-settings-field-pair-add-${field.key}`\"\n\t\t\t\t@click=\"addPair\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ field.addLabel || t('nextcloud-vue', 'Add a row') }}\n\t\t\t</NcButton>\n\t\t</fieldset>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-else-if=\"kind === 'switch' || kind === 'boolean'\"\n\t\t\t:type=\"kind === 'switch' ? 'switch' : 'checkbox'\"\n\t\t\t:modelValue=\"!!modelValue\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event)\">\n\t\t\t{{ label }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<div v-else-if=\"kind === 'image'\"\n\t\t\tclass=\"cn-settings-field__image\"\n\t\t\trole=\"group\"\n\t\t\t:aria-labelledby=\"`${inputId}-label`\">\n\t\t\t<!-- `hideLabel` keeps the name for a screen reader only. -->\n\t\t\t<span :id=\"`${inputId}-label`\"\n\t\t\t\tclass=\"cn-settings-field__image-label\"\n\t\t\t\t:class=\"{ 'hidden-visually': field.hideLabel === true }\">{{ label }}</span>\n\t\t\t<div class=\"cn-settings-field__image-row\">\n\t\t\t\t<span class=\"cn-settings-field__image-tile\" :data-testid=\"`cn-settings-field-image-${field.key}`\">\n\t\t\t\t\t<img v-if=\"stringValue\" :src=\"stringValue\" :alt=\"t('nextcloud-vue', 'Current {name}', { name: label })\">\n\t\t\t\t\t<span v-else class=\"cn-settings-field__image-initials\" aria-hidden=\"true\">{{ field.initials || '' }}</span>\n\t\t\t\t</span>\n\t\t\t\t<input\n\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\tref=\"file\"\n\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t:accept=\"field.accept || 'image/*'\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t:aria-labelledby=\"`${inputId}-label`\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t@change=\"upload($event.target.files && $event.target.files[0])\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"!field.readOnly && field.uploadUrl\"\n\t\t\t\t\t:disabled=\"uploading\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-upload-${field.key}`\"\n\t\t\t\t\t@click=\"$refs.file && $refs.file.click()\">\n\t\t\t\t\t<template v-if=\"uploading\" #icon>\n\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ field.uploadLabel || t('nextcloud-vue', 'Upload {name}', { name: label }) }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t\t<NcSelect\n\t\t\tv-else-if=\"kind === 'select'\"\n\t\t\t:inputId=\"inputId\"\n\t\t\t:modelValue=\"field.multiple ? selectedOptions : selectedOption\"\n\t\t\t:options=\"normalizedOptions\"\n\t\t\t:multiple=\"!!field.multiple\"\n\t\t\t:inputLabel=\"label\"\n\t\t\t:placeholder=\"field.placeholder || ''\"\n\t\t\t:loading=\"optionsLoading\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:clearable=\"!field.required\"\n\t\t\tlabel=\"label\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue(field.multiple ? optionValues($event) : optionValue($event))\" />\n\t\t<NcTextArea\n\t\t\tv-else-if=\"kind === 'textarea' || kind === 'lines'\"\n\t\t\t:id=\"inputId\"\n\t\t\t:label=\"label\"\n\t\t\t:modelValue=\"stringValue\"\n\t\t\t:rows=\"field.rows || 4\"\n\t\t\t:placeholder=\"field.placeholder || ''\"\n\t\t\t:readonly=\"field.readOnly\"\n\t\t\t:error=\"!!error\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event)\" />\n\t\t<div v-else-if=\"kind === 'secret'\" class=\"cn-settings-field__secret\">\n\t\t\t<NcTextField\n\t\t\t\t:id=\"inputId\"\n\t\t\t\t:label=\"label\"\n\t\t\t\ttype=\"password\"\n\t\t\t\tautocomplete=\"new-password\"\n\t\t\t\t:modelValue=\"stringValue\"\n\t\t\t\t:placeholder=\"field.secretSet ? secretSetPlaceholder : (field.placeholder || '')\"\n\t\t\t\t:readonly=\"field.readOnly\"\n\t\t\t\t:disabled=\"field.clearing === true\"\n\t\t\t\t:error=\"!!error\"\n\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t@update:modelValue=\"emitValue($event)\" />\n\t\t\t<NcCheckboxRadioSwitch v-if=\"field.clearable && field.secretSet\"\n\t\t\t\ttype=\"switch\"\n\t\t\t\t:modelValue=\"field.clearing === true\"\n\t\t\t\t:disabled=\"field.readOnly\"\n\t\t\t\t:data-testid=\"`cn-settings-field-clear-${field.key}`\"\n\t\t\t\t@update:modelValue=\"onClear\">\n\t\t\t\t{{ field.clearLabel || t('nextcloud-vue', 'Remove the stored value') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</div>\n\t\t<fieldset v-else-if=\"kind === 'week-hours'\"\n\t\t\tclass=\"cn-settings-field__week\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<div v-for=\"day in weekDays\"\n\t\t\t\t:key=\"day.key\"\n\t\t\t\tclass=\"cn-settings-field__day\"\n\t\t\t\t:data-testid=\"`cn-settings-field-day-${day.key}`\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\ttype=\"switch\"\n\t\t\t\t\t:modelValue=\"!!weekValue[day.key]\"\n\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Open on {day}', { day: day.label })\"\n\t\t\t\t\t@update:modelValue=\"setDayOpen(day.key, $event)\">\n\t\t\t\t\t{{ day.label }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<template v-if=\"weekValue[day.key]\">\n\t\t\t\t\t<NcTextField\n\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Opens on {day}', { day: day.label })\"\n\t\t\t\t\t\t:modelValue=\"weekValue[day.key].opens || ''\"\n\t\t\t\t\t\t@update:modelValue=\"setDayTime(day.key, 'opens', $event)\" />\n\t\t\t\t\t<NcTextField\n\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Closes on {day}', { day: day.label })\"\n\t\t\t\t\t\t:modelValue=\"weekValue[day.key].closes || ''\"\n\t\t\t\t\t\t@update:modelValue=\"setDayTime(day.key, 'closes', $event)\" />\n\t\t\t\t</template>\n\t\t\t\t<span v-else class=\"cn-settings-field__hint\">{{ t('nextcloud-vue', 'Closed') }}</span>\n\t\t\t</div>\n\t\t</fieldset>\n\t\t<NcTextField\n\t\t\tv-else-if=\"kind === 'number'\"\n\t\t\t:id=\"inputId\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"number\"\n\t\t\t:min=\"field.min\"\n\t\t\t:max=\"field.max\"\n\t\t\t:step=\"numberStep\"\n\t\t\t:modelValue=\"stringValue\"\n\t\t\t:readonly=\"field.readOnly\"\n\t\t\t:error=\"!!error\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event === '' ? null : Number($event))\" />\n\t\t<NcTextField\n\t\t\tv-else\n\t\t\t:id=\"inputId\"\n\t\t\t:label=\"label\"\n\t\t\t:type=\"inputType\"\n\t\t\t:modelValue=\"stringValue\"\n\t\t\t:placeholder=\"field.placeholder || ''\"\n\t\t\t:readonly=\"field.readOnly\"\n\t\t\t:error=\"!!error\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event)\" />\n\t\t<p v-if=\"shownError\"\n\t\t\t:id=\"`${inputId}-error`\"\n\t\t\tclass=\"cn-settings-field__error\"\n\t\t\t:data-testid=\"`cn-settings-field-error-${field.key}`\">\n\t\t\t{{ shownError }}\n\t\t</p>\n\t\t<p v-else-if=\"hint\" :id=\"`${inputId}-hint`\" class=\"cn-settings-field__hint\">\n\t\t\t{{ hint }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { getDayNames, translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField } from '@nextcloud/vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport Plus from 'vue-material-design-icons/Plus.vue'\nimport { buildHeaders, prefixUrl } from '../../utils/headers.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { serverErrorMessage } from '../../utils/serverErrorMessage.js'\n\nlet fieldUid = 0\n\n/** Field types and the names CnSettingsPage's manifest uses for them. */\nconst KIND_ALIASES = { enum: 'select', string: 'text', datetime: 'datetime-local', 'date-time': 'datetime-local' }\n\n/** The days of a week, Monday first: the keys a week-hours value uses. */\nconst WEEK_DAYS = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']\n\n/** The same keys in the order of getDayNames(), which starts on Sunday. */\nconst WEEK_DAYS_FROM_SUNDAY = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']\n\n/** The kinds drawn as a text field with their own input type. */\nconst INPUT_TYPES = ['password', 'date', 'datetime-local', 'email', 'url']\n\n/**\n * CnSettingsField - one settings field: the control for its type with its\n * label, and under it an error or a hint. Shared by CnSettingsPage and\n * CnSettingsFieldsSection.\n *\n * Types: `text` (default), `textarea`, `number`, `switch`, `boolean` (a checkbox),\n * `select` (`enum`) with static `options` or options read from `optionsUrl`,\n * `password` (a masked input that shows its value back) and `secret`\n * (replace-only: the input stays empty, and with `secretSet` says a value is\n * stored; the host sends it only when something is typed), and `image` (a\n * preview tile, the initials without an image, and an upload button that\n * posts the file to `uploadUrl` at once and emits `uploaded`), `radio` (one\n * choice from `options`, each with an optional `description` under it),\n * `lines` (a textarea, one entry per line), `checkboxes` (several choices\n * from `options`, the value a list; `select` with `multiple` is the same as a\n * multi-select) and `pairs` (key-to-value rows with add and remove, the value\n * a list of `{ key, value }` rows). Three types hold no value of their\n * own: `heading` (a subheading between fields), `status` (a read-only note:\n * the host passes its `text` and `tone`) and `action` (a button that emits\n * `action`; the host passes `actionBusy` and the `actionResult` note).\n * `date`, `datetime-local` (also `datetime`, `date-time`), `email` and `url`\n * are text fields of that input type; the value stays the text the input holds.\n *\n * ```vue\n * <CnSettingsField\n * :field=\"{ key: 'apiKey', label: 'API key', type: 'secret', secretSet: true }\"\n * v-model=\"form.apiKey\" />\n * ```\n */\nexport default {\n\tname: 'CnSettingsField',\n\n\tcomponents: { Close, NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField, Plus },\n\n\tprops: {\n\t\t/**\n\t\t * The field: `{ key, label, type?, options?, optionsUrl?, optionsPath?,\n\t\t * optionLabel?, optionValue?, optionDetail?, placeholder?, rows?, min?, max?, required?,\n\t\t * readOnly?, secretSet? }`. `label` arrives translated.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tfield: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The value: text, a number, a boolean or a select value. Any type,\n\t\t * because a Boolean in a type list would read an empty string as true.\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: null,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** A validation message, drawn under the control and tied to it. */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** A hint under the control (not drawn while there is an error). */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:modelValue', 'uploaded', 'action', 'clear'],\n\n\tdata() {\n\t\tfieldUid += 1\n\t\treturn {\n\t\t\tuid: fieldUid,\n\t\t\tfetchedOptions: null,\n\t\t\toptionsLoading: false,\n\t\t\tsourceOptions: [],\n\t\t\tsourceLoading: false,\n\t\t\tsourceTruncated: false,\n\t\t\tuploading: false,\n\t\t\tuploadError: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {string} The control kind. */\n\t\tkind() {\n\t\t\tconst type = String(this.field.type || 'text')\n\t\t\treturn KIND_ALIASES[type] || type\n\t\t},\n\n\t\t/** @return {string} The input type of a text-like field. */\n\t\tinputType() {\n\t\t\treturn INPUT_TYPES.includes(this.kind) ? this.kind : 'text'\n\t\t},\n\n\t\t/**\n\t\t * The number input's step: the field's own, 1 for a whole number, else\n\t\t * any, so a decimal value (0.8) is not invalid to the browser.\n\t\t *\n\t\t * @return {string}\n\t\t * @spec openspec/changes/settings-number-decimal-step/specs/settings-fields/spec.md#requirement-a-number-setting-steps-as-it-is-declared\n\t\t */\n\t\tnumberStep() {\n\t\t\tif (typeof this.field.step === 'number' || (typeof this.field.step === 'string' && this.field.step !== '')) {\n\t\t\t\treturn String(this.field.step)\n\t\t\t}\n\t\t\treturn this.field.integer ? '1' : 'any'\n\t\t},\n\n\t\t/** @return {string} The label. */\n\t\tlabel() {\n\t\t\treturn String(this.field.label || this.field.key || '')\n\t\t},\n\n\t\t/** @return {string} The control's id. */\n\t\tinputId() {\n\t\t\treturn `cn-settings-field-${this.uid}-${String(this.field.key).replace(/[^A-Za-z0-9_-]/g, '-')}`\n\t\t},\n\n\t\t/** @return {string} The message shown under the control: an upload failure, else `error`. */\n\t\tshownError() {\n\t\t\treturn this.uploadError || this.error\n\t\t},\n\n\t\t/** @return {string|null} The id of the error or hint the control is described by. */\n\t\tdescribedBy() {\n\t\t\tif (this.shownError) {\n\t\t\t\treturn `${this.inputId}-error`\n\t\t\t}\n\t\t\treturn this.hint ? `${this.inputId}-hint` : null\n\t\t},\n\n\t\t/** @return {string} A status note's tone: `info`, `success`, `warning` or `error`. */\n\t\tstatusTone() {\n\t\t\treturn ['info', 'success', 'warning', 'error'].includes(this.field.tone) ? this.field.tone : 'info'\n\t\t},\n\n\t\t/** @return {string} The value as text for a text control. */\n\t\tstringValue() {\n\t\t\treturn this.modelValue === null || this.modelValue === undefined ? '' : String(this.modelValue)\n\t\t},\n\n\t\t/** @return {Array<{key: string, label: string}>} The days of a week-hours field, Monday first by default. */\n\t\tweekDays() {\n\t\t\tconst names = getDayNames()\n\t\t\tconst days = Array.isArray(this.field.days) && this.field.days.length > 0 ? this.field.days : WEEK_DAYS\n\t\t\treturn days.map((key) => ({ key, label: names[WEEK_DAYS_FROM_SUNDAY.indexOf(key)] || key }))\n\t\t},\n\n\t\t/** @return {object} A week-hours field's value: day to `{ opens, closes }` or null. */\n\t\tweekValue() {\n\t\t\treturn this.modelValue && typeof this.modelValue === 'object' && !Array.isArray(this.modelValue) ? this.modelValue : {}\n\t\t},\n\n\t\t/** @return {string} An action link's address, with the web root for an app path. */\n\t\tactionHref() {\n\t\t\treturn prefixUrl(String(this.field.href || ''))\n\t\t},\n\n\t\t/** @return {string} The placeholder of a secret that is stored. */\n\t\tsecretSetPlaceholder() {\n\t\t\treturn t('nextcloud-vue', 'Stored. Type a new value to replace it.')\n\t\t},\n\n\t\t/**\n\t\t * The select options as `{ label, value }`: the static `options` (strings,\n\t\t * numbers or objects), or those read from `optionsUrl`.\n\t\t *\n\t\t * @return {Array<{label: string, value: (string|number|boolean)}>}\n\t\t */\n\t\tnormalizedOptions() {\n\t\t\tconst raw = Array.isArray(this.field.options) ? this.field.options : (this.fetchedOptions || [])\n\t\t\treturn raw.map((option) => (option && typeof option === 'object'\n\t\t\t\t? { ...option, label: String(option.label ?? option.value ?? ''), value: option.value }\n\t\t\t\t: { label: String(option), value: option }))\n\t\t},\n\n\t\t/** @return {Array} The value as a list, for a multi-choice field. */\n\t\tlistValue() {\n\t\t\treturn Array.isArray(this.modelValue) ? this.modelValue : []\n\t\t},\n\n\t\t/** @return {Array<object>} The options a multi-select's value selects. */\n\t\tselectedOptions() {\n\t\t\treturn this.listValue.map((value) => this.normalizedOptions.find((option) => String(option.value) === String(value))\n\t\t\t\t|| { label: String(value), value })\n\t\t},\n\n\t\t/** @return {Array<{key: string, value: unknown}>} A pairs field's rows. */\n\t\tpairRows() {\n\t\t\treturn Array.isArray(this.modelValue) ? this.modelValue : []\n\t\t},\n\n\t\t/** @return {string} The label of a pair's key. */\n\t\tpairKeyLabel() {\n\t\t\treturn String(this.field.keyLabel || t('nextcloud-vue', 'Key'))\n\t\t},\n\n\t\t/** @return {string} The label of a pair's value. */\n\t\tpairValueLabel() {\n\t\t\treturn String(this.field.valueLabel || t('nextcloud-vue', 'Value'))\n\t\t},\n\n\t\t/** @return {object|null} The option the value selects, for NcSelect. */\n\t\tselectedOption() {\n\t\t\tif (this.modelValue === null || this.modelValue === undefined || this.modelValue === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\t// A stored value is often text where the options carry numbers (an\n\t\t\t// app config holding an id), so the two are compared as text.\n\t\t\treturn this.normalizedOptions.find((option) => option.value === this.modelValue)\n\t\t\t\t|| this.normalizedOptions.find((option) => String(option.value) === String(this.modelValue))\n\t\t\t\t|| { label: String(this.modelValue), value: this.modelValue }\n\t\t},\n\t},\n\n\twatch: {\n\t\t'field.optionsUrl': {\n\t\t\thandler() {\n\t\t\t\tthis.loadOptions()\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\n\t\t'field.valueSource': {\n\t\t\thandler() {\n\t\t\t\tthis.loadSourceOptions()\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The \"remove the stored value\" switch of a secret changed.\n\t\t *\n\t\t * @param {boolean} on Whether the stored value is to be removed.\n\t\t * @return {void}\n\t\t */\n\t\tonClear(on) {\n\t\t\t/** @event clear The stored secret is to be removed (true) or kept (false). */\n\t\t\tthis.$emit('clear', on === true)\n\t\t},\n\n\t\tt,\n\n\t\t/** Ask the host to run an `action` field's action. */\n\t\trunAction() {\n\t\t\t/** @event action The user pressed an `action` field's button. */\n\t\t\tthis.$emit('action')\n\t\t},\n\n\t\t/**\n\t\t * Upload a chosen image to `uploadUrl` as multipart form data (the\n\t\t * file under `uploadField`, default `image`, plus `uploadParams`), then\n\t\t * take the new image url from the answer at `uploadValuePath` (or a\n\t\t * cache-busted `previewUrl`).\n\t\t *\n\t\t * @param {File|undefined} file The chosen file.\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/settings-fields-section/specs/settings-fields-section/spec.md#requirement-an-image-field-uploads-at-once\n\t\t */\n\t\tasync upload(file) {\n\t\t\tif (!file || !this.field.uploadUrl) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst form = new FormData()\n\t\t\tfor (const [name, value] of Object.entries(this.field.uploadParams || {})) {\n\t\t\t\tform.append(name, value)\n\t\t\t}\n\t\t\tform.append(this.field.uploadField || 'image', file)\n\t\t\tthis.uploading = true\n\t\t\tthis.uploadError = ''\n\t\t\ttry {\n\t\t\t\tconst response = await axios.post(prefixUrl(this.field.uploadUrl), form)\n\t\t\t\tconst fromAnswer = this.field.uploadValuePath ? readPath(response?.data, this.field.uploadValuePath) : ''\n\t\t\t\tconst next = fromAnswer || (this.field.previewUrl ? `${prefixUrl(this.field.previewUrl)}${this.field.previewUrl.includes('?') ? '&' : '?'}v=${Date.now()}` : '')\n\t\t\t\t/**\n\t\t\t\t * @event uploaded An image was uploaded. Payload: its new url.\n\t\t\t\t */\n\t\t\t\tthis.$emit('uploaded', next)\n\t\t\t} catch (error) {\n\t\t\t\tthis.uploadError = t('nextcloud-vue', 'The image could not be uploaded: {reason}', { reason: serverErrorMessage(error) })\n\t\t\t} finally {\n\t\t\t\tthis.uploading = false\n\t\t\t\tif (this.$refs.file) {\n\t\t\t\t\tthis.$refs.file.value = ''\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Report a new value.\n\t\t *\n\t\t * @param {unknown} value The value.\n\t\t * @return {void}\n\t\t */\n\t\temitValue(value) {\n\t\t\t/**\n\t\t\t * @event update:modelValue The value changed. Payload: the new value.\n\t\t\t */\n\t\t\tthis.$emit('update:modelValue', value)\n\t\t},\n\n\t\t/**\n\t\t * Check or uncheck one choice of a `checkboxes` field; the list keeps\n\t\t * the order of the options.\n\t\t *\n\t\t * @param {string|number} value The option's value.\n\t\t * @param {boolean} checked Whether it is now checked.\n\t\t * @return {void}\n\t\t */\n\t\ttoggleOption(value, checked) {\n\t\t\tconst chosen = new Set(this.listValue.map(String))\n\t\t\tif (checked) {\n\t\t\t\tchosen.add(String(value))\n\t\t\t} else {\n\t\t\t\tchosen.delete(String(value))\n\t\t\t}\n\t\t\tthis.emitValue(this.normalizedOptions.filter((option) => chosen.has(String(option.value))).map((option) => option.value))\n\t\t},\n\n\t\t/**\n\t\t * Change a pair's key or value.\n\t\t *\n\t\t * @param {number} index The row.\n\t\t * @param {string} part `key` or `value`.\n\t\t * @param {string} text What was typed.\n\t\t * @return {void}\n\t\t */\n\t\tsetPair(index, part, text) {\n\t\t\tconst rows = this.pairRows.map((row) => ({ ...row }))\n\t\t\trows[index] = { ...rows[index], [part]: part === 'value' && this.field.valueType === 'number' && text !== '' ? Number(text) : text }\n\t\t\tthis.emitValue(rows)\n\t\t},\n\n\t\t/** Add an empty pair. */\n\t\taddPair() {\n\t\t\tthis.emitValue([...this.pairRows, { key: '', value: '' }])\n\t\t},\n\n\t\t/**\n\t\t * Remove a pair.\n\t\t *\n\t\t * @param {number} index The row.\n\t\t * @return {void}\n\t\t */\n\t\tremovePair(index) {\n\t\t\tthis.emitValue(this.pairRows.filter((_row, at) => at !== index))\n\t\t},\n\n\t\t/**\n\t\t * The storable values of what a multi-select emits.\n\t\t *\n\t\t * @param {Array|null} emitted The chosen options.\n\t\t * @return {Array}\n\t\t */\n\t\toptionValues(emitted) {\n\t\t\treturn (Array.isArray(emitted) ? emitted : []).map((option) => this.optionValue(option))\n\t\t},\n\n\t\t/**\n\t\t * The storable value of what NcSelect emits.\n\t\t *\n\t\t * @param {object|string|number|null} emitted An option, or null on clear.\n\t\t * @return {string|number|boolean|null}\n\t\t */\n\t\toptionValue(emitted) {\n\t\t\tif (emitted === null || emitted === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn typeof emitted === 'object' && 'value' in emitted ? emitted.value : emitted\n\t\t},\n\n\t\t/**\n\t\t * Open or close one day of a week-hours field; an opened day takes\n\t\t * `defaultOpens`/`defaultCloses` (08:00 to 17:00).\n\t\t *\n\t\t * @param {string} day The day key.\n\t\t * @param {boolean} open Whether it is open.\n\t\t * @return {void}\n\t\t */\n\t\tsetDayOpen(day, open) {\n\t\t\tconst hours = open ? { opens: this.field.defaultOpens || '08:00', closes: this.field.defaultCloses || '17:00' } : null\n\t\t\tthis.emitValue({ ...this.weekValue, [day]: hours })\n\t\t},\n\n\t\t/**\n\t\t * Change one time of an open day.\n\t\t *\n\t\t * @param {string} day The day key.\n\t\t * @param {string} part `opens` or `closes`.\n\t\t * @param {string} time The time, `HH:MM`.\n\t\t * @return {void}\n\t\t */\n\t\tsetDayTime(day, part, time) {\n\t\t\tthis.emitValue({ ...this.weekValue, [day]: { ...(this.weekValue[day] || {}), [part]: time } })\n\t\t},\n\n\t\t/**\n\t\t * The option a pairs value selects; an id no object answers keeps its id as label.\n\t\t *\n\t\t * @param {unknown} value The stored id.\n\t\t * @return {object|null}\n\t\t */\n\t\tsourceOption(value) {\n\t\t\tif (value === null || value === undefined || value === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn this.sourceOptions.find((option) => String(option.value) === String(value)) || { label: String(value), value }\n\t\t},\n\n\t\t/**\n\t\t * Read the objects a pairs field's values are chosen from:\n\t\t * `valueSource { register, schema, labelField?, valueField?, limit? }`.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadSourceOptions() {\n\t\t\tconst source = this.kind === 'pairs' ? this.field.valueSource : null\n\t\t\tif (!source || !source.register || !source.schema) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst limit = Number(source.limit) > 0 ? Number(source.limit) : 1000\n\t\t\tthis.sourceLoading = true\n\t\t\ttry {\n\t\t\t\tconst url = `/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}?_limit=${limit}`\n\t\t\t\tconst { data } = await axios.get(prefixUrl(url))\n\t\t\t\tconst list = Array.isArray(data?.results) ? data.results : []\n\t\t\t\tthis.sourceOptions = list.filter((item) => item && typeof item === 'object').map((item) => {\n\t\t\t\t\tconst value = source.valueField ? readPath(item, source.valueField) : (item.id ?? item.uuid ?? item['@self']?.id)\n\t\t\t\t\tconst label = source.labelField ? readPath(item, source.labelField) : (item.name ?? item.title)\n\t\t\t\t\treturn { label: String(label || value || ''), value }\n\t\t\t\t})\n\t\t\t\tthis.sourceTruncated = Number(data?.total) > list.length\n\t\t\t} catch {\n\t\t\t\tthis.sourceOptions = []\n\t\t\t\tthis.sourceTruncated = false\n\t\t\t} finally {\n\t\t\t\tthis.sourceLoading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read a sourced select's options: a list (or the list at\n\t\t * `optionsPath`, or under `results`) mapped through `optionLabel` and\n\t\t * `optionValue` (dotted paths; default `label`/`title`/`name` and `value`/`id`).\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadOptions() {\n\t\t\tconst url = this.kind === 'select' && !Array.isArray(this.field.options) ? this.field.optionsUrl : ''\n\t\t\tif (!url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.optionsLoading = true\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(prefixUrl(url), { headers: buildHeaders() })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthis.fetchedOptions = []\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst data = await response.json()\n\t\t\t\tconst list = this.field.optionsPath ? readPath(data, this.field.optionsPath) : (Array.isArray(data) ? data : data?.results)\n\t\t\t\tthis.fetchedOptions = (Array.isArray(list) ? list : []).map((item) => {\n\t\t\t\t\tif (!item || typeof item !== 'object') {\n\t\t\t\t\t\treturn { label: String(item), value: item }\n\t\t\t\t\t}\n\t\t\t\t\tconst value = this.field.optionValue ? readPath(item, this.field.optionValue) : (item.value ?? item.id)\n\t\t\t\t\tconst label = this.field.optionLabel ? readPath(item, this.field.optionLabel) : (item.label ?? item.title ?? item.name ?? value)\n\t\t\t\t\tconst detail = this.field.optionDetail ? readPath(item, this.field.optionDetail) : ''\n\t\t\t\t\treturn { label: detail ? `${label ?? ''} (${detail})` : String(label ?? ''), value }\n\t\t\t\t})\n\t\t\t} catch {\n\t\t\t\tthis.fetchedOptions = []\n\t\t\t} finally {\n\t\t\t\tthis.optionsLoading = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-settings-field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmin-width: 0;\n}\n\n.cn-settings-field__hint,\n.cn-settings-field__error {\n\tmargin: 0;\n\tfont-size: 13px;\n\tline-height: 1.4;\n}\n\n.cn-settings-field__image {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-settings-field__image-label {\n\tfont-weight: 600;\n}\n\n/* A note: the field's label, then a line of muted text where a control would\n stand (DqInstellingenAlgemeen \"Toegestane websites (CORS)\"). */\n.cn-settings-field__note {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-settings-field__note-label {\n\tfont-weight: 600;\n}\n\n.cn-settings-field__note-text {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-field__image-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-settings-field__image-tile {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 64px;\n\theight: 64px;\n\toverflow: hidden;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large);\n\tbackground: var(--color-primary-element-light);\n}\n\n.cn-settings-field__image-tile img {\n\tmax-width: 100%;\n\tmax-height: 100%;\n\tobject-fit: contain;\n}\n\n.cn-settings-field__image-initials {\n\tfont-size: 20px;\n\tfont-weight: 700;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n}\n\n.cn-settings-field__hint,\n.cn-settings-field__option-description {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-field__heading {\n\tmargin: 8px 0 0;\n\tfont-size: 16px;\n\tfont-weight: 600;\n}\n\n.cn-settings-field__radio {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.cn-settings-field__week {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.cn-settings-field__day {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-end;\n\tgap: 8px;\n}\n\n.cn-settings-field__day > :first-child {\n\tflex: 0 0 160px;\n}\n\n.cn-settings-field__pairs {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.cn-settings-field__pair {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-end;\n\tgap: 8px;\n\twidth: 100%;\n}\n\n.cn-settings-field__pair > :not(button) {\n\tflex: 1 1 140px;\n\tmin-width: 0;\n}\n\n.cn-settings-field__radio-legend {\n\tfont-weight: 600;\n}\n\n.cn-settings-field__option-description {\n\tmargin: 0 0 8px calc(var(--default-grid-baseline, 4px) * 9);\n\tfont-size: 13px;\n\tline-height: 1.4;\n}\n\n.cn-settings-field__action-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-settings-field__error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n</style>\n"],"names":["t","axios"],"mappings":";;;;;;;;;AA4TA,IAAI,QAAO,GAAI,EAAA;;AAEf;AACA,MAAM,YAAW,GAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAiB,GAAA;;AAEjH;AACA,MAAM,SAAU,GAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAA;;AAE/F;AACA,MAAM,qBAAsB,GAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAA;;AAE3G;AACA,MAAM,WAAU,GAAI,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAA;;AAEzE;;;;AAIC;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAED,aAAe;CACd,IAAI,EAAE,iBAAiB;;CAEvB,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,IAAG,EAAG;;AAE1H,CAAA,KAAK,EAAE;AACN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IAAK,IAAI,CAAC,KAAI,IAAK,IAAI,CAAC,IAAG,IAAK,KAAK,EAAA;AAC/H,KAAA,MAAM,SAAS,IAAI,CAAC,KAAK,CAAC,YAAW,GAAI,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAA,GAAI,GAAC;AACpF,KAAA,OAAO,EAAE,KAAK,EAAE,MAAO,GAAE,CAAC,EAAE,KAAM,IAAG,EAAE,CAAE,EAAC,EAAE,MAAM,CAAC,CAAC,CAAA,GAAI,MAAM,CAAC,KAAI,IAAK,EAAE,CAAC,EAAE,KAAM,EAAA;KACnF,EAAA;AACF,IAAA,CAAE,MAAM;AACP,IAAA,IAAI,CAAC,cAAa,GAAI,GAAC;AACxB,IAAA,SAAU;IACT,IAAI,CAAC,iBAAiB,MAAI;AAC3B,IAAA;GACA;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnSettingsField.vue2.js","sources":["../../../../src/components/CnSettingsField/CnSettingsField.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-settings-field\" :class=\"`cn-settings-field--${kind}`\" :data-testid=\"`cn-settings-field-${field.key}`\">\n\t\t<h3 v-if=\"kind === 'heading'\" class=\"cn-settings-field__heading\">\n\t\t\t{{ label }}\n\t\t</h3>\n\t\t<NcNoteCard\n\t\t\tv-else-if=\"kind === 'status'\"\n\t\t\t:type=\"statusTone\"\n\t\t\t:role=\"statusTone === 'error' || statusTone === 'warning' ? 'alert' : 'status'\"\n\t\t\t:data-testid=\"`cn-settings-field-status-${field.key}`\">\n\t\t\t{{ field.text }}\n\t\t</NcNoteCard>\n\t\t<div v-else-if=\"kind === 'note'\" class=\"cn-settings-field__note\">\n\t\t\t<span class=\"cn-settings-field__note-label\">{{ label }}</span>\n\t\t\t<p class=\"cn-settings-field__note-text\" :data-testid=\"`cn-settings-field-note-${field.key}`\">\n\t\t\t\t{{ field.text }}\n\t\t\t</p>\n\t\t</div>\n\t\t<div v-else-if=\"kind === 'action'\" class=\"cn-settings-field__action\">\n\t\t\t<div class=\"cn-settings-field__action-row\">\n\t\t\t\t<NcButton v-if=\"field.href\"\n\t\t\t\t\t:href=\"actionHref\"\n\t\t\t\t\t:target=\"field.target || undefined\"\n\t\t\t\t\t:rel=\"field.target === '_blank' ? 'noopener noreferrer' : undefined\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-action-${field.key}`\">\n\t\t\t\t\t{{ label }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton v-else\n\t\t\t\t\t:disabled=\"field.readOnly || field.actionBusy\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-action-${field.key}`\"\n\t\t\t\t\t@click=\"runAction\">\n\t\t\t\t\t<template v-if=\"field.actionBusy\" #icon>\n\t\t\t\t\t\t<NcLoadingIcon :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ label }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<NcNoteCard v-if=\"field.actionResult\"\n\t\t\t\t:type=\"field.actionResult.type\"\n\t\t\t\t:role=\"field.actionResult.type === 'error' ? 'alert' : 'status'\"\n\t\t\t\t:data-testid=\"`cn-settings-field-action-result-${field.key}`\">\n\t\t\t\t{{ field.actionResult.text }}\n\t\t\t</NcNoteCard>\n\t\t</div>\n\t\t<fieldset v-else-if=\"kind === 'radio'\"\n\t\t\tclass=\"cn-settings-field__radio\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<template v-for=\"option in normalizedOptions\" :key=\"String(option.value)\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t:name=\"inputId\"\n\t\t\t\t\t:value=\"String(option.value)\"\n\t\t\t\t\t:modelValue=\"modelValue === null || modelValue === undefined ? '' : String(modelValue)\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-option-${field.key}-${option.value}`\"\n\t\t\t\t\t@update:modelValue=\"emitValue(option.value)\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<p v-if=\"option.description\" class=\"cn-settings-field__option-description\">\n\t\t\t\t\t{{ option.description }}\n\t\t\t\t</p>\n\t\t\t</template>\n\t\t</fieldset>\n\t\t<fieldset v-else-if=\"kind === 'checkboxes'\"\n\t\t\tclass=\"cn-settings-field__radio\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<template v-for=\"option in normalizedOptions\" :key=\"String(option.value)\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t:modelValue=\"listValue.some((entry) => String(entry) === String(option.value))\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-option-${field.key}-${option.value}`\"\n\t\t\t\t\t@update:modelValue=\"toggleOption(option.value, $event)\">\n\t\t\t\t\t{{ option.label }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<p v-if=\"option.description\" class=\"cn-settings-field__option-description\">\n\t\t\t\t\t{{ option.description }}\n\t\t\t\t</p>\n\t\t\t</template>\n\t\t</fieldset>\n\t\t<fieldset v-else-if=\"kind === 'pairs'\"\n\t\t\tclass=\"cn-settings-field__pairs\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<div v-for=\"(row, index) in pairRows\"\n\t\t\t\t:key=\"index\"\n\t\t\t\tclass=\"cn-settings-field__pair\"\n\t\t\t\t:data-testid=\"`cn-settings-field-pair-${field.key}`\">\n\t\t\t\t<NcTextField\n\t\t\t\t\t:label=\"pairKeyLabel\"\n\t\t\t\t\t:modelValue=\"row.key\"\n\t\t\t\t\t:maxlength=\"field.keyMaxLength\"\n\t\t\t\t\t@update:modelValue=\"setPair(index, 'key', $event)\" />\n\t\t\t\t<NcSelect v-if=\"field.valueSource\"\n\t\t\t\t\t:modelValue=\"sourceOption(row.value)\"\n\t\t\t\t\t:options=\"sourceOptions\"\n\t\t\t\t\t:inputLabel=\"pairValueLabel\"\n\t\t\t\t\t:loading=\"sourceLoading\"\n\t\t\t\t\tlabel=\"label\"\n\t\t\t\t\t@update:modelValue=\"setPair(index, 'value', $event ? $event.value : '')\" />\n\t\t\t\t<NcTextField v-else\n\t\t\t\t\t:label=\"pairValueLabel\"\n\t\t\t\t\t:type=\"field.valueType === 'number' ? 'number' : 'text'\"\n\t\t\t\t\t:modelValue=\"row.value === null || row.value === undefined ? '' : String(row.value)\"\n\t\t\t\t\t@update:modelValue=\"setPair(index, 'value', $event)\" />\n\t\t\t\t<NcButton\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t:ariaLabel=\"t('nextcloud-vue', 'Remove {name}', { name: row.key || pairKeyLabel })\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-pair-remove-${field.key}`\"\n\t\t\t\t\t@click=\"removePair(index)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Close :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t\t<p v-if=\"sourceTruncated\"\n\t\t\t\tclass=\"cn-settings-field__hint\"\n\t\t\t\t:data-testid=\"`cn-settings-field-pairs-truncated-${field.key}`\">\n\t\t\t\t{{ t('nextcloud-vue', 'Only the first {count} choices are listed.', { count: sourceOptions.length }) }}\n\t\t\t</p>\n\t\t\t<NcButton\n\t\t\t\t:data-testid=\"`cn-settings-field-pair-add-${field.key}`\"\n\t\t\t\t@click=\"addPair\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ field.addLabel || t('nextcloud-vue', 'Add a row') }}\n\t\t\t</NcButton>\n\t\t</fieldset>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-else-if=\"kind === 'switch' || kind === 'boolean'\"\n\t\t\t:type=\"kind === 'switch' ? 'switch' : 'checkbox'\"\n\t\t\t:modelValue=\"!!modelValue\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event)\">\n\t\t\t{{ label }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<div v-else-if=\"kind === 'image'\"\n\t\t\tclass=\"cn-settings-field__image\"\n\t\t\trole=\"group\"\n\t\t\t:aria-labelledby=\"`${inputId}-label`\">\n\t\t\t<!-- `hideLabel` keeps the name for a screen reader only. -->\n\t\t\t<span :id=\"`${inputId}-label`\"\n\t\t\t\tclass=\"cn-settings-field__image-label\"\n\t\t\t\t:class=\"{ 'hidden-visually': field.hideLabel === true }\">{{ label }}</span>\n\t\t\t<div class=\"cn-settings-field__image-row\">\n\t\t\t\t<span class=\"cn-settings-field__image-tile\" :data-testid=\"`cn-settings-field-image-${field.key}`\">\n\t\t\t\t\t<img v-if=\"stringValue\" :src=\"stringValue\" :alt=\"t('nextcloud-vue', 'Current {name}', { name: label })\">\n\t\t\t\t\t<span v-else class=\"cn-settings-field__image-initials\" aria-hidden=\"true\">{{ field.initials || '' }}</span>\n\t\t\t\t</span>\n\t\t\t\t<input\n\t\t\t\t\t:id=\"inputId\"\n\t\t\t\t\tref=\"file\"\n\t\t\t\t\tclass=\"hidden-visually\"\n\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t:accept=\"field.accept || 'image/*'\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t:aria-labelledby=\"`${inputId}-label`\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t@change=\"upload($event.target.files && $event.target.files[0])\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"!field.readOnly && field.uploadUrl\"\n\t\t\t\t\t:disabled=\"uploading\"\n\t\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t\t:data-testid=\"`cn-settings-field-upload-${field.key}`\"\n\t\t\t\t\t@click=\"$refs.file && $refs.file.click()\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"uploading\" :size=\"20\" />\n\t\t\t\t\t\t<Upload v-else :size=\"16\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ field.uploadLabel || t('nextcloud-vue', 'Upload {name}', { name: label }) }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t\t<NcSelect\n\t\t\tv-else-if=\"kind === 'select'\"\n\t\t\t:inputId=\"inputId\"\n\t\t\t:modelValue=\"field.multiple ? selectedOptions : selectedOption\"\n\t\t\t:options=\"normalizedOptions\"\n\t\t\t:multiple=\"!!field.multiple\"\n\t\t\t:inputLabel=\"label\"\n\t\t\t:placeholder=\"field.placeholder || ''\"\n\t\t\t:loading=\"optionsLoading\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:clearable=\"!field.required\"\n\t\t\tlabel=\"label\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue(field.multiple ? optionValues($event) : optionValue($event))\" />\n\t\t<NcTextArea\n\t\t\tv-else-if=\"kind === 'textarea' || kind === 'lines'\"\n\t\t\t:id=\"inputId\"\n\t\t\t:label=\"label\"\n\t\t\t:modelValue=\"stringValue\"\n\t\t\t:rows=\"field.rows || 4\"\n\t\t\t:placeholder=\"field.placeholder || ''\"\n\t\t\t:readonly=\"field.readOnly\"\n\t\t\t:error=\"!!error\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event)\" />\n\t\t<div v-else-if=\"kind === 'secret'\" class=\"cn-settings-field__secret\">\n\t\t\t<NcTextField\n\t\t\t\t:id=\"inputId\"\n\t\t\t\t:label=\"label\"\n\t\t\t\ttype=\"password\"\n\t\t\t\tautocomplete=\"new-password\"\n\t\t\t\t:modelValue=\"stringValue\"\n\t\t\t\t:placeholder=\"field.secretSet ? secretSetPlaceholder : (field.placeholder || '')\"\n\t\t\t\t:readonly=\"field.readOnly\"\n\t\t\t\t:disabled=\"field.clearing === true\"\n\t\t\t\t:error=\"!!error\"\n\t\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t\t@update:modelValue=\"emitValue($event)\" />\n\t\t\t<NcCheckboxRadioSwitch v-if=\"field.clearable && field.secretSet\"\n\t\t\t\ttype=\"switch\"\n\t\t\t\t:modelValue=\"field.clearing === true\"\n\t\t\t\t:disabled=\"field.readOnly\"\n\t\t\t\t:data-testid=\"`cn-settings-field-clear-${field.key}`\"\n\t\t\t\t@update:modelValue=\"onClear\">\n\t\t\t\t{{ field.clearLabel || t('nextcloud-vue', 'Remove the stored value') }}\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</div>\n\t\t<fieldset v-else-if=\"kind === 'week-hours'\"\n\t\t\tclass=\"cn-settings-field__week\"\n\t\t\t:disabled=\"field.readOnly\"\n\t\t\t:aria-describedby=\"describedBy\">\n\t\t\t<legend class=\"cn-settings-field__radio-legend\" :class=\"{ 'hidden-visually': field.hideLabel === true }\">\n\t\t\t\t{{ label }}\n\t\t\t</legend>\n\t\t\t<div v-for=\"day in weekDays\"\n\t\t\t\t:key=\"day.key\"\n\t\t\t\tclass=\"cn-settings-field__day\"\n\t\t\t\t:data-testid=\"`cn-settings-field-day-${day.key}`\">\n\t\t\t\t<NcCheckboxRadioSwitch\n\t\t\t\t\ttype=\"switch\"\n\t\t\t\t\t:modelValue=\"!!weekValue[day.key]\"\n\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Open on {day}', { day: day.label })\"\n\t\t\t\t\t@update:modelValue=\"setDayOpen(day.key, $event)\">\n\t\t\t\t\t{{ day.label }}\n\t\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t\t<template v-if=\"weekValue[day.key]\">\n\t\t\t\t\t<NcTextField\n\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Opens on {day}', { day: day.label })\"\n\t\t\t\t\t\t:modelValue=\"weekValue[day.key].opens || ''\"\n\t\t\t\t\t\t@update:modelValue=\"setDayTime(day.key, 'opens', $event)\" />\n\t\t\t\t\t<NcTextField\n\t\t\t\t\t\ttype=\"time\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Closes on {day}', { day: day.label })\"\n\t\t\t\t\t\t:modelValue=\"weekValue[day.key].closes || ''\"\n\t\t\t\t\t\t@update:modelValue=\"setDayTime(day.key, 'closes', $event)\" />\n\t\t\t\t</template>\n\t\t\t\t<span v-else class=\"cn-settings-field__hint\">{{ t('nextcloud-vue', 'Closed') }}</span>\n\t\t\t</div>\n\t\t</fieldset>\n\t\t<NcTextField\n\t\t\tv-else-if=\"kind === 'number'\"\n\t\t\t:id=\"inputId\"\n\t\t\t:label=\"label\"\n\t\t\ttype=\"number\"\n\t\t\t:min=\"field.min\"\n\t\t\t:max=\"field.max\"\n\t\t\t:step=\"numberStep\"\n\t\t\t:modelValue=\"stringValue\"\n\t\t\t:readonly=\"field.readOnly\"\n\t\t\t:error=\"!!error\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event === '' ? null : Number($event))\" />\n\t\t<NcTextField\n\t\t\tv-else\n\t\t\t:id=\"inputId\"\n\t\t\t:label=\"label\"\n\t\t\t:type=\"inputType\"\n\t\t\t:modelValue=\"stringValue\"\n\t\t\t:placeholder=\"field.placeholder || ''\"\n\t\t\t:readonly=\"field.readOnly\"\n\t\t\t:error=\"!!error\"\n\t\t\t:aria-describedby=\"describedBy\"\n\t\t\t@update:modelValue=\"emitValue($event)\" />\n\t\t<p v-if=\"shownError\"\n\t\t\t:id=\"`${inputId}-error`\"\n\t\t\tclass=\"cn-settings-field__error\"\n\t\t\t:data-testid=\"`cn-settings-field-error-${field.key}`\">\n\t\t\t{{ shownError }}\n\t\t</p>\n\t\t<p v-else-if=\"hint\" :id=\"`${inputId}-hint`\" class=\"cn-settings-field__hint\">\n\t\t\t{{ hint }}\n\t\t</p>\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { getDayNames, translate as t } from '@nextcloud/l10n'\nimport { NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField } from '@nextcloud/vue'\nimport Close from 'vue-material-design-icons/Close.vue'\nimport Plus from 'vue-material-design-icons/Plus.vue'\nimport Upload from 'vue-material-design-icons/Upload.vue'\nimport { buildHeaders, prefixUrl } from '../../utils/headers.js'\nimport { readPath } from '../../utils/readPath.js'\nimport { serverErrorMessage } from '../../utils/serverErrorMessage.js'\n\nlet fieldUid = 0\n\n/** Field types and the names CnSettingsPage's manifest uses for them. */\nconst KIND_ALIASES = { enum: 'select', string: 'text', datetime: 'datetime-local', 'date-time': 'datetime-local' }\n\n/** The days of a week, Monday first: the keys a week-hours value uses. */\nconst WEEK_DAYS = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']\n\n/** The same keys in the order of getDayNames(), which starts on Sunday. */\nconst WEEK_DAYS_FROM_SUNDAY = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']\n\n/** The kinds drawn as a text field with their own input type. */\nconst INPUT_TYPES = ['password', 'date', 'datetime-local', 'email', 'url']\n\n/**\n * CnSettingsField - one settings field: the control for its type with its\n * label, and under it an error or a hint. Shared by CnSettingsPage and\n * CnSettingsFieldsSection.\n *\n * Types: `text` (default), `textarea`, `number`, `switch`, `boolean` (a checkbox),\n * `select` (`enum`) with static `options` or options read from `optionsUrl`,\n * `password` (a masked input that shows its value back) and `secret`\n * (replace-only: the input stays empty, and with `secretSet` says a value is\n * stored; the host sends it only when something is typed), and `image` (a\n * preview tile, the initials without an image, and an upload button that\n * posts the file to `uploadUrl` at once and emits `uploaded`), `radio` (one\n * choice from `options`, each with an optional `description` under it),\n * `lines` (a textarea, one entry per line), `checkboxes` (several choices\n * from `options`, the value a list; `select` with `multiple` is the same as a\n * multi-select) and `pairs` (key-to-value rows with add and remove, the value\n * a list of `{ key, value }` rows). Three types hold no value of their\n * own: `heading` (a subheading between fields), `status` (a read-only note:\n * the host passes its `text` and `tone`) and `action` (a button that emits\n * `action`; the host passes `actionBusy` and the `actionResult` note).\n * `date`, `datetime-local` (also `datetime`, `date-time`), `email` and `url`\n * are text fields of that input type; the value stays the text the input holds.\n *\n * ```vue\n * <CnSettingsField\n * :field=\"{ key: 'apiKey', label: 'API key', type: 'secret', secretSet: true }\"\n * v-model=\"form.apiKey\" />\n * ```\n */\nexport default {\n\tname: 'CnSettingsField',\n\n\tcomponents: { Close, NcButton, NcCheckboxRadioSwitch, NcLoadingIcon, NcNoteCard, NcSelect, NcTextArea, NcTextField, Plus, Upload },\n\n\tprops: {\n\t\t/**\n\t\t * The field: `{ key, label, type?, options?, optionsUrl?, optionsPath?,\n\t\t * optionLabel?, optionValue?, optionDetail?, placeholder?, rows?, min?, max?, required?,\n\t\t * readOnly?, secretSet? }`. `label` arrives translated.\n\t\t *\n\t\t * @type {object}\n\t\t */\n\t\tfield: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The value: text, a number, a boolean or a select value. Any type,\n\t\t * because a Boolean in a type list would read an empty string as true.\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: null,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/** A validation message, drawn under the control and tied to it. */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** A hint under the control (not drawn while there is an error). */\n\t\thint: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['update:modelValue', 'uploaded', 'action', 'clear'],\n\n\tdata() {\n\t\tfieldUid += 1\n\t\treturn {\n\t\t\tuid: fieldUid,\n\t\t\tfetchedOptions: null,\n\t\t\toptionsLoading: false,\n\t\t\tsourceOptions: [],\n\t\t\tsourceLoading: false,\n\t\t\tsourceTruncated: false,\n\t\t\tuploading: false,\n\t\t\tuploadError: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {string} The control kind. */\n\t\tkind() {\n\t\t\tconst type = String(this.field.type || 'text')\n\t\t\treturn KIND_ALIASES[type] || type\n\t\t},\n\n\t\t/** @return {string} The input type of a text-like field. */\n\t\tinputType() {\n\t\t\treturn INPUT_TYPES.includes(this.kind) ? this.kind : 'text'\n\t\t},\n\n\t\t/**\n\t\t * The number input's step: the field's own, 1 for a whole number, else\n\t\t * any, so a decimal value (0.8) is not invalid to the browser.\n\t\t *\n\t\t * @return {string}\n\t\t * @spec openspec/changes/settings-number-decimal-step/specs/settings-fields/spec.md#requirement-a-number-setting-steps-as-it-is-declared\n\t\t */\n\t\tnumberStep() {\n\t\t\tif (typeof this.field.step === 'number' || (typeof this.field.step === 'string' && this.field.step !== '')) {\n\t\t\t\treturn String(this.field.step)\n\t\t\t}\n\t\t\treturn this.field.integer ? '1' : 'any'\n\t\t},\n\n\t\t/** @return {string} The label. */\n\t\tlabel() {\n\t\t\treturn String(this.field.label || this.field.key || '')\n\t\t},\n\n\t\t/** @return {string} The control's id. */\n\t\tinputId() {\n\t\t\treturn `cn-settings-field-${this.uid}-${String(this.field.key).replace(/[^A-Za-z0-9_-]/g, '-')}`\n\t\t},\n\n\t\t/** @return {string} The message shown under the control: an upload failure, else `error`. */\n\t\tshownError() {\n\t\t\treturn this.uploadError || this.error\n\t\t},\n\n\t\t/** @return {string|null} The id of the error or hint the control is described by. */\n\t\tdescribedBy() {\n\t\t\tif (this.shownError) {\n\t\t\t\treturn `${this.inputId}-error`\n\t\t\t}\n\t\t\treturn this.hint ? `${this.inputId}-hint` : null\n\t\t},\n\n\t\t/** @return {string} A status note's tone: `info`, `success`, `warning` or `error`. */\n\t\tstatusTone() {\n\t\t\treturn ['info', 'success', 'warning', 'error'].includes(this.field.tone) ? this.field.tone : 'info'\n\t\t},\n\n\t\t/** @return {string} The value as text for a text control. */\n\t\tstringValue() {\n\t\t\treturn this.modelValue === null || this.modelValue === undefined ? '' : String(this.modelValue)\n\t\t},\n\n\t\t/** @return {Array<{key: string, label: string}>} The days of a week-hours field, Monday first by default. */\n\t\tweekDays() {\n\t\t\tconst names = getDayNames()\n\t\t\tconst days = Array.isArray(this.field.days) && this.field.days.length > 0 ? this.field.days : WEEK_DAYS\n\t\t\treturn days.map((key) => ({ key, label: names[WEEK_DAYS_FROM_SUNDAY.indexOf(key)] || key }))\n\t\t},\n\n\t\t/** @return {object} A week-hours field's value: day to `{ opens, closes }` or null. */\n\t\tweekValue() {\n\t\t\treturn this.modelValue && typeof this.modelValue === 'object' && !Array.isArray(this.modelValue) ? this.modelValue : {}\n\t\t},\n\n\t\t/** @return {string} An action link's address, with the web root for an app path. */\n\t\tactionHref() {\n\t\t\treturn prefixUrl(String(this.field.href || ''))\n\t\t},\n\n\t\t/** @return {string} The placeholder of a secret that is stored. */\n\t\tsecretSetPlaceholder() {\n\t\t\treturn t('nextcloud-vue', 'Stored. Type a new value to replace it.')\n\t\t},\n\n\t\t/**\n\t\t * The select options as `{ label, value }`: the static `options` (strings,\n\t\t * numbers or objects), or those read from `optionsUrl`.\n\t\t *\n\t\t * @return {Array<{label: string, value: (string|number|boolean)}>}\n\t\t */\n\t\tnormalizedOptions() {\n\t\t\tconst raw = Array.isArray(this.field.options) ? this.field.options : (this.fetchedOptions || [])\n\t\t\treturn raw.map((option) => (option && typeof option === 'object'\n\t\t\t\t? { ...option, label: String(option.label ?? option.value ?? ''), value: option.value }\n\t\t\t\t: { label: String(option), value: option }))\n\t\t},\n\n\t\t/** @return {Array} The value as a list, for a multi-choice field. */\n\t\tlistValue() {\n\t\t\treturn Array.isArray(this.modelValue) ? this.modelValue : []\n\t\t},\n\n\t\t/** @return {Array<object>} The options a multi-select's value selects. */\n\t\tselectedOptions() {\n\t\t\treturn this.listValue.map((value) => this.normalizedOptions.find((option) => String(option.value) === String(value))\n\t\t\t\t|| { label: String(value), value })\n\t\t},\n\n\t\t/** @return {Array<{key: string, value: unknown}>} A pairs field's rows. */\n\t\tpairRows() {\n\t\t\treturn Array.isArray(this.modelValue) ? this.modelValue : []\n\t\t},\n\n\t\t/** @return {string} The label of a pair's key. */\n\t\tpairKeyLabel() {\n\t\t\treturn String(this.field.keyLabel || t('nextcloud-vue', 'Key'))\n\t\t},\n\n\t\t/** @return {string} The label of a pair's value. */\n\t\tpairValueLabel() {\n\t\t\treturn String(this.field.valueLabel || t('nextcloud-vue', 'Value'))\n\t\t},\n\n\t\t/** @return {object|null} The option the value selects, for NcSelect. */\n\t\tselectedOption() {\n\t\t\tif (this.modelValue === null || this.modelValue === undefined || this.modelValue === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\t// A stored value is often text where the options carry numbers (an\n\t\t\t// app config holding an id), so the two are compared as text.\n\t\t\treturn this.normalizedOptions.find((option) => option.value === this.modelValue)\n\t\t\t\t|| this.normalizedOptions.find((option) => String(option.value) === String(this.modelValue))\n\t\t\t\t|| { label: String(this.modelValue), value: this.modelValue }\n\t\t},\n\t},\n\n\twatch: {\n\t\t'field.optionsUrl': {\n\t\t\thandler() {\n\t\t\t\tthis.loadOptions()\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\n\t\t'field.valueSource': {\n\t\t\thandler() {\n\t\t\t\tthis.loadSourceOptions()\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * The \"remove the stored value\" switch of a secret changed.\n\t\t *\n\t\t * @param {boolean} on Whether the stored value is to be removed.\n\t\t * @return {void}\n\t\t */\n\t\tonClear(on) {\n\t\t\t/** @event clear The stored secret is to be removed (true) or kept (false). */\n\t\t\tthis.$emit('clear', on === true)\n\t\t},\n\n\t\tt,\n\n\t\t/** Ask the host to run an `action` field's action. */\n\t\trunAction() {\n\t\t\t/** @event action The user pressed an `action` field's button. */\n\t\t\tthis.$emit('action')\n\t\t},\n\n\t\t/**\n\t\t * Upload a chosen image to `uploadUrl` as multipart form data (the\n\t\t * file under `uploadField`, default `image`, plus `uploadParams`), then\n\t\t * take the new image url from the answer at `uploadValuePath` (or a\n\t\t * cache-busted `previewUrl`).\n\t\t *\n\t\t * @param {File|undefined} file The chosen file.\n\t\t * @return {Promise<void>}\n\t\t * @spec openspec/changes/settings-fields-section/specs/settings-fields-section/spec.md#requirement-an-image-field-uploads-at-once\n\t\t */\n\t\tasync upload(file) {\n\t\t\tif (!file || !this.field.uploadUrl) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst form = new FormData()\n\t\t\tfor (const [name, value] of Object.entries(this.field.uploadParams || {})) {\n\t\t\t\tform.append(name, value)\n\t\t\t}\n\t\t\tform.append(this.field.uploadField || 'image', file)\n\t\t\tthis.uploading = true\n\t\t\tthis.uploadError = ''\n\t\t\ttry {\n\t\t\t\tconst response = await axios.post(prefixUrl(this.field.uploadUrl), form)\n\t\t\t\tconst fromAnswer = this.field.uploadValuePath ? readPath(response?.data, this.field.uploadValuePath) : ''\n\t\t\t\tconst next = fromAnswer || (this.field.previewUrl ? `${prefixUrl(this.field.previewUrl)}${this.field.previewUrl.includes('?') ? '&' : '?'}v=${Date.now()}` : '')\n\t\t\t\t/**\n\t\t\t\t * @event uploaded An image was uploaded. Payload: its new url.\n\t\t\t\t */\n\t\t\t\tthis.$emit('uploaded', next)\n\t\t\t} catch (error) {\n\t\t\t\tthis.uploadError = t('nextcloud-vue', 'The image could not be uploaded: {reason}', { reason: serverErrorMessage(error) })\n\t\t\t} finally {\n\t\t\t\tthis.uploading = false\n\t\t\t\tif (this.$refs.file) {\n\t\t\t\t\tthis.$refs.file.value = ''\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Report a new value.\n\t\t *\n\t\t * @param {unknown} value The value.\n\t\t * @return {void}\n\t\t */\n\t\temitValue(value) {\n\t\t\t/**\n\t\t\t * @event update:modelValue The value changed. Payload: the new value.\n\t\t\t */\n\t\t\tthis.$emit('update:modelValue', value)\n\t\t},\n\n\t\t/**\n\t\t * Check or uncheck one choice of a `checkboxes` field; the list keeps\n\t\t * the order of the options.\n\t\t *\n\t\t * @param {string|number} value The option's value.\n\t\t * @param {boolean} checked Whether it is now checked.\n\t\t * @return {void}\n\t\t */\n\t\ttoggleOption(value, checked) {\n\t\t\tconst chosen = new Set(this.listValue.map(String))\n\t\t\tif (checked) {\n\t\t\t\tchosen.add(String(value))\n\t\t\t} else {\n\t\t\t\tchosen.delete(String(value))\n\t\t\t}\n\t\t\tthis.emitValue(this.normalizedOptions.filter((option) => chosen.has(String(option.value))).map((option) => option.value))\n\t\t},\n\n\t\t/**\n\t\t * Change a pair's key or value.\n\t\t *\n\t\t * @param {number} index The row.\n\t\t * @param {string} part `key` or `value`.\n\t\t * @param {string} text What was typed.\n\t\t * @return {void}\n\t\t */\n\t\tsetPair(index, part, text) {\n\t\t\tconst rows = this.pairRows.map((row) => ({ ...row }))\n\t\t\trows[index] = { ...rows[index], [part]: part === 'value' && this.field.valueType === 'number' && text !== '' ? Number(text) : text }\n\t\t\tthis.emitValue(rows)\n\t\t},\n\n\t\t/** Add an empty pair. */\n\t\taddPair() {\n\t\t\tthis.emitValue([...this.pairRows, { key: '', value: '' }])\n\t\t},\n\n\t\t/**\n\t\t * Remove a pair.\n\t\t *\n\t\t * @param {number} index The row.\n\t\t * @return {void}\n\t\t */\n\t\tremovePair(index) {\n\t\t\tthis.emitValue(this.pairRows.filter((_row, at) => at !== index))\n\t\t},\n\n\t\t/**\n\t\t * The storable values of what a multi-select emits.\n\t\t *\n\t\t * @param {Array|null} emitted The chosen options.\n\t\t * @return {Array}\n\t\t */\n\t\toptionValues(emitted) {\n\t\t\treturn (Array.isArray(emitted) ? emitted : []).map((option) => this.optionValue(option))\n\t\t},\n\n\t\t/**\n\t\t * The storable value of what NcSelect emits.\n\t\t *\n\t\t * @param {object|string|number|null} emitted An option, or null on clear.\n\t\t * @return {string|number|boolean|null}\n\t\t */\n\t\toptionValue(emitted) {\n\t\t\tif (emitted === null || emitted === undefined) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn typeof emitted === 'object' && 'value' in emitted ? emitted.value : emitted\n\t\t},\n\n\t\t/**\n\t\t * Open or close one day of a week-hours field; an opened day takes\n\t\t * `defaultOpens`/`defaultCloses` (08:00 to 17:00).\n\t\t *\n\t\t * @param {string} day The day key.\n\t\t * @param {boolean} open Whether it is open.\n\t\t * @return {void}\n\t\t */\n\t\tsetDayOpen(day, open) {\n\t\t\tconst hours = open ? { opens: this.field.defaultOpens || '08:00', closes: this.field.defaultCloses || '17:00' } : null\n\t\t\tthis.emitValue({ ...this.weekValue, [day]: hours })\n\t\t},\n\n\t\t/**\n\t\t * Change one time of an open day.\n\t\t *\n\t\t * @param {string} day The day key.\n\t\t * @param {string} part `opens` or `closes`.\n\t\t * @param {string} time The time, `HH:MM`.\n\t\t * @return {void}\n\t\t */\n\t\tsetDayTime(day, part, time) {\n\t\t\tthis.emitValue({ ...this.weekValue, [day]: { ...(this.weekValue[day] || {}), [part]: time } })\n\t\t},\n\n\t\t/**\n\t\t * The option a pairs value selects; an id no object answers keeps its id as label.\n\t\t *\n\t\t * @param {unknown} value The stored id.\n\t\t * @return {object|null}\n\t\t */\n\t\tsourceOption(value) {\n\t\t\tif (value === null || value === undefined || value === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn this.sourceOptions.find((option) => String(option.value) === String(value)) || { label: String(value), value }\n\t\t},\n\n\t\t/**\n\t\t * Read the objects a pairs field's values are chosen from:\n\t\t * `valueSource { register, schema, labelField?, valueField?, limit? }`.\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadSourceOptions() {\n\t\t\tconst source = this.kind === 'pairs' ? this.field.valueSource : null\n\t\t\tif (!source || !source.register || !source.schema) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst limit = Number(source.limit) > 0 ? Number(source.limit) : 1000\n\t\t\tthis.sourceLoading = true\n\t\t\ttry {\n\t\t\t\tconst url = `/apps/openregister/api/objects/${encodeURIComponent(source.register)}/${encodeURIComponent(source.schema)}?_limit=${limit}`\n\t\t\t\tconst { data } = await axios.get(prefixUrl(url))\n\t\t\t\tconst list = Array.isArray(data?.results) ? data.results : []\n\t\t\t\tthis.sourceOptions = list.filter((item) => item && typeof item === 'object').map((item) => {\n\t\t\t\t\tconst value = source.valueField ? readPath(item, source.valueField) : (item.id ?? item.uuid ?? item['@self']?.id)\n\t\t\t\t\tconst label = source.labelField ? readPath(item, source.labelField) : (item.name ?? item.title)\n\t\t\t\t\treturn { label: String(label || value || ''), value }\n\t\t\t\t})\n\t\t\t\tthis.sourceTruncated = Number(data?.total) > list.length\n\t\t\t} catch {\n\t\t\t\tthis.sourceOptions = []\n\t\t\t\tthis.sourceTruncated = false\n\t\t\t} finally {\n\t\t\t\tthis.sourceLoading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Read a sourced select's options: a list (or the list at\n\t\t * `optionsPath`, or under `results`) mapped through `optionLabel` and\n\t\t * `optionValue` (dotted paths; default `label`/`title`/`name` and `value`/`id`).\n\t\t *\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync loadOptions() {\n\t\t\tconst url = this.kind === 'select' && !Array.isArray(this.field.options) ? this.field.optionsUrl : ''\n\t\t\tif (!url) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.optionsLoading = true\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(prefixUrl(url), { headers: buildHeaders() })\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tthis.fetchedOptions = []\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tconst data = await response.json()\n\t\t\t\tconst list = this.field.optionsPath ? readPath(data, this.field.optionsPath) : (Array.isArray(data) ? data : data?.results)\n\t\t\t\tthis.fetchedOptions = (Array.isArray(list) ? list : []).map((item) => {\n\t\t\t\t\tif (!item || typeof item !== 'object') {\n\t\t\t\t\t\treturn { label: String(item), value: item }\n\t\t\t\t\t}\n\t\t\t\t\tconst value = this.field.optionValue ? readPath(item, this.field.optionValue) : (item.value ?? item.id)\n\t\t\t\t\tconst label = this.field.optionLabel ? readPath(item, this.field.optionLabel) : (item.label ?? item.title ?? item.name ?? value)\n\t\t\t\t\tconst detail = this.field.optionDetail ? readPath(item, this.field.optionDetail) : ''\n\t\t\t\t\treturn { label: detail ? `${label ?? ''} (${detail})` : String(label ?? ''), value }\n\t\t\t\t})\n\t\t\t} catch {\n\t\t\t\tthis.fetchedOptions = []\n\t\t\t} finally {\n\t\t\t\tthis.optionsLoading = false\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-settings-field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px;\n\tmin-width: 0;\n}\n\n.cn-settings-field__hint,\n.cn-settings-field__error {\n\tmargin: 0;\n\tfont-size: 13px;\n\tline-height: 1.4;\n}\n\n.cn-settings-field__image {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-settings-field__image-label {\n\tfont-weight: 600;\n}\n\n/* A note: the field's label, then a line of muted text where a control would\n stand (DqInstellingenAlgemeen \"Toegestane websites (CORS)\"). */\n.cn-settings-field__note {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 6px;\n}\n\n.cn-settings-field__note-label {\n\tfont-weight: 600;\n}\n\n.cn-settings-field__note-text {\n\tmargin: 0;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-field__image-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-settings-field__image-tile {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 64px;\n\theight: 64px;\n\toverflow: hidden;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius-large);\n\tbackground: var(--color-primary-element-light);\n}\n\n.cn-settings-field__image-tile img {\n\tmax-width: 100%;\n\tmax-height: 100%;\n\tobject-fit: contain;\n}\n\n.cn-settings-field__image-initials {\n\tfont-size: 20px;\n\tfont-weight: 700;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n}\n\n.cn-settings-field__hint,\n.cn-settings-field__option-description {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-settings-field__heading {\n\tmargin: 8px 0 0;\n\tfont-size: 16px;\n\tfont-weight: 600;\n}\n\n.cn-settings-field__radio {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.cn-settings-field__week {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.cn-settings-field__day {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-end;\n\tgap: 8px;\n}\n\n.cn-settings-field__day > :first-child {\n\tflex: 0 0 160px;\n}\n\n.cn-settings-field__pairs {\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: flex-start;\n\tgap: 8px;\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n}\n\n.cn-settings-field__pair {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-end;\n\tgap: 8px;\n\twidth: 100%;\n}\n\n.cn-settings-field__pair > :not(button) {\n\tflex: 1 1 140px;\n\tmin-width: 0;\n}\n\n.cn-settings-field__radio-legend {\n\tfont-weight: 600;\n}\n\n.cn-settings-field__option-description {\n\tmargin: 0 0 8px calc(var(--default-grid-baseline, 4px) * 9);\n\tfont-size: 13px;\n\tline-height: 1.4;\n}\n\n.cn-settings-field__action-row {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-settings-field__error {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n</style>\n"],"names":["t","axios"],"mappings":";;;;;;;;;;AA8TA,IAAI,QAAO,GAAI,EAAA;;AAEf;AACA,MAAM,YAAW,GAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAiB,GAAA;;AAEjH;AACA,MAAM,SAAU,GAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAA;;AAE/F;AACA,MAAM,qBAAsB,GAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAA;;AAE3G;AACA,MAAM,WAAU,GAAI,CAAC,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAA;;AAEzE;;;;AAIC;AACA;AACA;;AAEA;;;AAGA;;AAEA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAED,aAAe;CACd,IAAI,EAAE,iBAAiB;;CAEvB,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,MAAK,EAAG;;AAElI,CAAA,KAAK,EAAE;AACN;;AAEC;;AAEA;;;AAGD,EAAA,KAAK,EAAE;GACN,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;;AAED;;;;EAIA,UAAU,EAAE;AACX,GAAA,IAAI,EAAE,IAAI;GACV,OAAO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AC,KAAK,CAAC,YAAY,CAAA,GAAI,GAAC;AACpF,KAAA,OAAO,EAAE,KAAK,EAAE,MAAO,GAAE,CAAC,EAAE,KAAM,IAAG,EAAE,CAAE,EAAC,EAAE,MAAM,CAAC,CAAC,CAAA,GAAI,MAAM,CAAC,KAAI,IAAK,EAAE,CAAC,EAAE,KAAM,EAAA;KACnF,EAAA;AACF,IAAA,CAAE,MAAM;AACP,IAAA,IAAI,CAAC,cAAa,GAAI,GAAC;AACxB,IAAA,SAAU;IACT,IAAI,CAAC,iBAAiB,MAAI;AAC3B,IAAA;GACA;EACD;AACF;;;;"}
@@ -62,6 +62,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
62
62
  const _component_NcSelect = resolveComponent("NcSelect");
63
63
  const _component_Close = resolveComponent("Close");
64
64
  const _component_Plus = resolveComponent("Plus");
65
+ const _component_Upload = resolveComponent("Upload");
65
66
  const _component_NcTextArea = resolveComponent("NcTextArea");
66
67
 
67
68
  return (openBlock(), createElementBlock("div", {
@@ -336,22 +337,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
336
337
  "aria-describedby": $options.describedBy,
337
338
  "data-testid": `cn-settings-field-upload-${$props.field.key}`,
338
339
  onClick: _cache[2] || (_cache[2] = $event => (_ctx.$refs.file && _ctx.$refs.file.click()))
339
- }, createSlots({
340
+ }, {
341
+ icon: withCtx(() => [
342
+ ($data.uploading)
343
+ ? (openBlock(), createBlock(_component_NcLoadingIcon, {
344
+ key: 0,
345
+ size: 20
346
+ }))
347
+ : (openBlock(), createBlock(_component_Upload, {
348
+ key: 1,
349
+ size: 16
350
+ }))
351
+ ]),
340
352
  default: withCtx(() => [
341
353
  createTextVNode(" " + toDisplayString($props.field.uploadLabel || $options.t('nextcloud-vue', 'Upload {name}', { name: $options.label })), 1 /* TEXT */)
342
354
  ]),
343
- _: 2 /* DYNAMIC */
344
- }, [
345
- ($data.uploading)
346
- ? {
347
- name: "icon",
348
- fn: withCtx(() => [
349
- createVNode(_component_NcLoadingIcon, { size: 20 })
350
- ]),
351
- key: "0"
352
- }
353
- : undefined
354
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "aria-describedby", "data-testid"]))
355
+ _: 1 /* STABLE */
356
+ }, 8 /* PROPS */, ["disabled", "aria-describedby", "data-testid"]))
355
357
  : createCommentVNode("v-if", true)
356
358
  ])
357
359
  ], 8 /* PROPS */, _hoisted_15))