@conduction/nextcloud-vue 2.169.0 → 2.170.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/CnCellRenderer/CnCellRenderer.vue.js +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js +7 -2
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue2.js.map +1 -1
- package/dist/esm/components/CnCellRenderer/CnCellRenderer.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +88 -0
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js +4 -3
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +46 -3
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +2 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +9 -3
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js +13 -6
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue2.js +14 -3
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/contacts/CnContactsTab.vue3.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +243 -201
- package/dist/esm/utils/objectParties.js +50 -5
- package/dist/esm/utils/objectParties.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +237 -30
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +243 -201
- package/package.json +1 -1
- package/src/components/CnCellRenderer/CnCellRenderer.vue +7 -2
- package/src/components/CnDashboardGrid/CnDashboardGrid.md +1 -0
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +100 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +47 -3
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +9 -3
- package/src/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue +14 -5
- package/src/css/dialog.css +7 -5
- package/src/css/look-board-index.css +21 -2
- package/src/css/look-board.css +12 -0
- package/src/integrations/builtin/contacts/CnContactsTab.vue +14 -3
- package/src/integrations/builtin/contacts/__tests__/CnContactsTabBoardRows.spec.js +17 -2
- package/src/utils/objectParties.js +49 -4
|
@@ -3,7 +3,7 @@ export { fillRowTracks } from './CnDashboardGrid.vue2.js';
|
|
|
3
3
|
import { render } from './CnDashboardGrid.vue3.js';
|
|
4
4
|
|
|
5
5
|
script.render = render;
|
|
6
|
-
script.__scopeId = "data-v-
|
|
6
|
+
script.__scopeId = "data-v-4ef4b904";
|
|
7
7
|
const __sfc_main = script;
|
|
8
8
|
|
|
9
9
|
export { __sfc_main as default };
|
|
@@ -275,6 +275,22 @@ var script = {
|
|
|
275
275
|
default: null,
|
|
276
276
|
},
|
|
277
277
|
|
|
278
|
+
/**
|
|
279
|
+
* Weights for groups of the twelve columns: `[{ span, weight }]`, the
|
|
280
|
+
* spans adding up to 12. Each group takes its weight's share of the
|
|
281
|
+
* width, split evenly over its columns, so three groups of four can be
|
|
282
|
+
* drawn 332 / 415 / 332 (PqWerkplekKlant in a call). Items on a
|
|
283
|
+
* `sideColumn` track keep that column. Only on the full twelve-column
|
|
284
|
+
* grid and not while editing; GridStack keeps the twelve columns
|
|
285
|
+
* underneath.
|
|
286
|
+
*
|
|
287
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
288
|
+
*/
|
|
289
|
+
columnWeights: {
|
|
290
|
+
type: Array,
|
|
291
|
+
default: null,
|
|
292
|
+
},
|
|
293
|
+
|
|
278
294
|
/**
|
|
279
295
|
* Fill the height the host gives the grid instead of growing with
|
|
280
296
|
* the content: in view mode the layout rows divide the grid's own
|
|
@@ -359,6 +375,41 @@ var script = {
|
|
|
359
375
|
*
|
|
360
376
|
* @return {object|null}
|
|
361
377
|
*/
|
|
378
|
+
/**
|
|
379
|
+
* The left edge of each of the twelve columns and the right edge of
|
|
380
|
+
* the last, as fractions of the grid's width, from `columnWeights`;
|
|
381
|
+
* null when the grid keeps its twelve shares.
|
|
382
|
+
*
|
|
383
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
384
|
+
* @return {number[]|null}
|
|
385
|
+
*/
|
|
386
|
+
columnBounds() {
|
|
387
|
+
const groups = this.columnWeights;
|
|
388
|
+
if (this.editable || !Array.isArray(groups) || groups.length === 0) {
|
|
389
|
+
return null
|
|
390
|
+
}
|
|
391
|
+
const perColumn = [];
|
|
392
|
+
for (const group of groups) {
|
|
393
|
+
const span = Number(group?.span);
|
|
394
|
+
const weight = Number(group?.weight);
|
|
395
|
+
if (!Number.isInteger(span) || span < 1 || !Number.isFinite(weight) || weight <= 0) {
|
|
396
|
+
return null
|
|
397
|
+
}
|
|
398
|
+
for (let i = 0; i < span; i++) {
|
|
399
|
+
perColumn.push(weight / span);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
if (perColumn.length !== 12) {
|
|
403
|
+
return null
|
|
404
|
+
}
|
|
405
|
+
const total = perColumn.reduce((sum, w) => sum + w, 0);
|
|
406
|
+
const bounds = [0];
|
|
407
|
+
for (const w of perColumn) {
|
|
408
|
+
bounds.push(bounds[bounds.length - 1] + w / total);
|
|
409
|
+
}
|
|
410
|
+
return bounds
|
|
411
|
+
},
|
|
412
|
+
|
|
362
413
|
sideColumnStyle() {
|
|
363
414
|
const width = Number(this.sideColumn?.width);
|
|
364
415
|
if (this.editable || !Number.isFinite(width) || width <= 0) {
|
|
@@ -734,6 +785,43 @@ var script = {
|
|
|
734
785
|
}
|
|
735
786
|
},
|
|
736
787
|
|
|
788
|
+
/**
|
|
789
|
+
* The left and width fractions of an item on weighted columns, or
|
|
790
|
+
* null when the grid keeps its twelve shares or the item is on a
|
|
791
|
+
* side-column track.
|
|
792
|
+
*
|
|
793
|
+
* @spec openspec/changes/dashboard-column-weights/specs/dashboard-column-weights/spec.md#requirement-a-dashboard-can-weigh-its-column-groups
|
|
794
|
+
* @param {object} item The layout item.
|
|
795
|
+
* @return {object|null}
|
|
796
|
+
*/
|
|
797
|
+
weightStyle(item) {
|
|
798
|
+
const bounds = this.columnBounds;
|
|
799
|
+
if (bounds === null || (this.sideColumnStyle !== null && (item.track === 'main' || item.track === 'side'))) {
|
|
800
|
+
return null
|
|
801
|
+
}
|
|
802
|
+
const x = Math.min(Math.max(Number.isFinite(item.gridX) ? item.gridX : 0, 0), 12);
|
|
803
|
+
const w = Number.isFinite(item.gridWidth) ? item.gridWidth : this.minWidth;
|
|
804
|
+
const end = Math.min(Math.max(x + w, x), 12);
|
|
805
|
+
return {
|
|
806
|
+
'--cn-weight-left': String(bounds[x]),
|
|
807
|
+
'--cn-weight-width': String(bounds[end] - bounds[x]),
|
|
808
|
+
}
|
|
809
|
+
},
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* The inline style of an item: its place on a filled grid, or its
|
|
813
|
+
* place on weighted columns.
|
|
814
|
+
*
|
|
815
|
+
* @param {object} item The layout item.
|
|
816
|
+
* @return {object|undefined}
|
|
817
|
+
*/
|
|
818
|
+
itemStyle(item) {
|
|
819
|
+
if (this.filling) {
|
|
820
|
+
return this.fillItemStyle(item)
|
|
821
|
+
}
|
|
822
|
+
return this.weightStyle(item) || undefined
|
|
823
|
+
},
|
|
824
|
+
|
|
737
825
|
resolveItemLabel(item, index) {
|
|
738
826
|
if (this.itemLabel) {
|
|
739
827
|
return String(this.itemLabel(item, index) ?? '')
|