@conduction/nextcloud-vue 2.144.0 → 2.146.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.
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +1 -0
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnAiCompanion/CnAiChatPanel.vue2.js.map +1 -1
- package/dist/esm/components/CnAiCompanion/CnAiChatPanel.vue3.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue.js +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js +55 -2
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailCard/CnAuditTrailCard.vue3.js.map +1 -1
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue.js +1 -1
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue2.js +16 -0
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue3.js +3 -1
- package/dist/esm/components/CnAuditTrailWidget/CnAuditTrailWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue.js +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnChecklistRunWidget/CnChecklistRunWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +12 -2
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +42 -30
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +22 -0
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js +2 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js +3 -3
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +46 -8
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +3 -3
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue.js +1 -1
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js +2 -2
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFieldListWidget/CnFieldListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +6 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnMailTab/CnMailTab.vue.js +1 -1
- package/dist/esm/components/CnMailTab/CnMailTab.vue2.js.map +1 -1
- package/dist/esm/components/CnMailTab/CnMailTab.vue3.js +2 -2
- package/dist/esm/components/CnMailTab/CnMailTab.vue3.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue.js +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue2.js.map +1 -1
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js +1 -0
- package/dist/esm/components/CnNotesCard/CnNotesCard.vue3.js.map +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue.js +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js +21 -2
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue2.js.map +1 -1
- package/dist/esm/components/CnNotificationMatrix/CnNotificationMatrix.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +73 -12
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js +165 -126
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue.js +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRetentionWidget/CnRetentionWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue.js +1 -1
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js +14 -0
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue2.js.map +1 -1
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js +2 -1
- package/dist/esm/components/CnSettingsField/CnSettingsField.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +13 -8
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue.js +1 -1
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue2.js +10 -2
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue3.js.map +1 -1
- package/dist/esm/composables/indexSources.js +35 -9
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +2 -0
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +1204 -467
- package/dist/esm/utils/builtInFormatters.js +18 -1
- package/dist/esm/utils/builtInFormatters.js.map +1 -1
- package/dist/esm/utils/detailObjectContext.js +7 -2
- package/dist/esm/utils/detailObjectContext.js.map +1 -1
- package/dist/esm/utils/localHeaderRows.js +95 -0
- package/dist/esm/utils/localHeaderRows.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/esm/utils/visibleWhen.js +6 -0
- package/dist/esm/utils/visibleWhen.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +686 -239
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +1204 -467
- package/l10n/nl.json +2 -0
- package/package.json +1 -1
- package/src/components/CnActionDialog/CnActionDialog.vue +8 -1
- package/src/components/CnAiCompanion/CnAiChatPanel.vue +3 -0
- package/src/components/CnAuditTrailCard/CnAuditTrailCard.vue +55 -2
- package/src/components/CnAuditTrailWidget/CnAuditTrailWidget.vue +18 -0
- package/src/components/CnChecklistRunWidget/CnChecklistRunWidget.vue +4 -2
- package/src/components/CnDataTable/CnDataTable.vue +19 -2
- package/src/components/CnDetailPage/CnDetailPage.md +1 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +23 -0
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue +3 -1
- package/src/components/CnFactsWidget/CnFactsWidget.vue +74 -9
- package/src/components/CnFieldListWidget/CnFieldListWidget.vue +2 -2
- package/src/components/CnIndexPage/CnIndexPage.vue +6 -3
- package/src/components/CnMailTab/CnMailTab.vue +6 -4
- package/src/components/CnNotesCard/CnNotesCard.vue +7 -2
- package/src/components/CnNotificationMatrix/CnNotificationMatrix.vue +25 -3
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +132 -20
- package/src/components/CnRetentionWidget/CnRetentionWidget.vue +2 -0
- package/src/components/CnSettingsField/CnSettingsField.vue +15 -0
- package/src/components/CnTabsWidget/CnTabsWidget.vue +6 -1
- package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +13 -8
- package/src/components/CnWorkspaceFilterWidget/CnWorkspaceFilterWidget.vue +10 -2
- package/src/composables/indexSources.js +35 -9
- package/src/css/dialog.css +25 -9
- package/src/css/look-board-detail.css +370 -30
- package/src/css/look-board-index.css +116 -4
- package/src/css/look-board.css +168 -8
- package/src/css/table.css +17 -1
- package/src/schemas/app-manifest-v2.schema.json +2 -2
- package/src/utils/builtInFormatters.js +17 -0
- package/src/utils/detailObjectContext.js +7 -2
- package/src/utils/localHeaderRows.js +91 -0
- package/src/utils/validateManifestV2.compiled.js +2 -2
- package/src/utils/visibleWhen.js +6 -0
|
@@ -2,7 +2,7 @@ import script from './CnDetailWidgetHeaderItems.vue2.js';
|
|
|
2
2
|
import { render } from './CnDetailWidgetHeaderItems.vue3.js';
|
|
3
3
|
|
|
4
4
|
script.render = render;
|
|
5
|
-
script.__scopeId = "data-v-
|
|
5
|
+
script.__scopeId = "data-v-c81df510";
|
|
6
6
|
const __sfc_main = script;
|
|
7
7
|
|
|
8
8
|
export { __sfc_main as default };
|
|
@@ -13,7 +13,7 @@ var script = {
|
|
|
13
13
|
components: { CnIcon: __sfc_main, CnStatusBadge: __sfc_main$1, NcButton },
|
|
14
14
|
|
|
15
15
|
props: {
|
|
16
|
-
/** The reported header: `{ pill, note, actions: [{ label, icon?, variant?, run }] }
|
|
16
|
+
/** The reported header: `{ pill, note, actions: [{ label, icon?, variant?, add?, run }] }`; `add: true` marks a list's Add. */
|
|
17
17
|
header: {
|
|
18
18
|
type: Object,
|
|
19
19
|
required: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnDetailWidgetHeaderItems.vue2.js","sources":["../../../../src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V.\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-detail-widget-header-items\">\n\t\t<CnStatusBadge\n\t\t\tv-if=\"header.pill\"\n\t\t\t:label=\"header.pill.label\"\n\t\t\t:variant=\"header.pill.variant\"\n\t\t\tdata-testid=\"cn-detail-widget-header-pill\" />\n\t\t<span\n\t\t\tv-if=\"header.note\"\n\t\t\tclass=\"cn-detail-page__catalog-note\"\n\t\t\tdata-testid=\"cn-detail-widget-header-note\">{{ header.note }}</span>\n\t\t<template v-for=\"(action, index) in header.actions\" :key=\"`${index}-${action.label}`\">\n\t\t\t<!-- `variant: 'primary'`: the card's main action as a filled button\n\t\t\t (a task table's \"New task\"); otherwise the quiet header link. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"action.variant === 'primary'\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tclass=\"cn-detail-widget-header-items__primary\"\n\t\t\t\tdata-testid=\"cn-detail-widget-header-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t<template v-if=\"action.icon\" #icon>\n\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ action.label }}\n\t\t\t</NcButton>\n\t\t\t<button\n\t\t\t\tv-else\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-detail-page__catalog-action\"\n\t\t\t\tdata-testid=\"cn-detail-widget-header-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t<CnIcon v-if=\"action.icon\" :name=\"action.icon\" :size=\"16\" />\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</template>\n\t</span>\n</template>\n\n<script>\nimport { NcButton } from '@nextcloud/vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\n\n/**\n * The extras a widget reports for its card's title row through its `header`\n * event: a status pill, a note and its actions. Drawn by CnDetailWidgetHost in\n * the `#actions` slot of the card it wraps a widget in.\n */\nexport default {\n\tname: 'CnDetailWidgetHeaderItems',\n\n\tcomponents: { CnIcon, CnStatusBadge, NcButton },\n\n\tprops: {\n\t\t/** The reported header: `{ pill, note, actions: [{ label, icon?, variant?, run }] }
|
|
1
|
+
{"version":3,"file":"CnDetailWidgetHeaderItems.vue2.js","sources":["../../../../src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V.\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-detail-widget-header-items\">\n\t\t<CnStatusBadge\n\t\t\tv-if=\"header.pill\"\n\t\t\t:label=\"header.pill.label\"\n\t\t\t:variant=\"header.pill.variant\"\n\t\t\tdata-testid=\"cn-detail-widget-header-pill\" />\n\t\t<span\n\t\t\tv-if=\"header.note\"\n\t\t\tclass=\"cn-detail-page__catalog-note\"\n\t\t\tdata-testid=\"cn-detail-widget-header-note\">{{ header.note }}</span>\n\t\t<template v-for=\"(action, index) in header.actions\" :key=\"`${index}-${action.label}`\">\n\t\t\t<!-- `variant: 'primary'`: the card's main action as a filled button\n\t\t\t (a task table's \"New task\"); otherwise the quiet header link. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"action.variant === 'primary'\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tclass=\"cn-detail-widget-header-items__primary\"\n\t\t\t\tdata-testid=\"cn-detail-widget-header-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t<template v-if=\"action.icon\" #icon>\n\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ action.label }}\n\t\t\t</NcButton>\n\t\t\t<button\n\t\t\t\tv-else\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-detail-page__catalog-action\"\n\t\t\t\t:class=\"{ 'cn-detail-page__catalog-action--add': action.add === true }\"\n\t\t\t\tdata-testid=\"cn-detail-widget-header-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t<CnIcon v-if=\"action.icon\" :name=\"action.icon\" :size=\"16\" />\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</template>\n\t</span>\n</template>\n\n<script>\nimport { NcButton } from '@nextcloud/vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\n\n/**\n * The extras a widget reports for its card's title row through its `header`\n * event: a status pill, a note and its actions. Drawn by CnDetailWidgetHost in\n * the `#actions` slot of the card it wraps a widget in.\n */\nexport default {\n\tname: 'CnDetailWidgetHeaderItems',\n\n\tcomponents: { CnIcon, CnStatusBadge, NcButton },\n\n\tprops: {\n\t\t/** The reported header: `{ pill, note, actions: [{ label, icon?, variant?, add?, run }] }`; `add: true` marks a list's Add. */\n\t\theader: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-detail-widget-header-items {\n\tdisplay: inline-flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-detail-page__catalog-action {\n\talign-items: center;\n\tbackground: var(--color-primary-element-light);\n\tborder: 0;\n\tborder-radius: 16px;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tfont: inherit;\n\tfont-size: 13px;\n\tfont-weight: 700;\n\tgap: 6px;\n\tmargin: 0;\n\tmin-height: 32px;\n\tpadding: 0 14px;\n\twhite-space: nowrap;\n}\n</style>\n"],"names":["CnIcon","CnStatusBadge"],"mappings":";;;;AAgDA;;AAEC;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,2BAA2B;;AAEjC,CAAA,UAAU,EAAE,UAAEA,UAAM,iBAAEC,YAAa,EAAE,UAAU;;AAE/C,CAAA,KAAK,EAAE;;AAEN,EAAA,MAAM,EAAE;GACP,IAAI,EAAE,MAAM;GACZ,QAAQ,EAAE,IAAI;GACd;EACD;AACF;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveComponent, openBlock, createElementBlock, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, createSlots, withCtx, createTextVNode, createVNode } from 'vue';
|
|
1
|
+
import { resolveComponent, openBlock, createElementBlock, createBlock, createCommentVNode, toDisplayString, Fragment, renderList, createSlots, withCtx, createTextVNode, createVNode, normalizeClass } from 'vue';
|
|
2
2
|
|
|
3
3
|
const _hoisted_1 = { class: "cn-detail-widget-header-items" };
|
|
4
4
|
const _hoisted_2 = {
|
|
@@ -58,7 +58,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
58
58
|
: (openBlock(), createElementBlock("button", {
|
|
59
59
|
key: 1,
|
|
60
60
|
type: "button",
|
|
61
|
-
class: "cn-detail-page__catalog-action",
|
|
61
|
+
class: normalizeClass(["cn-detail-page__catalog-action", { 'cn-detail-page__catalog-action--add': action.add === true }]),
|
|
62
62
|
"data-testid": "cn-detail-widget-header-action",
|
|
63
63
|
onClick: $event => (action.run())
|
|
64
64
|
}, [
|
|
@@ -70,7 +70,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
70
70
|
}, null, 8 /* PROPS */, ["name"]))
|
|
71
71
|
: createCommentVNode("v-if", true),
|
|
72
72
|
createTextVNode(" " + toDisplayString(action.label), 1 /* TEXT */)
|
|
73
|
-
],
|
|
73
|
+
], 10 /* CLASS, PROPS */, _hoisted_3))
|
|
74
74
|
], 64 /* STABLE_FRAGMENT */))
|
|
75
75
|
}), 128 /* KEYED_FRAGMENT */))
|
|
76
76
|
]))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CnDetailWidgetHeaderItems.vue3.js","sources":["../../../../src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue?vue&type=template&id=
|
|
1
|
+
{"version":3,"file":"CnDetailWidgetHeaderItems.vue3.js","sources":["../../../../src/components/CnDetailWidgetHost/CnDetailWidgetHeaderItems.vue?vue&type=template&id=c81df510&lang.js"],"sourcesContent":["<!--\n SPDX-FileCopyrightText: 2026 Conduction B.V.\n SPDX-License-Identifier: EUPL-1.2\n-->\n<template>\n\t<span class=\"cn-detail-widget-header-items\">\n\t\t<CnStatusBadge\n\t\t\tv-if=\"header.pill\"\n\t\t\t:label=\"header.pill.label\"\n\t\t\t:variant=\"header.pill.variant\"\n\t\t\tdata-testid=\"cn-detail-widget-header-pill\" />\n\t\t<span\n\t\t\tv-if=\"header.note\"\n\t\t\tclass=\"cn-detail-page__catalog-note\"\n\t\t\tdata-testid=\"cn-detail-widget-header-note\">{{ header.note }}</span>\n\t\t<template v-for=\"(action, index) in header.actions\" :key=\"`${index}-${action.label}`\">\n\t\t\t<!-- `variant: 'primary'`: the card's main action as a filled button\n\t\t\t (a task table's \"New task\"); otherwise the quiet header link. -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"action.variant === 'primary'\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tclass=\"cn-detail-widget-header-items__primary\"\n\t\t\t\tdata-testid=\"cn-detail-widget-header-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t<template v-if=\"action.icon\" #icon>\n\t\t\t\t\t<CnIcon :name=\"action.icon\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t{{ action.label }}\n\t\t\t</NcButton>\n\t\t\t<button\n\t\t\t\tv-else\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-detail-page__catalog-action\"\n\t\t\t\t:class=\"{ 'cn-detail-page__catalog-action--add': action.add === true }\"\n\t\t\t\tdata-testid=\"cn-detail-widget-header-action\"\n\t\t\t\t@click=\"action.run()\">\n\t\t\t\t<CnIcon v-if=\"action.icon\" :name=\"action.icon\" :size=\"16\" />\n\t\t\t\t{{ action.label }}\n\t\t\t</button>\n\t\t</template>\n\t</span>\n</template>\n\n<script>\nimport { NcButton } from '@nextcloud/vue'\nimport CnIcon from '../CnIcon/CnIcon.vue'\nimport CnStatusBadge from '../CnStatusBadge/CnStatusBadge.vue'\n\n/**\n * The extras a widget reports for its card's title row through its `header`\n * event: a status pill, a note and its actions. Drawn by CnDetailWidgetHost in\n * the `#actions` slot of the card it wraps a widget in.\n */\nexport default {\n\tname: 'CnDetailWidgetHeaderItems',\n\n\tcomponents: { CnIcon, CnStatusBadge, NcButton },\n\n\tprops: {\n\t\t/** The reported header: `{ pill, note, actions: [{ label, icon?, variant?, add?, run }] }`; `add: true` marks a list's Add. */\n\t\theader: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-detail-widget-header-items {\n\tdisplay: inline-flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 12px;\n}\n\n.cn-detail-page__catalog-action {\n\talign-items: center;\n\tbackground: var(--color-primary-element-light);\n\tborder: 0;\n\tborder-radius: 16px;\n\tcolor: var(--color-primary-element-light-text, var(--color-primary-element));\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tfont: inherit;\n\tfont-size: 13px;\n\tfont-weight: 700;\n\tgap: 6px;\n\tmargin: 0;\n\tmin-height: 32px;\n\tpadding: 0 14px;\n\twhite-space: nowrap;\n}\n</style>\n"],"names":["_createBlock","_openBlock","_createElementBlock","_toDisplayString","_createVNode","_normalizeClass"],"mappings":";;AASO,MAAA,UAAA,GAAA,EAAA,KAAK,EAAC,+BAAmB,GAAA;;;OAQxB,EAAC,8BAA8B;AACpC,EAAA,aAAQ,EAAA,8BAAA;;;;;;;;;;AAPL,IAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAA;sBADHA,WAI8C,CAAA,wBAAA,EAAA;;AAF7C,UAAA,KAAK,EAAE,MAAA,CAAA,MAAM,CAAC,IAAE,CAAA,KAAA;AAChB,UAAA,OAAO,EAAE,MAAA,CAAA,MAAM,CAAC,IAAI,CAAC,OAAO;AAC7B,UAAA,aAAW,EAAC,8BAA8B;;;AAEpC,IAAA,CAAA,MAAA,CAAA,MAAM,CAAC,IAAI;AADlB,SAAAC,SAAA,EAAA,EAAAC,kBAAA,CAGS,MAHT,EAAA,UAGS,EAAAC,eAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAA,CAAA,EAAA,CAAA,YAAA;;AACP,KAAAF,SAAA,CAAA,IAAA,CAAA,EAAAC,kBAAA,4BAAkC,MAAA,CAAA,MAAA,CAAA,OAAA,EAAlB,CAAA,MAAM,EAAG,KAAI,KAAA;;gBAAK,KAAA,CAAA,CAAA,EAAA,MAAA,CAAA,KAAA,CAAA,CAAA;;AAI5B,QAAA,CAAA,MAAM,CAAC,OAAO,KAAA,SAAA;0BADpBF,WAUU,CAAA,mBAAA,EAAA;;AARV,cAAA,OAAO,EAAC,SAAS;AAChB,cAAA,KAAI,EAAC,wCAAmC;AACzC,cAAA,aAAU,EAAA,gCAAA;cACT,OAAK,EAAA,MAAA,KAAE,MAAM,IAAG,EAAA,CAAA;;+BAGZ,MACL;gCADK,GACL,GAAAG,eAAA,CAAG,MAAM,CAAC,KAAE,CAAA,EAAA,CAAA,YAAA;;;;AAHH,cAAA,CAAA,MAAA,CAAA,IAAA;;0BAAA,MAAA;gCACR,MAAI;sBAAJC,WAAI,CAAA,iBAAA,EAAA;wBAAA,IAAA,EAAA,MAAA,CAAA,IAAA;AAAA,wBAAA,IAAA,EAAA,EAAA;;;;;;;0BAILF;;AAEA,cAAA,IAAI,EAAC,QAAQ;AACb,cAAA,KAAK,EAACG,cAAA,CAAA,CAAA,gCAAgC,EACrB,EAAA,qCAAA,EAAA,MAAA,CAAA,GAAA,KAAA,IAAA,EAAA,CAAA,CAAA;AACjB,cAAA,aAAO,EAAA,gCAAA;cACN,OAAK,EAAA,MAAA,KAAE,MAAA,CAAA,GAAA,EAAA,CAAA;;AACL,cAAA,CAAA,MAAA,CAAA,IAAA;gCAAHL,WAAG,CAAA,iBAAA,EAAA;;oBAAA,IAAA,EAAA,MAAA,CAAA,IAAA;AAAA,oBAAA,IAAA,EAAA,EAAA;;;8BAAA;;;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ export { FACTS_REVEAL_CHANNEL } from './CnFactsWidget.vue2.js';
|
|
|
3
3
|
import { render } from './CnFactsWidget.vue3.js';
|
|
4
4
|
|
|
5
5
|
script.render = render;
|
|
6
|
-
script.__scopeId = "data-v-
|
|
6
|
+
script.__scopeId = "data-v-2903e476";
|
|
7
7
|
const __sfc_main = script;
|
|
8
8
|
|
|
9
9
|
export { __sfc_main as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentUser } from '@nextcloud/auth';
|
|
2
2
|
import { subscribe, unsubscribe, emit } from '@nextcloud/event-bus';
|
|
3
3
|
import { formatFileSize } from '@nextcloud/files';
|
|
4
|
-
import { translate } from '@nextcloud/l10n';
|
|
4
|
+
import { translate, translatePlural } from '@nextcloud/l10n';
|
|
5
5
|
import { generateUrl } from '@nextcloud/router';
|
|
6
6
|
import { NcLoadingIcon, NcNoteCard } from '@nextcloud/vue';
|
|
7
7
|
import Check from 'vue-material-design-icons/Check.vue';
|
|
@@ -20,6 +20,7 @@ import { parseDateValue } from '../../utils/dateVariant.js';
|
|
|
20
20
|
import { fetchListTotal } from '../../utils/fetchFilterCounts.js';
|
|
21
21
|
import { fillTemplate, formatLongDate } from '../../utils/fillTemplate.js';
|
|
22
22
|
import { metricLocale, formatMoney, unwrapAppConfig } from '../../utils/formatMetric.js';
|
|
23
|
+
import { groupDisplayName, loadGroupDisplayName } from '../../utils/groupAutocomplete.js';
|
|
23
24
|
import { readPath } from '../../utils/readPath.js';
|
|
24
25
|
import { resolveDeepTokens, hasUnresolvedDeepTokens } from '../../utils/resolveFilterTokens.js';
|
|
25
26
|
import { userDisplayName } from '../../utils/userDisplayName.js';
|
|
@@ -193,16 +194,17 @@ var script = {
|
|
|
193
194
|
/**
|
|
194
195
|
* The widget configuration.
|
|
195
196
|
*
|
|
196
|
-
* - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, text?, title?, subtitle?, initialsPath?, tone? }`.
|
|
197
|
+
* - `fields` — the entries, in order. Each is `{ path, label?, as?, from?, format?, map?, itemPath?, parts?, separator?, route?, variant?, variantMap?, colorMap?, icon?, copy?, reveal?, inline?, text?, title?, subtitle?, initialsPath?, tone? }`.
|
|
197
198
|
* `as` is `row` (default when `label` or `icon` is set), `title`, `line`, `text` (a line in the normal ink), `lead` (an icon tile or initials beside `title` and `subtitle`), `pill` or `meter`.
|
|
198
199
|
* `countFrom` (`{ register, schema, filter? }`, `@objectId` / `@object.<field>` in the filter) shows how many records that list holds ("Lopende zaken 43"); the row is left out while the count cannot be read.
|
|
199
200
|
* A `meter` shows the amount at `path` against the limit at `limitPath` (or a constant `limit`) as "12 of 50" with a bar; past the limit the bar turns red and the text says "over the limit"; without a positive limit it shows the amount and no bar.
|
|
201
|
+
* A row with `inline: true` spans both columns as one line, the label, the value and its buttons side by side (a masked BSN with Show).
|
|
200
202
|
* A row's `format` may also be `email`, `phone` or `url` (a link) or `masked` (the last four characters; `reveal: true` adds Show, which unmasks the record's value; `reveal: { url, path? }` makes Show ask the server for the value at `url` (tokens resolved), read at `path` (else the entry's path), so a server that answers the mask can check and record the reveal). `copy: true` adds a copy button; `icon` replaces the label.
|
|
201
203
|
* A part may be `{ text }`, a constant; a `line` or `text` entry without `path` or `parts` shows its `text`.
|
|
202
204
|
* `resolve: { register, schema, labelField? }` on an entry or a part turns a value that is a reference (an id, or a list of ids) into the label of the referenced object (`labelField`, else `title`, then `name`): the case type or status of a task shows its name, not its uuid. The ids are fetched once per register and schema through the object store and shared by every facts widget on the page; the entry stays empty until its label is known, and when no label can be read. A resolved value works as a pill too: `map` is applied to the resolved label, and `variantMap` / `colorMap` look the tone up by the value of `resolve.toneField` on the referenced object when that is set (a status named by its `name`, coloured by its `state`), then by the resolved label, then by the stored value.
|
|
203
205
|
* `route` (`{ name, params?, query? }`, `@source.<path>` in a param) on a `title` or a `row` links its value to that route; a param that does not fill leaves it plain.
|
|
204
206
|
* `format: 'user'` shows a Nextcloud user id as the user's display name, read once per id; the entry stays empty until the name is known.
|
|
205
|
-
* `template` ("{available} {unit}") fills its `{path}` placeholders from the record instead of reading `path`; it is empty when every placeholder is. `suffix` (" kg") is added to a value that is not empty.
|
|
207
|
+
* `template` ("{available} {unit}") fills its `{path}` placeholders from the record instead of reading `path`; it is empty when every placeholder is. `suffix` (" kg") is added to a value that is not empty, its words translated.
|
|
206
208
|
* `labelPath` ("@context.caseType.handlerLabel") names a value on the record or the page's `@context` records that labels the row when it holds text; `label` is the fallback.
|
|
207
209
|
* `emptyValue` ("No") is shown, translated, when the entry has no value, so the entry stays drawn whatever `hideEmpty` says (an override that was never set reads "No").
|
|
208
210
|
* - `action` — an action drawn as a button under the facts; `headerAction` — one drawn in the card header (reported through the `header` event).
|
|
@@ -210,14 +212,14 @@ var script = {
|
|
|
210
212
|
* - `rowsPath` — a path to a list of `{ label, value }` the record holds, drawn as rows after `fields` (a preview the server builds).
|
|
211
213
|
* - `headerPill` — a status pill in the card header (reported through the `header` event): `{ path?, text?, map?, variant?, variantMap?, colorMap? }`, read from the record like a `pill` entry (DqBezwaar "Advies ontvangen"); nothing shows while the value is empty.
|
|
212
214
|
* - `notice` — `{ text, variant? }`, a note band inside the card under the facts (`info` by default; `success`, `warning` or `error`); the text is translated.
|
|
213
|
-
* `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `list` (an array joined by ", ", each item read at `itemPath`), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set) or `currency` (a money amount in the reader's language, "€ 1.234,50": the code in `currency`, else the record's `currencyField`, else the app's reporting currency, else EUR; `decimals` defaults to 2).
|
|
215
|
+
* `format` is `text` (default), `date` (board short date), `date-long` (always with the year), `longdate` (the month written out, the year only outside this year: "3 oktober"), `list` (an array joined by ", ", each item read at `itemPath` and written in `itemFormat`), `group` (a Nextcloud group by its display name), `bytes` (a size, "1.5 MB"), `number` (in the reader's language, `decimals` fraction digits when set), `months` (a number of months in words, whole years as years: 240 is "20 jaar") or `currency` (a money amount in the reader's language, "€ 1.234,50": the code in `currency`, else the record's `currencyField`, else the app's reporting currency, else EUR; `decimals` defaults to 2).
|
|
214
216
|
* `map` turns a raw value into a label (translated). `parts` (on a `line`) lists paths, or `{ path, label?, format? }`, joined by `separator` (default " · "); empty parts are dropped.
|
|
215
217
|
* - `source` — `{ register, schema, id }` or `{ url }`; omitted = the current object. `{ register, schema, filter, sort? }` without `id` reads the first object that matches `filter` in `sort` order (`{ field, dir }`): the latest count of a shift. An entry with `from: "object"` reads the current object even then (a client card that also shows the ticket's channel).
|
|
216
218
|
* - `endpointSource` — `{ url, method?, params?, responsePath? }`, the block a stat or chart takes: the facts read an app endpoint, shared and cached like those.
|
|
217
219
|
* - `emptyWhen` — a path; when the record's value there is truthy the card shows `emptyText` (an endpoint that answers `empty: true`).
|
|
218
220
|
* - `link` — `{ label, route? | href? }` at the foot. `{ label, icon?, sidebarTab }` instead opens the page's object sidebar on that tab (no link without a sidebar).
|
|
219
221
|
* - `hideEmpty` — drop an entry whose value is empty (default true).
|
|
220
|
-
* - `columns` — `2` lays the rows out in two columns with the label above the value (board DqContact); a row with `parts` joins them like a line (an address on one row).
|
|
222
|
+
* - `columns` — `2` lays the rows out in two columns with the label above the value (board DqContact); a row with `parts` joins them like a line (an address on one row). `1` stacks each label above its value in one column, for a narrow card with long labels (board DqHandhaving "Afwijking en definitief").
|
|
221
223
|
* - `emptyText` — shown when no entry has a value.
|
|
222
224
|
*
|
|
223
225
|
* @type {{fields?: Array<object>, source?: object, link?: object, hideEmpty?: boolean, emptyText?: string}}
|
|
@@ -279,6 +281,15 @@ var script = {
|
|
|
279
281
|
return Number(this.content?.columns) === 2
|
|
280
282
|
},
|
|
281
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Whether the rows stack in one column, label above value.
|
|
286
|
+
*
|
|
287
|
+
* @return {boolean}
|
|
288
|
+
*/
|
|
289
|
+
stacked() {
|
|
290
|
+
return Number(this.content?.columns) === 1
|
|
291
|
+
},
|
|
292
|
+
|
|
282
293
|
/**
|
|
283
294
|
* The token context: the detail object (prop, else the injected context)
|
|
284
295
|
* and the page workspace.
|
|
@@ -494,7 +505,7 @@ var script = {
|
|
|
494
505
|
}
|
|
495
506
|
if (kind === 'row') {
|
|
496
507
|
const last = out[out.length - 1];
|
|
497
|
-
const row = { key, label: this.labelOf(record, field), value, ...this.rowExtras(record, field, value) };
|
|
508
|
+
const row = { key, label: this.labelOf(record, field), value, inline: field.inline === true, ...this.rowExtras(record, field, value) };
|
|
498
509
|
if (field.route && !row.href) {
|
|
499
510
|
row.to = this.resolveRoute(field.route, record);
|
|
500
511
|
}
|
|
@@ -899,7 +910,12 @@ var script = {
|
|
|
899
910
|
if (value === '') {
|
|
900
911
|
return typeof field.emptyValue === 'string' && field.emptyValue !== '' ? this.tr(field.emptyValue) : ''
|
|
901
912
|
}
|
|
902
|
-
|
|
913
|
+
if (typeof field.suffix !== 'string') {
|
|
914
|
+
return value
|
|
915
|
+
}
|
|
916
|
+
// The words of a suffix are translated; its leading space stays as written.
|
|
917
|
+
const lead = field.suffix.match(/^\s*/)[0];
|
|
918
|
+
return `${value}${lead}${this.tr(field.suffix.slice(lead.length))}`
|
|
903
919
|
},
|
|
904
920
|
|
|
905
921
|
/**
|
|
@@ -1567,7 +1583,7 @@ var script = {
|
|
|
1567
1583
|
if (format === 'list' || Array.isArray(raw)) {
|
|
1568
1584
|
const items = (Array.isArray(raw) ? raw : [raw])
|
|
1569
1585
|
.map((item) => (spec.itemPath && item && typeof item === 'object' ? readPath(item, spec.itemPath) : item))
|
|
1570
|
-
.map((item) => this.format(item, { ...spec, format: 'text' }))
|
|
1586
|
+
.map((item) => this.format(item, { ...spec, format: spec.itemFormat || 'text' }))
|
|
1571
1587
|
.filter((item) => item !== '');
|
|
1572
1588
|
return items.join(', ')
|
|
1573
1589
|
}
|
|
@@ -1585,6 +1601,16 @@ var script = {
|
|
|
1585
1601
|
? formatBoardDate(date, new Date(date.getFullYear() + 1, 0, 1))
|
|
1586
1602
|
: formatBoardDate(date)
|
|
1587
1603
|
}
|
|
1604
|
+
// A number of months in words: whole years as years ("20 jaar"), else months.
|
|
1605
|
+
if (format === 'months') {
|
|
1606
|
+
const months = Number(raw);
|
|
1607
|
+
if (typeof raw === 'object' || !Number.isInteger(months) || months < 0) {
|
|
1608
|
+
return typeof raw === 'object' ? '' : String(raw)
|
|
1609
|
+
}
|
|
1610
|
+
return months > 0 && months % 12 === 0
|
|
1611
|
+
? translatePlural('nextcloud-vue', '%n year', '%n years', months / 12)
|
|
1612
|
+
: translatePlural('nextcloud-vue', '%n month', '%n months', months)
|
|
1613
|
+
}
|
|
1588
1614
|
if (format === 'bytes') {
|
|
1589
1615
|
const bytes = Number(raw);
|
|
1590
1616
|
return Number.isFinite(bytes) && bytes >= 0 ? formatFileSize(bytes) : ''
|
|
@@ -1592,6 +1618,18 @@ var script = {
|
|
|
1592
1618
|
if (format === 'user') {
|
|
1593
1619
|
return userDisplayName(raw)
|
|
1594
1620
|
}
|
|
1621
|
+
// A Nextcloud group by its display name; the id until the name is known.
|
|
1622
|
+
if (format === 'group') {
|
|
1623
|
+
if (typeof raw === 'object') {
|
|
1624
|
+
return ''
|
|
1625
|
+
}
|
|
1626
|
+
const name = groupDisplayName(String(raw));
|
|
1627
|
+
if (name === null) {
|
|
1628
|
+
loadGroupDisplayName(String(raw));
|
|
1629
|
+
return String(raw)
|
|
1630
|
+
}
|
|
1631
|
+
return name
|
|
1632
|
+
}
|
|
1595
1633
|
if (format === 'number') {
|
|
1596
1634
|
const number = Number(raw);
|
|
1597
1635
|
if (typeof raw === 'object' || !Number.isFinite(number)) {
|