@conduction/nextcloud-vue 2.56.0-beta.13 → 2.56.0-beta.14
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 +19 -0
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js +10 -3
- package/dist/esm/components/CnActionsBar/CnActionsBar.vue3.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js +2 -2
- package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
- package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +4 -4
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +31 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +335 -313
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js +5 -11
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
- package/dist/esm/composables/useDependencyCheck.js +44 -1
- package/dist/esm/composables/useDependencyCheck.js.map +1 -1
- package/dist/esm/composables/useListView.js +43 -1
- package/dist/esm/composables/useListView.js.map +1 -1
- package/dist/esm/composables/useSetupStatus.js +26 -3
- package/dist/esm/composables/useSetupStatus.js.map +1 -1
- package/dist/esm/l10n/en.json.js +4 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +4 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +20 -2
- package/dist/esm/store/plugins/liveUpdates.js +19 -9
- package/dist/esm/store/plugins/liveUpdates.js.map +1 -1
- package/dist/esm/store/useObjectStore.js +20 -9
- package/dist/esm/store/useObjectStore.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +857 -652
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +20 -2
- package/l10n/en.json +4 -1
- package/l10n/nl.json +4 -1
- package/package.json +1 -1
- package/src/components/CnActionsBar/CnActionsBar.md +2 -1
- package/src/components/CnActionsBar/CnActionsBar.vue +25 -1
- package/src/components/CnAppNav/CnAppNav.vue +2 -2
- package/src/components/CnDataTable/CnDataTable.md +1 -1
- package/src/components/CnDataTable/CnDataTable.vue +4 -4
- package/src/components/CnIndexPage/CnIndexPage.md +2 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +47 -1
- package/src/components/CnSetupWizard/CnSetupWizard.vue +5 -11
- package/src/composables/useDependencyCheck.js +43 -0
- package/src/composables/useListView.js +43 -1
- package/src/composables/useSetupStatus.js +26 -3
- package/src/css/actions-bar.css +20 -2
- package/src/schemas/app-manifest-v2.schema.json +3 -3
- package/src/schemas/app-manifest.schema.json +1 -1
- package/src/store/plugins/liveUpdates.js +19 -9
- package/src/store/useObjectStore.js +19 -8
- package/src/utils/validateManifestV2.compiled.js +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$id": "https://raw.githubusercontent.com/ConductionNL/nextcloud-vue/main/src/schemas/app-manifest-v2.schema.json",
|
|
4
4
|
"title": "Conduction App Manifest v2",
|
|
5
5
|
"description": "v2 schema for the JSON-driven page and navigation manifest consumed by @conduction/nextcloud-vue. Introduces a uniform widgets[] array on every page type with a per-slot grid coordinate system, a typed actions[] discriminator, and the required $schema field for version detection. v1 manifests continue to validate against app-manifest.schema.json (unchanged).",
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.49.0",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"required": ["$schema", "version"],
|
|
9
9
|
"allOf": [
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"suggestMap": { "type": "object", "description": "choice: map of suggestFrom value → suggested option value. Used to auto-suggest a default (e.g. RGS template suggested from organisation type).", "additionalProperties": { "type": "string" } },
|
|
99
99
|
"multiple": { "type": "boolean", "default": false, "description": "choice: allow multi-select." },
|
|
100
100
|
"loadAction": { "type": "string", "minLength": 1, "description": "choice with display cards: an actionId each option card loads itself with. Every card except the one whose value is `none` gets its own Load button, which POSTs { dataset: <value> } to /api/setup/action/{loadAction}, spins while it runs and shows the result on that card. A successful load also selects the card. With loadAction the separate run-action step that loaded the picked dataset is no longer needed; manifests that keep it still work." },
|
|
101
|
-
"requires": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true, "description": "App ids this step needs. When any of them is not installed and enabled, the wizard skips the step and the summary shows it as skipped, naming the missing apps.
|
|
101
|
+
"requires": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true, "description": "App ids this step needs. When any of them is not installed and enabled, the wizard skips the step and the summary shows it as skipped, naming the missing apps. Setup status then counts the step as not applicable, neither met nor unmet, so it never reopens the wizard or gates the app. This holds for a required step too." },
|
|
102
102
|
"action": { "type": "string", "description": "run-action: actionId POSTed to /api/setup/action/{action}." },
|
|
103
103
|
"onDemand": { "type": "boolean", "default": false, "description": "run-action: the step runs only when the user clicks Run, never automatically, and is never outstanding work (it does not open the wizard or decide where a resumed wizard starts). The summary ticks it only when its action succeeded in the current session and shows it as not run otherwise, whatever the server reports. For destructive steps an app reports as done on purpose so they never auto-run, such as removing example data." },
|
|
104
104
|
"healthCheck": { "type": "boolean", "default": false, "description": "summary: render a health recap." },
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
},
|
|
237
237
|
"settingsLabel": {
|
|
238
238
|
"type": "string",
|
|
239
|
-
"description": "Override label for the settings foldout's gear button. Defaults to '
|
|
239
|
+
"description": "Override label for the settings foldout's gear button. Defaults to 'Advanced'."
|
|
240
240
|
},
|
|
241
241
|
"card": {
|
|
242
242
|
"type": "object",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"settingsLabel": {
|
|
52
52
|
"type": "string",
|
|
53
|
-
"description": "Override label for the settings foldout's gear button. Defaults to '
|
|
53
|
+
"description": "Override label for the settings foldout's gear button. Defaults to 'Advanced'."
|
|
54
54
|
},
|
|
55
55
|
"primaryAction": {
|
|
56
56
|
"$ref": "#/$defs/primaryAction",
|
|
@@ -432,19 +432,29 @@ export function liveUpdatesPlugin(opts = {}) {
|
|
|
432
432
|
const collectionInFlight = new Map()
|
|
433
433
|
|
|
434
434
|
const originalFetchCollection = store.fetchCollection.bind(store)
|
|
435
|
-
store.fetchCollection = async function dedupedFetchCollection(type, params = {}) {
|
|
435
|
+
store.fetchCollection = async function dedupedFetchCollection(type, params = {}, options = {}) {
|
|
436
436
|
if (!store.__liveDedupActive) {
|
|
437
|
-
return originalFetchCollection(type, params)
|
|
437
|
+
return originalFetchCollection(type, params, options)
|
|
438
438
|
}
|
|
439
439
|
const key = collectionDedupKey(type, params)
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
let entry = collectionInFlight.get(key)
|
|
441
|
+
if (!entry) {
|
|
442
|
+
// The shared request reports into its own sink, copied to
|
|
443
|
+
// each caller's `options.outcome` below, so a caller that
|
|
444
|
+
// joined it learns that request's result too.
|
|
445
|
+
const outcome = {}
|
|
446
|
+
const promise = originalFetchCollection(type, params, { ...options, outcome }).finally(() => {
|
|
447
|
+
collectionInFlight.delete(key)
|
|
448
|
+
})
|
|
449
|
+
entry = { promise, outcome }
|
|
450
|
+
collectionInFlight.set(key, entry)
|
|
442
451
|
}
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
452
|
+
const results = await entry.promise
|
|
453
|
+
const sink = options && options.outcome
|
|
454
|
+
if (sink && typeof sink === 'object' && 'error' in entry.outcome) {
|
|
455
|
+
sink.error = entry.outcome.error
|
|
456
|
+
}
|
|
457
|
+
return results
|
|
448
458
|
}
|
|
449
459
|
},
|
|
450
460
|
}
|
|
@@ -656,9 +656,12 @@ const baseActions = {
|
|
|
656
656
|
*
|
|
657
657
|
* @param {string} type The registered type slug
|
|
658
658
|
* @param {object} [params] Query parameters (_limit, _page, _search, _order, filters)
|
|
659
|
+
* @param {object} [options] Call options
|
|
660
|
+
* @param {{error?: object|null}} [options.outcome] Opt-in sink for THIS call's own result: `error` is set to the error it records on `errors[type]`, or `null` on success. Unlike `errors[type]`, which every call for the type shares, a later call cannot overwrite it.
|
|
659
661
|
* @return {Promise<Array>} The fetched collection (also stored in state)
|
|
660
662
|
*/
|
|
661
|
-
async fetchCollection(type, params = {}) {
|
|
663
|
+
async fetchCollection(type, params = {}, options = {}) {
|
|
664
|
+
const outcome = (options && typeof options.outcome === 'object' && options.outcome) || null
|
|
662
665
|
this.loading = { ...this.loading, [type]: true }
|
|
663
666
|
this.errors = { ...this.errors, [type]: null }
|
|
664
667
|
|
|
@@ -685,9 +688,13 @@ const baseActions = {
|
|
|
685
688
|
)
|
|
686
689
|
|
|
687
690
|
if (!response.ok) {
|
|
688
|
-
|
|
691
|
+
const failure = await parseResponseError(response, type)
|
|
692
|
+
this.errors = { ...this.errors, [type]: failure }
|
|
693
|
+
if (outcome) {
|
|
694
|
+
outcome.error = failure
|
|
695
|
+
}
|
|
689
696
|
// eslint-disable-next-line no-console -- diagnostic for a failure this code already degrades from
|
|
690
|
-
console.error(`Error fetching ${type} collection:`,
|
|
697
|
+
console.error(`Error fetching ${type} collection:`, failure)
|
|
691
698
|
return []
|
|
692
699
|
}
|
|
693
700
|
|
|
@@ -711,13 +718,17 @@ const baseActions = {
|
|
|
711
718
|
this.facets = { ...this.facets, [type]: transformed }
|
|
712
719
|
}
|
|
713
720
|
|
|
721
|
+
if (outcome) {
|
|
722
|
+
outcome.error = null
|
|
723
|
+
}
|
|
714
724
|
return results
|
|
715
725
|
} catch (error) {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
726
|
+
const failure = error.name === 'TypeError'
|
|
727
|
+
? networkError(error)
|
|
728
|
+
: genericError(error)
|
|
729
|
+
this.errors = { ...this.errors, [type]: failure }
|
|
730
|
+
if (outcome) {
|
|
731
|
+
outcome.error = failure
|
|
721
732
|
}
|
|
722
733
|
// eslint-disable-next-line no-console -- diagnostic for a failure this code already degrades from
|
|
723
734
|
console.error(`Error fetching ${type} collection:`, error)
|