@limetech/lime-crm-building-blocks 1.57.1 → 1.58.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/CHANGELOG.md +14 -0
- package/dist/cjs/{decorator-d3d8a4bb.js → decorator-3c127e02.js} +1 -1
- package/dist/cjs/{factory-310afac1.js → factory-16e9fc58.js} +3 -0
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +0 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-item.cjs.entry.js +3 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +0 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.css +6 -0
- package/dist/collection/components/notification-list/notification-item/notification-item.js +2 -1
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/components/factory.js +3 -0
- package/dist/components/limebb-info-tile-format.js +0 -1
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/notification-item.js +3 -2
- package/dist/esm/{decorator-d3dbf340.js → decorator-f7fb4ce4.js} +1 -1
- package/dist/esm/{factory-babd3a98.js → factory-79b55351.js} +3 -0
- package/dist/esm/limebb-info-tile-format.entry.js +0 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
- package/dist/esm/limebb-notification-item.entry.js +3 -2
- package/dist/esm/limebb-text-editor.entry.js +3 -3
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-fb3b1279.entry.js → p-12a3660e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-3951ce61.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-6e366a1b.js +1 -0
- package/dist/lime-crm-building-blocks/{p-58416605.entry.js → p-8a9f7ab6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8b377b1f.js → p-b083c13a.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1eb0103c.entry.js → p-ca3f80fa.entry.js} +1 -1
- package/dist/types/components/notification-list/notification-item/notification-item.types.d.ts +4 -0
- package/package.json +13 -13
- package/dist/lime-crm-building-blocks/p-39b80f7a.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-db4425f5.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.58.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.57.2...v1.58.0) (2025-01-09)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **notification-item:** indicate if item is selected ([8302cdf](https://github.com/Lundalogik/lime-crm-building-blocks/commit/8302cdfd98652cc9936929a828911af5adf80cfc))
|
|
7
|
+
|
|
8
|
+
## [1.57.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.57.1...v1.57.2) (2024-12-20)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
* **mentions:** be able to see group count ([3494a67](https://github.com/Lundalogik/lime-crm-building-blocks/commit/3494a67aa9fe6edbe6f4ca518d664060a9ca8a57))
|
|
14
|
+
|
|
1
15
|
## [1.57.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.57.0...v1.57.1) (2024-12-20)
|
|
2
16
|
|
|
3
17
|
### Bug Fixes
|
|
@@ -814,6 +814,9 @@ function watchProp(target, property, observer) {
|
|
|
814
814
|
*/
|
|
815
815
|
function subscribe(component, property) {
|
|
816
816
|
const subscription = createSubscription(component, property);
|
|
817
|
+
if (typeof subscription !== 'function') {
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
817
820
|
const subscriptions = componentSubscriptions.get(component);
|
|
818
821
|
subscriptions.push(subscription);
|
|
819
822
|
}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-dd1aef9e.js');
|
|
6
6
|
const types = require('./types-55a8dfb7.js');
|
|
7
|
-
const factory = require('./factory-
|
|
7
|
+
const factory = require('./factory-16e9fc58.js');
|
|
8
8
|
const _getTag = require('./_getTag-232d2c59.js');
|
|
9
9
|
const _Map = require('./_Map-ea5de08f.js');
|
|
10
10
|
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-dd1aef9e.js');
|
|
6
6
|
const types = require('./types-55a8dfb7.js');
|
|
7
|
-
const decorator = require('./decorator-
|
|
8
|
-
const factory = require('./factory-
|
|
7
|
+
const decorator = require('./decorator-3c127e02.js');
|
|
8
|
+
const factory = require('./factory-16e9fc58.js');
|
|
9
9
|
const negate = require('./negate-14a67e26.js');
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-dd1aef9e.js');
|
|
6
6
|
const types = require('./types-55a8dfb7.js');
|
|
7
7
|
|
|
8
|
-
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
8
|
+
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-selected) .notification-item{box-shadow:var(--shadow-focused-state)}:host(limebb-notification-item.is-selected) .notification-item:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
9
9
|
|
|
10
10
|
const NotificationListItem = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -48,7 +48,7 @@ const NotificationListItem = class {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
var _a, _b;
|
|
51
|
+
var _a, _b, _c;
|
|
52
52
|
let handleClick;
|
|
53
53
|
if (this.item.clickable) {
|
|
54
54
|
handleClick = this.handleNotificationListItemClick;
|
|
@@ -59,6 +59,7 @@ const NotificationListItem = class {
|
|
|
59
59
|
return (index.h(index.Host, { id: this.item.id, class: {
|
|
60
60
|
'is-clickable': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.clickable),
|
|
61
61
|
'is-read': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.read),
|
|
62
|
+
'is-selected': !!((_c = this.item) === null || _c === void 0 ? void 0 : _c.selected),
|
|
62
63
|
}, onClick: handleClick }, index.h("div", { class: "notification-item" }, this.renderSource(), this.renderContent())));
|
|
63
64
|
}
|
|
64
65
|
renderSource() {
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-dd1aef9e.js');
|
|
6
6
|
const types = require('./types-55a8dfb7.js');
|
|
7
|
-
const decorator = require('./decorator-
|
|
7
|
+
const decorator = require('./decorator-3c127e02.js');
|
|
8
8
|
const keycodes = require('./keycodes-4c91c567.js');
|
|
9
9
|
const _Uint8Array = require('./_Uint8Array-a560184a.js');
|
|
10
10
|
const _MapCache = require('./_MapCache-e45fbb5e.js');
|
|
11
11
|
const _Map = require('./_Map-ea5de08f.js');
|
|
12
12
|
const _getTag = require('./_getTag-232d2c59.js');
|
|
13
13
|
const nonNull = require('./non-null-45e885d5.js');
|
|
14
|
-
require('./factory-
|
|
14
|
+
require('./factory-16e9fc58.js');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @public
|
|
@@ -1509,7 +1509,7 @@ const LimeBBTextEditor = class {
|
|
|
1509
1509
|
name: 'limebb-mention-group-counter',
|
|
1510
1510
|
props: {
|
|
1511
1511
|
count: groupCount,
|
|
1512
|
-
|
|
1512
|
+
limetype: coworkerLimetype,
|
|
1513
1513
|
helperLabel: this.translator.get('webclient.notification-center.members-will-be-notified'),
|
|
1514
1514
|
},
|
|
1515
1515
|
};
|
package/dist/collection/components/notification-list/notification-item/notification-item.css
CHANGED
|
@@ -120,6 +120,12 @@
|
|
|
120
120
|
border-color: rgb(var(--contrast-600));
|
|
121
121
|
background-color: rgb(var(--contrast-500));
|
|
122
122
|
}
|
|
123
|
+
:host(limebb-notification-item.is-selected) .notification-item {
|
|
124
|
+
box-shadow: var(--shadow-focused-state);
|
|
125
|
+
}
|
|
126
|
+
:host(limebb-notification-item.is-selected) .notification-item:hover {
|
|
127
|
+
box-shadow: var(--shadow-focused-state), var(--button-shadow-hovered);
|
|
128
|
+
}
|
|
123
129
|
:host(limebb-notification-item.is-clickable) .notification-item:hover {
|
|
124
130
|
border-color: transparent;
|
|
125
131
|
}
|
|
@@ -45,7 +45,7 @@ export class NotificationListItem {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
var _a, _b;
|
|
48
|
+
var _a, _b, _c;
|
|
49
49
|
let handleClick;
|
|
50
50
|
if (this.item.clickable) {
|
|
51
51
|
handleClick = this.handleNotificationListItemClick;
|
|
@@ -56,6 +56,7 @@ export class NotificationListItem {
|
|
|
56
56
|
return (h(Host, { id: this.item.id, class: {
|
|
57
57
|
'is-clickable': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.clickable),
|
|
58
58
|
'is-read': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.read),
|
|
59
|
+
'is-selected': !!((_c = this.item) === null || _c === void 0 ? void 0 : _c.selected),
|
|
59
60
|
}, onClick: handleClick }, h("div", { class: "notification-item" }, this.renderSource(), this.renderContent())));
|
|
60
61
|
}
|
|
61
62
|
renderSource() {
|
|
@@ -362,7 +362,7 @@ export class LimeBBTextEditor {
|
|
|
362
362
|
name: 'limebb-mention-group-counter',
|
|
363
363
|
props: {
|
|
364
364
|
count: groupCount,
|
|
365
|
-
|
|
365
|
+
limetype: coworkerLimetype,
|
|
366
366
|
helperLabel: this.translator.get('webclient.notification-center.members-will-be-notified'),
|
|
367
367
|
},
|
|
368
368
|
};
|
|
@@ -812,6 +812,9 @@ function watchProp(target, property, observer) {
|
|
|
812
812
|
*/
|
|
813
813
|
function subscribe(component, property) {
|
|
814
814
|
const subscription = createSubscription(component, property);
|
|
815
|
+
if (typeof subscription !== 'function') {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
815
818
|
const subscriptions = componentSubscriptions.get(component);
|
|
816
819
|
subscriptions.push(subscription);
|
|
817
820
|
}
|
|
@@ -13,7 +13,6 @@ const InfoTileAdminConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLE
|
|
|
13
13
|
const id = event.detail.id;
|
|
14
14
|
if (id === 'none') {
|
|
15
15
|
this.change.emit();
|
|
16
|
-
// eslint-disable-next-line sonarjs/no-duplicate-string
|
|
17
16
|
}
|
|
18
17
|
else if (id === 'date' || id === 'relative-date') {
|
|
19
18
|
this.change.emit({
|
|
@@ -1508,7 +1508,7 @@ const LimeBBTextEditor = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
1508
1508
|
name: 'limebb-mention-group-counter',
|
|
1509
1509
|
props: {
|
|
1510
1510
|
count: groupCount,
|
|
1511
|
-
|
|
1511
|
+
limetype: coworkerLimetype,
|
|
1512
1512
|
helperLabel: this.translator.get('webclient.notification-center.members-will-be-notified'),
|
|
1513
1513
|
},
|
|
1514
1514
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { P as PlatformServiceName } from './types.js';
|
|
3
3
|
|
|
4
|
-
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
4
|
+
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-selected) .notification-item{box-shadow:var(--shadow-focused-state)}:host(limebb-notification-item.is-selected) .notification-item:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
5
5
|
|
|
6
6
|
const NotificationListItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -46,7 +46,7 @@ const NotificationListItem = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
var _a, _b;
|
|
49
|
+
var _a, _b, _c;
|
|
50
50
|
let handleClick;
|
|
51
51
|
if (this.item.clickable) {
|
|
52
52
|
handleClick = this.handleNotificationListItemClick;
|
|
@@ -57,6 +57,7 @@ const NotificationListItem = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
|
57
57
|
return (h(Host, { id: this.item.id, class: {
|
|
58
58
|
'is-clickable': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.clickable),
|
|
59
59
|
'is-read': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.read),
|
|
60
|
+
'is-selected': !!((_c = this.item) === null || _c === void 0 ? void 0 : _c.selected),
|
|
60
61
|
}, onClick: handleClick }, h("div", { class: "notification-item" }, this.renderSource(), this.renderContent())));
|
|
61
62
|
}
|
|
62
63
|
renderSource() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PlatformServiceName } from './types-4d6d1350.js';
|
|
2
|
-
import { c as createStateDecorator } from './factory-
|
|
2
|
+
import { c as createStateDecorator } from './factory-79b55351.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Gets an object with all limetypes where name is used as key
|
|
@@ -812,6 +812,9 @@ function watchProp(target, property, observer) {
|
|
|
812
812
|
*/
|
|
813
813
|
function subscribe(component, property) {
|
|
814
814
|
const subscription = createSubscription(component, property);
|
|
815
|
+
if (typeof subscription !== 'function') {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
815
818
|
const subscriptions = componentSubscriptions.get(component);
|
|
816
819
|
subscriptions.push(subscription);
|
|
817
820
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-a0338355.js';
|
|
2
2
|
import { P as PlatformServiceName, A as AggregateOperator } from './types-4d6d1350.js';
|
|
3
|
-
import { c as createStateDecorator } from './factory-
|
|
3
|
+
import { c as createStateDecorator } from './factory-79b55351.js';
|
|
4
4
|
import { i as isArrayLike, a as isBuffer, b as isTypedArray, c as isArguments, g as getTag, d as isPrototype, e as baseKeys } from './_getTag-37e499e8.js';
|
|
5
5
|
import { i as isArray } from './_Map-1b6f37f5.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-a0338355.js';
|
|
2
2
|
import { P as PlatformServiceName } from './types-4d6d1350.js';
|
|
3
|
-
import { S as SelectCurrentLimeType } from './decorator-
|
|
4
|
-
import { c as createStateDecorator } from './factory-
|
|
3
|
+
import { S as SelectCurrentLimeType } from './decorator-f7fb4ce4.js';
|
|
4
|
+
import { c as createStateDecorator } from './factory-79b55351.js';
|
|
5
5
|
import { n as negate } from './negate-a980a4fe.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-a0338355.js';
|
|
2
2
|
import { P as PlatformServiceName } from './types-4d6d1350.js';
|
|
3
3
|
|
|
4
|
-
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
4
|
+
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-selected) .notification-item{box-shadow:var(--shadow-focused-state)}:host(limebb-notification-item.is-selected) .notification-item:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
5
5
|
|
|
6
6
|
const NotificationListItem = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -44,7 +44,7 @@ const NotificationListItem = class {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
var _a, _b;
|
|
47
|
+
var _a, _b, _c;
|
|
48
48
|
let handleClick;
|
|
49
49
|
if (this.item.clickable) {
|
|
50
50
|
handleClick = this.handleNotificationListItemClick;
|
|
@@ -55,6 +55,7 @@ const NotificationListItem = class {
|
|
|
55
55
|
return (h(Host, { id: this.item.id, class: {
|
|
56
56
|
'is-clickable': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.clickable),
|
|
57
57
|
'is-read': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.read),
|
|
58
|
+
'is-selected': !!((_c = this.item) === null || _c === void 0 ? void 0 : _c.selected),
|
|
58
59
|
}, onClick: handleClick }, h("div", { class: "notification-item" }, this.renderSource(), this.renderContent())));
|
|
59
60
|
}
|
|
60
61
|
renderSource() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a0338355.js';
|
|
2
2
|
import { A as AggregateOperator, P as PlatformServiceName } from './types-4d6d1350.js';
|
|
3
|
-
import { a as SelectLimeTypes } from './decorator-
|
|
3
|
+
import { a as SelectLimeTypes } from './decorator-f7fb4ce4.js';
|
|
4
4
|
import { A as ARROW_DOWN, a as ESCAPE, b as ARROW_UP, E as ENTER, T as TAB } from './keycodes-5ad45042.js';
|
|
5
5
|
import { d as defineProperty, b as arrayLikeKeys, k as keys, c as getSymbols, s as stubArray, a as arrayPush, e as baseGetAllKeys, U as Uint8Array, S as Stack, g as getAllKeys } from './_Uint8Array-d4ca8cd7.js';
|
|
6
6
|
import { i as isSymbol, e as eq } from './_MapCache-64d079c4.js';
|
|
7
7
|
import { d as isObject, r as root, S as Symbol, a as isObjectLike, i as isArray } from './_Map-1b6f37f5.js';
|
|
8
8
|
import { d as isPrototype, i as isArrayLike, o as overArg, g as getTag, h as baseUnary, n as nodeUtil, a as isBuffer } from './_getTag-37e499e8.js';
|
|
9
9
|
import { i as isNonNull } from './non-null-f3e62427.js';
|
|
10
|
-
import './factory-
|
|
10
|
+
import './factory-79b55351.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @public
|
|
@@ -1505,7 +1505,7 @@ const LimeBBTextEditor = class {
|
|
|
1505
1505
|
name: 'limebb-mention-group-counter',
|
|
1506
1506
|
props: {
|
|
1507
1507
|
count: groupCount,
|
|
1508
|
-
|
|
1508
|
+
limetype: coworkerLimetype,
|
|
1509
1509
|
helperLabel: this.translator.get('webclient.notification-center.members-will-be-notified'),
|
|
1510
1510
|
},
|
|
1511
1511
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-8e85017b.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-4b389d50",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-32ab34e5",[[1,"limebb-kanban",{platform:[16],context:[16],items:[16],paginationSize:[2,"pagination-size"],groupBy:[513,"group-by"],groups:[16]}]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-8e85017b.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-4b389d50",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-32ab34e5",[[1,"limebb-kanban",{platform:[16],context:[16],items:[16],paginationSize:[2,"pagination-size"],groupBy:[513,"group-by"],groups:[16]}]]],["p-12a3660e",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],items:[32],highlightedItemIndex:[32],customElements:[32],registeredTriggers:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]}]]],["p-2e549d89",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-beb4e864",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-56654f3d",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-c4e176ca",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-dc97e968",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]}]]],["p-3f66a22e",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-74dfea73",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-8aafd8fb",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-ca3f80fa",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]}]]],["p-3602eb38",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-87d08f0d",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-2867f980",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-c163374e",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-d0a17301",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-8a9f7ab6",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-1acd64f5",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-6abd79e1",[[1,"limebb-mention",{limetype:[1],objectid:[2],limeobject:[32]}]]],["p-c8762131",[[1,"limebb-mention-group-counter",{count:[2],limetype:[16],helperLabel:[1,"helper-label"]}]]],["p-25011706",[[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-e509f76c",[[1,"limebb-summary-popover",{heading:[513],subheading:[513],image:[16],icon:[513],value:[1],openDirection:[513,"open-direction"],actions:[16],isPopoverOpen:[32]}]]],["p-fd6bc5af",[[1,"limebb-kanban-column",{platform:[16],context:[16],columnHeading:[1,"column-heading"],items:[16],loading:[4],paginationSize:[2,"pagination-size"],displayedItemCount:[32]}]]],["p-e9b322dc",[[1,"limebb-text-editor-picker",{items:[16],open:[516],isSearching:[4,"is-searching"],emptyMessage:[1,"empty-message"]}]]],["p-99a45f29",[[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]]],["p-bf3dfc8b",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-abdc6601",[[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]]],["p-3951ce61",[[1,"limebb-notification-item",{platform:[16],context:[16],item:[16]}]]],["p-9e9e54f3",[[1,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]]],["p-b4e15af7",[[1,"limebb-empty-state",{heading:[513],value:[513],icon:[16]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as r,g as i}from"./p-8e85017b.js";import{A as n,P as s}from"./p-4506e883.js";import{a as o}from"./p-db4425f5.js";import{A as a,a as u,b as c,E as h,T as f}from"./p-0086e532.js";import{d as l,b as v,k as d,c as b,s as p,a as m,e as j,U as y,S as g,g as w}from"./p-ef494ab2.js";import{i as O,e as x}from"./p-28e4e638.js";import{d as A,r as k,S,a as T,i as C}from"./p-e7281662.js";import{d as M,i as E,o as N,g as _,h as I,n as F,a as P}from"./p-f340c7e6.js";import{i as $}from"./p-86b9d9e8.js";import"./p-8b377b1f.js";var L=/\s/,R=/^\s+/;var G=/^[-+]0x[0-9a-f]+$/i,U=/^0b[01]+$/i,D=/^0o[0-7]+$/i,Q=parseInt;function W(t){if("number"==typeof t)return t;if(O(t))return NaN;if(A(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=A(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;var r;t=(r=t)?r.slice(0,function(t){for(var e=t.length;e--&&L.test(t.charAt(e)););return e}(r)+1).replace(R,""):r;var i=U.test(t);return i||D.test(t)?Q(t.slice(2),i?2:8):G.test(t)?NaN:+t}var q=Object.create,B=function(){function t(){}return function(e){if(!A(e))return{};if(q)return q(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function z(t,e,r){"__proto__"==e&&l?l(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var H=Object.prototype.hasOwnProperty;function K(t,e,r){var i=t[e];H.call(t,e)&&x(i,r)&&(void 0!==r||e in t)||z(t,e,r)}function V(t,e,r,i){var n=!r;r||(r={});for(var s=-1,o=e.length;++s<o;){var a=e[s],u=i?i(r[a],t[a],a,r,t):void 0;void 0===u&&(u=t[a]),n?z(r,a,u):K(r,a,u)}return r}var J=Object.prototype.hasOwnProperty;function X(t){return E(t)?v(t,!0):function(t){if(!A(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=M(t),r=[];for(var i in t)("constructor"!=i||!e&&J.call(t,i))&&r.push(i);return r}(t)}var Y=N(Object.getPrototypeOf,Object),Z="object"==typeof exports&&exports&&!exports.nodeType&&exports,tt=Z&&"object"==typeof module&&module&&!module.nodeType&&module,et=tt&&tt.exports===Z?k.Buffer:void 0,rt=et?et.allocUnsafe:void 0,it=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)m(e,b(t)),t=Y(t);return e}:p;function nt(t){return j(t,X,it)}var st=Object.prototype.hasOwnProperty;function ot(t){var e=new t.constructor(t.byteLength);return new y(e).set(new y(t)),e}var at=/\w*$/,ut=S?S.prototype:void 0,ct=ut?ut.valueOf:void 0;var ht=F&&F.isMap,ft=ht?I(ht):function(t){return T(t)&&"[object Map]"==_(t)},lt=F&&F.isSet,vt=lt?I(lt):function(t){return T(t)&&"[object Set]"==_(t)},dt={};function bt(t,e,r,i,n,s){var o,a=1&e,u=2&e,c=4&e;if(r&&(o=n?r(t,i,n,s):r(t)),void 0!==o)return o;if(!A(t))return t;var h=C(t);if(h){if(o=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&st.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!a)return function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}(t,o)}else{var f=_(t),l="[object Function]"==f||"[object GeneratorFunction]"==f;if(P(t))return function(t,e){if(e)return t.slice();var r=t.length,i=rt?rt(r):new t.constructor(r);return t.copy(i),i}(t,a);if("[object Object]"==f||"[object Arguments]"==f||l&&!n){if(o=u||l?{}:function(t){return"function"!=typeof t.constructor||M(t)?{}:B(Y(t))}(t),!a)return u?function(t,e){return V(t,it(t),e)}(t,function(t,e){return t&&V(e,X(e),t)}(o,t)):function(t,e){return V(t,b(t),e)}(t,function(t,e){return t&&V(e,d(e),t)}(o,t))}else{if(!dt[f])return n?t:{};o=function(t,e,r){var i,n,s=t.constructor;switch(e){case"[object ArrayBuffer]":return ot(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return function(t,e){var r=e?ot(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?ot(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return(n=new(i=t).constructor(i.source,at.exec(i))).lastIndex=i.lastIndex,n;case"[object Set]":return new s;case"[object Symbol]":return ct?Object(ct.call(t)):{}}}(t,f,a)}}s||(s=new g);var v=s.get(t);if(v)return v;s.set(t,o),vt(t)?t.forEach((function(i){o.add(bt(i,e,r,i,t,s))})):ft(t)&&t.forEach((function(i,n){o.set(n,bt(i,e,r,n,t,s))}));var p=h?void 0:(c?u?nt:w:u?X:d)(t);return function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r););}(p||t,(function(i,n){p&&(i=t[n=i]),K(o,n,bt(i,e,r,n,t,s))})),o}dt["[object Arguments]"]=dt["[object Array]"]=dt["[object ArrayBuffer]"]=dt["[object DataView]"]=dt["[object Boolean]"]=dt["[object Date]"]=dt["[object Float32Array]"]=dt["[object Float64Array]"]=dt["[object Int8Array]"]=dt["[object Int16Array]"]=dt["[object Int32Array]"]=dt["[object Map]"]=dt["[object Number]"]=dt["[object Object]"]=dt["[object RegExp]"]=dt["[object Set]"]=dt["[object String]"]=dt["[object Symbol]"]=dt["[object Uint8Array]"]=dt["[object Uint8ClampedArray]"]=dt["[object Uint16Array]"]=dt["[object Uint32Array]"]=!0,dt["[object Error]"]=dt["[object Function]"]=dt["[object WeakMap]"]=!1;var pt=function(){return k.Date.now()},mt=Math.max,jt=Math.min;function yt(t,e){return t.label===e}function gt(t,e){return Object.values(t.properties).find((t=>t&&t.relation&&yt(t.relation.getLimetype(),e)))}function wt(t,e){const r=gt(t,e);return!!r&&function(t){return function(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}(t)&&!function(t){return t&&["belongsto","hasone"].includes(t.type)}(t)}(r)}const Ot=class{constructor(r){var i;t(this,r),this.change=e(this,"change",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.items=[],this.highlightedItemIndex=0,this.customElements=[],this.registeredTriggers=[],this.isPickerOpen=!1,this.isSearching=!1,this.activeTrigger=void 0,this.groupCounts={},this.triggerMap={"@":{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![u,c,a,h,f].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const e={[u]:this.handleEscapeKey,[h]:this.handleEnterOrTabKey,[f]:this.handleEnterOrTabKey,[a]:this.handleArrowKeyPress,[c]:this.handleArrowKeyPress}[t.key];e&&e(t)},this.handleArrowKeyPress=t=>{var e;this.highlightedItemIndex=(this.highlightedItemIndex+(t.key===a?1:-1)+(e=this.items.length))%e},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleTriggerStart=t=>{t.stopPropagation(),this.isPickerOpen=!0,this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value,this.isSearching=!0,this.search()},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var e;let r;if(t instanceof CustomEvent)r=t.detail;else{if(!(t instanceof KeyboardEvent))return;r=this.items[this.highlightedItemIndex]}this.insertEditorNode(r),this.resetTriggerAndPicker(),null===(e=this.textEditor)||void 0===e||e.focus()},this.insertEditorNode=t=>{var e,r;if(void 0===this.activeTrigger)return void console.warn("No triggerMap found");const i=this.triggerMap[this.activeTrigger];try{null===(e=this.triggerFunction)||void 0===e||e.insert({node:{tagName:i.customElement.tagName,attributes:i.mapAttributes(t)},children:[null===(r=t.value)||void 0===r?void 0:r.descriptive]})}catch(t){console.error("Can't insert node to the text editor",t)}},this.portalId="crypto"in window&&"function"==typeof(null===(i=window.crypto)||void 0===i?void 0:i.randomUUID)?"a_"+crypto.randomUUID():String.fromCharCode(97+Math.floor(26*Math.random()))+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2),this.search=function(t,e,r){var i,n,s,o,a,u,c=0,h=!1,f=!1,l=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var r=i,s=n;return i=n=void 0,c=e,o=t.apply(s,r)}function d(t){return c=t,a=setTimeout(p,e),h?v(t):o}function b(t){var r=t-u;return void 0===u||r>=e||r<0||f&&t-c>=s}function p(){var t=pt();if(b(t))return m(t);a=setTimeout(p,function(t){var r=e-(t-u);return f?jt(r,s-(t-c)):r}(t))}function m(t){return a=void 0,l&&i?v(t):(i=n=void 0,o)}function j(){var t=pt(),r=b(t);if(i=arguments,n=this,u=t,r){if(void 0===a)return d(u);if(f)return clearTimeout(a),a=setTimeout(p,e),v(u)}return void 0===a&&(a=setTimeout(p,e)),o}return e=W(e)||0,A(r)&&(h=!!r.leading,s=(f="maxWait"in r)?mt(W(r.maxWait)||0,e):s,l="trailing"in r?!!r.trailing:l),j.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=u=n=a=void 0},j.flush=function(){return void 0===a?o:m(pt())},j}(this.search,300)}watchOpen(){this.setupHandlers()}watchQuery(){this.setPickerMessage()}componentWillLoad(){this.setCustomElementsAndTriggers(),this.loadGroupCounts()}disconnectedCallback(){this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}))}setCustomElementsAndTriggers(){this.customElements=Object.values(this.triggerMap).map((t=>t.customElement)),this.allowMentioning&&(this.registeredTriggers=Object.keys(this.triggerMap))}setPickerMessage(){this.pickerMessage=!0===this.isPickerOpen&&this.editorPickerQuery.length>0?"No results for your search...":"Start typing a name..."}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0})):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}))}render(){return[r("limel-text-editor",{ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.customElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return r("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},r("limebb-text-editor-picker",{items:(t=this.items,e=this.highlightedItemIndex,t.map(((t,r)=>{const i=bt(t,5);return Object.assign(Object.assign({},i),{selected:r===e})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,e}async search(){if(!this.limeObjectService)return void(this.isSearching=!1);if(!this.editorPickerQuery)return this.items=[],void(this.isSearching=!1);const t=this.editorPickerQuery;try{const{objects:e}=await this.limeObjectService.search(t,this.searchableLimetypes,10);if(t!==this.editorPickerQuery)return;if(this.isSearching=!1,!e.length)return void(this.items=[]);if(!this.activeTrigger)return;this.items=this.createSearchListItems(e)}catch(t){console.error("Failed search for user",t)}}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter($)}createSearchListItem(t){const e=this.viewFactoryRegistry.getFactory("search"),r=this.limeObjectService.getObject(t._limetype,t._id);if(!r)return null;const i=e(r,this.context),n=this.getGroupCountComponent(r);return Object.assign(Object.assign({},i),n?{primaryComponent:n}:{})}getGroupCountComponent(t){var e;const r=t.getLimetype(),i=null===(e=this.groupCounts[r.name])||void 0===e?void 0:e[t.id],n=gt(r,"user");if(void 0!==i&&n)return{name:"limebb-mention-group-counter",props:{count:i,pluralLimetypeName:n.relation.getLimetype().localname.plural,helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}async loadGroupCounts(){if(!this.allowMentioning)return;const t=this.searchableLimetypes.filter((t=>!yt(t,"user")&&wt(t,"user"))).map((t=>this.getGroupCounts(t)));(await Promise.all(t)).forEach((t=>{Object.assign(this.groupCounts,t)}))}async getGroupCounts(t){var e;const r=gt(t,"user"),i=t.name;try{const t=await this.query.execute({limetype:i,responseFormat:{object:{_id:null,[r.name]:{count:{aggregate:{op:n.Count}}}}}});return(null===(e=t.objects)||void 0===e?void 0:e.length)?{[i]:this.createGroupCount(t.objects,r.name)}:{[i]:{}}}catch(e){return console.error(`Error fetching group count for limetype: ${t.name}`,e),{[i]:{}}}}createGroupCount(t,e){const r={};return t.forEach((t=>{const{_id:i,[e]:n}=t;r[i]=n.count})),r}get limeObjectService(){return this.platform.get(s.LimeObjectRepository)}get query(){return this.platform.get(s.Query)}get viewFactoryRegistry(){return this.platform.get(s.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(s.Translate)}get host(){return i(this)}static get watchers(){return{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}}};!function(t,e,r,i){var n,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);s>3&&o&&Object.defineProperty(e,r,o)}([o({map:[function(t){return Object.values(t).filter((t=>yt(t,"user")||wt(t,"user")))}]})],Ot.prototype,"searchableLimetypes",void 0);export{Ot as limebb_text_editor}
|
|
1
|
+
import{r as t,c as e,h as r,g as i}from"./p-8e85017b.js";import{A as n,P as s}from"./p-4506e883.js";import{a as o}from"./p-6e366a1b.js";import{A as a,a as c,b as u,E as h,T as f}from"./p-0086e532.js";import{d as l,b as v,k as d,c as b,s as p,a as m,e as j,U as y,S as g,g as w}from"./p-ef494ab2.js";import{i as O,e as x}from"./p-28e4e638.js";import{d as A,r as k,S,a as T,i as C}from"./p-e7281662.js";import{d as M,i as E,o as N,g as _,h as I,n as F,a as P}from"./p-f340c7e6.js";import{i as $}from"./p-86b9d9e8.js";import"./p-b083c13a.js";var R=/\s/,G=/^\s+/;var L=/^[-+]0x[0-9a-f]+$/i,U=/^0b[01]+$/i,D=/^0o[0-7]+$/i,Q=parseInt;function W(t){if("number"==typeof t)return t;if(O(t))return NaN;if(A(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=A(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;var r;t=(r=t)?r.slice(0,function(t){for(var e=t.length;e--&&R.test(t.charAt(e)););return e}(r)+1).replace(G,""):r;var i=U.test(t);return i||D.test(t)?Q(t.slice(2),i?2:8):L.test(t)?NaN:+t}var q=Object.create,B=function(){function t(){}return function(e){if(!A(e))return{};if(q)return q(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function z(t,e,r){"__proto__"==e&&l?l(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var H=Object.prototype.hasOwnProperty;function K(t,e,r){var i=t[e];H.call(t,e)&&x(i,r)&&(void 0!==r||e in t)||z(t,e,r)}function V(t,e,r,i){var n=!r;r||(r={});for(var s=-1,o=e.length;++s<o;){var a=e[s],c=i?i(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),n?z(r,a,c):K(r,a,c)}return r}var J=Object.prototype.hasOwnProperty;function X(t){return E(t)?v(t,!0):function(t){if(!A(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=M(t),r=[];for(var i in t)("constructor"!=i||!e&&J.call(t,i))&&r.push(i);return r}(t)}var Y=N(Object.getPrototypeOf,Object),Z="object"==typeof exports&&exports&&!exports.nodeType&&exports,tt=Z&&"object"==typeof module&&module&&!module.nodeType&&module,et=tt&&tt.exports===Z?k.Buffer:void 0,rt=et?et.allocUnsafe:void 0,it=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)m(e,b(t)),t=Y(t);return e}:p;function nt(t){return j(t,X,it)}var st=Object.prototype.hasOwnProperty;function ot(t){var e=new t.constructor(t.byteLength);return new y(e).set(new y(t)),e}var at=/\w*$/,ct=S?S.prototype:void 0,ut=ct?ct.valueOf:void 0;var ht=F&&F.isMap,ft=ht?I(ht):function(t){return T(t)&&"[object Map]"==_(t)},lt=F&&F.isSet,vt=lt?I(lt):function(t){return T(t)&&"[object Set]"==_(t)},dt={};function bt(t,e,r,i,n,s){var o,a=1&e,c=2&e,u=4&e;if(r&&(o=n?r(t,i,n,s):r(t)),void 0!==o)return o;if(!A(t))return t;var h=C(t);if(h){if(o=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&st.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!a)return function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}(t,o)}else{var f=_(t),l="[object Function]"==f||"[object GeneratorFunction]"==f;if(P(t))return function(t,e){if(e)return t.slice();var r=t.length,i=rt?rt(r):new t.constructor(r);return t.copy(i),i}(t,a);if("[object Object]"==f||"[object Arguments]"==f||l&&!n){if(o=c||l?{}:function(t){return"function"!=typeof t.constructor||M(t)?{}:B(Y(t))}(t),!a)return c?function(t,e){return V(t,it(t),e)}(t,function(t,e){return t&&V(e,X(e),t)}(o,t)):function(t,e){return V(t,b(t),e)}(t,function(t,e){return t&&V(e,d(e),t)}(o,t))}else{if(!dt[f])return n?t:{};o=function(t,e,r){var i,n,s=t.constructor;switch(e){case"[object ArrayBuffer]":return ot(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return function(t,e){var r=e?ot(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?ot(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return(n=new(i=t).constructor(i.source,at.exec(i))).lastIndex=i.lastIndex,n;case"[object Set]":return new s;case"[object Symbol]":return ut?Object(ut.call(t)):{}}}(t,f,a)}}s||(s=new g);var v=s.get(t);if(v)return v;s.set(t,o),vt(t)?t.forEach((function(i){o.add(bt(i,e,r,i,t,s))})):ft(t)&&t.forEach((function(i,n){o.set(n,bt(i,e,r,n,t,s))}));var p=h?void 0:(u?c?nt:w:c?X:d)(t);return function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r););}(p||t,(function(i,n){p&&(i=t[n=i]),K(o,n,bt(i,e,r,n,t,s))})),o}dt["[object Arguments]"]=dt["[object Array]"]=dt["[object ArrayBuffer]"]=dt["[object DataView]"]=dt["[object Boolean]"]=dt["[object Date]"]=dt["[object Float32Array]"]=dt["[object Float64Array]"]=dt["[object Int8Array]"]=dt["[object Int16Array]"]=dt["[object Int32Array]"]=dt["[object Map]"]=dt["[object Number]"]=dt["[object Object]"]=dt["[object RegExp]"]=dt["[object Set]"]=dt["[object String]"]=dt["[object Symbol]"]=dt["[object Uint8Array]"]=dt["[object Uint8ClampedArray]"]=dt["[object Uint16Array]"]=dt["[object Uint32Array]"]=!0,dt["[object Error]"]=dt["[object Function]"]=dt["[object WeakMap]"]=!1;var pt=function(){return k.Date.now()},mt=Math.max,jt=Math.min;function yt(t,e){return t.label===e}function gt(t,e){return Object.values(t.properties).find((t=>t&&t.relation&&yt(t.relation.getLimetype(),e)))}function wt(t,e){const r=gt(t,e);return!!r&&function(t){return function(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}(t)&&!function(t){return t&&["belongsto","hasone"].includes(t.type)}(t)}(r)}const Ot=class{constructor(r){var i;t(this,r),this.change=e(this,"change",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.items=[],this.highlightedItemIndex=0,this.customElements=[],this.registeredTriggers=[],this.isPickerOpen=!1,this.isSearching=!1,this.activeTrigger=void 0,this.groupCounts={},this.triggerMap={"@":{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![c,u,a,h,f].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const e={[c]:this.handleEscapeKey,[h]:this.handleEnterOrTabKey,[f]:this.handleEnterOrTabKey,[a]:this.handleArrowKeyPress,[u]:this.handleArrowKeyPress}[t.key];e&&e(t)},this.handleArrowKeyPress=t=>{var e;this.highlightedItemIndex=(this.highlightedItemIndex+(t.key===a?1:-1)+(e=this.items.length))%e},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleTriggerStart=t=>{t.stopPropagation(),this.isPickerOpen=!0,this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value,this.isSearching=!0,this.search()},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var e;let r;if(t instanceof CustomEvent)r=t.detail;else{if(!(t instanceof KeyboardEvent))return;r=this.items[this.highlightedItemIndex]}this.insertEditorNode(r),this.resetTriggerAndPicker(),null===(e=this.textEditor)||void 0===e||e.focus()},this.insertEditorNode=t=>{var e,r;if(void 0===this.activeTrigger)return void console.warn("No triggerMap found");const i=this.triggerMap[this.activeTrigger];try{null===(e=this.triggerFunction)||void 0===e||e.insert({node:{tagName:i.customElement.tagName,attributes:i.mapAttributes(t)},children:[null===(r=t.value)||void 0===r?void 0:r.descriptive]})}catch(t){console.error("Can't insert node to the text editor",t)}},this.portalId="crypto"in window&&"function"==typeof(null===(i=window.crypto)||void 0===i?void 0:i.randomUUID)?"a_"+crypto.randomUUID():String.fromCharCode(97+Math.floor(26*Math.random()))+Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2),this.search=function(t,e,r){var i,n,s,o,a,c,u=0,h=!1,f=!1,l=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function v(e){var r=i,s=n;return i=n=void 0,u=e,o=t.apply(s,r)}function d(t){return u=t,a=setTimeout(p,e),h?v(t):o}function b(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-u>=s}function p(){var t=pt();if(b(t))return m(t);a=setTimeout(p,function(t){var r=e-(t-c);return f?jt(r,s-(t-u)):r}(t))}function m(t){return a=void 0,l&&i?v(t):(i=n=void 0,o)}function j(){var t=pt(),r=b(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return d(c);if(f)return clearTimeout(a),a=setTimeout(p,e),v(c)}return void 0===a&&(a=setTimeout(p,e)),o}return e=W(e)||0,A(r)&&(h=!!r.leading,s=(f="maxWait"in r)?mt(W(r.maxWait)||0,e):s,l="trailing"in r?!!r.trailing:l),j.cancel=function(){void 0!==a&&clearTimeout(a),u=0,i=c=n=a=void 0},j.flush=function(){return void 0===a?o:m(pt())},j}(this.search,300)}watchOpen(){this.setupHandlers()}watchQuery(){this.setPickerMessage()}componentWillLoad(){this.setCustomElementsAndTriggers(),this.loadGroupCounts()}disconnectedCallback(){this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}))}setCustomElementsAndTriggers(){this.customElements=Object.values(this.triggerMap).map((t=>t.customElement)),this.allowMentioning&&(this.registeredTriggers=Object.keys(this.triggerMap))}setPickerMessage(){this.pickerMessage=!0===this.isPickerOpen&&this.editorPickerQuery.length>0?"No results for your search...":"Start typing a name..."}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0})):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}))}render(){return[r("limel-text-editor",{ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.customElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return r("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},r("limebb-text-editor-picker",{items:(t=this.items,e=this.highlightedItemIndex,t.map(((t,r)=>{const i=bt(t,5);return Object.assign(Object.assign({},i),{selected:r===e})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,e}async search(){if(!this.limeObjectService)return void(this.isSearching=!1);if(!this.editorPickerQuery)return this.items=[],void(this.isSearching=!1);const t=this.editorPickerQuery;try{const{objects:e}=await this.limeObjectService.search(t,this.searchableLimetypes,10);if(t!==this.editorPickerQuery)return;if(this.isSearching=!1,!e.length)return void(this.items=[]);if(!this.activeTrigger)return;this.items=this.createSearchListItems(e)}catch(t){console.error("Failed search for user",t)}}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter($)}createSearchListItem(t){const e=this.viewFactoryRegistry.getFactory("search"),r=this.limeObjectService.getObject(t._limetype,t._id);if(!r)return null;const i=e(r,this.context),n=this.getGroupCountComponent(r);return Object.assign(Object.assign({},i),n?{primaryComponent:n}:{})}getGroupCountComponent(t){var e;const r=t.getLimetype(),i=null===(e=this.groupCounts[r.name])||void 0===e?void 0:e[t.id],n=gt(r,"user");if(void 0!==i&&n)return{name:"limebb-mention-group-counter",props:{count:i,limetype:n.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}async loadGroupCounts(){if(!this.allowMentioning)return;const t=this.searchableLimetypes.filter((t=>!yt(t,"user")&&wt(t,"user"))).map((t=>this.getGroupCounts(t)));(await Promise.all(t)).forEach((t=>{Object.assign(this.groupCounts,t)}))}async getGroupCounts(t){var e;const r=gt(t,"user"),i=t.name;try{const t=await this.query.execute({limetype:i,responseFormat:{object:{_id:null,[r.name]:{count:{aggregate:{op:n.Count}}}}}});return(null===(e=t.objects)||void 0===e?void 0:e.length)?{[i]:this.createGroupCount(t.objects,r.name)}:{[i]:{}}}catch(e){return console.error(`Error fetching group count for limetype: ${t.name}`,e),{[i]:{}}}}createGroupCount(t,e){const r={};return t.forEach((t=>{const{_id:i,[e]:n}=t;r[i]=n.count})),r}get limeObjectService(){return this.platform.get(s.LimeObjectRepository)}get query(){return this.platform.get(s.Query)}get viewFactoryRegistry(){return this.platform.get(s.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(s.Translate)}get host(){return i(this)}static get watchers(){return{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}}};!function(t,e,r,i){var n,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(o=(s<3?n(o):s>3?n(e,r,o):n(e,r))||o);s>3&&o&&Object.defineProperty(e,r,o)}([o({map:[function(t){return Object.values(t).filter((t=>yt(t,"user")||wt(t,"user")))}]})],Ot.prototype,"searchableLimetypes",void 0);export{Ot as limebb_text_editor}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as e,H as o}from"./p-8e85017b.js";import{P as r}from"./p-4506e883.js";const a=class{constructor(o){i(this,o),this.interact=t(this,"interact",7),this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return this.translator.get(this.item.heading);const i=this.getAuthorLink(),t=this.translator.get(this.item.heading,{author:i});return e("limel-markdown",{class:"heading",value:t})},this.createMenuItem=i=>{var t,e;return"separator"in i?i:{value:i,text:null!==(t=i.label)&&void 0!==t?t:"",secondaryText:i.description,disabled:i.disabled,icon:null!==(e=i.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=i=>{var t;i.stopPropagation();const e=null===(t=i.detail.value)||void 0===t?void 0:t.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var i,t,r;let a;return a=this.item.clickable?this.handleNotificationListItemClick:void 0,e(o,{id:this.item.id,class:{"is-clickable":!!(null===(i=this.item)||void 0===i?void 0:i.clickable),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(r=this.item)||void 0===r?void 0:r.selected)},onClick:a},e("div",{class:"notification-item"},this.renderSource(),this.renderContent()))}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var i,t,o,r;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(t=null===(i=this.item.icon)||void 0===i?void 0:i.name)&&void 0!==t?t:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(r=this.item.icon)||void 0===r?void 0:r.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:i,text:t}=this.item.author.name;return`[${t}](${i})`}renderAuthorPicture(){var i;if(null===(i=this.item.author)||void 0===i?void 0:i.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var i,t;if(!(null===(i=this.item.unpromotedActions)||void 0===i?void 0:i.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderTimestamp(){const i=this.item.timestamp;if(i)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(i,"timeofday"))}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var i;return null===(i=this.platform)||void 0===i?void 0:i.get(r.Translate)}get commandbus(){var i;return null===(i=this.platform)||void 0===i?void 0:i.get(r.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-selected) .notification-item{box-shadow:var(--shadow-focused-state)}:host(limebb-notification-item.is-selected) .notification-item:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as n}from"./p-4506e883.js";import{c as t}from"./p-b083c13a.js";function r(r={}){return t(r,{name:n.LimeTypeRepository})}function o(r={}){const o={name:n.LimeTypeRepository};return r.map=[e,...r.map||[]],r.context=null,t(r,o)}function e(n){const{limetype:t}=this.context;return n[t]}export{o as S,r as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-8e85017b.js";import{P as i}from"./p-4506e883.js";import{S as r}from"./p-
|
|
1
|
+
import{r as t,h as e}from"./p-8e85017b.js";import{P as i}from"./p-4506e883.js";import{S as r}from"./p-6e366a1b.js";import{c as o}from"./p-b083c13a.js";import{n as s}from"./p-64122988.js";function n(t){const{limetype:e,id:i}=this.context;if(t[e])return t[e].find((t=>t.id===i))}const l=["edit","view"],c=["ai","aspx","doc","docm","docx","dotm","dotx","emf","html","htm","obj","potm","potx","ppsm","ppsx","ppt","pptm","pptx","psd","rtf","tif","tiff","txt","wmf","xls","xlsx","zip"];var f=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const h=class{constructor(e){t(this,e),this.fileTypes=["view","contents","download"]}render(){const t=this.getFile();return t?this.isLiveDocsFile(t)?this.renderLiveDocs(t):this.renderFileViewer(t):this.renderNotFound()}renderLiveDocs(t){const i=this.getLiveDocsUrl(t);return i?e("iframe",{src:i,frameBorder:0,marginHeight:0,marginWidth:0}):this.renderNotFound()}renderFileViewer(t){const i=t.filename,r=this.getFileUrl(t);return r?e("limel-file-viewer",{filename:i,url:r,allowDownload:!0,allowFullscreen:!0}):this.renderNotFound()}renderNotFound(){return[e("section",{class:"not-found"},e("limel-icon",{name:"error",size:"large"}),e("h2",null,this.translator.get("not-found")),e("p",null,this.translator.get("no-files-attached",{object:this.getDescriptive(this.limeobject)})))]}getLiveDocsUrl(t){return this.fileTypes.filter(this.isLiveDocsType).map((e=>t.getUrl(e))).find((t=>t))}getFileUrl(t){return this.fileTypes.filter(s(this.isLiveDocsType)).map((e=>t.getUrl(e))).find((t=>t))}getFile(){const t=this.fileProperty;if(t)return this.limeobject.getFile(t.name)}isLiveDocsFile(t){return c.includes(t.extension)&&l.some((e=>t.getUrl(e)))}isLiveDocsType(t){return l.includes(t)}getDescriptive(t){var e;let i="";return(null==t?void 0:t.descriptive)&&(i=t.descriptive),i||(i=null===(e=this.limetype)||void 0===e?void 0:e.localname.singular),i||(i=this.translator.get("object")),i}get fileProperty(){if(this.limeobject){if(this.property){const t=this.limeobject.getLimetype().getProperty(this.property);if("file"===t.type)return t}return Object.values(this.limeobject.getLimetype().properties).find((t=>"file"===t.type))}}get translator(){return this.platform.get(i.Translate)}};f([function(t={}){const e={name:i.LimeObjectRepository};return t.map=[n,...t.map||[]],t.context=null,o(t,e)}()],h.prototype,"limeobject",void 0),f([r()],h.prototype,"limetype",void 0),h.style=".not-found{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;line-height:1rem;color:rgb(var(--contrast-1100))}.not-found limel-icon{color:rgb(var(--color-red-default))}iframe{height:100%;width:100%}";export{h as limebb_limeobject_file_viewer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./p-8e85017b.js";function n(t){return"function"==typeof t}function s(t){const n=t((t=>{Error.call(t),t.stack=(new Error).stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}const r=s((t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map(((t,n)=>`${n+1}) ${t.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n}));function i(t,n){if(t){const s=t.indexOf(n);0<=s&&t.splice(s,1)}}class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:s}=this;if(s)if(this._parentage=null,Array.isArray(s))for(const t of s)t.remove(this);else s.remove(this);const{initialTeardown:i}=this;if(n(i))try{i()}catch(n){t=n instanceof r?n.errors:[n]}const{_finalizers:e}=this;if(e){this._finalizers=null;for(const n of e)try{u(n)}catch(n){t=null!=t?t:[],n instanceof r?t=[...t,...n.errors]:t.push(n)}}if(t)throw new r(t)}}add(t){var n;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}}_hasParent(t){const{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){const{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&i(n,t)}remove(t){const{_finalizers:n}=this;n&&i(n,t),t instanceof e&&t._removeParent(this)}}e.EMPTY=(()=>{const t=new e;return t.closed=!0,t})();const o=e.EMPTY;function c(t){return t instanceof e||t&&"closed"in t&&n(t.remove)&&n(t.add)&&n(t.unsubscribe)}function u(t){n(t)?t():t.unsubscribe()}const h={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},l={setTimeout(t,n,...s){const{delegate:r}=l;return(null==r?void 0:r.setTimeout)?r.setTimeout(t,n,...s):setTimeout(t,n,...s)},clearTimeout(t){const{delegate:n}=l;return((null==n?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function a(){}const f=d("C",void 0,void 0);function d(t,n,s){return{kind:t,value:n,error:s}}function v(t){t()}class b extends e{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,c(t)&&t.add(this)):this.destination=g}static create(t,n,s){return new y(t,n,s)}next(t){this.isStopped?_(function(t){return d("N",t,void 0)}(t),this):this._next(t)}error(t){this.isStopped?_(d("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?_(f,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const p=Function.prototype.bind;function w(t,n){return p.call(t,n)}class m{constructor(t){this.partialObserver=t}next(t){const{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(t){x(t)}}error(t){const{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(t){x(t)}else x(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(t){x(t)}}}class y extends b{constructor(t,s,r){let i;if(super(),n(t)||!t)i={next:null!=t?t:void 0,error:null!=s?s:void 0,complete:null!=r?r:void 0};else{let n;this&&h.useDeprecatedNextContext?(n=Object.create(t),n.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&w(t.next,n),error:t.error&&w(t.error,n),complete:t.complete&&w(t.complete,n)}):i=t}this.destination=new m(i)}}function x(t){var n;n=t,l.setTimeout((()=>{const{onUnhandledError:t}=h;if(!t)throw n;t(n)}))}function _(t,n){const{onStoppedNotification:s}=h;s&&l.setTimeout((()=>s(t,n)))}const g={closed:!0,next:a,error:function(t){throw t},complete:a},E="function"==typeof Symbol&&Symbol.observable||"@@observable";function O(t){return t}class S{constructor(t){t&&(this._subscribe=t)}lift(t){const n=new S;return n.source=this,n.operator=t,n}subscribe(t,s,r){const i=(e=t)&&e instanceof b||function(t){return t&&n(t.next)&&n(t.error)&&n(t.complete)}(e)&&c(e)?t:new y(t,s,r);var e;return v((()=>{const{operator:t,source:n}=this;i.add(t?t.call(i,n):n?this._subscribe(i):this._trySubscribe(i))})),i}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return new(n=j(n))(((n,s)=>{const r=new y({next:n=>{try{t(n)}catch(t){s(t),r.unsubscribe()}},error:s,complete:n});this.subscribe(r)}))}_subscribe(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)}[E](){return this}pipe(...t){return(0===(n=t).length?O:1===n.length?n[0]:function(t){return n.reduce(((t,n)=>n(t)),t)})(this);var n}toPromise(t){return new(t=j(t))(((t,n)=>{let s;this.subscribe((t=>s=t),(t=>n(t)),(()=>t(s)))}))}}function j(t){var n;return null!==(n=null!=t?t:h.Promise)&&void 0!==n?n:Promise}S.create=t=>new S(t);const P=s((t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class k extends S{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const n=new A(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new P}next(t){v((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(t)}}))}error(t){v((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:n}=this;for(;n.length;)n.shift().error(t)}}))}complete(){v((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:n,isStopped:s,observers:r}=this;return n||s?o:(this.currentObservers=null,r.push(t),new e((()=>{this.currentObservers=null,i(r,t)})))}_checkFinalizedStatuses(t){const{hasError:n,thrownError:s,isStopped:r}=this;n?t.error(s):r&&t.complete()}asObservable(){const t=new S;return t.source=this,t}}k.create=(t,n)=>new A(t,n);class A extends k{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,s;null===(s=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===s||s.call(n,t)}error(t){var n,s;null===(s=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===s||s.call(n,t)}complete(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)}_subscribe(t){var n,s;return null!==(s=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==s?s:o}}class T extends k{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){const{hasError:t,thrownError:n,_value:s}=this;if(t)throw n;return this._throwIfClosed(),s}next(t){super.next(this._value=t)}}function $(t){return t}function N(t,n){return(s,r)=>{const i=function(t,n,s,r){let i=U.get(t);return i||(i=[],U.set(t,i)),i.push({options:s,name:n,optionFactory:r.optionFactory||$,service:{name:r.name,method:r.method||"subscribe"}}),i}(s,r,t,n);1===i.length&&function(t,n){t.connectedCallback=F(t.connectedCallback,n),t.componentWillLoad=function(t,n){return async function(...s){return!0===C.get(this)?(await W(this),t?t.apply(this,s):void 0):F(t,n).apply(this,s)}}(t.componentWillLoad,n),t.componentDidUnload=M(t.componentDidUnload),t.disconnectedCallback=M(t.disconnectedCallback)}(s,i)}}const U=new WeakMap,z=new WeakMap,C=new WeakMap;function F(n,s){return async function(...r){C.set(this,!0),z.set(this,[]),await W(this);const i=new T(this.context);if(function(n,s,r){const i=t(n),{get:e,set:o}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),s);Object.defineProperty(i,s,{configurable:!0,get:e,set:function(t){o.call(this,t),r.next(t)}})}(this,"context",i),s.forEach((t=>{t.options=t.optionFactory(t.options,this),"context"in t.options&&(t.options.context=i),function(t,n){const s=function(t,n){const s=Object.assign({},n.options);var r,i;i=t,(r=s).filter&&(r.filter=r.filter.map((t=>t.bind(i)))),r.map&&(r.map=r.map.map((t=>t.bind(i))));const e=n.service.name,o=t.platform;if(!o.has(e))throw new Error(`Service ${e} does not exist`);return o.get(e)[n.service.method](function(t,n){return s=>{t[n]=s}}(t,n.name),s)}(t,n);z.get(t).push(s)}(this,t)})),n)return n.apply(this,r)}}function M(t){return async function(...n){let s;return t&&(s=t.apply(this,n)),z.get(this).forEach((t=>t())),z.set(this,[]),s}}function W(t){const n=[];return t.platform||n.push(D(t,"platform")),t.context||n.push(D(t,"context")),n.length?Promise.all(n):Promise.resolve()}function D(n,s){const r=t(n);return new Promise((t=>{Object.defineProperty(r,s,{configurable:!0,set:n=>{delete r[s],r[s]=n,t()}})}))}export{N as c}
|
|
1
|
+
import{g as t}from"./p-8e85017b.js";function n(t){return"function"==typeof t}function s(t){const n=t((t=>{Error.call(t),t.stack=(new Error).stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}const r=s((t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map(((t,n)=>`${n+1}) ${t.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n}));function i(t,n){if(t){const s=t.indexOf(n);0<=s&&t.splice(s,1)}}class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:s}=this;if(s)if(this._parentage=null,Array.isArray(s))for(const t of s)t.remove(this);else s.remove(this);const{initialTeardown:i}=this;if(n(i))try{i()}catch(n){t=n instanceof r?n.errors:[n]}const{_finalizers:e}=this;if(e){this._finalizers=null;for(const n of e)try{u(n)}catch(n){t=null!=t?t:[],n instanceof r?t=[...t,...n.errors]:t.push(n)}}if(t)throw new r(t)}}add(t){var n;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}}_hasParent(t){const{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){const{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&i(n,t)}remove(t){const{_finalizers:n}=this;n&&i(n,t),t instanceof e&&t._removeParent(this)}}e.EMPTY=(()=>{const t=new e;return t.closed=!0,t})();const o=e.EMPTY;function c(t){return t instanceof e||t&&"closed"in t&&n(t.remove)&&n(t.add)&&n(t.unsubscribe)}function u(t){n(t)?t():t.unsubscribe()}const h={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},l={setTimeout(t,n,...s){const{delegate:r}=l;return(null==r?void 0:r.setTimeout)?r.setTimeout(t,n,...s):setTimeout(t,n,...s)},clearTimeout(t){const{delegate:n}=l;return((null==n?void 0:n.clearTimeout)||clearTimeout)(t)},delegate:void 0};function a(){}const f=d("C",void 0,void 0);function d(t,n,s){return{kind:t,value:n,error:s}}function v(t){t()}class b extends e{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,c(t)&&t.add(this)):this.destination=g}static create(t,n,s){return new y(t,n,s)}next(t){this.isStopped?_(function(t){return d("N",t,void 0)}(t),this):this._next(t)}error(t){this.isStopped?_(d("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?_(f,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const p=Function.prototype.bind;function w(t,n){return p.call(t,n)}class m{constructor(t){this.partialObserver=t}next(t){const{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(t){x(t)}}error(t){const{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(t){x(t)}else x(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(t){x(t)}}}class y extends b{constructor(t,s,r){let i;if(super(),n(t)||!t)i={next:null!=t?t:void 0,error:null!=s?s:void 0,complete:null!=r?r:void 0};else{let n;this&&h.useDeprecatedNextContext?(n=Object.create(t),n.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&w(t.next,n),error:t.error&&w(t.error,n),complete:t.complete&&w(t.complete,n)}):i=t}this.destination=new m(i)}}function x(t){var n;n=t,l.setTimeout((()=>{const{onUnhandledError:t}=h;if(!t)throw n;t(n)}))}function _(t,n){const{onStoppedNotification:s}=h;s&&l.setTimeout((()=>s(t,n)))}const g={closed:!0,next:a,error:function(t){throw t},complete:a},E="function"==typeof Symbol&&Symbol.observable||"@@observable";function O(t){return t}class S{constructor(t){t&&(this._subscribe=t)}lift(t){const n=new S;return n.source=this,n.operator=t,n}subscribe(t,s,r){const i=(e=t)&&e instanceof b||function(t){return t&&n(t.next)&&n(t.error)&&n(t.complete)}(e)&&c(e)?t:new y(t,s,r);var e;return v((()=>{const{operator:t,source:n}=this;i.add(t?t.call(i,n):n?this._subscribe(i):this._trySubscribe(i))})),i}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return new(n=j(n))(((n,s)=>{const r=new y({next:n=>{try{t(n)}catch(t){s(t),r.unsubscribe()}},error:s,complete:n});this.subscribe(r)}))}_subscribe(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)}[E](){return this}pipe(...t){return(0===(n=t).length?O:1===n.length?n[0]:function(t){return n.reduce(((t,n)=>n(t)),t)})(this);var n}toPromise(t){return new(t=j(t))(((t,n)=>{let s;this.subscribe((t=>s=t),(t=>n(t)),(()=>t(s)))}))}}function j(t){var n;return null!==(n=null!=t?t:h.Promise)&&void 0!==n?n:Promise}S.create=t=>new S(t);const P=s((t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class k extends S{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const n=new A(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new P}next(t){v((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(t)}}))}error(t){v((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:n}=this;for(;n.length;)n.shift().error(t)}}))}complete(){v((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:n,isStopped:s,observers:r}=this;return n||s?o:(this.currentObservers=null,r.push(t),new e((()=>{this.currentObservers=null,i(r,t)})))}_checkFinalizedStatuses(t){const{hasError:n,thrownError:s,isStopped:r}=this;n?t.error(s):r&&t.complete()}asObservable(){const t=new S;return t.source=this,t}}k.create=(t,n)=>new A(t,n);class A extends k{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,s;null===(s=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===s||s.call(n,t)}error(t){var n,s;null===(s=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===s||s.call(n,t)}complete(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)}_subscribe(t){var n,s;return null!==(s=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==s?s:o}}class T extends k{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){const{hasError:t,thrownError:n,_value:s}=this;if(t)throw n;return this._throwIfClosed(),s}next(t){super.next(this._value=t)}}function $(t){return t}function N(t,n){return(s,r)=>{const i=function(t,n,s,r){let i=U.get(t);return i||(i=[],U.set(t,i)),i.push({options:s,name:n,optionFactory:r.optionFactory||$,service:{name:r.name,method:r.method||"subscribe"}}),i}(s,r,t,n);1===i.length&&function(t,n){t.connectedCallback=F(t.connectedCallback,n),t.componentWillLoad=function(t,n){return async function(...s){return!0===C.get(this)?(await W(this),t?t.apply(this,s):void 0):F(t,n).apply(this,s)}}(t.componentWillLoad,n),t.componentDidUnload=M(t.componentDidUnload),t.disconnectedCallback=M(t.disconnectedCallback)}(s,i)}}const U=new WeakMap,z=new WeakMap,C=new WeakMap;function F(n,s){return async function(...r){C.set(this,!0),z.set(this,[]),await W(this);const i=new T(this.context);if(function(n,s,r){const i=t(n),{get:e,set:o}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(i),s);Object.defineProperty(i,s,{configurable:!0,get:e,set:function(t){o.call(this,t),r.next(t)}})}(this,"context",i),s.forEach((t=>{t.options=t.optionFactory(t.options,this),"context"in t.options&&(t.options.context=i),function(t,n){const s=function(t,n){const s=Object.assign({},n.options);var r,i;i=t,(r=s).filter&&(r.filter=r.filter.map((t=>t.bind(i)))),r.map&&(r.map=r.map.map((t=>t.bind(i))));const e=n.service.name,o=t.platform;if(!o.has(e))throw new Error(`Service ${e} does not exist`);return o.get(e)[n.service.method](function(t,n){return s=>{t[n]=s}}(t,n.name),s)}(t,n);"function"==typeof s&&z.get(t).push(s)}(this,t)})),n)return n.apply(this,r)}}function M(t){return async function(...n){let s;return t&&(s=t.apply(this,n)),z.get(this).forEach((t=>t())),z.set(this,[]),s}}function W(t){const n=[];return t.platform||n.push(D(t,"platform")),t.context||n.push(D(t,"context")),n.length?Promise.all(n):Promise.resolve()}function D(n,s){const r=t(n);return new Promise((t=>{Object.defineProperty(r,s,{configurable:!0,set:n=>{delete r[s],r[s]=n,t()}})}))}export{N as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-8e85017b.js";import{P as r,A as i}from"./p-4506e883.js";import{c as s}from"./p-
|
|
1
|
+
import{r as t,h as e}from"./p-8e85017b.js";import{P as r,A as i}from"./p-4506e883.js";import{c as s}from"./p-b083c13a.js";import{i as n,a as o,b as a,c as l,g as u,d as h,e as c}from"./p-f340c7e6.js";import{i as f}from"./p-e7281662.js";var d=Object.prototype.hasOwnProperty;class v{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let r;return r=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),r}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const r=this.objectRepository.getObject(e.limetype,e.id);return null==r?void 0:r.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class p{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class b{constructor(t){this.locale=t}format(t,e){const r=new Date(t);return{prefix:this.formatAffix("prefix",r,e),value:this.formatValue(r,e),suffix:this.formatAffix("suffix",r,e)}}formatValue(t,e){var r,i;const s=Object.assign({},e.options);return null===(r=e.prefix)||void 0===r||r.forEach((t=>{delete s[t]})),null===(i=e.suffix)||void 0===i||i.forEach((t=>{delete s[t]})),new Intl.DateTimeFormat(this.locale,s).format(t)}formatAffix(t,e,r){const i=Object.assign({},r.options);if(Object.keys(i).forEach((e=>{"hour12"!==e&&((r[t]||[]).includes(e)||delete i[e])})),0!==Object.values(i).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,i).format(e)}}class g{constructor(t){this.locale=t}format(t,e){const r=new Intl.NumberFormat(this.locale,e.options),i=r.formatToParts(t);let s="",n="",o="";return i.forEach((t=>{var r,i;(null===(r=e.prefix)||void 0===r?void 0:r.includes(t.type))?s+=t.value:(null===(i=e.suffix)||void 0===i?void 0:i.includes(t.type))?o+=t.value:n+=t.value})),n||(n=r.format(t),s="",o=""),{prefix:s,value:n,suffix:o}}}class m{constructor(t){this.locale=t}format(t,e){const r=new Intl.RelativeTimeFormat(this.locale,e.options),{value:i,unit:s}=this.getRelativeTime(t),n=r.formatToParts(i,s);let o="",a="",l="";return n.forEach((t=>{"literal"!==t.type||a?"literal"===t.type&&a?l+=t.value:a+=t.value:o+=t.value})),a||(a=o||l,o="",l=""),{prefix:o,value:a,suffix:l}}getRelativeTime(t){const e=new Date(t),r=new Date,i=e.getTime()-r.getTime(),s=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of s){const e=i/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class w{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new g(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new b(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new m(this.locale):new p(this.locale)}}var y=function(t,e,r,i){var s,n=arguments.length,o=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(e,r,o):s(e,r))||o);return n>3&&o&&Object.defineProperty(e,r,o),o};const j=class{constructor(e){t(this,e),this.aggregateOperator=i.Count,this.loading=!1,this.error=!1}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,r;const i=this.getFilter(),s=this.getFormattedValue(),n={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==s?void 0:s.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(r=null==s?void 0:s.suffix)||void 0===r?void 0:r.trim())||this.suffix},o=Object.assign(Object.assign({},n),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(i)}),a=Object.assign(Object.assign({},n),{label:this.getLabel(i),link:this.getLink(i),loading:this.loading,value:null==s?void 0:s.value.trim()});return e("limel-info-tile",Object.assign({class:{error:!i||this.error}},!i||this.error?o:a))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new p(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(n(t)&&(f(t)||"string"==typeof t||"function"==typeof t.splice||o(t)||a(t)||l(t)))return!t.length;var e=u(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(h(t))return!c(t).length;for(var r in t)if(d.call(t,r))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){return t?{href:["explorer",t.limetype,t.id].join("/")}:{href:"#"}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new w(this.language).createFormatter(this.format,t)}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new v(this.platform,this.filters)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};var O;y([(O={},s(O,{name:r.ConfigRepository}))],j.prototype,"config",void 0),y([function(t={}){return s(t,{name:r.FilterRepository})}()],j.prototype,"filters",void 0),j.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{j as limebb_info_tile}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-crm-building-blocks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "A home for shared components meant for use with Lime CRM",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"lint:fix": "npm run lint:src:fix && npm run lint:scss:fix",
|
|
23
23
|
"lint:prod": "npm run lint:src:prod && npm run lint:scss:prod",
|
|
24
24
|
"lint:src": "eslint \"**/*.{ts,tsx,js,mjs}\" --max-warnings=0 && prettier -l \"{!(package*).json,.prettierrc}\"",
|
|
25
|
-
"lint:src:fix": "eslint \"**/*.{ts,tsx,js,mjs}\" --fix --max-warnings=0 && prettier --write \"{!(package*).json,.prettierrc}\"",
|
|
25
|
+
"lint:src:fix": "eslint \"**/*.{ts,tsx,js,mjs}\" --fix --max-warnings=0 --quiet && prettier --write \"{!(package*).json,.prettierrc}\"",
|
|
26
26
|
"lint:src:prod": "eslint \"**/*.{ts,tsx,js,mjs}\" --rule \"linebreak-style: [error, unix]\" --max-warnings=0 && prettier -c --end-of-line lf \"{!(package*).json,.prettierrc}\"",
|
|
27
27
|
"lint:scss": "prettier -c --ignore-path ./.gitignore **/*.scss",
|
|
28
28
|
"lint:scss:fix": "prettier --write --ignore-path ./.gitignore **/*.scss",
|
|
@@ -43,35 +43,35 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/eslintrc": "^3.2.0",
|
|
45
45
|
"@eslint/js": "^9.17.0",
|
|
46
|
-
"@limetech/lime-elements": "^37.
|
|
47
|
-
"@limetech/lime-web-components": "^5.41.
|
|
46
|
+
"@limetech/lime-elements": "^37.79.0",
|
|
47
|
+
"@limetech/lime-web-components": "^5.41.1",
|
|
48
48
|
"@lundalogik/lime-icons8": "^2.30.1",
|
|
49
|
-
"@lundalogik/limeclient.js": "^1.
|
|
49
|
+
"@lundalogik/limeclient.js": "^1.76.0",
|
|
50
50
|
"@stencil/core": "<2.19.0",
|
|
51
51
|
"@stencil/sass": "^3.0.12",
|
|
52
52
|
"@types/jest": "^27.0.3",
|
|
53
53
|
"@types/json-schema": "^7.0.15",
|
|
54
54
|
"@types/lodash-es": "^4.17.12",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
56
|
-
"@typescript-eslint/parser": "^8.
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "^8.19.1",
|
|
56
|
+
"@typescript-eslint/parser": "^8.19.1",
|
|
57
57
|
"cross-env": "^7.0.3",
|
|
58
58
|
"currency-codes": "^2.2.0",
|
|
59
59
|
"date-fns": "^3.6.0",
|
|
60
|
-
"eslint": "^9.
|
|
60
|
+
"eslint": "^9.17.0",
|
|
61
61
|
"eslint-config-prettier": "^9.1.0",
|
|
62
|
-
"eslint-plugin-ban": "^
|
|
63
|
-
"eslint-plugin-jsdoc": "^50.
|
|
62
|
+
"eslint-plugin-ban": "^2.0.0",
|
|
63
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
64
64
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
65
65
|
"eslint-plugin-prettier": "^5.2.1",
|
|
66
|
-
"eslint-plugin-react": "^7.
|
|
67
|
-
"eslint-plugin-sonarjs": "^
|
|
66
|
+
"eslint-plugin-react": "^7.37.3",
|
|
67
|
+
"eslint-plugin-sonarjs": "^3.0.1",
|
|
68
68
|
"fs": "^0.0.1-security",
|
|
69
69
|
"globals": "^15.14.0",
|
|
70
70
|
"jest": "^27.4.5",
|
|
71
71
|
"jest-cli": "^27.4.5",
|
|
72
72
|
"kompendium": "^0.15.0",
|
|
73
73
|
"lodash-es": "^4.17.21",
|
|
74
|
-
"prettier": "^3.
|
|
74
|
+
"prettier": "^3.4.2",
|
|
75
75
|
"puppeteer": "^19.4.1",
|
|
76
76
|
"replace-in-file": "^7.2.0",
|
|
77
77
|
"shelljs": "^0.8.5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as o}from"./p-8e85017b.js";import{P as r}from"./p-4506e883.js";const a=class{constructor(o){i(this,o),this.interact=t(this,"interact",7),this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return this.translator.get(this.item.heading);const i=this.getAuthorLink(),t=this.translator.get(this.item.heading,{author:i});return e("limel-markdown",{class:"heading",value:t})},this.createMenuItem=i=>{var t,e;return"separator"in i?i:{value:i,text:null!==(t=i.label)&&void 0!==t?t:"",secondaryText:i.description,disabled:i.disabled,icon:null!==(e=i.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=i=>{var t;i.stopPropagation();const e=null===(t=i.detail.value)||void 0===t?void 0:t.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var i,t;let r;return r=this.item.clickable?this.handleNotificationListItemClick:void 0,e(o,{id:this.item.id,class:{"is-clickable":!!(null===(i=this.item)||void 0===i?void 0:i.clickable),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read)},onClick:r},e("div",{class:"notification-item"},this.renderSource(),this.renderContent()))}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var i,t,o,r;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(t=null===(i=this.item.icon)||void 0===i?void 0:i.name)&&void 0!==t?t:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(r=this.item.icon)||void 0===r?void 0:r.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:i,text:t}=this.item.author.name;return`[${t}](${i})`}renderAuthorPicture(){var i;if(null===(i=this.item.author)||void 0===i?void 0:i.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var i,t;if(!(null===(i=this.item.unpromotedActions)||void 0===i?void 0:i.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderTimestamp(){const i=this.item.timestamp;if(i)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(i,"timeofday"))}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var i;return null===(i=this.platform)||void 0===i?void 0:i.get(r.Translate)}get commandbus(){var i;return null===(i=this.platform)||void 0===i?void 0:i.get(r.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}.notification-item:before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:focus,:host(limebb-notification-item.is-clickable) .notification-item:focus-visible{will-change:color, background-color, box-shadow, transform}:host(limebb-notification-item.is-clickable) .notification-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}:host(limebb-notification-item.is-clickable) .notification-item:hover,:host(limebb-notification-item.is-clickable) .notification-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}:host(limebb-notification-item.is-read) .notification-item{border-color:rgb(var(--contrast-600));background-color:rgb(var(--contrast-500))}:host(limebb-notification-item.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-100))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as n}from"./p-4506e883.js";import{c as t}from"./p-8b377b1f.js";function r(r={}){return t(r,{name:n.LimeTypeRepository})}function o(r={}){const o={name:n.LimeTypeRepository};return r.map=[e,...r.map||[]],r.context=null,t(r,o)}function e(n){const{limetype:t}=this.context;return n[t]}export{o as S,r as a}
|