@conduction/nextcloud-vue 2.138.0 → 2.139.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 (46) hide show
  1. package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
  2. package/dist/esm/components/CnChartWidget/CnChartWidget.vue2.js.map +1 -1
  3. package/dist/esm/components/CnChartWidget/CnChartWidget.vue3.js.map +1 -1
  4. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
  5. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
  6. package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
  7. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
  8. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
  9. package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
  10. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +99 -4
  11. package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
  12. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +2 -2
  13. package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
  14. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js +2 -0
  15. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue2.js.map +1 -1
  16. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js +13 -2
  17. package/dist/esm/components/CnIndexSidebar/CnIndexSidebar.vue3.js.map +1 -1
  18. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue.js +1 -1
  19. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js +1 -1
  20. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue2.js.map +1 -1
  21. package/dist/esm/components/CnObjectListWidget/CnObjectListWidget.vue3.js.map +1 -1
  22. package/dist/esm/composables/indexSources.js +43 -4
  23. package/dist/esm/composables/indexSources.js.map +1 -1
  24. package/dist/esm/l10n/en.json.js +3 -1
  25. package/dist/esm/l10n/en.json.js.map +1 -1
  26. package/dist/esm/l10n/nl.json.js +3 -1
  27. package/dist/esm/l10n/nl.json.js.map +1 -1
  28. package/dist/esm/library-style.js +1 -1
  29. package/dist/esm/nextcloud-vue.css +340 -238
  30. package/dist/nextcloud-vue.cjs.js +166 -19
  31. package/dist/nextcloud-vue.cjs.js.map +2 -2
  32. package/dist/nextcloud-vue.css +340 -238
  33. package/l10n/en.json +3 -1
  34. package/l10n/nl.json +3 -1
  35. package/package.json +1 -1
  36. package/src/components/CnChartWidget/CnChartWidget.vue +4 -0
  37. package/src/components/CnFactsWidget/CnFactsWidget.vue +6 -4
  38. package/src/components/CnFilesBrowser/CnFilesBrowser.vue +11 -0
  39. package/src/components/CnIndexPage/CnIndexPage.vue +101 -6
  40. package/src/components/CnIndexSidebar/CnIndexSidebar.vue +10 -2
  41. package/src/components/CnObjectListWidget/CnObjectListWidget.vue +1 -1
  42. package/src/composables/indexSources.js +43 -4
  43. package/src/css/dialog.css +18 -0
  44. package/src/css/look-board-detail.css +24 -0
  45. package/src/css/look-board-index.css +21 -0
  46. package/src/css/look-board.css +21 -0
@@ -822,6 +822,21 @@ var script = {
822
822
  default: '',
823
823
  },
824
824
 
825
+ /**
826
+ * Board look: the count line while a saved view is applied (manifest
827
+ * `config.savedViewCountText`), a template as `countText` that may name
828
+ * the view's conditions as `{view}`: its description, else its filters
829
+ * in words (DqFilterInMenu "3 van 48 lopende zaken · termijn binnen 7
830
+ * dagen, van mij · gesorteerd op termijn"). A view's own `countText`
831
+ * override and a scope's come first.
832
+ *
833
+ * @spec openspec/changes/applied-view-lights-its-lens/specs/applied-view-lights-its-lens/spec.md
834
+ */
835
+ savedViewCountText: {
836
+ type: String,
837
+ default: '',
838
+ },
839
+
825
840
  /**
826
841
  * Board look: a count line per view (manifest `config.countTextByView`),
827
842
  * `{ table?, cards?, list?, board?, map? }`, each a template as
@@ -3162,6 +3177,8 @@ var script = {
3162
3177
  savedViewCounts: null,
3163
3178
  // The id (or slug) of the saved view that is applied; its chip shows selected under the board look.
3164
3179
  appliedSavedViewId: '',
3180
+ /** Whether the reader picked a lens chip after the applied view (then their chip shows). */
3181
+ lensChosenByHand: false,
3165
3182
  // The sort option the applied view's `overrides.sortOption` selected, so leaving the view can undo it.
3166
3183
  viewSortOption: '',
3167
3184
  // The applied view's filters as one comparable key, so the address keeps naming the view until they change.
@@ -5001,13 +5018,53 @@ var script = {
5001
5018
  * @spec openspec/changes/working-list-row-actions/specs/index-page/spec.md
5002
5019
  */
5003
5020
  /**
5004
- * The chip the strip lights: the active tab, else the default tab of
5005
- * tabs that arrived after setup (`quickFiltersFrom`), which is the
5006
- * one the fetch applies.
5021
+ * The lens chip an applied saved view narrows within: the non-default
5022
+ * tab whose every condition the view's own conditions (its filters
5023
+ * over its locked filters, tokens as written) hold, the most specific
5024
+ * first (DqFilterInMenu: "Termijn deze week" lit for the view of that
5025
+ * name). Null without an applied view or a fitting tab.
5026
+ *
5027
+ * @return {number|null} The tab index.
5028
+ * @spec openspec/changes/applied-view-lights-its-lens/specs/applied-view-lights-its-lens/spec.md
5029
+ */
5030
+ appliedViewLensIndex() {
5031
+ const view = this.appliedSavedView;
5032
+ const tabs = Array.isArray(this.tabStripEntries) ? this.tabStripEntries : [];
5033
+ if (!view || tabs.length === 0) {
5034
+ return null
5035
+ }
5036
+ const query = view.query && typeof view.query === 'object' ? view.query : {};
5037
+ const locked = query.overrides && typeof query.overrides.lockedFilters === 'object' ? query.overrides.lockedFilters : {};
5038
+ const conditions = { ...(locked || {}), ...(query.filters || view.filters || {}) };
5039
+ const same = (a, b) => JSON.stringify(Array.isArray(a) ? a.map(String) : String(a)) === JSON.stringify(Array.isArray(b) ? b.map(String) : String(b));
5040
+ let best = null;
5041
+ let bestSize = 0;
5042
+ tabs.forEach((tab, index) => {
5043
+ const filter = tab && tab.filter && typeof tab.filter === 'object' ? tab.filter : {};
5044
+ const keys = Object.keys(filter);
5045
+ if (tab.default === true || keys.length === 0 || keys.length <= bestSize) {
5046
+ return
5047
+ }
5048
+ if (keys.every((key) => Object.hasOwn(conditions, key) && same(conditions[key], filter[key]))) {
5049
+ best = index;
5050
+ bestSize = keys.length;
5051
+ }
5052
+ });
5053
+ return best
5054
+ },
5055
+
5056
+ /**
5057
+ * The chip the strip lights: the lens an applied saved view narrows
5058
+ * within (until the reader picks a chip), else the active tab, else
5059
+ * the default tab of tabs that arrived after setup
5060
+ * (`quickFiltersFrom`), which is the one the fetch applies.
5007
5061
  *
5008
5062
  * @return {number|null} The tab index, or null without tabs.
5009
5063
  */
5010
5064
  shownQuickFilterIndex() {
5065
+ if (!this.quickFilterMultiple && !this.lensChosenByHand && this.appliedViewLensIndex !== null) {
5066
+ return this.appliedViewLensIndex
5067
+ }
5011
5068
  if (this.activeQuickFilterIndex !== null && this.activeQuickFilterIndex !== undefined) {
5012
5069
  return this.activeQuickFilterIndex
5013
5070
  }
@@ -7397,6 +7454,11 @@ var script = {
7397
7454
  * @return {string}
7398
7455
  */
7399
7456
  presentedCountText() {
7457
+ const viewLine = this.savedViewCountText;
7458
+ const view = this.appliedSavedView;
7459
+ if (view && typeof viewLine === 'string' && viewLine !== '' && this.activeScopePresentation.countText === undefined && !savedViewOverrides(view)?.countText) {
7460
+ return viewLine
7461
+ }
7400
7462
  if (this.activeScopePresentation.countText === undefined) {
7401
7463
  const byView = this.countTextByView;
7402
7464
  const own = byView && typeof byView === 'object' ? byView[this.currentViewMode] : undefined;
@@ -7407,6 +7469,23 @@ var script = {
7407
7469
  return this.presented('countText')
7408
7470
  },
7409
7471
 
7472
+ /**
7473
+ * The applied saved view's conditions for the count line's `{view}`:
7474
+ * its description, else its filters in words, starting lower case.
7475
+ *
7476
+ * @return {string}
7477
+ * @spec openspec/changes/applied-view-lights-its-lens/specs/applied-view-lights-its-lens/spec.md
7478
+ */
7479
+ appliedViewConditionsText() {
7480
+ const view = this.appliedSavedView;
7481
+ if (!view) {
7482
+ return ''
7483
+ }
7484
+ const own = typeof view.description === 'string' ? view.description.trim() : '';
7485
+ const text = own !== '' ? own : String(this.viewFilterSummary(view) || '');
7486
+ return text.charAt(0).toLowerCase() + text.slice(1)
7487
+ },
7488
+
7410
7489
  headerDescriptionBase() {
7411
7490
  const total = this.effectivePagination?.total;
7412
7491
  // Board look: the count line is a template over the rows on this page
@@ -7430,6 +7509,7 @@ var script = {
7430
7509
  .replace('{shown}', String(shown))
7431
7510
  .replace('{total}', String(total))
7432
7511
  .replace(/\{term\}/g, this.sourceTerm)
7512
+ .replace(/\{view\}/g, this.appliedViewConditionsText)
7433
7513
  }
7434
7514
  return this.countLine(this.countSubtitle, total, shown)
7435
7515
  }
@@ -7495,6 +7575,17 @@ var script = {
7495
7575
  return !!this.resolvedSidebar.enabled && this.resolvedSidebar.show !== false
7496
7576
  },
7497
7577
 
7578
+ /**
7579
+ * Whether the page's side panel is open now; the board look then lays
7580
+ * the header out narrower (DqZakenSorteren).
7581
+ *
7582
+ * @spec openspec/changes/board-header-buttons-under-title-beside-side-panel/specs/board-header-buttons-under-title-beside-side-panel/spec.md#requirement-the-header-buttons-sit-under-the-title-while-the-side-panel-is-open
7583
+ * @return {boolean}
7584
+ */
7585
+ sidebarPanelOpen() {
7586
+ return Boolean(this.sidebarOpen && this.hasSidebar)
7587
+ },
7588
+
7498
7589
  /**
7499
7590
  * Whether the board toolbar draws the Filter button as a menu: the
7500
7591
  * board look, `filterMenu` on, something to filter by, and no filter
@@ -7537,7 +7628,9 @@ var script = {
7537
7628
 
7538
7629
  /** Search props forwarded to the embedded CnIndexSidebar (defaults applied per CnIndexSidebar). */
7539
7630
  sidebarSearchProps() {
7540
- return (this.sidebar && this.sidebar.search) || {}
7631
+ // The page's own search hint, unless `sidebar.search` names one.
7632
+ const own = this.shownSearchPlaceholder ? { searchPlaceholder: this.shownSearchPlaceholder } : {};
7633
+ return { ...own, ...((this.sidebar && this.sidebar.search) || {}) }
7541
7634
  },
7542
7635
 
7543
7636
  /**
@@ -9360,6 +9453,7 @@ var script = {
9360
9453
  // `activeQuickFilterIndex` is a setup-returned ref; the
9361
9454
  // Vue 2 ref-unwrap proxy makes plain assignment work.
9362
9455
  this.activeQuickFilterIndex = index;
9456
+ this.lensChosenByHand = true;
9363
9457
  this.$emit('quick-filter-change', index);
9364
9458
  },
9365
9459
 
@@ -11795,6 +11889,7 @@ var script = {
11795
11889
  */
11796
11890
  onApplySavedView(view, { keepSavedViewKey = false } = {}) {
11797
11891
  this.appliedSavedViewId = view && (view.id || view.slug) ? String(view.id || view.slug) : '';
11892
+ this.lensChosenByHand = false;
11798
11893
  const state = extractViewState(view);
11799
11894
  // A view's filters may carry tokens (`@me`, `@myTeam`): resolved here,
11800
11895
  // and an optional one that answers nothing (no team) is dropped. A