@nextcloud/vue 8.7.0 → 8.7.1
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/CHANGELOG.md +10 -0
- package/dist/Components/NcDashboardWidget.cjs +1 -1
- package/dist/Components/NcDashboardWidget.mjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
- package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
- package/dist/Components/NcDateTimePicker.cjs +2 -2
- package/dist/Components/NcDateTimePicker.mjs +2 -2
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcModal.cjs +1 -1
- package/dist/Components/NcModal.mjs +1 -1
- package/dist/Components/NcRichContenteditable.cjs +1 -1
- package/dist/Components/NcRichContenteditable.mjs +1 -1
- package/dist/Components/NcRichText.cjs +1 -1
- package/dist/Components/NcRichText.mjs +2 -2
- package/dist/assets/{NcDashboardWidgetItem-S7fELANA.css → NcDashboardWidgetItem-OL--xR_P.css} +15 -13
- package/dist/assets/{NcDateTimePicker-w8SEtYvQ.css → NcDateTimePicker-TArRbMs-.css} +10 -10
- package/dist/assets/{NcRichContenteditable-N1TxeACO.css → NcRichContenteditable-CuR1YKTU.css} +33 -31
- package/dist/assets/{NcRichText-kDp48Nji.css → NcRichText-Pw6kTpnR.css} +2 -2
- package/dist/chunks/{NcDashboardWidget-ogqyHahY.mjs → NcDashboardWidget-9LDutUO0.mjs} +1 -1
- package/dist/chunks/{NcDashboardWidget-ogqyHahY.mjs.map → NcDashboardWidget-9LDutUO0.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-QciRRvL4.cjs → NcDashboardWidget-oPZKAkd-.cjs} +1 -1
- package/dist/chunks/{NcDashboardWidget-QciRRvL4.cjs.map → NcDashboardWidget-oPZKAkd-.cjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-mIPkPR7r.cjs → NcDashboardWidgetItem-1r760Ikh.cjs} +3 -3
- package/dist/chunks/NcDashboardWidgetItem-1r760Ikh.cjs.map +1 -0
- package/dist/chunks/{NcDashboardWidgetItem-wuUHTeLl.mjs → NcDashboardWidgetItem-Qd8gSF2h.mjs} +5 -5
- package/dist/chunks/NcDashboardWidgetItem-Qd8gSF2h.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-jReu2l-M.cjs → NcRichContenteditable-cUZMZlgG.cjs} +41 -43
- package/dist/chunks/NcRichContenteditable-cUZMZlgG.cjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-eG8Fyo-M.mjs → NcRichContenteditable-d4EOAT2a.mjs} +30 -32
- package/dist/chunks/NcRichContenteditable-d4EOAT2a.mjs.map +1 -0
- package/dist/chunks/{NcRichText-Yo5pFnd0.cjs → NcRichText-S34HoIhH.cjs} +18 -15
- package/dist/chunks/NcRichText-S34HoIhH.cjs.map +1 -0
- package/dist/chunks/{NcRichText-qID66jAy.mjs → NcRichText-yfYdNWFh.mjs} +27 -24
- package/dist/chunks/NcRichText-yfYdNWFh.mjs.map +1 -0
- package/dist/chunks/{ScopeComponent-9fOoDGYa.mjs → ScopeComponent-ZQvTL_tO.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-9fOoDGYa.mjs.map → ScopeComponent-ZQvTL_tO.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-R0tAsT2f.cjs → ScopeComponent-v4OJPQb8.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-R0tAsT2f.cjs.map → ScopeComponent-v4OJPQb8.cjs.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
- package/dist/chunks/NcDashboardWidgetItem-mIPkPR7r.cjs.map +0 -1
- package/dist/chunks/NcDashboardWidgetItem-wuUHTeLl.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-eG8Fyo-M.mjs.map +0 -1
- package/dist/chunks/NcRichContenteditable-jReu2l-M.cjs.map +0 -1
- package/dist/chunks/NcRichText-Yo5pFnd0.cjs.map +0 -1
- package/dist/chunks/NcRichText-qID66jAy.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v8.7.1](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.7.1) (2024-02-21)
|
|
6
|
+
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.7.0...v8.7.1)
|
|
7
|
+
|
|
8
|
+
## What's Changed
|
|
9
|
+
|
|
10
|
+
### 🐛 Fixed bugs
|
|
11
|
+
* fix(NcRichContenteditable): register props globally for new Tribute by @Antreesy in https://github.com/nextcloud-libraries/nextcloud-vue/pull/5268
|
|
12
|
+
* fix(NcReferenceList): Resolve relative URLs before fetching references by @mejo- in https://github.com/nextcloud-libraries/nextcloud-vue/pull/5272
|
|
13
|
+
* fix(NcDashboardWidgetItem): Center dashboard list items when there is no subtext by @juliushaertl in https://github.com/nextcloud-libraries/nextcloud-vue/pull/5271
|
|
14
|
+
|
|
5
15
|
## [v8.7.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.7.0) (2024-02-20)
|
|
6
16
|
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.6.2...v8.7.0)
|
|
7
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('../assets/NcDateTimePicker-
|
|
1
|
+
require('../assets/NcDateTimePicker-TArRbMs-.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const r = require("../chunks/_l10n-Od-4xzJA.cjs"), p = require("../chunks/GenRandomId-ULxaMkkr.cjs"), d = require("../chunks/NcTimezonePicker-KG0dvgUv.cjs"), m = require("../chunks/NcPopover-judBGW5r.cjs"), i = require("../chunks/_plugin-vue2_normalizer-DCfUPqga.cjs"), l = require("@nextcloud/l10n"), f = require("vue2-datepicker"), h = require("../chunks/ScopeComponent-
|
|
3
|
+
const r = require("../chunks/_l10n-Od-4xzJA.cjs"), p = require("../chunks/GenRandomId-ULxaMkkr.cjs"), d = require("../chunks/NcTimezonePicker-KG0dvgUv.cjs"), m = require("../chunks/NcPopover-judBGW5r.cjs"), i = require("../chunks/_plugin-vue2_normalizer-DCfUPqga.cjs"), l = require("@nextcloud/l10n"), f = require("vue2-datepicker"), h = require("../chunks/ScopeComponent-v4OJPQb8.cjs"), _ = (a) => a && a.__esModule ? a : { default: a }, g = /* @__PURE__ */ _(f);
|
|
4
4
|
r.register(r.t32);
|
|
5
5
|
const v = {
|
|
6
6
|
name: "CalendarBlankIcon",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../assets/NcDateTimePicker-
|
|
1
|
+
import '../assets/NcDateTimePicker-TArRbMs-.css';
|
|
2
2
|
import { r as c, H as u, a as n } from "../chunks/_l10n-FmsZpnE4.mjs";
|
|
3
3
|
import { G as p } from "../chunks/GenRandomId-VodkdWbp.mjs";
|
|
4
4
|
import { N as m } from "../chunks/NcTimezonePicker-jJeiI-Ff.mjs";
|
|
@@ -6,7 +6,7 @@ import { N as d } from "../chunks/NcPopover-T4GMXmKV.mjs";
|
|
|
6
6
|
import { n as o } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.mjs";
|
|
7
7
|
import { getMonthNames as f, getMonthNamesShort as h, getDayNames as _, getDayNamesShort as g, getDayNamesMin as y, getFirstDay as v } from "@nextcloud/l10n";
|
|
8
8
|
import C from "vue2-datepicker";
|
|
9
|
-
import { S as k } from "../chunks/ScopeComponent-
|
|
9
|
+
import { S as k } from "../chunks/ScopeComponent-ZQvTL_tO.mjs";
|
|
10
10
|
c(u);
|
|
11
11
|
const w = {
|
|
12
12
|
name: "CalendarBlankIcon",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcDateTimePickerNative-5yybtvfx.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const c = require("../chunks/_plugin-vue2_normalizer-DCfUPqga.cjs"), h = require("../chunks/ScopeComponent-
|
|
3
|
+
const c = require("../chunks/_plugin-vue2_normalizer-DCfUPqga.cjs"), h = require("../chunks/ScopeComponent-v4OJPQb8.cjs"), f = ["date", "datetime-local", "month", "time", "week"], y = {
|
|
4
4
|
name: "NcDateTimePickerNative",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcDateTimePickerNative-5yybtvfx.css';
|
|
2
2
|
import { n as f } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.mjs";
|
|
3
|
-
import { S as h } from "../chunks/ScopeComponent-
|
|
3
|
+
import { S as h } from "../chunks/ScopeComponent-ZQvTL_tO.mjs";
|
|
4
4
|
const p = ["date", "datetime-local", "month", "time", "week"], c = {
|
|
5
5
|
name: "NcDateTimePickerNative",
|
|
6
6
|
inheritAttrs: !1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcModal-sIK5sUoC.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const u = require("../chunks/ScopeComponent-
|
|
3
|
+
const u = require("../chunks/ScopeComponent-v4OJPQb8.cjs"), r = require("../chunks/focusTrap-n3H52LOw.cjs"), i = require("../chunks/_l10n-Od-4xzJA.cjs"), d = require("../chunks/GenRandomId-ULxaMkkr.cjs"), h = require("../chunks/NcActions-JXnhQhum.cjs"), p = require("./NcButton.cjs");
|
|
4
4
|
require("../Directives/Tooltip.cjs");
|
|
5
5
|
const l = require("../chunks/_plugin-vue2_normalizer-DCfUPqga.cjs"), f = require("../chunks/ChevronRight-MdQC55Yq.cjs"), m = require("../chunks/Close-dotk0707.cjs"), _ = require("focus-trap"), y = require("@vueuse/core"), w = require("floating-vue");
|
|
6
6
|
i.register(i.t16, i.t29);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcModal-sIK5sUoC.css';
|
|
2
|
-
import { S as c } from "../chunks/ScopeComponent-
|
|
2
|
+
import { S as c } from "../chunks/ScopeComponent-ZQvTL_tO.mjs";
|
|
3
3
|
import { g as r } from "../chunks/focusTrap-Py2bQ9-r.mjs";
|
|
4
4
|
import { r as u, F as d, G as p, a as i } from "../chunks/_l10n-FmsZpnE4.mjs";
|
|
5
5
|
import { G as h } from "../chunks/GenRandomId-VodkdWbp.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const t = require("../chunks/index-5TyVc_TT.cjs"), e = require("../chunks/NcRichContenteditable-
|
|
3
|
+
const t = require("../chunks/index-5TyVc_TT.cjs"), e = require("../chunks/NcRichContenteditable-cUZMZlgG.cjs");
|
|
4
4
|
exports.NcMentionBubble = t.NcMentionBubble;
|
|
5
5
|
exports.NcAutoCompleteResult = e.NcAutoCompleteResult;
|
|
6
6
|
exports.default = e.NcRichContenteditable;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { N as t } from "../chunks/index-xnq0-IMW.mjs";
|
|
2
|
-
import { N as l, a as r } from "../chunks/NcRichContenteditable-
|
|
2
|
+
import { N as l, a as r } from "../chunks/NcRichContenteditable-d4EOAT2a.mjs";
|
|
3
3
|
export {
|
|
4
4
|
l as NcAutoCompleteResult,
|
|
5
5
|
t as NcMentionBubble,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const i = require("../chunks/NcRichText-
|
|
3
|
+
const i = require("../chunks/NcRichText-S34HoIhH.cjs"), r = require("../Functions/registerReference.cjs"), e = require("../chunks/referencePickerModal-cPBjsn4r.cjs");
|
|
4
4
|
/**
|
|
5
5
|
* @copyright Copyright (c) 2023 Raimund Schlüßler <raimund.schluessler@mailbox.org>
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as r } from "../chunks/NcRichText-
|
|
2
|
-
import { a as i } from "../chunks/NcRichText-
|
|
1
|
+
import { N as r } from "../chunks/NcRichText-yfYdNWFh.mjs";
|
|
2
|
+
import { a as i } from "../chunks/NcRichText-yfYdNWFh.mjs";
|
|
3
3
|
import { NcCustomPickerRenderResult as a, isCustomPickerElementRegistered as o, isWidgetRegistered as d, registerCustomPickerElement as n, registerWidget as g, renderCustomPickerElement as m, renderWidget as P } from "../Functions/registerReference.mjs";
|
|
4
4
|
import { e as k, f as N, N as R, h as l, a as u, g as h, b as p, c as v, d as x, s as W } from "../chunks/referencePickerModal-gDBkGfNV.mjs";
|
|
5
5
|
/**
|
package/dist/assets/{NcDashboardWidgetItem-S7fELANA.css → NcDashboardWidgetItem-OL--xR_P.css}
RENAMED
|
@@ -20,63 +20,65 @@
|
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
.material-design-icon[data-v-
|
|
23
|
+
.material-design-icon[data-v-a688e724] {
|
|
24
24
|
display: flex;
|
|
25
25
|
align-self: center;
|
|
26
26
|
justify-self: center;
|
|
27
27
|
align-items: center;
|
|
28
28
|
justify-content: center;
|
|
29
29
|
}
|
|
30
|
-
.item-list__entry[data-v-
|
|
30
|
+
.item-list__entry[data-v-a688e724] {
|
|
31
31
|
display: flex;
|
|
32
32
|
align-items: flex-start;
|
|
33
33
|
position: relative;
|
|
34
34
|
padding: 8px;
|
|
35
35
|
}
|
|
36
|
-
.item-list__entry[data-v-
|
|
37
|
-
.item-list__entry[data-v-
|
|
36
|
+
.item-list__entry[data-v-a688e724]:hover,
|
|
37
|
+
.item-list__entry[data-v-a688e724]:focus {
|
|
38
38
|
background-color: var(--color-background-hover);
|
|
39
39
|
border-radius: var(--border-radius-large);
|
|
40
40
|
}
|
|
41
|
-
.item-list__entry .item-avatar[data-v-
|
|
41
|
+
.item-list__entry .item-avatar[data-v-a688e724] {
|
|
42
42
|
position: relative;
|
|
43
43
|
margin-top: auto;
|
|
44
44
|
margin-bottom: auto;
|
|
45
45
|
}
|
|
46
|
-
.item-list__entry .item__details[data-v-
|
|
46
|
+
.item-list__entry .item__details[data-v-a688e724] {
|
|
47
47
|
padding-left: 8px;
|
|
48
48
|
max-height: 44px;
|
|
49
49
|
flex-grow: 1;
|
|
50
50
|
overflow: hidden;
|
|
51
51
|
display: flex;
|
|
52
52
|
flex-direction: column;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
min-height: 44px;
|
|
53
55
|
}
|
|
54
|
-
.item-list__entry .item__details h3[data-v-
|
|
55
|
-
.item-list__entry .item__details .message[data-v-
|
|
56
|
+
.item-list__entry .item__details h3[data-v-a688e724],
|
|
57
|
+
.item-list__entry .item__details .message[data-v-a688e724] {
|
|
56
58
|
white-space: nowrap;
|
|
57
59
|
overflow: hidden;
|
|
58
60
|
text-overflow: ellipsis;
|
|
59
61
|
}
|
|
60
|
-
.item-list__entry .item__details .message span[data-v-
|
|
62
|
+
.item-list__entry .item__details .message span[data-v-a688e724] {
|
|
61
63
|
width: 10px;
|
|
62
64
|
display: inline-block;
|
|
63
65
|
margin-bottom: -3px;
|
|
64
66
|
}
|
|
65
|
-
.item-list__entry .item__details h3[data-v-
|
|
67
|
+
.item-list__entry .item__details h3[data-v-a688e724] {
|
|
66
68
|
font-size: 100%;
|
|
67
69
|
margin: 0;
|
|
68
70
|
}
|
|
69
|
-
.item-list__entry .item__details .message[data-v-
|
|
71
|
+
.item-list__entry .item__details .message[data-v-a688e724] {
|
|
70
72
|
width: 100%;
|
|
71
73
|
color: var(--color-text-maxcontrast);
|
|
72
74
|
}
|
|
73
|
-
.item-list__entry .item-icon[data-v-
|
|
75
|
+
.item-list__entry .item-icon[data-v-a688e724] {
|
|
74
76
|
position: relative;
|
|
75
77
|
width: 14px;
|
|
76
78
|
height: 14px;
|
|
77
79
|
margin: 27px -3px 0 -7px;
|
|
78
80
|
}
|
|
79
|
-
.item-list__entry button.primary[data-v-
|
|
81
|
+
.item-list__entry button.primary[data-v-a688e724] {
|
|
80
82
|
padding: 21px;
|
|
81
83
|
margin: 0;
|
|
82
84
|
}
|
|
@@ -424,32 +424,32 @@
|
|
|
424
424
|
color: #ccc;
|
|
425
425
|
background-color: #f3f3f3;
|
|
426
426
|
}
|
|
427
|
-
.mx-datepicker[data-v-
|
|
427
|
+
.mx-datepicker[data-v-98ecc7d] {
|
|
428
428
|
-webkit-user-select: none;
|
|
429
429
|
user-select: none;
|
|
430
430
|
color: var(--color-main-text);
|
|
431
431
|
}
|
|
432
|
-
.mx-datepicker[data-v-
|
|
432
|
+
.mx-datepicker[data-v-98ecc7d] svg {
|
|
433
433
|
fill: var(--color-main-text);
|
|
434
434
|
}
|
|
435
|
-
.mx-datepicker[data-v-
|
|
435
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper .mx-input {
|
|
436
436
|
width: 100%;
|
|
437
437
|
border: 2px solid var(--color-border-maxcontrast);
|
|
438
438
|
background-color: var(--color-main-background);
|
|
439
439
|
background-clip: content-box;
|
|
440
440
|
}
|
|
441
|
-
.mx-datepicker[data-v-
|
|
442
|
-
.mx-datepicker[data-v-
|
|
443
|
-
.mx-datepicker[data-v-
|
|
441
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper .mx-input:active:not(.disabled),
|
|
442
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper .mx-input:hover:not(.disabled),
|
|
443
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper .mx-input:focus:not(.disabled) {
|
|
444
444
|
border-color: var(--color-primary-element);
|
|
445
445
|
}
|
|
446
|
-
.mx-datepicker[data-v-
|
|
447
|
-
.mx-datepicker[data-v-
|
|
446
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper:disabled,
|
|
447
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper.disabled {
|
|
448
448
|
cursor: not-allowed;
|
|
449
449
|
opacity: .7;
|
|
450
450
|
}
|
|
451
|
-
.mx-datepicker[data-v-
|
|
452
|
-
.mx-datepicker[data-v-
|
|
451
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper .mx-icon-calendar,
|
|
452
|
+
.mx-datepicker[data-v-98ecc7d] .mx-input-wrapper .mx-icon-clear {
|
|
453
453
|
color: var(--color-text-lighter);
|
|
454
454
|
}
|
|
455
455
|
.mx-datepicker-main {
|
package/dist/assets/{NcRichContenteditable-N1TxeACO.css → NcRichContenteditable-CuR1YKTU.css}
RENAMED
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
.autocomplete-result__subline[data-v-9cff39ed] {
|
|
67
67
|
color: var(--color-text-maxcontrast);
|
|
68
68
|
}
|
|
69
|
-
.material-design-icon[data-v-
|
|
69
|
+
.material-design-icon[data-v-b659b434] {
|
|
70
70
|
display: flex;
|
|
71
71
|
align-self: center;
|
|
72
72
|
justify-self: center;
|
|
73
73
|
align-items: center;
|
|
74
74
|
justify-content: center;
|
|
75
75
|
}
|
|
76
|
-
.rich-contenteditable[data-v-
|
|
76
|
+
.rich-contenteditable[data-v-b659b434] {
|
|
77
77
|
position: relative;
|
|
78
78
|
width: auto;
|
|
79
79
|
}
|
|
80
|
-
.rich-contenteditable__label[data-v-
|
|
80
|
+
.rich-contenteditable__label[data-v-b659b434] {
|
|
81
81
|
position: absolute;
|
|
82
82
|
margin-inline: 14px 0;
|
|
83
83
|
max-width: fit-content;
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
color var(--animation-quick),
|
|
96
96
|
background-color var(--animation-quick) var(--animation-slow);
|
|
97
97
|
}
|
|
98
|
-
.rich-contenteditable__input:focus + .rich-contenteditable__label[data-v-
|
|
99
|
-
.rich-contenteditable__input:not(.rich-contenteditable__input--empty) + .rich-contenteditable__label[data-v-
|
|
98
|
+
.rich-contenteditable__input:focus + .rich-contenteditable__label[data-v-b659b434],
|
|
99
|
+
.rich-contenteditable__input:not(.rich-contenteditable__input--empty) + .rich-contenteditable__label[data-v-b659b434] {
|
|
100
100
|
inset-block-start: -10px;
|
|
101
101
|
line-height: 1.5;
|
|
102
102
|
font-size: 13px;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
font-size var(--animation-quick),
|
|
112
112
|
color var(--animation-quick);
|
|
113
113
|
}
|
|
114
|
-
.rich-contenteditable__input[data-v-
|
|
114
|
+
.rich-contenteditable__input[data-v-b659b434] {
|
|
115
115
|
overflow-y: auto;
|
|
116
116
|
width: auto;
|
|
117
117
|
margin: 0;
|
|
@@ -129,16 +129,16 @@
|
|
|
129
129
|
min-height: 44px;
|
|
130
130
|
max-height: 242px;
|
|
131
131
|
}
|
|
132
|
-
.rich-contenteditable__input--has-label[data-v-
|
|
132
|
+
.rich-contenteditable__input--has-label[data-v-b659b434] {
|
|
133
133
|
margin-top: 10px;
|
|
134
134
|
}
|
|
135
|
-
.rich-contenteditable__input--empty[data-v-
|
|
136
|
-
.rich-contenteditable__input--empty[data-v-
|
|
135
|
+
.rich-contenteditable__input--empty[data-v-b659b434]:focus:before,
|
|
136
|
+
.rich-contenteditable__input--empty[data-v-b659b434]:not(.rich-contenteditable__input--has-label):before {
|
|
137
137
|
content: attr(aria-placeholder);
|
|
138
138
|
color: var(--color-text-maxcontrast);
|
|
139
139
|
position: absolute;
|
|
140
140
|
}
|
|
141
|
-
.rich-contenteditable__input[contenteditable=false][data-v-
|
|
141
|
+
.rich-contenteditable__input[contenteditable=false][data-v-b659b434]:not(.rich-contenteditable__input--disabled) {
|
|
142
142
|
cursor: default;
|
|
143
143
|
background-color: transparent;
|
|
144
144
|
color: var(--color-main-text);
|
|
@@ -146,11 +146,11 @@
|
|
|
146
146
|
opacity: 1;
|
|
147
147
|
border-radius: 0;
|
|
148
148
|
}
|
|
149
|
-
.rich-contenteditable__input--multiline[data-v-
|
|
149
|
+
.rich-contenteditable__input--multiline[data-v-b659b434] {
|
|
150
150
|
min-height: 132px;
|
|
151
151
|
max-height: none;
|
|
152
152
|
}
|
|
153
|
-
.rich-contenteditable__input--disabled[data-v-
|
|
153
|
+
.rich-contenteditable__input--disabled[data-v-b659b434] {
|
|
154
154
|
opacity: .5;
|
|
155
155
|
color: var(--color-text-maxcontrast);
|
|
156
156
|
border: 2px solid var(--color-background-darker);
|
|
@@ -178,16 +178,18 @@
|
|
|
178
178
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
179
179
|
*
|
|
180
180
|
*/
|
|
181
|
-
._material-design-
|
|
181
|
+
._material-design-icon_pq0s6_26 {
|
|
182
182
|
display: flex;
|
|
183
183
|
align-self: center;
|
|
184
184
|
justify-self: center;
|
|
185
185
|
align-items: center;
|
|
186
186
|
justify-content: center;
|
|
187
187
|
}
|
|
188
|
-
._tribute-
|
|
188
|
+
._tribute-container_pq0s6_34 {
|
|
189
189
|
z-index: 9000;
|
|
190
190
|
overflow: auto;
|
|
191
|
+
position: absolute;
|
|
192
|
+
left: -10000px;
|
|
191
193
|
margin: var(--default-grid-baseline) 0;
|
|
192
194
|
padding: var(--default-grid-baseline);
|
|
193
195
|
color: var(--color-text-maxcontrast);
|
|
@@ -195,62 +197,62 @@
|
|
|
195
197
|
background: var(--color-main-background);
|
|
196
198
|
box-shadow: 0 1px 5px var(--color-box-shadow);
|
|
197
199
|
}
|
|
198
|
-
._tribute-
|
|
200
|
+
._tribute-container_pq0s6_34 ._tribute-container__item_pq0s6_46 {
|
|
199
201
|
color: var(--color-text-maxcontrast);
|
|
200
202
|
border-radius: var(--border-radius);
|
|
201
203
|
padding: var(--default-grid-baseline) calc(2 * var(--default-grid-baseline));
|
|
202
204
|
margin-bottom: var(--default-grid-baseline);
|
|
203
205
|
cursor: pointer;
|
|
204
206
|
}
|
|
205
|
-
._tribute-
|
|
207
|
+
._tribute-container_pq0s6_34 ._tribute-container__item_pq0s6_46:last-child {
|
|
206
208
|
margin-bottom: 0;
|
|
207
209
|
}
|
|
208
|
-
._tribute-
|
|
210
|
+
._tribute-container_pq0s6_34 ._tribute-container__item_pq0s6_46.highlight {
|
|
209
211
|
color: var(--color-main-text);
|
|
210
212
|
background: var(--color-background-hover);
|
|
211
213
|
}
|
|
212
|
-
._tribute-
|
|
213
|
-
._tribute-
|
|
214
|
+
._tribute-container_pq0s6_34 ._tribute-container__item_pq0s6_46.highlight,
|
|
215
|
+
._tribute-container_pq0s6_34 ._tribute-container__item_pq0s6_46.highlight * {
|
|
214
216
|
cursor: pointer;
|
|
215
217
|
}
|
|
216
|
-
._tribute-
|
|
218
|
+
._tribute-container_pq0s6_34._tribute-container--focus-visible_pq0s6_63 .highlight._tribute-container__item_pq0s6_46 {
|
|
217
219
|
outline: 2px solid var(--color-main-text) !important;
|
|
218
220
|
}
|
|
219
|
-
._tribute-container-
|
|
221
|
+
._tribute-container-autocomplete_pq0s6_67 {
|
|
220
222
|
min-width: 250px;
|
|
221
223
|
max-width: 300px;
|
|
222
224
|
max-height: calc((var(--default-clickable-area) + 5 * var(--default-grid-baseline)) * 4.5 - 1.5 * var(--default-grid-baseline));
|
|
223
225
|
}
|
|
224
|
-
._tribute-container-
|
|
225
|
-
._tribute-container-
|
|
226
|
+
._tribute-container-emoji_pq0s6_73,
|
|
227
|
+
._tribute-container-link_pq0s6_74 {
|
|
226
228
|
min-width: 200px;
|
|
227
229
|
max-width: 200px;
|
|
228
230
|
max-height: calc((24px + 3 * var(--default-grid-baseline)) * 5.5 - 1.5 * var(--default-grid-baseline));
|
|
229
231
|
}
|
|
230
|
-
._tribute-container-
|
|
231
|
-
._tribute-container-
|
|
232
|
+
._tribute-container-emoji_pq0s6_73 ._tribute-item_pq0s6_79,
|
|
233
|
+
._tribute-container-link_pq0s6_74 ._tribute-item_pq0s6_79 {
|
|
232
234
|
white-space: nowrap;
|
|
233
235
|
overflow: hidden;
|
|
234
236
|
text-overflow: ellipsis;
|
|
235
237
|
}
|
|
236
|
-
._tribute-container-
|
|
237
|
-
._tribute-container-
|
|
238
|
+
._tribute-container-emoji_pq0s6_73 ._tribute-item__emoji_pq0s6_85,
|
|
239
|
+
._tribute-container-link_pq0s6_74 ._tribute-item__emoji_pq0s6_85 {
|
|
238
240
|
padding-right: calc(var(--default-grid-baseline) * 2);
|
|
239
241
|
}
|
|
240
|
-
._tribute-container-
|
|
242
|
+
._tribute-container-link_pq0s6_74 {
|
|
241
243
|
min-width: 200px;
|
|
242
244
|
max-width: 300px;
|
|
243
245
|
}
|
|
244
|
-
._tribute-container-
|
|
246
|
+
._tribute-container-link_pq0s6_74 ._tribute-item_pq0s6_79 {
|
|
245
247
|
display: flex;
|
|
246
248
|
align-items: center;
|
|
247
249
|
}
|
|
248
|
-
._tribute-container-
|
|
250
|
+
._tribute-container-link_pq0s6_74 ._tribute-item__title_pq0s6_98 {
|
|
249
251
|
white-space: nowrap;
|
|
250
252
|
overflow: hidden;
|
|
251
253
|
text-overflow: ellipsis;
|
|
252
254
|
}
|
|
253
|
-
._tribute-container-
|
|
255
|
+
._tribute-container-link_pq0s6_74 ._tribute-item__icon_pq0s6_103 {
|
|
254
256
|
margin: auto 0;
|
|
255
257
|
width: 20px;
|
|
256
258
|
height: 20px;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
-
.material-design-icon[data-v-
|
|
2
|
+
.material-design-icon[data-v-ce89eeda] {
|
|
3
3
|
display: flex;
|
|
4
4
|
align-self: center;
|
|
5
5
|
justify-self: center;
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
}
|
|
9
|
-
.widgets--list.icon-loading[data-v-
|
|
9
|
+
.widgets--list.icon-loading[data-v-ce89eeda] {
|
|
10
10
|
min-height: 44px;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcDashboardWidget-01deRW9Z.css';
|
|
2
2
|
import { N as r } from "./NcAvatar-xT3kz6mU.mjs";
|
|
3
|
-
import { N as a } from "./NcDashboardWidgetItem-
|
|
3
|
+
import { N as a } from "./NcDashboardWidgetItem-Qd8gSF2h.mjs";
|
|
4
4
|
import o from "../Components/NcEmptyContent.mjs";
|
|
5
5
|
import { C as i } from "./Check-qy5XrF1J.mjs";
|
|
6
6
|
import { r as m, k as l, a as u } from "./_l10n-FmsZpnE4.mjs";
|
package/dist/chunks/{NcDashboardWidget-ogqyHahY.mjs.map → NcDashboardWidget-9LDutUO0.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidget-ogqyHahY.mjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Julien Veyssier <eneiluj@posteo.net>\n -\n - @author Julien Veyssier <eneiluj@posteo.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\n\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t}\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </h3>\n\t\t\t\t\t<p class=\"message\">\n \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: 44px;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAvatar","NcDashboardWidgetItem","NcEmptyContent","Check","t","h","evName","it","nbItems"],"mappings":";;;;;;;AAgPA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,OAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,M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A;AACA,aAAA,KAAA,eAAA,KAAA,MAAA,UAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDashboardWidget-9LDutUO0.mjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Julien Veyssier <eneiluj@posteo.net>\n -\n - @author Julien Veyssier <eneiluj@posteo.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\n\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t}\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </h3>\n\t\t\t\t\t<p class=\"message\">\n \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: 44px;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAvatar","NcDashboardWidgetItem","NcEmptyContent","Check","t","h","evName","it","nbItems"],"mappings":";;;;;;;AAgPA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,OAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AA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1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcDashboardWidget-01deRW9Z.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const a = require("./NcAvatar-zTS9P1lK.cjs"), o = require("./NcDashboardWidgetItem-
|
|
3
|
+
const a = require("./NcAvatar-zTS9P1lK.cjs"), o = require("./NcDashboardWidgetItem-1r760Ikh.cjs"), i = require("../Components/NcEmptyContent.cjs"), m = require("./Check-QBzDcHpr.cjs"), r = require("./_l10n-Od-4xzJA.cjs"), l = require("./_plugin-vue2_normalizer-DCfUPqga.cjs");
|
|
4
4
|
r.register(r.t28);
|
|
5
5
|
const c = {
|
|
6
6
|
name: "NcDashboardWidget",
|
package/dist/chunks/{NcDashboardWidget-QciRRvL4.cjs.map → NcDashboardWidget-oPZKAkd-.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcDashboardWidget-QciRRvL4.cjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Julien Veyssier <eneiluj@posteo.net>\n -\n - @author Julien Veyssier <eneiluj@posteo.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\n\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t}\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </h3>\n\t\t\t\t\t<p class=\"message\">\n \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: 44px;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main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,KAAA,gBAAA,IACA,KAAA;AACA,aAAA,KAAA,MAAA,MAAA,GAAAA,CAAA;AAAA,IACA;AAAA,IAEA,2BAAA;AACA,aAAA,KAAA,4BAAA,KAAA,0BAAA,KAAA,MAAA,WAAA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA,KAAA,2BAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,aAAA,KAAA,2BAAA,IAAA;AAAA,IACA;AAAA,IAEA,WAAA;AACA,aAAA,KAAA,eAAA,KAAA,MAAA,UAAA,KAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcDashboardWidget-oPZKAkd-.cjs","sources":["../../src/components/NcDashboardWidget/NcDashboardWidget.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2020 Julien Veyssier <eneiluj@posteo.net>\n -\n - @author Julien Veyssier <eneiluj@posteo.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\n\n## Usage\n\n### Simplest example with custom item\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Showing items and a half empty content message\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-items-and-empty-content=\"true\"\n\t\t:half-empty-content-message=\"'No unread items'\">\n\t\t<template #default=\"{ item }\">\n\t\t\t{{ item.name }}\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tname: 'first',\n\t\tcontent: 'blabla',\n\t},\n\t{\n\t\tname: 'second',\n\t\tcontent: 'fuzzfuzz',\n\t},\n]\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems\n\t\t}\n\t},\n}\n</script>\n```\n\n### Complete example using NcDashboardWidgetItem\n\n```vue\n<template>\n\t<NcDashboardWidget :items=\"items\"\n\t\t:show-more-url=\"'https://nextcloud.com'\"\n\t\t:item-menu=\"itemMenu\"\n\t\t@hide=\"onHide\"\n\t\t@markDone=\"onMarkDone\">\n\n\t\t<template #empty-content>\n\t\t\tNothing to display\n\t\t</template>\n\t</NcDashboardWidget>\n</template>\n\n<script>\nconst myItems = [\n\t{\n\t\tid: '1',\n\t\ttargetUrl: 'https://target.org',\n\t\tavatarUrl: 'https://avatar.url/img.png',\n\t\tavatarUsername: 'Robert',\n\t\tavatarIsNoUser: true,\n\t\toverlayIconUrl: '/svg/core/actions/sound?color=000',\n\t\tmainText: 'First item text',\n\t\tsubText: 'First item subtext',\n\t},\n\t{\n\t\tid: '2',\n\t\ttargetUrl: 'https://other-target.org',\n\t\tavatarUrl: 'https://other-avatar.url/img.png',\n\t\toverlayIconUrl: '/svg/core/actions/add?color=000',\n\t\tmainText: 'Second item text',\n\t\tsubText: 'Second item subtext',\n\t},\n]\nconst myItemMenu = {\n\t// triggers an event named \"markDone\" when clicked\n\t'markDone': {\n\t\ttext: 'Mark as done',\n\t\ticon: 'icon-checkmark',\n\t},\n\t// triggers an event named \"hide\" when clicked\n\t'hide': {\n\t\ttext: 'Hide',\n\t\ticon: 'icon-toggle',\n\t}\n}\nexport default {\n\tname: 'MyDashboardWidget',\n\tprops: [],\n\tdata() {\n\t\treturn {\n\t\t\titems: myItems,\n\t\t\titemMenu: myItemMenu,\n\t\t\tloading: true,\n\t\t}\n\t},\n\tmethods: {\n\t\tonMoreClick() {\n\t\t\tconsole.log('more clicked')\n\t\t\tconst win = window.open('https://wherever.you.want', '_blank')\n\t\t\twin.focus()\n\t\t},\n\t\tonHide(item) {\n\t\t\tconsole.log('user wants to hide item ' + item.id)\n\t\t\t// do what you want\n\t\t},\n\t\tonMarkDone(item) {\n\t\t\tconsole.log('user wants to mark item ' + item.id + ' as done')\n\t\t\t// do what you want\n\t\t},\n\t},\n}\n</script>\n```\n\n</docs>\n\n<template>\n\t<div class=\"dashboard-widget\">\n\t\t<!-- This element is shown if we have items, but want to show a general message as well.\n\t\tCan be used e.g. to show \"No mentions\" on top of the item list. -->\n\t\t<NcEmptyContent v-if=\"showHalfEmptyContentArea\"\n\t\t\t:description=\"halfEmptyContentString\"\n\t\t\tclass=\"half-screen\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot The icon to show in the half empty content area. -->\n\t\t\t\t<slot name=\"halfEmptyContentIcon\">\n\t\t\t\t\t<Check />\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\t\t<!-- The list of items to show. -->\n\t\t<ul>\n\t\t\t<li v-for=\"item in displayedItems\" :key=\"item.id\">\n\t\t\t\t<!-- @slot The default slot can be optionally overridden. It contains the template of one item. -->\n\t\t\t\t<slot name=\"default\" :item=\"item\">\n\t\t\t\t\t<NcDashboardWidgetItem v-bind=\"item\"\n\t\t\t\t\t\t:item-menu=\"itemMenu\"\n\t\t\t\t\t\tv-on=\"handlers\" />\n\t\t\t\t</slot>\n\t\t\t</li>\n\t\t</ul>\n\t\t<!-- While the widget is loading, we show a list of placeholder items. -->\n\t\t<div v-if=\"loading\">\n\t\t\t<div v-for=\"i in 7\" :key=\"i\" class=\"item-list__entry\">\n\t\t\t\t<NcAvatar class=\"item-avatar\" :size=\"44\" />\n\t\t\t\t<div class=\"item__details\">\n\t\t\t\t\t<h3> </h3>\n\t\t\t\t\t<p class=\"message\">\n \n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<!-- @slot Slot for showing information in case of an empty item list. -->\n\t\t<slot v-else-if=\"items.length === 0\" name=\"empty-content\">\n\t\t\t<NcEmptyContent v-if=\"emptyContentMessage\"\n\t\t\t\t:description=\"emptyContentMessage\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<!-- @slot The icon to show in the empty content area. -->\n\t\t\t\t\t<slot name=\"emptyContentIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</slot>\n\t\t<!-- A \"show more\" link, e.g. to navigate to the main app belonging to this widget. -->\n\t\t<a v-else-if=\"showMore\"\n\t\t\t:href=\"showMoreUrl\"\n\t\t\ttarget=\"_blank\"\n\t\t\tclass=\"more\"\n\t\t\ttabindex=\"0\">\n\t\t\t{{ showMoreLabel }}\n\t\t</a>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcDashboardWidgetItem from '../NcDashboardWidgetItem/index.js'\nimport NcEmptyContent from '../NcEmptyContent/index.js'\n\nimport Check from 'vue-material-design-icons/Check.vue'\n\nimport { t } from '../../l10n.js'\n\nexport default {\n\tname: 'NcDashboardWidget',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcDashboardWidgetItem,\n\t\tNcEmptyContent,\n\t\tCheck,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * An array containing the items to show (specific structure must be respected,\n\t\t * except if you override item rendering in the default slot).\n\t\t */\n\t\titems: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => { return [] },\n\t\t},\n\t\t/**\n\t\t * If this is set, a \"show more\" text is displayed on the widget's bottom.\n\t\t * It's a link pointing to this URL.\n\t\t */\n\t\tshowMoreUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text of show more button.\n\t\t *\n\t\t * Expected to be in the form \"More {itemName} …\"\n\t\t */\n\t\tshowMoreLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: t('More items …'),\n\t\t},\n\t\t/**\n\t\t * A boolean to put the widget in a loading state.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each item.\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t\t/**\n\t\t * Whether both the items and the empty content message are shown.\n\t\t * Usefull for e.g. showing \"No mentions\" and a list of elements.\n\t\t */\n\t\tshowItemsAndEmptyContent: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * The text to show in the empty content area.\n\t\t */\n\t\temptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The text to show in the half empty content area.\n\t\t */\n\t\thalfEmptyContentMessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t// forward menu events to my parent\n\t\thandlers() {\n\t\t\tconst h = {}\n\t\t\tfor (const evName in this.itemMenu) {\n\t\t\t\th[evName] = (it) => {\n\t\t\t\t\tthis.$emit(evName, it)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn h\n\t\t},\n\t\tdisplayedItems() {\n\t\t\tconst nbItems = (this.showMoreUrl && this.items.length >= this.maxItemNumber)\n\t\t\t\t? this.maxItemNumber - 1\n\t\t\t\t: this.maxItemNumber\n\t\t\treturn this.items.slice(0, nbItems)\n\t\t},\n\n\t\tshowHalfEmptyContentArea() {\n\t\t\treturn this.showItemsAndEmptyContent && this.halfEmptyContentString && this.items.length !== 0\n\t\t},\n\n\t\thalfEmptyContentString() {\n\t\t\treturn this.halfEmptyContentMessage || this.emptyContentMessage\n\t\t},\n\n\t\tmaxItemNumber() {\n\t\t\treturn this.showItemsAndEmptyContent ? 5 : 7\n\t\t},\n\n\t\tshowMore() {\n\t\t\treturn this.showMoreUrl && this.items.length >= this.maxItemNumber\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.dashboard-widget :deep(.empty-content) {\n\ttext-align: center;\n\tpadding-top: 5vh;\n\t&.half-screen {\n\t\tpadding-top: 0;\n\t\tmargin-bottom: 1vh;\n\t}\n}\n\n.more {\n\tdisplay: block;\n\ttext-align: center;\n\tcolor: var(--color-text-maxcontrast);\n\tline-height: 60px;\n\tcursor: pointer;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t\tcolor: var(--color-main-text);\n\t}\n}\n\n/* skeleton */\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tpadding: 8px;\n\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: 44px;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\tbackground-color: var(--color-background-dark);\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 80%;\n\t\t\theight: 15px;\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAvatar","NcDashboardWidgetItem","NcEmptyContent","Check","t","h","evName","it","nbItems"],"mappings":";;;AAgPA,MAAAA,IAAA;AAAA,EACA,MAAA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