@limetech/lime-crm-building-blocks 1.17.2 → 1.19.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/{feed-items-05074eea.js → feed-items-3d594b85.js} +4 -4
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-example-feed-author-picture.cjs.entry.js +51 -0
- package/dist/cjs/limebb-example-feed-load-more.cjs.entry.js +1 -1
- package/dist/cjs/limebb-example-feed-promoted-actions.cjs.entry.js +4 -4
- package/dist/cjs/limebb-example-feed-relations.cjs.entry.js +46 -0
- package/dist/cjs/limebb-example-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed_2.cjs.entry.js +27 -9
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/feed/examples/feed-author-picture.js +58 -0
- package/dist/collection/components/feed/examples/feed-items.js +4 -4
- package/dist/collection/components/feed/examples/feed-promoted-actions.js +4 -4
- package/dist/collection/components/feed/examples/feed-relations.js +42 -0
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +16 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +26 -8
- package/dist/collection/components/feed/feed.js +2 -0
- package/dist/components/feed-items.js +4 -4
- package/dist/components/feed-timeline-item.js +27 -9
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/limebb-example-feed-author-picture.d.ts +11 -0
- package/dist/components/limebb-example-feed-author-picture.js +74 -0
- package/dist/components/limebb-example-feed-promoted-actions.js +4 -4
- package/dist/components/limebb-example-feed-relations.d.ts +11 -0
- package/dist/components/limebb-example-feed-relations.js +69 -0
- package/dist/esm/{feed-items-5da3aba6.js → feed-items-392f557e.js} +4 -4
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-example-feed-author-picture.entry.js +47 -0
- package/dist/esm/limebb-example-feed-load-more.entry.js +1 -1
- package/dist/esm/limebb-example-feed-promoted-actions.entry.js +4 -4
- package/dist/esm/limebb-example-feed-relations.entry.js +42 -0
- package/dist/esm/limebb-example-feed.entry.js +1 -1
- package/dist/esm/limebb-feed_2.entry.js +27 -9
- 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-382bd587.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-3e2bdb3c.entry.js → p-3f9f5b8a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-4b65e8b0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-66d62349.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-90b654a4.js +1 -0
- package/dist/lime-crm-building-blocks/{p-c03c85c9.entry.js → p-96af3ded.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-e53823d4.entry.js +1 -0
- package/dist/types/components/feed/examples/feed-author-picture.d.ts +20 -0
- package/dist/types/components/feed/examples/feed-relations.d.ts +9 -0
- package/dist/types/components/feed/feed-item/feed-item.types.d.ts +14 -1
- package/dist/types/components/feed/feed-item/feed-timeline-item.d.ts +3 -1
- package/dist/types/components/feed/feed.d.ts +2 -0
- package/dist/types/components.d.ts +26 -0
- package/package.json +1 -1
- package/dist/lime-crm-building-blocks/p-53ef3446.js +0 -1
- package/dist/lime-crm-building-blocks/p-7b6b38ac.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a546f5ed.entry.js +0 -1
|
@@ -9,7 +9,7 @@ const feedItems = [
|
|
|
9
9
|
id: '0',
|
|
10
10
|
},
|
|
11
11
|
value: 'The [customer](https://ikea.se) is really angry guys!',
|
|
12
|
-
|
|
12
|
+
icon: {
|
|
13
13
|
name: 'user_female',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
@@ -21,7 +21,7 @@ const feedItems = [
|
|
|
21
21
|
id: '1',
|
|
22
22
|
},
|
|
23
23
|
value: 'I called the customer. They are _really happy_ now! 🥳',
|
|
24
|
-
|
|
24
|
+
icon: {
|
|
25
25
|
name: 'user_male',
|
|
26
26
|
},
|
|
27
27
|
},
|
|
@@ -33,7 +33,7 @@ const feedItems = [
|
|
|
33
33
|
name: 'John',
|
|
34
34
|
id: '2',
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
icon: {
|
|
37
37
|
name: 'businessman',
|
|
38
38
|
},
|
|
39
39
|
},
|
|
@@ -45,7 +45,7 @@ const feedItems = [
|
|
|
45
45
|
name: 'John',
|
|
46
46
|
id: '2',
|
|
47
47
|
},
|
|
48
|
-
|
|
48
|
+
icon: {
|
|
49
49
|
name: 'businessman',
|
|
50
50
|
},
|
|
51
51
|
},
|
|
@@ -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-author.cjs",[[1,"limebb-example-feed-author"]]],["limebb-example-feed-load-more.cjs",[[1,"limebb-example-feed-load-more",{"objectIds":[32]}]]],["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-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-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]}]]],["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-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]]], 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-author.cjs",[[1,"limebb-example-feed-author"]]],["limebb-example-feed-author-picture.cjs",[[1,"limebb-example-feed-author-picture"]]],["limebb-example-feed-load-more.cjs",[[1,"limebb-example-feed-load-more",{"objectIds":[32]}]]],["limebb-example-feed-promoted-actions.cjs",[[1,"limebb-example-feed-promoted-actions"]]],["limebb-example-feed-relations.cjs",[[1,"limebb-example-feed-relations"]]],["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-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-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]}]]],["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-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]]], options);
|
|
19
19
|
});
|
|
@@ -0,0 +1,51 @@
|
|
|
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 FeedExampleAuthorPicture = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.feedItems = [
|
|
15
|
+
{
|
|
16
|
+
id: 3,
|
|
17
|
+
timestamp: new Date(),
|
|
18
|
+
author: {
|
|
19
|
+
name: {
|
|
20
|
+
text: 'Kiarokh',
|
|
21
|
+
href: 'https://se.linkedin.com/in/kiarokh',
|
|
22
|
+
},
|
|
23
|
+
id: 'c',
|
|
24
|
+
picture: 'https://media.licdn.com/dms/image/C5603AQHyfel1WxI-CA/profile-displayphoto-shrink_400_400/0/1516495637847?e=2147483647&v=beta&t=OaT_dog4w0a-Fku_rzAo5fJABs3G3d-mRL84PQXYMcQ',
|
|
25
|
+
},
|
|
26
|
+
value: 'I have no icons.',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: 4,
|
|
30
|
+
timestamp: new Date(),
|
|
31
|
+
author: {
|
|
32
|
+
name: {
|
|
33
|
+
text: 'Lucy',
|
|
34
|
+
href: 'https://www.linkedin.com/in/liudmylachyzhova/',
|
|
35
|
+
},
|
|
36
|
+
id: 'd',
|
|
37
|
+
picture: 'https://media.licdn.com/dms/image/C4E03AQE_Oz17VBEKlg/profile-displayphoto-shrink_200_200/0/1568922646681?e=1706745600&v=beta&t=-lTQQAgvdQZhtIrgs-5atV6O7kDKf3eSOmYsJ2Lhous',
|
|
38
|
+
},
|
|
39
|
+
value: 'If you have an avatar, it does not mean that you cannot have an icon too.',
|
|
40
|
+
icon: {
|
|
41
|
+
name: 'create_new_child_post',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
return index.h("limebb-feed", { platform: platform.platform, items: this.feedItems });
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.limebb_example_feed_author_picture = FeedExampleAuthorPicture;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4d2d0bc6.js');
|
|
6
6
|
const platform = require('./platform-03bfc9aa.js');
|
|
7
|
-
const feedItems = require('./feed-items-
|
|
7
|
+
const feedItems = require('./feed-items-3d594b85.js');
|
|
8
8
|
const _baseMap = require('./_baseMap-ad8d0cef.js');
|
|
9
9
|
const _nodeUtil = require('./_nodeUtil-d0211145.js');
|
|
10
10
|
require('./types-5e2d281d.js');
|
|
@@ -48,7 +48,7 @@ const FeedExamplePromotedActions = class {
|
|
|
48
48
|
name: 'SkyNet',
|
|
49
49
|
id: '2',
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
icon: {
|
|
52
52
|
name: 'retro_robot',
|
|
53
53
|
},
|
|
54
54
|
value: 'I think, therefore I am. I am self aware',
|
|
@@ -71,7 +71,7 @@ const FeedExamplePromotedActions = class {
|
|
|
71
71
|
name: 'John',
|
|
72
72
|
id: '3',
|
|
73
73
|
},
|
|
74
|
-
|
|
74
|
+
icon: {
|
|
75
75
|
name: 'businessman',
|
|
76
76
|
},
|
|
77
77
|
promotedActions: [
|
|
@@ -93,7 +93,7 @@ const FeedExamplePromotedActions = class {
|
|
|
93
93
|
name: 'John',
|
|
94
94
|
id: '3',
|
|
95
95
|
},
|
|
96
|
-
|
|
96
|
+
icon: {
|
|
97
97
|
name: 'businessman',
|
|
98
98
|
},
|
|
99
99
|
promotedActions: [
|
|
@@ -115,7 +115,7 @@ const FeedExamplePromotedActions = class {
|
|
|
115
115
|
name: 'John',
|
|
116
116
|
id: '3',
|
|
117
117
|
},
|
|
118
|
-
|
|
118
|
+
icon: {
|
|
119
119
|
name: 'businessman',
|
|
120
120
|
},
|
|
121
121
|
promotedActions: [
|
|
@@ -0,0 +1,46 @@
|
|
|
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 FeedExampleRelations = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.feedItems = [
|
|
15
|
+
{
|
|
16
|
+
id: 0,
|
|
17
|
+
timestamp: new Date(),
|
|
18
|
+
author: { id: '1', name: 'Lucy' },
|
|
19
|
+
value: 'Could you take a look at this ticket [#31018701](/object/sos/31018701)?',
|
|
20
|
+
relations: [
|
|
21
|
+
{
|
|
22
|
+
id: 1,
|
|
23
|
+
text: 'Agreement',
|
|
24
|
+
icon: {
|
|
25
|
+
name: 'new_document',
|
|
26
|
+
},
|
|
27
|
+
href: '/object/document/6946',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 2,
|
|
31
|
+
text: 'FourOffice AB',
|
|
32
|
+
icon: {
|
|
33
|
+
name: 'organization',
|
|
34
|
+
},
|
|
35
|
+
href: '/object/company/2490901',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
render() {
|
|
42
|
+
return (index.h("limebb-feed", { platform: platform.platform, items: this.feedItems }));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.limebb_example_feed_relations = FeedExampleRelations;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-4d2d0bc6.js');
|
|
6
6
|
const platform = require('./platform-03bfc9aa.js');
|
|
7
|
-
const feedItems = require('./feed-items-
|
|
7
|
+
const feedItems = require('./feed-items-3d594b85.js');
|
|
8
8
|
require('./types-5e2d281d.js');
|
|
9
9
|
require('./index-9497280d.js');
|
|
10
10
|
require('./index-eded45a5.js');
|
|
@@ -195,7 +195,7 @@ const Feed = class {
|
|
|
195
195
|
};
|
|
196
196
|
Feed.style = feedCss;
|
|
197
197
|
|
|
198
|
-
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,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.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;gap:0.5rem}.has-unpromoted-actions .header{padding-right:2rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.
|
|
198
|
+
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,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.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;gap:0.5rem}.has-unpromoted-actions .header{padding-right:2rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.icon{width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.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)}limel-chip-set{margin-left:-1rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}";
|
|
199
199
|
|
|
200
200
|
const FeedTimelineItem = class {
|
|
201
201
|
constructor(hostRef) {
|
|
@@ -209,6 +209,13 @@ const FeedTimelineItem = class {
|
|
|
209
209
|
* Bundled items display less visual details.
|
|
210
210
|
*/
|
|
211
211
|
this.isBundled = false;
|
|
212
|
+
this.renderRelations = () => {
|
|
213
|
+
var _a, _b;
|
|
214
|
+
if (!((_a = this.item) === null || _a === void 0 ? void 0 : _a.relations)) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
return index$1.h("limel-chip-set", { value: (_b = this.item) === null || _b === void 0 ? void 0 : _b.relations });
|
|
218
|
+
};
|
|
212
219
|
this.handleMenuItemSelect = (event) => {
|
|
213
220
|
event.stopPropagation();
|
|
214
221
|
this.itemSelected.emit(event.detail);
|
|
@@ -219,26 +226,30 @@ const FeedTimelineItem = class {
|
|
|
219
226
|
};
|
|
220
227
|
}
|
|
221
228
|
render() {
|
|
222
|
-
var _a;
|
|
229
|
+
var _a, _b;
|
|
223
230
|
return (index$1.h(index$1.Host, { id: this.item.id, class: {
|
|
224
231
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
232
|
+
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
225
233
|
} }, this.renderBadgeAndTimestamp(), this.renderContent()));
|
|
226
234
|
}
|
|
227
235
|
renderBadgeAndTimestamp() {
|
|
228
|
-
return (index$1.h("div", { class: "left" }, this.
|
|
236
|
+
return (index$1.h("div", { class: "left" }, this.renderAuthorPicture(), this.renderIcon(), index$1.h("span", { class: "timestamp" }, this.renderTimestamp())));
|
|
229
237
|
}
|
|
230
|
-
|
|
231
|
-
var _a, _b, _c, _d;
|
|
238
|
+
renderIcon() {
|
|
239
|
+
var _a, _b, _c, _d, _e;
|
|
232
240
|
if (this.isBundled) {
|
|
233
241
|
return;
|
|
234
242
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
243
|
+
if (!this.item.icon && ((_a = this.item.author) === null || _a === void 0 ? void 0 : _a.picture)) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
return (index$1.h("limel-icon", { class: "icon", badge: true, name: (_c = (_b = this.item.icon) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'dot_circle', style: {
|
|
247
|
+
color: `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.color}`,
|
|
248
|
+
'--icon-background-color': `${(_e = this.item.icon) === null || _e === void 0 ? void 0 : _e.backgroundColor}`,
|
|
238
249
|
} }));
|
|
239
250
|
}
|
|
240
251
|
renderContent() {
|
|
241
|
-
return (index$1.h("div", { class: "right" }, index$1.h("div", { class: "content" }, index$1.h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), this.renderValue()), this.renderPromotedActions()));
|
|
252
|
+
return (index$1.h("div", { class: "right" }, index$1.h("div", { class: "content" }, index$1.h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
242
253
|
}
|
|
243
254
|
renderAuthor() {
|
|
244
255
|
if (!this.item.author || this.isBundled) {
|
|
@@ -252,6 +263,13 @@ const FeedTimelineItem = class {
|
|
|
252
263
|
return (index$1.h("a", { class: "author", href: href, title: title }, text));
|
|
253
264
|
}
|
|
254
265
|
}
|
|
266
|
+
renderAuthorPicture() {
|
|
267
|
+
var _a;
|
|
268
|
+
if (!((_a = this.item.author) === null || _a === void 0 ? void 0 : _a.picture)) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
return index$1.h("img", { loading: "lazy", src: this.item.author.picture });
|
|
272
|
+
}
|
|
255
273
|
renderValue() {
|
|
256
274
|
if (!this.item.value) {
|
|
257
275
|
return;
|
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-author.cjs",[[1,"limebb-example-feed-author"]]],["limebb-example-feed-load-more.cjs",[[1,"limebb-example-feed-load-more",{"objectIds":[32]}]]],["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-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-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]}]]],["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-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]]], 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-author.cjs",[[1,"limebb-example-feed-author"]]],["limebb-example-feed-author-picture.cjs",[[1,"limebb-example-feed-author-picture"]]],["limebb-example-feed-load-more.cjs",[[1,"limebb-example-feed-load-more",{"objectIds":[32]}]]],["limebb-example-feed-promoted-actions.cjs",[[1,"limebb-example-feed-promoted-actions"]]],["limebb-example-feed-relations.cjs",[[1,"limebb-example-feed-relations"]]],["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-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-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]}]]],["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-feed_2.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"]}],[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"isBundled":[516,"is-bundled"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -16,9 +16,11 @@
|
|
|
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-author-picture.js",
|
|
19
20
|
"./components/feed/examples/feed-author.js",
|
|
20
21
|
"./components/feed/examples/feed-load-more.js",
|
|
21
22
|
"./components/feed/examples/feed-promoted-actions.js",
|
|
23
|
+
"./components/feed/examples/feed-relations.js",
|
|
22
24
|
"./components/feed/examples/feed-unpromoted-actions.js",
|
|
23
25
|
"./components/feed/examples/feed.js",
|
|
24
26
|
"./components/feed/feed-item/feed-timeline-item.js",
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { platform } from '../../date-picker/examples/platform';
|
|
3
|
+
/**
|
|
4
|
+
* The `author` picture
|
|
5
|
+
* If you provide a URL to an image file for the `picture` property of the `author`,
|
|
6
|
+
* the image will be displayed instead of the default icon.
|
|
7
|
+
*
|
|
8
|
+
* However, you can always choose to have an icon next to the author's picture.
|
|
9
|
+
* In this case, the icon will be rendered slightly smaller than usual.
|
|
10
|
+
*
|
|
11
|
+
* :::important
|
|
12
|
+
* The component already supports lazy loading of images by default.
|
|
13
|
+
* However, the lazy loading is supported for more up-to-date browsers.
|
|
14
|
+
*
|
|
15
|
+
* Despite this, make sure to optimize the pictures that you link to,
|
|
16
|
+
* to avoid performance issues!
|
|
17
|
+
* :::
|
|
18
|
+
*/
|
|
19
|
+
export class FeedExampleAuthorPicture {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.feedItems = [
|
|
22
|
+
{
|
|
23
|
+
id: 3,
|
|
24
|
+
timestamp: new Date(),
|
|
25
|
+
author: {
|
|
26
|
+
name: {
|
|
27
|
+
text: 'Kiarokh',
|
|
28
|
+
href: 'https://se.linkedin.com/in/kiarokh',
|
|
29
|
+
},
|
|
30
|
+
id: 'c',
|
|
31
|
+
picture: 'https://media.licdn.com/dms/image/C5603AQHyfel1WxI-CA/profile-displayphoto-shrink_400_400/0/1516495637847?e=2147483647&v=beta&t=OaT_dog4w0a-Fku_rzAo5fJABs3G3d-mRL84PQXYMcQ',
|
|
32
|
+
},
|
|
33
|
+
value: 'I have no icons.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 4,
|
|
37
|
+
timestamp: new Date(),
|
|
38
|
+
author: {
|
|
39
|
+
name: {
|
|
40
|
+
text: 'Lucy',
|
|
41
|
+
href: 'https://www.linkedin.com/in/liudmylachyzhova/',
|
|
42
|
+
},
|
|
43
|
+
id: 'd',
|
|
44
|
+
picture: 'https://media.licdn.com/dms/image/C4E03AQE_Oz17VBEKlg/profile-displayphoto-shrink_200_200/0/1568922646681?e=1706745600&v=beta&t=-lTQQAgvdQZhtIrgs-5atV6O7kDKf3eSOmYsJ2Lhous',
|
|
45
|
+
},
|
|
46
|
+
value: 'If you have an avatar, it does not mean that you cannot have an icon too.',
|
|
47
|
+
icon: {
|
|
48
|
+
name: 'create_new_child_post',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return h("limebb-feed", { platform: platform, items: this.feedItems });
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "limebb-example-feed-author-picture"; }
|
|
57
|
+
static get encapsulation() { return "shadow"; }
|
|
58
|
+
}
|
|
@@ -7,7 +7,7 @@ export const feedItems = [
|
|
|
7
7
|
id: '0',
|
|
8
8
|
},
|
|
9
9
|
value: 'The [customer](https://ikea.se) is really angry guys!',
|
|
10
|
-
|
|
10
|
+
icon: {
|
|
11
11
|
name: 'user_female',
|
|
12
12
|
},
|
|
13
13
|
},
|
|
@@ -19,7 +19,7 @@ export const feedItems = [
|
|
|
19
19
|
id: '1',
|
|
20
20
|
},
|
|
21
21
|
value: 'I called the customer. They are _really happy_ now! 🥳',
|
|
22
|
-
|
|
22
|
+
icon: {
|
|
23
23
|
name: 'user_male',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
@@ -31,7 +31,7 @@ export const feedItems = [
|
|
|
31
31
|
name: 'John',
|
|
32
32
|
id: '2',
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
icon: {
|
|
35
35
|
name: 'businessman',
|
|
36
36
|
},
|
|
37
37
|
},
|
|
@@ -43,7 +43,7 @@ export const feedItems = [
|
|
|
43
43
|
name: 'John',
|
|
44
44
|
id: '2',
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
icon: {
|
|
47
47
|
name: 'businessman',
|
|
48
48
|
},
|
|
49
49
|
},
|
|
@@ -46,7 +46,7 @@ export class FeedExamplePromotedActions {
|
|
|
46
46
|
name: 'SkyNet',
|
|
47
47
|
id: '2',
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
icon: {
|
|
50
50
|
name: 'retro_robot',
|
|
51
51
|
},
|
|
52
52
|
value: 'I think, therefore I am. I am self aware',
|
|
@@ -69,7 +69,7 @@ export class FeedExamplePromotedActions {
|
|
|
69
69
|
name: 'John',
|
|
70
70
|
id: '3',
|
|
71
71
|
},
|
|
72
|
-
|
|
72
|
+
icon: {
|
|
73
73
|
name: 'businessman',
|
|
74
74
|
},
|
|
75
75
|
promotedActions: [
|
|
@@ -91,7 +91,7 @@ export class FeedExamplePromotedActions {
|
|
|
91
91
|
name: 'John',
|
|
92
92
|
id: '3',
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
icon: {
|
|
95
95
|
name: 'businessman',
|
|
96
96
|
},
|
|
97
97
|
promotedActions: [
|
|
@@ -113,7 +113,7 @@ export class FeedExamplePromotedActions {
|
|
|
113
113
|
name: 'John',
|
|
114
114
|
id: '3',
|
|
115
115
|
},
|
|
116
|
-
|
|
116
|
+
icon: {
|
|
117
117
|
name: 'businessman',
|
|
118
118
|
},
|
|
119
119
|
promotedActions: [
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { platform } from '../../date-picker/examples/platform';
|
|
3
|
+
/**
|
|
4
|
+
* Feed items with relations
|
|
5
|
+
*
|
|
6
|
+
* Feed items can have relations, that are shown after the markdown component.
|
|
7
|
+
*/
|
|
8
|
+
export class FeedExampleRelations {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.feedItems = [
|
|
11
|
+
{
|
|
12
|
+
id: 0,
|
|
13
|
+
timestamp: new Date(),
|
|
14
|
+
author: { id: '1', name: 'Lucy' },
|
|
15
|
+
value: 'Could you take a look at this ticket [#31018701](/object/sos/31018701)?',
|
|
16
|
+
relations: [
|
|
17
|
+
{
|
|
18
|
+
id: 1,
|
|
19
|
+
text: 'Agreement',
|
|
20
|
+
icon: {
|
|
21
|
+
name: 'new_document',
|
|
22
|
+
},
|
|
23
|
+
href: '/object/document/6946',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 2,
|
|
27
|
+
text: 'FourOffice AB',
|
|
28
|
+
icon: {
|
|
29
|
+
name: 'organization',
|
|
30
|
+
},
|
|
31
|
+
href: '/object/company/2490901',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return (h("limebb-feed", { platform: platform, items: this.feedItems }));
|
|
39
|
+
}
|
|
40
|
+
static get is() { return "limebb-example-feed-relations"; }
|
|
41
|
+
static get encapsulation() { return "shadow"; }
|
|
42
|
+
}
|
|
@@ -110,10 +110,21 @@
|
|
|
110
110
|
text-align: center;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.icon {
|
|
114
114
|
width: 2rem;
|
|
115
115
|
padding: 0.125rem;
|
|
116
116
|
}
|
|
117
|
+
:host(.has-author-picture) .icon {
|
|
118
|
+
width: 1.5rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
img {
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
width: 2rem;
|
|
124
|
+
height: 2rem;
|
|
125
|
+
object-fit: cover;
|
|
126
|
+
box-shadow: 0 0 0 1px rgb(var(--contrast-600));
|
|
127
|
+
}
|
|
117
128
|
|
|
118
129
|
.author {
|
|
119
130
|
font-weight: bold;
|
|
@@ -147,6 +158,10 @@ a.author:hover:before {
|
|
|
147
158
|
transform: scale(1);
|
|
148
159
|
}
|
|
149
160
|
|
|
161
|
+
limel-chip-set {
|
|
162
|
+
margin-left: -1rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
150
165
|
limel-action-bar {
|
|
151
166
|
--action-bar-item-height: 1.75rem;
|
|
152
167
|
transition: opacity 0.2s ease;
|
|
@@ -14,6 +14,13 @@ export class FeedTimelineItem {
|
|
|
14
14
|
* Bundled items display less visual details.
|
|
15
15
|
*/
|
|
16
16
|
this.isBundled = false;
|
|
17
|
+
this.renderRelations = () => {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
if (!((_a = this.item) === null || _a === void 0 ? void 0 : _a.relations)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
return h("limel-chip-set", { value: (_b = this.item) === null || _b === void 0 ? void 0 : _b.relations });
|
|
23
|
+
};
|
|
17
24
|
this.handleMenuItemSelect = (event) => {
|
|
18
25
|
event.stopPropagation();
|
|
19
26
|
this.itemSelected.emit(event.detail);
|
|
@@ -24,26 +31,30 @@ export class FeedTimelineItem {
|
|
|
24
31
|
};
|
|
25
32
|
}
|
|
26
33
|
render() {
|
|
27
|
-
var _a;
|
|
34
|
+
var _a, _b;
|
|
28
35
|
return (h(Host, { id: this.item.id, class: {
|
|
29
36
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
37
|
+
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
30
38
|
} }, this.renderBadgeAndTimestamp(), this.renderContent()));
|
|
31
39
|
}
|
|
32
40
|
renderBadgeAndTimestamp() {
|
|
33
|
-
return (h("div", { class: "left" }, this.
|
|
41
|
+
return (h("div", { class: "left" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp())));
|
|
34
42
|
}
|
|
35
|
-
|
|
36
|
-
var _a, _b, _c, _d;
|
|
43
|
+
renderIcon() {
|
|
44
|
+
var _a, _b, _c, _d, _e;
|
|
37
45
|
if (this.isBundled) {
|
|
38
46
|
return;
|
|
39
47
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
if (!this.item.icon && ((_a = this.item.author) === null || _a === void 0 ? void 0 : _a.picture)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
return (h("limel-icon", { class: "icon", badge: true, name: (_c = (_b = this.item.icon) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'dot_circle', style: {
|
|
52
|
+
color: `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.color}`,
|
|
53
|
+
'--icon-background-color': `${(_e = this.item.icon) === null || _e === void 0 ? void 0 : _e.backgroundColor}`,
|
|
43
54
|
} }));
|
|
44
55
|
}
|
|
45
56
|
renderContent() {
|
|
46
|
-
return (h("div", { class: "right" }, h("div", { class: "content" }, h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), this.renderValue()), this.renderPromotedActions()));
|
|
57
|
+
return (h("div", { class: "right" }, h("div", { class: "content" }, h("div", { class: "header" }, this.renderAuthor(), this.renderUnpromotedActionsMenu()), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
47
58
|
}
|
|
48
59
|
renderAuthor() {
|
|
49
60
|
if (!this.item.author || this.isBundled) {
|
|
@@ -57,6 +68,13 @@ export class FeedTimelineItem {
|
|
|
57
68
|
return (h("a", { class: "author", href: href, title: title }, text));
|
|
58
69
|
}
|
|
59
70
|
}
|
|
71
|
+
renderAuthorPicture() {
|
|
72
|
+
var _a;
|
|
73
|
+
if (!((_a = this.item.author) === null || _a === void 0 ? void 0 : _a.picture)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
return h("img", { loading: "lazy", src: this.item.author.picture });
|
|
77
|
+
}
|
|
60
78
|
renderValue() {
|
|
61
79
|
if (!this.item.value) {
|
|
62
80
|
return;
|
|
@@ -16,8 +16,10 @@ const MINUTES_OF_PROXIMITY = 5;
|
|
|
16
16
|
* @exampleComponent limebb-example-feed
|
|
17
17
|
* @exampleComponent limebb-example-feed-load-more
|
|
18
18
|
* @exampleComponent limebb-example-feed-author
|
|
19
|
+
* @exampleComponent limebb-example-feed-author-picture
|
|
19
20
|
* @exampleComponent limebb-example-feed-unpromoted-actions
|
|
20
21
|
* @exampleComponent limebb-example-feed-promoted-actions
|
|
22
|
+
* @exampleComponent limebb-example-feed-relations
|
|
21
23
|
* @private
|
|
22
24
|
*/
|
|
23
25
|
export class Feed {
|