@conduction/nextcloud-vue 2.117.0 → 2.118.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.vue2.js +2 -1
- package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js +6 -6
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js.map +1 -1
- package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue2.js +2 -1
- package/dist/esm/components/CnAssignDialog/CnAssignDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +18 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +14 -8
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +11 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +9 -4
- 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.vue2.js +2 -1
- package/dist/esm/components/CnMailTab/CnMailTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +71 -0
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js +25 -9
- package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +11 -2
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue.js +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js +161 -5
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue2.js.map +1 -1
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js +9 -9
- package/dist/esm/components/CnSearchPage/CnSearchPage.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +35 -5
- 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/CnTransitionInputFields/CnTransitionInputFields.vue.js +9 -0
- package/dist/esm/components/CnTransitionInputFields/CnTransitionInputFields.vue.js.map +1 -0
- package/dist/esm/components/CnTransitionInputFields/CnTransitionInputFields.vue2.js +435 -0
- package/dist/esm/components/CnTransitionInputFields/CnTransitionInputFields.vue2.js.map +1 -0
- package/dist/esm/components/CnTransitionInputFields/CnTransitionInputFields.vue3.js +300 -0
- package/dist/esm/components/CnTransitionInputFields/CnTransitionInputFields.vue3.js.map +1 -0
- package/dist/esm/composables/useEndpointSource.js +1 -36
- package/dist/esm/composables/useEndpointSource.js.map +1 -1
- package/dist/esm/dialogs/CnTransitionInputDialog.vue.js +1 -1
- package/dist/esm/dialogs/CnTransitionInputDialog.vue2.js +57 -336
- package/dist/esm/dialogs/CnTransitionInputDialog.vue2.js.map +1 -1
- package/dist/esm/dialogs/CnTransitionInputDialog.vue3.js +18 -155
- package/dist/esm/dialogs/CnTransitionInputDialog.vue3.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +2 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +2 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +308 -229
- package/dist/esm/utils/actionsDispatcher.js +3 -2
- package/dist/esm/utils/actionsDispatcher.js.map +1 -1
- package/dist/esm/utils/interpolateUrlTokens.js +43 -0
- package/dist/esm/utils/interpolateUrlTokens.js.map +1 -0
- package/dist/esm/utils/labelsByField.js +72 -0
- package/dist/esm/utils/labelsByField.js.map +1 -0
- package/dist/esm/utils/listCreateAction.js +91 -0
- package/dist/esm/utils/listCreateAction.js.map +1 -0
- package/dist/esm/utils/transitionInputs.js +493 -0
- package/dist/esm/utils/transitionInputs.js.map +1 -0
- package/dist/esm/utils/visibleWhen.js +9 -2
- package/dist/esm/utils/visibleWhen.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +6690 -5404
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +308 -229
- package/l10n/en.json +2 -1
- package/l10n/nl.json +2 -1
- package/package.json +1 -1
- package/src/components/CnActionsBar/CnActionsBar.vue +6 -6
- package/src/components/CnDashboardPage/CnDashboardPage.vue +27 -5
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +11 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +9 -4
- package/src/components/CnObjectListWidget/CnObjectListWidget.vue +86 -0
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +11 -2
- package/src/components/CnSearchPage/CnSearchPage.vue +170 -14
- package/src/components/CnTabsWidget/CnTabsWidget.vue +35 -5
- package/src/components/CnTransitionInputFields/CnTransitionInputFields.vue +750 -0
- package/src/components/CnTransitionInputFields/index.js +11 -0
- package/src/components/index.js +1 -0
- package/src/composables/useEndpointSource.js +3 -36
- package/src/dialogs/CnTransitionInputDialog.vue +73 -465
- package/src/index.js +2 -0
- package/src/utils/interpolateUrlTokens.js +40 -0
- package/src/utils/labelsByField.js +69 -0
- package/src/utils/listCreateAction.js +87 -0
- package/src/utils/transitionInputs.js +489 -0
- package/src/utils/visibleWhen.js +9 -2
|
@@ -217,7 +217,7 @@ import { detailWidgetVisible } from '../../utils/detailWidgetVisibility.js'
|
|
|
217
217
|
import { fetchListTotal } from '../../utils/fetchFilterCounts.js'
|
|
218
218
|
import { isActivityWidget } from '../../utils/headerMeta.js'
|
|
219
219
|
import { PANEL_ACTION_SINK } from '../../utils/panelActions.js'
|
|
220
|
-
import { evaluateVisibleWhen, evaluateVisibleWhenLocal, evaluateWorkspaceCondition, isLocallyDecidableVisibleWhen, isWorkspaceCondition } from '../../utils/visibleWhen.js'
|
|
220
|
+
import { evaluateVisibleWhen, evaluateVisibleWhenLocal, evaluateWorkspaceCondition, isLocallyDecidableVisibleWhen, isWorkspaceCondition, readVisibleWhenValue } from '../../utils/visibleWhen.js'
|
|
221
221
|
import { widgetTitleOf } from '../../utils/widgetDispatch.js'
|
|
222
222
|
import { CnActionsMenu } from '../CnActionsMenu/index.js'
|
|
223
223
|
|
|
@@ -392,7 +392,9 @@ export default {
|
|
|
392
392
|
* counts a list on the server: `"widget"` counts the child widget's
|
|
393
393
|
* own list (`content.register`, `schema`, `filter`, tokens such as
|
|
394
394
|
* `@objectId` resolved), an object `{ register, schema, filter? }`
|
|
395
|
-
* names the list
|
|
395
|
+
* names the list, and `{ endpoint, field? }` counts the list (or reads
|
|
396
|
+
* the number) an endpoint answers with, `@objectId` resolved; `count`
|
|
397
|
+
* and `countField` win over it. `overflow: true`
|
|
396
398
|
* lists the tab under "More".
|
|
397
399
|
*
|
|
398
400
|
* A tab with `widgetIds` can lay them out in a grid instead of one under
|
|
@@ -409,7 +411,7 @@ export default {
|
|
|
409
411
|
* `moreLabel` names that menu. `variant: "segmented"` draws the strip
|
|
410
412
|
* as a pill switch (CnTabs' segmented variant); `line` is the default.
|
|
411
413
|
*
|
|
412
|
-
* @type {{ tabs?: Array<{widgetId?: string, widgetIds?: string[], label?: string, icon?: string, count?: number, countField?: string, countFrom?: ('widget'|{register: string, schema: string, filter?: object}), overflow?: boolean, default?: boolean, columns?: number, layout?: Array<{widgetId: string, gridWidth: number}>}>, ariaLabel?: string, maxVisibleTabs?: number, hideEmpty?: boolean, moreLabel?: string, variant?: ('line'|'segmented') }}
|
|
414
|
+
* @type {{ tabs?: Array<{widgetId?: string, widgetIds?: string[], label?: string, icon?: string, count?: number, countField?: string, countFrom?: ('widget'|{register: string, schema: string, filter?: object}|{endpoint: string, field?: string}), overflow?: boolean, default?: boolean, columns?: number, layout?: Array<{widgetId: string, gridWidth: number}>}>, ariaLabel?: string, maxVisibleTabs?: number, hideEmpty?: boolean, moreLabel?: string, variant?: ('line'|'segmented') }}
|
|
413
415
|
*/
|
|
414
416
|
content: {
|
|
415
417
|
type: Object,
|
|
@@ -1166,7 +1168,7 @@ export default {
|
|
|
1166
1168
|
* no list.
|
|
1167
1169
|
*
|
|
1168
1170
|
* @param {object|string} tab The `content.tabs[]` entry.
|
|
1169
|
-
* @return {{register: string, schema: string, filter: object}|null} The list.
|
|
1171
|
+
* @return {{register: string, schema: string, filter: object}|{endpoint: string, field: string}|null} The list, or the endpoint to count.
|
|
1170
1172
|
* @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list
|
|
1171
1173
|
*/
|
|
1172
1174
|
countSourceOf(tab) {
|
|
@@ -1182,6 +1184,9 @@ export default {
|
|
|
1182
1184
|
.filter((content) => content && content.register && content.schema)
|
|
1183
1185
|
source = lists.length ? lists[0] : null
|
|
1184
1186
|
} else if (from && typeof from === 'object') {
|
|
1187
|
+
if (typeof from.endpoint === 'string' && from.endpoint !== '') {
|
|
1188
|
+
return { endpoint: from.endpoint, field: typeof from.field === 'string' ? from.field : '' }
|
|
1189
|
+
}
|
|
1185
1190
|
source = from
|
|
1186
1191
|
}
|
|
1187
1192
|
if (!source || typeof source.register !== 'string' || source.register === '' || typeof source.schema !== 'string' || source.schema === '') {
|
|
@@ -1208,13 +1213,38 @@ export default {
|
|
|
1208
1213
|
if (!source) {
|
|
1209
1214
|
return
|
|
1210
1215
|
}
|
|
1211
|
-
const total =
|
|
1216
|
+
const total = source.endpoint
|
|
1217
|
+
? await this.countEndpoint(source, ctx)
|
|
1218
|
+
: await fetchListTotal(source.register, source.schema, source.filter, ctx).catch(() => null)
|
|
1212
1219
|
if (seq === this.countSeq) {
|
|
1213
1220
|
this.widgetCounts = { ...this.widgetCounts, [index]: total }
|
|
1214
1221
|
}
|
|
1215
1222
|
}))
|
|
1216
1223
|
},
|
|
1217
1224
|
|
|
1225
|
+
/**
|
|
1226
|
+
* Count what an endpoint answers: the list at `field` (or the body),
|
|
1227
|
+
* or the number there. Null when the request fails or nothing countable
|
|
1228
|
+
* comes back.
|
|
1229
|
+
*
|
|
1230
|
+
* @param {{endpoint: string, field: string}} source The endpoint and the path to read.
|
|
1231
|
+
* @param {object} ctx The record context its tokens resolve against.
|
|
1232
|
+
* @return {Promise<number|null>} The count.
|
|
1233
|
+
* @spec openspec/changes/screens-tab-counts-parity/specs/tab-counts/spec.md#requirement-a-tab-can-count-its-list
|
|
1234
|
+
*/
|
|
1235
|
+
async countEndpoint(source, ctx) {
|
|
1236
|
+
try {
|
|
1237
|
+
const value = await readVisibleWhenValue({ endpoint: source.endpoint, field: source.field }, ctx)
|
|
1238
|
+
if (Array.isArray(value)) {
|
|
1239
|
+
return value.length
|
|
1240
|
+
}
|
|
1241
|
+
const number = Number(value)
|
|
1242
|
+
return value !== null && value !== '' && Number.isFinite(number) ? number : null
|
|
1243
|
+
} catch {
|
|
1244
|
+
return null
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
|
|
1218
1248
|
/** @return {string} The route hash without its `#`, or ''. */
|
|
1219
1249
|
currentHash() {
|
|
1220
1250
|
const fromRoute = this.$route && typeof this.$route.hash === 'string' ? this.$route.hash : ''
|