@conduction/nextcloud-vue 2.155.0 → 2.156.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 (45) 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/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  5. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  6. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  7. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +13 -4
  8. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
  9. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
  10. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue.js +1 -1
  11. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js +91 -7
  12. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue2.js.map +1 -1
  13. package/dist/esm/components/CnLinkedWidget/CnLinkedWidget.vue3.js.map +1 -1
  14. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue2.js +25 -0
  15. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue2.js.map +1 -1
  16. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue3.js +40 -8
  17. package/dist/esm/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue3.js.map +1 -1
  18. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js +10 -0
  19. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue2.js.map +1 -1
  20. package/dist/esm/components/CnSchemaFormDialog/CnSchemaFormDialog.vue3.js.map +1 -1
  21. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue.js +1 -1
  22. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js +24 -1
  23. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue2.js.map +1 -1
  24. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js +9 -0
  25. package/dist/esm/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue3.js.map +1 -1
  26. package/dist/esm/l10n/en.json.js +12 -7
  27. package/dist/esm/l10n/en.json.js.map +1 -1
  28. package/dist/esm/l10n/nl.json.js +14 -9
  29. package/dist/esm/l10n/nl.json.js.map +1 -1
  30. package/dist/esm/library-style.js +1 -1
  31. package/dist/esm/nextcloud-vue.css +110 -94
  32. package/dist/nextcloud-vue.cjs.js +1643 -1442
  33. package/dist/nextcloud-vue.cjs.js.map +2 -2
  34. package/dist/nextcloud-vue.css +110 -94
  35. package/l10n/en.json +12 -7
  36. package/l10n/nl.json +14 -9
  37. package/package.json +1 -1
  38. package/src/components/CnAiCompanion/CnAiInput.vue +3 -1
  39. package/src/components/CnDashboardPage/CnDashboardPage.vue +3 -1
  40. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +13 -4
  41. package/src/components/CnLinkedWidget/CnLinkedWidget.vue +91 -7
  42. package/src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue +42 -0
  43. package/src/components/CnSchemaFormDialog/CnSchemaFormDialog.vue +10 -0
  44. package/src/components/CnSettingsFieldsSection/CnSettingsFieldsSection.vue +37 -1
  45. package/src/css/look-board.css +11 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CnLinkedWidget.vue2.js","sources":["../../../../src/components/CnLinkedWidget/CnLinkedWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-linked-widget\" data-testid=\"cn-linked-widget\">\n\t\t<ul v-if=\"linkedRows.length > 0\" class=\"cn-linked-widget__rows\">\n\t\t\t<li\n\t\t\t\tv-for=\"row in linkedRows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\tclass=\"cn-linked-widget__row\"\n\t\t\t\tdata-testid=\"cn-linked-row\">\n\t\t\t\t<a v-if=\"row.href\" :href=\"row.href\" class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</a>\n\t\t\t\t<button\n\t\t\t\t\tv-else-if=\"row.run\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-linked-widget__link\"\n\t\t\t\t\t@click=\"row.run()\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</button>\n\t\t\t\t<span v-else class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- A div, not a p: a theme's paragraph rule would draw the muted\n\t\t 13px line at body size. -->\n\t\t<div v-if=\"emptyLine\" class=\"cn-linked-widget__empty\" data-testid=\"cn-linked-empty\">\n\t\t\t{{ emptyLine }}\n\t\t</div>\n\t\t<span v-if=\"emptyActions.length > 0\" class=\"cn-linked-widget__actions\">\n\t\t\t<button\n\t\t\t\tv-for=\"action in emptyActions\"\n\t\t\t\t:key=\"action.key\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-linked-widget__action\"\n\t\t\t\tdata-testid=\"cn-linked-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</span>\n\t\t<!-- The leaves run here, unseen: each reads its own data and reports\n\t\t a summary through `onSummary`; this card draws the rows. -->\n\t\t<div hidden class=\"cn-linked-widget__leaves\">\n\t\t\t<CnLeafMountHost\n\t\t\t\tv-for=\"provider in providers\"\n\t\t\t\t:key=\"provider.id\"\n\t\t\t\t:provider=\"provider\"\n\t\t\t\t:mountProps=\"mountPropsById[provider.id]\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { getLanguage, translate as t } from '@nextcloud/l10n'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnLeafMountHost from '../CnLeafMountHost/CnLeafMountHost.vue'\nimport { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'\n\n/**\n * Join nouns as a sentence list in the user's language (\"a, b en c\").\n *\n * @param {string[]} items The nouns.\n * @return {string} The list.\n */\nfunction joinList(items) {\n\ttry {\n\t\treturn new Intl.ListFormat((getLanguage() || 'en').replace('_', '-'), { style: 'long', type: 'conjunction' }).format(items)\n\t} catch {\n\t\treturn items.join(', ')\n\t}\n}\n\n/**\n * CnLinkedWidget — the `linked` widget: one card that lists what other apps\n * hold for this record (DqZaak \"Gekoppeld\").\n *\n * `content.leaves` names the mount-mode integration leaves, in order. Each is\n * mounted out of sight with an `onSummary(summary)` prop and reports\n * `{ count, noun, rows?, actions? }`: a leaf with something linked draws its\n * rows (`{ label, href?, run?, icon? }`); the leaves with nothing linked share\n * one line (\"Leges, contract en projecten: niets gekoppeld\") followed by their\n * actions. A leaf whose app is absent is not registered and is left out.\n *\n * @spec openspec/changes/linked-integrations-card/specs/linked-integrations-card/spec.md#requirement-one-card-lists-the-linked-integrations-of-a-record\n */\nexport default {\n\tname: 'CnLinkedWidget',\n\n\tcomponents: { CnIcon, CnLeafMountHost },\n\n\tprops: {\n\t\t/** `{ leaves: string[] }`: the integration ids, in the order to list them. */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's register. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's schema. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst { integrations, getById } = useIntegrationRegistry()\n\t\treturn { integrations, getById }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** The latest summary each leaf reported, by integration id. */\n\t\t\tsummaries: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {string[]} The configured leaf ids. */\n\t\tleafIds() {\n\t\t\tconst leaves = this.content && this.content.leaves\n\t\t\treturn Array.isArray(leaves) ? leaves.filter((id) => typeof id === 'string' && id !== '') : []\n\t\t},\n\n\t\t/** @return {object[]} The registered mount-mode providers, in the configured order. */\n\t\tproviders() {\n\t\t\t// Read so a leaf that registers after this card renders still joins it.\n\t\t\tvoid this.integrations\n\t\t\treturn this.leafIds\n\t\t\t\t.map((id) => this.getById(id))\n\t\t\t\t.filter((p) => p && p.renderMode === 'mount' && typeof p.mount === 'function' && typeof p.unmount === 'function')\n\t\t},\n\n\t\t/** @return {object} The mount props per leaf. */\n\t\tmountPropsById() {\n\t\t\tconst context = { register: this.register, schema: this.schema, objectId: String(this.objectId || '') }\n\t\t\tconst out = {}\n\t\t\tfor (const provider of this.providers) {\n\t\t\t\tout[provider.id] = {\n\t\t\t\t\tsurface: 'detail-page',\n\t\t\t\t\t...context,\n\t\t\t\t\tintegrationContext: { ...context },\n\t\t\t\t\tonSummary: (summary) => this.onSummary(provider.id, summary),\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {Array<{id: string, summary: object}>} The reported summaries, in order. */\n\t\treported() {\n\t\t\treturn this.providers\n\t\t\t\t.filter((p) => this.summaries[p.id])\n\t\t\t\t.map((p) => ({ id: p.id, summary: this.summaries[p.id] }))\n\t\t},\n\n\t\t/** @return {object[]} The rows of the leaves that have something linked. */\n\t\tlinkedRows() {\n\t\t\tconst rows = []\n\t\t\tfor (const { id, summary } of this.reported) {\n\t\t\t\tif (summary.count <= 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst own = summary.rows.length > 0\n\t\t\t\t\t? summary.rows\n\t\t\t\t\t: [{ label: `${summary.noun} (${summary.count})` }]\n\t\t\t\town.forEach((row, index) => rows.push({ ...row, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn rows\n\t\t},\n\n\t\t/** @return {object[]} The leaves with nothing linked. */\n\t\temptyLeaves() {\n\t\t\treturn this.reported.filter(({ summary }) => summary.count <= 0)\n\t\t},\n\n\t\t/** @return {string} \"Leges, contract en projecten: niets gekoppeld\", or ''. */\n\t\temptyLine() {\n\t\t\tconst nouns = this.emptyLeaves.map(({ summary }) => summary.noun).filter((noun) => noun !== '')\n\t\t\tif (nouns.length === 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst list = joinList(nouns)\n\t\t\treturn t('nextcloud-vue', '{things}: nothing linked', { things: list.charAt(0).toUpperCase() + list.slice(1) })\n\t\t},\n\n\t\t/** @return {object[]} The actions of the leaves with nothing linked. */\n\t\temptyActions() {\n\t\t\tconst actions = []\n\t\t\tfor (const { id, summary } of this.emptyLeaves) {\n\t\t\t\tsummary.actions.forEach((action, index) => actions.push({ ...action, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn actions\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Keep a leaf's summary, normalised.\n\t\t *\n\t\t * @param {string} id The integration id.\n\t\t * @param {{count?: number, noun?: string, rows?: Array, actions?: Array}} summary What the leaf reported.\n\t\t */\n\t\tonSummary(id, summary) {\n\t\t\tconst s = summary && typeof summary === 'object' ? summary : {}\n\t\t\tconst usableRow = (row) => row && typeof row.label === 'string' && row.label !== ''\n\t\t\tconst usableAction = (action) => action && typeof action.run === 'function' && typeof action.label === 'string' && action.label !== ''\n\t\t\tthis.summaries = {\n\t\t\t\t...this.summaries,\n\t\t\t\t[id]: {\n\t\t\t\t\tcount: Number.isFinite(s.count) ? s.count : 0,\n\t\t\t\t\tnoun: typeof s.noun === 'string' ? s.noun : '',\n\t\t\t\t\trows: Array.isArray(s.rows) ? s.rows.filter(usableRow) : [],\n\t\t\t\t\tactions: Array.isArray(s.actions) ? s.actions.filter(usableAction) : [],\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-linked-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n}\n\n.cn-linked-widget__rows {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-linked-widget__link {\n\talign-items: center;\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-main-text);\n\tdisplay: flex;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tgap: 10px;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-align: start;\n}\n\na.cn-linked-widget__link,\nbutton.cn-linked-widget__link {\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\ttext-decoration: underline;\n}\n\n.cn-linked-widget__empty {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tmargin: 0;\n}\n\n.cn-linked-widget__actions {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n}\n\n.cn-linked-widget__action {\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-decoration: underline;\n}\n</style>\n"],"names":["CnIcon","CnLeafMountHost","t"],"mappings":";;;;;AA6EA;;AAEC;AACA;;;AAGD,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxB,CAAA,IAAI;EACH,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,EAAC,IAAK,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAc,EAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA;AAC3H,EAAA,CAAE,MAAM;AACP,EAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA;AACvB,EAAA;AACD,CAAA;;AAEA;AACC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;AAEtB,CAAA,UAAU,EAAE,UAAEA,UAAM,mBAAEC,cAAiB;;AAEvC,CAAA,KAAK,EAAE;AACN;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;AAED;AACA,EAAA,QAAQ,EAAE;AACT,GAAA,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;GACtB,OAAO,EAAE,EAAE;GACX;;;AAGD,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;;AAGD,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;EACD;;AAED,CAAA,KAAK,GAAG;EACP,MAAM,EAAE,YAAY,EAAE,SAAU,GAAE,sBAAsB,GAAC;EACzD,OAAO,EAAE,YAAY,EAAE,OAAQ,EAAA;EAC/B;;AAED,CAAA,IA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OAAO,MAAM,CAAC,GAAI,KAAI,cAAc,OAAO,MAAM,CAAC,KAAM,KAAI,QAAO,IAAK,MAAM,CAAC,KAAM,KAAI,GAAC;AACrI,GAAA,IAAI,CAAC,YAAY;AAChB,IAAA,GAAG,IAAI,CAAC,SAAS;IACjB,CAAC,EAAE,GAAG;AACL,KAAA,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAA,GAAI,CAAC,CAAC,KAAI,GAAI,CAAC;AAC7C,KAAA,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,QAAS,GAAE,CAAC,CAAC,IAAK,GAAE,EAAE;KAC9C,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAE,GAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA,GAAI,EAAE;AAC3D,KAAA,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAE,GAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAE,GAAE,EAAE;KACvE;AACF,KAAA;GACA;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnLinkedWidget.vue2.js","sources":["../../../../src/components/CnLinkedWidget/CnLinkedWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-linked-widget\" data-testid=\"cn-linked-widget\">\n\t\t<ul v-if=\"linkedRows.length > 0\" class=\"cn-linked-widget__rows\">\n\t\t\t<li\n\t\t\t\tv-for=\"row in linkedRows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\tclass=\"cn-linked-widget__row\"\n\t\t\t\tdata-testid=\"cn-linked-row\">\n\t\t\t\t<a v-if=\"row.href\" :href=\"row.href\" class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</a>\n\t\t\t\t<button\n\t\t\t\t\tv-else-if=\"row.run\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-linked-widget__link\"\n\t\t\t\t\t@click=\"row.run()\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</button>\n\t\t\t\t<span v-else class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- A div, not a p: a theme's paragraph rule would draw the muted\n\t\t 13px line at body size. -->\n\t\t<div v-if=\"emptyLine\" class=\"cn-linked-widget__empty\" data-testid=\"cn-linked-empty\">\n\t\t\t{{ emptyLine }}\n\t\t</div>\n\t\t<span v-if=\"emptyActions.length > 0\" class=\"cn-linked-widget__actions\">\n\t\t\t<button\n\t\t\t\tv-for=\"action in emptyActions\"\n\t\t\t\t:key=\"action.key\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-linked-widget__action\"\n\t\t\t\tdata-testid=\"cn-linked-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</span>\n\t\t<!-- The leaves run here, unseen: each reads its own data and reports\n\t\t a summary through `onSummary`; this card draws the rows. -->\n\t\t<div hidden class=\"cn-linked-widget__leaves\">\n\t\t\t<CnLeafMountHost\n\t\t\t\tv-for=\"provider in providers\"\n\t\t\t\t:key=\"provider.id\"\n\t\t\t\t:provider=\"provider\"\n\t\t\t\t:mountProps=\"mountPropsById[provider.id]\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { getLanguage, translate as t } from '@nextcloud/l10n'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnLeafMountHost from '../CnLeafMountHost/CnLeafMountHost.vue'\nimport { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'\nimport { isAppInstalled } from '../../utils/appInstalled.js'\nimport { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js'\nimport { fillTemplate } from '../../utils/fillTemplate.js'\nimport { prefixUrl } from '../../utils/headers.js'\n\n/**\n * Join nouns as a sentence list in the user's language (\"a, b en c\").\n *\n * @param {string[]} items The nouns.\n * @return {string} The list.\n */\nfunction joinList(items) {\n\ttry {\n\t\treturn new Intl.ListFormat((getLanguage() || 'en').replace('_', '-'), { style: 'long', type: 'conjunction' }).format(items)\n\t} catch {\n\t\treturn items.join(', ')\n\t}\n}\n\n/**\n * CnLinkedWidget — the `linked` widget: one card that lists what other apps\n * hold for this record (DqZaak \"Gekoppeld\").\n *\n * `content.leaves` names the mount-mode integration leaves, in order. Each is\n * mounted out of sight with an `onSummary(summary)` prop and reports\n * `{ count, noun, rows?, actions? }`: a leaf with something linked draws its\n * rows (`{ label, href?, run?, icon? }`); the leaves with nothing linked share\n * one line (\"Leges, contract en projecten: niets gekoppeld\") followed by their\n * actions. A leaf whose app is absent is not registered and is left out.\n *\n * A leaf may also be a record leaf, written in the manifest instead of\n * registered by an app: `{ id, register, schema, filter?, requiredApp?, noun,\n * label, href?, icon? }`. The card reads that register's records matching\n * `filter` (`@objectId` is this record's id) and lists one row per record,\n * `label` and `href` filled from it (DqZaak \"Vraag in pipelinq\": the\n * requests whose case reference is this case). It is left out when\n * `requiredApp` is not installed. Texts go through the host translate.\n *\n * @spec openspec/changes/linked-integrations-card/specs/linked-integrations-card/spec.md#requirement-one-card-lists-the-linked-integrations-of-a-record\n */\nexport default {\n\tname: 'CnLinkedWidget',\n\n\tcomponents: { CnIcon, CnLeafMountHost },\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/** `{ leaves: Array<string|object> }`: integration ids or record leaves, in the order to list them. */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's register. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's schema. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst { integrations, getById } = useIntegrationRegistry()\n\t\treturn { integrations, getById }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** The latest summary each leaf reported, by integration id. */\n\t\t\tsummaries: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {Array<string|object>} The configured leaves. */\n\t\tleaves() {\n\t\t\tconst leaves = this.content && this.content.leaves\n\t\t\treturn Array.isArray(leaves) ? leaves : []\n\t\t},\n\n\t\t/** @return {string[]} The configured integration ids. */\n\t\tleafIds() {\n\t\t\treturn this.leaves.filter((id) => typeof id === 'string' && id !== '')\n\t\t},\n\n\t\t/** @return {object[]} The record leaves whose app is here. */\n\t\trecordLeaves() {\n\t\t\treturn this.leaves.filter((leaf) => leaf && typeof leaf === 'object' && typeof leaf.id === 'string' && leaf.id !== ''\n\t\t\t\t&& leaf.register && leaf.schema && (!leaf.requiredApp || isAppInstalled(leaf.requiredApp)))\n\t\t},\n\n\t\t/** @return {string[]} Every listed leaf's id, in the configured order. */\n\t\torderedIds() {\n\t\t\tconst providers = new Set(this.providers.map((p) => p.id))\n\t\t\tconst records = new Set(this.recordLeaves.map((leaf) => leaf.id))\n\t\t\treturn this.leaves\n\t\t\t\t.map((leaf) => (typeof leaf === 'string' ? leaf : (leaf && leaf.id)))\n\t\t\t\t.filter((id) => providers.has(id) || records.has(id))\n\t\t},\n\n\t\t/** @return {object[]} The registered mount-mode providers, in the configured order. */\n\t\tproviders() {\n\t\t\t// Read so a leaf that registers after this card renders still joins it.\n\t\t\tvoid this.integrations\n\t\t\treturn this.leafIds\n\t\t\t\t.map((id) => this.getById(id))\n\t\t\t\t.filter((p) => p && p.renderMode === 'mount' && typeof p.mount === 'function' && typeof p.unmount === 'function')\n\t\t},\n\n\t\t/** @return {object} The mount props per leaf. */\n\t\tmountPropsById() {\n\t\t\tconst context = { register: this.register, schema: this.schema, objectId: String(this.objectId || '') }\n\t\t\tconst out = {}\n\t\t\tfor (const provider of this.providers) {\n\t\t\t\tout[provider.id] = {\n\t\t\t\t\tsurface: 'detail-page',\n\t\t\t\t\t...context,\n\t\t\t\t\tintegrationContext: { ...context },\n\t\t\t\t\tonSummary: (summary) => this.onSummary(provider.id, summary),\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {Array<{id: string, summary: object}>} The reported summaries, in order. */\n\t\treported() {\n\t\t\treturn this.orderedIds\n\t\t\t\t.filter((id) => this.summaries[id])\n\t\t\t\t.map((id) => ({ id, summary: this.summaries[id] }))\n\t\t},\n\n\t\t/** @return {object[]} The rows of the leaves that have something linked. */\n\t\tlinkedRows() {\n\t\t\tconst rows = []\n\t\t\tfor (const { id, summary } of this.reported) {\n\t\t\t\tif (summary.count <= 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst own = summary.rows.length > 0\n\t\t\t\t\t? summary.rows\n\t\t\t\t\t: [{ label: `${summary.noun} (${summary.count})` }]\n\t\t\t\town.forEach((row, index) => rows.push({ ...row, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn rows\n\t\t},\n\n\t\t/** @return {object[]} The leaves with nothing linked. */\n\t\temptyLeaves() {\n\t\t\treturn this.reported.filter(({ summary }) => summary.count <= 0)\n\t\t},\n\n\t\t/** @return {string} \"Leges, contract en projecten: niets gekoppeld\", or ''. */\n\t\temptyLine() {\n\t\t\tconst nouns = this.emptyLeaves.map(({ summary }) => summary.noun).filter((noun) => noun !== '')\n\t\t\tif (nouns.length === 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst list = joinList(nouns)\n\t\t\treturn t('nextcloud-vue', '{things}: nothing linked', { things: list.charAt(0).toUpperCase() + list.slice(1) })\n\t\t},\n\n\t\t/** @return {object[]} The actions of the leaves with nothing linked. */\n\t\temptyActions() {\n\t\t\tconst actions = []\n\t\t\tfor (const { id, summary } of this.emptyLeaves) {\n\t\t\t\tsummary.actions.forEach((action, index) => actions.push({ ...action, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn actions\n\t\t},\n\t},\n\n\twatch: {\n\t\trecordLeaves: {\n\t\t\thandler() {\n\t\t\t\tthis.recordLeaves.forEach((leaf) => this.readRecordLeaf(leaf))\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\n\t\tobjectId() {\n\t\t\tthis.recordLeaves.forEach((leaf) => this.readRecordLeaf(leaf))\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Read a record leaf's records and report them as its summary. A\n\t\t * failed read reports nothing, so the leaf is not listed as empty.\n\t\t *\n\t\t * @param {object} leaf The record leaf.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync readRecordLeaf(leaf) {\n\t\t\tconst objectId = String(this.objectId || '')\n\t\t\tif (objectId === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst filter = {}\n\t\t\tfor (const [key, value] of Object.entries(leaf.filter || {})) {\n\t\t\t\tfilter[key] = value === '@objectId' ? objectId : value\n\t\t\t}\n\t\t\tlet rows\n\t\t\ttry {\n\t\t\t\trows = await fetchReferenceObjects({ register: leaf.register, schema: leaf.schema, filter, limit: leaf.limit || 20 })\n\t\t\t} catch {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst label = leaf.label ? this.cnTranslate(leaf.label) : ''\n\t\t\tthis.onSummary(leaf.id, {\n\t\t\t\tcount: rows.length,\n\t\t\t\tnoun: leaf.noun ? this.cnTranslate(leaf.noun) : '',\n\t\t\t\trows: rows.map((row) => {\n\t\t\t\t\tconst href = leaf.href ? fillTemplate(leaf.href, row) : ''\n\t\t\t\t\treturn { label: fillTemplate(label, row), href: href ? prefixUrl(href) : undefined, icon: leaf.icon || undefined }\n\t\t\t\t}),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Keep a leaf's summary, normalised.\n\t\t *\n\t\t * @param {string} id The integration id.\n\t\t * @param {{count?: number, noun?: string, rows?: Array, actions?: Array}} summary What the leaf reported.\n\t\t */\n\t\tonSummary(id, summary) {\n\t\t\tconst s = summary && typeof summary === 'object' ? summary : {}\n\t\t\tconst usableRow = (row) => row && typeof row.label === 'string' && row.label !== ''\n\t\t\tconst usableAction = (action) => action && typeof action.run === 'function' && typeof action.label === 'string' && action.label !== ''\n\t\t\tthis.summaries = {\n\t\t\t\t...this.summaries,\n\t\t\t\t[id]: {\n\t\t\t\t\tcount: Number.isFinite(s.count) ? s.count : 0,\n\t\t\t\t\tnoun: typeof s.noun === 'string' ? s.noun : '',\n\t\t\t\t\trows: Array.isArray(s.rows) ? s.rows.filter(usableRow) : [],\n\t\t\t\t\tactions: Array.isArray(s.actions) ? s.actions.filter(usableAction) : [],\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-linked-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n}\n\n.cn-linked-widget__rows {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-linked-widget__link {\n\talign-items: center;\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-main-text);\n\tdisplay: flex;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tgap: 10px;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-align: start;\n}\n\na.cn-linked-widget__link,\nbutton.cn-linked-widget__link {\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\ttext-decoration: underline;\n}\n\n.cn-linked-widget__empty {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tmargin: 0;\n}\n\n.cn-linked-widget__actions {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n}\n\n.cn-linked-widget__action {\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-decoration: underline;\n}\n</style>\n"],"names":["CnIcon","CnLeafMountHost","t"],"mappings":";;;;;;;;;AAiFA;;AAEC;AACA;;;AAGD,SAAS,QAAQ,CAAC,KAAK,EAAE;AACxB,CAAA,IAAI;EACH,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,EAAC,IAAK,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,aAAc,EAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA;AAC3H,EAAA,CAAE,MAAM;AACP,EAAA,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAA;AACvB,EAAA;AACD,CAAA;;AAEA;AACC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;AAMA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,gBAAgB;;AAEtB,CAAA,UAAU,EAAE,UAAEA,UAAM,mBAAEC,cAAiB;;AAEvC,CAAA,MAAM,EAAE;;AAEP,EAAA,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,CAAE,GAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAA,GAAI,EAAE;AAC3D,KAAA,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAE,GAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAE,GAAE,EAAE;KACvE;AACF,KAAA;GACA;EACD;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CnLinkedWidget.vue3.js","sources":["../../../../src/components/CnLinkedWidget/CnLinkedWidget.vue?vue&type=template&id=0fc31606&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-linked-widget\" data-testid=\"cn-linked-widget\">\n\t\t<ul v-if=\"linkedRows.length > 0\" class=\"cn-linked-widget__rows\">\n\t\t\t<li\n\t\t\t\tv-for=\"row in linkedRows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\tclass=\"cn-linked-widget__row\"\n\t\t\t\tdata-testid=\"cn-linked-row\">\n\t\t\t\t<a v-if=\"row.href\" :href=\"row.href\" class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</a>\n\t\t\t\t<button\n\t\t\t\t\tv-else-if=\"row.run\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-linked-widget__link\"\n\t\t\t\t\t@click=\"row.run()\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</button>\n\t\t\t\t<span v-else class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- A div, not a p: a theme's paragraph rule would draw the muted\n\t\t 13px line at body size. -->\n\t\t<div v-if=\"emptyLine\" class=\"cn-linked-widget__empty\" data-testid=\"cn-linked-empty\">\n\t\t\t{{ emptyLine }}\n\t\t</div>\n\t\t<span v-if=\"emptyActions.length > 0\" class=\"cn-linked-widget__actions\">\n\t\t\t<button\n\t\t\t\tv-for=\"action in emptyActions\"\n\t\t\t\t:key=\"action.key\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-linked-widget__action\"\n\t\t\t\tdata-testid=\"cn-linked-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</span>\n\t\t<!-- The leaves run here, unseen: each reads its own data and reports\n\t\t a summary through `onSummary`; this card draws the rows. -->\n\t\t<div hidden class=\"cn-linked-widget__leaves\">\n\t\t\t<CnLeafMountHost\n\t\t\t\tv-for=\"provider in providers\"\n\t\t\t\t:key=\"provider.id\"\n\t\t\t\t:provider=\"provider\"\n\t\t\t\t:mountProps=\"mountPropsById[provider.id]\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { getLanguage, translate as t } from '@nextcloud/l10n'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnLeafMountHost from '../CnLeafMountHost/CnLeafMountHost.vue'\nimport { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'\n\n/**\n * Join nouns as a sentence list in the user's language (\"a, b en c\").\n *\n * @param {string[]} items The nouns.\n * @return {string} The list.\n */\nfunction joinList(items) {\n\ttry {\n\t\treturn new Intl.ListFormat((getLanguage() || 'en').replace('_', '-'), { style: 'long', type: 'conjunction' }).format(items)\n\t} catch {\n\t\treturn items.join(', ')\n\t}\n}\n\n/**\n * CnLinkedWidget — the `linked` widget: one card that lists what other apps\n * hold for this record (DqZaak \"Gekoppeld\").\n *\n * `content.leaves` names the mount-mode integration leaves, in order. Each is\n * mounted out of sight with an `onSummary(summary)` prop and reports\n * `{ count, noun, rows?, actions? }`: a leaf with something linked draws its\n * rows (`{ label, href?, run?, icon? }`); the leaves with nothing linked share\n * one line (\"Leges, contract en projecten: niets gekoppeld\") followed by their\n * actions. A leaf whose app is absent is not registered and is left out.\n *\n * @spec openspec/changes/linked-integrations-card/specs/linked-integrations-card/spec.md#requirement-one-card-lists-the-linked-integrations-of-a-record\n */\nexport default {\n\tname: 'CnLinkedWidget',\n\n\tcomponents: { CnIcon, CnLeafMountHost },\n\n\tprops: {\n\t\t/** `{ leaves: string[] }`: the integration ids, in the order to list them. */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's register. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's schema. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst { integrations, getById } = useIntegrationRegistry()\n\t\treturn { integrations, getById }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** The latest summary each leaf reported, by integration id. */\n\t\t\tsummaries: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {string[]} The configured leaf ids. */\n\t\tleafIds() {\n\t\t\tconst leaves = this.content && this.content.leaves\n\t\t\treturn Array.isArray(leaves) ? leaves.filter((id) => typeof id === 'string' && id !== '') : []\n\t\t},\n\n\t\t/** @return {object[]} The registered mount-mode providers, in the configured order. */\n\t\tproviders() {\n\t\t\t// Read so a leaf that registers after this card renders still joins it.\n\t\t\tvoid this.integrations\n\t\t\treturn this.leafIds\n\t\t\t\t.map((id) => this.getById(id))\n\t\t\t\t.filter((p) => p && p.renderMode === 'mount' && typeof p.mount === 'function' && typeof p.unmount === 'function')\n\t\t},\n\n\t\t/** @return {object} The mount props per leaf. */\n\t\tmountPropsById() {\n\t\t\tconst context = { register: this.register, schema: this.schema, objectId: String(this.objectId || '') }\n\t\t\tconst out = {}\n\t\t\tfor (const provider of this.providers) {\n\t\t\t\tout[provider.id] = {\n\t\t\t\t\tsurface: 'detail-page',\n\t\t\t\t\t...context,\n\t\t\t\t\tintegrationContext: { ...context },\n\t\t\t\t\tonSummary: (summary) => this.onSummary(provider.id, summary),\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {Array<{id: string, summary: object}>} The reported summaries, in order. */\n\t\treported() {\n\t\t\treturn this.providers\n\t\t\t\t.filter((p) => this.summaries[p.id])\n\t\t\t\t.map((p) => ({ id: p.id, summary: this.summaries[p.id] }))\n\t\t},\n\n\t\t/** @return {object[]} The rows of the leaves that have something linked. */\n\t\tlinkedRows() {\n\t\t\tconst rows = []\n\t\t\tfor (const { id, summary } of this.reported) {\n\t\t\t\tif (summary.count <= 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst own = summary.rows.length > 0\n\t\t\t\t\t? summary.rows\n\t\t\t\t\t: [{ label: `${summary.noun} (${summary.count})` }]\n\t\t\t\town.forEach((row, index) => rows.push({ ...row, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn rows\n\t\t},\n\n\t\t/** @return {object[]} The leaves with nothing linked. */\n\t\temptyLeaves() {\n\t\t\treturn this.reported.filter(({ summary }) => summary.count <= 0)\n\t\t},\n\n\t\t/** @return {string} \"Leges, contract en projecten: niets gekoppeld\", or ''. */\n\t\temptyLine() {\n\t\t\tconst nouns = this.emptyLeaves.map(({ summary }) => summary.noun).filter((noun) => noun !== '')\n\t\t\tif (nouns.length === 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst list = joinList(nouns)\n\t\t\treturn t('nextcloud-vue', '{things}: nothing linked', { things: list.charAt(0).toUpperCase() + list.slice(1) })\n\t\t},\n\n\t\t/** @return {object[]} The actions of the leaves with nothing linked. */\n\t\temptyActions() {\n\t\t\tconst actions = []\n\t\t\tfor (const { id, summary } of this.emptyLeaves) {\n\t\t\t\tsummary.actions.forEach((action, index) => actions.push({ ...action, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn actions\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Keep a leaf's summary, normalised.\n\t\t *\n\t\t * @param {string} id The integration id.\n\t\t * @param {{count?: number, noun?: string, rows?: Array, actions?: Array}} summary What the leaf reported.\n\t\t */\n\t\tonSummary(id, summary) {\n\t\t\tconst s = summary && typeof summary === 'object' ? summary : {}\n\t\t\tconst usableRow = (row) => row && typeof row.label === 'string' && row.label !== ''\n\t\t\tconst usableAction = (action) => action && typeof action.run === 'function' && typeof action.label === 'string' && action.label !== ''\n\t\t\tthis.summaries = {\n\t\t\t\t...this.summaries,\n\t\t\t\t[id]: {\n\t\t\t\t\tcount: Number.isFinite(s.count) ? s.count : 0,\n\t\t\t\t\tnoun: typeof s.noun === 'string' ? s.noun : '',\n\t\t\t\t\trows: Array.isArray(s.rows) ? s.rows.filter(usableRow) : [],\n\t\t\t\t\tactions: Array.isArray(s.actions) ? s.actions.filter(usableAction) : [],\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-linked-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n}\n\n.cn-linked-widget__rows {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-linked-widget__link {\n\talign-items: center;\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-main-text);\n\tdisplay: flex;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tgap: 10px;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-align: start;\n}\n\na.cn-linked-widget__link,\nbutton.cn-linked-widget__link {\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\ttext-decoration: underline;\n}\n\n.cn-linked-widget__empty {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tmargin: 0;\n}\n\n.cn-linked-widget__actions {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n}\n\n.cn-linked-widget__action {\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-decoration: underline;\n}\n</style>\n"],"names":["_createElementBlock","_Fragment","_renderList","_createBlock","_toDisplayString","_openBlock","_createElementVNode"],"mappings":";;;AAWM,EAAA,KAAK,EAAC,kBAAkB;AAAC,EAAA,aAAC,EAAA,kBAAA;;;;AACD,EAAA,KAAA,EAAA,wBAAA;;;;;;AA0Bd,EAAA,KAAK,EAAC,wBAAG;;;;AAYF,EAAA,KAAK,EAAC,yBAAG;AAAA,EAAA,aAAA,EAAA,iBAAA;;;;AAGE,EAAA,KAAA,EAAA,2BAAA;;;;AAa5B,EAAA,MAAM,EAAN,EAAM;AAAC,EAAA,KAAK,EAAC,0BAA0B;;;;;;;;AAtDlC,IAAA,CAAA,QAAA,CAAA,UAAU,CAAC,MAAM,GAAA,CAAA;yCAmCtB,gBAAA,EAAA;4BAlCHA,kBAiCI,CAAAC,QAAA,EAAA,IAAA,EAAAC,UAAA,CAhCG,QAAA,CAAA,UAAA,EAAA,CAAA,GAAA,KAAA;iCADPF,kBAiCI,CAAA,IAAA,EAAA;cA/BF,GAAE,EAA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QAAS,CAAA,SAAA;wCAEd,CAAA,KAAA,YAAA,EAAAA,eAAA,CADF,QAAS,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;AAED,IAAA,CAAA,QAAA,CAAA,YAAY,CAAC,MAAM,GAAA,CAAA;AAA7B,SAAAC,SAAA,EAAA,EAAAL,kBAAA,CAUK,QAVL,UAUK,EAAA;8CADG,CAAAC,QAAA,EAAA,IAAA,EAAAC,UAAA,CAPS,QAAI,CAAA,YAAA,EAAA,CAAd,MAAM,KAAA;mDAOL,CAAA,QAAA,EAAA;cANP,GAAG,EAAE,MAAM,CAAC,GAAG;AAChB,cAAA,IAAI,EAAC,QAAE;AACP,cAAA,KAAI,EAAA,0BAAA;AACJ,cAAA,aAAW,EAAC,kBAAkB;qBACxB,EAAA,MAAA,KAAE,MAAM,CAAC,GAAG,EAAA,CAAA;AACf,aAAA,EAAAE,eAAA,CAAA,MAAK,CAAE,KAAK,CAAA,EAAA,CAAA,oBAAA,UAAA,CAAA,CAAA;;;;AAKf,IAAAE,kBAAA,QAAA;wBACDN,8CACG,QAAA,CAAA,SAAA,EAAA,CAAA,QAAA,KAAA;6BADHG;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CnLinkedWidget.vue3.js","sources":["../../../../src/components/CnLinkedWidget/CnLinkedWidget.vue?vue&type=template&id=744b4be8&lang.js"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div class=\"cn-linked-widget\" data-testid=\"cn-linked-widget\">\n\t\t<ul v-if=\"linkedRows.length > 0\" class=\"cn-linked-widget__rows\">\n\t\t\t<li\n\t\t\t\tv-for=\"row in linkedRows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\tclass=\"cn-linked-widget__row\"\n\t\t\t\tdata-testid=\"cn-linked-row\">\n\t\t\t\t<a v-if=\"row.href\" :href=\"row.href\" class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</a>\n\t\t\t\t<button\n\t\t\t\t\tv-else-if=\"row.run\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-linked-widget__link\"\n\t\t\t\t\t@click=\"row.run()\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</button>\n\t\t\t\t<span v-else class=\"cn-linked-widget__link\">\n\t\t\t\t\t<CnIcon\n\t\t\t\t\t\tv-if=\"row.icon\"\n\t\t\t\t\t\t:name=\"row.icon\"\n\t\t\t\t\t\t:size=\"18\"\n\t\t\t\t\t\taria-hidden=\"true\" />\n\t\t\t\t\t{{ row.label }}\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- A div, not a p: a theme's paragraph rule would draw the muted\n\t\t 13px line at body size. -->\n\t\t<div v-if=\"emptyLine\" class=\"cn-linked-widget__empty\" data-testid=\"cn-linked-empty\">\n\t\t\t{{ emptyLine }}\n\t\t</div>\n\t\t<span v-if=\"emptyActions.length > 0\" class=\"cn-linked-widget__actions\">\n\t\t\t<button\n\t\t\t\tv-for=\"action in emptyActions\"\n\t\t\t\t:key=\"action.key\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-linked-widget__action\"\n\t\t\t\tdata-testid=\"cn-linked-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</span>\n\t\t<!-- The leaves run here, unseen: each reads its own data and reports\n\t\t a summary through `onSummary`; this card draws the rows. -->\n\t\t<div hidden class=\"cn-linked-widget__leaves\">\n\t\t\t<CnLeafMountHost\n\t\t\t\tv-for=\"provider in providers\"\n\t\t\t\t:key=\"provider.id\"\n\t\t\t\t:provider=\"provider\"\n\t\t\t\t:mountProps=\"mountPropsById[provider.id]\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { getLanguage, translate as t } from '@nextcloud/l10n'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnLeafMountHost from '../CnLeafMountHost/CnLeafMountHost.vue'\nimport { useIntegrationRegistry } from '../../composables/useIntegrationRegistry.js'\nimport { isAppInstalled } from '../../utils/appInstalled.js'\nimport { fetchReferenceObjects } from '../../utils/boardReferenceColumns.js'\nimport { fillTemplate } from '../../utils/fillTemplate.js'\nimport { prefixUrl } from '../../utils/headers.js'\n\n/**\n * Join nouns as a sentence list in the user's language (\"a, b en c\").\n *\n * @param {string[]} items The nouns.\n * @return {string} The list.\n */\nfunction joinList(items) {\n\ttry {\n\t\treturn new Intl.ListFormat((getLanguage() || 'en').replace('_', '-'), { style: 'long', type: 'conjunction' }).format(items)\n\t} catch {\n\t\treturn items.join(', ')\n\t}\n}\n\n/**\n * CnLinkedWidget — the `linked` widget: one card that lists what other apps\n * hold for this record (DqZaak \"Gekoppeld\").\n *\n * `content.leaves` names the mount-mode integration leaves, in order. Each is\n * mounted out of sight with an `onSummary(summary)` prop and reports\n * `{ count, noun, rows?, actions? }`: a leaf with something linked draws its\n * rows (`{ label, href?, run?, icon? }`); the leaves with nothing linked share\n * one line (\"Leges, contract en projecten: niets gekoppeld\") followed by their\n * actions. A leaf whose app is absent is not registered and is left out.\n *\n * A leaf may also be a record leaf, written in the manifest instead of\n * registered by an app: `{ id, register, schema, filter?, requiredApp?, noun,\n * label, href?, icon? }`. The card reads that register's records matching\n * `filter` (`@objectId` is this record's id) and lists one row per record,\n * `label` and `href` filled from it (DqZaak \"Vraag in pipelinq\": the\n * requests whose case reference is this case). It is left out when\n * `requiredApp` is not installed. Texts go through the host translate.\n *\n * @spec openspec/changes/linked-integrations-card/specs/linked-integrations-card/spec.md#requirement-one-card-lists-the-linked-integrations-of-a-record\n */\nexport default {\n\tname: 'CnLinkedWidget',\n\n\tcomponents: { CnIcon, CnLeafMountHost },\n\n\tinject: {\n\t\t/** The host app's translate (CnAppRoot `cnTranslate`). */\n\t\tcnTranslate: { default: () => (key) => key },\n\t},\n\n\tprops: {\n\t\t/** `{ leaves: Array<string|object> }`: integration ids or record leaves, in the order to list them. */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** The record's id. */\n\t\tobjectId: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's register. */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** The record's schema. */\n\t\tschema: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tsetup() {\n\t\tconst { integrations, getById } = useIntegrationRegistry()\n\t\treturn { integrations, getById }\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** The latest summary each leaf reported, by integration id. */\n\t\t\tsummaries: {},\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** @return {Array<string|object>} The configured leaves. */\n\t\tleaves() {\n\t\t\tconst leaves = this.content && this.content.leaves\n\t\t\treturn Array.isArray(leaves) ? leaves : []\n\t\t},\n\n\t\t/** @return {string[]} The configured integration ids. */\n\t\tleafIds() {\n\t\t\treturn this.leaves.filter((id) => typeof id === 'string' && id !== '')\n\t\t},\n\n\t\t/** @return {object[]} The record leaves whose app is here. */\n\t\trecordLeaves() {\n\t\t\treturn this.leaves.filter((leaf) => leaf && typeof leaf === 'object' && typeof leaf.id === 'string' && leaf.id !== ''\n\t\t\t\t&& leaf.register && leaf.schema && (!leaf.requiredApp || isAppInstalled(leaf.requiredApp)))\n\t\t},\n\n\t\t/** @return {string[]} Every listed leaf's id, in the configured order. */\n\t\torderedIds() {\n\t\t\tconst providers = new Set(this.providers.map((p) => p.id))\n\t\t\tconst records = new Set(this.recordLeaves.map((leaf) => leaf.id))\n\t\t\treturn this.leaves\n\t\t\t\t.map((leaf) => (typeof leaf === 'string' ? leaf : (leaf && leaf.id)))\n\t\t\t\t.filter((id) => providers.has(id) || records.has(id))\n\t\t},\n\n\t\t/** @return {object[]} The registered mount-mode providers, in the configured order. */\n\t\tproviders() {\n\t\t\t// Read so a leaf that registers after this card renders still joins it.\n\t\t\tvoid this.integrations\n\t\t\treturn this.leafIds\n\t\t\t\t.map((id) => this.getById(id))\n\t\t\t\t.filter((p) => p && p.renderMode === 'mount' && typeof p.mount === 'function' && typeof p.unmount === 'function')\n\t\t},\n\n\t\t/** @return {object} The mount props per leaf. */\n\t\tmountPropsById() {\n\t\t\tconst context = { register: this.register, schema: this.schema, objectId: String(this.objectId || '') }\n\t\t\tconst out = {}\n\t\t\tfor (const provider of this.providers) {\n\t\t\t\tout[provider.id] = {\n\t\t\t\t\tsurface: 'detail-page',\n\t\t\t\t\t...context,\n\t\t\t\t\tintegrationContext: { ...context },\n\t\t\t\t\tonSummary: (summary) => this.onSummary(provider.id, summary),\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn out\n\t\t},\n\n\t\t/** @return {Array<{id: string, summary: object}>} The reported summaries, in order. */\n\t\treported() {\n\t\t\treturn this.orderedIds\n\t\t\t\t.filter((id) => this.summaries[id])\n\t\t\t\t.map((id) => ({ id, summary: this.summaries[id] }))\n\t\t},\n\n\t\t/** @return {object[]} The rows of the leaves that have something linked. */\n\t\tlinkedRows() {\n\t\t\tconst rows = []\n\t\t\tfor (const { id, summary } of this.reported) {\n\t\t\t\tif (summary.count <= 0) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tconst own = summary.rows.length > 0\n\t\t\t\t\t? summary.rows\n\t\t\t\t\t: [{ label: `${summary.noun} (${summary.count})` }]\n\t\t\t\town.forEach((row, index) => rows.push({ ...row, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn rows\n\t\t},\n\n\t\t/** @return {object[]} The leaves with nothing linked. */\n\t\temptyLeaves() {\n\t\t\treturn this.reported.filter(({ summary }) => summary.count <= 0)\n\t\t},\n\n\t\t/** @return {string} \"Leges, contract en projecten: niets gekoppeld\", or ''. */\n\t\temptyLine() {\n\t\t\tconst nouns = this.emptyLeaves.map(({ summary }) => summary.noun).filter((noun) => noun !== '')\n\t\t\tif (nouns.length === 0) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst list = joinList(nouns)\n\t\t\treturn t('nextcloud-vue', '{things}: nothing linked', { things: list.charAt(0).toUpperCase() + list.slice(1) })\n\t\t},\n\n\t\t/** @return {object[]} The actions of the leaves with nothing linked. */\n\t\temptyActions() {\n\t\t\tconst actions = []\n\t\t\tfor (const { id, summary } of this.emptyLeaves) {\n\t\t\t\tsummary.actions.forEach((action, index) => actions.push({ ...action, key: `${id}-${index}` }))\n\t\t\t}\n\t\t\treturn actions\n\t\t},\n\t},\n\n\twatch: {\n\t\trecordLeaves: {\n\t\t\thandler() {\n\t\t\t\tthis.recordLeaves.forEach((leaf) => this.readRecordLeaf(leaf))\n\t\t\t},\n\n\t\t\timmediate: true,\n\t\t},\n\n\t\tobjectId() {\n\t\t\tthis.recordLeaves.forEach((leaf) => this.readRecordLeaf(leaf))\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Read a record leaf's records and report them as its summary. A\n\t\t * failed read reports nothing, so the leaf is not listed as empty.\n\t\t *\n\t\t * @param {object} leaf The record leaf.\n\t\t * @return {Promise<void>}\n\t\t */\n\t\tasync readRecordLeaf(leaf) {\n\t\t\tconst objectId = String(this.objectId || '')\n\t\t\tif (objectId === '') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst filter = {}\n\t\t\tfor (const [key, value] of Object.entries(leaf.filter || {})) {\n\t\t\t\tfilter[key] = value === '@objectId' ? objectId : value\n\t\t\t}\n\t\t\tlet rows\n\t\t\ttry {\n\t\t\t\trows = await fetchReferenceObjects({ register: leaf.register, schema: leaf.schema, filter, limit: leaf.limit || 20 })\n\t\t\t} catch {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst label = leaf.label ? this.cnTranslate(leaf.label) : ''\n\t\t\tthis.onSummary(leaf.id, {\n\t\t\t\tcount: rows.length,\n\t\t\t\tnoun: leaf.noun ? this.cnTranslate(leaf.noun) : '',\n\t\t\t\trows: rows.map((row) => {\n\t\t\t\t\tconst href = leaf.href ? fillTemplate(leaf.href, row) : ''\n\t\t\t\t\treturn { label: fillTemplate(label, row), href: href ? prefixUrl(href) : undefined, icon: leaf.icon || undefined }\n\t\t\t\t}),\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Keep a leaf's summary, normalised.\n\t\t *\n\t\t * @param {string} id The integration id.\n\t\t * @param {{count?: number, noun?: string, rows?: Array, actions?: Array}} summary What the leaf reported.\n\t\t */\n\t\tonSummary(id, summary) {\n\t\t\tconst s = summary && typeof summary === 'object' ? summary : {}\n\t\t\tconst usableRow = (row) => row && typeof row.label === 'string' && row.label !== ''\n\t\t\tconst usableAction = (action) => action && typeof action.run === 'function' && typeof action.label === 'string' && action.label !== ''\n\t\t\tthis.summaries = {\n\t\t\t\t...this.summaries,\n\t\t\t\t[id]: {\n\t\t\t\t\tcount: Number.isFinite(s.count) ? s.count : 0,\n\t\t\t\t\tnoun: typeof s.noun === 'string' ? s.noun : '',\n\t\t\t\t\trows: Array.isArray(s.rows) ? s.rows.filter(usableRow) : [],\n\t\t\t\t\tactions: Array.isArray(s.actions) ? s.actions.filter(usableAction) : [],\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-linked-widget {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n}\n\n.cn-linked-widget__rows {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.cn-linked-widget__link {\n\talign-items: center;\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-main-text);\n\tdisplay: flex;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tgap: 10px;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-align: start;\n}\n\na.cn-linked-widget__link,\nbutton.cn-linked-widget__link {\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\ttext-decoration: underline;\n}\n\n.cn-linked-widget__empty {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 13px;\n\tmargin: 0;\n}\n\n.cn-linked-widget__actions {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tgap: 12px;\n}\n\n.cn-linked-widget__action {\n\tbackground: none;\n\tborder: 0;\n\tcolor: var(--color-primary-element);\n\tcursor: pointer;\n\tfont: inherit;\n\tfont-size: 14px;\n\tfont-weight: 600;\n\tmargin: 0;\n\tmin-height: 0;\n\tpadding: 0;\n\ttext-decoration: underline;\n}\n</style>\n"],"names":["_createElementBlock","_Fragment","_renderList","_createBlock","_toDisplayString","_openBlock","_createElementVNode"],"mappings":";;;AAWM,EAAA,KAAK,EAAC,kBAAkB;AAAC,EAAA,aAAC,EAAA,kBAAA;;;;AACD,EAAA,KAAA,EAAA,wBAAA;;;;;;AA0Bd,EAAA,KAAK,EAAC,wBAAG;;;;AAYF,EAAA,KAAK,EAAC,yBAAG;AAAA,EAAA,aAAA,EAAA,iBAAA;;;;AAGE,EAAA,KAAA,EAAA,2BAAA;;;;AAa5B,EAAA,MAAM,EAAN,EAAM;AAAC,EAAA,KAAK,EAAC,0BAA0B;;;;;;;;AAtDlC,IAAA,CAAA,QAAA,CAAA,UAAU,CAAC,MAAM,GAAA,CAAA;yCAmCtB,gBAAA,EAAA;4BAlCHA,kBAiCI,CAAAC,QAAA,EAAA,IAAA,EAAAC,UAAA,CAhCG,QAAA,CAAA,UAAA,EAAA,CAAA,GAAA,KAAA;iCADPF,kBAiCI,CAAA,I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A,CAAA,YAAA;;;;;;KAMJ,QAAS,CAAA,SAAA;wCAEd,CAAA,KAAA,YAAA,EAAAA,eAAA,CADF,QAAS,CAAA,SAAA,CAAA,EAAA,CAAA,YAAA;;AAED,IAAA,CAAA,QAAA,CAAA,YAAY,CAAC,MAAM,GAAA,CAAA;AAA7B,SAAAC,SAAA,EAAA,EAAAL,kBAAA,CAUK,QAVL,UAUK,EAAA;8CADG,CAAAC,QAAA,EAAA,IAAA,EAAAC,UAAA,CAPS,QAAI,CAAA,YAAA,EAAA,CAAd,MAAM,KAAA;mDAOL,CAAA,QAAA,EAAA;cANP,GAAG,EAAE,MAAM,CAAC,GAAG;AAChB,cAAA,IAAI,EAAC,QAAE;AACP,cAAA,KAAI,EAAA,0BAAA;AACJ,cAAA,aAAW,EAAC,kBAAkB;qBACxB,EAAA,MAAA,KAAE,MAAM,CAAC,GAAG,EAAA,CAAA;AACf,aAAA,EAAAE,eAAA,CAAA,MAAK,CAAE,KAAK,CAAA,EAAA,CAAA,oBAAA,UAAA,CAAA,CAAA;;;;AAKf,IAAAE,kBAAA,QAAA;wBACDN,8CACG,QAAA,CAAA,SAAA,EAAA,CAAA,QAAA,KAAA;6BADHG;;;;;;;;;;;;"}
@@ -37,6 +37,21 @@ var script = {
37
37
  },
38
38
 
39
39
  computed: {
40
+ /**
41
+ * The choices for the object slug field: every schema property, and first the
42
+ * reserved source `@schema.name` that OpenRegister turns into
43
+ * `<schema slug>-<object name>` (the second choice Robert Zondervan asked for
44
+ * next to a property, 2026-10-26). Stored as the id, shown by its label.
45
+ *
46
+ * @return {Array<{id: string, label: string}>}
47
+ */
48
+ slugFieldOptions() {
49
+ return [
50
+ { id: '@schema.name', label: translate('nextcloud-vue', 'Schema name + object name') },
51
+ ...this.propertyOptions.map((property) => ({ id: property, label: property })),
52
+ ]
53
+ },
54
+
40
55
  /** Local alias to avoid vue/no-mutating-props on template bindings */
41
56
  schema() {
42
57
  return this.schemaItem
@@ -44,6 +59,16 @@ var script = {
44
59
  },
45
60
 
46
61
  watch: {
62
+ // The suffix only applies together with a slug field; drop it when the
63
+ // field is cleared so it cannot silently re-activate on a later pick.
64
+ 'schema.configuration.objectSlugField': {
65
+ handler(value) {
66
+ if (!value && this.schema.configuration.objectSlugSuffix) {
67
+ this.schema.configuration.objectSlugSuffix = false;
68
+ }
69
+ },
70
+ },
71
+
47
72
  'schema.configuration.allowedTags': {
48
73
  immediate: true,
49
74
  handler(tags) {
@@ -1 +1 @@
1
- {"version":3,"file":"CnSchemaConfigurationTab.vue2.js","sources":["../../../../src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue"],"sourcesContent":["<template>\n\t<div class=\"cn-schema-form__form-editor\">\n\t\t<NcTextArea v-model=\"schema.description\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\" />\n\t\t<NcTextArea v-model=\"schema.summary\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Summary')\" />\n\t\t<NcTextField v-model=\"schema.slug\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Slug')\" />\n\n\t\t<!-- Schema Composition Section -->\n\t\t<div>\n\t\t\t<h3>{{ t('nextcloud-vue', 'Schema composition (JSON Schema)') }}</h3>\n\n\t\t\t<!-- allOf - Multiple Inheritance (Recommended) -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.allOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'allOf - Inherits from ALL schemas (Recommended)')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas to inherit from (supports multiple parents)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.allOf && schema.allOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'allOf - Multiple inheritance') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against all selected schemas. Properties from all parent schemas are merged. This is the recommended pattern for schema extension and multiple inheritance.') }}</p>\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'Important:') }}</strong> {{ t('nextcloud-vue', 'Child schemas can only add constraints, never relax them (Liskov substitution principle). Metadata (title, description, order) can be overridden.') }}</p>\n\t\t\t\t<div v-if=\"allOfSchemaNames.length > 0\">\n\t\t\t\t\t<strong>{{ t('nextcloud-vue', 'Parent schemas:') }}</strong>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li v-for=\"name in allOfSchemaNames\" :key=\"name\">\n\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- oneOf - Mutually Exclusive Options -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.oneOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'oneOf - Exactly one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match exactly one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.oneOf && schema.oneOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'oneOf - Mutually exclusive') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against exactly one of the selected schemas. Properties are not merged. Use for discriminated unions or type variants.') }}</p>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- anyOf - Flexible Composition -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.anyOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'anyOf - At least one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match at least one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.anyOf && schema.anyOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'anyOf - Flexible composition') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against at least one of the selected schemas. Properties are not merged. More permissive than oneOf.') }}</p>\n\t\t\t</NcNoteCard>\n\t\t</div>\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectNameField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object name field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object name')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectDescriptionField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object description field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object description')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectImageField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object image field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object image representing the object. e.g. logo (should contain base64 encoded image)')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectSummaryField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object summary field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object summary. e.g. summary, abstract, or excerpt')\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.allowFiles\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Allow files') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.autoPublish\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Auto-publish objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.defaultAutoShare\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Default \"Automatically publish\" toggle to on for new attachments') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField\n\t\t\tv-model=\"allowedTagsInput\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Allowed tags (comma-separated)')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'image, document, audio, video')\"\n\t\t\t@update:modelValue=\"updateAllowedTags\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.hardValidation\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Hard validation') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField v-model=\"schema.maxDepth\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Max depth')\"\n\t\t\ttype=\"number\" />\n\t\t<NcTextField :disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Icon (Material Design Icon name, e.g. Dog)')\"\n\t\t\t:modelValue=\"schema.icon || ''\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'e.g. Dog, Account, Tag — see pictogrammers.com/library/mdi')\"\n\t\t\t@update:modelValue=\"setIcon\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.immutable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Immutable') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.searchable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Searchable (appears in Nextcloud unified search)') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcCheckboxRadioSwitch,\n\tNcNoteCard,\n\tNcSelect,\n\tNcTextArea,\n\tNcTextField,\n} from '@nextcloud/vue'\n\n/**\n * CnSchemaConfigurationTab — Configuration form tab for CnSchemaFormDialog.\n *\n * Renders schema metadata fields, composition (allOf/oneOf/anyOf), field mappings,\n * and configuration toggles. Mutates schemaItem directly.\n */\nexport default {\n\tname: 'CnSchemaConfigurationTab',\n\tcomponents: {\n\t\tNcTextField,\n\t\tNcTextArea,\n\t\tNcNoteCard,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/** The full schema item — mutated directly */\n\t\tschemaItem: { type: Object, required: true },\n\t\t/** Disable state */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Available schemas for composition selects */\n\t\tavailableSchemas: { type: Array, default: () => [] },\n\t\t/** Property names for field mapping selects */\n\t\tpropertyOptions: { type: Array, default: () => [] },\n\t\t/** Pre-computed names for allOf note card display */\n\t\tallOfSchemaNames: { type: Array, default: () => [] },\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tallowedTagsInput: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** Local alias to avoid vue/no-mutating-props on template bindings */\n\t\tschema() {\n\t\t\treturn this.schemaItem\n\t\t},\n\t},\n\n\twatch: {\n\t\t'schema.configuration.allowedTags': {\n\t\t\timmediate: true,\n\t\t\thandler(tags) {\n\t\t\t\tthis.allowedTagsInput = (tags || []).join(', ')\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\t/**\n\t\t * Set the schema icon (an MDI name), using $set so a previously absent\n\t\t * `icon` key becomes reactive. An empty value clears it to null.\n\t\t *\n\t\t * @param {string} value The entered MDI icon name.\n\t\t */\n\t\tsetIcon(value) {\n\t\t\tconst trimmed = (value || '').trim()\n\t\t\tthis.schema.icon = trimmed === '' ? null : trimmed\n\t\t},\n\n\t\tupdateAllowedTags(value) {\n\t\t\tif (!value || value.trim() === '') {\n\t\t\t\tthis.schema.configuration.allowedTags = []\n\t\t\t} else {\n\t\t\t\tconst tags = value.split(',').map((tag) => tag.trim()).filter((tag) => tag !== '')\n\t\t\t\tthis.schema.configuration.allowedTags = tags\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["t"],"mappings":";;;AAuLA;AACC;AACA;AACA;;;AAGD,aAAe;AACd,CAAA,IAAI,EAAE,0BAA0B;CAChC,UAAU,EAAE;EACX,WAAW;EACX,UAAU;EACV,UAAU;AACV,EAAA,qBAAqB;AACrB,EAAA,QAAQ;EACR;;AAED,CAAA,KAAK,EAAE;AACN;AACA,EAAA,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;AAC5C;AACA,EAAA,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;AAC1C;AACA,EAAA,gBAAgB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI;AACpD;AACA,EAAA,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI;AACnD;AACA,EAAA,gBAAgB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI;EACpD;;AAED,CAAA,IAAI,GAAG;AACN,EAAA,OAAO;AACN,GAAA,gBAAgB,EAAE,EAAE;AACrB,GAAA;EACA;;AAED,CAAA,QAAQ,EAAE;;AAET,EAAA,MAAM,GAAG;AACR,GAAA,OAAO,IAAI,CAAC,UAAS;GACrB;EACD;;AAED,CAAA,KAAK,EAAE;AACN,EAAA,kCAAkC,EAAE;AACnC,GAAA,SAAS,EAAE,IAAI;GACf,OAAO,CAAC,IAAI,EAAE;AACb,IAAA,IAAI,CAAC,gBAAiB,GAAE,CAAC,IAAK,IAAG,EAAE,EAAE,IAAI,CAAC,IAAI,EAAA;IAC9C;GACD;EACD;;AAED,CAAA,OAAO,EAAE;KACRA,SAAC;AACD;;;AAGC;AACA;;AAED,EAAA,OAAO,CAAC,KAAK,EAAE;AACd,GAAA,MAAM,OAAQ,GAAE,CAAC,KAAI,IAAK,EAAE,EAAE,IAAI,GAAC;AACnC,GAAA,IAAI,CAAC,MAAM,CAAC,IAAK,GAAE,OAAQ,KAAI,KAAK,OAAO,QAAM;GACjD;;EAED,iBAAiB,CAAC,KAAK,EAAE;GACxB,IAAI,CAAC,KAAM,IAAG,KAAK,CAAC,IAAI,EAAG,KAAI,EAAE,EAAE;AAClC,IAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAU,GAAI,GAAC;IACxC,MAAK;AACN,IAAA,MAAM,IAAK,GAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,GAAI,KAAI,EAAE,EAAA;AACjF,IAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,KAAG;AAC5C,IAAA;GACA;EACD;AACF;;;;"}
1
+ {"version":3,"file":"CnSchemaConfigurationTab.vue2.js","sources":["../../../../src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue"],"sourcesContent":["<template>\n\t<div class=\"cn-schema-form__form-editor\">\n\t\t<NcTextArea v-model=\"schema.description\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\" />\n\t\t<NcTextArea v-model=\"schema.summary\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Summary')\" />\n\t\t<NcTextField v-model=\"schema.slug\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Slug')\" />\n\n\t\t<!-- Schema Composition Section -->\n\t\t<div>\n\t\t\t<h3>{{ t('nextcloud-vue', 'Schema composition (JSON Schema)') }}</h3>\n\n\t\t\t<!-- allOf - Multiple Inheritance (Recommended) -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.allOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'allOf - Inherits from ALL schemas (Recommended)')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas to inherit from (supports multiple parents)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.allOf && schema.allOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'allOf - Multiple inheritance') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against all selected schemas. Properties from all parent schemas are merged. This is the recommended pattern for schema extension and multiple inheritance.') }}</p>\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'Important:') }}</strong> {{ t('nextcloud-vue', 'Child schemas can only add constraints, never relax them (Liskov substitution principle). Metadata (title, description, order) can be overridden.') }}</p>\n\t\t\t\t<div v-if=\"allOfSchemaNames.length > 0\">\n\t\t\t\t\t<strong>{{ t('nextcloud-vue', 'Parent schemas:') }}</strong>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li v-for=\"name in allOfSchemaNames\" :key=\"name\">\n\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- oneOf - Mutually Exclusive Options -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.oneOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'oneOf - Exactly one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match exactly one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.oneOf && schema.oneOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'oneOf - Mutually exclusive') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against exactly one of the selected schemas. Properties are not merged. Use for discriminated unions or type variants.') }}</p>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- anyOf - Flexible Composition -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.anyOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'anyOf - At least one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match at least one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.anyOf && schema.anyOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'anyOf - Flexible composition') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against at least one of the selected schemas. Properties are not merged. More permissive than oneOf.') }}</p>\n\t\t\t</NcNoteCard>\n\t\t</div>\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectNameField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object name field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object name')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectDescriptionField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object description field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object description')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectImageField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object image field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object image representing the object. e.g. logo (should contain base64 encoded image)')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectSummaryField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object summary field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object summary. e.g. summary, abstract, or excerpt')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectSlugField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"slugFieldOptions\"\n\t\t\t:reduce=\"option => option.id\"\n\t\t\tlabel=\"label\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object slug field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to build object slugs from')\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.objectSlugSuffix\"\n\t\t\t:disabled=\"loading || !schema.configuration.objectSlugField\">\n\t\t\t{{ t('nextcloud-vue', 'Append a date-time suffix when a slug is already taken') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcNoteCard v-if=\"schema.configuration.objectSlugField\" type=\"info\">\n\t\t\t<p>{{ t('nextcloud-vue', 'A slug is unique within the register and schema and does not change once it is set, also not after the slug field is switched. Objects without a slug get one from the new field on their next save or with occ openregister:backfill-slugs <register> <schema>.') }}</p>\n\t\t</NcNoteCard>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.allowFiles\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Allow files') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.autoPublish\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Auto-publish objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.defaultAutoShare\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Default \"Automatically publish\" toggle to on for new attachments') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField\n\t\t\tv-model=\"allowedTagsInput\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Allowed tags (comma-separated)')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'image, document, audio, video')\"\n\t\t\t@update:modelValue=\"updateAllowedTags\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.hardValidation\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Hard validation') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField v-model=\"schema.maxDepth\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Max depth')\"\n\t\t\ttype=\"number\" />\n\t\t<NcTextField :disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Icon (Material Design Icon name, e.g. Dog)')\"\n\t\t\t:modelValue=\"schema.icon || ''\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'e.g. Dog, Account, Tag — see pictogrammers.com/library/mdi')\"\n\t\t\t@update:modelValue=\"setIcon\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.immutable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Immutable') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.searchable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Searchable (appears in Nextcloud unified search)') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcCheckboxRadioSwitch,\n\tNcNoteCard,\n\tNcSelect,\n\tNcTextArea,\n\tNcTextField,\n} from '@nextcloud/vue'\n\n/**\n * CnSchemaConfigurationTab — Configuration form tab for CnSchemaFormDialog.\n *\n * Renders schema metadata fields, composition (allOf/oneOf/anyOf), field mappings,\n * and configuration toggles. Mutates schemaItem directly.\n */\nexport default {\n\tname: 'CnSchemaConfigurationTab',\n\tcomponents: {\n\t\tNcTextField,\n\t\tNcTextArea,\n\t\tNcNoteCard,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/** The full schema item — mutated directly */\n\t\tschemaItem: { type: Object, required: true },\n\t\t/** Disable state */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Available schemas for composition selects */\n\t\tavailableSchemas: { type: Array, default: () => [] },\n\t\t/** Property names for field mapping selects */\n\t\tpropertyOptions: { type: Array, default: () => [] },\n\t\t/** Pre-computed names for allOf note card display */\n\t\tallOfSchemaNames: { type: Array, default: () => [] },\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tallowedTagsInput: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The choices for the object slug field: every schema property, and first the\n\t\t * reserved source `@schema.name` that OpenRegister turns into\n\t\t * `<schema slug>-<object name>` (the second choice Robert Zondervan asked for\n\t\t * next to a property, 2026-10-26). Stored as the id, shown by its label.\n\t\t *\n\t\t * @return {Array<{id: string, label: string}>}\n\t\t */\n\t\tslugFieldOptions() {\n\t\t\treturn [\n\t\t\t\t{ id: '@schema.name', label: t('nextcloud-vue', 'Schema name + object name') },\n\t\t\t\t...this.propertyOptions.map((property) => ({ id: property, label: property })),\n\t\t\t]\n\t\t},\n\n\t\t/** Local alias to avoid vue/no-mutating-props on template bindings */\n\t\tschema() {\n\t\t\treturn this.schemaItem\n\t\t},\n\t},\n\n\twatch: {\n\t\t// The suffix only applies together with a slug field; drop it when the\n\t\t// field is cleared so it cannot silently re-activate on a later pick.\n\t\t'schema.configuration.objectSlugField': {\n\t\t\thandler(value) {\n\t\t\t\tif (!value && this.schema.configuration.objectSlugSuffix) {\n\t\t\t\t\tthis.schema.configuration.objectSlugSuffix = false\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t'schema.configuration.allowedTags': {\n\t\t\timmediate: true,\n\t\t\thandler(tags) {\n\t\t\t\tthis.allowedTagsInput = (tags || []).join(', ')\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\t/**\n\t\t * Set the schema icon (an MDI name), using $set so a previously absent\n\t\t * `icon` key becomes reactive. An empty value clears it to null.\n\t\t *\n\t\t * @param {string} value The entered MDI icon name.\n\t\t */\n\t\tsetIcon(value) {\n\t\t\tconst trimmed = (value || '').trim()\n\t\t\tthis.schema.icon = trimmed === '' ? null : trimmed\n\t\t},\n\n\t\tupdateAllowedTags(value) {\n\t\t\tif (!value || value.trim() === '') {\n\t\t\t\tthis.schema.configuration.allowedTags = []\n\t\t\t} else {\n\t\t\t\tconst tags = value.split(',').map((tag) => tag.trim()).filter((tag) => tag !== '')\n\t\t\t\tthis.schema.configuration.allowedTags = tags\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["t"],"mappings":";;;AAwMA;AACC;AACA;AACA;;;AAGD,aAAe;AACd,CAAA,IAAI,EAAE,0BAA0B;CAChC,UAAU,EAAE;EACX,WAAW;EACX,UAAU;EACV,UAAU;AACV,EAAA,qBAAqB;AACrB,EAAA,QAAQ;EACR;;AAED,CAAA,KAAK,EAAE;AACN;AACA,EAAA,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;AAC5C;AACA,EAAA,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;AAC1C;AACA,EAAA,gBAAgB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI;AACpD;AACA,EAAA,eAAe,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI;AACnD;AACA,EAAA,gBAAgB,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI;EACpD;;AAED,CAAA,IAAI,GAAG;AACN,EAAA,OAAO;AACN,GAAA,gBAAgB,EAAE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E,EAAE;AAClC,IAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAU,GAAI,GAAC;IACxC,MAAK;AACN,IAAA,MAAM,IAAK,GAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,GAAI,KAAI,EAAE,EAAA;AACjF,IAAA,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,KAAG;AAC5C,IAAA;GACA;EACD;AACF;;;;"}
@@ -211,9 +211,41 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
211
211
  inputLabel: $options.t('nextcloud-vue', 'Object summary field'),
212
212
  placeholder: $options.t('nextcloud-vue', 'Select a property to use as object summary. e.g. summary, abstract, or excerpt')
213
213
  }, null, 8 /* PROPS */, ["modelValue", "disabled", "options", "inputLabel", "placeholder"]),
214
+ createVNode(_component_NcSelect, {
215
+ modelValue: $options.schema.configuration.objectSlugField,
216
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => (($options.schema.configuration.objectSlugField) = $event)),
217
+ disabled: $props.loading,
218
+ options: $options.slugFieldOptions,
219
+ reduce: option => option.id,
220
+ label: "label",
221
+ clearable: true,
222
+ inputLabel: $options.t('nextcloud-vue', 'Object slug field'),
223
+ placeholder: $options.t('nextcloud-vue', 'Select a property to build object slugs from')
224
+ }, null, 8 /* PROPS */, ["modelValue", "disabled", "options", "reduce", "inputLabel", "placeholder"]),
225
+ createVNode(_component_NcCheckboxRadioSwitch, {
226
+ modelValue: $options.schema.configuration.objectSlugSuffix,
227
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => (($options.schema.configuration.objectSlugSuffix) = $event)),
228
+ disabled: $props.loading || !$options.schema.configuration.objectSlugField
229
+ }, {
230
+ default: withCtx(() => [
231
+ createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Append a date-time suffix when a slug is already taken')), 1 /* TEXT */)
232
+ ]),
233
+ _: 1 /* STABLE */
234
+ }, 8 /* PROPS */, ["modelValue", "disabled"]),
235
+ ($options.schema.configuration.objectSlugField)
236
+ ? (openBlock(), createBlock(_component_NcNoteCard, {
237
+ key: 0,
238
+ type: "info"
239
+ }, {
240
+ default: withCtx(() => [
241
+ createElementVNode("p", null, toDisplayString($options.t('nextcloud-vue', 'A slug is unique within the register and schema and does not change once it is set, also not after the slug field is switched. Objects without a slug get one from the new field on their next save or with occ openregister:backfill-slugs <register> <schema>.')), 1 /* TEXT */)
242
+ ]),
243
+ _: 1 /* STABLE */
244
+ }))
245
+ : createCommentVNode("v-if", true),
214
246
  createVNode(_component_NcCheckboxRadioSwitch, {
215
247
  modelValue: $options.schema.configuration.allowFiles,
216
- "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => (($options.schema.configuration.allowFiles) = $event)),
248
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => (($options.schema.configuration.allowFiles) = $event)),
217
249
  disabled: $props.loading
218
250
  }, {
219
251
  default: withCtx(() => [
@@ -223,7 +255,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
223
255
  }, 8 /* PROPS */, ["modelValue", "disabled"]),
224
256
  createVNode(_component_NcCheckboxRadioSwitch, {
225
257
  modelValue: $options.schema.configuration.autoPublish,
226
- "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => (($options.schema.configuration.autoPublish) = $event)),
258
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = $event => (($options.schema.configuration.autoPublish) = $event)),
227
259
  disabled: $props.loading
228
260
  }, {
229
261
  default: withCtx(() => [
@@ -233,7 +265,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
233
265
  }, 8 /* PROPS */, ["modelValue", "disabled"]),
234
266
  createVNode(_component_NcCheckboxRadioSwitch, {
235
267
  modelValue: $options.schema.configuration.defaultAutoShare,
236
- "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => (($options.schema.configuration.defaultAutoShare) = $event)),
268
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = $event => (($options.schema.configuration.defaultAutoShare) = $event)),
237
269
  disabled: $props.loading
238
270
  }, {
239
271
  default: withCtx(() => [
@@ -244,7 +276,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
244
276
  createVNode(_component_NcTextField, {
245
277
  modelValue: $data.allowedTagsInput,
246
278
  "onUpdate:modelValue": [
247
- _cache[13] || (_cache[13] = $event => (($data.allowedTagsInput) = $event)),
279
+ _cache[15] || (_cache[15] = $event => (($data.allowedTagsInput) = $event)),
248
280
  $options.updateAllowedTags
249
281
  ],
250
282
  disabled: $props.loading,
@@ -253,7 +285,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
253
285
  }, null, 8 /* PROPS */, ["modelValue", "disabled", "label", "placeholder", "onUpdate:modelValue"]),
254
286
  createVNode(_component_NcCheckboxRadioSwitch, {
255
287
  modelValue: $options.schema.hardValidation,
256
- "onUpdate:modelValue": _cache[14] || (_cache[14] = $event => (($options.schema.hardValidation) = $event)),
288
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => (($options.schema.hardValidation) = $event)),
257
289
  disabled: $props.loading
258
290
  }, {
259
291
  default: withCtx(() => [
@@ -263,7 +295,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
263
295
  }, 8 /* PROPS */, ["modelValue", "disabled"]),
264
296
  createVNode(_component_NcTextField, {
265
297
  modelValue: $options.schema.maxDepth,
266
- "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => (($options.schema.maxDepth) = $event)),
298
+ "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => (($options.schema.maxDepth) = $event)),
267
299
  disabled: $props.loading,
268
300
  label: $options.t('nextcloud-vue', 'Max depth'),
269
301
  type: "number"
@@ -277,7 +309,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
277
309
  }, null, 8 /* PROPS */, ["disabled", "label", "modelValue", "placeholder", "onUpdate:modelValue"]),
278
310
  createVNode(_component_NcCheckboxRadioSwitch, {
279
311
  modelValue: $options.schema.immutable,
280
- "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => (($options.schema.immutable) = $event)),
312
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (($options.schema.immutable) = $event)),
281
313
  disabled: $props.loading
282
314
  }, {
283
315
  default: withCtx(() => [
@@ -287,7 +319,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
287
319
  }, 8 /* PROPS */, ["modelValue", "disabled"]),
288
320
  createVNode(_component_NcCheckboxRadioSwitch, {
289
321
  modelValue: $options.schema.searchable,
290
- "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => (($options.schema.searchable) = $event)),
322
+ "onUpdate:modelValue": _cache[19] || (_cache[19] = $event => (($options.schema.searchable) = $event)),
291
323
  disabled: $props.loading
292
324
  }, {
293
325
  default: withCtx(() => [
@@ -1 +1 @@
1
- {"version":3,"file":"CnSchemaConfigurationTab.vue3.js","sources":["../../../../src/components/CnSchemaFormDialog/CnSchemaConfigurationTab.vue?vue&type=template&id=5428b5f2&lang.js"],"sourcesContent":["<template>\n\t<div class=\"cn-schema-form__form-editor\">\n\t\t<NcTextArea v-model=\"schema.description\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\" />\n\t\t<NcTextArea v-model=\"schema.summary\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Summary')\" />\n\t\t<NcTextField v-model=\"schema.slug\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Slug')\" />\n\n\t\t<!-- Schema Composition Section -->\n\t\t<div>\n\t\t\t<h3>{{ t('nextcloud-vue', 'Schema composition (JSON Schema)') }}</h3>\n\n\t\t\t<!-- allOf - Multiple Inheritance (Recommended) -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.allOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'allOf - Inherits from ALL schemas (Recommended)')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas to inherit from (supports multiple parents)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.allOf && schema.allOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'allOf - Multiple inheritance') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against all selected schemas. Properties from all parent schemas are merged. This is the recommended pattern for schema extension and multiple inheritance.') }}</p>\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'Important:') }}</strong> {{ t('nextcloud-vue', 'Child schemas can only add constraints, never relax them (Liskov substitution principle). Metadata (title, description, order) can be overridden.') }}</p>\n\t\t\t\t<div v-if=\"allOfSchemaNames.length > 0\">\n\t\t\t\t\t<strong>{{ t('nextcloud-vue', 'Parent schemas:') }}</strong>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li v-for=\"name in allOfSchemaNames\" :key=\"name\">\n\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- oneOf - Mutually Exclusive Options -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.oneOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'oneOf - Exactly one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match exactly one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.oneOf && schema.oneOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'oneOf - Mutually exclusive') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against exactly one of the selected schemas. Properties are not merged. Use for discriminated unions or type variants.') }}</p>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- anyOf - Flexible Composition -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.anyOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'anyOf - At least one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match at least one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.anyOf && schema.anyOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'anyOf - Flexible composition') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against at least one of the selected schemas. Properties are not merged. More permissive than oneOf.') }}</p>\n\t\t\t</NcNoteCard>\n\t\t</div>\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectNameField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object name field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object name')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectDescriptionField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object description field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object description')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectImageField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object image field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object image representing the object. e.g. logo (should contain base64 encoded image)')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectSummaryField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object summary field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object summary. e.g. summary, abstract, or excerpt')\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.allowFiles\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Allow files') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.autoPublish\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Auto-publish objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.defaultAutoShare\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Default \"Automatically publish\" toggle to on for new attachments') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField\n\t\t\tv-model=\"allowedTagsInput\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Allowed tags (comma-separated)')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'image, document, audio, video')\"\n\t\t\t@update:modelValue=\"updateAllowedTags\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.hardValidation\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Hard validation') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField v-model=\"schema.maxDepth\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Max depth')\"\n\t\t\ttype=\"number\" />\n\t\t<NcTextField :disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Icon (Material Design Icon name, e.g. Dog)')\"\n\t\t\t:modelValue=\"schema.icon || ''\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'e.g. Dog, Account, Tag — see pictogrammers.com/library/mdi')\"\n\t\t\t@update:modelValue=\"setIcon\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.immutable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Immutable') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.searchable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Searchable (appears in Nextcloud unified search)') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcCheckboxRadioSwitch,\n\tNcNoteCard,\n\tNcSelect,\n\tNcTextArea,\n\tNcTextField,\n} from '@nextcloud/vue'\n\n/**\n * CnSchemaConfigurationTab — Configuration form tab for CnSchemaFormDialog.\n *\n * Renders schema metadata fields, composition (allOf/oneOf/anyOf), field mappings,\n * and configuration toggles. Mutates schemaItem directly.\n */\nexport default {\n\tname: 'CnSchemaConfigurationTab',\n\tcomponents: {\n\t\tNcTextField,\n\t\tNcTextArea,\n\t\tNcNoteCard,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/** The full schema item — mutated directly */\n\t\tschemaItem: { type: Object, required: true },\n\t\t/** Disable state */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Available schemas for composition selects */\n\t\tavailableSchemas: { type: Array, default: () => [] },\n\t\t/** Property names for field mapping selects */\n\t\tpropertyOptions: { type: Array, default: () => [] },\n\t\t/** Pre-computed names for allOf note card display */\n\t\tallOfSchemaNames: { type: Array, default: () => [] },\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tallowedTagsInput: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/** Local alias to avoid vue/no-mutating-props on template bindings */\n\t\tschema() {\n\t\t\treturn this.schemaItem\n\t\t},\n\t},\n\n\twatch: {\n\t\t'schema.configuration.allowedTags': {\n\t\t\timmediate: true,\n\t\t\thandler(tags) {\n\t\t\t\tthis.allowedTagsInput = (tags || []).join(', ')\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\t/**\n\t\t * Set the schema icon (an MDI name), using $set so a previously absent\n\t\t * `icon` key becomes reactive. An empty value clears it to null.\n\t\t *\n\t\t * @param {string} value The entered MDI icon name.\n\t\t */\n\t\tsetIcon(value) {\n\t\t\tconst trimmed = (value || '').trim()\n\t\t\tthis.schema.icon = trimmed === '' ? null : trimmed\n\t\t},\n\n\t\tupdateAllowedTags(value) {\n\t\t\tif (!value || value.trim() === '') {\n\t\t\t\tthis.schema.configuration.allowedTags = []\n\t\t\t} else {\n\t\t\t\tconst tags = value.split(',').map((tag) => tag.trim()).filter((tag) => tag !== '')\n\t\t\t\tthis.schema.configuration.allowedTags = tags\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_createElementVNode","_withCtx","_toDisplayString","_createBlock","_createTextVNode","_Fragment","_renderList"],"mappings":";;AACM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;AA4B/B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAA+B,GAAA;AACnC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;;;AACjB,EAAA,KAAK,EAAC,oCAAoC;;;AA+B/D,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAA+B,GAAA;AACnC,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;;;AACjB,EAAA,KAAK,EAAC,oCAAoC;;AAsB/D,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAA+B,GAAA;AACnC,MAAA,WAAA,GAAA,EAAA,KAAK,EAAC,8BAA8B,GAAA;;;AACjB,EAAA,KAAK,EAAC,oCAAoC;;;;;;;;;;AAvFxE,EAAA,QAAAA,SAAA,EAAA,EAAAC,kBAAA,CAyKK,OAzKL,UAyKK,EAAA;IAxKJC,WAE6C,CAAA,qBAAA,EAAA;AAFxB,MAAA,UAAA,EAAA,QAAA,CAAA,MAAM,CAAC,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js"],"sourcesContent":["<template>\n\t<div class=\"cn-schema-form__form-editor\">\n\t\t<NcTextArea v-model=\"schema.description\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Description')\" />\n\t\t<NcTextArea v-model=\"schema.summary\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Summary')\" />\n\t\t<NcTextField v-model=\"schema.slug\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Slug')\" />\n\n\t\t<!-- Schema Composition Section -->\n\t\t<div>\n\t\t\t<h3>{{ t('nextcloud-vue', 'Schema composition (JSON Schema)') }}</h3>\n\n\t\t\t<!-- allOf - Multiple Inheritance (Recommended) -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.allOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'allOf - Inherits from ALL schemas (Recommended)')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas to inherit from (supports multiple parents)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.allOf && schema.allOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'allOf - Multiple inheritance') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against all selected schemas. Properties from all parent schemas are merged. This is the recommended pattern for schema extension and multiple inheritance.') }}</p>\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'Important:') }}</strong> {{ t('nextcloud-vue', 'Child schemas can only add constraints, never relax them (Liskov substitution principle). Metadata (title, description, order) can be overridden.') }}</p>\n\t\t\t\t<div v-if=\"allOfSchemaNames.length > 0\">\n\t\t\t\t\t<strong>{{ t('nextcloud-vue', 'Parent schemas:') }}</strong>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li v-for=\"name in allOfSchemaNames\" :key=\"name\">\n\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- oneOf - Mutually Exclusive Options -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.oneOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'oneOf - Exactly one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match exactly one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.oneOf && schema.oneOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'oneOf - Mutually exclusive') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against exactly one of the selected schemas. Properties are not merged. Use for discriminated unions or type variants.') }}</p>\n\t\t\t</NcNoteCard>\n\n\t\t\t<!-- anyOf - Flexible Composition -->\n\t\t\t<NcSelect\n\t\t\t\tv-model=\"schema.anyOf\"\n\t\t\t\t:disabled=\"loading\"\n\t\t\t\t:options=\"availableSchemas\"\n\t\t\t\t:multiple=\"true\"\n\t\t\t\t:clearable=\"true\"\n\t\t\t\t:keepOpen=\"true\"\n\t\t\t\tlabel=\"title\"\n\t\t\t\ttrackBy=\"id\"\n\t\t\t\t:inputLabel=\"t('nextcloud-vue', 'anyOf - At least one schema must match')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Select schemas (instance must match at least one)')\">\n\t\t\t\t<template #option=\"{ title, description }\">\n\t\t\t\t\t<div class=\"cn-schema-form__schema-option\">\n\t\t\t\t\t\t<span class=\"cn-schema-form__option-title\">{{ title }}</span>\n\t\t\t\t\t\t<span v-if=\"description\" class=\"cn-schema-form__option-description\">{{ description }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</template>\n\t\t\t</NcSelect>\n\t\t\t<NcNoteCard v-if=\"schema.anyOf && schema.anyOf.length > 0\" type=\"info\">\n\t\t\t\t<p><strong>{{ t('nextcloud-vue', 'anyOf - Flexible composition') }}</strong></p>\n\t\t\t\t<p>{{ t('nextcloud-vue', 'Instance must validate against at least one of the selected schemas. Properties are not merged. More permissive than oneOf.') }}</p>\n\t\t\t</NcNoteCard>\n\t\t</div>\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectNameField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object name field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object name')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectDescriptionField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object description field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object description')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectImageField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object image field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object image representing the object. e.g. logo (should contain base64 encoded image)')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectSummaryField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"propertyOptions\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object summary field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to use as object summary. e.g. summary, abstract, or excerpt')\" />\n\t\t<NcSelect\n\t\t\tv-model=\"schema.configuration.objectSlugField\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:options=\"slugFieldOptions\"\n\t\t\t:reduce=\"option => option.id\"\n\t\t\tlabel=\"label\"\n\t\t\t:clearable=\"true\"\n\t\t\t:inputLabel=\"t('nextcloud-vue', 'Object slug field')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'Select a property to build object slugs from')\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.objectSlugSuffix\"\n\t\t\t:disabled=\"loading || !schema.configuration.objectSlugField\">\n\t\t\t{{ t('nextcloud-vue', 'Append a date-time suffix when a slug is already taken') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcNoteCard v-if=\"schema.configuration.objectSlugField\" type=\"info\">\n\t\t\t<p>{{ t('nextcloud-vue', 'A slug is unique within the register and schema and does not change once it is set, also not after the slug field is switched. Objects without a slug get one from the new field on their next save or with occ openregister:backfill-slugs <register> <schema>.') }}</p>\n\t\t</NcNoteCard>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.allowFiles\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Allow files') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.autoPublish\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Auto-publish objects') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.configuration.defaultAutoShare\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Default \"Automatically publish\" toggle to on for new attachments') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField\n\t\t\tv-model=\"allowedTagsInput\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Allowed tags (comma-separated)')\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'image, document, audio, video')\"\n\t\t\t@update:modelValue=\"updateAllowedTags\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.hardValidation\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Hard validation') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcTextField v-model=\"schema.maxDepth\"\n\t\t\t:disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Max depth')\"\n\t\t\ttype=\"number\" />\n\t\t<NcTextField :disabled=\"loading\"\n\t\t\t:label=\"t('nextcloud-vue', 'Icon (Material Design Icon name, e.g. Dog)')\"\n\t\t\t:modelValue=\"schema.icon || ''\"\n\t\t\t:placeholder=\"t('nextcloud-vue', 'e.g. Dog, Account, Tag — see pictogrammers.com/library/mdi')\"\n\t\t\t@update:modelValue=\"setIcon\" />\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.immutable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Immutable') }}\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch\n\t\t\tv-model=\"schema.searchable\"\n\t\t\t:disabled=\"loading\">\n\t\t\t{{ t('nextcloud-vue', 'Searchable (appears in Nextcloud unified search)') }}\n\t\t</NcCheckboxRadioSwitch>\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport {\n\tNcCheckboxRadioSwitch,\n\tNcNoteCard,\n\tNcSelect,\n\tNcTextArea,\n\tNcTextField,\n} from '@nextcloud/vue'\n\n/**\n * CnSchemaConfigurationTab — Configuration form tab for CnSchemaFormDialog.\n *\n * Renders schema metadata fields, composition (allOf/oneOf/anyOf), field mappings,\n * and configuration toggles. Mutates schemaItem directly.\n */\nexport default {\n\tname: 'CnSchemaConfigurationTab',\n\tcomponents: {\n\t\tNcTextField,\n\t\tNcTextArea,\n\t\tNcNoteCard,\n\t\tNcCheckboxRadioSwitch,\n\t\tNcSelect,\n\t},\n\n\tprops: {\n\t\t/** The full schema item — mutated directly */\n\t\tschemaItem: { type: Object, required: true },\n\t\t/** Disable state */\n\t\tloading: { type: Boolean, default: false },\n\t\t/** Available schemas for composition selects */\n\t\tavailableSchemas: { type: Array, default: () => [] },\n\t\t/** Property names for field mapping selects */\n\t\tpropertyOptions: { type: Array, default: () => [] },\n\t\t/** Pre-computed names for allOf note card display */\n\t\tallOfSchemaNames: { type: Array, default: () => [] },\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tallowedTagsInput: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * The choices for the object slug field: every schema property, and first the\n\t\t * reserved source `@schema.name` that OpenRegister turns into\n\t\t * `<schema slug>-<object name>` (the second choice Robert Zondervan asked for\n\t\t * next to a property, 2026-10-26). Stored as the id, shown by its label.\n\t\t *\n\t\t * @return {Array<{id: string, label: string}>}\n\t\t */\n\t\tslugFieldOptions() {\n\t\t\treturn [\n\t\t\t\t{ id: '@schema.name', label: t('nextcloud-vue', 'Schema name + object name') },\n\t\t\t\t...this.propertyOptions.map((property) => ({ id: property, label: property })),\n\t\t\t]\n\t\t},\n\n\t\t/** Local alias to avoid vue/no-mutating-props on template bindings */\n\t\tschema() {\n\t\t\treturn this.schemaItem\n\t\t},\n\t},\n\n\twatch: {\n\t\t// The suffix only applies together with a slug field; drop it when the\n\t\t// field is cleared so it cannot silently re-activate on a later pick.\n\t\t'schema.configuration.objectSlugField': {\n\t\t\thandler(value) {\n\t\t\t\tif (!value && this.schema.configuration.objectSlugSuffix) {\n\t\t\t\t\tthis.schema.configuration.objectSlugSuffix = false\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\n\t\t'schema.configuration.allowedTags': {\n\t\t\timmediate: true,\n\t\t\thandler(tags) {\n\t\t\t\tthis.allowedTagsInput = (tags || []).join(', ')\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\t\t/**\n\t\t * Set the schema icon (an MDI name), using $set so a previously absent\n\t\t * `icon` key becomes reactive. An empty value clears it to null.\n\t\t *\n\t\t * @param {string} value The entered MDI icon name.\n\t\t */\n\t\tsetIcon(value) {\n\t\t\tconst trimmed = (value || '').trim()\n\t\t\tthis.schema.icon = trimmed === '' ? null : trimmed\n\t\t},\n\n\t\tupdateAllowedTags(value) {\n\t\t\tif (!value || value.trim() === '') {\n\t\t\t\tthis.schema.configuration.allowedTags = []\n\t\t\t} else {\n\t\t\t\tconst tags = value.split(',').map((tag) => tag.trim()).filter((tag) => tag !== '')\n\t\t\t\tthis.schema.configuration.allowedTags = tags\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_createElementVNode","_withCtx","_toDisplayString","_createBlock","_createTextVNode","_Fragment","_renderList"],"mappings":";;AACM,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,6BAA6B,GAAA;AA4B/B,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAA+B,GAAA;AACnC,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UAAU;AAAjB,MAAA,qBAAA,EAAA,MAAA,CAAA,EAAA,CAAA,KAAA,MAAA,CAAA,EAAA,CAAA,GAAA,MAAA,KAAA,CAAA,QAAA,CAAA,MAAM,CAAC,UAAU,IAAA,MAAA,CAAA,CAAA;AACzB,MAAA,QAAQ,EAAE,MAAO,CAAA,OAAA;;uBAClB,MAA2E;wCAAxE,QAAC,CAAA,CAAA,CAAA,eAAA,EAAA,kDAAA,CAAA,CAAA,EAAA,CAAA,YAAA;;;;;;;;;"}
@@ -151,6 +151,8 @@ var script = {
151
151
  objectDescriptionField: '',
152
152
  objectImageField: '',
153
153
  objectSummaryField: '',
154
+ objectSlugField: '',
155
+ objectSlugSuffix: false,
154
156
  allowFiles: false,
155
157
  allowedTags: [],
156
158
  autoPublish: false,
@@ -415,6 +417,8 @@ var script = {
415
417
  objectDescriptionField: '',
416
418
  objectImageField: '',
417
419
  objectSummaryField: '',
420
+ objectSlugField: '',
421
+ objectSlugSuffix: false,
418
422
  allowFiles: false,
419
423
  allowedTags: [],
420
424
  autoPublish: false,
@@ -449,6 +453,12 @@ var script = {
449
453
  if (!this.schemaItem.configuration.objectSummaryField) {
450
454
  this.schemaItem.configuration.objectSummaryField = '';
451
455
  }
456
+ if (!this.schemaItem.configuration.objectSlugField) {
457
+ this.schemaItem.configuration.objectSlugField = '';
458
+ }
459
+ if (this.schemaItem.configuration.objectSlugSuffix === undefined) {
460
+ this.schemaItem.configuration.objectSlugSuffix = false;
461
+ }
452
462
  if (this.schemaItem.configuration.allowFiles === undefined) {
453
463
  this.schemaItem.configuration.allowFiles = false;
454
464
  }