@limetech/lime-crm-building-blocks 1.112.2 → 1.113.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +115 -0
  4. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  5. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-document-item.cjs.entry.js +2 -2
  9. package/dist/cjs/limebb-document-picker.cjs.entry.js +2 -2
  10. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  17. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +3 -3
  22. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
  23. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +1 -1
  24. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  26. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  28. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  29. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  31. package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
  32. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  33. package/dist/cjs/loader.cjs.js +1 -1
  34. package/dist/collection/collection-manifest.json +1 -0
  35. package/dist/collection/components/composer-toolbar/composer-toolbar.css +26 -0
  36. package/dist/collection/components/composer-toolbar/composer-toolbar.js +316 -0
  37. package/dist/collection/components/composer-toolbar/composer-toolbar.types.js +1 -0
  38. package/dist/collection/components/currency-picker/currency-picker.js +1 -1
  39. package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
  40. package/dist/collection/components/date-picker/date-picker.js +1 -1
  41. package/dist/collection/components/date-range/date-range.js +1 -1
  42. package/dist/collection/components/document-picker/document-item/document-item.js +2 -2
  43. package/dist/collection/components/document-picker/document-picker.css +5 -0
  44. package/dist/collection/components/document-picker/document-picker.js +1 -1
  45. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
  46. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
  47. package/dist/collection/components/feed/feed.js +1 -1
  48. package/dist/collection/components/icon-picker/icon-picker.js +1 -1
  49. package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
  50. package/dist/collection/components/info-tile/info-tile.js +1 -1
  51. package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
  52. package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
  53. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
  54. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +2 -2
  55. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
  56. package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
  57. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +1 -1
  58. package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
  59. package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +1 -1
  60. package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
  61. package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +1 -1
  62. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  63. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  64. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  65. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  66. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  67. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  68. package/dist/collection/components/text-editor/text-editor.js +1 -1
  69. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  70. package/dist/components/currency-picker.js +1 -1
  71. package/dist/components/date-picker.js +1 -1
  72. package/dist/components/document-item.js +2 -2
  73. package/dist/components/feed-item-thumbnail-file-info.js +1 -1
  74. package/dist/components/feed-timeline-item.js +1 -1
  75. package/dist/components/kanban-group.js +1 -1
  76. package/dist/components/kanban-item.js +1 -1
  77. package/dist/components/lime-query-filter-comparison.js +1 -1
  78. package/dist/components/lime-query-filter-expression.js +3 -3
  79. package/dist/components/limebb-composer-toolbar.d.ts +11 -0
  80. package/dist/components/limebb-composer-toolbar.js +136 -0
  81. package/dist/components/limebb-dashboard-widget.js +1 -1
  82. package/dist/components/limebb-date-range.js +1 -1
  83. package/dist/components/limebb-document-picker.js +2 -2
  84. package/dist/components/limebb-feed.js +1 -1
  85. package/dist/components/limebb-icon-picker.js +1 -1
  86. package/dist/components/limebb-info-tile-format.js +1 -1
  87. package/dist/components/limebb-info-tile.js +1 -1
  88. package/dist/components/limebb-lime-query-builder.js +1 -1
  89. package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
  90. package/dist/components/limebb-locale-picker.js +1 -1
  91. package/dist/components/limebb-mention-group-counter.js +2 -2
  92. package/dist/components/limebb-text-editor.js +1 -1
  93. package/dist/components/limebb-trend-indicator.js +1 -1
  94. package/dist/components/limetype-field.js +1 -1
  95. package/dist/components/live-docs-info.js +2 -2
  96. package/dist/components/notification-item.js +1 -1
  97. package/dist/components/order-by-editor.js +1 -1
  98. package/dist/components/order-by-item.js +2 -2
  99. package/dist/components/percentage-visualizer.js +2 -2
  100. package/dist/components/response-format-item.js +1 -1
  101. package/dist/components/summary-popover.js +3 -3
  102. package/dist/esm/lime-crm-building-blocks.js +1 -1
  103. package/dist/esm/limebb-composer-toolbar.entry.js +111 -0
  104. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  105. package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
  106. package/dist/esm/limebb-date-picker.entry.js +1 -1
  107. package/dist/esm/limebb-date-range.entry.js +1 -1
  108. package/dist/esm/limebb-document-item.entry.js +2 -2
  109. package/dist/esm/limebb-document-picker.entry.js +2 -2
  110. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  111. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  112. package/dist/esm/limebb-feed.entry.js +1 -1
  113. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  114. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  115. package/dist/esm/limebb-info-tile.entry.js +1 -1
  116. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  117. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  118. package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
  119. package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +2 -2
  120. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
  121. package/dist/esm/limebb-lime-query-filter-group_3.entry.js +3 -3
  122. package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
  123. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +1 -1
  124. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
  125. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  126. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  127. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  128. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  129. package/dist/esm/limebb-notification-item.entry.js +1 -1
  130. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  131. package/dist/esm/limebb-text-editor.entry.js +1 -1
  132. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  133. package/dist/esm/loader.js +1 -1
  134. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  135. package/dist/lime-crm-building-blocks/{p-2ba38d7f.entry.js → p-00414464.entry.js} +1 -1
  136. package/dist/lime-crm-building-blocks/{p-d7fcac35.entry.js → p-023246db.entry.js} +1 -1
  137. package/dist/lime-crm-building-blocks/{p-62c5cb1b.entry.js → p-0c25d565.entry.js} +1 -1
  138. package/dist/lime-crm-building-blocks/{p-cc1ef69e.entry.js → p-0eac6b68.entry.js} +1 -1
  139. package/dist/lime-crm-building-blocks/{p-7c54f3c7.entry.js → p-14cd62c1.entry.js} +1 -1
  140. package/dist/lime-crm-building-blocks/{p-a1bb9206.entry.js → p-1d44c670.entry.js} +1 -1
  141. package/dist/lime-crm-building-blocks/{p-74953ead.entry.js → p-2395476f.entry.js} +1 -1
  142. package/dist/lime-crm-building-blocks/{p-377da950.entry.js → p-283a6f9e.entry.js} +1 -1
  143. package/dist/lime-crm-building-blocks/{p-239d68c7.entry.js → p-3443a292.entry.js} +1 -1
  144. package/dist/lime-crm-building-blocks/{p-920a321e.entry.js → p-35b75e49.entry.js} +1 -1
  145. package/dist/lime-crm-building-blocks/{p-e980329d.entry.js → p-385020b4.entry.js} +1 -1
  146. package/dist/lime-crm-building-blocks/{p-630fa055.entry.js → p-401ccdec.entry.js} +1 -1
  147. package/dist/lime-crm-building-blocks/{p-71697503.entry.js → p-4d9244e7.entry.js} +1 -1
  148. package/dist/lime-crm-building-blocks/{p-55c494f9.entry.js → p-551ffa9f.entry.js} +1 -1
  149. package/dist/lime-crm-building-blocks/{p-de84f26b.entry.js → p-5d0874f6.entry.js} +1 -1
  150. package/dist/lime-crm-building-blocks/{p-40f29017.entry.js → p-6c67ed0e.entry.js} +1 -1
  151. package/dist/lime-crm-building-blocks/{p-48585665.entry.js → p-711df3e6.entry.js} +1 -1
  152. package/dist/lime-crm-building-blocks/p-79efe2bd.entry.js +1 -0
  153. package/dist/lime-crm-building-blocks/{p-ce1b05e4.entry.js → p-83ff2b4c.entry.js} +1 -1
  154. package/dist/lime-crm-building-blocks/{p-57591c89.entry.js → p-8c3f563e.entry.js} +1 -1
  155. package/dist/lime-crm-building-blocks/p-8eb3abc8.entry.js +1 -0
  156. package/dist/lime-crm-building-blocks/{p-adc423db.entry.js → p-9161869b.entry.js} +1 -1
  157. package/dist/lime-crm-building-blocks/{p-8e885ec8.entry.js → p-9c334694.entry.js} +1 -1
  158. package/dist/lime-crm-building-blocks/{p-e990af19.entry.js → p-a4f367f8.entry.js} +1 -1
  159. package/dist/lime-crm-building-blocks/{p-5cea7fb4.entry.js → p-b2e705bc.entry.js} +1 -1
  160. package/dist/lime-crm-building-blocks/{p-f0890c24.entry.js → p-c09dcd4c.entry.js} +1 -1
  161. package/dist/lime-crm-building-blocks/{p-64cbf4f4.entry.js → p-ddf0dcbc.entry.js} +1 -1
  162. package/dist/lime-crm-building-blocks/{p-8633cd5f.entry.js → p-df13ebba.entry.js} +1 -1
  163. package/dist/lime-crm-building-blocks/{p-2fd586a0.entry.js → p-e96367d2.entry.js} +1 -1
  164. package/dist/lime-crm-building-blocks/{p-b90be9d3.entry.js → p-f31eeeaa.entry.js} +1 -1
  165. package/dist/types/components/composer-toolbar/composer-toolbar.d.ts +77 -0
  166. package/dist/types/components/composer-toolbar/composer-toolbar.types.d.ts +40 -0
  167. package/dist/types/components.d.ts +153 -2
  168. package/package.json +4 -4
  169. package/dist/lime-crm-building-blocks/p-1b13e8f1.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as r}from"./p-52cf8641.js";import{c as o}from"./p-199799ff.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"64a1c152d49ac5daa9ec02237ff17d9bb97face5",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}: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}.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{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.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{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;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{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.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}';export{a as limebb_notification_item}
1
+ import{r as t,c as i,h as e,H as r}from"./p-52cf8641.js";import{c as o}from"./p-199799ff.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"0c45f2a691bead68dfd4e0d3dcf22dc76118e778",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}: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}.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{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.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{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;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{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.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}';export{a as limebb_notification_item}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i}from"./p-52cf8641.js";import{Z as o}from"./p-199799ff.js";import{v as r}from"./p-d47b6c3c.js";import"./p-b02c99d5.js";function s(e){let t;try{t=JSON.parse(e)}catch(e){throw new Error(`Invalid JSON: ${e.message}`)}if(null===t||"object"!=typeof t)throw new Error("Response format must be an object");const i=new Set(["object","aggregates"]),o=Object.keys(t),r=o.filter((e=>!i.has(e)));if(r.length>0)throw new Error(`Unexpected properties in response format: ${r.join(", ")}. Only 'object' and 'aggregates' are allowed.`);if(o.length>0&&!t.object&&!t.aggregates)throw new Error("Response format must contain at least one of: object, aggregates");return t}const l=class{constructor(i){e(this,i),this.change=t(this,"change",7),this.label="Response Format",this.helperText="",this.mode="visual",this.codeValue="",this.handleModeChange=e=>{e.stopPropagation();const t=e.detail.id;"visual"===t?this.switchToVisualMode():"code"===t&&this.switchToCode()},this.switchToVisualMode=()=>{try{const e=s(this.codeValue);if(!r(e,this.limetypes,this.limetype,this.visualModeEnabled).visualModeSupported)return;this.internalValue=e,this.mode="visual",this.change.emit(e)}catch(e){}},this.switchToCode=()=>{this.updateCodeValue(),this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=s(this.codeValue);this.internalValue=e,this.change.emit(e)}catch(e){}},this.handleVisualModeChange=e=>{e.stopPropagation(),this.internalValue=e.detail,this.updateCodeValue(),this.change.emit(e.detail)}}get visualModeEnabled(){var e,t,i;return null!==(i=null===(t=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===t?void 0:t.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==i&&i}componentWillLoad(){this.internalValue=this.value||{object:{_id:null}},this.updateCodeValue(),this.visualModeEnabled&&this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}componentWillUpdate(){this.value&&"visual"===this.mode&&(this.internalValue=this.value)}render(){const e=this.checkVisualModeSupport();return i("div",{key:"1231dbb540a0facfea168a239aa86507f06667ac",class:"response-format-builder"},this.label&&i("h1",{key:"9b0ede18f9922da64b4bd7e2a6b875e10e9d5838",class:"builder-label"},this.label),this.helperText&&i("p",{key:"6ac79cac8af59a1ef9c05d1eead5ded2b1de520b",class:"builder-helper-text"},this.helperText),this.visualModeEnabled&&i("div",{key:"1add7c2d07458dca12e325566774996c79381a41",class:"mode-controls"},this.renderModeSwitch(e)),this.visualModeEnabled&&"code"!==this.mode?i("div",{class:"visual-mode"},this.renderVisualMode()):i("div",{class:"code-mode"},this.renderCodeEditor(e)))}renderModeSwitch(e){const t=!e.visualModeSupported,o=[{id:"visual",title:"Visual"},{id:"code",title:"Code"}].map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return i("limel-button-group",{value:o,disabled:t,onChange:this.handleModeChange})}renderCodeEditor(e){return i("div",{class:"code-editor-container"},i("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&i("div",{class:"validation-errors"},i("strong",null,"Invalid Response Format:"),i("ul",null,e.validationErrors.map((e=>i("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&i("div",{class:"visual-mode-limitations"},i("strong",null,"Cannot switch to visual mode:"),i("ul",null,e.visualModeLimitations.map((e=>i("li",null,e))))))}renderVisualMode(){return i("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalValue,onChange:this.handleVisualModeChange})}checkVisualModeSupport(){if(!this.limetypes)return{valid:!1,visualModeSupported:!1,validationErrors:["Limetypes not loaded"],visualModeLimitations:[]};let e;if("code"===this.mode)try{e=s(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:[e.message],visualModeLimitations:[]}}else e=this.internalValue;return r(e,this.limetypes,this.limetype,this.visualModeEnabled)}updateCodeValue(){this.codeValue=JSON.stringify(this.internalValue,null,2)}};(function(e,t,i,o){var r,s=arguments.length,l=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(l=(s<3?r(l):s>3?r(t,i,l):r(t,i))||l);s>3&&l&&Object.defineProperty(t,i,l)})([o()],l.prototype,"limetypes",void 0),l.style=":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.visual-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .visual-mode-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .visual-mode-limitations li{margin:0.25rem 0}";export{l as limebb_lime_query_response_format_builder}
1
+ import{r as e,c as t,h as i}from"./p-52cf8641.js";import{Z as o}from"./p-199799ff.js";import{v as r}from"./p-d47b6c3c.js";import"./p-b02c99d5.js";function s(e){let t;try{t=JSON.parse(e)}catch(e){throw new Error(`Invalid JSON: ${e.message}`)}if(null===t||"object"!=typeof t)throw new Error("Response format must be an object");const i=new Set(["object","aggregates"]),o=Object.keys(t),r=o.filter((e=>!i.has(e)));if(r.length>0)throw new Error(`Unexpected properties in response format: ${r.join(", ")}. Only 'object' and 'aggregates' are allowed.`);if(o.length>0&&!t.object&&!t.aggregates)throw new Error("Response format must contain at least one of: object, aggregates");return t}const l=class{constructor(i){e(this,i),this.change=t(this,"change",7),this.label="Response Format",this.helperText="",this.mode="visual",this.codeValue="",this.handleModeChange=e=>{e.stopPropagation();const t=e.detail.id;"visual"===t?this.switchToVisualMode():"code"===t&&this.switchToCode()},this.switchToVisualMode=()=>{try{const e=s(this.codeValue);if(!r(e,this.limetypes,this.limetype,this.visualModeEnabled).visualModeSupported)return;this.internalValue=e,this.mode="visual",this.change.emit(e)}catch(e){}},this.switchToCode=()=>{this.updateCodeValue(),this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=s(this.codeValue);this.internalValue=e,this.change.emit(e)}catch(e){}},this.handleVisualModeChange=e=>{e.stopPropagation(),this.internalValue=e.detail,this.updateCodeValue(),this.change.emit(e.detail)}}get visualModeEnabled(){var e,t,i;return null!==(i=null===(t=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===t?void 0:t.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==i&&i}componentWillLoad(){this.internalValue=this.value||{object:{_id:null}},this.updateCodeValue(),this.visualModeEnabled&&this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}componentWillUpdate(){this.value&&"visual"===this.mode&&(this.internalValue=this.value)}render(){const e=this.checkVisualModeSupport();return i("div",{key:"56166271cfd95e3164f6002605de9b4a73d5b850",class:"response-format-builder"},this.label&&i("h1",{key:"cccc53913dc0ced44b736328a16c85b3db2a61d4",class:"builder-label"},this.label),this.helperText&&i("p",{key:"765ea2f4a052f78beba9c60157f07711f432293e",class:"builder-helper-text"},this.helperText),this.visualModeEnabled&&i("div",{key:"15a7159322713ab288ef70e8f98aaa11d5064d1f",class:"mode-controls"},this.renderModeSwitch(e)),this.visualModeEnabled&&"code"!==this.mode?i("div",{class:"visual-mode"},this.renderVisualMode()):i("div",{class:"code-mode"},this.renderCodeEditor(e)))}renderModeSwitch(e){const t=!e.visualModeSupported,o=[{id:"visual",title:"Visual"},{id:"code",title:"Code"}].map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return i("limel-button-group",{value:o,disabled:t,onChange:this.handleModeChange})}renderCodeEditor(e){return i("div",{class:"code-editor-container"},i("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&i("div",{class:"validation-errors"},i("strong",null,"Invalid Response Format:"),i("ul",null,e.validationErrors.map((e=>i("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&i("div",{class:"visual-mode-limitations"},i("strong",null,"Cannot switch to visual mode:"),i("ul",null,e.visualModeLimitations.map((e=>i("li",null,e))))))}renderVisualMode(){return i("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalValue,onChange:this.handleVisualModeChange})}checkVisualModeSupport(){if(!this.limetypes)return{valid:!1,visualModeSupported:!1,validationErrors:["Limetypes not loaded"],visualModeLimitations:[]};let e;if("code"===this.mode)try{e=s(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:[e.message],visualModeLimitations:[]}}else e=this.internalValue;return r(e,this.limetypes,this.limetype,this.visualModeEnabled)}updateCodeValue(){this.codeValue=JSON.stringify(this.internalValue,null,2)}};(function(e,t,i,o){var r,s=arguments.length,l=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(l=(s<3?r(l):s>3?r(t,i,l):r(t,i))||l);s>3&&l&&Object.defineProperty(t,i,l)})([o()],l.prototype,"limetypes",void 0),l.style=":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.visual-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .visual-mode-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .visual-mode-limitations li{margin:0.25rem 0}";export{l as limebb_lime_query_response_format_builder}
@@ -1 +1 @@
1
- import{r as e,h as r,H as a}from"./p-52cf8641.js";import{g as l}from"./p-a99197b1.js";const t=1e-4,o=class{valueChanged(e){this.numValue=this.parseValue(e)}constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"5f43d08e559a8be88c2d2426699208cef33fe9ae",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"cccb03afaea2560edf610356286b59c7a3f9ebcd",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"a4bff08185207a8ae82be37c607b1d1daf10d1e7",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=l(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,t)*(100-a):e/Math.max(Math.abs(this.rangeMin),t)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:["valueChanged"]}}};o.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{o as limebb_percentage_visualizer}
1
+ import{r as e,h as r,H as a}from"./p-52cf8641.js";import{g as l}from"./p-a99197b1.js";const t=1e-4,o=class{valueChanged(e){this.numValue=this.parseValue(e)}constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"456afa7a4dfec41b7d293518d3150fa520c76c87",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"ffdc013e98a23f690ff17adf6834f280aa824886",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"574b107be7e7fc941e957365fc8b2b7f5a6bd5bf",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=l(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,t)*(100-a):e/Math.max(Math.abs(this.rangeMin),t)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:["valueChanged"]}}};o.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{o as limebb_percentage_visualizer}
@@ -1 +1 @@
1
- import{r as o,h as r,H as e}from"./p-52cf8641.js";import{g as t}from"./p-a99197b1.js";const a=class{valueChanged(o){this.numValue=this.parseValue(o)}constructor(e){o(this,e),this.suffix="%",this.reducePresence=!0,this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}render(){return r(e,{key:"ab0f00081e519133ed9e139c907e3f5365e1323c",class:this.getContainerClassList()},r("limel-notched-outline",{key:"41578e4885e1de13ca6dfc2bd90e0aa58caaf58a",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},r("div",{key:"23da812d26acb20a8841eff9a8ad2330de01e8a3",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),r("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:r("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=`${this.value} - ${this.formerValue>0?this.formerValue:"("+this.formerValue+")"} = ${this.calculateGrowth()} ${this.suffix} `,e=this.calculatePercentage();return r("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:e+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return r("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=t(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){if(0===this.formerValue)return null;const o=((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2);return Number.parseFloat(o)}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(this.unifyMinusSign(o)):o}formatValue(o,r){const e=`${o} ${r}`;return o>0?"+"+e:this.convertToUnicodeMinus(e)}getArrowIcon(){return r("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:["valueChanged"]}}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}';export{a as limebb_trend_indicator}
1
+ import{r as o,h as r,H as t}from"./p-52cf8641.js";import{g as e}from"./p-a99197b1.js";const a=class{valueChanged(o){this.numValue=this.parseValue(o)}constructor(t){o(this,t),this.suffix="%",this.reducePresence=!0,this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}render(){return r(t,{key:"2ed101327ee07b36639235704c82a35602331185",class:this.getContainerClassList()},r("limel-notched-outline",{key:"09daaa1c59fbc5b58389ec73e0248bc87d4f2fcc",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},r("div",{key:"09541f6ce5d94a0f739c564e1d1bd3bdfe8bdf7a",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),r("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:r("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=`${this.value} - ${this.formerValue>0?this.formerValue:"("+this.formerValue+")"} = ${this.calculateGrowth()} ${this.suffix} `,t=this.calculatePercentage();return r("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:t+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return r("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=e(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){if(0===this.formerValue)return null;const o=((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2);return Number.parseFloat(o)}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(this.unifyMinusSign(o)):o}formatValue(o,r){const t=`${o} ${r}`;return o>0?"+"+t:this.convertToUnicodeMinus(t)}getArrowIcon(){return r("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:["valueChanged"]}}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}';export{a as limebb_trend_indicator}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as r}from"./p-52cf8641.js";import{c as l,r as s}from"./p-199799ff.js";const a=[{value:s.EQUALS,label:"webclient.operator.equals",icon:"-lime-filter-equal"},{value:s.NOT_EQUALS,label:"webclient.operator.not-equals",icon:"-lime-filter-equal-not"},{value:s.GREATER,label:"webclient.operator.greater-than",icon:"-lime-filter-greater",applicableTypes:["integer","decimal","date","time"]},{value:s.GREATER_OR_EQUAL,label:"webclient.operator.greater-than-or-equal-to",icon:"-lime-filter-greater-equal",applicableTypes:["integer","decimal","date","time"]},{value:s.LESS,label:"webclient.operator.less-than",icon:"-lime-filter-less",applicableTypes:["integer","decimal","date","time"]},{value:s.LESS_OR_EQUAL,label:"webclient.operator.less-than-or-equal-to",icon:"-lime-filter-less-equal",applicableTypes:["integer","decimal","date","time"]},{value:s.IN,label:"webclient.operator.in-filter",icon:"-lime-filter-set-included"},{value:s.LIKE,label:"webclient.operator.contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:s.BEGINS,label:"webclient.operator.begins-with",icon:"-lime-filter-starts-with",applicableTypes:["string","text"]},{value:s.ENDS,label:"webclient.operator.ends-with",icon:"-lime-filter-ends-with",applicableTypes:["string","text"]}],o=class{constructor(i){e(this,i),this.expressionChange=t(this,"expressionChange",7),this.handlePropertyChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{key:e.detail}))},this.handleOperatorChange=e=>{e.stopPropagation();const t=e.detail.value,i=this.expression.op;let r=this.expression.exp;t!==s.IN||Array.isArray(r)?i===s.IN&&t!==s.IN&&Array.isArray(r)&&(r=r.length>0?r[0]:""):r=void 0!==r&&""!==r?[r]:[],this.expressionChange.emit({key:this.expression.key,op:t,exp:r})},this.handleValueChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{exp:e.detail}))},this.removeExpression=()=>{this.expressionChange.emit(void 0)}}render(){return i(r,{key:"7f43cdd2fe758a89c72f93b45986fbe3919d3173"},this.renderHeader(),i("div",{key:"870ab0dc2f8467f95d00194e78eeb4a9e8fe711e",class:"expression-container"},this.renderPropertySelector(),this.renderOperator(),this.renderValueInput(),i("limel-icon-button",{key:"2712a25b9058e1d60cbf86c5b968eaa054a96f0e",class:"remove",icon:"trash",label:"Remove condition",onClick:this.removeExpression})))}renderHeader(){if(this.label)return i("limel-header",{subheading:this.label})}renderPropertySelector(){return i("limebb-property-selector",{platform:this.platform,context:this.context,label:"Property",limetype:this.limetype,value:this.expression.key,required:!0,onChange:this.handlePropertyChange})}renderOperator(){const e=!!this.expression.op,t=a.map((e=>{var t,i;return{text:null!==(i=null===(t=this.translator)||void 0===t?void 0:t.get(e.label))&&void 0!==i?i:e.label,value:e.value,icon:e.icon?{name:e.icon}:void 0}})),r=t.find((e=>e.value===this.expression.op));return i("limel-select",{class:"operator",label:"Operator",value:r,options:t,disabled:!e&&!this.expression.key,onChange:this.handleOperatorChange})}renderValueInput(){return this.expression.op?i("limebb-lime-query-value-input",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,propertyPath:this.expression.key,operator:this.expression.op,value:this.expression.exp,onChange:this.handleValueChange}):null}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(l.Translate)}};o.style=":host(limebb-lime-query-filter-comparison){display:flex;flex-direction:column;gap:0.5rem}.expression-container{position:relative;display:grid;grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr));grid-gap:0.5rem;padding-right:2.75rem}.remove{position:absolute;right:0;top:0.125rem}";const n=class{constructor(i){e(this,i),this.expressionChange=t(this,"expressionChange",7),this.handleExpressionChange=e=>{e.stopPropagation(),this.expressionChange.emit(e.detail)}}render(){if(!this.expression)return;const e={platform:this.platform,context:this.context,label:this.label,limetype:this.limetype,activeLimetype:this.activeLimetype};return"key"in this.expression?i("limebb-lime-query-filter-comparison",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):this.expression.op===s.AND||this.expression.op===s.OR?i("limebb-lime-query-filter-group",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):this.expression.op===s.NOT?i("limebb-lime-query-filter-not",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):void 0}};n.style='@charset "UTF-8";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem}';export{o as limebb_lime_query_filter_comparison,n as limebb_lime_query_filter_expression}
1
+ import{r as e,c as t,h as i,H as r}from"./p-52cf8641.js";import{c as l,r as s}from"./p-199799ff.js";const a=[{value:s.EQUALS,label:"webclient.operator.equals",icon:"-lime-filter-equal"},{value:s.NOT_EQUALS,label:"webclient.operator.not-equals",icon:"-lime-filter-equal-not"},{value:s.GREATER,label:"webclient.operator.greater-than",icon:"-lime-filter-greater",applicableTypes:["integer","decimal","date","time"]},{value:s.GREATER_OR_EQUAL,label:"webclient.operator.greater-than-or-equal-to",icon:"-lime-filter-greater-equal",applicableTypes:["integer","decimal","date","time"]},{value:s.LESS,label:"webclient.operator.less-than",icon:"-lime-filter-less",applicableTypes:["integer","decimal","date","time"]},{value:s.LESS_OR_EQUAL,label:"webclient.operator.less-than-or-equal-to",icon:"-lime-filter-less-equal",applicableTypes:["integer","decimal","date","time"]},{value:s.IN,label:"webclient.operator.in-filter",icon:"-lime-filter-set-included"},{value:s.LIKE,label:"webclient.operator.contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:s.BEGINS,label:"webclient.operator.begins-with",icon:"-lime-filter-starts-with",applicableTypes:["string","text"]},{value:s.ENDS,label:"webclient.operator.ends-with",icon:"-lime-filter-ends-with",applicableTypes:["string","text"]}],o=class{constructor(i){e(this,i),this.expressionChange=t(this,"expressionChange",7),this.handlePropertyChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{key:e.detail}))},this.handleOperatorChange=e=>{e.stopPropagation();const t=e.detail.value,i=this.expression.op;let r=this.expression.exp;t!==s.IN||Array.isArray(r)?i===s.IN&&t!==s.IN&&Array.isArray(r)&&(r=r.length>0?r[0]:""):r=void 0!==r&&""!==r?[r]:[],this.expressionChange.emit({key:this.expression.key,op:t,exp:r})},this.handleValueChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{exp:e.detail}))},this.removeExpression=()=>{this.expressionChange.emit(void 0)}}render(){return i(r,{key:"1bbb2389d353b5a1b174ee5423ab524a350d5810"},this.renderHeader(),i("div",{key:"a81fed03577d534e509ddcbc9ef66456191fe53f",class:"expression-container"},this.renderPropertySelector(),this.renderOperator(),this.renderValueInput(),i("limel-icon-button",{key:"e3f76847095e0d586d7c72e6750acb220a187e6e",class:"remove",icon:"trash",label:"Remove condition",onClick:this.removeExpression})))}renderHeader(){if(this.label)return i("limel-header",{subheading:this.label})}renderPropertySelector(){return i("limebb-property-selector",{platform:this.platform,context:this.context,label:"Property",limetype:this.limetype,value:this.expression.key,required:!0,onChange:this.handlePropertyChange})}renderOperator(){const e=!!this.expression.op,t=a.map((e=>{var t,i;return{text:null!==(i=null===(t=this.translator)||void 0===t?void 0:t.get(e.label))&&void 0!==i?i:e.label,value:e.value,icon:e.icon?{name:e.icon}:void 0}})),r=t.find((e=>e.value===this.expression.op));return i("limel-select",{class:"operator",label:"Operator",value:r,options:t,disabled:!e&&!this.expression.key,onChange:this.handleOperatorChange})}renderValueInput(){return this.expression.op?i("limebb-lime-query-value-input",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,propertyPath:this.expression.key,operator:this.expression.op,value:this.expression.exp,onChange:this.handleValueChange}):null}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(l.Translate)}};o.style=":host(limebb-lime-query-filter-comparison){display:flex;flex-direction:column;gap:0.5rem}.expression-container{position:relative;display:grid;grid-template-columns:repeat(auto-fit, minmax(10rem, 1fr));grid-gap:0.5rem;padding-right:2.75rem}.remove{position:absolute;right:0;top:0.125rem}";const n=class{constructor(i){e(this,i),this.expressionChange=t(this,"expressionChange",7),this.handleExpressionChange=e=>{e.stopPropagation(),this.expressionChange.emit(e.detail)}}render(){if(!this.expression)return;const e={platform:this.platform,context:this.context,label:this.label,limetype:this.limetype,activeLimetype:this.activeLimetype};return"key"in this.expression?i("limebb-lime-query-filter-comparison",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):this.expression.op===s.AND||this.expression.op===s.OR?i("limebb-lime-query-filter-group",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):this.expression.op===s.NOT?i("limebb-lime-query-filter-not",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):void 0}};n.style='@charset "UTF-8";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem}';export{o as limebb_lime_query_filter_comparison,n as limebb_lime_query_filter_expression}
@@ -1 +1 @@
1
- import{r as e,c as o,h as r,H as t}from"./p-52cf8641.js";import{z as i,c as a}from"./p-199799ff.js";const n=class{constructor(r){e(this,r),this.loadMore=o(this,"loadMore",7),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return r(t,{key:"facbffb1c7247c2fe6873b0764bfeed96cd0eebd"},this.renderHelp(),this.renderGroupHeading(),this.renderGroupSummary(),this.renderItems())}renderGroupSummary(){if(this.summary&&this.totalCount)return r("limel-markdown",{class:"group-summary",value:this.summary})}renderGroupHeading(){return r("limel-header",{heading:this.heading},this.renderCounterBadge())}renderHelp(){if(this.help)return r("limel-help",{value:this.help})}renderSpinner(){if(this.loading)return r("limel-spinner",{size:"small"})}renderCounterBadge(){if(this.totalCount)return[r("limel-badge",{slot:"actions",id:"badge-tooltip",label:this.totalCount}),this.renderTooltip()]}renderTooltip(){const e=this.translator.get("webclient.kanban.item-in-group",{count:this.totalCount}),o=this.limetype?this.labelWithLimetype():e;return r("limel-tooltip",{elementId:"badge-tooltip",label:o||"",openDirection:"top"})}labelWithLimetype(){return this.translator.get("webclient.kanban.limetype-item-in-group",{limetype:this.totalCount>1?this.limetype.localname.plural:this.limetype.localname.singular,count:this.totalCount})}renderItems(){if(this.loading||0!==this.items.length)return r("div",{class:"items"},this.renderKanbanItems(),this.renderSpinner(),this.renderLoadMore())}renderKanbanItems(){return this.items.map((e=>{var o,t;const i=null===(o=e.bodyComponent)||void 0===o?void 0:o.name;return r("limebb-kanban-item",{tabindex:0,platform:this.platform,context:this.context,item:e,key:e.id},i&&r(i,Object.assign({slot:"body",platform:this.platform,context:this.context},null===(t=e.bodyComponent)||void 0===t?void 0:t.props)))}))}renderLoadMore(){if(!(this.loading||this.items.length>=this.totalCount))return r("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.translator.get("webclient.load-more")})}get translator(){return this.platform.get(a.Translate)}};(function(e,o,r,t){var i,a=arguments.length,n=a<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,r,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(n=(a<3?i(n):a>3?i(o,r,n):i(o,r))||n);a>3&&n&&Object.defineProperty(o,r,n)})([i()],n.prototype,"limetype",void 0),n.style='@charset "UTF-8";: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(--limel-theme-on-surface-color);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,#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);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}*{box-sizing:border-box}:host(limebb-kanban-group){position:relative;background-color:rgb(var(--limebb-kanban-group-primary-background));--header-top-right-left-border-radius:0.5rem;--limebb-kanban-group-secondary-background:var(--contrast-300);--limebb-kanban-group-primary-background:var(--contrast-600);scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem;min-width:var(--limebb-kanban-group-width, 22rem);max-width:100%}:host(limebb-kanban-group[total-count="0"]){min-width:var(--limebb-kanban-group-width, 8rem)}:host(limebb-kanban-group.secondary){border:1px dashed rgb(var(--contrast-700));background-color:rgb(var(--limebb-kanban-group-secondary-background))}:host(limebb-kanban-group.secondary) limebb-kanban-item{border:1px dashed rgb(var(--contrast-700))}:host(limebb-kanban-group.secondary) limel-header{background-color:rgb(var(--limebb-kanban-group-secondary-background))}limel-header{padding-right:0.5rem;background-color:rgb(var(--limebb-kanban-group-primary-background));width:100%}limel-badge{--badge-background-color:rgb(var(--contrast-200))}limel-help{position:absolute;z-index:1;left:-0.25rem;top:-0.25rem}.group-summary{flex-shrink:0;padding:0 0.75rem 0.5rem 0.75rem;opacity:0.6;max-height:7rem;max-width:100%;overflow-y:auto}.load-more-button,limel-spinner{align-self:center}.load-more-button{--icon-background-color:var(--lime-elevated-surface-background-color)}.items{--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:2rem;flex-grow:1;display:flex;flex-direction:column;gap:0.75rem;padding:var(--limel-top-edge-fade-height) 0.5rem var(--limel-bottom-edge-fade-height) 0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}limebb-kanban-item{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(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover,limebb-kanban-item:focus,limebb-kanban-item:focus-visible{will-change:color, background-color, box-shadow, transform}limebb-kanban-item:hover,limebb-kanban-item:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover{box-shadow:var(--button-shadow-hovered)}limebb-kanban-item: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)}limebb-kanban-item:hover,limebb-kanban-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limebb-kanban-item:focus{outline:none}limebb-kanban-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limebb-kanban-item.is-selected{box-shadow:var(--shadow-focused-state)}limebb-kanban-item.is-selected:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}';export{n as limebb_kanban_group}
1
+ import{r as e,c as o,h as r,H as t}from"./p-52cf8641.js";import{z as i,c as a}from"./p-199799ff.js";const n=class{constructor(r){e(this,r),this.loadMore=o(this,"loadMore",7),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return r(t,{key:"1257ca054481efc8f33ad7b9fb729ee8304e5539"},this.renderHelp(),this.renderGroupHeading(),this.renderGroupSummary(),this.renderItems())}renderGroupSummary(){if(this.summary&&this.totalCount)return r("limel-markdown",{class:"group-summary",value:this.summary})}renderGroupHeading(){return r("limel-header",{heading:this.heading},this.renderCounterBadge())}renderHelp(){if(this.help)return r("limel-help",{value:this.help})}renderSpinner(){if(this.loading)return r("limel-spinner",{size:"small"})}renderCounterBadge(){if(this.totalCount)return[r("limel-badge",{slot:"actions",id:"badge-tooltip",label:this.totalCount}),this.renderTooltip()]}renderTooltip(){const e=this.translator.get("webclient.kanban.item-in-group",{count:this.totalCount}),o=this.limetype?this.labelWithLimetype():e;return r("limel-tooltip",{elementId:"badge-tooltip",label:o||"",openDirection:"top"})}labelWithLimetype(){return this.translator.get("webclient.kanban.limetype-item-in-group",{limetype:this.totalCount>1?this.limetype.localname.plural:this.limetype.localname.singular,count:this.totalCount})}renderItems(){if(this.loading||0!==this.items.length)return r("div",{class:"items"},this.renderKanbanItems(),this.renderSpinner(),this.renderLoadMore())}renderKanbanItems(){return this.items.map((e=>{var o,t;const i=null===(o=e.bodyComponent)||void 0===o?void 0:o.name;return r("limebb-kanban-item",{tabindex:0,platform:this.platform,context:this.context,item:e,key:e.id},i&&r(i,Object.assign({slot:"body",platform:this.platform,context:this.context},null===(t=e.bodyComponent)||void 0===t?void 0:t.props)))}))}renderLoadMore(){if(!(this.loading||this.items.length>=this.totalCount))return r("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.translator.get("webclient.load-more")})}get translator(){return this.platform.get(a.Translate)}};(function(e,o,r,t){var i,a=arguments.length,n=a<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,r,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(n=(a<3?i(n):a>3?i(o,r,n):i(o,r))||n);a>3&&n&&Object.defineProperty(o,r,n)})([i()],n.prototype,"limetype",void 0),n.style='@charset "UTF-8";: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(--limel-theme-on-surface-color);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,#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);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}*{box-sizing:border-box}:host(limebb-kanban-group){position:relative;background-color:rgb(var(--limebb-kanban-group-primary-background));--header-top-right-left-border-radius:0.5rem;--limebb-kanban-group-secondary-background:var(--contrast-300);--limebb-kanban-group-primary-background:var(--contrast-600);scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem;min-width:var(--limebb-kanban-group-width, 22rem);max-width:100%}:host(limebb-kanban-group[total-count="0"]){min-width:var(--limebb-kanban-group-width, 8rem)}:host(limebb-kanban-group.secondary){border:1px dashed rgb(var(--contrast-700));background-color:rgb(var(--limebb-kanban-group-secondary-background))}:host(limebb-kanban-group.secondary) limebb-kanban-item{border:1px dashed rgb(var(--contrast-700))}:host(limebb-kanban-group.secondary) limel-header{background-color:rgb(var(--limebb-kanban-group-secondary-background))}limel-header{padding-right:0.5rem;background-color:rgb(var(--limebb-kanban-group-primary-background));width:100%}limel-badge{--badge-background-color:rgb(var(--contrast-200))}limel-help{position:absolute;z-index:1;left:-0.25rem;top:-0.25rem}.group-summary{flex-shrink:0;padding:0 0.75rem 0.5rem 0.75rem;opacity:0.6;max-height:7rem;max-width:100%;overflow-y:auto}.load-more-button,limel-spinner{align-self:center}.load-more-button{--icon-background-color:var(--lime-elevated-surface-background-color)}.items{--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:2rem;flex-grow:1;display:flex;flex-direction:column;gap:0.75rem;padding:var(--limel-top-edge-fade-height) 0.5rem var(--limel-bottom-edge-fade-height) 0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}limebb-kanban-item{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(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover,limebb-kanban-item:focus,limebb-kanban-item:focus-visible{will-change:color, background-color, box-shadow, transform}limebb-kanban-item:hover,limebb-kanban-item:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover{box-shadow:var(--button-shadow-hovered)}limebb-kanban-item: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)}limebb-kanban-item:hover,limebb-kanban-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limebb-kanban-item:focus{outline:none}limebb-kanban-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limebb-kanban-item.is-selected{box-shadow:var(--shadow-focused-state)}limebb-kanban-item.is-selected:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}';export{n as limebb_kanban_group}
@@ -1 +1 @@
1
- import{r as t,h as e,g as i}from"./p-52cf8641.js";import{c as r,a as o,f as s,Z as n,s as l,r as a}from"./p-199799ff.js";import{i as h,a as u,b as c,c as f,g as d,d as v,e as p}from"./p-5322fd19.js";import{i as g}from"./p-b31772c8.js";var b=Object.prototype.hasOwnProperty;class m{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:o,value:s,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const l={widgetType:"info-tile",limetype:t,filterId:e};return i&&(l.filterName=i),l.aggregateOperator=r,o&&(l.propertyName=o),void 0!==s&&(l.value=s),n&&(l.label=n),{data:l,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class w{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class y{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class j{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class O{constructor(t){this.locale=t}format(t,e){var i,r;const o=new Intl.NumberFormat(this.locale,e.options),s=o.formatToParts(t);let n="",l="",a="";for(const t of s)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?a+=t.value:l+=t.value;return l||(l=o.format(t),n="",a=""),{prefix:n,value:l,suffix:a}}}class x{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:o}=this.getRelativeTime(t),s=i.formatToParts(r,o);let n="",l="",a="";for(const t of s)"literal"!==t.type||l?"literal"===t.type&&l?a+=t.value:l+=t.value:n+=t.value;return l||(l=n||a,n="",a=""),{prefix:n,value:l,suffix:a}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),o=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of o){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class I{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new O(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new j(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new x(this.locale):new y(this.locale)}}var k=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const F=class{constructor(e){t(this,e),this.aggregateOperator=l.Count,this.loading=!1,this.error=!1}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,i;const r=this.getFilter(),o=this.getFormattedValue(),s={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==o?void 0:o.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(i=null==o?void 0:o.suffix)||void 0===i?void 0:i.trim())||this.suffix},n=Object.assign(Object.assign({},s),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),l=Object.assign(Object.assign({},s),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==o?void 0:o.value.trim()});return e("limel-info-tile",Object.assign({key:"3bf7b73958c43b6655b27864313cdcb35806a544",class:{error:!r||this.error}},!r||this.error?n:l))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new y(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(h(t)&&(g(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||f(t)))return!t.length;var e=d(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(v(t))return!p(t).length;for(var i in t)if(b.call(t,i))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){if(!t)return{href:"#"};const e=["explorer",t.limetype,t.id].join("/"),i=this.getRelationPropertyName(this.limetypes[t.limetype]),r=this.buildContextAwareFilter(t.filter,i);return r?{href:`${e}?filter=${encodeURIComponent(JSON.stringify(r))}`}:{href:e}}buildContextAwareFilter(t,e){if(!e)return t;const i={key:e,op:a.EQUALS,exp:this.context.id};return t?{op:a.AND,exp:[i,t]}:{relationFilter:i}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new I(this.language).createFormatter(this.format,t)}getRelationPropertyName(t){var e,i,r;if(t&&this.context.limetype&&this.context.id){if(this.propertyName){const t=this.limetypes[this.context.limetype],r=null===(i=null===(e=null==t?void 0:t.getProperty(this.propertyName))||void 0===e?void 0:e.relation)||void 0===i?void 0:i.getBackreference();if(r)return r.name}return null===(r=Object.values(t.properties).find((t=>{var e;return(null===(e=t.relation)||void 0===e?void 0:e.getLimetype().name)===this.context.limetype})))||void 0===r?void 0:r.name}}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new w(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(r.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new m((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?this.getLocalizedString(t.name):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.host)}get host(){return i(this)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};k([o({})],F.prototype,"config",void 0),k([s()],F.prototype,"filters",void 0),k([n()],F.prototype,"limetypes",void 0),F.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{F as limebb_info_tile}
1
+ import{r as t,h as e,g as i}from"./p-52cf8641.js";import{c as r,a as o,f as s,Z as n,s as l,r as a}from"./p-199799ff.js";import{i as h,a as u,b as c,c as f,g as d,d as v,e as p}from"./p-5322fd19.js";import{i as g}from"./p-b31772c8.js";var b=Object.prototype.hasOwnProperty;class m{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:o,value:s,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const l={widgetType:"info-tile",limetype:t,filterId:e};return i&&(l.filterName=i),l.aggregateOperator=r,o&&(l.propertyName=o),void 0!==s&&(l.value=s),n&&(l.label=n),{data:l,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class w{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class y{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class j{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class O{constructor(t){this.locale=t}format(t,e){var i,r;const o=new Intl.NumberFormat(this.locale,e.options),s=o.formatToParts(t);let n="",l="",a="";for(const t of s)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?a+=t.value:l+=t.value;return l||(l=o.format(t),n="",a=""),{prefix:n,value:l,suffix:a}}}class x{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:o}=this.getRelativeTime(t),s=i.formatToParts(r,o);let n="",l="",a="";for(const t of s)"literal"!==t.type||l?"literal"===t.type&&l?a+=t.value:l+=t.value:n+=t.value;return l||(l=n||a,n="",a=""),{prefix:n,value:l,suffix:a}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),o=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of o){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class I{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new O(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new j(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new x(this.locale):new y(this.locale)}}var k=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const F=class{constructor(e){t(this,e),this.aggregateOperator=l.Count,this.loading=!1,this.error=!1}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,i;const r=this.getFilter(),o=this.getFormattedValue(),s={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==o?void 0:o.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(i=null==o?void 0:o.suffix)||void 0===i?void 0:i.trim())||this.suffix},n=Object.assign(Object.assign({},s),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),l=Object.assign(Object.assign({},s),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==o?void 0:o.value.trim()});return e("limel-info-tile",Object.assign({key:"9634fc3d797fa0382b9e0eca1eabf67c19ffa4a6",class:{error:!r||this.error}},!r||this.error?n:l))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new y(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(h(t)&&(g(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||f(t)))return!t.length;var e=d(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(v(t))return!p(t).length;for(var i in t)if(b.call(t,i))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){if(!t)return{href:"#"};const e=["explorer",t.limetype,t.id].join("/"),i=this.getRelationPropertyName(this.limetypes[t.limetype]),r=this.buildContextAwareFilter(t.filter,i);return r?{href:`${e}?filter=${encodeURIComponent(JSON.stringify(r))}`}:{href:e}}buildContextAwareFilter(t,e){if(!e)return t;const i={key:e,op:a.EQUALS,exp:this.context.id};return t?{op:a.AND,exp:[i,t]}:{relationFilter:i}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new I(this.language).createFormatter(this.format,t)}getRelationPropertyName(t){var e,i,r;if(t&&this.context.limetype&&this.context.id){if(this.propertyName){const t=this.limetypes[this.context.limetype],r=null===(i=null===(e=null==t?void 0:t.getProperty(this.propertyName))||void 0===e?void 0:e.relation)||void 0===i?void 0:i.getBackreference();if(r)return r.name}return null===(r=Object.values(t.properties).find((t=>{var e;return(null===(e=t.relation)||void 0===e?void 0:e.getLimetype().name)===this.context.limetype})))||void 0===r?void 0:r.name}}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new w(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(r.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new m((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?this.getLocalizedString(t.name):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.host)}get host(){return i(this)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};k([o({})],F.prototype,"config",void 0),k([s()],F.prototype,"filters",void 0),k([n()],F.prototype,"limetypes",void 0),F.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{F as limebb_info_tile}
@@ -1 +1 @@
1
- import{r,h as e}from"./p-52cf8641.js";const o=class{constructor(e){r(this,e),this.tooltipId="a"+crypto.randomUUID()}render(){const r=this.getLabel();return[e("span",{key:"be19b705f56d74ddf3645c11cb905be4758d6038",id:this.tooltipId},r),e("limel-tooltip",{key:"c02c356b6fc3320930def24994997107f903923f",elementId:this.tooltipId,label:r,helperLabel:this.helperLabel})]}getLabel(){const r=this.limetype.localname;return`${this.count} ${1===this.count?r.singular:r.plural}`}};o.style=":host(limebb-mention-group-counter){order:2;margin-right:-0.5rem;box-sizing:border-box;transition:background-color 0.2s ease;min-width:fit-content;font-size:smaller;border-radius:9rem;cursor:help;padding:0.25rem 0.5rem;line-height:1;border:1px solid rgb(var(--contrast-500))}:host(limebb-mention-group-counter:hover){border-color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-600))}";export{o as limebb_mention_group_counter}
1
+ import{r,h as e}from"./p-52cf8641.js";const o=class{constructor(e){r(this,e),this.tooltipId="a"+crypto.randomUUID()}render(){const r=this.getLabel();return[e("span",{key:"cccb4a58450a0f1d5b2a81f99fc8252f92b8abb2",id:this.tooltipId},r),e("limel-tooltip",{key:"cf8819b1b5318c1ee4ce210f78132be0388db3e6",elementId:this.tooltipId,label:r,helperLabel:this.helperLabel})]}getLabel(){const r=this.limetype.localname;return`${this.count} ${1===this.count?r.singular:r.plural}`}};o.style=":host(limebb-mention-group-counter){order:2;margin-right:-0.5rem;box-sizing:border-box;transition:background-color 0.2s ease;min-width:fit-content;font-size:smaller;border-radius:9rem;cursor:help;padding:0.25rem 0.5rem;line-height:1;border:1px solid rgb(var(--contrast-500))}:host(limebb-mention-group-counter:hover){border-color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-600))}";export{o as limebb_mention_group_counter}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,H as r}from"./p-52cf8641.js";import{r as s,c as o}from"./p-199799ff.js";import{g as n}from"./p-0a266c26.js";import{i as l}from"./p-1484e300.js";import{b as a}from"./p-a659d55a.js";import{i as h,a as d,b as m}from"./p-b31772c8.js";import"./p-35897ec3.js";import"./p-fe2b91d9.js";import"./p-5322fd19.js";function c(t){return"string"==typeof t||!h(t)&&d(t)&&"[object String]"==m(t)}const p=class{constructor(i){t(this,i),this.expressionChange=e(this,"expressionChange",7),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:s.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:s.AND,exp:[this.expression,{key:"",op:s.EQUALS,exp:""}]})},this.handleExpressionChange=t=>{var e;t.stopPropagation(),this.expressionChange.emit(null!==(e=t.detail)&&void 0!==e?e:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}):this.renderEmptyState()}needsPromotion(){return!!this.expression&&("key"in this.expression||this.expression.op===s.NOT)}renderEmptyState(){return i("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return i("div",{class:"expression-with-promotion"},i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),i("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}};p.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}";const u=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.label="Sort Order",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(t){t&&(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];if(!i)return!1;const r=Object.keys(t)[0],s=Object.keys(i)[0];return r===s&&t[r]===i[s]})))&&(this.items=t.length>0?[...t]:[])}render(){return i(r,{key:"fe687e562d6cd7448ee705d326e70be8e9e467d7"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((t,e)=>this.renderItem(t,e))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(t,e){const r=Object.keys(t)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${e}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:["handleValueChange"]}}};u.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const b=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],y=b.filter((t=>"system"!==t));y.push("belongsto","hasone","hasmany","hasandbelongstomany");const g=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.propertyFields=[],this.fieldName="limetype",this.handleChange=t=>{t.stopPropagation();let e="";t.detail&&"value"in t.detail&&(e=t.detail.value),this.change.emit(e||void 0)}}componentWillLoad(){const t=this.platform.get(o.Application).getLanguage();this.collator=new Intl.Collator(t,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(t,e,i){var r,s,o,n;return"formInfo"!==i||(o=null===(r=null==t?void 0:t.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==e?void 0:e.schema)||void 0===s?void 0:s.oneOf,!a(o,n))}render(){var t;const e=this.getLimeTypes().map(f);e.sort(((t,e)=>this.collator.compare(t.text,e.text)));let r=e.find((t=>t.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,e.unshift({text:(null===(t=this.limeTypeRepository.getLimeType(this.value))||void 0===t?void 0:t.localname.singular)||this.value,value:this.value}),r=e[0]),e.unshift({text:"",value:""}),i("limel-select",{key:"27a42a235e492afdb32bfa4653c966cab535a846",label:this.label,options:e,value:r,required:this.required,helperText:this.helperText,invalid:s,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var t,e;let i=this.limetypes;return(null===(e=null===(t=this.formInfo)||void 0===t?void 0:t.schema)||void 0===e?void 0:e.oneOf)&&(i=this.formInfo.schema.oneOf.map((t=>t.const)).filter(c)),i?i.map((t=>this.limeTypeRepository.getLimeType(t))).filter(l):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(t){for(const e of this.propertyFields)e.limetype=t,e.allowedPropertyTypes===b&&(e.allowedPropertyTypes=y)}get limeTypeRepository(){return this.platform.get(o.LimeTypeRepository)}},f=t=>({text:t.localname.singular,value:t.name,icon:n(t)});export{p as limebb_lime_query_filter_builder,u as limebb_lime_query_order_by_editor,g as limebb_limetype_field}
1
+ import{r as t,c as e,h as i,H as r}from"./p-52cf8641.js";import{r as s,c as o}from"./p-199799ff.js";import{g as n}from"./p-0a266c26.js";import{i as l}from"./p-1484e300.js";import{b as a}from"./p-a659d55a.js";import{i as h,a as d,b as m}from"./p-b31772c8.js";import"./p-35897ec3.js";import"./p-fe2b91d9.js";import"./p-5322fd19.js";function c(t){return"string"==typeof t||!h(t)&&d(t)&&"[object String]"==m(t)}const p=class{constructor(i){t(this,i),this.expressionChange=e(this,"expressionChange",7),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:s.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:s.AND,exp:[this.expression,{key:"",op:s.EQUALS,exp:""}]})},this.handleExpressionChange=t=>{var e;t.stopPropagation(),this.expressionChange.emit(null!==(e=t.detail)&&void 0!==e?e:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}):this.renderEmptyState()}needsPromotion(){return!!this.expression&&("key"in this.expression||this.expression.op===s.NOT)}renderEmptyState(){return i("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return i("div",{class:"expression-with-promotion"},i("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),i("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}};p.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}";const u=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.label="Sort Order",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddSortField=()=>{this.items=[...this.items,{"":"ASC"}],this.emitChange()}}componentWillLoad(){this.value&&this.value.length>0&&(this.items=[...this.value])}handleValueChange(t){t&&(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];if(!i)return!1;const r=Object.keys(t)[0],s=Object.keys(i)[0];return r===s&&t[r]===i[s]})))&&(this.items=t.length>0?[...t]:[])}render(){return i(r,{key:"b0caaa11dcb633423bae612e22105de44ed1a7a1"},this.renderEmptyState(),this.renderOrderByEditor())}renderEmptyState(){return this.limetype?null:i("div",{class:"empty-state"},i("p",null,"Select a limetype to configure sorting"))}renderOrderByEditor(){return this.limetype?[this.renderHeader(),this.renderOrderByList(),this.renderActions()]:null}renderHeader(){return i("limel-header",{class:"is-narrow",heading:this.label,icon:"sorting_arrows"})}renderOrderByList(){return 0===this.items.length?null:i("div",{class:"order-by-list"},this.items.map(((t,e)=>this.renderItem(t,e))))}renderActions(){return i("limel-button",{label:"Add Sort Field",icon:"plus_math",onClick:this.handleAddSortField})}renderItem(t,e){const r=Object.keys(t)[0]||"";return i("limebb-lime-query-order-by-item",{key:`${r}-${e}`,class:"order-by-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){this.change.emit(this.items)}static get watchers(){return{value:["handleValueChange"]}}};u.style=":host(limebb-lime-query-order-by-editor){display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.header h4{margin:0;font-size:1rem;font-weight:600;color:rgb(var(--contrast-1000))}.order-by-list{display:flex;flex-direction:column;gap:1rem;border:1px solid rgb(var(--contrast-300));border-radius:0.25rem;background-color:rgb(var(--contrast-50));min-height:4rem}.order-by-item{padding:0.5rem;border-radius:0.25rem;transition:background-color 0.2s}.order-by-item:hover{background-color:rgb(var(--contrast-100))}.actions{display:flex;width:100%}.summary{display:flex;justify-content:space-between;align-items:center;padding-top:0.5rem;border-top:1px solid rgb(var(--contrast-300))}.summary .count{font-size:0.875rem;font-weight:500;color:rgb(var(--contrast-900))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.empty-state{padding:0 2rem;text-align:center;color:rgb(var(--contrast-700))}";const b=["string","text","phone","integer","decimal","percent","time","date","year","quarter","month","yesno","link","user","xml","option","set","file","system"],y=b.filter((t=>"system"!==t));y.push("belongsto","hasone","hasmany","hasandbelongstomany");const g=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.propertyFields=[],this.fieldName="limetype",this.handleChange=t=>{t.stopPropagation();let e="";t.detail&&"value"in t.detail&&(e=t.detail.value),this.change.emit(e||void 0)}}componentWillLoad(){const t=this.platform.get(o.Application).getLanguage();this.collator=new Intl.Collator(t,{numeric:!0,sensitivity:"base"})}componentShouldUpdate(t,e,i){var r,s,o,n;return"formInfo"!==i||(o=null===(r=null==t?void 0:t.schema)||void 0===r?void 0:r.oneOf,n=null===(s=null==e?void 0:e.schema)||void 0===s?void 0:s.oneOf,!a(o,n))}render(){var t;const e=this.getLimeTypes().map(f);e.sort(((t,e)=>this.collator.compare(t.text,e.text)));let r=e.find((t=>t.value===this.value)),s=this.invalid;return this.value&&!r&&(s=!0,e.unshift({text:(null===(t=this.limeTypeRepository.getLimeType(this.value))||void 0===t?void 0:t.localname.singular)||this.value,value:this.value}),r=e[0]),e.unshift({text:"",value:""}),i("limel-select",{key:"098e8b2996788bdfdb785e602173c1a75f506661",label:this.label,options:e,value:r,required:this.required,helperText:this.helperText,invalid:s,disabled:this.disabled||this.readonly,onChange:this.handleChange})}componentWillRender(){this.updatePropertyFields(this.value||"")}getLimeTypes(){var t,e;let i=this.limetypes;return(null===(e=null===(t=this.formInfo)||void 0===t?void 0:t.schema)||void 0===e?void 0:e.oneOf)&&(i=this.formInfo.schema.oneOf.map((t=>t.const)).filter(c)),i?i.map((t=>this.limeTypeRepository.getLimeType(t))).filter(l):this.limeTypeRepository.getLimeTypes()}updatePropertyFields(t){for(const e of this.propertyFields)e.limetype=t,e.allowedPropertyTypes===b&&(e.allowedPropertyTypes=y)}get limeTypeRepository(){return this.platform.get(o.LimeTypeRepository)}},f=t=>({text:t.localname.singular,value:t.name,icon:n(t)});export{p as limebb_lime_query_filter_builder,u as limebb_lime_query_order_by_editor,g as limebb_limetype_field}