@conduction/nextcloud-vue 2.174.0 → 2.175.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 (180) 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 +257 -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 +162 -9
  40. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue2.js.map +1 -1
  41. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js +63 -23
  42. package/dist/esm/components/CnDataMatrix/CnDataMatrix.vue3.js.map +1 -1
  43. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue.js +9 -0
  44. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue.js.map +1 -0
  45. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue2.js +175 -0
  46. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue2.js.map +1 -0
  47. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue3.js +114 -0
  48. package/dist/esm/components/CnDisplayScreen/CnDisplayScreen.vue3.js.map +1 -0
  49. package/dist/esm/components/CnDurationField/CnDurationField.vue.js +1 -1
  50. package/dist/esm/components/CnDurationField/CnDurationField.vue2.js +218 -4
  51. package/dist/esm/components/CnDurationField/CnDurationField.vue2.js.map +1 -1
  52. package/dist/esm/components/CnDurationField/CnDurationField.vue3.js +133 -44
  53. package/dist/esm/components/CnDurationField/CnDurationField.vue3.js.map +1 -1
  54. package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
  55. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  56. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +5 -1
  57. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  58. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue.js +9 -0
  59. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue.js.map +1 -0
  60. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue2.js +113 -0
  61. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue2.js.map +1 -0
  62. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue3.js +43 -0
  63. package/dist/esm/components/CnGeoCaptureField/CnGeoCaptureField.vue3.js.map +1 -0
  64. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue.js +1 -1
  65. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js +110 -1
  66. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue2.js.map +1 -1
  67. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js +60 -18
  68. package/dist/esm/components/CnMarkdownEditor/CnMarkdownEditor.vue3.js.map +1 -1
  69. package/dist/esm/components/CnMenuTreeNode/CnMenuTreeNode.vue2.js +2 -2
  70. package/dist/esm/components/CnMenuTreeNode/CnMenuTreeNode.vue2.js.map +1 -1
  71. package/dist/esm/components/CnObjectKanban/CnObjectKanban.vue2.js +2 -2
  72. package/dist/esm/components/CnObjectKanban/CnObjectKanban.vue2.js.map +1 -1
  73. package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js +2 -2
  74. package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js.map +1 -1
  75. package/dist/esm/components/CnQrCode/CnQrCode.vue.js +9 -0
  76. package/dist/esm/components/CnQrCode/CnQrCode.vue.js.map +1 -0
  77. package/dist/esm/components/CnQrCode/CnQrCode.vue2.js +241 -0
  78. package/dist/esm/components/CnQrCode/CnQrCode.vue2.js.map +1 -0
  79. package/dist/esm/components/CnQrCode/CnQrCode.vue3.js +75 -0
  80. package/dist/esm/components/CnQrCode/CnQrCode.vue3.js.map +1 -0
  81. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue.js +1 -1
  82. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue2.js +34 -3
  83. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue2.js.map +1 -1
  84. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue3.js +81 -19
  85. package/dist/esm/components/CnReadinessChecklist/CnReadinessChecklist.vue3.js.map +1 -1
  86. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  87. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +11 -0
  88. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  89. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +112 -88
  90. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  91. package/dist/esm/components/CnRevealField/CnRevealField.vue.js +9 -0
  92. package/dist/esm/components/CnRevealField/CnRevealField.vue.js.map +1 -0
  93. package/dist/esm/components/CnRevealField/CnRevealField.vue2.js +157 -0
  94. package/dist/esm/components/CnRevealField/CnRevealField.vue2.js.map +1 -0
  95. package/dist/esm/components/CnRevealField/CnRevealField.vue3.js +116 -0
  96. package/dist/esm/components/CnRevealField/CnRevealField.vue3.js.map +1 -0
  97. package/dist/esm/components/CnTextWidget/CnTextWidget.vue.js +1 -1
  98. package/dist/esm/components/CnTextWidget/CnTextWidget.vue2.js +43 -3
  99. package/dist/esm/components/CnTextWidget/CnTextWidget.vue2.js.map +1 -1
  100. package/dist/esm/components/CnTextWidget/CnTextWidget.vue3.js +19 -12
  101. package/dist/esm/components/CnTextWidget/CnTextWidget.vue3.js.map +1 -1
  102. package/dist/esm/components/CnTransferCard/CnTransferCard.vue.js +9 -0
  103. package/dist/esm/components/CnTransferCard/CnTransferCard.vue.js.map +1 -0
  104. package/dist/esm/components/CnTransferCard/CnTransferCard.vue2.js +87 -0
  105. package/dist/esm/components/CnTransferCard/CnTransferCard.vue2.js.map +1 -0
  106. package/dist/esm/components/CnTransferCard/CnTransferCard.vue3.js +126 -0
  107. package/dist/esm/components/CnTransferCard/CnTransferCard.vue3.js.map +1 -0
  108. package/dist/esm/components/CnTreeView/CnTreeNode.vue.js +1 -1
  109. package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js +66 -1
  110. package/dist/esm/components/CnTreeView/CnTreeNode.vue2.js.map +1 -1
  111. package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js +129 -29
  112. package/dist/esm/components/CnTreeView/CnTreeNode.vue3.js.map +1 -1
  113. package/dist/esm/components/CnTreeView/CnTreeView.vue.js +1 -1
  114. package/dist/esm/components/CnTreeView/CnTreeView.vue2.js +158 -6
  115. package/dist/esm/components/CnTreeView/CnTreeView.vue2.js.map +1 -1
  116. package/dist/esm/components/CnTreeView/CnTreeView.vue3.js +100 -39
  117. package/dist/esm/components/CnTreeView/CnTreeView.vue3.js.map +1 -1
  118. package/dist/esm/index.js +8 -0
  119. package/dist/esm/index.js.map +1 -1
  120. package/dist/esm/l10n/en.json.js +63 -1
  121. package/dist/esm/l10n/en.json.js.map +1 -1
  122. package/dist/esm/l10n/nl.json.js +63 -1
  123. package/dist/esm/l10n/nl.json.js.map +1 -1
  124. package/dist/esm/library-style.js +1 -1
  125. package/dist/esm/nextcloud-vue.css +1134 -499
  126. package/dist/esm/node_modules/vuedraggable/dist/vuedraggable.umd.js +2 -2
  127. package/dist/esm/utils/captureLocation.js +32 -0
  128. package/dist/esm/utils/captureLocation.js.map +1 -0
  129. package/dist/esm/utils/childRecordTotals.js +157 -0
  130. package/dist/esm/utils/childRecordTotals.js.map +1 -0
  131. package/dist/esm/utils/isoDuration.js +51 -1
  132. package/dist/esm/utils/isoDuration.js.map +1 -1
  133. package/dist/esm/utils/qr.js +649 -0
  134. package/dist/esm/utils/qr.js.map +1 -0
  135. package/dist/esm/utils/schema.js +3 -0
  136. package/dist/esm/utils/schema.js.map +1 -1
  137. package/dist/esm/utils/templateVariables.js +54 -0
  138. package/dist/esm/utils/templateVariables.js.map +1 -0
  139. package/dist/nextcloud-vue.cjs.js +20307 -14544
  140. package/dist/nextcloud-vue.cjs.js.map +2 -2
  141. package/dist/nextcloud-vue.css +1134 -499
  142. package/l10n/en.json +63 -1
  143. package/l10n/nl.json +63 -1
  144. package/package.json +1 -1
  145. package/src/components/CnActionDialog/CnActionDialog.vue +156 -9
  146. package/src/components/CnBlockListEditor/CnBlockListEditor.vue +615 -0
  147. package/src/components/CnBlockListEditor/index.js +9 -0
  148. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +311 -10
  149. package/src/components/CnChildRecordsField/CnChildRecordsField.vue +306 -15
  150. package/src/components/CnChoiceMatrix/CnChoiceMatrix.vue +710 -0
  151. package/src/components/CnChoiceMatrix/index.js +9 -0
  152. package/src/components/CnCountdownWidget/CnCountdownWidget.vue +223 -28
  153. package/src/components/CnCreateFormWidget/CnCreateFormWidget.vue +97 -6
  154. package/src/components/CnDataMatrix/CnDataMatrix.vue +199 -13
  155. package/src/components/CnDisplayScreen/CnDisplayScreen.vue +308 -0
  156. package/src/components/CnDisplayScreen/index.js +9 -0
  157. package/src/components/CnDurationField/CnDurationField.vue +330 -5
  158. package/src/components/CnFormDialog/CnFormDialog.vue +4 -0
  159. package/src/components/CnGeoCaptureField/CnGeoCaptureField.vue +148 -0
  160. package/src/components/CnGeoCaptureField/index.js +9 -0
  161. package/src/components/CnMarkdownEditor/CnMarkdownEditor.vue +139 -1
  162. package/src/components/CnQrCode/CnQrCode.vue +321 -0
  163. package/src/components/CnQrCode/index.js +9 -0
  164. package/src/components/CnReadinessChecklist/CnReadinessChecklist.vue +80 -3
  165. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +34 -1
  166. package/src/components/CnRevealField/CnRevealField.vue +273 -0
  167. package/src/components/CnRevealField/index.js +9 -0
  168. package/src/components/CnTextWidget/CnTextWidget.vue +62 -3
  169. package/src/components/CnTransferCard/CnTransferCard.vue +205 -0
  170. package/src/components/CnTransferCard/index.js +9 -0
  171. package/src/components/CnTreeView/CnTreeNode.vue +145 -2
  172. package/src/components/CnTreeView/CnTreeView.vue +210 -6
  173. package/src/components/index.js +7 -0
  174. package/src/index.js +8 -0
  175. package/src/utils/captureLocation.js +29 -0
  176. package/src/utils/childRecordTotals.js +153 -0
  177. package/src/utils/isoDuration.js +50 -0
  178. package/src/utils/qr.js +681 -0
  179. package/src/utils/schema.js +3 -0
  180. package/src/utils/templateVariables.js +51 -0
@@ -1,56 +1,118 @@
1
- import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, withCtx, createTextVNode, createCommentVNode, Fragment, renderList, createVNode } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, createCommentVNode, withModifiers, createVNode, withCtx, createTextVNode, Fragment, renderList, normalizeClass } from 'vue';
2
2
 
3
3
  const _hoisted_1 = { class: "cn-child-records-field" };
4
4
  const _hoisted_2 = { class: "cn-child-records-field__head" };
5
5
  const _hoisted_3 = { class: "cn-child-records-field__label" };
6
6
  const _hoisted_4 = {
7
+ key: 0,
8
+ class: "cn-child-records-field__adds"
9
+ };
10
+ const _hoisted_5 = {
7
11
  key: 1,
8
12
  class: "cn-child-records-field__table"
9
13
  };
10
- const _hoisted_5 = {
14
+ const _hoisted_6 = {
11
15
  key: 0,
12
16
  scope: "col"
13
17
  };
14
- const _hoisted_6 = { class: "cn-child-records-field__sr" };
15
- const _hoisted_7 = { key: 0 };
16
- const _hoisted_8 = ["colspan"];
17
- const _hoisted_9 = { key: 1 };
18
+ const _hoisted_7 = { class: "cn-child-records-field__sr" };
19
+ const _hoisted_8 = { key: 0 };
20
+ const _hoisted_9 = ["colspan"];
18
21
  const _hoisted_10 = {
22
+ key: 0,
23
+ "data-testid": "cn-child-records-computed"
24
+ };
25
+ const _hoisted_11 = { key: 2 };
26
+ const _hoisted_12 = {
19
27
  key: 0,
20
28
  class: "cn-child-records-field__actions"
21
29
  };
22
- const _hoisted_11 = {
30
+ const _hoisted_13 = { key: 0 };
31
+ const _hoisted_14 = ["colspan"];
32
+ const _hoisted_15 = {
33
+ class: "cn-child-records-field__num",
34
+ "data-testid": "cn-child-records-total-value"
35
+ };
36
+ const _hoisted_16 = { key: 0 };
37
+ const _hoisted_17 = {
38
+ class: "cn-child-records-field__sr",
39
+ "aria-live": "polite",
40
+ "data-testid": "cn-child-records-status"
41
+ };
42
+ const _hoisted_18 = {
23
43
  key: 2,
24
44
  class: "cn-child-records-field__more",
25
45
  "data-testid": "cn-child-records-more"
26
46
  };
27
- const _hoisted_12 = ["href"];
28
- const _hoisted_13 = {
47
+ const _hoisted_19 = ["href"];
48
+ const _hoisted_20 = {
29
49
  key: 3,
30
50
  class: "cn-child-records-field__error",
31
51
  role: "alert"
32
52
  };
33
53
 
34
54
  function render(_ctx, _cache, $props, $setup, $data, $options) {
55
+ const _component_CnSearchSelect = resolveComponent("CnSearchSelect");
56
+ const _component_NcTextField = resolveComponent("NcTextField");
35
57
  const _component_NcButton = resolveComponent("NcButton");
36
58
  const _component_NcLoadingIcon = resolveComponent("NcLoadingIcon");
37
- const _component_NcTextField = resolveComponent("NcTextField");
38
59
  const _component_CnFormDialog = resolveComponent("CnFormDialog");
39
60
 
40
61
  return (openBlock(), createElementBlock("div", _hoisted_1, [
41
62
  createElementVNode("div", _hoisted_2, [
42
63
  createElementVNode("span", _hoisted_3, toDisplayString($props.inputLabel), 1 /* TEXT */),
43
64
  (!$props.disabled)
44
- ? (openBlock(), createBlock(_component_NcButton, {
45
- key: 0,
46
- "data-testid": "cn-child-records-add",
47
- onClick: $options.addRow
48
- }, {
49
- default: withCtx(() => [
50
- createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Add row')), 1 /* TEXT */)
51
- ]),
52
- _: 1 /* STABLE */
53
- }, 8 /* PROPS */, ["onClick"]))
65
+ ? (openBlock(), createElementBlock("div", _hoisted_4, [
66
+ ($options.addFrom)
67
+ ? (openBlock(), createBlock(_component_CnSearchSelect, {
68
+ key: 0,
69
+ class: "cn-child-records-field__pick",
70
+ "data-testid": "cn-child-records-add-from",
71
+ modelValue: null,
72
+ options: $data.sourceOptions,
73
+ loading: $data.sourceLoading,
74
+ inputLabel: $options.addFromLabel,
75
+ filterable: false,
76
+ onSearch: $options.searchSource,
77
+ "onUpdate:modelValue": $options.addFromPicked
78
+ }, null, 8 /* PROPS */, ["options", "loading", "inputLabel", "onSearch", "onUpdate:modelValue"]))
79
+ : createCommentVNode("v-if", true),
80
+ ($options.addFrom && $options.addFrom.codeField)
81
+ ? (openBlock(), createElementBlock("form", {
82
+ key: 1,
83
+ class: "cn-child-records-field__code",
84
+ "data-testid": "cn-child-records-code",
85
+ onSubmit: _cache[1] || (_cache[1] = withModifiers((...args) => ($options.addByCode && $options.addByCode(...args)), ["prevent"]))
86
+ }, [
87
+ createVNode(_component_NcTextField, {
88
+ modelValue: $data.code,
89
+ label: $options.codeLabel,
90
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = value => { $data.code = value; })
91
+ }, null, 8 /* PROPS */, ["modelValue", "label"]),
92
+ createVNode(_component_NcButton, {
93
+ type: "submit",
94
+ "data-testid": "cn-child-records-code-add"
95
+ }, {
96
+ default: withCtx(() => [
97
+ createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Add')), 1 /* TEXT */)
98
+ ]),
99
+ _: 1 /* STABLE */
100
+ })
101
+ ], 32 /* NEED_HYDRATION */))
102
+ : createCommentVNode("v-if", true),
103
+ ($options.freeRows)
104
+ ? (openBlock(), createBlock(_component_NcButton, {
105
+ key: 2,
106
+ "data-testid": "cn-child-records-add",
107
+ onClick: $options.addRow
108
+ }, {
109
+ default: withCtx(() => [
110
+ createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Add row')), 1 /* TEXT */)
111
+ ]),
112
+ _: 1 /* STABLE */
113
+ }, 8 /* PROPS */, ["onClick"]))
114
+ : createCommentVNode("v-if", true)
115
+ ]))
54
116
  : createCommentVNode("v-if", true)
55
117
  ]),
56
118
  ($data.loading)
@@ -58,29 +120,30 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
58
120
  key: 0,
59
121
  name: $options.t('nextcloud-vue', 'Loading …')
60
122
  }, null, 8 /* PROPS */, ["name"]))
61
- : (openBlock(), createElementBlock("table", _hoisted_4, [
123
+ : (openBlock(), createElementBlock("table", _hoisted_5, [
62
124
  createElementVNode("thead", null, [
63
125
  createElementVNode("tr", null, [
64
126
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.columns, (col) => {
65
127
  return (openBlock(), createElementBlock("th", {
66
128
  key: col.key,
67
- scope: "col"
68
- }, toDisplayString(col.label), 1 /* TEXT */))
129
+ scope: "col",
130
+ class: normalizeClass({ 'cn-child-records-field__num': col.numeric || col.computed })
131
+ }, toDisplayString(col.label), 3 /* TEXT, CLASS */))
69
132
  }), 128 /* KEYED_FRAGMENT */)),
70
133
  (!$props.disabled)
71
- ? (openBlock(), createElementBlock("th", _hoisted_5, [
72
- createElementVNode("span", _hoisted_6, toDisplayString($options.t('nextcloud-vue', 'Row actions')), 1 /* TEXT */)
134
+ ? (openBlock(), createElementBlock("th", _hoisted_6, [
135
+ createElementVNode("span", _hoisted_7, toDisplayString($options.t('nextcloud-vue', 'Row actions')), 1 /* TEXT */)
73
136
  ]))
74
137
  : createCommentVNode("v-if", true)
75
138
  ])
76
139
  ]),
77
140
  createElementVNode("tbody", null, [
78
141
  ($options.list.length === 0)
79
- ? (openBlock(), createElementBlock("tr", _hoisted_7, [
142
+ ? (openBlock(), createElementBlock("tr", _hoisted_8, [
80
143
  createElementVNode("td", {
81
144
  colspan: $options.columns.length + 1,
82
145
  class: "cn-child-records-field__empty"
83
- }, toDisplayString($options.t('nextcloud-vue', 'No rows yet.')), 9 /* TEXT, PROPS */, _hoisted_8)
146
+ }, toDisplayString($options.t('nextcloud-vue', 'No rows yet.')), 9 /* TEXT, PROPS */, _hoisted_9)
84
147
  ]))
85
148
  : createCommentVNode("v-if", true),
86
149
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.list, (row, index) => {
@@ -90,22 +153,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
90
153
  }, [
91
154
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.columns, (col) => {
92
155
  return (openBlock(), createElementBlock("td", {
93
- key: col.key
156
+ key: col.key,
157
+ class: normalizeClass({ 'cn-child-records-field__num': col.numeric || col.computed })
94
158
  }, [
95
- (col.inline && !$props.disabled)
96
- ? (openBlock(), createBlock(_component_NcTextField, {
97
- key: 0,
98
- modelValue: $options.cellText(row, col),
99
- label: `${col.label} ${index + 1}`,
100
- labelOutside: true,
101
- type: col.numeric ? 'number' : 'text',
102
- "onUpdate:modelValue": value => $options.setCell(index, col, value)
103
- }, null, 8 /* PROPS */, ["modelValue", "label", "type", "onUpdate:modelValue"]))
104
- : (openBlock(), createElementBlock("span", _hoisted_9, toDisplayString($options.cellText(row, col)), 1 /* TEXT */))
105
- ]))
159
+ (col.computed)
160
+ ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString($options.computedText(row, col)), 1 /* TEXT */))
161
+ : (col.inline && !$props.disabled)
162
+ ? (openBlock(), createBlock(_component_NcTextField, {
163
+ key: 1,
164
+ modelValue: $options.cellText(row, col),
165
+ label: `${col.label} ${index + 1}`,
166
+ labelOutside: true,
167
+ type: col.numeric ? 'number' : 'text',
168
+ "onUpdate:modelValue": value => $options.setCell(index, col, value)
169
+ }, null, 8 /* PROPS */, ["modelValue", "label", "type", "onUpdate:modelValue"]))
170
+ : (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString($options.cellText(row, col)), 1 /* TEXT */))
171
+ ], 2 /* CLASS */))
106
172
  }), 128 /* KEYED_FRAGMENT */)),
107
173
  (!$props.disabled)
108
- ? (openBlock(), createElementBlock("td", _hoisted_10, [
174
+ ? (openBlock(), createElementBlock("td", _hoisted_12, [
109
175
  createVNode(_component_NcButton, {
110
176
  variant: "tertiary",
111
177
  "aria-label": $options.t('nextcloud-vue', 'Edit row {n}', { n: index + 1 }),
@@ -131,22 +197,44 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
131
197
  : createCommentVNode("v-if", true)
132
198
  ]))
133
199
  }), 128 /* KEYED_FRAGMENT */))
134
- ])
200
+ ]),
201
+ ($options.totalRows.length > 0)
202
+ ? (openBlock(), createElementBlock("tfoot", _hoisted_13, [
203
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.totalRows, (totalRow) => {
204
+ return (openBlock(), createElementBlock("tr", {
205
+ key: totalRow.key,
206
+ class: normalizeClass({ 'cn-child-records-field__total--emphasis': totalRow.emphasis }),
207
+ "data-testid": "cn-child-records-total"
208
+ }, [
209
+ createElementVNode("th", {
210
+ scope: "row",
211
+ colspan: Math.max(1, $options.columns.length - 1),
212
+ class: "cn-child-records-field__total-label"
213
+ }, toDisplayString(totalRow.label), 9 /* TEXT, PROPS */, _hoisted_14),
214
+ createElementVNode("td", _hoisted_15, toDisplayString(totalRow.text), 1 /* TEXT */),
215
+ (!$props.disabled)
216
+ ? (openBlock(), createElementBlock("td", _hoisted_16))
217
+ : createCommentVNode("v-if", true)
218
+ ], 2 /* CLASS */))
219
+ }), 128 /* KEYED_FRAGMENT */))
220
+ ]))
221
+ : createCommentVNode("v-if", true)
135
222
  ])),
223
+ createElementVNode("p", _hoisted_17, toDisplayString($data.status), 1 /* TEXT */),
136
224
  ($data.total > $options.list.length)
137
- ? (openBlock(), createElementBlock("p", _hoisted_11, [
225
+ ? (openBlock(), createElementBlock("p", _hoisted_18, [
138
226
  ($options.listUrl)
139
227
  ? (openBlock(), createElementBlock("a", {
140
228
  key: 0,
141
229
  href: $options.listUrl
142
- }, toDisplayString($options.moreLabel), 9 /* TEXT, PROPS */, _hoisted_12))
230
+ }, toDisplayString($options.moreLabel), 9 /* TEXT, PROPS */, _hoisted_19))
143
231
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
144
232
  createTextVNode(toDisplayString($options.moreLabel), 1 /* TEXT */)
145
233
  ], 64 /* STABLE_FRAGMENT */))
146
234
  ]))
147
235
  : createCommentVNode("v-if", true),
148
- ($props.error || $options.problemText)
149
- ? (openBlock(), createElementBlock("p", _hoisted_13, toDisplayString($props.error || $options.problemText), 1 /* TEXT */))
236
+ ($props.error || $options.problemText || $data.addError)
237
+ ? (openBlock(), createElementBlock("p", _hoisted_20, toDisplayString($props.error || $options.problemText || $data.addError), 1 /* TEXT */))
150
238
  : createCommentVNode("v-if", true),
151
239
  ($data.editing !== null && $data.childSchema)
152
240
  ? (openBlock(), createBlock(_component_CnFormDialog, {
@@ -157,7 +245,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
157
245
  dialogTitle: $options.t('nextcloud-vue', 'Edit row {n}', { n: $data.editing + 1 }),
158
246
  recoverDraft: false,
159
247
  onConfirm: $options.onRowConfirm,
160
- onClose: _cache[0] || (_cache[0] = $event => ($data.editing = null))
248
+ onClose: _cache[2] || (_cache[2] = $event => ($data.editing = null))
161
249
  }, null, 8 /* PROPS */, ["schema", "item", "excludeFields", "dialogTitle", "onConfirm"]))
162
250
  : createCommentVNode("v-if", true)
163
251
  ]))
@@ -1 +1 @@
1
- {"version":3,"file":"CnChildRecordsField.vue3.js","sources":["../../../../src/components/CnChildRecordsField/CnChildRecordsField.vue?vue&type=template&id=52ba5fea&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-child-records-field\">\n\t\t<div class=\"cn-child-records-field__head\">\n\t\t\t<span class=\"cn-child-records-field__label\">{{ inputLabel }}</span>\n\t\t\t<NcButton\n\t\t\t\tv-if=\"!disabled\"\n\t\t\t\tdata-testid=\"cn-child-records-add\"\n\t\t\t\t@click=\"addRow\">\n\t\t\t\t{{ t('nextcloud-vue', 'Add row') }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<NcLoadingIcon v-if=\"loading\" :name=\"t('nextcloud-vue', 'Loading …')\" />\n\t\t<table v-else class=\"cn-child-records-field__table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th v-for=\"col in columns\" :key=\"col.key\" scope=\"col\">\n\t\t\t\t\t\t{{ col.label }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<th v-if=\"!disabled\" scope=\"col\">\n\t\t\t\t\t\t<span class=\"cn-child-records-field__sr\">{{ t('nextcloud-vue', 'Row actions') }}</span>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr v-if=\"list.length === 0\">\n\t\t\t\t\t<td :colspan=\"columns.length + 1\" class=\"cn-child-records-field__empty\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'No rows yet.') }}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr v-for=\"(row, index) in list\" :key=\"index\" data-testid=\"cn-child-records-row\">\n\t\t\t\t\t<td v-for=\"col in columns\" :key=\"col.key\">\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tv-if=\"col.inline && !disabled\"\n\t\t\t\t\t\t\t:modelValue=\"cellText(row, col)\"\n\t\t\t\t\t\t\t:label=\"`${col.label} ${index + 1}`\"\n\t\t\t\t\t\t\t:labelOutside=\"true\"\n\t\t\t\t\t\t\t:type=\"col.numeric ? 'number' : 'text'\"\n\t\t\t\t\t\t\t@update:modelValue=\"value => setCell(index, col, value)\" />\n\t\t\t\t\t\t<span v-else>{{ cellText(row, col) }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!disabled\" class=\"cn-child-records-field__actions\">\n\t\t\t\t\t\t<NcButton variant=\"tertiary\" :aria-label=\"t('nextcloud-vue', 'Edit row {n}', { n: index + 1 })\" @click=\"editing = index\">\n\t\t\t\t\t\t\t{{ t('nextcloud-vue', 'Edit') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Remove row {n}', { n: index + 1 })\"\n\t\t\t\t\t\t\tdata-testid=\"cn-child-records-remove\"\n\t\t\t\t\t\t\t@click=\"removeRow(index)\">\n\t\t\t\t\t\t\t{{ t('nextcloud-vue', 'Remove') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<p v-if=\"total > list.length\" class=\"cn-child-records-field__more\" data-testid=\"cn-child-records-more\">\n\t\t\t<template v-if=\"listUrl\">\n\t\t\t\t<a :href=\"listUrl\">{{ moreLabel }}</a>\n\t\t\t</template>\n\t\t\t<template v-else>\n\t\t\t\t{{ moreLabel }}\n\t\t\t</template>\n\t\t</p>\n\t\t<p v-if=\"error || problemText\" class=\"cn-child-records-field__error\" role=\"alert\">\n\t\t\t{{ error || problemText }}\n\t\t</p>\n\t\t<CnFormDialog\n\t\t\tv-if=\"editing !== null && childSchema\"\n\t\t\t:schema=\"childSchema\"\n\t\t\t:item=\"list[editing]\"\n\t\t\t:excludeFields=\"[config.parentField]\"\n\t\t\t:dialogTitle=\"t('nextcloud-vue', 'Edit row {n}', { n: editing + 1 })\"\n\t\t\t:recoverDraft=\"false\"\n\t\t\t@confirm=\"onRowConfirm\"\n\t\t\t@close=\"editing = null\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue'\nimport { defineAsyncComponent } from 'vue'\nimport { describeRowProblem, useChildRecords, validateChildRows } from '../../composables/useChildRecords.js'\n\n/**\n * CnChildRecordsField — edits the records of another schema that point at this\n * one, as a table inside the parent form (`child-records` form widget).\n *\n * Add row, inline editing of the columns shown, an Edit dialog for the other\n * fields, and Remove. On an existing parent it loads the first 50 children\n * (those whose `parentField` names the parent) and links to the list for the\n * rest. The rows are the v-model; the parent form saves them as their own\n * objects after the parent is saved (see `useChildRecords`), never nested in\n * the parent's payload. Each row is checked against the child schema's\n * required properties and the field reports the problems through `validity`.\n *\n * ```vue\n * <CnChildRecordsField v-model=\"lines\" register=\"shop\" :config=\"{ schema: 'order-line', parentField: 'order' }\" parentId=\"o-1\" />\n * ```\n */\nexport default {\n\tname: 'CnChildRecordsField',\n\n\tcomponents: {\n\t\t// Lazy: CnFormDialog renders this field, so a static import is a cycle.\n\t\tCnFormDialog: defineAsyncComponent(() => import('../CnFormDialog/CnFormDialog.vue')),\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t\tNcTextField,\n\t},\n\n\tprops: {\n\t\t/** The rows (v-model). Each saved row carries its `id`. */\n\t\tmodelValue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The relation: `schema` (child schema slug), `parentField` (the child\n\t\t * property pointing at the parent) and optional `columns` (keys shown).\n\t\t *\n\t\t * @type {{schema: string, parentField: string, columns?: string[]}}\n\t\t */\n\t\tconfig: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Register slug the child schema lives in. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Id of the parent being edited; empty when creating (no children to load). */\n\t\tparentId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Visible label of the table. */\n\t\tinputLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Hide the editing controls. */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Validation message shown under the table. */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Base URL of the OpenRegister API. */\n\t\tapiBase: {\n\t\t\ttype: String,\n\t\t\tdefault: '/apps/openregister/api',\n\t\t},\n\n\t\t/** Most columns shown in the table. */\n\t\tmaxColumns: {\n\t\t\ttype: Number,\n\t\t\tdefault: 4,\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * The rows changed (v-model).\n\t\t *\n\t\t * @event update:modelValue\n\t\t * @type {object[]}\n\t\t */\n\t\t'update:modelValue',\n\t\t/**\n\t\t * The children as loaded from the server, so the form can tell what changed on save.\n\t\t *\n\t\t * @event loaded\n\t\t * @type {object[]}\n\t\t */\n\t\t'loaded',\n\t\t/**\n\t\t * The current row problems (empty when every row is valid).\n\t\t *\n\t\t * @event validity\n\t\t * @type {Array<{row: number, field: string, label: string}>}\n\t\t */\n\t\t'validity',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tchildSchema: null,\n\t\t\ttotal: 0,\n\t\t\tediting: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tlist() {\n\t\t\treturn Array.isArray(this.modelValue) ? this.modelValue : []\n\t\t},\n\n\t\t/** The columns: the configured keys, else the child schema's first required properties. */\n\t\tcolumns() {\n\t\t\tconst props = this.childSchema?.properties || {}\n\t\t\tlet keys = Array.isArray(this.config.columns) ? [...this.config.columns] : []\n\t\t\tif (keys.length === 0) {\n\t\t\t\tconst required = Array.isArray(this.childSchema?.required) ? this.childSchema.required : []\n\t\t\t\tkeys = required.filter((k) => k !== this.config.parentField)\n\t\t\t\tif (keys.length === 0) {\n\t\t\t\t\tkeys = Object.keys(props).filter((k) => k !== this.config.parentField)\n\t\t\t\t}\n\t\t\t\tkeys = keys.slice(0, this.maxColumns)\n\t\t\t}\n\t\t\treturn keys.filter((k) => k !== this.config.parentField).map((key) => {\n\t\t\t\tconst type = props[key]?.type || 'string'\n\t\t\t\tconst inline = ['string', 'number', 'integer'].includes(type) && !props[key]?.enum && !props[key]?.$ref\n\t\t\t\treturn { key, label: props[key]?.title || key, inline, numeric: type === 'number' || type === 'integer' }\n\t\t\t})\n\t\t},\n\n\t\tproblems() {\n\t\t\treturn validateChildRows(this.list, this.childSchema, this.config.parentField)\n\t\t},\n\n\t\tproblemText() {\n\t\t\treturn describeRowProblem(this.problems)\n\t\t},\n\n\t\tmoreLabel() {\n\t\t\treturn t('nextcloud-vue', 'Showing {shown} of {total} rows. Edit the rest on the list page.', { shown: this.list.length, total: this.total })\n\t\t},\n\n\t\tlistUrl() {\n\t\t\treturn this.config.listUrl || ''\n\t\t},\n\t},\n\n\twatch: {\n\t\tproblems: {\n\t\t\timmediate: true,\n\t\t\thandler(problems) {\n\t\t\t\tthis.$emit('validity', problems)\n\t\t\t},\n\t\t},\n\n\t\tparentId() {\n\t\t\tthis.load()\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.load()\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/** Load the child schema and, for an existing parent, its children. */\n\t\tasync load() {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(generateUrl(`${this.apiBase}/schemas/${encodeURIComponent(this.config.schema)}`))\n\t\t\t\tthis.childSchema = response?.data || null\n\t\t\t} catch {\n\t\t\t\tthis.childSchema = null\n\t\t\t}\n\t\t\tif (this.parentId !== '' && this.parentId !== null && this.parentId !== undefined) {\n\t\t\t\ttry {\n\t\t\t\t\tconst { rows, total } = await useChildRecords({ apiBase: this.apiBase }).load({\n\t\t\t\t\t\tregister: this.register,\n\t\t\t\t\t\tschema: this.config.schema,\n\t\t\t\t\t\tparentField: this.config.parentField,\n\t\t\t\t\t\tparentId: this.parentId,\n\t\t\t\t\t})\n\t\t\t\t\tthis.total = total\n\t\t\t\t\tthis.$emit('loaded', rows.map((r) => ({ ...r })))\n\t\t\t\t\tthis.$emit('update:modelValue', rows)\n\t\t\t\t} catch {\n\t\t\t\t\tthis.total = 0\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.loading = false\n\t\t},\n\n\t\t/**\n\t\t * The text of a cell.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @param {{key: string}} col The column.\n\t\t * @return {string} The text.\n\t\t */\n\t\tcellText(row, col) {\n\t\t\tconst value = row?.[col.key]\n\t\t\tif (value === undefined || value === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn typeof value === 'object' ? JSON.stringify(value) : String(value)\n\t\t},\n\n\t\t/**\n\t\t * Write one cell.\n\t\t *\n\t\t * @param {number} index The row index.\n\t\t * @param {{key: string, numeric: boolean}} col The column.\n\t\t * @param {string} value The typed value.\n\t\t */\n\t\tsetCell(index, col, value) {\n\t\t\tconst next = this.list.map((r, i) => (i === index ? { ...r, [col.key]: col.numeric && value !== '' ? Number(value) : value } : r))\n\t\t\tthis.$emit('update:modelValue', next)\n\t\t},\n\n\t\t/** Append an empty row. */\n\t\taddRow() {\n\t\t\tthis.$emit('update:modelValue', [...this.list, {}])\n\t\t},\n\n\t\t/**\n\t\t * Remove a row.\n\t\t *\n\t\t * @param {number} index The row index.\n\t\t */\n\t\tremoveRow(index) {\n\t\t\tthis.$emit('update:modelValue', this.list.filter((_, i) => i !== index))\n\t\t},\n\n\t\t/**\n\t\t * The row dialog was confirmed: take its values.\n\t\t *\n\t\t * @param {object} values The row values.\n\t\t */\n\t\tonRowConfirm(values) {\n\t\t\tconst index = this.editing\n\t\t\tthis.$emit('update:modelValue', this.list.map((r, i) => (i === index ? { ...r, ...values } : r)))\n\t\t\tthis.editing = null\n\t\t},\n\t},\n}\n\n</script>\n\n<style scoped>\n.cn-child-records-field__head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmargin-bottom: 8px;\n}\n\n.cn-child-records-field__label {\n\tfont-weight: 600;\n}\n\n.cn-child-records-field__table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n}\n\n.cn-child-records-field__table th,\n.cn-child-records-field__table td {\n\tpadding: 4px 8px;\n\ttext-align: start;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-child-records-field__empty,\n.cn-child-records-field__more {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-child-records-field__actions {\n\twhite-space: nowrap;\n}\n\n.cn-child-records-field__error {\n\tcolor: var(--color-error);\n\tmargin: 8px 0 0;\n}\n\n.cn-child-records-field__sr {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createBlock","_Fragment","_renderList","_createVNode"],"mappings":";;AASM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAO,GAAA;AACZ,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAAwB,GAAA;AAC5B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAAI,GAAA;;;AASH,EAAA,KAAI,EAAA,+BAAA;;;;AAMV,EAAA,KAAA,EAAA,KAAA;;AACD,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,4BAAA,GAAA;;;;;;AAqBiB,EAAA,KAAK,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AA;4BAEVA,kBAEE,CAAAI,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;gDADE,QAAS,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;;;AAGL,IAAA,CAAA,MAAA,CAAA,KAAI,IAAI,QAAY,CAAA,WAAA;AAA5B,SAAAL,SAAA,EAAA,EAAAC,kBAAA,CAEG,GAFH,EAAA,WAEG,EADAE,eAAA,CAAA,MAAA,CAAA,KAAK,IAAI,QAAQ,CAAA,WAAA,CAAA,EAAA,CAAA,YAAA;;AAGd,IAAA,CAAA,KAAA,CAAA,OAAO,aAAa,KAAW,CAAA,WAAA;sBADrCC;;AAEC,UAAA,MAAM,EAAE,KAAW,CAAA,WAAA;UACnB,IAAI,EAAE,QAAI,CAAA,IAAA,CAAC,KAAO,CAAA,OAAA,CAAA;UAClB,aAAa,EAAA,CAAI,cAAM,WAAC,CAAA;UACxB,WAAE,EAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,cAAA,EAAA,EAAA,CAAA,EAAA,KAAA,CAAA,OAAA,GAAA,CAAA,EAAA,CAAA;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnChildRecordsField.vue3.js","sources":["../../../../src/components/CnChildRecordsField/CnChildRecordsField.vue?vue&type=template&id=2972a818&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-child-records-field\">\n\t\t<div class=\"cn-child-records-field__head\">\n\t\t\t<span class=\"cn-child-records-field__label\">{{ inputLabel }}</span>\n\t\t\t<div v-if=\"!disabled\" class=\"cn-child-records-field__adds\">\n\t\t\t\t<CnSearchSelect\n\t\t\t\t\tv-if=\"addFrom\"\n\t\t\t\t\tclass=\"cn-child-records-field__pick\"\n\t\t\t\t\tdata-testid=\"cn-child-records-add-from\"\n\t\t\t\t\t:modelValue=\"null\"\n\t\t\t\t\t:options=\"sourceOptions\"\n\t\t\t\t\t:loading=\"sourceLoading\"\n\t\t\t\t\t:inputLabel=\"addFromLabel\"\n\t\t\t\t\t:filterable=\"false\"\n\t\t\t\t\t@search=\"searchSource\"\n\t\t\t\t\t@update:modelValue=\"addFromPicked\" />\n\t\t\t\t<form\n\t\t\t\t\tv-if=\"addFrom && addFrom.codeField\"\n\t\t\t\t\tclass=\"cn-child-records-field__code\"\n\t\t\t\t\tdata-testid=\"cn-child-records-code\"\n\t\t\t\t\t@submit.prevent=\"addByCode\">\n\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t:modelValue=\"code\"\n\t\t\t\t\t\t:label=\"codeLabel\"\n\t\t\t\t\t\t@update:modelValue=\"value => { code = value }\" />\n\t\t\t\t\t<NcButton type=\"submit\" data-testid=\"cn-child-records-code-add\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'Add') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</form>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"freeRows\"\n\t\t\t\t\tdata-testid=\"cn-child-records-add\"\n\t\t\t\t\t@click=\"addRow\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Add row') }}\n\t\t\t\t</NcButton>\n\t\t\t</div>\n\t\t</div>\n\t\t<NcLoadingIcon v-if=\"loading\" :name=\"t('nextcloud-vue', 'Loading …')\" />\n\t\t<table v-else class=\"cn-child-records-field__table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th v-for=\"col in columns\"\n\t\t\t\t\t\t:key=\"col.key\"\n\t\t\t\t\t\tscope=\"col\"\n\t\t\t\t\t\t:class=\"{ 'cn-child-records-field__num': col.numeric || col.computed }\">\n\t\t\t\t\t\t{{ col.label }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<th v-if=\"!disabled\" scope=\"col\">\n\t\t\t\t\t\t<span class=\"cn-child-records-field__sr\">{{ t('nextcloud-vue', 'Row actions') }}</span>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr v-if=\"list.length === 0\">\n\t\t\t\t\t<td :colspan=\"columns.length + 1\" class=\"cn-child-records-field__empty\">\n\t\t\t\t\t\t{{ t('nextcloud-vue', 'No rows yet.') }}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr v-for=\"(row, index) in list\" :key=\"index\" data-testid=\"cn-child-records-row\">\n\t\t\t\t\t<td v-for=\"col in columns\" :key=\"col.key\" :class=\"{ 'cn-child-records-field__num': col.numeric || col.computed }\">\n\t\t\t\t\t\t<span v-if=\"col.computed\" data-testid=\"cn-child-records-computed\">{{ computedText(row, col) }}</span>\n\t\t\t\t\t\t<NcTextField\n\t\t\t\t\t\t\tv-else-if=\"col.inline && !disabled\"\n\t\t\t\t\t\t\t:modelValue=\"cellText(row, col)\"\n\t\t\t\t\t\t\t:label=\"`${col.label} ${index + 1}`\"\n\t\t\t\t\t\t\t:labelOutside=\"true\"\n\t\t\t\t\t\t\t:type=\"col.numeric ? 'number' : 'text'\"\n\t\t\t\t\t\t\t@update:modelValue=\"value => setCell(index, col, value)\" />\n\t\t\t\t\t\t<span v-else>{{ cellText(row, col) }}</span>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!disabled\" class=\"cn-child-records-field__actions\">\n\t\t\t\t\t\t<NcButton variant=\"tertiary\" :aria-label=\"t('nextcloud-vue', 'Edit row {n}', { n: index + 1 })\" @click=\"editing = index\">\n\t\t\t\t\t\t\t{{ t('nextcloud-vue', 'Edit') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Remove row {n}', { n: index + 1 })\"\n\t\t\t\t\t\t\tdata-testid=\"cn-child-records-remove\"\n\t\t\t\t\t\t\t@click=\"removeRow(index)\">\n\t\t\t\t\t\t\t{{ t('nextcloud-vue', 'Remove') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t<tfoot v-if=\"totalRows.length > 0\">\n\t\t\t\t<tr v-for=\"totalRow in totalRows\"\n\t\t\t\t\t:key=\"totalRow.key\"\n\t\t\t\t\t:class=\"{ 'cn-child-records-field__total--emphasis': totalRow.emphasis }\"\n\t\t\t\t\tdata-testid=\"cn-child-records-total\">\n\t\t\t\t\t<th scope=\"row\" :colspan=\"Math.max(1, columns.length - 1)\" class=\"cn-child-records-field__total-label\">\n\t\t\t\t\t\t{{ totalRow.label }}\n\t\t\t\t\t</th>\n\t\t\t\t\t<td class=\"cn-child-records-field__num\" data-testid=\"cn-child-records-total-value\">\n\t\t\t\t\t\t{{ totalRow.text }}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td v-if=\"!disabled\" />\n\t\t\t\t</tr>\n\t\t\t</tfoot>\n\t\t</table>\n\t\t<p class=\"cn-child-records-field__sr\" aria-live=\"polite\" data-testid=\"cn-child-records-status\">\n\t\t\t{{ status }}\n\t\t</p>\n\t\t<p v-if=\"total > list.length\" class=\"cn-child-records-field__more\" data-testid=\"cn-child-records-more\">\n\t\t\t<template v-if=\"listUrl\">\n\t\t\t\t<a :href=\"listUrl\">{{ moreLabel }}</a>\n\t\t\t</template>\n\t\t\t<template v-else>\n\t\t\t\t{{ moreLabel }}\n\t\t\t</template>\n\t\t</p>\n\t\t<p v-if=\"error || problemText || addError\" class=\"cn-child-records-field__error\" role=\"alert\">\n\t\t\t{{ error || problemText || addError }}\n\t\t</p>\n\t\t<CnFormDialog\n\t\t\tv-if=\"editing !== null && childSchema\"\n\t\t\t:schema=\"childSchema\"\n\t\t\t:item=\"list[editing]\"\n\t\t\t:excludeFields=\"[config.parentField]\"\n\t\t\t:dialogTitle=\"t('nextcloud-vue', 'Edit row {n}', { n: editing + 1 })\"\n\t\t\t:recoverDraft=\"false\"\n\t\t\t@confirm=\"onRowConfirm\"\n\t\t\t@close=\"editing = null\" />\n\t</div>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport { NcButton, NcLoadingIcon, NcTextField } from '@nextcloud/vue'\nimport { defineAsyncComponent } from 'vue'\nimport CnSearchSelect from '../CnSearchSelect/CnSearchSelect.vue'\nimport { describeRowProblem, useChildRecords, validateChildRows } from '../../composables/useChildRecords.js'\nimport { computeRow, computeTotals, rowFromSource, storeComputed } from '../../utils/childRecordTotals.js'\nimport { formatMetricValue, normalizeMetricFormat } from '../../utils/formatMetric.js'\n\n/**\n * CnChildRecordsField — edits the records of another schema that point at this\n * one, as a table inside the parent form (`child-records` form widget).\n *\n * Add row, inline editing of the columns shown, an Edit dialog for the other\n * fields, and Remove. On an existing parent it loads the first 50 children\n * (those whose `parentField` names the parent) and links to the list for the\n * rest. The rows are the v-model; the parent form saves them as their own\n * objects after the parent is saved (see `useChildRecords`), never nested in\n * the parent's payload. Each row is checked against the child schema's\n * required properties and the field reports the problems through `validity`.\n *\n * `config.computed` adds read-only columns worked out per row from a formula,\n * `config.totals` adds total rows under the table (a sum over the rows, or a\n * formula over the totals before it), and `config.addFrom` adds rows from\n * another schema's records: picked from a search, or found by a typed or\n * scanned code.\n *\n * ```vue\n * <CnChildRecordsField v-model=\"lines\" register=\"shop\" :config=\"{ schema: 'order-line', parentField: 'order' }\" parentId=\"o-1\" />\n * ```\n */\nexport default {\n\tname: 'CnChildRecordsField',\n\n\tcomponents: {\n\t\t// Lazy: CnFormDialog renders this field, so a static import is a cycle.\n\t\tCnFormDialog: defineAsyncComponent(() => import('../CnFormDialog/CnFormDialog.vue')),\n\t\tCnSearchSelect,\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t\tNcTextField,\n\t},\n\n\tprops: {\n\t\t/** The rows (v-model). Each saved row carries its `id`. */\n\t\tmodelValue: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/**\n\t\t * The relation: `schema` (child schema slug), `parentField` (the child\n\t\t * property pointing at the parent) and optional `columns` (keys shown).\n\t\t *\n\t\t * Optional `computed`: read-only columns, each `{ key, label, formula,\n\t\t * format?, currency?, decimals?, store? }`; `store` writes the value into\n\t\t * the row when the row changes. Optional `totals`: rows under the table,\n\t\t * each `{ key, label, sum? | formula?, format?, currency?, decimals?,\n\t\t * emphasis? }`. Optional `addFrom`: `{ schema, register?, map,\n\t\t * titleField?, secondaryField?, label?, codeField?, codeLabel?,\n\t\t * freeRows? }`, where `map` names per row key the source key to copy\n\t\t * (`@id` for the source's id).\n\t\t *\n\t\t * @type {{schema: string, parentField: string, columns?: string[], computed?: object[], totals?: object[], addFrom?: object}}\n\t\t */\n\t\tconfig: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Register slug the child schema lives in. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Id of the parent being edited; empty when creating (no children to load). */\n\t\tparentId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Visible label of the table. */\n\t\tinputLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Hide the editing controls. */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Validation message shown under the table. */\n\t\terror: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Base URL of the OpenRegister API. */\n\t\tapiBase: {\n\t\t\ttype: String,\n\t\t\tdefault: '/apps/openregister/api',\n\t\t},\n\n\t\t/** Most columns shown in the table. */\n\t\tmaxColumns: {\n\t\t\ttype: Number,\n\t\t\tdefault: 4,\n\t\t},\n\t},\n\n\temits: [\n\t\t/**\n\t\t * The rows changed (v-model).\n\t\t *\n\t\t * @event update:modelValue\n\t\t * @type {object[]}\n\t\t */\n\t\t'update:modelValue',\n\t\t/**\n\t\t * The children as loaded from the server, so the form can tell what changed on save.\n\t\t *\n\t\t * @event loaded\n\t\t * @type {object[]}\n\t\t */\n\t\t'loaded',\n\t\t/**\n\t\t * The current row problems (empty when every row is valid).\n\t\t *\n\t\t * @event validity\n\t\t * @type {Array<{row: number, field: string, label: string}>}\n\t\t */\n\t\t'validity',\n\t\t/**\n\t\t * The totals changed: the value per total key.\n\t\t *\n\t\t * @event totals\n\t\t * @type {{[key: string]: number|null}}\n\t\t */\n\t\t'totals',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t\tchildSchema: null,\n\t\t\ttotal: 0,\n\t\t\tediting: null,\n\t\t\tsourceOptions: [],\n\t\t\tsourceLoading: false,\n\t\t\tcode: '',\n\t\t\taddError: '',\n\t\t\tstatus: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tlist() {\n\t\t\treturn Array.isArray(this.modelValue) ? this.modelValue : []\n\t\t},\n\n\t\t/** The columns: the configured keys, else the child schema's first required properties. */\n\t\tcolumns() {\n\t\t\tconst props = this.childSchema?.properties || {}\n\t\t\tlet keys = Array.isArray(this.config.columns) ? [...this.config.columns] : []\n\t\t\tif (keys.length === 0) {\n\t\t\t\tconst required = Array.isArray(this.childSchema?.required) ? this.childSchema.required : []\n\t\t\t\tkeys = required.filter((k) => k !== this.config.parentField)\n\t\t\t\tif (keys.length === 0) {\n\t\t\t\t\tkeys = Object.keys(props).filter((k) => k !== this.config.parentField)\n\t\t\t\t}\n\t\t\t\tkeys = keys.slice(0, this.maxColumns)\n\t\t\t}\n\t\t\tconst computedKeys = this.computedColumns.map((c) => c.key)\n\t\t\tconst plain = keys.filter((k) => k !== this.config.parentField && !computedKeys.includes(k)).map((key) => {\n\t\t\t\tconst type = props[key]?.type || 'string'\n\t\t\t\tconst inline = ['string', 'number', 'integer'].includes(type) && !props[key]?.enum && !props[key]?.$ref\n\t\t\t\treturn { key, label: props[key]?.title || key, inline, numeric: type === 'number' || type === 'integer' }\n\t\t\t})\n\t\t\tconst computed = this.computedColumns.map((c) => ({\n\t\t\t\tkey: c.key,\n\t\t\t\tlabel: c.label || props[c.key]?.title || c.key,\n\t\t\t\tcomputed: true,\n\t\t\t\tformat: normalizeMetricFormat(c) || { style: 'decimal', decimals: 2 },\n\t\t\t}))\n\t\t\treturn [...plain, ...computed]\n\t\t},\n\n\t\t/** The computed columns as configured. */\n\t\tcomputedColumns() {\n\t\t\treturn Array.isArray(this.config.computed) ? this.config.computed.filter((c) => c && c.key) : []\n\t\t},\n\n\t\t/** The totals per key. */\n\t\ttotals() {\n\t\t\treturn computeTotals(this.list, this.config.totals, this.computedColumns)\n\t\t},\n\n\t\t/** The total rows, each with its formatted text. */\n\t\ttotalRows() {\n\t\t\tconst totals = Array.isArray(this.config.totals) ? this.config.totals.filter((x) => x && x.key) : []\n\t\t\treturn totals.map((x) => ({\n\t\t\t\tkey: x.key,\n\t\t\t\tlabel: x.label || x.key,\n\t\t\t\temphasis: !!x.emphasis,\n\t\t\t\ttext: formatMetricValue(this.totals[x.key], normalizeMetricFormat(x) || { style: 'decimal', decimals: 2 }),\n\t\t\t}))\n\t\t},\n\n\t\t/** The add-from source, or null. */\n\t\taddFrom() {\n\t\t\tconst source = this.config.addFrom\n\t\t\treturn source && typeof source === 'object' && source.schema ? source : null\n\t\t},\n\n\t\t/** Whether a free, empty row can be added. */\n\t\tfreeRows() {\n\t\t\treturn !this.addFrom || this.addFrom.freeRows !== false\n\t\t},\n\n\t\taddFromLabel() {\n\t\t\treturn this.addFrom?.label || t('nextcloud-vue', 'Add from a list')\n\t\t},\n\n\t\tcodeLabel() {\n\t\t\treturn this.addFrom?.codeLabel || t('nextcloud-vue', 'Scan or type a code')\n\t\t},\n\n\t\tproblems() {\n\t\t\treturn validateChildRows(this.list, this.childSchema, this.config.parentField)\n\t\t},\n\n\t\tproblemText() {\n\t\t\treturn describeRowProblem(this.problems)\n\t\t},\n\n\t\tmoreLabel() {\n\t\t\treturn t('nextcloud-vue', 'Showing {shown} of {total} rows. Edit the rest on the list page.', { shown: this.list.length, total: this.total })\n\t\t},\n\n\t\tlistUrl() {\n\t\t\treturn this.config.listUrl || ''\n\t\t},\n\t},\n\n\twatch: {\n\t\tproblems: {\n\t\t\timmediate: true,\n\t\t\thandler(problems) {\n\t\t\t\tthis.$emit('validity', problems)\n\t\t\t},\n\t\t},\n\n\t\tparentId() {\n\t\t\tthis.load()\n\t\t},\n\n\t\ttotals: {\n\t\t\timmediate: true,\n\t\t\thandler(totals) {\n\t\t\t\tif (Object.keys(totals).length > 0) {\n\t\t\t\t\tthis.$emit('totals', totals)\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t},\n\n\tcreated() {\n\t\tthis.load()\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/** Load the child schema and, for an existing parent, its children. */\n\t\tasync load() {\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(generateUrl(`${this.apiBase}/schemas/${encodeURIComponent(this.config.schema)}`))\n\t\t\t\tthis.childSchema = response?.data || null\n\t\t\t} catch {\n\t\t\t\tthis.childSchema = null\n\t\t\t}\n\t\t\tif (this.parentId !== '' && this.parentId !== null && this.parentId !== undefined) {\n\t\t\t\ttry {\n\t\t\t\t\tconst { rows, total } = await useChildRecords({ apiBase: this.apiBase }).load({\n\t\t\t\t\t\tregister: this.register,\n\t\t\t\t\t\tschema: this.config.schema,\n\t\t\t\t\t\tparentField: this.config.parentField,\n\t\t\t\t\t\tparentId: this.parentId,\n\t\t\t\t\t})\n\t\t\t\t\tthis.total = total\n\t\t\t\t\tthis.$emit('loaded', rows.map((r) => ({ ...r })))\n\t\t\t\t\tthis.$emit('update:modelValue', rows)\n\t\t\t\t} catch {\n\t\t\t\t\tthis.total = 0\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.loading = false\n\t\t},\n\n\t\t/**\n\t\t * The text of a cell.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @param {{key: string}} col The column.\n\t\t * @return {string} The text.\n\t\t */\n\t\tcellText(row, col) {\n\t\t\tconst value = row?.[col.key]\n\t\t\tif (value === undefined || value === null) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\treturn typeof value === 'object' ? JSON.stringify(value) : String(value)\n\t\t},\n\n\t\t/**\n\t\t * Write one cell.\n\t\t *\n\t\t * @param {number} index The row index.\n\t\t * @param {{key: string, numeric: boolean}} col The column.\n\t\t * @param {string} value The typed value.\n\t\t */\n\t\tsetCell(index, col, value) {\n\t\t\tconst next = this.list.map((r, i) => (i === index ? this.withComputed({ ...r, [col.key]: col.numeric && value !== '' ? Number(value) : value }) : r))\n\t\t\tthis.$emit('update:modelValue', next)\n\t\t},\n\n\t\t/**\n\t\t * The row with its stored computed columns written in.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @return {object} The row.\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-1\n\t\t */\n\t\twithComputed(row) {\n\t\t\treturn storeComputed(row, this.computedColumns)\n\t\t},\n\n\t\t/**\n\t\t * The text of a computed cell.\n\t\t *\n\t\t * @param {object} row The row.\n\t\t * @param {{key: string, format: object}} col The computed column.\n\t\t * @return {string} The text.\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-1\n\t\t */\n\t\tcomputedText(row, col) {\n\t\t\treturn formatMetricValue(computeRow(row, this.computedColumns)[col.key], col.format)\n\t\t},\n\n\t\t/**\n\t\t * The URL of the add-from source's objects.\n\t\t *\n\t\t * @param {URLSearchParams} params The query.\n\t\t * @return {string} The URL.\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-3\n\t\t */\n\t\tsourceUrl(params) {\n\t\t\tconst register = this.addFrom.register || this.register\n\t\t\treturn generateUrl(`${this.apiBase}/objects/${register}/${this.addFrom.schema}?${params.toString()}`)\n\t\t},\n\n\t\t/**\n\t\t * Search the add-from source.\n\t\t *\n\t\t * @param {string} query The typed text.\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-3\n\t\t */\n\t\tasync searchSource(query) {\n\t\t\tif (!query) {\n\t\t\t\tthis.sourceOptions = []\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.sourceLoading = true\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(this.sourceUrl(new URLSearchParams({ _search: query, _limit: '20' })))\n\t\t\t\tconst results = Array.isArray(response?.data?.results) ? response.data.results : []\n\t\t\t\tconst titleField = this.addFrom.titleField || 'name'\n\t\t\t\tthis.sourceOptions = results.map((source) => ({\n\t\t\t\t\tid: String(source.id ?? source.uuid),\n\t\t\t\t\tlabel: String(source[titleField] ?? source.id ?? ''),\n\t\t\t\t\tsecondary: this.addFrom.secondaryField ? String(source[this.addFrom.secondaryField] ?? '') : '',\n\t\t\t\t\tsource,\n\t\t\t\t}))\n\t\t\t} catch {\n\t\t\t\tthis.sourceOptions = []\n\t\t\t}\n\t\t\tthis.sourceLoading = false\n\t\t},\n\n\t\t/**\n\t\t * A source record was picked: add a row from it.\n\t\t *\n\t\t * @param {string|null} id The picked option's id.\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-3\n\t\t */\n\t\taddFromPicked(id) {\n\t\t\tconst option = this.sourceOptions.find((o) => o.id === id)\n\t\t\tif (option) {\n\t\t\t\tthis.addSourceRow(option.source)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Find the source record with the typed or scanned code and add a row from it.\n\t\t *\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-3\n\t\t */\n\t\tasync addByCode() {\n\t\t\tconst code = String(this.code || '').trim()\n\t\t\tif (code === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.addError = ''\n\t\t\ttry {\n\t\t\t\tconst response = await axios.get(this.sourceUrl(new URLSearchParams({ [this.addFrom.codeField]: code, _limit: '2' })))\n\t\t\t\tconst results = Array.isArray(response?.data?.results) ? response.data.results : []\n\t\t\t\tif (results.length === 1) {\n\t\t\t\t\tthis.addSourceRow(results[0])\n\t\t\t\t\tthis.code = ''\n\t\t\t\t} else if (results.length === 0) {\n\t\t\t\t\tthis.addError = t('nextcloud-vue', 'No record has the code {code}.', { code })\n\t\t\t\t} else {\n\t\t\t\t\tthis.addError = t('nextcloud-vue', 'More than one record has the code {code}.', { code })\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tthis.addError = t('nextcloud-vue', 'The code {code} could not be looked up.', { code })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Append a row made from a source record.\n\t\t *\n\t\t * @param {object} source The source record.\n\t\t * @spec openspec/changes/child-records-totals/tasks.md#task-3\n\t\t */\n\t\taddSourceRow(source) {\n\t\t\tthis.addError = ''\n\t\t\tconst row = this.withComputed(rowFromSource(source, this.addFrom.map))\n\t\t\tthis.$emit('update:modelValue', [...this.list, row])\n\t\t\tconst name = source?.[this.addFrom.titleField || 'name'] ?? ''\n\t\t\tthis.status = t('nextcloud-vue', 'Added {name}.', { name: String(name) })\n\t\t},\n\n\t\t/** Append an empty row. */\n\t\taddRow() {\n\t\t\tthis.$emit('update:modelValue', [...this.list, {}])\n\t\t},\n\n\t\t/**\n\t\t * Remove a row.\n\t\t *\n\t\t * @param {number} index The row index.\n\t\t */\n\t\tremoveRow(index) {\n\t\t\tthis.$emit('update:modelValue', this.list.filter((_, i) => i !== index))\n\t\t},\n\n\t\t/**\n\t\t * The row dialog was confirmed: take its values.\n\t\t *\n\t\t * @param {object} values The row values.\n\t\t */\n\t\tonRowConfirm(values) {\n\t\t\tconst index = this.editing\n\t\t\tthis.$emit('update:modelValue', this.list.map((r, i) => (i === index ? this.withComputed({ ...r, ...values }) : r)))\n\t\t\tthis.editing = null\n\t\t},\n\t},\n}\n\n</script>\n\n<style scoped>\n.cn-child-records-field__head {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmargin-bottom: 8px;\n}\n\n.cn-child-records-field__label {\n\tfont-weight: 600;\n}\n\n.cn-child-records-field__head {\n\tflex-wrap: wrap;\n\tgap: 8px;\n}\n\n.cn-child-records-field__adds,\n.cn-child-records-field__code {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: flex-end;\n\tgap: 8px;\n}\n\n.cn-child-records-field__pick {\n\tmin-width: 240px;\n}\n\n.cn-child-records-field__table th.cn-child-records-field__num,\n.cn-child-records-field__table td.cn-child-records-field__num {\n\ttext-align: end;\n\tfont-variant-numeric: tabular-nums;\n}\n\n.cn-child-records-field__table tfoot th,\n.cn-child-records-field__table tfoot td {\n\tborder-bottom: none;\n}\n\n.cn-child-records-field__table .cn-child-records-field__total-label {\n\ttext-align: end;\n\tfont-weight: normal;\n}\n\n.cn-child-records-field__total--emphasis th,\n.cn-child-records-field__total--emphasis td {\n\tfont-weight: 600;\n\tborder-top: 1px solid var(--color-border);\n}\n\n.cn-child-records-field__table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n}\n\n.cn-child-records-field__table th,\n.cn-child-records-field__table td {\n\tpadding: 4px 8px;\n\ttext-align: start;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-child-records-field__empty,\n.cn-child-records-field__more {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-child-records-field__actions {\n\twhite-space: nowrap;\n}\n\n.cn-child-records-field__error {\n\tcolor: var(--color-error);\n\tmargin: 8px 0 0;\n}\n\n.cn-child-records-field__sr {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_toDisplayString","_createBlock","_createVNode","_Fragment","_renderList","_normalizeClass"],"mappings":";;AASM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAM,GAAA;AACX,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAAK,GAAA;AACT,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAAyB,GAAA;;;AACf,EAAA,KAAK,EAAC,8BAAY;;;;AAkC3B,EAAA,KAAG,EAAA,+BAAA;;;;AAST,EAAA,KAAA,EAAA,KAAA;;AACD,MAAA,UAAA,GAAA,EAAA,KAAA,EA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AAE,eAAA,CADC,KAAK,CAAA,MAAA,CAAA,EAAA,CAAA,YAAA;KAED,KAAK,CAAA,KAAA,GAAG,QAAA,CAAA,IAAA,CAAA,MAAA;AAAhB,SAAAH,SAAA,EAAA,EAAAC,kBAAA,CAOG,KAPH,WAOG,EAAA;WANY,QAAA,CAAA,OAAA;4BACdA,kBAAS,CAAA,GAAA,EAAA;;AAAL,gBAAA,IAAI,EAAC,QAAA,CAAA,OAAA;iCAAA,QAAA,CAAA,SAAA,CAAA,EAAA,CAAA,oBAAA,WAAA,CAAA;4BAEVA,kBAEE,CAAAK,QAAA,EAAA,EAAA,GAAA,EAAA,CAAA,EAAA,EAAA;gDADE,QAAS,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;;;KAGL,MAAI,CAAA,KAAA,IAAI,QAAY,CAAA,WAAA,IAAI,KAAK,CAAA,QAAA;AAArC,SAAAN,SAAA,EAAA,EAAAC,kBAAA,CAEG,KAFH,WAEG,EAAAE,eAAA,CADA,YAAK,IAAI,QAAA,CAAA,WAAQ,IAAA,KAAA,CAAA,QAAA,CAAA,EAAA,CAAA,YAAA;;AAGd,IAAA,CAAA,KAAA,CAAA,OAAO,aAAa,KAAW,CAAA,WAAA;sBADrCC;;AAEC,UAAA,MAAM,EAAE,KAAW,CAAA,WAAA;UACnB,IAAI,EAAE,QAAI,CAAA,IAAA,CAAC,KAAO,CAAA,OAAA,CAAA;UAClB,aAAa,EAAA,CAAI,cAAM,WAAC,CAAA;UACxB,WAAE,EAAA,QAAA,CAAA,CAAA,CAAA,eAAA,EAAA,cAAA,EAAA,EAAA,CAAA,EAAA,KAAA,CAAA,OAAA,GAAA,CAAA,EAAA,CAAA;;;;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ import script from './CnChoiceMatrix.vue2.js';
2
+ import { render } from './CnChoiceMatrix.vue3.js';
3
+
4
+ script.render = render;
5
+ script.__scopeId = "data-v-74e66abe";
6
+ const __sfc_main = script;
7
+
8
+ export { __sfc_main as default };
9
+ //# sourceMappingURL=CnChoiceMatrix.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CnChoiceMatrix.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}