@limetech/lime-crm-building-blocks 1.139.0 → 1.139.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 (243) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/{filter-group-logic-BoF3Z5_P.js → filter-group-logic-BPpM2NqX.js} +1 -1
  3. package/dist/cjs/{index-B9Bi9dpZ.js → index-BrWc7h0p.js} +1 -1
  4. package/dist/cjs/{index.esm-8LHVbTD0.js → index.esm-Se3EtD3m.js} +2 -2
  5. package/dist/cjs/lime-crm-building-blocks.cjs.js +2 -2
  6. package/dist/cjs/{lime-query-validation-q-sH7XSs.js → lime-query-validation-CJC3mtnT.js} +1 -1
  7. package/dist/cjs/limebb-alert-dialog.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
  9. package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +3 -3
  10. package/dist/cjs/limebb-chat-list.cjs.entry.js +2 -2
  11. package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-component-config.cjs.entry.js +3 -3
  14. package/dist/cjs/limebb-component-picker.cjs.entry.js +2 -2
  15. package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
  16. package/dist/cjs/limebb-currency-picker.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
  18. package/dist/cjs/limebb-data-cells.cjs.entry.js +7 -4
  19. package/dist/cjs/limebb-date-picker.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
  21. package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
  22. package/dist/cjs/limebb-document-item.cjs.entry.js +1 -1
  23. package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
  24. package/dist/cjs/limebb-empty-state.cjs.entry.js +1 -1
  25. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  26. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +3 -3
  27. package/dist/cjs/limebb-feed.cjs.entry.js +90 -33
  28. package/dist/cjs/limebb-filter-chip_5.cjs.entry.js +5 -5
  29. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  30. package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +1 -1
  31. package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +1 -1
  32. package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +1 -1
  33. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  34. package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +1 -1
  35. package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +1 -1
  36. package/dist/cjs/limebb-info-tile.cjs.entry.js +3 -3
  37. package/dist/cjs/limebb-kanban-group.cjs.entry.js +3 -3
  38. package/dist/cjs/limebb-kanban-item.cjs.entry.js +3 -3
  39. package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
  40. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
  41. package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +3 -3
  42. package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +3 -3
  43. package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +3 -3
  44. package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +1 -1
  45. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
  46. package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +2 -2
  47. package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
  48. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +1 -1
  49. package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
  50. package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
  51. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +1 -1
  52. package/dist/cjs/limebb-mention.cjs.entry.js +2 -2
  53. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +1 -1
  54. package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
  55. package/dist/cjs/limebb-notification-list.cjs.entry.js +2 -2
  56. package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
  57. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +3 -3
  58. package/dist/cjs/limebb-property-selector.cjs.entry.js +3 -3
  59. package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
  60. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +3 -3
  61. package/dist/cjs/limebb-rule-editor.cjs.entry.js +2 -2
  62. package/dist/cjs/limebb-rule-gate.cjs.entry.js +2 -2
  63. package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +1 -1
  64. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
  65. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +3 -3
  66. package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +3 -3
  67. package/dist/cjs/{limetype-CK5MVyW0.js → limetype-CmgP0nbZ.js} +1 -1
  68. package/dist/cjs/loader.cjs.js +1 -1
  69. package/dist/cjs/{web-component-template-7B9wK2bO.js → web-component-template-C9hvjrMm.js} +1 -1
  70. package/dist/collection/collection-manifest.json +1 -1
  71. package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.css +7 -5
  72. package/dist/collection/components/data-cells/data-cells.js +5 -2
  73. package/dist/collection/components/feed/feed-item/feed-timeline-item.css +32 -24
  74. package/dist/collection/components/feed/feed.js +1 -1
  75. package/dist/collection/components/filter-chip/filter-chip.css +19 -17
  76. package/dist/collection/components/filter-chip/filter-chip.js +1 -1
  77. package/dist/collection/components/kanban/kanban-group/kanban-group.css +14 -12
  78. package/dist/collection/components/kanban/kanban-item/kanban-item.css +11 -7
  79. package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +4 -4
  80. package/dist/collection/components/lime-query-builder/response-format/response-format-item.css +8 -6
  81. package/dist/collection/components/percentage-visualizer/percentage-visualizer.css +7 -7
  82. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +3 -3
  83. package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
  84. package/dist/collection/components/trend-indicator/trend-indicator.css +7 -7
  85. package/dist/components/chat-icon-list.js +1 -1
  86. package/dist/components/feed-timeline-item.js +1 -1
  87. package/dist/components/filter-chip.js +1 -1
  88. package/dist/components/kanban-group.js +1 -1
  89. package/dist/components/kanban-item.js +1 -1
  90. package/dist/components/lime-query-filter-expression.js +1 -1
  91. package/dist/components/limebb-data-cells.js +1 -1
  92. package/dist/components/limebb-feed.js +1 -1
  93. package/dist/components/limebb-trend-indicator.js +1 -1
  94. package/dist/components/limebb-value-comparison-editor.js +1 -1
  95. package/dist/components/percentage-visualizer.js +1 -1
  96. package/dist/components/response-format-item.js +1 -1
  97. package/dist/esm/{filter-group-logic-CRznE2g-.js → filter-group-logic-BMY_GEsX.js} +1 -1
  98. package/dist/esm/{index-LEJjPpY0.js → index-DwHAn7LS.js} +1 -1
  99. package/dist/esm/{index.esm-B7wJLMmp.js → index.esm-C-L5fkQs.js} +1 -1
  100. package/dist/esm/lime-crm-building-blocks.js +3 -3
  101. package/dist/esm/{lime-query-validation-Dds_iPHd.js → lime-query-validation-BwvluehW.js} +1 -1
  102. package/dist/esm/limebb-alert-dialog.entry.js +1 -1
  103. package/dist/esm/limebb-browser.entry.js +2 -2
  104. package/dist/esm/limebb-chat-icon-list_3.entry.js +3 -3
  105. package/dist/esm/limebb-chat-list.entry.js +2 -2
  106. package/dist/esm/limebb-color-palette-picker.entry.js +1 -1
  107. package/dist/esm/limebb-color-palette-swatches.entry.js +1 -1
  108. package/dist/esm/limebb-component-config.entry.js +3 -3
  109. package/dist/esm/limebb-component-picker.entry.js +2 -2
  110. package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
  111. package/dist/esm/limebb-currency-picker.entry.js +2 -2
  112. package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
  113. package/dist/esm/limebb-data-cells.entry.js +7 -4
  114. package/dist/esm/limebb-date-picker.entry.js +2 -2
  115. package/dist/esm/limebb-date-range.entry.js +1 -1
  116. package/dist/esm/limebb-document-chips.entry.js +1 -1
  117. package/dist/esm/limebb-document-item.entry.js +1 -1
  118. package/dist/esm/limebb-document-picker.entry.js +1 -1
  119. package/dist/esm/limebb-empty-state.entry.js +1 -1
  120. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  121. package/dist/esm/limebb-feed-timeline-item.entry.js +3 -3
  122. package/dist/esm/limebb-feed.entry.js +90 -33
  123. package/dist/esm/limebb-filter-chip_5.entry.js +5 -5
  124. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  125. package/dist/esm/limebb-info-tile-currency-format.entry.js +1 -1
  126. package/dist/esm/limebb-info-tile-date-format.entry.js +1 -1
  127. package/dist/esm/limebb-info-tile-decimal-format.entry.js +1 -1
  128. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  129. package/dist/esm/limebb-info-tile-relative-date-format.entry.js +1 -1
  130. package/dist/esm/limebb-info-tile-unit-format.entry.js +1 -1
  131. package/dist/esm/limebb-info-tile.entry.js +3 -3
  132. package/dist/esm/limebb-kanban-group.entry.js +3 -3
  133. package/dist/esm/limebb-kanban-item.entry.js +3 -3
  134. package/dist/esm/limebb-kanban.entry.js +1 -1
  135. package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
  136. package/dist/esm/limebb-lime-query-filter-builder.entry.js +3 -3
  137. package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +3 -3
  138. package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +3 -3
  139. package/dist/esm/limebb-lime-query-order-by-item.entry.js +1 -1
  140. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
  141. package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +2 -2
  142. package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
  143. package/dist/esm/limebb-live-docs-info.entry.js +1 -1
  144. package/dist/esm/limebb-loader.entry.js +2 -2
  145. package/dist/esm/limebb-locale-picker.entry.js +2 -2
  146. package/dist/esm/limebb-mention-group-counter.entry.js +1 -1
  147. package/dist/esm/limebb-mention.entry.js +2 -2
  148. package/dist/esm/limebb-navigation-button_2.entry.js +1 -1
  149. package/dist/esm/limebb-notification-item.entry.js +2 -2
  150. package/dist/esm/limebb-notification-list.entry.js +2 -2
  151. package/dist/esm/limebb-object-chip.entry.js +3 -3
  152. package/dist/esm/limebb-percentage-visualizer.entry.js +3 -3
  153. package/dist/esm/limebb-property-selector.entry.js +3 -3
  154. package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
  155. package/dist/esm/limebb-rule-chip-popover.entry.js +3 -3
  156. package/dist/esm/limebb-rule-editor.entry.js +2 -2
  157. package/dist/esm/limebb-rule-gate.entry.js +2 -2
  158. package/dist/esm/limebb-text-editor-picker.entry.js +1 -1
  159. package/dist/esm/limebb-text-editor.entry.js +3 -3
  160. package/dist/esm/limebb-trend-indicator.entry.js +3 -3
  161. package/dist/esm/limebb-value-comparison-editor.entry.js +3 -3
  162. package/dist/esm/{limetype-DH77rgZZ.js → limetype-D4ZaWZ-3.js} +1 -1
  163. package/dist/esm/loader.js +2 -2
  164. package/dist/esm/{web-component-template-CXFK-BYa.js → web-component-template-CAI6pXCH.js} +1 -1
  165. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  166. package/dist/lime-crm-building-blocks/{p-bb825e68.entry.js → p-00ca6522.entry.js} +1 -1
  167. package/dist/lime-crm-building-blocks/p-01f84b0c.entry.js +1 -0
  168. package/dist/lime-crm-building-blocks/{p-7597eb85.entry.js → p-0253fd45.entry.js} +1 -1
  169. package/dist/lime-crm-building-blocks/{p-ae9780ff.entry.js → p-0579d006.entry.js} +1 -1
  170. package/dist/lime-crm-building-blocks/{p-47912c60.entry.js → p-0843b50b.entry.js} +1 -1
  171. package/dist/lime-crm-building-blocks/{p-4f398108.entry.js → p-0c4f6220.entry.js} +1 -1
  172. package/dist/lime-crm-building-blocks/{p-0b13889c.entry.js → p-0f821315.entry.js} +1 -1
  173. package/dist/lime-crm-building-blocks/{p-6e298dd5.entry.js → p-0f9a680c.entry.js} +1 -1
  174. package/dist/lime-crm-building-blocks/{p-3c6fb9d1.entry.js → p-13a35953.entry.js} +1 -1
  175. package/dist/lime-crm-building-blocks/{p-1cd45d56.entry.js → p-1cd148e2.entry.js} +1 -1
  176. package/dist/lime-crm-building-blocks/{p-2caee700.entry.js → p-29758303.entry.js} +1 -1
  177. package/dist/lime-crm-building-blocks/{p-382ab76b.entry.js → p-2e48601d.entry.js} +1 -1
  178. package/dist/lime-crm-building-blocks/p-302e6e3e.entry.js +1 -0
  179. package/dist/lime-crm-building-blocks/{p-db9ed6ed.entry.js → p-354257f4.entry.js} +1 -1
  180. package/dist/lime-crm-building-blocks/{p-37c0a17f.entry.js → p-39009b47.entry.js} +1 -1
  181. package/dist/lime-crm-building-blocks/{p-5960143c.entry.js → p-3bf316f9.entry.js} +1 -1
  182. package/dist/lime-crm-building-blocks/{p-4bdf9821.entry.js → p-3fc9866a.entry.js} +1 -1
  183. package/dist/lime-crm-building-blocks/{p-e031c267.entry.js → p-41ddbdde.entry.js} +1 -1
  184. package/dist/lime-crm-building-blocks/{p-e4ccc690.entry.js → p-46dc34a6.entry.js} +1 -1
  185. package/dist/lime-crm-building-blocks/{p-46f2667e.entry.js → p-558915e4.entry.js} +1 -1
  186. package/dist/lime-crm-building-blocks/p-5b1ccfe1.entry.js +1 -0
  187. package/dist/lime-crm-building-blocks/p-5b819d10.entry.js +1 -0
  188. package/dist/lime-crm-building-blocks/{p-27f700c9.entry.js → p-5bc41701.entry.js} +1 -1
  189. package/dist/lime-crm-building-blocks/{p-94cee387.entry.js → p-69a3038b.entry.js} +1 -1
  190. package/dist/lime-crm-building-blocks/{p-fdd63bcc.entry.js → p-6cdefdc9.entry.js} +1 -1
  191. package/dist/lime-crm-building-blocks/{p-b6a8ad7a.entry.js → p-6f4e2590.entry.js} +1 -1
  192. package/dist/lime-crm-building-blocks/p-752742f8.entry.js +1 -0
  193. package/dist/lime-crm-building-blocks/{p-8f7c054d.entry.js → p-7a158104.entry.js} +1 -1
  194. package/dist/lime-crm-building-blocks/{p-6db41866.entry.js → p-80e04b27.entry.js} +1 -1
  195. package/dist/lime-crm-building-blocks/{p-9b411072.entry.js → p-817e2952.entry.js} +1 -1
  196. package/dist/lime-crm-building-blocks/{p-bec2bcef.entry.js → p-89f120f8.entry.js} +1 -1
  197. package/dist/lime-crm-building-blocks/p-8d592755.entry.js +1 -0
  198. package/dist/lime-crm-building-blocks/{p-2cac740d.entry.js → p-9033acb5.entry.js} +1 -1
  199. package/dist/lime-crm-building-blocks/{p-f93a749f.entry.js → p-92679e20.entry.js} +1 -1
  200. package/dist/lime-crm-building-blocks/{p-357c5a54.entry.js → p-927e446d.entry.js} +1 -1
  201. package/dist/lime-crm-building-blocks/{p-e4aeb4fe.entry.js → p-96ea4550.entry.js} +1 -1
  202. package/dist/lime-crm-building-blocks/{p-639032ba.entry.js → p-97839894.entry.js} +1 -1
  203. package/dist/lime-crm-building-blocks/{p-05f8b18e.entry.js → p-994296b0.entry.js} +1 -1
  204. package/dist/lime-crm-building-blocks/p-B-WBKAaa.js +1 -0
  205. package/dist/lime-crm-building-blocks/p-BjXRsiQr.js +1 -0
  206. package/dist/lime-crm-building-blocks/{p-Dtg8KAQt.js → p-Bkno2RtN.js} +1 -1
  207. package/dist/lime-crm-building-blocks/{p-DM0fyjo-.js → p-CI6VHE0w.js} +1 -1
  208. package/dist/lime-crm-building-blocks/{p-BxpMk4Zk.js → p-DI3GWqfD.js} +1 -1
  209. package/dist/lime-crm-building-blocks/{p-2091d4c8.entry.js → p-a6e9cefe.entry.js} +1 -1
  210. package/dist/lime-crm-building-blocks/{p-e2503bad.entry.js → p-b0b8ce73.entry.js} +1 -1
  211. package/dist/lime-crm-building-blocks/{p-d5ad0cd9.entry.js → p-b0ec4121.entry.js} +1 -1
  212. package/dist/lime-crm-building-blocks/p-b7e5a10e.entry.js +1 -0
  213. package/dist/lime-crm-building-blocks/{p-c90ef898.entry.js → p-bd0a30d7.entry.js} +1 -1
  214. package/dist/lime-crm-building-blocks/{p-7dc9923f.entry.js → p-bde3e779.entry.js} +1 -1
  215. package/dist/lime-crm-building-blocks/{p-be4829f3.entry.js → p-be5c43bb.entry.js} +1 -1
  216. package/dist/lime-crm-building-blocks/{p-3e9de50b.entry.js → p-bf4b2a91.entry.js} +1 -1
  217. package/dist/lime-crm-building-blocks/{p-73fab4a9.entry.js → p-c891125e.entry.js} +1 -1
  218. package/dist/lime-crm-building-blocks/{p-3c19f792.entry.js → p-d7d6d21b.entry.js} +1 -1
  219. package/dist/lime-crm-building-blocks/{p-655f028c.entry.js → p-d95f66c8.entry.js} +1 -1
  220. package/dist/lime-crm-building-blocks/{p-19b95901.entry.js → p-dacd1df3.entry.js} +1 -1
  221. package/dist/lime-crm-building-blocks/{p-b0ac4a5f.entry.js → p-de785fee.entry.js} +1 -1
  222. package/dist/lime-crm-building-blocks/{p-22af159d.entry.js → p-e2420cde.entry.js} +1 -1
  223. package/dist/lime-crm-building-blocks/{p-ae802651.entry.js → p-e4cef02f.entry.js} +1 -1
  224. package/dist/lime-crm-building-blocks/{p-bae91ba0.entry.js → p-e618ccd3.entry.js} +1 -1
  225. package/dist/lime-crm-building-blocks/{p-a201e304.entry.js → p-ec1e079e.entry.js} +1 -1
  226. package/dist/lime-crm-building-blocks/{p-37fbd50d.entry.js → p-f4d518ec.entry.js} +1 -1
  227. package/dist/lime-crm-building-blocks/{p-fe9cbbdd.entry.js → p-f73e3da0.entry.js} +1 -1
  228. package/dist/lime-crm-building-blocks/{p-f3d3ff7e.entry.js → p-fb8d854b.entry.js} +1 -1
  229. package/dist/lime-crm-building-blocks/{p-6a7eb5b2.entry.js → p-fce1a282.entry.js} +1 -1
  230. package/dist/lime-crm-building-blocks/{p-edf566e7.entry.js → p-fd38bf57.entry.js} +1 -1
  231. package/dist/types/components.d.ts +10 -10
  232. package/dist/types/stencil-public-runtime.d.ts +1 -0
  233. package/package.json +10 -10
  234. package/dist/lime-crm-building-blocks/p-15bb23c9.entry.js +0 -1
  235. package/dist/lime-crm-building-blocks/p-5f940ea8.entry.js +0 -1
  236. package/dist/lime-crm-building-blocks/p-80f2f76c.entry.js +0 -1
  237. package/dist/lime-crm-building-blocks/p-8eec03b7.entry.js +0 -1
  238. package/dist/lime-crm-building-blocks/p-Bb18Bgig.js +0 -1
  239. package/dist/lime-crm-building-blocks/p-b6b8dad7.entry.js +0 -1
  240. package/dist/lime-crm-building-blocks/p-cac27f2c.entry.js +0 -1
  241. package/dist/lime-crm-building-blocks/p-d99e57aa.entry.js +0 -1
  242. package/dist/lime-crm-building-blocks/p-xIXgZHrE.js +0 -1
  243. /package/dist/lime-crm-building-blocks/{p-LEJjPpY0.js → p-DwHAn7LS.js} +0 -0
@@ -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:"84e91c4401825cadc19d3a550c3047df0510230e",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);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: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 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;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover,button.expand-heading:focus,button.expand-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.expand-heading:hover,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.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);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover,button.collapse-heading:focus,button.collapse-heading:focus-visible{will-change:color, background-color, box-shadow, transform}button.collapse-heading:hover,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 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);text-decoration:none;display:inline-block}.thumbnail-card-link:focus{outline:none}.thumbnail-card-link:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}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{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:"84e91c4401825cadc19d3a550c3047df0510230e",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 +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 d={and:"webclient.delimiter.and",or:"webclient.delimiter.or"},b={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:"cd41bd4000ec52bba65131fcbdfaddcc57b5a19c"},this.renderLabel(),o("button",{key:"f9e4ad789d1234b6793215fba49922dfa22ed642",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:"2039675de876cd689295c4cd16d895da64437091",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(d[this.conjunction]):b[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]){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]):focus{outline:none}button.chip:not([disabled]):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}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;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: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 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{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:"cd41bd4000ec52bba65131fcbdfaddcc57b5a19c"},this.renderLabel(),o("button",{key:"f9e4ad789d1234b6793215fba49922dfa22ed642",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:"2039675de876cd689295c4cd16d895da64437091",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 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 d=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:"074640215f29d21e8d3f38b81850823e8a93ce3c"},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);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: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 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 c(){"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),d);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()],d.prototype,"limetype",void 0);export{d as K,c as 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{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 d=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:"074640215f29d21e8d3f38b81850823e8a93ce3c"},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 c(){"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),d);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()],d.prototype,"limetype",void 0);export{d as K,c as 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:"6eb7fa30141a62e40588a59f17d27392dac78b90",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);text-decoration:none}.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)}.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;display:flex;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.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 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{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:"6eb7fa30141a62e40588a59f17d27392dac78b90",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 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"./lime-query-filter-comparison.js";import{d as m}from"./lime-query-filter-comparison-editor.js";import{d as c}from"./lime-query-value-input.js";import{d as b}from"./property-selector.js";function u(e){return e.op===s.NOT?e.exp.op===s.AND?"NOT_AND":"NOT_OR":e.op===s.AND?"AND":"OR"}function p(e){return e.op===s.NOT?e.exp:e}function f(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 d(){return{key:"",op:s.EQUALS,exp:""}}function h(e,i){return{op:e.op,exp:[...e.exp,i]}}const y=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:"73fa671599ac9f124797567f49af67941dd30e36",class:"expression"},this.label&&r("limel-header",{key:"959feb78614f0088b9946ccb492f32900a410ff8",heading:this.label}),r("limebb-lime-query-filter-expression",{key:"78ce884774a3831c18ad329fb1eacc4e54cd3623",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 g(){"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),y);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||E();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||k();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||g()}}))}const x={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"}},q=["AND","OR","NOT_AND","NOT_OR"].map((e=>({text:x[e].text,secondaryText:x[e].secondaryText,value:e,icon:{name:x[e].iconName,color:x[e].color}}))),v=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!==u(this.expression)&&this.expressionChange.emit(function(e,i){const t=p(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=h(p(this.expression),d());this.expressionChange.emit(this.wrap(e))},this.handleAddChildGroup=()=>{const e=p(this.expression),i=h(e,{op:e.op===s.AND?s.OR:s.AND,exp:[d()]});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}})}(p(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=u(this.expression),i=p(this.expression),t=q.find((i=>i.value===e));return r(l,{key:"c94790ff047e47ada5e9142af88bff0c8250e34f","data-op":e,style:{"--limebb-query-filter-group-color-code":x[e].color}},r("div",{key:"6bc8daa9b292993e2740dbc0a2f1b0a7f2df4722",class:"group"},r("div",{key:"8a171940ef57d657c3638943108e997bb84bde21",class:"group-header"},r("limel-select",{key:"179abcc11b79527f7b8d0863b2e8d81de5bd3267",class:"combinator",label:"Match",value:t,options:q,onChange:this.handleCombinatorChange}),r("limel-icon-button",{key:"3a604b24ccff02ac257d3440c82dbc33dc9f4f16",class:"delete-group",icon:"trash",label:"Delete this group",onClick:this.handleDeleteGroup})),r("ul",{key:"f65734f8d7cc66886065a511a90108c9316d4d7b",class:"rows"},i.exp.map(this.renderChildExpression),r("limel-chip",{key:"252726aea61aefead90fc6ce421de9eb74288253",role:"listitem",class:"add-condition",text:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddChildExpression})),r("limel-chip",{key:"2a5839a10a8b9ebb85f53d867c8870ad92ab0984",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 k(){"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),v);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||E();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||k();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||g()}}))}const w=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=f(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 E(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-expression","limebb-filter-chip","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),w);break;case"limebb-filter-chip":customElements.get(o(e))||n();break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||E();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||k();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||g();break;case"limebb-lime-query-value-input":customElements.get(o(e))||c();break;case"limebb-property-selector":customElements.get(o(e))||b()}}))}export{w as L,v as a,k as b,y as c,E as d,g as e,f 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{n as s}from"./index.esm.js";import{d as n}from"./filter-chip.js";import{d as a}from"./lime-query-filter-comparison.js";import{d as m}from"./lime-query-filter-comparison-editor.js";import{d as c}from"./lime-query-value-input.js";import{d as b}from"./property-selector.js";function u(e){return e.op===s.NOT?e.exp.op===s.AND?"NOT_AND":"NOT_OR":e.op===s.AND?"AND":"OR"}function p(e){return e.op===s.NOT?e.exp:e}function f(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 d(){return{key:"",op:s.EQUALS,exp:""}}function h(e,i){return{op:e.op,exp:[...e.exp,i]}}const y=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:"73fa671599ac9f124797567f49af67941dd30e36",class:"expression"},this.label&&r("limel-header",{key:"959feb78614f0088b9946ccb492f32900a410ff8",heading:this.label}),r("limebb-lime-query-filter-expression",{key:"78ce884774a3831c18ad329fb1eacc4e54cd3623",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 g(){"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),y);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||E();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||k();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||g()}}))}const x={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"}},q=["AND","OR","NOT_AND","NOT_OR"].map((e=>({text:x[e].text,secondaryText:x[e].secondaryText,value:e,icon:{name:x[e].iconName,color:x[e].color}}))),v=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!==u(this.expression)&&this.expressionChange.emit(function(e,i){const t=p(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=h(p(this.expression),d());this.expressionChange.emit(this.wrap(e))},this.handleAddChildGroup=()=>{const e=p(this.expression),i=h(e,{op:e.op===s.AND?s.OR:s.AND,exp:[d()]});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}})}(p(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=u(this.expression),i=p(this.expression),t=q.find((i=>i.value===e));return r(l,{key:"c94790ff047e47ada5e9142af88bff0c8250e34f","data-op":e,style:{"--limebb-query-filter-group-color-code":x[e].color}},r("div",{key:"6bc8daa9b292993e2740dbc0a2f1b0a7f2df4722",class:"group"},r("div",{key:"8a171940ef57d657c3638943108e997bb84bde21",class:"group-header"},r("limel-select",{key:"179abcc11b79527f7b8d0863b2e8d81de5bd3267",class:"combinator",label:"Match",value:t,options:q,onChange:this.handleCombinatorChange}),r("limel-icon-button",{key:"3a604b24ccff02ac257d3440c82dbc33dc9f4f16",class:"delete-group",icon:"trash",label:"Delete this group",onClick:this.handleDeleteGroup})),r("ul",{key:"f65734f8d7cc66886065a511a90108c9316d4d7b",class:"rows"},i.exp.map(this.renderChildExpression),r("limel-chip",{key:"252726aea61aefead90fc6ce421de9eb74288253",role:"listitem",class:"add-condition",text:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddChildExpression})),r("limel-chip",{key:"2a5839a10a8b9ebb85f53d867c8870ad92ab0984",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 k(){"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),v);break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||E();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||k();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||g()}}))}const w=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=f(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 E(){"undefined"!=typeof customElements&&["limebb-lime-query-filter-expression","limebb-filter-chip","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),w);break;case"limebb-filter-chip":customElements.get(o(e))||n();break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||a();break;case"limebb-lime-query-filter-comparison-editor":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||E();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||k();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||g();break;case"limebb-lime-query-value-input":customElements.get(o(e))||c();break;case"limebb-property-selector":customElements.get(o(e))||b()}}))}export{w as L,v as a,k as b,y as c,E as d,g as e,f as i}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as r,transformTag as o}from"@stencil/core/internal/client";import{b as i}from"./index.esm.js";import{c as s}from"./random-string.js";import{d as n}from"./percentage-visualizer.js";const a=36e5,l=24*a,d=[{unit:"year",ms:365*l},{unit:"month",ms:30*l},{unit:"week",ms:7*l},{unit:"day",ms:l},{unit:"hour",ms:a},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}];function c(e,t){var r;const o=e.getTime()-Date.now(),{unit:i,ms:s}=null!==(r=d.find((e=>Math.abs(o)>=e.ms)))&&void 0!==r?r:d.at(-1);return new Intl.RelativeTimeFormat(t,{style:"long"}).format(Math.round(o/s),i)}const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.items=[],this.relativeDates=!0,this.renderCell=e=>r("div",null,r("dt",null,r("span",null,e.label)),r("dd",null,r("span",null,this.renderValue(e))))}render(){const e=this.items.some((e=>!e.secondary));return[this.renderPrimary(e),this.renderSecondary(e)]}renderPrimary(e){if(!e)return;const t=this.items.filter((e=>!e.secondary));return r("dl",{class:"primary"},this.renderImageCell(),t.map(this.renderCell))}renderSecondary(e){const t=this.items.filter((e=>e.secondary));if(0!==t.length)return r("dl",{class:"secondary"},!e&&this.renderImageCell(),t.map(this.renderCell))}renderImageCell(){var e;if(this.image)return r("div",{class:"image-cell"},r("img",{src:this.image.src,alt:this.image.alt,loading:null!==(e=this.image.loading)&&void 0!==e?e:"lazy"}))}renderValue(e){if(null==e.value||""===e.value)return"–";if("belongsto"===e.type){const t=this.getBelongsToHref(e.field);return t?r("a",{class:"belongs-to",href:t},e.value):e.value}if("phone"===e.type)return r("a",{href:this.toTelUri(e.value)},e.value);if("email"===e.type)return r("a",{href:"mailto:"+e.value},e.value);if("link"===e.type)return r("a",{href:this.ensureUrlProtocol(e.value),target:"_blank",rel:"noopener"},this.stripUrlPrefix(e.value));if("time"===e.type||"date"===e.type){const t=new Date(e.value);if(Number.isNaN(t.getTime()))return e.value;if(!this.relativeDates)return this.formatAbsoluteDate(t,e.type);const o=s();return[r("span",{id:o},c(t,this.language)),r("limel-tooltip",{elementId:o,label:this.formatAbsoluteDate(t,e.type)})]}return"percent"===e.type?r("limebb-percentage-visualizer",{value:Number(e.value),multiplier:100,displayPercentageColors:!0,reducePresence:!1}):e.value}toTelUri(e){return"tel:"+e.replaceAll(" ","")}ensureUrlProtocol(e){return/^https?:\/\//i.test(e)?e:"https://"+e}stripUrlPrefix(e){return e.replace(/^https?:\/\//,"").replace(/^www\./,"")}getBelongsToHref(e){var t;if(this.limeobject&&e)try{const r=this.limeobject.getValue(e);if(!r||"object"!=typeof r)return;const o=null===(t=r.getLimetype)||void 0===t?void 0:t.call(r);if(!(null==o?void 0:o.name)||!r.id)return;return`object/${o.name}/${r.id}`}catch(e){return}}get language(){var e;try{return null===(e=this.platform)||void 0===e?void 0:e.get(i.Application).getLanguage()}catch(e){return navigator.language}}formatAbsoluteDate(e,t){var r;try{const o=null===(r=this.platform)||void 0===r?void 0:r.get(i.DateTimeFormatter);if(o)return o.format(e,t)}catch(e){}return e.toLocaleString(this.language,{dateStyle:"long",timeStyle:"time"===t?"short":void 0})}static get style(){return'@charset "UTF-8";*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-data-cells){box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;padding:var(--limebb-data-cells-padding)}div{display:flex;flex-direction:column}dl{display:flex;flex-wrap:wrap;gap:0.75rem 1rem;margin:0;padding:0;list-style:none}dd,dt{display:flex;align-items:center}dd span,dt span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}dd{margin:0;font-size:var(--limel-theme-default-font-size);line-height:1.25rem;height:1.25rem;font-weight:500;color:rgb(var(--contrast-1100))}dd a{text-decoration:none;border-radius:1.25rem}dd a:focus{outline:none}dd a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}dd a:not(.belongs-to){position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):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)}dd a:not(.belongs-to):hover{color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):hover:before{opacity:0.3;transform:scale(1)}dd a.belongs-to{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);color:inherit;background-color:rgb(var(--contrast-400));padding:1px 0.375rem}dd a.belongs-to:hover,dd a.belongs-to:focus-visible{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default))}dd:has(.belongs-to){transform:translateX(-0.375rem)}dt{order:1;transition:color 0.2s ease;font-size:0.65rem;color:rgb(var(--contrast-800))}:host(:hover) dt,:host(:focus-within) dt{color:rgb(var(--contrast-900))}.primary+.secondary{padding-top:0.5rem;border-top:1px dashed rgb(var(--contrast-500))}.secondary dd{font-size:0.75rem;font-weight:400;line-height:1rem;height:1rem}div.image-cell{flex-shrink:0}div.image-cell img{display:block;width:2.5rem;height:2.5rem;border-radius:var(--data-cells-image-border-radius, 50%);object-fit:var(--data-cells-image-object-fit, cover);background-color:rgb(var(--color-white));box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.25)}'}},[1,"limebb-data-cells",{platform:[16],context:[16],limeobject:[8],items:[16],image:[16],relativeDates:[4,"relative-dates"]}]),u=m,h=function(){"undefined"!=typeof customElements&&["limebb-data-cells","limebb-percentage-visualizer"].forEach((e=>{switch(e){case"limebb-data-cells":customElements.get(o(e))||customElements.define(o(e),m);break;case"limebb-percentage-visualizer":customElements.get(o(e))||n()}}))};export{u as LimebbDataCells,h as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as r,transformTag as o}from"@stencil/core/internal/client";import{b as i}from"./index.esm.js";import{c as s}from"./random-string.js";import{d as n}from"./percentage-visualizer.js";const a=36e5,l=24*a,d=[{unit:"year",ms:365*l},{unit:"month",ms:30*l},{unit:"week",ms:7*l},{unit:"day",ms:l},{unit:"hour",ms:a},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}];function c(e,t){var r;const o=e.getTime()-Date.now(),{unit:i,ms:s}=null!==(r=d.find((e=>Math.abs(o)>=e.ms)))&&void 0!==r?r:d.at(-1);return new Intl.RelativeTimeFormat(t,{style:"long"}).format(Math.round(o/s),i)}const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.items=[],this.relativeDates=!0,this.renderCell=e=>r("div",null,r("dt",null,r("span",null,e.label)),r("dd",null,r("span",null,this.renderValue(e))))}render(){const e=this.items.some((e=>!e.secondary));return[this.renderPrimary(e),this.renderSecondary(e)]}renderPrimary(e){if(!e)return;const t=this.items.filter((e=>!e.secondary));return r("dl",{class:"primary"},this.renderImageCell(),t.map(this.renderCell))}renderSecondary(e){const t=this.items.filter((e=>e.secondary));if(0!==t.length)return r("dl",{class:"secondary"},!e&&this.renderImageCell(),t.map(this.renderCell))}renderImageCell(){var e;if(this.image)return r("div",{class:"image-cell"},r("img",{src:this.image.src,alt:this.image.alt,loading:null!==(e=this.image.loading)&&void 0!==e?e:"lazy",referrerPolicy:this.image.referrerpolicy}))}renderValue(e){if(null==e.value||""===e.value)return"–";if("belongsto"===e.type){const t=this.getBelongsToHref(e.field);return t?r("a",{class:"belongs-to",href:t},e.value):e.value}if("phone"===e.type)return r("a",{href:this.toTelUri(e.value)},e.value);if("email"===e.type)return r("a",{href:"mailto:"+e.value},e.value);if("link"===e.type)return r("a",{href:this.ensureUrlProtocol(e.value),target:"_blank",rel:"noopener"},this.stripUrlPrefix(e.value));if("time"===e.type||"date"===e.type){const t=new Date(e.value);if(Number.isNaN(t.getTime()))return e.value;if(!this.relativeDates)return this.formatAbsoluteDate(t,e.type);const o=s();return[r("span",{id:o},c(t,this.language)),r("limel-tooltip",{elementId:o,label:this.formatAbsoluteDate(t,e.type)})]}return"percent"===e.type?r("limebb-percentage-visualizer",{value:Number(e.value),multiplier:100,displayPercentageColors:!0,reducePresence:!1}):e.value}toTelUri(e){return"tel:"+e.replaceAll(" ","")}ensureUrlProtocol(e){return/^https?:\/\//i.test(e)?e:"https://"+e}stripUrlPrefix(e){return e.replace(/^https?:\/\//,"").replace(/^www\./,"")}getBelongsToHref(e){var t;if(this.limeobject&&e)try{const r=this.limeobject.getValue(e);if(!r||"object"!=typeof r)return;const o=null===(t=r.getLimetype)||void 0===t?void 0:t.call(r);if(!(null==o?void 0:o.name)||!r.id)return;return`object/${o.name}/${r.id}`}catch(e){return}}get language(){var e;try{return null===(e=this.platform)||void 0===e?void 0:e.get(i.Application).getLanguage()}catch(e){return navigator.language}}formatAbsoluteDate(e,t){var r;try{const o=null===(r=this.platform)||void 0===r?void 0:r.get(i.DateTimeFormatter);if(o)return o.format(e,t)}catch(e){}return e.toLocaleString(this.language,{dateStyle:"long",timeStyle:"time"===t?"short":void 0})}static get style(){return'@charset "UTF-8";*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-data-cells){box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;padding:var(--limebb-data-cells-padding)}div{display:flex;flex-direction:column}dl{display:flex;flex-wrap:wrap;gap:0.75rem 1rem;margin:0;padding:0;list-style:none}dd,dt{display:flex;align-items:center}dd span,dt span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}dd{margin:0;font-size:var(--limel-theme-default-font-size);line-height:1.25rem;height:1.25rem;font-weight:500;color:rgb(var(--contrast-1100))}dd a{text-decoration:none;border-radius:1.25rem}dd a:focus{outline:none}dd a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}dd a:not(.belongs-to){position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):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)}dd a:not(.belongs-to):hover{color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):hover:before{opacity:0.3;transform:scale(1)}dd a.belongs-to{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);color:inherit;background-color:rgb(var(--contrast-400));padding:1px 0.375rem}dd a.belongs-to:hover,dd a.belongs-to:focus-visible{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default))}dd:has(.belongs-to){transform:translateX(-0.375rem)}dt{order:1;transition:color 0.2s ease;font-size:0.65rem;color:rgb(var(--contrast-800))}:host(:hover) dt,:host(:focus-within) dt{color:rgb(var(--contrast-900))}.primary+.secondary{padding-top:0.5rem;border-top:1px dashed rgb(var(--contrast-500))}.secondary dd{font-size:0.75rem;font-weight:400;line-height:1rem;height:1rem}div.image-cell{flex-shrink:0}div.image-cell img{display:block;width:2.5rem;height:2.5rem;border-radius:var(--data-cells-image-border-radius, 50%);object-fit:var(--data-cells-image-object-fit, cover);background-color:rgb(var(--color-white));box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.25)}'}},[1,"limebb-data-cells",{platform:[16],context:[16],limeobject:[8],items:[16],image:[16],relativeDates:[4,"relative-dates"]}]),u=m,h=function(){"undefined"!=typeof customElements&&["limebb-data-cells","limebb-percentage-visualizer"].forEach((e=>{switch(e){case"limebb-data-cells":customElements.get(o(e))||customElements.define(o(e),m);break;case"limebb-percentage-visualizer":customElements.get(o(e))||n()}}))};export{u as LimebbDataCells,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as n,transformTag as o}from"@stencil/core/internal/client";import{b as s}from"./index.esm.js";import{H as a}from"./highlight-item.handler.js";import{d as l}from"./empty-state.js";import{d as m}from"./feed-item-thumbnail-file-info.js";import{d}from"./feed-timeline-item.js";import{d as h}from"./navigation-button.js";import{d as u}from"./summary-popover.js";var c,b={},f={};function g(){return c||(c=1,f.getRoundingMethod=function(e){return t=>{const i=(e?Math[e]:Math.trunc)(t);return 0===i?0:i}}),f}var p,v={};function y(){if(p)return v;p=1,v.secondsInYear=v.secondsInWeek=v.secondsInQuarter=v.secondsInMonth=v.secondsInMinute=v.secondsInHour=v.secondsInDay=v.quartersInYear=v.monthsInYear=v.monthsInQuarter=v.minutesInYear=v.minutesInMonth=v.minutesInHour=v.minutesInDay=v.minTime=v.millisecondsInWeek=v.millisecondsInSecond=v.millisecondsInMinute=v.millisecondsInHour=v.millisecondsInDay=v.maxTime=v.daysInYear=v.daysInWeek=void 0,v.daysInWeek=7;const e=v.daysInYear=365.2425,t=v.maxTime=864e13;v.minTime=-t,v.millisecondsInWeek=6048e5,v.millisecondsInDay=864e5,v.millisecondsInMinute=6e4,v.millisecondsInHour=36e5,v.millisecondsInSecond=1e3,v.minutesInYear=525600,v.minutesInMonth=43200,v.minutesInDay=1440,v.minutesInHour=60,v.monthsInQuarter=3,v.monthsInYear=12,v.quartersInYear=4;const i=v.secondsInHour=3600;v.secondsInMinute=60;const r=v.secondsInDay=24*i;v.secondsInWeek=7*r;const n=v.secondsInYear=r*e,o=v.secondsInMonth=n/12;return v.secondsInQuarter=3*o,v}var k,w,x,I={},j={};function E(){return k||(k=1,j.toDate=function(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):new Date("number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?e:NaN)}),j}function D(){if(w)return I;w=1,I.differenceInMilliseconds=function(t,i){return+(0,e.toDate)(t)-+(0,e.toDate)(i)};var e=E();return I}function C(){if(x)return b;x=1,b.differenceInMinutes=function(r,n,o){const s=(0,i.differenceInMilliseconds)(r,n)/t.millisecondsInMinute;return(0,e.getRoundingMethod)(o?.roundingMethod)(s)};var e=g(),t=y(),i=D();return b}var M=C();const N=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.loadMore=i(this,"loadMore",7),this.highlightedItemIdNotFound=i(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,n,o,s,a;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(n=null==e?void 0:e.author)||void 0===n?void 0:n.id))return!1;if((null===(s=null===(o=this.items[t-1])||void 0===o?void 0:o.icon)||void 0===s?void 0:s.name)!==(null===(a=null==e?void 0:e.icon)||void 0===a?void 0:a.name))return!1;const l=new Date(e.timestamp),m=new Date(new Date(this.items[t-1].timestamp)),d=new Date(l);return"DESC"===this.direction?M.differenceInMinutes(m,d)<=this.minutesOfProximity:M.differenceInMinutes(d,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return r(n,{key:"039b9edef50f1e306d67a3cd390149f65424bbe7",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return r("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?r("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.groupedItems.map((e=>r("section",{class:"date-group",key:"date-group-"+e.date},r("a",{class:"date-heading"},e.date),e.items.map((({item:e,index:t})=>r("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t),class:this.isNewItem(e)?"is-new":void 0}))))))}isNewItem(e){if(!this.lastVisitedTimestamp)return!1;const t=new Date(this.lastVisitedTimestamp);return new Date(e.timestamp)>t}renderLoadMore(){if(!(0===this.items.length||this.totalCount<=this.items.length))return r("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(s.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(s.Translate)}get groupedItems(){const e=[];for(let t=0;t<this.items.length;t++){const i=this.items[t],r=this.dateTimeFormatter.format(i.timestamp,"date"),n=e.at(-1);n&&n.date===r?n.items.push({item:i,index:t}):e.push({date:r,items:[{item:i,index:t}]})}return e}highlightedItemIdChanged(e){void 0!==e&&this.highlightItem(e)}highlightItem(e){var t;const i=null===(t=this.feedItemElement.shadowRoot)||void 0===t?void 0:t.querySelector(`limebb-feed-timeline-item[id="${e}"]`);return i?(i.setAttribute("aria-current","true"),i.scrollIntoView({behavior:"smooth",block:"center"}),i.focus(),setTimeout((()=>{i.removeAttribute("aria-current")}),3e3),!0):(this.highlightedItemIdNotFound.emit({id:e}),!1)}get highlighter(){return this.platform.get(a.SERVICE_NAME)}get feedItemElement(){return this}static get watchers(){return{highlightedItemId:[{highlightedItemIdChanged:0}]}}static get style(){return':host(limebb-feed){--limebb-feed-background-color:var( --feed-background-color, rgb(var(--contrast-100)) );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:column;gap:0.375rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto 0 -0.5rem;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-promoted-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}limebb-feed-timeline-item:focus{outline:none}limebb-feed-timeline-item[aria-current=true]:focus{animation:highlight-animation ease-in-out;animation-duration:var(--limebb-feed-highlight-duration)}@keyframes highlight-animation{0%,20%,100%{box-shadow:none}10%,50%,60%{box-shadow:var(--shadow-focused-state)}}'}},[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],direction:[513],lastVisitedTimestamp:[1,"last-visited-timestamp"],highlightedItemId:[8,"highlighted-item-id"]},void 0,{highlightedItemId:[{highlightedItemIdChanged:0}]}]),S=N,z=function(){"undefined"!=typeof customElements&&["limebb-feed","limebb-empty-state","limebb-feed-item-thumbnail-file-info","limebb-feed-timeline-item","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-feed":customElements.get(o(e))||customElements.define(o(e),N);break;case"limebb-empty-state":customElements.get(o(e))||l();break;case"limebb-feed-item-thumbnail-file-info":customElements.get(o(e))||m();break;case"limebb-feed-timeline-item":customElements.get(o(e))||d();break;case"limebb-navigation-button":customElements.get(o(e))||h();break;case"limebb-summary-popover":customElements.get(o(e))||u()}}))};export{S as LimebbFeed,z as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as r,Host as n,transformTag as o}from"@stencil/core/internal/client";import{b as s}from"./index.esm.js";import{H as a}from"./highlight-item.handler.js";import{d as l}from"./empty-state.js";import{d as m}from"./feed-item-thumbnail-file-info.js";import{d}from"./feed-timeline-item.js";import{d as h}from"./navigation-button.js";import{d as u}from"./summary-popover.js";var c,b={},f={};function g(){return c||(c=1,f.getRoundingMethod=function(e){return t=>{const i=(e?Math[e]:Math.trunc)(t);return 0===i?0:i}}),f}var p,v={};function y(){if(p)return v;p=1,v.secondsInYear=v.secondsInWeek=v.secondsInQuarter=v.secondsInMonth=v.secondsInMinute=v.secondsInHour=v.secondsInDay=v.quartersInYear=v.monthsInYear=v.monthsInQuarter=v.minutesInYear=v.minutesInMonth=v.minutesInHour=v.minutesInDay=v.minTime=v.millisecondsInWeek=v.millisecondsInSecond=v.millisecondsInMinute=v.millisecondsInHour=v.millisecondsInDay=v.maxTime=v.daysInYear=v.daysInWeek=v.constructFromSymbol=void 0,v.daysInWeek=7;const e=v.daysInYear=365.2425,t=v.maxTime=864e13;v.minTime=-t,v.millisecondsInWeek=6048e5,v.millisecondsInDay=864e5,v.millisecondsInMinute=6e4,v.millisecondsInHour=36e5,v.millisecondsInSecond=1e3,v.minutesInYear=525600,v.minutesInMonth=43200,v.minutesInDay=1440,v.minutesInHour=60,v.monthsInQuarter=3,v.monthsInYear=12,v.quartersInYear=4;const i=v.secondsInHour=3600;v.secondsInMinute=60;const r=v.secondsInDay=24*i;v.secondsInWeek=7*r;const n=v.secondsInYear=r*e,o=v.secondsInMonth=n/12;return v.secondsInQuarter=3*o,v.constructFromSymbol=Symbol.for("constructDateFrom"),v}var k,w,x,I,E={},D={},j={};function C(){if(k)return j;k=1,j.constructFrom=function(t,i){return"function"==typeof t?t(i):t&&"object"==typeof t&&e.constructFromSymbol in t?t[e.constructFromSymbol](i):t instanceof Date?new t.constructor(i):new Date(i)};var e=y();return j}function M(){if(w)return D;w=1,D.toDate=function(t,i){return(0,e.constructFrom)(i||t,t)};var e=C();return D}function F(){if(x)return E;x=1,E.differenceInMilliseconds=function(t,i){return+(0,e.toDate)(t)-+(0,e.toDate)(i)};var e=M();return E}function S(){if(I)return b;I=1,b.differenceInMinutes=function(r,n,o){const s=(0,i.differenceInMilliseconds)(r,n)/t.millisecondsInMinute;return(0,e.getRoundingMethod)(o?.roundingMethod)(s)};var e=g(),t=y(),i=F();return b}var z=S();const T=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.loadMore=i(this,"loadMore",7),this.highlightedItemIdNotFound=i(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,n,o,s,a;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(n=null==e?void 0:e.author)||void 0===n?void 0:n.id))return!1;if((null===(s=null===(o=this.items[t-1])||void 0===o?void 0:o.icon)||void 0===s?void 0:s.name)!==(null===(a=null==e?void 0:e.icon)||void 0===a?void 0:a.name))return!1;const l=new Date(e.timestamp),m=new Date(new Date(this.items[t-1].timestamp)),d=new Date(l);return"DESC"===this.direction?z.differenceInMinutes(m,d)<=this.minutesOfProximity:z.differenceInMinutes(d,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return r(n,{key:"039b9edef50f1e306d67a3cd390149f65424bbe7",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return r("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?r("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.groupedItems.map((e=>r("section",{class:"date-group",key:"date-group-"+e.date},r("a",{class:"date-heading"},e.date),e.items.map((({item:e,index:t})=>r("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t),class:this.isNewItem(e)?"is-new":void 0}))))))}isNewItem(e){if(!this.lastVisitedTimestamp)return!1;const t=new Date(this.lastVisitedTimestamp);return new Date(e.timestamp)>t}renderLoadMore(){if(!(0===this.items.length||this.totalCount<=this.items.length))return r("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(s.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(s.Translate)}get groupedItems(){const e=[];for(let t=0;t<this.items.length;t++){const i=this.items[t],r=this.dateTimeFormatter.format(i.timestamp,"date"),n=e.at(-1);n&&n.date===r?n.items.push({item:i,index:t}):e.push({date:r,items:[{item:i,index:t}]})}return e}highlightedItemIdChanged(e){void 0!==e&&this.highlightItem(e)}highlightItem(e){var t;const i=null===(t=this.feedItemElement.shadowRoot)||void 0===t?void 0:t.querySelector(`limebb-feed-timeline-item[id="${e}"]`);return i?(i.setAttribute("aria-current","true"),i.scrollIntoView({behavior:"smooth",block:"center"}),i.focus(),setTimeout((()=>{i.removeAttribute("aria-current")}),3e3),!0):(this.highlightedItemIdNotFound.emit({id:e}),!1)}get highlighter(){return this.platform.get(a.SERVICE_NAME)}get feedItemElement(){return this}static get watchers(){return{highlightedItemId:[{highlightedItemIdChanged:0}]}}static get style(){return':host(limebb-feed){--limebb-feed-background-color:var( --feed-background-color, rgb(var(--contrast-100)) );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:column;gap:0.375rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto 0 -0.5rem;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-promoted-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}limebb-feed-timeline-item:focus{outline:none}limebb-feed-timeline-item[aria-current=true]:focus{animation:highlight-animation ease-in-out;animation-duration:var(--limebb-feed-highlight-duration)}@keyframes highlight-animation{0%,20%,100%{box-shadow:none}10%,50%,60%{box-shadow:var(--shadow-focused-state)}}'}},[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],direction:[513],lastVisitedTimestamp:[1,"last-visited-timestamp"],highlightedItemId:[8,"highlighted-item-id"]},void 0,{highlightedItemId:[{highlightedItemIdChanged:0}]}]),L=T,N=function(){"undefined"!=typeof customElements&&["limebb-feed","limebb-empty-state","limebb-feed-item-thumbnail-file-info","limebb-feed-timeline-item","limebb-navigation-button","limebb-summary-popover"].forEach((e=>{switch(e){case"limebb-feed":customElements.get(o(e))||customElements.define(o(e),T);break;case"limebb-empty-state":customElements.get(o(e))||l();break;case"limebb-feed-item-thumbnail-file-info":customElements.get(o(e))||m();break;case"limebb-feed-timeline-item":customElements.get(o(e))||d();break;case"limebb-navigation-button":customElements.get(o(e))||h();break;case"limebb-summary-popover":customElements.get(o(e))||u()}}))};export{L as LimebbFeed,N as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as o,HTMLElement as r,h as e,Host as t,transformTag as a}from"@stencil/core/internal/client";import{b as i}from"./index.esm.js";import{g as s,n as l}from"./normalize-value.js";const n=o(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.suffix="%",this.reducePresence=!0,this.locale="en",this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return e("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(o){this.numValue=this.parseValue(o)}componentWillLoad(){try{this.locale=this.platform.get(i.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(o){console.warn(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}render(){return e(t,{key:"fbf631c6889091e9efe5790397b26f804d27d93b",class:this.getContainerClassList()},e("limel-notched-outline",{key:"832d2d338bf86da41b0a19a813f0dc7e3b3eb8c9",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},e("div",{key:"b3266118df54e2c3a4d7729f0e36d7c7e1fbc13c",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),e("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:e("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=this.value+" - "+(this.formerValue>0?this.formerValue:"("+this.formerValue+")")+" = "+this.calculateGrowth()+` ${this.suffix} `,r=this.calculatePercentage();return e("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:r+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return e("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=s(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){return 0===this.formerValue?null:Number.parseFloat(((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2))}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(l(this.unifyMinusSign(o),this.locale)):o}formatValue(o,r){const e=`${this.numberFormat.format(o)} ${r}`;return o>0?"+"+e:this.convertToUnicodeMinus(e)}getArrowIcon(){return e("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}'}},[1,"limebb-trend-indicator",{platform:[16],context:[16],value:[520],formerValue:[514,"former-value"],suffix:[513],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"]},void 0,{value:[{valueChanged:0}]}]),c=n,h=function(){"undefined"!=typeof customElements&&["limebb-trend-indicator"].forEach((o=>{"limebb-trend-indicator"===o&&(customElements.get(a(o))||customElements.define(a(o),n))}))};export{c as LimebbTrendIndicator,h as defineCustomElement}
1
+ import{proxyCustomElement as o,HTMLElement as r,h as e,Host as t,transformTag as a}from"@stencil/core/internal/client";import{b as i}from"./index.esm.js";import{g as s,n as l}from"./normalize-value.js";const n=o(class extends r{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.suffix="%",this.reducePresence=!0,this.locale="en",this.labelId="a"+crypto.randomUUID(),this.tooltipId="a"+crypto.randomUUID(),this.helperTextId="a"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return e("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(o){this.numValue=this.parseValue(o)}componentWillLoad(){try{this.locale=this.platform.get(i.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(o){console.warn(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}render(){return e(t,{key:"fbf631c6889091e9efe5790397b26f804d27d93b",class:this.getContainerClassList()},e("limel-notched-outline",{key:"832d2d338bf86da41b0a19a813f0dc7e3b3eb8c9",id:this.tooltipId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,"aria-controls":this.helperTextId},e("div",{key:"b3266118df54e2c3a4d7729f0e36d7c7e1fbc13c",slot:"content",tabIndex:0},this.renderVisualization())),this.renderHelperLine(),this.renderTooltip())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[this.getArrowIcon(),e("span",null,this.renderGrowthPercentage(),this.renderGrowthAmount())]:e("span",{class:"no-value"},"–")}renderTooltip(){if(void 0===this.formerValue)return;const o=this.value+" - "+(this.formerValue>0?this.formerValue:"("+this.formerValue+")")+" = "+this.calculateGrowth()+` ${this.suffix} `,r=this.calculatePercentage();return e("limel-tooltip",{openDirection:"top-start",elementId:this.tooltipId,label:r+"%",helperLabel:o})}renderGrowthPercentage(){if(void 0===this.formerValue)return this.formatValue(this.numValue,this.suffix);const o=this.calculatePercentage();return null!==o?this.formatValue(o,"%"):void 0}renderGrowthAmount(){if(void 0===this.formerValue)return;const o=this.calculateGrowth();return e("span",{class:"growth-unit"},"( ",this.formatValue(o,this.suffix)," )")}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const o=this.getPercentage(),r=s(o);return Object.assign({},r&&{[r]:!0})}getPercentage(){return void 0===this.formerValue?this.numValue:this.calculatePercentage()}calculateGrowth(){return this.numValue-this.formerValue}calculatePercentage(){return 0===this.formerValue?null:Number.parseFloat(((this.numValue-this.formerValue)/Math.abs(this.formerValue)*100).toFixed(2))}unifyMinusSign(o){return o.replaceAll("−","-")}convertToUnicodeMinus(o){return o.replaceAll("-","−")}parseValue(o){return"string"==typeof o?Number.parseFloat(l(this.unifyMinusSign(o),this.locale)):o}formatValue(o,r){const e=`${this.numberFormat.format(o)} ${r}`;return o>0?"+"+e:this.convertToUnicodeMinus(e)}getArrowIcon(){return e("limel-icon",{class:"icon",name:"right","aria-hidden":"true",role:"presentation"})}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'@charset "UTF-8";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:"";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}'}},[1,"limebb-trend-indicator",{platform:[16],context:[16],value:[520],formerValue:[514,"former-value"],suffix:[513],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"]},void 0,{value:[{valueChanged:0}]}]),c=n,h=function(){"undefined"!=typeof customElements&&["limebb-trend-indicator"].forEach((o=>{"limebb-trend-indicator"===o&&(customElements.get(a(o))||customElements.define(a(o),n))}))};export{c as LimebbTrendIndicator,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as a}from"@stencil/core/internal/client";import{n as r}from"./index.esm.js";const n=[{value:"string",text:"Text"},{value:"number",text:"Number"},{value:"date",text:"Date"},{value:"datetime",text:"Date & time"},{value:"time",text:"Time"}],o=[{value:r.EQUALS,text:"Equals"},{value:r.NOT_EQUALS,text:"Does not equal"},{value:r.LESS,text:"Less than"},{value:r.LESS_OR_EQUAL,text:"Less than or equal to"},{value:r.GREATER,text:"Greater than"},{value:r.GREATER_OR_EQUAL,text:"Greater than or equal to"}],l="__relative_offset__",h="__specific__",u=[{value:"$now",text:"Now"},{value:"$today",text:"Today"},{value:"$tomorrow",text:"Tomorrow"},{value:"$yesterday",text:"Yesterday"},{value:"$this_week",text:"This week"},{value:"$this_month",text:"This month"},{value:"$this_quarter",text:"This quarter"},{value:"$this_year",text:"This year"}],d=new Set(u.map((t=>t.value))),c=[{value:"next",text:"Next"},{value:"previous",text:"Previous"}],v=[{value:"day",text:"days"},{value:"week",text:"weeks"},{value:"month",text:"months"},{value:"quarter",text:"quarters"},{value:"year",text:"years"}],m=/^\$(next|previous)_(day|week|month|quarter|year)\((\d+)\)$/,p=new Set(["date","datetime","time"]),f=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.value={},this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1,this.handleTypeChange=t=>{var e,i;t.stopPropagation(),this.resetOperandState(),this.emit(this.value.operator,void 0,null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"string")},this.handleOperatorChange=t=>{var e;t.stopPropagation();const i=null===(e=t.detail)||void 0===e?void 0:e.value;i?this.emit(i,this.value.operand):this.emit(void 0,void 0)},this.handleScalarOperandChange=t=>{t.stopPropagation();const e=this.value.operator;e&&this.emit(e,this.parseScalarOperand(t.detail))},this.handleOperandKeyChange=t=>{var e;t.stopPropagation();const i=this.value.operator;if(!i)return;const s=null===(e=t.detail)||void 0===e?void 0:e.value;if(this.operandKey=s,s!==l)return s===h?(this.specificDate||(this.specificDate=new Date),void this.emit(i,this.formatSpecific(this.specificDate))):void this.emit(i,s||void 0);this.emit(i,this.relativeOffsetToken())},this.handleDirectionChange=t=>{var e,i;t.stopPropagation(),this.direction=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"next",this.emitRelativeOffset()},this.handleUnitChange=t=>{var e,i;t.stopPropagation(),this.unit=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"week",this.emitRelativeOffset()},this.handleCountChange=t=>{t.stopPropagation(),this.countInput=t.detail+"";const e=Number.parseInt(this.countInput,10);Number.isNaN(e)||e<1?this.countInvalid=!0:(this.countInvalid=!1,this.count=e,this.emitRelativeOffset())},this.handleSpecificDateChange=t=>{t.stopPropagation();const e=this.value.operator;if(!e)return;const i=t.detail instanceof Date?t.detail:void 0;this.specificDate=i,this.emit(e,i?this.formatSpecific(i):void 0)}}componentWillLoad(){this.syncFromValue(this.value)}onValueChange(t){this.syncFromValue(t)}get valueType(){var t;return null!==(t=this.value.valueType)&&void 0!==t?t:"string"}render(){const t=n.find((t=>t.value===this.valueType)),e=o.find((t=>t.value===this.value.operator));return s("div",{key:"b7ed0eedaa937029a3e51d53630cd9a352804deb",class:"rule"},s("limel-select",{key:"402c121d9f06c1c60b6c03c7b82049127a9cd272",class:"type-select",label:"Compare as",options:n,value:t,onChange:this.handleTypeChange}),s("limel-select",{key:"aa59ca982dbca9a5b17d50c721fde57c6ab888d8",class:"operator-select",label:"When the value",options:o,value:e,onChange:this.handleOperatorChange}),this.renderOperand())}renderOperand(){return this.value.operator?p.has(this.valueType)?this.renderTemporalOperand():this.renderScalarInput():null}renderScalarInput(){return s("limel-input-field",{class:"operand-input",label:"Compared with",type:"number"===this.valueType?"number":"text",value:void 0===this.value.operand?"":this.value.operand+"",onChange:this.handleScalarOperandChange})}renderTemporalOperand(){const t=this.operandOptions(),e=t.find((t=>t.value===this.operandKey));return[s("limel-select",{key:"operand-select",class:"operand-select",label:"Compared with",options:t,value:e,onChange:this.handleOperandKeyChange}),this.renderTemporalSubControl()]}operandOptions(){if("time"===this.valueType)return[{value:"$now",text:"Now"},{value:h,text:"Specific time…"}];const t="datetime"===this.valueType?"Specific date & time…":"Specific date…";return[..."date"===this.valueType?u.filter((t=>"$now"!==t.value)):u,{value:l,text:"Relative offset…"},{value:h,text:t}]}renderTemporalSubControl(){return this.operandKey===l?this.renderOffsetBuilder():this.operandKey===h?this.renderDatePicker():null}renderOffsetBuilder(){const t=c.find((t=>t.value===this.direction)),e=v.find((t=>t.value===this.unit));return s("div",{key:"offset-builder",class:"offset-builder"},s("limel-select",{class:"offset-direction",options:c,value:t,onChange:this.handleDirectionChange}),s("limel-input-field",{class:"offset-count",label:"Amount",type:"number",required:!0,invalid:this.countInvalid,value:this.countInput,onChange:this.handleCountChange}),s("limel-select",{class:"offset-unit",options:v,value:e,onChange:this.handleUnitChange}))}renderDatePicker(){return s("limel-date-picker",{key:"specific-picker",class:"operand-picker",label:"Compared with",type:this.valueType,value:this.specificDate,onChange:this.handleSpecificDateChange})}emitRelativeOffset(){const t=this.value.operator;t&&this.emit(t,this.relativeOffsetToken())}relativeOffsetToken(){return`$${this.direction}_${this.unit}(${this.count})`}parseScalarOperand(t){const e=t+"";if(""===e.trim())return;if("number"!==this.valueType)return e;const i=Number(e);return Number.isNaN(i)?void 0:i}formatSpecific(t){return"datetime"===this.valueType?t.toISOString():"time"===this.valueType?`${x(t.getHours())}:${x(t.getMinutes())}:${x(t.getSeconds())}`:`${t.getFullYear()}-${x(t.getMonth()+1)}-${x(t.getDate())}`}emit(t,e,i=this.valueType){const s={valueType:i};t&&(s.operator=t),void 0!==e&&(s.operand=e),this.change.emit(s)}resetOperandState(){this.operandKey=void 0,this.specificDate=void 0,this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1}syncFromValue(t){const e=null==t?void 0:t.operand;if("string"!=typeof e||""===e)return;if(!p.has(this.valueType))return void(this.operandKey=void 0);const i=m.exec(e);if(i){const[,t,e,s]=i;return this.operandKey=l,this.direction=t,this.unit=e,this.count=Number(s),this.countInput=s,void(this.countInvalid=!1)}d.has(e)?this.operandKey=e:(this.operandKey=h,this.specificDate=this.parseSpecific(e))}parseSpecific(t){const e=new Date(this.specificDateText(t));return Number.isNaN(e.getTime())?void 0:e}specificDateText(t){return"time"===this.valueType?"1970-01-01T"+t:"date"===this.valueType?t+"T00:00:00":t}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return":host{display:block}.rule{display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.offset-builder{display:flex;gap:0.5rem;align-items:flex-end;grid-column:1/-1}.offset-builder .offset-count{max-width:6rem}"}},[1,"limebb-value-comparison-editor",{value:[16],operandKey:[32],direction:[32],unit:[32],count:[32],countInput:[32],countInvalid:[32],specificDate:[32]},void 0,{value:[{onValueChange:0}]}]);function x(t){return(t+"").padStart(2,"0")}const b=f,y=function(){"undefined"!=typeof customElements&&["limebb-value-comparison-editor"].forEach((t=>{"limebb-value-comparison-editor"===t&&(customElements.get(a(t))||customElements.define(a(t),f))}))};export{b as LimebbValueComparisonEditor,y as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as a}from"@stencil/core/internal/client";import{n as r}from"./index.esm.js";const n=[{value:"string",text:"Text"},{value:"number",text:"Number"},{value:"date",text:"Date"},{value:"datetime",text:"Date & time"},{value:"time",text:"Time"}],o=[{value:r.EQUALS,text:"Equals"},{value:r.NOT_EQUALS,text:"Does not equal"},{value:r.LESS,text:"Less than"},{value:r.LESS_OR_EQUAL,text:"Less than or equal to"},{value:r.GREATER,text:"Greater than"},{value:r.GREATER_OR_EQUAL,text:"Greater than or equal to"}],l="__relative_offset__",h="__specific__",u=[{value:"$now",text:"Now"},{value:"$today",text:"Today"},{value:"$tomorrow",text:"Tomorrow"},{value:"$yesterday",text:"Yesterday"},{value:"$this_week",text:"This week"},{value:"$this_month",text:"This month"},{value:"$this_quarter",text:"This quarter"},{value:"$this_year",text:"This year"}],d=new Set(u.map((t=>t.value))),c=[{value:"next",text:"Next"},{value:"previous",text:"Previous"}],v=[{value:"day",text:"days"},{value:"week",text:"weeks"},{value:"month",text:"months"},{value:"quarter",text:"quarters"},{value:"year",text:"years"}],m=/^\$(next|previous)_(day|week|month|quarter|year)\((\d+)\)$/,f=new Set(["date","datetime","time"]),p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.value={},this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1,this.handleTypeChange=t=>{var e,i;t.stopPropagation(),this.resetOperandState(),this.emit(this.value.operator,void 0,null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"string")},this.handleOperatorChange=t=>{var e;t.stopPropagation();const i=null===(e=t.detail)||void 0===e?void 0:e.value;i?this.emit(i,this.value.operand):this.emit(void 0,void 0)},this.handleScalarOperandChange=t=>{t.stopPropagation();const e=this.value.operator;e&&this.emit(e,this.parseScalarOperand(t.detail))},this.handleOperandKeyChange=t=>{var e;t.stopPropagation();const i=this.value.operator;if(!i)return;const s=null===(e=t.detail)||void 0===e?void 0:e.value;if(this.operandKey=s,s!==l)return s===h?(this.specificDate||(this.specificDate=new Date),void this.emit(i,this.formatSpecific(this.specificDate))):void this.emit(i,s||void 0);this.emit(i,this.relativeOffsetToken())},this.handleDirectionChange=t=>{var e,i;t.stopPropagation(),this.direction=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"next",this.emitRelativeOffset()},this.handleUnitChange=t=>{var e,i;t.stopPropagation(),this.unit=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:"week",this.emitRelativeOffset()},this.handleCountChange=t=>{t.stopPropagation(),this.countInput=t.detail+"";const e=Number.parseInt(this.countInput,10);Number.isNaN(e)||e<1?this.countInvalid=!0:(this.countInvalid=!1,this.count=e,this.emitRelativeOffset())},this.handleSpecificDateChange=t=>{t.stopPropagation();const e=this.value.operator;if(!e)return;const i=t.detail instanceof Date?t.detail:void 0;this.specificDate=i,this.emit(e,i?this.formatSpecific(i):void 0)}}componentWillLoad(){this.syncFromValue(this.value)}onValueChange(t){this.syncFromValue(t)}get valueType(){var t;return null!==(t=this.value.valueType)&&void 0!==t?t:"string"}render(){const t=n.find((t=>t.value===this.valueType)),e=o.find((t=>t.value===this.value.operator));return s("div",{key:"9c6e6b6f160fb05bd4a242a207d16b8420ff41df",class:"rule"},s("limel-select",{key:"703815442cf66522e406223da8ec738eca3d17ff",class:"type-select",label:"Compare as",options:n,value:t,onChange:this.handleTypeChange}),s("limel-select",{key:"371b67efd26c2519ad2dc2a826a8a28d4b17a659",class:"operator-select",label:"When the value",options:o,value:e,onChange:this.handleOperatorChange}),this.renderOperand())}renderOperand(){return this.value.operator?f.has(this.valueType)?this.renderTemporalOperand():this.renderScalarInput():null}renderScalarInput(){return s("limel-input-field",{class:"operand-input",label:"Compared with",type:"number"===this.valueType?"number":"text",value:void 0===this.value.operand?"":this.value.operand+"",onChange:this.handleScalarOperandChange})}renderTemporalOperand(){const t=this.operandOptions(),e=t.find((t=>t.value===this.operandKey));return[s("limel-select",{key:"operand-select",class:"operand-select",label:"Compared with",options:t,value:e,onChange:this.handleOperandKeyChange}),this.renderTemporalSubControl()]}operandOptions(){if("time"===this.valueType)return[{value:"$now",text:"Now"},{value:h,text:"Specific time…"}];const t="datetime"===this.valueType?"Specific date & time…":"Specific date…";return[..."date"===this.valueType?u.filter((t=>"$now"!==t.value)):u,{value:l,text:"Relative offset…"},{value:h,text:t}]}renderTemporalSubControl(){return this.operandKey===l?this.renderOffsetBuilder():this.operandKey===h?this.renderDatePicker():null}renderOffsetBuilder(){const t=c.find((t=>t.value===this.direction)),e=v.find((t=>t.value===this.unit));return s("div",{key:"offset-builder",class:"offset-builder"},s("limel-select",{class:"offset-direction",options:c,value:t,onChange:this.handleDirectionChange}),s("limel-input-field",{class:"offset-count",label:"Amount",type:"number",required:!0,invalid:this.countInvalid,value:this.countInput,onChange:this.handleCountChange}),s("limel-select",{class:"offset-unit",options:v,value:e,onChange:this.handleUnitChange}))}renderDatePicker(){return s("limel-date-picker",{key:"specific-picker",class:"operand-picker",label:"Compared with",type:this.valueType,value:this.specificDate,onChange:this.handleSpecificDateChange})}emitRelativeOffset(){const t=this.value.operator;t&&this.emit(t,this.relativeOffsetToken())}relativeOffsetToken(){return`$${this.direction}_${this.unit}(${this.count})`}parseScalarOperand(t){const e=t+"";if(""===e.trim())return;if("number"!==this.valueType)return e;const i=Number(e);return Number.isNaN(i)?void 0:i}formatSpecific(t){return"datetime"===this.valueType?t.toISOString():"time"===this.valueType?`${x(t.getHours())}:${x(t.getMinutes())}:${x(t.getSeconds())}`:`${t.getFullYear()}-${x(t.getMonth()+1)}-${x(t.getDate())}`}emit(t,e,i=this.valueType){const s={valueType:i};t&&(s.operator=t),void 0!==e&&(s.operand=e),this.change.emit(s)}resetOperandState(){this.operandKey=void 0,this.specificDate=void 0,this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1}syncFromValue(t){const e=null==t?void 0:t.operand;if("string"!=typeof e||""===e)return;if(!f.has(this.valueType))return void(this.operandKey=void 0);const i=m.exec(e);if(i){const[,t,e,s]=i;return this.operandKey=l,this.direction=t,this.unit=e,this.count=Number(s),this.countInput=s,void(this.countInvalid=!1)}d.has(e)?this.operandKey=e:(this.operandKey=h,this.specificDate=this.parseSpecific(e))}parseSpecific(t){const e=new Date(this.specificDateText(t));return Number.isNaN(e.getTime())?void 0:e}specificDateText(t){return"time"===this.valueType?"1970-01-01T"+t:"date"===this.valueType?t+"T00:00:00":t}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return":host{display:block}.rule{display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.offset-builder{display:flex;gap:0.5rem;align-items:flex-end;grid-column:1/-1}.offset-builder .offset-count{max-width:6rem}"}},[1,"limebb-value-comparison-editor",{value:[16],operandKey:[32],direction:[32],unit:[32],count:[32],countInput:[32],countInvalid:[32],specificDate:[32]},void 0,{value:[{onValueChange:0}]}]);function x(t){return(t+"").padStart(2,"0")}const b=p,y=function(){"undefined"!=typeof customElements&&["limebb-value-comparison-editor"].forEach((t=>{"limebb-value-comparison-editor"===t&&(customElements.get(a(t))||customElements.define(a(t),p))}))};export{b as LimebbValueComparisonEditor,y as defineCustomElement}