@conduction/nextcloud-vue 2.155.0 → 2.157.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 (133) hide show
  1. package/dist/esm/components/CnAiCompanion/CnAiInput.vue2.js +3 -1
  2. package/dist/esm/components/CnAiCompanion/CnAiInput.vue2.js.map +1 -1
  3. package/dist/esm/components/CnAiCompanion/CnAiInput.vue3.js.map +1 -1
  4. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue.js +1 -1
  5. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue2.js.map +1 -1
  6. package/dist/esm/components/CnBannerWidget/CnBannerWidget.vue3.js.map +1 -1
  7. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
  8. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
  9. package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
  10. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue.js +1 -1
  11. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue2.js.map +1 -1
  12. package/dist/esm/components/CnCountdownWidget/CnCountdownWidget.vue3.js.map +1 -1
  13. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  14. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  15. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  16. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue.js +1 -1
  17. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue2.js.map +1 -1
  18. package/dist/esm/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue3.js.map +1 -1
  19. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue.js +1 -1
  20. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue2.js +2 -1
  21. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue2.js.map +1 -1
  22. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue3.js +10 -3
  23. package/dist/esm/components/CnDuplicateWarning/CnDuplicateWarning.vue3.js.map +1 -1
  24. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  25. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +14 -4
  26. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  27. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +3 -3
  28. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  29. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue.js +1 -1
  30. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue2.js.map +1 -1
  31. package/dist/esm/components/CnFeaturesBoard/CnFeaturesBoard.vue3.js.map +1 -1
  32. package/dist/esm/components/CnFormDialog/CnFormDialog.vue.js +1 -1
  33. package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
  34. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +2 -1
  35. package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
  36. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +13 -4
  37. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
  38. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
  39. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue.js +1 -1
  40. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js +91 -7
  41. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js.map +1 -1
  42. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue3.js.map +1 -1
  43. package/dist/esm/components/CnMailTab/CnMailTab.vue.js +1 -1
  44. package/dist/esm/components/CnMailTab/CnMailTab.vue2.js +4 -4
  45. package/dist/esm/components/CnMailTab/CnMailTab.vue2.js.map +1 -1
  46. package/dist/esm/components/CnMailTab/CnMailTab.vue3.js.map +1 -1
  47. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue.js +1 -1
  48. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js +3 -0
  49. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js.map +1 -1
  50. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js +10 -2
  51. package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js.map +1 -1
  52. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js +1 -1
  53. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js +6 -0
  54. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js.map +1 -1
  55. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js +2 -1
  56. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js.map +1 -1
  57. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue.js +1 -1
  58. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue2.js.map +1 -1
  59. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue3.js +27 -24
  60. package/dist/esm/components/CnSavedViewLookFields/CnSavedViewLookFields.vue3.js.map +1 -1
  61. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue2.js +25 -0
  62. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue2.js.map +1 -1
  63. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue3.js +40 -8
  64. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue3.js.map +1 -1
  65. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js +10 -0
  66. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js.map +1 -1
  67. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js.map +1 -1
  68. package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue.js +1 -1
  69. package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue2.js.map +1 -1
  70. package/dist/esm/components/CnSearchSelect/CnSearchSelect.vue3.js.map +1 -1
  71. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue.js +1 -1
  72. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js +24 -1
  73. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js.map +1 -1
  74. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js +9 -0
  75. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js.map +1 -1
  76. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue.js +1 -1
  77. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js +4 -1
  78. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue2.js.map +1 -1
  79. package/dist/esm/components/CnStagesWidget/CnStagesWidget.vue3.js.map +1 -1
  80. package/dist/esm/components/CnStagesWidget/stagesModel.js +10 -2
  81. package/dist/esm/components/CnStagesWidget/stagesModel.js.map +1 -1
  82. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue.js +1 -1
  83. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue2.js +61 -2
  84. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue2.js.map +1 -1
  85. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue3.js +68 -44
  86. package/dist/esm/components/CnTimelineWidget/CnTimelineManage.vue3.js.map +1 -1
  87. package/dist/esm/integrations/builtin/email/CnEmailTab.vue.js +1 -1
  88. package/dist/esm/integrations/builtin/email/CnEmailTab.vue2.js +13 -3
  89. package/dist/esm/integrations/builtin/email/CnEmailTab.vue2.js.map +1 -1
  90. package/dist/esm/integrations/builtin/email/CnEmailTab.vue3.js.map +1 -1
  91. package/dist/esm/l10n/en.json.js +12 -7
  92. package/dist/esm/l10n/en.json.js.map +1 -1
  93. package/dist/esm/l10n/nl.json.js +14 -9
  94. package/dist/esm/l10n/nl.json.js.map +1 -1
  95. package/dist/esm/library-style.js +1 -1
  96. package/dist/esm/nextcloud-vue.css +777 -469
  97. package/dist/esm/utils/dynamicProperties.js +14 -2
  98. package/dist/esm/utils/dynamicProperties.js.map +1 -1
  99. package/dist/nextcloud-vue.cjs.js +2472 -2120
  100. package/dist/nextcloud-vue.cjs.js.map +2 -2
  101. package/dist/nextcloud-vue.css +777 -469
  102. package/l10n/en.json +12 -7
  103. package/l10n/nl.json +14 -9
  104. package/package.json +1 -1
  105. package/src/components/CnAiCompanion/CnAiInput.vue +3 -1
  106. package/src/components/CnBannerWidget/CnBannerWidget.vue +5 -1
  107. package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +12 -5
  108. package/src/components/CnCountdownWidget/CnCountdownWidget.vue +12 -0
  109. package/src/components/CnDashboardPage/CnDashboardPage.vue +3 -1
  110. package/src/components/CnDeviceFramesWidget/CnDeviceFramesWidget.vue +1 -0
  111. package/src/components/CnDuplicateWarning/CnDuplicateWarning.vue +8 -4
  112. package/src/components/CnFactsWidget/CnFactsWidget.vue +31 -6
  113. package/src/components/CnFeaturesBoard/CnFeaturesBoard.vue +4 -2
  114. package/src/components/CnFormDialog/CnFormDialog.vue +1 -0
  115. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +13 -4
  116. package/src/components/CnLinkedWidget/CnLinkedWidget.vue +91 -7
  117. package/src/components/CnMailTab/CnMailTab.vue +4 -4
  118. package/src/components/CnNotificationMatrix/CnNotificationMatrix.vue +20 -0
  119. package/src/components/CnPartyPicker/CnPartyPicker.vue +7 -0
  120. package/src/components/CnSavedViewLookFields/CnSavedViewLookFields.vue +27 -20
  121. package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +42 -0
  122. package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +10 -0
  123. package/src/components/CnSearchSelect/CnSearchSelect.vue +3 -1
  124. package/src/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue +37 -1
  125. package/src/components/CnStagesWidget/CnStagesWidget.vue +4 -1
  126. package/src/components/CnStagesWidget/stagesModel.js +10 -2
  127. package/src/components/CnTimelineWidget/CnTimelineManage.vue +69 -4
  128. package/src/css/dialog.css +33 -0
  129. package/src/css/look-board-detail.css +4 -3
  130. package/src/css/look-board-index.css +34 -3
  131. package/src/css/look-board.css +181 -4
  132. package/src/integrations/builtin/email/CnEmailTab.vue +13 -3
  133. package/src/utils/dynamicProperties.js +13 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CnSchemaFormDialog.vue3.js","sources":["../../../../src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue?vue&type=template&id=3cba1325&lang.js"],"sourcesContent":["<template>\n\t<CnTabbedFormDialog\n\t\tref=\"dialog\"\n\t\t:look=\"look\"\n\t\t:width=\"width\"\n\t\t:eyebrow=\"eyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:tabs=\"dialogTabs\"\n\t\t:item=\"item\"\n\t\t:dialogTitle=\"dialogTitle\"\n\t\tentityName=\"Schema\"\n\t\t:size=\"size\"\n\t\t:disableSave=\"!!saveDisabledReason\"\n\t\t:disableSaveTooltip=\"saveDisabledReason\"\n\t\t:successText=\"resolvedSuccessText\"\n\t\t:cancelLabel=\"cancelLabel\"\n\t\t:closeLabel=\"closeLabel\"\n\t\t:confirmLabel=\"confirmLabel\"\n\t\t@confirm=\"handleConfirm\"\n\t\t@close=\"$emit('close')\">\n\t\t<!-- Metadata Display -->\n\t\t<template #above-tabs=\"{ loading: dialogLoading }\">\n\t\t\t<div class=\"cn-schema-form__detail-grid\">\n\t\t\t\t<div v-if=\"schemaItem.id\"\n\t\t\t\t\tclass=\"cn-schema-form__detail-item cn-schema-form__id-card\">\n\t\t\t\t\t<div class=\"cn-schema-form__id-card-header\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'ID / UUID:') }}</span>\n\t\t\t\t\t\t<NcButton class=\"cn-schema-form__copy-button\"\n\t\t\t\t\t\t\t@click=\"copyToClipboard(schemaItem.uuid || schemaItem.id)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Check v-if=\"isCopied\" :size=\"20\" />\n\t\t\t\t\t\t\t\t<ContentCopy v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ isCopied ? t('nextcloud-vue', 'Copied') : t('nextcloud-vue', 'Copy') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ schemaItem.id }}</span>\n\t\t\t\t\t<span v-if=\"schemaItem.uuid && schemaItem.uuid !== schemaItem.id\"\n\t\t\t\t\t\tclass=\"cn-schema-form__detail-value cn-schema-form__uuid-value\">{{ schemaItem.uuid }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cn-schema-form__detail-item cn-schema-form__title-with-badge\">\n\t\t\t\t\t<NcTextField v-model=\"schemaItem.title\"\n\t\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Title *')\" />\n\t\t\t\t\t<span v-if=\"schemaItem.allOf && schemaItem.allOf.length > 0\"\n\t\t\t\t\t\tclass=\"cn-schema-form__statusPill cn-schema-form__statusPill--success\">\n\t\t\t\t\t\tallOf\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"schemaItem.oneOf && schemaItem.oneOf.length > 0\"\n\t\t\t\t\t\tclass=\"cn-schema-form__statusPill cn-schema-form__statusPill--info\">\n\t\t\t\t\t\toneOf\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"schemaItem.anyOf && schemaItem.anyOf.length > 0\"\n\t\t\t\t\t\tclass=\"cn-schema-form__statusPill cn-schema-form__statusPill--info\">\n\t\t\t\t\t\tanyOf\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"schemaItem.created\" class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Created:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ new Date(schemaItem.created).toLocaleString(userLocale()) }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"schemaItem.updated\" class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Updated:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ new Date(schemaItem.updated).toLocaleString(userLocale()) }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Version:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ schemaItem.version || t('nextcloud-vue', 'Not set') }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Owner:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ schemaItem.owner || t('nextcloud-vue', 'Not set') }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\n\t\t<!-- Properties Tab -->\n\t\t<template #tab-properties=\"{ loading: dialogLoading }\">\n\t\t\t<CnSchemaPropertiesTab\n\t\t\t\t:schemaItem=\"schemaItem\"\n\t\t\t\t:loading=\"dialogLoading\"\n\t\t\t\t:selectedProperty=\"selectedProperty\"\n\t\t\t\t:propertiesModified=\"propertiesModified\"\n\t\t\t\t:originalProperties=\"originalProperties\"\n\t\t\t\t:inheritedProperties=\"inheritedProperties\"\n\t\t\t\t:typeOptionsForSelect=\"typeOptionsForSelect\"\n\t\t\t\t:availableSchemas=\"availableSchemas\"\n\t\t\t\t:availableRegisters=\"availableRegisters\"\n\t\t\t\t:availableTagsOptions=\"availableTagsOptions\"\n\t\t\t\t:userGroups=\"userGroups\"\n\t\t\t\t:sortedUserGroups=\"sortedUserGroups\"\n\t\t\t\t:loadingGroups=\"loadingGroups\"\n\t\t\t\t@addProperty=\"addProperty\"\n\t\t\t\t@update:selectedProperty=\"selectedProperty = $event\"\n\t\t\t\t@update:propertyKey=\"updatePropertyKey($event.oldKey, $event.newKey)\"\n\t\t\t\t@copyProperty=\"copyProperty\"\n\t\t\t\t@deleteProperty=\"deleteProperty\" />\n\t\t</template>\n\n\t\t<!-- Configuration Tab -->\n\t\t<template #tab-configuration=\"{ loading: dialogLoading }\">\n\t\t\t<CnSchemaConfigurationTab\n\t\t\t\t:schemaItem=\"schemaItem\"\n\t\t\t\t:loading=\"dialogLoading\"\n\t\t\t\t:availableSchemas=\"availableSchemas\"\n\t\t\t\t:propertyOptions=\"propertyOptions\"\n\t\t\t\t:allOfSchemaNames=\"allOfSchemaNames\" />\n\t\t</template>\n\n\t\t<!-- Security Tab -->\n\t\t<template #tab-security>\n\t\t\t<CnSchemaSecurityTab\n\t\t\t\t:schemaItem=\"schemaItem\"\n\t\t\t\t:userGroups=\"userGroups\"\n\t\t\t\t:sortedUserGroups=\"sortedUserGroups\"\n\t\t\t\t:loadingGroups=\"loadingGroups\"\n\t\t\t\t:hasAnyPermissions=\"hasAnyPermissions\"\n\t\t\t\t:isRestrictiveSchema=\"isRestrictiveSchema\"\n\t\t\t\t:inheritedProperties=\"inheritedProperties\" />\n\t\t</template>\n\n\t\t<!-- Optional Action Buttons (edit mode only) -->\n\t\t<template #actions-right=\"{ loading: dialogLoading, isCreateMode, result: dialogResult }\">\n\t\t\t<template v-if=\"!isCreateMode && dialogResult === null\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showExtendSchema\"\n\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t@click=\"$emit('extend-schema')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CallSplit :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ extendSchemaLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showAnalyzeProperties\"\n\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t@click=\"$emit('analyze-properties')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DatabaseSearch :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ analyzePropertiesLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showValidateObjects\"\n\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t@click=\"$emit('validate-objects')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CheckCircle :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ validateObjectsLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showDeleteObjects\"\n\t\t\t\t\t:title=\"objectCount > 0 ? deleteObjectsTooltip : noDeleteObjectsTooltip\"\n\t\t\t\t\t:disabled=\"dialogLoading || objectCount === 0\"\n\t\t\t\t\t@click=\"$emit('delete-objects')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DeleteSweep :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ deleteObjectsLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showPublishObjects\"\n\t\t\t\t\t:title=\"objectCount > 0 ? publishObjectsTooltip : noPublishObjectsTooltip\"\n\t\t\t\t\t:disabled=\"dialogLoading || objectCount === 0\"\n\t\t\t\t\t@click=\"$emit('publish-objects')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Upload :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ publishObjectsLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showDelete\"\n\t\t\t\t\t:title=\"objectCount > 0 ? cannotDeleteTooltip : ''\"\n\t\t\t\t\t:disabled=\"dialogLoading || objectCount > 0\"\n\t\t\t\t\tvariant=\"error\"\n\t\t\t\t\t@click=\"$emit('delete-schema')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<TrashCanOutline :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ deleteLabel }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</template>\n\t</CnTabbedFormDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcButton,\n\tNcTextField,\n} from '@nextcloud/vue'\nimport CallSplit from 'vue-material-design-icons/CallSplit.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport CheckCircle from 'vue-material-design-icons/CheckCircle.vue'\nimport ContentCopy from 'vue-material-design-icons/ContentCopy.vue'\nimport DatabaseSearch from 'vue-material-design-icons/DatabaseSearch.vue'\nimport DeleteSweep from 'vue-material-design-icons/DeleteSweep.vue'\nimport TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\nimport Upload from 'vue-material-design-icons/Upload.vue'\nimport CnTabbedFormDialog from '../CnTabbedFormDialog/CnTabbedFormDialog.vue'\nimport CnSchemaConfigurationTab from './CnSchemaConfigurationTab.vue'\nimport CnSchemaPropertiesTab from './CnSchemaPropertiesTab.vue'\nimport CnSchemaSecurityTab from './CnSchemaSecurityTab.vue'\nimport { dialogBoardMixin } from '../../mixins/dialogBoard.js'\nimport { userLocale } from '../../utils/userLocale.js'\n\n/**\n * CnSchemaFormDialog — Generic JSON Schema editor dialog.\n *\n * Provides a full-featured form for creating and editing JSON Schemas with\n * properties table, configuration, and security (RBAC) tabs. Uses CnTabbedFormDialog.\n *\n * The dialog does NOT perform saves — it emits a `confirm` event with the schema data.\n * The parent performs the actual API call and calls `setResult()` via a ref.\n *\n * @event confirm Emitted when the user confirms. Payload: cleaned schema data object.\n * @event close Emitted when the dialog should be closed.\n * @event extend-schema Emitted when the Extend Schema button is clicked.\n * @event analyze-properties Emitted when the Analyze Properties button is clicked.\n * @event validate-objects Emitted when the Validate Objects button is clicked.\n * @event delete-objects Emitted when the Delete Objects button is clicked.\n * @event publish-objects Emitted when the Publish Objects button is clicked.\n * @event delete-schema Emitted when the Delete button is clicked.\n */\nexport default {\n\tname: 'CnSchemaFormDialog',\n\tcomponents: {\n\t\tNcTextField,\n\t\tNcButton,\n\t\tCnTabbedFormDialog,\n\t\tCnSchemaPropertiesTab,\n\t\tCnSchemaConfigurationTab,\n\t\tCnSchemaSecurityTab,\n\t\t// Icons\n\t\tContentCopy,\n\t\tCheck,\n\t\tTrashCanOutline,\n\t\tCallSplit,\n\t\tDatabaseSearch,\n\t\tCheckCircle,\n\t\tDeleteSweep,\n\t\tUpload,\n\t},\n\n\tmixins: [dialogBoardMixin],\n\n\tprops: {\n\t\t/** Existing schema item for edit mode. Pass null for create mode. */\n\t\titem: { type: Object, default: null },\n\t\t/** Dialog title. Defaults to \"Create Schema\" or \"Edit Schema\". */\n\t\tdialogTitle: { type: String, default: '' },\n\t\t/** NcDialog size */\n\t\tsize: { type: String, default: 'large' },\n\t\t/** Available schemas for references and composition. Array of { id, title, description, reference } */\n\t\tavailableSchemas: { type: Array, default: () => [] },\n\t\t/** Available registers. Array of { id, label } */\n\t\tavailableRegisters: { type: Array, default: () => [] },\n\t\t/** User groups for RBAC. Array of { id, displayname } */\n\t\tuserGroups: { type: Array, default: () => [] },\n\t\t/** Available tags for file property configuration */\n\t\tavailableTags: { type: Array, default: () => [] },\n\t\t/** Whether user groups are still loading */\n\t\tloadingGroups: { type: Boolean, default: false },\n\t\t/** Properties inherited from parent schemas (allOf) — shown as locked rows in the properties tab */\n\t\tinheritedProperties: { type: Object, default: () => ({}) },\n\t\t/** Number of objects attached to this schema (used for action button disable logic) */\n\t\tobjectCount: { type: Number, default: 0 },\n\t\t// Optional action button visibility\n\t\t/** Show \"Extend Schema\" button */\n\t\tshowExtendSchema: { type: Boolean, default: false },\n\t\t/** Show \"Analyze Properties\" button */\n\t\tshowAnalyzeProperties: { type: Boolean, default: false },\n\t\t/** Show \"Validate Objects\" button */\n\t\tshowValidateObjects: { type: Boolean, default: false },\n\t\t/** Show \"Delete Objects\" button */\n\t\tshowDeleteObjects: { type: Boolean, default: false },\n\t\t/** Show \"Publish Objects\" button */\n\t\tshowPublishObjects: { type: Boolean, default: false },\n\t\t/** Show \"Delete\" button */\n\t\tshowDelete: { type: Boolean, default: false },\n\t\t// Labels (pre-translated strings with English defaults)\n\t\t/** Label for the cancel button shown while editing. */\n\t\tcancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },\n\t\t/** Label for the close button shown after a save or error. */\n\t\tcloseLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },\n\t\t/** Confirm button label. Defaults to \"Create\" or \"Save\". */\n\t\tconfirmLabel: { type: String, default: '' },\n\t\t/** Success message. Defaults to \"Schema saved successfully.\" */\n\t\tsuccessText: { type: String, default: '' },\n\t\t/** Label for the Extend Schema action button. */\n\t\textendSchemaLabel: { type: String, default: () => t('nextcloud-vue', 'Extend schema') },\n\t\t/** Label for the Analyze Properties action button. */\n\t\tanalyzePropertiesLabel: { type: String, default: () => t('nextcloud-vue', 'Analyze properties') },\n\t\t/** Label for the Validate Objects action button. */\n\t\tvalidateObjectsLabel: { type: String, default: () => t('nextcloud-vue', 'Validate objects') },\n\t\t/** Label for the Delete Objects action button. */\n\t\tdeleteObjectsLabel: { type: String, default: () => t('nextcloud-vue', 'Delete objects') },\n\t\t/** Label for the Publish Objects action button. */\n\t\tpublishObjectsLabel: { type: String, default: () => t('nextcloud-vue', 'Publish objects') },\n\t\t/** Label for the Delete schema button shown in edit mode. */\n\t\tdeleteLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },\n\t\t/** Tooltip for the Delete Objects button when objects exist. */\n\t\tdeleteObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'Delete all objects in this schema') },\n\t\t/** Tooltip for the Publish Objects button when objects exist. */\n\t\tpublishObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'Publish all objects in this schema') },\n\t\t/** Tooltip for the Delete Objects button when no objects exist */\n\t\tnoDeleteObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'No objects to delete') },\n\t\t/** Tooltip for the Publish Objects button when no objects exist */\n\t\tnoPublishObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'No objects to publish') },\n\t\t/** Tooltip for the Delete schema button while objects are still attached. */\n\t\tcannotDeleteTooltip: { type: String, default: () => t('nextcloud-vue', 'Cannot delete: objects are still attached') },\n\t},\n\n\temits: [\n\t\t'analyze-properties',\n\t\t'close',\n\t\t'confirm',\n\t\t'delete-objects',\n\t\t'delete-schema',\n\t\t'extend-schema',\n\t\t'publish-objects',\n\t\t'validate-objects',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisCopied: false,\n\t\t\tselectedProperty: null,\n\t\t\tpropertiesModified: false,\n\t\t\toriginalProperties: null,\n\t\t\tschemaItem: {\n\t\t\t\ttitle: '',\n\t\t\t\tversion: '0.0.0',\n\t\t\t\tdescription: '',\n\t\t\t\tsummary: '',\n\t\t\t\tslug: '',\n\t\t\t\tproperties: {},\n\t\t\t\tconfiguration: {\n\t\t\t\t\tobjectNameField: '',\n\t\t\t\t\tobjectDescriptionField: '',\n\t\t\t\t\tobjectImageField: '',\n\t\t\t\t\tobjectSummaryField: '',\n\t\t\t\t\tallowFiles: false,\n\t\t\t\t\tallowedTags: [],\n\t\t\t\t\tautoPublish: false,\n\t\t\t\t\tdefaultAutoShare: false,\n\t\t\t\t},\n\n\t\t\t\tauthorization: {},\n\t\t\t\thardValidation: false,\n\t\t\t\timmutable: false,\n\t\t\t\tsearchable: true,\n\t\t\t\ticon: null,\n\t\t\t\tmaxDepth: 0,\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Tab definitions for CnTabbedFormDialog.\n\t\t *\n\t\t * @return {Array} Tab configuration\n\t\t */\n\t\tdialogTabs() {\n\t\t\treturn [\n\t\t\t\t{ id: 'properties', title: t('nextcloud-vue', 'Properties') },\n\t\t\t\t{ id: 'configuration', title: t('nextcloud-vue', 'Configuration') },\n\t\t\t\t{ id: 'security', title: t('nextcloud-vue', 'Security') },\n\t\t\t]\n\t\t},\n\n\t\tsortedUserGroups() {\n\t\t\treturn this.userGroups\n\t\t\t\t.filter((group) => group.id !== 'admin' && group.id !== 'public' && group.id !== 'authenticated')\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\tconst nameA = a.displayname || a.id\n\t\t\t\t\tconst nameB = b.displayname || b.id\n\t\t\t\t\treturn nameA.localeCompare(nameB)\n\t\t\t\t})\n\t\t},\n\n\t\thasAnyPermissions() {\n\t\t\tconst auth = this.schemaItem.authorization || {}\n\t\t\treturn Object.keys(auth).some((action) => Array.isArray(auth[action]) && auth[action].length > 0)\n\t\t},\n\n\t\tisRestrictiveSchema() {\n\t\t\tconst auth = this.schemaItem.authorization || {}\n\t\t\tconst actions = ['create', 'read', 'update', 'delete']\n\t\t\treturn actions.some((action) => Array.isArray(auth[action]) && auth[action].length > 0\n\t\t\t\t&& !auth[action].includes('public'))\n\t\t},\n\n\t\ttypeOptionsForSelect() {\n\t\t\treturn [\n\t\t\t\t{ id: 'string', label: t('nextcloud-vue', 'String') },\n\t\t\t\t{ id: 'number', label: t('nextcloud-vue', 'Number') },\n\t\t\t\t{ id: 'integer', label: t('nextcloud-vue', 'Integer') },\n\t\t\t\t{ id: 'boolean', label: t('nextcloud-vue', 'Boolean') },\n\t\t\t\t{ id: 'array', label: t('nextcloud-vue', 'Array') },\n\t\t\t\t{ id: 'object', label: t('nextcloud-vue', 'Object') },\n\t\t\t\t{ id: 'dictionary', label: t('nextcloud-vue', 'Dictionary') },\n\t\t\t\t{ id: 'file', label: t('nextcloud-vue', 'File') },\n\t\t\t\t{ id: 'oneOf', label: t('nextcloud-vue', 'One of') },\n\t\t\t]\n\t\t},\n\n\t\tpropertyOptions() {\n\t\t\tconst ownKeys = Object.keys(this.schemaItem.properties || {}).filter((k) => k !== '')\n\t\t\tconst inheritedKeys = Object.keys(this.inheritedProperties || {}).filter((k) => k !== '')\n\t\t\treturn [...new Set([...inheritedKeys, ...ownKeys])]\n\t\t},\n\n\t\tavailableTagsOptions() {\n\t\t\treturn this.availableTags.map((tag) => ({\n\t\t\t\tid: tag,\n\t\t\t\tlabel: tag,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Resolved success text for backwards compatibility (includes trailing period).\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedSuccessText() {\n\t\t\tif (this.successText) {\n\t\t\t\treturn this.successText\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', '{title} saved successfully.', { title: t('nextcloud-vue', 'Schema') })\n\t\t},\n\n\t\t/**\n\t\t * Returns a human-readable reason the save button is disabled, or '' when saving is allowed.\n\t\t * Used for both :disable-save and the WCAG tooltip/aria-label on the button.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsaveDisabledReason() {\n\t\t\tif (!this.schemaItem.title) {\n\t\t\t\treturn t('nextcloud-vue', 'A schema title is required before saving')\n\t\t\t}\n\t\t\tconst hasUnnamedProperty = Object.keys(this.schemaItem.properties || {}).some((key) => key === '')\n\t\t\tif (hasUnnamedProperty) {\n\t\t\t\treturn t('nextcloud-vue', 'All properties must have a name before saving')\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\tallOfSchemaNames() {\n\t\t\tif (!this.schemaItem.allOf || !Array.isArray(this.schemaItem.allOf) || this.schemaItem.allOf.length === 0) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn this.schemaItem.allOf\n\t\t\t\t.map((ref) => {\n\t\t\t\t\tconst schemaId = typeof ref === 'object' ? ref.id : ref\n\t\t\t\t\tconst schema = this.availableSchemas.find((s) => s.id === schemaId)\n\t\t\t\t\treturn schema ? (schema.title || `Schema ${schema.id}`) : schemaId\n\t\t\t\t})\n\t\t\t\t.filter((name) => name)\n\t\t},\n\t},\n\n\twatch: {\n\t\titem: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.initializeSchemaItem()\n\t\t\t},\n\t\t},\n\n\t\t'schemaItem.properties': {\n\t\t\thandler(newProperties) {\n\t\t\t\tif (newProperties) {\n\t\t\t\t\tObject.keys(newProperties).forEach((key) => {\n\t\t\t\t\t\tconst property = newProperties[key]\n\t\t\t\t\t\tif (property) {\n\t\t\t\t\t\t\t// Initialize nested objects if they don't exist\n\t\t\t\t\t\t\tif (property.type === 'array' && !property.items) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items = { type: 'string' }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (property.type === 'object' && !property.objectConfiguration) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration = { handling: 'nested-object' }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (property.type === 'array' && property.items && property.items.type === 'object' && !property.items.objectConfiguration) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration = { handling: 'nested-object' }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert property type from object to string\n\t\t\t\t\t\t\tif (property.type && typeof property.type === 'object' && property.type.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].type = property.type.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert property format from object to string\n\t\t\t\t\t\t\tif (property.format && typeof property.format === 'object' && property.format.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].format = property.format.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert array item type from object to string\n\t\t\t\t\t\t\tif (property.items && property.items.type && typeof property.items.type === 'object' && property.items.type.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.type = property.items.type.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert object handling from object to string\n\t\t\t\t\t\t\tif (property.objectConfiguration && property.objectConfiguration.handling\n\t\t\t\t\t\t\t\t&& typeof property.objectConfiguration.handling === 'object' && property.objectConfiguration.handling.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.handling = property.objectConfiguration.handling.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert register from object to ID\n\t\t\t\t\t\t\tif (property.objectConfiguration && property.objectConfiguration.register\n\t\t\t\t\t\t\t\t&& typeof property.objectConfiguration.register === 'object' && property.objectConfiguration.register.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.register = property.objectConfiguration.register.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert array item object handling from object to string\n\t\t\t\t\t\t\tif (property.items && property.items.objectConfiguration && property.items.objectConfiguration.handling\n\t\t\t\t\t\t\t\t&& typeof property.items.objectConfiguration.handling === 'object' && property.items.objectConfiguration.handling.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.handling = property.items.objectConfiguration.handling.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert array item register from object to ID\n\t\t\t\t\t\t\tif (property.items && property.items.objectConfiguration && property.items.objectConfiguration.register\n\t\t\t\t\t\t\t\t&& typeof property.items.objectConfiguration.register === 'object' && property.items.objectConfiguration.register.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.register = property.items.objectConfiguration.register.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Ensure $ref is always a string\n\t\t\t\t\t\t\tthis.ensureRefIsString(this.schemaItem.properties, key)\n\n\t\t\t\t\t\t\t// Ensure inversedBy is always a string for regular properties\n\t\t\t\t\t\t\tif (property.inversedBy && typeof property.inversedBy === 'object' && property.inversedBy.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].inversedBy = property.inversedBy.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Ensure inversedBy is always a string for array items\n\t\t\t\t\t\t\tif (property.items && property.items.inversedBy && typeof property.items.inversedBy === 'object' && property.items.inversedBy.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.inversedBy = property.items.inversedBy.id\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tthis.checkPropertiesModified()\n\t\t\t},\n\n\t\t\tdeep: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\tuserLocale,\n\t\tfindSchemaBySlug(schemaSlug) {\n\t\t\tif (!schemaSlug) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn this.availableSchemas.find((schema) => (schema.slug && schema.slug.toLowerCase() === schemaSlug.toLowerCase())\n\t\t\t\t|| schema.id === schemaSlug\n\t\t\t\t|| schema.title === schemaSlug)\n\t\t},\n\n\t\tensureRefIsString(obj, key) {\n\t\t\tif (!obj || !key) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (obj[key] && typeof obj[key].$ref === 'object' && obj[key].$ref !== null) {\n\t\t\t\tif (obj[key].$ref.id) {\n\t\t\t\t\tobj[key].$ref = obj[key].$ref.id\n\t\t\t\t} else {\n\t\t\t\t\tobj[key].$ref = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (obj[key] && obj[key].items && typeof obj[key].items.$ref === 'object' && obj[key].items.$ref !== null) {\n\t\t\t\tif (obj[key].items.$ref.id) {\n\t\t\t\t\tobj[key].items.$ref = obj[key].items.$ref.id\n\t\t\t\t} else {\n\t\t\t\t\tobj[key].items.$ref = ''\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tinitializeSchemaItem() {\n\t\t\t// Reset CnTabbedFormDialog state if available (not yet mounted on first call)\n\t\t\tif (this.$refs.dialog) {\n\t\t\t\tthis.$refs.dialog.resetDialog()\n\t\t\t}\n\n\t\t\t// Always rebuild schemaItem from defaults + incoming item. This handles\n\t\t\t// create mode (item null), edit mode (item with id), and extend mode\n\t\t\t// (item non-null with no id) without leaking stale state across opens.\n\t\t\tconst defaults = {\n\t\t\t\ttitle: '',\n\t\t\t\tversion: '0.0.0',\n\t\t\t\tdescription: '',\n\t\t\t\tsummary: '',\n\t\t\t\tslug: '',\n\t\t\t\tproperties: {},\n\t\t\t\tconfiguration: {\n\t\t\t\t\tobjectNameField: '',\n\t\t\t\t\tobjectDescriptionField: '',\n\t\t\t\t\tobjectImageField: '',\n\t\t\t\t\tobjectSummaryField: '',\n\t\t\t\t\tallowFiles: false,\n\t\t\t\t\tallowedTags: [],\n\t\t\t\t\tautoPublish: false,\n\t\t\t\t\tdefaultAutoShare: false,\n\t\t\t\t},\n\n\t\t\t\tauthorization: {},\n\t\t\t\thardValidation: false,\n\t\t\t\timmutable: false,\n\t\t\t\tsearchable: true,\n\t\t\t\ticon: null,\n\t\t\t\tmaxDepth: 0,\n\t\t\t}\n\t\t\tthis.schemaItem = this.item\n\t\t\t\t? { ...defaults, ...JSON.parse(JSON.stringify(this.item)) }\n\t\t\t\t: { ...defaults }\n\n\t\t\t// Ensure configuration object has all expected keys (the spread above may\n\t\t\t// have replaced our defaults with a partial configuration from the item)\n\t\t\tif (!this.schemaItem.configuration) {\n\t\t\t\tthis.schemaItem.configuration = { ...defaults.configuration }\n\t\t\t} else {\n\t\t\t\tif (!this.schemaItem.configuration.objectNameField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectNameField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectDescriptionField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectDescriptionField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectImageField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectImageField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectSummaryField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectSummaryField = ''\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.allowFiles === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.allowFiles = false\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.allowedTags) {\n\t\t\t\t\tthis.schemaItem.configuration.allowedTags = []\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.autoPublish === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.autoPublish = false\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.defaultAutoShare === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.defaultAutoShare = false\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Ensure authorization object exists\n\t\t\tif (!this.schemaItem.authorization) {\n\t\t\t\tthis.schemaItem.authorization = {}\n\t\t\t}\n\n\t\t\t// Ensure existing properties have facetable set to false by default\n\t\t\tObject.keys(this.schemaItem.properties || {}).forEach((key) => {\n\t\t\t\tif (this.schemaItem.properties[key].facetable === undefined) {\n\t\t\t\t\tthis.schemaItem.properties[key].facetable = false\n\t\t\t\t}\n\n\t\t\t\tif (this.schemaItem.properties[key].enum && Array.isArray(this.schemaItem.properties[key].enum)) {\n\t\t\t\t\tthis.schemaItem.properties[key].enum = [...this.schemaItem.properties[key].enum]\n\t\t\t\t}\n\n\t\t\t\tconst property = this.schemaItem.properties[key]\n\t\t\t\tif (property.type === 'array' && property.items && property.items.type === 'object' && !property.items.objectConfiguration) {\n\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration = { handling: 'nested-object' }\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// Ensure all $ref values are strings and migrate old structure\n\t\t\tObject.keys(this.schemaItem.properties || {}).forEach((key) => {\n\t\t\t\tthis.ensureRefIsString(this.schemaItem.properties, key)\n\t\t\t\tthis.migratePropertyToNewStructure(key)\n\t\t\t})\n\n\t\t\t// Snapshot original properties for change detection. For new/extending\n\t\t\t// items (no id), there's no \"original\" — start empty so any added\n\t\t\t// properties register as modifications.\n\t\t\tthis.originalProperties = this.schemaItem.id\n\t\t\t\t? JSON.parse(JSON.stringify(this.schemaItem.properties || {}))\n\t\t\t\t: {}\n\n\t\t\tthis.propertiesModified = false\n\t\t},\n\n\t\tcheckPropertiesModified() {\n\t\t\tif (!this.originalProperties) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tconst currentProperties = JSON.stringify(this.schemaItem.properties || {})\n\t\t\tconst originalProperties = JSON.stringify(this.originalProperties)\n\n\t\t\tthis.propertiesModified = currentProperties !== originalProperties\n\t\t},\n\n\t\tasync copyToClipboard(text) {\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(text)\n\t\t\t\tthis.isCopied = true\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.isCopied = false\n\t\t\t\t}, 2000)\n\t\t\t} catch (err) {\n\t\t\t\t// eslint-disable-next-line no-console -- the failure is already handled; the console is the only channel a host app can read the detail on\n\t\t\t\tconsole.error('Failed to copy text:', err)\n\t\t\t}\n\t\t},\n\n\t\taddProperty() {\n\t\t\tthis.schemaItem.properties[''] = {\n\t\t\t\ttype: 'string',\n\t\t\t\tformat: '',\n\t\t\t\ttitle: '',\n\t\t\t\tdescription: '',\n\t\t\t\tfacetable: false,\n\t\t\t}\n\n\t\t\tthis.checkPropertiesModified()\n\t\t\tthis.selectedProperty = ''\n\t\t},\n\n\t\tupdatePropertyKey(oldKey, newKey) {\n\t\t\tif (newKey === oldKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.schemaItem.properties[newKey] !== undefined && newKey !== oldKey) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst propertyData = { ...this.schemaItem.properties[oldKey] }\n\n\t\t\tthis.schemaItem.properties[newKey] = propertyData\n\t\t\tdelete this.schemaItem.properties[oldKey]\n\n\t\t\tthis.selectedProperty = newKey\n\t\t\tthis.checkPropertiesModified()\n\t\t},\n\n\t\tdeleteProperty(key) {\n\t\t\tdelete this.schemaItem.properties[key]\n\n\t\t\tif (this.selectedProperty === key) {\n\t\t\t\tthis.selectedProperty = null\n\t\t\t}\n\n\t\t\tthis.checkPropertiesModified()\n\t\t},\n\n\t\tcopyProperty(key) {\n\t\t\tif (this.schemaItem.properties[key]) {\n\t\t\t\tconst originalProperty = JSON.parse(JSON.stringify(this.schemaItem.properties[key]))\n\n\t\t\t\tlet newPropertyName = `${key}_copy`\n\t\t\t\tlet counter = 1\n\n\t\t\t\twhile (this.schemaItem.properties[newPropertyName]) {\n\t\t\t\t\tcounter++\n\t\t\t\t\tnewPropertyName = `${key}_copy_${counter}`\n\t\t\t\t}\n\n\t\t\t\tconst originalTitle = originalProperty.title || key\n\t\t\t\tthis.schemaItem.properties[newPropertyName] = {\n\t\t\t\t\t...originalProperty,\n\t\t\t\t\ttitle: `${originalTitle} (copy)`,\n\t\t\t\t}\n\n\t\t\t\tthis.checkPropertiesModified()\n\t\t\t\tthis.selectedProperty = newPropertyName\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle confirm from CnTabbedFormDialog.\n\t\t * Cleans schema data and emits confirm with the cleaned payload.\n\t\t */\n\t\thandleConfirm() {\n\t\t\tconst cleanedSchemaItem = JSON.parse(JSON.stringify(this.schemaItem))\n\t\t\tObject.keys(cleanedSchemaItem.properties || {}).forEach((key) => {\n\t\t\t\tthis.ensureRefIsString(cleanedSchemaItem.properties, key)\n\n\t\t\t\tif (cleanedSchemaItem.properties[key].register\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].objectConfiguration\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].objectConfiguration.register) {\n\t\t\t\t\tdelete cleanedSchemaItem.properties[key].register\n\t\t\t\t}\n\n\t\t\t\tif (cleanedSchemaItem.properties[key].items\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].items.register\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].items.objectConfiguration\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].items.objectConfiguration.register) {\n\t\t\t\t\tdelete cleanedSchemaItem.properties[key].items.register\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// NcSelect (track-by=\"id\") can convert plain IDs to full option objects.\n\t\t\t// Normalise back to plain IDs before emitting so the backend always gets scalars.\n\t\t\tfor (const field of ['allOf', 'oneOf', 'anyOf']) {\n\t\t\t\tif (Array.isArray(cleanedSchemaItem[field])) {\n\t\t\t\t\tcleanedSchemaItem[field] = cleanedSchemaItem[field]\n\t\t\t\t\t\t.map((ref) => (typeof ref === 'object' && ref !== null ? ref.id : ref))\n\t\t\t\t\t\t.filter((id) => id !== null && id !== undefined && id !== '')\n\t\t\t\t\tif (cleanedSchemaItem[field].length === 0) {\n\t\t\t\t\t\tdelete cleanedSchemaItem[field]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.$emit('confirm', cleanedSchemaItem)\n\t\t},\n\n\t\t/**\n\t\t * Set the result of the save operation. Call this from the parent\n\t\t * after the API call completes.\n\t\t *\n\t\t * @param {{ success?: boolean, error?: string }} resultData - result data\n\t\t * @public\n\t\t */\n\t\tsetResult(resultData) {\n\t\t\tthis.$refs.dialog.setResult(resultData)\n\t\t\tif (resultData.success) {\n\t\t\t\tthis.originalProperties = JSON.parse(JSON.stringify(this.schemaItem.properties || {}))\n\t\t\t\tthis.propertiesModified = false\n\t\t\t}\n\t\t},\n\n\t\tmigratePropertyToNewStructure(key) {\n\t\t\tif (!this.schemaItem.properties[key]) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst property = this.schemaItem.properties[key]\n\n\t\t\tif (property.$ref && property.register && !property.objectConfiguration?.register) {\n\t\t\t\tif (!property.objectConfiguration) {\n\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration = { handling: 'related-object' }\n\t\t\t\t}\n\n\t\t\t\tconst registerId = typeof property.register === 'object' && property.register.id\n\t\t\t\t\t? property.register.id\n\t\t\t\t\t: property.register\n\n\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.register = registerId\n\n\t\t\t\tif (property.$ref) {\n\t\t\t\t\tlet schemaSlug = property.$ref\n\t\t\t\t\tif (schemaSlug.includes('/')) {\n\t\t\t\t\t\tschemaSlug = schemaSlug.substring(schemaSlug.lastIndexOf('/') + 1)\n\t\t\t\t\t}\n\n\t\t\t\t\tconst referencedSchema = this.findSchemaBySlug(schemaSlug)\n\t\t\t\t\tif (referencedSchema) {\n\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.schema = referencedSchema.id\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (property.items && property.items.$ref && property.items.register && !property.items.objectConfiguration?.register) {\n\t\t\t\tif (!property.items.objectConfiguration) {\n\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration = { handling: 'related-object' }\n\t\t\t\t}\n\n\t\t\t\tconst registerId = typeof property.items.register === 'object' && property.items.register.id\n\t\t\t\t\t? property.items.register.id\n\t\t\t\t\t: property.items.register\n\n\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.register = registerId\n\n\t\t\t\tif (property.items.$ref) {\n\t\t\t\t\tlet schemaSlug = property.items.$ref\n\t\t\t\t\tif (schemaSlug.includes('/')) {\n\t\t\t\t\t\tschemaSlug = schemaSlug.substring(schemaSlug.lastIndexOf('/') + 1)\n\t\t\t\t\t}\n\n\t\t\t\t\tconst referencedSchema = this.findSchemaBySlug(schemaSlug)\n\t\t\t\t\tif (referencedSchema) {\n\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.schema = referencedSchema.id\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_createBlock","_withCtx","_createElementVNode","_openBlock","_createElementBlock","_toDisplayString","_createVNode","_createTextVNode","_Fragment"],"mappings":";;AAsBQ,MAAA,UAAA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A,mBAAA,EAAA;;kBARR,KAAK,EAAE,MAAU,CAAA,WAAA,GAAA,CAAA,GAAQ,MAAoB,CAAA,mBAAA,GAAA,EAAA;kBAC7C,QAAQ,EAAE,aAAY,IAAK,MAAU,CAAA,WAAA,GAAA,CAAA;AACtC,kBAAA,OAAO,EAAC,OAAM;AACb,kBAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,eAAA,CAAA,CAAA,CAAA;;AACF,kBAAA,IAAI,UACd,MAA6B;oBAA7BM,WAA6B,CAAA,0BAAA,EAAA,EAAX,IAAI,EAAE,EAAE,EAAA,CAAA;;mCACjB,MACV;AADU,oBAAAC,eAAA,CAAA,GACV,mBAAG,MAAU,CAAA,WAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnSchemaFormDialog.vue3.js","sources":["../../../../src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue?vue&type=template&id=ffe15224&lang.js"],"sourcesContent":["<template>\n\t<CnTabbedFormDialog\n\t\tref=\"dialog\"\n\t\t:look=\"look\"\n\t\t:width=\"width\"\n\t\t:eyebrow=\"eyebrow\"\n\t\t:subtitle=\"subtitle\"\n\t\t:tabs=\"dialogTabs\"\n\t\t:item=\"item\"\n\t\t:dialogTitle=\"dialogTitle\"\n\t\tentityName=\"Schema\"\n\t\t:size=\"size\"\n\t\t:disableSave=\"!!saveDisabledReason\"\n\t\t:disableSaveTooltip=\"saveDisabledReason\"\n\t\t:successText=\"resolvedSuccessText\"\n\t\t:cancelLabel=\"cancelLabel\"\n\t\t:closeLabel=\"closeLabel\"\n\t\t:confirmLabel=\"confirmLabel\"\n\t\t@confirm=\"handleConfirm\"\n\t\t@close=\"$emit('close')\">\n\t\t<!-- Metadata Display -->\n\t\t<template #above-tabs=\"{ loading: dialogLoading }\">\n\t\t\t<div class=\"cn-schema-form__detail-grid\">\n\t\t\t\t<div v-if=\"schemaItem.id\"\n\t\t\t\t\tclass=\"cn-schema-form__detail-item cn-schema-form__id-card\">\n\t\t\t\t\t<div class=\"cn-schema-form__id-card-header\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'ID / UUID:') }}</span>\n\t\t\t\t\t\t<NcButton class=\"cn-schema-form__copy-button\"\n\t\t\t\t\t\t\t@click=\"copyToClipboard(schemaItem.uuid || schemaItem.id)\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Check v-if=\"isCopied\" :size=\"20\" />\n\t\t\t\t\t\t\t\t<ContentCopy v-else :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ isCopied ? t('nextcloud-vue', 'Copied') : t('nextcloud-vue', 'Copy') }}\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ schemaItem.id }}</span>\n\t\t\t\t\t<span v-if=\"schemaItem.uuid && schemaItem.uuid !== schemaItem.id\"\n\t\t\t\t\t\tclass=\"cn-schema-form__detail-value cn-schema-form__uuid-value\">{{ schemaItem.uuid }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cn-schema-form__detail-item cn-schema-form__title-with-badge\">\n\t\t\t\t\t<NcTextField v-model=\"schemaItem.title\"\n\t\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t\t:label=\"t('nextcloud-vue', 'Title *')\" />\n\t\t\t\t\t<span v-if=\"schemaItem.allOf && schemaItem.allOf.length > 0\"\n\t\t\t\t\t\tclass=\"cn-schema-form__statusPill cn-schema-form__statusPill--success\">\n\t\t\t\t\t\tallOf\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"schemaItem.oneOf && schemaItem.oneOf.length > 0\"\n\t\t\t\t\t\tclass=\"cn-schema-form__statusPill cn-schema-form__statusPill--info\">\n\t\t\t\t\t\toneOf\n\t\t\t\t\t</span>\n\t\t\t\t\t<span v-if=\"schemaItem.anyOf && schemaItem.anyOf.length > 0\"\n\t\t\t\t\t\tclass=\"cn-schema-form__statusPill cn-schema-form__statusPill--info\">\n\t\t\t\t\t\tanyOf\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"schemaItem.created\" class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Created:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ new Date(schemaItem.created).toLocaleString(userLocale()) }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div v-if=\"schemaItem.updated\" class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Updated:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ new Date(schemaItem.updated).toLocaleString(userLocale()) }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Version:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ schemaItem.version || t('nextcloud-vue', 'Not set') }}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"cn-schema-form__detail-item\">\n\t\t\t\t\t<span class=\"cn-schema-form__detail-label\">{{ t('nextcloud-vue', 'Owner:') }}</span>\n\t\t\t\t\t<span class=\"cn-schema-form__detail-value\">{{ schemaItem.owner || t('nextcloud-vue', 'Not set') }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</template>\n\n\t\t<!-- Properties Tab -->\n\t\t<template #tab-properties=\"{ loading: dialogLoading }\">\n\t\t\t<CnSchemaPropertiesTab\n\t\t\t\t:schemaItem=\"schemaItem\"\n\t\t\t\t:loading=\"dialogLoading\"\n\t\t\t\t:selectedProperty=\"selectedProperty\"\n\t\t\t\t:propertiesModified=\"propertiesModified\"\n\t\t\t\t:originalProperties=\"originalProperties\"\n\t\t\t\t:inheritedProperties=\"inheritedProperties\"\n\t\t\t\t:typeOptionsForSelect=\"typeOptionsForSelect\"\n\t\t\t\t:availableSchemas=\"availableSchemas\"\n\t\t\t\t:availableRegisters=\"availableRegisters\"\n\t\t\t\t:availableTagsOptions=\"availableTagsOptions\"\n\t\t\t\t:userGroups=\"userGroups\"\n\t\t\t\t:sortedUserGroups=\"sortedUserGroups\"\n\t\t\t\t:loadingGroups=\"loadingGroups\"\n\t\t\t\t@addProperty=\"addProperty\"\n\t\t\t\t@update:selectedProperty=\"selectedProperty = $event\"\n\t\t\t\t@update:propertyKey=\"updatePropertyKey($event.oldKey, $event.newKey)\"\n\t\t\t\t@copyProperty=\"copyProperty\"\n\t\t\t\t@deleteProperty=\"deleteProperty\" />\n\t\t</template>\n\n\t\t<!-- Configuration Tab -->\n\t\t<template #tab-configuration=\"{ loading: dialogLoading }\">\n\t\t\t<CnSchemaConfigurationTab\n\t\t\t\t:schemaItem=\"schemaItem\"\n\t\t\t\t:loading=\"dialogLoading\"\n\t\t\t\t:availableSchemas=\"availableSchemas\"\n\t\t\t\t:propertyOptions=\"propertyOptions\"\n\t\t\t\t:allOfSchemaNames=\"allOfSchemaNames\" />\n\t\t</template>\n\n\t\t<!-- Security Tab -->\n\t\t<template #tab-security>\n\t\t\t<CnSchemaSecurityTab\n\t\t\t\t:schemaItem=\"schemaItem\"\n\t\t\t\t:userGroups=\"userGroups\"\n\t\t\t\t:sortedUserGroups=\"sortedUserGroups\"\n\t\t\t\t:loadingGroups=\"loadingGroups\"\n\t\t\t\t:hasAnyPermissions=\"hasAnyPermissions\"\n\t\t\t\t:isRestrictiveSchema=\"isRestrictiveSchema\"\n\t\t\t\t:inheritedProperties=\"inheritedProperties\" />\n\t\t</template>\n\n\t\t<!-- Optional Action Buttons (edit mode only) -->\n\t\t<template #actions-right=\"{ loading: dialogLoading, isCreateMode, result: dialogResult }\">\n\t\t\t<template v-if=\"!isCreateMode && dialogResult === null\">\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showExtendSchema\"\n\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t@click=\"$emit('extend-schema')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CallSplit :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ extendSchemaLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showAnalyzeProperties\"\n\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t@click=\"$emit('analyze-properties')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DatabaseSearch :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ analyzePropertiesLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showValidateObjects\"\n\t\t\t\t\t:disabled=\"dialogLoading\"\n\t\t\t\t\t@click=\"$emit('validate-objects')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<CheckCircle :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ validateObjectsLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showDeleteObjects\"\n\t\t\t\t\t:title=\"objectCount > 0 ? deleteObjectsTooltip : noDeleteObjectsTooltip\"\n\t\t\t\t\t:disabled=\"dialogLoading || objectCount === 0\"\n\t\t\t\t\t@click=\"$emit('delete-objects')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<DeleteSweep :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ deleteObjectsLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showPublishObjects\"\n\t\t\t\t\t:title=\"objectCount > 0 ? publishObjectsTooltip : noPublishObjectsTooltip\"\n\t\t\t\t\t:disabled=\"dialogLoading || objectCount === 0\"\n\t\t\t\t\t@click=\"$emit('publish-objects')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Upload :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ publishObjectsLabel }}\n\t\t\t\t</NcButton>\n\t\t\t\t<NcButton\n\t\t\t\t\tv-if=\"showDelete\"\n\t\t\t\t\t:title=\"objectCount > 0 ? cannotDeleteTooltip : ''\"\n\t\t\t\t\t:disabled=\"dialogLoading || objectCount > 0\"\n\t\t\t\t\tvariant=\"error\"\n\t\t\t\t\t@click=\"$emit('delete-schema')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<TrashCanOutline :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ deleteLabel }}\n\t\t\t\t</NcButton>\n\t\t\t</template>\n\t\t</template>\n\t</CnTabbedFormDialog>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcButton,\n\tNcTextField,\n} from '@nextcloud/vue'\nimport CallSplit from 'vue-material-design-icons/CallSplit.vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport CheckCircle from 'vue-material-design-icons/CheckCircle.vue'\nimport ContentCopy from 'vue-material-design-icons/ContentCopy.vue'\nimport DatabaseSearch from 'vue-material-design-icons/DatabaseSearch.vue'\nimport DeleteSweep from 'vue-material-design-icons/DeleteSweep.vue'\nimport TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'\nimport Upload from 'vue-material-design-icons/Upload.vue'\nimport CnTabbedFormDialog from '../CnTabbedFormDialog/CnTabbedFormDialog.vue'\nimport CnSchemaConfigurationTab from './CnSchemaConfigurationTab.vue'\nimport CnSchemaPropertiesTab from './CnSchemaPropertiesTab.vue'\nimport CnSchemaSecurityTab from './CnSchemaSecurityTab.vue'\nimport { dialogBoardMixin } from '../../mixins/dialogBoard.js'\nimport { userLocale } from '../../utils/userLocale.js'\n\n/**\n * CnSchemaFormDialog — Generic JSON Schema editor dialog.\n *\n * Provides a full-featured form for creating and editing JSON Schemas with\n * properties table, configuration, and security (RBAC) tabs. Uses CnTabbedFormDialog.\n *\n * The dialog does NOT perform saves — it emits a `confirm` event with the schema data.\n * The parent performs the actual API call and calls `setResult()` via a ref.\n *\n * @event confirm Emitted when the user confirms. Payload: cleaned schema data object.\n * @event close Emitted when the dialog should be closed.\n * @event extend-schema Emitted when the Extend Schema button is clicked.\n * @event analyze-properties Emitted when the Analyze Properties button is clicked.\n * @event validate-objects Emitted when the Validate Objects button is clicked.\n * @event delete-objects Emitted when the Delete Objects button is clicked.\n * @event publish-objects Emitted when the Publish Objects button is clicked.\n * @event delete-schema Emitted when the Delete button is clicked.\n */\nexport default {\n\tname: 'CnSchemaFormDialog',\n\tcomponents: {\n\t\tNcTextField,\n\t\tNcButton,\n\t\tCnTabbedFormDialog,\n\t\tCnSchemaPropertiesTab,\n\t\tCnSchemaConfigurationTab,\n\t\tCnSchemaSecurityTab,\n\t\t// Icons\n\t\tContentCopy,\n\t\tCheck,\n\t\tTrashCanOutline,\n\t\tCallSplit,\n\t\tDatabaseSearch,\n\t\tCheckCircle,\n\t\tDeleteSweep,\n\t\tUpload,\n\t},\n\n\tmixins: [dialogBoardMixin],\n\n\tprops: {\n\t\t/** Existing schema item for edit mode. Pass null for create mode. */\n\t\titem: { type: Object, default: null },\n\t\t/** Dialog title. Defaults to \"Create Schema\" or \"Edit Schema\". */\n\t\tdialogTitle: { type: String, default: '' },\n\t\t/** NcDialog size */\n\t\tsize: { type: String, default: 'large' },\n\t\t/** Available schemas for references and composition. Array of { id, title, description, reference } */\n\t\tavailableSchemas: { type: Array, default: () => [] },\n\t\t/** Available registers. Array of { id, label } */\n\t\tavailableRegisters: { type: Array, default: () => [] },\n\t\t/** User groups for RBAC. Array of { id, displayname } */\n\t\tuserGroups: { type: Array, default: () => [] },\n\t\t/** Available tags for file property configuration */\n\t\tavailableTags: { type: Array, default: () => [] },\n\t\t/** Whether user groups are still loading */\n\t\tloadingGroups: { type: Boolean, default: false },\n\t\t/** Properties inherited from parent schemas (allOf) — shown as locked rows in the properties tab */\n\t\tinheritedProperties: { type: Object, default: () => ({}) },\n\t\t/** Number of objects attached to this schema (used for action button disable logic) */\n\t\tobjectCount: { type: Number, default: 0 },\n\t\t// Optional action button visibility\n\t\t/** Show \"Extend Schema\" button */\n\t\tshowExtendSchema: { type: Boolean, default: false },\n\t\t/** Show \"Analyze Properties\" button */\n\t\tshowAnalyzeProperties: { type: Boolean, default: false },\n\t\t/** Show \"Validate Objects\" button */\n\t\tshowValidateObjects: { type: Boolean, default: false },\n\t\t/** Show \"Delete Objects\" button */\n\t\tshowDeleteObjects: { type: Boolean, default: false },\n\t\t/** Show \"Publish Objects\" button */\n\t\tshowPublishObjects: { type: Boolean, default: false },\n\t\t/** Show \"Delete\" button */\n\t\tshowDelete: { type: Boolean, default: false },\n\t\t// Labels (pre-translated strings with English defaults)\n\t\t/** Label for the cancel button shown while editing. */\n\t\tcancelLabel: { type: String, default: () => t('nextcloud-vue', 'Cancel') },\n\t\t/** Label for the close button shown after a save or error. */\n\t\tcloseLabel: { type: String, default: () => t('nextcloud-vue', 'Close') },\n\t\t/** Confirm button label. Defaults to \"Create\" or \"Save\". */\n\t\tconfirmLabel: { type: String, default: '' },\n\t\t/** Success message. Defaults to \"Schema saved successfully.\" */\n\t\tsuccessText: { type: String, default: '' },\n\t\t/** Label for the Extend Schema action button. */\n\t\textendSchemaLabel: { type: String, default: () => t('nextcloud-vue', 'Extend schema') },\n\t\t/** Label for the Analyze Properties action button. */\n\t\tanalyzePropertiesLabel: { type: String, default: () => t('nextcloud-vue', 'Analyze properties') },\n\t\t/** Label for the Validate Objects action button. */\n\t\tvalidateObjectsLabel: { type: String, default: () => t('nextcloud-vue', 'Validate objects') },\n\t\t/** Label for the Delete Objects action button. */\n\t\tdeleteObjectsLabel: { type: String, default: () => t('nextcloud-vue', 'Delete objects') },\n\t\t/** Label for the Publish Objects action button. */\n\t\tpublishObjectsLabel: { type: String, default: () => t('nextcloud-vue', 'Publish objects') },\n\t\t/** Label for the Delete schema button shown in edit mode. */\n\t\tdeleteLabel: { type: String, default: () => t('nextcloud-vue', 'Delete') },\n\t\t/** Tooltip for the Delete Objects button when objects exist. */\n\t\tdeleteObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'Delete all objects in this schema') },\n\t\t/** Tooltip for the Publish Objects button when objects exist. */\n\t\tpublishObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'Publish all objects in this schema') },\n\t\t/** Tooltip for the Delete Objects button when no objects exist */\n\t\tnoDeleteObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'No objects to delete') },\n\t\t/** Tooltip for the Publish Objects button when no objects exist */\n\t\tnoPublishObjectsTooltip: { type: String, default: () => t('nextcloud-vue', 'No objects to publish') },\n\t\t/** Tooltip for the Delete schema button while objects are still attached. */\n\t\tcannotDeleteTooltip: { type: String, default: () => t('nextcloud-vue', 'Cannot delete: objects are still attached') },\n\t},\n\n\temits: [\n\t\t'analyze-properties',\n\t\t'close',\n\t\t'confirm',\n\t\t'delete-objects',\n\t\t'delete-schema',\n\t\t'extend-schema',\n\t\t'publish-objects',\n\t\t'validate-objects',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisCopied: false,\n\t\t\tselectedProperty: null,\n\t\t\tpropertiesModified: false,\n\t\t\toriginalProperties: null,\n\t\t\tschemaItem: {\n\t\t\t\ttitle: '',\n\t\t\t\tversion: '0.0.0',\n\t\t\t\tdescription: '',\n\t\t\t\tsummary: '',\n\t\t\t\tslug: '',\n\t\t\t\tproperties: {},\n\t\t\t\tconfiguration: {\n\t\t\t\t\tobjectNameField: '',\n\t\t\t\t\tobjectDescriptionField: '',\n\t\t\t\t\tobjectImageField: '',\n\t\t\t\t\tobjectSummaryField: '',\n\t\t\t\t\tobjectSlugField: '',\n\t\t\t\t\tobjectSlugSuffix: false,\n\t\t\t\t\tallowFiles: false,\n\t\t\t\t\tallowedTags: [],\n\t\t\t\t\tautoPublish: false,\n\t\t\t\t\tdefaultAutoShare: false,\n\t\t\t\t},\n\n\t\t\t\tauthorization: {},\n\t\t\t\thardValidation: false,\n\t\t\t\timmutable: false,\n\t\t\t\tsearchable: true,\n\t\t\t\ticon: null,\n\t\t\t\tmaxDepth: 0,\n\t\t\t},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Tab definitions for CnTabbedFormDialog.\n\t\t *\n\t\t * @return {Array} Tab configuration\n\t\t */\n\t\tdialogTabs() {\n\t\t\treturn [\n\t\t\t\t{ id: 'properties', title: t('nextcloud-vue', 'Properties') },\n\t\t\t\t{ id: 'configuration', title: t('nextcloud-vue', 'Configuration') },\n\t\t\t\t{ id: 'security', title: t('nextcloud-vue', 'Security') },\n\t\t\t]\n\t\t},\n\n\t\tsortedUserGroups() {\n\t\t\treturn this.userGroups\n\t\t\t\t.filter((group) => group.id !== 'admin' && group.id !== 'public' && group.id !== 'authenticated')\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\tconst nameA = a.displayname || a.id\n\t\t\t\t\tconst nameB = b.displayname || b.id\n\t\t\t\t\treturn nameA.localeCompare(nameB)\n\t\t\t\t})\n\t\t},\n\n\t\thasAnyPermissions() {\n\t\t\tconst auth = this.schemaItem.authorization || {}\n\t\t\treturn Object.keys(auth).some((action) => Array.isArray(auth[action]) && auth[action].length > 0)\n\t\t},\n\n\t\tisRestrictiveSchema() {\n\t\t\tconst auth = this.schemaItem.authorization || {}\n\t\t\tconst actions = ['create', 'read', 'update', 'delete']\n\t\t\treturn actions.some((action) => Array.isArray(auth[action]) && auth[action].length > 0\n\t\t\t\t&& !auth[action].includes('public'))\n\t\t},\n\n\t\ttypeOptionsForSelect() {\n\t\t\treturn [\n\t\t\t\t{ id: 'string', label: t('nextcloud-vue', 'String') },\n\t\t\t\t{ id: 'number', label: t('nextcloud-vue', 'Number') },\n\t\t\t\t{ id: 'integer', label: t('nextcloud-vue', 'Integer') },\n\t\t\t\t{ id: 'boolean', label: t('nextcloud-vue', 'Boolean') },\n\t\t\t\t{ id: 'array', label: t('nextcloud-vue', 'Array') },\n\t\t\t\t{ id: 'object', label: t('nextcloud-vue', 'Object') },\n\t\t\t\t{ id: 'dictionary', label: t('nextcloud-vue', 'Dictionary') },\n\t\t\t\t{ id: 'file', label: t('nextcloud-vue', 'File') },\n\t\t\t\t{ id: 'oneOf', label: t('nextcloud-vue', 'One of') },\n\t\t\t]\n\t\t},\n\n\t\tpropertyOptions() {\n\t\t\tconst ownKeys = Object.keys(this.schemaItem.properties || {}).filter((k) => k !== '')\n\t\t\tconst inheritedKeys = Object.keys(this.inheritedProperties || {}).filter((k) => k !== '')\n\t\t\treturn [...new Set([...inheritedKeys, ...ownKeys])]\n\t\t},\n\n\t\tavailableTagsOptions() {\n\t\t\treturn this.availableTags.map((tag) => ({\n\t\t\t\tid: tag,\n\t\t\t\tlabel: tag,\n\t\t\t}))\n\t\t},\n\n\t\t/**\n\t\t * Resolved success text for backwards compatibility (includes trailing period).\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tresolvedSuccessText() {\n\t\t\tif (this.successText) {\n\t\t\t\treturn this.successText\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', '{title} saved successfully.', { title: t('nextcloud-vue', 'Schema') })\n\t\t},\n\n\t\t/**\n\t\t * Returns a human-readable reason the save button is disabled, or '' when saving is allowed.\n\t\t * Used for both :disable-save and the WCAG tooltip/aria-label on the button.\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tsaveDisabledReason() {\n\t\t\tif (!this.schemaItem.title) {\n\t\t\t\treturn t('nextcloud-vue', 'A schema title is required before saving')\n\t\t\t}\n\t\t\tconst hasUnnamedProperty = Object.keys(this.schemaItem.properties || {}).some((key) => key === '')\n\t\t\tif (hasUnnamedProperty) {\n\t\t\t\treturn t('nextcloud-vue', 'All properties must have a name before saving')\n\t\t\t}\n\t\t\treturn ''\n\t\t},\n\n\t\tallOfSchemaNames() {\n\t\t\tif (!this.schemaItem.allOf || !Array.isArray(this.schemaItem.allOf) || this.schemaItem.allOf.length === 0) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\treturn this.schemaItem.allOf\n\t\t\t\t.map((ref) => {\n\t\t\t\t\tconst schemaId = typeof ref === 'object' ? ref.id : ref\n\t\t\t\t\tconst schema = this.availableSchemas.find((s) => s.id === schemaId)\n\t\t\t\t\treturn schema ? (schema.title || `Schema ${schema.id}`) : schemaId\n\t\t\t\t})\n\t\t\t\t.filter((name) => name)\n\t\t},\n\t},\n\n\twatch: {\n\t\titem: {\n\t\t\timmediate: true,\n\t\t\thandler() {\n\t\t\t\tthis.initializeSchemaItem()\n\t\t\t},\n\t\t},\n\n\t\t'schemaItem.properties': {\n\t\t\thandler(newProperties) {\n\t\t\t\tif (newProperties) {\n\t\t\t\t\tObject.keys(newProperties).forEach((key) => {\n\t\t\t\t\t\tconst property = newProperties[key]\n\t\t\t\t\t\tif (property) {\n\t\t\t\t\t\t\t// Initialize nested objects if they don't exist\n\t\t\t\t\t\t\tif (property.type === 'array' && !property.items) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items = { type: 'string' }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (property.type === 'object' && !property.objectConfiguration) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration = { handling: 'nested-object' }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (property.type === 'array' && property.items && property.items.type === 'object' && !property.items.objectConfiguration) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration = { handling: 'nested-object' }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert property type from object to string\n\t\t\t\t\t\t\tif (property.type && typeof property.type === 'object' && property.type.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].type = property.type.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert property format from object to string\n\t\t\t\t\t\t\tif (property.format && typeof property.format === 'object' && property.format.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].format = property.format.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert array item type from object to string\n\t\t\t\t\t\t\tif (property.items && property.items.type && typeof property.items.type === 'object' && property.items.type.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.type = property.items.type.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert object handling from object to string\n\t\t\t\t\t\t\tif (property.objectConfiguration && property.objectConfiguration.handling\n\t\t\t\t\t\t\t\t&& typeof property.objectConfiguration.handling === 'object' && property.objectConfiguration.handling.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.handling = property.objectConfiguration.handling.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert register from object to ID\n\t\t\t\t\t\t\tif (property.objectConfiguration && property.objectConfiguration.register\n\t\t\t\t\t\t\t\t&& typeof property.objectConfiguration.register === 'object' && property.objectConfiguration.register.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.register = property.objectConfiguration.register.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert array item object handling from object to string\n\t\t\t\t\t\t\tif (property.items && property.items.objectConfiguration && property.items.objectConfiguration.handling\n\t\t\t\t\t\t\t\t&& typeof property.items.objectConfiguration.handling === 'object' && property.items.objectConfiguration.handling.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.handling = property.items.objectConfiguration.handling.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Convert array item register from object to ID\n\t\t\t\t\t\t\tif (property.items && property.items.objectConfiguration && property.items.objectConfiguration.register\n\t\t\t\t\t\t\t\t&& typeof property.items.objectConfiguration.register === 'object' && property.items.objectConfiguration.register.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.register = property.items.objectConfiguration.register.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Ensure $ref is always a string\n\t\t\t\t\t\t\tthis.ensureRefIsString(this.schemaItem.properties, key)\n\n\t\t\t\t\t\t\t// Ensure inversedBy is always a string for regular properties\n\t\t\t\t\t\t\tif (property.inversedBy && typeof property.inversedBy === 'object' && property.inversedBy.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].inversedBy = property.inversedBy.id\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Ensure inversedBy is always a string for array items\n\t\t\t\t\t\t\tif (property.items && property.items.inversedBy && typeof property.items.inversedBy === 'object' && property.items.inversedBy.id) {\n\t\t\t\t\t\t\t\tthis.schemaItem.properties[key].items.inversedBy = property.items.inversedBy.id\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tthis.checkPropertiesModified()\n\t\t\t},\n\n\t\t\tdeep: true,\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\tuserLocale,\n\t\tfindSchemaBySlug(schemaSlug) {\n\t\t\tif (!schemaSlug) {\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\treturn this.availableSchemas.find((schema) => (schema.slug && schema.slug.toLowerCase() === schemaSlug.toLowerCase())\n\t\t\t\t|| schema.id === schemaSlug\n\t\t\t\t|| schema.title === schemaSlug)\n\t\t},\n\n\t\tensureRefIsString(obj, key) {\n\t\t\tif (!obj || !key) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (obj[key] && typeof obj[key].$ref === 'object' && obj[key].$ref !== null) {\n\t\t\t\tif (obj[key].$ref.id) {\n\t\t\t\t\tobj[key].$ref = obj[key].$ref.id\n\t\t\t\t} else {\n\t\t\t\t\tobj[key].$ref = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (obj[key] && obj[key].items && typeof obj[key].items.$ref === 'object' && obj[key].items.$ref !== null) {\n\t\t\t\tif (obj[key].items.$ref.id) {\n\t\t\t\t\tobj[key].items.$ref = obj[key].items.$ref.id\n\t\t\t\t} else {\n\t\t\t\t\tobj[key].items.$ref = ''\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tinitializeSchemaItem() {\n\t\t\t// Reset CnTabbedFormDialog state if available (not yet mounted on first call)\n\t\t\tif (this.$refs.dialog) {\n\t\t\t\tthis.$refs.dialog.resetDialog()\n\t\t\t}\n\n\t\t\t// Always rebuild schemaItem from defaults + incoming item. This handles\n\t\t\t// create mode (item null), edit mode (item with id), and extend mode\n\t\t\t// (item non-null with no id) without leaking stale state across opens.\n\t\t\tconst defaults = {\n\t\t\t\ttitle: '',\n\t\t\t\tversion: '0.0.0',\n\t\t\t\tdescription: '',\n\t\t\t\tsummary: '',\n\t\t\t\tslug: '',\n\t\t\t\tproperties: {},\n\t\t\t\tconfiguration: {\n\t\t\t\t\tobjectNameField: '',\n\t\t\t\t\tobjectDescriptionField: '',\n\t\t\t\t\tobjectImageField: '',\n\t\t\t\t\tobjectSummaryField: '',\n\t\t\t\t\tobjectSlugField: '',\n\t\t\t\t\tobjectSlugSuffix: false,\n\t\t\t\t\tallowFiles: false,\n\t\t\t\t\tallowedTags: [],\n\t\t\t\t\tautoPublish: false,\n\t\t\t\t\tdefaultAutoShare: false,\n\t\t\t\t},\n\n\t\t\t\tauthorization: {},\n\t\t\t\thardValidation: false,\n\t\t\t\timmutable: false,\n\t\t\t\tsearchable: true,\n\t\t\t\ticon: null,\n\t\t\t\tmaxDepth: 0,\n\t\t\t}\n\t\t\tthis.schemaItem = this.item\n\t\t\t\t? { ...defaults, ...JSON.parse(JSON.stringify(this.item)) }\n\t\t\t\t: { ...defaults }\n\n\t\t\t// Ensure configuration object has all expected keys (the spread above may\n\t\t\t// have replaced our defaults with a partial configuration from the item)\n\t\t\tif (!this.schemaItem.configuration) {\n\t\t\t\tthis.schemaItem.configuration = { ...defaults.configuration }\n\t\t\t} else {\n\t\t\t\tif (!this.schemaItem.configuration.objectNameField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectNameField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectDescriptionField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectDescriptionField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectImageField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectImageField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectSummaryField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectSummaryField = ''\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.objectSlugField) {\n\t\t\t\t\tthis.schemaItem.configuration.objectSlugField = ''\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.objectSlugSuffix === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.objectSlugSuffix = false\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.allowFiles === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.allowFiles = false\n\t\t\t\t}\n\t\t\t\tif (!this.schemaItem.configuration.allowedTags) {\n\t\t\t\t\tthis.schemaItem.configuration.allowedTags = []\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.autoPublish === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.autoPublish = false\n\t\t\t\t}\n\t\t\t\tif (this.schemaItem.configuration.defaultAutoShare === undefined) {\n\t\t\t\t\tthis.schemaItem.configuration.defaultAutoShare = false\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Ensure authorization object exists\n\t\t\tif (!this.schemaItem.authorization) {\n\t\t\t\tthis.schemaItem.authorization = {}\n\t\t\t}\n\n\t\t\t// Ensure existing properties have facetable set to false by default\n\t\t\tObject.keys(this.schemaItem.properties || {}).forEach((key) => {\n\t\t\t\tif (this.schemaItem.properties[key].facetable === undefined) {\n\t\t\t\t\tthis.schemaItem.properties[key].facetable = false\n\t\t\t\t}\n\n\t\t\t\tif (this.schemaItem.properties[key].enum && Array.isArray(this.schemaItem.properties[key].enum)) {\n\t\t\t\t\tthis.schemaItem.properties[key].enum = [...this.schemaItem.properties[key].enum]\n\t\t\t\t}\n\n\t\t\t\tconst property = this.schemaItem.properties[key]\n\t\t\t\tif (property.type === 'array' && property.items && property.items.type === 'object' && !property.items.objectConfiguration) {\n\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration = { handling: 'nested-object' }\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// Ensure all $ref values are strings and migrate old structure\n\t\t\tObject.keys(this.schemaItem.properties || {}).forEach((key) => {\n\t\t\t\tthis.ensureRefIsString(this.schemaItem.properties, key)\n\t\t\t\tthis.migratePropertyToNewStructure(key)\n\t\t\t})\n\n\t\t\t// Snapshot original properties for change detection. For new/extending\n\t\t\t// items (no id), there's no \"original\" — start empty so any added\n\t\t\t// properties register as modifications.\n\t\t\tthis.originalProperties = this.schemaItem.id\n\t\t\t\t? JSON.parse(JSON.stringify(this.schemaItem.properties || {}))\n\t\t\t\t: {}\n\n\t\t\tthis.propertiesModified = false\n\t\t},\n\n\t\tcheckPropertiesModified() {\n\t\t\tif (!this.originalProperties) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tconst currentProperties = JSON.stringify(this.schemaItem.properties || {})\n\t\t\tconst originalProperties = JSON.stringify(this.originalProperties)\n\n\t\t\tthis.propertiesModified = currentProperties !== originalProperties\n\t\t},\n\n\t\tasync copyToClipboard(text) {\n\t\t\ttry {\n\t\t\t\tawait navigator.clipboard.writeText(text)\n\t\t\t\tthis.isCopied = true\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tthis.isCopied = false\n\t\t\t\t}, 2000)\n\t\t\t} catch (err) {\n\t\t\t\t// eslint-disable-next-line no-console -- the failure is already handled; the console is the only channel a host app can read the detail on\n\t\t\t\tconsole.error('Failed to copy text:', err)\n\t\t\t}\n\t\t},\n\n\t\taddProperty() {\n\t\t\tthis.schemaItem.properties[''] = {\n\t\t\t\ttype: 'string',\n\t\t\t\tformat: '',\n\t\t\t\ttitle: '',\n\t\t\t\tdescription: '',\n\t\t\t\tfacetable: false,\n\t\t\t}\n\n\t\t\tthis.checkPropertiesModified()\n\t\t\tthis.selectedProperty = ''\n\t\t},\n\n\t\tupdatePropertyKey(oldKey, newKey) {\n\t\t\tif (newKey === oldKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.schemaItem.properties[newKey] !== undefined && newKey !== oldKey) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst propertyData = { ...this.schemaItem.properties[oldKey] }\n\n\t\t\tthis.schemaItem.properties[newKey] = propertyData\n\t\t\tdelete this.schemaItem.properties[oldKey]\n\n\t\t\tthis.selectedProperty = newKey\n\t\t\tthis.checkPropertiesModified()\n\t\t},\n\n\t\tdeleteProperty(key) {\n\t\t\tdelete this.schemaItem.properties[key]\n\n\t\t\tif (this.selectedProperty === key) {\n\t\t\t\tthis.selectedProperty = null\n\t\t\t}\n\n\t\t\tthis.checkPropertiesModified()\n\t\t},\n\n\t\tcopyProperty(key) {\n\t\t\tif (this.schemaItem.properties[key]) {\n\t\t\t\tconst originalProperty = JSON.parse(JSON.stringify(this.schemaItem.properties[key]))\n\n\t\t\t\tlet newPropertyName = `${key}_copy`\n\t\t\t\tlet counter = 1\n\n\t\t\t\twhile (this.schemaItem.properties[newPropertyName]) {\n\t\t\t\t\tcounter++\n\t\t\t\t\tnewPropertyName = `${key}_copy_${counter}`\n\t\t\t\t}\n\n\t\t\t\tconst originalTitle = originalProperty.title || key\n\t\t\t\tthis.schemaItem.properties[newPropertyName] = {\n\t\t\t\t\t...originalProperty,\n\t\t\t\t\ttitle: `${originalTitle} (copy)`,\n\t\t\t\t}\n\n\t\t\t\tthis.checkPropertiesModified()\n\t\t\t\tthis.selectedProperty = newPropertyName\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle confirm from CnTabbedFormDialog.\n\t\t * Cleans schema data and emits confirm with the cleaned payload.\n\t\t */\n\t\thandleConfirm() {\n\t\t\tconst cleanedSchemaItem = JSON.parse(JSON.stringify(this.schemaItem))\n\t\t\tObject.keys(cleanedSchemaItem.properties || {}).forEach((key) => {\n\t\t\t\tthis.ensureRefIsString(cleanedSchemaItem.properties, key)\n\n\t\t\t\tif (cleanedSchemaItem.properties[key].register\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].objectConfiguration\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].objectConfiguration.register) {\n\t\t\t\t\tdelete cleanedSchemaItem.properties[key].register\n\t\t\t\t}\n\n\t\t\t\tif (cleanedSchemaItem.properties[key].items\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].items.register\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].items.objectConfiguration\n\t\t\t\t\t&& cleanedSchemaItem.properties[key].items.objectConfiguration.register) {\n\t\t\t\t\tdelete cleanedSchemaItem.properties[key].items.register\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// NcSelect (track-by=\"id\") can convert plain IDs to full option objects.\n\t\t\t// Normalise back to plain IDs before emitting so the backend always gets scalars.\n\t\t\tfor (const field of ['allOf', 'oneOf', 'anyOf']) {\n\t\t\t\tif (Array.isArray(cleanedSchemaItem[field])) {\n\t\t\t\t\tcleanedSchemaItem[field] = cleanedSchemaItem[field]\n\t\t\t\t\t\t.map((ref) => (typeof ref === 'object' && ref !== null ? ref.id : ref))\n\t\t\t\t\t\t.filter((id) => id !== null && id !== undefined && id !== '')\n\t\t\t\t\tif (cleanedSchemaItem[field].length === 0) {\n\t\t\t\t\t\tdelete cleanedSchemaItem[field]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.$emit('confirm', cleanedSchemaItem)\n\t\t},\n\n\t\t/**\n\t\t * Set the result of the save operation. Call this from the parent\n\t\t * after the API call completes.\n\t\t *\n\t\t * @param {{ success?: boolean, error?: string }} resultData - result data\n\t\t * @public\n\t\t */\n\t\tsetResult(resultData) {\n\t\t\tthis.$refs.dialog.setResult(resultData)\n\t\t\tif (resultData.success) {\n\t\t\t\tthis.originalProperties = JSON.parse(JSON.stringify(this.schemaItem.properties || {}))\n\t\t\t\tthis.propertiesModified = false\n\t\t\t}\n\t\t},\n\n\t\tmigratePropertyToNewStructure(key) {\n\t\t\tif (!this.schemaItem.properties[key]) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst property = this.schemaItem.properties[key]\n\n\t\t\tif (property.$ref && property.register && !property.objectConfiguration?.register) {\n\t\t\t\tif (!property.objectConfiguration) {\n\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration = { handling: 'related-object' }\n\t\t\t\t}\n\n\t\t\t\tconst registerId = typeof property.register === 'object' && property.register.id\n\t\t\t\t\t? property.register.id\n\t\t\t\t\t: property.register\n\n\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.register = registerId\n\n\t\t\t\tif (property.$ref) {\n\t\t\t\t\tlet schemaSlug = property.$ref\n\t\t\t\t\tif (schemaSlug.includes('/')) {\n\t\t\t\t\t\tschemaSlug = schemaSlug.substring(schemaSlug.lastIndexOf('/') + 1)\n\t\t\t\t\t}\n\n\t\t\t\t\tconst referencedSchema = this.findSchemaBySlug(schemaSlug)\n\t\t\t\t\tif (referencedSchema) {\n\t\t\t\t\t\tthis.schemaItem.properties[key].objectConfiguration.schema = referencedSchema.id\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (property.items && property.items.$ref && property.items.register && !property.items.objectConfiguration?.register) {\n\t\t\t\tif (!property.items.objectConfiguration) {\n\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration = { handling: 'related-object' }\n\t\t\t\t}\n\n\t\t\t\tconst registerId = typeof property.items.register === 'object' && property.items.register.id\n\t\t\t\t\t? property.items.register.id\n\t\t\t\t\t: property.items.register\n\n\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.register = registerId\n\n\t\t\t\tif (property.items.$ref) {\n\t\t\t\t\tlet schemaSlug = property.items.$ref\n\t\t\t\t\tif (schemaSlug.includes('/')) {\n\t\t\t\t\t\tschemaSlug = schemaSlug.substring(schemaSlug.lastIndexOf('/') + 1)\n\t\t\t\t\t}\n\n\t\t\t\t\tconst referencedSchema = this.findSchemaBySlug(schemaSlug)\n\t\t\t\t\tif (referencedSchema) {\n\t\t\t\t\t\tthis.schemaItem.properties[key].items.objectConfiguration.schema = referencedSchema.id\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_createBlock","_withCtx","_createElementVNode","_openBlock","_createElementBlock","_toDisplayString","_createVNode","_createTextVNode","_Fragment"],"mappings":";;AAsBQ,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;;;AAEtC,EAAA,KAAK,EAAC,qDAAqD;;AACtD,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,gCAAgC,GAAA;AACpC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;AAUrC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;;;AAEzC,EAAA,KAAK,EAAC,yDAAyD;;AAE5D,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8DAA8D,GAAA;;;AAKvE,EAAA,KAAK,EAAC,gEAAgE;;;;AAItE,EAAA,KAAK,EAAC,6DAA6D;;;;AAInE,EAAA,KAAK,EAAC,6DAA6D;;;;AAItC,EAAA,KAAK,EAAC,6BAA6B;;AAC3D,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;AACpC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;;;AAEZ,EAAA,KAAK,EAAC,6BAA6B;;AAC3D,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;AACpC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;AAEtC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;AACjC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;AACpC,MAAA,WAAA,GAAA,EAAA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GAAI,MAAuB,CAAA,uBAAA;kBACxE,QAAQ,EAAE,aAAc,IAAG;AAC3B,kBAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,iBAAA,CAAA,CAAA,CAAA;;AACF,kBAAA,IAAI,UACd,MAAoB;oBAApBM,WAAoB,CAAA,iBAAA,EAAA,EAAX,IAAI,EAAE,EAAE,EAAA,CAAA;;mCACR,MACV;AADU,oBAAAC,eAAA,CAAA,GACV,mBAAG;;;;;aAGG,MAAU,CAAA,UAAA;8BADjBP,WAUU,CAAA,mBAAA,EAAA;;kBARR,KAAK,EAAE,MAAU,CAAA,WAAA,GAAA,CAAA,GAAQ,MAAoB,CAAA,mBAAA,GAAA,EAAA;kBAC7C,QAAQ,EAAE,aAAY,IAAK,MAAU,CAAA,WAAA,GAAA,CAAA;AACtC,kBAAA,OAAO,EAAC,OAAM;AACb,kBAAA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,eAAA,CAAA,CAAA,CAAA;;AACF,kBAAA,IAAI,UACd,MAA6B;oBAA7BM,WAA6B,CAAA,0BAAA,EAAA,EAAX,IAAI,EAAE,EAAE,EAAA,CAAA;;mCACjB,MACV;AADU,oBAAAC,eAAA,CAAA,GACV,mBAAG,MAAU,CAAA,WAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnSearchSelect.vue2.js';
2
2
  import { render } from './CnSearchSelect.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-aaa45660";
5
+ script.__scopeId = "data-v-29601046";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -1 +1 @@
1
- {"version":3,"file":"CnSearchSelect.vue2.js","sources":["../../../../src/components/CnSearchSelect/CnSearchSelect.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-search-select\" :class=\"{ 'cn-search-select--label-outside': labelOutside }\" data-testid=\"cn-search-select\">\n\t\t<NcSelect\n\t\t\t:inputId=\"inputId\"\n\t\t\t:inputLabel=\"inputLabel\"\n\t\t\t:labelOutside=\"labelOutside\"\n\t\t\t:modelValue=\"selectedOption\"\n\t\t\t:options=\"options\"\n\t\t\t:loading=\"loading\"\n\t\t\t:clearable=\"clearable\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:placeholder=\"resolvedPlaceholder\"\n\t\t\t:filterable=\"filterable\"\n\t\t\tlabel=\"label\"\n\t\t\t@search=\"onSearch\"\n\t\t\t@update:modelValue=\"onInput\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span class=\"cn-search-select__row\" data-testid=\"cn-search-select-row\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-if=\"option.avatar || option.icon\"\n\t\t\t\t\t\tclass=\"cn-search-select__lead\"\n\t\t\t\t\t\t:class=\"{ 'cn-search-select__lead--avatar': option.avatar && !option.icon }\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<CnIcon v-if=\"option.icon\" :name=\"option.icon\" :size=\"18\" />\n\t\t\t\t\t\t<template v-else>{{ initialsOf(option) }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-search-select__text\">\n\t\t\t\t\t\t<span class=\"cn-search-select__name\">{{ option.label }}</span>\n\t\t\t\t\t\t<span v-if=\"option.secondary\" class=\"cn-search-select__secondary\">{{ option.secondary }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Check\n\t\t\t\t\t\tv-if=\"isSelected(option)\"\n\t\t\t\t\t\tclass=\"cn-search-select__check\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\tdata-testid=\"cn-search-select-check\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<Magnify class=\"cn-search-select__magnifier\" :size=\"18\" aria-hidden=\"true\" />\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcSelect } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport Magnify from 'vue-material-design-icons/Magnify.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport { initialsOf } from '../../utils/initials.js'\n\n/**\n * CnSearchSelect — a single picker drawn as a search field: a magnifier\n * instead of the chevron, and results as rows with an icon or initials, a\n * name, a secondary line and a check on the chosen one (boards DqOverdragen\n * \"Nieuw team\", DqNieuweZaak \"Aanvrager\").\n *\n * Each option is `{ id, label, secondary?, icon?, avatar? }`: `icon` names a\n * CnIcon, `avatar: true` draws the label's initials in a circle. The value is\n * the option's `id` (or `value`); `update:modelValue` emits that id, or null\n * when cleared. Searching is the host's: listen to `search` and pass new\n * `options`, with `filterable: false` when the host already filtered them.\n *\n * ```vue\n * <CnSearchSelect\n * v-model=\"team\"\n * inputLabel=\"Nieuw team\"\n * :options=\"[{ id: 'legal', label: 'Juridische zaken', secondary: '6 leden · bezwaar, beroep en Woo-advies', avatar: true }]\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchSelect',\n\n\tcomponents: { Check, CnIcon, Magnify, NcSelect },\n\n\tprops: {\n\t\t/** The chosen option's id, or the option itself. */\n\t\tmodelValue: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The options: `{ id, label, secondary?, icon?, avatar? }`.\n\t\t *\n\t\t * @type {Array<{id: (string|number), label: string, secondary?: string, icon?: string, avatar?: boolean}>}\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The field's label. */\n\t\tinputLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Draw the label above the field instead of inside it. */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** The input's id. */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/** Placeholder text; defaults to \"Search…\". */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Show the loading spinner. */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Offer a clear button. */\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Disable the field. */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Filter the options on the typed text; false when the host searches. */\n\t\tfilterable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: ['update:modelValue', 'search'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The option matching `modelValue`, or a bare one carrying it.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tselectedOption() {\n\t\t\tconst value = this.modelValue\n\t\t\tif (value === null || value === undefined || value === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof value === 'object') {\n\t\t\t\treturn value\n\t\t\t}\n\t\t\treturn this.options.find((o) => this.idOf(o) === String(value)) || { id: value, label: String(value) }\n\t\t},\n\n\t\t/** @return {string} The placeholder. */\n\t\tresolvedPlaceholder() {\n\t\t\treturn this.placeholder || t('nextcloud-vue', 'Search…')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tinitialsOf(option) {\n\t\t\treturn initialsOf(option.label || '')\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {string} Its id as a string, '' without one.\n\t\t */\n\t\tidOf(option) {\n\t\t\tconst id = option && (option.id ?? option.value)\n\t\t\treturn id === null || id === undefined ? '' : String(id)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {boolean} Whether it is the chosen one.\n\t\t */\n\t\tisSelected(option) {\n\t\t\treturn this.selectedOption !== null && this.idOf(option) !== '' && this.idOf(option) === this.idOf(this.selectedOption)\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked option.\n\t\t */\n\t\tonInput(option) {\n\t\t\tconst id = option ? (option.id ?? option.value ?? null) : null\n\t\t\t/** @event update:modelValue The picked option's id, or null when cleared. */\n\t\t\tthis.$emit('update:modelValue', id)\n\t\t},\n\n\t\t/**\n\t\t * @param {string} query The typed text.\n\t\t */\n\t\tonSearch(query) {\n\t\t\t/** @event search The typed text, for a host that searches itself. */\n\t\t\tthis.$emit('search', query)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-select {\n\tposition: relative;\n}\n\n/* The field takes the row: NcSelect is an inline block of at least 260px,\n which left the magnifier, placed at the row's end, outside the field\n (DqOverdragen \"Nieuw team\"). */\n.cn-search-select :deep(.v-select) {\n\twidth: 100%;\n}\n\n/* The magnifier sits where the chevron was: in the field, at its end. */\n.cn-search-select__magnifier {\n\tposition: absolute;\n\tinset-inline-end: 12px;\n\tbottom: 0;\n\theight: var(--default-clickable-area, 34px);\n\tdisplay: flex;\n\talign-items: center;\n\tz-index: 1;\n\tcolor: var(--color-text-maxcontrast);\n\tpointer-events: none;\n}\n\n.cn-search-select :deep(.vs__open-indicator),\n.cn-search-select :deep(.vs__open-indicator-button) {\n\tdisplay: none;\n}\n\n.cn-search-select :deep(.vs__actions) {\n\tpadding-inline-end: 36px;\n}\n\n.cn-search-select__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\twidth: 100%;\n\tmin-width: 0;\n\tpadding: 4px 0;\n}\n\n.cn-search-select__lead {\n\tflex: 0 0 32px;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 50%;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-size: 13px;\n\tfont-weight: 600;\n}\n\n.cn-search-select__text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-search-select__name {\n\tfont-weight: 600;\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__secondary {\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__check {\n\tflex: 0 0 auto;\n\tcolor: var(--color-primary-element);\n}\n</style>\n"],"names":["CnIcon","t"],"mappings":";;;;;;;AAsDA;;;;AAIC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;AAEtB,CAAA,UAAU,EAAE,EAAE,KAAK,UAAEA,UAAM,EAAE,OAAO,EAAE,UAAU;;AAEhD,CAAA,KAAK,EAAE;AACN;EACA,UAAU,EAAE;GACX,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;GAC9B,OAAO,EAAE,IAAI;GACb;;AAED;;AAEC;;;AAGD,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,KAAK;AACX,GAAA,OAAO,EAAE,MAAM,EAAE;GACjB;;AAED;EACA,UAAU,EAAE;GACX,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;;EAGD,YAAY,EAAE;GACb,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,SAAS;GAClB;;AAED;EACA,WAAW,EAAE;GACZ,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;;AAGD,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;;EAGD,SAAS,EAAE;GACV,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,IAAI;GACb;;AAED;AACA,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;;EAGD,U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,MAAM,CAAA,KAAM,EAAC,IAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAE,KAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAA;GACtH;;AAED;AACC;;AAED,EAAA,OAAO,CAAC,MAAM,EAAE;GACf,MAAM,EAAG,GAAE,MAAO,IAAG,MAAM,CAAC,EAAC,IAAK,MAAM,CAAC,SAAS,IAAI,IAAI,KAAG;AAC7D;AACA,GAAA,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,EAAA;GAClC;;AAED;AACC;;AAED,EAAA,QAAQ,CAAC,KAAK,EAAE;;GAEf,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAA;GAC1B;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnSearchSelect.vue2.js","sources":["../../../../src/components/CnSearchSelect/CnSearchSelect.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<div class=\"cn-search-select\" :class=\"{ 'cn-search-select--label-outside': labelOutside }\" data-testid=\"cn-search-select\">\n\t\t<NcSelect\n\t\t\t:inputId=\"inputId\"\n\t\t\t:inputLabel=\"inputLabel\"\n\t\t\t:labelOutside=\"labelOutside\"\n\t\t\t:modelValue=\"selectedOption\"\n\t\t\t:options=\"options\"\n\t\t\t:loading=\"loading\"\n\t\t\t:clearable=\"clearable\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:placeholder=\"resolvedPlaceholder\"\n\t\t\t:filterable=\"filterable\"\n\t\t\tlabel=\"label\"\n\t\t\t@search=\"onSearch\"\n\t\t\t@update:modelValue=\"onInput\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span class=\"cn-search-select__row\" data-testid=\"cn-search-select-row\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-if=\"option.avatar || option.icon\"\n\t\t\t\t\t\tclass=\"cn-search-select__lead\"\n\t\t\t\t\t\t:class=\"{ 'cn-search-select__lead--avatar': option.avatar && !option.icon }\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<CnIcon v-if=\"option.icon\" :name=\"option.icon\" :size=\"18\" />\n\t\t\t\t\t\t<template v-else>{{ initialsOf(option) }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-search-select__text\">\n\t\t\t\t\t\t<span class=\"cn-search-select__name\">{{ option.label }}</span>\n\t\t\t\t\t\t<span v-if=\"option.secondary\" class=\"cn-search-select__secondary\">{{ option.secondary }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Check\n\t\t\t\t\t\tv-if=\"isSelected(option)\"\n\t\t\t\t\t\tclass=\"cn-search-select__check\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\tdata-testid=\"cn-search-select-check\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<Magnify class=\"cn-search-select__magnifier\" :size=\"18\" aria-hidden=\"true\" />\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcSelect } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport Magnify from 'vue-material-design-icons/Magnify.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport { initialsOf } from '../../utils/initials.js'\n\n/**\n * CnSearchSelect — a single picker drawn as a search field: a magnifier\n * instead of the chevron, and results as rows with an icon or initials, a\n * name, a secondary line and a check on the chosen one (boards DqOverdragen\n * \"Nieuw team\", DqNieuweZaak \"Aanvrager\").\n *\n * Each option is `{ id, label, secondary?, icon?, avatar? }`: `icon` names a\n * CnIcon, `avatar: true` draws the label's initials in a circle. The value is\n * the option's `id` (or `value`); `update:modelValue` emits that id, or null\n * when cleared. Searching is the host's: listen to `search` and pass new\n * `options`, with `filterable: false` when the host already filtered them.\n *\n * ```vue\n * <CnSearchSelect\n * v-model=\"team\"\n * inputLabel=\"Nieuw team\"\n * :options=\"[{ id: 'legal', label: 'Juridische zaken', secondary: '6 leden · bezwaar, beroep en Woo-advies', avatar: true }]\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchSelect',\n\n\tcomponents: { Check, CnIcon, Magnify, NcSelect },\n\n\tprops: {\n\t\t/** The chosen option's id, or the option itself. */\n\t\tmodelValue: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The options: `{ id, label, secondary?, icon?, avatar? }`.\n\t\t *\n\t\t * @type {Array<{id: (string|number), label: string, secondary?: string, icon?: string, avatar?: boolean}>}\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The field's label. */\n\t\tinputLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Draw the label above the field instead of inside it. */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** The input's id. */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/** Placeholder text; defaults to \"Search…\". */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Show the loading spinner. */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Offer a clear button. */\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Disable the field. */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Filter the options on the typed text; false when the host searches. */\n\t\tfilterable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: ['update:modelValue', 'search'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The option matching `modelValue`, or a bare one carrying it.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tselectedOption() {\n\t\t\tconst value = this.modelValue\n\t\t\tif (value === null || value === undefined || value === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof value === 'object') {\n\t\t\t\treturn value\n\t\t\t}\n\t\t\treturn this.options.find((o) => this.idOf(o) === String(value)) || { id: value, label: String(value) }\n\t\t},\n\n\t\t/** @return {string} The placeholder. */\n\t\tresolvedPlaceholder() {\n\t\t\treturn this.placeholder || t('nextcloud-vue', 'Search…')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tinitialsOf(option) {\n\t\t\treturn initialsOf(option.label || '')\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {string} Its id as a string, '' without one.\n\t\t */\n\t\tidOf(option) {\n\t\t\tconst id = option && (option.id ?? option.value)\n\t\t\treturn id === null || id === undefined ? '' : String(id)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {boolean} Whether it is the chosen one.\n\t\t */\n\t\tisSelected(option) {\n\t\t\treturn this.selectedOption !== null && this.idOf(option) !== '' && this.idOf(option) === this.idOf(this.selectedOption)\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked option.\n\t\t */\n\t\tonInput(option) {\n\t\t\tconst id = option ? (option.id ?? option.value ?? null) : null\n\t\t\t/** @event update:modelValue The picked option's id, or null when cleared. */\n\t\t\tthis.$emit('update:modelValue', id)\n\t\t},\n\n\t\t/**\n\t\t * @param {string} query The typed text.\n\t\t */\n\t\tonSearch(query) {\n\t\t\t/** @event search The typed text, for a host that searches itself. */\n\t\t\tthis.$emit('search', query)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-select {\n\tposition: relative;\n}\n\n/* The field takes the row: NcSelect is an inline block of at least 260px,\n which left the magnifier, placed at the row's end, outside the field\n (DqOverdragen \"Nieuw team\"). */\n.cn-search-select :deep(.v-select) {\n\twidth: 100%;\n}\n\n/* The magnifier sits where the chevron was: in the field, at its end. */\n.cn-search-select__magnifier {\n\tposition: absolute;\n\tinset-inline-end: 12px;\n\tbottom: 0;\n\theight: var(--default-clickable-area, 34px);\n\tdisplay: flex;\n\talign-items: center;\n\tz-index: 1;\n\tcolor: var(--color-text-maxcontrast);\n\tpointer-events: none;\n}\n\n.cn-search-select :deep(.vs__open-indicator),\n.cn-search-select :deep(.vs__open-indicator-button) {\n\tdisplay: none;\n}\n\n.cn-search-select :deep(.vs__actions) {\n\tpadding-inline-end: 36px;\n}\n\n.cn-search-select__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\twidth: 100%;\n\tmin-width: 0;\n\tpadding: 0;\n}\n\n.cn-search-select__lead {\n\tflex: 0 0 32px;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 50%;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-size: 13px;\n\tfont-weight: 600;\n}\n\n.cn-search-select__text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-search-select__name {\n\tfont-weight: 600;\n\tline-height: normal;\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__secondary {\n\tfont-size: 13px;\n\tline-height: normal;\n\tcolor: var(--color-text-maxcontrast);\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__check {\n\tflex: 0 0 auto;\n\tcolor: var(--color-primary-element);\n}\n</style>\n"],"names":["CnIcon","t"],"mappings":";;;;;;;AAsDA;;;;AAIC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;AAEtB,CAAA,UAAU,EAAE,EAAE,KAAK,UAAEA,UAAM,EAAE,OAAO,EAAE,UAAU;;AAEhD,CAAA,KAAK,EAAE;AACN;EACA,UAAU,EAAE;GACX,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,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earchSelect/CnSearchSelect.vue?vue&type=template&id=aaa45660&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-search-select\" :class=\"{ 'cn-search-select--label-outside': labelOutside }\" data-testid=\"cn-search-select\">\n\t\t<NcSelect\n\t\t\t:inputId=\"inputId\"\n\t\t\t:inputLabel=\"inputLabel\"\n\t\t\t:labelOutside=\"labelOutside\"\n\t\t\t:modelValue=\"selectedOption\"\n\t\t\t:options=\"options\"\n\t\t\t:loading=\"loading\"\n\t\t\t:clearable=\"clearable\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:placeholder=\"resolvedPlaceholder\"\n\t\t\t:filterable=\"filterable\"\n\t\t\tlabel=\"label\"\n\t\t\t@search=\"onSearch\"\n\t\t\t@update:modelValue=\"onInput\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span class=\"cn-search-select__row\" data-testid=\"cn-search-select-row\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-if=\"option.avatar || option.icon\"\n\t\t\t\t\t\tclass=\"cn-search-select__lead\"\n\t\t\t\t\t\t:class=\"{ 'cn-search-select__lead--avatar': option.avatar && !option.icon }\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<CnIcon v-if=\"option.icon\" :name=\"option.icon\" :size=\"18\" />\n\t\t\t\t\t\t<template v-else>{{ initialsOf(option) }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-search-select__text\">\n\t\t\t\t\t\t<span class=\"cn-search-select__name\">{{ option.label }}</span>\n\t\t\t\t\t\t<span v-if=\"option.secondary\" class=\"cn-search-select__secondary\">{{ option.secondary }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Check\n\t\t\t\t\t\tv-if=\"isSelected(option)\"\n\t\t\t\t\t\tclass=\"cn-search-select__check\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\tdata-testid=\"cn-search-select-check\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<Magnify class=\"cn-search-select__magnifier\" :size=\"18\" aria-hidden=\"true\" />\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcSelect } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport Magnify from 'vue-material-design-icons/Magnify.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport { initialsOf } from '../../utils/initials.js'\n\n/**\n * CnSearchSelect — a single picker drawn as a search field: a magnifier\n * instead of the chevron, and results as rows with an icon or initials, a\n * name, a secondary line and a check on the chosen one (boards DqOverdragen\n * \"Nieuw team\", DqNieuweZaak \"Aanvrager\").\n *\n * Each option is `{ id, label, secondary?, icon?, avatar? }`: `icon` names a\n * CnIcon, `avatar: true` draws the label's initials in a circle. The value is\n * the option's `id` (or `value`); `update:modelValue` emits that id, or null\n * when cleared. Searching is the host's: listen to `search` and pass new\n * `options`, with `filterable: false` when the host already filtered them.\n *\n * ```vue\n * <CnSearchSelect\n * v-model=\"team\"\n * inputLabel=\"Nieuw team\"\n * :options=\"[{ id: 'legal', label: 'Juridische zaken', secondary: '6 leden · bezwaar, beroep en Woo-advies', avatar: true }]\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchSelect',\n\n\tcomponents: { Check, CnIcon, Magnify, NcSelect },\n\n\tprops: {\n\t\t/** The chosen option's id, or the option itself. */\n\t\tmodelValue: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The options: `{ id, label, secondary?, icon?, avatar? }`.\n\t\t *\n\t\t * @type {Array<{id: (string|number), label: string, secondary?: string, icon?: string, avatar?: boolean}>}\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The field's label. */\n\t\tinputLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Draw the label above the field instead of inside it. */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** The input's id. */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/** Placeholder text; defaults to \"Search…\". */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Show the loading spinner. */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Offer a clear button. */\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Disable the field. */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Filter the options on the typed text; false when the host searches. */\n\t\tfilterable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: ['update:modelValue', 'search'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The option matching `modelValue`, or a bare one carrying it.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tselectedOption() {\n\t\t\tconst value = this.modelValue\n\t\t\tif (value === null || value === undefined || value === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof value === 'object') {\n\t\t\t\treturn value\n\t\t\t}\n\t\t\treturn this.options.find((o) => this.idOf(o) === String(value)) || { id: value, label: String(value) }\n\t\t},\n\n\t\t/** @return {string} The placeholder. */\n\t\tresolvedPlaceholder() {\n\t\t\treturn this.placeholder || t('nextcloud-vue', 'Search…')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tinitialsOf(option) {\n\t\t\treturn initialsOf(option.label || '')\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {string} Its id as a string, '' without one.\n\t\t */\n\t\tidOf(option) {\n\t\t\tconst id = option && (option.id ?? option.value)\n\t\t\treturn id === null || id === undefined ? '' : String(id)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {boolean} Whether it is the chosen one.\n\t\t */\n\t\tisSelected(option) {\n\t\t\treturn this.selectedOption !== null && this.idOf(option) !== '' && this.idOf(option) === this.idOf(this.selectedOption)\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked option.\n\t\t */\n\t\tonInput(option) {\n\t\t\tconst id = option ? (option.id ?? option.value ?? null) : null\n\t\t\t/** @event update:modelValue The picked option's id, or null when cleared. */\n\t\t\tthis.$emit('update:modelValue', id)\n\t\t},\n\n\t\t/**\n\t\t * @param {string} query The typed text.\n\t\t */\n\t\tonSearch(query) {\n\t\t\t/** @event search The typed text, for a host that searches itself. */\n\t\t\tthis.$emit('search', query)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-select {\n\tposition: relative;\n}\n\n/* The field takes the row: NcSelect is an inline block of at least 260px,\n which left the magnifier, placed at the row's end, outside the field\n (DqOverdragen \"Nieuw team\"). */\n.cn-search-select :deep(.v-select) {\n\twidth: 100%;\n}\n\n/* The magnifier sits where the chevron was: in the field, at its end. */\n.cn-search-select__magnifier {\n\tposition: absolute;\n\tinset-inline-end: 12px;\n\tbottom: 0;\n\theight: var(--default-clickable-area, 34px);\n\tdisplay: flex;\n\talign-items: center;\n\tz-index: 1;\n\tcolor: var(--color-text-maxcontrast);\n\tpointer-events: none;\n}\n\n.cn-search-select :deep(.vs__open-indicator),\n.cn-search-select :deep(.vs__open-indicator-button) {\n\tdisplay: none;\n}\n\n.cn-search-select :deep(.vs__actions) {\n\tpadding-inline-end: 36px;\n}\n\n.cn-search-select__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\twidth: 100%;\n\tmin-width: 0;\n\tpadding: 4px 0;\n}\n\n.cn-search-select__lead {\n\tflex: 0 0 32px;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 50%;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-size: 13px;\n\tfont-weight: 600;\n}\n\n.cn-search-select__text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-search-select__name {\n\tfont-weight: 600;\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__secondary {\n\tfont-size: 13px;\n\tcolor: var(--color-text-maxcontrast);\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__check {\n\tflex: 0 0 auto;\n\tcolor: var(--color-primary-element);\n}\n</style>\n"],"names":["_normalizeClass","_withCtx","_createElementVNode","_createElementBlock","_createBlock","_Fragment","_createTextVNode","_toDisplayString","_openBlock"],"mappings":";;;AAyBU,EAAA,KAAM,EAAA,uBAAuB;AAAC,EAAA,aAAW,EAAC,sBAAsB;;AAShE,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,wBAAA,GAAA;AACE,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAY,GAAA;;;AACM,EAAA,KAAA,EAAA,6BAAA;;;;;;;;;;IA3B9B,KAAK,EAAAA,cAAA,CAAA,CAAC,kBAAkB,EAAA,EAAA,iCAAA,EAAA,MAAA,CAAA,YAAA,EAAA,CAAA,CAAA;AAAA,IAAA,aAAA,EAAA,kBAAA;;;AAE1B,MAAA,OAAO,EAAE,MAAO,CAAA,OAAA;AAChB,MAAA,UAAU,EAAE,MAAI,CAAA,UAAA;AAChB,MAAA,YAAY,EAAE,MAAM,CAAA,YAAA;AACpB,MAAA,UAAU,EAAE,QAAM,CAAA,cAAA;AAClB,MAAA,OAAO,EAAE,MAAO,CAAA,OAAA;AAChB,MAAA,OAAO,EAAE,MAAO,CAAA,OAAA;AAChB,MAAA,SAAS,EAAE,MAAA,CAAA,SAAA;AACX,MAAA,QAAQ,EAAE,MAAM,CAAA,QAAA;AAChB,MAAA,WAAW,EAAE,QAAc,CAAA,mBAAA;AA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gBAAA,EAAA;;AAFvC,gBAAA,KAAK,EAAC,yBAAC;AACN,gBAAA,IAAI,EAAC,EAAA;AACN,gBAAA,aAAW,EAAC,wBAAwB;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnSearchSelect.vue3.js","sources":["../../../../src/components/CnSearchSelect/CnSearchSelect.vue?vue&type=template&id=29601046&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-search-select\" :class=\"{ 'cn-search-select--label-outside': labelOutside }\" data-testid=\"cn-search-select\">\n\t\t<NcSelect\n\t\t\t:inputId=\"inputId\"\n\t\t\t:inputLabel=\"inputLabel\"\n\t\t\t:labelOutside=\"labelOutside\"\n\t\t\t:modelValue=\"selectedOption\"\n\t\t\t:options=\"options\"\n\t\t\t:loading=\"loading\"\n\t\t\t:clearable=\"clearable\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:placeholder=\"resolvedPlaceholder\"\n\t\t\t:filterable=\"filterable\"\n\t\t\tlabel=\"label\"\n\t\t\t@search=\"onSearch\"\n\t\t\t@update:modelValue=\"onInput\">\n\t\t\t<template #option=\"option\">\n\t\t\t\t<span class=\"cn-search-select__row\" data-testid=\"cn-search-select-row\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tv-if=\"option.avatar || option.icon\"\n\t\t\t\t\t\tclass=\"cn-search-select__lead\"\n\t\t\t\t\t\t:class=\"{ 'cn-search-select__lead--avatar': option.avatar && !option.icon }\"\n\t\t\t\t\t\taria-hidden=\"true\">\n\t\t\t\t\t\t<CnIcon v-if=\"option.icon\" :name=\"option.icon\" :size=\"18\" />\n\t\t\t\t\t\t<template v-else>{{ initialsOf(option) }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-search-select__text\">\n\t\t\t\t\t\t<span class=\"cn-search-select__name\">{{ option.label }}</span>\n\t\t\t\t\t\t<span v-if=\"option.secondary\" class=\"cn-search-select__secondary\">{{ option.secondary }}</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<Check\n\t\t\t\t\t\tv-if=\"isSelected(option)\"\n\t\t\t\t\t\tclass=\"cn-search-select__check\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\tdata-testid=\"cn-search-select-check\" />\n\t\t\t\t</span>\n\t\t\t</template>\n\t\t</NcSelect>\n\t\t<Magnify class=\"cn-search-select__magnifier\" :size=\"18\" aria-hidden=\"true\" />\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { NcSelect } from '@nextcloud/vue'\nimport Check from 'vue-material-design-icons/Check.vue'\nimport Magnify from 'vue-material-design-icons/Magnify.vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport { initialsOf } from '../../utils/initials.js'\n\n/**\n * CnSearchSelect — a single picker drawn as a search field: a magnifier\n * instead of the chevron, and results as rows with an icon or initials, a\n * name, a secondary line and a check on the chosen one (boards DqOverdragen\n * \"Nieuw team\", DqNieuweZaak \"Aanvrager\").\n *\n * Each option is `{ id, label, secondary?, icon?, avatar? }`: `icon` names a\n * CnIcon, `avatar: true` draws the label's initials in a circle. The value is\n * the option's `id` (or `value`); `update:modelValue` emits that id, or null\n * when cleared. Searching is the host's: listen to `search` and pass new\n * `options`, with `filterable: false` when the host already filtered them.\n *\n * ```vue\n * <CnSearchSelect\n * v-model=\"team\"\n * inputLabel=\"Nieuw team\"\n * :options=\"[{ id: 'legal', label: 'Juridische zaken', secondary: '6 leden · bezwaar, beroep en Woo-advies', avatar: true }]\" />\n * ```\n */\nexport default {\n\tname: 'CnSearchSelect',\n\n\tcomponents: { Check, CnIcon, Magnify, NcSelect },\n\n\tprops: {\n\t\t/** The chosen option's id, or the option itself. */\n\t\tmodelValue: {\n\t\t\ttype: [String, Number, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The options: `{ id, label, secondary?, icon?, avatar? }`.\n\t\t *\n\t\t * @type {Array<{id: (string|number), label: string, secondary?: string, icon?: string, avatar?: boolean}>}\n\t\t */\n\t\toptions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\n\t\t/** The field's label. */\n\t\tinputLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Draw the label above the field instead of inside it. */\n\t\tlabelOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** The input's id. */\n\t\tinputId: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/** Placeholder text; defaults to \"Search…\". */\n\t\tplaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Show the loading spinner. */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Offer a clear button. */\n\t\tclearable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/** Disable the field. */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Filter the options on the typed text; false when the host searches. */\n\t\tfilterable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\temits: ['update:modelValue', 'search'],\n\n\tcomputed: {\n\t\t/**\n\t\t * The option matching `modelValue`, or a bare one carrying it.\n\t\t *\n\t\t * @return {object|null}\n\t\t */\n\t\tselectedOption() {\n\t\t\tconst value = this.modelValue\n\t\t\tif (value === null || value === undefined || value === '') {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (typeof value === 'object') {\n\t\t\t\treturn value\n\t\t\t}\n\t\t\treturn this.options.find((o) => this.idOf(o) === String(value)) || { id: value, label: String(value) }\n\t\t},\n\n\t\t/** @return {string} The placeholder. */\n\t\tresolvedPlaceholder() {\n\t\t\treturn this.placeholder || t('nextcloud-vue', 'Search…')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tinitialsOf(option) {\n\t\t\treturn initialsOf(option.label || '')\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {string} Its id as a string, '' without one.\n\t\t */\n\t\tidOf(option) {\n\t\t\tconst id = option && (option.id ?? option.value)\n\t\t\treturn id === null || id === undefined ? '' : String(id)\n\t\t},\n\n\t\t/**\n\t\t * @param {object} option An option.\n\t\t * @return {boolean} Whether it is the chosen one.\n\t\t */\n\t\tisSelected(option) {\n\t\t\treturn this.selectedOption !== null && this.idOf(option) !== '' && this.idOf(option) === this.idOf(this.selectedOption)\n\t\t},\n\n\t\t/**\n\t\t * @param {object|null} option The picked option.\n\t\t */\n\t\tonInput(option) {\n\t\t\tconst id = option ? (option.id ?? option.value ?? null) : null\n\t\t\t/** @event update:modelValue The picked option's id, or null when cleared. */\n\t\t\tthis.$emit('update:modelValue', id)\n\t\t},\n\n\t\t/**\n\t\t * @param {string} query The typed text.\n\t\t */\n\t\tonSearch(query) {\n\t\t\t/** @event search The typed text, for a host that searches itself. */\n\t\t\tthis.$emit('search', query)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-search-select {\n\tposition: relative;\n}\n\n/* The field takes the row: NcSelect is an inline block of at least 260px,\n which left the magnifier, placed at the row's end, outside the field\n (DqOverdragen \"Nieuw team\"). */\n.cn-search-select :deep(.v-select) {\n\twidth: 100%;\n}\n\n/* The magnifier sits where the chevron was: in the field, at its end. */\n.cn-search-select__magnifier {\n\tposition: absolute;\n\tinset-inline-end: 12px;\n\tbottom: 0;\n\theight: var(--default-clickable-area, 34px);\n\tdisplay: flex;\n\talign-items: center;\n\tz-index: 1;\n\tcolor: var(--color-text-maxcontrast);\n\tpointer-events: none;\n}\n\n.cn-search-select :deep(.vs__open-indicator),\n.cn-search-select :deep(.vs__open-indicator-button) {\n\tdisplay: none;\n}\n\n.cn-search-select :deep(.vs__actions) {\n\tpadding-inline-end: 36px;\n}\n\n.cn-search-select__row {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 10px;\n\twidth: 100%;\n\tmin-width: 0;\n\tpadding: 0;\n}\n\n.cn-search-select__lead {\n\tflex: 0 0 32px;\n\twidth: 32px;\n\theight: 32px;\n\tborder-radius: 50%;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: var(--color-primary-element-light);\n\tcolor: var(--color-primary-element-light-text);\n\tfont-size: 13px;\n\tfont-weight: 600;\n}\n\n.cn-search-select__text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-search-select__name {\n\tfont-weight: 600;\n\tline-height: normal;\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__secondary {\n\tfont-size: 13px;\n\tline-height: normal;\n\tcolor: var(--color-text-maxcontrast);\n\toverflow-wrap: anywhere;\n}\n\n.cn-search-select__check {\n\tflex: 0 0 auto;\n\tcolor: var(--color-primary-element);\n}\n</style>\n"],"names":["_normalizeClass","_withCtx","_createElementVNode","_createElementBlock","_createBlock","_Fragment","_createTextVNode","_toDisplayString","_openBlock"],"mappings":";;;AAyBU,EAAA,KAAM,EAAA,uBAAuB;AAAC,EAAA,aAAW,EAAC,sBAAsB;;AAShE,MAAA,UAAA,GAAA,EAAA,KAAA,EAAA,wBAAA,GAAA;AACE,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,wBAAY,GAAA;;;AACM,EAAA,KAAA,EAAA,6BAAA;;;;;;;;;;IA3B9B,KAAK,EAAAA,cAAA,CAAA,CAAC,kBAAkB,EAAA,EAAA,iCAAA,EAAA,MAAA,CAAA,YAAA,EAAA,CAAA,CAAA;AAAA,IAAA,aAAA,EAAA,kBAAA;;;AAE1B,MAAA,OAAO,EAAE,MAAO,CAAA,OAAA;AAChB,MAAA,UAAU,EAAE,MAAI,CAAA,UAAA;AAChB,MAAA,YAAY,EAAE,MAAM,CAAA,YAAA;AACpB,MAAA,UAAU,EAAE,QAAM,CAAA,cAAA;AAClB,M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A5B,iBAAAC,SAAA,EAAA,EAAAL,kBAAA,CAA8B,MAA9B,EAAA,UAA8B,EAAAI,eAAA,CAAA,MAAA,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;;AAG1B,UAAA,CAAA,QAAA,CAAA,UAAA,CAAA,MAAA,CAAA;4BADJH,WAIuC,CAAA,gBAAA,EAAA;;AAFvC,gBAAA,KAAK,EAAC,yBAAC;AACN,gBAAA,IAAI,EAAC,EAAA;AACN,gBAAA,aAAW,EAAC,wBAAwB;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import script from './CnSettingsFieldsSection.vue2.js';
2
2
  import { render } from './CnSettingsFieldsSection.vue3.js';
3
3
 
4
4
  script.render = render;
5
- script.__scopeId = "data-v-336ee94a";
5
+ script.__scopeId = "data-v-01983e55";
6
6
  const __sfc_main = script;
7
7
 
8
8
  export { __sfc_main as default };
@@ -601,7 +601,17 @@ var script = {
601
601
  * @return {Array<object>}
602
602
  */
603
603
  mainFields() {
604
- return this.visibleFields.filter((field) => field.advanced !== true)
604
+ return this.visibleFields.filter((field) => field.advanced !== true && !this.inSaveRow(field))
605
+ },
606
+
607
+ /**
608
+ * The visible action fields drawn in the save row, beside Save.
609
+ *
610
+ * @return {Array<object>}
611
+ * @spec openspec/changes/settings-action-in-save-row/specs/settings-action-in-save-row/spec.md#requirement-an-action-field-can-stand-beside-save
612
+ */
613
+ saveRowFields() {
614
+ return this.visibleFields.filter((field) => field.advanced !== true && this.inSaveRow(field))
605
615
  },
606
616
 
607
617
  /**
@@ -731,6 +741,19 @@ var script = {
731
741
  return Object.hasOwn(this.form, key) ? this.form[key] : literalFirst(this.values, key)
732
742
  },
733
743
 
744
+ /**
745
+ * Whether an action field stands in the save row: it asks for
746
+ * `placement: 'save'` and the form draws a save row at all.
747
+ *
748
+ * @param {object} field The field.
749
+ * @return {boolean}
750
+ * @spec openspec/changes/settings-action-in-save-row/specs/settings-action-in-save-row/spec.md#requirement-an-action-field-can-stand-beside-save
751
+ */
752
+ inSaveRow(field) {
753
+ return field.type === 'action' && field.placement === 'save'
754
+ && !this.autoSave && this.hasInputs && !this.inlineSave
755
+ },
756
+
734
757
  /**
735
758
  * Whether a field's `visibleWhen` holds; a field without one is always shown.
736
759
  *