@conduction/nextcloud-vue 2.106.0 → 2.107.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.
Files changed (135) hide show
  1. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js +9 -0
  2. package/dist/esm/components/CnActionDialog/CnActionDialog.vue.js.map +1 -0
  3. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js +338 -0
  4. package/dist/esm/components/CnActionDialog/CnActionDialog.vue2.js.map +1 -0
  5. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js +249 -0
  6. package/dist/esm/components/CnActionDialog/CnActionDialog.vue3.js.map +1 -0
  7. package/dist/esm/components/CnAdvancedFormDialog/CnPropertiesTab.vue2.js +2 -2
  8. package/dist/esm/components/CnAdvancedFormDialog/CnPropertiesTab.vue2.js.map +1 -1
  9. package/dist/esm/components/CnAppNav/CnAppNav.vue2.js.map +1 -1
  10. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js +145 -138
  11. package/dist/esm/components/CnAppNav/CnAppNav.vue3.js.map +1 -1
  12. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js +102 -2
  13. package/dist/esm/components/CnAppRoot/CnAppRoot.vue2.js.map +1 -1
  14. package/dist/esm/components/CnAppRoot/CnAppRoot.vue3.js.map +1 -1
  15. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
  16. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +83 -6
  17. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
  18. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +4 -2
  19. package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
  20. package/dist/esm/components/CnIcon/semanticIcons.js +2 -2
  21. package/dist/esm/components/CnIcon/semanticIcons.js.map +1 -1
  22. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +389 -20
  23. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  24. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +68 -35
  25. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  26. package/dist/esm/components/CnIndexPage/useSelfFetchList.js +22 -2
  27. package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
  28. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +69 -5
  29. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
  30. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js +38 -5
  31. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
  32. package/dist/esm/components/CnMapWidget/CnMapWidget.vue.js +1 -1
  33. package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js +7 -1
  34. package/dist/esm/components/CnMapWidget/CnMapWidget.vue2.js.map +1 -1
  35. package/dist/esm/components/CnMapWidget/CnMapWidget.vue3.js.map +1 -1
  36. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js +8 -0
  37. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue.js.map +1 -0
  38. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js +297 -0
  39. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue2.js.map +1 -0
  40. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js +24 -0
  41. package/dist/esm/components/CnPartyPicker/CnPartyPicker.vue3.js.map +1 -0
  42. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue.js +9 -0
  43. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue.js.map +1 -0
  44. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue2.js +95 -0
  45. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue2.js.map +1 -0
  46. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue3.js +123 -0
  47. package/dist/esm/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue3.js.map +1 -0
  48. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue.js +1 -1
  49. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue2.js +13 -5
  50. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue2.js.map +1 -1
  51. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue3.js +3 -1
  52. package/dist/esm/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue3.js.map +1 -1
  53. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue.js +1 -1
  54. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue2.js +49 -23
  55. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue2.js.map +1 -1
  56. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue3.js +74 -27
  57. package/dist/esm/components/CnSavedViewShareFields/CnSavedViewShareFields.vue3.js.map +1 -1
  58. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue.js +0 -1
  59. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue.js.map +1 -1
  60. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue2.js +18 -413
  61. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue2.js.map +1 -1
  62. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue3.js +27 -214
  63. package/dist/esm/components/CnSavedViewsControl/CnSavedViewsControl.vue3.js.map +1 -1
  64. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue.js +9 -0
  65. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue.js.map +1 -0
  66. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue2.js +190 -0
  67. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue2.js.map +1 -0
  68. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue3.js +270 -0
  69. package/dist/esm/components/CnSavedViewsPanel/CnSavedViewsPanel.vue3.js.map +1 -0
  70. package/dist/esm/index.js +4 -0
  71. package/dist/esm/index.js.map +1 -1
  72. package/dist/esm/l10n/en.json.js +56 -1
  73. package/dist/esm/l10n/en.json.js.map +1 -1
  74. package/dist/esm/l10n/nl.json.js +56 -1
  75. package/dist/esm/l10n/nl.json.js.map +1 -1
  76. package/dist/esm/library-style.js +1 -1
  77. package/dist/esm/mixins/savedViewsList.js +235 -0
  78. package/dist/esm/mixins/savedViewsList.js.map +1 -0
  79. package/dist/esm/nextcloud-vue.css +348 -108
  80. package/dist/esm/utils/actionsDispatcher.js +2 -2
  81. package/dist/esm/utils/actionsDispatcher.js.map +1 -1
  82. package/dist/esm/utils/builtInModals.js +39 -0
  83. package/dist/esm/utils/builtInModals.js.map +1 -0
  84. package/dist/esm/utils/mapMarkerColor.js +121 -0
  85. package/dist/esm/utils/mapMarkerColor.js.map +1 -0
  86. package/dist/esm/utils/mergeManifestDelta.js +4 -0
  87. package/dist/esm/utils/mergeManifestDelta.js.map +1 -1
  88. package/dist/esm/utils/savedViewHelpers.js +59 -7
  89. package/dist/esm/utils/savedViewHelpers.js.map +1 -1
  90. package/dist/esm/utils/savedViewMenu.js +154 -0
  91. package/dist/esm/utils/savedViewMenu.js.map +1 -0
  92. package/dist/esm/utils/searchGroupSharees.js +50 -15
  93. package/dist/esm/utils/searchGroupSharees.js.map +1 -1
  94. package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
  95. package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
  96. package/dist/nextcloud-vue.cjs.js +13351 -10855
  97. package/dist/nextcloud-vue.cjs.js.map +2 -2
  98. package/dist/nextcloud-vue.css +348 -108
  99. package/l10n/en.json +56 -1
  100. package/l10n/nl.json +56 -1
  101. package/package.json +1 -1
  102. package/src/components/CnActionDialog/CnActionDialog.vue +545 -0
  103. package/src/components/CnActionDialog/index.js +12 -0
  104. package/src/components/CnAppNav/CnAppNav.vue +17 -0
  105. package/src/components/CnAppRoot/CnAppRoot.vue +102 -2
  106. package/src/components/CnDashboardPage/CnDashboardPage.vue +86 -7
  107. package/src/components/CnIndexPage/CnIndexPage.vue +409 -23
  108. package/src/components/CnIndexPage/useSelfFetchList.js +21 -1
  109. package/src/components/CnIndexSidebar/CnIndexSidebar.md +2 -0
  110. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +91 -1
  111. package/src/components/CnMapWidget/CnMapWidget.vue +16 -1
  112. package/src/components/CnPartyPicker/CnPartyPicker.vue +317 -0
  113. package/src/components/CnPartyPicker/index.js +11 -0
  114. package/src/components/CnSavedViewEditDialog/CnSavedViewEditDialog.vue +192 -0
  115. package/src/components/CnSavedViewEditDialog/index.js +11 -0
  116. package/src/components/CnSavedViewShareDialog/CnSavedViewShareDialog.vue +21 -6
  117. package/src/components/CnSavedViewShareFields/CnSavedViewShareFields.vue +130 -37
  118. package/src/components/CnSavedViewsControl/CnSavedViewsControl.vue +36 -599
  119. package/src/components/CnSavedViewsPanel/CnSavedViewsPanel.vue +459 -0
  120. package/src/components/CnSavedViewsPanel/index.js +11 -0
  121. package/src/components/index.js +4 -0
  122. package/src/css/index-page.css +16 -0
  123. package/src/css/look-board-index.css +5 -3
  124. package/src/css/look-board.css +18 -3
  125. package/src/index.js +4 -0
  126. package/src/mixins/savedViewsList.js +231 -0
  127. package/src/schemas/app-manifest-v2.schema.json +98 -3
  128. package/src/utils/actionsDispatcher.js +2 -2
  129. package/src/utils/builtInModals.js +35 -0
  130. package/src/utils/mapMarkerColor.js +117 -0
  131. package/src/utils/mergeManifestDelta.js +4 -0
  132. package/src/utils/savedViewHelpers.js +58 -6
  133. package/src/utils/savedViewMenu.js +150 -0
  134. package/src/utils/searchGroupSharees.js +49 -14
  135. package/src/utils/validateManifestV2.compiled.js +3 -3
@@ -42,6 +42,7 @@ import { RegistryKindError } from '../../errors/RegistryKindError.js';
42
42
  import { isAppInstalled } from '../../utils/appInstalled.js';
43
43
  import { appShownName } from '../../utils/appShownName.js';
44
44
  import { BUILT_IN_FORMATTERS } from '../../utils/builtInFormatters.js';
45
+ import { resolveModalEntry } from '../../utils/builtInModals.js';
45
46
  import { reportDiagnostic, clearReportedDiagnostics, addDiagnosticsListener } from '../../utils/diagnostics.js';
46
47
  import { resolveForge, DEFAULT_FORGE } from '../../utils/forge.js';
47
48
  import { BUILT_IN_KB_PROVIDERS } from '../../utils/kbSearchProviders.js';
@@ -50,6 +51,7 @@ import { installModalStack, uninstallModalStack } from '../../utils/modalStack.j
50
51
  import { OBJECTS_CHANGED_EVENT } from '../../utils/objectSignals.js';
51
52
  import { resolveBrand } from '../../utils/resolveBrand.js';
52
53
  import { resolveFilterTokens } from '../../utils/resolveFilterTokens.js';
54
+ import { withSavedViewMenu, normalizeSavedViewMenu, SAVED_VIEW_MENU_KEY, toggleSavedViewMenuEntry, syncSavedViewMenu } from '../../utils/savedViewMenu.js';
53
55
  import { passesContextPredicates } from '../../utils/visibleIfContext.js';
54
56
  import { useObjectStore } from '../../store/useObjectStore.js';
55
57
 
@@ -186,6 +188,10 @@ var script = {
186
188
  return self.userPreferences
187
189
  },
188
190
 
191
+ // The saved views this user added to the menu, and the way to
192
+ // change them, for an index page's sidebar.
193
+ cnSavedViewMenu: self.savedViewMenu,
194
+
189
195
  // The same manifest as a REF. The getter above is NOT enough on its
190
196
  // own: Options-API `inject` resolves a provided value once, at the
191
197
  // descendant's creation, so a renderer created before edit mode gets
@@ -262,7 +268,7 @@ var script = {
262
268
  * @param {object} props Props forwarded to the modal component.
263
269
  */
264
270
  cnOpenModal: (key, props = {}) => {
265
- const entry = this.registry[key];
271
+ const entry = resolveModalEntry(this.registry, key);
266
272
  if (!entry || entry.kind !== 'modal') {
267
273
  // eslint-disable-next-line no-console
268
274
  console.warn(`[CnAppRoot] cnOpenModal: "${key}" is not a registered modal (kind must be "modal").`);
@@ -1204,6 +1210,16 @@ var script = {
1204
1210
  data() {
1205
1211
  const willCheck = Array.isArray(this.requiresApps) && this.requiresApps.length > 0;
1206
1212
  return {
1213
+ // Saved views this user added to the menu (per-user preference).
1214
+ // One object for the whole session, so the provide hands out a
1215
+ // live reference: `entries` changes, the holder does not.
1216
+ savedViewMenuLoaded: false,
1217
+ savedViewMenu: {
1218
+ entries: [],
1219
+ toggle: (entry) => this.toggleSavedViewMenu(entry),
1220
+ sync: (page, views) => this.syncSavedViewMenu(page, views),
1221
+ },
1222
+
1207
1223
  // Nextcloud's own header, present on a server-rendered page; the
1208
1224
  // brand block goes into it (CnBrandBar). Read once at creation so
1209
1225
  // the navigation never draws a block that then moves.
@@ -1671,6 +1687,16 @@ var script = {
1671
1687
  return groups.some((g) => owners.includes(g))
1672
1688
  },
1673
1689
 
1690
+ /**
1691
+ * Whether any page of the manifest offers saved views.
1692
+ *
1693
+ * @return {boolean}
1694
+ */
1695
+ offersSavedViews() {
1696
+ const pages = this.manifest && Array.isArray(this.manifest.pages) ? this.manifest.pages : [];
1697
+ return pages.some((page) => page && page.config && page.config.allowSavedViews === true)
1698
+ },
1699
+
1674
1700
  /**
1675
1701
  * The manifest the default `<CnAppNav>` renders — the editor's working
1676
1702
  * `source` while in-app editing, else the live `manifest` prop. Passed to
@@ -1702,6 +1728,12 @@ var script = {
1702
1728
  if (this.manifestEditor && this.manifestEditor.editing.value && m && typeof m === 'object') {
1703
1729
  return { ...m }
1704
1730
  }
1731
+ // An app that offers saved views ends its menu with the "My views"
1732
+ // group: the user's pinned views, or one line saying how to add one.
1733
+ // Any other app gets its live manifest by identity.
1734
+ if (m && typeof m === 'object' && Array.isArray(m.menu) && (this.savedViewMenu.entries.length > 0 || this.offersSavedViews)) {
1735
+ return { ...m, menu: withSavedViewMenu(m.menu, this.savedViewMenu.entries, { showEmpty: this.offersSavedViews }) }
1736
+ }
1705
1737
  return m
1706
1738
  },
1707
1739
 
@@ -2539,12 +2571,24 @@ var script = {
2539
2571
  if (!this.activeModalKey) {
2540
2572
  return null
2541
2573
  }
2542
- const entry = (this.registry || {})[this.activeModalKey];
2574
+ const entry = resolveModalEntry(this.registry, this.activeModalKey);
2543
2575
  return (entry && entry.component) ? entry.component : null
2544
2576
  },
2545
2577
  },
2546
2578
 
2547
2579
  watch: {
2580
+ // Only an app with a page that offers saved views reads the list,
2581
+ // once, when such a page first appears in the manifest.
2582
+ offersSavedViews: {
2583
+ immediate: true,
2584
+ handler(offers) {
2585
+ if (offers && !this.savedViewMenuLoaded) {
2586
+ this.savedViewMenuLoaded = true;
2587
+ this.loadSavedViewMenu();
2588
+ }
2589
+ },
2590
+ },
2591
+
2548
2592
  /**
2549
2593
  * Close a registry modal when the route changes.
2550
2594
  *
@@ -2686,6 +2730,62 @@ var script = {
2686
2730
  },
2687
2731
 
2688
2732
  methods: {
2733
+ /**
2734
+ * Read the saved views this user added to the menu.
2735
+ *
2736
+ * @return {Promise<void>}
2737
+ * @spec openspec/changes/saved-views-manage-and-defaults/tasks.md#task-7
2738
+ */
2739
+ async loadSavedViewMenu() {
2740
+ const read = this.userPreferences && this.userPreferences.read;
2741
+ if (typeof read !== 'function') {
2742
+ return
2743
+ }
2744
+ try {
2745
+ this.savedViewMenu.entries = normalizeSavedViewMenu(await read(SAVED_VIEW_MENU_KEY, []));
2746
+ } catch {
2747
+ // No menu entries; the views themselves are unaffected.
2748
+ }
2749
+ },
2750
+
2751
+ /**
2752
+ * Add a saved view to the menu, or remove it, and store the list.
2753
+ *
2754
+ * @param {{id: string, page: string, name: string}} entry The view.
2755
+ * @return {Promise<void>}
2756
+ * @spec openspec/changes/saved-views-manage-and-defaults/tasks.md#task-7
2757
+ */
2758
+ async toggleSavedViewMenu(entry) {
2759
+ this.savedViewMenu.entries = toggleSavedViewMenuEntry(this.savedViewMenu.entries, entry);
2760
+ await this.writeSavedViewMenu();
2761
+ },
2762
+
2763
+ /**
2764
+ * Bring one page's menu entries in line with the views it lists, and
2765
+ * store the list only when that changed something.
2766
+ *
2767
+ * @param {string} page The page's route name.
2768
+ * @param {Array<object>} views The views the page lists.
2769
+ * @return {Promise<void>}
2770
+ * @spec openspec/changes/saved-views-manage-and-defaults/tasks.md#task-7
2771
+ */
2772
+ async syncSavedViewMenu(page, views) {
2773
+ const next = syncSavedViewMenu(this.savedViewMenu.entries, page, views);
2774
+ if (JSON.stringify(next) === JSON.stringify(this.savedViewMenu.entries)) {
2775
+ return
2776
+ }
2777
+ this.savedViewMenu.entries = next;
2778
+ await this.writeSavedViewMenu();
2779
+ },
2780
+
2781
+ /** @return {Promise<void>} Store the list in the user's preferences. */
2782
+ async writeSavedViewMenu() {
2783
+ const write = this.userPreferences && this.userPreferences.write;
2784
+ if (typeof write === 'function') {
2785
+ await write(SAVED_VIEW_MENU_KEY, this.savedViewMenu.entries);
2786
+ }
2787
+ },
2788
+
2689
2789
  /** Listen for the host's `diagnostics` function while it is set; adds this root's page id. */
2690
2790
  syncDiagnostics() {
2691
2791
  if (this.removeDiagnostics) {