@limetech/lime-crm-building-blocks 1.95.0 → 1.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-document-item.cjs.entry.js +174 -0
  4. package/dist/cjs/limebb-document-picker.cjs.entry.js +82 -0
  5. package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
  7. package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
  8. package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
  9. package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
  10. package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
  11. package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
  12. package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
  13. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
  14. package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
  15. package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
  16. package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
  17. package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
  18. package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
  19. package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
  20. package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -23
  21. package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/cjs/random-string-aac0a74b.js +24 -0
  24. package/dist/collection/collection-manifest.json +2 -0
  25. package/dist/collection/components/document-picker/document-item/document-item.css +64 -0
  26. package/dist/collection/components/document-picker/document-item/document-item.js +265 -0
  27. package/dist/collection/components/document-picker/document-item/document-item.types.js +1 -0
  28. package/dist/collection/components/document-picker/document-picker.css +139 -0
  29. package/dist/collection/components/document-picker/document-picker.js +304 -0
  30. package/dist/collection/components/document-picker/document.types.js +1 -0
  31. package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
  32. package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
  33. package/dist/collection/components/feed/feed.js +1 -1
  34. package/dist/collection/components/icon-picker/icon-picker.js +1 -1
  35. package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
  36. package/dist/collection/components/info-tile/info-tile.js +1 -1
  37. package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
  38. package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
  39. package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
  40. package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
  41. package/dist/collection/components/locale-picker/locale-picker.js +1 -1
  42. package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
  43. package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
  44. package/dist/collection/components/summary-popover/summary-popover.js +3 -3
  45. package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
  46. package/dist/collection/components/text-editor/text-editor.js +1 -1
  47. package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
  48. package/dist/collection/util/format-bytes.js +36 -0
  49. package/dist/components/document-item.js +190 -0
  50. package/dist/components/feed-item-thumbnail-file-info.js +1 -1
  51. package/dist/components/feed-timeline-item.js +1 -1
  52. package/dist/components/kanban-group.js +1 -1
  53. package/dist/components/kanban-item.js +1 -1
  54. package/dist/components/limebb-document-item.d.ts +11 -0
  55. package/dist/components/limebb-document-item.js +6 -0
  56. package/dist/components/limebb-document-picker.d.ts +11 -0
  57. package/dist/components/limebb-document-picker.js +111 -0
  58. package/dist/components/limebb-feed.js +1 -1
  59. package/dist/components/limebb-icon-picker.js +1 -1
  60. package/dist/components/limebb-info-tile-format.js +1 -1
  61. package/dist/components/limebb-info-tile.js +1 -1
  62. package/dist/components/limebb-lime-query-builder.js +1 -1
  63. package/dist/components/limebb-locale-picker.js +1 -1
  64. package/dist/components/limebb-mention-group-counter.js +2 -2
  65. package/dist/components/limebb-percentage-visualizer.js +2 -2
  66. package/dist/components/limebb-text-editor.js +2 -22
  67. package/dist/components/limebb-trend-indicator.js +1 -1
  68. package/dist/components/live-docs-info.js +2 -2
  69. package/dist/components/notification-item.js +1 -1
  70. package/dist/components/random-string.js +22 -0
  71. package/dist/components/summary-popover.js +3 -3
  72. package/dist/esm/lime-crm-building-blocks.js +1 -1
  73. package/dist/esm/limebb-document-item.entry.js +170 -0
  74. package/dist/esm/limebb-document-picker.entry.js +78 -0
  75. package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
  76. package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
  77. package/dist/esm/limebb-feed.entry.js +1 -1
  78. package/dist/esm/limebb-icon-picker.entry.js +1 -1
  79. package/dist/esm/limebb-info-tile-format.entry.js +1 -1
  80. package/dist/esm/limebb-info-tile.entry.js +1 -1
  81. package/dist/esm/limebb-kanban-group.entry.js +1 -1
  82. package/dist/esm/limebb-kanban-item.entry.js +1 -1
  83. package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
  84. package/dist/esm/limebb-live-docs-info.entry.js +2 -2
  85. package/dist/esm/limebb-locale-picker.entry.js +1 -1
  86. package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
  87. package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
  88. package/dist/esm/limebb-notification-item.entry.js +1 -1
  89. package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
  90. package/dist/esm/limebb-text-editor.entry.js +2 -22
  91. package/dist/esm/limebb-trend-indicator.entry.js +1 -1
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/random-string-f6ef6fbf.js +22 -0
  94. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  95. package/dist/lime-crm-building-blocks/{p-7ef3bace.entry.js → p-00e7e0d4.entry.js} +1 -1
  96. package/dist/lime-crm-building-blocks/p-11ac105b.entry.js +1 -0
  97. package/dist/lime-crm-building-blocks/p-4a82410e.entry.js +1 -0
  98. package/dist/lime-crm-building-blocks/{p-a694aae5.entry.js → p-50d3d61a.entry.js} +1 -1
  99. package/dist/lime-crm-building-blocks/{p-4ccce5cc.entry.js → p-5abe3fff.entry.js} +1 -1
  100. package/dist/lime-crm-building-blocks/{p-a44f543c.entry.js → p-61282e1a.entry.js} +1 -1
  101. package/dist/lime-crm-building-blocks/{p-16199127.entry.js → p-79d4668a.entry.js} +1 -1
  102. package/dist/lime-crm-building-blocks/{p-047c89de.entry.js → p-7c4bdc1b.entry.js} +1 -1
  103. package/dist/lime-crm-building-blocks/{p-8ef39ab8.entry.js → p-8064cbfb.entry.js} +1 -1
  104. package/dist/lime-crm-building-blocks/{p-88cc5b66.entry.js → p-82d33d43.entry.js} +1 -1
  105. package/dist/lime-crm-building-blocks/{p-d6a07ea4.entry.js → p-85b7291c.entry.js} +1 -1
  106. package/dist/lime-crm-building-blocks/{p-7db8652e.entry.js → p-8664381a.entry.js} +1 -1
  107. package/dist/lime-crm-building-blocks/{p-85e11ff7.entry.js → p-88c64360.entry.js} +1 -1
  108. package/dist/lime-crm-building-blocks/p-9d25ed5a.entry.js +1 -0
  109. package/dist/lime-crm-building-blocks/{p-8dce83ad.entry.js → p-9d9f25da.entry.js} +1 -1
  110. package/dist/lime-crm-building-blocks/{p-516210d4.entry.js → p-beb0d164.entry.js} +1 -1
  111. package/dist/lime-crm-building-blocks/{p-abf1c197.entry.js → p-c9126885.entry.js} +1 -1
  112. package/dist/lime-crm-building-blocks/{p-46d2f604.entry.js → p-e35299e0.entry.js} +1 -1
  113. package/dist/lime-crm-building-blocks/p-fbda77a7.js +1 -0
  114. package/dist/lime-crm-building-blocks/{p-d6af09a8.entry.js → p-ff0b244b.entry.js} +1 -1
  115. package/dist/types/components/document-picker/document-item/document-item.d.ts +46 -0
  116. package/dist/types/components/document-picker/document-item/document-item.types.d.ts +37 -0
  117. package/dist/types/components/document-picker/document-picker.d.ts +80 -0
  118. package/dist/types/components/document-picker/document.types.d.ts +2 -0
  119. package/dist/types/components.d.ts +240 -0
  120. package/dist/types/util/format-bytes.d.ts +20 -0
  121. package/package.json +2 -2
  122. package/dist/lime-crm-building-blocks/p-29346b1a.entry.js +0 -1
@@ -0,0 +1,22 @@
1
+ /* eslint-disable sonarjs/pseudo-random */
2
+ const createRandomString = () => {
3
+ var _a;
4
+ if (!('crypto' in window) ||
5
+ typeof ((_a = window.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) !== 'function') {
6
+ return legacyCreateRandomString();
7
+ }
8
+ return 'a_' + crypto.randomUUID(); // ids must start with letters
9
+ };
10
+ function legacyCreateRandomString() {
11
+ const USE_HEX = 36;
12
+ const SKIP_LEADING_ZERODOT = 2;
13
+ const ASCII_A = 97;
14
+ const NUMBER_OF_LETTERS = 26;
15
+ return (String.fromCodePoint(ASCII_A + Math.floor(Math.random() * NUMBER_OF_LETTERS)) +
16
+ Math.random()
17
+ .toString(USE_HEX)
18
+ .slice(Math.max(0, SKIP_LEADING_ZERODOT)) +
19
+ Math.random().toString(USE_HEX).slice(Math.max(0, SKIP_LEADING_ZERODOT)));
20
+ }
21
+
22
+ export { createRandomString as c };
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-1556b545.js";export{s as setNonce}from"./p-1556b545.js";import{g as i}from"./p-e1255160.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["p-a694aae5",[[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"]},null,{highlightedItemId:["highlightedItemIdChanged"]}]]],["p-3a406a20",[[1,"limebb-kanban",{platform:[16],context:[16],groups:[16]}]]],["p-8c8b7115",[[1,"limebb-chat-list",{platform:[16],context:[16],items:[16],loading:[516],isTypingIndicatorVisible:[516,"is-typing-indicator-visible"],lastVisitedTimestamp:[513,"last-visited-timestamp"],order:[513]},null,{items:["handleItemsChange"]}]]],["p-a1818969",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-29346b1a",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],draftIdentifier:[1,"draft-identifier"],triggerMap:[16],customElements:[16],allowInlineImages:[4,"allow-inline-images"],items:[32],highlightedItemIndex:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]},null,{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}]]],["p-8491aaa1",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-568b7520",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-d4016891",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]},null,{items:["handleItemsChange"]}]]],["p-5e4ba110",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-92ec9205",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]},null,{formInfo:["watchFormInfo"],configComponent:["watchconfigComponent"]}]]],["p-42e52b50",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-10ac8b3e",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-46d2f604",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-16199127",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]},null,{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}]]],["p-01cff04f",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-4caa8bbe",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-d6af09a8",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-25e1a434",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-6c56121c",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-4ccce5cc",[[1,"limebb-lime-query-builder",{platform:[16],context:[16],value:[16],label:[1],limetypes:[32],mode:[32],codeValue:[32]}]]],["p-2aa18c2b",[[1,"limebb-loader",{platform:[16],context:[16]}]]],["p-7ef3bace",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-3a620226",[[1,"limebb-mention",{limetype:[1],objectid:[2],limeobject:[32]}]]],["p-d6a07ea4",[[1,"limebb-mention-group-counter",{count:[2],limetype:[16],helperLabel:[1,"helper-label"]}]]],["p-8ef39ab8",[[1,"limebb-percentage-visualizer",{platform:[16],context:[16],value:[520],rangeMax:[514,"range-max"],rangeMin:[514,"range-min"],multiplier:[514],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"],displayPercentageColors:[516,"display-percentage-colors"]},null,{value:["valueChanged"]}]]],["p-abf1c197",[[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"]},null,{value:["valueChanged"]}]]],["p-85e11ff7",[[1,"limebb-summary-popover",{triggerDelay:[514,"trigger-delay"],heading:[513],subheading:[513],image:[16],icon:[513],value:[1],openDirection:[513,"open-direction"],popoverMaxWidth:[513,"popover-max-width"],popoverMaxHeight:[513,"popover-max-height"],actions:[16],isPopoverOpen:[32]}],[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-8dce83ad",[[1,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]]],["p-a44f543c",[[1,"limebb-feed-item-thumbnail-file-info",{description:[1]}]]],["p-516210d4",[[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]}]]],["p-88cc5b66",[[1,"limebb-kanban-group",{platform:[16],context:[16],identifier:[1],heading:[513],help:[1],items:[16],summary:[1],loading:[516],totalCount:[514,"total-count"]}]]],["p-218b7f38",[[1,"limebb-text-editor-picker",{items:[16],open:[516],isSearching:[4,"is-searching"],emptyMessage:[1,"empty-message"]},null,{open:["watchOpen"]}]]],["p-34357744",[[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]]],["p-f402184f",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-7db8652e",[[1,"limebb-live-docs-info"]]],["p-047c89de",[[1,"limebb-notification-item",{platform:[16],context:[16],item:[16]}]]],["p-90e1716a",[[1,"limebb-chat-item",{platform:[16],context:[16],item:[16],helperText:[1,"helper-text"],hasError:[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-292631ea",[[1,"limebb-empty-state",{heading:[513],value:[513],icon:[16]}]]]],e))));
1
+ import{p as e,b as t}from"./p-1556b545.js";export{s as setNonce}from"./p-1556b545.js";import{g as i}from"./p-e1255160.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["p-50d3d61a",[[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"]},null,{highlightedItemId:["highlightedItemIdChanged"]}]]],["p-3a406a20",[[1,"limebb-kanban",{platform:[16],context:[16],groups:[16]}]]],["p-8c8b7115",[[1,"limebb-chat-list",{platform:[16],context:[16],items:[16],loading:[516],isTypingIndicatorVisible:[516,"is-typing-indicator-visible"],lastVisitedTimestamp:[513,"last-visited-timestamp"],order:[513]},null,{items:["handleItemsChange"]}]]],["p-a1818969",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-11ac105b",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],draftIdentifier:[1,"draft-identifier"],triggerMap:[16],customElements:[16],allowInlineImages:[4,"allow-inline-images"],items:[32],highlightedItemIndex:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]},null,{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}]]],["p-8491aaa1",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-4a82410e",[[1,"limebb-document-picker",{platform:[16],context:[16],items:[16],label:[513],helperText:[513,"helper-text"],invalid:[516],required:[516],type:[513]}]]],["p-568b7520",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-d4016891",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]},null,{items:["handleItemsChange"]}]]],["p-5e4ba110",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-92ec9205",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]},null,{formInfo:["watchFormInfo"],configComponent:["watchconfigComponent"]}]]],["p-42e52b50",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-10ac8b3e",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-e35299e0",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-79d4668a",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]},null,{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}]]],["p-01cff04f",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-4caa8bbe",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-ff0b244b",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-25e1a434",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-6c56121c",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-5abe3fff",[[1,"limebb-lime-query-builder",{platform:[16],context:[16],value:[16],label:[1],limetypes:[32],mode:[32],codeValue:[32]}]]],["p-2aa18c2b",[[1,"limebb-loader",{platform:[16],context:[16]}]]],["p-00e7e0d4",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-3a620226",[[1,"limebb-mention",{limetype:[1],objectid:[2],limeobject:[32]}]]],["p-85b7291c",[[1,"limebb-mention-group-counter",{count:[2],limetype:[16],helperLabel:[1,"helper-label"]}]]],["p-8064cbfb",[[1,"limebb-percentage-visualizer",{platform:[16],context:[16],value:[520],rangeMax:[514,"range-max"],rangeMin:[514,"range-min"],multiplier:[514],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"],displayPercentageColors:[516,"display-percentage-colors"]},null,{value:["valueChanged"]}]]],["p-c9126885",[[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"]},null,{value:["valueChanged"]}]]],["p-61282e1a",[[1,"limebb-feed-item-thumbnail-file-info",{description:[1]}]]],["p-88c64360",[[1,"limebb-summary-popover",{triggerDelay:[514,"trigger-delay"],heading:[513],subheading:[513],image:[16],icon:[513],value:[1],openDirection:[513,"open-direction"],popoverMaxWidth:[513,"popover-max-width"],popoverMaxHeight:[513,"popover-max-height"],actions:[16],isPopoverOpen:[32]}],[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-beb0d164",[[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]}]]],["p-82d33d43",[[1,"limebb-kanban-group",{platform:[16],context:[16],identifier:[1],heading:[513],help:[1],items:[16],summary:[1],loading:[516],totalCount:[514,"total-count"]}]]],["p-218b7f38",[[1,"limebb-text-editor-picker",{items:[16],open:[516],isSearching:[4,"is-searching"],emptyMessage:[1,"empty-message"]},null,{open:["watchOpen"]}]]],["p-34357744",[[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]]],["p-f402184f",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-9d25ed5a",[[17,"limebb-document-item",{platform:[16],context:[16],item:[16],type:[513]}]]],["p-8664381a",[[1,"limebb-live-docs-info"]]],["p-7c4bdc1b",[[1,"limebb-notification-item",{platform:[16],context:[16],item:[16]}]]],["p-9d9f25da",[[1,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]]],["p-90e1716a",[[1,"limebb-chat-item",{platform:[16],context:[16],item:[16],helperText:[1,"helper-text"],hasError:[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-292631ea",[[1,"limebb-empty-state",{heading:[513],value:[513],icon:[16]}]]]],e))));
@@ -1 +1 @@
1
- import{r,c as n,h as t}from"./p-1556b545.js";import{c as e}from"./p-1fba0ade.js";import{t as u,c as i,a as f,i as a,g as o,b as c,d as s}from"./p-8044ffbd.js";import{d as v,i as l,a as d,U as b,g as h,S as p,k as j}from"./p-bcc23575.js";import{d as m,i as y,S as g,a as _}from"./p-b31772c8.js";import{i as w,c as A,g as k,a as O,b as x,f as S,h as E}from"./p-5322fd19.js";import{e as D,M,i as R}from"./p-c40a3f4b.js";function U(r){return r}var B,q,C,I=Date.now,L=v?function(r,n){return v(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:U;const N=(B=L,q=0,C=0,function(){var r=I(),n=16-(r-C);if(C=r,n>0){if(++q>=800)return arguments[0]}else q=0;return B.apply(void 0,arguments)});var T=Math.max;function V(r,n,t){if(!m(t))return!1;var e=typeof n;return!!("number"==e?w(t)&&l(n,t.length):"string"==e&&n in t)&&D(t[n],r)}var W=g?g.isConcatSpreadable:void 0;function z(r){return y(r)||A(r)||!!(W&&r&&r[W])}function F(r,n,t,e,u){var i=-1,f=r.length;for(t||(t=z),u||(u=[]);++i<f;){var a=r[i];n>0&&t(a)?n>1?F(a,n-1,t,e,u):d(u,a):e||(u[u.length]=a)}return u}var G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function H(r){return G.test(r)}var J="\\ud800-\\udfff",K="["+J+"]",P="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Q="\\ud83c[\\udffb-\\udfff]",X="[^"+J+"]",Y="(?:\\ud83c[\\udde6-\\uddff]){2}",Z="[\\ud800-\\udbff][\\udc00-\\udfff]",$="(?:"+P+"|"+Q+")?",rr="[\\ufe0e\\ufe0f]?",nr=rr+$+"(?:\\u200d(?:"+[X,Y,Z].join("|")+")"+rr+$+")*",tr="(?:"+[X+P+"?",P,Y,Z,K].join("|")+")",er=RegExp(Q+"(?="+Q+")|"+tr+nr,"g");const ur=function(r){var n,t,e,i,f=H(r=u(r))?function(r){return H(r)?function(r){return r.match(er)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,a=f?f[0]:r.charAt(0),o=f?(n=f,t=1,i=n.length,e=void 0===e?i:e,!t&&e>=i?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return a.toUpperCase()+o};function ir(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new M;++n<t;)this.add(r[n])}function fr(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}ir.prototype.add=ir.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},ir.prototype.has=function(r){return this.__data__.has(r)};var ar=1,or=2;function cr(r,n,t,e,u,i){var f=t&ar,a=r.length,o=n.length;if(a!=o&&!(f&&o>a))return!1;var c=i.get(r),s=i.get(n);if(c&&s)return c==n&&s==r;var v=-1,l=!0,d=t&or?new ir:void 0;for(i.set(r,n),i.set(n,r);++v<a;){var b=r[v],h=n[v];if(e)var p=f?e(h,b,v,n,r,i):e(b,h,v,r,n,i);if(void 0!==p){if(p)continue;l=!1;break}if(d){if(!fr(n,(function(r,n){if(!d.has(n)&&(b===r||u(b,r,t,e,i)))return d.push(n)}))){l=!1;break}}else if(b!==h&&!u(b,h,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function sr(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function vr(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}var lr=1,dr=2,br="[object Boolean]",hr="[object Date]",pr="[object Error]",jr="[object Map]",mr="[object Number]",yr="[object RegExp]",gr="[object Set]",_r="[object String]",wr="[object Symbol]",Ar="[object ArrayBuffer]",kr="[object DataView]",Or=g?g.prototype:void 0,xr=Or?Or.valueOf:void 0,Sr=1,Er=Object.prototype.hasOwnProperty,Dr=1,Mr="[object Arguments]",Rr="[object Array]",Ur="[object Object]",Br=Object.prototype.hasOwnProperty;function qr(r,n,t,e,u){return r===n||(null==r||null==n||!_(r)&&!_(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var f=y(r),a=y(n),o=f?Rr:k(r),c=a?Rr:k(n),s=(o=o==Mr?Ur:o)==Ur,v=(c=c==Mr?Ur:c)==Ur,l=o==c;if(l&&O(r)){if(!O(n))return!1;f=!0,s=!1}if(l&&!s)return i||(i=new p),f||x(r)?cr(r,n,t,e,u,i):function(r,n,t,e,u,i,f){switch(t){case kr:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case Ar:return!(r.byteLength!=n.byteLength||!i(new b(r),new b(n)));case br:case hr:case mr:return D(+r,+n);case pr:return r.name==n.name&&r.message==n.message;case yr:case _r:return r==n+"";case jr:var a=sr;case gr:if(a||(a=vr),r.size!=n.size&&!(e&lr))return!1;var o=f.get(r);if(o)return o==n;e|=dr,f.set(r,n);var c=cr(a(r),a(n),e,u,i,f);return f.delete(r),c;case wr:if(xr)return xr.call(r)==xr.call(n)}return!1}(r,n,o,t,e,u,i);if(!(t&Dr)){var d=s&&Br.call(r,"__wrapped__"),j=v&&Br.call(n,"__wrapped__");if(d||j){var m=d?r.value():r,g=j?n.value():n;return i||(i=new p),u(m,g,t,e,i)}}return!!l&&(i||(i=new p),function(r,n,t,e,u,i){var f=t&Sr,a=h(r),o=a.length;if(o!=h(n).length&&!f)return!1;for(var c=o;c--;){var s=a[c];if(!(f?s in n:Er.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var d=!0;i.set(r,n),i.set(n,r);for(var b=f;++c<o;){var p=r[s=a[c]],j=n[s];if(e)var m=f?e(j,p,s,n,r,i):e(p,j,s,r,n,i);if(!(void 0===m?p===j||u(p,j,t,e,i):m)){d=!1;break}b||(b="constructor"==s)}if(d&&!b){var y=r.constructor,g=n.constructor;y==g||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(r),i.delete(n),d}(r,n,t,e,u,i))}(r,n,t,e,qr,u))}var Cr=1,Ir=2;function Lr(r){return r==r&&!m(r)}function Nr(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Tr(r,n){return null!=r&&n in Object(r)}var Vr=1,Wr=2;function zr(r){return"function"==typeof r?r:null==r?U:"object"==typeof r?y(r)?(u=r[1],a(e=r[0])&&Lr(u)?Nr(f(e),u):function(r){var n=o(r,e);return void 0===n&&n===u?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=i(n,r)).length,a=!1;++e<u;){var o=f(n[e]);if(!(a=null!=r&&t(r,o)))break;r=r[o]}return a||++e!=u?a:!!(u=null==r?0:r.length)&&S(u)&&l(o,u)&&(y(r)||A(r))}(r,n,Tr)}(r,e):qr(u,n,Vr|Wr)}):(t=function(r){for(var n=j(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Lr(u)]}return n}(n=r),1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var f=t[u];if(f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++u<i;){var a=(f=t[u])[0],o=r[a],c=f[1];if(f[2]){if(void 0===o&&!(a in r))return!1}else{var s,v=new p;if(!(void 0===s?qr(c,o,Cr|Ir,e,v):s))return!1}}return!0}(r,0,t)}):function(r){return a(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,e,u}const Fr=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),f=i.length;f--;){var a=i[++e];if(!1===n(u[a],a,u))break}return r};const Gr=function(r,n){if(null==r)return r;if(!w(r))return function(r,n){return r&&Fr(r,n,j)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Hr(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=R(r),f=void 0!==n,a=null===n,o=n==n,c=R(n);if(!a&&!c&&!i&&r>n||i&&f&&o&&!a&&!c||e&&f&&o||!t&&o||!u)return 1;if(!e&&!i&&!c&&r<n||c&&t&&u&&!e&&!i||a&&t&&u||!f&&u||!o)return-1}return 0}function Jr(r,n,t){n=n.length?s(n,(function(r){return y(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[U];var e=-1;n=s(n,E(zr));var u=function(r,n){var t=-1,e=w(r)?Array(r.length):[];return Gr(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++e,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,f=u.length,a=t.length;++e<f;){var o=Hr(u[e],i[e]);if(o)return e>=a?o:o*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(u)}var Kr=function(r){return N(function(r,n,t){return n=T(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=T(e.length-n,0),f=Array(i);++u<i;)f[u]=e[n+u];u=-1;for(var a=Array(n+1);++u<n;)a[u]=e[u];return a[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,a)}}(r,void 0,U),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&V(r,n[0],n[1])?n=[]:t>2&&V(n[0],n[1],n[2])&&(n=[n[0]]),Jr(r,F(n,1),[])}));const Pr=Kr;function Qr(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=ur(u(t[0]).toLowerCase()),t.join(" ")}const Xr=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Qr(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"54389312bd8cae7d92626c67a45bd2455f2a956f",value:n,options:Pr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Xr as limebb_locale_picker}
1
+ import{r,c as n,h as t}from"./p-1556b545.js";import{c as e}from"./p-1fba0ade.js";import{t as u,c as i,a as f,i as a,g as o,b as c,d as s}from"./p-8044ffbd.js";import{d as v,i as l,a as d,U as b,g as h,S as p,k as j}from"./p-bcc23575.js";import{d as m,i as y,S as g,a as _}from"./p-b31772c8.js";import{i as w,c as A,g as k,a as O,b as x,f as S,h as E}from"./p-5322fd19.js";import{e as D,M,i as R}from"./p-c40a3f4b.js";function U(r){return r}var B,q,C,I=Date.now,L=v?function(r,n){return v(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:U;const N=(B=L,q=0,C=0,function(){var r=I(),n=16-(r-C);if(C=r,n>0){if(++q>=800)return arguments[0]}else q=0;return B.apply(void 0,arguments)});var T=Math.max;function V(r,n,t){if(!m(t))return!1;var e=typeof n;return!!("number"==e?w(t)&&l(n,t.length):"string"==e&&n in t)&&D(t[n],r)}var W=g?g.isConcatSpreadable:void 0;function z(r){return y(r)||A(r)||!!(W&&r&&r[W])}function F(r,n,t,e,u){var i=-1,f=r.length;for(t||(t=z),u||(u=[]);++i<f;){var a=r[i];n>0&&t(a)?n>1?F(a,n-1,t,e,u):d(u,a):e||(u[u.length]=a)}return u}var G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function H(r){return G.test(r)}var J="\\ud800-\\udfff",K="["+J+"]",P="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Q="\\ud83c[\\udffb-\\udfff]",X="[^"+J+"]",Y="(?:\\ud83c[\\udde6-\\uddff]){2}",Z="[\\ud800-\\udbff][\\udc00-\\udfff]",$="(?:"+P+"|"+Q+")?",rr="[\\ufe0e\\ufe0f]?",nr=rr+$+"(?:\\u200d(?:"+[X,Y,Z].join("|")+")"+rr+$+")*",tr="(?:"+[X+P+"?",P,Y,Z,K].join("|")+")",er=RegExp(Q+"(?="+Q+")|"+tr+nr,"g");const ur=function(r){var n,t,e,i,f=H(r=u(r))?function(r){return H(r)?function(r){return r.match(er)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,a=f?f[0]:r.charAt(0),o=f?(n=f,t=1,i=n.length,e=void 0===e?i:e,!t&&e>=i?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return a.toUpperCase()+o};function ir(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new M;++n<t;)this.add(r[n])}function fr(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}ir.prototype.add=ir.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},ir.prototype.has=function(r){return this.__data__.has(r)};var ar=1,or=2;function cr(r,n,t,e,u,i){var f=t&ar,a=r.length,o=n.length;if(a!=o&&!(f&&o>a))return!1;var c=i.get(r),s=i.get(n);if(c&&s)return c==n&&s==r;var v=-1,l=!0,d=t&or?new ir:void 0;for(i.set(r,n),i.set(n,r);++v<a;){var b=r[v],h=n[v];if(e)var p=f?e(h,b,v,n,r,i):e(b,h,v,r,n,i);if(void 0!==p){if(p)continue;l=!1;break}if(d){if(!fr(n,(function(r,n){if(!d.has(n)&&(b===r||u(b,r,t,e,i)))return d.push(n)}))){l=!1;break}}else if(b!==h&&!u(b,h,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function sr(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function vr(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}var lr=1,dr=2,br="[object Boolean]",hr="[object Date]",pr="[object Error]",jr="[object Map]",mr="[object Number]",yr="[object RegExp]",gr="[object Set]",_r="[object String]",wr="[object Symbol]",Ar="[object ArrayBuffer]",kr="[object DataView]",Or=g?g.prototype:void 0,xr=Or?Or.valueOf:void 0,Sr=1,Er=Object.prototype.hasOwnProperty,Dr=1,Mr="[object Arguments]",Rr="[object Array]",Ur="[object Object]",Br=Object.prototype.hasOwnProperty;function qr(r,n,t,e,u){return r===n||(null==r||null==n||!_(r)&&!_(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var f=y(r),a=y(n),o=f?Rr:k(r),c=a?Rr:k(n),s=(o=o==Mr?Ur:o)==Ur,v=(c=c==Mr?Ur:c)==Ur,l=o==c;if(l&&O(r)){if(!O(n))return!1;f=!0,s=!1}if(l&&!s)return i||(i=new p),f||x(r)?cr(r,n,t,e,u,i):function(r,n,t,e,u,i,f){switch(t){case kr:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case Ar:return!(r.byteLength!=n.byteLength||!i(new b(r),new b(n)));case br:case hr:case mr:return D(+r,+n);case pr:return r.name==n.name&&r.message==n.message;case yr:case _r:return r==n+"";case jr:var a=sr;case gr:if(a||(a=vr),r.size!=n.size&&!(e&lr))return!1;var o=f.get(r);if(o)return o==n;e|=dr,f.set(r,n);var c=cr(a(r),a(n),e,u,i,f);return f.delete(r),c;case wr:if(xr)return xr.call(r)==xr.call(n)}return!1}(r,n,o,t,e,u,i);if(!(t&Dr)){var d=s&&Br.call(r,"__wrapped__"),j=v&&Br.call(n,"__wrapped__");if(d||j){var m=d?r.value():r,g=j?n.value():n;return i||(i=new p),u(m,g,t,e,i)}}return!!l&&(i||(i=new p),function(r,n,t,e,u,i){var f=t&Sr,a=h(r),o=a.length;if(o!=h(n).length&&!f)return!1;for(var c=o;c--;){var s=a[c];if(!(f?s in n:Er.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var d=!0;i.set(r,n),i.set(n,r);for(var b=f;++c<o;){var p=r[s=a[c]],j=n[s];if(e)var m=f?e(j,p,s,n,r,i):e(p,j,s,r,n,i);if(!(void 0===m?p===j||u(p,j,t,e,i):m)){d=!1;break}b||(b="constructor"==s)}if(d&&!b){var y=r.constructor,g=n.constructor;y==g||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g||(d=!1)}return i.delete(r),i.delete(n),d}(r,n,t,e,u,i))}(r,n,t,e,qr,u))}var Cr=1,Ir=2;function Lr(r){return r==r&&!m(r)}function Nr(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Tr(r,n){return null!=r&&n in Object(r)}var Vr=1,Wr=2;function zr(r){return"function"==typeof r?r:null==r?U:"object"==typeof r?y(r)?(u=r[1],a(e=r[0])&&Lr(u)?Nr(f(e),u):function(r){var n=o(r,e);return void 0===n&&n===u?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=i(n,r)).length,a=!1;++e<u;){var o=f(n[e]);if(!(a=null!=r&&t(r,o)))break;r=r[o]}return a||++e!=u?a:!!(u=null==r?0:r.length)&&S(u)&&l(o,u)&&(y(r)||A(r))}(r,n,Tr)}(r,e):qr(u,n,Vr|Wr)}):(t=function(r){for(var n=j(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Lr(u)]}return n}(n=r),1==t.length&&t[0][2]?Nr(t[0][0],t[0][1]):function(r){return r===n||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var f=t[u];if(f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++u<i;){var a=(f=t[u])[0],o=r[a],c=f[1];if(f[2]){if(void 0===o&&!(a in r))return!1}else{var s,v=new p;if(!(void 0===s?qr(c,o,Cr|Ir,e,v):s))return!1}}return!0}(r,0,t)}):function(r){return a(r)?(n=f(r),function(r){return null==r?void 0:r[n]}):function(r){return function(n){return c(n,r)}}(r);var n}(r);var n,t,e,u}const Fr=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),f=i.length;f--;){var a=i[++e];if(!1===n(u[a],a,u))break}return r};const Gr=function(r,n){if(null==r)return r;if(!w(r))return function(r,n){return r&&Fr(r,n,j)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Hr(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=R(r),f=void 0!==n,a=null===n,o=n==n,c=R(n);if(!a&&!c&&!i&&r>n||i&&f&&o&&!a&&!c||e&&f&&o||!t&&o||!u)return 1;if(!e&&!i&&!c&&r<n||c&&t&&u&&!e&&!i||a&&t&&u||!f&&u||!o)return-1}return 0}function Jr(r,n,t){n=n.length?s(n,(function(r){return y(r)?function(n){return c(n,1===r.length?r[0]:r)}:r})):[U];var e=-1;n=s(n,E(zr));var u=function(r,n){var t=-1,e=w(r)?Array(r.length):[];return Gr(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:s(n,(function(n){return n(r)})),index:++e,value:r}}));return function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,f=u.length,a=t.length;++e<f;){var o=Hr(u[e],i[e]);if(o)return e>=a?o:o*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(u)}var Kr=function(r){return N(function(r,n,t){return n=T(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=T(e.length-n,0),f=Array(i);++u<i;)f[u]=e[n+u];u=-1;for(var a=Array(n+1);++u<n;)a[u]=e[u];return a[n]=t(f),function(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}(r,this,a)}}(r,void 0,U),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&V(r,n[0],n[1])?n=[]:t>2&&V(n[0],n[1],n[2])&&(n=[n[0]]),Jr(r,F(n,1),[])}));const Pr=Kr;function Qr(r,n){if(0===r.length||0===n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=ur(u(t[0]).toLowerCase()),t.join(" ")}const Xr=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Qr(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.includes(r.value)))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{key:"c5fb78e13f1aca2bbb3f51f5c2a1a0958eca0d6e",value:n,options:Pr(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Xr as limebb_locale_picker}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,g as r}from"./p-1556b545.js";import{D as s,M as n,c as o,W as a,H as h,T as c}from"./p-1fba0ade.js";import{A as u,a as f,b as l,E as d,T as v}from"./p-463d3174.js";import{d as b,b as p,k as m,c as g,s as j,a as y,e as w,U as O,S,g as k}from"./p-bcc23575.js";import{i as x,e as I}from"./p-c40a3f4b.js";import{d as T,r as A,S as C,a as E,i as F}from"./p-b31772c8.js";import{d as M,i as P,o as $,g as D,h as N,n as _,a as L}from"./p-5322fd19.js";import{c as R}from"./p-fbda77a7.js";import{i as U}from"./p-1484e300.js";var z=/\s/,G=/^\s+/;var W=NaN,H=/^[-+]0x[0-9a-f]+$/i,Q=/^0b[01]+$/i,q=/^0o[0-7]+$/i,B=parseInt;function K(t){if("number"==typeof t)return t;if(x(t))return W;if(T(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=T(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&z.test(t.charAt(i)););return i}(e)+1).replace(G,""):e;var r=Q.test(t);return r||q.test(t)?B(t.slice(2),r?2:8):H.test(t)?W:+t}var V=Object.create;const J=function(){function t(){}return function(i){if(!T(i))return{};if(V)return V(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}();function X(t,i,e){"__proto__"==i&&b?b(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}var Y=Object.prototype.hasOwnProperty;function Z(t,i,e){var r=t[i];Y.call(t,i)&&I(r,e)&&(void 0!==e||i in t)||X(t,i,e)}function tt(t,i,e,r){var s=!e;e||(e={});for(var n=-1,o=i.length;++n<o;){var a=i[n],h=r?r(e[a],t[a],a,e,t):void 0;void 0===h&&(h=t[a]),s?X(e,a,h):Z(e,a,h)}return e}var it=Object.prototype.hasOwnProperty;function et(t){return P(t)?p(t,!0):function(t){if(!T(t))return function(t){var i=[];if(null!=t)for(var e in Object(t))i.push(e);return i}(t);var i=M(t),e=[];for(var r in t)("constructor"!=r||!i&&it.call(t,r))&&e.push(r);return e}(t)}const rt=$(Object.getPrototypeOf,Object);var st="object"==typeof exports&&exports&&!exports.nodeType&&exports,nt=st&&"object"==typeof module&&module&&!module.nodeType&&module,ot=nt&&nt.exports===st?A.Buffer:void 0,at=ot?ot.allocUnsafe:void 0;const ht=Object.getOwnPropertySymbols?function(t){for(var i=[];t;)y(i,g(t)),t=rt(t);return i}:j;function ct(t){return w(t,et,ht)}var ut=Object.prototype.hasOwnProperty;function ft(t){var i=new t.constructor(t.byteLength);return new O(i).set(new O(t)),i}var lt=/\w*$/,dt=C?C.prototype:void 0,vt=dt?dt.valueOf:void 0,bt="[object Boolean]",pt="[object Date]",mt="[object Map]",gt="[object Number]",jt="[object RegExp]",yt="[object Set]",wt="[object String]",Ot="[object Symbol]",St="[object ArrayBuffer]",kt="[object DataView]",xt="[object Float32Array]",It="[object Float64Array]",Tt="[object Int8Array]",At="[object Int16Array]",Ct="[object Int32Array]",Et="[object Uint8Array]",Ft="[object Uint8ClampedArray]",Mt="[object Uint16Array]",Pt="[object Uint32Array]";var $t=_&&_.isMap;const Dt=$t?N($t):function(t){return E(t)&&"[object Map]"==D(t)};var Nt=_&&_.isSet;const _t=Nt?N(Nt):function(t){return E(t)&&"[object Set]"==D(t)};var Lt=1,Rt=2,Ut=4,zt="[object Arguments]",Gt="[object Function]",Wt="[object GeneratorFunction]",Ht="[object Object]",Qt={};function qt(t,i,e,r,s,n){var o,a=i&Lt,h=i&Rt,c=i&Ut;if(e&&(o=s?e(t,r,s,n):e(t)),void 0!==o)return o;if(!T(t))return t;var u=F(t);if(u){if(o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&ut.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t),!a)return function(t,i){var e=-1,r=t.length;for(i||(i=Array(r));++e<r;)i[e]=t[e];return i}(t,o)}else{var f=D(t),l=f==Gt||f==Wt;if(L(t))return function(t,i){if(i)return t.slice();var e=t.length,r=at?at(e):new t.constructor(e);return t.copy(r),r}(t,a);if(f==Ht||f==zt||l&&!s){if(o=h||l?{}:function(t){return"function"!=typeof t.constructor||M(t)?{}:J(rt(t))}(t),!a)return h?function(t,i){return tt(t,ht(t),i)}(t,function(t,i){return t&&tt(i,et(i),t)}(o,t)):function(t,i){return tt(t,g(t),i)}(t,function(t,i){return t&&tt(i,m(i),t)}(o,t))}else{if(!Qt[f])return s?t:{};o=function(t,i,e){var r,s,n=t.constructor;switch(i){case St:return ft(t);case bt:case pt:return new n(+t);case kt:return function(t,i){var e=i?ft(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case xt:case It:case Tt:case At:case Ct:case Et:case Ft:case Mt:case Pt:return function(t,i){var e=i?ft(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}(t,e);case mt:return new n;case gt:case wt:return new n(t);case jt:return(s=new(r=t).constructor(r.source,lt.exec(r))).lastIndex=r.lastIndex,s;case yt:return new n;case Ot:return vt?Object(vt.call(t)):{}}}(t,f,a)}}n||(n=new S);var d=n.get(t);if(d)return d;n.set(t,o),_t(t)?t.forEach((function(r){o.add(qt(r,i,e,r,t,n))})):Dt(t)&&t.forEach((function(r,s){o.set(s,qt(r,i,e,s,t,n))}));var v=u?void 0:(c?h?ct:k:h?et:m)(t);return function(t,i){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==i(t[e],e););}(v||t,(function(r,s){v&&(r=t[s=r]),Z(o,s,qt(r,i,e,s,t,n))})),o}Qt[zt]=Qt["[object Array]"]=Qt["[object ArrayBuffer]"]=Qt["[object DataView]"]=Qt["[object Boolean]"]=Qt["[object Date]"]=Qt["[object Float32Array]"]=Qt["[object Float64Array]"]=Qt["[object Int8Array]"]=Qt["[object Int16Array]"]=Qt["[object Int32Array]"]=Qt["[object Map]"]=Qt["[object Number]"]=Qt[Ht]=Qt["[object RegExp]"]=Qt["[object Set]"]=Qt["[object String]"]=Qt["[object Symbol]"]=Qt["[object Uint8Array]"]=Qt["[object Uint8ClampedArray]"]=Qt["[object Uint16Array]"]=Qt["[object Uint32Array]"]=!0,Qt["[object Error]"]=Qt[Gt]=Qt["[object WeakMap]"]=!1;const Bt=function(){return A.Date.now()};var Kt=Math.max,Vt=Math.min;function Jt(t,i){return t.label===i}function Xt(t,i){return Object.values(t.properties).find((t=>t&&t.relation&&Jt(t.relation.getLimetype(),i)))}function Yt(t,i){const e=Xt(t,i);return!!e&&function(t){return s(t)&&!n(t)}(e)}class Zt{get limeObjectService(){return this.platform.get(o.LimeObjectRepository)}get queryService(){return this.platform.get(o.Query)}get viewFactoryRegistry(){return this.platform.get(o.ViewFactoryRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e){this.platform=t,this.context=i,this.searchableLimetypes=e,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const r=this.triggerHandler.nodeDefinition;r&&t.insert({node:{tagName:r.customElement.tagName,attributes:r.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!Jt(t,"user")&&Yt(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=Xt(t,"user"),r=t.name;try{const t=await this.queryService.execute({limetype:r,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:a.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[r]:{}};const s=this.createGroupCount(t.objects,e.name);return{[r]:s}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[r]:{}}}}createGroupCount(t,i){const e={};for(const r of t){const{_id:t,[i]:s}=r;e[t]=s.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(U)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const r=i(e,this.context),s=this.getGroupCountComponent(e);return Object.assign(Object.assign({},r),s?{primaryComponent:s}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),r=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],s=Xt(e,"user");if(void 0!==r&&s)return{name:"limebb-mention-group-counter",props:{count:r,limetype:s.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class ti{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(h.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}class ii{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),r=null==e?void 0:e.href;return r&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(r):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new ti(t.fileContent,this.http);await e.initialize();const r=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===r.progress&&(r.state="uploading"),r.progress=t,100===t&&(r.state="finalizing")};const s=await e.upload();return r.fileId=s.id,r.filename=s.filename,r.extension=s.extension,r.contentType=s.contentType,r.size=s.size,r.state="done",r.href=null===(i=s._links)||void 0===i?void 0:i.contents.href,r}get http(){return this.platform.get(o.Http)}}const ei=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){t(this,e),this.change=i(this,"change",7),this.metadataChange=i(this,"metadataChange",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowInlineImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![f,l,u,d,v].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[f]:this.handleEscapeKey,[d]:this.handleEnterOrTabKey,[v]:this.handleEnterOrTabKey,[u]:this.handleArrowKeyPress,[l]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const r=((t,i,e)=>(i+(t===u?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[r])?this.findNonSeparatorIndex(t,r,e+1):r},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),r=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(r)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger)return;const r=this.registeredTriggerMap[this.activeTrigger];try{r.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=R(),this.debouncedSearchFn=function(t,i,e){var r,s,n,o,a,h,c=0,u=!1,f=!1,l=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(i){var e=r,n=s;return r=s=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-h;return void 0===h||e>=i||e<0||f&&t-c>=n}function b(){var t=Bt();if(v(t))return p(t);a=setTimeout(b,function(t){var e=i-(t-h);return f?Vt(e,n-(t-c)):e}(t))}function p(t){return a=void 0,l&&r?d(t):(r=s=void 0,o)}function m(){var t=Bt(),e=v(t);if(r=arguments,s=this,h=t,e){if(void 0===a)return function(t){return c=t,a=setTimeout(b,i),u?d(t):o}(h);if(f)return clearTimeout(a),a=setTimeout(b,i),d(h)}return void 0===a&&(a=setTimeout(b,i)),o}return i=K(i)||0,T(e)&&(u=!!e.leading,n=(f="maxWait"in e)?Kt(K(e.maxWait)||0,i):n,l="trailing"in e?!!e.trailing:l),m.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=h=s=a=void 0},m.flush=function(){return void 0===a?o:p(Bt())},m}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,r;if(this.draftIdentifier){const s=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(r=null===(e=this.context)||void 0===e?void 0:e.limetype)&&void 0!==r?r:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,s,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload)),this.uploadHandler=new ii(this.platform)}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new Zt(this.platform,this.context,this.searchableLimetypes),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[e("limel-text-editor",{key:"ba02d97b3d29f4de9e1457b81c5788c3b5fd527b",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const r=qt(t,5);return Object.assign(Object.assign({},r),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,i,e,r;if(!this.textEditorInnerId)return;const s=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);s&&s!==n?null===(e=this.userDataService)||void 0===e||e.set(this.textEditorInnerId,s):!s&&n&&(null===(r=this.userDataService)||void 0===r||r.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(o.UserDataRepository)}get host(){return r(this)}static get watchers(){return{isPickerOpen:["watchOpen"],editorPickerQuery:["watchQuery"]}}};!function(t,i,e,r){var s,n=arguments.length,o=n<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,r);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(n<3?s(o):n>3?s(i,e,o):s(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)}([c({map:[function(t){return Object.values(t).filter((t=>Jt(t,"user")||Yt(t,"user")))}]})],ei.prototype,"searchableLimetypes",void 0);export{ei as limebb_text_editor}
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as t,H as l}from"./p-1556b545.js";import{c as o}from"./p-fbda77a7.js";const s=class{constructor(l){e(this,l),this.change=i(this,"change",7),this.items=[],this.invalid=!1,this.required=!1,this.type="checkbox",this.handleItemInteract=e=>{e.stopPropagation();const i=e.detail;if(!i)return;let t;t="radio"===this.type?this.items.map((e=>Object.assign(Object.assign({},e),e.id===i.id?{selected:i.selected}:{selected:!1}))).find((e=>e.selected)):this.items.map((e=>e.id===i.id?Object.assign(Object.assign({},e),{selected:i.selected}):e)).filter((e=>e.selected)),this.change.emit(t)},this.renderHelperLine=()=>{if(this.helperText)return t("limel-helper-line",{helperText:this.helperText,helperTextId:this.helperTextId,invalid:this.invalid})},this.helperTextId=o(),this.labelId=o()}render(){return t(l,{key:"28bf6afd1999efc62689bc43b7d63d8c308d3663"},t("limel-notched-outline",{key:"0b6f3d9f0cc88e9e1b782e3d12e7a08853211be6",labelId:this.labelId,label:this.label,required:this.required,invalid:this.invalid,hasFloatingLabel:!0},t("div",{key:"a3d64740ca2139a3435884526b9a6195929d8060",slot:"content",role:"radio"===this.type?"radiogroup":"group","aria-labelledby":this.label?this.labelId:void 0,"aria-describedby":this.helperText?this.helperTextId:void 0},this.renderItems())),this.renderHelperLine())}renderItems(){return this.items.map((e=>t("limebb-document-item",{platform:this.platform,context:this.context,item:e,key:e.id,type:this.type,onInteract:this.handleItemInteract})))}};s.style='@charset "UTF-8";:host(limebb-document-picker:not([invalid]):not([invalid=true])) .limel-notched-outline{--limel-notched-outline-border-color:transparent;--limel-notched-outline-background-color:transparent}div[slot=content]{display:block;width:100%;padding:0.75rem 0.5rem;columns:10rem;gap:clamp(0.25rem, 2vmin, 0.75rem)}div[slot=content]>limebb-document-item{display:block;break-inside:avoid;margin-bottom:clamp(0.25rem, 2vmin, 0.75rem)}@supports (grid-template-rows: masonry){div[slot=content]{column-width:initial;column-gap:initial;display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));grid-template-rows:masonry;grid-auto-flow:dense;gap:0.5rem}div[slot=content]>limebb-document-item{display:block;width:auto;margin:0;break-inside:auto}}:host(limebb-document-picker:focus),:host(limebb-document-picker:focus-visible),:host(limebb-document-picker:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-document-picker){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-document-picker:focus) limel-helper-line,:host(limebb-document-picker:focus-visible) limel-helper-line,:host(limebb-document-picker:focus-within) limel-helper-line,:host(limebb-document-picker:hover) limel-helper-line{will-change:grid-template-rows}';export{s as limebb_document_picker}
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,H as r,g as o}from"./p-1556b545.js";import{c as n}from"./p-1fba0ade.js";import{H as a}from"./p-66352a1e.js";function s(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function l(e,t,i){const r=function(e,t){return+s(e)-+s(t)}(e,t)/6e4;return(o=i?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}const d=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.highlightedItemIdNotFound=t(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,o,n,a,s;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;if((null===(a=null===(n=this.items[t-1])||void 0===n?void 0:n.icon)||void 0===a?void 0:a.name)!==(null===(s=null==e?void 0:e.icon)||void 0===s?void 0:s.name))return!1;const d=new Date(e.timestamp),h=new Date(this.items[t-1].timestamp),m=new Date(h),c=new Date(d);return"DESC"===this.direction?l(m,c)<=this.minutesOfProximity:l(c,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return i(r,{key:"78617233bbe38626901f6d266d495483f2bfd523",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.groupedItems.map((e=>i("section",{class:"date-group",key:`date-group-${e.date}`},i("a",{class:"date-heading"},e.date),e.items.map((({item:e,index:t})=>i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t),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 i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(n.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(n.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"),o=e.at(-1);o&&o.date===r?o.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 o(this)}static get watchers(){return{highlightedItemId:["highlightedItemIdChanged"]}}};d.style=':host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-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)}}';export{d as limebb_feed}
1
+ import{r as e,c as t,h as i,H as r,g as o}from"./p-1556b545.js";import{c as n}from"./p-1fba0ade.js";import{H as a}from"./p-66352a1e.js";function s(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function l(e,t,i){const r=function(e,t){return+s(e)-+s(t)}(e,t)/6e4;return(o=i?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}const d=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.highlightedItemIdNotFound=t(this,"highlightedItemIdNotFound",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.direction="ASC",this.isBundled=(e,t)=>{var i,r,o,n,a,s;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;if((null===(a=null===(n=this.items[t-1])||void 0===n?void 0:n.icon)||void 0===a?void 0:a.name)!==(null===(s=null==e?void 0:e.icon)||void 0===s?void 0:s.name))return!1;const d=new Date(e.timestamp),h=new Date(this.items[t-1].timestamp),m=new Date(h),c=new Date(d);return"DESC"===this.direction?l(m,c)<=this.minutesOfProximity:l(c,m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}connectedCallback(){this.highlighter.registerFeed(this.feedItemElement)}disconnectedCallback(){this.highlighter.unregisterFeed(this.feedItemElement)}render(){return i(r,{key:"8b53e0a71a8921ed0cb7fcd50273c1070eef365e",role:"log","aria-busy":this.loading?"true":"false",style:{"--limebb-feed-highlight-duration":"3000ms"}},this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems())}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("limebb-empty-state",{heading:this.heading,value:this.emptyStateMessage,icon:{name:"typewriter_with_paper",color:"rgb(var(--contrast-800))"}}):void 0}renderFeedItems(){return this.groupedItems.map((e=>i("section",{class:"date-group",key:`date-group-${e.date}`},i("a",{class:"date-heading"},e.date),e.items.map((({item:e,index:t})=>i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,helperText:null==e?void 0:e.helperText,hasError:null==e?void 0:e.hasError,isBundled:this.isBundled(e,t),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 i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(n.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(n.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"),o=e.at(-1);o&&o.date===r?o.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 o(this)}static get watchers(){return{highlightedItemId:["highlightedItemIdChanged"]}}};d.style=':host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-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)}}';export{d as limebb_feed}
@@ -1 +1 @@
1
- import{r as e,c as r,h as t}from"./p-1556b545.js";import{T as i}from"./p-1fba0ade.js";function o(e){if(!(null==e?void 0:e.properties))return{};const r=Object.assign({},e.properties),t={id:"_id",timestamp:"_timestamp",descriptive:"_descriptive",createduser:"_createduser",createdtime:"_createdtime",updateduser:"_updateduser"};for(const[e,i]of Object.entries(t)){const t=r[e];t&&(r[i]=t,delete r[e])}return r}const n=[{value:"=",label:"Equals",icon:"equals"},{value:"!=",label:"Not Equals",icon:"not-equal"},{value:">",label:"Greater Than",icon:"greater-than",applicableTypes:["integer","decimal","date","time"]},{value:">=",label:"Greater or Equal",icon:"greater-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"<",label:"Less Than",icon:"less-than",applicableTypes:["integer","decimal","date","time"]},{value:"<=",label:"Less or Equal",icon:"less-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"IN",label:"In List",icon:"list"},{value:"?",label:"Contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:"=?",label:"Begins With",icon:"-lime-filter-begin",applicableTypes:["string","text"]},{value:"=$",label:"Ends With",icon:"-lime-filter-end",applicableTypes:["string","text"]}];function l(e){return e?"key"in e?function(e){if(!("op"in e)||!("exp"in e))throw new Error("Invalid filter: comparison must have key, op, and exp properties");if(!n.map((e=>e.value)).includes(e.op))throw new Error(`Unsupported filter operator: ${e.op}`);const r=new Set(["key","op","exp","type"]),t=Object.keys(e).filter((e=>!r.has(e)));if(t.length>0)throw new Error(`Unexpected properties in filter comparison: ${t.join(", ")}`);return{filter_type:"comparison",property:e.key,operator:e.op,value:e.exp}}(e):function(e){if(!("op"in e))throw new Error("Invalid filter: filter group must have op property");if(!("exp"in e))throw new Error("Invalid filter: filter group must have exp property");const r=new Set(["op","exp"]),t=Object.keys(e).filter((e=>!r.has(e)));if(t.length>0)throw new Error(`Unexpected properties in filter group: ${t.join(", ")}`);if("!"===e.op){if(Array.isArray(e.exp))throw new TypeError("Invalid NOT filter: exp should be a single expression, not an array");return{filter_type:"NOT",expression:l(e.exp)}}if("AND"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid AND filter: exp must be an array");return{filter_type:"AND",expressions:e.exp.map(l)}}if("OR"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid OR filter: exp must be an array");return{filter_type:"OR",expressions:e.exp.map(l)}}throw new Error(`Unsupported filter operator: ${e.op}`)}(e):{filter_type:"AND",expressions:[]}}const a=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),s=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,d=/^\$me(\.\w+)*$/;function c(e,r,t=!0){const i=Object.keys(e),o=[];if(t){const e=i.filter((e=>e.startsWith("#")&&"#description"!==e));e.length>0&&o.push(`Property '${r}' contains # properties not supported in GUI: ${e.join(", ")}`)}return{keys:i.filter((e=>"_alias"!==e&&!e.startsWith("#"))),guiLimitations:o}}function u(e,r,t,i,o,n=!0){if(""===e){if(n&&null!==r)throw new Error("Empty property name must have null value");return[]}const l=t[e];if(!l)throw new Error(`Property '${e}' does not exist on limetype '${o}'`);return l.relation?function(e,r,t,i,o=!0){if(null===r)return[];if("object"!=typeof r)throw new TypeError(`Relation property '${e}' must be null or an object`);const n=r,{keys:l,guiLimitations:a}=c(n,e,o);if(0===l.length)return a;const s=i.relation.getLimetype();if(!s)throw new Error(`Could not determine related limetype for property '${e}'`);const d={};for(const e of l)d[e]=n[e];const u=p(d,t,s.name,o);return[...a,...u]}(e,r,i,l,n):function(e,r,t=!0){if(null===r)return[];if("object"==typeof r){const{keys:i,guiLimitations:o}=c(r,e,t);if(0===i.length)return o;throw new Error(`Non-relation property '${e}' cannot have nested properties other than _alias or # properties (got: ${i.join(", ")})`)}throw new Error(`Non-relation property '${e}' must be null or an object (got ${typeof r})`)}(e,r,n)}function p(e,r,t,i=!0){const n=r[t];if(!n)throw new Error(`Unknown limetype: ${t}`);const l=o(n),a=[];for(const[o,n]of Object.entries(e)){if(o.startsWith("#"))continue;const e=u(o,n,l,r,t,i);a.push(...e)}return a}function f(e,r,t,i=!0){if(e)if("key"in e){const i=function(e,r,t){if(function(e){return"string"==typeof e&&(a.has(e)||s.test(e)||d.test(e))}(e))return{valid:!0};if("string"!=typeof e||!e.startsWith("%activeObject%"))return{valid:!0};if(!r)return{valid:!0};const i=e.replace(/^%activeObject%\.?/,"");if(!i)return{valid:!0};try{const e=function(e,r,t){if(!t||!r||!e)return;const i=t.split(".");let n,l=e[r];for(const e of i){if(!l)return;if(n=o(l)[e],!n)return;n.relation&&(l=n.relation.getLimetype())}return n}(t,r,i);return e?{valid:!0}:{valid:!1,error:`Property path '${i}' does not exist on limetype '${r}'`}}catch(e){return{valid:!1,error:`Invalid placeholder path: ${e.message}`}}}(e.exp,r,t);if(!i.valid)throw new Error(`Invalid placeholder in filter '${e.key}': ${i.error}`)}else if("exp"in e)if("!"===e.op)f(e.exp,r,t,i);else if("AND"===e.op||"OR"===e.op){const o=e.exp;for(const e of o)f(e,r,t,i)}}const m=class{constructor(t){e(this,t),this.change=r(this,"change",7),this.mode="gui",this.codeValue="",this.switchToGui=()=>{this.mode="gui"},this.switchToCode=()=>{this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=JSON.parse(this.codeValue);this.change.emit(e)}catch(e){}}}get guiModeEnabled(){var e,r,t;return null!==(t=null===(r=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===r?void 0:r.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){this.codeValue=JSON.stringify(this.value||{},null,2),this.guiModeEnabled||(this.mode="code")}render(){const e=this.checkGuiSupport();return t("div",{key:"48ec80b81ffb7765b9965219bfd343be84fb1dd1",class:"lime-query-builder"},this.label&&t("h3",{key:"91034a7b8354b5e40858ededbbf9bcac76682a40",class:"lime-query-builder-label"},this.label),this.guiModeEnabled&&t("div",{key:"167fd8fb8673ba540e9bb1eec3518f0742cf7325",class:"mode-controls"},this.renderModeSwitch(e)),this.guiModeEnabled&&"code"!==this.mode?t("div",{class:"gui-mode"},t("div",{class:"placeholder-message"},t("h4",null,"GUI Mode Not Yet Supported"),t("p",null,"The visual query builder interface is not yet available. Please use Code mode to write queries in JSON format."))):t("div",{class:"code-mode"},this.renderCodeEditor(e)))}checkGuiSupport(){if(!this.limetypes||!this.codeValue)return{valid:!0,guiSupported:!1,validationErrors:[],guiLimitations:[]};let e;try{e=JSON.parse(this.codeValue)}catch(e){return{valid:!1,guiSupported:!1,validationErrors:["Invalid JSON"],guiLimitations:[]}}return function(e,r,t,i=!0){if(!e)return{valid:!0,guiSupported:!0,validationErrors:[],guiLimitations:[]};const o=[],n=[];if(e.limetype&&!r[e.limetype]&&o.push(`Unknown limetype: ${e.limetype}`),void 0===e.offset||e.orderBy||o.push("offset requires orderBy to be specified"),i&&(e.orderBy&&n.push("orderBy is not yet supported in GUI mode"),void 0!==e.offset&&n.push("offset is not yet supported in GUI mode")),e.filter){const n=function(e,r,t,i){const o=[];try{l(e),f(e,r,t,i)}catch(e){o.push(`Invalid filter: ${e.message}`)}return o}(e.filter,t,r,i);o.push(...n)}if(e.responseFormat){const{errors:t,limitations:l}=function(e,r,t,i){const o=[],n=[];try{const o=function(e,r,t,i=!0){const o=[];if(i&&e.aggregates&&o.push("responseFormat.aggregates is not yet supported in GUI mode"),e.object){const n=p(e.object,r,t,i);o.push(...n)}return o}(e,r,t,i);n.push(...o)}catch(e){o.push(`Invalid responseFormat: ${e.message}`)}return{errors:o,limitations:n}}(e.responseFormat,r,e.limetype,i);o.push(...t),n.push(...l)}return{valid:0===o.length,guiSupported:0===n.length,validationErrors:o,guiLimitations:n}}(e,this.limetypes,void 0,this.guiModeEnabled)}renderModeSwitch(e){return t("div",{class:"mode-switch"},t("limel-button",{label:"GUI",primary:"gui"===this.mode,disabled:!e.guiSupported,onClick:this.switchToGui}),t("limel-button",{label:"Code",primary:"code"===this.mode,onClick:this.switchToCode}))}renderCodeEditor(e){return t("div",{class:"code-editor-container"},t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,e.validationErrors.map((e=>t("li",null,e))))),this.guiModeEnabled&&e.valid&&!e.guiSupported&&e.guiLimitations.length>0&&t("div",{class:"gui-limitations"},t("strong",null,"Cannot switch to GUI mode:"),t("ul",null,e.guiLimitations.map((e=>t("li",null,e))))))}};(function(e,r,t,i){var o,n=arguments.length,l=n<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,r,t,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(l=(n<3?o(l):n>3?o(r,t,l):o(r,t))||l);n>3&&l&&Object.defineProperty(r,t,l)})([i()],m.prototype,"limetypes",void 0),m.style=":host(limebb-lime-query-builder){display:block;width:100%}.lime-query-builder{display:flex;flex-direction:column;gap:2rem}.mode-controls{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;background-color:rgb(var(--contrast-100));border-radius:var(--border-radius)}.mode-switch{display:flex;align-items:center;gap:0.5rem}.mode-switch limel-button{min-width:5rem}.mode-switch limel-helper-text{margin-left:1rem;color:rgb(var(--color-red-default))}.gui-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .gui-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .gui-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .gui-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .gui-limitations li{margin:0.25rem 0}.lime-query-builder-label{margin:0;font-size:1.5rem;font-weight:600;color:rgb(var(--contrast-1100))}.placeholder-message{padding:2rem;text-align:center;background-color:rgb(var(--contrast-100));border-radius:var(--border-radius);border:1px solid rgb(var(--contrast-300))}.placeholder-message h4{margin:0 0 1rem 0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1100))}.placeholder-message p{margin:0;color:rgb(var(--contrast-900));line-height:1.5}";export{m as limebb_lime_query_builder}
1
+ import{r as e,c as r,h as t}from"./p-1556b545.js";import{T as i}from"./p-1fba0ade.js";function o(e){if(!(null==e?void 0:e.properties))return{};const r=Object.assign({},e.properties),t={id:"_id",timestamp:"_timestamp",descriptive:"_descriptive",createduser:"_createduser",createdtime:"_createdtime",updateduser:"_updateduser"};for(const[e,i]of Object.entries(t)){const t=r[e];t&&(r[i]=t,delete r[e])}return r}const n=[{value:"=",label:"Equals",icon:"equals"},{value:"!=",label:"Not Equals",icon:"not-equal"},{value:">",label:"Greater Than",icon:"greater-than",applicableTypes:["integer","decimal","date","time"]},{value:">=",label:"Greater or Equal",icon:"greater-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"<",label:"Less Than",icon:"less-than",applicableTypes:["integer","decimal","date","time"]},{value:"<=",label:"Less or Equal",icon:"less-or-equal",applicableTypes:["integer","decimal","date","time"]},{value:"IN",label:"In List",icon:"list"},{value:"?",label:"Contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:"=?",label:"Begins With",icon:"-lime-filter-begin",applicableTypes:["string","text"]},{value:"=$",label:"Ends With",icon:"-lime-filter-end",applicableTypes:["string","text"]}];function l(e){return e?"key"in e?function(e){if(!("op"in e)||!("exp"in e))throw new Error("Invalid filter: comparison must have key, op, and exp properties");if(!n.map((e=>e.value)).includes(e.op))throw new Error(`Unsupported filter operator: ${e.op}`);const r=new Set(["key","op","exp","type"]),t=Object.keys(e).filter((e=>!r.has(e)));if(t.length>0)throw new Error(`Unexpected properties in filter comparison: ${t.join(", ")}`);return{filter_type:"comparison",property:e.key,operator:e.op,value:e.exp}}(e):function(e){if(!("op"in e))throw new Error("Invalid filter: filter group must have op property");if(!("exp"in e))throw new Error("Invalid filter: filter group must have exp property");const r=new Set(["op","exp"]),t=Object.keys(e).filter((e=>!r.has(e)));if(t.length>0)throw new Error(`Unexpected properties in filter group: ${t.join(", ")}`);if("!"===e.op){if(Array.isArray(e.exp))throw new TypeError("Invalid NOT filter: exp should be a single expression, not an array");return{filter_type:"NOT",expression:l(e.exp)}}if("AND"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid AND filter: exp must be an array");return{filter_type:"AND",expressions:e.exp.map(l)}}if("OR"===e.op){if(!Array.isArray(e.exp))throw new TypeError("Invalid OR filter: exp must be an array");return{filter_type:"OR",expressions:e.exp.map(l)}}throw new Error(`Unsupported filter operator: ${e.op}`)}(e):{filter_type:"AND",expressions:[]}}const a=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),s=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,d=/^\$me(\.\w+)*$/;function c(e,r,t=!0){const i=Object.keys(e),o=[];if(t){const e=i.filter((e=>e.startsWith("#")&&"#description"!==e));e.length>0&&o.push(`Property '${r}' contains # properties not supported in GUI: ${e.join(", ")}`)}return{keys:i.filter((e=>"_alias"!==e&&!e.startsWith("#"))),guiLimitations:o}}function u(e,r,t,i,o,n=!0){if(""===e){if(n&&null!==r)throw new Error("Empty property name must have null value");return[]}const l=t[e];if(!l)throw new Error(`Property '${e}' does not exist on limetype '${o}'`);return l.relation?function(e,r,t,i,o=!0){if(null===r)return[];if("object"!=typeof r)throw new TypeError(`Relation property '${e}' must be null or an object`);const n=r,{keys:l,guiLimitations:a}=c(n,e,o);if(0===l.length)return a;const s=i.relation.getLimetype();if(!s)throw new Error(`Could not determine related limetype for property '${e}'`);const d={};for(const e of l)d[e]=n[e];const u=p(d,t,s.name,o);return[...a,...u]}(e,r,i,l,n):function(e,r,t=!0){if(null===r)return[];if("object"==typeof r){const{keys:i,guiLimitations:o}=c(r,e,t);if(0===i.length)return o;throw new Error(`Non-relation property '${e}' cannot have nested properties other than _alias or # properties (got: ${i.join(", ")})`)}throw new Error(`Non-relation property '${e}' must be null or an object (got ${typeof r})`)}(e,r,n)}function p(e,r,t,i=!0){const n=r[t];if(!n)throw new Error(`Unknown limetype: ${t}`);const l=o(n),a=[];for(const[o,n]of Object.entries(e)){if(o.startsWith("#"))continue;const e=u(o,n,l,r,t,i);a.push(...e)}return a}function f(e,r,t,i=!0){if(e)if("key"in e){const i=function(e,r,t){if(function(e){return"string"==typeof e&&(a.has(e)||s.test(e)||d.test(e))}(e))return{valid:!0};if("string"!=typeof e||!e.startsWith("%activeObject%"))return{valid:!0};if(!r)return{valid:!0};const i=e.replace(/^%activeObject%\.?/,"");if(!i)return{valid:!0};try{const e=function(e,r,t){if(!t||!r||!e)return;const i=t.split(".");let n,l=e[r];for(const e of i){if(!l)return;if(n=o(l)[e],!n)return;n.relation&&(l=n.relation.getLimetype())}return n}(t,r,i);return e?{valid:!0}:{valid:!1,error:`Property path '${i}' does not exist on limetype '${r}'`}}catch(e){return{valid:!1,error:`Invalid placeholder path: ${e.message}`}}}(e.exp,r,t);if(!i.valid)throw new Error(`Invalid placeholder in filter '${e.key}': ${i.error}`)}else if("exp"in e)if("!"===e.op)f(e.exp,r,t,i);else if("AND"===e.op||"OR"===e.op){const o=e.exp;for(const e of o)f(e,r,t,i)}}const m=class{constructor(t){e(this,t),this.change=r(this,"change",7),this.mode="gui",this.codeValue="",this.switchToGui=()=>{this.mode="gui"},this.switchToCode=()=>{this.mode="code"},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=JSON.parse(this.codeValue);this.change.emit(e)}catch(e){}}}get guiModeEnabled(){var e,r,t;return null!==(t=null===(r=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===r?void 0:r.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){this.codeValue=JSON.stringify(this.value||{},null,2),this.guiModeEnabled||(this.mode="code")}render(){const e=this.checkGuiSupport();return t("div",{key:"77e93d0277a99b8ff1c777d7ee0b63259755f740",class:"lime-query-builder"},this.label&&t("h3",{key:"4089d69ea3404c656f1c24ec73aef6df2cc8baec",class:"lime-query-builder-label"},this.label),this.guiModeEnabled&&t("div",{key:"5d18a749386651cc1361b712693bad105dba9b03",class:"mode-controls"},this.renderModeSwitch(e)),this.guiModeEnabled&&"code"!==this.mode?t("div",{class:"gui-mode"},t("div",{class:"placeholder-message"},t("h4",null,"GUI Mode Not Yet Supported"),t("p",null,"The visual query builder interface is not yet available. Please use Code mode to write queries in JSON format."))):t("div",{class:"code-mode"},this.renderCodeEditor(e)))}checkGuiSupport(){if(!this.limetypes||!this.codeValue)return{valid:!0,guiSupported:!1,validationErrors:[],guiLimitations:[]};let e;try{e=JSON.parse(this.codeValue)}catch(e){return{valid:!1,guiSupported:!1,validationErrors:["Invalid JSON"],guiLimitations:[]}}return function(e,r,t,i=!0){if(!e)return{valid:!0,guiSupported:!0,validationErrors:[],guiLimitations:[]};const o=[],n=[];if(e.limetype&&!r[e.limetype]&&o.push(`Unknown limetype: ${e.limetype}`),void 0===e.offset||e.orderBy||o.push("offset requires orderBy to be specified"),i&&(e.orderBy&&n.push("orderBy is not yet supported in GUI mode"),void 0!==e.offset&&n.push("offset is not yet supported in GUI mode")),e.filter){const n=function(e,r,t,i){const o=[];try{l(e),f(e,r,t,i)}catch(e){o.push(`Invalid filter: ${e.message}`)}return o}(e.filter,t,r,i);o.push(...n)}if(e.responseFormat){const{errors:t,limitations:l}=function(e,r,t,i){const o=[],n=[];try{const o=function(e,r,t,i=!0){const o=[];if(i&&e.aggregates&&o.push("responseFormat.aggregates is not yet supported in GUI mode"),e.object){const n=p(e.object,r,t,i);o.push(...n)}return o}(e,r,t,i);n.push(...o)}catch(e){o.push(`Invalid responseFormat: ${e.message}`)}return{errors:o,limitations:n}}(e.responseFormat,r,e.limetype,i);o.push(...t),n.push(...l)}return{valid:0===o.length,guiSupported:0===n.length,validationErrors:o,guiLimitations:n}}(e,this.limetypes,void 0,this.guiModeEnabled)}renderModeSwitch(e){return t("div",{class:"mode-switch"},t("limel-button",{label:"GUI",primary:"gui"===this.mode,disabled:!e.guiSupported,onClick:this.switchToGui}),t("limel-button",{label:"Code",primary:"code"===this.mode,onClick:this.switchToCode}))}renderCodeEditor(e){return t("div",{class:"code-editor-container"},t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,e.validationErrors.map((e=>t("li",null,e))))),this.guiModeEnabled&&e.valid&&!e.guiSupported&&e.guiLimitations.length>0&&t("div",{class:"gui-limitations"},t("strong",null,"Cannot switch to GUI mode:"),t("ul",null,e.guiLimitations.map((e=>t("li",null,e))))))}};(function(e,r,t,i){var o,n=arguments.length,l=n<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,r,t,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(l=(n<3?o(l):n>3?o(r,t,l):o(r,t))||l);n>3&&l&&Object.defineProperty(r,t,l)})([i()],m.prototype,"limetypes",void 0),m.style=":host(limebb-lime-query-builder){display:block;width:100%}.lime-query-builder{display:flex;flex-direction:column;gap:2rem}.mode-controls{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;background-color:rgb(var(--contrast-100));border-radius:var(--border-radius)}.mode-switch{display:flex;align-items:center;gap:0.5rem}.mode-switch limel-button{min-width:5rem}.mode-switch limel-helper-text{margin-left:1rem;color:rgb(var(--color-red-default))}.gui-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .gui-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .gui-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .gui-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .gui-limitations li{margin:0.25rem 0}.lime-query-builder-label{margin:0;font-size:1.5rem;font-weight:600;color:rgb(var(--contrast-1100))}.placeholder-message{padding:2rem;text-align:center;background-color:rgb(var(--contrast-100));border-radius:var(--border-radius);border:1px solid rgb(var(--contrast-300))}.placeholder-message h4{margin:0 0 1rem 0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1100))}.placeholder-message p{margin:0;color:rgb(var(--contrast-900));line-height:1.5}";export{m as limebb_lime_query_builder}
@@ -1 +1 @@
1
- import{r as e,h as i}from"./p-1556b545.js";const r=class{constructor(i){e(this,i)}render(){return i("span",{key:"adefcb0955cf6ae663bc9edd1a449e21b352c202"},this.description)}};r.style='@charset "UTF-8";:host(limebb-feed-item-thumbnail-file-info){display:flex;align-items:center;gap:0.5rem;padding:0 0.25rem 0.125rem 0.25rem}span{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:normal;color:rgb(var(--contrast-1000));flex-grow:1;font-size:0.75rem}';export{r as limebb_feed_item_thumbnail_file_info}
1
+ import{r as e,h as i}from"./p-1556b545.js";const r=class{constructor(i){e(this,i)}render(){return i("span",{key:"dd3413d387c4183a82de9b4bc2e3c276f2e0d3e5"},this.description)}};r.style='@charset "UTF-8";:host(limebb-feed-item-thumbnail-file-info){display:flex;align-items:center;gap:0.5rem;padding:0 0.25rem 0.125rem 0.25rem}span{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:normal;color:rgb(var(--contrast-1000));flex-grow:1;font-size:0.75rem}';export{r as limebb_feed_item_thumbnail_file_info}
@@ -1 +1 @@
1
- import{r as t,h as e}from"./p-1556b545.js";import{c as r,Y as i,K as s,W as o}from"./p-1fba0ade.js";import{i as n,a,b as l,c as u,g as h,d as c,e as f}from"./p-5322fd19.js";import{i as d}from"./p-b31772c8.js";var v=Object.prototype.hasOwnProperty;class p{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let r;return r=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),r}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const r=this.objectRepository.getObject(e.limetype,e.id);return null==r?void 0:r.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class b{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class g{constructor(t){this.locale=t}format(t,e){const r=new Date(t);return{prefix:this.formatAffix("prefix",r,e),value:this.formatValue(r,e),suffix:this.formatAffix("suffix",r,e)}}formatValue(t,e){const r=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete r[t];if(e.suffix)for(const t of e.suffix)delete r[t];return new Intl.DateTimeFormat(this.locale,r).format(t)}formatAffix(t,e,r){const i=Object.assign({},r.options);for(const e of Object.keys(i))"hour12"!==e&&((r[t]||[]).includes(e)||delete i[e]);if(0!==Object.values(i).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,i).format(e)}}class m{constructor(t){this.locale=t}format(t,e){var r,i;const s=new Intl.NumberFormat(this.locale,e.options),o=s.formatToParts(t);let n="",a="",l="";for(const t of o)(null===(r=e.prefix)||void 0===r?void 0:r.includes(t.type))?n+=t.value:(null===(i=e.suffix)||void 0===i?void 0:i.includes(t.type))?l+=t.value:a+=t.value;return a||(a=s.format(t),n="",l=""),{prefix:n,value:a,suffix:l}}}class w{constructor(t){this.locale=t}format(t,e){const r=new Intl.RelativeTimeFormat(this.locale,e.options),{value:i,unit:s}=this.getRelativeTime(t),o=r.formatToParts(i,s);let n="",a="",l="";for(const t of o)"literal"!==t.type||a?"literal"===t.type&&a?l+=t.value:a+=t.value:n+=t.value;return a||(a=n||l,n="",l=""),{prefix:n,value:a,suffix:l}}getRelativeTime(t){const e=new Date(t),r=new Date,i=e.getTime()-r.getTime(),s=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of s){const e=i/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class y{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new m(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new g(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new w(this.locale):new b(this.locale)}}var j=function(t,e,r,i){var s,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};const O=class{constructor(e){t(this,e),this.aggregateOperator=o.Count,this.loading=!1,this.error=!1}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,r;const i=this.getFilter(),s=this.getFormattedValue(),o={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==s?void 0:s.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(r=null==s?void 0:s.suffix)||void 0===r?void 0:r.trim())||this.suffix},n=Object.assign(Object.assign({},o),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(i)}),a=Object.assign(Object.assign({},o),{label:this.getLabel(i),link:this.getLink(i),loading:this.loading,value:null==s?void 0:s.value.trim()});return e("limel-info-tile",Object.assign({key:"4fca09fbc878e3960ed691f68c6041ce53eb12da",class:{error:!i||this.error}},!i||this.error?n:a))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new b(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(n(t)&&(d(t)||"string"==typeof t||"function"==typeof t.splice||a(t)||l(t)||u(t)))return!t.length;var e=h(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!f(t).length;for(var r in t)if(v.call(t,r))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){return t?{href:["explorer",t.limetype,t.id].join("/")}:{href:"#"}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new y(this.language).createFormatter(this.format,t)}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new p(this.platform,this.filters)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};j([i({})],O.prototype,"config",void 0),j([s()],O.prototype,"filters",void 0),O.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{O as limebb_info_tile}
1
+ import{r as t,h as e}from"./p-1556b545.js";import{c as r,Y as i,K as s,W as o}from"./p-1fba0ade.js";import{i as n,a,b as l,c as u,g as h,d as c,e as f}from"./p-5322fd19.js";import{i as d}from"./p-b31772c8.js";var v=Object.prototype.hasOwnProperty;class b{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let r;return r=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),r}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const r=this.objectRepository.getObject(e.limetype,e.id);return null==r?void 0:r.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class p{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class g{constructor(t){this.locale=t}format(t,e){const r=new Date(t);return{prefix:this.formatAffix("prefix",r,e),value:this.formatValue(r,e),suffix:this.formatAffix("suffix",r,e)}}formatValue(t,e){const r=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete r[t];if(e.suffix)for(const t of e.suffix)delete r[t];return new Intl.DateTimeFormat(this.locale,r).format(t)}formatAffix(t,e,r){const i=Object.assign({},r.options);for(const e of Object.keys(i))"hour12"!==e&&((r[t]||[]).includes(e)||delete i[e]);if(0!==Object.values(i).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,i).format(e)}}class m{constructor(t){this.locale=t}format(t,e){var r,i;const s=new Intl.NumberFormat(this.locale,e.options),o=s.formatToParts(t);let n="",a="",l="";for(const t of o)(null===(r=e.prefix)||void 0===r?void 0:r.includes(t.type))?n+=t.value:(null===(i=e.suffix)||void 0===i?void 0:i.includes(t.type))?l+=t.value:a+=t.value;return a||(a=s.format(t),n="",l=""),{prefix:n,value:a,suffix:l}}}class w{constructor(t){this.locale=t}format(t,e){const r=new Intl.RelativeTimeFormat(this.locale,e.options),{value:i,unit:s}=this.getRelativeTime(t),o=r.formatToParts(i,s);let n="",a="",l="";for(const t of o)"literal"!==t.type||a?"literal"===t.type&&a?l+=t.value:a+=t.value:n+=t.value;return a||(a=n||l,n="",l=""),{prefix:n,value:a,suffix:l}}getRelativeTime(t){const e=new Date(t),r=new Date,i=e.getTime()-r.getTime(),s=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of s){const e=i/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class y{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new m(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new g(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new w(this.locale):new p(this.locale)}}var j=function(t,e,r,i){var s,o=arguments.length,n=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(o<3?s(n):o>3?s(e,r,n):s(e,r))||n);return o>3&&n&&Object.defineProperty(e,r,n),n};const O=class{constructor(e){t(this,e),this.aggregateOperator=o.Count,this.loading=!1,this.error=!1}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,r;const i=this.getFilter(),s=this.getFormattedValue(),o={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==s?void 0:s.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(r=null==s?void 0:s.suffix)||void 0===r?void 0:r.trim())||this.suffix},n=Object.assign(Object.assign({},o),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(i)}),a=Object.assign(Object.assign({},o),{label:this.getLabel(i),link:this.getLink(i),loading:this.loading,value:null==s?void 0:s.value.trim()});return e("limel-info-tile",Object.assign({key:"bb8b9eede8bdd3fdd17934753e463d134c46f7df",class:{error:!i||this.error}},!i||this.error?n:a))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new p(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(n(t)&&(d(t)||"string"==typeof t||"function"==typeof t.splice||a(t)||l(t)||u(t)))return!t.length;var e=h(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!f(t).length;for(var r in t)if(v.call(t,r))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){return t?{href:["explorer",t.limetype,t.id].join("/")}:{href:"#"}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new y(this.language).createFormatter(this.format,t)}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new b(this.platform,this.filters)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};j([i({})],O.prototype,"config",void 0),j([s()],O.prototype,"filters",void 0),O.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{O as limebb_info_tile}
@@ -1 +1 @@
1
- import{r as t,c as i,h as e,H as r}from"./p-1556b545.js";import{c as o}from"./p-1fba0ade.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"db6570da8224ed4be6e67b0c876f67a74dd226b7",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
1
+ import{r as t,c as i,h as e,H as r}from"./p-1556b545.js";import{c as o}from"./p-1fba0ade.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact",7),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"d6bb98c3ce4ec1b85c828c9f6d65bd4f4a70885d",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
@@ -1 +1 @@
1
- import{r as e,h as r,H as a}from"./p-1556b545.js";import{g as l}from"./p-10e16feb.js";const t=1e-4,o=class{valueChanged(e){this.numValue=this.parseValue(e)}constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"b9876aea271ead3ed18a7fdc59d652b541aed30a",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"64bea0a1e95c001494e8ecee42b6061c6d6c007c",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"d1dc81b554828d9998ad6c1567c49c56a005b547",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=l(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,t)*(100-a):e/Math.max(Math.abs(this.rangeMin),t)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:["valueChanged"]}}};o.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{o as limebb_percentage_visualizer}
1
+ import{r as e,h as r,H as a}from"./p-1556b545.js";import{g as l}from"./p-10e16feb.js";const t=1e-4,o=class{valueChanged(e){this.numValue=this.parseValue(e)}constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"1f66075e6977c4902925fde4410079ffa8187a37",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"b4e64e40684a3011e74dcfe0ef0969699ffb7a92",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"aa60e3dceadca94ed110ee0136e7faf84c745a26",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=l(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,t)*(100-a):e/Math.max(Math.abs(this.rangeMin),t)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:["valueChanged"]}}};o.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{o as limebb_percentage_visualizer}
@@ -1 +1 @@
1
- import{r as e,c as o,h as r}from"./p-1556b545.js";import{L as t,c as a}from"./p-1fba0ade.js";const i=class{constructor(r){e(this,r),this.loadMore=o(this,"loadMore",7),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return[this.renderHelp(),this.renderGroupHeading(),this.renderGroupSummary(),r("div",{key:"e295aac5500dc6a6a09c3a55dffaeff9a997edf6",class:"items"},this.renderKanbanItems(),this.renderSpinner(),this.renderLoadMore())]}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})}renderKanbanItems(){return this.items.map((e=>r("limebb-kanban-item",{tabindex:0,platform:this.platform,context:this.context,item:e,key:e.id})))}renderLoadMore(){if(!(this.loading||this.items.length>=this.totalCount))return r("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.translator.get("webclient.load-more")})}get translator(){return this.platform.get(a.Translate)}};(function(e,o,r,t){var a,i=arguments.length,n=i<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,r,t);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(i<3?a(n):i>3?a(o,r,n):a(o,r))||n);i>3&&n&&Object.defineProperty(o,r,n)})([t()],i.prototype,"limetype",void 0),i.style='@charset "UTF-8";:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover,#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}*{box-sizing:border-box}:host(limebb-kanban-group){position:relative;background-color:rgb(var(--limebb-kanban-group-primary-background));--header-top-right-left-border-radius:0.5rem;--limebb-kanban-group-secondary-background:var(--contrast-300);--limebb-kanban-group-primary-background:var(--contrast-600);scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}: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:22rem}limel-header:has(+.items:empty){width:10rem}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:22rem;overflow-y:auto}.load-more-button,limel-spinner{align-self:center}.load-more-button{--icon-background-color:var(--lime-elevated-surface-background-color)}.items{--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:2rem;flex-grow:1;display:flex;flex-direction:column;gap:0.75rem;padding:var(--limel-top-edge-fade-height) 0.5rem var(--limel-bottom-edge-fade-height) 0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}.items:not(:empty){width:22rem}limebb-kanban-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover,limebb-kanban-item:focus,limebb-kanban-item:focus-visible{will-change:color, background-color, box-shadow, transform}limebb-kanban-item:hover,limebb-kanban-item:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover{box-shadow:var(--button-shadow-hovered)}limebb-kanban-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}limebb-kanban-item:hover,limebb-kanban-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limebb-kanban-item:focus{outline:none}limebb-kanban-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limebb-kanban-item.is-selected{box-shadow:var(--shadow-focused-state)}limebb-kanban-item.is-selected:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}';export{i as limebb_kanban_group}
1
+ import{r as e,c as o,h as r}from"./p-1556b545.js";import{L as t,c as a}from"./p-1fba0ade.js";const i=class{constructor(r){e(this,r),this.loadMore=o(this,"loadMore",7),this.items=[],this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit(this.identifier)}}render(){return[this.renderHelp(),this.renderGroupHeading(),this.renderGroupSummary(),r("div",{key:"f02bad3d0fc87d2359dfb1a9b6ee72c93433d3f2",class:"items"},this.renderKanbanItems(),this.renderSpinner(),this.renderLoadMore())]}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})}renderKanbanItems(){return this.items.map((e=>r("limebb-kanban-item",{tabindex:0,platform:this.platform,context:this.context,item:e,key:e.id})))}renderLoadMore(){if(!(this.loading||this.items.length>=this.totalCount))return r("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.translator.get("webclient.load-more")})}get translator(){return this.platform.get(a.Translate)}};(function(e,o,r,t){var a,i=arguments.length,n=i<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,r):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,r,t);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(n=(i<3?a(n):i>3?a(o,r,n):a(o,r))||n);i>3&&n&&Object.defineProperty(o,r,n)})([t()],i.prototype,"limetype",void 0),i.style='@charset "UTF-8";:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:"";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover,#show-more-button:focus,#show-more-button:focus-visible{will-change:color, background-color, box-shadow, transform}#show-more-button:hover,#show-more-button:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}#show-more-button:hover,#show-more-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}*{box-sizing:border-box}:host(limebb-kanban-group){position:relative;background-color:rgb(var(--limebb-kanban-group-primary-background));--header-top-right-left-border-radius:0.5rem;--limebb-kanban-group-secondary-background:var(--contrast-300);--limebb-kanban-group-primary-background:var(--contrast-600);scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}: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:22rem}limel-header:has(+.items:empty){width:10rem}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:22rem;overflow-y:auto}.load-more-button,limel-spinner{align-self:center}.load-more-button{--icon-background-color:var(--lime-elevated-surface-background-color)}.items{--limel-overflow-mask-vertical:linear-gradient(\n to bottom,\n transparent 0%,\n black calc(0% + var(--limel-top-edge-fade-height, 1rem)),\n black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)),\n transparent 100%\n );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:2rem;flex-grow:1;display:flex;flex-direction:column;gap:0.75rem;padding:var(--limel-top-edge-fade-height) 0.5rem var(--limel-bottom-edge-fade-height) 0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}.items:not(:empty){width:22rem}limebb-kanban-item{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover,limebb-kanban-item:focus,limebb-kanban-item:focus-visible{will-change:color, background-color, box-shadow, transform}limebb-kanban-item:hover,limebb-kanban-item:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover{box-shadow:var(--button-shadow-hovered)}limebb-kanban-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}limebb-kanban-item:hover,limebb-kanban-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limebb-kanban-item:focus{outline:none}limebb-kanban-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limebb-kanban-item.is-selected{box-shadow:var(--shadow-focused-state)}limebb-kanban-item.is-selected:hover{box-shadow:var(--shadow-focused-state), var(--button-shadow-hovered)}';export{i as limebb_kanban_group}
@@ -1 +1 @@
1
- import{r,h as e}from"./p-1556b545.js";const o=class{constructor(e){r(this,e),this.tooltipId="a"+crypto.randomUUID()}render(){const r=this.getLabel();return[e("span",{key:"22b685ed5902c71153903f165e9d6098518aaf92",id:this.tooltipId},r),e("limel-tooltip",{key:"18f8f6f5b28f322151e53253263ca86e62e0cc0a",elementId:this.tooltipId,label:r,helperLabel:this.helperLabel})]}getLabel(){const r=this.limetype.localname;return`${this.count} ${1===this.count?r.singular:r.plural}`}};o.style=":host(limebb-mention-group-counter){order:2;margin-right:-0.5rem;box-sizing:border-box;transition:background-color 0.2s ease;min-width:fit-content;font-size:smaller;border-radius:9rem;cursor:help;padding:0.25rem 0.5rem;line-height:1;border:1px solid rgb(var(--contrast-500))}:host(limebb-mention-group-counter:hover){border-color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-600))}";export{o as limebb_mention_group_counter}
1
+ import{r,h as e}from"./p-1556b545.js";const o=class{constructor(e){r(this,e),this.tooltipId="a"+crypto.randomUUID()}render(){const r=this.getLabel();return[e("span",{key:"101adb63d448656a9acbf43245444f1de399c655",id:this.tooltipId},r),e("limel-tooltip",{key:"232baef721c41aefa38ff7074c8ba925124a6a72",elementId:this.tooltipId,label:r,helperLabel:this.helperLabel})]}getLabel(){const r=this.limetype.localname;return`${this.count} ${1===this.count?r.singular:r.plural}`}};o.style=":host(limebb-mention-group-counter){order:2;margin-right:-0.5rem;box-sizing:border-box;transition:background-color 0.2s ease;min-width:fit-content;font-size:smaller;border-radius:9rem;cursor:help;padding:0.25rem 0.5rem;line-height:1;border:1px solid rgb(var(--contrast-500))}:host(limebb-mention-group-counter:hover){border-color:rgb(var(--contrast-100));background-color:rgb(var(--contrast-600))}";export{o as limebb_mention_group_counter}
@@ -1 +1 @@
1
- import{r as e,h as r}from"./p-1556b545.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"afca6783253565c24917f26fa037d47555cc79ee",class:"header"},r("limel-icon",{key:"e3119195e169a5c1b5534985d92537f4bd71036c",name:"not_showing_video_frames"}),r("h2",{key:"a00ac4d1cccf23e00975d0f95f423b3179170d1f"},"Viewing this file type requires ",r("em",{key:"cd66615d34d92b74943d0d87c796ac5d14f3f314"},"Live Docs"))),r("p",{key:"39d0f82f29ec687cfd209b9c32c36b3be08b23aa"},r("em",{key:"aea7387f90684dc1571434530708971800a09d49"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"a254ad58b3d56386bae9e3ef4113b8d6c70a236e",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
1
+ import{r as e,h as r}from"./p-1556b545.js";const o=class{constructor(r){e(this,r)}render(){return[r("div",{key:"4a4d9cfcfb7b37d5f98cef9a5e963b47125188b7",class:"header"},r("limel-icon",{key:"832c49b5cbd38319e1a36eaff63a41417713d2c3",name:"not_showing_video_frames"}),r("h2",{key:"8e19c71383923d6964df4308fe030e68d69c9e46"},"Viewing this file type requires ",r("em",{key:"9c5c93d320748dc4ff19c682d4228acca653e5b1"},"Live Docs"))),r("p",{key:"157a0f930aba54e52e8c777a90cd3445bf80fa5d"},r("em",{key:"4db4bc76949be8ef1668e9ce7f416c1a3f66aa44"},"Live Docs")," not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!",r("a",{key:"cf2e7bb006ab10ca91b60f740919d937e36974b2",target:"_blank",href:"https://www.lime-technologies.com/en/lime-crm/live-docs/"},"Learn more"))]}};o.style=":host(limebb-live-docs-info){padding:1rem 2rem;display:flex;flex-direction:column;gap:0.5rem;border-style:dashed;border-color:rgb(var(--contrast-700));border-radius:0 0 0.5rem 0.5rem;border-width:0 1px 1px 1px}.header{display:flex;align-items:center;gap:0.5rem}h2,p{margin:0;color:rgb(var(--contrast-1100))}h2{font-size:large;font-weight:300}limel-icon{color:rgb(var(--color-orange-default));width:2rem}a{all:unset;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-sky-default));margin-left:0.5rem}a:hover{color:rgb(var(--color-sky-dark));text-decoration:underline}";export{o as limebb_live_docs_info}
@@ -1 +1 @@
1
- import{r as e,h as o,c as t}from"./p-1556b545.js";const r={expand:"expand",minimize:"minus_math",maximize:"minus_math",newTab:"up_right_arrow",back:"left_arrow",close:"multiply",shrink:"compress",float:"rectangle"},i=class{constructor(t){e(this,t),this.renderAsLink=()=>o("a",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel,href:this.href,target:"newTab"===this.type?"_blank":void 0},this.renderType(),this.renderTooltip()),this.renderAsButton=()=>o("button",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel},this.renderType(),this.renderTooltip()),this.getContainerClassList=()=>({"navigation-button":!0,[this.type]:!0})}render(){return this.href?this.renderAsLink():this.renderAsButton()}renderType(){return this.renderIcon(r[this.type])}renderTooltip(){if(this.tooltipLabel)return o("limel-tooltip",{label:this.tooltipLabel,helperLabel:this.tooltipHelperLabel,elementId:"tooltipId"})}renderIcon(e){return o("limel-icon",{name:e})}static get delegatesFocus(){return!0}};i.style='@charset "UTF-8";.navigation-button{all:unset;isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;height:1.875rem;width:1.875rem;border-radius:50%;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(--navigation-button-background-color, var(--lime-elevated-surface-background-color))}.navigation-button:hover,.navigation-button:focus,.navigation-button:focus-visible{will-change:color, background-color, box-shadow, transform}.navigation-button:hover,.navigation-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.navigation-button:hover{box-shadow:var(--button-shadow-hovered)}.navigation-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.navigation-button:hover,.navigation-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.navigation-button:focus{outline:none}.navigation-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.navigation-button limel-icon{transition:color 0.2s ease, transform 0.2s cubic-bezier(0.84, 0.15, 0.52, 1.42);color:var(--header-menu-icon-color);width:1.25rem}.newTab limel-icon{transition:transform 0.2s ease;transform:scale(0.8);z-index:3}.newTab:before{z-index:2}.newTab::after{z-index:1}.newTab:before,.newTab:after{content:"";transition:transform 0.2s ease, border-color 0.2s ease;position:absolute;width:0.875rem;height:0.875rem;outline:1.5px solid rgb(var(--contrast-900));border-radius:1px;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)))}.newTab:hover limel-icon{color:var(--mdc-theme-primary);transform:translate3d(-0.1rem, 0.1rem, 0) scale(1)}.newTab:hover:before{transform:translate3d(0.125rem, -0.125rem, 0);border-color:rgb(var(--contrast-1000));box-shadow:var(--shadow-depth-8)}.newTab:hover:after{transform:translate3d(-0.15rem, 0.15rem, 0) scale(0.9);border-color:rgb(var(--contrast-700))}.expand:after{transition:transform 0.2s ease;content:"";position:absolute;z-index:1;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)));width:0.75rem;height:0.75rem}.expand:hover limel-icon{color:var(--mdc-theme-primary)}.expand:hover:after{transform:scale(0.5)}.expand:hover limel-icon{transform:scale(1.18)}.minimize:before,.minimize:after,.maximize:before,.maximize:after{content:"";transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease}.minimize limel-icon,.maximize limel-icon{transition:transform 0.2s ease 0.1s}.minimize:before,.maximize:after,.maximize:hover:before{transform:scaleY(1) scaleX(1);z-index:-1;box-sizing:border-box;position:absolute;width:70%;height:60%;border-radius:0.25rem;transform-origin:bottom}.minimize:hover:before,.maximize:before{transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease;transform:scaleY(0.3) scaleX(0.7);background-color:rgb(var(--contrast-500))}.minimize:hover limel-icon,.maximize limel-icon{transform:scaleX(0.8) translate3d(0, 0.4rem, 0)}.maximize limel-icon{color:rgb(var(--contrast-900))}.maximize:hover limel-icon{color:currentColor;transform:scaleX(1.1) translate3d(0, -0.1rem, 0)}.maximize:after{z-index:-2;border:1px dashed rgb(var(--contrast-800))}.close limel-icon{transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{transition-delay:0.1s;content:"";position:absolute;inset:0;border-radius:50%;opacity:0}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.float:after{transition:width 0.2s ease-out, opacity 0.2s ease;content:"";position:absolute;inset:0 0.5rem 0 auto;border-radius:1px;opacity:0.8;transform:translate3d(0, 0, 0);background-color:rgb(var(--contrast-800));width:0.125rem;height:0.6rem;margin:auto}.float:hover:after{width:0.4rem;opacity:1;transform:translate3d(0, 0, 0)}';const a=class{constructor(o){e(this,o),this.actionSelected=t(this,"actionSelected",7),this.triggerDelay=600,this.openDirection="top",this.popoverMaxWidth="20rem",this.popoverMaxHeight="min(35rem, calc(100vh - 2rem))",this.actions=[],this.isPopoverOpen=!1,this.openPopoverWithDelay=e=>{e.stopPropagation(),clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{a.currentOpenPopover&&a.currentOpenPopover!==this&&(a.currentOpenPopover.isPopoverOpen=!1),a.currentOpenPopover=this,this.isPopoverOpen=!0}),this.triggerDelay)},this.resetTimeout=()=>{this.isPopoverOpen||clearTimeout(this.hoverTimeout)},this.onPopoverClose=e=>{e.stopPropagation(),this.isPopoverOpen=!1,a.currentOpenPopover===this&&(a.currentOpenPopover=null)},this.handleCloseClick=e=>{e.stopPropagation(),this.isPopoverOpen=!1},this.handleSelected=e=>{this.actionSelected.emit(e.detail)}}render(){return o("limel-popover",{key:"61b0f5899c7d7a72f924bdfeb029ecce66e7cc9b",style:{"--limebb-summary-popover-timeout":`${this.triggerDelay}ms`},open:this.isPopoverOpen,onClose:this.onPopoverClose,openDirection:this.openDirection},o("div",{key:"3f21df09b18083e568eab2e77f5ea5c58bcbfcad",slot:"trigger",tabIndex:0,onMouseEnter:this.openPopoverWithDelay,onMouseLeave:this.resetTimeout,onFocus:this.openPopoverWithDelay},o("slot",{key:"4f51bda5be27a848a69b57c9798865668cec6a44",name:"trigger"}),o("div",{key:"2b801e9ad42a9823efd7736b062a0fd70a7d6698",class:"opening-countdown-indicator"})),o("limel-card",{key:"c964d35c5671c73a42f5202f51226ccac634eff8",style:{"max-width":this.popoverMaxWidth,"max-height":this.popoverMaxHeight,"min-width":"7rem","min-height":"3rem"},orientation:"landscape",heading:this.heading,subheading:this.subheading,icon:this.icon,value:this.value,image:this.image,actions:this.actions,onActionSelected:this.handleSelected},o("limebb-navigation-button",{key:"3a55e6e6d8bf15284fe826d7065ebd61304d8248",slot:"component",type:"close",style:{"--navigation-button-background-color":"rgb(var(--contrast-100), 0.8)",position:"absolute",top:"0.125rem",right:"0.125rem"},tooltipLabel:"Close",tooltipHelperLabel:"Esc",onClick:this.handleCloseClick})))}};a.currentOpenPopover=null,a.style="limel-popover{--popover-border-radius:0.95rem;--popover-body-background-color:transparent;--popover-box-shadow:var(--shadow-depth-8)}div[slot=trigger]{position:relative;display:flex;align-items:center;justify-content:center}div[slot=trigger] *{min-width:0;min-height:0}.opening-countdown-indicator{position:absolute;inset:auto 0 -0.25rem 0;margin:0 auto;height:0.125rem;border-radius:1rem;transition:width ease-out, opacity ease;transition-duration:120ms;opacity:0;width:0%;background-color:var(--mdc-theme-primary)}div[slot=trigger]:not([aria-expanded=true]):hover .opening-countdown-indicator{transition-duration:var(--limebb-summary-popover-timeout);opacity:1;width:100%}";export{i as limebb_navigation_button,a as limebb_summary_popover}
1
+ import{r as e,h as o,c as t}from"./p-1556b545.js";const r={expand:"expand",minimize:"minus_math",maximize:"minus_math",newTab:"up_right_arrow",back:"left_arrow",close:"multiply",shrink:"compress",float:"rectangle"},i=class{constructor(t){e(this,t),this.renderAsLink=()=>o("a",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel,href:this.href,target:"newTab"===this.type?"_blank":void 0},this.renderType(),this.renderTooltip()),this.renderAsButton=()=>o("button",{class:this.getContainerClassList(),id:"tooltipId","aria-label":this.tooltipLabel&&this.tooltipHelperLabel},this.renderType(),this.renderTooltip()),this.getContainerClassList=()=>({"navigation-button":!0,[this.type]:!0})}render(){return this.href?this.renderAsLink():this.renderAsButton()}renderType(){return this.renderIcon(r[this.type])}renderTooltip(){if(this.tooltipLabel)return o("limel-tooltip",{label:this.tooltipLabel,helperLabel:this.tooltipHelperLabel,elementId:"tooltipId"})}renderIcon(e){return o("limel-icon",{name:e})}static get delegatesFocus(){return!0}};i.style='@charset "UTF-8";.navigation-button{all:unset;isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;height:1.875rem;width:1.875rem;border-radius:50%;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(--navigation-button-background-color, var(--lime-elevated-surface-background-color))}.navigation-button:hover,.navigation-button:focus,.navigation-button:focus-visible{will-change:color, background-color, box-shadow, transform}.navigation-button:hover,.navigation-button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.navigation-button:hover{box-shadow:var(--button-shadow-hovered)}.navigation-button:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.navigation-button:hover,.navigation-button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.navigation-button:focus{outline:none}.navigation-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.navigation-button limel-icon{transition:color 0.2s ease, transform 0.2s cubic-bezier(0.84, 0.15, 0.52, 1.42);color:var(--header-menu-icon-color);width:1.25rem}.newTab limel-icon{transition:transform 0.2s ease;transform:scale(0.8);z-index:3}.newTab:before{z-index:2}.newTab::after{z-index:1}.newTab:before,.newTab:after{content:"";transition:transform 0.2s ease, border-color 0.2s ease;position:absolute;width:0.875rem;height:0.875rem;outline:1.5px solid rgb(var(--contrast-900));border-radius:1px;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)))}.newTab:hover limel-icon{color:var(--mdc-theme-primary);transform:translate3d(-0.1rem, 0.1rem, 0) scale(1)}.newTab:hover:before{transform:translate3d(0.125rem, -0.125rem, 0);border-color:rgb(var(--contrast-1000));box-shadow:var(--shadow-depth-8)}.newTab:hover:after{transform:translate3d(-0.15rem, 0.15rem, 0) scale(0.9);border-color:rgb(var(--contrast-700))}.expand:after{transition:transform 0.2s ease;content:"";position:absolute;z-index:1;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)));width:0.75rem;height:0.75rem}.expand:hover limel-icon{color:var(--mdc-theme-primary)}.expand:hover:after{transform:scale(0.5)}.expand:hover limel-icon{transform:scale(1.18)}.minimize:before,.minimize:after,.maximize:before,.maximize:after{content:"";transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease}.minimize limel-icon,.maximize limel-icon{transition:transform 0.2s ease 0.1s}.minimize:before,.maximize:after,.maximize:hover:before{transform:scaleY(1) scaleX(1);z-index:-1;box-sizing:border-box;position:absolute;width:70%;height:60%;border-radius:0.25rem;transform-origin:bottom}.minimize:hover:before,.maximize:before{transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease;transform:scaleY(0.3) scaleX(0.7);background-color:rgb(var(--contrast-500))}.minimize:hover limel-icon,.maximize limel-icon{transform:scaleX(0.8) translate3d(0, 0.4rem, 0)}.maximize limel-icon{color:rgb(var(--contrast-900))}.maximize:hover limel-icon{color:currentColor;transform:scaleX(1.1) translate3d(0, -0.1rem, 0)}.maximize:after{z-index:-2;border:1px dashed rgb(var(--contrast-800))}.close limel-icon{transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{transition-delay:0.1s;content:"";position:absolute;inset:0;border-radius:50%;opacity:0}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.float:after{transition:width 0.2s ease-out, opacity 0.2s ease;content:"";position:absolute;inset:0 0.5rem 0 auto;border-radius:1px;opacity:0.8;transform:translate3d(0, 0, 0);background-color:rgb(var(--contrast-800));width:0.125rem;height:0.6rem;margin:auto}.float:hover:after{width:0.4rem;opacity:1;transform:translate3d(0, 0, 0)}';const a=class{constructor(o){e(this,o),this.actionSelected=t(this,"actionSelected",7),this.triggerDelay=600,this.openDirection="top",this.popoverMaxWidth="20rem",this.popoverMaxHeight="min(35rem, calc(100vh - 2rem))",this.actions=[],this.isPopoverOpen=!1,this.openPopoverWithDelay=e=>{e.stopPropagation(),clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>{a.currentOpenPopover&&a.currentOpenPopover!==this&&(a.currentOpenPopover.isPopoverOpen=!1),a.currentOpenPopover=this,this.isPopoverOpen=!0}),this.triggerDelay)},this.resetTimeout=()=>{this.isPopoverOpen||clearTimeout(this.hoverTimeout)},this.onPopoverClose=e=>{e.stopPropagation(),this.isPopoverOpen=!1,a.currentOpenPopover===this&&(a.currentOpenPopover=null)},this.handleCloseClick=e=>{e.stopPropagation(),this.isPopoverOpen=!1},this.handleSelected=e=>{this.actionSelected.emit(e.detail)}}render(){return o("limel-popover",{key:"95ea1573956a1e882a8b4dfbdc865ca9ef3e424d",style:{"--limebb-summary-popover-timeout":`${this.triggerDelay}ms`},open:this.isPopoverOpen,onClose:this.onPopoverClose,openDirection:this.openDirection},o("div",{key:"33a1b9fcda6fbe6ecb6b1bd40b8b1290b3f74beb",slot:"trigger",tabIndex:0,onMouseEnter:this.openPopoverWithDelay,onMouseLeave:this.resetTimeout,onFocus:this.openPopoverWithDelay},o("slot",{key:"1037bd3b2ad03b28068b8d4831684d97a76b7f90",name:"trigger"}),o("div",{key:"1dc09768c4268f67a1fdfc5e0bb0120342223005",class:"opening-countdown-indicator"})),o("limel-card",{key:"5176b5be802feabbbfd270eb929975d2e833243e",style:{"max-width":this.popoverMaxWidth,"max-height":this.popoverMaxHeight,"min-width":"7rem","min-height":"3rem"},orientation:"landscape",heading:this.heading,subheading:this.subheading,icon:this.icon,value:this.value,image:this.image,actions:this.actions,onActionSelected:this.handleSelected},o("limebb-navigation-button",{key:"50e76815a3d4b04a7ea2bd044586f014a7e24459",slot:"component",type:"close",style:{"--navigation-button-background-color":"rgb(var(--contrast-100), 0.8)",position:"absolute",top:"0.125rem",right:"0.125rem"},tooltipLabel:"Close",tooltipHelperLabel:"Esc",onClick:this.handleCloseClick})))}};a.currentOpenPopover=null,a.style="limel-popover{--popover-border-radius:0.95rem;--popover-body-background-color:transparent;--popover-box-shadow:var(--shadow-depth-8)}div[slot=trigger]{position:relative;display:flex;align-items:center;justify-content:center}div[slot=trigger] *{min-width:0;min-height:0}.opening-countdown-indicator{position:absolute;inset:auto 0 -0.25rem 0;margin:0 auto;height:0.125rem;border-radius:1rem;transition:width ease-out, opacity ease;transition-duration:120ms;opacity:0;width:0%;background-color:var(--mdc-theme-primary)}div[slot=trigger]:not([aria-expanded=true]):hover .opening-countdown-indicator{transition-duration:var(--limebb-summary-popover-timeout);opacity:1;width:100%}";export{i as limebb_navigation_button,a as limebb_summary_popover}
@@ -0,0 +1 @@
1
+ import{r as i,c as e,h as t,H as o}from"./p-1556b545.js";const r=class{constructor(t){i(this,t),this.interact=e(this,"interact",7),this.type="checkbox",this.handleDocumentItemClick=i=>{if(!this.isUnavailable()){if((null==i?void 0:i.target)instanceof HTMLElement&&(i.target.closest("limel-checkbox")||i.target.closest("limel-radio-button")))return;this.toggleSelection()}},this.handleSelectionControlClick=i=>{var e,t;i.stopPropagation(),this.isUnavailable()||"radio"===this.type&&(null===(e=this.item)||void 0===e?void 0:e.selected)&&(i.preventDefault(),this.forceInputUnchecked(i),this.emitSelectionChange(!(null===(t=this.item)||void 0===t?void 0:t.selected)))},this.handleSelectionControlChange=i=>{var e;if(i.stopPropagation(),this.isUnavailable())return;let t;if("detail"in i&&"boolean"==typeof i.detail)t=i.detail;else{const e=i.target;t=!!(null==e?void 0:e.checked)}"radio"!==this.type||!(null===(e=this.item)||void 0===e?void 0:e.selected)||t?this.emitSelectionChange(t):this.emitSelectionChange(!1)},this.handleKeyDown=i=>{" "!==i.key&&"Enter"!==i.key||(i.preventDefault(),this.isUnavailable()||this.toggleSelection())}}render(){const i=this.isUnavailable();return t(o,{key:"625f38ae7e31ae2b900366df8ad60ff2099a2ce6",id:this.item.id.toString(),class:{"has-image":!!this.item.thumbnail,"has-error":!!this.item.hasError},role:"radio"===this.type?"radio":"checkbox","aria-checked":this.item.selected?"true":"false","aria-disabled":i?"true":"false",tabIndex:i?-1:0},t("limel-card",{key:"b88db5b44b9dfcd858f1e395d0837623dfe9b5a5",image:this.item.thumbnail,clickable:!i,onClick:this.handleDocumentItemClick,onKeyDown:this.handleKeyDown},t("div",{key:"558028048aba88caf524373cbeb7c14ebc371bdb",slot:"component"},this.renderFileSize(),this.renderBooleanInput())),this.renderHelp())}renderBooleanInput(){const i=this.getControlId();return t("radio"===this.type?"limel-radio-button":"limel-checkbox",{id:i,label:this.item.fileName,disabled:this.isUnavailable(),checked:this.item.selected,onClick:this.handleSelectionControlClick,onChange:this.handleSelectionControlChange})}renderFileSize(){var i;const e=function(i,e=1){if(null==i||Number.isNaN(i))return"";if(i<0)return"";if(0===i)return"0 B";const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(t.length-1,Math.floor(Math.log(i)/Math.log(1024))),r=i/Math.pow(1024,o),l=r<10?Math.max(0,e):0;return`${Number.parseFloat(r.toFixed(l))} ${t[o]}`}(null===(i=this.item)||void 0===i?void 0:i.fileSize);if(e)return t("span",{class:"file-size"},e)}renderHelp(){if(this.item.help)return t("limel-help",{value:this.item.help,openDirection:"bottom-end"})}toggleSelection(){var i,e;if("radio"===this.type){const e=!(null===(i=this.item)||void 0===i?void 0:i.selected);return void this.emitSelectionChange(e)}const t=!(null===(e=this.item)||void 0===e?void 0:e.selected);this.emitSelectionChange(t)}emitSelectionChange(i){this.interact.emit(Object.assign(Object.assign({},this.item),{selected:i}))}getControlId(){return`boolean-input-${String(this.item.id)}`}isUnavailable(){var i,e;return(null===(i=this.item)||void 0===i?void 0:i.disabled)||(null===(e=this.item)||void 0===e?void 0:e.hasError)}forceInputUnchecked(i){const e=i.target,t=null==e?void 0:e.closest("limel-radio-button"),o=null==t?void 0:t.querySelector('input[type="radio"]');o&&(o.checked=!1)}static get delegatesFocus(){return!0}};r.style="*{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-document-item){position:relative}limel-card:not([clickable]):not([clickable=true]){pointer-events:none;opacity:0.75}div[slot=component]{pointer-events:none;display:flex;flex-direction:column;margin-top:-0.25rem;padding:0 0.25rem}limel-checkbox,limel-radio-button{width:100%}.file-size{pointer-events:none;width:fit-content;padding:0 0.375rem;font-size:0.6875rem;color:rgb(var(--color-white));border-radius:1rem;opacity:0.75;background-color:rgb(var(--color-glaucous-darker), 0.8);box-shadow:var(--shadow-brighten-edges-outside);backdrop-filter:blur(0.75rem);margin-top:0.5rem}:host(.has-image) .file-size{margin-top:-1.5rem;margin-bottom:0.5rem}limel-help{position:absolute;top:0;right:0}:host(.has-error) limel-card{box-shadow:0 0 0 1px rgb(var(--color-red-light))}:host(.has-error) limel-help{--color-sky-default:var(\n --color-red-default\n );--color-sky-lighter:var(--color-red-lighter);--lime-elevated-surface-background-color:rgb(\n var(--color-yellow-default)\n )}";export{r as limebb_document_item}