@conduction/nextcloud-vue 2.56.0-beta.48 → 2.56.0-beta.49

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 (72) hide show
  1. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +46 -28
  2. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
  3. package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +17 -10
  4. package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
  5. package/dist/esm/components/CnBrandBar/CnBrandBar.vue2.js.map +1 -1
  6. package/dist/esm/components/CnBrandBar/CnBrandBar.vue3.js.map +1 -1
  7. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +56 -16
  8. package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
  9. package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
  10. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js +9 -0
  11. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js.map +1 -0
  12. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js +240 -0
  13. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js.map +1 -0
  14. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js +65 -0
  15. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js.map +1 -0
  16. package/dist/esm/components/CnDeviceFramesWidget/index.js +30 -0
  17. package/dist/esm/components/CnDeviceFramesWidget/index.js.map +1 -0
  18. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  19. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +17 -1
  20. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  21. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +30 -31
  22. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  23. package/dist/esm/components/CnHeaderSearchLabel/CnHeaderSearchLabel.vue.js +6 -0
  24. package/dist/esm/components/CnHeaderSearchLabel/CnHeaderSearchLabel.vue.js.map +1 -0
  25. package/dist/esm/components/CnHeaderSearchLabel/CnHeaderSearchLabel.vue2.js +90 -0
  26. package/dist/esm/components/CnHeaderSearchLabel/CnHeaderSearchLabel.vue2.js.map +1 -0
  27. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
  28. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +48 -1
  29. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
  30. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +20 -2
  31. package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
  32. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue.js +1 -1
  33. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js +230 -25
  34. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js.map +1 -1
  35. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js +447 -221
  36. package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js.map +1 -1
  37. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  38. package/dist/esm/components/CnWidgetGrid/registerDashboardWidgets.js.map +1 -1
  39. package/dist/esm/index.js +1 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/l10n/en.json.js +18 -1
  42. package/dist/esm/l10n/en.json.js.map +1 -1
  43. package/dist/esm/l10n/nl.json.js +18 -1
  44. package/dist/esm/l10n/nl.json.js.map +1 -1
  45. package/dist/esm/library-style.js +1 -1
  46. package/dist/esm/nextcloud-vue.css +356 -114
  47. package/dist/esm/utils/libraryWidgetKeys.js +1 -0
  48. package/dist/esm/utils/libraryWidgetKeys.js.map +1 -1
  49. package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
  50. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  51. package/dist/nextcloud-vue.cjs.js +6964 -5943
  52. package/dist/nextcloud-vue.cjs.js.map +2 -2
  53. package/dist/nextcloud-vue.css +356 -114
  54. package/l10n/en.json +18 -1
  55. package/l10n/nl.json +18 -1
  56. package/package.json +1 -1
  57. package/src/components/CnAppRoot/CnAppRoot.vue +20 -0
  58. package/src/components/CnBrandBar/CnBrandBar.vue +5 -4
  59. package/src/components/CnDetailPage/CnDetailPage.vue +55 -15
  60. package/src/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue +360 -0
  61. package/src/components/CnDeviceFramesWidget/index.js +29 -0
  62. package/src/components/CnFactsWidget/CnFactsWidget.vue +46 -2
  63. package/src/components/CnHeaderSearchLabel/CnHeaderSearchLabel.vue +107 -0
  64. package/src/components/CnRecordListWidget/CnRecordListWidget.vue +81 -1
  65. package/src/components/CnRegisterMapping/CnRegisterMapping.md +10 -0
  66. package/src/components/CnRegisterMapping/CnRegisterMapping.vue +511 -28
  67. package/src/components/CnWidgetGrid/registerDashboardWidgets.js +1 -0
  68. package/src/components/index.js +1 -0
  69. package/src/index.js +1 -0
  70. package/src/schemas/app-manifest-v2.schema.json +6 -1
  71. package/src/utils/libraryWidgetKeys.js +1 -0
  72. package/src/utils/validateManifestV2.compiled.js +2 -2
@@ -1,48 +1,97 @@
1
- import { resolveComponent, openBlock, createBlock, createSlots, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, withDirectives, createVNode, Transition, vShow } from 'vue';
1
+ import { resolveComponent, openBlock, createBlock, createSlots, withCtx, createElementBlock, createElementVNode, toDisplayString, createVNode, createCommentVNode, Fragment, renderList, createTextVNode, normalizeClass, renderSlot, withDirectives, Transition, vShow } from 'vue';
2
2
 
3
3
  const _hoisted_1 = {
4
4
  key: 0,
5
- class: "cn-register-mapping"
5
+ class: "cn-register-mapping cn-register-mapping--board",
6
+ "data-testid": "cn-register-mapping-board"
6
7
  };
7
8
  const _hoisted_2 = {
9
+ class: "cn-register-mapping__board-group",
10
+ "data-testid": "cn-register-mapping-board-group"
11
+ };
12
+ const _hoisted_3 = { class: "cn-register-mapping__board-head" };
13
+ const _hoisted_4 = { class: "cn-register-mapping__board-title" };
14
+ const _hoisted_5 = {
15
+ key: 0,
16
+ class: "cn-register-mapping__group-description"
17
+ };
18
+ const _hoisted_6 = { class: "cn-register-mapping__register-select cn-register-mapping__board-select" };
19
+ const _hoisted_7 = {
20
+ key: 1,
21
+ class: "cn-register-mapping__board-table"
22
+ };
23
+ const _hoisted_8 = { scope: "col" };
24
+ const _hoisted_9 = { scope: "col" };
25
+ const _hoisted_10 = { "data-testid": "cn-register-mapping-board-row" };
26
+ const _hoisted_11 = ["aria-expanded", "aria-label", "onClick"];
27
+ const _hoisted_12 = {
28
+ key: 0,
29
+ class: "cn-register-mapping__board-detail"
30
+ };
31
+ const _hoisted_13 = { colspan: "2" };
32
+ const _hoisted_14 = {
33
+ key: 0,
34
+ class: "cn-register-mapping__type-description"
35
+ };
36
+ const _hoisted_15 = {
37
+ key: 2,
38
+ class: "cn-register-mapping__board-more",
39
+ "data-testid": "cn-register-mapping-board-more"
40
+ };
41
+ const _hoisted_16 = {
42
+ key: 0,
43
+ class: "cn-register-mapping__board-groups"
44
+ };
45
+ const _hoisted_17 = ["onClick"];
46
+ const _hoisted_18 = { class: "cn-register-mapping__board-group-name" };
47
+ const _hoisted_19 = { class: "cn-register-mapping__board-group-count" };
48
+ const _hoisted_20 = {
49
+ key: 1,
50
+ class: "cn-register-mapping__board-save"
51
+ };
52
+ const _hoisted_21 = {
53
+ key: 1,
54
+ class: "cn-register-mapping"
55
+ };
56
+ const _hoisted_22 = {
8
57
  key: 0,
9
58
  class: "cn-register-mapping__group-heading"
10
59
  };
11
- const _hoisted_3 = ["aria-expanded", "aria-controls", "onClick"];
12
- const _hoisted_4 = {
60
+ const _hoisted_23 = ["aria-expanded", "aria-controls", "onClick"];
61
+ const _hoisted_24 = {
13
62
  class: "cn-register-mapping__group-chevron",
14
63
  "aria-hidden": "true"
15
64
  };
16
- const _hoisted_5 = { class: "cn-register-mapping__group-header" };
17
- const _hoisted_6 = { class: "cn-register-mapping__group-title" };
18
- const _hoisted_7 = {
65
+ const _hoisted_25 = { class: "cn-register-mapping__group-header" };
66
+ const _hoisted_26 = { class: "cn-register-mapping__group-title" };
67
+ const _hoisted_27 = {
19
68
  class: "cn-register-mapping__group-status",
20
69
  "data-testid": "cn-register-mapping-group-count"
21
70
  };
22
- const _hoisted_8 = { class: "cn-register-mapping__group-header" };
23
- const _hoisted_9 = { class: "cn-register-mapping__group-title" };
24
- const _hoisted_10 = { class: "cn-register-mapping__group-status" };
25
- const _hoisted_11 = ["id"];
26
- const _hoisted_12 = {
71
+ const _hoisted_28 = { class: "cn-register-mapping__group-header" };
72
+ const _hoisted_29 = { class: "cn-register-mapping__group-title" };
73
+ const _hoisted_30 = { class: "cn-register-mapping__group-status" };
74
+ const _hoisted_31 = ["id"];
75
+ const _hoisted_32 = {
27
76
  key: 0,
28
77
  class: "cn-register-mapping__group-description"
29
78
  };
30
- const _hoisted_13 = { class: "cn-register-mapping__register-select" };
31
- const _hoisted_14 = {
79
+ const _hoisted_33 = { class: "cn-register-mapping__register-select" };
80
+ const _hoisted_34 = {
32
81
  key: 1,
33
82
  class: "cn-register-mapping__type-list"
34
83
  };
35
- const _hoisted_15 = { class: "cn-register-mapping__type-list-header" };
36
- const _hoisted_16 = ["onClick"];
37
- const _hoisted_17 = { class: "cn-register-mapping__type-name" };
38
- const _hoisted_18 = { class: "cn-register-mapping__type-schema" };
39
- const _hoisted_19 = { class: "cn-register-mapping__type-status" };
40
- const _hoisted_20 = { class: "cn-register-mapping__type-chevron" };
41
- const _hoisted_21 = {
84
+ const _hoisted_35 = { class: "cn-register-mapping__type-list-header" };
85
+ const _hoisted_36 = ["onClick"];
86
+ const _hoisted_37 = { class: "cn-register-mapping__type-name" };
87
+ const _hoisted_38 = { class: "cn-register-mapping__type-schema" };
88
+ const _hoisted_39 = { class: "cn-register-mapping__type-status" };
89
+ const _hoisted_40 = { class: "cn-register-mapping__type-chevron" };
90
+ const _hoisted_41 = {
42
91
  key: 0,
43
92
  class: "cn-register-mapping__type-detail"
44
93
  };
45
- const _hoisted_22 = {
94
+ const _hoisted_42 = {
46
95
  key: 0,
47
96
  class: "cn-register-mapping__type-description"
48
97
  };
@@ -52,10 +101,13 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
52
101
  const _component_ContentSave = resolveComponent("ContentSave");
53
102
  const _component_NcButton = resolveComponent("NcButton");
54
103
  const _component_Refresh = resolveComponent("Refresh");
55
- const _component_ChevronUp = resolveComponent("ChevronUp");
56
- const _component_ChevronDown = resolveComponent("ChevronDown");
104
+ const _component_CnStatusBadge = resolveComponent("CnStatusBadge");
57
105
  const _component_NcSelect = resolveComponent("NcSelect");
106
+ const _component_CheckCircle = resolveComponent("CheckCircle");
58
107
  const _component_NcNoteCard = resolveComponent("NcNoteCard");
108
+ const _component_ChevronRight = resolveComponent("ChevronRight");
109
+ const _component_ChevronUp = resolveComponent("ChevronUp");
110
+ const _component_ChevronDown = resolveComponent("ChevronDown");
59
111
  const _component_CnSettingsSection = resolveComponent("CnSettingsSection");
60
112
 
61
113
  return (openBlock(), createBlock(_component_CnSettingsSection, {
@@ -68,229 +120,403 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
68
120
  errorMessage: $data.registersError || '',
69
121
  onRetry: $options.loadRegisters
70
122
  }, createSlots({
71
- actions: withCtx(() => [
72
- ($props.showSaveButton)
73
- ? (openBlock(), createBlock(_component_NcButton, {
74
- key: 0,
75
- variant: "primary",
76
- disabled: $props.saving || !$options.hasChanges,
77
- onClick: $options.handleSave
78
- }, {
79
- icon: withCtx(() => [
80
- ($props.saving)
81
- ? (openBlock(), createBlock(_component_NcLoadingIcon, {
82
- key: 0,
83
- size: 20
84
- }))
85
- : (openBlock(), createBlock(_component_ContentSave, {
86
- key: 1,
87
- size: 20
88
- }))
89
- ]),
90
- default: withCtx(() => [
91
- createTextVNode(" " + toDisplayString($props.saving ? $options.t('nextcloud-vue', 'Saving…') : $props.saveButtonText), 1 /* TEXT */)
92
- ]),
93
- _: 1 /* STABLE */
94
- }, 8 /* PROPS */, ["disabled", "onClick"]))
95
- : createCommentVNode("v-if", true),
96
- ($props.showReimportButton)
97
- ? (openBlock(), createBlock(_component_NcButton, {
98
- key: 1,
99
- variant: "secondary",
100
- disabled: $props.reimporting,
101
- onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('reimport')))
102
- }, {
103
- icon: withCtx(() => [
104
- ($props.reimporting)
105
- ? (openBlock(), createBlock(_component_NcLoadingIcon, {
106
- key: 0,
107
- size: 20
123
+ default: withCtx(() => [
124
+ ($options.isBoardLook && !$data.registersLoading && !$data.registersError)
125
+ ? (openBlock(), createElementBlock("div", _hoisted_1, [
126
+ createElementVNode("div", _hoisted_2, [
127
+ createElementVNode("div", _hoisted_3, [
128
+ createElementVNode("h3", _hoisted_4, toDisplayString($options.activeGroup.name), 1 /* TEXT */),
129
+ createVNode(_component_CnStatusBadge, {
130
+ label: $options.groupStatusLabel($data.activeGroupIdx, true),
131
+ variant: $options.groupStatusVariant($data.activeGroupIdx),
132
+ "data-testid": "cn-register-mapping-board-status"
133
+ }, null, 8 /* PROPS */, ["label", "variant"])
134
+ ]),
135
+ ($options.activeGroup.description)
136
+ ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString($options.activeGroup.description), 1 /* TEXT */))
137
+ : createCommentVNode("v-if", true),
138
+ createElementVNode("div", _hoisted_6, [
139
+ createVNode(_component_NcSelect, {
140
+ modelValue: $options.selectedRegister($data.activeGroupIdx),
141
+ options: $options.registerSelectOptions,
142
+ placeholder: $props.labels.selectRegister,
143
+ inputLabel: $props.labels.register,
144
+ label: "label",
145
+ trackBy: "value",
146
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ($options.handleRegisterChange($data.activeGroupIdx, $event)))
147
+ }, null, 8 /* PROPS */, ["modelValue", "options", "placeholder", "inputLabel"])
148
+ ]),
149
+ ($options.selectedRegister($data.activeGroupIdx))
150
+ ? (openBlock(), createElementBlock("table", _hoisted_7, [
151
+ createElementVNode("thead", null, [
152
+ createElementVNode("tr", null, [
153
+ createElementVNode("th", _hoisted_8, toDisplayString($options.t('nextcloud-vue', 'Object type')), 1 /* TEXT */),
154
+ createElementVNode("th", _hoisted_9, toDisplayString($props.labels.schema), 1 /* TEXT */)
155
+ ])
156
+ ]),
157
+ createElementVNode("tbody", null, [
158
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.boardVisibleTypes, (type) => {
159
+ return (openBlock(), createElementBlock(Fragment, {
160
+ key: type.slug + '-board'
161
+ }, [
162
+ createElementVNode("tr", _hoisted_10, [
163
+ createElementVNode("td", null, toDisplayString(type.label), 1 /* TEXT */),
164
+ createElementVNode("td", null, [
165
+ createElementVNode("button", {
166
+ type: "button",
167
+ class: "cn-register-mapping__board-schema",
168
+ "aria-expanded": String($options.isExpanded($data.activeGroupIdx, type.slug)),
169
+ "aria-label": $options.t('nextcloud-vue', 'Change the schema for {type}', { type: type.label }),
170
+ onClick: $event => ($options.toggleExpand($data.activeGroupIdx, type.slug))
171
+ }, [
172
+ ($options.schemaValue($data.activeGroupIdx, type))
173
+ ? (openBlock(), createBlock(_component_CheckCircle, {
174
+ key: 0,
175
+ class: "cn-register-mapping__board-check",
176
+ size: 16
177
+ }))
178
+ : createCommentVNode("v-if", true),
179
+ createTextVNode(" " + toDisplayString($options.schemaLabel($data.activeGroupIdx, type) || $options.t('nextcloud-vue', 'Not set')), 1 /* TEXT */)
180
+ ], 8 /* PROPS */, _hoisted_11)
181
+ ])
182
+ ]),
183
+ ($options.isExpanded($data.activeGroupIdx, type.slug))
184
+ ? (openBlock(), createElementBlock("tr", _hoisted_12, [
185
+ createElementVNode("td", _hoisted_13, [
186
+ (type.description)
187
+ ? (openBlock(), createElementBlock("p", _hoisted_14, toDisplayString(type.description), 1 /* TEXT */))
188
+ : createCommentVNode("v-if", true),
189
+ createVNode(_component_NcSelect, {
190
+ modelValue: $options.selectedSchema($data.activeGroupIdx, type),
191
+ options: $options.schemaSelectOptions($data.activeGroupIdx),
192
+ placeholder: $props.labels.selectSchema,
193
+ inputLabel: $props.labels.schema,
194
+ label: "label",
195
+ trackBy: "value",
196
+ "onUpdate:modelValue": $event => ($options.handleSchemaChange($data.activeGroupIdx, type, $event))
197
+ }, null, 8 /* PROPS */, ["modelValue", "options", "placeholder", "inputLabel", "onUpdate:modelValue"])
198
+ ])
199
+ ]))
200
+ : createCommentVNode("v-if", true)
201
+ ], 64 /* STABLE_FRAGMENT */))
202
+ }), 128 /* KEYED_FRAGMENT */))
203
+ ])
204
+ ]))
205
+ : createCommentVNode("v-if", true),
206
+ ($options.selectedRegister($data.activeGroupIdx) && $options.boardHiddenTypes.length > 0)
207
+ ? (openBlock(), createElementBlock("p", _hoisted_15, [
208
+ createTextVNode(toDisplayString($options.boardHiddenSummary) + " ", 1 /* TEXT */),
209
+ createElementVNode("button", {
210
+ type: "button",
211
+ class: "cn-register-mapping__board-link",
212
+ onClick: _cache[2] || (_cache[2] = $event => ($data.showAllTypes = true))
213
+ }, toDisplayString($options.t('nextcloud-vue', 'Show all types')), 1 /* TEXT */)
214
+ ]))
215
+ : createCommentVNode("v-if", true),
216
+ (!$options.selectedRegister($data.activeGroupIdx))
217
+ ? (openBlock(), createBlock(_component_NcNoteCard, {
218
+ key: 3,
219
+ type: "info"
220
+ }, {
221
+ default: withCtx(() => [
222
+ createTextVNode(toDisplayString($props.labels.selectRegister), 1 /* TEXT */)
223
+ ]),
224
+ _: 1 /* STABLE */
108
225
  }))
109
- : (openBlock(), createBlock(_component_Refresh, {
110
- key: 1,
111
- size: 20
226
+ : createCommentVNode("v-if", true),
227
+ ($options.selectedRegister($data.activeGroupIdx) && $options.schemaSelectOptions($data.activeGroupIdx).length === 0)
228
+ ? (openBlock(), createBlock(_component_NcNoteCard, {
229
+ key: 4,
230
+ type: "warning"
231
+ }, {
232
+ default: withCtx(() => [
233
+ createTextVNode(toDisplayString($props.labels.noSchemas), 1 /* TEXT */)
234
+ ]),
235
+ _: 1 /* STABLE */
112
236
  }))
237
+ : createCommentVNode("v-if", true)
113
238
  ]),
114
- default: withCtx(() => [
115
- createTextVNode(" " + toDisplayString($props.reimporting ? $options.t('nextcloud-vue', 'Importing…') : $props.reimportButtonText), 1 /* TEXT */)
116
- ]),
117
- _: 1 /* STABLE */
118
- }, 8 /* PROPS */, ["disabled"]))
119
- : createCommentVNode("v-if", true),
120
- renderSlot(_ctx.$slots, "actions")
121
- ]),
122
- default: withCtx(() => [
123
- (!$data.registersLoading && !$data.registersError)
124
- ? (openBlock(), createElementBlock("div", _hoisted_1, [
125
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.groups, (group, groupIdx) => {
126
- return (openBlock(), createElementBlock("div", {
127
- key: groupIdx,
128
- class: normalizeClass(["cn-register-mapping__group", { 'cn-register-mapping__group--collapsed': !$options.isGroupOpen(groupIdx) }]),
129
- "data-testid": "cn-register-mapping-group"
130
- }, [
131
- ($options.groupsCollapsible)
132
- ? (openBlock(), createElementBlock("h4", _hoisted_2, [
239
+ ($options.boardOtherGroups.length > 0)
240
+ ? (openBlock(), createElementBlock("ul", _hoisted_16, [
241
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.boardOtherGroups, (item) => {
242
+ return (openBlock(), createElementBlock("li", {
243
+ key: item.idx
244
+ }, [
133
245
  createElementVNode("button", {
134
246
  type: "button",
135
- class: "cn-register-mapping__group-toggle",
136
- "aria-expanded": String($options.isGroupOpen(groupIdx)),
137
- "aria-controls": $options.groupBodyId(groupIdx),
138
- "data-testid": "cn-register-mapping-group-toggle",
139
- onClick: $event => ($options.toggleGroup(groupIdx))
247
+ class: "cn-register-mapping__board-group-row",
248
+ "data-testid": "cn-register-mapping-board-group-row",
249
+ onClick: $event => ($options.openBoardGroup(item.idx))
140
250
  }, [
141
- createElementVNode("span", _hoisted_4, [
142
- ($options.isGroupOpen(groupIdx))
143
- ? (openBlock(), createBlock(_component_ChevronUp, {
144
- key: 0,
145
- size: 20
146
- }))
147
- : (openBlock(), createBlock(_component_ChevronDown, {
148
- key: 1,
149
- size: 20
150
- }))
151
- ]),
152
- renderSlot(_ctx.$slots, "group-header", {
153
- group: group,
154
- configuredCount: $options.configuredCount(groupIdx),
155
- totalCount: group.types.length
156
- }, () => [
157
- createElementVNode("span", _hoisted_5, [
158
- createElementVNode("span", _hoisted_6, toDisplayString(group.name), 1 /* TEXT */),
159
- createElementVNode("span", _hoisted_7, toDisplayString($options.configuredCount(groupIdx)) + "/" + toDisplayString(group.types.length) + " " + toDisplayString($props.labels.partiallyConfigured), 1 /* TEXT */)
160
- ])
161
- ])
162
- ], 8 /* PROPS */, _hoisted_3)
251
+ createVNode(_component_ChevronRight, {
252
+ size: 18,
253
+ class: "cn-register-mapping__board-chevron"
254
+ }),
255
+ createElementVNode("strong", _hoisted_18, toDisplayString(item.group.name), 1 /* TEXT */),
256
+ createElementVNode("span", _hoisted_19, toDisplayString($options.n('nextcloud-vue', '%n type', '%n types', item.group.types.length)), 1 /* TEXT */),
257
+ createVNode(_component_CnStatusBadge, {
258
+ label: $options.groupStatusLabel(item.idx, false),
259
+ variant: $options.groupStatusVariant(item.idx)
260
+ }, null, 8 /* PROPS */, ["label", "variant"])
261
+ ], 8 /* PROPS */, _hoisted_17)
163
262
  ]))
164
- : renderSlot(_ctx.$slots, "group-header", {
165
- group: group,
166
- configuredCount: $options.configuredCount(groupIdx),
167
- totalCount: group.types.length
168
- }, () => [
169
- createElementVNode("div", _hoisted_8, [
170
- createElementVNode("h4", _hoisted_9, toDisplayString(group.name), 1 /* TEXT */),
171
- createElementVNode("span", _hoisted_10, toDisplayString($options.configuredCount(groupIdx)) + "/" + toDisplayString(group.types.length) + " " + toDisplayString($props.labels.partiallyConfigured), 1 /* TEXT */)
172
- ])
173
- ], undefined, 1),
174
- withDirectives(createElementVNode("div", {
175
- id: $options.groupBodyId(groupIdx),
176
- class: "cn-register-mapping__group-body",
177
- "data-testid": "cn-register-mapping-group-body"
263
+ }), 128 /* KEYED_FRAGMENT */))
264
+ ]))
265
+ : createCommentVNode("v-if", true),
266
+ ($props.showSaveButton)
267
+ ? (openBlock(), createElementBlock("div", _hoisted_20, [
268
+ createVNode(_component_NcButton, {
269
+ variant: "primary",
270
+ disabled: $props.saving || !$options.hasChanges,
271
+ "data-testid": "cn-register-mapping-board-save",
272
+ onClick: $options.handleSave
273
+ }, createSlots({
274
+ default: withCtx(() => [
275
+ createTextVNode(" " + toDisplayString($props.saving ? $options.t('nextcloud-vue', 'Saving…') : $props.saveButtonText), 1 /* TEXT */)
276
+ ]),
277
+ _: 2 /* DYNAMIC */
278
+ }, [
279
+ ($props.saving)
280
+ ? {
281
+ name: "icon",
282
+ fn: withCtx(() => [
283
+ createVNode(_component_NcLoadingIcon, { size: 20 })
284
+ ]),
285
+ key: "0"
286
+ }
287
+ : undefined
288
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["disabled", "onClick"])
289
+ ]))
290
+ : createCommentVNode("v-if", true)
291
+ ]))
292
+ : (!$data.registersLoading && !$data.registersError)
293
+ ? (openBlock(), createElementBlock("div", _hoisted_21, [
294
+ (openBlock(true), createElementBlock(Fragment, null, renderList($props.groups, (group, groupIdx) => {
295
+ return (openBlock(), createElementBlock("div", {
296
+ key: groupIdx,
297
+ class: normalizeClass(["cn-register-mapping__group", { 'cn-register-mapping__group--collapsed': !$options.isGroupOpen(groupIdx) }]),
298
+ "data-testid": "cn-register-mapping-group"
178
299
  }, [
179
- (group.description)
180
- ? (openBlock(), createElementBlock("p", _hoisted_12, toDisplayString(group.description), 1 /* TEXT */))
181
- : createCommentVNode("v-if", true),
182
- createElementVNode("div", _hoisted_13, [
183
- createVNode(_component_NcSelect, {
184
- modelValue: $options.selectedRegister(groupIdx),
185
- options: $options.registerSelectOptions,
186
- placeholder: $props.labels.selectRegister,
187
- inputLabel: $props.labels.register,
188
- loading: $data.registersLoading,
189
- label: "label",
190
- trackBy: "value",
191
- "onUpdate:modelValue": $event => ($options.handleRegisterChange(groupIdx, $event))
192
- }, null, 8 /* PROPS */, ["modelValue", "options", "placeholder", "inputLabel", "loading", "onUpdate:modelValue"])
193
- ]),
194
- ($options.selectedRegister(groupIdx))
195
- ? (openBlock(), createElementBlock("div", _hoisted_14, [
196
- createElementVNode("div", _hoisted_15, [
197
- createElementVNode("span", null, toDisplayString($options.t('nextcloud-vue', 'Object type')), 1 /* TEXT */),
198
- createElementVNode("span", null, toDisplayString($props.labels.schema), 1 /* TEXT */),
199
- _cache[1] || (_cache[1] = createElementVNode("span", null, null, -1 /* CACHED */)),
200
- _cache[2] || (_cache[2] = createElementVNode("span", null, null, -1 /* CACHED */))
201
- ]),
202
- (openBlock(true), createElementBlock(Fragment, null, renderList(group.types, (type) => {
203
- return (openBlock(), createElementBlock(Fragment, {
204
- key: type.slug + '-row'
205
- }, [
206
- createElementVNode("div", {
207
- class: normalizeClass(["cn-register-mapping__type-row", { 'cn-register-mapping__type-row--expanded': $options.isExpanded(groupIdx, type.slug) }]),
208
- onClick: $event => ($options.toggleExpand(groupIdx, type.slug))
300
+ ($options.groupsCollapsible)
301
+ ? (openBlock(), createElementBlock("h4", _hoisted_22, [
302
+ createElementVNode("button", {
303
+ type: "button",
304
+ class: "cn-register-mapping__group-toggle",
305
+ "aria-expanded": String($options.isGroupOpen(groupIdx)),
306
+ "aria-controls": $options.groupBodyId(groupIdx),
307
+ "data-testid": "cn-register-mapping-group-toggle",
308
+ onClick: $event => ($options.toggleGroup(groupIdx))
309
+ }, [
310
+ createElementVNode("span", _hoisted_24, [
311
+ ($options.isGroupOpen(groupIdx))
312
+ ? (openBlock(), createBlock(_component_ChevronUp, {
313
+ key: 0,
314
+ size: 20
315
+ }))
316
+ : (openBlock(), createBlock(_component_ChevronDown, {
317
+ key: 1,
318
+ size: 20
319
+ }))
320
+ ]),
321
+ renderSlot(_ctx.$slots, "group-header", {
322
+ group: group,
323
+ configuredCount: $options.configuredCount(groupIdx),
324
+ totalCount: group.types.length
325
+ }, () => [
326
+ createElementVNode("span", _hoisted_25, [
327
+ createElementVNode("span", _hoisted_26, toDisplayString(group.name), 1 /* TEXT */),
328
+ createElementVNode("span", _hoisted_27, toDisplayString($options.configuredCount(groupIdx)) + "/" + toDisplayString(group.types.length) + " " + toDisplayString($props.labels.partiallyConfigured), 1 /* TEXT */)
329
+ ])
330
+ ])
331
+ ], 8 /* PROPS */, _hoisted_23)
332
+ ]))
333
+ : renderSlot(_ctx.$slots, "group-header", {
334
+ group: group,
335
+ configuredCount: $options.configuredCount(groupIdx),
336
+ totalCount: group.types.length
337
+ }, () => [
338
+ createElementVNode("div", _hoisted_28, [
339
+ createElementVNode("h4", _hoisted_29, toDisplayString(group.name), 1 /* TEXT */),
340
+ createElementVNode("span", _hoisted_30, toDisplayString($options.configuredCount(groupIdx)) + "/" + toDisplayString(group.types.length) + " " + toDisplayString($props.labels.partiallyConfigured), 1 /* TEXT */)
341
+ ])
342
+ ], undefined, 1),
343
+ withDirectives(createElementVNode("div", {
344
+ id: $options.groupBodyId(groupIdx),
345
+ class: "cn-register-mapping__group-body",
346
+ "data-testid": "cn-register-mapping-group-body"
347
+ }, [
348
+ (group.description)
349
+ ? (openBlock(), createElementBlock("p", _hoisted_32, toDisplayString(group.description), 1 /* TEXT */))
350
+ : createCommentVNode("v-if", true),
351
+ createElementVNode("div", _hoisted_33, [
352
+ createVNode(_component_NcSelect, {
353
+ modelValue: $options.selectedRegister(groupIdx),
354
+ options: $options.registerSelectOptions,
355
+ placeholder: $props.labels.selectRegister,
356
+ inputLabel: $props.labels.register,
357
+ loading: $data.registersLoading,
358
+ label: "label",
359
+ trackBy: "value",
360
+ "onUpdate:modelValue": $event => ($options.handleRegisterChange(groupIdx, $event))
361
+ }, null, 8 /* PROPS */, ["modelValue", "options", "placeholder", "inputLabel", "loading", "onUpdate:modelValue"])
362
+ ]),
363
+ ($options.selectedRegister(groupIdx))
364
+ ? (openBlock(), createElementBlock("div", _hoisted_34, [
365
+ createElementVNode("div", _hoisted_35, [
366
+ createElementVNode("span", null, toDisplayString($options.t('nextcloud-vue', 'Object type')), 1 /* TEXT */),
367
+ createElementVNode("span", null, toDisplayString($props.labels.schema), 1 /* TEXT */),
368
+ _cache[3] || (_cache[3] = createElementVNode("span", null, null, -1 /* CACHED */)),
369
+ _cache[4] || (_cache[4] = createElementVNode("span", null, null, -1 /* CACHED */))
370
+ ]),
371
+ (openBlock(true), createElementBlock(Fragment, null, renderList(group.types, (type) => {
372
+ return (openBlock(), createElementBlock(Fragment, {
373
+ key: type.slug + '-row'
209
374
  }, [
210
- createElementVNode("span", _hoisted_17, toDisplayString(type.label), 1 /* TEXT */),
211
- createElementVNode("span", _hoisted_18, toDisplayString($options.schemaLabel(groupIdx, type) || $props.labels.notConfigured), 1 /* TEXT */),
212
- createElementVNode("span", _hoisted_19, [
213
- createElementVNode("span", {
214
- class: normalizeClass(["cn-register-mapping__status-dot", $options.schemaValue(groupIdx, type)
375
+ createElementVNode("div", {
376
+ class: normalizeClass(["cn-register-mapping__type-row", { 'cn-register-mapping__type-row--expanded': $options.isExpanded(groupIdx, type.slug) }]),
377
+ onClick: $event => ($options.toggleExpand(groupIdx, type.slug))
378
+ }, [
379
+ createElementVNode("span", _hoisted_37, toDisplayString(type.label), 1 /* TEXT */),
380
+ createElementVNode("span", _hoisted_38, toDisplayString($options.schemaLabel(groupIdx, type) || $props.labels.notConfigured), 1 /* TEXT */),
381
+ createElementVNode("span", _hoisted_39, [
382
+ createElementVNode("span", {
383
+ class: normalizeClass(["cn-register-mapping__status-dot", $options.schemaValue(groupIdx, type)
215
384
  ? 'cn-register-mapping__status-dot--configured'
216
385
  : 'cn-register-mapping__status-dot--unconfigured'])
217
- }, null, 2 /* CLASS */)
218
- ]),
219
- createElementVNode("span", _hoisted_20, [
220
- ($options.isExpanded(groupIdx, type.slug))
221
- ? (openBlock(), createBlock(_component_ChevronUp, {
222
- key: 0,
223
- size: 20
224
- }))
225
- : (openBlock(), createBlock(_component_ChevronDown, {
226
- key: 1,
227
- size: 20
228
- }))
229
- ])
230
- ], 10 /* CLASS, PROPS */, _hoisted_16),
231
- createVNode(Transition, { name: "slide" }, {
232
- default: withCtx(() => [
233
- ($options.isExpanded(groupIdx, type.slug))
234
- ? (openBlock(), createElementBlock("div", _hoisted_21, [
235
- (type.description)
236
- ? (openBlock(), createElementBlock("p", _hoisted_22, toDisplayString(type.description), 1 /* TEXT */))
237
- : createCommentVNode("v-if", true),
238
- createVNode(_component_NcSelect, {
239
- modelValue: $options.selectedSchema(groupIdx, type),
240
- options: $options.schemaSelectOptions(groupIdx),
241
- placeholder: $props.labels.selectSchema,
242
- inputLabel: $props.labels.schema,
243
- label: "label",
244
- trackBy: "value",
245
- "onUpdate:modelValue": $event => ($options.handleSchemaChange(groupIdx, type, $event))
246
- }, null, 8 /* PROPS */, ["modelValue", "options", "placeholder", "inputLabel", "onUpdate:modelValue"])
247
- ]))
248
- : createCommentVNode("v-if", true)
249
- ]),
250
- _: 2 /* DYNAMIC */
251
- }, 1024 /* DYNAMIC_SLOTS */)
252
- ], 64 /* STABLE_FRAGMENT */))
253
- }), 128 /* KEYED_FRAGMENT */))
254
- ]))
255
- : (!$data.registersLoading)
386
+ }, null, 2 /* CLASS */)
387
+ ]),
388
+ createElementVNode("span", _hoisted_40, [
389
+ ($options.isExpanded(groupIdx, type.slug))
390
+ ? (openBlock(), createBlock(_component_ChevronUp, {
391
+ key: 0,
392
+ size: 20
393
+ }))
394
+ : (openBlock(), createBlock(_component_ChevronDown, {
395
+ key: 1,
396
+ size: 20
397
+ }))
398
+ ])
399
+ ], 10 /* CLASS, PROPS */, _hoisted_36),
400
+ createVNode(Transition, { name: "slide" }, {
401
+ default: withCtx(() => [
402
+ ($options.isExpanded(groupIdx, type.slug))
403
+ ? (openBlock(), createElementBlock("div", _hoisted_41, [
404
+ (type.description)
405
+ ? (openBlock(), createElementBlock("p", _hoisted_42, toDisplayString(type.description), 1 /* TEXT */))
406
+ : createCommentVNode("v-if", true),
407
+ createVNode(_component_NcSelect, {
408
+ modelValue: $options.selectedSchema(groupIdx, type),
409
+ options: $options.schemaSelectOptions(groupIdx),
410
+ placeholder: $props.labels.selectSchema,
411
+ inputLabel: $props.labels.schema,
412
+ label: "label",
413
+ trackBy: "value",
414
+ "onUpdate:modelValue": $event => ($options.handleSchemaChange(groupIdx, type, $event))
415
+ }, null, 8 /* PROPS */, ["modelValue", "options", "placeholder", "inputLabel", "onUpdate:modelValue"])
416
+ ]))
417
+ : createCommentVNode("v-if", true)
418
+ ]),
419
+ _: 2 /* DYNAMIC */
420
+ }, 1024 /* DYNAMIC_SLOTS */)
421
+ ], 64 /* STABLE_FRAGMENT */))
422
+ }), 128 /* KEYED_FRAGMENT */))
423
+ ]))
424
+ : (!$data.registersLoading)
425
+ ? (openBlock(), createBlock(_component_NcNoteCard, {
426
+ key: 2,
427
+ type: "info"
428
+ }, {
429
+ default: withCtx(() => [
430
+ createTextVNode(toDisplayString($props.labels.selectRegister), 1 /* TEXT */)
431
+ ]),
432
+ _: 1 /* STABLE */
433
+ }))
434
+ : createCommentVNode("v-if", true),
435
+ ($options.selectedRegister(groupIdx) && $options.schemaSelectOptions(groupIdx).length === 0 && !$data.registersLoading)
256
436
  ? (openBlock(), createBlock(_component_NcNoteCard, {
257
- key: 2,
258
- type: "info"
437
+ key: 3,
438
+ variant: "warning"
259
439
  }, {
260
440
  default: withCtx(() => [
261
- createTextVNode(toDisplayString($props.labels.selectRegister), 1 /* TEXT */)
441
+ createTextVNode(toDisplayString($props.labels.noSchemas), 1 /* TEXT */)
262
442
  ]),
263
443
  _: 1 /* STABLE */
264
444
  }))
265
- : createCommentVNode("v-if", true),
266
- ($options.selectedRegister(groupIdx) && $options.schemaSelectOptions(groupIdx).length === 0 && !$data.registersLoading)
267
- ? (openBlock(), createBlock(_component_NcNoteCard, {
268
- key: 3,
269
- variant: "warning"
270
- }, {
271
- default: withCtx(() => [
272
- createTextVNode(toDisplayString($props.labels.noSchemas), 1 /* TEXT */)
273
- ]),
274
- _: 1 /* STABLE */
275
- }))
276
- : createCommentVNode("v-if", true)
277
- ], 8 /* PROPS */, _hoisted_11), [
278
- [vShow, $options.isGroupOpen(groupIdx)]
279
- ])
280
- ], 2 /* CLASS */))
281
- }), 128 /* KEYED_FRAGMENT */))
282
- ]))
283
- : createCommentVNode("v-if", true)
445
+ : createCommentVNode("v-if", true)
446
+ ], 8 /* PROPS */, _hoisted_31), [
447
+ [vShow, $options.isGroupOpen(groupIdx)]
448
+ ])
449
+ ], 2 /* CLASS */))
450
+ }), 128 /* KEYED_FRAGMENT */))
451
+ ]))
452
+ : createCommentVNode("v-if", true)
284
453
  ]),
285
454
  _: 2 /* DYNAMIC */
286
455
  }, [
456
+ ($options.hasHeaderActions)
457
+ ? {
458
+ name: "actions",
459
+ fn: withCtx(() => [
460
+ ($props.showSaveButton && !$options.isBoardLook)
461
+ ? (openBlock(), createBlock(_component_NcButton, {
462
+ key: 0,
463
+ variant: "primary",
464
+ disabled: $props.saving || !$options.hasChanges,
465
+ onClick: $options.handleSave
466
+ }, {
467
+ icon: withCtx(() => [
468
+ ($props.saving)
469
+ ? (openBlock(), createBlock(_component_NcLoadingIcon, {
470
+ key: 0,
471
+ size: 20
472
+ }))
473
+ : (openBlock(), createBlock(_component_ContentSave, {
474
+ key: 1,
475
+ size: 20
476
+ }))
477
+ ]),
478
+ default: withCtx(() => [
479
+ createTextVNode(" " + toDisplayString($props.saving ? $options.t('nextcloud-vue', 'Saving…') : $props.saveButtonText), 1 /* TEXT */)
480
+ ]),
481
+ _: 1 /* STABLE */
482
+ }, 8 /* PROPS */, ["disabled", "onClick"]))
483
+ : createCommentVNode("v-if", true),
484
+ ($props.showReimportButton)
485
+ ? (openBlock(), createBlock(_component_NcButton, {
486
+ key: 1,
487
+ variant: "secondary",
488
+ disabled: $props.reimporting,
489
+ onClick: _cache[0] || (_cache[0] = $event => (_ctx.$emit('reimport')))
490
+ }, {
491
+ icon: withCtx(() => [
492
+ ($props.reimporting)
493
+ ? (openBlock(), createBlock(_component_NcLoadingIcon, {
494
+ key: 0,
495
+ size: 20
496
+ }))
497
+ : (openBlock(), createBlock(_component_Refresh, {
498
+ key: 1,
499
+ size: 20
500
+ }))
501
+ ]),
502
+ default: withCtx(() => [
503
+ createTextVNode(" " + toDisplayString($props.reimporting ? $options.t('nextcloud-vue', 'Importing…') : $props.reimportButtonText), 1 /* TEXT */)
504
+ ]),
505
+ _: 1 /* STABLE */
506
+ }, 8 /* PROPS */, ["disabled"]))
507
+ : createCommentVNode("v-if", true),
508
+ renderSlot(_ctx.$slots, "actions")
509
+ ]),
510
+ key: "0"
511
+ }
512
+ : undefined,
287
513
  (_ctx.$slots.footer)
288
514
  ? {
289
515
  name: "footer",
290
516
  fn: withCtx(() => [
291
517
  renderSlot(_ctx.$slots, "footer")
292
518
  ]),
293
- key: "0"
519
+ key: "1"
294
520
  }
295
521
  : undefined
296
522
  ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["name", "description", "docUrl", "loading", "loadingMessage", "error", "errorMessage", "onRetry"]))