@limetech/lime-crm-building-blocks 1.106.1 → 1.107.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.107.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.107.0...v1.107.1) (2026-02-19)
2
+
3
+ ### Bug Fixes
4
+
5
+
6
+ * **chat-list:** prevent DOM recreation and scroll jumps during updates ([14df702](https://github.com/Lundalogik/lime-crm-building-blocks/commit/14df7029296285e82d8a7a216084dc458aef1d37))
7
+
8
+ ## [1.107.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.106.1...v1.107.0) (2026-02-16)
9
+
10
+ ### Features
11
+
12
+
13
+ * **info-tile:** pass host element to context registry ([4be5453](https://github.com/Lundalogik/lime-crm-building-blocks/commit/4be5453404636744936edae38f41dac5a81ee1d2))
14
+
1
15
  ## [1.106.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.106.0...v1.106.1) (2026-02-04)
2
16
 
3
17
  ### Bug Fixes
@@ -217,8 +217,11 @@ const ChatList = class {
217
217
  return this.renderIndicator();
218
218
  }
219
219
  });
220
- const sectionKey = 'date-group-' + crypto.randomUUID();
221
- const headingId = `heading-${sectionKey}`;
220
+ const groupChatItems = group.items.filter((i) => i.type === 'chat');
221
+ const lastChatItem = groupChatItems.at(-1);
222
+ const stableId = (lastChatItem === null || lastChatItem === void 0 ? void 0 : lastChatItem.type) === 'chat' ? lastChatItem.item.id : '';
223
+ const sectionKey = 'date-group-' + group.heading + '-' + stableId;
224
+ const headingId = `heading-${sectionKey}`.replaceAll(/[^a-zA-Z0-9_-]/g, '_');
222
225
  const dateHeading = (index.h("a", { id: headingId, class: "date-heading", role: "heading", "aria-level": 2 }, group.heading));
223
226
  if (this.order === 'oldest-on-top') {
224
227
  return (index.h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, chatItems, dateHeading));
@@ -52925,6 +52925,26 @@ const icons = [
52925
52925
  id: "data_arrived_filled.svg",
52926
52926
  tags: [
52927
52927
  ]
52928
+ },
52929
+ {
52930
+ id: "-lime-column-3-3.svg",
52931
+ tags: [
52932
+ ]
52933
+ },
52934
+ {
52935
+ id: "-lime-column-1.svg",
52936
+ tags: [
52937
+ ]
52938
+ },
52939
+ {
52940
+ id: "-lime-column-1-3.svg",
52941
+ tags: [
52942
+ ]
52943
+ },
52944
+ {
52945
+ id: "-lime-colmn-2-2.svg",
52946
+ tags: [
52947
+ ]
52928
52948
  }
52929
52949
  ];
52930
52950
 
@@ -92,12 +92,12 @@ class InfoTileContextProvider {
92
92
  constructor(getState) {
93
93
  this.getState = getState;
94
94
  this.contextType = 'info-tile';
95
- this.description = 'Provides context about an info tile showing an aggregated value';
96
95
  }
97
96
  getContext() {
98
97
  const { limetype, filterId, filterName, aggregateOperator, propertyName, value, label, } = this.getState();
99
98
  if (!limetype || !filterId) {
100
- return {};
99
+ console.debug('InfoTileContextProvider: No limetype or filterId available');
100
+ return null;
101
101
  }
102
102
  const data = {
103
103
  widgetType: 'info-tile',
@@ -117,7 +117,11 @@ class InfoTileContextProvider {
117
117
  if (label) {
118
118
  data.label = label;
119
119
  }
120
- return { data };
120
+ return {
121
+ data,
122
+ purpose: 'Shows an aggregated value from a filter. ' +
123
+ 'Clicking navigates to the explorer with that filter applied.',
124
+ };
121
125
  }
122
126
  }
123
127
 
@@ -433,7 +437,7 @@ const InfoTile = class {
433
437
  const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
434
438
  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() });
435
439
  const props = !filter || this.error ? errorProps : normalProps;
436
- return (index.h("limel-info-tile", Object.assign({ key: 'c94459e6651a37365feac2faf711578629ea3499', class: { error: !filter || this.error } }, props)));
440
+ return (index.h("limel-info-tile", Object.assign({ key: '9141f609083df0d056b979e3dc943aeaea13384a', class: { error: !filter || this.error } }, props)));
437
441
  }
438
442
  getFormattedValue() {
439
443
  if (!this.value && this.value !== 0) {
@@ -558,8 +562,14 @@ const InfoTile = class {
558
562
  label: this.getLabel(filter),
559
563
  };
560
564
  });
561
- this.unregisterContextProvider = registry.register(provider);
562
- }
565
+ this.unregisterContextProvider = registry.register(provider,
566
+ // This cast is needed because there's a type conflict between
567
+ // `HTMLElement.prefix` and `HTMLLimebbInfoTileElement.prefix`.
568
+ // The problem here is that this info-tile component has a property
569
+ // (`prefix`) with the same name as one of the native HTML attributes.
570
+ this.host);
571
+ }
572
+ get host() { return index.getElement(this); }
563
573
  static get watchers() { return {
564
574
  "filterId": ["watchFilterId"],
565
575
  "propertyName": ["watchPropertyName"],
@@ -91,8 +91,11 @@ export class ChatList {
91
91
  return this.renderIndicator();
92
92
  }
93
93
  });
94
- const sectionKey = 'date-group-' + crypto.randomUUID();
95
- const headingId = `heading-${sectionKey}`;
94
+ const groupChatItems = group.items.filter((i) => i.type === 'chat');
95
+ const lastChatItem = groupChatItems.at(-1);
96
+ const stableId = (lastChatItem === null || lastChatItem === void 0 ? void 0 : lastChatItem.type) === 'chat' ? lastChatItem.item.id : '';
97
+ const sectionKey = 'date-group-' + group.heading + '-' + stableId;
98
+ const headingId = `heading-${sectionKey}`.replaceAll(/[^a-zA-Z0-9_-]/g, '_');
96
99
  const dateHeading = (h("a", { id: headingId, class: "date-heading", role: "heading", "aria-level": 2 }, group.heading));
97
100
  if (this.order === 'oldest-on-top') {
98
101
  return (h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, chatItems, dateHeading));
@@ -16,12 +16,12 @@ export class InfoTileContextProvider {
16
16
  constructor(getState) {
17
17
  this.getState = getState;
18
18
  this.contextType = 'info-tile';
19
- this.description = 'Provides context about an info tile showing an aggregated value';
20
19
  }
21
20
  getContext() {
22
21
  const { limetype, filterId, filterName, aggregateOperator, propertyName, value, label, } = this.getState();
23
22
  if (!limetype || !filterId) {
24
- return {};
23
+ console.debug('InfoTileContextProvider: No limetype or filterId available');
24
+ return null;
25
25
  }
26
26
  const data = {
27
27
  widgetType: 'info-tile',
@@ -41,6 +41,10 @@ export class InfoTileContextProvider {
41
41
  if (label) {
42
42
  data.label = label;
43
43
  }
44
- return { data };
44
+ return {
45
+ data,
46
+ purpose: 'Shows an aggregated value from a filter. ' +
47
+ 'Clicking navigates to the explorer with that filter applied.',
48
+ };
45
49
  }
46
50
  }
@@ -100,7 +100,7 @@ export class InfoTile {
100
100
  const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
101
101
  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() });
102
102
  const props = !filter || this.error ? errorProps : normalProps;
103
- return (h("limel-info-tile", Object.assign({ key: 'c94459e6651a37365feac2faf711578629ea3499', class: { error: !filter || this.error } }, props)));
103
+ return (h("limel-info-tile", Object.assign({ key: '9141f609083df0d056b979e3dc943aeaea13384a', class: { error: !filter || this.error } }, props)));
104
104
  }
105
105
  getFormattedValue() {
106
106
  if (!this.value && this.value !== 0) {
@@ -225,7 +225,12 @@ export class InfoTile {
225
225
  label: this.getLabel(filter),
226
226
  };
227
227
  });
228
- this.unregisterContextProvider = registry.register(provider);
228
+ this.unregisterContextProvider = registry.register(provider,
229
+ // This cast is needed because there's a type conflict between
230
+ // `HTMLElement.prefix` and `HTMLLimebbInfoTileElement.prefix`.
231
+ // The problem here is that this info-tile component has a property
232
+ // (`prefix`) with the same name as one of the native HTML attributes.
233
+ this.host);
229
234
  }
230
235
  static get is() { return "limebb-info-tile"; }
231
236
  static get encapsulation() { return "shadow"; }
@@ -496,6 +501,7 @@ export class InfoTile {
496
501
  "limetypes": {}
497
502
  };
498
503
  }
504
+ static get elementRef() { return "host"; }
499
505
  static get watchers() {
500
506
  return [{
501
507
  "propName": "filterId",
@@ -217,8 +217,11 @@ const ChatList = /*@__PURE__*/ proxyCustomElement(class ChatList extends HTMLEle
217
217
  return this.renderIndicator();
218
218
  }
219
219
  });
220
- const sectionKey = 'date-group-' + crypto.randomUUID();
221
- const headingId = `heading-${sectionKey}`;
220
+ const groupChatItems = group.items.filter((i) => i.type === 'chat');
221
+ const lastChatItem = groupChatItems.at(-1);
222
+ const stableId = (lastChatItem === null || lastChatItem === void 0 ? void 0 : lastChatItem.type) === 'chat' ? lastChatItem.item.id : '';
223
+ const sectionKey = 'date-group-' + group.heading + '-' + stableId;
224
+ const headingId = `heading-${sectionKey}`.replaceAll(/[^a-zA-Z0-9_-]/g, '_');
222
225
  const dateHeading = (h("a", { id: headingId, class: "date-heading", role: "heading", "aria-level": 2 }, group.heading));
223
226
  if (this.order === 'oldest-on-top') {
224
227
  return (h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, chatItems, dateHeading));
@@ -52921,6 +52921,26 @@ const icons = [
52921
52921
  id: "data_arrived_filled.svg",
52922
52922
  tags: [
52923
52923
  ]
52924
+ },
52925
+ {
52926
+ id: "-lime-column-3-3.svg",
52927
+ tags: [
52928
+ ]
52929
+ },
52930
+ {
52931
+ id: "-lime-column-1.svg",
52932
+ tags: [
52933
+ ]
52934
+ },
52935
+ {
52936
+ id: "-lime-column-1-3.svg",
52937
+ tags: [
52938
+ ]
52939
+ },
52940
+ {
52941
+ id: "-lime-colmn-2-2.svg",
52942
+ tags: [
52943
+ ]
52924
52944
  }
52925
52945
  ];
52926
52946
 
@@ -88,12 +88,12 @@ class InfoTileContextProvider {
88
88
  constructor(getState) {
89
89
  this.getState = getState;
90
90
  this.contextType = 'info-tile';
91
- this.description = 'Provides context about an info tile showing an aggregated value';
92
91
  }
93
92
  getContext() {
94
93
  const { limetype, filterId, filterName, aggregateOperator, propertyName, value, label, } = this.getState();
95
94
  if (!limetype || !filterId) {
96
- return {};
95
+ console.debug('InfoTileContextProvider: No limetype or filterId available');
96
+ return null;
97
97
  }
98
98
  const data = {
99
99
  widgetType: 'info-tile',
@@ -113,7 +113,11 @@ class InfoTileContextProvider {
113
113
  if (label) {
114
114
  data.label = label;
115
115
  }
116
- return { data };
116
+ return {
117
+ data,
118
+ purpose: 'Shows an aggregated value from a filter. ' +
119
+ 'Clicking navigates to the explorer with that filter applied.',
120
+ };
117
121
  }
118
122
  }
119
123
 
@@ -431,7 +435,7 @@ const InfoTile = /*@__PURE__*/ proxyCustomElement(class InfoTile extends HTMLEle
431
435
  const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
432
436
  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() });
433
437
  const props = !filter || this.error ? errorProps : normalProps;
434
- return (h("limel-info-tile", Object.assign({ key: 'c94459e6651a37365feac2faf711578629ea3499', class: { error: !filter || this.error } }, props)));
438
+ return (h("limel-info-tile", Object.assign({ key: '9141f609083df0d056b979e3dc943aeaea13384a', class: { error: !filter || this.error } }, props)));
435
439
  }
436
440
  getFormattedValue() {
437
441
  if (!this.value && this.value !== 0) {
@@ -556,8 +560,14 @@ const InfoTile = /*@__PURE__*/ proxyCustomElement(class InfoTile extends HTMLEle
556
560
  label: this.getLabel(filter),
557
561
  };
558
562
  });
559
- this.unregisterContextProvider = registry.register(provider);
560
- }
563
+ this.unregisterContextProvider = registry.register(provider,
564
+ // This cast is needed because there's a type conflict between
565
+ // `HTMLElement.prefix` and `HTMLLimebbInfoTileElement.prefix`.
566
+ // The problem here is that this info-tile component has a property
567
+ // (`prefix`) with the same name as one of the native HTML attributes.
568
+ this.host);
569
+ }
570
+ get host() { return this; }
561
571
  static get watchers() { return {
562
572
  "filterId": ["watchFilterId"],
563
573
  "propertyName": ["watchPropertyName"],
@@ -213,8 +213,11 @@ const ChatList = class {
213
213
  return this.renderIndicator();
214
214
  }
215
215
  });
216
- const sectionKey = 'date-group-' + crypto.randomUUID();
217
- const headingId = `heading-${sectionKey}`;
216
+ const groupChatItems = group.items.filter((i) => i.type === 'chat');
217
+ const lastChatItem = groupChatItems.at(-1);
218
+ const stableId = (lastChatItem === null || lastChatItem === void 0 ? void 0 : lastChatItem.type) === 'chat' ? lastChatItem.item.id : '';
219
+ const sectionKey = 'date-group-' + group.heading + '-' + stableId;
220
+ const headingId = `heading-${sectionKey}`.replaceAll(/[^a-zA-Z0-9_-]/g, '_');
218
221
  const dateHeading = (h("a", { id: headingId, class: "date-heading", role: "heading", "aria-level": 2 }, group.heading));
219
222
  if (this.order === 'oldest-on-top') {
220
223
  return (h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, chatItems, dateHeading));
@@ -52921,6 +52921,26 @@ const icons = [
52921
52921
  id: "data_arrived_filled.svg",
52922
52922
  tags: [
52923
52923
  ]
52924
+ },
52925
+ {
52926
+ id: "-lime-column-3-3.svg",
52927
+ tags: [
52928
+ ]
52929
+ },
52930
+ {
52931
+ id: "-lime-column-1.svg",
52932
+ tags: [
52933
+ ]
52934
+ },
52935
+ {
52936
+ id: "-lime-column-1-3.svg",
52937
+ tags: [
52938
+ ]
52939
+ },
52940
+ {
52941
+ id: "-lime-colmn-2-2.svg",
52942
+ tags: [
52943
+ ]
52924
52944
  }
52925
52945
  ];
52926
52946
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-d86e55c0.js';
1
+ import { r as registerInstance, h, g as getElement } from './index-d86e55c0.js';
2
2
  import { c, a as ar, f as fr, Z as Ze, s as sr, r as re } from './index.esm-863d7783.js';
3
3
  import { i as isArrayLike, a as isBuffer, b as isTypedArray, c as isArguments, g as getTag, d as isPrototype, e as baseKeys } from './_getTag-d02a95fa.js';
4
4
  import { i as isArray } from './_Map-aede53b6.js';
@@ -88,12 +88,12 @@ class InfoTileContextProvider {
88
88
  constructor(getState) {
89
89
  this.getState = getState;
90
90
  this.contextType = 'info-tile';
91
- this.description = 'Provides context about an info tile showing an aggregated value';
92
91
  }
93
92
  getContext() {
94
93
  const { limetype, filterId, filterName, aggregateOperator, propertyName, value, label, } = this.getState();
95
94
  if (!limetype || !filterId) {
96
- return {};
95
+ console.debug('InfoTileContextProvider: No limetype or filterId available');
96
+ return null;
97
97
  }
98
98
  const data = {
99
99
  widgetType: 'info-tile',
@@ -113,7 +113,11 @@ class InfoTileContextProvider {
113
113
  if (label) {
114
114
  data.label = label;
115
115
  }
116
- return { data };
116
+ return {
117
+ data,
118
+ purpose: 'Shows an aggregated value from a filter. ' +
119
+ 'Clicking navigates to the explorer with that filter applied.',
120
+ };
117
121
  }
118
122
  }
119
123
 
@@ -429,7 +433,7 @@ const InfoTile = class {
429
433
  const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
430
434
  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() });
431
435
  const props = !filter || this.error ? errorProps : normalProps;
432
- return (h("limel-info-tile", Object.assign({ key: 'c94459e6651a37365feac2faf711578629ea3499', class: { error: !filter || this.error } }, props)));
436
+ return (h("limel-info-tile", Object.assign({ key: '9141f609083df0d056b979e3dc943aeaea13384a', class: { error: !filter || this.error } }, props)));
433
437
  }
434
438
  getFormattedValue() {
435
439
  if (!this.value && this.value !== 0) {
@@ -554,8 +558,14 @@ const InfoTile = class {
554
558
  label: this.getLabel(filter),
555
559
  };
556
560
  });
557
- this.unregisterContextProvider = registry.register(provider);
558
- }
561
+ this.unregisterContextProvider = registry.register(provider,
562
+ // This cast is needed because there's a type conflict between
563
+ // `HTMLElement.prefix` and `HTMLLimebbInfoTileElement.prefix`.
564
+ // The problem here is that this info-tile component has a property
565
+ // (`prefix`) with the same name as one of the native HTML attributes.
566
+ this.host);
567
+ }
568
+ get host() { return getElement(this); }
559
569
  static get watchers() { return {
560
570
  "filterId": ["watchFilterId"],
561
571
  "propertyName": ["watchPropertyName"],
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-52cf8641.js";export{s as setNonce}from"./p-52cf8641.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(JSON.parse('[["p-dd6861b1",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"activeLimetype":[1,"active-limetype"],"limetypes":[32],"mode":[32],"codeValue":[32],"limetype":[32],"filter":[32],"internalResponseFormat":[32],"limit":[32],"orderBy":[32],"description":[32]}]]],["p-cbbcec09",[[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-973146f7",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["p-9624acfd",[[1,"limebb-lime-query-response-format-builder",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"helperText":[1,"helper-text"],"limetypes":[32],"mode":[32],"codeValue":[32],"internalValue":[32]}]]],["p-e03755ed",[[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-a9807878",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["p-d37e8baa",[[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-9b4617bd",[[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-228573ab",[[1,"limebb-document-picker",{"platform":[16],"context":[16],"items":[16],"label":[513],"helperText":[513,"helper-text"],"invalid":[516],"required":[516],"type":[513]}]]],["p-4ca1caf4",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["p-0da02112",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["p-7ce112a7",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["p-4fa58e0e",[[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-77b97c9f",[[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-937e9144",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["p-9d41c07e",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-ddfd5196",[[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],"limetypes":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["p-eb56d4eb",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["p-fb292b3f",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["p-c678ba6d",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["p-579be797",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["p-3da67f32",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["p-351de229",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["p-fc92dab6",[[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-d51d607b",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["p-17baea44",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["p-0bab7df6",[[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-fcb3499b",[[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-52fb8909",[[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-5f12cdea",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-b4bd67e2",[[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-0c290fd8",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["p-85cae2a1",[[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-bd92871a",[[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-a9ef0153",[[17,"limebb-document-item",{"platform":[16],"context":[16],"item":[16],"type":[513],"fileTypes":[16]}]]],["p-eaf58ba4",[[1,"limebb-live-docs-info"]]],["p-7c04361c",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-a9160103",[[1,"limebb-lime-query-order-by-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16]}]]],["p-f97ea913",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-92062bd6",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["p-aec5cbca",[[1,"limebb-lime-query-filter-builder",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-order-by-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]},null,{"value":["handleValueChange"]}],[0,"limebb-limetype-field",{"platform":[16],"context":[16],"label":[513],"required":[516],"readonly":[516],"disabled":[516],"value":[513],"helperText":[513,"helper-text"],"invalid":[4],"limetypes":[16],"propertyFields":[16],"fieldName":[1,"field-name"],"formInfo":[16]}]]],["p-e79f16ca",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]],["p-c3c0c738",[[1,"limebb-property-selector",{"platform":[16],"context":[16],"limetype":[1],"value":[1],"label":[1],"required":[4],"helperText":[1,"helper-text"],"limetypes":[32],"isOpen":[32],"navigationPath":[32]}]]],["p-bd6b5a42",[[1,"limebb-lime-query-response-format-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]}],[1,"limebb-lime-query-response-format-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16],"showAliasInput":[32],"showDescriptionInput":[32]}]]],["p-d880ba5e",[[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-f1eee3bb",[[1,"limebb-lime-query-value-input",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"propertyPath":[1,"property-path"],"operator":[1],"value":[8],"label":[1],"limetypes":[32],"inputMode":[32]}],[1,"limebb-lime-query-filter-group",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16],"value":[32]}],[1,"limebb-lime-query-filter-not",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]],["p-da511a18",[[1,"limebb-lime-query-filter-expression",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-filter-comparison",{"platform":[16],"context":[16],"label":[513],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]]]'),e))));
1
+ import{p as e,b as t}from"./p-52cf8641.js";export{s as setNonce}from"./p-52cf8641.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(JSON.parse('[["p-dd6861b1",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"activeLimetype":[1,"active-limetype"],"limetypes":[32],"mode":[32],"codeValue":[32],"limetype":[32],"filter":[32],"internalResponseFormat":[32],"limit":[32],"orderBy":[32],"description":[32]}]]],["p-cbbcec09",[[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-973146f7",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["p-9624acfd",[[1,"limebb-lime-query-response-format-builder",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"helperText":[1,"helper-text"],"limetypes":[32],"mode":[32],"codeValue":[32],"internalValue":[32]}]]],["p-27e84266",[[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-a9807878",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["p-d37e8baa",[[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-9b4617bd",[[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-228573ab",[[1,"limebb-document-picker",{"platform":[16],"context":[16],"items":[16],"label":[513],"helperText":[513,"helper-text"],"invalid":[516],"required":[516],"type":[513]}]]],["p-4ca1caf4",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["p-0da02112",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["p-7ce112a7",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["p-4fa58e0e",[[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-77b97c9f",[[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-937e9144",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["p-fbc62adb",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-d4273468",[[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],"limetypes":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["p-eb56d4eb",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["p-fb292b3f",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["p-c678ba6d",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["p-579be797",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["p-3da67f32",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["p-351de229",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["p-fc92dab6",[[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-d51d607b",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["p-17baea44",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["p-0bab7df6",[[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-fcb3499b",[[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-52fb8909",[[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-5f12cdea",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-b4bd67e2",[[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-0c290fd8",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["p-85cae2a1",[[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-bd92871a",[[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-a9ef0153",[[17,"limebb-document-item",{"platform":[16],"context":[16],"item":[16],"type":[513],"fileTypes":[16]}]]],["p-eaf58ba4",[[1,"limebb-live-docs-info"]]],["p-7c04361c",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-a9160103",[[1,"limebb-lime-query-order-by-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16]}]]],["p-f97ea913",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-92062bd6",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["p-aec5cbca",[[1,"limebb-lime-query-filter-builder",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-order-by-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]},null,{"value":["handleValueChange"]}],[0,"limebb-limetype-field",{"platform":[16],"context":[16],"label":[513],"required":[516],"readonly":[516],"disabled":[516],"value":[513],"helperText":[513,"helper-text"],"invalid":[4],"limetypes":[16],"propertyFields":[16],"fieldName":[1,"field-name"],"formInfo":[16]}]]],["p-e79f16ca",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]],["p-c3c0c738",[[1,"limebb-property-selector",{"platform":[16],"context":[16],"limetype":[1],"value":[1],"label":[1],"required":[4],"helperText":[1,"helper-text"],"limetypes":[32],"isOpen":[32],"navigationPath":[32]}]]],["p-bd6b5a42",[[1,"limebb-lime-query-response-format-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]}],[1,"limebb-lime-query-response-format-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16],"showAliasInput":[32],"showDescriptionInput":[32]}]]],["p-d880ba5e",[[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-f1eee3bb",[[1,"limebb-lime-query-value-input",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"propertyPath":[1,"property-path"],"operator":[1],"value":[8],"label":[1],"limetypes":[32],"inputMode":[32]}],[1,"limebb-lime-query-filter-group",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16],"value":[32]}],[1,"limebb-lime-query-filter-not",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]],["p-da511a18",[[1,"limebb-lime-query-filter-expression",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-filter-comparison",{"platform":[16],"context":[16],"label":[513],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]]]'),e))));
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as i}from"./p-52cf8641.js";import{c as r}from"./p-3b1fcd5b.js";function a(t){for(const e of t.items)t.processedItems.push({type:"chat",item:e});return t}function o(t){const e=[];let i=t.newItemIndicatorInserted;for(const r of t.processedItems)"chat"===r.type&&t.lastVisitedTimestamp&&!i&&new Date(r.item.timestamp)<=t.lastVisitedTimestamp&&t.hasUnseenNotifications&&(e.push({type:"newItemIndicator"}),i=!0),e.push(r);return t.processedItems=e,t.newItemIndicatorInserted=i,t}function n(t){const e=[];let i=null,r=null;for(const a of t.processedItems)if("chat"===a.type){const o=new Date(a.item.timestamp),n=t.dateTimeFormatter.format(o,"date");n!==r&&(i&&e.push(i),i={type:"group",groupType:"dateGroup",heading:n,items:[]},r=n),i&&i.items.push(a)}else"newItemIndicator"===a.type&&(i?i.items.push(a):e.push(a));return i&&e.push(i),Object.assign(Object.assign({},t),{processedItems:e})}const s=class{constructor(e){t(this,e),this.items=[],this.order="oldest-on-top",this.processedItems=[]}handleItemsChange(){let t=null;var e,i,r,s;this.lastVisitedTimestamp&&(t="string"==typeof(s=this.lastVisitedTimestamp)?new Date(Date.parse(s)):new Date(s)),this.processedItems=(r={items:e=this.items,processedItems:[],lastVisitedTimestamp:i=t,dateTimeFormatter:this.dateTimeFormatter,newItemIndicatorInserted:!1,lastProcessedDate:null,hasUnseenNotifications:e.some((t=>i&&new Date(t.timestamp)>i))},[a,o,n].reduce(((t,e)=>e(t)),r)).processedItems}componentWillLoad(){this.handleItemsChange()}render(){return e(i,{key:"3412d92c13b51ad457ec2b070de46cd29372ce0b",class:{"is-empty":0===this.items.length&&!this.isTypingIndicatorVisible},"aria-busy":this.isBusy(),role:"log"},this.renderSpinner(),e("div",{key:"5d87e57a497b5eeae2e2765a1d594aa54222dc0d",class:"typing-indicator-height-animation"},e("div",{key:"6c430baf03095c83e032cc9c6680d2a897132cb0"},this.renderTypingIndicator())),this.renderChatItems())}renderSpinner(){if(this.loading)return e("limel-spinner",null)}renderTypingIndicator(){if(this.isTypingIndicatorVisible)return e("limebb-typing-indicator",null)}renderChatItems(){return this.processedItems.map((t=>{switch(t.type){case"group":return this.renderGroup(t);case"newItemIndicator":return this.renderIndicator();default:return null}}))}renderGroup(t){const i=t.items.map((t=>"chat"===t.type?this.renderChatItem(t.item):"newItemIndicator"===t.type?this.renderIndicator():void 0)),r=t.items.filter((t=>"chat"===t.type)).at(-1),a="date-group-"+t.heading+"-"+("chat"===(null==r?void 0:r.type)?r.item.id:""),o=`heading-${a}`.replaceAll(/[^a-zA-Z0-9_-]/g,"_"),n=e("a",{id:o,class:"date-heading",role:"heading","aria-level":2},t.heading);return"oldest-on-top"===this.order?e("section",{class:"date-group",key:a,"aria-labelledby":o},i,n):e("section",{class:"date-group",key:a,"aria-labelledby":o},n,i)}renderChatItem(t){return e("limebb-chat-item",{platform:this.platform,context:this.context,item:t,helperText:t.helperText,hasError:t.hasError,key:t.id})}renderIndicator(){return e("div",{class:"new-items-indicator",role:"separator"},e("hr",null),e("h3",null,this.translator.get("webclient.new")))}isBusy(){return this.loading||this.isTypingIndicatorVisible?"true":"false"}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){return this.platform.get(r.Translate)}static get watchers(){return{items:["handleItemsChange"]}}};s.style='@charset "UTF-8";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--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);box-sizing:border-box;display:flex;gap:0.5rem;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}:host(limebb-chat-list[order=oldest-on-top]){flex-direction:column-reverse}:host(limebb-chat-list[order=newest-on-top]){flex-direction:column}*{box-sizing:border-box}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;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))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;top:0;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}';export{s as limebb_chat_list}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,g as i}from"./p-52cf8641.js";import{c as r,a as o,f as s,Z as n,s as l,r as a}from"./p-3b1fcd5b.js";import{i as h,a as u,b as c,c as f,g as d,d as v,e as p}from"./p-5322fd19.js";import{i as g}from"./p-b31772c8.js";var b=Object.prototype.hasOwnProperty;class m{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:o,value:s,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const l={widgetType:"info-tile",limetype:t,filterId:e};return i&&(l.filterName=i),l.aggregateOperator=r,o&&(l.propertyName=o),void 0!==s&&(l.value=s),n&&(l.label=n),{data:l,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class w{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw new Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return Boolean((null==t?void 0:t.limetype)&&(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(r.Query)}get objectRepository(){return this.platform.get(r.LimeObjectRepository)}}class y{constructor(t){this.locale=t}format(t){let e=String(t);return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class j{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class O{constructor(t){this.locale=t}format(t,e){var i,r;const o=new Intl.NumberFormat(this.locale,e.options),s=o.formatToParts(t);let n="",l="",a="";for(const t of s)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?a+=t.value:l+=t.value;return l||(l=o.format(t),n="",a=""),{prefix:n,value:l,suffix:a}}}class x{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:o}=this.getRelativeTime(t),s=i.formatToParts(r,o);let n="",l="",a="";for(const t of s)"literal"!==t.type||l?"literal"===t.type&&l?a+=t.value:l+=t.value:n+=t.value;return l||(l=n||a,n="",a=""),{prefix:n,value:l,suffix:a}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),o=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of o){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class I{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new O(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new j(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new x(this.locale):new y(this.locale)}}var k=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const F=class{constructor(e){t(this,e),this.aggregateOperator=l.Count,this.loading=!1,this.error=!1}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,i;const r=this.getFilter(),o=this.getFormattedValue(),s={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==o?void 0:o.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(i=null==o?void 0:o.suffix)||void 0===i?void 0:i.trim())||this.suffix},n=Object.assign(Object.assign({},s),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),l=Object.assign(Object.assign({},s),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==o?void 0:o.value.trim()});return e("limel-info-tile",Object.assign({key:"9141f609083df0d056b979e3dc943aeaea13384a",class:{error:!r||this.error}},!r||this.error?n:l))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new y(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(h(t)&&(g(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||c(t)||f(t)))return!t.length;var e=d(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(v(t))return!p(t).length;for(var i in t)if(b.call(t,i))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){if(!t)return{href:"#"};const e=["explorer",t.limetype,t.id].join("/"),i=this.getRelationPropertyName(this.limetypes[t.limetype]),r=this.buildContextAwareFilter(t.filter,i);return r?{href:`${e}?filter=${encodeURIComponent(JSON.stringify(r))}`}:{href:e}}buildContextAwareFilter(t,e){if(!e)return t;const i={key:e,op:a.EQUALS,exp:this.context.id};return t?{op:a.AND,exp:[i,t]}:{relationFilter:i}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new I(this.language).createFormatter(this.format,t)}getRelationPropertyName(t){var e,i,r;if(t&&this.context.limetype&&this.context.id){if(this.propertyName){const t=this.limetypes[this.context.limetype],r=null===(i=null===(e=null==t?void 0:t.getProperty(this.propertyName))||void 0===e?void 0:e.relation)||void 0===i?void 0:i.getBackreference();if(r)return r.name}return null===(r=Object.values(t.properties).find((t=>{var e;return(null===(e=t.relation)||void 0===e?void 0:e.getLimetype().name)===this.context.limetype})))||void 0===r?void 0:r.name}}get translator(){return this.platform.get(r.Translate)}get language(){return this.platform.get(r.Application).getLanguage()}get loader(){return new w(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(r.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new m((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?this.getLocalizedString(t.name):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.host)}get host(){return i(this)}static get watchers(){return{filterId:["watchFilterId"],propertyName:["watchPropertyName"],aggregateOperator:["watchAggregateOperator"]}}};k([o({})],F.prototype,"config",void 0),k([s()],F.prototype,"filters",void 0),k([n()],F.prototype,"limetypes",void 0),F.style=":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";export{F as limebb_info_tile}