@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,190 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+
3
+ /**
4
+ * Format a file size in bytes into a human readable string.
5
+ *
6
+ * Uses base 1024 units (binary prefixes without the "i" designation)
7
+ * and applies adaptive precision: one decimal for values < 10 of the
8
+ * chosen unit, otherwise no decimals.
9
+ *
10
+ * Examples:
11
+ * - 0 => "0 B"
12
+ * - 512 => "512 B"
13
+ * - 1536 => "1.5 KB"
14
+ * - 1048576 => "1 MB"
15
+ * - 5347737600 => "4.98 GB" (value < 10 so one decimal)
16
+ *
17
+ * @param bytes - the size in bytes
18
+ * @param decimals - max number of decimals for small unit values (default: 1)
19
+ * @returns formatted size string
20
+ */
21
+ function formatBytes(bytes, decimals = 1) {
22
+ if (bytes == null || Number.isNaN(bytes)) {
23
+ return '';
24
+ }
25
+ if (bytes < 0) {
26
+ return '';
27
+ }
28
+ if (bytes === 0) {
29
+ return '0 B';
30
+ }
31
+ const k = 1024;
32
+ const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
33
+ const i = Math.min(sizes.length - 1, Math.floor(Math.log(bytes) / Math.log(k)));
34
+ const value = bytes / Math.pow(k, i);
35
+ const precision = value < 10 ? Math.max(0, decimals) : 0; // only keep decimals for small values
36
+ const rounded = Number.parseFloat(value.toFixed(precision));
37
+ return `${rounded} ${sizes[i]}`;
38
+ }
39
+
40
+ const documentItemCss = "*{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 )}";
41
+ const LimebbDocumentItemStyle0 = documentItemCss;
42
+
43
+ const DocumentItemComponent = /*@__PURE__*/ proxyCustomElement(class DocumentItemComponent extends HTMLElement {
44
+ constructor() {
45
+ super();
46
+ this.__registerHost();
47
+ this.__attachShadow();
48
+ this.interact = createEvent(this, "interact", 7);
49
+ /**
50
+ * The semantic role of the list item.
51
+ * - 'radio': renders a radio button for single selection.
52
+ * - 'checkbox': renders a checkbox for multiple selection.
53
+ */
54
+ this.type = 'checkbox';
55
+ this.handleDocumentItemClick = (event) => {
56
+ if (this.isUnavailable()) {
57
+ return;
58
+ }
59
+ if ((event === null || event === void 0 ? void 0 : event.target) instanceof HTMLElement) {
60
+ const isSelectionControl = event.target.closest('limel-checkbox') ||
61
+ event.target.closest('limel-radio-button');
62
+ if (isSelectionControl) {
63
+ return;
64
+ }
65
+ }
66
+ this.toggleSelection();
67
+ };
68
+ this.handleSelectionControlClick = (event) => {
69
+ var _a, _b;
70
+ event.stopPropagation();
71
+ if (this.isUnavailable()) {
72
+ return;
73
+ }
74
+ if (this.type === 'radio' && ((_a = this.item) === null || _a === void 0 ? void 0 : _a.selected)) {
75
+ event.preventDefault();
76
+ this.forceInputUnchecked(event);
77
+ this.emitSelectionChange(!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected));
78
+ }
79
+ };
80
+ this.handleSelectionControlChange = (event) => {
81
+ var _a;
82
+ event.stopPropagation();
83
+ if (this.isUnavailable()) {
84
+ return;
85
+ }
86
+ let isChecked;
87
+ if ('detail' in event &&
88
+ typeof event.detail === 'boolean') {
89
+ isChecked = event.detail;
90
+ }
91
+ else {
92
+ const input = event.target;
93
+ isChecked = !!(input === null || input === void 0 ? void 0 : input.checked);
94
+ }
95
+ if (this.type === 'radio' && ((_a = this.item) === null || _a === void 0 ? void 0 : _a.selected) && !isChecked) {
96
+ this.emitSelectionChange(false);
97
+ return;
98
+ }
99
+ this.emitSelectionChange(isChecked);
100
+ };
101
+ this.handleKeyDown = (event) => {
102
+ if (event.key !== ' ' && event.key !== 'Enter') {
103
+ return;
104
+ }
105
+ event.preventDefault();
106
+ if (this.isUnavailable()) {
107
+ return;
108
+ }
109
+ this.toggleSelection();
110
+ };
111
+ }
112
+ render() {
113
+ const isUnavailable = this.isUnavailable();
114
+ return (h(Host, { key: '625f38ae7e31ae2b900366df8ad60ff2099a2ce6', id: this.item.id.toString(), class: {
115
+ 'has-image': !!this.item.thumbnail,
116
+ 'has-error': !!this.item.hasError,
117
+ }, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: 'b88db5b44b9dfcd858f1e395d0837623dfe9b5a5', image: this.item.thumbnail, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: '558028048aba88caf524373cbeb7c14ebc371bdb', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
118
+ }
119
+ renderBooleanInput() {
120
+ const id = this.getControlId();
121
+ if (this.type === 'radio') {
122
+ return (h("limel-radio-button", { id: id, label: this.item.fileName, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
123
+ }
124
+ return (h("limel-checkbox", { id: id, label: this.item.fileName, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
125
+ }
126
+ renderFileSize() {
127
+ var _a;
128
+ const formattedFileSize = formatBytes((_a = this.item) === null || _a === void 0 ? void 0 : _a.fileSize);
129
+ if (!formattedFileSize) {
130
+ return;
131
+ }
132
+ return h("span", { class: "file-size" }, formattedFileSize);
133
+ }
134
+ renderHelp() {
135
+ if (!this.item.help) {
136
+ return;
137
+ }
138
+ return h("limel-help", { value: this.item.help, openDirection: "bottom-end" });
139
+ }
140
+ toggleSelection() {
141
+ var _a, _b;
142
+ if (this.type === 'radio') {
143
+ const nextSelectedState = !((_a = this.item) === null || _a === void 0 ? void 0 : _a.selected);
144
+ this.emitSelectionChange(nextSelectedState);
145
+ return;
146
+ }
147
+ const nextSelectedState = !((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected);
148
+ this.emitSelectionChange(nextSelectedState);
149
+ }
150
+ emitSelectionChange(selected) {
151
+ this.interact.emit(Object.assign(Object.assign({}, this.item), { selected }));
152
+ }
153
+ getControlId() {
154
+ return `boolean-input-${String(this.item.id)}`;
155
+ }
156
+ isUnavailable() {
157
+ var _a, _b;
158
+ return ((_a = this.item) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.hasError);
159
+ }
160
+ forceInputUnchecked(event) {
161
+ const target = event.target;
162
+ const host = target === null || target === void 0 ? void 0 : target.closest('limel-radio-button');
163
+ const input = host === null || host === void 0 ? void 0 : host.querySelector('input[type="radio"]');
164
+ if (input) {
165
+ input.checked = false;
166
+ }
167
+ }
168
+ static get delegatesFocus() { return true; }
169
+ static get style() { return LimebbDocumentItemStyle0; }
170
+ }, [17, "limebb-document-item", {
171
+ "platform": [16],
172
+ "context": [16],
173
+ "item": [16],
174
+ "type": [513]
175
+ }]);
176
+ function defineCustomElement() {
177
+ if (typeof customElements === "undefined") {
178
+ return;
179
+ }
180
+ const components = ["limebb-document-item"];
181
+ components.forEach(tagName => { switch (tagName) {
182
+ case "limebb-document-item":
183
+ if (!customElements.get(tagName)) {
184
+ customElements.define(tagName, DocumentItemComponent);
185
+ }
186
+ break;
187
+ } });
188
+ }
189
+
190
+ export { DocumentItemComponent as D, defineCustomElement as d };
@@ -10,7 +10,7 @@ const FeedItemThumbnailFileInfo = /*@__PURE__*/ proxyCustomElement(class FeedIte
10
10
  this.__attachShadow();
11
11
  }
12
12
  render() {
13
- return h("span", { key: 'adefcb0955cf6ae663bc9edd1a449e21b352c202' }, this.description);
13
+ return h("span", { key: 'dd3413d387c4183a82de9b4bc2e3c276f2e0d3e5' }, this.description);
14
14
  }
15
15
  static get style() { return LimebbFeedItemThumbnailFileInfoStyle0; }
16
16
  }, [1, "limebb-feed-item-thumbnail-file-info", {
@@ -193,7 +193,7 @@ const FeedTimelineItem = /*@__PURE__*/ proxyCustomElement(class FeedTimelineItem
193
193
  render() {
194
194
  var _a, _b;
195
195
  const helperTextId = `helper-text-${this.item.id}`;
196
- return (h(Host, { key: 'fcf4ac09958d87a2173381127bcbb589494923f5', id: this.item.id, class: {
196
+ return (h(Host, { key: 'ae530cfe3aa5c54f8c1d3ceae6630b606f5ca57f', id: this.item.id, class: {
197
197
  'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
198
198
  'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
199
199
  'shows-less': !this.showMore,
@@ -37,7 +37,7 @@ const KanbanGroup = /*@__PURE__*/ proxyCustomElement(class KanbanGroup extends H
37
37
  this.renderHelp(),
38
38
  this.renderGroupHeading(),
39
39
  this.renderGroupSummary(),
40
- h("div", { key: 'e295aac5500dc6a6a09c3a55dffaeff9a997edf6', class: "items" }, this.renderKanbanItems(), this.renderSpinner(), this.renderLoadMore()),
40
+ h("div", { key: 'f02bad3d0fc87d2359dfb1a9b6ee72c93433d3f2', class: "items" }, this.renderKanbanItems(), this.renderSpinner(), this.renderLoadMore()),
41
41
  ];
42
42
  }
43
43
  renderGroupSummary() {
@@ -55,7 +55,7 @@ const KanbanItemComponent = /*@__PURE__*/ proxyCustomElement(class KanbanItemCom
55
55
  }
56
56
  render() {
57
57
  var _a, _b;
58
- return (h(Host, { key: '15d9b0f4cb7074024a1869ca02e08bc60d6c3153', id: this.item.id.toString(), class: {
58
+ return (h(Host, { key: '4219ff4f6c63ffdf95d24ad12000c4e23b1b53c2', id: this.item.id.toString(), class: {
59
59
  'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
60
60
  'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
61
61
  }, style: {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface LimebbDocumentItem extends Components.LimebbDocumentItem, HTMLElement {}
4
+ export const LimebbDocumentItem: {
5
+ prototype: LimebbDocumentItem;
6
+ new (): LimebbDocumentItem;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { D as DocumentItemComponent, d as defineCustomElement$1 } from './document-item.js';
2
+
3
+ const LimebbDocumentItem = DocumentItemComponent;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { LimebbDocumentItem, defineCustomElement };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface LimebbDocumentPicker extends Components.LimebbDocumentPicker, HTMLElement {}
4
+ export const LimebbDocumentPicker: {
5
+ prototype: LimebbDocumentPicker;
6
+ new (): LimebbDocumentPicker;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,111 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { c as createRandomString } from './random-string.js';
3
+ import { d as defineCustomElement$2 } from './document-item.js';
4
+
5
+ const documentPickerCss = "@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}";
6
+ const LimebbDocumentPickerStyle0 = documentPickerCss;
7
+
8
+ const DocumentPicker = /*@__PURE__*/ proxyCustomElement(class DocumentPicker extends HTMLElement {
9
+ constructor() {
10
+ super();
11
+ this.__registerHost();
12
+ this.__attachShadow();
13
+ this.change = createEvent(this, "change", 7);
14
+ /**
15
+ * The list of document items to display in the picker.
16
+ */
17
+ this.items = [];
18
+ /**
19
+ * Set to `true` to indicate that the current selection is invalid.
20
+ */
21
+ this.invalid = false;
22
+ /**
23
+ * Set to `true` to indicate that selecting an item is required.
24
+ */
25
+ this.required = false;
26
+ /**
27
+ * Defines whether the picker allows single or multiple selection.
28
+ * - 'radio': Allows single selection within a group.
29
+ * - 'checkbox': Allows multiple selection.
30
+ */
31
+ this.type = 'checkbox';
32
+ this.handleItemInteract = (event) => {
33
+ event.stopPropagation();
34
+ const interactedItem = event.detail;
35
+ if (!interactedItem) {
36
+ return;
37
+ }
38
+ let updatedItems;
39
+ if (this.type === 'radio') {
40
+ // For radio buttons: either select the clicked item (and deselect others)
41
+ // or allow deselecting if clicking the already selected item
42
+ updatedItems = this.items
43
+ .map((item) => {
44
+ if (item.id === interactedItem.id) {
45
+ return Object.assign(Object.assign({}, item), { selected: interactedItem.selected });
46
+ }
47
+ return Object.assign(Object.assign({}, item), { selected: false });
48
+ })
49
+ .find((item) => item.selected);
50
+ }
51
+ else {
52
+ updatedItems = this.items
53
+ .map((item) => {
54
+ if (item.id === interactedItem.id) {
55
+ return Object.assign(Object.assign({}, item), { selected: interactedItem.selected });
56
+ }
57
+ return item;
58
+ })
59
+ .filter((item) => item.selected);
60
+ }
61
+ this.change.emit(updatedItems);
62
+ };
63
+ this.renderHelperLine = () => {
64
+ if (!this.helperText) {
65
+ return;
66
+ }
67
+ return (h("limel-helper-line", { helperText: this.helperText, helperTextId: this.helperTextId, invalid: this.invalid }));
68
+ };
69
+ this.helperTextId = createRandomString();
70
+ this.labelId = createRandomString();
71
+ }
72
+ render() {
73
+ return (h(Host, { key: '28bf6afd1999efc62689bc43b7d63d8c308d3663' }, h("limel-notched-outline", { key: '0b6f3d9f0cc88e9e1b782e3d12e7a08853211be6', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("div", { key: 'a3d64740ca2139a3435884526b9a6195929d8060', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
74
+ }
75
+ renderItems() {
76
+ return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.id, type: this.type, onInteract: this.handleItemInteract })));
77
+ }
78
+ static get style() { return LimebbDocumentPickerStyle0; }
79
+ }, [1, "limebb-document-picker", {
80
+ "platform": [16],
81
+ "context": [16],
82
+ "items": [16],
83
+ "label": [513],
84
+ "helperText": [513, "helper-text"],
85
+ "invalid": [516],
86
+ "required": [516],
87
+ "type": [513]
88
+ }]);
89
+ function defineCustomElement$1() {
90
+ if (typeof customElements === "undefined") {
91
+ return;
92
+ }
93
+ const components = ["limebb-document-picker", "limebb-document-item"];
94
+ components.forEach(tagName => { switch (tagName) {
95
+ case "limebb-document-picker":
96
+ if (!customElements.get(tagName)) {
97
+ customElements.define(tagName, DocumentPicker);
98
+ }
99
+ break;
100
+ case "limebb-document-item":
101
+ if (!customElements.get(tagName)) {
102
+ defineCustomElement$2();
103
+ }
104
+ break;
105
+ } });
106
+ }
107
+
108
+ const LimebbDocumentPicker = DocumentPicker;
109
+ const defineCustomElement = defineCustomElement$1;
110
+
111
+ export { LimebbDocumentPicker, defineCustomElement };
@@ -244,7 +244,7 @@ const Feed = /*@__PURE__*/ proxyCustomElement(class Feed extends HTMLElement {
244
244
  this.highlighter.unregisterFeed(this.feedItemElement);
245
245
  }
246
246
  render() {
247
- return (h(Host, { key: '78617233bbe38626901f6d266d495483f2bfd523', role: "log", "aria-busy": this.loading ? 'true' : 'false', style: {
247
+ return (h(Host, { key: '8b53e0a71a8921ed0cb7fcd50273c1070eef365e', role: "log", "aria-busy": this.loading ? 'true' : 'false', style: {
248
248
  '--limebb-feed-highlight-duration': `${ITEM_HIGHLIGHT_DURATION}ms`,
249
249
  } }, this.renderLoadMore(), this.renderEmptyFeedMessage(), this.renderSpinner(), this.renderFeedItems()));
250
250
  }
@@ -52965,7 +52965,7 @@ const IconPicker = /*@__PURE__*/ proxyCustomElement(class IconPicker extends HTM
52965
52965
  icon: this.value,
52966
52966
  };
52967
52967
  }
52968
- return (h("limel-picker", { key: '4be7dd4855e9fb6bbb0f6167a9c3e478f262b23c', label: this.label, helperText: this.helperText, disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, required: this.required, value: value, searcher: this.search, onChange: this.handleChange, badgeIcons: false, leadingIcon: "search", searchLabel: "Start typing to find the right icon" }));
52968
+ return (h("limel-picker", { key: 'cfb1562215c69464d6736ec96fd39e0d45c92d7d', label: this.label, helperText: this.helperText, disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, required: this.required, value: value, searcher: this.search, onChange: this.handleChange, badgeIcons: false, leadingIcon: "search", searchLabel: "Start typing to find the right icon" }));
52969
52969
  }
52970
52970
  }, [1, "limebb-icon-picker", {
52971
52971
  "value": [1],
@@ -94,7 +94,7 @@ const InfoTileAdminConfig = /*@__PURE__*/ proxyCustomElement(class InfoTileAdmin
94
94
  },
95
95
  ];
96
96
  return [
97
- h("limel-button-group", { key: '74a794bc61c9692587bf35e54712c649d3768f9b', value: buttons.filter(this.isValidButton), onChange: this.handleChangeType }),
97
+ h("limel-button-group", { key: '8c7bba2402e84e73df2bc5e906780aeb66b1af58', value: buttons.filter(this.isValidButton), onChange: this.handleChangeType }),
98
98
  this.renderFormatConfig(),
99
99
  ];
100
100
  }
@@ -377,7 +377,7 @@ const InfoTile = /*@__PURE__*/ proxyCustomElement(class InfoTile extends HTMLEle
377
377
  const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
378
378
  const normalProps = Object.assign(Object.assign({}, baseProps), { label: this.getLabel(filter), link: this.getLink(filter), loading: this.loading, value: value === null || value === void 0 ? void 0 : value.value.trim() });
379
379
  const props = !filter || this.error ? errorProps : normalProps;
380
- return (h("limel-info-tile", Object.assign({ key: '4fca09fbc878e3960ed691f68c6041ce53eb12da', class: { error: !filter || this.error } }, props)));
380
+ return (h("limel-info-tile", Object.assign({ key: 'bb8b9eede8bdd3fdd17934753e463d134c46f7df', class: { error: !filter || this.error } }, props)));
381
381
  }
382
382
  getFormattedValue() {
383
383
  if (!this.value && this.value !== 0) {
@@ -654,7 +654,7 @@ const LimeQueryBuilder = /*@__PURE__*/ proxyCustomElement(class LimeQueryBuilder
654
654
  }
655
655
  render() {
656
656
  const guiSupported = this.checkGuiSupport();
657
- return (h("div", { key: '48ec80b81ffb7765b9965219bfd343be84fb1dd1', class: "lime-query-builder" }, this.label && (h("h3", { key: '91034a7b8354b5e40858ededbbf9bcac76682a40', class: "lime-query-builder-label" }, this.label)), this.guiModeEnabled && (h("div", { key: '167fd8fb8673ba540e9bb1eec3518f0742cf7325', class: "mode-controls" }, this.renderModeSwitch(guiSupported))), !this.guiModeEnabled || this.mode === 'code' ? (h("div", { class: "code-mode" }, this.renderCodeEditor(guiSupported))) : (h("div", { class: "gui-mode" }, h("div", { class: "placeholder-message" }, h("h4", null, "GUI Mode Not Yet Supported"), h("p", null, "The visual query builder interface is not yet available. Please use Code mode to write queries in JSON format."))))));
657
+ return (h("div", { key: '77e93d0277a99b8ff1c777d7ee0b63259755f740', class: "lime-query-builder" }, this.label && (h("h3", { key: '4089d69ea3404c656f1c24ec73aef6df2cc8baec', class: "lime-query-builder-label" }, this.label)), this.guiModeEnabled && (h("div", { key: '5d18a749386651cc1361b712693bad105dba9b03', class: "mode-controls" }, this.renderModeSwitch(guiSupported))), !this.guiModeEnabled || this.mode === 'code' ? (h("div", { class: "code-mode" }, this.renderCodeEditor(guiSupported))) : (h("div", { class: "gui-mode" }, h("div", { class: "placeholder-message" }, h("h4", null, "GUI Mode Not Yet Supported"), h("p", null, "The visual query builder interface is not yet available. Please use Code mode to write queries in JSON format."))))));
658
658
  }
659
659
  checkGuiSupport() {
660
660
  if (!this.limetypes || !this.codeValue) {
@@ -1616,7 +1616,7 @@ const LocalePicker = /*@__PURE__*/ proxyCustomElement(class LocalePicker extends
1616
1616
  const value = this.value;
1617
1617
  selectedOptions = options.find((option) => option.value === value);
1618
1618
  }
1619
- return (h("limel-select", { key: '54389312bd8cae7d92626c67a45bd2455f2a956f', value: selectedOptions, options: sortBy$1(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
1619
+ return (h("limel-select", { key: 'c5fb78e13f1aca2bbb3f51f5c2a1a0958eca0d6e', value: selectedOptions, options: sortBy$1(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
1620
1620
  }
1621
1621
  }, [1, "limebb-locale-picker", {
1622
1622
  "platform": [16],
@@ -13,8 +13,8 @@ const MentionGroupCounter = /*@__PURE__*/ proxyCustomElement(class MentionGroupC
13
13
  render() {
14
14
  const label = this.getLabel();
15
15
  return [
16
- h("span", { key: '22b685ed5902c71153903f165e9d6098518aaf92', id: this.tooltipId }, label),
17
- h("limel-tooltip", { key: '18f8f6f5b28f322151e53253263ca86e62e0cc0a', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
16
+ h("span", { key: '101adb63d448656a9acbf43245444f1de399c655', id: this.tooltipId }, label),
17
+ h("limel-tooltip", { key: '232baef721c41aefa38ff7074c8ba925124a6a72', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
18
18
  ];
19
19
  }
20
20
  getLabel() {
@@ -76,11 +76,11 @@ const PercentageVisualizer = /*@__PURE__*/ proxyCustomElement(class PercentageVi
76
76
  render() {
77
77
  const normalizedValue = this.getNormalizedValue();
78
78
  const zeroPoint = this.getZeroPointPosition();
79
- return (h(Host, { key: 'b9876aea271ead3ed18a7fdc59d652b541aed30a', class: this.getContainerClassList(), style: {
79
+ return (h(Host, { key: '1f66075e6977c4902925fde4410079ffa8187a37', class: this.getContainerClassList(), style: {
80
80
  '--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
81
81
  '--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
82
82
  '--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
83
- } }, h("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: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: 'd1dc81b554828d9998ad6c1567c49c56a005b547', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
83
+ } }, h("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: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: 'aa60e3dceadca94ed110ee0136e7faf84c745a26', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
84
84
  }
85
85
  renderVisualization() {
86
86
  if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
@@ -5,6 +5,7 @@ import { d as defineProperty, b as arrayLikeKeys, k as keys, c as getSymbols, s
5
5
  import { i as isSymbol, e as eq } from './_MapCache.js';
6
6
  import { d as isObject, r as root, S as Symbol, a as isObjectLike, i as isArray } from './_Map.js';
7
7
  import { d as isPrototype, i as isArrayLike, o as overArg, g as getTag, h as baseUnary, n as nodeUtil, a as isBuffer } from './_getTag.js';
8
+ import { c as createRandomString } from './random-string.js';
8
9
  import { i as isNonNull } from './non-null.js';
9
10
  import { d as defineCustomElement$3 } from './empty-state.js';
10
11
  import { d as defineCustomElement$2 } from './text-editor-picker.js';
@@ -1093,27 +1094,6 @@ function getUpdatedItems(items, highlightedItemIndex) {
1093
1094
  });
1094
1095
  }
1095
1096
 
1096
- /* eslint-disable sonarjs/pseudo-random */
1097
- const createRandomString = () => {
1098
- var _a;
1099
- if (!('crypto' in window) ||
1100
- typeof ((_a = window.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) !== 'function') {
1101
- return legacyCreateRandomString();
1102
- }
1103
- return 'a_' + crypto.randomUUID(); // ids must start with letters
1104
- };
1105
- function legacyCreateRandomString() {
1106
- const USE_HEX = 36;
1107
- const SKIP_LEADING_ZERODOT = 2;
1108
- const ASCII_A = 97;
1109
- const NUMBER_OF_LETTERS = 26;
1110
- return (String.fromCodePoint(ASCII_A + Math.floor(Math.random() * NUMBER_OF_LETTERS)) +
1111
- Math.random()
1112
- .toString(USE_HEX)
1113
- .slice(Math.max(0, SKIP_LEADING_ZERODOT)) +
1114
- Math.random().toString(USE_HEX).slice(Math.max(0, SKIP_LEADING_ZERODOT)));
1115
- }
1116
-
1117
1097
  /**
1118
1098
  * Whether the given object has the given label or not.
1119
1099
  *
@@ -1835,7 +1815,7 @@ const LimeBBTextEditor = /*@__PURE__*/ proxyCustomElement(class LimeBBTextEditor
1835
1815
  }
1836
1816
  render() {
1837
1817
  return [
1838
- h("limel-text-editor", { key: 'f2f48910b31ecf37bc6e41245f3e6e6a70b87695', ref: (el) => (this.textEditor = el), 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 }),
1818
+ h("limel-text-editor", { key: 'ba02d97b3d29f4de9e1457b81c5788c3b5fd527b', ref: (el) => (this.textEditor = el), 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 }),
1839
1819
  this.renderPicker(),
1840
1820
  ];
1841
1821
  }
@@ -37,7 +37,7 @@ const TrendIndicator = /*@__PURE__*/ proxyCustomElement(class TrendIndicator ext
37
37
  this.numValue = this.parseValue(this.value);
38
38
  }
39
39
  render() {
40
- return (h(Host, { key: 'e3f051b38577e06c5b31fe18558747e9476ca7bd', class: this.getContainerClassList() }, h("limel-notched-outline", { key: '2d7eed12e714dcbdd4d7fa366c7ab5079d0e0c79', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '13f6acd297b66716dca8581d99fb129fb1dec035', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
40
+ return (h(Host, { key: '295196e1b1e9bf9e45f728341116ef8136a55e0b', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'aa9743e91c3891b259379c0802e61631ede2b421', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '5cf7728d597bd8c70710c13e251791e14fbf0cf6', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
41
41
  }
42
42
  renderVisualization() {
43
43
  if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
@@ -11,8 +11,8 @@ const LiveDocsInfo = /*@__PURE__*/ proxyCustomElement(class LiveDocsInfo extends
11
11
  }
12
12
  render() {
13
13
  return [
14
- h("div", { key: 'afca6783253565c24917f26fa037d47555cc79ee', class: "header" }, h("limel-icon", { key: 'e3119195e169a5c1b5534985d92537f4bd71036c', name: "not_showing_video_frames" }), h("h2", { key: 'a00ac4d1cccf23e00975d0f95f423b3179170d1f' }, "Viewing this file type requires ", h("em", { key: 'cd66615d34d92b74943d0d87c796ac5d14f3f314' }, "Live Docs"))),
15
- h("p", { key: '39d0f82f29ec687cfd209b9c32c36b3be08b23aa' }, h("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!", h("a", { key: 'a254ad58b3d56386bae9e3ef4113b8d6c70a236e', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
14
+ h("div", { key: '4a4d9cfcfb7b37d5f98cef9a5e963b47125188b7', class: "header" }, h("limel-icon", { key: '832c49b5cbd38319e1a36eaff63a41417713d2c3', name: "not_showing_video_frames" }), h("h2", { key: '8e19c71383923d6964df4308fe030e68d69c9e46' }, "Viewing this file type requires ", h("em", { key: '9c5c93d320748dc4ff19c682d4228acca653e5b1' }, "Live Docs"))),
15
+ h("p", { key: '157a0f930aba54e52e8c777a90cd3445bf80fa5d' }, h("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!", h("a", { key: 'cf2e7bb006ab10ca91b60f740919d937e36974b2', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
16
16
  ];
17
17
  }
18
18
  static get style() { return LimebbLiveDocsInfoStyle0; }
@@ -58,7 +58,7 @@ const NotificationListItem = /*@__PURE__*/ proxyCustomElement(class Notification
58
58
  }
59
59
  render() {
60
60
  var _a, _b;
61
- return (h(Host, { key: 'db6570da8224ed4be6e67b0c876f67a74dd226b7', id: this.item.id, class: {
61
+ return (h(Host, { key: 'd6bb98c3ce4ec1b85c828c9f6d65bd4f4a70885d', id: this.item.id, class: {
62
62
  'is-clickable': this.isItemClickable(),
63
63
  'is-read': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.read),
64
64
  'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
@@ -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 };
@@ -72,14 +72,14 @@ const SummaryPopover = /*@__PURE__*/ proxyCustomElement(class SummaryPopover ext
72
72
  top: '0.125rem',
73
73
  right: '0.125rem',
74
74
  };
75
- return (h("limel-popover", { key: '61b0f5899c7d7a72f924bdfeb029ecce66e7cc9b', style: {
75
+ return (h("limel-popover", { key: '95ea1573956a1e882a8b4dfbdc865ca9ef3e424d', style: {
76
76
  '--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
77
- }, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '3f21df09b18083e568eab2e77f5ea5c58bcbfcad', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: '4f51bda5be27a848a69b57c9798865668cec6a44', name: "trigger" }), h("div", { key: '2b801e9ad42a9823efd7736b062a0fd70a7d6698', class: "opening-countdown-indicator" })), h("limel-card", { key: 'c964d35c5671c73a42f5202f51226ccac634eff8', style: {
77
+ }, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '33a1b9fcda6fbe6ecb6b1bd40b8b1290b3f74beb', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, h("slot", { key: '1037bd3b2ad03b28068b8d4831684d97a76b7f90', name: "trigger" }), h("div", { key: '1dc09768c4268f67a1fdfc5e0bb0120342223005', class: "opening-countdown-indicator" })), h("limel-card", { key: '5176b5be802feabbbfd270eb929975d2e833243e', style: {
78
78
  'max-width': this.popoverMaxWidth,
79
79
  'max-height': this.popoverMaxHeight,
80
80
  'min-width': '7rem',
81
81
  'min-height': '3rem',
82
- }, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: '3a55e6e6d8bf15284fe826d7065ebd61304d8248', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
82
+ }, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", { key: '50e76815a3d4b04a7ea2bd044586f014a7e24459', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
83
83
  }
84
84
  static get style() { return LimebbSummaryPopoverStyle0; }
85
85
  }, [1, "limebb-summary-popover", {