@conduction/nextcloud-vue 2.70.0 → 2.71.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/CnAppRoot/CnAppRoot.vue2.js +151 -13
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js +3 -1
- package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +38 -42
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js +29 -2
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue2.js.map +1 -1
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js +71 -34
- package/dist/esm/components/CnFormDialog/CnFormDialog.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +22 -0
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectSidebar/CnNotesTab.vue3.js.map +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue2.js.map +1 -1
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js +46 -32
- package/dist/esm/components/CnSetupWizard/CnSetupWizard.vue3.js.map +1 -1
- package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js +30 -9
- package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue2.js.map +1 -1
- package/dist/esm/components/CnWalkthrough/CnWalkthrough.vue3.js.map +1 -1
- package/dist/esm/composables/useWalkthrough.js +11 -3
- package/dist/esm/composables/useWalkthrough.js.map +1 -1
- package/dist/esm/nextcloud-vue.css +53 -0
- package/dist/esm/utils/columnFilters.js +54 -4
- package/dist/esm/utils/columnFilters.js.map +1 -1
- package/dist/esm/utils/userAutocomplete.js +69 -3
- package/dist/esm/utils/userAutocomplete.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +2 -2
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +615 -235
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +53 -0
- package/package.json +1 -1
- package/src/components/CnAppRoot/CnAppRoot.vue +153 -13
- package/src/components/CnDashboardPage/CnDashboardPage.vue +20 -18
- package/src/components/CnFormDialog/CnFormDialog.vue +62 -2
- package/src/components/CnIndexPage/CnIndexPage.vue +23 -1
- package/src/components/CnObjectSidebar/CnNotesTab.vue +1 -1
- package/src/components/CnSetupWizard/CnSetupWizard.vue +7 -0
- package/src/components/CnWalkthrough/CnWalkthrough.vue +30 -9
- package/src/composables/useWalkthrough.js +11 -3
- package/src/css/dashboard.css +44 -0
- package/src/schemas/app-manifest-v2.schema.json +2 -1
- package/src/utils/columnFilters.js +54 -4
- package/src/utils/userAutocomplete.js +68 -2
- package/src/utils/validateManifestV2.compiled.js +2 -2
|
@@ -267,8 +267,11 @@ var script = {
|
|
|
267
267
|
* Restart entry for the product walkthrough (ADR-043). Descendants
|
|
268
268
|
* (a menu/settings "Replay walkthrough" entry, or a manifest menu
|
|
269
269
|
* `action: "replay-walkthrough"`) call this to re-run a tour. With no
|
|
270
|
-
* `tourId` the first declared tour is used.
|
|
270
|
+
* `tourId` the first declared tour is used. An unfinished tour
|
|
271
|
+
* continues where the user was (a paused tour, else the saved
|
|
272
|
+
* step); "Start over" in the user settings goes back to step 1.
|
|
271
273
|
*
|
|
274
|
+
* @spec openspec/changes/audit-round-lib-fixes/specs/cn-walkthrough/spec.md
|
|
272
275
|
* @param {string} [tourId] The tour to restart.
|
|
273
276
|
* @return {void}
|
|
274
277
|
*/
|
|
@@ -278,9 +281,18 @@ var script = {
|
|
|
278
281
|
}
|
|
279
282
|
const wt = useWalkthrough(this.appId, this.manifest);
|
|
280
283
|
const id = tourId || (this.manifest.walkthrough.tours[0] && this.manifest.walkthrough.tours[0].id);
|
|
281
|
-
if (id) {
|
|
282
|
-
|
|
284
|
+
if (!id) {
|
|
285
|
+
return
|
|
286
|
+
}
|
|
287
|
+
const progress = this.walkthroughProgressValue;
|
|
288
|
+
this.unpauseWalkthroughProgress();
|
|
289
|
+
if (wt.paused.value && wt.activeTour.value && wt.activeTour.value.id === id && wt.resumePaused()) {
|
|
290
|
+
return
|
|
291
|
+
}
|
|
292
|
+
if (progress && progress.tourId === id && wt.resumeAt(id, progress.stepId)) {
|
|
293
|
+
return
|
|
283
294
|
}
|
|
295
|
+
wt.restart(id);
|
|
284
296
|
},
|
|
285
297
|
|
|
286
298
|
/**
|
|
@@ -861,7 +873,7 @@ var script = {
|
|
|
861
873
|
},
|
|
862
874
|
},
|
|
863
875
|
|
|
864
|
-
emits: ['setup-complete', 'walkthrough-complete'],
|
|
876
|
+
emits: ['setup-complete', 'setup-wizard-dismissed', 'walkthrough-complete'],
|
|
865
877
|
|
|
866
878
|
/**
|
|
867
879
|
* Component-instance state for the capabilities guard.
|
|
@@ -1932,9 +1944,21 @@ var script = {
|
|
|
1932
1944
|
} catch {
|
|
1933
1945
|
// No URL token; fall through to the remembered progress.
|
|
1934
1946
|
}
|
|
1935
|
-
// An unfinished tour continues at the step the user reached
|
|
1947
|
+
// An unfinished tour continues at the step the user reached,
|
|
1948
|
+
// unless the user paused it: then it waits for "Continue".
|
|
1936
1949
|
const progress = this.walkthroughProgressValue;
|
|
1937
|
-
return progress ? { tourId: progress.tourId, stepId: progress.stepId } : null
|
|
1950
|
+
return progress && !progress.paused ? { tourId: progress.tourId, stepId: progress.stepId } : null
|
|
1951
|
+
},
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* Whether the user paused the tour (X, ESC or the dim). A paused tour
|
|
1955
|
+
* stays hidden across page loads until the user picks "Continue".
|
|
1956
|
+
*
|
|
1957
|
+
* @spec openspec/changes/audit-round-lib-fixes/specs/cn-walkthrough/spec.md
|
|
1958
|
+
* @return {boolean} True while the saved progress is paused.
|
|
1959
|
+
*/
|
|
1960
|
+
walkthroughPaused() {
|
|
1961
|
+
return !!(this.walkthroughProgressValue && this.walkthroughProgressValue.paused)
|
|
1938
1962
|
},
|
|
1939
1963
|
|
|
1940
1964
|
phase() {
|
|
@@ -2614,7 +2638,7 @@ var script = {
|
|
|
2614
2638
|
// the server keeps reporting it unmet — so without this the wizard
|
|
2615
2639
|
// auto-opens again on every visit. Cancel must not be the only way to
|
|
2616
2640
|
// get peace.
|
|
2617
|
-
this.persistSetupWizardDismissal();
|
|
2641
|
+
this.persistSetupWizardDismissal(true);
|
|
2618
2642
|
if (this.setupState && typeof this.setupState.refresh === 'function') {
|
|
2619
2643
|
this.setupState.refresh();
|
|
2620
2644
|
}
|
|
@@ -2635,7 +2659,7 @@ var script = {
|
|
|
2635
2659
|
* @return {void}
|
|
2636
2660
|
*/
|
|
2637
2661
|
dismissSetupWizard() {
|
|
2638
|
-
this.persistSetupWizardDismissal();
|
|
2662
|
+
this.persistSetupWizardDismissal(false);
|
|
2639
2663
|
this.setupWizardOpen = false;
|
|
2640
2664
|
},
|
|
2641
2665
|
|
|
@@ -2658,7 +2682,7 @@ var script = {
|
|
|
2658
2682
|
* @return {boolean}
|
|
2659
2683
|
*/
|
|
2660
2684
|
isSetupWizardDismissed() {
|
|
2661
|
-
if (this.setupWizardDismissed) {
|
|
2685
|
+
if (this.setupWizardDismissed || this.isSetupWizardDismissedOnServer()) {
|
|
2662
2686
|
return true
|
|
2663
2687
|
}
|
|
2664
2688
|
try {
|
|
@@ -2669,18 +2693,87 @@ var script = {
|
|
|
2669
2693
|
},
|
|
2670
2694
|
|
|
2671
2695
|
/**
|
|
2672
|
-
*
|
|
2673
|
-
*
|
|
2696
|
+
* Whether the app's setup status says the wizard was closed, so it
|
|
2697
|
+
* stays closed in every browser and on every device. The status
|
|
2698
|
+
* (`GET /api/setup/status`) may carry `dismissed: true`, or the
|
|
2699
|
+
* `setup.version` it was closed at (`dismissed: 2`), which re-opens the
|
|
2700
|
+
* wizard after a version bump. An app whose status carries neither
|
|
2701
|
+
* keeps today's per-browser behaviour. An app may also answer the
|
|
2702
|
+
* outstanding steps itself when it records the close (OpenRegister's
|
|
2703
|
+
* `dismiss-setup`), which needs nothing here.
|
|
2704
|
+
*
|
|
2705
|
+
* @spec openspec/changes/setup-wizard-close-on-server/specs/cn-setup-wizard/spec.md
|
|
2706
|
+
* @return {boolean} True when the server recorded the close for this version.
|
|
2707
|
+
*/
|
|
2708
|
+
isSetupWizardDismissedOnServer() {
|
|
2709
|
+
const s = this.setupState;
|
|
2710
|
+
const status = s && s.status && s.status.value;
|
|
2711
|
+
const dismissed = status && typeof status === 'object' ? status.dismissed : undefined;
|
|
2712
|
+
if (dismissed === true) {
|
|
2713
|
+
return true
|
|
2714
|
+
}
|
|
2715
|
+
if (typeof dismissed === 'number' && Number.isFinite(dismissed)) {
|
|
2716
|
+
const version = (this.manifest && this.manifest.setup && this.manifest.setup.version) || 0;
|
|
2717
|
+
return dismissed >= version
|
|
2718
|
+
}
|
|
2719
|
+
return false
|
|
2720
|
+
},
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* The setup action that records a closed wizard on the server, from
|
|
2724
|
+
* `manifest.setup.dismissAction`, or '' when the app declares none.
|
|
2725
|
+
*
|
|
2726
|
+
* @spec openspec/changes/setup-wizard-close-on-server/specs/cn-setup-wizard/spec.md
|
|
2727
|
+
* @return {string} The action id.
|
|
2728
|
+
*/
|
|
2729
|
+
setupDismissAction() {
|
|
2730
|
+
const action = this.manifest && this.manifest.setup && this.manifest.setup.dismissAction;
|
|
2731
|
+
return typeof action === 'string' && /^[a-z0-9][a-z0-9-]*$/.test(action) ? action : ''
|
|
2732
|
+
},
|
|
2733
|
+
|
|
2734
|
+
/**
|
|
2735
|
+
* Record the setup wizard as closed for this manifest `setup.version`
|
|
2736
|
+
* so it doesn't auto-open again: in this browser (localStorage) and,
|
|
2737
|
+
* when the manifest declares `setup.dismissAction`, on the server
|
|
2738
|
+
* through the app's own setup action endpoint
|
|
2739
|
+
* (`POST /apps/{appId}/api/setup/action/{dismissAction}`, admin-only
|
|
2740
|
+
* like every setup endpoint, so the record is per instance). Then
|
|
2741
|
+
* emits `setup-wizard-dismissed`. Once per page load: finishing
|
|
2742
|
+
* records it, and the result screen's Close that follows does not
|
|
2743
|
+
* post again.
|
|
2674
2744
|
*
|
|
2745
|
+
* @spec openspec/changes/setup-wizard-close-on-server/specs/cn-setup-wizard/spec.md
|
|
2746
|
+
* @param {boolean} [finished] True when the user finished the wizard, false when they closed it.
|
|
2675
2747
|
* @return {void}
|
|
2676
2748
|
*/
|
|
2677
|
-
persistSetupWizardDismissal() {
|
|
2749
|
+
persistSetupWizardDismissal(finished = false) {
|
|
2678
2750
|
try {
|
|
2679
2751
|
window.localStorage.setItem(this.setupWizardDismissKey(), '1');
|
|
2680
2752
|
} catch {
|
|
2681
2753
|
// Best-effort persistence (private mode / no storage).
|
|
2682
2754
|
}
|
|
2755
|
+
if (this.setupWizardDismissed) {
|
|
2756
|
+
return
|
|
2757
|
+
}
|
|
2683
2758
|
this.setupWizardDismissed = true;
|
|
2759
|
+
const action = this.setupDismissAction();
|
|
2760
|
+
if (action) {
|
|
2761
|
+
try {
|
|
2762
|
+
Promise.resolve(axios__default.post(generateUrl(`/apps/${this.appId}/api/setup/action/${action}`), { finished: finished === true }))
|
|
2763
|
+
.catch(() => { /* the local record still holds in this browser */ });
|
|
2764
|
+
} catch {
|
|
2765
|
+
// Never let a failed record break the close.
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* @event setup-wizard-dismissed Emitted once when the user closes or finishes the setup wizard.
|
|
2770
|
+
* @type {{ appId: string, version: number, finished: boolean }}
|
|
2771
|
+
*/
|
|
2772
|
+
this.$emit('setup-wizard-dismissed', {
|
|
2773
|
+
appId: this.appId,
|
|
2774
|
+
version: (this.manifest && this.manifest.setup && this.manifest.setup.version) || 0,
|
|
2775
|
+
finished: finished === true,
|
|
2776
|
+
});
|
|
2684
2777
|
},
|
|
2685
2778
|
|
|
2686
2779
|
/**
|
|
@@ -2767,6 +2860,49 @@ var script = {
|
|
|
2767
2860
|
persistWalkthroughProgress(this.appId, this.walkthroughConfigKey, value);
|
|
2768
2861
|
},
|
|
2769
2862
|
|
|
2863
|
+
/**
|
|
2864
|
+
* Remember that the user paused the tour, at the step they were on,
|
|
2865
|
+
* so the next page load keeps it hidden until they pick "Continue".
|
|
2866
|
+
*
|
|
2867
|
+
* @spec openspec/changes/audit-round-lib-fixes/specs/cn-walkthrough/spec.md
|
|
2868
|
+
* @param {object} [where] `{ tourId, stepId, index }` from CnWalkthrough.
|
|
2869
|
+
* @return {void}
|
|
2870
|
+
*/
|
|
2871
|
+
onWalkthroughPause(where) {
|
|
2872
|
+
const current = this.walkthroughProgressValue || {};
|
|
2873
|
+
const tourId = (where && where.tourId) || current.tourId;
|
|
2874
|
+
if (!tourId) {
|
|
2875
|
+
return
|
|
2876
|
+
}
|
|
2877
|
+
const value = {
|
|
2878
|
+
tourId,
|
|
2879
|
+
stepId: (where && where.tourId) ? (where.stepId || '') : (current.stepId || ''),
|
|
2880
|
+
index: (where && where.tourId && Number.isInteger(where.index)) ? where.index : (current.index || 0),
|
|
2881
|
+
version: String((this.manifest && this.manifest.version) || ''),
|
|
2882
|
+
paused: true,
|
|
2883
|
+
};
|
|
2884
|
+
this.walkthroughProgressValue = value;
|
|
2885
|
+
persistWalkthroughProgress(this.appId, this.walkthroughConfigKey, value);
|
|
2886
|
+
},
|
|
2887
|
+
|
|
2888
|
+
/**
|
|
2889
|
+
* Clear the paused mark when the user continues the tour. The step
|
|
2890
|
+
* stays; the next step change writes fresh progress anyway.
|
|
2891
|
+
*
|
|
2892
|
+
* @spec openspec/changes/audit-round-lib-fixes/specs/cn-walkthrough/spec.md
|
|
2893
|
+
* @return {void}
|
|
2894
|
+
*/
|
|
2895
|
+
unpauseWalkthroughProgress() {
|
|
2896
|
+
const progress = this.walkthroughProgressValue;
|
|
2897
|
+
if (!progress || !progress.paused) {
|
|
2898
|
+
return
|
|
2899
|
+
}
|
|
2900
|
+
const value = { ...progress };
|
|
2901
|
+
delete value.paused;
|
|
2902
|
+
this.walkthroughProgressValue = value;
|
|
2903
|
+
persistWalkthroughProgress(this.appId, this.walkthroughConfigKey, value);
|
|
2904
|
+
},
|
|
2905
|
+
|
|
2770
2906
|
/**
|
|
2771
2907
|
* Continue an unfinished tour from the user-settings dialog: show a
|
|
2772
2908
|
* paused tour again, or start the remembered tour at its step.
|
|
@@ -2781,10 +2917,11 @@ var script = {
|
|
|
2781
2917
|
}
|
|
2782
2918
|
setTimeout(() => {
|
|
2783
2919
|
const wt = useWalkthrough(this.appId, this.manifest);
|
|
2920
|
+
const progress = this.walkthroughProgressValue;
|
|
2921
|
+
this.unpauseWalkthroughProgress();
|
|
2784
2922
|
if (wt.resumePaused()) {
|
|
2785
2923
|
return
|
|
2786
2924
|
}
|
|
2787
|
-
const progress = this.walkthroughProgressValue;
|
|
2788
2925
|
if (progress) {
|
|
2789
2926
|
wt.resumeAt(progress.tourId, progress.stepId);
|
|
2790
2927
|
}
|
|
@@ -2811,6 +2948,7 @@ var script = {
|
|
|
2811
2948
|
setTimeout(() => {
|
|
2812
2949
|
const id = this.manifest.walkthrough.tours[0] && this.manifest.walkthrough.tours[0].id;
|
|
2813
2950
|
if (id) {
|
|
2951
|
+
this.unpauseWalkthroughProgress();
|
|
2814
2952
|
useWalkthrough(this.appId, this.manifest).restart(id);
|
|
2815
2953
|
}
|
|
2816
2954
|
}, 50);
|