@limetech/lime-crm-building-blocks 1.86.2 → 1.87.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 +7 -0
- package/dist/cjs/{highlight-item.handler-99d5a0b6.js → highlight-item.handler-584ab58a.js} +2 -2
- package/dist/cjs/{index-3da101cc.js → index-ff255a0d.js} +3 -28
- package/dist/cjs/{index.esm-d6513e37.js → index.esm-9effb196.js} +1 -1
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
- package/dist/cjs/limebb-chat-item_2.cjs.entry.js +8 -3
- package/dist/cjs/limebb-chat-list.cjs.entry.js +34 -16
- package/dist/cjs/limebb-component-config.cjs.entry.js +5 -3
- package/dist/cjs/limebb-component-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +3 -3
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +5 -5
- package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
- package/dist/cjs/limebb-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +4 -5
- package/dist/cjs/limebb-feed.cjs.entry.js +4 -4
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +10 -6
- package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +2 -2
- package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +2 -1
- package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +2 -2
- package/dist/cjs/limebb-info-tile.cjs.entry.js +21 -22
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +3 -3
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +3 -3
- package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +4 -4
- package/dist/cjs/limebb-loader.cjs.entry.js +3 -3
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +14 -6
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention.cjs.entry.js +5 -6
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +5 -5
- package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-list.cjs.entry.js +31 -14
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +7 -8
- package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-text-editor.cjs.entry.js +42 -39
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{non-null-b8d9b4b4.js → non-null-3bf14aa1.js} +5 -0
- package/dist/cjs/{percentage-class-9decca4f.js → percentage-class-e4f0a52d.js} +2 -2
- package/dist/collection/components/chat-list/chat-item/chat-item.css +4 -0
- package/dist/collection/components/chat-list/chat-item/chat-item.js +5 -0
- package/dist/collection/components/chat-list/chat-list.js +11 -7
- package/dist/collection/components/chat-list/{processChatItems.js → process-chat-items.js} +22 -8
- package/dist/collection/components/component-command-picker/component-config/component-config.js +3 -1
- package/dist/collection/components/date-picker/to-server-date.js +3 -3
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +4 -4
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -2
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/feed/highlight-item/highlight-item.handler.js +2 -2
- package/dist/collection/components/icon-picker/search.js +9 -0
- package/dist/collection/components/info-tile/format/config/info-tile-date-format.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -0
- package/dist/collection/components/info-tile/format/config/info-tile-unit-format.js +1 -1
- package/dist/collection/components/info-tile/format/date-time.js +12 -11
- package/dist/collection/components/info-tile/format/number.js +3 -3
- package/dist/collection/components/info-tile/format/relative-date-time.js +2 -4
- package/dist/collection/components/info-tile/info-tile.js +2 -2
- package/dist/collection/components/kanban/kanban-group/kanban-group.css +4 -4
- package/dist/collection/components/kanban/kanban-item/kanban-item.css +4 -4
- package/dist/collection/components/limeobject/file-viewer/file-viewer.js +2 -2
- package/dist/collection/components/locale-picker/language.js +10 -1
- package/dist/collection/components/locale-picker/locale-picker.js +2 -3
- package/dist/collection/components/mention/mention.js +0 -1
- package/dist/collection/components/navigation-button/navigation-button.css +4 -3
- package/dist/collection/components/notification-list/notification-list.css +2 -2
- package/dist/collection/components/notification-list/notification-list.js +7 -4
- package/dist/collection/components/notification-list/{processNotificationItems.js → process-notification-items.js} +22 -8
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +5 -6
- package/dist/collection/components/summary-popover/summary-popover.js +3 -3
- package/dist/collection/components/text-editor/mentions.js +6 -8
- package/dist/collection/components/text-editor/text-editor.js +2 -4
- package/dist/collection/components/text-editor/uploader/building-blocks-upload-handler.js +8 -9
- package/dist/collection/components/text-editor/uploader/building-blocks-uploader.js +1 -1
- package/dist/collection/components/text-editor/utils/searcher-utils.js +5 -0
- package/dist/collection/components/trend-indicator/trend-indicator.js +6 -6
- package/dist/collection/util/dom.js +3 -3
- package/dist/collection/util/limetype.js +11 -11
- package/dist/collection/util/non-null.js +5 -0
- package/dist/collection/util/percentage-class.js +2 -2
- package/dist/collection/util/random-string.js +6 -3
- package/dist/components/chat-item.js +6 -1
- package/dist/components/date-picker.js +3 -3
- package/dist/components/feed-timeline-item.js +2 -3
- package/dist/components/highlight-item.handler.js +2 -2
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/limebb-chat-list.js +32 -14
- package/dist/components/limebb-component-config.js +3 -1
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +9 -5
- package/dist/components/limebb-info-tile-date-format.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -0
- package/dist/components/limebb-info-tile-unit-format.js +1 -1
- package/dist/components/limebb-info-tile.js +19 -20
- package/dist/components/limebb-limeobject-file-viewer.js +2 -2
- package/dist/components/limebb-locale-picker.js +12 -4
- package/dist/components/limebb-mention.js +3 -4
- package/dist/components/limebb-notification-list.js +29 -12
- package/dist/components/limebb-percentage-visualizer.js +5 -6
- package/dist/components/limebb-text-editor.js +39 -36
- package/dist/components/limebb-trend-indicator.js +6 -6
- package/dist/components/navigation-button.js +1 -1
- package/dist/components/non-null.js +5 -0
- package/dist/components/percentage-class.js +2 -2
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/{highlight-item.handler-96b59c20.js → highlight-item.handler-dfbf11c0.js} +2 -2
- package/dist/esm/{index-cdbbc18d.js → index-96dd111f.js} +3 -28
- package/dist/esm/{index.esm-5e14dac9.js → index.esm-10a8f67c.js} +1 -1
- package/dist/esm/lime-crm-building-blocks.js +2 -2
- package/dist/esm/limebb-browser.entry.js +2 -2
- package/dist/esm/limebb-chat-item_2.entry.js +8 -3
- package/dist/esm/limebb-chat-list.entry.js +34 -16
- package/dist/esm/limebb-component-config.entry.js +5 -3
- package/dist/esm/limebb-component-picker.entry.js +2 -2
- package/dist/esm/limebb-currency-picker.entry.js +3 -3
- package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +5 -5
- package/dist/esm/limebb-date-range.entry.js +1 -1
- package/dist/esm/limebb-empty-state.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +4 -5
- package/dist/esm/limebb-feed.entry.js +4 -4
- package/dist/esm/limebb-icon-picker.entry.js +10 -6
- package/dist/esm/limebb-info-tile-currency-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-date-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile-decimal-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +2 -1
- package/dist/esm/limebb-info-tile-relative-date-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-unit-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile.entry.js +21 -22
- package/dist/esm/limebb-kanban-group.entry.js +3 -3
- package/dist/esm/limebb-kanban-item.entry.js +3 -3
- package/dist/esm/limebb-kanban.entry.js +1 -1
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +4 -4
- package/dist/esm/limebb-loader.entry.js +3 -3
- package/dist/esm/limebb-locale-picker.entry.js +14 -6
- package/dist/esm/limebb-mention-group-counter.entry.js +1 -1
- package/dist/esm/limebb-mention.entry.js +5 -6
- package/dist/esm/limebb-navigation-button_2.entry.js +5 -5
- package/dist/esm/limebb-notification-item.entry.js +2 -2
- package/dist/esm/limebb-notification-list.entry.js +31 -14
- package/dist/esm/limebb-percentage-visualizer.entry.js +7 -8
- package/dist/esm/limebb-text-editor-picker.entry.js +1 -1
- package/dist/esm/limebb-text-editor.entry.js +42 -39
- package/dist/esm/limebb-trend-indicator.entry.js +8 -8
- package/dist/esm/loader.js +2 -2
- package/dist/esm/non-null-5a66a269.js +10 -0
- package/dist/esm/{percentage-class-78377c1e.js → percentage-class-1e4748e8.js} +2 -2
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-38eec842.entry.js → p-013b852a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-01cff04f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-ccc748a1.entry.js → p-0f925b3d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-29e90714.entry.js → p-10ac8b3e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-1556b545.js +2 -0
- package/dist/lime-crm-building-blocks/p-1ff94c41.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-b8d49d3e.entry.js → p-218b7f38.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-235aec61.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-ebbd8784.entry.js → p-25e1a434.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e38afb31.entry.js → p-292631ea.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-67e1ea69.entry.js → p-302e0feb.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-305a14bf.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-99be75d5.entry.js → p-3a406a20.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3dce616c.entry.js → p-3bd02e86.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ca79dc23.entry.js → p-4aac81ef.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-eab00e3c.entry.js → p-4caa8bbe.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d0ce5a35.entry.js → p-568b7520.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0a331c84.entry.js → p-5f0d0df3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-66352a1e.js +1 -0
- package/dist/lime-crm-building-blocks/p-6b1a6487.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-6c56121c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-1eb8fb75.entry.js → p-70ab5db7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-75abe3ad.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-58faab30.entry.js → p-8491aaa1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-8bf72bb4.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-8e316957.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-3b9766cc.js → p-9b6ec98b.js} +1 -1
- package/dist/lime-crm-building-blocks/p-a9b0d2e5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-ad52e723.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-af8c22c4.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-b107fe24.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-27786967.entry.js → p-b5f15f73.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-af6e6696.entry.js → p-c45be80e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-c5d79dd5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-adcb57c6.entry.js → p-dd0370cd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0779e2b4.entry.js → p-e1e5f461.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-bf322752.entry.js → p-e2128caf.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-f820c983.entry.js +1 -0
- package/dist/test/setup.js +15 -5
- package/dist/types/components/chat-list/{processChatItems.d.ts → process-chat-items.d.ts} +17 -5
- package/dist/types/components/date-picker/to-server-date.d.ts +3 -3
- package/dist/types/components/icon-picker/search.d.ts +9 -0
- package/dist/types/components/locale-picker/language.d.ts +9 -0
- package/dist/types/components/notification-list/{processNotificationItems.d.ts → process-notification-items.d.ts} +17 -5
- package/dist/types/components/text-editor/mentions.d.ts +2 -2
- package/dist/types/components/text-editor/uploader/building-blocks-upload-handler.d.ts +8 -8
- package/dist/types/components/text-editor/utils/searcher-utils.d.ts +5 -0
- package/dist/types/home/runner/work/lime-crm-building-blocks/lime-crm-building-blocks/.stencil/test/setup.d.ts +10 -0
- package/dist/types/util/dom.d.ts +3 -3
- package/dist/types/util/limetype.d.ts +11 -11
- package/dist/types/util/non-null.d.ts +4 -0
- package/dist/types/util/percentage-class.d.ts +2 -2
- package/package.json +8 -25
- package/dist/esm/non-null-d9b0b630.js +0 -5
- package/dist/lime-crm-building-blocks/p-06839012.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-10452278.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-2b8bfe92.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-2e496d18.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-31a55daa.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-37e0254e.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3d961c1b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-43c76027.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-46bf22fa.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-506dfcff.js +0 -1
- package/dist/lime-crm-building-blocks/p-51e87162.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a581f635.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-acce6160.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-c4e6dcf4.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-cf06416b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d312f578.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d736c794.js +0 -2
- /package/dist/lime-crm-building-blocks/{p-2b0ec58c.js → p-10e16feb.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-6fd28e32.js → p-1484e300.js} +0 -0
|
@@ -166,7 +166,7 @@ export class Feed {
|
|
|
166
166
|
return h("a", { class: "date-heading" }, currentIndexDate);
|
|
167
167
|
}
|
|
168
168
|
renderLoadMore() {
|
|
169
|
-
if (
|
|
169
|
+
if (this.items.length === 0 || this.totalCount <= this.items.length) {
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
return (h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.loadMoreLabel }));
|
|
@@ -12,12 +12,12 @@ export class HighlightFeedItemHandler {
|
|
|
12
12
|
if (feeds.length === 0) {
|
|
13
13
|
throw new Error(`No feed found containing item with id: ${command.itemId}`);
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
for (const feed of feeds) {
|
|
16
16
|
if (feed.highlightedItemId === command.itemId) {
|
|
17
17
|
feed.highlightedItemId = undefined;
|
|
18
18
|
}
|
|
19
19
|
feed.highlightedItemId = command.itemId;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
}
|
|
22
22
|
registerFeed(feed) {
|
|
23
23
|
if (!this.feeds.includes(feed)) {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param query
|
|
4
|
+
* @param icons
|
|
5
|
+
*/
|
|
1
6
|
export function findIcons(query, icons) {
|
|
2
7
|
const MAX_HITS = 20;
|
|
3
8
|
const lowerCaseQuery = query.toLowerCase();
|
|
@@ -8,6 +13,10 @@ export function findIcons(query, icons) {
|
|
|
8
13
|
})
|
|
9
14
|
.slice(0, MAX_HITS);
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @param icon
|
|
19
|
+
*/
|
|
11
20
|
export function createListItem(icon) {
|
|
12
21
|
const name = icon.id.replace('.svg', '');
|
|
13
22
|
return {
|
|
@@ -10,7 +10,7 @@ export class InfoTileAdminConfig {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
this.getOptionValue = (option) => option.value || undefined;
|
|
12
12
|
this.getAffixValue = (options) => {
|
|
13
|
-
if (
|
|
13
|
+
if (options.length === 0) {
|
|
14
14
|
return [];
|
|
15
15
|
}
|
|
16
16
|
return options.map((o) => o.value);
|
|
@@ -103,6 +103,7 @@ export class InfoTileAdminConfig {
|
|
|
103
103
|
}
|
|
104
104
|
let type = this.value.type;
|
|
105
105
|
if (this.isNumberFormat(this.value)) {
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
106
107
|
type = (_b = this.value.options) === null || _b === void 0 ? void 0 : _b.style;
|
|
107
108
|
}
|
|
108
109
|
const ComponentName = `limebb-info-tile-${type}-format`;
|
|
@@ -11,28 +11,29 @@ export class DateTimeFormatter {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
formatValue(date, format) {
|
|
14
|
-
var _a, _b;
|
|
15
14
|
const options = Object.assign({}, format.options);
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
if (format.prefix)
|
|
16
|
+
for (const prefix of format.prefix) {
|
|
17
|
+
delete options[prefix];
|
|
18
|
+
}
|
|
19
|
+
if (format.suffix)
|
|
20
|
+
for (const suffix of format.suffix) {
|
|
21
|
+
delete options[suffix];
|
|
22
|
+
}
|
|
22
23
|
const formatter = new Intl.DateTimeFormat(this.locale, options);
|
|
23
24
|
return formatter.format(date);
|
|
24
25
|
}
|
|
25
26
|
formatAffix(affix, date, format) {
|
|
26
27
|
const options = Object.assign({}, format.options);
|
|
27
|
-
Object.keys(options)
|
|
28
|
+
for (const option of Object.keys(options)) {
|
|
28
29
|
if (option === 'hour12') {
|
|
29
|
-
|
|
30
|
+
continue;
|
|
30
31
|
}
|
|
31
32
|
if ((format[affix] || []).includes(option)) {
|
|
32
|
-
|
|
33
|
+
continue;
|
|
33
34
|
}
|
|
34
35
|
delete options[option];
|
|
35
|
-
}
|
|
36
|
+
}
|
|
36
37
|
if (Object.values(options).filter(Boolean).length === 0) {
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
@@ -3,13 +3,13 @@ export class NumberFormatter {
|
|
|
3
3
|
this.locale = locale;
|
|
4
4
|
}
|
|
5
5
|
format(value, format) {
|
|
6
|
+
var _a, _b;
|
|
6
7
|
const formatter = new Intl.NumberFormat(this.locale, format.options);
|
|
7
8
|
const parts = formatter.formatToParts(value);
|
|
8
9
|
let prefix = '';
|
|
9
10
|
let number = '';
|
|
10
11
|
let suffix = '';
|
|
11
|
-
|
|
12
|
-
var _a, _b;
|
|
12
|
+
for (const part of parts) {
|
|
13
13
|
if ((_a = format.prefix) === null || _a === void 0 ? void 0 : _a.includes(part.type)) {
|
|
14
14
|
prefix += part.value;
|
|
15
15
|
}
|
|
@@ -19,7 +19,7 @@ export class NumberFormatter {
|
|
|
19
19
|
else {
|
|
20
20
|
number += part.value;
|
|
21
21
|
}
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
if (!number) {
|
|
24
24
|
number = formatter.format(value);
|
|
25
25
|
prefix = '';
|
|
@@ -9,7 +9,7 @@ export class RelativeDateFormatter {
|
|
|
9
9
|
let prefix = '';
|
|
10
10
|
let formattedValue = '';
|
|
11
11
|
let suffix = '';
|
|
12
|
-
|
|
12
|
+
for (const part of parts) {
|
|
13
13
|
if (part.type === 'literal' && !formattedValue) {
|
|
14
14
|
prefix += part.value;
|
|
15
15
|
}
|
|
@@ -19,7 +19,7 @@ export class RelativeDateFormatter {
|
|
|
19
19
|
else {
|
|
20
20
|
formattedValue += part.value;
|
|
21
21
|
}
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
if (!formattedValue) {
|
|
24
24
|
formattedValue = prefix || suffix;
|
|
25
25
|
prefix = '';
|
|
@@ -36,7 +36,6 @@ export class RelativeDateFormatter {
|
|
|
36
36
|
const now = new Date();
|
|
37
37
|
const diffInMs = date.getTime() - now.getTime();
|
|
38
38
|
const times = [
|
|
39
|
-
/* eslint-disable no-magic-numbers */
|
|
40
39
|
{ unit: 'year', value: 1000 * 60 * 60 * 24 * 365 },
|
|
41
40
|
{ unit: 'month', value: 1000 * 60 * 60 * 24 * 30 },
|
|
42
41
|
{ unit: 'week', value: 1000 * 60 * 60 * 24 * 7 },
|
|
@@ -44,7 +43,6 @@ export class RelativeDateFormatter {
|
|
|
44
43
|
{ unit: 'hour', value: 1000 * 60 * 60 },
|
|
45
44
|
{ unit: 'minute', value: 1000 * 60 },
|
|
46
45
|
{ unit: 'second', value: 1000 },
|
|
47
|
-
/* eslint-enable no-magic-numbers */
|
|
48
46
|
];
|
|
49
47
|
for (const time of times) {
|
|
50
48
|
const diff = diffInMs / time.value;
|
|
@@ -68,7 +68,6 @@ export class InfoTile {
|
|
|
68
68
|
this.value = await this.loader.load(aggregator, this.context);
|
|
69
69
|
}
|
|
70
70
|
catch (error) {
|
|
71
|
-
// eslint-disable-next-line no-console
|
|
72
71
|
console.error(error);
|
|
73
72
|
this.error = true;
|
|
74
73
|
}
|
|
@@ -77,6 +76,7 @@ export class InfoTile {
|
|
|
77
76
|
getKey() {
|
|
78
77
|
const RADIX = 36;
|
|
79
78
|
const START = 2;
|
|
79
|
+
// eslint-disable-next-line sonarjs/pseudo-random
|
|
80
80
|
return Math.random().toString(RADIX).slice(START);
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
@@ -92,7 +92,7 @@ export class InfoTile {
|
|
|
92
92
|
const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
|
|
93
93
|
const normalProps = Object.assign(Object.assign({}, baseProps), { label: this.getLabel(filter), link: this.getLink(filter), loading: this.loading, value: value === null || value === void 0 ? void 0 : value.value.trim() });
|
|
94
94
|
const props = !filter || this.error ? errorProps : normalProps;
|
|
95
|
-
return (h("limel-info-tile", Object.assign({ key: '
|
|
95
|
+
return (h("limel-info-tile", Object.assign({ key: '9d8d11498cba43ea63f18f6a6a72148d39966d5c', class: { error: !filter || this.error } }, props)));
|
|
96
96
|
}
|
|
97
97
|
getFormattedValue() {
|
|
98
98
|
if (!this.value && this.value !== 0) {
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
all: unset;
|
|
127
127
|
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);
|
|
128
128
|
cursor: pointer;
|
|
129
|
-
color: var(--
|
|
129
|
+
color: var(--limel-theme-on-surface-color);
|
|
130
130
|
background-color: var(--lime-elevated-surface-background-color);
|
|
131
131
|
box-shadow: var(--button-shadow-normal);
|
|
132
132
|
z-index: 1;
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
}
|
|
148
148
|
#show-more-button:hover {
|
|
149
149
|
transform: translate3d(0, -0.04rem, 0);
|
|
150
|
-
color: var(--
|
|
150
|
+
color: var(--limel-theme-on-surface-color);
|
|
151
151
|
background-color: var(--lime-elevated-surface-background-color);
|
|
152
152
|
box-shadow: var(--button-shadow-hovered);
|
|
153
153
|
}
|
|
@@ -273,7 +273,7 @@ limel-spinner {
|
|
|
273
273
|
limebb-kanban-item {
|
|
274
274
|
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);
|
|
275
275
|
cursor: pointer;
|
|
276
|
-
color: var(--
|
|
276
|
+
color: var(--limel-theme-on-surface-color);
|
|
277
277
|
background-color: var(--lime-elevated-surface-background-color);
|
|
278
278
|
}
|
|
279
279
|
limebb-kanban-item:hover, limebb-kanban-item:focus, limebb-kanban-item:focus-visible {
|
|
@@ -281,7 +281,7 @@ limebb-kanban-item:hover, limebb-kanban-item:focus, limebb-kanban-item:focus-vis
|
|
|
281
281
|
}
|
|
282
282
|
limebb-kanban-item:hover {
|
|
283
283
|
transform: translate3d(0, 0.01rem, 0);
|
|
284
|
-
color: var(--
|
|
284
|
+
color: var(--limel-theme-on-surface-color);
|
|
285
285
|
background-color: var(--lime-elevated-surface-background-color);
|
|
286
286
|
box-shadow: var(--button-shadow-hovered);
|
|
287
287
|
}
|
|
@@ -189,7 +189,7 @@ limel-chip-set {
|
|
|
189
189
|
.header .actions:hover {
|
|
190
190
|
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);
|
|
191
191
|
cursor: pointer;
|
|
192
|
-
color: var(--
|
|
192
|
+
color: var(--limel-theme-on-surface-color);
|
|
193
193
|
background-color: var(--lime-elevated-surface-background-color);
|
|
194
194
|
box-shadow: var(--button-shadow-normal);
|
|
195
195
|
}
|
|
@@ -198,7 +198,7 @@ limel-chip-set {
|
|
|
198
198
|
}
|
|
199
199
|
.header .actions:hover:hover {
|
|
200
200
|
transform: translate3d(0, -0.04rem, 0);
|
|
201
|
-
color: var(--
|
|
201
|
+
color: var(--limel-theme-on-surface-color);
|
|
202
202
|
background-color: var(--lime-elevated-surface-background-color);
|
|
203
203
|
box-shadow: var(--button-shadow-hovered);
|
|
204
204
|
}
|
|
@@ -253,7 +253,7 @@ limel-chip-set {
|
|
|
253
253
|
.assignee {
|
|
254
254
|
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);
|
|
255
255
|
cursor: pointer;
|
|
256
|
-
color: var(--
|
|
256
|
+
color: var(--limel-theme-on-surface-color);
|
|
257
257
|
background-color: transparent;
|
|
258
258
|
display: flex;
|
|
259
259
|
align-items: center;
|
|
@@ -267,7 +267,7 @@ limel-chip-set {
|
|
|
267
267
|
}
|
|
268
268
|
.assignee:hover {
|
|
269
269
|
transform: translate3d(0, 0.01rem, 0);
|
|
270
|
-
color: var(--
|
|
270
|
+
color: var(--limel-theme-on-surface-color);
|
|
271
271
|
background-color: var(--lime-elevated-surface-background-color);
|
|
272
272
|
box-shadow: var(--button-shadow-hovered);
|
|
273
273
|
}
|
|
@@ -67,13 +67,13 @@ export class FileViewer {
|
|
|
67
67
|
return this.fileTypes
|
|
68
68
|
.filter(this.isLiveDocsType)
|
|
69
69
|
.map((type) => file.getUrl(type))
|
|
70
|
-
.find(
|
|
70
|
+
.find(Boolean);
|
|
71
71
|
}
|
|
72
72
|
getFileUrl(file) {
|
|
73
73
|
return this.fileTypes
|
|
74
74
|
.filter(negate(this.isLiveDocsType))
|
|
75
75
|
.map((type) => file.getUrl(type))
|
|
76
|
-
.find(
|
|
76
|
+
.find(Boolean);
|
|
77
77
|
}
|
|
78
78
|
getFile() {
|
|
79
79
|
const property = this.fileProperty;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { capitalize } from "lodash-es";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param languageCode
|
|
5
|
+
* @param sessionLanguage
|
|
6
|
+
*/
|
|
2
7
|
export function getLanguageTitle(languageCode, sessionLanguage) {
|
|
3
|
-
if (
|
|
8
|
+
if (languageCode.length === 0 || sessionLanguage.length === 0) {
|
|
4
9
|
return '';
|
|
5
10
|
}
|
|
6
11
|
languageCode = languageCode === 'en_us' ? 'en-US' : languageCode;
|
|
@@ -13,6 +18,10 @@ export function getLanguageTitle(languageCode, sessionLanguage) {
|
|
|
13
18
|
languageNameParts[0] = capitalize(languageNameParts[0]);
|
|
14
19
|
return languageNameParts.join(' ');
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param http
|
|
24
|
+
*/
|
|
16
25
|
export async function getAllLanguages(http) {
|
|
17
26
|
const languages = await http.get('api/v1/admin/settings/languages');
|
|
18
27
|
const result = [];
|
|
@@ -33,7 +33,6 @@ export class LocalePicker {
|
|
|
33
33
|
}
|
|
34
34
|
catch (error) {
|
|
35
35
|
// Throwing an error here will break the entire page, so we just log it instead
|
|
36
|
-
// eslint-disable-next-line no-console
|
|
37
36
|
console.error(error);
|
|
38
37
|
}
|
|
39
38
|
}
|
|
@@ -48,13 +47,13 @@ export class LocalePicker {
|
|
|
48
47
|
let selectedOptions;
|
|
49
48
|
if (Array.isArray(this.value)) {
|
|
50
49
|
const value = this.value;
|
|
51
|
-
selectedOptions = options.filter((option) => value.
|
|
50
|
+
selectedOptions = options.filter((option) => value.includes(option.value));
|
|
52
51
|
}
|
|
53
52
|
else {
|
|
54
53
|
const value = this.value;
|
|
55
54
|
selectedOptions = options.find((option) => option.value === value);
|
|
56
55
|
}
|
|
57
|
-
return (h("limel-select", { key: '
|
|
56
|
+
return (h("limel-select", { key: 'cc3a266bdce895eee028a3109e4b1918f805adb7', value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
58
57
|
}
|
|
59
58
|
static get is() { return "limebb-locale-picker"; }
|
|
60
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -47,7 +47,6 @@ export class Mention {
|
|
|
47
47
|
await repository.loadObject(this.limetype, this.objectid);
|
|
48
48
|
}
|
|
49
49
|
catch (_a) {
|
|
50
|
-
// eslint-disable-next-line no-console
|
|
51
50
|
console.error('Could not load mentioned object');
|
|
52
51
|
}
|
|
53
52
|
this.limeobject = repository.getObject(this.limetype, this.objectid);
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
border-radius: 50%;
|
|
89
89
|
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);
|
|
90
90
|
cursor: pointer;
|
|
91
|
-
color: var(--
|
|
91
|
+
color: var(--limel-theme-on-surface-color);
|
|
92
92
|
background-color: var(--navigation-button-background-color, var(--lime-elevated-surface-background-color));
|
|
93
93
|
}
|
|
94
94
|
.navigation-button:hover, .navigation-button:focus, .navigation-button:focus-visible {
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
.navigation-button:hover {
|
|
98
98
|
transform: translate3d(0, 0.01rem, 0);
|
|
99
|
-
color: var(--
|
|
99
|
+
color: var(--limel-theme-on-surface-color);
|
|
100
100
|
background-color: var(--lime-elevated-surface-background-color);
|
|
101
101
|
box-shadow: var(--button-shadow-hovered);
|
|
102
102
|
}
|
|
@@ -144,7 +144,8 @@
|
|
|
144
144
|
position: absolute;
|
|
145
145
|
width: 0.875rem;
|
|
146
146
|
height: 0.875rem;
|
|
147
|
-
|
|
147
|
+
outline: 1.5px solid rgb(var(--contrast-900));
|
|
148
|
+
border-radius: 1px;
|
|
148
149
|
background-color: var(--navigation-button-background-color, rgb(var(--contrast-100)));
|
|
149
150
|
}
|
|
150
151
|
.newTab:hover limel-icon {
|
|
@@ -106,7 +106,7 @@ limebb-notification-item:not(.is-read) {
|
|
|
106
106
|
limebb-notification-item.is-clickable {
|
|
107
107
|
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);
|
|
108
108
|
cursor: pointer;
|
|
109
|
-
color: var(--
|
|
109
|
+
color: var(--limel-theme-on-surface-color);
|
|
110
110
|
background-color: transparent;
|
|
111
111
|
}
|
|
112
112
|
limebb-notification-item.is-clickable:hover, limebb-notification-item.is-clickable:focus, limebb-notification-item.is-clickable:focus-visible {
|
|
@@ -114,7 +114,7 @@ limebb-notification-item.is-clickable:hover, limebb-notification-item.is-clickab
|
|
|
114
114
|
}
|
|
115
115
|
limebb-notification-item.is-clickable:hover {
|
|
116
116
|
transform: translate3d(0, 0.01rem, 0);
|
|
117
|
-
color: var(--
|
|
117
|
+
color: var(--limel-theme-on-surface-color);
|
|
118
118
|
background-color: var(--lime-elevated-surface-background-color);
|
|
119
119
|
box-shadow: var(--button-shadow-hovered);
|
|
120
120
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { PlatformServiceName, } from "@limetech/lime-web-components";
|
|
3
|
-
import { processNotificationItems, } from "./
|
|
3
|
+
import { processNotificationItems, } from "./process-notification-items";
|
|
4
4
|
/**
|
|
5
5
|
* Notification list
|
|
6
6
|
* This component displays a feed of notifications and groups them by date.
|
|
@@ -45,12 +45,15 @@ export class NotificationList {
|
|
|
45
45
|
renderNotificationItems() {
|
|
46
46
|
return this.processedItems.map((item) => {
|
|
47
47
|
switch (item.type) {
|
|
48
|
-
case 'group':
|
|
48
|
+
case 'group': {
|
|
49
49
|
return this.renderGroup(item);
|
|
50
|
-
|
|
50
|
+
}
|
|
51
|
+
case 'newItemIndicator': {
|
|
51
52
|
return this.renderIndicator();
|
|
52
|
-
|
|
53
|
+
}
|
|
54
|
+
default: {
|
|
53
55
|
return null;
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
});
|
|
56
59
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Processes a list of notifications by adding date headers and a "new items" indicator.
|
|
3
3
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
4
|
+
* @param items - The list of notification items to process. These items must be pre-sorted by their `timestamp` in descending order.
|
|
5
|
+
* @param dateTimeFormatter - A service used to format dates for the date headers.
|
|
6
|
+
* @param lastVisitedTimestamp - The timestamp of the user's last visit. This is used to determine where the "new items" indicator should be placed.
|
|
7
7
|
*
|
|
8
|
-
* @returns
|
|
8
|
+
* @returns An array of processed items, including notifications, date headers, and a "new items" indicator if applicable.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* const processedItems = processNotificationItems(
|
|
@@ -44,18 +44,27 @@ export function processNotificationItems(items, dateTimeFormatter, lastVisitedTi
|
|
|
44
44
|
return finalContext.processedItems;
|
|
45
45
|
}
|
|
46
46
|
function createPipeline(initialContext, processors) {
|
|
47
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
47
48
|
return processors.reduce((context, processor) => processor(context), initialContext);
|
|
48
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @param context
|
|
53
|
+
*/
|
|
49
54
|
export function insertNotifications(context) {
|
|
50
|
-
context.items
|
|
55
|
+
for (const item of context.items) {
|
|
51
56
|
context.processedItems.push({ type: 'notification', item: item });
|
|
52
|
-
}
|
|
57
|
+
}
|
|
53
58
|
return context;
|
|
54
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @param context
|
|
63
|
+
*/
|
|
55
64
|
export function insertNewItemIndicator(context) {
|
|
56
65
|
const processedWithIndicator = [];
|
|
57
66
|
let newItemIndicatorInserted = context.newItemIndicatorInserted;
|
|
58
|
-
context.processedItems
|
|
67
|
+
for (const item of context.processedItems) {
|
|
59
68
|
if (item.type === 'notification' &&
|
|
60
69
|
context.lastVisitedTimestamp &&
|
|
61
70
|
!newItemIndicatorInserted &&
|
|
@@ -67,11 +76,16 @@ export function insertNewItemIndicator(context) {
|
|
|
67
76
|
}
|
|
68
77
|
// Push the current item to the new array
|
|
69
78
|
processedWithIndicator.push(item);
|
|
70
|
-
}
|
|
79
|
+
}
|
|
71
80
|
context.processedItems = processedWithIndicator;
|
|
72
81
|
context.newItemIndicatorInserted = newItemIndicatorInserted;
|
|
73
82
|
return context;
|
|
74
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @param context
|
|
87
|
+
*/
|
|
88
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
75
89
|
export function insertDateGroups(context) {
|
|
76
90
|
const newProcessedItems = [];
|
|
77
91
|
let currentGroup = null;
|
|
@@ -85,18 +85,17 @@ export class PercentageVisualizer {
|
|
|
85
85
|
}
|
|
86
86
|
triggerRangeWarning() {
|
|
87
87
|
if (this.rangeMin >= this.rangeMax) {
|
|
88
|
-
// eslint-disable-next-line no-console
|
|
89
88
|
console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`);
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
render() {
|
|
93
92
|
const normalizedValue = this.getNormalizedValue();
|
|
94
93
|
const zeroPoint = this.getZeroPointPosition();
|
|
95
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: '454366891b8fe6860a43efaf8c1b96c9a4689962', class: this.getContainerClassList(), style: {
|
|
96
95
|
'--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
|
|
97
96
|
'--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
|
|
98
97
|
'--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
|
|
99
|
-
} }, h("limel-notched-outline", { key: '
|
|
98
|
+
} }, h("limel-notched-outline", { key: 'c827cb818ed190f6a7b6fa33e6b1c878b5682e42', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: '7c6dcc138c4bca114d4d83af026c93f8611339b5', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
|
|
100
99
|
}
|
|
101
100
|
renderVisualization() {
|
|
102
101
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -178,15 +177,15 @@ export class PercentageVisualizer {
|
|
|
178
177
|
}
|
|
179
178
|
unifyMinusSign(input) {
|
|
180
179
|
// Replace Unicode minus sign (−) with ASCII hyphen-minus (-)
|
|
181
|
-
return input.
|
|
180
|
+
return input.replaceAll('−', '-');
|
|
182
181
|
}
|
|
183
182
|
convertToUnicodeMinus(input) {
|
|
184
183
|
// Replace ASCII hyphen-minus (-) with Unicode minus sign (−)
|
|
185
|
-
return input.
|
|
184
|
+
return input.replaceAll('-', '−');
|
|
186
185
|
}
|
|
187
186
|
parseValue(value) {
|
|
188
187
|
if (typeof value === 'string') {
|
|
189
|
-
return parseFloat(this.unifyMinusSign(value));
|
|
188
|
+
return Number.parseFloat(this.unifyMinusSign(value));
|
|
190
189
|
}
|
|
191
190
|
return value;
|
|
192
191
|
}
|
|
@@ -118,14 +118,14 @@ export class SummaryPopover {
|
|
|
118
118
|
top: '0.125rem',
|
|
119
119
|
right: '0.125rem',
|
|
120
120
|
};
|
|
121
|
-
return (h("limel-popover", { key: '
|
|
121
|
+
return (h("limel-popover", { key: '8c2dc81886054c0d660960afc0ada098a47cb4bc', style: {
|
|
122
122
|
'--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
|
|
123
|
-
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '
|
|
123
|
+
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '2813f920e6e674c514f7f1d0522317604fc5c4b0', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: 'ba80423f3aa45bfe365da5a930040819f4232f02', name: "trigger" }), h("div", { key: 'c9687280e199d2688594c5293a754d7fb839b59a', class: "opening-countdown-indicator" })), h("limel-card", { key: '6e1374e11f1aa90bf854cb53922a80e01ff2cfd7', style: {
|
|
124
124
|
'max-width': this.popoverMaxWidth,
|
|
125
125
|
'max-height': this.popoverMaxHeight,
|
|
126
126
|
'min-width': '7rem',
|
|
127
127
|
'min-height': '3rem',
|
|
128
|
-
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: '
|
|
128
|
+
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: 'c1ca522a7908db6221fd11fa5dd24905120998e5', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
|
|
129
129
|
}
|
|
130
130
|
static get is() { return "limebb-summary-popover"; }
|
|
131
131
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/* eslint-disable no-underscore-dangle */
|
|
2
1
|
import { getRelationProperty, hasHasManyRelation, hasLabel, } from "../../util/limetype";
|
|
3
2
|
import { AggregateOperator, PlatformServiceName, } from "@limetech/lime-web-components";
|
|
4
3
|
import { isNonNull } from "../../util/non-null";
|
|
5
4
|
/**
|
|
6
5
|
* Get the limetypes that should be available for mentions
|
|
7
6
|
*
|
|
8
|
-
* @param
|
|
9
|
-
* @returns
|
|
7
|
+
* @param limetypes all limetypes
|
|
8
|
+
* @returns mention limetypes
|
|
10
9
|
*/
|
|
11
10
|
export function getMentionLimetypes(limetypes) {
|
|
12
11
|
return Object.values(limetypes).filter((limetype) => {
|
|
@@ -87,9 +86,9 @@ export class MentionsService {
|
|
|
87
86
|
.filter((limetype) => !hasLabel(limetype, 'user') &&
|
|
88
87
|
hasHasManyRelation(limetype, 'user'))
|
|
89
88
|
.map((limetype) => this.getGroupCounts(limetype));
|
|
90
|
-
(await Promise.all(groupCountsLoads))
|
|
89
|
+
for (const groupCount of await Promise.all(groupCountsLoads)) {
|
|
91
90
|
Object.assign(this.groupCounts, groupCount);
|
|
92
|
-
}
|
|
91
|
+
}
|
|
93
92
|
}
|
|
94
93
|
async getGroupCounts(limetype) {
|
|
95
94
|
var _a;
|
|
@@ -118,17 +117,16 @@ export class MentionsService {
|
|
|
118
117
|
return { [limetypeName]: groupCount };
|
|
119
118
|
}
|
|
120
119
|
catch (error) {
|
|
121
|
-
// eslint-disable-next-line no-console
|
|
122
120
|
console.error(`Error fetching group count for limetype: ${limetype.name}`, error);
|
|
123
121
|
return { [limetypeName]: {} };
|
|
124
122
|
}
|
|
125
123
|
}
|
|
126
124
|
createGroupCount(objects, coworkerPropertyName) {
|
|
127
125
|
const groupCount = {};
|
|
128
|
-
|
|
126
|
+
for (const object of objects) {
|
|
129
127
|
const { _id: id, [coworkerPropertyName]: aggregateProperty } = object;
|
|
130
128
|
groupCount[id] = aggregateProperty.count;
|
|
131
|
-
}
|
|
129
|
+
}
|
|
132
130
|
return groupCount;
|
|
133
131
|
}
|
|
134
132
|
createSearchListItems(searchObjects = []) {
|
|
@@ -178,7 +178,7 @@ export class LimeBBTextEditor {
|
|
|
178
178
|
};
|
|
179
179
|
this.findNonSeparatorIndex = (direction, currentIndex, depth = 0) => {
|
|
180
180
|
// Safety check to avoid infinite recursion
|
|
181
|
-
if (
|
|
181
|
+
if (this.items.length === 0 || depth > this.items.length) {
|
|
182
182
|
return currentIndex;
|
|
183
183
|
}
|
|
184
184
|
const nextIndex = getItemIndex(direction, currentIndex, this.items.length);
|
|
@@ -263,7 +263,6 @@ export class LimeBBTextEditor {
|
|
|
263
263
|
triggerHandler.inserter(this.triggerFunction, selectedItem);
|
|
264
264
|
}
|
|
265
265
|
catch (error) {
|
|
266
|
-
// eslint-disable-next-line no-console
|
|
267
266
|
console.error('Error inserting', error);
|
|
268
267
|
}
|
|
269
268
|
this.resetTriggerAndPicker();
|
|
@@ -288,7 +287,6 @@ export class LimeBBTextEditor {
|
|
|
288
287
|
this.items = items;
|
|
289
288
|
}
|
|
290
289
|
catch (error) {
|
|
291
|
-
// eslint-disable-next-line no-console
|
|
292
290
|
console.error('Error searching', error);
|
|
293
291
|
}
|
|
294
292
|
finally {
|
|
@@ -391,7 +389,7 @@ export class LimeBBTextEditor {
|
|
|
391
389
|
}
|
|
392
390
|
render() {
|
|
393
391
|
return [
|
|
394
|
-
h("limel-text-editor", { key: '
|
|
392
|
+
h("limel-text-editor", { key: 'af646ab86b401f895b2df8ce307d2b739d356d4c', ref: (el) => (this.textEditor = el), tabindex: this.disabled ? -1 : 0, value: this.value, contentType: this.contentType, customElements: this.registeredCustomElements, "aria-disabled": this.disabled, language: this.language, triggers: this.registeredTriggers, onTriggerStart: this.handleTriggerStart, onTriggerStop: this.handleTriggerStop, onTriggerChange: this.handleTriggerChange, onImagePasted: this.handleImagePasted, onMetadataChange: this.handleMetadataChange, 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 }),
|
|
395
393
|
this.renderPicker(),
|
|
396
394
|
];
|
|
397
395
|
}
|