@conduction/nextcloud-vue 2.186.0 → 2.187.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 (35) hide show
  1. package/dist/esm/components/CnChartWidget/CnChartWidget.vue.js +1 -1
  2. package/dist/esm/components/CnChartWidget/CnChartWidget2.vue.js +58 -0
  3. package/dist/esm/components/CnChartWidget/CnChartWidget2.vue.js.map +1 -1
  4. package/dist/esm/components/CnChartWidget/CnChartWidget3.vue.js +2 -2
  5. package/dist/esm/components/CnChartWidget/CnChartWidget3.vue.js.map +1 -1
  6. package/dist/esm/components/CnPeopleWidget/CnPeopleWidget.vue.js +1 -1
  7. package/dist/esm/components/CnPeopleWidget/CnPeopleWidget2.vue.js +281 -27
  8. package/dist/esm/components/CnPeopleWidget/CnPeopleWidget2.vue.js.map +1 -1
  9. package/dist/esm/components/CnPeopleWidget/CnPeopleWidget3.vue.js +86 -33
  10. package/dist/esm/components/CnPeopleWidget/CnPeopleWidget3.vue.js.map +1 -1
  11. package/dist/esm/components/CnPeopleWidget/peopleCache.js +76 -0
  12. package/dist/esm/components/CnPeopleWidget/peopleCache.js.map +1 -0
  13. package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm.vue.js +1 -1
  14. package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm2.vue.js +40 -9
  15. package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm2.vue.js.map +1 -1
  16. package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm3.vue.js +35 -26
  17. package/dist/esm/components/CnPeopleWidgetForm/CnPeopleWidgetForm3.vue.js.map +1 -1
  18. package/dist/esm/components/CnTextWidget/CnTextWidget.vue.js +1 -1
  19. package/dist/esm/components/CnTextWidget/CnTextWidget2.vue.js +32 -12
  20. package/dist/esm/components/CnTextWidget/CnTextWidget2.vue.js.map +1 -1
  21. package/dist/esm/components/CnTextWidget/CnTextWidget3.vue.js.map +1 -1
  22. package/dist/esm/l10n/nl.json.js +4 -0
  23. package/dist/esm/l10n/nl.json.js.map +1 -1
  24. package/dist/esm/library-style.js +1 -1
  25. package/dist/esm/nextcloud-vue.css +206 -150
  26. package/dist/nextcloud-vue.cjs.js +1366 -864
  27. package/dist/nextcloud-vue.cjs.js.map +2 -2
  28. package/dist/nextcloud-vue.css +206 -150
  29. package/l10n/nl.json +4 -0
  30. package/package.json +1 -1
  31. package/src/components/CnChartWidget/CnChartWidget.vue +60 -2
  32. package/src/components/CnPeopleWidget/CnPeopleWidget.vue +402 -56
  33. package/src/components/CnPeopleWidget/peopleCache.js +73 -0
  34. package/src/components/CnPeopleWidgetForm/CnPeopleWidgetForm.vue +45 -11
  35. package/src/components/CnTextWidget/CnTextWidget.vue +32 -12
package/l10n/nl.json CHANGED
@@ -1,5 +1,9 @@
1
1
  {
2
2
  "translations": {
3
+ "Find everyone tagged {tag}": "Vind iedereen met de tag {tag}",
4
+ "No matching users.": "Geen passende gebruikers.",
5
+ "Search by name, email or expertise…": "Zoek op naam, e-mail of expertise…",
6
+ "Unknown sort key \"{key}\". Display name is used instead.": "Onbekende sorteersleutel \"{key}\". Er wordt op weergavenaam gesorteerd.",
3
7
  "Search the knowledge base": "Zoek in de kennisbank",
4
8
  "Searching…": "Zoeken…",
5
9
  "Knowledge base unavailable": "Kennisbank niet beschikbaar",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conduction/nextcloud-vue",
3
- "version": "2.186.0",
3
+ "version": "2.187.0",
4
4
  "description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
5
5
  "homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
6
6
  "bugs": {
@@ -137,8 +137,8 @@
137
137
  :type="type"
138
138
  :height="computedHeight"
139
139
  :width="computedWidth"
140
- :options="mergedOptions"
141
- :series="plottedSeries" />
140
+ :options="apexOptions"
141
+ :series="apexSeries" />
142
142
  </div>
143
143
  <div v-else class="cn-chart-widget__fallback">
144
144
  <!-- @slot Rendered when the ApexCharts peer dependency is not available (defaults to the unavailableLabel text). -->
@@ -1077,6 +1077,13 @@ export default {
1077
1077
  // once at creation (data, not computed — matches the dashboard
1078
1078
  // date-chip convention).
1079
1079
  viewsGroupLabel: t('nextcloud-vue', 'Chart view'),
1080
+ // What the apexcharts wrapper is bound to: one raw object and one raw
1081
+ // array, kept equal to `mergedOptions` / `plottedSeries` by filling
1082
+ // them in place. The wrapper builds a chart from them (on mount and
1083
+ // on its own type / size rebuilds) but never sees them change, so
1084
+ // its watchers never fire; `updateChart` updates the live chart.
1085
+ apexOptions: markRaw({}),
1086
+ apexSeries: markRaw([]),
1080
1087
  }
1081
1088
  },
1082
1089
 
@@ -1884,6 +1891,16 @@ export default {
1884
1891
  })
1885
1892
  },
1886
1893
 
1894
+ /**
1895
+ * The options and series the chart draws, as one value, so a data
1896
+ * change that moves both reaches the chart as one update.
1897
+ *
1898
+ * @return {Array} `[mergedOptions, plottedSeries]`.
1899
+ */
1900
+ chartPayload() {
1901
+ return [this.mergedOptions, this.plottedSeries]
1902
+ },
1903
+
1887
1904
  mergedOptions() {
1888
1905
  const isPieType = ['pie', 'donut', 'radialBar'].includes(this.type)
1889
1906
 
@@ -2053,6 +2070,10 @@ export default {
2053
2070
  },
2054
2071
 
2055
2072
  watch: {
2073
+ chartPayload() {
2074
+ this.updateChart()
2075
+ },
2076
+
2056
2077
  groupByKey() {
2057
2078
  this.fetchGroupBy()
2058
2079
  },
@@ -2073,6 +2094,7 @@ export default {
2073
2094
  created() {
2074
2095
  // markRaw: `data()` is deeply reactive and would proxy the component.
2075
2096
  this.chartComponent = markRaw(VueApexCharts)
2097
+ this.syncChartBinding()
2076
2098
  },
2077
2099
 
2078
2100
  mounted() {
@@ -2206,6 +2228,42 @@ export default {
2206
2228
  }
2207
2229
  },
2208
2230
 
2231
+ /**
2232
+ * Fill the wrapper's bound options and series with the current ones,
2233
+ * in place, so a chart the wrapper (re)builds starts from them.
2234
+ *
2235
+ * @return {void}
2236
+ */
2237
+ syncChartBinding() {
2238
+ const options = this.apexOptions
2239
+ for (const key of Object.keys(options)) {
2240
+ delete options[key]
2241
+ }
2242
+ Object.assign(options, this.mergedOptions)
2243
+ const series = this.plottedSeries
2244
+ this.apexSeries.splice(0, this.apexSeries.length, ...(Array.isArray(series) ? series : []))
2245
+ },
2246
+
2247
+ /**
2248
+ * Show new options and series in the live chart as one in-place,
2249
+ * unanimated `updateOptions`, instead of the wrapper's
2250
+ * `updateOptions` + `updateSeries` pair: every ApexCharts update clears
2251
+ * and redraws the whole SVG and measures each label again, which on a
2252
+ * full dashboard page costs far more than the data change itself. The
2253
+ * entry animation on first draw is unaffected. ApexCharts skips a
2254
+ * payload identical to the last one.
2255
+ *
2256
+ * @return {void}
2257
+ */
2258
+ updateChart() {
2259
+ this.syncChartBinding()
2260
+ const apex = this.$refs.chart?.chart
2261
+ if (typeof apex?.updateOptions !== 'function') {
2262
+ return
2263
+ }
2264
+ apex.updateOptions({ ...this.mergedOptions, series: this.plottedSeries }, false, false)
2265
+ },
2266
+
2209
2267
  /**
2210
2268
  * Re-measure and redraw the chart after its box changed size, without
2211
2269
  * rebuilding it.