@conduction/nextcloud-vue 2.82.0 → 2.83.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/CnActionsBar/CnActionsBar.vue2.js +2 -2
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js +24 -0
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +9 -4
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +9 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +96 -12
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +95 -50
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnMassActionBar/CnMassActionBar.vue2.js +2 -2
- package/dist/esm/components/CnMassActionBar/CnMassActionBar.vue2.js.map +1 -1
- package/dist/esm/components/CnMassImportDialog/CnMassImportDialog.vue2.js +2 -2
- package/dist/esm/components/CnMassImportDialog/CnMassImportDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue.js +1 -1
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue2.js +16 -2
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue3.js +3 -3
- package/dist/esm/components/CnRadioCardsWidget/CnRadioCardsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue.js +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js +43 -0
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js +130 -53
- package/dist/esm/components/CnReportsPage/CnReportsPage.vue3.js.map +1 -1
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue.js +1 -1
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue2.js +70 -5
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue3.js +61 -35
- package/dist/esm/components/CnSettingsFormWidget/CnSettingsFormWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +3 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue.js +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js +55 -3
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js +88 -71
- package/dist/esm/components/CnStatsBlockWidget/CnStatsBlockWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue.js +1 -1
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue2.js +18 -4
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue3.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +3 -3
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +549 -338
- package/dist/esm/utils/fetchAggregate.js +25 -2
- package/dist/esm/utils/fetchAggregate.js.map +1 -1
- package/dist/esm/utils/switchValues.js +62 -0
- package/dist/esm/utils/switchValues.js.map +1 -0
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +36086 -35536
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +549 -338
- package/l10n/nl.json +3 -3
- package/package.json +1 -1
- package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +31 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +9 -0
- package/src/components/CnIndexPage/CnIndexPage.vue +125 -15
- package/src/components/CnRadioCardsWidget/CnRadioCardsWidget.vue +54 -3
- package/src/components/CnReportsPage/CnReportsPage.vue +84 -4
- package/src/components/CnSettingsFormWidget/CnSettingsFormWidget.vue +110 -18
- package/src/components/CnStatWidget/CnStatWidget.vue +3 -1
- package/src/components/CnStatsBlockWidget/CnStatsBlockWidget.vue +92 -5
- package/src/components/CnSwitchRowsWidget/CnSwitchRowsWidget.vue +18 -4
- package/src/css/index-page.css +11 -0
- package/src/css/index.css +1 -0
- package/src/css/look-board-reports.css +117 -0
- package/src/css/look-board.css +32 -1
- package/src/schemas/app-manifest-v2.schema.json +2 -2
- package/src/utils/fetchAggregate.js +24 -1
- package/src/utils/switchValues.js +59 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCurrentUser } from '@nextcloud/auth';
|
|
2
2
|
import { translate } from '@nextcloud/l10n';
|
|
3
|
-
import { NcLoadingIcon, NcActions, NcActionLink, NcActionButton, NcActionCaption, NcActionCheckbox, NcButton, NcCheckboxRadioSwitch } from '@nextcloud/vue';
|
|
3
|
+
import { NcLoadingIcon, NcActions, NcActionLink, NcActionButton, NcActionCaption, NcActionSeparator, NcActionCheckbox, NcButton, NcCheckboxRadioSwitch } from '@nextcloud/vue';
|
|
4
4
|
import { ref, getCurrentInstance, markRaw, inject } from 'vue';
|
|
5
5
|
import AlertCircleOutline from 'vue-material-design-icons/AlertCircleOutline.vue';
|
|
6
6
|
import Close from 'vue-material-design-icons/Close.vue';
|
|
@@ -10,6 +10,8 @@ import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue';
|
|
|
10
10
|
import Export from 'vue-material-design-icons/Export.vue';
|
|
11
11
|
import Eye from 'vue-material-design-icons/Eye.vue';
|
|
12
12
|
import FilterOutline from 'vue-material-design-icons/FilterOutline.vue';
|
|
13
|
+
import ImportIcon from 'vue-material-design-icons/Import.vue';
|
|
14
|
+
import TrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue';
|
|
13
15
|
import Tune from 'vue-material-design-icons/Tune.vue';
|
|
14
16
|
import ViewColumnOutline from 'vue-material-design-icons/ViewColumnOutline.vue';
|
|
15
17
|
import __sfc_main$w from '../../dialogs/CnConfirmDialog.vue.js';
|
|
@@ -24,13 +26,13 @@ import { createRefLabelResolver } from '../../composables/useRefLabels.js';
|
|
|
24
26
|
import { useSavedViewsApi } from '../../composables/useSavedViewsApi.js';
|
|
25
27
|
import { METADATA_COLUMNS } from '../../constants/metadata.js';
|
|
26
28
|
import { useObjectStore } from '../../store/useObjectStore.js';
|
|
27
|
-
import { routeHref } from '../../utils/actionLink.js';
|
|
29
|
+
import { routeHref, followItemActionLink, resolveItemActionLink } from '../../utils/actionLink.js';
|
|
28
30
|
import { resolveRegisteredHandler, buildOnSuccessRoute } from '../../utils/actionsDispatcher.js';
|
|
29
31
|
import { reportBindingProblems } from '../../utils/diagnostics.js';
|
|
30
32
|
import { fetchFilterCounts } from '../../utils/fetchFilterCounts.js';
|
|
31
33
|
import { buildExportUrl } from '../../utils/indexExportHelpers.js';
|
|
32
34
|
import { lensUnavailableText } from '../../utils/lensAvailability.js';
|
|
33
|
-
import { openRowTarget } from '../../utils/linkNavigation.js';
|
|
35
|
+
import { isModifiedClick, openRowTarget } from '../../utils/linkNavigation.js';
|
|
34
36
|
import { resolveClaimedTeams, splitViewsIntoTabs, viewAsTab, resolveClaimTokens, viewIdOf } from '../../utils/listLenses.js';
|
|
35
37
|
import { LIST_SHORTCUTS, listPaletteCommands, shortcutFor } from '../../utils/listShortcuts.js';
|
|
36
38
|
import { multiKeySort } from '../../utils/multiKeySort.js';
|
|
@@ -327,6 +329,7 @@ var script = {
|
|
|
327
329
|
NcActionLink,
|
|
328
330
|
NcActionButton,
|
|
329
331
|
NcActionCaption,
|
|
332
|
+
NcActionSeparator,
|
|
330
333
|
NcActionCheckbox,
|
|
331
334
|
NcButton,
|
|
332
335
|
AlertCircleOutline,
|
|
@@ -606,9 +609,11 @@ var script = {
|
|
|
606
609
|
* actions, or what its `items` name (`header-actions`, a header action
|
|
607
610
|
* id, `import`, `export`, `refresh`, `copy-selected`, `delete-selected`,
|
|
608
611
|
* `documentation`), so the entries the bar's menu loses have a place.
|
|
612
|
+
* `items` can group them: `{ heading }` draws a group heading (an i18n
|
|
613
|
+
* key) and `separator` a rule, each only when an entry follows.
|
|
609
614
|
*
|
|
610
615
|
* @spec openspec/changes/zuiddrecht-pixel-gaps-3/specs/zuiddrecht-pixel-gaps-3/spec.md#requirement-an-index-page-can-take-the-board-header
|
|
611
|
-
* @type {Array<{label?: string, action: string, variant?: ('primary'|'secondary'), icon?: string, format?: ('csv'|'excel'), id?: string, items?: string
|
|
616
|
+
* @type {Array<{label?: string, action: string, variant?: ('primary'|'secondary'), icon?: string, format?: ('csv'|'excel'), id?: string, items?: Array<(string|{heading: string})>}>}
|
|
612
617
|
*/
|
|
613
618
|
headerButtons: {
|
|
614
619
|
type: Array,
|
|
@@ -4535,7 +4540,10 @@ var script = {
|
|
|
4535
4540
|
variant: button.variant === 'primary' ? 'primary' : 'secondary',
|
|
4536
4541
|
icon,
|
|
4537
4542
|
format: button.format === 'excel' ? 'excel' : 'csv',
|
|
4538
|
-
items: Array.isArray(button.items)
|
|
4543
|
+
items: Array.isArray(button.items)
|
|
4544
|
+
? button.items.filter((item) => (typeof item === 'string' && item !== '')
|
|
4545
|
+
|| (item && typeof item === 'object' && typeof item.heading === 'string' && item.heading !== ''))
|
|
4546
|
+
: null,
|
|
4539
4547
|
}
|
|
4540
4548
|
})
|
|
4541
4549
|
.filter((button) => button.label !== '')
|
|
@@ -5830,11 +5838,14 @@ var script = {
|
|
|
5830
5838
|
* `import`, `export`, `refresh`, `copy-selected`, `delete-selected`
|
|
5831
5839
|
* (disabled until a row is selected) and `documentation` (a link to
|
|
5832
5840
|
* `documentationUrl`, left out when the page has none). An unknown name
|
|
5833
|
-
* is left out.
|
|
5841
|
+
* is left out. `{ heading }` and `separator` group the entries: an
|
|
5842
|
+
* entry of `kind` `heading` or `separator`, drawn only when an entry
|
|
5843
|
+
* follows it.
|
|
5834
5844
|
*
|
|
5835
5845
|
* @spec openspec/changes/screens-index-header-actions-menu/specs/index-header/spec.md#requirement-the-header-actions-menu-lists-what-its-items-name
|
|
5836
|
-
* @
|
|
5837
|
-
* @
|
|
5846
|
+
* @spec openspec/changes/screens-index-header-menu-headings/specs/index-header/spec.md#requirement-the-header-actions-menu-can-draw-group-headings-and-separators
|
|
5847
|
+
* @param {{items?: Array<(string|{heading: string})>|null, format?: string}} button The resolved header button.
|
|
5848
|
+
* @return {Array<{key: string, label: string, kind?: ('heading'|'separator'), icon?: string, href?: string, disabled?: boolean, title?: string, iconComponent?: object, run?: Function}>}
|
|
5838
5849
|
*/
|
|
5839
5850
|
headerMenuEntries(button) {
|
|
5840
5851
|
const fromAction = (entry) => ({
|
|
@@ -5842,14 +5853,18 @@ var script = {
|
|
|
5842
5853
|
label: entry.label ? this.cnTranslate(entry.label) : '',
|
|
5843
5854
|
icon: entry.icon && typeof entry.icon === 'string' && !entry.icon.startsWith('icon-') ? entry.icon : '',
|
|
5844
5855
|
href: typeof entry.href === 'string' && entry.href !== '' ? entry.href : '',
|
|
5856
|
+
// A `handler: "navigate"` entry whose route resolves carries `to`
|
|
5857
|
+
// (resolveHeaderHandler drops its handler): the menu draws it as
|
|
5858
|
+
// an in-app link, as the actions bar does, so it navigates.
|
|
5859
|
+
link: !entry.href && entry.to && !entry.disabled ? resolveItemActionLink({ to: entry.to }, null, this.$router) : null,
|
|
5845
5860
|
disabled: Boolean(entry.disabled),
|
|
5846
5861
|
run: () => this.onHeaderAction({ action: entry.id, id: entry.id }),
|
|
5847
5862
|
});
|
|
5848
5863
|
const names = button && Array.isArray(button.items) ? button.items : ['header-actions'];
|
|
5849
5864
|
const noSelection = this.internalSelectedIds.length < 1;
|
|
5850
5865
|
const builtIns = {
|
|
5851
|
-
import: () => ({ key: 'import', label: translate('nextcloud-vue', 'Import'), icon: 'Import', run: () => { this.showImportDialog = true; } }),
|
|
5852
|
-
export: () => ({ key: 'export', label: translate('nextcloud-vue', 'Export'), icon: 'Export', run: () => this.onHeaderButton({ action: 'export', format: button.format }) }),
|
|
5866
|
+
import: () => ({ key: 'import', label: translate('nextcloud-vue', 'Import'), icon: 'Import', iconComponent: ImportIcon, run: () => { this.showImportDialog = true; } }),
|
|
5867
|
+
export: () => ({ key: 'export', label: translate('nextcloud-vue', 'Export'), icon: 'Export', iconComponent: Export, run: () => this.onHeaderButton({ action: 'export', format: button.format }) }),
|
|
5853
5868
|
refresh: () => ({ key: 'refresh', label: translate('nextcloud-vue', 'Refresh'), icon: 'Refresh', run: () => this.onRefreshEvent() }),
|
|
5854
5869
|
'copy-selected': () => ({
|
|
5855
5870
|
key: 'copy-selected',
|
|
@@ -5864,6 +5879,7 @@ var script = {
|
|
|
5864
5879
|
key: 'delete-selected',
|
|
5865
5880
|
label: translate('nextcloud-vue', 'Delete selected'),
|
|
5866
5881
|
icon: 'TrashCanOutline',
|
|
5882
|
+
iconComponent: TrashCanOutline,
|
|
5867
5883
|
disabled: noSelection,
|
|
5868
5884
|
title: noSelection ? translate('nextcloud-vue', 'Select 1 or more items to delete') : '',
|
|
5869
5885
|
run: () => { this.showMassDeleteDialog = true; },
|
|
@@ -5881,8 +5897,17 @@ var script = {
|
|
|
5881
5897
|
entries.push(entry);
|
|
5882
5898
|
}
|
|
5883
5899
|
};
|
|
5900
|
+
// A group heading (`{ heading }`) or a `separator` is kept as a mark
|
|
5901
|
+
// and only drawn when an entry follows it (see groupMenuEntries).
|
|
5902
|
+
let mark = 0;
|
|
5884
5903
|
for (const name of names) {
|
|
5885
|
-
if (name === '
|
|
5904
|
+
if (name && typeof name === 'object') {
|
|
5905
|
+
mark += 1;
|
|
5906
|
+
entries.push({ key: `__heading-${mark}`, kind: 'heading', label: this.cnTranslate(name.heading) });
|
|
5907
|
+
} else if (name === 'separator') {
|
|
5908
|
+
mark += 1;
|
|
5909
|
+
entries.push({ key: `__separator-${mark}`, kind: 'separator', label: '' });
|
|
5910
|
+
} else if (name === 'header-actions') {
|
|
5886
5911
|
this.mergedHeaderActions.forEach((entry) => push(fromAction(entry)));
|
|
5887
5912
|
} else if (Object.hasOwn(builtIns, name)) {
|
|
5888
5913
|
push(builtIns[name]());
|
|
@@ -5893,7 +5918,66 @@ var script = {
|
|
|
5893
5918
|
}
|
|
5894
5919
|
}
|
|
5895
5920
|
}
|
|
5896
|
-
return entries
|
|
5921
|
+
return this.groupMenuEntries(entries)
|
|
5922
|
+
},
|
|
5923
|
+
|
|
5924
|
+
/**
|
|
5925
|
+
* Tidy the marks of the header's Actions menu: a heading or separator
|
|
5926
|
+
* with no entry after it (before the next mark or the end) is dropped,
|
|
5927
|
+
* a separator never opens the menu, two separators in a row are one,
|
|
5928
|
+
* and a heading followed by a separator before any entry is dropped. So a group whose entries are all left out (no documentation
|
|
5929
|
+
* URL, an unknown id) leaves no empty heading or double rule behind,
|
|
5930
|
+
* and a menu of marks only has no entries and is not drawn.
|
|
5931
|
+
*
|
|
5932
|
+
* @spec openspec/changes/screens-index-header-menu-headings/specs/index-header/spec.md#requirement-the-header-actions-menu-can-draw-group-headings-and-separators
|
|
5933
|
+
* @param {Array<{key: string, kind?: string}>} entries The entries with their marks, in order.
|
|
5934
|
+
* @return {Array<{key: string, kind?: string}>} The entries to draw.
|
|
5935
|
+
*/
|
|
5936
|
+
groupMenuEntries(entries) {
|
|
5937
|
+
const out = [];
|
|
5938
|
+
let separator = null;
|
|
5939
|
+
let heading = null;
|
|
5940
|
+
for (const entry of entries) {
|
|
5941
|
+
if (entry.kind === 'separator') {
|
|
5942
|
+
// A rule ends the group before it: a heading not yet followed
|
|
5943
|
+
// by an entry is dropped with it.
|
|
5944
|
+
separator = entry;
|
|
5945
|
+
heading = null;
|
|
5946
|
+
continue
|
|
5947
|
+
}
|
|
5948
|
+
if (entry.kind === 'heading') {
|
|
5949
|
+
heading = entry;
|
|
5950
|
+
continue
|
|
5951
|
+
}
|
|
5952
|
+
if (separator && out.length > 0) {
|
|
5953
|
+
out.push(separator);
|
|
5954
|
+
}
|
|
5955
|
+
if (heading) {
|
|
5956
|
+
out.push(heading);
|
|
5957
|
+
}
|
|
5958
|
+
separator = null;
|
|
5959
|
+
heading = null;
|
|
5960
|
+
out.push(entry);
|
|
5961
|
+
}
|
|
5962
|
+
return out
|
|
5963
|
+
},
|
|
5964
|
+
|
|
5965
|
+
/**
|
|
5966
|
+
* An in-app link of the header's Actions menu was clicked: a plain click
|
|
5967
|
+
* goes through the router (a modified click is left to the browser),
|
|
5968
|
+
* and the entry is reported as a header action, as the actions bar does.
|
|
5969
|
+
*
|
|
5970
|
+
* @spec openspec/changes/screens-index-header-actions-menu/specs/index-header/spec.md#requirement-the-header-actions-menu-lists-what-its-items-name
|
|
5971
|
+
* @param {{key: string, link: object}} entry The menu entry.
|
|
5972
|
+
* @param {MouseEvent} event The click.
|
|
5973
|
+
* @return {void}
|
|
5974
|
+
*/
|
|
5975
|
+
onHeaderMenuLinkClick(entry, event) {
|
|
5976
|
+
if (isModifiedClick(event)) {
|
|
5977
|
+
return
|
|
5978
|
+
}
|
|
5979
|
+
followItemActionLink(event, entry.link, this.$router);
|
|
5980
|
+
this.$emit('header-action', { action: entry.key, id: entry.key });
|
|
5897
5981
|
},
|
|
5898
5982
|
|
|
5899
5983
|
/**
|