@limetech/lime-crm-building-blocks 1.40.0 → 1.41.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 +16 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +3 -15
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -5
- package/dist/cjs/limebb-notification-item.cjs.entry.js +142 -0
- package/dist/cjs/limebb-notification-list.cjs.entry.js +101 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +0 -21
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +3 -37
- package/dist/collection/components/feed/feed.js +1 -25
- package/dist/collection/components/notification-list/notification-item/notification-item.css +245 -0
- package/dist/collection/components/notification-list/notification-item/notification-item.js +241 -0
- package/dist/collection/components/notification-list/notification-item/notification-item.types.js +1 -0
- package/dist/collection/components/notification-list/notification-list.css +63 -0
- package/dist/collection/components/notification-list/notification-list.js +292 -0
- package/dist/components/feed-timeline-item.js +4 -16
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/limebb-feed.js +1 -5
- package/dist/components/limebb-notification-item.d.ts +11 -0
- package/dist/components/limebb-notification-item.js +6 -0
- package/dist/components/limebb-notification-list.d.ts +11 -0
- package/dist/components/limebb-notification-list.js +129 -0
- package/dist/components/notification-item.js +157 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +4 -16
- package/dist/esm/limebb-feed.entry.js +1 -5
- package/dist/esm/limebb-notification-item.entry.js +138 -0
- package/dist/esm/limebb-notification-list.entry.js +97 -0
- 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-30dfc569.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-3d6f678d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-4c667ff0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-614794d2.entry.js +1 -0
- package/dist/types/components/feed/feed-item/feed-item.types.d.ts +0 -6
- package/dist/types/components/feed/feed-item/feed-timeline-item.d.ts +0 -6
- package/dist/types/components/feed/feed.d.ts +0 -6
- package/dist/types/components/notification-list/notification-item/notification-item.d.ts +46 -0
- package/dist/types/components/notification-list/notification-item/notification-item.types.d.ts +19 -0
- package/dist/types/components/notification-list/notification-list.d.ts +67 -0
- package/dist/types/components.d.ts +135 -12
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-8d2b77e3.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-f0fb2a63.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.41.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.40.1...v1.41.0) (2024-08-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **notification-list:** add new component ([922e372](https://github.com/Lundalogik/lime-crm-building-blocks/commit/922e3724035a5af487fbacfcfa324561a0e62962))
|
|
8
|
+
|
|
9
|
+
### [1.40.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.40.0...v1.40.1) (2024-08-26)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Reverts
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
* Revert "feat(feed): make items optionally clickable" ([7ad6487](https://github.com/Lundalogik/lime-crm-building-blocks/commit/7ad648793e28d00e9cca05dc0a10c275615004e9))
|
|
16
|
+
|
|
1
17
|
## [1.40.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.39.0...v1.40.0) (2024-08-26)
|
|
2
18
|
|
|
3
19
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"paginationSize":[2,"pagination-size"],"groupBy":[513,"group-by"],"groups":[16]}]]],["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-feed.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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[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":[16]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4],"paginationSize":[2,"pagination-size"],"displayedItemCount":[32]}]]],["limebb-date-picker.cjs",[[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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"paginationSize":[2,"pagination-size"],"groupBy":[513,"group-by"],"groups":[16]}]]],["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-feed.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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[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":[16]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4],"paginationSize":[2,"pagination-size"],"displayedItemCount":[32]}]]],["limebb-date-picker.cjs",[[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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]]], options);
|
|
19
19
|
});
|
|
@@ -5,12 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-5aaf6970.js');
|
|
6
6
|
const types = require('./types-c7646c23.js');
|
|
7
7
|
|
|
8
|
-
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{color:rgb(var(--contrast-1100))}: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:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;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;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover{color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem}.icon{--icon-background-color:var(--limebb-feed-background-color);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;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}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}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:\"\";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item.is-clickable[ui=standard]) .content,:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:\"\";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(1.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item[ui=thread-message]) .content:hover .thread-effects{transform:translate3d(-0.325rem, -0.3rem, 0) rotate(1.5deg)}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}.content{position:relative}.content:before,.content:after{content:\"\";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}:host(limebb-feed-timeline-item.is-clickable) .content{cursor:pointer;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-feed-timeline-item.is-clickable) .content:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-feed-timeline-item.is-clickable) .content:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}:host(limebb-feed-timeline-item.is-clickable) .content:hover{z-index:1}";
|
|
8
|
+
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{color:rgb(var(--contrast-1100))}: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:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;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;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover{color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem}.icon{--icon-background-color:var(--limebb-feed-background-color);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;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}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}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:\"\";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:\"\";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(1.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item[ui=thread-message]) .content:hover .thread-effects{transform:translate3d(-0.325rem, -0.3rem, 0) rotate(1.5deg)}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}.content{position:relative}.content:before,.content:after{content:\"\";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}";
|
|
9
9
|
|
|
10
10
|
const FeedTimelineItem = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
-
this.interact = index.createEvent(this, "interact", 7);
|
|
14
13
|
/**
|
|
15
14
|
* Defines the visualization and features of the feed item.
|
|
16
15
|
*/
|
|
@@ -61,9 +60,6 @@ const FeedTimelineItem = class {
|
|
|
61
60
|
this.bodyTextHeight = height;
|
|
62
61
|
}
|
|
63
62
|
};
|
|
64
|
-
this.handleFeedItemClick = () => {
|
|
65
|
-
this.interact.emit(this.item);
|
|
66
|
-
};
|
|
67
63
|
this.renderHeader = () => {
|
|
68
64
|
if ((this.isBundled && !this.item.heading) ||
|
|
69
65
|
(!this.item.author && !this.item.heading)) {
|
|
@@ -180,7 +176,7 @@ const FeedTimelineItem = class {
|
|
|
180
176
|
(_a = this.bodyResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
181
177
|
}
|
|
182
178
|
render() {
|
|
183
|
-
var _a, _b
|
|
179
|
+
var _a, _b;
|
|
184
180
|
return (index.h(index.Host, { id: this.item.id, class: {
|
|
185
181
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
186
182
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
@@ -188,7 +184,6 @@ const FeedTimelineItem = class {
|
|
|
188
184
|
'expanded-heading': this.isHeadingExpanded,
|
|
189
185
|
'shows-more': this.showMore,
|
|
190
186
|
'is-tall': this.isTall,
|
|
191
|
-
'is-clickable': !!((_c = this.item) === null || _c === void 0 ? void 0 : _c.clickable),
|
|
192
187
|
}, style: {
|
|
193
188
|
'--body-text-height': `${this.bodyTextHeight}`,
|
|
194
189
|
'--color-code': `${this.item.color}`,
|
|
@@ -211,14 +206,7 @@ const FeedTimelineItem = class {
|
|
|
211
206
|
} }));
|
|
212
207
|
}
|
|
213
208
|
renderContent() {
|
|
214
|
-
|
|
215
|
-
if (this.item.clickable) {
|
|
216
|
-
handleClick = this.handleFeedItemClick;
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
handleClick = undefined;
|
|
220
|
-
}
|
|
221
|
-
return (index.h("div", { class: "right" }, index.h("div", { class: "content", onClick: handleClick }, this.renderThreadEffects(), this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
209
|
+
return (index.h("div", { class: "right" }, index.h("div", { class: "content" }, this.renderThreadEffects(), this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
222
210
|
}
|
|
223
211
|
renderThreadEffects() {
|
|
224
212
|
if (!this.isThreadMessage) {
|
|
@@ -171,7 +171,6 @@ const Feed = class {
|
|
|
171
171
|
constructor(hostRef) {
|
|
172
172
|
index.registerInstance(this, hostRef);
|
|
173
173
|
this.loadMore = index.createEvent(this, "loadMore", 7);
|
|
174
|
-
this.itemClick = index.createEvent(this, "itemClick", 7);
|
|
175
174
|
/**
|
|
176
175
|
* List of items to display in the feed.
|
|
177
176
|
*/
|
|
@@ -185,9 +184,6 @@ const Feed = class {
|
|
|
185
184
|
* The total number of items available
|
|
186
185
|
*/
|
|
187
186
|
this.totalCount = 0;
|
|
188
|
-
this.handleItemClick = (event) => {
|
|
189
|
-
this.itemClick.emit(event.detail);
|
|
190
|
-
};
|
|
191
187
|
this.isBundled = (item, index) => {
|
|
192
188
|
var _a, _b, _c, _d, _e, _f;
|
|
193
189
|
if (index === 0) {
|
|
@@ -241,7 +237,7 @@ const Feed = class {
|
|
|
241
237
|
return [
|
|
242
238
|
this.renderNewItemsIndicator(item.timestamp, index$1),
|
|
243
239
|
this.renderDateHeader(item.timestamp, index$1),
|
|
244
|
-
index.h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, isBundled: this.isBundled(item, index$1)
|
|
240
|
+
index.h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, isBundled: this.isBundled(item, index$1) }),
|
|
245
241
|
];
|
|
246
242
|
});
|
|
247
243
|
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-5aaf6970.js');
|
|
6
|
+
const types = require('./types-c7646c23.js');
|
|
7
|
+
|
|
8
|
+
const notificationItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;padding:0 0.5rem}.notification-item{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;border-radius:0.75rem;border:1px solid transparent}.notification-item:before{content:\"\";display:block;position:absolute;left:-1rem;top:1rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease;background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item.is-clickable) .notification-item{transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:transparent}:host(limebb-notification-item.is-clickable) .notification-item:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}:host(limebb-notification-item.is-clickable) .notification-item:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}:host(limebb-notification-item.is-read) .notification-item{--limebb-notification-header-border-color:rgb(var(--contrast-400));border-color:rgb(var(--contrast-400))}:host(limebb-notification-item.is-read.is-clickable) .notification-item:hover{border-color:transparent}:host(limebb-notification-item:not(.is-read)) .notification-item{--limebb-notification-header-border-color:rgb(var(--contrast-500));--limebb-notification-item-unread-badge-color:rgb(\n var(--color-red-default)\n );background-color:rgb(var(--contrast-300))}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem;border-bottom:1px solid var(--limebb-notification-header-border-color)}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-800))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{transition:opacity 0.2s ease;opacity:0.7;display:flex;gap:0.25rem}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}";
|
|
9
|
+
|
|
10
|
+
const NotificationListItem = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.interact = index.createEvent(this, "interact", 7);
|
|
14
|
+
this.renderHeading = () => {
|
|
15
|
+
if (!this.item.heading) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
return index.h("limel-markdown", { class: "heading", value: this.item.heading });
|
|
19
|
+
};
|
|
20
|
+
this.createMenuItem = (action) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
if ('separator' in action) {
|
|
23
|
+
return action;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
value: action,
|
|
27
|
+
text: (_a = action.label) !== null && _a !== void 0 ? _a : '',
|
|
28
|
+
secondaryText: action.description,
|
|
29
|
+
disabled: action.disabled,
|
|
30
|
+
icon: (_b = action.icon) !== null && _b !== void 0 ? _b : '',
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
this.handleMenuItemSelect = (event) => {
|
|
34
|
+
var _a;
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
const command = (_a = event.detail.value) === null || _a === void 0 ? void 0 : _a.command;
|
|
37
|
+
if (command) {
|
|
38
|
+
this.commandbus.handle(command);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this.handleNotificationListItemClick = () => {
|
|
42
|
+
this.interact.emit(this.item);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
let handleClick;
|
|
48
|
+
if (this.item.clickable) {
|
|
49
|
+
handleClick = this.handleNotificationListItemClick;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
handleClick = undefined;
|
|
53
|
+
}
|
|
54
|
+
return (index.h(index.Host, { id: this.item.id, class: {
|
|
55
|
+
'is-clickable': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.clickable),
|
|
56
|
+
'is-read': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.read),
|
|
57
|
+
}, onClick: handleClick }, index.h("div", { class: "notification-item" }, this.renderSource(), this.renderContent())));
|
|
58
|
+
}
|
|
59
|
+
renderSource() {
|
|
60
|
+
return (index.h("div", { class: "header" }, this.renderIcon(), this.renderCaption(), this.renderTimestamp(), this.renderUnpromotedActionsMenu()));
|
|
61
|
+
}
|
|
62
|
+
renderIcon() {
|
|
63
|
+
var _a, _b, _c, _d;
|
|
64
|
+
if (!this.item.icon) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
return (index.h("limel-icon", { class: "icon", badge: true, name: (_b = (_a = this.item.icon) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : 'dot_circle', style: {
|
|
68
|
+
color: `${(_c = this.item.icon) === null || _c === void 0 ? void 0 : _c.color}`,
|
|
69
|
+
'background-color': `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.backgroundColor}`,
|
|
70
|
+
} }));
|
|
71
|
+
}
|
|
72
|
+
renderContent() {
|
|
73
|
+
return (index.h("div", { class: "content" }, index.h("div", { class: "body" }, this.renderHeadline(), this.renderValue()), this.renderAuthorPicture()));
|
|
74
|
+
}
|
|
75
|
+
renderHeadline() {
|
|
76
|
+
if (!this.item.heading && !this.item.author) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
return (index.h("div", { class: "headline" }, this.renderAuthorName(), this.renderHeading()));
|
|
80
|
+
}
|
|
81
|
+
renderAuthorName() {
|
|
82
|
+
if (!this.item.author) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (typeof this.item.author.name === 'string') {
|
|
86
|
+
return index.h("span", { class: "author" }, this.item.author.name);
|
|
87
|
+
}
|
|
88
|
+
if (typeof this.item.author.name === 'object') {
|
|
89
|
+
const { href, title, text } = this.item.author.name;
|
|
90
|
+
return (index.h("a", { class: "author", href: href, title: title }, text));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
renderAuthorPicture() {
|
|
94
|
+
var _a;
|
|
95
|
+
if (!((_a = this.item.author) === null || _a === void 0 ? void 0 : _a.picture)) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
return (index.h("img", { class: "author-avatar", loading: "lazy", src: this.item.author.picture }));
|
|
99
|
+
}
|
|
100
|
+
renderCaption() {
|
|
101
|
+
if (!this.item.caption) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
return index.h("h2", { class: "caption" }, this.item.caption);
|
|
105
|
+
}
|
|
106
|
+
renderValue() {
|
|
107
|
+
if (!this.item.value) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
return index.h("limel-markdown", { class: "body-text", value: this.item.value });
|
|
111
|
+
}
|
|
112
|
+
renderUnpromotedActionsMenu() {
|
|
113
|
+
var _a, _b;
|
|
114
|
+
if (!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const items = this.item.unpromotedActions.map(this.createMenuItem);
|
|
118
|
+
return (index.h("limel-menu", { class: "unpromoted-actions-menu", items: items, openDirection: "bottom-end", onSelect: this.handleMenuItemSelect }, index.h("limel-icon-button", { icon: "menu_2", slot: "trigger", label: (_b = this.translator) === null || _b === void 0 ? void 0 : _b.get('webclient.more-actions') })));
|
|
119
|
+
}
|
|
120
|
+
renderTimestamp() {
|
|
121
|
+
const timestamp = this.item.timestamp;
|
|
122
|
+
if (!timestamp) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
return (index.h("span", { class: "timestamp" }, this.dateTimeFormatter.format(timestamp, 'timeofday')));
|
|
126
|
+
}
|
|
127
|
+
get dateTimeFormatter() {
|
|
128
|
+
return this.platform.get(types.PlatformServiceName.DateTimeFormatter);
|
|
129
|
+
}
|
|
130
|
+
get translator() {
|
|
131
|
+
var _a;
|
|
132
|
+
return (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(types.PlatformServiceName.Translate);
|
|
133
|
+
}
|
|
134
|
+
get commandbus() {
|
|
135
|
+
var _a;
|
|
136
|
+
return (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(types.PlatformServiceName.CommandBus);
|
|
137
|
+
}
|
|
138
|
+
get el() { return index.getElement(this); }
|
|
139
|
+
};
|
|
140
|
+
NotificationListItem.style = notificationItemCss;
|
|
141
|
+
|
|
142
|
+
exports.limebb_notification_item = NotificationListItem;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-5aaf6970.js');
|
|
6
|
+
const types = require('./types-c7646c23.js');
|
|
7
|
+
|
|
8
|
+
const notificationListCss = ":host(limebb-notification-list){--limebb-notification-list-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-notification-list-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.5rem;max-width:45rem;background-color:var(--limebb-notification-list-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-size:0.75rem;margin:0.5rem 0 0 0;color:rgb(var(--contrast-800))}.load-more-button{margin-top:0.5rem}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0.5rem 1rem;font-size:small;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:var(--limebb-notification-list-background-color)}.new-items-indicator+.date-heading{margin-top:-0.5rem}";
|
|
9
|
+
|
|
10
|
+
const NotificationList = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
index.registerInstance(this, hostRef);
|
|
13
|
+
this.loadMore = index.createEvent(this, "loadMore", 7);
|
|
14
|
+
this.itemClick = index.createEvent(this, "itemClick", 7);
|
|
15
|
+
/**
|
|
16
|
+
* List of items to display in the feed.
|
|
17
|
+
*/
|
|
18
|
+
this.items = [];
|
|
19
|
+
/**
|
|
20
|
+
* The number of items rendered in the feed,
|
|
21
|
+
* before the "Load more" button is displayed.
|
|
22
|
+
*/
|
|
23
|
+
this.totalCount = 0;
|
|
24
|
+
this.handleItemClick = (event) => {
|
|
25
|
+
this.itemClick.emit(event.detail);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return [
|
|
30
|
+
this.renderEmptyFeedMessage(),
|
|
31
|
+
this.renderSpinner(),
|
|
32
|
+
this.renderNotificationItems(),
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
renderSpinner() {
|
|
36
|
+
if (this.loading) {
|
|
37
|
+
return index.h("limel-spinner", { size: "small" });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
renderEmptyFeedMessage() {
|
|
41
|
+
if (this.loading) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (this.items.length === 0) {
|
|
45
|
+
return index.h("p", { class: "empty-state" }, this.emptyStateMessage);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
renderNotificationItems() {
|
|
49
|
+
return this.items.map((item, index$1) => {
|
|
50
|
+
return [
|
|
51
|
+
this.renderDateHeader(item.timestamp, index$1),
|
|
52
|
+
index.h("limebb-notification-item", { platform: this.platform, context: this.context, item: item, key: item.id, onInteract: this.handleItemClick }),
|
|
53
|
+
this.renderNewItemsIndicator(item.timestamp, index$1),
|
|
54
|
+
];
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
renderNewItemsIndicator(timestamp, index) {
|
|
58
|
+
if (!this.lastVisitedTimestamp) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const totalCount = this.items.length;
|
|
62
|
+
const lastVisitedTimestamp = new Date(this.lastVisitedTimestamp);
|
|
63
|
+
const currentItemTimestamp = new Date(timestamp);
|
|
64
|
+
const isCurrentItemNewer = lastVisitedTimestamp < currentItemTimestamp;
|
|
65
|
+
if (!isCurrentItemNewer) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (totalCount === 1 || index === 0) {
|
|
69
|
+
return this.renderIndicator();
|
|
70
|
+
}
|
|
71
|
+
const previousItemTimestamp = new Date(this.items[index - 1].timestamp);
|
|
72
|
+
const isPreviousItemNewer = lastVisitedTimestamp < previousItemTimestamp;
|
|
73
|
+
if (isPreviousItemNewer) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
return this.renderIndicator();
|
|
77
|
+
}
|
|
78
|
+
renderIndicator() {
|
|
79
|
+
return (index.h("div", { class: "new-items-indicator" }, index.h("hr", null), index.h("h3", null, this.translator.get('webclient.new'))));
|
|
80
|
+
}
|
|
81
|
+
renderDateHeader(timestamp, index$1) {
|
|
82
|
+
const currentIndexDate = this.dateTimeFormatter.format(timestamp, 'date');
|
|
83
|
+
if (index$1 === 0) {
|
|
84
|
+
return index.h("a", { class: "date-heading" }, currentIndexDate);
|
|
85
|
+
}
|
|
86
|
+
const previousIndexDate = this.dateTimeFormatter.format(this.items[index$1 - 1].timestamp, 'date');
|
|
87
|
+
if (previousIndexDate === currentIndexDate) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
return index.h("a", { class: "date-heading" }, currentIndexDate);
|
|
91
|
+
}
|
|
92
|
+
get dateTimeFormatter() {
|
|
93
|
+
return this.platform.get(types.PlatformServiceName.DateTimeFormatter);
|
|
94
|
+
}
|
|
95
|
+
get translator() {
|
|
96
|
+
return this.platform.get(types.PlatformServiceName.Translate);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
NotificationList.style = notificationListCss;
|
|
100
|
+
|
|
101
|
+
exports.limebb_notification_list = NotificationList;
|
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-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"paginationSize":[2,"pagination-size"],"groupBy":[513,"group-by"],"groups":[16]}]]],["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-feed.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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[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":[16]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4],"paginationSize":[2,"pagination-size"],"displayedItemCount":[32]}]]],["limebb-date-picker.cjs",[[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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"paginationSize":[2,"pagination-size"],"groupBy":[513,"group-by"],"groups":[16]}]]],["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-feed.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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[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":[16]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["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-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4],"paginationSize":[2,"pagination-size"],"displayedItemCount":[32]}]]],["limebb-date-picker.cjs",[[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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"./components/kanban/kanban-item/kanban-item.js",
|
|
15
15
|
"./components/limeobject/file-viewer/file-viewer.js",
|
|
16
16
|
"./components/locale-picker/locale-picker.js",
|
|
17
|
-
"./components/navigation-button/navigation-button.js"
|
|
17
|
+
"./components/navigation-button/navigation-button.js",
|
|
18
|
+
"./components/notification-list/notification-list.js",
|
|
19
|
+
"./components/notification-list/notification-item/notification-item.js"
|
|
18
20
|
],
|
|
19
21
|
"compiler": {
|
|
20
22
|
"name": "@stencil/core",
|
|
@@ -400,7 +400,6 @@ limel-action-bar {
|
|
|
400
400
|
width: 0.75rem;
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
:host(limebb-feed-timeline-item.is-clickable[ui=standard]) .content,
|
|
404
403
|
:host(limebb-feed-timeline-item[ui=standard]) .content {
|
|
405
404
|
background-color: rgb(var(--limebb-feed-item-background-color));
|
|
406
405
|
}
|
|
@@ -510,24 +509,4 @@ limel-action-bar {
|
|
|
510
509
|
top: 0.25rem;
|
|
511
510
|
bottom: unset;
|
|
512
511
|
height: 1.75rem;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
:host(limebb-feed-timeline-item.is-clickable) .content {
|
|
516
|
-
cursor: pointer;
|
|
517
|
-
transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
|
|
518
|
-
cursor: pointer;
|
|
519
|
-
color: var(--mdc-theme-on-surface);
|
|
520
|
-
background-color: transparent;
|
|
521
|
-
}
|
|
522
|
-
:host(limebb-feed-timeline-item.is-clickable) .content:hover {
|
|
523
|
-
color: var(--mdc-theme-on-surface);
|
|
524
|
-
background-color: var(--lime-elevated-surface-background-color);
|
|
525
|
-
box-shadow: var(--button-shadow-hovered);
|
|
526
|
-
}
|
|
527
|
-
:host(limebb-feed-timeline-item.is-clickable) .content:active {
|
|
528
|
-
box-shadow: var(--button-shadow-pressed);
|
|
529
|
-
transform: translate3d(0, 0.08rem, 0);
|
|
530
|
-
}
|
|
531
|
-
:host(limebb-feed-timeline-item.is-clickable) .content:hover {
|
|
532
|
-
z-index: 1;
|
|
533
512
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, Host
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
2
|
import { PlatformServiceName, } from '@limetech/lime-web-components';
|
|
3
3
|
/**
|
|
4
4
|
* Feed item
|
|
@@ -57,9 +57,6 @@ export class FeedTimelineItem {
|
|
|
57
57
|
this.bodyTextHeight = height;
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
this.handleFeedItemClick = () => {
|
|
61
|
-
this.interact.emit(this.item);
|
|
62
|
-
};
|
|
63
60
|
this.renderHeader = () => {
|
|
64
61
|
if ((this.isBundled && !this.item.heading) ||
|
|
65
62
|
(!this.item.author && !this.item.heading)) {
|
|
@@ -176,7 +173,7 @@ export class FeedTimelineItem {
|
|
|
176
173
|
(_a = this.bodyResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
177
174
|
}
|
|
178
175
|
render() {
|
|
179
|
-
var _a, _b
|
|
176
|
+
var _a, _b;
|
|
180
177
|
return (h(Host, { id: this.item.id, class: {
|
|
181
178
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
182
179
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
@@ -184,7 +181,6 @@ export class FeedTimelineItem {
|
|
|
184
181
|
'expanded-heading': this.isHeadingExpanded,
|
|
185
182
|
'shows-more': this.showMore,
|
|
186
183
|
'is-tall': this.isTall,
|
|
187
|
-
'is-clickable': !!((_c = this.item) === null || _c === void 0 ? void 0 : _c.clickable),
|
|
188
184
|
}, style: {
|
|
189
185
|
'--body-text-height': `${this.bodyTextHeight}`,
|
|
190
186
|
'--color-code': `${this.item.color}`,
|
|
@@ -207,14 +203,7 @@ export class FeedTimelineItem {
|
|
|
207
203
|
} }));
|
|
208
204
|
}
|
|
209
205
|
renderContent() {
|
|
210
|
-
|
|
211
|
-
if (this.item.clickable) {
|
|
212
|
-
handleClick = this.handleFeedItemClick;
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
handleClick = undefined;
|
|
216
|
-
}
|
|
217
|
-
return (h("div", { class: "right" }, h("div", { class: "content", onClick: handleClick }, this.renderThreadEffects(), this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
206
|
+
return (h("div", { class: "right" }, h("div", { class: "content" }, this.renderThreadEffects(), this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
218
207
|
}
|
|
219
208
|
renderThreadEffects() {
|
|
220
209
|
if (!this.isThreadMessage) {
|
|
@@ -449,28 +438,5 @@ export class FeedTimelineItem {
|
|
|
449
438
|
"isTall": {}
|
|
450
439
|
};
|
|
451
440
|
}
|
|
452
|
-
static get events() {
|
|
453
|
-
return [{
|
|
454
|
-
"method": "interact",
|
|
455
|
-
"name": "interact",
|
|
456
|
-
"bubbles": true,
|
|
457
|
-
"cancelable": true,
|
|
458
|
-
"composed": true,
|
|
459
|
-
"docs": {
|
|
460
|
-
"tags": [],
|
|
461
|
-
"text": "Fired when clicking on the Feed item"
|
|
462
|
-
},
|
|
463
|
-
"complexType": {
|
|
464
|
-
"original": "FeedItem",
|
|
465
|
-
"resolved": "FeedItem",
|
|
466
|
-
"references": {
|
|
467
|
-
"FeedItem": {
|
|
468
|
-
"location": "import",
|
|
469
|
-
"path": "./feed-item.types"
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}];
|
|
474
|
-
}
|
|
475
441
|
static get elementRef() { return "el"; }
|
|
476
442
|
}
|
|
@@ -26,7 +26,6 @@ const MINUTES_OF_PROXIMITY = 5;
|
|
|
26
26
|
* @exampleComponent limebb-example-feed-item-types
|
|
27
27
|
* @exampleComponent limebb-example-feed-item-color-coding
|
|
28
28
|
* @exampleComponent limebb-example-feed-new-items
|
|
29
|
-
* @exampleComponent limebb-example-feed-item-clickable
|
|
30
29
|
* @beta
|
|
31
30
|
*/
|
|
32
31
|
export class Feed {
|
|
@@ -44,9 +43,6 @@ export class Feed {
|
|
|
44
43
|
* The total number of items available
|
|
45
44
|
*/
|
|
46
45
|
this.totalCount = 0;
|
|
47
|
-
this.handleItemClick = (event) => {
|
|
48
|
-
this.itemClick.emit(event.detail);
|
|
49
|
-
};
|
|
50
46
|
this.isBundled = (item, index) => {
|
|
51
47
|
var _a, _b, _c, _d, _e, _f;
|
|
52
48
|
if (index === 0) {
|
|
@@ -100,7 +96,7 @@ export class Feed {
|
|
|
100
96
|
return [
|
|
101
97
|
this.renderNewItemsIndicator(item.timestamp, index),
|
|
102
98
|
this.renderDateHeader(item.timestamp, index),
|
|
103
|
-
h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, isBundled: this.isBundled(item, index)
|
|
99
|
+
h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, isBundled: this.isBundled(item, index) }),
|
|
104
100
|
];
|
|
105
101
|
});
|
|
106
102
|
}
|
|
@@ -344,26 +340,6 @@ export class Feed {
|
|
|
344
340
|
"resolved": "void",
|
|
345
341
|
"references": {}
|
|
346
342
|
}
|
|
347
|
-
}, {
|
|
348
|
-
"method": "itemClick",
|
|
349
|
-
"name": "itemClick",
|
|
350
|
-
"bubbles": true,
|
|
351
|
-
"cancelable": true,
|
|
352
|
-
"composed": true,
|
|
353
|
-
"docs": {
|
|
354
|
-
"tags": [],
|
|
355
|
-
"text": "Fired when a feed item with `clickable` set to `true` is clicked"
|
|
356
|
-
},
|
|
357
|
-
"complexType": {
|
|
358
|
-
"original": "FeedItem",
|
|
359
|
-
"resolved": "FeedItem",
|
|
360
|
-
"references": {
|
|
361
|
-
"FeedItem": {
|
|
362
|
-
"location": "import",
|
|
363
|
-
"path": "./feed-item/feed-item.types"
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
343
|
}];
|
|
368
344
|
}
|
|
369
345
|
}
|