@limetech/lime-crm-building-blocks 1.86.0 → 1.86.2

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/{index.esm-4d6e52bb.js → index.esm-d6513e37.js} +14 -14
  3. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  4. package/dist/cjs/limebb-chat-item_2.cjs.entry.js +1 -1
  5. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +2 -2
  11. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-icon-picker.cjs.entry.js +27878 -1
  13. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-kanban-item.cjs.entry.js +2 -2
  16. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
  17. package/dist/cjs/limebb-loader.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  20. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-text-editor.cjs.entry.js +2 -2
  23. package/dist/collection/components/feed/feed-item/feed-timeline-item.css +1 -0
  24. package/dist/collection/components/icon-picker/icon-picker.js +8 -13
  25. package/dist/collection/components/kanban/kanban-item/kanban-item.css +1 -0
  26. package/dist/components/feed-timeline-item.js +1 -1
  27. package/dist/components/index.esm.js +14 -14
  28. package/dist/components/kanban-item.js +1 -1
  29. package/dist/components/limebb-icon-picker.js +27878 -1
  30. package/dist/components/limebb-text-editor.js +2 -2
  31. package/dist/esm/{index.esm-55b8eae3.js → index.esm-5e14dac9.js} +14 -14
  32. package/dist/esm/limebb-browser.entry.js +1 -1
  33. package/dist/esm/limebb-chat-item_2.entry.js +1 -1
  34. package/dist/esm/limebb-chat-list.entry.js +1 -1
  35. package/dist/esm/limebb-component-config.entry.js +1 -1
  36. package/dist/esm/limebb-component-picker.entry.js +1 -1
  37. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  38. package/dist/esm/limebb-date-picker.entry.js +1 -1
  39. package/dist/esm/limebb-feed-timeline-item.entry.js +2 -2
  40. package/dist/esm/limebb-feed.entry.js +1 -1
  41. package/dist/esm/limebb-icon-picker.entry.js +27878 -1
  42. package/dist/esm/limebb-info-tile.entry.js +1 -1
  43. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  44. package/dist/esm/limebb-kanban-item.entry.js +2 -2
  45. package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
  46. package/dist/esm/limebb-loader.entry.js +1 -1
  47. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  48. package/dist/esm/limebb-mention.entry.js +1 -1
  49. package/dist/esm/limebb-notification-item.entry.js +1 -1
  50. package/dist/esm/limebb-notification-list.entry.js +1 -1
  51. package/dist/esm/limebb-text-editor.entry.js +2 -2
  52. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  53. package/dist/lime-crm-building-blocks/{p-e62af894.entry.js → p-06839012.entry.js} +1 -1
  54. package/dist/lime-crm-building-blocks/{p-ca191a20.entry.js → p-1eb8fb75.entry.js} +1 -1
  55. package/dist/lime-crm-building-blocks/{p-7f5bd5c3.entry.js → p-27786967.entry.js} +1 -1
  56. package/dist/lime-crm-building-blocks/p-31a55daa.entry.js +1 -0
  57. package/dist/lime-crm-building-blocks/{p-e9289669.entry.js → p-37e0254e.entry.js} +1 -1
  58. package/dist/lime-crm-building-blocks/{p-03e3c363.entry.js → p-38eec842.entry.js} +1 -1
  59. package/dist/lime-crm-building-blocks/{p-e17afaf3.js → p-3b9766cc.js} +1 -1
  60. package/dist/lime-crm-building-blocks/{p-8b95be6e.entry.js → p-3d961c1b.entry.js} +1 -1
  61. package/dist/lime-crm-building-blocks/{p-088caa7b.entry.js → p-3dce616c.entry.js} +1 -1
  62. package/dist/lime-crm-building-blocks/{p-563a1aa3.entry.js → p-43c76027.entry.js} +1 -1
  63. package/dist/lime-crm-building-blocks/{p-d9f7403a.entry.js → p-46bf22fa.entry.js} +1 -1
  64. package/dist/lime-crm-building-blocks/{p-804408d3.entry.js → p-51e87162.entry.js} +1 -1
  65. package/dist/lime-crm-building-blocks/{p-2c47495d.entry.js → p-67e1ea69.entry.js} +1 -1
  66. package/dist/lime-crm-building-blocks/{p-2552ee95.entry.js → p-acce6160.entry.js} +1 -1
  67. package/dist/lime-crm-building-blocks/{p-232181fb.entry.js → p-adcb57c6.entry.js} +1 -1
  68. package/dist/lime-crm-building-blocks/{p-6fa65df4.entry.js → p-af6e6696.entry.js} +1 -1
  69. package/dist/lime-crm-building-blocks/{p-94e53437.entry.js → p-bf322752.entry.js} +1 -1
  70. package/dist/lime-crm-building-blocks/{p-967feb88.entry.js → p-c4e6dcf4.entry.js} +1 -1
  71. package/dist/lime-crm-building-blocks/{p-4ddf2d68.entry.js → p-ca79dc23.entry.js} +1 -1
  72. package/dist/lime-crm-building-blocks/{p-cc105197.entry.js → p-ccc748a1.entry.js} +1 -1
  73. package/dist/lime-crm-building-blocks/{p-ccf8a5e9.entry.js → p-cf06416b.entry.js} +1 -1
  74. package/dist/types/components/icon-picker/icon-picker.d.ts +7 -12
  75. package/dist/types/components.d.ts +28 -44
  76. package/package.json +4 -4
  77. package/dist/lime-crm-building-blocks/p-0d108e9f.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,h as t,H as i,g as o}from"./p-d736c794.js";import{c as r}from"./p-e17afaf3.js";const a=class{constructor(i){e(this,i),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!(null==e?void 0:e.length))return;const t=e[0].contentRect.height;this.isTall=t>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=t)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return t("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return t("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,i;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},t("limel-icon",{name:"angle_up"})),t("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,o;const r=`helper-text-${this.item.id}`;return t(i,{key:"a817d7ace9ed8023eb26d846e5ad6839fe5e94a7",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(o=this.item.author)||void 0===o?void 0:o.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return t("div",{class:"left"},t("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),t("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,i,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return t("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(i=this.item.icon)||void 0===i?void 0:i.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return t("div",{class:"right"},t("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return t("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return t("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:i,text:o}=this.item.author.name;return t("a",{class:"author",href:e,title:i},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:i}=this.item,o=this.getAuthorName(i),r=this.createLinkToAuthor(i);return t("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},t("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[t("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading})]}renderValue(){if(this.item.value)return[t("div",{class:"markdown-container"},t("limel-markdown",{class:{"body-text":!0,opened:this.showMore},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[t("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},t("limel-icon",{name:"angle_down"})),t("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const i=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:i,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return o(this)}};a.style='@charset "UTF-8";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-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}: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-promoted-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),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}: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 var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color: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,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover{transform:translate3d(0, -0.04rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#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]){margin-bottom:0.25rem}: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(0.5deg);background-color:rgb(var(--contrast-300))}: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);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.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}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}: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}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.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 var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color: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,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color: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,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover{transform:translate3d(0, -0.04rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}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:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);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}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';export{a as limebb_feed_timeline_item}
1
+ import{r as e,h as t,H as i,g as o}from"./p-d736c794.js";import{c as r}from"./p-3b9766cc.js";const a=class{constructor(i){e(this,i),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!(null==e?void 0:e.length))return;const t=e[0].contentRect.height;this.isTall=t>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=t)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return t("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return t("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,i;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[t("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},t("limel-icon",{name:"angle_up"})),t("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,o;const r=`helper-text-${this.item.id}`;return t(i,{key:"a817d7ace9ed8023eb26d846e5ad6839fe5e94a7",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(o=this.item.author)||void 0===o?void 0:o.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return t("div",{class:"left"},t("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),t("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,i,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return t("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(i=this.item.icon)||void 0===i?void 0:i.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return t("div",{class:"right"},t("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return t("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return t("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:i,text:o}=this.item.author.name;return t("a",{class:"author",href:e,title:i},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:i}=this.item,o=this.getAuthorName(i),r=this.createLinkToAuthor(i);return t("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},t("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[t("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading})]}renderValue(){if(this.item.value)return[t("div",{class:"markdown-container"},t("limel-markdown",{class:{"body-text":!0,opened:this.showMore},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[t("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},t("limel-icon",{name:"angle_down"})),t("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const i=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:i,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return o(this)}};a.style='@charset "UTF-8";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-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}: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-promoted-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),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}: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 var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color: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,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover{transform:translate3d(0, -0.04rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#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]){margin-bottom:0.25rem}: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(0.5deg);background-color:rgb(var(--contrast-300))}: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);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.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}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}: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}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.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 var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color: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,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--mdc-theme-on-surface);background-color: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,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover{transform:translate3d(0, -0.04rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}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:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);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{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';export{a as limebb_feed_timeline_item}
@@ -1 +1 @@
1
- import{r as i,c as t,h as s,g as e}from"./p-d736c794.js";import{c as o}from"./p-e17afaf3.js";const n=class{constructor(e){i(this,e),this.change=t(this,"change",7),this.copy=t(this,"copy",7),this.type="component",this.copyLabel="Copy value",this.hideCopyButton=!1,this.allItems=[],this.getConfigs=()=>({component:()=>this.webComponentRegistry.getAll(),command:()=>this.commandbus.getAll()}[this.type]()),this.getConfigValue=i=>"name"in i&&"string"==typeof i.name?i.name:"id"in i&&"string"==typeof i.id?i.id:"",this.hasTag=i=>!this.tags||this.tags.some((t=>{var s;return null===(s=i.tags)||void 0===s?void 0:s.includes(t)})),this.handleBlur=()=>{const i=this.currentInput;i&&this.isValidIdentifier(i)&&this.change.emit(this.currentInput)},this.handleChange=i=>{var t;i.stopPropagation(),this.change.emit(null===(t=i.detail)||void 0===t?void 0:t.value)},this.handleCopyButton=()=>{navigator.clipboard.writeText(this.value),this.copy.emit(this.value)},this.handleKeyUp=i=>{var t;if("Enter"!==i.key)return;const s=null!==(t=this.currentInput)&&void 0!==t?t:"";this.isValidIdentifier(s)&&this.change.emit(this.currentInput)},this.isValidIdentifier=i=>"component"!==this.type||Boolean(customElements.get(i)),this.renderPicker=()=>{let i=this.allItems.find((i=>this.value===i.value));return!i&&this.value&&(i={text:this.value,value:this.value,icon:{name:"question",color:"rgb(var(--color-glaucous-light))"}}),s("limel-picker",{disabled:this.disabled,helperText:this.helperText,label:this.label,readonly:this.readonly,required:this.required,searcher:this.search,value:i,title:null==i?void 0:i.text,onBlur:this.handleBlur,onChange:this.handleChange,onKeyUp:this.handleKeyUp})},this.renderCopyButton=()=>{if(!this.hideCopyButton)return s("limel-icon-button",{icon:"copy",disabled:!this.value,label:this.copyLabel,onClick:this.handleCopyButton})},this.search=async i=>i?this.allItems.filter(this.isItemMatching(i.toLocaleLowerCase())):this.allItems,this.isItemMatching=i=>t=>{var s,e;return t.text.toLocaleLowerCase().includes(i)||(null===(s=t.secondaryText)||void 0===s?void 0:s.toLocaleLowerCase().includes(i))||(null===(e=t.value)||void 0===e?void 0:e.toLocaleLowerCase().includes(i))}}componentWillLoad(){this.allItems=this.getConfigs().filter(this.hasTag).map((i=>{var t,s;return{value:this.getConfigValue(i),text:this.translator.get(null!==(t=i.title)&&void 0!==t?t:this.getConfigValue(i)),secondaryText:this.translator.get(null!==(s=i.description)&&void 0!==s?s:""),icon:i.icon}})).sort(((i,t)=>i.text.localeCompare(t.text)))}render(){return[this.renderPicker(),this.renderCopyButton()]}get currentInput(){var i,t,s,e,o,n;return null===(n=null===(o=null===(e=null===(s=null===(t=null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector("limel-picker"))||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.querySelector("limel-chip-set"))||void 0===e?void 0:e.shadowRoot)||void 0===o?void 0:o.querySelector("input"))||void 0===n?void 0:n.value}get webComponentRegistry(){return this.platform.get(o.WebComponentRegistry)}get commandbus(){return this.platform.get(o.CommandBus)}get translator(){return this.platform.get(o.Translate)}get host(){return e(this)}};n.style=":host(limebb-component-picker){position:relative;display:flex;align-items:center}:host(limebb-component-picker) limel-picker{flex-grow:1;min-width:0}:host(limebb-component-picker) limel-icon-button{position:absolute;right:0.25rem}";export{n as limebb_component_picker}
1
+ import{r as i,c as t,h as s,g as o}from"./p-d736c794.js";import{c as e}from"./p-3b9766cc.js";const n=class{constructor(o){i(this,o),this.change=t(this,"change",7),this.copy=t(this,"copy",7),this.type="component",this.copyLabel="Copy value",this.hideCopyButton=!1,this.allItems=[],this.getConfigs=()=>({component:()=>this.webComponentRegistry.getAll(),command:()=>this.commandbus.getAll()}[this.type]()),this.getConfigValue=i=>"name"in i&&"string"==typeof i.name?i.name:"id"in i&&"string"==typeof i.id?i.id:"",this.hasTag=i=>!this.tags||this.tags.some((t=>{var s;return null===(s=i.tags)||void 0===s?void 0:s.includes(t)})),this.handleBlur=()=>{const i=this.currentInput;i&&this.isValidIdentifier(i)&&this.change.emit(this.currentInput)},this.handleChange=i=>{var t;i.stopPropagation(),this.change.emit(null===(t=i.detail)||void 0===t?void 0:t.value)},this.handleCopyButton=()=>{navigator.clipboard.writeText(this.value),this.copy.emit(this.value)},this.handleKeyUp=i=>{var t;if("Enter"!==i.key)return;const s=null!==(t=this.currentInput)&&void 0!==t?t:"";this.isValidIdentifier(s)&&this.change.emit(this.currentInput)},this.isValidIdentifier=i=>"component"!==this.type||Boolean(customElements.get(i)),this.renderPicker=()=>{let i=this.allItems.find((i=>this.value===i.value));return!i&&this.value&&(i={text:this.value,value:this.value,icon:{name:"question",color:"rgb(var(--color-glaucous-light))"}}),s("limel-picker",{disabled:this.disabled,helperText:this.helperText,label:this.label,readonly:this.readonly,required:this.required,searcher:this.search,value:i,title:null==i?void 0:i.text,onBlur:this.handleBlur,onChange:this.handleChange,onKeyUp:this.handleKeyUp})},this.renderCopyButton=()=>{if(!this.hideCopyButton)return s("limel-icon-button",{icon:"copy",disabled:!this.value,label:this.copyLabel,onClick:this.handleCopyButton})},this.search=async i=>i?this.allItems.filter(this.isItemMatching(i.toLocaleLowerCase())):this.allItems,this.isItemMatching=i=>t=>{var s,o;return t.text.toLocaleLowerCase().includes(i)||(null===(s=t.secondaryText)||void 0===s?void 0:s.toLocaleLowerCase().includes(i))||(null===(o=t.value)||void 0===o?void 0:o.toLocaleLowerCase().includes(i))}}componentWillLoad(){this.allItems=this.getConfigs().filter(this.hasTag).map((i=>{var t,s;return{value:this.getConfigValue(i),text:this.translator.get(null!==(t=i.title)&&void 0!==t?t:this.getConfigValue(i)),secondaryText:this.translator.get(null!==(s=i.description)&&void 0!==s?s:""),icon:i.icon}})).sort(((i,t)=>i.text.localeCompare(t.text)))}render(){return[this.renderPicker(),this.renderCopyButton()]}get currentInput(){var i,t,s,o,e,n;return null===(n=null===(e=null===(o=null===(s=null===(t=null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector("limel-picker"))||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.querySelector("limel-chip-set"))||void 0===o?void 0:o.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||void 0===n?void 0:n.value}get webComponentRegistry(){return this.platform.get(e.WebComponentRegistry)}get commandbus(){return this.platform.get(e.CommandBus)}get translator(){return this.platform.get(e.Translate)}get host(){return o(this)}};n.style=":host(limebb-component-picker){position:relative;display:flex;align-items:center}:host(limebb-component-picker) limel-picker{flex-grow:1;min-width:0}:host(limebb-component-picker) limel-icon-button{position:absolute;right:0.25rem}";export{n as limebb_component_picker}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as r,g as n}from"./p-d736c794.js";import{c as o}from"./p-e17afaf3.js";import{H as a}from"./p-506dfcff.js";function s(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function l(e,t,i){const r=function(e,t){return+s(e)-+s(t)}(e,t)/6e4;return(n=i?.roundingMethod,e=>{const t=(n?Math[n]:Math.trunc)(e);return 0===t?0:t})(r);var n}const d=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.highlightedItemIdNotFound=t(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,n,o,a,s;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(n=null==e?void 0:e.author)||void 0===n?void 0:n.id))return!1;if((null===(a=null===(o=this.items[t-1])||void 0===o?void 0:o.icon)||void 0===a?void 0:a.name)!==(null===(s=null==e?void 0:e.icon)||void 0===s?void 0:s.name))return!1;const d=new Date(e.timestamp),h=new Date(this.items[t-1].timestamp),m=new Date(h),c=new Date(d);return"DESC"===this.direction?l(m,c)<=this.minutesOfProximity:l(c,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return i(r,{key:"233f3d52b0750c0b48324d496015bb9ddeb2868d",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderNewItemsIndicator(e.timestamp,t),this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t)})]))}renderNewItemsIndicator(e,t){if(!this.lastVisitedTimestamp)return;const i=this.items.length,r=new Date(this.lastVisitedTimestamp),n=new Date(e);let o=r<n;if("DESC"===this.direction&&(o=r>n),!o)return;if(1===i||0===t)return this.renderIndicator();const a=new Date(this.items[t-1].timestamp);let s=r<a;return"DESC"===this.direction&&(s=r>a),s?void 0:this.renderIndicator()}renderIndicator(){return i("div",{class:"new-items-indicator"},i("hr",null),i("h3",null,this.translator.get("webclient.new")))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(o.Translate)}highlightedItemIdChanged(e){void 0!==e&&this.highlightItem(e)}highlightItem(e){var t;const i=null===(t=this.feedItemElement.shadowRoot)||void 0===t?void 0:t.querySelector(`limebb-feed-timeline-item[id="${e}"]`);return i?(i.setAttribute("aria-current","true"),i.scrollIntoView({behavior:"smooth",block:"center"}),i.focus(),setTimeout((()=>{i.removeAttribute("aria-current")}),3e3),!0):(this.highlightedItemIdNotFound.emit({id:e}),!1)}get highlighter(){return this.platform.get(a.SERVICE_NAME)}get feedItemElement(){return n(this)}static get watchers(){return{highlightedItemId:["highlightedItemIdChanged"]}}};d.style=":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-promoted-action-bar-grid-template-rows:0fr}.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-feed-background-color)}.new-items-indicator+.date-heading{margin-top:-0.5rem}limebb-feed-timeline-item:focus{outline:none}limebb-feed-timeline-item[aria-current=true]:focus{animation:highlight-animation ease-in-out;animation-duration:var(--limebb-feed-highlight-duration)}@keyframes highlight-animation{0%,20%,100%{box-shadow:none}10%,50%,60%{box-shadow:var(--shadow-focused-state)}}";export{d as limebb_feed}
1
+ import{r as e,c as t,h as i,H as r,g as n}from"./p-d736c794.js";import{c as o}from"./p-3b9766cc.js";import{H as s}from"./p-506dfcff.js";function a(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function l(e,t,i){const r=function(e,t){return+a(e)-+a(t)}(e,t)/6e4;return(n=i?.roundingMethod,e=>{const t=(n?Math[n]:Math.trunc)(e);return 0===t?0:t})(r);var n}const d=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.highlightedItemIdNotFound=t(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,n,o,s,a;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(n=null==e?void 0:e.author)||void 0===n?void 0:n.id))return!1;if((null===(s=null===(o=this.items[t-1])||void 0===o?void 0:o.icon)||void 0===s?void 0:s.name)!==(null===(a=null==e?void 0:e.icon)||void 0===a?void 0:a.name))return!1;const d=new Date(e.timestamp),h=new Date(this.items[t-1].timestamp),m=new Date(h),c=new Date(d);return"DESC"===this.direction?l(m,c)<=this.minutesOfProximity:l(c,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return i(r,{key:"233f3d52b0750c0b48324d496015bb9ddeb2868d",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderNewItemsIndicator(e.timestamp,t),this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t)})]))}renderNewItemsIndicator(e,t){if(!this.lastVisitedTimestamp)return;const i=this.items.length,r=new Date(this.lastVisitedTimestamp),n=new Date(e);let o=r<n;if("DESC"===this.direction&&(o=r>n),!o)return;if(1===i||0===t)return this.renderIndicator();const s=new Date(this.items[t-1].timestamp);let a=r<s;return"DESC"===this.direction&&(a=r>s),a?void 0:this.renderIndicator()}renderIndicator(){return i("div",{class:"new-items-indicator"},i("hr",null),i("h3",null,this.translator.get("webclient.new")))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(o.Translate)}highlightedItemIdChanged(e){void 0!==e&&this.highlightItem(e)}highlightItem(e){var t;const i=null===(t=this.feedItemElement.shadowRoot)||void 0===t?void 0:t.querySelector(`limebb-feed-timeline-item[id="${e}"]`);return i?(i.setAttribute("aria-current","true"),i.scrollIntoView({behavior:"smooth",block:"center"}),i.focus(),setTimeout((()=>{i.removeAttribute("aria-current")}),3e3),!0):(this.highlightedItemIdNotFound.emit({id:e}),!1)}get highlighter(){return this.platform.get(s.SERVICE_NAME)}get feedItemElement(){return n(this)}static get watchers(){return{highlightedItemId:["highlightedItemIdChanged"]}}};d.style=":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-promoted-action-bar-grid-template-rows:0fr}.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-feed-background-color)}.new-items-indicator+.date-heading{margin-top:-0.5rem}limebb-feed-timeline-item:focus{outline:none}limebb-feed-timeline-item[aria-current=true]:focus{animation:highlight-animation ease-in-out;animation-duration:var(--limebb-feed-highlight-duration)}@keyframes highlight-animation{0%,20%,100%{box-shadow:none}10%,50%,60%{box-shadow:var(--shadow-focused-state)}}";export{d as limebb_feed}
@@ -1,21 +1,16 @@
1
1
  import { FormComponent } from '@limetech/lime-elements';
2
2
  import { EventEmitter } from '../../stencil-public-runtime';
3
3
  /**
4
- * This component enables you to search and select an icon, from the icon library that we provide
5
- * via `@lundalogik/lime-icons8` package.
6
- * Name of the selected icon will be emitted by the component, and you will also see a preview
7
- * of it in a chip.
4
+ * Search for an icon and **click on it to copy its name to clipboard**.
5
+ * <limebb-example-icon-finder />
8
6
  *
9
7
  * :::tip Pro tip
10
- * Currently, you can only search for strings of text within the file-names of our icons.
11
- * This can make it hard to find a proper icon for the concept that you want to visualize.
12
- * However, you can always go to [icons8 library](https://icons8.com/icon/set/search/windows),
8
+ * The component above searches both the icon name and any tags added to the icon.
9
+ * However, you can always go to the [icons8 library](https://icons8.com/icons/set/search--style-fluency-systems-regular--static),
13
10
  * and search for keywords. There you will see a wider range of suggestions, and get more ideas
14
- * for a proper icon to use. Then check what the file-name of your favorite icon is, and come
15
- * to this component to search and select it.
16
- *
17
- * Just keep in mind that our icon package doesn't have all the icons that icons8 offers.
18
- * So expect not to find all those icons that you find on their website, in our library too.
11
+ * for a proper icon to use. Then check what the filename of your favorite icon is, and come
12
+ * back to this component to double check that it is available. If it is not found, it is not
13
+ * included in our icon library.
19
14
  * :::
20
15
  *
21
16
  * @exampleComponent limebb-example-icon-picker
@@ -588,19 +588,15 @@ export namespace Components {
588
588
  "ui"?: string;
589
589
  }
590
590
  /**
591
- * This component enables you to search and select an icon, from the icon library that we provide
592
- * via `@lundalogik/lime-icons8` package.
593
- * Name of the selected icon will be emitted by the component, and you will also see a preview
594
- * of it in a chip.
591
+ * Search for an icon and **click on it to copy its name to clipboard**.
592
+ * <limebb-example-icon-finder />
595
593
  * :::tip Pro tip
596
- * Currently, you can only search for strings of text within the file-names of our icons.
597
- * This can make it hard to find a proper icon for the concept that you want to visualize.
598
- * However, you can always go to [icons8 library](https://icons8.com/icon/set/search/windows),
594
+ * The component above searches both the icon name and any tags added to the icon.
595
+ * However, you can always go to the [icons8 library](https://icons8.com/icons/set/search--style-fluency-systems-regular--static),
599
596
  * and search for keywords. There you will see a wider range of suggestions, and get more ideas
600
- * for a proper icon to use. Then check what the file-name of your favorite icon is, and come
601
- * to this component to search and select it.
602
- * Just keep in mind that our icon package doesn't have all the icons that icons8 offers.
603
- * So expect not to find all those icons that you find on their website, in our library too.
597
+ * for a proper icon to use. Then check what the filename of your favorite icon is, and come
598
+ * back to this component to double check that it is available. If it is not found, it is not
599
+ * included in our icon library.
604
600
  * :::
605
601
  * @exampleComponent limebb-example-icon-picker
606
602
  */
@@ -1829,19 +1825,15 @@ declare global {
1829
1825
  "change": string;
1830
1826
  }
1831
1827
  /**
1832
- * This component enables you to search and select an icon, from the icon library that we provide
1833
- * via `@lundalogik/lime-icons8` package.
1834
- * Name of the selected icon will be emitted by the component, and you will also see a preview
1835
- * of it in a chip.
1828
+ * Search for an icon and **click on it to copy its name to clipboard**.
1829
+ * <limebb-example-icon-finder />
1836
1830
  * :::tip Pro tip
1837
- * Currently, you can only search for strings of text within the file-names of our icons.
1838
- * This can make it hard to find a proper icon for the concept that you want to visualize.
1839
- * However, you can always go to [icons8 library](https://icons8.com/icon/set/search/windows),
1831
+ * The component above searches both the icon name and any tags added to the icon.
1832
+ * However, you can always go to the [icons8 library](https://icons8.com/icons/set/search--style-fluency-systems-regular--static),
1840
1833
  * and search for keywords. There you will see a wider range of suggestions, and get more ideas
1841
- * for a proper icon to use. Then check what the file-name of your favorite icon is, and come
1842
- * to this component to search and select it.
1843
- * Just keep in mind that our icon package doesn't have all the icons that icons8 offers.
1844
- * So expect not to find all those icons that you find on their website, in our library too.
1834
+ * for a proper icon to use. Then check what the filename of your favorite icon is, and come
1835
+ * back to this component to double check that it is available. If it is not found, it is not
1836
+ * included in our icon library.
1845
1837
  * :::
1846
1838
  * @exampleComponent limebb-example-icon-picker
1847
1839
  */
@@ -3059,19 +3051,15 @@ declare namespace LocalJSX {
3059
3051
  "ui"?: string;
3060
3052
  }
3061
3053
  /**
3062
- * This component enables you to search and select an icon, from the icon library that we provide
3063
- * via `@lundalogik/lime-icons8` package.
3064
- * Name of the selected icon will be emitted by the component, and you will also see a preview
3065
- * of it in a chip.
3054
+ * Search for an icon and **click on it to copy its name to clipboard**.
3055
+ * <limebb-example-icon-finder />
3066
3056
  * :::tip Pro tip
3067
- * Currently, you can only search for strings of text within the file-names of our icons.
3068
- * This can make it hard to find a proper icon for the concept that you want to visualize.
3069
- * However, you can always go to [icons8 library](https://icons8.com/icon/set/search/windows),
3057
+ * The component above searches both the icon name and any tags added to the icon.
3058
+ * However, you can always go to the [icons8 library](https://icons8.com/icons/set/search--style-fluency-systems-regular--static),
3070
3059
  * and search for keywords. There you will see a wider range of suggestions, and get more ideas
3071
- * for a proper icon to use. Then check what the file-name of your favorite icon is, and come
3072
- * to this component to search and select it.
3073
- * Just keep in mind that our icon package doesn't have all the icons that icons8 offers.
3074
- * So expect not to find all those icons that you find on their website, in our library too.
3060
+ * for a proper icon to use. Then check what the filename of your favorite icon is, and come
3061
+ * back to this component to double check that it is available. If it is not found, it is not
3062
+ * included in our icon library.
3075
3063
  * :::
3076
3064
  * @exampleComponent limebb-example-icon-picker
3077
3065
  */
@@ -4181,19 +4169,15 @@ declare module "@stencil/core" {
4181
4169
  */
4182
4170
  "limebb-feed-timeline-item": LocalJSX.LimebbFeedTimelineItem & JSXBase.HTMLAttributes<HTMLLimebbFeedTimelineItemElement>;
4183
4171
  /**
4184
- * This component enables you to search and select an icon, from the icon library that we provide
4185
- * via `@lundalogik/lime-icons8` package.
4186
- * Name of the selected icon will be emitted by the component, and you will also see a preview
4187
- * of it in a chip.
4172
+ * Search for an icon and **click on it to copy its name to clipboard**.
4173
+ * <limebb-example-icon-finder />
4188
4174
  * :::tip Pro tip
4189
- * Currently, you can only search for strings of text within the file-names of our icons.
4190
- * This can make it hard to find a proper icon for the concept that you want to visualize.
4191
- * However, you can always go to [icons8 library](https://icons8.com/icon/set/search/windows),
4175
+ * The component above searches both the icon name and any tags added to the icon.
4176
+ * However, you can always go to the [icons8 library](https://icons8.com/icons/set/search--style-fluency-systems-regular--static),
4192
4177
  * and search for keywords. There you will see a wider range of suggestions, and get more ideas
4193
- * for a proper icon to use. Then check what the file-name of your favorite icon is, and come
4194
- * to this component to search and select it.
4195
- * Just keep in mind that our icon package doesn't have all the icons that icons8 offers.
4196
- * So expect not to find all those icons that you find on their website, in our library too.
4178
+ * for a proper icon to use. Then check what the filename of your favorite icon is, and come
4179
+ * back to this component to double check that it is available. If it is not found, it is not
4180
+ * included in our icon library.
4197
4181
  * :::
4198
4182
  * @exampleComponent limebb-example-icon-picker
4199
4183
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-crm-building-blocks",
3
- "version": "1.86.0",
3
+ "version": "1.86.2",
4
4
  "description": "A home for shared components meant for use with Lime CRM",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -43,10 +43,10 @@
43
43
  "devDependencies": {
44
44
  "@eslint/eslintrc": "^3.3.0",
45
45
  "@eslint/js": "^9.21.0",
46
- "@limetech/lime-elements": "^38.16.1",
47
- "@limetech/lime-web-components": "^6.2.0",
46
+ "@limetech/lime-elements": "^38.19.0",
47
+ "@limetech/lime-web-components": "^6.3.0",
48
48
  "@limetech/lime-web-components-testing": "^1.0.0",
49
- "@lundalogik/lime-icons8": "^2.33.0",
49
+ "@lundalogik/lime-icons8": "^2.35.0",
50
50
  "@lundalogik/limeclient.js": "^1.81.0",
51
51
  "@stencil/core": "^4.27.2",
52
52
  "@stencil/sass": "^3.1.9",