@conduction/nextcloud-vue 2.103.0 → 2.104.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 +23 -0
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js +94 -72
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +18 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +3 -3
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +39 -2
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js +14 -0
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +40 -2
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +159 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +105 -85
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js +7 -2
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
- package/dist/esm/components/CnObjectRow/CnObjectRow.vue.js +1 -1
- package/dist/esm/components/CnObjectRow/CnObjectRow.vue2.js +57 -5
- package/dist/esm/components/CnObjectRow/CnObjectRow.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectRow/CnObjectRow.vue3.js +37 -4
- package/dist/esm/components/CnObjectRow/CnObjectRow.vue3.js.map +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue.js +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnUserSettingsDialog/CnUserSettingsDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +18 -2
- 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/composables/indexSources.js +7 -7
- package/dist/esm/composables/indexSources.js.map +1 -1
- package/dist/esm/l10n/en.json.js +4 -0
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +4 -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 +114 -33
- package/dist/esm/utils/nextcloudDirectory.js +18 -1
- package/dist/esm/utils/nextcloudDirectory.js.map +1 -1
- package/dist/esm/utils/sortOrder.js +61 -0
- package/dist/esm/utils/sortOrder.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 +4172 -3662
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +114 -33
- package/l10n/en.json +4 -0
- package/l10n/nl.json +4 -0
- package/package.json +1 -1
- package/src/components/CnActionsBar/CnActionsBar.md +1 -0
- package/src/components/CnActionsBar/CnActionsBar.vue +39 -2
- package/src/components/CnAppRoot/CnAppRoot.md +1 -1
- package/src/components/CnAppRoot/CnAppRoot.vue +21 -4
- package/src/components/CnDataTable/CnDataTable.md +1 -0
- package/src/components/CnDataTable/CnDataTable.vue +49 -0
- package/src/components/CnDetailPage/CnDetailPage.md +1 -0
- package/src/components/CnDetailPage/CnDetailPage.vue +40 -2
- package/src/components/CnIndexPage/CnIndexPage.md +4 -2
- package/src/components/CnIndexPage/CnIndexPage.vue +174 -8
- package/src/components/CnIndexPage/useSelfFetchList.js +6 -1
- package/src/components/CnObjectRow/CnObjectRow.vue +95 -1
- package/src/components/CnUserSettingsDialog/CnUserSettingsDialog.vue +7 -2
- package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +18 -2
- package/src/composables/indexSources.js +7 -7
- package/src/css/index-page.css +19 -0
- package/src/css/look-board-index.css +48 -0
- package/src/schemas/app-manifest-v2.schema.json +23 -1
- package/src/utils/nextcloudDirectory.js +17 -0
- package/src/utils/sortOrder.js +58 -0
- package/src/utils/validateManifestV2.compiled.js +3 -3
|
@@ -55,6 +55,7 @@ import { DEFAULT_ROW_INDICATOR_CAP } from '../../utils/rowIndicators.js';
|
|
|
55
55
|
import { viewMatchesScope, extractViewState, buildRouteQueryFromViewState, extractViewStateFromRouteQuery, buildViewCreatePayload, savedViewScope, normalizeSharedWith } from '../../utils/savedViewHelpers.js';
|
|
56
56
|
import { fieldsFromSchema, columnsFromSchema } from '../../utils/schema.js';
|
|
57
57
|
import { resolveScopeLayout, resolveScopePresentation } from '../../utils/scopeListLayout.js';
|
|
58
|
+
import { sameSortKeys, orderToSortKeys } from '../../utils/sortOrder.js';
|
|
58
59
|
import { dispatchObjectCreated } from '../../utils/walkthroughSignals.js';
|
|
59
60
|
import __sfc_main$7 from '../CnActionButtons/CnActionButtons.vue.js';
|
|
60
61
|
import __sfc_main$8 from '../CnActionsBar/CnActionsBar.vue.js';
|
|
@@ -728,7 +729,10 @@ var script = {
|
|
|
728
729
|
* case" (manifest `config.headerButtons`). Each is `{ label?, action,
|
|
729
730
|
* variant?, icon?, format?, id? }`: `action` is `add` (the Add flow;
|
|
730
731
|
* its label defaults to the Add label), `export` (the export leaf in
|
|
731
|
-
* `format`, `csv` by default, else the export dialog
|
|
732
|
+
* `format`, `csv` by default, else the export dialog; with `run` the
|
|
733
|
+
* `headerActions` entry of that id; on an `entitySource` page without
|
|
734
|
+
* `run` and without a `@mass-export` listener it is not drawn),
|
|
735
|
+
* `import`,
|
|
732
736
|
* `refresh`, `save-view` (the save-current-view dialog: the board's
|
|
733
737
|
* "Zoekopdracht opslaan", label "Save view" by default), or the id of a
|
|
734
738
|
* `headerActions` entry; `variant` is
|
|
@@ -908,6 +912,20 @@ var script = {
|
|
|
908
912
|
validator: (v) => ['', 'toolbar'].includes(v),
|
|
909
913
|
},
|
|
910
914
|
|
|
915
|
+
/**
|
|
916
|
+
* Where the board look's search field sits (manifest
|
|
917
|
+
* `config.searchPlacement`): `''` (the default) opens row 2 with it,
|
|
918
|
+
* `'toolbar'` puts it on row 1 before the Filter button and the view
|
|
919
|
+
* switch (DqTeamwachtrij).
|
|
920
|
+
*
|
|
921
|
+
* @type {''|'toolbar'}
|
|
922
|
+
*/
|
|
923
|
+
searchPlacement: {
|
|
924
|
+
type: String,
|
|
925
|
+
default: '',
|
|
926
|
+
validator: (v) => ['', 'toolbar'].includes(v),
|
|
927
|
+
},
|
|
928
|
+
|
|
911
929
|
/**
|
|
912
930
|
* How the quick filters render: `'chips'` (pill strip, default) or
|
|
913
931
|
* `'dropdown'` (a single `NcSelect`). Sourced from the manifest as
|
|
@@ -1854,6 +1872,16 @@ var script = {
|
|
|
1854
1872
|
default: false,
|
|
1855
1873
|
},
|
|
1856
1874
|
|
|
1875
|
+
/**
|
|
1876
|
+
* `false` draws no inline search in the actions bar, also in the board
|
|
1877
|
+
* look, which otherwise draws one on every index page. Fed from the
|
|
1878
|
+
* manifest as `pages[].config.search`.
|
|
1879
|
+
*/
|
|
1880
|
+
search: {
|
|
1881
|
+
type: Boolean,
|
|
1882
|
+
default: true,
|
|
1883
|
+
},
|
|
1884
|
+
|
|
1857
1885
|
/**
|
|
1858
1886
|
* Keep the "Showing X of Y" counter visible beside the inline search field,
|
|
1859
1887
|
* after any `#after-search` controls (only relevant with `inlineSearch`,
|
|
@@ -1921,12 +1949,28 @@ var script = {
|
|
|
1921
1949
|
default: () => [],
|
|
1922
1950
|
},
|
|
1923
1951
|
|
|
1924
|
-
/**
|
|
1952
|
+
/**
|
|
1953
|
+
* Selected value of the standalone sort dropdown. Empty lets a
|
|
1954
|
+
* self-fetch page show the option matching its current order.
|
|
1955
|
+
*/
|
|
1925
1956
|
sortSelectValue: {
|
|
1926
1957
|
type: String,
|
|
1927
1958
|
default: '',
|
|
1928
1959
|
},
|
|
1929
1960
|
|
|
1961
|
+
/**
|
|
1962
|
+
* The order a self-fetch page opens on when neither the address nor
|
|
1963
|
+
* `sortKeys`/`sortKey` gives one (manifest `config.defaultOrder`):
|
|
1964
|
+
* `"-createdAt"`, `"priority:desc,title"`, an `_order` map or a
|
|
1965
|
+
* `[{ key, order }]` list.
|
|
1966
|
+
*
|
|
1967
|
+
* @type {string|object|Array}
|
|
1968
|
+
*/
|
|
1969
|
+
defaultOrder: {
|
|
1970
|
+
type: [String, Object, Array],
|
|
1971
|
+
default: '',
|
|
1972
|
+
},
|
|
1973
|
+
|
|
1930
1974
|
/** MDI icon name for the list view-toggle option (manifest `config.listIcon`) */
|
|
1931
1975
|
listIcon: {
|
|
1932
1976
|
type: String,
|
|
@@ -3655,6 +3699,60 @@ var script = {
|
|
|
3655
3699
|
return match || null
|
|
3656
3700
|
},
|
|
3657
3701
|
|
|
3702
|
+
/**
|
|
3703
|
+
* The heading above the list for the selected folder: on a `groups`
|
|
3704
|
+
* pane (or with `folderSidebar.heading: true`), its name and, under
|
|
3705
|
+
* it, its parent folder and its count. The count reads
|
|
3706
|
+
* `folderSidebar.countText` (`{count}`, through the app's translate),
|
|
3707
|
+
* else "{count} members" on a groups pane.
|
|
3708
|
+
*
|
|
3709
|
+
* @return {{name: string, subtitle: string}|null} The heading, or null on All.
|
|
3710
|
+
*/
|
|
3711
|
+
scopeHeading() {
|
|
3712
|
+
const cfg = this.folderSidebar;
|
|
3713
|
+
const scope = this.activeScope;
|
|
3714
|
+
if (!cfg || !scope || !(cfg.source === 'groups' || cfg.heading === true)) {
|
|
3715
|
+
return null
|
|
3716
|
+
}
|
|
3717
|
+
const idField = this.folderPassthroughIdField;
|
|
3718
|
+
const name = String(this.getByPath(scope, this.folderPassthroughNameField) ?? this.selectedFolderId);
|
|
3719
|
+
const parentId = scope.parentId ?? scope.parent ?? null;
|
|
3720
|
+
const parent = parentId === null || parentId === undefined
|
|
3721
|
+
? null
|
|
3722
|
+
: this.folderSidebarFolders.find((f) => f && String(this.getByPath(f, idField)) === String(parentId));
|
|
3723
|
+
const parts = [];
|
|
3724
|
+
if (parent) {
|
|
3725
|
+
parts.push(String(this.getByPath(parent, this.folderPassthroughNameField) ?? parentId));
|
|
3726
|
+
}
|
|
3727
|
+
if (typeof scope.count === 'number') {
|
|
3728
|
+
if (cfg.countText) {
|
|
3729
|
+
parts.push(this.cnTranslate(cfg.countText).replace('{count}', String(scope.count)));
|
|
3730
|
+
} else if (cfg.source === 'groups') {
|
|
3731
|
+
parts.push(translatePlural('nextcloud-vue', '{count} member', '{count} members', scope.count, { count: scope.count }));
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
return { name, subtitle: parts.join(' · ') }
|
|
3735
|
+
},
|
|
3736
|
+
|
|
3737
|
+
/**
|
|
3738
|
+
* The sort select's shown value: `sortSelectValue` when the host
|
|
3739
|
+
* controls it, else on a self-fetch page the option whose order is the
|
|
3740
|
+
* list's current order (a header click that matches one shows it).
|
|
3741
|
+
*
|
|
3742
|
+
* @return {string} The option value, or '' when none matches.
|
|
3743
|
+
*/
|
|
3744
|
+
effectiveSortSelectValue() {
|
|
3745
|
+
if (this.sortSelectValue) {
|
|
3746
|
+
return this.sortSelectValue
|
|
3747
|
+
}
|
|
3748
|
+
if (!this.isSelfFetchMode || !this.list || !this.list.sortKeys) {
|
|
3749
|
+
return ''
|
|
3750
|
+
}
|
|
3751
|
+
const current = this.list.sortKeys.value || [];
|
|
3752
|
+
const match = (this.sortSelectOptions || []).find((o) => o && sameSortKeys(this.sortSelectKeys(o), current));
|
|
3753
|
+
return match ? match.value : ''
|
|
3754
|
+
},
|
|
3755
|
+
|
|
3658
3756
|
/**
|
|
3659
3757
|
* The `x-index` block the active scope's own schema row carries, for a
|
|
3660
3758
|
* folder list derived from a register. Empty for every other source:
|
|
@@ -5428,6 +5526,7 @@ var script = {
|
|
|
5428
5526
|
variant: button.variant === 'primary' ? 'primary' : 'secondary',
|
|
5429
5527
|
icon,
|
|
5430
5528
|
format: button.format === 'excel' ? 'excel' : 'csv',
|
|
5529
|
+
run: typeof button.run === 'string' ? button.run : '',
|
|
5431
5530
|
items: Array.isArray(button.items)
|
|
5432
5531
|
? button.items.filter((item) => (typeof item === 'string' && item !== '')
|
|
5433
5532
|
|| (item && typeof item === 'object' && typeof item.heading === 'string' && item.heading !== ''))
|
|
@@ -5435,6 +5534,10 @@ var script = {
|
|
|
5435
5534
|
}
|
|
5436
5535
|
})
|
|
5437
5536
|
.filter((button) => button.label !== '')
|
|
5537
|
+
// An Export with nothing to export through is not drawn: a
|
|
5538
|
+
// named or endpoint source with no `run` and no `@mass-export`
|
|
5539
|
+
// listener.
|
|
5540
|
+
.filter((button) => button.action !== 'export' || this.headerExportAvailable(button))
|
|
5438
5541
|
// The Actions menu lists the page's header actions (or the
|
|
5439
5542
|
// entries its `items` name), so a menu with nothing to list
|
|
5440
5543
|
// is not drawn.
|
|
@@ -7223,7 +7326,9 @@ var script = {
|
|
|
7223
7326
|
if (button.action === 'add') {
|
|
7224
7327
|
this.onAddClick();
|
|
7225
7328
|
} else if (button.action === 'export') {
|
|
7226
|
-
if (
|
|
7329
|
+
if (button.run) {
|
|
7330
|
+
this.onHeaderAction({ action: button.run, id: button.run });
|
|
7331
|
+
} else if (this.register && this.exportSchemaSlug) {
|
|
7227
7332
|
this.onExportClick(button.format);
|
|
7228
7333
|
} else {
|
|
7229
7334
|
this.showExportDialog = true;
|
|
@@ -7239,6 +7344,25 @@ var script = {
|
|
|
7239
7344
|
}
|
|
7240
7345
|
},
|
|
7241
7346
|
|
|
7347
|
+
/**
|
|
7348
|
+
* Whether a header Export has something to export through. Any page
|
|
7349
|
+
* listing OpenRegister objects (self-fetch or the consumer's
|
|
7350
|
+
* `objects`) keeps it; a named or endpoint source (`entitySource`)
|
|
7351
|
+
* needs a `run` naming one of the page's header actions, or a
|
|
7352
|
+
* `@mass-export` listener.
|
|
7353
|
+
*
|
|
7354
|
+
* @spec openspec/changes/index-header-export-source/specs/index-page/spec.md#requirement-a-header-export-is-drawn-only-when-it-can-export
|
|
7355
|
+
* @param {{run?: string}} button The resolved header button.
|
|
7356
|
+
* @return {boolean}
|
|
7357
|
+
*/
|
|
7358
|
+
headerExportAvailable(button) {
|
|
7359
|
+
if (!this.isNamedSource || (button && button.run)) {
|
|
7360
|
+
return true
|
|
7361
|
+
}
|
|
7362
|
+
const props = this.$ && this.$.vnode && this.$.vnode.props;
|
|
7363
|
+
return Boolean(props && typeof props.onMassExport === 'function')
|
|
7364
|
+
},
|
|
7365
|
+
|
|
7242
7366
|
/**
|
|
7243
7367
|
* Click dispatch from CnActionsBar's `@header-action`. Looks
|
|
7244
7368
|
* up the resolved entry by id, invokes its handler if any,
|
|
@@ -7359,6 +7483,38 @@ var script = {
|
|
|
7359
7483
|
this.$emit('quick-filter-change', this.selectedQuickFilterIndices);
|
|
7360
7484
|
},
|
|
7361
7485
|
|
|
7486
|
+
/**
|
|
7487
|
+
* The sort keys a sort-select option stands for: its `order` (any
|
|
7488
|
+
* `orderToSortKeys` form), else its `value` read as an order.
|
|
7489
|
+
*
|
|
7490
|
+
* @param {object} option A `sortSelectOptions` entry.
|
|
7491
|
+
* @return {Array<{key: string, order: string}>} The sort keys.
|
|
7492
|
+
*/
|
|
7493
|
+
sortSelectKeys(option) {
|
|
7494
|
+
if (!option) {
|
|
7495
|
+
return []
|
|
7496
|
+
}
|
|
7497
|
+
return orderToSortKeys(option.order !== undefined ? option.order : option.value)
|
|
7498
|
+
},
|
|
7499
|
+
|
|
7500
|
+
/**
|
|
7501
|
+
* A choice in the sort select. On a self-fetch page it orders the list
|
|
7502
|
+
* as a header click does (`_order`, kept in the address); every page
|
|
7503
|
+
* also emits `sort-change` with the value.
|
|
7504
|
+
*
|
|
7505
|
+
* @param {string} value The chosen option's value.
|
|
7506
|
+
* @return {void}
|
|
7507
|
+
*/
|
|
7508
|
+
onSortSelectChange(value) {
|
|
7509
|
+
const option = (this.sortSelectOptions || []).find((o) => o && o.value === value);
|
|
7510
|
+
const keys = this.sortSelectKeys(option);
|
|
7511
|
+
if (option && keys.length > 0 && this.isSelfFetchMode && typeof this.list.onSort === 'function') {
|
|
7512
|
+
this.list.onSort({ key: keys[0].key, order: keys[0].order, keys });
|
|
7513
|
+
this.persistViewStateToRoute(this.currentViewState());
|
|
7514
|
+
}
|
|
7515
|
+
this.$emit('sort-change', value);
|
|
7516
|
+
},
|
|
7517
|
+
|
|
7362
7518
|
/**
|
|
7363
7519
|
* @param {{key: string, order: string, keys?: Array<{key: string, order: string}>}} payload Sort change from CnDataTable.
|
|
7364
7520
|
* @return {void}
|