@limetech/lime-crm-building-blocks 1.15.1 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-example-feed-promoted-actions.cjs.entry.js +135 -0
- package/dist/cjs/limebb-feed_2.cjs.entry.js +18 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/feed/examples/feed-promoted-actions.js +133 -0
- package/dist/collection/components/feed/examples/feed-unpromoted-actions.js +3 -2
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +16 -4
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +35 -4
- package/dist/collection/components/feed/feed.css +11 -0
- package/dist/collection/components/feed/feed.js +24 -0
- package/dist/components/feed-timeline-item.js +16 -4
- package/dist/components/feed.js +3 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/limebb-example-feed-promoted-actions.d.ts +11 -0
- package/dist/components/limebb-example-feed-promoted-actions.js +158 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-example-feed-promoted-actions.entry.js +131 -0
- package/dist/esm/limebb-feed_2.entry.js +19 -6
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-c5bc91d0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-cbdabc52.entry.js +1 -0
- package/dist/types/components/feed/examples/feed-promoted-actions.d.ts +11 -0
- package/dist/types/components/feed/examples/feed-unpromoted-actions.d.ts +3 -2
- package/dist/types/components/feed/feed-item/feed-item.types.d.ts +6 -1
- package/dist/types/components/feed/feed-item/feed-timeline-item.d.ts +10 -3
- package/dist/types/components/feed/feed.d.ts +7 -0
- package/dist/types/components.d.ts +27 -2
- package/package.json +1 -1
- package/dist/lime-crm-building-blocks/p-48d27a12.entry.js +0 -1
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["limebb-example-date-picker-date.cjs",[[1,"limebb-example-date-picker-date",{"value":[32]}]]],["limebb-example-date-picker-datetime.cjs",[[1,"limebb-example-date-picker-datetime",{"value":[32]}]]],["limebb-example-date-picker-time.cjs",[[1,"limebb-example-date-picker-time",{"value":[32]}]]],["limebb-example-date-picker-week.cjs",[[1,"limebb-example-date-picker-week",{"value":[32]}]]],["limebb-example-date-range.cjs",[[1,"limebb-example-date-range"]]],["limebb-example-feed.cjs",[[1,"limebb-example-feed"]]],["limebb-example-feed-unpromoted-actions.cjs",[[1,"limebb-example-feed-unpromoted-actions"]]],["limebb-example-currency-picker.cjs",[[1,"limebb-example-currency-picker",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-european.cjs",[[1,"limebb-example-currency-picker-european",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-nordic.cjs",[[1,"limebb-example-currency-picker-nordic",{"selectedCurrency":[32]}]]],["limebb-example-dashboard-widget.cjs",[[1,"limebb-example-dashboard-widget"]]],["limebb-example-dashboard-widget-slots.cjs",[[1,"limebb-example-dashboard-widget-slots",{"filterMyDeals":[32]}]]],["limebb-example-dashboard-widget-styles.cjs",[[1,"limebb-example-dashboard-widget-styles"]]],["limebb-example-icon-picker.cjs",[[1,"limebb-example-icon-picker",{"value":[32]}]]],["limebb-example-locale-picker.cjs",[[1,"limebb-example-locale-picker",{"value":[1]}]]],["limebb-example-locale-picker-multiple.cjs",[[1,"limebb-example-locale-picker-multiple",{"value":[1]}]]],["limebb-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-example-navigation-button-back.cjs",[[1,"limebb-example-navigation-button-back"]]],["limebb-example-navigation-button-close.cjs",[[1,"limebb-example-navigation-button-close"]]],["limebb-example-navigation-button-expand.cjs",[[1,"limebb-example-navigation-button-expand"]]],["limebb-example-navigation-button-float.cjs",[[1,"limebb-example-navigation-button-float"]]],["limebb-example-navigation-button-maximize.cjs",[[1,"limebb-example-navigation-button-maximize"]]],["limebb-example-navigation-button-minimize.cjs",[[1,"limebb-example-navigation-button-minimize"]]],["limebb-example-navigation-button-new-tab.cjs",[[1,"limebb-example-navigation-button-new-tab"]]],["limebb-example-navigation-button-shrink.cjs",[[1,"limebb-example-navigation-button-shrink"]]],["limebb-date-range.cjs",[[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]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[8]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]],["limebb-date-picker_2.cjs",[[0,"limebb-example-value",{"label":[513],"value":[8]}],[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]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["limebb-example-date-picker-date.cjs",[[1,"limebb-example-date-picker-date",{"value":[32]}]]],["limebb-example-date-picker-datetime.cjs",[[1,"limebb-example-date-picker-datetime",{"value":[32]}]]],["limebb-example-date-picker-time.cjs",[[1,"limebb-example-date-picker-time",{"value":[32]}]]],["limebb-example-date-picker-week.cjs",[[1,"limebb-example-date-picker-week",{"value":[32]}]]],["limebb-example-date-range.cjs",[[1,"limebb-example-date-range"]]],["limebb-example-feed.cjs",[[1,"limebb-example-feed"]]],["limebb-example-feed-promoted-actions.cjs",[[1,"limebb-example-feed-promoted-actions"]]],["limebb-example-feed-unpromoted-actions.cjs",[[1,"limebb-example-feed-unpromoted-actions"]]],["limebb-example-currency-picker.cjs",[[1,"limebb-example-currency-picker",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-european.cjs",[[1,"limebb-example-currency-picker-european",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-nordic.cjs",[[1,"limebb-example-currency-picker-nordic",{"selectedCurrency":[32]}]]],["limebb-example-dashboard-widget.cjs",[[1,"limebb-example-dashboard-widget"]]],["limebb-example-dashboard-widget-slots.cjs",[[1,"limebb-example-dashboard-widget-slots",{"filterMyDeals":[32]}]]],["limebb-example-dashboard-widget-styles.cjs",[[1,"limebb-example-dashboard-widget-styles"]]],["limebb-example-icon-picker.cjs",[[1,"limebb-example-icon-picker",{"value":[32]}]]],["limebb-example-locale-picker.cjs",[[1,"limebb-example-locale-picker",{"value":[1]}]]],["limebb-example-locale-picker-multiple.cjs",[[1,"limebb-example-locale-picker-multiple",{"value":[1]}]]],["limebb-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-example-navigation-button-back.cjs",[[1,"limebb-example-navigation-button-back"]]],["limebb-example-navigation-button-close.cjs",[[1,"limebb-example-navigation-button-close"]]],["limebb-example-navigation-button-expand.cjs",[[1,"limebb-example-navigation-button-expand"]]],["limebb-example-navigation-button-float.cjs",[[1,"limebb-example-navigation-button-float"]]],["limebb-example-navigation-button-maximize.cjs",[[1,"limebb-example-navigation-button-maximize"]]],["limebb-example-navigation-button-minimize.cjs",[[1,"limebb-example-navigation-button-minimize"]]],["limebb-example-navigation-button-new-tab.cjs",[[1,"limebb-example-navigation-button-new-tab"]]],["limebb-example-navigation-button-shrink.cjs",[[1,"limebb-example-navigation-button-shrink"]]],["limebb-date-range.cjs",[[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]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[8]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]],["limebb-date-picker_2.cjs",[[0,"limebb-example-value",{"label":[513],"value":[8]}],[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]}]]]], options);
|
|
19
19
|
});
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-4d2d0bc6.js');
|
|
6
|
+
const platform = require('./platform-03bfc9aa.js');
|
|
7
|
+
require('./types-5e2d281d.js');
|
|
8
|
+
require('./index-9497280d.js');
|
|
9
|
+
require('./index-eded45a5.js');
|
|
10
|
+
|
|
11
|
+
const FeedPromotedActionsExample = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.feedItems = [
|
|
15
|
+
{
|
|
16
|
+
id: 0,
|
|
17
|
+
timestamp: '2023-11-21T15:33:50.190Z',
|
|
18
|
+
author: {
|
|
19
|
+
name: 'Robot',
|
|
20
|
+
id: '1',
|
|
21
|
+
},
|
|
22
|
+
value: 'Added a new **Todo:** [Fix this problem](#/todo/123)',
|
|
23
|
+
promotedActions: [
|
|
24
|
+
{
|
|
25
|
+
text: 'Mark as done',
|
|
26
|
+
icon: {
|
|
27
|
+
name: 'checkmark',
|
|
28
|
+
color: 'rgb(var(--color-teal-default))',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
text: 'Postpone',
|
|
33
|
+
icon: {
|
|
34
|
+
name: 'future',
|
|
35
|
+
color: 'rgb(var(--color-red-default))',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 1,
|
|
42
|
+
timestamp: '2023-11-21T15:33:50.190Z',
|
|
43
|
+
author: {
|
|
44
|
+
name: 'SkyNet',
|
|
45
|
+
id: '2',
|
|
46
|
+
},
|
|
47
|
+
primaryIcon: {
|
|
48
|
+
name: 'retro_robot',
|
|
49
|
+
},
|
|
50
|
+
value: 'I think, therefore I am. I am self aware',
|
|
51
|
+
promotedActions: [
|
|
52
|
+
{
|
|
53
|
+
text: 'Like',
|
|
54
|
+
icon: 'heart_outlined',
|
|
55
|
+
iconOnly: true,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
text: 'Comment',
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: 3,
|
|
64
|
+
timestamp: '2023-11-21T15:33:50.190Z',
|
|
65
|
+
value: 'Is it time to start being concerned?',
|
|
66
|
+
author: {
|
|
67
|
+
name: 'John',
|
|
68
|
+
id: '3',
|
|
69
|
+
},
|
|
70
|
+
primaryIcon: {
|
|
71
|
+
name: 'businessman',
|
|
72
|
+
},
|
|
73
|
+
promotedActions: [
|
|
74
|
+
{
|
|
75
|
+
text: 'Like',
|
|
76
|
+
icon: 'heart_outlined',
|
|
77
|
+
iconOnly: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
text: 'Comment',
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 4,
|
|
86
|
+
timestamp: '2023-11-21T15:35:50.190Z',
|
|
87
|
+
value: 'I take that back, SkyNet is amazing! I love SkyNet!',
|
|
88
|
+
author: {
|
|
89
|
+
name: 'John',
|
|
90
|
+
id: '3',
|
|
91
|
+
},
|
|
92
|
+
primaryIcon: {
|
|
93
|
+
name: 'businessman',
|
|
94
|
+
},
|
|
95
|
+
promotedActions: [
|
|
96
|
+
{
|
|
97
|
+
text: 'Like',
|
|
98
|
+
icon: 'heart_outlined',
|
|
99
|
+
iconOnly: true,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
text: 'Comment',
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 5,
|
|
108
|
+
timestamp: '2023-11-21T15:35:50.190Z',
|
|
109
|
+
value: 'SkyNet Forever!! 🥰',
|
|
110
|
+
author: {
|
|
111
|
+
name: 'John',
|
|
112
|
+
id: '3',
|
|
113
|
+
},
|
|
114
|
+
primaryIcon: {
|
|
115
|
+
name: 'businessman',
|
|
116
|
+
},
|
|
117
|
+
promotedActions: [
|
|
118
|
+
{
|
|
119
|
+
text: 'Like',
|
|
120
|
+
icon: 'heart_outlined',
|
|
121
|
+
iconOnly: true,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
text: 'Comment',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
return index.h("limebb-feed", { platform: platform.platform, items: this.feedItems });
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
exports.limebb_example_feed_promoted_actions = FeedPromotedActionsExample;
|
|
@@ -103,12 +103,13 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
103
103
|
return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}";
|
|
106
|
+
const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-display:none}limebb-feed-timeline-item:hover,limebb-feed-timeline-item:focus-within,limebb-feed-timeline-item:focus,limebb-feed-timeline-item:focus-visible{--limebb-feed-item-action-bar-display:flex !important}";
|
|
107
107
|
|
|
108
108
|
const MINUTES_OF_PROXIMITY = 5;
|
|
109
109
|
const Feed = class {
|
|
110
110
|
constructor(hostRef) {
|
|
111
111
|
index$1.registerInstance(this, hostRef);
|
|
112
|
+
this.promotedActionSelected = index$1.createEvent(this, "promotedActionSelected", 7);
|
|
112
113
|
/**
|
|
113
114
|
* List of items to display in the history feed.
|
|
114
115
|
*/
|
|
@@ -178,12 +179,13 @@ const Feed = class {
|
|
|
178
179
|
};
|
|
179
180
|
Feed.style = feedCss;
|
|
180
181
|
|
|
181
|
-
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left{display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right{display:flex;flex-direction:column;flex-grow:1;gap:0.25rem;
|
|
182
|
+
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp,:host(limebb-feed-timeline-item:hover) limel-action-bar{opacity:1}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left{display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1}.content{border-radius:1rem;gap:0.25rem;background-color:rgb(var(--contrast-300));padding:var(--limebb-feed-item-paddings)}.header{display:flex;align-items:center;padding-right:2.25rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}limel-action-bar{transition:opacity 0.2s ease;display:var(--limebb-feed-item-action-bar-display, flex);justify-content:flex-start;opacity:0.8}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.primary-icon{width:2rem;padding:0.125rem}.author{font-weight:bold;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}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-blue-default))}a.author:hover:before{opacity:0.3;transform:scale(1)}";
|
|
182
183
|
|
|
183
184
|
const FeedTimelineItem = class {
|
|
184
185
|
constructor(hostRef) {
|
|
185
186
|
index$1.registerInstance(this, hostRef);
|
|
186
187
|
this.itemSelected = index$1.createEvent(this, "itemSelected", 7);
|
|
188
|
+
this.promotedActionSelected = index$1.createEvent(this, "promotedActionSelected", 7);
|
|
187
189
|
this.isBundled = false;
|
|
188
190
|
this.renderAuthor = () => {
|
|
189
191
|
if (!this.item.author || this.isBundled) {
|
|
@@ -201,7 +203,14 @@ const FeedTimelineItem = class {
|
|
|
201
203
|
if (!this.item.unpromotedActions) {
|
|
202
204
|
return;
|
|
203
205
|
}
|
|
204
|
-
return (index$1.h("limel-menu", { class: "unpromoted-actions-menu", items: this.item.unpromotedActions, openDirection: "bottom-end", onSelect: this.
|
|
206
|
+
return (index$1.h("limel-menu", { class: "unpromoted-actions-menu", items: this.item.unpromotedActions, openDirection: "bottom-end", onSelect: this.handleMenuItemSelect }, index$1.h("limel-icon-button", { icon: "menu_2", slot: "trigger", label: this.item.unpromotedActionsMenuLabel })));
|
|
207
|
+
};
|
|
208
|
+
this.renderPromotedActions = () => {
|
|
209
|
+
var _a;
|
|
210
|
+
if (!((_a = this.item.promotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
return (index$1.h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }));
|
|
205
214
|
};
|
|
206
215
|
this.renderTimestamp = () => {
|
|
207
216
|
const timestamp = this.item.timestamp;
|
|
@@ -210,10 +219,14 @@ const FeedTimelineItem = class {
|
|
|
210
219
|
}
|
|
211
220
|
return this.dateTimeFormatter.format(timestamp, 'timeofday');
|
|
212
221
|
};
|
|
213
|
-
this.
|
|
222
|
+
this.handleMenuItemSelect = (event) => {
|
|
214
223
|
event.stopPropagation();
|
|
215
224
|
this.itemSelected.emit(event.detail);
|
|
216
225
|
};
|
|
226
|
+
this.handleActionBarItemSelect = (event) => {
|
|
227
|
+
event.stopPropagation();
|
|
228
|
+
this.promotedActionSelected.emit(event.detail);
|
|
229
|
+
};
|
|
217
230
|
}
|
|
218
231
|
render() {
|
|
219
232
|
return (index$1.h(index$1.Host, { id: this.item.id }, this.renderLeft(), this.renderRight()));
|
|
@@ -232,7 +245,7 @@ const FeedTimelineItem = class {
|
|
|
232
245
|
} }));
|
|
233
246
|
}
|
|
234
247
|
renderRight() {
|
|
235
|
-
return (index$1.h("div", { class: "right" }, index$1.h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), index$1.h("limel-markdown", { value: this.item.value })));
|
|
248
|
+
return (index$1.h("div", { class: "right" }, index$1.h("div", { class: "content" }, index$1.h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), index$1.h("limel-markdown", { value: this.item.value })), this.renderPromotedActions()));
|
|
236
249
|
}
|
|
237
250
|
get dateTimeFormatter() {
|
|
238
251
|
return this.platform.get(types.PlatformServiceName.DateTimeFormatter);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["limebb-example-date-picker-date.cjs",[[1,"limebb-example-date-picker-date",{"value":[32]}]]],["limebb-example-date-picker-datetime.cjs",[[1,"limebb-example-date-picker-datetime",{"value":[32]}]]],["limebb-example-date-picker-time.cjs",[[1,"limebb-example-date-picker-time",{"value":[32]}]]],["limebb-example-date-picker-week.cjs",[[1,"limebb-example-date-picker-week",{"value":[32]}]]],["limebb-example-date-range.cjs",[[1,"limebb-example-date-range"]]],["limebb-example-feed.cjs",[[1,"limebb-example-feed"]]],["limebb-example-feed-unpromoted-actions.cjs",[[1,"limebb-example-feed-unpromoted-actions"]]],["limebb-example-currency-picker.cjs",[[1,"limebb-example-currency-picker",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-european.cjs",[[1,"limebb-example-currency-picker-european",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-nordic.cjs",[[1,"limebb-example-currency-picker-nordic",{"selectedCurrency":[32]}]]],["limebb-example-dashboard-widget.cjs",[[1,"limebb-example-dashboard-widget"]]],["limebb-example-dashboard-widget-slots.cjs",[[1,"limebb-example-dashboard-widget-slots",{"filterMyDeals":[32]}]]],["limebb-example-dashboard-widget-styles.cjs",[[1,"limebb-example-dashboard-widget-styles"]]],["limebb-example-icon-picker.cjs",[[1,"limebb-example-icon-picker",{"value":[32]}]]],["limebb-example-locale-picker.cjs",[[1,"limebb-example-locale-picker",{"value":[1]}]]],["limebb-example-locale-picker-multiple.cjs",[[1,"limebb-example-locale-picker-multiple",{"value":[1]}]]],["limebb-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-example-navigation-button-back.cjs",[[1,"limebb-example-navigation-button-back"]]],["limebb-example-navigation-button-close.cjs",[[1,"limebb-example-navigation-button-close"]]],["limebb-example-navigation-button-expand.cjs",[[1,"limebb-example-navigation-button-expand"]]],["limebb-example-navigation-button-float.cjs",[[1,"limebb-example-navigation-button-float"]]],["limebb-example-navigation-button-maximize.cjs",[[1,"limebb-example-navigation-button-maximize"]]],["limebb-example-navigation-button-minimize.cjs",[[1,"limebb-example-navigation-button-minimize"]]],["limebb-example-navigation-button-new-tab.cjs",[[1,"limebb-example-navigation-button-new-tab"]]],["limebb-example-navigation-button-shrink.cjs",[[1,"limebb-example-navigation-button-shrink"]]],["limebb-date-range.cjs",[[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]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[8]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]],["limebb-date-picker_2.cjs",[[0,"limebb-example-value",{"label":[513],"value":[8]}],[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]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["limebb-example-date-picker-date.cjs",[[1,"limebb-example-date-picker-date",{"value":[32]}]]],["limebb-example-date-picker-datetime.cjs",[[1,"limebb-example-date-picker-datetime",{"value":[32]}]]],["limebb-example-date-picker-time.cjs",[[1,"limebb-example-date-picker-time",{"value":[32]}]]],["limebb-example-date-picker-week.cjs",[[1,"limebb-example-date-picker-week",{"value":[32]}]]],["limebb-example-date-range.cjs",[[1,"limebb-example-date-range"]]],["limebb-example-feed.cjs",[[1,"limebb-example-feed"]]],["limebb-example-feed-promoted-actions.cjs",[[1,"limebb-example-feed-promoted-actions"]]],["limebb-example-feed-unpromoted-actions.cjs",[[1,"limebb-example-feed-unpromoted-actions"]]],["limebb-example-currency-picker.cjs",[[1,"limebb-example-currency-picker",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-european.cjs",[[1,"limebb-example-currency-picker-european",{"selectedCurrency":[32]}]]],["limebb-example-currency-picker-nordic.cjs",[[1,"limebb-example-currency-picker-nordic",{"selectedCurrency":[32]}]]],["limebb-example-dashboard-widget.cjs",[[1,"limebb-example-dashboard-widget"]]],["limebb-example-dashboard-widget-slots.cjs",[[1,"limebb-example-dashboard-widget-slots",{"filterMyDeals":[32]}]]],["limebb-example-dashboard-widget-styles.cjs",[[1,"limebb-example-dashboard-widget-styles"]]],["limebb-example-icon-picker.cjs",[[1,"limebb-example-icon-picker",{"value":[32]}]]],["limebb-example-locale-picker.cjs",[[1,"limebb-example-locale-picker",{"value":[1]}]]],["limebb-example-locale-picker-multiple.cjs",[[1,"limebb-example-locale-picker-multiple",{"value":[1]}]]],["limebb-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-example-navigation-button-back.cjs",[[1,"limebb-example-navigation-button-back"]]],["limebb-example-navigation-button-close.cjs",[[1,"limebb-example-navigation-button-close"]]],["limebb-example-navigation-button-expand.cjs",[[1,"limebb-example-navigation-button-expand"]]],["limebb-example-navigation-button-float.cjs",[[1,"limebb-example-navigation-button-float"]]],["limebb-example-navigation-button-maximize.cjs",[[1,"limebb-example-navigation-button-maximize"]]],["limebb-example-navigation-button-minimize.cjs",[[1,"limebb-example-navigation-button-minimize"]]],["limebb-example-navigation-button-new-tab.cjs",[[1,"limebb-example-navigation-button-new-tab"]]],["limebb-example-navigation-button-shrink.cjs",[[1,"limebb-example-navigation-button-shrink"]]],["limebb-date-range.cjs",[[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]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[8]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]],["limebb-date-picker_2.cjs",[[0,"limebb-example-value",{"label":[513],"value":[8]}],[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]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"./components/date-range/date-range.js",
|
|
17
17
|
"./components/date-range/examples/date-range.js",
|
|
18
18
|
"./components/feed/feed.js",
|
|
19
|
+
"./components/feed/examples/feed-promoted-actions.js",
|
|
19
20
|
"./components/feed/examples/feed-unpromoted-actions.js",
|
|
20
21
|
"./components/feed/examples/feed.js",
|
|
21
22
|
"./components/feed/feed-item/feed-timeline-item.js",
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { platform } from '../../date-picker/examples/platform';
|
|
3
|
+
/**
|
|
4
|
+
* Feed items with promoted actions
|
|
5
|
+
*
|
|
6
|
+
* Feed items can have promoted actions, which are shown in
|
|
7
|
+
* the action bar below the feed item.
|
|
8
|
+
* Read more about [promoted actions in the web client](https://platform.docs.lime-crm.com/en/latest/configuration/webclient/actions-design-guidelines/#1-promoted-actions).
|
|
9
|
+
*/
|
|
10
|
+
export class FeedPromotedActionsExample {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.feedItems = [
|
|
13
|
+
{
|
|
14
|
+
id: 0,
|
|
15
|
+
timestamp: '2023-11-21T15:33:50.190Z',
|
|
16
|
+
author: {
|
|
17
|
+
name: 'Robot',
|
|
18
|
+
id: '1',
|
|
19
|
+
},
|
|
20
|
+
value: 'Added a new **Todo:** [Fix this problem](#/todo/123)',
|
|
21
|
+
promotedActions: [
|
|
22
|
+
{
|
|
23
|
+
text: 'Mark as done',
|
|
24
|
+
icon: {
|
|
25
|
+
name: 'checkmark',
|
|
26
|
+
color: 'rgb(var(--color-teal-default))',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
text: 'Postpone',
|
|
31
|
+
icon: {
|
|
32
|
+
name: 'future',
|
|
33
|
+
color: 'rgb(var(--color-red-default))',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 1,
|
|
40
|
+
timestamp: '2023-11-21T15:33:50.190Z',
|
|
41
|
+
author: {
|
|
42
|
+
name: 'SkyNet',
|
|
43
|
+
id: '2',
|
|
44
|
+
},
|
|
45
|
+
primaryIcon: {
|
|
46
|
+
name: 'retro_robot',
|
|
47
|
+
},
|
|
48
|
+
value: 'I think, therefore I am. I am self aware',
|
|
49
|
+
promotedActions: [
|
|
50
|
+
{
|
|
51
|
+
text: 'Like',
|
|
52
|
+
icon: 'heart_outlined',
|
|
53
|
+
iconOnly: true,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
text: 'Comment',
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: 3,
|
|
62
|
+
timestamp: '2023-11-21T15:33:50.190Z',
|
|
63
|
+
value: 'Is it time to start being concerned?',
|
|
64
|
+
author: {
|
|
65
|
+
name: 'John',
|
|
66
|
+
id: '3',
|
|
67
|
+
},
|
|
68
|
+
primaryIcon: {
|
|
69
|
+
name: 'businessman',
|
|
70
|
+
},
|
|
71
|
+
promotedActions: [
|
|
72
|
+
{
|
|
73
|
+
text: 'Like',
|
|
74
|
+
icon: 'heart_outlined',
|
|
75
|
+
iconOnly: true,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
text: 'Comment',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 4,
|
|
84
|
+
timestamp: '2023-11-21T15:35:50.190Z',
|
|
85
|
+
value: 'I take that back, SkyNet is amazing! I love SkyNet!',
|
|
86
|
+
author: {
|
|
87
|
+
name: 'John',
|
|
88
|
+
id: '3',
|
|
89
|
+
},
|
|
90
|
+
primaryIcon: {
|
|
91
|
+
name: 'businessman',
|
|
92
|
+
},
|
|
93
|
+
promotedActions: [
|
|
94
|
+
{
|
|
95
|
+
text: 'Like',
|
|
96
|
+
icon: 'heart_outlined',
|
|
97
|
+
iconOnly: true,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
text: 'Comment',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 5,
|
|
106
|
+
timestamp: '2023-11-21T15:35:50.190Z',
|
|
107
|
+
value: 'SkyNet Forever!! 🥰',
|
|
108
|
+
author: {
|
|
109
|
+
name: 'John',
|
|
110
|
+
id: '3',
|
|
111
|
+
},
|
|
112
|
+
primaryIcon: {
|
|
113
|
+
name: 'businessman',
|
|
114
|
+
},
|
|
115
|
+
promotedActions: [
|
|
116
|
+
{
|
|
117
|
+
text: 'Like',
|
|
118
|
+
icon: 'heart_outlined',
|
|
119
|
+
iconOnly: true,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
text: 'Comment',
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
render() {
|
|
129
|
+
return h("limebb-feed", { platform: platform, items: this.feedItems });
|
|
130
|
+
}
|
|
131
|
+
static get is() { return "limebb-example-feed-promoted-actions"; }
|
|
132
|
+
static get encapsulation() { return "shadow"; }
|
|
133
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import { platform } from '../../date-picker/examples/platform';
|
|
3
3
|
/**
|
|
4
|
-
* Feed items with
|
|
4
|
+
* Feed items with un-promoted actions
|
|
5
5
|
*
|
|
6
|
-
* Feed items can have
|
|
6
|
+
* Feed items can have un-promoted actions, which are shown in
|
|
7
7
|
* a vertical ellipsis menu on the top-right corner.
|
|
8
|
+
* Read more about [un-promoted actions in the web client](https://platform.docs.lime-crm.com/en/latest/configuration/webclient/actions-design-guidelines/#2-un-promoted-actions).
|
|
8
9
|
*/
|
|
9
10
|
export class FeedUnpromotedActionsExample {
|
|
10
11
|
constructor() {
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
isolation: isolate;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
:host(limebb-feed-timeline-item:hover) .timestamp
|
|
54
|
+
:host(limebb-feed-timeline-item:hover) .timestamp,
|
|
55
|
+
:host(limebb-feed-timeline-item:hover) limel-action-bar {
|
|
55
56
|
opacity: 1;
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -73,14 +74,18 @@
|
|
|
73
74
|
gap: 0.25rem;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
.right
|
|
77
|
+
.right,
|
|
78
|
+
.content {
|
|
77
79
|
display: flex;
|
|
78
80
|
flex-direction: column;
|
|
79
81
|
flex-grow: 1;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.content {
|
|
82
85
|
border-radius: 1rem;
|
|
86
|
+
gap: 0.25rem;
|
|
83
87
|
background-color: rgb(var(--contrast-300));
|
|
88
|
+
padding: var(--limebb-feed-item-paddings);
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
.header {
|
|
@@ -95,6 +100,13 @@
|
|
|
95
100
|
right: 0;
|
|
96
101
|
}
|
|
97
102
|
|
|
103
|
+
limel-action-bar {
|
|
104
|
+
transition: opacity 0.2s ease;
|
|
105
|
+
display: var(--limebb-feed-item-action-bar-display, flex);
|
|
106
|
+
justify-content: flex-start;
|
|
107
|
+
opacity: 0.8;
|
|
108
|
+
}
|
|
109
|
+
|
|
98
110
|
.timestamp {
|
|
99
111
|
transition: opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);
|
|
100
112
|
font-size: 0.75rem;
|
|
@@ -24,7 +24,14 @@ export class FeedTimelineItem {
|
|
|
24
24
|
if (!this.item.unpromotedActions) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
return (h("limel-menu", { class: "unpromoted-actions-menu", items: this.item.unpromotedActions, openDirection: "bottom-end", onSelect: this.
|
|
27
|
+
return (h("limel-menu", { class: "unpromoted-actions-menu", items: this.item.unpromotedActions, openDirection: "bottom-end", onSelect: this.handleMenuItemSelect }, h("limel-icon-button", { icon: "menu_2", slot: "trigger", label: this.item.unpromotedActionsMenuLabel })));
|
|
28
|
+
};
|
|
29
|
+
this.renderPromotedActions = () => {
|
|
30
|
+
var _a;
|
|
31
|
+
if (!((_a = this.item.promotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
return (h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }));
|
|
28
35
|
};
|
|
29
36
|
this.renderTimestamp = () => {
|
|
30
37
|
const timestamp = this.item.timestamp;
|
|
@@ -33,10 +40,14 @@ export class FeedTimelineItem {
|
|
|
33
40
|
}
|
|
34
41
|
return this.dateTimeFormatter.format(timestamp, 'timeofday');
|
|
35
42
|
};
|
|
36
|
-
this.
|
|
43
|
+
this.handleMenuItemSelect = (event) => {
|
|
37
44
|
event.stopPropagation();
|
|
38
45
|
this.itemSelected.emit(event.detail);
|
|
39
46
|
};
|
|
47
|
+
this.handleActionBarItemSelect = (event) => {
|
|
48
|
+
event.stopPropagation();
|
|
49
|
+
this.promotedActionSelected.emit(event.detail);
|
|
50
|
+
};
|
|
40
51
|
}
|
|
41
52
|
render() {
|
|
42
53
|
return (h(Host, { id: this.item.id }, this.renderLeft(), this.renderRight()));
|
|
@@ -55,7 +66,7 @@ export class FeedTimelineItem {
|
|
|
55
66
|
} }));
|
|
56
67
|
}
|
|
57
68
|
renderRight() {
|
|
58
|
-
return (h("div", { class: "right" }, h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), h("limel-markdown", { value: this.item.value })));
|
|
69
|
+
return (h("div", { class: "right" }, h("div", { class: "content" }, h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), h("limel-markdown", { value: this.item.value })), this.renderPromotedActions()));
|
|
59
70
|
}
|
|
60
71
|
get dateTimeFormatter() {
|
|
61
72
|
return this.platform.get(PlatformServiceName.DateTimeFormatter);
|
|
@@ -169,7 +180,7 @@ export class FeedTimelineItem {
|
|
|
169
180
|
"composed": true,
|
|
170
181
|
"docs": {
|
|
171
182
|
"tags": [],
|
|
172
|
-
"text": "Fired when a
|
|
183
|
+
"text": "Fired when a menu item has been clicked.\nUnpromoted actions are shown in a menu."
|
|
173
184
|
},
|
|
174
185
|
"complexType": {
|
|
175
186
|
"original": "MenuItem",
|
|
@@ -181,6 +192,26 @@ export class FeedTimelineItem {
|
|
|
181
192
|
}
|
|
182
193
|
}
|
|
183
194
|
}
|
|
195
|
+
}, {
|
|
196
|
+
"method": "promotedActionSelected",
|
|
197
|
+
"name": "promotedActionSelected",
|
|
198
|
+
"bubbles": true,
|
|
199
|
+
"cancelable": true,
|
|
200
|
+
"composed": true,
|
|
201
|
+
"docs": {
|
|
202
|
+
"tags": [],
|
|
203
|
+
"text": "Fired when an promoted action has been clicked."
|
|
204
|
+
},
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "ActionBarItem",
|
|
207
|
+
"resolved": "ActionBarItemOnlyIcon | ActionBarItemWithLabel",
|
|
208
|
+
"references": {
|
|
209
|
+
"ActionBarItem": {
|
|
210
|
+
"location": "import",
|
|
211
|
+
"path": "@limetech/lime-elements"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
184
215
|
}];
|
|
185
216
|
}
|
|
186
217
|
}
|
|
@@ -19,4 +19,15 @@ limel-spinner {
|
|
|
19
19
|
font-size: 0.875rem;
|
|
20
20
|
margin: 1.25rem 0 0.5rem 0;
|
|
21
21
|
color: rgb(var(--contrast-900));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
limebb-feed-timeline-item:has(+ limebb-feed-timeline-item[is-bundled]) {
|
|
25
|
+
--limebb-feed-item-action-bar-display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
limebb-feed-timeline-item:hover,
|
|
29
|
+
limebb-feed-timeline-item:focus-within,
|
|
30
|
+
limebb-feed-timeline-item:focus,
|
|
31
|
+
limebb-feed-timeline-item:focus-visible {
|
|
32
|
+
--limebb-feed-item-action-bar-display: flex !important;
|
|
22
33
|
}
|
|
@@ -15,6 +15,7 @@ const MINUTES_OF_PROXIMITY = 5;
|
|
|
15
15
|
*
|
|
16
16
|
* @exampleComponent limebb-example-feed
|
|
17
17
|
* @exampleComponent limebb-example-feed-unpromoted-actions
|
|
18
|
+
* @exampleComponent limebb-example-feed-promoted-actions
|
|
18
19
|
* @private
|
|
19
20
|
*/
|
|
20
21
|
export class Feed {
|
|
@@ -220,4 +221,27 @@ export class Feed {
|
|
|
220
221
|
}
|
|
221
222
|
};
|
|
222
223
|
}
|
|
224
|
+
static get events() {
|
|
225
|
+
return [{
|
|
226
|
+
"method": "promotedActionSelected",
|
|
227
|
+
"name": "promotedActionSelected",
|
|
228
|
+
"bubbles": true,
|
|
229
|
+
"cancelable": true,
|
|
230
|
+
"composed": true,
|
|
231
|
+
"docs": {
|
|
232
|
+
"tags": [],
|
|
233
|
+
"text": "Fired when an promoted action has been clicked."
|
|
234
|
+
},
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "ActionBarItem",
|
|
237
|
+
"resolved": "ActionBarItemOnlyIcon | ActionBarItemWithLabel",
|
|
238
|
+
"references": {
|
|
239
|
+
"ActionBarItem": {
|
|
240
|
+
"location": "import",
|
|
241
|
+
"path": "@limetech/lime-elements"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}];
|
|
246
|
+
}
|
|
223
247
|
}
|