@conduction/nextcloud-vue 2.174.0 → 2.176.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +114 -11
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +67 -17
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
  6. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue.js +9 -0
  7. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue.js.map +1 -0
  8. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue2.js +352 -0
  9. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue2.js.map +1 -0
  10. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue3.js +266 -0
  11. package/dist/esm/components/CnBlockListEditor/CnBlockListEditor.vue3.js.map +1 -0
  12. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
  13. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js +323 -7
  14. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
  15. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js +113 -59
  16. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
  17. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue.js +1 -1
  18. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue2.js +210 -5
  19. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue2.js.map +1 -1
  20. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue3.js +134 -46
  21. package/dist/esm/components/CnChildRecordsField/CnChildRecordsField.vue3.js.map +1 -1
  22. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue.js +9 -0
  23. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue.js.map +1 -0
  24. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue2.js +385 -0
  25. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue2.js.map +1 -0
  26. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue3.js +277 -0
  27. package/dist/esm/components/CnChoiceMatrix/CnChoiceMatrix.vue3.js.map +1 -0
  28. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
  29. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js +175 -20
  30. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
  31. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js +30 -8
  32. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
  33. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue.js +1 -1
  34. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue2.js +72 -6
  35. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue2.js.map +1 -1
  36. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue3.js +48 -14
  37. package/dist/esm/components/CnCreateFormWidget/CnCreateFormWidget.vue3.js.map +1 -1
  38. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue.js +1 -1
  39. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js +255 -10
  40. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js.map +1 -1
  41. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js +70 -28
  42. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js.map +1 -1
  43. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +55 -6
  44. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  45. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  46. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue.js +9 -0
  47. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue.js.map +1 -0
  48. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue2.js +175 -0
  49. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue2.js.map +1 -0
  50. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue3.js +114 -0
  51. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue3.js.map +1 -0
  52. package/dist/esm/components/CnDurationField/CnDurationField.vue.js +1 -1
  53. package/dist/esm/components/CnDurationField/CnDurationField.vue2.js +218 -4
  54. package/dist/esm/components/CnDurationField/CnDurationField.vue2.js.map +1 -1
  55. package/dist/esm/components/CnDurationField/CnDurationField.vue3.js +133 -44
  56. package/dist/esm/components/CnDurationField/CnDurationField.vue3.js.map +1 -1
  57. package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
  58. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  59. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +5 -1
  60. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  61. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue.js +9 -0
  62. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue.js.map +1 -0
  63. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue2.js +113 -0
  64. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue2.js.map +1 -0
  65. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue3.js +43 -0
  66. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue3.js.map +1 -0
  67. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +40 -1
  68. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  69. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  70. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue.js +1 -1
  71. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js +110 -1
  72. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js.map +1 -1
  73. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js +60 -18
  74. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js.map +1 -1
  75. package/dist/esm/components/CnMenuTreeNode/CnMenuTreeNode.vue2.js +2 -2
  76. package/dist/esm/components/CnMenuTreeNode/CnMenuTreeNode.vue2.js.map +1 -1
  77. package/dist/esm/components/CnObjectKanban/CnObjectKanban.vue2.js +2 -2
  78. package/dist/esm/components/CnObjectKanban/CnObjectKanban.vue2.js.map +1 -1
  79. package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js +2 -2
  80. package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js.map +1 -1
  81. package/dist/esm/components/CnQrCode/CnQrCode.vue.js +9 -0
  82. package/dist/esm/components/CnQrCode/CnQrCode.vue.js.map +1 -0
  83. package/dist/esm/components/CnQrCode/CnQrCode.vue2.js +241 -0
  84. package/dist/esm/components/CnQrCode/CnQrCode.vue2.js.map +1 -0
  85. package/dist/esm/components/CnQrCode/CnQrCode.vue3.js +75 -0
  86. package/dist/esm/components/CnQrCode/CnQrCode.vue3.js.map +1 -0
  87. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue.js +1 -1
  88. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue2.js +34 -3
  89. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue2.js.map +1 -1
  90. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue3.js +81 -19
  91. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue3.js.map +1 -1
  92. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  93. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +11 -0
  94. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  95. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +112 -88
  96. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  97. package/dist/esm/components/CnRevealField/CnRevealField.vue.js +9 -0
  98. package/dist/esm/components/CnRevealField/CnRevealField.vue.js.map +1 -0
  99. package/dist/esm/components/CnRevealField/CnRevealField.vue2.js +157 -0
  100. package/dist/esm/components/CnRevealField/CnRevealField.vue2.js.map +1 -0
  101. package/dist/esm/components/CnRevealField/CnRevealField.vue3.js +116 -0
  102. package/dist/esm/components/CnRevealField/CnRevealField.vue3.js.map +1 -0
  103. package/dist/esm/components/CnStorePage/CnStorePage.vue.js +1 -1
  104. package/dist/esm/components/CnStorePage/CnStorePage.vue2.js +3 -3
  105. package/dist/esm/components/CnStorePage/CnStorePage.vue2.js.map +1 -1
  106. package/dist/esm/components/CnStorePage/CnStorePage.vue3.js +5 -5
  107. package/dist/esm/components/CnStorePage/CnStorePage.vue3.js.map +1 -1
  108. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue.js +1 -1
  109. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue2.js +6 -6
  110. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue2.js.map +1 -1
  111. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue3.js +1 -1
  112. package/dist/esm/components/CnStorePage/CnStorePublishDialog.vue3.js.map +1 -1
  113. package/dist/esm/components/CnTextWidget/CnTextWidget.vue.js +1 -1
  114. package/dist/esm/components/CnTextWidget/CnTextWidget.vue2.js +43 -3
  115. package/dist/esm/components/CnTextWidget/CnTextWidget.vue2.js.map +1 -1
  116. package/dist/esm/components/CnTextWidget/CnTextWidget.vue3.js +19 -12
  117. package/dist/esm/components/CnTextWidget/CnTextWidget.vue3.js.map +1 -1
  118. package/dist/esm/components/CnTransferCard/CnTransferCard.vue.js +9 -0
  119. package/dist/esm/components/CnTransferCard/CnTransferCard.vue.js.map +1 -0
  120. package/dist/esm/components/CnTransferCard/CnTransferCard.vue2.js +87 -0
  121. package/dist/esm/components/CnTransferCard/CnTransferCard.vue2.js.map +1 -0
  122. package/dist/esm/components/CnTransferCard/CnTransferCard.vue3.js +126 -0
  123. package/dist/esm/components/CnTransferCard/CnTransferCard.vue3.js.map +1 -0
  124. package/dist/esm/components/CnTreeView/CnTreeNode.vue.js +1 -1
  125. package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js +66 -1
  126. package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js.map +1 -1
  127. package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js +129 -29
  128. package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js.map +1 -1
  129. package/dist/esm/components/CnTreeView/CnTreeView.vue.js +1 -1
  130. package/dist/esm/components/CnTreeView/CnTreeView.vue2.js +158 -6
  131. package/dist/esm/components/CnTreeView/CnTreeView.vue2.js.map +1 -1
  132. package/dist/esm/components/CnTreeView/CnTreeView.vue3.js +100 -39
  133. package/dist/esm/components/CnTreeView/CnTreeView.vue3.js.map +1 -1
  134. package/dist/esm/index.js +8 -0
  135. package/dist/esm/index.js.map +1 -1
  136. package/dist/esm/l10n/en.json.js +79 -14
  137. package/dist/esm/l10n/en.json.js.map +1 -1
  138. package/dist/esm/l10n/nl.json.js +79 -14
  139. package/dist/esm/l10n/nl.json.js.map +1 -1
  140. package/dist/esm/library-style.js +1 -1
  141. package/dist/esm/nextcloud-vue.css +1162 -523
  142. package/dist/esm/node_modules/vuedraggable/dist/vuedraggable.umd.js +2 -2
  143. package/dist/esm/utils/captureLocation.js +32 -0
  144. package/dist/esm/utils/captureLocation.js.map +1 -0
  145. package/dist/esm/utils/childRecordTotals.js +157 -0
  146. package/dist/esm/utils/childRecordTotals.js.map +1 -0
  147. package/dist/esm/utils/isoDuration.js +51 -1
  148. package/dist/esm/utils/isoDuration.js.map +1 -1
  149. package/dist/esm/utils/parentCrumb.js +86 -0
  150. package/dist/esm/utils/parentCrumb.js.map +1 -0
  151. package/dist/esm/utils/qr.js +649 -0
  152. package/dist/esm/utils/qr.js.map +1 -0
  153. package/dist/esm/utils/schema.js +3 -0
  154. package/dist/esm/utils/schema.js.map +1 -1
  155. package/dist/esm/utils/templateVariables.js +54 -0
  156. package/dist/esm/utils/templateVariables.js.map +1 -0
  157. package/dist/nextcloud-vue.cjs.js +21125 -15025
  158. package/dist/nextcloud-vue.cjs.js.map +2 -2
  159. package/dist/nextcloud-vue.css +1162 -523
  160. package/l10n/en.json +79 -14
  161. package/l10n/nl.json +79 -14
  162. package/package.json +1 -1
  163. package/src/components/CnActionDialog/CnActionDialog.vue +156 -9
  164. package/src/components/CnBlockListEditor/CnBlockListEditor.vue +615 -0
  165. package/src/components/CnBlockListEditor/index.js +9 -0
  166. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +377 -10
  167. package/src/components/CnChildRecordsField/CnChildRecordsField.vue +306 -15
  168. package/src/components/CnChoiceMatrix/CnChoiceMatrix.vue +710 -0
  169. package/src/components/CnChoiceMatrix/index.js +9 -0
  170. package/src/components/CnCountdownWidget/CnCountdownWidget.vue +223 -28
  171. package/src/components/CnCreateFormWidget/CnCreateFormWidget.vue +97 -6
  172. package/src/components/CnDataMatrix/CnDataMatrix.vue +304 -17
  173. package/src/components/CnDetailPage/CnDetailPage.vue +55 -6
  174. package/src/components/CnDisplayScreen/CnDisplayScreen.vue +308 -0
  175. package/src/components/CnDisplayScreen/index.js +9 -0
  176. package/src/components/CnDurationField/CnDurationField.vue +330 -5
  177. package/src/components/CnFormDialog/CnFormDialog.vue +4 -0
  178. package/src/components/CnGeoCaptureField/CnGeoCaptureField.vue +148 -0
  179. package/src/components/CnGeoCaptureField/index.js +9 -0
  180. package/src/components/CnIndexPage/CnIndexPage.vue +40 -1
  181. package/src/components/CnMarkdownEditor/CnMarkdownEditor.vue +139 -1
  182. package/src/components/CnQrCode/CnQrCode.vue +321 -0
  183. package/src/components/CnQrCode/index.js +9 -0
  184. package/src/components/CnReadinessChecklist/CnReadinessChecklist.vue +80 -3
  185. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +34 -1
  186. package/src/components/CnRevealField/CnRevealField.vue +273 -0
  187. package/src/components/CnRevealField/index.js +9 -0
  188. package/src/components/CnStorePage/CnStorePage.vue +8 -8
  189. package/src/components/CnStorePage/CnStorePublishDialog.vue +7 -7
  190. package/src/components/CnTextWidget/CnTextWidget.vue +62 -3
  191. package/src/components/CnTransferCard/CnTransferCard.vue +205 -0
  192. package/src/components/CnTransferCard/index.js +9 -0
  193. package/src/components/CnTreeView/CnTreeNode.vue +145 -2
  194. package/src/components/CnTreeView/CnTreeView.vue +210 -6
  195. package/src/components/index.js +7 -0
  196. package/src/index.js +8 -0
  197. package/src/utils/captureLocation.js +29 -0
  198. package/src/utils/childRecordTotals.js +153 -0
  199. package/src/utils/isoDuration.js +50 -0
  200. package/src/utils/parentCrumb.js +83 -0
  201. package/src/utils/qr.js +681 -0
  202. package/src/utils/schema.js +3 -0
  203. package/src/utils/templateVariables.js +51 -0
@@ -1,3 +1,7 @@
1
+ import { NcButton } from '@nextcloud/vue';
2
+ import Draggable from '../../node_modules/vuedraggable/dist/vuedraggable.umd.js';
3
+ import DragVertical from 'vue-material-design-icons/DragVertical.vue';
4
+
1
5
  /**
2
6
  * CnTreeNode — Recursive tree row used inside CnTreeView. Renders
3
7
  * its own row + recurses for children when expanded. Not exported
@@ -6,6 +10,7 @@
6
10
  */
7
11
  var script = {
8
12
  name: 'CnTreeNode',
13
+ components: { Draggable, DragVertical, NcButton },
9
14
  props: {
10
15
  /** The node data. */
11
16
  node: { type: Object, required: true },
@@ -33,10 +38,30 @@ var script = {
33
38
  rowAttrs: { type: Function, default: null },
34
39
  /** Rows take focus and select on Enter or Space. */
35
40
  focusableRows: { type: Boolean, default: false },
41
+ /** Rows can be moved among their siblings. */
42
+ reorderable: { type: Boolean, default: false },
43
+ /** The texts of the move controls, resolved by CnTreeView. */
44
+ reorderLabels: { type: Object, default: () => ({}) },
45
+ /** The parent's id, or null at the root. */
46
+ parentId: { type: [String, Number], default: null },
47
+ /** This node's index among its siblings. */
48
+ siblingIndex: { type: Number, default: 0 },
49
+ /** How many siblings there are, itself included. */
50
+ siblingCount: { type: Number, default: 1 },
36
51
  },
37
52
 
38
- emits: ['select', 'toggle'],
53
+ emits: ['select', 'toggle', 'move'],
39
54
  computed: {
55
+ /**
56
+ * One entry when the row draws its move controls. A `v-for` leaves no
57
+ * placeholder in the markup when off, which `v-if` would.
58
+ *
59
+ * @return {string[]} The keys.
60
+ */
61
+ reorderSlots() {
62
+ return this.reorderable ? ['reorder'] : []
63
+ },
64
+
40
65
  /**
41
66
  * Whether this node has any children at all.
42
67
  *
@@ -99,6 +124,46 @@ var script = {
99
124
  this.$emit('toggle', this.node[this.idKey]);
100
125
  },
101
126
 
127
+ /**
128
+ * The accessible name of a move button: its visible label and the node's.
129
+ *
130
+ * @param {string} action The visible label.
131
+ * @return {string} The name.
132
+ */
133
+ moveName(action) {
134
+ return this.reorderLabels.controlName
135
+ .replace('{action}', action)
136
+ .replace('{label}', String(this.node[this.labelKey] ?? ''))
137
+ },
138
+
139
+ /**
140
+ * Move this node one place among its siblings, with a button.
141
+ *
142
+ * @param {number} delta -1 up, 1 down.
143
+ * @return {void}
144
+ */
145
+ moveBy(delta) {
146
+ this.$emit('move', {
147
+ node: this.node,
148
+ parentId: this.parentId,
149
+ from: this.siblingIndex,
150
+ to: this.siblingIndex + delta,
151
+ byButton: true,
152
+ });
153
+ },
154
+
155
+ /**
156
+ * A child was dragged to another place.
157
+ *
158
+ * @param {{moved?: {element: object, oldIndex: number, newIndex: number}}} change What the drag changed.
159
+ * @return {void}
160
+ */
161
+ onDragChange({ moved } = {}) {
162
+ if (moved) {
163
+ this.$emit('move', { node: moved.element, parentId: this.node[this.idKey], from: moved.oldIndex, to: moved.newIndex });
164
+ }
165
+ },
166
+
102
167
  onRowClick() {
103
168
  this.$emit('select', this.node);
104
169
  },
@@ -1 +1 @@
1
- {"version":3,"file":"CnTreeNode.vue2.js","sources":["../../../../src/components/CnTreeView/CnTreeNode.vue"],"sourcesContent":["<template>\n\t<li class=\"cn-tree-node\"\n\t\t:class=\"{\n\t\t\t'cn-tree-node--selected': isSelected,\n\t\t\t'cn-tree-node--expanded': isExpanded,\n\t\t}\"\n\t\t:data-node-id=\"node[idKey]\"\n\t\trole=\"treeitem\"\n\t\t:aria-expanded=\"hasChildren ? isExpanded : undefined\"\n\t\t:aria-selected=\"isSelected\">\n\t\t<div class=\"cn-tree-node__row\"\n\t\t\tv-bind=\"extraRowAttrs\"\n\t\t\t:style=\"{ paddingLeft: (depth * indent) + 'px' }\"\n\t\t\t:tabindex=\"focusableRows ? 0 : undefined\"\n\t\t\t@click=\"onRowClick\"\n\t\t\t@keydown=\"onRowKeydown\">\n\t\t\t<button v-if=\"hasChildren\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tv-bind=\"extraToggleAttrs\"\n\t\t\t\tclass=\"cn-tree-node__toggle\"\n\t\t\t\t:aria-label=\"toggleLabel\"\n\t\t\t\t@click.stop=\"toggle\">\n\t\t\t\t<span class=\"cn-tree-node__caret\" :class=\"{ 'cn-tree-node__caret--open': isExpanded }\">▸</span>\n\t\t\t</button>\n\t\t\t<span v-else class=\"cn-tree-node__toggle cn-tree-node__toggle--leaf\" />\n\n\t\t\t<span v-if=\"node.icon\" class=\"cn-tree-node__icon\">{{ node.icon }}</span>\n\t\t\t<span class=\"cn-tree-node__label\">\n\t\t\t\t<!-- @slot label The row's label. Scope: { node, depth, expanded }. Defaults to the node's label text. -->\n\t\t\t\t<slot name=\"label\"\n\t\t\t\t\t:node=\"node\"\n\t\t\t\t\t:depth=\"depth\"\n\t\t\t\t\t:expanded=\"isExpanded\">{{ node[labelKey] }}</slot>\n\t\t\t</span>\n\t\t\t<span v-if=\"node.badge !== undefined\" class=\"cn-tree-node__badge\">{{ node.badge }}</span>\n\n\t\t\t<!-- @slot actions Inline per-row actions slot. Scope:\n\t\t\t { node, depth }. -->\n\t\t\t<slot name=\"actions\" :node=\"node\" :depth=\"depth\" />\n\t\t</div>\n\n\t\t<ul v-if=\"hasChildren && isExpanded\" class=\"cn-tree-node__children\" role=\"group\">\n\t\t\t<CnTreeNode v-for=\"child in node[childrenKey]\"\n\t\t\t\t:key=\"child[idKey]\"\n\t\t\t\t:node=\"child\"\n\t\t\t\t:depth=\"depth + 1\"\n\t\t\t\t:indent=\"indent\"\n\t\t\t\t:expandedIds=\"expandedIds\"\n\t\t\t\t:selectedId=\"selectedId\"\n\t\t\t\t:idKey=\"idKey\"\n\t\t\t\t:labelKey=\"labelKey\"\n\t\t\t\t:childrenKey=\"childrenKey\"\n\t\t\t\t:expandLabel=\"expandLabel\"\n\t\t\t\t:collapseLabel=\"collapseLabel\"\n\t\t\t\t:toggleAttrs=\"toggleAttrs\"\n\t\t\t\t:rowAttrs=\"rowAttrs\"\n\t\t\t\t:focusableRows=\"focusableRows\"\n\t\t\t\t@toggle=\"$emit('toggle', $event)\"\n\t\t\t\t@select=\"$emit('select', $event)\">\n\t\t\t\t<template #actions=\"scope\">\n\t\t\t\t\t<slot name=\"actions\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"$slots.label\" #label=\"scope\">\n\t\t\t\t\t<slot name=\"label\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t</CnTreeNode>\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\n/**\n * CnTreeNode — Recursive tree row used inside CnTreeView. Renders\n * its own row + recurses for children when expanded. Not exported\n * as a separate barrel entry — consumers use CnTreeView and the\n * recursion is internal.\n */\nexport default {\n\tname: 'CnTreeNode',\n\tprops: {\n\t\t/** The node data. */\n\t\tnode: { type: Object, required: true },\n\t\t/** Depth (drives indent). */\n\t\tdepth: { type: Number, default: 0 },\n\t\t/** Pixels of padding per depth level. */\n\t\tindent: { type: Number, default: 18 },\n\t\t/** Set of expanded node ids. */\n\t\texpandedIds: { type: Object, required: true },\n\t\t/** Currently selected node id, read off `node[idKey]` (or null). */\n\t\tselectedId: { type: [String, Number], default: null },\n\t\t/** Node-field key for the id. */\n\t\tidKey: { type: String, default: 'id' },\n\t\t/** Node-field key for the display label. */\n\t\tlabelKey: { type: String, default: 'label' },\n\t\t/** Node-field key for the children array. */\n\t\tchildrenKey: { type: String, default: 'children' },\n\t\t/** A11y label for the expand button, or `(node) => string`. */\n\t\texpandLabel: { type: [String, Function], default: 'Expand' },\n\t\t/** A11y label for the collapse button, or `(node) => string`. */\n\t\tcollapseLabel: { type: [String, Function], default: 'Collapse' },\n\t\t/** Extra expand-button attributes per node, `(node, depth) => object`. */\n\t\ttoggleAttrs: { type: Function, default: null },\n\t\t/** Extra row attributes per node, `(node, depth) => object`. */\n\t\trowAttrs: { type: Function, default: null },\n\t\t/** Rows take focus and select on Enter or Space. */\n\t\tfocusableRows: { type: Boolean, default: false },\n\t},\n\n\temits: ['select', 'toggle'],\n\tcomputed: {\n\t\t/**\n\t\t * Whether this node has any children at all.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChildren() {\n\t\t\tconst c = this.node[this.childrenKey]\n\t\t\treturn Array.isArray(c) && c.length > 0\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is currently expanded.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisExpanded() {\n\t\t\treturn Boolean(this.expandedIds[this.node[this.idKey]])\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is the currently-selected one.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelected() {\n\t\t\treturn this.selectedId === this.node[this.idKey]\n\t\t},\n\n\t\t/**\n\t\t * The expand button's accessible name for this node.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\ttoggleLabel() {\n\t\t\tconst label = this.isExpanded ? this.collapseLabel : this.expandLabel\n\t\t\treturn typeof label === 'function' ? label(this.node) : label\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraRowAttrs() {\n\t\t\treturn this.rowAttrs ? this.rowAttrs(this.node, this.depth) : {}\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row's expand button.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraToggleAttrs() {\n\t\t\treturn this.toggleAttrs ? this.toggleAttrs(this.node, this.depth) : {}\n\t\t},\n\t},\n\n\tmethods: {\n\t\ttoggle() {\n\t\t\tthis.$emit('toggle', this.node[this.idKey])\n\t\t},\n\n\t\tonRowClick() {\n\t\t\tthis.$emit('select', this.node)\n\t\t},\n\n\t\t/**\n\t\t * Enter or Space on a focusable row selects its node. Keys pressed on\n\t\t * the expand button or an action inside the row are theirs.\n\t\t *\n\t\t * @param {KeyboardEvent} event The key event.\n\t\t */\n\t\tonRowKeydown(event) {\n\t\t\tif (!this.focusableRows || event.target !== event.currentTarget) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tthis.$emit('select', this.node)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-tree-node {\n\tlist-style: none;\n}\n\n.cn-tree-node__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 6px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-tree-node__row:hover {\n\tbackground: var(--color-background-hover);\n}\n\n/* A row made focusable by `focusableRows` shows where keyboard focus is (WCAG 2.4.7). */\n.cn-tree-node__row[tabindex]:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-tree-node--selected > .cn-tree-node__row {\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__toggle {\n\tbackground: none;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: 0;\n\twidth: 18px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.cn-tree-node__toggle--leaf {\n\tcursor: default;\n}\n\n.cn-tree-node__caret {\n\tdisplay: inline-block;\n\ttransition: transform 0.15s ease;\n\tfont-size: 0.9em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__caret--open {\n\ttransform: rotate(90deg);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__icon {\n\tfont-size: 0.9em;\n}\n\n.cn-tree-node__label {\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-tree-node__badge {\n\tfont-size: 0.8em;\n\tpadding: 1px 6px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__children {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n</style>\n"],"names":[],"mappings":"AAuEA;;;;AAIC;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,YAAY;AAClB,CAAA,KAAK,EAAE;AACN;AACA,EAAA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;EAEtC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA,EAAG;AACnC;AACA,EAAA,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI;;AAErC,EAAA,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;EAE7C,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM;;AAErD,EAAA,KAAK,EAAE,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nTreeView/CnTreeNode.vue"],"sourcesContent":["<template>\n\t<li class=\"cn-tree-node\"\n\t\t:class=\"{\n\t\t\t'cn-tree-node--selected': isSelected,\n\t\t\t'cn-tree-node--expanded': isExpanded,\n\t\t}\"\n\t\t:data-node-id=\"node[idKey]\"\n\t\trole=\"treeitem\"\n\t\t:aria-expanded=\"hasChildren ? isExpanded : undefined\"\n\t\t:aria-selected=\"isSelected\">\n\t\t<div class=\"cn-tree-node__row\"\n\t\t\tv-bind=\"extraRowAttrs\"\n\t\t\t:style=\"{ paddingLeft: (depth * indent) + 'px' }\"\n\t\t\t:tabindex=\"focusableRows ? 0 : undefined\"\n\t\t\t@click=\"onRowClick\"\n\t\t\t@keydown=\"onRowKeydown\">\n\t\t\t<span v-for=\"key in reorderSlots\"\n\t\t\t\t:key=\"key\"\n\t\t\t\tclass=\"cn-tree-node__handle\"\n\t\t\t\t:title=\"reorderLabels.drag\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\t@click.stop>\n\t\t\t\t<DragVertical :size=\"18\" />\n\t\t\t</span>\n\t\t\t<button v-if=\"hasChildren\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tv-bind=\"extraToggleAttrs\"\n\t\t\t\tclass=\"cn-tree-node__toggle\"\n\t\t\t\t:aria-label=\"toggleLabel\"\n\t\t\t\t@click.stop=\"toggle\">\n\t\t\t\t<span class=\"cn-tree-node__caret\" :class=\"{ 'cn-tree-node__caret--open': isExpanded }\">▸</span>\n\t\t\t</button>\n\t\t\t<span v-else class=\"cn-tree-node__toggle cn-tree-node__toggle--leaf\" />\n\n\t\t\t<span v-if=\"node.icon\" class=\"cn-tree-node__icon\">{{ node.icon }}</span>\n\t\t\t<span class=\"cn-tree-node__label\">\n\t\t\t\t<!-- @slot label The row's label. Scope: { node, depth, expanded }. Defaults to the node's label text. -->\n\t\t\t\t<slot name=\"label\"\n\t\t\t\t\t:node=\"node\"\n\t\t\t\t\t:depth=\"depth\"\n\t\t\t\t\t:expanded=\"isExpanded\">{{ node[labelKey] }}</slot>\n\t\t\t</span>\n\t\t\t<span v-if=\"node.badge !== undefined\" class=\"cn-tree-node__badge\">{{ node.badge }}</span>\n\n\t\t\t<span v-for=\"key in reorderSlots\"\n\t\t\t\t:key=\"key\"\n\t\t\t\tclass=\"cn-tree-node__move\"\n\t\t\t\t@click.stop>\n\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t:disabled=\"siblingIndex === 0\"\n\t\t\t\t\t:aria-label=\"moveName(reorderLabels.moveUp)\"\n\t\t\t\t\tdata-move=\"up\"\n\t\t\t\t\t@click=\"moveBy(-1)\">\n\t\t\t\t\t{{ reorderLabels.moveUp }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t:disabled=\"siblingIndex >= siblingCount - 1\"\n\t\t\t\t\t:aria-label=\"moveName(reorderLabels.moveDown)\"\n\t\t\t\t\tdata-move=\"down\"\n\t\t\t\t\t@click=\"moveBy(1)\">\n\t\t\t\t\t{{ reorderLabels.moveDown }}\n\t\t\t\t</NcButton>\n\t\t\t</span>\n\n\t\t\t<!-- @slot actions Inline per-row actions slot. Scope:\n\t\t\t { node, depth }. -->\n\t\t\t<slot name=\"actions\" :node=\"node\" :depth=\"depth\" />\n\t\t</div>\n\n\t\t<Draggable v-if=\"reorderable && hasChildren && isExpanded\"\n\t\t\t:modelValue=\"node[childrenKey]\"\n\t\t\t:itemKey=\"idKey\"\n\t\t\ttag=\"ul\"\n\t\t\tclass=\"cn-tree-node__children\"\n\t\t\trole=\"group\"\n\t\t\thandle=\".cn-tree-node__handle\"\n\t\t\t@change=\"onDragChange\">\n\t\t\t<template #item=\"{ element: child, index }\">\n\t\t\t\t<CnTreeNode :node=\"child\"\n\t\t\t\t\t:depth=\"depth + 1\"\n\t\t\t\t\t:indent=\"indent\"\n\t\t\t\t\t:expandedIds=\"expandedIds\"\n\t\t\t\t\t:selectedId=\"selectedId\"\n\t\t\t\t\t:idKey=\"idKey\"\n\t\t\t\t\t:labelKey=\"labelKey\"\n\t\t\t\t\t:childrenKey=\"childrenKey\"\n\t\t\t\t\t:expandLabel=\"expandLabel\"\n\t\t\t\t\t:collapseLabel=\"collapseLabel\"\n\t\t\t\t\t:toggleAttrs=\"toggleAttrs\"\n\t\t\t\t\t:rowAttrs=\"rowAttrs\"\n\t\t\t\t\t:focusableRows=\"focusableRows\"\n\t\t\t\t\treorderable\n\t\t\t\t\t:reorderLabels=\"reorderLabels\"\n\t\t\t\t\t:parentId=\"node[idKey]\"\n\t\t\t\t\t:siblingIndex=\"index\"\n\t\t\t\t\t:siblingCount=\"node[childrenKey].length\"\n\t\t\t\t\t@toggle=\"$emit('toggle', $event)\"\n\t\t\t\t\t@select=\"$emit('select', $event)\"\n\t\t\t\t\t@move=\"$emit('move', $event)\">\n\t\t\t\t\t<template #actions=\"scope\">\n\t\t\t\t\t\t<slot name=\"actions\" v-bind=\"scope\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-if=\"$slots.label\" #label=\"scope\">\n\t\t\t\t\t\t<slot name=\"label\" v-bind=\"scope\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnTreeNode>\n\t\t\t</template>\n\t\t</Draggable>\n\t\t<ul v-else-if=\"hasChildren && isExpanded\" class=\"cn-tree-node__children\" role=\"group\">\n\t\t\t<CnTreeNode v-for=\"child in node[childrenKey]\"\n\t\t\t\t:key=\"child[idKey]\"\n\t\t\t\t:node=\"child\"\n\t\t\t\t:depth=\"depth + 1\"\n\t\t\t\t:indent=\"indent\"\n\t\t\t\t:expandedIds=\"expandedIds\"\n\t\t\t\t:selectedId=\"selectedId\"\n\t\t\t\t:idKey=\"idKey\"\n\t\t\t\t:labelKey=\"labelKey\"\n\t\t\t\t:childrenKey=\"childrenKey\"\n\t\t\t\t:expandLabel=\"expandLabel\"\n\t\t\t\t:collapseLabel=\"collapseLabel\"\n\t\t\t\t:toggleAttrs=\"toggleAttrs\"\n\t\t\t\t:rowAttrs=\"rowAttrs\"\n\t\t\t\t:focusableRows=\"focusableRows\"\n\t\t\t\t@toggle=\"$emit('toggle', $event)\"\n\t\t\t\t@select=\"$emit('select', $event)\">\n\t\t\t\t<template #actions=\"scope\">\n\t\t\t\t\t<slot name=\"actions\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"$slots.label\" #label=\"scope\">\n\t\t\t\t\t<slot name=\"label\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t</CnTreeNode>\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { NcButton } from '@nextcloud/vue'\nimport Draggable from 'vuedraggable'\nimport DragVertical from 'vue-material-design-icons/DragVertical.vue'\n\n/**\n * CnTreeNode — Recursive tree row used inside CnTreeView. Renders\n * its own row + recurses for children when expanded. Not exported\n * as a separate barrel entry — consumers use CnTreeView and the\n * recursion is internal.\n */\nexport default {\n\tname: 'CnTreeNode',\n\tcomponents: { Draggable, DragVertical, NcButton },\n\tprops: {\n\t\t/** The node data. */\n\t\tnode: { type: Object, required: true },\n\t\t/** Depth (drives indent). */\n\t\tdepth: { type: Number, default: 0 },\n\t\t/** Pixels of padding per depth level. */\n\t\tindent: { type: Number, default: 18 },\n\t\t/** Set of expanded node ids. */\n\t\texpandedIds: { type: Object, required: true },\n\t\t/** Currently selected node id, read off `node[idKey]` (or null). */\n\t\tselectedId: { type: [String, Number], default: null },\n\t\t/** Node-field key for the id. */\n\t\tidKey: { type: String, default: 'id' },\n\t\t/** Node-field key for the display label. */\n\t\tlabelKey: { type: String, default: 'label' },\n\t\t/** Node-field key for the children array. */\n\t\tchildrenKey: { type: String, default: 'children' },\n\t\t/** A11y label for the expand button, or `(node) => string`. */\n\t\texpandLabel: { type: [String, Function], default: 'Expand' },\n\t\t/** A11y label for the collapse button, or `(node) => string`. */\n\t\tcollapseLabel: { type: [String, Function], default: 'Collapse' },\n\t\t/** Extra expand-button attributes per node, `(node, depth) => object`. */\n\t\ttoggleAttrs: { type: Function, default: null },\n\t\t/** Extra row attributes per node, `(node, depth) => object`. */\n\t\trowAttrs: { type: Function, default: null },\n\t\t/** Rows take focus and select on Enter or Space. */\n\t\tfocusableRows: { type: Boolean, default: false },\n\t\t/** Rows can be moved among their siblings. */\n\t\treorderable: { type: Boolean, default: false },\n\t\t/** The texts of the move controls, resolved by CnTreeView. */\n\t\treorderLabels: { type: Object, default: () => ({}) },\n\t\t/** The parent's id, or null at the root. */\n\t\tparentId: { type: [String, Number], default: null },\n\t\t/** This node's index among its siblings. */\n\t\tsiblingIndex: { type: Number, default: 0 },\n\t\t/** How many siblings there are, itself included. */\n\t\tsiblingCount: { type: Number, default: 1 },\n\t},\n\n\temits: ['select', 'toggle', 'move'],\n\tcomputed: {\n\t\t/**\n\t\t * One entry when the row draws its move controls. A `v-for` leaves no\n\t\t * placeholder in the markup when off, which `v-if` would.\n\t\t *\n\t\t * @return {string[]} The keys.\n\t\t */\n\t\treorderSlots() {\n\t\t\treturn this.reorderable ? ['reorder'] : []\n\t\t},\n\n\t\t/**\n\t\t * Whether this node has any children at all.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChildren() {\n\t\t\tconst c = this.node[this.childrenKey]\n\t\t\treturn Array.isArray(c) && c.length > 0\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is currently expanded.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisExpanded() {\n\t\t\treturn Boolean(this.expandedIds[this.node[this.idKey]])\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is the currently-selected one.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelected() {\n\t\t\treturn this.selectedId === this.node[this.idKey]\n\t\t},\n\n\t\t/**\n\t\t * The expand button's accessible name for this node.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\ttoggleLabel() {\n\t\t\tconst label = this.isExpanded ? this.collapseLabel : this.expandLabel\n\t\t\treturn typeof label === 'function' ? label(this.node) : label\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraRowAttrs() {\n\t\t\treturn this.rowAttrs ? this.rowAttrs(this.node, this.depth) : {}\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row's expand button.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraToggleAttrs() {\n\t\t\treturn this.toggleAttrs ? this.toggleAttrs(this.node, this.depth) : {}\n\t\t},\n\t},\n\n\tmethods: {\n\t\ttoggle() {\n\t\t\tthis.$emit('toggle', this.node[this.idKey])\n\t\t},\n\n\t\t/**\n\t\t * The accessible name of a move button: its visible label and the node's.\n\t\t *\n\t\t * @param {string} action The visible label.\n\t\t * @return {string} The name.\n\t\t */\n\t\tmoveName(action) {\n\t\t\treturn this.reorderLabels.controlName\n\t\t\t\t.replace('{action}', action)\n\t\t\t\t.replace('{label}', String(this.node[this.labelKey] ?? ''))\n\t\t},\n\n\t\t/**\n\t\t * Move this node one place among its siblings, with a button.\n\t\t *\n\t\t * @param {number} delta -1 up, 1 down.\n\t\t * @return {void}\n\t\t */\n\t\tmoveBy(delta) {\n\t\t\tthis.$emit('move', {\n\t\t\t\tnode: this.node,\n\t\t\t\tparentId: this.parentId,\n\t\t\t\tfrom: this.siblingIndex,\n\t\t\t\tto: this.siblingIndex + delta,\n\t\t\t\tbyButton: true,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * A child was dragged to another place.\n\t\t *\n\t\t * @param {{moved?: {element: object, oldIndex: number, newIndex: number}}} change What the drag changed.\n\t\t * @return {void}\n\t\t */\n\t\tonDragChange({ moved } = {}) {\n\t\t\tif (moved) {\n\t\t\t\tthis.$emit('move', { node: moved.element, parentId: this.node[this.idKey], from: moved.oldIndex, to: moved.newIndex })\n\t\t\t}\n\t\t},\n\n\t\tonRowClick() {\n\t\t\tthis.$emit('select', this.node)\n\t\t},\n\n\t\t/**\n\t\t * Enter or Space on a focusable row selects its node. Keys pressed on\n\t\t * the expand button or an action inside the row are theirs.\n\t\t *\n\t\t * @param {KeyboardEvent} event The key event.\n\t\t */\n\t\tonRowKeydown(event) {\n\t\t\tif (!this.focusableRows || event.target !== event.currentTarget) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tthis.$emit('select', this.node)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-tree-node {\n\tlist-style: none;\n}\n\n.cn-tree-node__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 6px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-tree-node__row:hover {\n\tbackground: var(--color-background-hover);\n}\n\n/* A row made focusable by `focusableRows` shows where keyboard focus is (WCAG 2.4.7). */\n.cn-tree-node__row[tabindex]:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-tree-node--selected > .cn-tree-node__row {\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__toggle {\n\tbackground: none;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: 0;\n\twidth: 18px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.cn-tree-node__toggle--leaf {\n\tcursor: default;\n}\n\n.cn-tree-node__caret {\n\tdisplay: inline-block;\n\ttransition: transform 0.15s ease;\n\tfont-size: 0.9em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__caret--open {\n\ttransform: rotate(90deg);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__icon {\n\tfont-size: 0.9em;\n}\n\n.cn-tree-node__label {\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-tree-node__handle {\n\tcolor: var(--color-text-maxcontrast);\n\tcursor: grab;\n\tdisplay: inline-flex;\n}\n\n.cn-tree-node__move {\n\tdisplay: inline-flex;\n\tgap: 4px;\n}\n\n.cn-tree-node__badge {\n\tfont-size: 0.8em;\n\tpadding: 1px 6px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__children {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n</style>\n"],"names":[],"mappings":";;;;AA8IA;;;;AAIC;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,YAAY;AAClB,CAAA,UAAU,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU;AACjD,CAAA,KAAK,EAAE;AACN;AACA,EAAA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;EAEtC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA,EAAG;AACnC;AACA,EAAA,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI;;AAErC,EAAA,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;EAE7C,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,MAAM;;AAErD,EAAA,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;AACtC;AACA,EAAA,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;AAC5C;AACA,EAAA,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY;;EAElD,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,QAAO,EAAG;;EAE5D,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAS,EAAG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B,IAAA,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;IACvB,IAAI,EAAE,IAAI,CAAC,YAAY;IACvB,EAAE,EAAE,IAAI,CAAC,YAAW,GAAI,KAAK;IAC7B,QAAQ,EAAE,IAAI;IACd,EAAA;GACD;;AAED;AACC;AACA;AACA;;;EAGD,YAAY,CAAC,EAAE,OAAQ,GAAE,EAAE,EAAE;AAC5B,GAAA,IAAI,KAAK,EAAE;IACV,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,CAAC,QAAO,EAAG,EAAA;AACtH,IAAA;GACA;;EAED,UAAU,GAAG;GACZ,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAA;GAC9B;;AAED;;;AAGC;AACA;;AAED,EAAA,YAAY,CAAC,KAAK,EAAE;GACnB,IAAI,CAAC,IAAI,CAAC,aAAc,IAAG,KAAK,CAAC,MAAK,KAAM,KAAK,CAAC,aAAa,EAAE;IAChE,MAAK;AACN,IAAA;AACA,GAAA,IAAI,KAAK,CAAC,QAAQ,WAAW,KAAK,CAAC,GAAI,KAAI,GAAG,EAAE;AAC/C,IAAA,KAAK,CAAC,cAAc,GAAC;IACrB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAA;AAC/B,IAAA;GACA;EACD;AACF;;;;"}
@@ -1,29 +1,33 @@
1
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, mergeProps, withModifiers, toDisplayString, createCommentVNode, renderSlot, createTextVNode, Fragment, renderList, createBlock, createSlots, withCtx } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, mergeProps, Fragment, renderList, withModifiers, createVNode, toDisplayString, createCommentVNode, renderSlot, createTextVNode, withCtx, createBlock, createSlots, normalizeProps, guardReactiveProps } from 'vue';
2
2
 
3
3
  const _hoisted_1 = ["data-node-id", "aria-expanded", "aria-selected"];
4
4
  const _hoisted_2 = ["tabindex"];
5
- const _hoisted_3 = ["aria-label"];
6
- const _hoisted_4 = {
5
+ const _hoisted_3 = ["title"];
6
+ const _hoisted_4 = ["aria-label"];
7
+ const _hoisted_5 = {
7
8
  key: 1,
8
9
  class: "cn-tree-node__toggle cn-tree-node__toggle--leaf"
9
10
  };
10
- const _hoisted_5 = {
11
+ const _hoisted_6 = {
11
12
  key: 2,
12
13
  class: "cn-tree-node__icon"
13
14
  };
14
- const _hoisted_6 = { class: "cn-tree-node__label" };
15
- const _hoisted_7 = {
15
+ const _hoisted_7 = { class: "cn-tree-node__label" };
16
+ const _hoisted_8 = {
16
17
  key: 3,
17
18
  class: "cn-tree-node__badge"
18
19
  };
19
- const _hoisted_8 = {
20
- key: 0,
20
+ const _hoisted_9 = {
21
+ key: 1,
21
22
  class: "cn-tree-node__children",
22
23
  role: "group"
23
24
  };
24
25
 
25
26
  function render(_ctx, _cache, $props, $setup, $data, $options) {
27
+ const _component_DragVertical = resolveComponent("DragVertical");
28
+ const _component_NcButton = resolveComponent("NcButton");
26
29
  const _component_CnTreeNode = resolveComponent("CnTreeNode", true);
30
+ const _component_Draggable = resolveComponent("Draggable");
27
31
 
28
32
  return (openBlock(), createElementBlock("li", {
29
33
  class: normalizeClass(["cn-tree-node", {
@@ -38,9 +42,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
38
42
  createElementVNode("div", mergeProps({ class: "cn-tree-node__row" }, $options.extraRowAttrs, {
39
43
  style: { paddingLeft: ($props.depth * $props.indent) + 'px' },
40
44
  tabindex: $props.focusableRows ? 0 : undefined,
41
- onClick: _cache[1] || (_cache[1] = (...args) => ($options.onRowClick && $options.onRowClick(...args))),
42
- onKeydown: _cache[2] || (_cache[2] = (...args) => ($options.onRowKeydown && $options.onRowKeydown(...args)))
45
+ onClick: _cache[5] || (_cache[5] = (...args) => ($options.onRowClick && $options.onRowClick(...args))),
46
+ onKeydown: _cache[6] || (_cache[6] = (...args) => ($options.onRowKeydown && $options.onRowKeydown(...args)))
43
47
  }), [
48
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.reorderSlots, (key) => {
49
+ return (openBlock(), createElementBlock("span", {
50
+ key: key,
51
+ class: "cn-tree-node__handle",
52
+ title: $props.reorderLabels.drag,
53
+ "aria-hidden": "true",
54
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"]))
55
+ }, [
56
+ createVNode(_component_DragVertical, { size: 18 })
57
+ ], 8 /* PROPS */, _hoisted_3))
58
+ }), 128 /* KEYED_FRAGMENT */)),
44
59
  ($options.hasChildren)
45
60
  ? (openBlock(), createElementBlock("button", mergeProps({
46
61
  key: 0,
@@ -48,17 +63,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
48
63
  }, $options.extraToggleAttrs, {
49
64
  class: "cn-tree-node__toggle",
50
65
  "aria-label": $options.toggleLabel,
51
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => ($options.toggle && $options.toggle(...args)), ["stop"]))
66
+ onClick: _cache[1] || (_cache[1] = withModifiers((...args) => ($options.toggle && $options.toggle(...args)), ["stop"]))
52
67
  }), [
53
68
  createElementVNode("span", {
54
69
  class: normalizeClass(["cn-tree-node__caret", { 'cn-tree-node__caret--open': $options.isExpanded }])
55
70
  }, "▸", 2 /* CLASS */)
56
- ], 16 /* FULL_PROPS */, _hoisted_3))
57
- : (openBlock(), createElementBlock("span", _hoisted_4)),
71
+ ], 16 /* FULL_PROPS */, _hoisted_4))
72
+ : (openBlock(), createElementBlock("span", _hoisted_5)),
58
73
  ($props.node.icon)
59
- ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString($props.node.icon), 1 /* TEXT */))
74
+ ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString($props.node.icon), 1 /* TEXT */))
60
75
  : createCommentVNode("v-if", true),
61
- createElementVNode("span", _hoisted_6, [
76
+ createElementVNode("span", _hoisted_7, [
62
77
  renderSlot(_ctx.$slots, "label", {
63
78
  node: $props.node,
64
79
  depth: $props.depth,
@@ -68,18 +83,58 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
68
83
  ])
69
84
  ]),
70
85
  ($props.node.badge !== undefined)
71
- ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString($props.node.badge), 1 /* TEXT */))
86
+ ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString($props.node.badge), 1 /* TEXT */))
72
87
  : createCommentVNode("v-if", true),
88
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.reorderSlots, (key) => {
89
+ return (openBlock(), createElementBlock("span", {
90
+ key: key,
91
+ class: "cn-tree-node__move",
92
+ onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"]))
93
+ }, [
94
+ createVNode(_component_NcButton, {
95
+ variant: "tertiary",
96
+ disabled: $props.siblingIndex === 0,
97
+ "aria-label": $options.moveName($props.reorderLabels.moveUp),
98
+ "data-move": "up",
99
+ onClick: _cache[2] || (_cache[2] = $event => ($options.moveBy(-1)))
100
+ }, {
101
+ default: withCtx(() => [
102
+ createTextVNode(toDisplayString($props.reorderLabels.moveUp), 1 /* TEXT */)
103
+ ]),
104
+ _: 1 /* STABLE */
105
+ }, 8 /* PROPS */, ["disabled", "aria-label"]),
106
+ createVNode(_component_NcButton, {
107
+ variant: "tertiary",
108
+ disabled: $props.siblingIndex >= $props.siblingCount - 1,
109
+ "aria-label": $options.moveName($props.reorderLabels.moveDown),
110
+ "data-move": "down",
111
+ onClick: _cache[3] || (_cache[3] = $event => ($options.moveBy(1)))
112
+ }, {
113
+ default: withCtx(() => [
114
+ createTextVNode(toDisplayString($props.reorderLabels.moveDown), 1 /* TEXT */)
115
+ ]),
116
+ _: 1 /* STABLE */
117
+ }, 8 /* PROPS */, ["disabled", "aria-label"])
118
+ ]))
119
+ }), 128 /* KEYED_FRAGMENT */)),
73
120
  renderSlot(_ctx.$slots, "actions", {
74
121
  node: $props.node,
75
122
  depth: $props.depth
76
123
  })
77
124
  ], 16 /* FULL_PROPS */, _hoisted_2),
78
- ($options.hasChildren && $options.isExpanded)
79
- ? (openBlock(), createElementBlock("ul", _hoisted_8, [
80
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.node[$props.childrenKey], (child) => {
81
- return (openBlock(), createBlock(_component_CnTreeNode, {
82
- key: child[$props.idKey],
125
+ ($props.reorderable && $options.hasChildren && $options.isExpanded)
126
+ ? (openBlock(), createBlock(_component_Draggable, {
127
+ key: 0,
128
+ modelValue: $props.node[$props.childrenKey],
129
+ itemKey: $props.idKey,
130
+ tag: "ul",
131
+ class: "cn-tree-node__children",
132
+ role: "group",
133
+ handle: ".cn-tree-node__handle",
134
+ onChange: $options.onDragChange
135
+ }, {
136
+ item: withCtx(({ element: child, index }) => [
137
+ createVNode(_component_CnTreeNode, {
83
138
  node: child,
84
139
  depth: $props.depth + 1,
85
140
  indent: $props.indent,
@@ -93,11 +148,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
93
148
  toggleAttrs: $props.toggleAttrs,
94
149
  rowAttrs: $props.rowAttrs,
95
150
  focusableRows: $props.focusableRows,
96
- onToggle: _cache[3] || (_cache[3] = $event => (_ctx.$emit('toggle', $event))),
97
- onSelect: _cache[4] || (_cache[4] = $event => (_ctx.$emit('select', $event)))
151
+ reorderable: "",
152
+ reorderLabels: $props.reorderLabels,
153
+ parentId: $props.node[$props.idKey],
154
+ siblingIndex: index,
155
+ siblingCount: $props.node[$props.childrenKey].length,
156
+ onToggle: _cache[7] || (_cache[7] = $event => (_ctx.$emit('toggle', $event))),
157
+ onSelect: _cache[8] || (_cache[8] = $event => (_ctx.$emit('select', $event))),
158
+ onMove: _cache[9] || (_cache[9] = $event => (_ctx.$emit('move', $event)))
98
159
  }, createSlots({
99
160
  actions: withCtx((scope) => [
100
- renderSlot(_ctx.$slots, "actions", mergeProps({ ref_for: true }, scope))
161
+ renderSlot(_ctx.$slots, "actions", normalizeProps(guardReactiveProps(scope)))
101
162
  ]),
102
163
  _: 2 /* DYNAMIC */
103
164
  }, [
@@ -105,15 +166,54 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
105
166
  ? {
106
167
  name: "label",
107
168
  fn: withCtx((scope) => [
108
- renderSlot(_ctx.$slots, "label", mergeProps({ ref_for: true }, scope))
169
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(scope)))
109
170
  ]),
110
171
  key: "0"
111
172
  }
112
173
  : undefined
113
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["node", "depth", "indent", "expandedIds", "selectedId", "idKey", "labelKey", "childrenKey", "expandLabel", "collapseLabel", "toggleAttrs", "rowAttrs", "focusableRows"]))
114
- }), 128 /* KEYED_FRAGMENT */))
115
- ]))
116
- : createCommentVNode("v-if", true)
174
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["node", "depth", "indent", "expandedIds", "selectedId", "idKey", "labelKey", "childrenKey", "expandLabel", "collapseLabel", "toggleAttrs", "rowAttrs", "focusableRows", "reorderLabels", "parentId", "siblingIndex", "siblingCount"])
175
+ ]),
176
+ _: 3 /* FORWARDED */
177
+ }, 8 /* PROPS */, ["modelValue", "itemKey", "onChange"]))
178
+ : ($options.hasChildren && $options.isExpanded)
179
+ ? (openBlock(), createElementBlock("ul", _hoisted_9, [
180
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.node[$props.childrenKey], (child) => {
181
+ return (openBlock(), createBlock(_component_CnTreeNode, {
182
+ key: child[$props.idKey],
183
+ node: child,
184
+ depth: $props.depth + 1,
185
+ indent: $props.indent,
186
+ expandedIds: $props.expandedIds,
187
+ selectedId: $props.selectedId,
188
+ idKey: $props.idKey,
189
+ labelKey: $props.labelKey,
190
+ childrenKey: $props.childrenKey,
191
+ expandLabel: $props.expandLabel,
192
+ collapseLabel: $props.collapseLabel,
193
+ toggleAttrs: $props.toggleAttrs,
194
+ rowAttrs: $props.rowAttrs,
195
+ focusableRows: $props.focusableRows,
196
+ onToggle: _cache[10] || (_cache[10] = $event => (_ctx.$emit('toggle', $event))),
197
+ onSelect: _cache[11] || (_cache[11] = $event => (_ctx.$emit('select', $event)))
198
+ }, createSlots({
199
+ actions: withCtx((scope) => [
200
+ renderSlot(_ctx.$slots, "actions", mergeProps({ ref_for: true }, scope))
201
+ ]),
202
+ _: 2 /* DYNAMIC */
203
+ }, [
204
+ (_ctx.$slots.label)
205
+ ? {
206
+ name: "label",
207
+ fn: withCtx((scope) => [
208
+ renderSlot(_ctx.$slots, "label", mergeProps({ ref_for: true }, scope))
209
+ ]),
210
+ key: "0"
211
+ }
212
+ : undefined
213
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["node", "depth", "indent", "expandedIds", "selectedId", "idKey", "labelKey", "childrenKey", "expandLabel", "collapseLabel", "toggleAttrs", "rowAttrs", "focusableRows"]))
214
+ }), 128 /* KEYED_FRAGMENT */))
215
+ ]))
216
+ : createCommentVNode("v-if", true)
117
217
  ], 10 /* CLASS, PROPS */, _hoisted_1))
118
218
  }
119
219
 
@@ -1 +1 @@
1
- {"version":3,"file":"CnTreeNode.vue3.js","sources":["../../../../src/components/CnTreeView/CnTreeNode.vue?vue&type=template&id=aba6ea88&lang.js"],"sourcesContent":["<template>\n\t<li class=\"cn-tree-node\"\n\t\t:class=\"{\n\t\t\t'cn-tree-node--selected': isSelected,\n\t\t\t'cn-tree-node--expanded': isExpanded,\n\t\t}\"\n\t\t:data-node-id=\"node[idKey]\"\n\t\trole=\"treeitem\"\n\t\t:aria-expanded=\"hasChildren ? isExpanded : undefined\"\n\t\t:aria-selected=\"isSelected\">\n\t\t<div class=\"cn-tree-node__row\"\n\t\t\tv-bind=\"extraRowAttrs\"\n\t\t\t:style=\"{ paddingLeft: (depth * indent) + 'px' }\"\n\t\t\t:tabindex=\"focusableRows ? 0 : undefined\"\n\t\t\t@click=\"onRowClick\"\n\t\t\t@keydown=\"onRowKeydown\">\n\t\t\t<button v-if=\"hasChildren\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tv-bind=\"extraToggleAttrs\"\n\t\t\t\tclass=\"cn-tree-node__toggle\"\n\t\t\t\t:aria-label=\"toggleLabel\"\n\t\t\t\t@click.stop=\"toggle\">\n\t\t\t\t<span class=\"cn-tree-node__caret\" :class=\"{ 'cn-tree-node__caret--open': isExpanded }\">▸</span>\n\t\t\t</button>\n\t\t\t<span v-else class=\"cn-tree-node__toggle cn-tree-node__toggle--leaf\" />\n\n\t\t\t<span v-if=\"node.icon\" class=\"cn-tree-node__icon\">{{ node.icon }}</span>\n\t\t\t<span class=\"cn-tree-node__label\">\n\t\t\t\t<!-- @slot label The row's label. Scope: { node, depth, expanded }. Defaults to the node's label text. -->\n\t\t\t\t<slot name=\"label\"\n\t\t\t\t\t:node=\"node\"\n\t\t\t\t\t:depth=\"depth\"\n\t\t\t\t\t:expanded=\"isExpanded\">{{ node[labelKey] }}</slot>\n\t\t\t</span>\n\t\t\t<span v-if=\"node.badge !== undefined\" class=\"cn-tree-node__badge\">{{ node.badge }}</span>\n\n\t\t\t<!-- @slot actions Inline per-row actions slot. Scope:\n\t\t\t { node, depth }. -->\n\t\t\t<slot name=\"actions\" :node=\"node\" :depth=\"depth\" />\n\t\t</div>\n\n\t\t<ul v-if=\"hasChildren && isExpanded\" class=\"cn-tree-node__children\" role=\"group\">\n\t\t\t<CnTreeNode v-for=\"child in node[childrenKey]\"\n\t\t\t\t:key=\"child[idKey]\"\n\t\t\t\t:node=\"child\"\n\t\t\t\t:depth=\"depth + 1\"\n\t\t\t\t:indent=\"indent\"\n\t\t\t\t:expandedIds=\"expandedIds\"\n\t\t\t\t:selectedId=\"selectedId\"\n\t\t\t\t:idKey=\"idKey\"\n\t\t\t\t:labelKey=\"labelKey\"\n\t\t\t\t:childrenKey=\"childrenKey\"\n\t\t\t\t:expandLabel=\"expandLabel\"\n\t\t\t\t:collapseLabel=\"collapseLabel\"\n\t\t\t\t:toggleAttrs=\"toggleAttrs\"\n\t\t\t\t:rowAttrs=\"rowAttrs\"\n\t\t\t\t:focusableRows=\"focusableRows\"\n\t\t\t\t@toggle=\"$emit('toggle', $event)\"\n\t\t\t\t@select=\"$emit('select', $event)\">\n\t\t\t\t<template #actions=\"scope\">\n\t\t\t\t\t<slot name=\"actions\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"$slots.label\" #label=\"scope\">\n\t\t\t\t\t<slot name=\"label\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t</CnTreeNode>\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\n/**\n * CnTreeNode — Recursive tree row used inside CnTreeView. Renders\n * its own row + recurses for children when expanded. Not exported\n * as a separate barrel entry — consumers use CnTreeView and the\n * recursion is internal.\n */\nexport default {\n\tname: 'CnTreeNode',\n\tprops: {\n\t\t/** The node data. */\n\t\tnode: { type: Object, required: true },\n\t\t/** Depth (drives indent). */\n\t\tdepth: { type: Number, default: 0 },\n\t\t/** Pixels of padding per depth level. */\n\t\tindent: { type: Number, default: 18 },\n\t\t/** Set of expanded node ids. */\n\t\texpandedIds: { type: Object, required: true },\n\t\t/** Currently selected node id, read off `node[idKey]` (or null). */\n\t\tselectedId: { type: [String, Number], default: null },\n\t\t/** Node-field key for the id. */\n\t\tidKey: { type: String, default: 'id' },\n\t\t/** Node-field key for the display label. */\n\t\tlabelKey: { type: String, default: 'label' },\n\t\t/** Node-field key for the children array. */\n\t\tchildrenKey: { type: String, default: 'children' },\n\t\t/** A11y label for the expand button, or `(node) => string`. */\n\t\texpandLabel: { type: [String, Function], default: 'Expand' },\n\t\t/** A11y label for the collapse button, or `(node) => string`. */\n\t\tcollapseLabel: { type: [String, Function], default: 'Collapse' },\n\t\t/** Extra expand-button attributes per node, `(node, depth) => object`. */\n\t\ttoggleAttrs: { type: Function, default: null },\n\t\t/** Extra row attributes per node, `(node, depth) => object`. */\n\t\trowAttrs: { type: Function, default: null },\n\t\t/** Rows take focus and select on Enter or Space. */\n\t\tfocusableRows: { type: Boolean, default: false },\n\t},\n\n\temits: ['select', 'toggle'],\n\tcomputed: {\n\t\t/**\n\t\t * Whether this node has any children at all.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChildren() {\n\t\t\tconst c = this.node[this.childrenKey]\n\t\t\treturn Array.isArray(c) && c.length > 0\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is currently expanded.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisExpanded() {\n\t\t\treturn Boolean(this.expandedIds[this.node[this.idKey]])\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is the currently-selected one.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelected() {\n\t\t\treturn this.selectedId === this.node[this.idKey]\n\t\t},\n\n\t\t/**\n\t\t * The expand button's accessible name for this node.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\ttoggleLabel() {\n\t\t\tconst label = this.isExpanded ? this.collapseLabel : this.expandLabel\n\t\t\treturn typeof label === 'function' ? label(this.node) : label\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraRowAttrs() {\n\t\t\treturn this.rowAttrs ? this.rowAttrs(this.node, this.depth) : {}\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row's expand button.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraToggleAttrs() {\n\t\t\treturn this.toggleAttrs ? this.toggleAttrs(this.node, this.depth) : {}\n\t\t},\n\t},\n\n\tmethods: {\n\t\ttoggle() {\n\t\t\tthis.$emit('toggle', this.node[this.idKey])\n\t\t},\n\n\t\tonRowClick() {\n\t\t\tthis.$emit('select', this.node)\n\t\t},\n\n\t\t/**\n\t\t * Enter or Space on a focusable row selects its node. Keys pressed on\n\t\t * the expand button or an action inside the row are theirs.\n\t\t *\n\t\t * @param {KeyboardEvent} event The key event.\n\t\t */\n\t\tonRowKeydown(event) {\n\t\t\tif (!this.focusableRows || event.target !== event.currentTarget) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tthis.$emit('select', this.node)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-tree-node {\n\tlist-style: none;\n}\n\n.cn-tree-node__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 6px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-tree-node__row:hover {\n\tbackground: var(--color-background-hover);\n}\n\n/* A row made focusable by `focusableRows` shows where keyboard focus is (WCAG 2.4.7). */\n.cn-tree-node__row[tabindex]:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-tree-node--selected > .cn-tree-node__row {\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__toggle {\n\tbackground: none;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: 0;\n\twidth: 18px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.cn-tree-node__toggle--leaf {\n\tcursor: default;\n}\n\n.cn-tree-node__caret {\n\tdisplay: inline-block;\n\ttransition: transform 0.15s ease;\n\tfont-size: 0.9em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__caret--open {\n\ttransform: rotate(90deg);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__icon {\n\tfont-size: 0.9em;\n}\n\n.cn-tree-node__label {\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-tree-node__badge {\n\tfont-size: 0.8em;\n\tpadding: 1px 6px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__children {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n</style>\n"],"names":["_createElementBlock","_createElementVNode","_mergeProps","_openBlock","_normalizeClass","_toDisplayString","_renderSlot","_createTextVNode","_Fragment","_renderList","_createBlock","_withCtx"],"mappings":";;;;;;;AAwBgB,EAAA,KAAK,EAAC;;;;AAEI,EAAA,KAAK,EAAC,oBAAoB;;AAC3C,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,qBAAqB,GAAA;;;AAOK,EAAA,KAAK,EAAC,qBAAqB;;;;AAO7B,EAAA,KAAK,EAAC,wBAAuB;AAAE,EAAA,IAAI,EAAC,OAAO;;;;;;uBAxCjFA,kBAkEI,CAAA,IAAA,EAAA;AAlEA,IAAA,KAAK,kBAAC,cAAa,EAAA;6BACd,QAAA,CAAA,UAAA;6BAAA,QAAA,CAAA,UAAA;;IAIP,cAAY,EAAE,MAAI,CAAA,IAAA,CAAC,MAAK,CAAA,KAAA,CAAA;AACzB,IAAA,IAAI,EAAC,UAAS;AACb,IAAA,eAAa,EAAE,QAAA,CAAA,WAAU,GAAI,QAAA,CAAA,UAAW,GAAE,SAAS;AACnD,IAAA,eAAa,EAAE,QAAU,CAAA,UAAA;;AAC1B,IAAAC,kBAAA,CA6BK,OA7BLC,UA6BK,CAAA,EA7BA,KAAK,EAAC,mBAAkB,IACpB,QAAa,CAAA,aAAA,EAAA;MACpB,KAAK,EAAA,EAAA,WAAA,EAAA,CAAkB,MAAM,CAAA,KAAA,GAAE,MAAM,CAAA,MAAA,IAAA,IAAA,EAAA;MACrC,QAAQ,EAAE,MAAY,CAAA,aAAA,GAAA,CAAA,GAAQ,SAAS;AACvC,MAAA,OAAK,0CAAE,QAAU,CAAA,UAAA,IAAA,QAAA,CAAA,UAAA,CAAA,GAAA,IAAA,CAAA,CAAA,CAAA;AACjB,MAAA,SAAO,0CAAE,QAAY,CAAA,YAA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AA;cAC5B,QAAM,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,IAAK,CAAA,KAAA,CAAA,QAAA,EAAW,MAAM,CAAA,CAAA,CAAA;cAC9B,QAAM,EAAA,MAAA,CAAA,CAAA,CAAA,KAAA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,KAAE,IAAK,CAAA,KAAA,CAAA,QAAA,EAAW,MAAM,CAAA,CAAA,CAAA;;cACpB,OAAO,EAAAC,OAAA,CACjB,CAAqC,KADb,KAAA;gBACxBL,UAAqC,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAArCJ,UAAqC,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAR,KAAK,CAAA,CAAA;;;;AAEnB,cAAA,CAAA,IAAA,CAAA,MAAM,CAAC,KAAK;;0BAAG,OAAK;AACnC,oBAAA,EAAA,EAAAS,OAAA,CAAA,CADqC,KAAK,KAAA;sBAC1CL,UAAmC,CAAA,IAAA,CAAA,MAAA,EAAA,OAAA,EAAnCJ,UAAmC,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAR,KAAK,CAAA,CAAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnTreeNode.vue3.js","sources":["../../../../src/components/CnTreeView/CnTreeNode.vue?vue&type=template&id=367653e6&lang.js"],"sourcesContent":["<template>\n\t<li class=\"cn-tree-node\"\n\t\t:class=\"{\n\t\t\t'cn-tree-node--selected': isSelected,\n\t\t\t'cn-tree-node--expanded': isExpanded,\n\t\t}\"\n\t\t:data-node-id=\"node[idKey]\"\n\t\trole=\"treeitem\"\n\t\t:aria-expanded=\"hasChildren ? isExpanded : undefined\"\n\t\t:aria-selected=\"isSelected\">\n\t\t<div class=\"cn-tree-node__row\"\n\t\t\tv-bind=\"extraRowAttrs\"\n\t\t\t:style=\"{ paddingLeft: (depth * indent) + 'px' }\"\n\t\t\t:tabindex=\"focusableRows ? 0 : undefined\"\n\t\t\t@click=\"onRowClick\"\n\t\t\t@keydown=\"onRowKeydown\">\n\t\t\t<span v-for=\"key in reorderSlots\"\n\t\t\t\t:key=\"key\"\n\t\t\t\tclass=\"cn-tree-node__handle\"\n\t\t\t\t:title=\"reorderLabels.drag\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\t@click.stop>\n\t\t\t\t<DragVertical :size=\"18\" />\n\t\t\t</span>\n\t\t\t<button v-if=\"hasChildren\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tv-bind=\"extraToggleAttrs\"\n\t\t\t\tclass=\"cn-tree-node__toggle\"\n\t\t\t\t:aria-label=\"toggleLabel\"\n\t\t\t\t@click.stop=\"toggle\">\n\t\t\t\t<span class=\"cn-tree-node__caret\" :class=\"{ 'cn-tree-node__caret--open': isExpanded }\">▸</span>\n\t\t\t</button>\n\t\t\t<span v-else class=\"cn-tree-node__toggle cn-tree-node__toggle--leaf\" />\n\n\t\t\t<span v-if=\"node.icon\" class=\"cn-tree-node__icon\">{{ node.icon }}</span>\n\t\t\t<span class=\"cn-tree-node__label\">\n\t\t\t\t<!-- @slot label The row's label. Scope: { node, depth, expanded }. Defaults to the node's label text. -->\n\t\t\t\t<slot name=\"label\"\n\t\t\t\t\t:node=\"node\"\n\t\t\t\t\t:depth=\"depth\"\n\t\t\t\t\t:expanded=\"isExpanded\">{{ node[labelKey] }}</slot>\n\t\t\t</span>\n\t\t\t<span v-if=\"node.badge !== undefined\" class=\"cn-tree-node__badge\">{{ node.badge }}</span>\n\n\t\t\t<span v-for=\"key in reorderSlots\"\n\t\t\t\t:key=\"key\"\n\t\t\t\tclass=\"cn-tree-node__move\"\n\t\t\t\t@click.stop>\n\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t:disabled=\"siblingIndex === 0\"\n\t\t\t\t\t:aria-label=\"moveName(reorderLabels.moveUp)\"\n\t\t\t\t\tdata-move=\"up\"\n\t\t\t\t\t@click=\"moveBy(-1)\">\n\t\t\t\t\t{{ reorderLabels.moveUp }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t:disabled=\"siblingIndex >= siblingCount - 1\"\n\t\t\t\t\t:aria-label=\"moveName(reorderLabels.moveDown)\"\n\t\t\t\t\tdata-move=\"down\"\n\t\t\t\t\t@click=\"moveBy(1)\">\n\t\t\t\t\t{{ reorderLabels.moveDown }}\n\t\t\t\t</NcButton>\n\t\t\t</span>\n\n\t\t\t<!-- @slot actions Inline per-row actions slot. Scope:\n\t\t\t { node, depth }. -->\n\t\t\t<slot name=\"actions\" :node=\"node\" :depth=\"depth\" />\n\t\t</div>\n\n\t\t<Draggable v-if=\"reorderable && hasChildren && isExpanded\"\n\t\t\t:modelValue=\"node[childrenKey]\"\n\t\t\t:itemKey=\"idKey\"\n\t\t\ttag=\"ul\"\n\t\t\tclass=\"cn-tree-node__children\"\n\t\t\trole=\"group\"\n\t\t\thandle=\".cn-tree-node__handle\"\n\t\t\t@change=\"onDragChange\">\n\t\t\t<template #item=\"{ element: child, index }\">\n\t\t\t\t<CnTreeNode :node=\"child\"\n\t\t\t\t\t:depth=\"depth + 1\"\n\t\t\t\t\t:indent=\"indent\"\n\t\t\t\t\t:expandedIds=\"expandedIds\"\n\t\t\t\t\t:selectedId=\"selectedId\"\n\t\t\t\t\t:idKey=\"idKey\"\n\t\t\t\t\t:labelKey=\"labelKey\"\n\t\t\t\t\t:childrenKey=\"childrenKey\"\n\t\t\t\t\t:expandLabel=\"expandLabel\"\n\t\t\t\t\t:collapseLabel=\"collapseLabel\"\n\t\t\t\t\t:toggleAttrs=\"toggleAttrs\"\n\t\t\t\t\t:rowAttrs=\"rowAttrs\"\n\t\t\t\t\t:focusableRows=\"focusableRows\"\n\t\t\t\t\treorderable\n\t\t\t\t\t:reorderLabels=\"reorderLabels\"\n\t\t\t\t\t:parentId=\"node[idKey]\"\n\t\t\t\t\t:siblingIndex=\"index\"\n\t\t\t\t\t:siblingCount=\"node[childrenKey].length\"\n\t\t\t\t\t@toggle=\"$emit('toggle', $event)\"\n\t\t\t\t\t@select=\"$emit('select', $event)\"\n\t\t\t\t\t@move=\"$emit('move', $event)\">\n\t\t\t\t\t<template #actions=\"scope\">\n\t\t\t\t\t\t<slot name=\"actions\" v-bind=\"scope\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-if=\"$slots.label\" #label=\"scope\">\n\t\t\t\t\t\t<slot name=\"label\" v-bind=\"scope\" />\n\t\t\t\t\t</template>\n\t\t\t\t</CnTreeNode>\n\t\t\t</template>\n\t\t</Draggable>\n\t\t<ul v-else-if=\"hasChildren && isExpanded\" class=\"cn-tree-node__children\" role=\"group\">\n\t\t\t<CnTreeNode v-for=\"child in node[childrenKey]\"\n\t\t\t\t:key=\"child[idKey]\"\n\t\t\t\t:node=\"child\"\n\t\t\t\t:depth=\"depth + 1\"\n\t\t\t\t:indent=\"indent\"\n\t\t\t\t:expandedIds=\"expandedIds\"\n\t\t\t\t:selectedId=\"selectedId\"\n\t\t\t\t:idKey=\"idKey\"\n\t\t\t\t:labelKey=\"labelKey\"\n\t\t\t\t:childrenKey=\"childrenKey\"\n\t\t\t\t:expandLabel=\"expandLabel\"\n\t\t\t\t:collapseLabel=\"collapseLabel\"\n\t\t\t\t:toggleAttrs=\"toggleAttrs\"\n\t\t\t\t:rowAttrs=\"rowAttrs\"\n\t\t\t\t:focusableRows=\"focusableRows\"\n\t\t\t\t@toggle=\"$emit('toggle', $event)\"\n\t\t\t\t@select=\"$emit('select', $event)\">\n\t\t\t\t<template #actions=\"scope\">\n\t\t\t\t\t<slot name=\"actions\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t\t<template v-if=\"$slots.label\" #label=\"scope\">\n\t\t\t\t\t<slot name=\"label\" v-bind=\"scope\" />\n\t\t\t\t</template>\n\t\t\t</CnTreeNode>\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { NcButton } from '@nextcloud/vue'\nimport Draggable from 'vuedraggable'\nimport DragVertical from 'vue-material-design-icons/DragVertical.vue'\n\n/**\n * CnTreeNode — Recursive tree row used inside CnTreeView. Renders\n * its own row + recurses for children when expanded. Not exported\n * as a separate barrel entry — consumers use CnTreeView and the\n * recursion is internal.\n */\nexport default {\n\tname: 'CnTreeNode',\n\tcomponents: { Draggable, DragVertical, NcButton },\n\tprops: {\n\t\t/** The node data. */\n\t\tnode: { type: Object, required: true },\n\t\t/** Depth (drives indent). */\n\t\tdepth: { type: Number, default: 0 },\n\t\t/** Pixels of padding per depth level. */\n\t\tindent: { type: Number, default: 18 },\n\t\t/** Set of expanded node ids. */\n\t\texpandedIds: { type: Object, required: true },\n\t\t/** Currently selected node id, read off `node[idKey]` (or null). */\n\t\tselectedId: { type: [String, Number], default: null },\n\t\t/** Node-field key for the id. */\n\t\tidKey: { type: String, default: 'id' },\n\t\t/** Node-field key for the display label. */\n\t\tlabelKey: { type: String, default: 'label' },\n\t\t/** Node-field key for the children array. */\n\t\tchildrenKey: { type: String, default: 'children' },\n\t\t/** A11y label for the expand button, or `(node) => string`. */\n\t\texpandLabel: { type: [String, Function], default: 'Expand' },\n\t\t/** A11y label for the collapse button, or `(node) => string`. */\n\t\tcollapseLabel: { type: [String, Function], default: 'Collapse' },\n\t\t/** Extra expand-button attributes per node, `(node, depth) => object`. */\n\t\ttoggleAttrs: { type: Function, default: null },\n\t\t/** Extra row attributes per node, `(node, depth) => object`. */\n\t\trowAttrs: { type: Function, default: null },\n\t\t/** Rows take focus and select on Enter or Space. */\n\t\tfocusableRows: { type: Boolean, default: false },\n\t\t/** Rows can be moved among their siblings. */\n\t\treorderable: { type: Boolean, default: false },\n\t\t/** The texts of the move controls, resolved by CnTreeView. */\n\t\treorderLabels: { type: Object, default: () => ({}) },\n\t\t/** The parent's id, or null at the root. */\n\t\tparentId: { type: [String, Number], default: null },\n\t\t/** This node's index among its siblings. */\n\t\tsiblingIndex: { type: Number, default: 0 },\n\t\t/** How many siblings there are, itself included. */\n\t\tsiblingCount: { type: Number, default: 1 },\n\t},\n\n\temits: ['select', 'toggle', 'move'],\n\tcomputed: {\n\t\t/**\n\t\t * One entry when the row draws its move controls. A `v-for` leaves no\n\t\t * placeholder in the markup when off, which `v-if` would.\n\t\t *\n\t\t * @return {string[]} The keys.\n\t\t */\n\t\treorderSlots() {\n\t\t\treturn this.reorderable ? ['reorder'] : []\n\t\t},\n\n\t\t/**\n\t\t * Whether this node has any children at all.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\thasChildren() {\n\t\t\tconst c = this.node[this.childrenKey]\n\t\t\treturn Array.isArray(c) && c.length > 0\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is currently expanded.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisExpanded() {\n\t\t\treturn Boolean(this.expandedIds[this.node[this.idKey]])\n\t\t},\n\n\t\t/**\n\t\t * Whether this node is the currently-selected one.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisSelected() {\n\t\t\treturn this.selectedId === this.node[this.idKey]\n\t\t},\n\n\t\t/**\n\t\t * The expand button's accessible name for this node.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\ttoggleLabel() {\n\t\t\tconst label = this.isExpanded ? this.collapseLabel : this.expandLabel\n\t\t\treturn typeof label === 'function' ? label(this.node) : label\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraRowAttrs() {\n\t\t\treturn this.rowAttrs ? this.rowAttrs(this.node, this.depth) : {}\n\t\t},\n\n\t\t/**\n\t\t * The host's extra attributes for this row's expand button.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\textraToggleAttrs() {\n\t\t\treturn this.toggleAttrs ? this.toggleAttrs(this.node, this.depth) : {}\n\t\t},\n\t},\n\n\tmethods: {\n\t\ttoggle() {\n\t\t\tthis.$emit('toggle', this.node[this.idKey])\n\t\t},\n\n\t\t/**\n\t\t * The accessible name of a move button: its visible label and the node's.\n\t\t *\n\t\t * @param {string} action The visible label.\n\t\t * @return {string} The name.\n\t\t */\n\t\tmoveName(action) {\n\t\t\treturn this.reorderLabels.controlName\n\t\t\t\t.replace('{action}', action)\n\t\t\t\t.replace('{label}', String(this.node[this.labelKey] ?? ''))\n\t\t},\n\n\t\t/**\n\t\t * Move this node one place among its siblings, with a button.\n\t\t *\n\t\t * @param {number} delta -1 up, 1 down.\n\t\t * @return {void}\n\t\t */\n\t\tmoveBy(delta) {\n\t\t\tthis.$emit('move', {\n\t\t\t\tnode: this.node,\n\t\t\t\tparentId: this.parentId,\n\t\t\t\tfrom: this.siblingIndex,\n\t\t\t\tto: this.siblingIndex + delta,\n\t\t\t\tbyButton: true,\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * A child was dragged to another place.\n\t\t *\n\t\t * @param {{moved?: {element: object, oldIndex: number, newIndex: number}}} change What the drag changed.\n\t\t * @return {void}\n\t\t */\n\t\tonDragChange({ moved } = {}) {\n\t\t\tif (moved) {\n\t\t\t\tthis.$emit('move', { node: moved.element, parentId: this.node[this.idKey], from: moved.oldIndex, to: moved.newIndex })\n\t\t\t}\n\t\t},\n\n\t\tonRowClick() {\n\t\t\tthis.$emit('select', this.node)\n\t\t},\n\n\t\t/**\n\t\t * Enter or Space on a focusable row selects its node. Keys pressed on\n\t\t * the expand button or an action inside the row are theirs.\n\t\t *\n\t\t * @param {KeyboardEvent} event The key event.\n\t\t */\n\t\tonRowKeydown(event) {\n\t\t\tif (!this.focusableRows || event.target !== event.currentTarget) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event.key === 'Enter' || event.key === ' ') {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tthis.$emit('select', this.node)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-tree-node {\n\tlist-style: none;\n}\n\n.cn-tree-node__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 6px;\n\tpadding: 4px 6px;\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-tree-node__row:hover {\n\tbackground: var(--color-background-hover);\n}\n\n/* A row made focusable by `focusableRows` shows where keyboard focus is (WCAG 2.4.7). */\n.cn-tree-node__row[tabindex]:focus-visible {\n\toutline: 2px solid var(--color-primary-element);\n\toutline-offset: -2px;\n}\n\n.cn-tree-node--selected > .cn-tree-node__row {\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__toggle {\n\tbackground: none;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: 0;\n\twidth: 18px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.cn-tree-node__toggle--leaf {\n\tcursor: default;\n}\n\n.cn-tree-node__caret {\n\tdisplay: inline-block;\n\ttransition: transform 0.15s ease;\n\tfont-size: 0.9em;\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__caret--open {\n\ttransform: rotate(90deg);\n\tcolor: var(--color-main-text);\n}\n\n.cn-tree-node__icon {\n\tfont-size: 0.9em;\n}\n\n.cn-tree-node__label {\n\tflex: 1 1 auto;\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-tree-node__handle {\n\tcolor: var(--color-text-maxcontrast);\n\tcursor: grab;\n\tdisplay: inline-flex;\n}\n\n.cn-tree-node__move {\n\tdisplay: inline-flex;\n\tgap: 4px;\n}\n\n.cn-tree-node__badge {\n\tfont-size: 0.8em;\n\tpadding: 1px 6px;\n\tborder-radius: 9999px;\n\tbackground: var(--color-background-hover);\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-tree-node__children {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n</style>\n"],"names":["_createElementBlock","_createElementVNode","_mergeProps","_Fragment","_renderList","_createVNode","_openBlock","_normalizeClass","_toDisplayString","_renderSlot","_createTextVNode","_createBlock","_withCtx"],"mappings":";;;;;;;;AAgCgB,EAAA,KAAK,EA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,CACjB,CAAqC,KADb,KAAA;kBACxBH,UAAqC,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,EAArCP,UAAqC,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAR,KAAK,CAAA,CAAA;;;;AAEnB,gBAAA,CAAA,IAAA,CAAA,MAAM,CAAC,KAAK;;4BAAG,OAAK;AACnC,sBAAA,EAAA,EAAAU,OAAA,CAAA,CADqC,KAAK,KAAA;wBAC1CH,UAAmC,CAAA,IAAA,CAAA,MAAA,EAAA,OAAA,EAAnCP,UAAmC,CAAA,EAAA,OAAA,EAAA,IAAA,EAAA,EAAR,KAAK,CAAA,CAAA;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnTreeView.vue2.js';
2
2
  import { render } from './CnTreeView.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-790ecd66";
5
+ script.__scopeId = "data-v-5e1d084c";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };