@limetech/lime-crm-building-blocks 1.140.0 → 2.0.1

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 (216) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/file-contents-url-CIoCVl85.js +14 -0
  3. package/dist/cjs/{filter-group-logic-BPpM2NqX.js → filter-group-logic-EDLGrkTt.js} +12 -12
  4. package/dist/cjs/{filter-operators-BTWvpD6A.js → filter-operators-CVCyCZ7Q.js} +11 -11
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/{index.esm-Se3EtD3m.js → index.esm-CcYbS__E.js} +210 -181
  7. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  8. package/dist/cjs/{lime-query-validation-CJC3mtnT.js → lime-query-validation-B0oYW7Z6.js} +7 -7
  9. package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-component-config.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-component-picker.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +1 -1
  15. package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-data-cells.cjs.entry.js +1 -1
  17. package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +22 -6
  19. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  20. package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +22 -22
  21. package/dist/cjs/limebb-info-tile.cjs.entry.js +10 -9
  22. package/dist/cjs/limebb-inline-image.cjs.entry.js +49 -0
  23. package/dist/cjs/limebb-kanban-group.cjs.entry.js +2 -2
  24. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
  26. package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +5 -5
  27. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +4 -4
  28. package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +2 -2
  29. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
  30. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +3 -3
  31. package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
  32. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  33. package/dist/cjs/limebb-mention.cjs.entry.js +1 -1
  34. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  35. package/dist/cjs/limebb-notification-list.cjs.entry.js +1 -1
  36. package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
  37. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +1 -1
  38. package/dist/cjs/limebb-property-selector.cjs.entry.js +3 -3
  39. package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
  40. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +2 -2
  41. package/dist/cjs/limebb-rule-editor.cjs.entry.js +2 -2
  42. package/dist/cjs/limebb-rule-gate.cjs.entry.js +1 -1
  43. package/dist/cjs/limebb-text-editor.cjs.entry.js +51 -144
  44. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  45. package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +9 -9
  46. package/dist/cjs/{limetype-CmgP0nbZ.js → limetype-C-fVThrI.js} +1 -1
  47. package/dist/cjs/loader.cjs.js +1 -1
  48. package/dist/collection/collection-manifest.json +1 -0
  49. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +21 -5
  50. package/dist/collection/components/info-tile/info-tile.js +1 -1
  51. package/dist/collection/components/info-tile/loader.js +2 -1
  52. package/dist/collection/components/inline-image/inline-image.css +12 -0
  53. package/dist/collection/components/inline-image/inline-image.js +146 -0
  54. package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
  55. package/dist/collection/components/text-editor/text-editor.js +57 -45
  56. package/dist/collection/util/file-contents-url.js +10 -0
  57. package/dist/components/chat-item.js +1 -1
  58. package/dist/components/currency-picker.js +1 -1
  59. package/dist/components/date-picker.js +1 -1
  60. package/dist/components/feed-timeline-item.js +1 -1
  61. package/dist/components/file-contents-url.js +1 -0
  62. package/dist/components/filter-chip.js +1 -1
  63. package/dist/components/filter-condition-picker.js +1 -1
  64. package/dist/components/filter-operators.js +1 -1
  65. package/dist/components/index.esm.js +1 -1
  66. package/dist/components/kanban-group.js +1 -1
  67. package/dist/components/kanban-item.js +1 -1
  68. package/dist/components/lime-query-filter-builder.js +1 -1
  69. package/dist/components/lime-query-filter-comparison-editor.js +1 -1
  70. package/dist/components/lime-query-filter-comparison.js +1 -1
  71. package/dist/components/lime-query-filter-expression.js +1 -1
  72. package/dist/components/lime-query-validation.js +1 -1
  73. package/dist/components/lime-query-value-input.js +1 -1
  74. package/dist/components/limebb-browser.js +1 -1
  75. package/dist/components/limebb-chat-list.js +1 -1
  76. package/dist/components/limebb-component-config.js +1 -1
  77. package/dist/components/limebb-component-picker.js +1 -1
  78. package/dist/components/limebb-composer-toolbar.js +1 -1
  79. package/dist/components/limebb-data-cells.js +1 -1
  80. package/dist/components/limebb-feed.js +1 -1
  81. package/dist/components/limebb-info-tile.js +1 -1
  82. package/dist/components/limebb-inline-image.d.ts +11 -0
  83. package/dist/components/limebb-inline-image.js +1 -0
  84. package/dist/components/limebb-lime-query-builder.js +1 -1
  85. package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
  86. package/dist/components/limebb-limeobject-file-viewer.js +1 -1
  87. package/dist/components/limebb-loader.js +1 -1
  88. package/dist/components/limebb-locale-picker.js +1 -1
  89. package/dist/components/limebb-mention.js +1 -1
  90. package/dist/components/limebb-notification-list.js +1 -1
  91. package/dist/components/limebb-object-chip.js +1 -1
  92. package/dist/components/limebb-rule-arg-filter-editor.js +1 -1
  93. package/dist/components/limebb-rule-editor.js +1 -1
  94. package/dist/components/limebb-rule-gate.js +1 -1
  95. package/dist/components/limebb-text-editor.js +1 -1
  96. package/dist/components/limebb-trend-indicator.js +1 -1
  97. package/dist/components/limebb-value-comparison-editor.js +1 -1
  98. package/dist/components/limetype-field.js +1 -1
  99. package/dist/components/notification-item.js +1 -1
  100. package/dist/components/percentage-visualizer.js +1 -1
  101. package/dist/components/property-selector.js +1 -1
  102. package/dist/components/rule-chip-popover.js +1 -1
  103. package/dist/esm/file-contents-url-Oswz9F3I.js +12 -0
  104. package/dist/esm/{filter-group-logic-BMY_GEsX.js → filter-group-logic-DS1inQTh.js} +12 -12
  105. package/dist/esm/{filter-operators-Lw-ccmxQ.js → filter-operators-CsZi5iCV.js} +11 -11
  106. package/dist/esm/{index.esm-C-L5fkQs.js → index.esm-BjIhvFKX.js} +200 -172
  107. package/dist/esm/index.js +2 -2
  108. package/dist/esm/lime-crm-building-blocks.js +1 -1
  109. package/dist/esm/{lime-query-validation-BwvluehW.js → lime-query-validation-CVV7mrLj.js} +7 -7
  110. package/dist/esm/limebb-browser.entry.js +1 -1
  111. package/dist/esm/limebb-chat-icon-list_3.entry.js +1 -1
  112. package/dist/esm/limebb-chat-list.entry.js +1 -1
  113. package/dist/esm/limebb-component-config.entry.js +1 -1
  114. package/dist/esm/limebb-component-picker.entry.js +1 -1
  115. package/dist/esm/limebb-composer-toolbar.entry.js +1 -1
  116. package/dist/esm/limebb-currency-picker.entry.js +1 -1
  117. package/dist/esm/limebb-data-cells.entry.js +1 -1
  118. package/dist/esm/limebb-date-picker.entry.js +1 -1
  119. package/dist/esm/limebb-feed-timeline-item.entry.js +22 -6
  120. package/dist/esm/limebb-feed.entry.js +1 -1
  121. package/dist/esm/limebb-filter-chip_6.entry.js +22 -22
  122. package/dist/esm/limebb-info-tile.entry.js +10 -9
  123. package/dist/esm/limebb-inline-image.entry.js +47 -0
  124. package/dist/esm/limebb-kanban-group.entry.js +2 -2
  125. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  126. package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
  127. package/dist/esm/limebb-lime-query-filter-builder.entry.js +5 -5
  128. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +4 -4
  129. package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +2 -2
  130. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
  131. package/dist/esm/limebb-limeobject-file-viewer.entry.js +3 -3
  132. package/dist/esm/limebb-loader.entry.js +2 -2
  133. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  134. package/dist/esm/limebb-mention.entry.js +1 -1
  135. package/dist/esm/limebb-notification-item.entry.js +1 -1
  136. package/dist/esm/limebb-notification-list.entry.js +1 -1
  137. package/dist/esm/limebb-object-chip.entry.js +3 -3
  138. package/dist/esm/limebb-percentage-visualizer.entry.js +1 -1
  139. package/dist/esm/limebb-property-selector.entry.js +3 -3
  140. package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
  141. package/dist/esm/limebb-rule-chip-popover.entry.js +2 -2
  142. package/dist/esm/limebb-rule-editor.entry.js +2 -2
  143. package/dist/esm/limebb-rule-gate.entry.js +1 -1
  144. package/dist/esm/limebb-text-editor.entry.js +51 -144
  145. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  146. package/dist/esm/limebb-value-comparison-editor.entry.js +9 -9
  147. package/dist/esm/{limetype-D4ZaWZ-3.js → limetype-BbMRN-SU.js} +1 -1
  148. package/dist/esm/loader.js +1 -1
  149. package/dist/lime-crm-building-blocks/index.esm.js +1 -1
  150. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  151. package/dist/lime-crm-building-blocks/p-1c6e5402.entry.js +1 -0
  152. package/dist/lime-crm-building-blocks/{p-9452fb56.entry.js → p-240cbd82.entry.js} +1 -1
  153. package/dist/lime-crm-building-blocks/{p-58f18819.entry.js → p-25984c90.entry.js} +1 -1
  154. package/dist/lime-crm-building-blocks/{p-80e04b27.entry.js → p-397a6191.entry.js} +1 -1
  155. package/dist/lime-crm-building-blocks/{p-a6e9cefe.entry.js → p-52a92d89.entry.js} +1 -1
  156. package/dist/lime-crm-building-blocks/p-585f6cfe.entry.js +1 -0
  157. package/dist/lime-crm-building-blocks/{p-05a1762a.entry.js → p-59fb624c.entry.js} +1 -1
  158. package/dist/lime-crm-building-blocks/{p-fb8d854b.entry.js → p-5beb508a.entry.js} +1 -1
  159. package/dist/lime-crm-building-blocks/{p-92bf5318.entry.js → p-662fb8b6.entry.js} +1 -1
  160. package/dist/lime-crm-building-blocks/{p-00ca6522.entry.js → p-673226a6.entry.js} +1 -1
  161. package/dist/lime-crm-building-blocks/{p-e242b955.entry.js → p-69b08896.entry.js} +1 -1
  162. package/dist/lime-crm-building-blocks/{p-01f84b0c.entry.js → p-6c2e25d9.entry.js} +1 -1
  163. package/dist/lime-crm-building-blocks/{p-3bf316f9.entry.js → p-742926a3.entry.js} +1 -1
  164. package/dist/lime-crm-building-blocks/p-78d362b4.entry.js +1 -0
  165. package/dist/lime-crm-building-blocks/p-79c492b2.entry.js +1 -0
  166. package/dist/lime-crm-building-blocks/{p-dba6f583.entry.js → p-7a5c2dda.entry.js} +1 -1
  167. package/dist/lime-crm-building-blocks/{p-354257f4.entry.js → p-7ce967b6.entry.js} +1 -1
  168. package/dist/lime-crm-building-blocks/{p-d40f53a5.entry.js → p-906b4eca.entry.js} +1 -1
  169. package/dist/lime-crm-building-blocks/p-CE43qjk3.js +1 -0
  170. package/dist/lime-crm-building-blocks/p-Cw4kdMw3.js +1 -0
  171. package/dist/lime-crm-building-blocks/p-DLehg4hi.js +1 -0
  172. package/dist/lime-crm-building-blocks/{p-CI6VHE0w.js → p-Dhyy9Td7.js} +1 -1
  173. package/dist/lime-crm-building-blocks/p-Oswz9F3I.js +1 -0
  174. package/dist/lime-crm-building-blocks/p-a3058b72.entry.js +1 -0
  175. package/dist/lime-crm-building-blocks/p-b78ub0mY.js +1 -0
  176. package/dist/lime-crm-building-blocks/{p-f3cb68d6.entry.js → p-bc297cf4.entry.js} +1 -1
  177. package/dist/lime-crm-building-blocks/{p-cac2a49f.entry.js → p-bcd8c767.entry.js} +1 -1
  178. package/dist/lime-crm-building-blocks/p-c4e5e589.entry.js +1 -0
  179. package/dist/lime-crm-building-blocks/p-c97c4604.entry.js +1 -0
  180. package/dist/lime-crm-building-blocks/{p-8986f27b.entry.js → p-d014ec57.entry.js} +1 -1
  181. package/dist/lime-crm-building-blocks/p-d20404ec.entry.js +1 -0
  182. package/dist/lime-crm-building-blocks/{p-fb050628.entry.js → p-d2e85be2.entry.js} +1 -1
  183. package/dist/lime-crm-building-blocks/{p-dec2b87d.entry.js → p-d3fe25a7.entry.js} +1 -1
  184. package/dist/lime-crm-building-blocks/{p-f1090436.entry.js → p-d43cf8d1.entry.js} +1 -1
  185. package/dist/lime-crm-building-blocks/{p-430e3d11.entry.js → p-dd7aec09.entry.js} +1 -1
  186. package/dist/lime-crm-building-blocks/{p-b34817df.entry.js → p-e2e1358d.entry.js} +1 -1
  187. package/dist/lime-crm-building-blocks/{p-c0fa239a.entry.js → p-e4a21ebe.entry.js} +1 -1
  188. package/dist/lime-crm-building-blocks/{p-c4e2dca5.entry.js → p-e581d0b7.entry.js} +1 -1
  189. package/dist/lime-crm-building-blocks/{p-863f456c.entry.js → p-e6a85c26.entry.js} +1 -1
  190. package/dist/lime-crm-building-blocks/p-e8b2df7c.entry.js +1 -0
  191. package/dist/lime-crm-building-blocks/{p-6fe4c1cd.entry.js → p-ef890206.entry.js} +1 -1
  192. package/dist/lime-crm-building-blocks/{p-d7d21bad.entry.js → p-f6377fa5.entry.js} +1 -1
  193. package/dist/lime-crm-building-blocks/p-f9e9d18e.entry.js +1 -0
  194. package/dist/test/setup.js +1 -0
  195. package/dist/types/components/feed/feed-item/feed-timeline-item.d.ts +2 -0
  196. package/dist/types/components/inline-image/inline-image.d.ts +32 -0
  197. package/dist/types/components/text-editor/text-editor.d.ts +17 -11
  198. package/dist/types/components.d.ts +93 -14
  199. package/dist/types/interface.d.ts +0 -5
  200. package/dist/types/util/file-contents-url.d.ts +9 -0
  201. package/package.json +12 -13
  202. package/dist/collection/components/text-editor/uploader/building-blocks-upload-handler.js +0 -112
  203. package/dist/lime-crm-building-blocks/p-29758303.entry.js +0 -1
  204. package/dist/lime-crm-building-blocks/p-2dab7d4b.entry.js +0 -1
  205. package/dist/lime-crm-building-blocks/p-43bdd66b.entry.js +0 -1
  206. package/dist/lime-crm-building-blocks/p-752742f8.entry.js +0 -1
  207. package/dist/lime-crm-building-blocks/p-B-WBKAaa.js +0 -1
  208. package/dist/lime-crm-building-blocks/p-BjXRsiQr.js +0 -1
  209. package/dist/lime-crm-building-blocks/p-Bkno2RtN.js +0 -1
  210. package/dist/lime-crm-building-blocks/p-D1RJ1y7s.js +0 -1
  211. package/dist/lime-crm-building-blocks/p-c891125e.entry.js +0 -1
  212. package/dist/lime-crm-building-blocks/p-cd7106f7.entry.js +0 -1
  213. package/dist/lime-crm-building-blocks/p-dbbc5ba7.entry.js +0 -1
  214. package/dist/lime-crm-building-blocks/p-ec1e079e.entry.js +0 -1
  215. package/dist/lime-crm-building-blocks/p-edeb359f.entry.js +0 -1
  216. package/dist/types/components/text-editor/uploader/building-blocks-upload-handler.d.ts +0 -62
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{b as a}from"./index.esm.js";import{d as n}from"./feed-item-thumbnail-file-info.js";import{d as s}from"./navigation-button.js";import{d as l}from"./summary-popover.js";const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!this.bodyTextElement||!(null==e?void 0:e.length))return;const t=e[0].contentRect.width;if(t===this.lastMeasuredWidth)return;this.lastMeasuredWidth=t,this.bodyTextElement.style.minHeight="0";const i=this.bodyTextElement.scrollHeight;this.bodyTextElement.style.removeProperty("min-height"),this.isTall=i>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=i)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return i("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,t,o;if(null===(t=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===t?void 0:t.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,t;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},i("limel-icon",{name:"angle_up"})),i("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:t,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[i("a",{class:"thumbnail-card-link",id:a,key:a,href:t||void 0},i("limel-card",{image:o,clickable:!!t},i("limebb-feed-item-thumbnail-file-info",{slot:"component",description:r})),this.showThumbnailTooltip(e,a))]},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible),this.headingResizeObserver.observe(this.headingParagraphElement)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall),this.bodyResizeObserver.observe(this.bodyTextElement))}disconnectedCallback(){var e;null===(e=this.bodyResizeObserver)||void 0===e||e.disconnect()}render(){var e,t;const r=`helper-text-${this.item.id}`;return i(o,{key:"0d1ba9124ef0451e73e6c66261015d193cde01b0",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(t=this.item.author)||void 0===t?void 0:t.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return i("div",{class:"left"},i("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),i("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,t,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return i("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(t=this.item.icon)||void 0===t?void 0:t.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return i("div",{class:"right"},i("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderThumbnails(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return i("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return i("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return i("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:t,text:o}=this.item.author.name;return i("a",{class:"author",href:e,title:t},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:t}=this.item,o=this.getAuthorName(t),r=this.createLinkToAuthor(t);return i("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},i("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[i("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading,adaptColorContrast:!0})]}renderValue(){var e;if(this.item.value)return[i("div",{class:"markdown-container"},i("limel-markdown",{class:{"body-text":!0,opened:this.showMore,"no-table-styles":!(null===(e=this.item)||void 0===e?void 0:e.hasDefaultTableStyles),"reset-img-height":!0},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,adaptColorContrast:!0,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const t=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==t?void 0:t.length)return i("limel-masonry-layout",{role:"group"},t.map(this.renderThumbnailCard))}showThumbnailTooltip(e,t){var o;const{href:r,filename:a}=e;if(r)return i("limel-tooltip",{elementId:t,label:(null===(o=this.translator)||void 0===o?void 0:o.get("webclient.go-to-context-label",{context:a}))||a})}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[i("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},i("limel-icon",{name:"angle_down"})),i("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,t;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const t=this.item.promotedActions.map(this.createActionBarItem);return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:t,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(a.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return this}static get style(){return'@charset "UTF-8";limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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)}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#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)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button{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}button#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]){padding:0.25rem 0}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:"";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(0.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.content{position:relative}.content:before,.content:after{content:"";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,button.expand-heading:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color)}button.expand-heading:hover{box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.expand-heading{border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.collapse-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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)}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,button.collapse-heading: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)}button.collapse-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading{flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);display:flex;flex-direction:column;align-items:center;gap:0.25rem;font-size:0.75rem;text-align:center;color:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.timestamp:after{width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--color-red-default))}:host(.is-new) .timestamp:after{content:""}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}.thumbnail-card-link{--card-border-radius:0.5rem;border-radius:var(--card-border-radius)}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.thumbnail-card-link{text-decoration:none;display:inline-block}limel-masonry-layout{--masonry-layout-min-column-width:10rem;--masonry-layout-gap:0.5rem;margin:0.25rem 0}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}'}},[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],helperText:[1,"helper-text"],hasError:[516,"has-error"],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]);function d(){"undefined"!=typeof customElements&&["limebb-feed-timeline-item","limebb-feed-item-thumbnail-file-info","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-feed-timeline-item":customElements.get(r(e))||customElements.define(r(e),m);break;case"limebb-feed-item-thumbnail-file-info":customElements.get(r(e))||n();break;case"limebb-navigation-button":customElements.get(r(e))||s();break;case"limebb-summary-popover":customElements.get(r(e))||l()}}))}export{m as F,d}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as i,Host as o,transformTag as r}from"@stencil/core/internal/client";import{n as a}from"./index.esm.js";import{d as n}from"./feed-item-thumbnail-file-info.js";import{d as s}from"./navigation-button.js";import{d as l}from"./summary-popover.js";const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.ui="standard",this.hasError=!1,this.isBundled=!1,this.headingCanExpand=!1,this.isHeadingExpanded=!1,this.showMore=!1,this.isTall=!1,this.collapsibleButtonId="a"+crypto.randomUUID(),this.setHeaderCollapsible=()=>{this.headingParagraphElement&&(this.headingCanExpand=this.isTextTruncated(this.headingParagraphElement))},this.bodyTextTall=e=>{if(!this.bodyTextElement||!(null==e?void 0:e.length))return;const t=e[0].contentRect.width;if(t===this.lastMeasuredWidth)return;this.lastMeasuredWidth=t,this.bodyTextElement.style.minHeight="0";const i=this.bodyTextElement.scrollHeight;this.bodyTextElement.style.removeProperty("min-height"),this.isTall=i>(this.isThreadMessage?48:160),void 0===this.bodyTextHeight&&(this.bodyTextHeight=i)},this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return i("div",{class:"header"},this.renderAuthor(),this.renderHeading(),this.renderExpandCollapseHeadingButton())},this.renderRelations=()=>{var e,t,o;if(null===(t=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===t?void 0:t.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderExpandCollapseHeadingButton=()=>{var e,t;if(this.item.heading)return this.headingCanExpand&&!this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,class:"expand-heading"},null===(e=this.translator)||void 0===e?void 0:e.get("webclient.more"))]:this.isHeadingExpanded?[i("button",{onClick:this.toggleHeadingExpansion,id:this.collapsibleButtonId,class:"collapse-heading"},i("limel-icon",{name:"angle_up"})),i("limel-tooltip",{elementId:this.collapsibleButtonId,label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-less"),openDirection:"top-end"})]:void 0},this.renderThumbnailCard=e=>{const{href:t,image:o,filename:r}=e;if(!o&&!r)return;const a="thumb-"+crypto.randomUUID();return[i("a",{class:"thumbnail-card-link",id:a,key:a,href:t||void 0},i("limel-card",{image:o,clickable:!!t},i("limebb-feed-item-thumbnail-file-info",{slot:"component",description:r})),this.showThumbnailTooltip(e,a))]},this.setBodyTextElement=e=>{this.bodyTextElement=e},this.toggleShowMore=()=>{this.showMore=!this.showMore,this.showMore||this.el.offsetHeight>=window.innerHeight&&this.el.scrollIntoView({behavior:"auto"})},this.toggleHeadingExpansion=()=>{this.isHeadingExpanded=!this.isHeadingExpanded},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let o={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?o=Object.assign(Object.assign({},o),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:o.text,iconOnly:!0}):e.icon&&(o=Object.assign(Object.assign({},o),{icon:e.icon})),o},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}connectedCallback(){this.observe()}componentDidLoad(){var e,t;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".heading");this.headingParagraphElement=null===(t=null==i?void 0:i.shadowRoot)||void 0===t?void 0:t.querySelector("p"),this.headingParagraphElement&&(this.headingResizeObserver=new ResizeObserver(this.setHeaderCollapsible)),this.bodyTextElement&&(this.bodyResizeObserver=new ResizeObserver(this.bodyTextTall)),this.observe()}observe(){var e,t;this.headingParagraphElement&&(null===(e=this.headingResizeObserver)||void 0===e||e.observe(this.headingParagraphElement)),this.bodyTextElement&&(null===(t=this.bodyResizeObserver)||void 0===t||t.observe(this.bodyTextElement))}disconnectedCallback(){var e,t;null===(e=this.headingResizeObserver)||void 0===e||e.disconnect(),null===(t=this.bodyResizeObserver)||void 0===t||t.disconnect()}render(){var e,t;const r=`helper-text-${this.item.id}`;return i(o,{key:"c3d28601cdca0621efab75023472c213170ec48d",id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(t=this.item.author)||void 0===t?void 0:t.picture),"shows-less":!this.showMore,"expanded-heading":this.isHeadingExpanded,"shows-more":this.showMore,"is-tall":this.isTall},style:{"--body-text-height":`${this.bodyTextHeight}`,"--color-code":`${this.item.color}`},"aria-describedby":this.helperText?r:void 0,tabindex:"-1"},this.renderBadgeAndTimestamp(),this.renderContent(r))}renderBadgeAndTimestamp(){return i("div",{class:"left"},i("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),i("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,t,o;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return i("limel-icon",{class:"icon",badge:!0,name:this.getIconName(),style:{color:`${null===(t=this.item.icon)||void 0===t?void 0:t.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}getIconName(){const{ui:e,icon:t}=this.item;return"error-message"===e?"error":(null==t?void 0:t.name)||"dot_circle"}renderContent(e){return i("div",{class:"right"},i("div",{class:"content"},this.renderThreadEffects(),this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderThumbnails(),this.renderRelations(),this.renderHelperText(e)),this.renderPromotedActions())}renderThreadEffects(){if(this.isThreadMessage)return i("div",{class:"thread-effects",role:"presentation"})}renderHelperText(e){if(this.helperText)return i("span",{class:"helper-text",id:e},this.helperText)}renderAuthor(){if(this.item.author&&(!this.isBundled||this.item.heading)){if("string"==typeof this.item.author.name)return i("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:t,text:o}=this.item.author.name;return i("a",{class:"author",href:e,title:t},o)}}}renderAuthorPicture(){var e;if(!(null===(e=this.item.author)||void 0===e?void 0:e.picture))return;if(this.isBundled)return;const{author:t}=this.item,o=this.getAuthorName(t),r=this.createLinkToAuthor(t);return i("limebb-summary-popover",{image:{src:this.item.author.picture,alt:`${o}`},heading:o,value:r},i("img",{slot:"trigger",loading:"lazy",src:this.item.author.picture}))}renderHeading(){if(this.item.heading)return[i("limel-markdown",{class:{heading:!0,"expanded-heading":this.isHeadingExpanded,"truncate-paragraphs":!this.isHeadingExpanded},value:this.item.heading,adaptColorContrast:!0})]}renderValue(){var e;if(this.item.value)return[i("div",{class:"markdown-container"},i("limel-markdown",{class:{"body-text":!0,opened:this.showMore,"no-table-styles":!(null===(e=this.item)||void 0===e?void 0:e.hasDefaultTableStyles),"reset-img-height":!0},value:this.item.value,lazyLoadImages:!0,ref:this.setBodyTextElement,adaptColorContrast:!0,whitelist:[{tagName:"limebb-mention",attributes:["limetype","objectid"]},{tagName:"limebb-inline-image",attributes:["image-id","width","height","alt"]}]}),this.renderShowMoreButton())]}renderThumbnails(){var e;const t=null===(e=this.item)||void 0===e?void 0:e.thumbnails;if(null==t?void 0:t.length)return i("limel-masonry-layout",{role:"group"},t.map(this.renderThumbnailCard))}showThumbnailTooltip(e,t){var o;const{href:r,filename:a}=e;if(r)return i("limel-tooltip",{elementId:t,label:(null===(o=this.translator)||void 0===o?void 0:o.get("webclient.go-to-context-label",{context:a}))||a})}getAuthorName(e){return"string"==typeof e.name?e.name:e.name.text}createLinkToAuthor(e){if("object"!=typeof e.name)return;const{href:t,title:i,text:o}=e.name;return`<a class="author" href="${t}" title="${i}">${this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+o+"</b>"})}</a>`}isTextTruncated(e){return e.offsetWidth<e.scrollWidth}renderShowMoreButton(){if(this.isTall)return[i("button",{id:"show-more-button",type:"button",onClick:this.toggleShowMore},i("limel-icon",{name:"angle_down"})),i("limel-tooltip",{label:this.toggleShowMoreLabel(),elementId:"show-more-button",openDirection:"top"})]}toggleShowMoreLabel(){var e,t;return this.showMore?null===(e=this.translator)||void 0===e?void 0:e.get("webclient.show-less"):null===(t=this.translator)||void 0===t?void 0:t.get("webclient.show-more")}renderUnpromotedActionsMenu(){var e,t;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(t=this.translator)||void 0===t?void 0:t.get("webclient.more-actions")}))}renderPromotedActions(){var e;if(!(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length))return;const t=this.item.promotedActions.map(this.createActionBarItem);return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:t,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(a.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}get isThreadMessage(){return"thread-message"===this.ui}get el(){return this}static get style(){return'@charset "UTF-8";limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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)}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#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)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button{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}button#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]){padding:0.25rem 0}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:"";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:"";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(0.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem);max-height:35rem}:host(limebb-feed-timeline-item.is-tall[ui=thread-message].shows-more) .body-text{overflow-y:auto}:host(limebb-feed-timeline-item[ui=error-message]) .icon{color:rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[ui=error-message]) .content{border:1px dashed rgb(var(--color-red-light));background-color:rgb(var(--color-red-lighter), 0.2)}.content{position:relative}.content:before,.content:after{content:"";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate;border-radius:0.5rem}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}:host(limebb-feed-timeline-item:hover),:host(limebb-feed-timeline-item:focus),:host(limebb-feed-timeline-item:focus-within){--limebb-feed-item-timeline-color:var(--mdc-theme-primary);--limebb-feed-item-timestamp-color:var(--mdc-theme-primary)}.left:before{transition:background-color 0.2s ease;content:"";position:absolute;z-index:-1;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;border-radius:1rem;background-color:var(--limebb-feed-item-timeline-color, rgb(var(--contrast-600)))}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,button.expand-heading:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color)}button.expand-heading:hover{box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.expand-heading:hover,button.expand-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.expand-heading{border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.collapse-heading{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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)}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,button.collapse-heading: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)}button.collapse-heading:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.collapse-heading:hover,button.collapse-heading:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading{flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);display:flex;flex-direction:column;align-items:center;gap:0.25rem;font-size:0.75rem;text-align:center;color:var(--limebb-feed-item-timestamp-color, rgb(var(--contrast-800)));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem;border-radius:1rem}.timestamp:after{width:0.5rem;height:0.5rem;border-radius:50%;background-color:rgb(var(--color-red-default))}:host(.is-new) .timestamp:after{content:""}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{cursor:help;border-radius:50%;width:2rem;height:2rem;object-fit:cover;background-color:var(--limebb-feed-background-color);box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--limel-chip-size:1.5rem;--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}.helper-text{transition:opacity 0.2s ease;opacity:0.6;font-size:x-small;margin-top:0.5rem;margin-bottom:-0.25rem}:host(limebb-feed-timeline-item:hover) .helper-text,:host(limebb-feed-timeline-item:focus-within) .helper-text{opacity:1}.thumbnail-card-link{--card-border-radius:0.5rem;border-radius:var(--card-border-radius)}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.thumbnail-card-link{text-decoration:none;display:inline-block}limel-masonry-layout{--masonry-layout-min-column-width:10rem;--masonry-layout-gap:0.5rem;margin:0.25rem 0}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .left:before{background-color:rgb(var(--color-red-default));box-shadow:0 0 0 1px rgb(var(--color-red-default))}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) img,:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .icon{box-shadow:var(--shadow-error-state)}:host(limebb-feed-timeline-item[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}'}},[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],helperText:[1,"helper-text"],hasError:[516,"has-error"],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]);function d(){"undefined"!=typeof customElements&&["limebb-feed-timeline-item","limebb-feed-item-thumbnail-file-info","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-feed-timeline-item":customElements.get(r(e))||customElements.define(r(e),m);break;case"limebb-feed-item-thumbnail-file-info":customElements.get(r(e))||n();break;case"limebb-navigation-button":customElements.get(r(e))||s();break;case"limebb-summary-popover":customElements.get(r(e))||l()}}))}export{m as F,d}
@@ -0,0 +1 @@
1
+ function n(n,e){return`/${encodeURIComponent(n)}/api/v1/file/${encodeURIComponent(e)}/contents/`}export{n as g}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as i,getElement as r,h as o,Host as n,transformTag as a}from"@stencil/core/internal/client";import{b as s}from"./index.esm.js";import{c as l}from"./random-string.js";import{g as c,c as h}from"./filter-condition-icons.js";const b={and:"webclient.delimiter.and",or:"webclient.delimiter.or"},d={and:"&",or:"or"},u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.remove=i(this,"remove",7),this.removable=!0,this.readonly=!1,this.disabled=!1,this.invalid=!1,this.selected=!1,this.maxLength=25,this.handleKeyDown=t=>{this.disabled||this.readonly||"Backspace"!==t.key&&"Delete"!==t.key||(t.preventDefault(),t.stopPropagation(),this.remove.emit(this.identifier))},this.handleRemoveClick=t=>{t.stopPropagation(),this.remove.emit(this.identifier)}}get chipId(){let t=r(this).id;return t||(this.randomId||(this.randomId=l()),t=this.randomId),"filter-chip-"+t}render(){const t=this.chipId,e=this.getDisplayItems(),i=this.getConjunctionText(),r=this.getHelperLabel(e,i);return o(n,{key:"291c2a6437491c9a5152b87af18476c2fb2f69bc"},this.renderLabel(),o("button",{key:"8a51d37a3aa1f3b6a49dd15b0f6705fdc4c9ced3",class:{chip:!0},type:"button",id:t,"aria-label":[this.label,r].filter(Boolean).join(", ")||this.getFilterLabel(),"aria-pressed":this.getAriaPressed(),onKeyDown:this.handleKeyDown,disabled:this.disabled},this.renderIcon(),this.renderValue(e,i)),this.renderRemoveButton(t),o("limel-tooltip",{key:"522b0a8736e302e074914bf672c350ead53e418b",elementId:t,label:this.label||this.getFilterLabel(),helperLabel:r}))}getAriaPressed(){if(!this.readonly&&!this.disabled)return this.selected?"true":"false"}renderLabel(){if(this.label)return o("label",{"aria-hidden":"true"},this.label)}renderIcon(){const t=this.getIconName();if(t)return o("limel-icon",{"aria-hidden":"true",badge:!0,name:t})}getIconName(){return this.icon?this.icon:this.condition?c(this.condition,this.propertyType):void 0}get hasRawValue(){return"matches"===this.condition}renderValue(t,e){if(!Array.isArray(this.value))return o("span",{class:{text:!0,empty:this.hasRawValue},"aria-hidden":"true"},this.renderValueItem(t[0]));const{visibleItems:i,remainingCount:r}=this.truncateItems(t,this.separatorFor(e));return o("span",{class:{text:!0,empty:this.hasRawValue},"aria-hidden":"true"},this.renderValueItems(i,e),this.renderBadge(r))}renderValueItems(t,e){const i=[];for(const[r,n]of t.entries())r>0&&i.push(e?o("span",{class:"conjunction"}," ",e," "):", "),i.push(this.renderValueItem(n));return i}renderValueItem(t){if(t)return o("span",{class:{"value-item":!0,empty:t.empty}},t.text)}renderBadge(t){if(!(t<=0))return o("limel-badge",{label:`+${t}`})}renderRemoveButton(t){if(this.removable&&!this.readonly&&!this.disabled)return o("button",{type:"button",class:"trailing-button remove-button",tabIndex:-1,"aria-label":this.getRemoveButtonLabel(),"aria-controls":t,innerHTML:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="currentColor" stroke-width="2" d="m8 8 16 16M24 8 8 24"/></svg>',onClick:this.handleRemoveClick})}getTranslator(){if(this.platform)try{return this.platform.get(s.Translate)}catch(t){return}}getRemoveButtonLabel(){const t=this.getTranslator();return t?t.get("webclient.remove-filter",{propertyName:this.label}):"Remove"}getConditionLabel(){const t=h(this.condition,this.propertyType),e=this.getTranslator();return t&&e?e.get(t):""}getConjunctionText(){if(!this.conjunction)return"";const t=this.getTranslator();return t?t.get(b[this.conjunction]):d[this.conjunction]}getFilterLabel(){const t=this.getTranslator();return t?t.get("webclient.filter"):"Filter"}getValueItems(){return Array.isArray(this.value)?this.value:null==this.value?[]:[this.value]}getDisplayItems(){const t=this.getValueItems(),e=t.some((t=>!t||!t.trim()))?this.getEmptyLabel():"";return t.map((t=>{const i=!t||!t.trim();return{text:i?e:t,empty:i}}))}getEmptyLabel(){const t=this.getTranslator();return t?t.get("webclient.empty"):"Empty"}separatorFor(t){return t?` ${t} `:", "}getHelperLabel(t,e){if(void 0!==this.helperLabel)return this.helperLabel;const i=this.getConditionLabel(),r=t.map((t=>t.text)).join(this.separatorFor(e));return i&&r?`${i}: ${r}`:i||r}truncateItems(t,e){const i=Math.max(this.maxLength,1),r=t.map((t=>t.text)).join(e);if(t.length<=1||r.length<=i)return{visibleItems:t,remainingCount:0};const o=[t[0]];let n=t[0].text.length;for(let r=1;r<t.length;r++){const a=n+e.length+t[r].text.length;if(a>i)break;o.push(t[r]),n=a}return{visibleItems:o,remainingCount:t.length-o.length}}filterClickWhenInactive(t){(this.disabled||this.readonly)&&(t.preventDefault(),t.stopPropagation())}static get delegatesFocus(){return!0}static get style(){return"@charset \"UTF-8\";:host(limebb-filter-chip){isolation:isolate;position:relative;display:inline-flex;align-items:center;min-width:0}*{box-sizing:border-box}button.chip{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:20rem;height:1.75rem;border-radius:1.75rem;border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem;font-size:0.875rem;padding:0 0.125rem}button.chip:has(limel-icon) .text{padding-left:0}button.chip:not([disabled]):focus{outline:none}button.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.chip:not([disabled]){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)}button.chip:not([disabled]):hover,button.chip:not([disabled]):focus,button.chip:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button.chip:not([disabled]):hover,button.chip:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.chip:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button.chip:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}button.chip:not([disabled]):hover,button.chip:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.chip[disabled]{cursor:not-allowed;color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1)}button.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}button.chip:has(+.trailing-button){padding-right:calc(1.75rem + 0.125rem)}button.chip:has(+.trailing-button) .text{padding-right:0}button.chip .text.empty,button.chip .value-item.empty{font-style:italic;color:rgb(var(--contrast-800))}button.chip .conjunction{color:rgb(var(--contrast-800))}button.chip limel-badge{margin-left:0.25rem}:host(limebb-filter-chip[selected]) .chip{background-color:rgb(var(--contrast-500));box-shadow:var(--button-shadow-inset-pressed)}:host(limebb-filter-chip[selected]) .chip:hover{background-color:rgb(var(--contrast-500))}:host(limebb-filter-chip[selected]) .chip limel-badge{--badge-background-color:rgb(var(--contrast-200))}:host(limebb-filter-chip[invalid]) .chip{background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limebb-filter-chip[invalid]) .text{color:rgb(var(--color-white))}:host(limebb-filter-chip[invalid]) .conjunction{color:rgba(var(--color-white), 0.7)}:host(limebb-filter-chip[readonly]:not([readonly=false])) .chip{box-shadow:0 0 0 1px var(--chip-readonly-border-color, rgb(var(--contrast-800), 0.5));cursor:default}limel-icon{flex-shrink:0;width:1.5rem;height:1.5rem;padding:0.0625rem}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem}label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;transform:translateY(-50%);z-index:1;position:absolute;top:0;left:0;display:block;padding:0px 0.25rem;color:rgb(var(--contrast-1200));font-size:0.65rem;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em)}button.trailing-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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:transparent}button.trailing-button:hover,button.trailing-button:focus,button.trailing-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.trailing-button:hover,button.trailing-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.trailing-button:hover{box-shadow:var(--button-shadow-hovered)}button.trailing-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.trailing-button:hover,button.trailing-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.trailing-button{z-index:1;flex-shrink:0;align-self:center;display:flex;align-items:center;justify-content:center;margin-left:calc(1.75rem * -1 + 0.125rem);width:1.5rem;height:1.5rem;border-radius:50%}button.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}button.trailing-button.remove-button:hover{color:rgb(var(--color-red-dark))}button.trailing-button.remove-button:hover svg{transform:scale(0.8)}"}},[17,"limebb-filter-chip",{label:[1],value:[1],conjunction:[1],condition:[1],propertyType:[1,"property-type"],icon:[1],helperLabel:[1,"helper-label"],removable:[4],readonly:[516],disabled:[4],invalid:[516],selected:[516],identifier:[8],platform:[16],maxLength:[2,"max-length"]},[[2,"click","filterClickWhenInactive"]]]);function m(){"undefined"!=typeof customElements&&["limebb-filter-chip"].forEach((t=>{"limebb-filter-chip"===t&&(customElements.get(a(t))||customElements.define(a(t),u))}))}export{u as F,m as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as i,getElement as r,h as o,Host as n,transformTag as a}from"@stencil/core/internal/client";import{n as s}from"./index.esm.js";import{c as l}from"./random-string.js";import{g as c,c as h}from"./filter-condition-icons.js";const b={and:"webclient.delimiter.and",or:"webclient.delimiter.or"},d={and:"&",or:"or"},u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.remove=i(this,"remove",7),this.removable=!0,this.readonly=!1,this.disabled=!1,this.invalid=!1,this.selected=!1,this.maxLength=25,this.handleKeyDown=t=>{this.disabled||this.readonly||"Backspace"!==t.key&&"Delete"!==t.key||(t.preventDefault(),t.stopPropagation(),this.remove.emit(this.identifier))},this.handleRemoveClick=t=>{t.stopPropagation(),this.remove.emit(this.identifier)}}get chipId(){let t=r(this).id;return t||(this.randomId||(this.randomId=l()),t=this.randomId),"filter-chip-"+t}render(){const t=this.chipId,e=this.getDisplayItems(),i=this.getConjunctionText(),r=this.getHelperLabel(e,i);return o(n,{key:"291c2a6437491c9a5152b87af18476c2fb2f69bc"},this.renderLabel(),o("button",{key:"8a51d37a3aa1f3b6a49dd15b0f6705fdc4c9ced3",class:{chip:!0},type:"button",id:t,"aria-label":[this.label,r].filter(Boolean).join(", ")||this.getFilterLabel(),"aria-pressed":this.getAriaPressed(),onKeyDown:this.handleKeyDown,disabled:this.disabled},this.renderIcon(),this.renderValue(e,i)),this.renderRemoveButton(t),o("limel-tooltip",{key:"522b0a8736e302e074914bf672c350ead53e418b",elementId:t,label:this.label||this.getFilterLabel(),helperLabel:r}))}getAriaPressed(){if(!this.readonly&&!this.disabled)return this.selected?"true":"false"}renderLabel(){if(this.label)return o("label",{"aria-hidden":"true"},this.label)}renderIcon(){const t=this.getIconName();if(t)return o("limel-icon",{"aria-hidden":"true",badge:!0,name:t})}getIconName(){return this.icon?this.icon:this.condition?c(this.condition,this.propertyType):void 0}get hasRawValue(){return"matches"===this.condition}renderValue(t,e){if(!Array.isArray(this.value))return o("span",{class:{text:!0,empty:this.hasRawValue},"aria-hidden":"true"},this.renderValueItem(t[0]));const{visibleItems:i,remainingCount:r}=this.truncateItems(t,this.separatorFor(e));return o("span",{class:{text:!0,empty:this.hasRawValue},"aria-hidden":"true"},this.renderValueItems(i,e),this.renderBadge(r))}renderValueItems(t,e){const i=[];for(const[r,n]of t.entries())r>0&&i.push(e?o("span",{class:"conjunction"}," ",e," "):", "),i.push(this.renderValueItem(n));return i}renderValueItem(t){if(t)return o("span",{class:{"value-item":!0,empty:t.empty}},t.text)}renderBadge(t){if(!(t<=0))return o("limel-badge",{label:`+${t}`})}renderRemoveButton(t){if(this.removable&&!this.readonly&&!this.disabled)return o("button",{type:"button",class:"trailing-button remove-button",tabIndex:-1,"aria-label":this.getRemoveButtonLabel(),"aria-controls":t,innerHTML:'<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="currentColor" stroke-width="2" d="m8 8 16 16M24 8 8 24"/></svg>',onClick:this.handleRemoveClick})}getTranslator(){if(this.platform)try{return this.platform.get(s.Translate)}catch(t){return}}getRemoveButtonLabel(){const t=this.getTranslator();return t?t.get("webclient.remove-filter",{propertyName:this.label}):"Remove"}getConditionLabel(){const t=h(this.condition,this.propertyType),e=this.getTranslator();return t&&e?e.get(t):""}getConjunctionText(){if(!this.conjunction)return"";const t=this.getTranslator();return t?t.get(b[this.conjunction]):d[this.conjunction]}getFilterLabel(){const t=this.getTranslator();return t?t.get("webclient.filter"):"Filter"}getValueItems(){return Array.isArray(this.value)?this.value:null==this.value?[]:[this.value]}getDisplayItems(){const t=this.getValueItems(),e=t.some((t=>!t||!t.trim()))?this.getEmptyLabel():"";return t.map((t=>{const i=!t||!t.trim();return{text:i?e:t,empty:i}}))}getEmptyLabel(){const t=this.getTranslator();return t?t.get("webclient.empty"):"Empty"}separatorFor(t){return t?` ${t} `:", "}getHelperLabel(t,e){if(void 0!==this.helperLabel)return this.helperLabel;const i=this.getConditionLabel(),r=t.map((t=>t.text)).join(this.separatorFor(e));return i&&r?`${i}: ${r}`:i||r}truncateItems(t,e){const i=Math.max(this.maxLength,1),r=t.map((t=>t.text)).join(e);if(t.length<=1||r.length<=i)return{visibleItems:t,remainingCount:0};const o=[t[0]];let n=t[0].text.length;for(let r=1;r<t.length;r++){const a=n+e.length+t[r].text.length;if(a>i)break;o.push(t[r]),n=a}return{visibleItems:o,remainingCount:t.length-o.length}}filterClickWhenInactive(t){(this.disabled||this.readonly)&&(t.preventDefault(),t.stopPropagation())}static get delegatesFocus(){return!0}static get style(){return"@charset \"UTF-8\";:host(limebb-filter-chip){isolation:isolate;position:relative;display:inline-flex;align-items:center;min-width:0}*{box-sizing:border-box}button.chip{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;position:relative;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;max-width:20rem;height:1.75rem;border-radius:1.75rem;border-top-left-radius:0.5rem;border-bottom-left-radius:0.5rem;font-size:0.875rem;padding:0 0.125rem}button.chip:has(limel-icon) .text{padding-left:0}button.chip:not([disabled]):focus{outline:none}button.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.chip:not([disabled]){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)}button.chip:not([disabled]):hover,button.chip:not([disabled]):focus,button.chip:not([disabled]):focus-visible{will-change:color, background-color, box-shadow, transform}button.chip:not([disabled]):hover,button.chip:not([disabled]):focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.chip:not([disabled]):hover{box-shadow:var(--button-shadow-hovered)}button.chip:not([disabled]):active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);background-color:var(--limel-theme-surface-background-color);box-shadow:var(--button-shadow-inset-pressed)}button.chip:not([disabled]):hover,button.chip:not([disabled]):active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.chip[disabled]{cursor:not-allowed;color:rgba(var(--contrast-1600), 0.37);background-color:rgba(var(--contrast-1600), 0.1)}button.chip:has(+.remove-button:hover){box-shadow:var(--shadow-depth-8-error)}button.chip:has(+.trailing-button){padding-right:calc(1.75rem + 0.125rem)}button.chip:has(+.trailing-button) .text{padding-right:0}button.chip .text.empty,button.chip .value-item.empty{font-style:italic;color:rgb(var(--contrast-800))}button.chip .conjunction{color:rgb(var(--contrast-800))}button.chip limel-badge{margin-left:0.25rem}:host(limebb-filter-chip[selected]) .chip{background-color:rgb(var(--contrast-500));box-shadow:var(--button-shadow-inset-pressed)}:host(limebb-filter-chip[selected]) .chip:hover{background-color:rgb(var(--contrast-500))}:host(limebb-filter-chip[selected]) .chip limel-badge{--badge-background-color:rgb(var(--contrast-200))}:host(limebb-filter-chip[invalid]) .chip{background:url(\"data:image/svg+xml;charset=utf-8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' style='fill-rule:evenodd;'><path fill='rgba(186,186,192,0.16)' d='M0 0h4v4H0zM4 4h4v4H4z'/></svg>\");background-size:0.5rem;background-color:rgb(var(--color-red-default))}:host(limebb-filter-chip[invalid]) .text{color:rgb(var(--color-white))}:host(limebb-filter-chip[invalid]) .conjunction{color:rgba(var(--color-white), 0.7)}:host(limebb-filter-chip[readonly]:not([readonly=false])) .chip{box-shadow:0 0 0 1px var(--chip-readonly-border-color, rgb(var(--contrast-800), 0.5));cursor:default}limel-icon{flex-shrink:0;width:1.5rem;height:1.5rem;padding:0.0625rem}.text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2;padding:0 0.5rem}label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:100%;transform:translateY(-50%);z-index:1;position:absolute;top:0;left:0;display:block;padding:0px 0.25rem;color:rgb(var(--contrast-1200));font-size:0.65rem;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em)}button.trailing-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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:transparent}button.trailing-button:hover,button.trailing-button:focus,button.trailing-button:focus-visible{will-change:color, background-color, box-shadow, transform}button.trailing-button:hover,button.trailing-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button.trailing-button:hover{box-shadow:var(--button-shadow-hovered)}button.trailing-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button.trailing-button:hover,button.trailing-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button.trailing-button{z-index:1;flex-shrink:0;align-self:center;display:flex;align-items:center;justify-content:center;margin-left:calc(1.75rem * -1 + 0.125rem);width:1.5rem;height:1.5rem;border-radius:50%}button.trailing-button svg{transition:color 0.2s ease, transform 0.2s ease;width:1.25rem}button.trailing-button.remove-button:hover{color:rgb(var(--color-red-dark))}button.trailing-button.remove-button:hover svg{transform:scale(0.8)}"}},[17,"limebb-filter-chip",{label:[1],value:[1],conjunction:[1],condition:[1],propertyType:[1,"property-type"],icon:[1],helperLabel:[1,"helper-label"],removable:[4],readonly:[516],disabled:[4],invalid:[516],selected:[516],identifier:[8],platform:[16],maxLength:[2,"max-length"]},[[2,"click","filterClickWhenInactive"]]]);function m(){"undefined"!=typeof customElements&&["limebb-filter-chip"].forEach((t=>{"limebb-filter-chip"===t&&(customElements.get(a(t))||customElements.define(a(t),u))}))}export{u as F,m as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as o,Host as n,transformTag as s}from"@stencil/core/internal/client";import{b as r}from"./index.esm.js";import{d as l,g as c,c as a}from"./filter-condition-icons.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.disabled=!1,this.handleChange=t=>{t.stopPropagation(),t.detail&&this.change.emit(t.detail.value)}}render(){const t=this.buildItems(),e=this.selectedOption(t);return o(n,{key:"ca926963d368460db20fa8961f49825d19ae2c07"},o("limel-select",{key:"5571b580b7da63d1a95fef6cb9b204ed3b32cf75",class:"condition",label:this.accessibleLabel,disabled:this.disabled,options:t,value:e,onChange:this.handleChange}))}buildItems(){var t;const e=null!==(t=this.conditions)&&void 0!==t?t:l(this.propertyType),i=e.findIndex((t=>"empty"===t||"not-empty"===t)),o=e.indexOf("matches"),n=[];for(const[t,s]of e.entries())t>0&&(t===i||t===o)&&n.push({separator:!0}),n.push({value:s,text:this.conditionLabel(s),icon:c(s,this.propertyType)});return n}selectedOption(t){return t.filter((t=>!("separator"in t))).find((t=>t.value===this.value))}get accessibleLabel(){var t;return null!==(t=this.translate("webclient.operator"))&&void 0!==t?t:"Operator"}conditionLabel(t){var e;const i=a(t,this.propertyType);return null!==(e=i?this.translate(i):void 0)&&void 0!==e?e:t}translate(t){var e;const i=null===(e=this.translator)||void 0===e?void 0:e.get(t);return i&&i!==t?i:void 0}get translator(){var t;try{return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}catch(t){return}}static get style(){return":host(limebb-filter-condition-picker){display:inline-block}.condition{--limel-notched-outline-label-color:transparent}"}},[1,"limebb-filter-condition-picker",{platform:[16],value:[1],propertyType:[1,"property-type"],conditions:[16],disabled:[516]}]);function h(){"undefined"!=typeof customElements&&["limebb-filter-condition-picker"].forEach((t=>{"limebb-filter-condition-picker"===t&&(customElements.get(s(t))||customElements.define(s(t),d))}))}export{d as F,h as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as o,Host as n,transformTag as s}from"@stencil/core/internal/client";import{n as r}from"./index.esm.js";import{d as l,g as c,c as a}from"./filter-condition-icons.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.disabled=!1,this.handleChange=t=>{t.stopPropagation(),t.detail&&this.change.emit(t.detail.value)}}render(){const t=this.buildItems(),e=this.selectedOption(t);return o(n,{key:"ca926963d368460db20fa8961f49825d19ae2c07"},o("limel-select",{key:"5571b580b7da63d1a95fef6cb9b204ed3b32cf75",class:"condition",label:this.accessibleLabel,disabled:this.disabled,options:t,value:e,onChange:this.handleChange}))}buildItems(){var t;const e=null!==(t=this.conditions)&&void 0!==t?t:l(this.propertyType),i=e.findIndex((t=>"empty"===t||"not-empty"===t)),o=e.indexOf("matches"),n=[];for(const[t,s]of e.entries())t>0&&(t===i||t===o)&&n.push({separator:!0}),n.push({value:s,text:this.conditionLabel(s),icon:c(s,this.propertyType)});return n}selectedOption(t){return t.filter((t=>!("separator"in t))).find((t=>t.value===this.value))}get accessibleLabel(){var t;return null!==(t=this.translate("webclient.operator"))&&void 0!==t?t:"Operator"}conditionLabel(t){var e;const i=a(t,this.propertyType);return null!==(e=i?this.translate(i):void 0)&&void 0!==e?e:t}translate(t){var e;const i=null===(e=this.translator)||void 0===e?void 0:e.get(t);return i&&i!==t?i:void 0}get translator(){var t;try{return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}catch(t){return}}static get style(){return":host(limebb-filter-condition-picker){display:inline-block}.condition{--limel-notched-outline-label-color:transparent}"}},[1,"limebb-filter-condition-picker",{platform:[16],value:[1],propertyType:[1,"property-type"],conditions:[16],disabled:[516]}]);function h(){"undefined"!=typeof customElements&&["limebb-filter-condition-picker"].forEach((t=>{"limebb-filter-condition-picker"===t&&(customElements.get(s(t))||customElements.define(s(t),d))}))}export{d as F,h as d}
@@ -1 +1 @@
1
- import{n}from"./index.esm.js";const t=[[n.EQUALS,"equals"],[n.NOT_EQUALS,"not-equals"],[n.GREATER,"greater-than"],[n.GREATER_OR_EQUAL,"greater-than-or-equal"],[n.LESS,"less-than"],[n.LESS_OR_EQUAL,"less-than-or-equal"],[n.IN,"in-filter-set"],[n.LIKE,"contains"],[n.BEGINS,"begins-with"],[n.ENDS,"ends-with"]];function e(n){var e;return null===(e=t.find((([,t])=>t===n)))||void 0===e?void 0:e[0]}function r(n){return n.map((n=>{var e;return null===(e=t.find((([t])=>t===n)))||void 0===e?void 0:e[1]})).filter((n=>void 0!==n))}function a(n){if(n)return r([n])[0]}export{a,e as c,r as o}
1
+ import{o as n}from"./index.esm.js";const t=[[n.EQUALS,"equals"],[n.NOT_EQUALS,"not-equals"],[n.GREATER,"greater-than"],[n.GREATER_OR_EQUAL,"greater-than-or-equal"],[n.LESS,"less-than"],[n.LESS_OR_EQUAL,"less-than-or-equal"],[n.IN,"in-filter-set"],[n.LIKE,"contains"],[n.BEGINS,"begins-with"],[n.ENDS,"ends-with"]];function e(n){var e;return null===(e=t.find((([,t])=>t===n)))||void 0===e?void 0:e[0]}function r(n){return n.map((n=>{var e;return null===(e=t.find((([t])=>t===n)))||void 0===e?void 0:e[1]})).filter((n=>void 0!==n))}function a(n){if(n)return r([n])[0]}export{a,e as c,r as o}
@@ -1 +1 @@
1
- import{setErrorHandler as t,getElement as n}from"@stencil/core/internal/client";var r={};function e(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function i(t){return t&&["belongsto","hasone"].includes(t.type)}function o(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}r.LimeTypeRepository="state.limetypes";var u="context-request";function c(t,n){let r,e={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:e})),r}function f(t){if(t.platform)return t.platform;let r=c(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}var s="context";function a(t){return t.context?t.context:c(n(t),s)}var l=function(t,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},l(t,n)};function h(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}l(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],e=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),o=[];try{for(;!(r=i.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}function b(t,n,r){if(2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)(e||!(i in n))&&(e||=Array.prototype.slice.call(n,0,i),e[i]=n[i]);return t.concat(e||Array.prototype.slice.call(n))}function m(t){return"function"==typeof t}function p(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=p((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function g(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var w=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,e,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=v(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(m(f))try{f()}catch(t){i=t instanceof d?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var h=l.value;try{x(h)}catch(t){i??=[],t instanceof d?i=b(b([],y(i)),y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}}if(i)throw new d(i)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)x(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&g(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&g(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),j=w.EMPTY;function O(t){return t instanceof w||t&&"closed"in t&&m(t.remove)&&m(t.add)&&m(t.unsubscribe)}function x(t){m(t)?t():t.unsubscribe()}function R(){}function E(t){t()}var S=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O(n)&&n.add(r)):r.destination=M,r}return h(n,t),n.create=function(t,n,r){return new A(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(w),k=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){C(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){C(t)}else C(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){C(t)}},t}(),A=function(t){function n(n,r,e){var i,o=t.call(this)||this;return i=m(n)||!n?{next:n??void 0,error:r??void 0,complete:e??void 0}:n,o.destination=new k(i),o}return h(n,t),n}(S);function C(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,b([t,n],y(r)))}((function(){throw t}))}(t)}var M={closed:!0,next:R,error:function(t){throw t},complete:R},T="function"==typeof Symbol&&Symbol.observable||"@@observable";function W(t){return t}var P=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var e=this,i=function(t){return t&&t instanceof S||function(t){return t&&m(t.next)&&m(t.error)&&m(t.complete)}(t)&&O(t)}(t)?t:new A(t,n,r);return E((function(){var t=e.operator,n=e.source;i.add(t?t.call(i,n):n?e._subscribe(i):e._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,e){var i=new A({next:function(n){try{t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:n});r.subscribe(i)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[T]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?W:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var e;n.subscribe((function(t){return e=t}),(function(t){return r(t)}),(function(){return t(e)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var _=p((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),q=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return h(n,t),n.prototype.lift=function(t){var n=new F(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new _},n.prototype.next=function(t){var n=this;E((function(){var r,e;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var i=v(n.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;E((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,e=r.observers;return r.hasError||r.isStopped?j:(this.currentObservers=null,e.push(t),new w((function(){n.currentObservers=null,g(e,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new P;return t.source=this,t},n.create=function(t,n){return new F(t,n)},n}(P),F=function(t){function n(n,r){var e=t.call(this)||this;return e.destination=n,e.source=r,e}return h(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??j},n}(q),L=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return h(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(q);function N(t){return t}function U(t,n){return(r,e)=>{let i=function(t,n,r,e){let i=D.get(t);return i||(i=[],D.set(t,i)),i.push({options:r,name:n,optionFactory:e.optionFactory||N,service:{name:e.name,method:e.method||"subscribe"}}),i}(r,e,t,n);1===i.length&&function(t,n){t.connectedCallback=H(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===G.get(this)?t?t.apply(this,r):void 0:H(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=I(t.componentDidUnload),t.disconnectedCallback=I(t.disconnectedCallback)}(r,i)}}var D=new WeakMap,B=new WeakMap,G=new WeakMap;function H(t,r){return function(...e){G.set(this,!0);let i=[];B.set(this,i);let c=new L(a(this));i.push(function(t,r){let e=n(t);return s in e?function(t,n){let r=Object.getOwnPropertyDescriptor(t,s),e=o(t,s);return n(e?.get?.call(t)),Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e?.get?.call(t),set:r=>{e?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,s,r):Reflect.deleteProperty(t,s)}}(e,r):function(t,n,r){let e,i={context:s,subscribe:!0,callback:(t,n)=>{r(t),n&&(e=n)}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:i})),()=>e?.()}(e,0,r)}(this,(t=>c.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),z(t.options)&&(t.options.context=c),J(this,t);if(t)return t.apply(this,e)}}function I(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=B.get(t);for(let t of n)t();B.set(t,[])}(this),r}}function z(t){return"context"in t}function J(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let e=n.service.name,i=f(t);if(!i.has(e))throw Error(`Service ${e} does not exist`);return i.get(e)[n.service.method](function(t,n){return r=>{t[n]=r}}(t,n.name),r)}(t,n);"function"==typeof r&&B.get(t).push(r)}function K(t={}){return U(t,{name:r.LimeTypeRepository})}function Q(t={}){let n={name:r.LimeTypeRepository};return t.map=[V,...t.map||[]],t.context=null,U(t,n)}function V(t){let n=a(this);if(n)return t[n.limetype]}function X(t={}){let n={name:r.LimeObjectRepository};return t.map=[Y,...t.map||[]],t.context=null,U(t,n)}function Y(t){let n=a(this);if(!n)return;let{limetype:r,id:e}=n;return t[r]?t[r].find((t=>t.id===e)):void 0}function Z(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],e=t;for(;n=tt(e);)r=[...r,n],e=Object.getPrototypeOf(e);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function tt(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function nt(t,n,r,e){var i,o=arguments.length,u=o<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(o<3?i(u):o>3?i(n,r,u):i(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var rt=class{context;filter;relation};rt=nt([Z({id:"limeobject.bulk-create-dialog"})],rt);var et=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};et=nt([Z({id:"limeobject.create-dialog"})],et);var it=class{context};it=nt([Z({id:"limeobject.delete-object"})],it);var ot=class{context};ot=nt([Z({id:"limeobject.object-access"})],ot);var ut=class{context;limeobject;route=!1;label};ut=nt([Z({id:"limeobject.save-object"})],ut);var ct=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ft={Count:"COUNT"};r.Query="query";var st={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var at,lt,ht=class{path;query;hash;state};function vt(t){return U(t,{name:r.ConfigRepository})}function yt(t={}){return U(t,{name:r.FilterRepository})}function bt(t,r){let e=new WeakMap;t.connectedCallback=function(t,r,e){return async function(...i){let o=r({component:this,host:n(this),registry:mt(this)});return e.set(this,o),t?.apply(this,i)}}(t.connectedCallback,r,e),t.disconnectedCallback=function(t,n){return function(...r){let e=t?.apply(this,r);return n.get(this)?.(),n.delete(this),e}}(t.disconnectedCallback,e)}function mt(t){let n=f(t),e=r.ContextRegistry;if(!n.has(e))throw Error(`Service ${e} does not exist`);return n.get(e)}function pt(t){return(n,r)=>{bt(n,function(t,n){let r=new WeakMap,e=new WeakMap,i=new WeakSet;function u(t,n){return{configurable:!0,enumerable:!0,get(){return t?.get?t.get.call(this):e.get(n)},set(i){let o=e.get(n);t?.set?.call(this,i),e.set(n,i),o!==i&&r.get(n)?.notify()}}}function c(t,r){let c=function(t,r){return function(t,n){let r=t;for(;r&&r!==HTMLElement.prototype;){if(Object.getOwnPropertyDescriptor(r,n))return!0;r=Object.getPrototypeOf(r)}return!1}(r,n)?r:t}(t,r);if(e.set(t,Reflect.get(c,n)),i.has(c))return;i.add(c);let f=o(Object.getPrototypeOf(c),n);Object.defineProperty(c,n,u(f,t))}function f(n,i,o){let u=o.provide(t,i,(()=>e.get(n)));return r.set(n,u),u}function s(t,n){return()=>{n.teardown(),r.delete(t)}}return({component:t,host:n,registry:r})=>(c(t,n),s(t,f(t,n,r)))}(t,r))}}function dt(t){return(n,r)=>{bt(n,function(t,n){return({component:r,host:e,registry:i})=>i.subscribe(t,e,(t=>{Reflect.set(r,n,t)}))}(t,r))}}function gt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===lt&&(lt=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),e=r.lastIndexOf("/");return-1===e?null:r.slice(e+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===at?at="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():at)),lt&&(t=`${lt}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}ht=nt([Z({id:"navigator.navigate"})],ht),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var wt=null;try{t((function(t,n){wt||=gt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let e=t instanceof Error?t.message:String(t),i=t instanceof Error?t:void 0;wt.error(e,i,r)}))}catch{}export{X as G,Z as H,K as L,gt as M,dt as O,Q as R,pt as T,i as a,r as b,st as c,yt as d,e as i,vt as l,ct as n,ft as r}
1
+ import{setErrorHandler as t,getElement as n}from"@stencil/core/internal/client";var r={};function e(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function i(t){return t&&["belongsto","hasone"].includes(t.type)}function o(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}r.LimeTypeRepository="state.limetypes";var u="context-request";function c(t,n){let r,e={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:e})),r}function f(t){if(t.platform)return t.platform;let r=c(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}var s="context";function a(t){return t.context?t.context:c(n(t),s)}var l=function(t,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},l(t,n)};function h(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}l(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],e=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),o=[];try{for(;!(r=i.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}function b(t,n,r){if(2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)(e||!(i in n))&&(e||=Array.prototype.slice.call(n,0,i),e[i]=n[i]);return t.concat(e||Array.prototype.slice.call(n))}function m(t){return"function"==typeof t}function p(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=p((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function g(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var w=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,e,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=v(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(m(f))try{f()}catch(t){i=t instanceof d?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var h=l.value;try{R(h)}catch(t){i??=[],t instanceof d?i=b(b([],y(i)),y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}}if(i)throw new d(i)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)R(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&g(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&g(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),j=w.EMPTY;function O(t){return t instanceof w||t&&"closed"in t&&m(t.remove)&&m(t.add)&&m(t.unsubscribe)}function R(t){m(t)?t():t.unsubscribe()}function x(){}function S(t){t()}var E=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O(n)&&n.add(r)):r.destination=M,r}return h(n,t),n.create=function(t,n,r){return new A(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(w),k=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){C(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){C(t)}else C(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){C(t)}},t}(),A=function(t){function n(n,r,e){var i,o=t.call(this)||this;return i=m(n)||!n?{next:n??void 0,error:r??void 0,complete:e??void 0}:n,o.destination=new k(i),o}return h(n,t),n}(E);function C(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,b([t,n],y(r)))}((function(){throw t}))}(t)}var M={closed:!0,next:x,error:function(t){throw t},complete:x},W="function"==typeof Symbol&&Symbol.observable||"@@observable";function $(t){return t}var T=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var e=this,i=function(t){return t&&t instanceof E||function(t){return t&&m(t.next)&&m(t.error)&&m(t.complete)}(t)&&O(t)}(t)?t:new A(t,n,r);return S((function(){var t=e.operator,n=e.source;i.add(t?t.call(i,n):n?e._subscribe(i):e._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=P(n))((function(n,e){var i=new A({next:function(n){try{t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:n});r.subscribe(i)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[W]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?$:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=P(t))((function(t,r){var e;n.subscribe((function(t){return e=t}),(function(t){return r(t)}),(function(){return t(e)}))}))},t.create=function(n){return new t(n)},t}();function P(t){return t??undefined??Promise}var _=p((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),I=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return h(n,t),n.prototype.lift=function(t){var n=new q(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new _},n.prototype.next=function(t){var n=this;S((function(){var r,e;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var i=v(n.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;S((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;S((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,e=r.observers;return r.hasError||r.isStopped?j:(this.currentObservers=null,e.push(t),new w((function(){n.currentObservers=null,g(e,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new T;return t.source=this,t},n.create=function(t,n){return new q(t,n)},n}(T),q=function(t){function n(n,r){var e=t.call(this)||this;return e.destination=n,e.source=r,e}return h(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??j},n}(I),F=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return h(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(I);function L(t){return t}function N(t,n){return(r,e)=>{let i=r,o=function(t,n,r,e){let i=U.get(t);return i||(i=[],U.set(t,i)),i.push({options:r,name:n,optionFactory:e.optionFactory||L,service:{name:e.name,method:e.method||"subscribe"}}),i}(i,String(e),t,n);1===o.length&&function(t,n){t.connectedCallback=H(t.connectedCallback,n),t.componentWillLoad=function(t,n){return async function(){return!0===B.get(this)?t?.call(this):H(t,n).call(this)}}(t.componentWillLoad,n),t.disconnectedCallback=function(t){return async function(){let n=t?.call(this);return function(t){let n=D.get(t)??[];for(let t of n)t();D.set(t,[])}(this),n}}(t.disconnectedCallback)}(i,o)}}var U=new WeakMap,D=new WeakMap,B=new WeakMap;function H(t,r){return async function(){B.set(this,!0);let e=[];D.set(this,e);let i=new F(a(this));e.push(function(t,r){let e=n(t);return s in e?function(t,n){let r=Object.getOwnPropertyDescriptor(t,s),e=o(t,s);return n(e?.get?.call(t)),Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e?.get?.call(t),set:r=>{e?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,s,r):Reflect.deleteProperty(t,s)}}(e,r):function(t,n,r){let e,i={context:s,subscribe:!0,callback:(t,n)=>{r(t),n&&(e=n)}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:i})),()=>e?.()}(e,0,r)}(this,(t=>i.next(t))));for(let t of r)t.options=(t.optionFactory??L)(t.options,this),z(t.options)&&(t.options.context=i),G(this,t);return t?.call(this)}}function z(t){return"context"in t}function G(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let e=n.service.name,i=f(t);if(!i.has(e))throw Error(`Service ${e} does not exist`);let o=i.get(e),u=n.service.method,c=Reflect.get(o,u);if("function"!=typeof c)throw TypeError(`Service ${e} does not have a ${u} method`);return c.call(o,function(t,n){return r=>{Reflect.set(t,n,r)}}(t,n.name),r)}(t,n);"function"==typeof r&&D.get(t)?.push(r)}function J(t={}){return N(t,{name:r.LimeTypeRepository})}function K(t={}){let n={name:r.LimeTypeRepository};return t.map=[Q,...t.map||[]],t.context=null,N(t,n)}function Q(t){let n=a(this);if(n&&null!=n.limetype)return t[n.limetype]}function V(t={}){let n={name:r.LimeObjectRepository};return t.map=[X,...t.map||[]],t.context=null,N(t,n)}function X(t){let n=a(this);if(!n)return;let{limetype:r,id:e}=n;if(null==r)return;let i=t[r];return i?i.find((t=>t.id===e)):void 0}function Y(t){return n=>{(function(t,n){Reflect.set(t,"commandId",n)})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n=new Set,r=t;for(;null!=r;){let t=nt(r);if(!t)break;n.add(t),r=Object.getPrototypeOf(r)}return[...n]}(t).includes(n)})}(n,t.id)}}function Z(t){return null!==t&&("object"==typeof t||"function"==typeof t)}function tt(t){return!(!Z(t)||!("commandId"in t))&&"string"==typeof t.commandId}function nt(t){if("string"==typeof t)return t;let n=function(t){if(Z(t))return Reflect.get(t,"constructor")}(t);return tt(n)?n.commandId:tt(t)?t.commandId:null}function rt(t,n,r,e){var i,o=arguments.length,u=o<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(o<3?i(u):o>3?i(n,r,u):i(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var et=class{context;filter;relation};et=rt([Y({id:"limeobject.bulk-create-dialog"})],et);var it=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};it=rt([Y({id:"limeobject.create-dialog"})],it);var ot=class{context};ot=rt([Y({id:"limeobject.delete-object"})],ot);var ut=class{context};ut=rt([Y({id:"limeobject.object-access"})],ut);var ct=class{context;limeobject;route=!1;label};ct=rt([Y({id:"limeobject.save-object"})],ct),r.LimeFileRepository="state.limefiles";var ft=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),st={Count:"COUNT"};r.Query="query";var at={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var lt,ht,vt=class{path;query;hash;state};function yt(t){return N(t,{name:r.ConfigRepository})}function bt(t={}){return N(t,{name:r.FilterRepository})}function mt(t={}){let n={name:r.Application};return t.map=[pt,...t.map||[]],N(t,n)}function pt(t){return t.applicationName}function dt(t,r){let e=new WeakMap;t.connectedCallback=function(t,r,e){return async function(...i){let o=r({component:this,host:n(this),registry:gt(this)});return e.set(this,o),t?.apply(this,i)}}(t.connectedCallback,r,e),t.disconnectedCallback=function(t,n){return function(...r){let e=t?.apply(this,r);return n.get(this)?.(),n.delete(this),e}}(t.disconnectedCallback,e)}function gt(t){let n=f(t),e=r.ContextRegistry;if(!n.has(e))throw Error(`Service ${e} does not exist`);return n.get(e)}function wt(t){return(n,r)=>{dt(n,function(t,n){let r=new WeakMap,e=new WeakMap,i=new WeakSet;function u(t,n){return{configurable:!0,enumerable:!0,get(){return t?.get?t.get.call(this):e.get(n)},set(i){let o=e.get(n);t?.set?.call(this,i),e.set(n,i),o!==i&&r.get(n)?.notify()}}}function c(t,r){let c=function(t,r){return function(t,n){let r=t;for(;r&&r!==HTMLElement.prototype;){if(Object.getOwnPropertyDescriptor(r,n))return!0;r=Object.getPrototypeOf(r)}return!1}(r,n)?r:t}(t,r);if(e.set(t,Reflect.get(c,n)),i.has(c))return;i.add(c);let f=o(Object.getPrototypeOf(c),n);Object.defineProperty(c,n,u(f,t))}function f(n,i,o){let u=o.provide(t,i,(()=>e.get(n)));return r.set(n,u),u}function s(t,n){return()=>{n.teardown(),r.delete(t)}}return({component:t,host:n,registry:r})=>(c(t,n),s(t,f(t,n,r)))}(t,r))}}function jt(t){return(n,r)=>{dt(n,function(t,n){return({component:r,host:e,registry:i})=>i.subscribe(t,e,(t=>{Reflect.set(r,n,t)}))}(t,r))}}function Ot(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===ht&&(ht=function(t){return t&&(function(t){return t.match(/\/([^/]+)-lwc-components\//)?.[1]??null}(t)||function(t){return t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/)?.[1]??null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),e=r.lastIndexOf("/");return-1===e?null:r.slice(e+1)}(t)||function(t){return t.match(/\/static\/([^/]+)\//)?.[1]??null}(t))||null}(void 0===lt?lt="string"==typeof import.meta.url?import.meta.url:function(){try{return function(t){if(!t)return null;for(let n of t.split("\n")){let t=n.match(/(https?:\/\/[^)\s:]+)/);if(t&&t[1])return t[1]}return null}(Error(".").stack)}catch{return null}}():lt)),ht&&(t=`${ht}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}vt=rt([Y({id:"navigator.navigate"})],vt),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var Rt=null;try{t((function(t,n){Rt||=Ot("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let e=t instanceof Error?t.message:String(t),i=t instanceof Error?t:void 0;Rt.error(e,i,r)}))}catch{}export{J as I,K as L,jt as M,Y as U,V as W,mt as _,i as a,Ot as b,at as c,bt as h,e as i,wt as k,r as n,ft as o,yt as p,st as s}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as o,createEvent as t,h as r,Host as i,transformTag as a}from"@stencil/core/internal/client";import{R as n,b as l}from"./index.esm.js";import{d as s}from"./kanban-item.js";import{d as m}from"./navigation-button.js";import{d as b}from"./summary-popover.js";const c=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.loadMore=t(this,"loadMore",7),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return r(i,{key:"5c0675c4edff236ac8b4d90c93d418e3b0c18a9c"},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(l.Translate)}static get style(){return'@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}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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)}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#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)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button{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}button#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( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-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( 0.83, -0.15, 0.49, 1.16 );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)}'}},[1,"limebb-kanban-group",{platform:[16],context:[16],identifier:[1],heading:[513],help:[1],items:[16],summary:[1],loading:[516],totalCount:[514,"total-count"]}]);function d(){"undefined"!=typeof customElements&&["limebb-kanban-group","limebb-kanban-item","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-kanban-group":customElements.get(a(e))||customElements.define(a(e),c);break;case"limebb-kanban-item":customElements.get(a(e))||s();break;case"limebb-navigation-button":customElements.get(a(e))||m();break;case"limebb-summary-popover":customElements.get(a(e))||b()}}))}!function(e,o,t,r){var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,t,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(n=(a<3?i(n):a>3?i(o,t,n):i(o,t))||n);a>3&&n&&Object.defineProperty(o,t,n)}([n()],c.prototype,"limetype",void 0);export{c as K,d}
1
+ import{proxyCustomElement as e,HTMLElement as o,createEvent as t,h as r,Host as i,transformTag as a}from"@stencil/core/internal/client";import{L as n,n as l}from"./index.esm.js";import{d as s}from"./kanban-item.js";import{d as m}from"./navigation-button.js";import{d as b}from"./summary-popover.js";const c=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.loadMore=t(this,"loadMore",7),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return r(i,{key:"5c0675c4edff236ac8b4d90c93d418e3b0c18a9c"},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(l.Translate)}static get style(){return'@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}button#show-more-button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;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)}button#show-more-button:hover,button#show-more-button:focus,button#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}button#show-more-button:hover,button#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)}button#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button#show-more-button:hover,button#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button#show-more-button:focus{outline:none}button#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button#show-more-button{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}button#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( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-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( 0.83, -0.15, 0.49, 1.16 );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)}'}},[1,"limebb-kanban-group",{platform:[16],context:[16],identifier:[1],heading:[513],help:[1],items:[16],summary:[1],loading:[516],totalCount:[514,"total-count"]}]);function d(){"undefined"!=typeof customElements&&["limebb-kanban-group","limebb-kanban-item","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-kanban-group":customElements.get(a(e))||customElements.define(a(e),c);break;case"limebb-kanban-item":customElements.get(a(e))||s();break;case"limebb-navigation-button":customElements.get(a(e))||m();break;case"limebb-summary-popover":customElements.get(a(e))||b()}}))}!function(e,o,t,r){var i,a=arguments.length,n=a<3?o:null===r?r=Object.getOwnPropertyDescriptor(o,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,t,r);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(n=(a<3?i(n):a>3?i(o,t,n):i(o,t))||n);a>3&&n&&Object.defineProperty(o,t,n)}([n()],c.prototype,"limetype",void 0);export{c as K,d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as i,createEvent as o,h as r,Host as a,transformTag as s}from"@stencil/core/internal/client";import{b as t}from"./index.esm.js";import{d as n}from"./navigation-button.js";import{d as l}from"./summary-popover.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.interact=o(this,"interact",7),this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return r("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?r("img",{loading:"lazy",src:e.picture,alt:e.name.text}):r("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var i,o;return"separator"in e?e:{value:e,text:null!==(i=e.label)&&void 0!==i?i:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(o=e.icon)&&void 0!==o?o:""}},this.handleMenuItemSelect=e=>{var i;e.stopPropagation();const o=null===(i=e.detail.value)||void 0===i?void 0:i.command;o&&this.commandbus.handle(o)},this.handleKeyDown=e=>{"Enter"===e.key&&this.handleKanbanItemClick()},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,i;return r(a,{key:"282342e6a11234154e4cbcc8df113aafd5cd9cd2",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick,onKeyDown:this.handleKeyDown},this.renderHeader(),this.renderContent(),this.renderSlot(),this.renderRelations(),this.renderFooter())}renderHeader(){return r("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,i,o,a;if(this.item.icon)return r("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){if(this.item.value)return r("div",{class:"content"},this.renderValue())}renderHeading(){if(this.item.heading)return r("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return r("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return r("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},r("limel-icon",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),r("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions"),openDirection:"top-end"}))}renderSlot(){var e;if(null===(e=this.item)||void 0===e?void 0:e.bodyComponent)return r("slot",{name:"body"})}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return r("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return r("div",{class:"assignees"},this.item.assignees.map((e=>{var i;return r("limebb-summary-popover",Object.assign({icon:null===(i=e.icon)||void 0===i?void 0:i.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),r("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),r("span",null,e.name.text)))})))}createLinkToAssignee(e){const i=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${i}</a>`}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(t.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(t.CommandBus)}static get style(){return'@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}.header a: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)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.header a{text-decoration:none}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:0.5rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-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-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{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)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover: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)}.header .actions:hover:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{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:transparent}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee{display:flex;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}slot[name=body]{display:block;padding:0.5rem}'}},[257,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]);function m(){"undefined"!=typeof customElements&&["limebb-kanban-item","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-kanban-item":customElements.get(s(e))||customElements.define(s(e),c);break;case"limebb-navigation-button":customElements.get(s(e))||n();break;case"limebb-summary-popover":customElements.get(s(e))||l()}}))}export{c as K,m as d}
1
+ import{proxyCustomElement as e,HTMLElement as i,createEvent as o,h as r,Host as a,transformTag as s}from"@stencil/core/internal/client";import{n as t}from"./index.esm.js";import{d as n}from"./navigation-button.js";import{d as l}from"./summary-popover.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.interact=o(this,"interact",7),this.renderRelations=()=>{var e,i,o;if(null===(i=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===i?void 0:i.length)return r("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?r("img",{loading:"lazy",src:e.picture,alt:e.name.text}):r("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var i,o;return"separator"in e?e:{value:e,text:null!==(i=e.label)&&void 0!==i?i:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(o=e.icon)&&void 0!==o?o:""}},this.handleMenuItemSelect=e=>{var i;e.stopPropagation();const o=null===(i=e.detail.value)||void 0===i?void 0:i.command;o&&this.commandbus.handle(o)},this.handleKeyDown=e=>{"Enter"===e.key&&this.handleKanbanItemClick()},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,i;return r(a,{key:"282342e6a11234154e4cbcc8df113aafd5cd9cd2",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick,onKeyDown:this.handleKeyDown},this.renderHeader(),this.renderContent(),this.renderSlot(),this.renderRelations(),this.renderFooter())}renderHeader(){return r("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,i,o,a;if(this.item.icon)return r("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){if(this.item.value)return r("div",{class:"content"},this.renderValue())}renderHeading(){if(this.item.heading)return r("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return r("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return r("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},r("limel-icon",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),r("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions"),openDirection:"top-end"}))}renderSlot(){var e;if(null===(e=this.item)||void 0===e?void 0:e.bodyComponent)return r("slot",{name:"body"})}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return r("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return r("div",{class:"assignees"},this.item.assignees.map((e=>{var i;return r("limebb-summary-popover",Object.assign({icon:null===(i=e.icon)||void 0===i?void 0:i.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),r("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),r("span",null,e.name.text)))})))}createLinkToAssignee(e){const i=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${i}</a>`}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(t.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(t.CommandBus)}static get style(){return'@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}.header a: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)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.header a{text-decoration:none}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:0.5rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-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-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{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)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover: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)}.header .actions:hover:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{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:transparent}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee{display:flex;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}slot[name=body]{display:block;padding:0.5rem}'}},[257,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]);function m(){"undefined"!=typeof customElements&&["limebb-kanban-item","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-kanban-item":customElements.get(s(e))||customElements.define(s(e),c);break;case"limebb-navigation-button":customElements.get(s(e))||n();break;case"limebb-summary-popover":customElements.get(s(e))||l()}}))}export{c as K,m as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,transformTag as s}from"@stencil/core/internal/client";import{n as o}from"./index.esm.js";import{i as l,e as m,b as n,d as p}from"./lime-query-filter-expression.js";import{d as a}from"./filter-chip.js";import{d as c}from"./filter-condition-picker.js";import{d as b}from"./lime-query-filter-comparison.js";import{d as u}from"./lime-query-filter-comparison-editor.js";import{d as h}from"./lime-query-value-input.js";import{d as f}from"./property-selector.js";const y=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:o.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:o.AND,exp:[this.expression,{key:"",op:o.EQUALS,exp:""}]})},this.handleExpressionChange=e=>{var i;e.stopPropagation(),this.expressionChange.emit(null!==(i=e.detail)&&void 0!==i?i:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():r("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&&!l(this.expression)}renderEmptyState(){return r("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return r("div",{class:"expression-with-promotion"},r("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),r("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}static get style(){return".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}"}},[1,"limebb-lime-query-filter-builder",{platform:[16],context:[16],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function d(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-builder","limebb-filter-chip","limebb-filter-condition-picker","limebb-lime-query-filter-comparison","limebb-lime-query-filter-comparison-editor","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-builder":customElements.get(s(e))||customElements.define(s(e),y);break;case"limebb-filter-chip":customElements.get(s(e))||a();break;case"limebb-filter-condition-picker":customElements.get(s(e))||c();break;case"limebb-lime-query-filter-comparison":customElements.get(s(e))||b();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(s(e))||u();break;case"limebb-lime-query-filter-expression":customElements.get(s(e))||p();break;case"limebb-lime-query-filter-group":customElements.get(s(e))||n();break;case"limebb-lime-query-filter-not":customElements.get(s(e))||m();break;case"limebb-lime-query-value-input":customElements.get(s(e))||h();break;case"limebb-property-selector":customElements.get(s(e))||f()}}))}export{y as L,d}
1
+ import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,transformTag as s}from"@stencil/core/internal/client";import{o}from"./index.esm.js";import{i as l,e as m,b as n,d as p}from"./lime-query-filter-expression.js";import{d as a}from"./filter-chip.js";import{d as c}from"./filter-condition-picker.js";import{d as b}from"./lime-query-filter-comparison.js";import{d as u}from"./lime-query-filter-comparison-editor.js";import{d as h}from"./lime-query-value-input.js";import{d as f}from"./property-selector.js";const y=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:o.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:o.AND,exp:[this.expression,{key:"",op:o.EQUALS,exp:""}]})},this.handleExpressionChange=e=>{var i;e.stopPropagation(),this.expressionChange.emit(null!==(i=e.detail)&&void 0!==i?i:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():r("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&&!l(this.expression)}renderEmptyState(){return r("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return r("div",{class:"expression-with-promotion"},r("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),r("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}static get style(){return".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}"}},[1,"limebb-lime-query-filter-builder",{platform:[16],context:[16],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function d(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-builder","limebb-filter-chip","limebb-filter-condition-picker","limebb-lime-query-filter-comparison","limebb-lime-query-filter-comparison-editor","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-builder":customElements.get(s(e))||customElements.define(s(e),y);break;case"limebb-filter-chip":customElements.get(s(e))||a();break;case"limebb-filter-condition-picker":customElements.get(s(e))||c();break;case"limebb-lime-query-filter-comparison":customElements.get(s(e))||b();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(s(e))||u();break;case"limebb-lime-query-filter-expression":customElements.get(s(e))||p();break;case"limebb-lime-query-filter-group":customElements.get(s(e))||n();break;case"limebb-lime-query-filter-not":customElements.get(s(e))||m();break;case"limebb-lime-query-value-input":customElements.get(s(e))||h();break;case"limebb-property-selector":customElements.get(s(e))||f()}}))}export{y as L,d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as s,transformTag as o}from"@stencil/core/internal/client";import{n as l}from"./index.esm.js";import{o as n,c as a,a as p}from"./filter-operators.js";import{d as m}from"./filter-condition-picker.js";import{d as c}from"./lime-query-value-input.js";import{d as h}from"./property-selector.js";const u=n([l.EQUALS,l.NOT_EQUALS,l.GREATER,l.GREATER_OR_EQUAL,l.LESS,l.LESS_OR_EQUAL,l.IN,l.LIKE,l.BEGINS,l.ENDS]),b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=i(this,"expressionChange",7),this.handlePropertyChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{key:e.detail}))},this.handleConditionChange=e=>{e.stopPropagation();const t=a(e.detail);if(!t)return;const i=this.expression.op;let r=this.expression.exp;t!==l.IN||Array.isArray(r)?i===l.IN&&t!==l.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}))}}componentDidLoad(){var e;null===(e=this.propertySelectorEl)||void 0===e||e.focus()}render(){return r(s,{key:"528f313843bb6e8e779fc3a5603c10769cbd183b"},this.renderPropertySelector(),this.renderConditionPicker(),this.renderValueInput())}renderPropertySelector(){return r("limebb-property-selector",{ref:e=>this.propertySelectorEl=e,class:"property",label:"Property",platform:this.platform,context:this.context,limetype:this.limetype,value:this.expression.key,required:!0,onChange:this.handlePropertyChange})}renderConditionPicker(){const e=!!this.expression.op;return r("limebb-filter-condition-picker",{class:"operator",platform:this.platform,propertyType:this.propertyType,conditions:u,value:p(this.expression.op),disabled:!e&&!this.expression.key,onChange:this.handleConditionChange})}renderValueInput(){return this.expression.op?r("limebb-lime-query-value-input",{class:"value",label:"Value",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}static get delegatesFocus(){return!0}static get style(){return":host{display:grid;grid-template-columns:3fr 1fr;gap:0.5rem;padding:0.75rem;min-width:30rem;align-items:center}.value{grid-column:1/-1}"}},[17,"limebb-lime-query-filter-comparison-editor",{platform:[16],context:[16],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16],propertyType:[1,"property-type"]}]);function d(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-comparison-editor","limebb-filter-condition-picker","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-comparison-editor":customElements.get(o(e))||customElements.define(o(e),b);break;case"limebb-filter-condition-picker":customElements.get(o(e))||m();break;case"limebb-lime-query-value-input":customElements.get(o(e))||c();break;case"limebb-property-selector":customElements.get(o(e))||h()}}))}export{b as L,d}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as s,transformTag as o}from"@stencil/core/internal/client";import{o as l}from"./index.esm.js";import{o as n,c as a,a as p}from"./filter-operators.js";import{d as m}from"./filter-condition-picker.js";import{d as c}from"./lime-query-value-input.js";import{d as h}from"./property-selector.js";const u=n([l.EQUALS,l.NOT_EQUALS,l.GREATER,l.GREATER_OR_EQUAL,l.LESS,l.LESS_OR_EQUAL,l.IN,l.LIKE,l.BEGINS,l.ENDS]),b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=i(this,"expressionChange",7),this.handlePropertyChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{key:e.detail}))},this.handleConditionChange=e=>{e.stopPropagation();const t=a(e.detail);if(!t)return;const i=this.expression.op;let r=this.expression.exp;t!==l.IN||Array.isArray(r)?i===l.IN&&t!==l.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}))}}componentDidLoad(){var e;null===(e=this.propertySelectorEl)||void 0===e||e.focus()}render(){return r(s,{key:"528f313843bb6e8e779fc3a5603c10769cbd183b"},this.renderPropertySelector(),this.renderConditionPicker(),this.renderValueInput())}renderPropertySelector(){return r("limebb-property-selector",{ref:e=>this.propertySelectorEl=e,class:"property",label:"Property",platform:this.platform,context:this.context,limetype:this.limetype,value:this.expression.key,required:!0,onChange:this.handlePropertyChange})}renderConditionPicker(){const e=!!this.expression.op;return r("limebb-filter-condition-picker",{class:"operator",platform:this.platform,propertyType:this.propertyType,conditions:u,value:p(this.expression.op),disabled:!e&&!this.expression.key,onChange:this.handleConditionChange})}renderValueInput(){return this.expression.op?r("limebb-lime-query-value-input",{class:"value",label:"Value",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}static get delegatesFocus(){return!0}static get style(){return":host{display:grid;grid-template-columns:3fr 1fr;gap:0.5rem;padding:0.75rem;min-width:30rem;align-items:center}.value{grid-column:1/-1}"}},[17,"limebb-lime-query-filter-comparison-editor",{platform:[16],context:[16],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16],propertyType:[1,"property-type"]}]);function d(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-comparison-editor","limebb-filter-condition-picker","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-comparison-editor":customElements.get(o(e))||customElements.define(o(e),b);break;case"limebb-filter-condition-picker":customElements.get(o(e))||m();break;case"limebb-lime-query-value-input":customElements.get(o(e))||c();break;case"limebb-property-selector":customElements.get(o(e))||h()}}))}export{b as L,d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as o,transformTag as s}from"@stencil/core/internal/client";import{b as l}from"./index.esm.js";import{a as n}from"./filter-operators.js";import{a as m,d as a}from"./property-selector.js";import{g as c,d as p}from"./lime-query-value-input.js";import{d as b}from"./filter-chip.js";import{d as h}from"./filter-condition-picker.js";import{d}from"./lime-query-filter-comparison-editor.js";const f=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.isOpen=!1,this.handleOpen=()=>{this.isOpen=!0},this.handleClose=()=>{this.isOpen=!1},this.handleEditorChange=e=>{e.stopPropagation(),this.expressionChange.emit(e.detail)},this.removeExpression=()=>{this.expressionChange.emit(void 0)}}componentWillLoad(){var e;(null===(e=this.expression)||void 0===e?void 0:e.key)||(this.isOpen=!0)}render(){var e,i;const t=!!(null===(e=this.expression)||void 0===e?void 0:e.key),s=Array.isArray(null===(i=this.expression)||void 0===i?void 0:i.exp),l=t?this.getPropertyType(this.expression.key):void 0;return r(o,{key:"3e312a0124577ab70c6ab46074f7a34e0b87decc"},this.renderHeader(),r("limel-popover",{key:"37b5e3b58ef4a20950b1f6fc24075388b4bdc932",open:this.isOpen,openDirection:"bottom-start",onClose:this.handleClose},r("limebb-filter-chip",{key:"d34fc11734714a8b83ef7c014fd9468522e8ffbf",slot:"trigger",platform:this.platform,label:t?this.getPropertyLabel(this.expression.key):void 0,condition:t?n(this.expression.op):void 0,propertyType:l,value:t?this.chipValue():"New condition",conjunction:s?"or":void 0,selected:this.isOpen,removable:!0,onClick:this.handleOpen,onRemove:this.removeExpression}),r("limebb-lime-query-filter-comparison-editor",{key:"abaa2fbbdf8ab350f1da21412b82405d02f1546f",platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,propertyType:l,onExpressionChange:this.handleEditorChange})))}getPropertyLabel(e){return this.resolveProperty(e).labels.join(" › ")}getPropertyType(e){const{property:i}=this.resolveProperty(e);return i?c(i):void 0}resolveProperty(e){var i,t;const r=null===(i=this.platform)||void 0===i?void 0:i.get(l.LimeTypeRepository);if(!r||!this.limetype)return{labels:[e]};const o=[];let s,n=r.getLimeType(this.limetype);for(const i of e.split("."))s=n?m(n)[i]:void 0,o.push((null==s?void 0:s.localname)||i),n=null===(t=null==s?void 0:s.relation)||void 0===t?void 0:t.getLimetype();return{labels:o,property:s}}chipValue(){const e=this.expression.exp;return Array.isArray(e)?e.map((e=>this.formatValue(e))):this.formatValue(e)}formatValue(e){return null==e||""===e?"…":Array.isArray(e)?e.map((e=>this.formatValue(e))).join(", "):"string"==typeof e?e:String(e)}renderHeader(){if(this.label)return r("limel-header",{subheading:this.label})}static get style(){return":host(limebb-lime-query-filter-comparison){display:inline-block;max-width:25rem}"}},[1,"limebb-lime-query-filter-comparison",{platform:[16],context:[16],label:[513],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16],isOpen:[32]}]);function u(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-comparison","limebb-filter-chip","limebb-filter-condition-picker","limebb-lime-query-filter-comparison-editor","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-comparison":customElements.get(s(e))||customElements.define(s(e),f);break;case"limebb-filter-chip":customElements.get(s(e))||b();break;case"limebb-filter-condition-picker":customElements.get(s(e))||h();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(s(e))||d();break;case"limebb-lime-query-value-input":customElements.get(s(e))||p();break;case"limebb-property-selector":customElements.get(s(e))||a()}}))}export{f as L,u as d}
1
+ import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as o,transformTag as s}from"@stencil/core/internal/client";import{n as l}from"./index.esm.js";import{a as n}from"./filter-operators.js";import{a as m,d as a}from"./property-selector.js";import{g as c,d as p}from"./lime-query-value-input.js";import{d as b}from"./filter-chip.js";import{d as h}from"./filter-condition-picker.js";import{d}from"./lime-query-filter-comparison-editor.js";const f=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.isOpen=!1,this.handleOpen=()=>{this.isOpen=!0},this.handleClose=()=>{this.isOpen=!1},this.handleEditorChange=e=>{e.stopPropagation(),this.expressionChange.emit(e.detail)},this.removeExpression=()=>{this.expressionChange.emit(void 0)}}componentWillLoad(){var e;(null===(e=this.expression)||void 0===e?void 0:e.key)||(this.isOpen=!0)}render(){var e,i;const t=!!(null===(e=this.expression)||void 0===e?void 0:e.key),s=Array.isArray(null===(i=this.expression)||void 0===i?void 0:i.exp),l=t?this.getPropertyType(this.expression.key):void 0;return r(o,{key:"3e312a0124577ab70c6ab46074f7a34e0b87decc"},this.renderHeader(),r("limel-popover",{key:"37b5e3b58ef4a20950b1f6fc24075388b4bdc932",open:this.isOpen,openDirection:"bottom-start",onClose:this.handleClose},r("limebb-filter-chip",{key:"d34fc11734714a8b83ef7c014fd9468522e8ffbf",slot:"trigger",platform:this.platform,label:t?this.getPropertyLabel(this.expression.key):void 0,condition:t?n(this.expression.op):void 0,propertyType:l,value:t?this.chipValue():"New condition",conjunction:s?"or":void 0,selected:this.isOpen,removable:!0,onClick:this.handleOpen,onRemove:this.removeExpression}),r("limebb-lime-query-filter-comparison-editor",{key:"abaa2fbbdf8ab350f1da21412b82405d02f1546f",platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,propertyType:l,onExpressionChange:this.handleEditorChange})))}getPropertyLabel(e){return this.resolveProperty(e).labels.join(" › ")}getPropertyType(e){const{property:i}=this.resolveProperty(e);return i?c(i):void 0}resolveProperty(e){var i,t;const r=null===(i=this.platform)||void 0===i?void 0:i.get(l.LimeTypeRepository);if(!r||!this.limetype)return{labels:[e]};const o=[];let s,n=r.getLimeType(this.limetype);for(const i of e.split("."))s=n?m(n)[i]:void 0,o.push((null==s?void 0:s.localname)||i),n=null===(t=null==s?void 0:s.relation)||void 0===t?void 0:t.getLimetype();return{labels:o,property:s}}chipValue(){const e=this.expression.exp;return Array.isArray(e)?e.map((e=>this.formatValue(e))):this.formatValue(e)}formatValue(e){return null==e||""===e?"…":Array.isArray(e)?e.map((e=>this.formatValue(e))).join(", "):"string"==typeof e?e:String(e)}renderHeader(){if(this.label)return r("limel-header",{subheading:this.label})}static get style(){return":host(limebb-lime-query-filter-comparison){display:inline-block;max-width:25rem}"}},[1,"limebb-lime-query-filter-comparison",{platform:[16],context:[16],label:[513],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16],isOpen:[32]}]);function u(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-comparison","limebb-filter-chip","limebb-filter-condition-picker","limebb-lime-query-filter-comparison-editor","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-comparison":customElements.get(s(e))||customElements.define(s(e),f);break;case"limebb-filter-chip":customElements.get(s(e))||b();break;case"limebb-filter-condition-picker":customElements.get(s(e))||h();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(s(e))||d();break;case"limebb-lime-query-value-input":customElements.get(s(e))||p();break;case"limebb-property-selector":customElements.get(s(e))||a()}}))}export{f as L,u as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,transformTag as o,Host as l}from"@stencil/core/internal/client";import{n as s}from"./index.esm.js";import{d as n}from"./filter-chip.js";import{d as a}from"./filter-condition-picker.js";import{d as m}from"./lime-query-filter-comparison.js";import{d as c}from"./lime-query-filter-comparison-editor.js";import{d as b}from"./lime-query-value-input.js";import{d as u}from"./property-selector.js";function p(e){return e.op===s.NOT?e.exp.op===s.AND?"NOT_AND":"NOT_OR":e.op===s.AND?"AND":"OR"}function f(e){return e.op===s.NOT?e.exp:e}function d(e){if(e.op===s.AND||e.op===s.OR)return!0;if(e.op===s.NOT){const i=e.exp;return i.op===s.AND||i.op===s.OR}return!1}function h(){return{key:"",op:s.EQUALS,exp:""}}function y(e,i){return{op:e.op,exp:[...e.exp,i]}}const g=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.handleExpressionChange=e=>{var i;e.stopPropagation();const t=null!==(i=e.detail)&&void 0!==i?i:void 0;this.expressionChange.emit(void 0!==t?{op:s.NOT,exp:t}:void 0)}}render(){return r("div",{key:"38ddcfda3b05cd9bc0c510f55d2712472ee2886f",class:"expression"},this.label&&r("limel-header",{key:"5b05cbb7bbd7fb1940c0d7c27b4578f6551833a8",heading:this.label}),r("limebb-lime-query-filter-expression",{key:"4057437167e652f31aa02148e511cfe9a9b26ccb",platform:this.platform,context:this.context,label:"Not",limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression.exp,onExpressionChange:this.handleExpressionChange}))}static get style(){return'@charset "UTF-8";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem;padding:1rem;border-left:0.25rem solid rgb(var(--contrast-400));background-color:rgb(var(--contrast-100))}'}},[1,"limebb-lime-query-filter-not",{platform:[16],context:[16],label:[1],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function x(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-not","limebb-lime-query-filter-comparison","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not"].forEach((e=>{switch(e){case"limebb-lime-query-filter-not":customElements.get(o(e))||customElements.define(o(e),g);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||N();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||w();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||x()}}))}const q={AND:{color:"rgb(var(--contrast-900))",iconName:"dot_circle",text:"All of",secondaryText:"True when every condition is true"},OR:{color:"rgb(var(--color-sky-default))",iconName:"centre_point",text:"Any of",secondaryText:"True when at least one condition is true"},NOT_AND:{color:"rgb(var(--color-orange-default))",iconName:"dot_circle",text:"Not all of",secondaryText:"True when at least one condition is false"},NOT_OR:{color:"rgb(var(--color-red-default))",iconName:"centre_point",text:"None of",secondaryText:"True when every condition is false"}},v=["AND","OR","NOT_AND","NOT_OR"].map((e=>({text:q[e].text,secondaryText:q[e].secondaryText,value:e,icon:{name:q[e].iconName,color:q[e].color}}))),k=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.renderChildExpression=(e,i)=>r("li",{class:"row"},r("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:e,onExpressionChange:this.handleChildExpressionChange(i)})),this.handleCombinatorChange=e=>{e.stopPropagation();const i=e.detail.value;i&&i!==p(this.expression)&&this.expressionChange.emit(function(e,i){const t=f(e),r={op:"AND"===i||"NOT_AND"===i?s.AND:s.OR,exp:[...t.exp]};return"NOT_AND"===i||"NOT_OR"===i?{op:s.NOT,exp:r}:r}(this.expression,i))},this.handleDeleteGroup=()=>{this.expressionChange.emit()},this.handleAddChildExpression=()=>{const e=y(f(this.expression),h());this.expressionChange.emit(this.wrap(e))},this.handleAddChildGroup=()=>{const e=f(this.expression),i=y(e,{op:e.op===s.AND?s.OR:s.AND,exp:[h()]});this.expressionChange.emit(this.wrap(i))},this.handleChildExpressionChange=e=>i=>{i.stopPropagation();const t=function(e,i,t){const r=[...e.exp];return t?(r[i]=t,{type:"updated",expression:{op:e.op,exp:r}}):(r.splice(i,1),0===r.length?{type:"removed",expression:void 0}:{type:"updated",expression:{op:e.op,exp:r}})}(f(this.expression),e,i.detail);this.expressionChange.emit("removed"!==t.type?this.isNegated?{op:s.NOT,exp:t.expression}:t.expression:void 0)}}render(){const e=p(this.expression),i=f(this.expression),t=v.find((i=>i.value===e));return r(l,{key:"6b7013b523d0313f053f5a057db99d23e5c35041","data-op":e,style:{"--limebb-query-filter-group-color-code":q[e].color}},r("div",{key:"03bea15e4967f91d1e46a961aba64c04b1aff530",class:"group"},r("div",{key:"26ca358c38a27e2fc24ac1b176ce338f885f2a31",class:"group-header"},r("limel-select",{key:"46403ec7c67766ac4eb08b03eaac1eafeb92c0ff",class:"combinator",label:"Match",value:t,options:v,onChange:this.handleCombinatorChange}),r("limel-icon-button",{key:"cfdb09d1656dc4a87a40c6d1cf5e5a4e0c2aeba0",class:"delete-group",icon:"trash",label:"Delete this group",onClick:this.handleDeleteGroup})),r("ul",{key:"55bb718c9ece64898a41bf95ff301bbeade8a4cd",class:"rows"},i.exp.map(this.renderChildExpression),r("limel-chip",{key:"34c653a547ce2406938eece661c5d468c84871f3",role:"listitem",class:"add-condition",text:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddChildExpression})),r("limel-chip",{key:"b27939aced4774b9b738e81d07a7ed4b040f3b77",class:"add-group",size:"small",text:"Group",icon:{name:"plus_math",title:"Add",color:"var(--group-rail-color)"},onClick:this.handleAddChildGroup})))}get isNegated(){return this.expression.op===s.NOT}wrap(e){return this.isNegated?{op:s.NOT,exp:e}:e}static get style(){return"*,*:before,*::after{box-sizing:border-box}:host(limebb-lime-query-filter-group){--group-rail-color:var(--limebb-query-filter-group-color-code);display:flex;flex-direction:column;gap:1.5rem}:host([data-op=AND]){--combinator-symbol:'&'}:host([data-op=NOT_AND]){--combinator-symbol:'- &'}:host([data-op=OR]){--combinator-symbol:'or'}:host([data-op=NOT_OR]){--combinator-symbol:'- or'}.group{position:relative;display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border-radius:0.75rem;background-color:rgb(var(--contrast-800), 0.15);transition:box-shadow 120ms ease}.group:before{content:\"\";position:absolute;top:1rem;bottom:calc(1rem + 1.75rem);left:0;width:0.125rem;transform:translateX(-50%);border-radius:1rem;background-color:var(--group-rail-color)}.group:has(limel-icon-button.delete-group:hover),.group:has(limel-icon-button.delete-group:focus-within){box-shadow:var(--shadow-error-state)}.group-header{display:flex;align-items:center;gap:0.5rem}limel-select.combinator{min-width:9rem}limel-icon-button.delete-group{margin-left:auto;opacity:0;transition:opacity 120ms ease}limel-chip.add-group{--lime-elevated-surface-background-color:transparent;--button-shadow-normal:none;isolation:isolate;position:relative;margin-right:auto}limel-chip.add-group:after{content:\"\";position:absolute;width:0.5rem;height:1.75rem;top:0;left:calc(0.5rem * -1 - 0.125rem / 2);border-width:0 0 0.125rem 0.125rem;border-color:var(--group-rail-color);border-style:solid;border-radius:0 0 0 0.5rem;transform:translateY(calc(-50% - 0.125rem / 2))}.group:hover>.group-header>limel-icon-button.delete-group,limel-icon-button.delete-group:focus-within{opacity:1}ul.rows{list-style:none;margin:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:0.5rem;row-gap:0.5rem;padding:0 0.5rem 0.5rem 0.5rem}li.row{list-style:none;position:relative}li.row:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group){flex-basis:100%;align-self:stretch}li.row+li.row:before{content:var(--combinator-symbol);color:var(--limebb-query-filter-group-color-code);font-size:0.75rem;font-weight:600;line-height:normal}li.row+li.row:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group):before{position:absolute;left:0;top:0;transform:translate(-50%, -50%)}li.row+li.row:not(:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group)){display:inline-flex;align-items:center}li.row+li.row:not(:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group)):before{margin-right:0.5rem}"}},[1,"limebb-lime-query-filter-group",{platform:[16],context:[16],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function w(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-group","limebb-lime-query-filter-comparison","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not"].forEach((e=>{switch(e){case"limebb-lime-query-filter-group":customElements.get(o(e))||customElements.define(o(e),k);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||N();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||w();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||x()}}))}const E=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),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};if("key"in this.expression)return r("limebb-lime-query-filter-comparison",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange}));const i=d(t=this.expression)?t:void 0;var t;return i?r("limebb-lime-query-filter-group",Object.assign({},e,{expression:i,onExpressionChange:this.handleExpressionChange})):this.expression.op===s.NOT?r("limebb-lime-query-filter-not",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):void 0}},[2,"limebb-lime-query-filter-expression",{platform:[16],context:[16],label:[1],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function N(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-expression","limebb-filter-chip","limebb-filter-condition-picker","limebb-lime-query-filter-comparison","limebb-lime-query-filter-comparison-editor","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-expression":customElements.get(o(e))||customElements.define(o(e),E);break;case"limebb-filter-chip":customElements.get(o(e))||n();break;case"limebb-filter-condition-picker":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(o(e))||c();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||N();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||w();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||x();break;case"limebb-lime-query-value-input":customElements.get(o(e))||b();break;case"limebb-property-selector":customElements.get(o(e))||u()}}))}export{E as L,k as a,w as b,g as c,N as d,x as e,d as i}
1
+ import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,transformTag as o,Host as l}from"@stencil/core/internal/client";import{o as s}from"./index.esm.js";import{d as n}from"./filter-chip.js";import{d as a}from"./filter-condition-picker.js";import{d as m}from"./lime-query-filter-comparison.js";import{d as c}from"./lime-query-filter-comparison-editor.js";import{d as b}from"./lime-query-value-input.js";import{d as u}from"./property-selector.js";function p(e){return e.op===s.NOT?e.exp.op===s.AND?"NOT_AND":"NOT_OR":e.op===s.AND?"AND":"OR"}function f(e){return e.op===s.NOT?e.exp:e}function d(e){if(e.op===s.AND||e.op===s.OR)return!0;if(e.op===s.NOT){const i=e.exp;return i.op===s.AND||i.op===s.OR}return!1}function h(){return{key:"",op:s.EQUALS,exp:""}}function y(e,i){return{op:e.op,exp:[...e.exp,i]}}const g=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.handleExpressionChange=e=>{var i;e.stopPropagation();const t=null!==(i=e.detail)&&void 0!==i?i:void 0;this.expressionChange.emit(void 0!==t?{op:s.NOT,exp:t}:void 0)}}render(){return r("div",{key:"38ddcfda3b05cd9bc0c510f55d2712472ee2886f",class:"expression"},this.label&&r("limel-header",{key:"5b05cbb7bbd7fb1940c0d7c27b4578f6551833a8",heading:this.label}),r("limebb-lime-query-filter-expression",{key:"4057437167e652f31aa02148e511cfe9a9b26ccb",platform:this.platform,context:this.context,label:"Not",limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression.exp,onExpressionChange:this.handleExpressionChange}))}static get style(){return'@charset "UTF-8";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem;padding:1rem;border-left:0.25rem solid rgb(var(--contrast-400));background-color:rgb(var(--contrast-100))}'}},[1,"limebb-lime-query-filter-not",{platform:[16],context:[16],label:[1],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function x(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-not","limebb-lime-query-filter-comparison","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not"].forEach((e=>{switch(e){case"limebb-lime-query-filter-not":customElements.get(o(e))||customElements.define(o(e),g);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||N();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||w();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||x()}}))}const q={AND:{color:"rgb(var(--contrast-900))",iconName:"dot_circle",text:"All of",secondaryText:"True when every condition is true"},OR:{color:"rgb(var(--color-sky-default))",iconName:"centre_point",text:"Any of",secondaryText:"True when at least one condition is true"},NOT_AND:{color:"rgb(var(--color-orange-default))",iconName:"dot_circle",text:"Not all of",secondaryText:"True when at least one condition is false"},NOT_OR:{color:"rgb(var(--color-red-default))",iconName:"centre_point",text:"None of",secondaryText:"True when every condition is false"}},v=["AND","OR","NOT_AND","NOT_OR"].map((e=>({text:q[e].text,secondaryText:q[e].secondaryText,value:e,icon:{name:q[e].iconName,color:q[e].color}}))),k=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expressionChange=t(this,"expressionChange",7),this.renderChildExpression=(e,i)=>r("li",{class:"row"},r("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:e,onExpressionChange:this.handleChildExpressionChange(i)})),this.handleCombinatorChange=e=>{e.stopPropagation();const i=e.detail.value;i&&i!==p(this.expression)&&this.expressionChange.emit(function(e,i){const t=f(e),r={op:"AND"===i||"NOT_AND"===i?s.AND:s.OR,exp:[...t.exp]};return"NOT_AND"===i||"NOT_OR"===i?{op:s.NOT,exp:r}:r}(this.expression,i))},this.handleDeleteGroup=()=>{this.expressionChange.emit()},this.handleAddChildExpression=()=>{const e=y(f(this.expression),h());this.expressionChange.emit(this.wrap(e))},this.handleAddChildGroup=()=>{const e=f(this.expression),i=y(e,{op:e.op===s.AND?s.OR:s.AND,exp:[h()]});this.expressionChange.emit(this.wrap(i))},this.handleChildExpressionChange=e=>i=>{i.stopPropagation();const t=function(e,i,t){const r=[...e.exp];return t?(r[i]=t,{type:"updated",expression:{op:e.op,exp:r}}):(r.splice(i,1),0===r.length?{type:"removed",expression:void 0}:{type:"updated",expression:{op:e.op,exp:r}})}(f(this.expression),e,i.detail);this.expressionChange.emit("removed"!==t.type?this.isNegated?{op:s.NOT,exp:t.expression}:t.expression:void 0)}}render(){const e=p(this.expression),i=f(this.expression),t=v.find((i=>i.value===e));return r(l,{key:"6b7013b523d0313f053f5a057db99d23e5c35041","data-op":e,style:{"--limebb-query-filter-group-color-code":q[e].color}},r("div",{key:"03bea15e4967f91d1e46a961aba64c04b1aff530",class:"group"},r("div",{key:"26ca358c38a27e2fc24ac1b176ce338f885f2a31",class:"group-header"},r("limel-select",{key:"46403ec7c67766ac4eb08b03eaac1eafeb92c0ff",class:"combinator",label:"Match",value:t,options:v,onChange:this.handleCombinatorChange}),r("limel-icon-button",{key:"cfdb09d1656dc4a87a40c6d1cf5e5a4e0c2aeba0",class:"delete-group",icon:"trash",label:"Delete this group",onClick:this.handleDeleteGroup})),r("ul",{key:"55bb718c9ece64898a41bf95ff301bbeade8a4cd",class:"rows"},i.exp.map(this.renderChildExpression),r("limel-chip",{key:"34c653a547ce2406938eece661c5d468c84871f3",role:"listitem",class:"add-condition",text:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddChildExpression})),r("limel-chip",{key:"b27939aced4774b9b738e81d07a7ed4b040f3b77",class:"add-group",size:"small",text:"Group",icon:{name:"plus_math",title:"Add",color:"var(--group-rail-color)"},onClick:this.handleAddChildGroup})))}get isNegated(){return this.expression.op===s.NOT}wrap(e){return this.isNegated?{op:s.NOT,exp:e}:e}static get style(){return"*,*:before,*::after{box-sizing:border-box}:host(limebb-lime-query-filter-group){--group-rail-color:var(--limebb-query-filter-group-color-code);display:flex;flex-direction:column;gap:1.5rem}:host([data-op=AND]){--combinator-symbol:'&'}:host([data-op=NOT_AND]){--combinator-symbol:'- &'}:host([data-op=OR]){--combinator-symbol:'or'}:host([data-op=NOT_OR]){--combinator-symbol:'- or'}.group{position:relative;display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border-radius:0.75rem;background-color:rgb(var(--contrast-800), 0.15);transition:box-shadow 120ms ease}.group:before{content:\"\";position:absolute;top:1rem;bottom:calc(1rem + 1.75rem);left:0;width:0.125rem;transform:translateX(-50%);border-radius:1rem;background-color:var(--group-rail-color)}.group:has(limel-icon-button.delete-group:hover),.group:has(limel-icon-button.delete-group:focus-within){box-shadow:var(--shadow-error-state)}.group-header{display:flex;align-items:center;gap:0.5rem}limel-select.combinator{min-width:9rem}limel-icon-button.delete-group{margin-left:auto;opacity:0;transition:opacity 120ms ease}limel-chip.add-group{--lime-elevated-surface-background-color:transparent;--button-shadow-normal:none;isolation:isolate;position:relative;margin-right:auto}limel-chip.add-group:after{content:\"\";position:absolute;width:0.5rem;height:1.75rem;top:0;left:calc(0.5rem * -1 - 0.125rem / 2);border-width:0 0 0.125rem 0.125rem;border-color:var(--group-rail-color);border-style:solid;border-radius:0 0 0 0.5rem;transform:translateY(calc(-50% - 0.125rem / 2))}.group:hover>.group-header>limel-icon-button.delete-group,limel-icon-button.delete-group:focus-within{opacity:1}ul.rows{list-style:none;margin:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:0.5rem;row-gap:0.5rem;padding:0 0.5rem 0.5rem 0.5rem}li.row{list-style:none;position:relative}li.row:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group){flex-basis:100%;align-self:stretch}li.row+li.row:before{content:var(--combinator-symbol);color:var(--limebb-query-filter-group-color-code);font-size:0.75rem;font-weight:600;line-height:normal}li.row+li.row:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group):before{position:absolute;left:0;top:0;transform:translate(-50%, -50%)}li.row+li.row:not(:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group)){display:inline-flex;align-items:center}li.row+li.row:not(:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group)):before{margin-right:0.5rem}"}},[1,"limebb-lime-query-filter-group",{platform:[16],context:[16],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function w(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-group","limebb-lime-query-filter-comparison","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not"].forEach((e=>{switch(e){case"limebb-lime-query-filter-group":customElements.get(o(e))||customElements.define(o(e),k);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||N();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||w();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||x()}}))}const E=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),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};if("key"in this.expression)return r("limebb-lime-query-filter-comparison",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange}));const i=d(t=this.expression)?t:void 0;var t;return i?r("limebb-lime-query-filter-group",Object.assign({},e,{expression:i,onExpressionChange:this.handleExpressionChange})):this.expression.op===s.NOT?r("limebb-lime-query-filter-not",Object.assign({},e,{expression:this.expression,onExpressionChange:this.handleExpressionChange})):void 0}},[2,"limebb-lime-query-filter-expression",{platform:[16],context:[16],label:[1],limetype:[1],activeLimetype:[1,"active-limetype"],expression:[16]}]);function N(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-expression","limebb-filter-chip","limebb-filter-condition-picker","limebb-lime-query-filter-comparison","limebb-lime-query-filter-comparison-editor","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not","limebb-lime-query-value-input","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-filter-expression":customElements.get(o(e))||customElements.define(o(e),E);break;case"limebb-filter-chip":customElements.get(o(e))||n();break;case"limebb-filter-condition-picker":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(o(e))||c();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||N();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||w();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||x();break;case"limebb-lime-query-value-input":customElements.get(o(e))||b();break;case"limebb-property-selector":customElements.get(o(e))||u()}}))}export{E as L,k as a,w as b,g as c,N as d,x as e,d as i}
@@ -1 +1 @@
1
- import{n as r}from"./index.esm.js";import{g as t,a as o,v as e}from"./property-selector.js";const n=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),i=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,s=/^\$me(\.\w+)*$/;function a(r,o,e){if(function(r){return"string"==typeof r&&(n.has(r)||i.test(r)||s.test(r))}(r))return{valid:!0};if("string"!=typeof r||!r.startsWith("%activeObject%"))return{valid:!0};if(!o)return{valid:!0};const a=r.replace(/^%activeObject%\.?/,"");if(!a)return{valid:!0};try{return t(e,o,a)?{valid:!0}:{valid:!1,error:`Property path '${a}' does not exist on limetype '${o}'`}}catch(r){return{valid:!1,error:`Invalid placeholder path: ${r.message}`}}}function u(r,t,o=!0){const e=Object.keys(r),n=[];if(o){const r=e.filter((r=>r.startsWith("#")&&"#description"!==r));r.length>0&&n.push(`Property '${t}' contains # properties not supported in visual mode: ${r.join(", ")}`)}return{keys:e.filter((r=>"_alias"!==r&&!r.startsWith("#"))),visualModeLimitations:n}}function l(r,t,o,e,n,i=!0){if(""===r){if(i&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=o[r];if(!s)throw new Error(`Property '${r}' does not exist on limetype '${n}'`);return s.relation?function(r,t,o,e,n=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${r}' must be null or an object`);const i=t,{keys:s,visualModeLimitations:a}=u(i,r,n);if(0===s.length)return a;const l=e.relation.getLimetype();if(!l)throw new Error(`Could not determine related limetype for property '${r}'`);const f={};for(const r of s)f[r]=i[r];const p=c(f,o,l.name,n);return[...a,...p]}(r,t,e,s,i):function(r,t,o=!0){if(null===t)return[];if("object"==typeof t){const{keys:e,visualModeLimitations:n}=u(t,r,o);if(0===e.length)return n;throw new Error(`Non-relation property '${r}' cannot have nested properties other than _alias or # properties (got: ${e.join(", ")})`)}throw new Error(`Non-relation property '${r}' must be null or an object (got ${typeof t})`)}(r,t,i)}function c(r,t,e,n=!0){const i=t[e];if(!i)throw new Error(`Unknown limetype: ${e}`);const s=o(i),a=[];for(const[o,i]of Object.entries(r)){if(o.startsWith("#"))continue;const r=l(o,i,s,t,e,n);a.push(...r)}return a}function f(t,o,n,i,s=!0){t&&("key"in t?function(t,o,n,i){if(!Object.values(r).includes(t.op))throw new Error(`Unsupported filter operator: ${t.op}`);const s=function(r,t,o,n){if(!r)return{valid:!1,error:"Filter key cannot be empty"};if(r.startsWith("%activeObject%")){const o=a(r,n,t);if(!o.valid)return o;const i=r.replace(/^%activeObject%\.?/,"");if(i&&n){const{error:r}=e(t,n,i);if(r)return{valid:!1,error:r}}return o}const{error:i}=e(t,o,r);return i?{valid:!1,error:i}:{valid:!0}}(t.key,n,i,o);if(!s.valid)throw new Error(`Invalid filter key '${t.key}': ${s.error}`);const u=a(t.exp,o,n);if(!u.valid)throw new Error(`Invalid placeholder in filter '${t.key}': ${u.error}`)}(t,o,n,i):"exp"in t&&function(t,o,e,n,i){if(t.op!==r.AND&&t.op!==r.OR&&t.op!==r.NOT)throw new Error(`Unsupported group operator: ${t.op}`);if(t.op===r.NOT)f(t.exp,o,e,n,i);else if(t.op===r.AND||t.op===r.OR){const r=t.exp;for(const t of r)f(t,o,e,n,i)}}(t,o,n,i,s))}function p(r,o,e,n){const i=[],s=function(r,t){return"object"!=typeof r||null===r?`orderBy[${t}] must be an object`:null}(r,o);if(s)return[s];const a=Object.keys(r),u=function(r,t){return 0===r.length?`orderBy[${t}] must have a property path`:r.length>1?`orderBy[${t}] must have exactly one property, got ${r.length}`:null}(a,o);if(u)return[u];const l=a[0],c=function(r,t){return"ASC"!==r&&"DESC"!==r?`orderBy[${t}]: direction must be 'ASC' or 'DESC', got '${r}'`:null}(r[l],o);c&&i.push(c);const f=function(r,o,e,n){if(!r||""===r)return null;return t(o,e,r)?null:`orderBy[${n}]: property path '${r}' does not exist on limetype '${e}'`}(l,e,n,o);return f&&i.push(f),i}function d(r,t,o,e){const n=[],i=[];try{const n=function(r,t,o,e=!0){const n=[];if(e&&r.aggregates&&n.push("responseFormat.aggregates is not yet supported in visual mode"),r.object){const i=c(r.object,t,o,e);n.push(...i)}return n}(r,t,o,e);i.push(...n)}catch(r){n.push(`Invalid responseFormat: ${r.message}`)}return{errors:n,limitations:i}}function y(r,t,o,e=!0){if(!r)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};const n=[],i=[];if(r.limetype&&!t[r.limetype]&&n.push(`Unknown limetype: ${r.limetype}`),void 0===r.offset||r.orderBy||n.push("offset requires orderBy to be specified"),r.orderBy){const o=function(r,t,o){const e=[];if(!Array.isArray(r))return e.push("orderBy must be an array"),e;if(!o||!t[o])return e;for(const[n,i]of r.entries()){const r=p(i,n,t,o);e.push(...r)}return e}(r.orderBy,t,r.limetype);n.push(...o)}if(e&&void 0!==r.offset&&i.push("offset is not yet supported in visual mode"),r.filter){const{errors:s,limitations:a}=function(r,t,o,e,n){const i=[],s=[];try{f(r,t,o,e,n)}catch(r){const t=r.message;t.includes("Invalid filter key")||t.includes("Cannot filter on many-relation")?(i.push(`Invalid filter: ${t}`),s.push(t)):i.push(`Invalid filter: ${t}`)}return{errors:i,limitations:s}}(r.filter,o,t,r.limetype,e);n.push(...s),i.push(...a)}if(r.responseFormat){const{errors:o,limitations:s}=d(r.responseFormat,t,r.limetype,e);n.push(...o),i.push(...s)}return{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}function v(r,t,o,e=!0){const n=[],i=[];if(!t[o])return n.push(`Unknown limetype: ${o}`),{valid:!1,visualModeSupported:!1,validationErrors:n,visualModeLimitations:i};const{errors:s,limitations:a}=d(r,t,o,e);return n.push(...s),i.push(...a),{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}export{y as i,v}
1
+ import{o as r}from"./index.esm.js";import{g as t,a as o,v as e}from"./property-selector.js";const n=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),i=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,s=/^\$me(\.\w+)*$/;function a(r,o,e){if(function(r){return"string"==typeof r&&(n.has(r)||i.test(r)||s.test(r))}(r))return{valid:!0};if("string"!=typeof r||!r.startsWith("%activeObject%"))return{valid:!0};if(!o)return{valid:!0};const a=r.replace(/^%activeObject%\.?/,"");if(!a)return{valid:!0};try{return t(e,o,a)?{valid:!0}:{valid:!1,error:`Property path '${a}' does not exist on limetype '${o}'`}}catch(r){return{valid:!1,error:`Invalid placeholder path: ${r.message}`}}}function u(r,t,o=!0){const e=Object.keys(r),n=[];if(o){const r=e.filter((r=>r.startsWith("#")&&"#description"!==r));r.length>0&&n.push(`Property '${t}' contains # properties not supported in visual mode: ${r.join(", ")}`)}return{keys:e.filter((r=>"_alias"!==r&&!r.startsWith("#"))),visualModeLimitations:n}}function l(r,t,o,e,n,i=!0){if(""===r){if(i&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=o[r];if(!s)throw new Error(`Property '${r}' does not exist on limetype '${n}'`);return s.relation?function(r,t,o,e,n=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${r}' must be null or an object`);const i=t,{keys:s,visualModeLimitations:a}=u(i,r,n);if(0===s.length)return a;const l=e.relation.getLimetype();if(!l)throw new Error(`Could not determine related limetype for property '${r}'`);const f={};for(const r of s)f[r]=i[r];const p=c(f,o,l.name,n);return[...a,...p]}(r,t,e,s,i):function(r,t,o=!0){if(null===t)return[];if("object"==typeof t){const{keys:e,visualModeLimitations:n}=u(t,r,o);if(0===e.length)return n;throw new Error(`Non-relation property '${r}' cannot have nested properties other than _alias or # properties (got: ${e.join(", ")})`)}throw new Error(`Non-relation property '${r}' must be null or an object (got ${typeof t})`)}(r,t,i)}function c(r,t,e,n=!0){const i=t[e];if(!i)throw new Error(`Unknown limetype: ${e}`);const s=o(i),a=[];for(const[o,i]of Object.entries(r)){if(o.startsWith("#"))continue;const r=l(o,i,s,t,e,n);a.push(...r)}return a}function f(t,o,n,i,s=!0){t&&("key"in t?function(t,o,n,i){if(!Object.values(r).includes(t.op))throw new Error(`Unsupported filter operator: ${t.op}`);const s=function(r,t,o,n){if(!r)return{valid:!1,error:"Filter key cannot be empty"};if(r.startsWith("%activeObject%")){const o=a(r,n,t);if(!o.valid)return o;const i=r.replace(/^%activeObject%\.?/,"");if(i&&n){const{error:r}=e(t,n,i);if(r)return{valid:!1,error:r}}return o}const{error:i}=e(t,o,r);return i?{valid:!1,error:i}:{valid:!0}}(t.key,n,i,o);if(!s.valid)throw new Error(`Invalid filter key '${t.key}': ${s.error}`);const u=a(t.exp,o,n);if(!u.valid)throw new Error(`Invalid placeholder in filter '${t.key}': ${u.error}`)}(t,o,n,i):"exp"in t&&function(t,o,e,n,i){if(t.op!==r.AND&&t.op!==r.OR&&t.op!==r.NOT)throw new Error(`Unsupported group operator: ${t.op}`);if(t.op===r.NOT)f(t.exp,o,e,n,i);else if(t.op===r.AND||t.op===r.OR){const r=t.exp;for(const t of r)f(t,o,e,n,i)}}(t,o,n,i,s))}function p(r,o,e,n){const i=[],s=function(r,t){return"object"!=typeof r||null===r?`orderBy[${t}] must be an object`:null}(r,o);if(s)return[s];const a=Object.keys(r),u=function(r,t){return 0===r.length?`orderBy[${t}] must have a property path`:r.length>1?`orderBy[${t}] must have exactly one property, got ${r.length}`:null}(a,o);if(u)return[u];const l=a[0],c=function(r,t){return"ASC"!==r&&"DESC"!==r?`orderBy[${t}]: direction must be 'ASC' or 'DESC', got '${r}'`:null}(r[l],o);c&&i.push(c);const f=function(r,o,e,n){if(!r||""===r)return null;return t(o,e,r)?null:`orderBy[${n}]: property path '${r}' does not exist on limetype '${e}'`}(l,e,n,o);return f&&i.push(f),i}function d(r,t,o,e){const n=[],i=[];try{const n=function(r,t,o,e=!0){const n=[];if(e&&r.aggregates&&n.push("responseFormat.aggregates is not yet supported in visual mode"),r.object){const i=c(r.object,t,o,e);n.push(...i)}return n}(r,t,o,e);i.push(...n)}catch(r){n.push(`Invalid responseFormat: ${r.message}`)}return{errors:n,limitations:i}}function y(r,t,o,e=!0){if(!r)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};const n=[],i=[];if(r.limetype&&!t[r.limetype]&&n.push(`Unknown limetype: ${r.limetype}`),void 0===r.offset||r.orderBy||n.push("offset requires orderBy to be specified"),r.orderBy){const o=function(r,t,o){const e=[];if(!Array.isArray(r))return e.push("orderBy must be an array"),e;if(!o||!t[o])return e;for(const[n,i]of r.entries()){const r=p(i,n,t,o);e.push(...r)}return e}(r.orderBy,t,r.limetype);n.push(...o)}if(e&&void 0!==r.offset&&i.push("offset is not yet supported in visual mode"),r.filter){const{errors:s,limitations:a}=function(r,t,o,e,n){const i=[],s=[];try{f(r,t,o,e,n)}catch(r){const t=r.message;t.includes("Invalid filter key")||t.includes("Cannot filter on many-relation")?(i.push(`Invalid filter: ${t}`),s.push(t)):i.push(`Invalid filter: ${t}`)}return{errors:i,limitations:s}}(r.filter,o,t,r.limetype,e);n.push(...s),i.push(...a)}if(r.responseFormat){const{errors:o,limitations:s}=d(r.responseFormat,t,r.limetype,e);n.push(...o),i.push(...s)}return{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}function v(r,t,o,e=!0){const n=[],i=[];if(!t[o])return n.push(`Unknown limetype: ${o}`),{valid:!1,visualModeSupported:!1,validationErrors:n,visualModeLimitations:i};const{errors:s,limitations:a}=d(r,t,o,e);return n.push(...s),i.push(...a),{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}export{y as i,v}