@limetech/lime-crm-building-blocks 1.115.0 → 1.116.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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/{limebb-chat-item_2.cjs.entry.js → limebb-chat-icon-list_3.cjs.entry.js} +39 -3
- package/dist/cjs/limebb-chat-list.cjs.entry.js +37 -35
- package/dist/cjs/limebb-component-picker.cjs.entry.js +18 -14
- package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.css +199 -0
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +74 -0
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.types.js +1 -0
- package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
- package/dist/collection/components/chat-list/chat-list.js +18 -8
- package/dist/collection/components/chat-list/chat-list.types.js +1 -0
- package/dist/collection/components/chat-list/process-chat-items.js +26 -33
- package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/component-command-picker/component-picker/component-picker.js +18 -14
- package/dist/collection/components/composer-toolbar/composer-toolbar.js +2 -2
- package/dist/collection/components/currency-picker/currency-picker.js +1 -1
- package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-range/date-range.js +1 -1
- package/dist/collection/components/document-chips/document-chips.js +1 -1
- package/dist/collection/components/document-picker/document-item/document-item.js +2 -2
- package/dist/collection/components/document-picker/document-picker.js +1 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
- package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +1 -1
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/summary-popover/summary-popover.js +2 -2
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/components/chat-icon-list.js +55 -0
- package/dist/components/chat-item.js +2 -2
- package/dist/components/currency-picker.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/document-item.js +2 -2
- package/dist/components/feed-item-thumbnail-file-info.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/lime-query-filter-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +3 -3
- package/dist/components/limebb-chat-icon-list.d.ts +11 -0
- package/dist/components/limebb-chat-icon-list.js +6 -0
- package/dist/components/limebb-chat-list.js +44 -36
- package/dist/components/limebb-component-picker.js +18 -14
- package/dist/components/limebb-composer-toolbar.js +2 -2
- package/dist/components/limebb-dashboard-widget.js +1 -1
- package/dist/components/limebb-date-range.js +1 -1
- package/dist/components/limebb-document-chips.js +1 -1
- package/dist/components/limebb-document-picker.js +1 -1
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -1
- package/dist/components/limebb-info-tile.js +1 -1
- package/dist/components/limebb-lime-query-builder.js +1 -1
- package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +1 -1
- package/dist/components/live-docs-info.js +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-editor.js +1 -1
- package/dist/components/order-by-item.js +2 -2
- package/dist/components/percentage-visualizer.js +2 -2
- package/dist/components/response-format-item.js +1 -1
- package/dist/components/summary-popover.js +2 -2
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/{limebb-chat-item_2.entry.js → limebb-chat-icon-list_3.entry.js} +39 -4
- package/dist/esm/limebb-chat-list.entry.js +37 -35
- package/dist/esm/limebb-component-picker.entry.js +18 -14
- package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +1 -1
- package/dist/esm/limebb-date-range.entry.js +1 -1
- package/dist/esm/limebb-document-chips.entry.js +1 -1
- package/dist/esm/limebb-document-item.entry.js +2 -2
- package/dist/esm/limebb-document-picker.entry.js +1 -1
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +2 -2
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-group_3.entry.js +3 -3
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +2 -2
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-22fffe85.entry.js → p-0190354e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-375f40d9.entry.js → p-0707d5b0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-a7e55181.entry.js → p-121877f3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8c3f563e.entry.js → p-1317cdfa.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4066e17a.entry.js → p-1a89328d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7b5a1e83.entry.js → p-1b361f60.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-18d1ab86.entry.js → p-2612f2f6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9c334694.entry.js → p-2babfa69.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-2d5e5ab5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-2ed843e9.entry.js → p-331fced5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3a7b37cc.entry.js → p-3a16d7cf.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4dad4ce8.entry.js → p-3dd32e10.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d7fc530f.entry.js → p-4894ca5d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6bf1ab6d.entry.js → p-4eb7a47c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-50abea43.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-812bf26e.entry.js → p-520df198.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-94e6f0de.entry.js → p-5277ceca.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9c204549.entry.js → p-548e0f2a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7a6c1595.entry.js → p-6fb504cb.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-81f8e5df.entry.js → p-7365ec1c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-103654ac.entry.js → p-85709273.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-87d3f42c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d5b835a6.entry.js → p-8dca4e46.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-9c25aa2b.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-dddd8a43.entry.js → p-a959dd49.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-20b5ff30.entry.js → p-b2763851.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d9f76810.entry.js → p-b3ad9f5e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-53d54dc8.entry.js → p-d9045aaa.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9bc5caac.entry.js → p-d994067b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f31eeeaa.entry.js → p-da42650a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0d0f4c0f.entry.js → p-dae67f66.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3b3e7328.entry.js → p-dce9c951.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0eac6b68.entry.js → p-dd5af257.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6bd5c65f.entry.js → p-ea4daa32.entry.js} +1 -1
- package/dist/types/components/chat-list/chat-icon-list/chat-icon-list.d.ts +19 -0
- package/dist/types/components/chat-list/chat-icon-list/chat-icon-list.types.d.ts +52 -0
- package/dist/types/components/chat-list/chat-list.d.ts +7 -2
- package/dist/types/components/chat-list/chat-list.types.d.ts +13 -0
- package/dist/types/components/chat-list/process-chat-items.d.ts +20 -28
- package/dist/types/components/component-command-picker/component-picker/component-picker.d.ts +1 -0
- package/dist/types/components.d.ts +57 -4
- package/dist/types/interface.d.ts +2 -0
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-20939cd4.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-703fa2fe.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7f72be40.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a954d06e.entry.js +0 -1
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import { DateTimeFormatter } from '@limetech/lime-web-components';
|
|
2
2
|
import { ChatItem } from './chat-item/chat-item.types';
|
|
3
|
+
import { ChatIconList } from './chat-icon-list/chat-icon-list.types';
|
|
4
|
+
import { ChatListItem } from './chat-list.types';
|
|
3
5
|
/**
|
|
4
|
-
* Represents an item in the processed
|
|
6
|
+
* Represents an item in the processed chat list.
|
|
5
7
|
*
|
|
6
8
|
* This can be one of the following types:
|
|
7
|
-
* - `
|
|
8
|
-
* - `
|
|
9
|
-
* - `
|
|
9
|
+
* - `chat`: A standard chat item (speech bubble).
|
|
10
|
+
* - `iconList`: A labeled row of icons.
|
|
11
|
+
* - `newItemIndicator`: A line separating new items from old ones.
|
|
12
|
+
* - `group`: A collection of items under a common heading (a date group).
|
|
10
13
|
*/
|
|
11
14
|
export type ProcessedItem = {
|
|
12
15
|
type: 'chat';
|
|
13
16
|
item: ChatItem;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'iconList';
|
|
19
|
+
item: ChatIconList;
|
|
14
20
|
} | {
|
|
15
21
|
type: 'newItemIndicator';
|
|
16
22
|
} | ChatGroup;
|
|
17
23
|
/**
|
|
18
|
-
* Represents a group of
|
|
19
|
-
* Each group can contain other groups or
|
|
24
|
+
* Represents a group of items in the processed list.
|
|
25
|
+
* Each group can contain other groups or items.
|
|
20
26
|
*/
|
|
21
27
|
export type ChatGroup = {
|
|
22
28
|
type: 'group';
|
|
@@ -25,33 +31,19 @@ export type ChatGroup = {
|
|
|
25
31
|
items: ProcessedItem[];
|
|
26
32
|
};
|
|
27
33
|
/**
|
|
28
|
-
* Processes a list of
|
|
34
|
+
* Processes a list of chat list inputs by adding date headers and a "new items" indicator.
|
|
29
35
|
*
|
|
30
|
-
* @param items - The list of
|
|
36
|
+
* @param items - The list of items to process. Pre-sorted by `timestamp` in descending order.
|
|
31
37
|
* @param dateTimeFormatter - A service used to format dates for the date headers.
|
|
32
|
-
* @param lastVisitedTimestamp - The timestamp of the user's last visit.
|
|
33
|
-
*
|
|
34
|
-
* @returns An array of processed items, including notifications, date headers, and a "new items" indicator if applicable.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* const processedItems = processNotificationItems(
|
|
38
|
-
* notifications,
|
|
39
|
-
* dateTimeFormatter,
|
|
40
|
-
* new Date('2024-09-01T10:00:00Z')
|
|
41
|
-
* );
|
|
38
|
+
* @param lastVisitedTimestamp - The timestamp of the user's last visit. Used to position the
|
|
39
|
+
* "new items" indicator.
|
|
42
40
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* // { type: 'notification', item: notification1 },
|
|
46
|
-
* // { type: 'notification', item: notification2 },
|
|
47
|
-
* // { type: 'newItemIndicator' },
|
|
48
|
-
* // { type: 'dateHeader', date: '2024-08-31' },
|
|
49
|
-
* // { type: 'notification', item: notification3 },
|
|
50
|
-
* // ]
|
|
41
|
+
* @returns An array of processed items, including chat items, icon lists, date headers,
|
|
42
|
+
* and a "new items" indicator if applicable.
|
|
51
43
|
*/
|
|
52
|
-
export declare function processChatItems(items:
|
|
44
|
+
export declare function processChatItems(items: ChatListItem[], dateTimeFormatter: DateTimeFormatter, lastVisitedTimestamp: Date | null): ProcessedItem[];
|
|
53
45
|
interface ProcessorContext {
|
|
54
|
-
items:
|
|
46
|
+
items: ChatListItem[];
|
|
55
47
|
processedItems: ProcessedItem[];
|
|
56
48
|
lastVisitedTimestamp: Date | null;
|
|
57
49
|
dateTimeFormatter: DateTimeFormatter;
|
package/dist/types/components/component-command-picker/component-picker/component-picker.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare class ComponentPicker implements FormComponent<string>, LimeWebCo
|
|
|
58
58
|
private handleChange;
|
|
59
59
|
private handleCopyButton;
|
|
60
60
|
private handleKeyUp;
|
|
61
|
+
private emitIfValidValue;
|
|
61
62
|
private isValidIdentifier;
|
|
62
63
|
render(): any[];
|
|
63
64
|
private renderPicker;
|
|
@@ -9,7 +9,9 @@ import { AlertType } from "./components/alert-dialog/alert-dialog.types";
|
|
|
9
9
|
import { AggregateOperator, AndOrExpression, Expression, LimeFileUrlType, LimeType, LimeWebComponentContext, LimeWebComponentPlatform, NotExpression, Operator } from "@limetech/lime-web-components";
|
|
10
10
|
import { BrowserItem } from "./components/browser/browser-item.types";
|
|
11
11
|
import { ActionBarItem, CustomElementDefinition, DateType, EditorUiType, FileInfo, FormInfo, Icon, Image, Languages, ListItem, ListSeparator, OpenDirection } from "@limetech/lime-elements";
|
|
12
|
+
import { ChatIconList } from "./components/chat-list/chat-icon-list/chat-icon-list.types";
|
|
12
13
|
import { ChatItem } from "./components/chat-list/chat-item/chat-item.types";
|
|
14
|
+
import { ChatListItem } from "./components/chat-list/chat-list.types";
|
|
13
15
|
import { ComponentPickerType } from "./components/component-command-picker/types";
|
|
14
16
|
import { ComposerTrigger, FileInputConfig } from "./components/composer-toolbar/composer-toolbar.types";
|
|
15
17
|
import { DataCell } from "./components/data-cells/data-cells.types";
|
|
@@ -32,7 +34,9 @@ export { AlertType } from "./components/alert-dialog/alert-dialog.types";
|
|
|
32
34
|
export { AggregateOperator, AndOrExpression, Expression, LimeFileUrlType, LimeType, LimeWebComponentContext, LimeWebComponentPlatform, NotExpression, Operator } from "@limetech/lime-web-components";
|
|
33
35
|
export { BrowserItem } from "./components/browser/browser-item.types";
|
|
34
36
|
export { ActionBarItem, CustomElementDefinition, DateType, EditorUiType, FileInfo, FormInfo, Icon, Image, Languages, ListItem, ListSeparator, OpenDirection } from "@limetech/lime-elements";
|
|
37
|
+
export { ChatIconList } from "./components/chat-list/chat-icon-list/chat-icon-list.types";
|
|
35
38
|
export { ChatItem } from "./components/chat-list/chat-item/chat-item.types";
|
|
39
|
+
export { ChatListItem } from "./components/chat-list/chat-list.types";
|
|
36
40
|
export { ComponentPickerType } from "./components/component-command-picker/types";
|
|
37
41
|
export { ComposerTrigger, FileInputConfig } from "./components/composer-toolbar/composer-toolbar.types";
|
|
38
42
|
export { DataCell } from "./components/data-cells/data-cells.types";
|
|
@@ -144,6 +148,18 @@ export namespace Components {
|
|
|
144
148
|
*/
|
|
145
149
|
"platform": LimeWebComponentPlatform;
|
|
146
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Chat icon list
|
|
153
|
+
* Renders a labeled, left-aligned row of slightly-overlapping icons,
|
|
154
|
+
* used inside `limebb-chat-list` as an alternative to a speech bubble.
|
|
155
|
+
* @private
|
|
156
|
+
*/
|
|
157
|
+
interface LimebbChatIconList {
|
|
158
|
+
/**
|
|
159
|
+
* The item to display.
|
|
160
|
+
*/
|
|
161
|
+
"item": ChatIconList;
|
|
162
|
+
}
|
|
147
163
|
/**
|
|
148
164
|
* Chat item
|
|
149
165
|
* Renders each chat bubble in the list.
|
|
@@ -185,6 +201,7 @@ export namespace Components {
|
|
|
185
201
|
* @exampleComponent limebb-example-chat-list-with-promoted-action
|
|
186
202
|
* @exampleComponent limebb-example-chat-list-with-helper-text
|
|
187
203
|
* @exampleComponent limebb-example-chat-list-with-error
|
|
204
|
+
* @exampleComponent limebb-example-chat-list-with-icon-list
|
|
188
205
|
* @beta
|
|
189
206
|
*/
|
|
190
207
|
interface LimebbChatList {
|
|
@@ -198,9 +215,9 @@ export namespace Components {
|
|
|
198
215
|
*/
|
|
199
216
|
"isTypingIndicatorVisible": boolean;
|
|
200
217
|
/**
|
|
201
|
-
* List of items to display in the feed. These items must be sorted by their `timestamp` in descending order.
|
|
218
|
+
* List of items to display in the feed. These items must be sorted by their `timestamp` in descending order. See the [ChatListItem](#/type/ChatListItem/) type for the kinds of items that can appear in the list.
|
|
202
219
|
*/
|
|
203
|
-
"items":
|
|
220
|
+
"items": ChatListItem[];
|
|
204
221
|
/**
|
|
205
222
|
* The date and time of the last time the user visited the Notification List. When provided, the feed will display a divider line between the last visited items (the old items which have a `timestamp` earlier than `lastVisitedTimestamp`) and the newer items. If there are no newer items, the divider line will not be displayed.
|
|
206
223
|
*/
|
|
@@ -2571,6 +2588,18 @@ declare global {
|
|
|
2571
2588
|
prototype: HTMLLimebbBrowserElement;
|
|
2572
2589
|
new (): HTMLLimebbBrowserElement;
|
|
2573
2590
|
};
|
|
2591
|
+
/**
|
|
2592
|
+
* Chat icon list
|
|
2593
|
+
* Renders a labeled, left-aligned row of slightly-overlapping icons,
|
|
2594
|
+
* used inside `limebb-chat-list` as an alternative to a speech bubble.
|
|
2595
|
+
* @private
|
|
2596
|
+
*/
|
|
2597
|
+
interface HTMLLimebbChatIconListElement extends Components.LimebbChatIconList, HTMLStencilElement {
|
|
2598
|
+
}
|
|
2599
|
+
var HTMLLimebbChatIconListElement: {
|
|
2600
|
+
prototype: HTMLLimebbChatIconListElement;
|
|
2601
|
+
new (): HTMLLimebbChatIconListElement;
|
|
2602
|
+
};
|
|
2574
2603
|
/**
|
|
2575
2604
|
* Chat item
|
|
2576
2605
|
* Renders each chat bubble in the list.
|
|
@@ -2594,6 +2623,7 @@ declare global {
|
|
|
2594
2623
|
* @exampleComponent limebb-example-chat-list-with-promoted-action
|
|
2595
2624
|
* @exampleComponent limebb-example-chat-list-with-helper-text
|
|
2596
2625
|
* @exampleComponent limebb-example-chat-list-with-error
|
|
2626
|
+
* @exampleComponent limebb-example-chat-list-with-icon-list
|
|
2597
2627
|
* @beta
|
|
2598
2628
|
*/
|
|
2599
2629
|
interface HTMLLimebbChatListElement extends Components.LimebbChatList, HTMLStencilElement {
|
|
@@ -4059,6 +4089,7 @@ declare global {
|
|
|
4059
4089
|
interface HTMLElementTagNameMap {
|
|
4060
4090
|
"limebb-alert-dialog": HTMLLimebbAlertDialogElement;
|
|
4061
4091
|
"limebb-browser": HTMLLimebbBrowserElement;
|
|
4092
|
+
"limebb-chat-icon-list": HTMLLimebbChatIconListElement;
|
|
4062
4093
|
"limebb-chat-item": HTMLLimebbChatItemElement;
|
|
4063
4094
|
"limebb-chat-list": HTMLLimebbChatListElement;
|
|
4064
4095
|
"limebb-component-config": HTMLLimebbComponentConfigElement;
|
|
@@ -4220,6 +4251,18 @@ declare namespace LocalJSX {
|
|
|
4220
4251
|
*/
|
|
4221
4252
|
"platform": LimeWebComponentPlatform;
|
|
4222
4253
|
}
|
|
4254
|
+
/**
|
|
4255
|
+
* Chat icon list
|
|
4256
|
+
* Renders a labeled, left-aligned row of slightly-overlapping icons,
|
|
4257
|
+
* used inside `limebb-chat-list` as an alternative to a speech bubble.
|
|
4258
|
+
* @private
|
|
4259
|
+
*/
|
|
4260
|
+
interface LimebbChatIconList {
|
|
4261
|
+
/**
|
|
4262
|
+
* The item to display.
|
|
4263
|
+
*/
|
|
4264
|
+
"item": ChatIconList;
|
|
4265
|
+
}
|
|
4223
4266
|
/**
|
|
4224
4267
|
* Chat item
|
|
4225
4268
|
* Renders each chat bubble in the list.
|
|
@@ -4261,6 +4304,7 @@ declare namespace LocalJSX {
|
|
|
4261
4304
|
* @exampleComponent limebb-example-chat-list-with-promoted-action
|
|
4262
4305
|
* @exampleComponent limebb-example-chat-list-with-helper-text
|
|
4263
4306
|
* @exampleComponent limebb-example-chat-list-with-error
|
|
4307
|
+
* @exampleComponent limebb-example-chat-list-with-icon-list
|
|
4264
4308
|
* @beta
|
|
4265
4309
|
*/
|
|
4266
4310
|
interface LimebbChatList {
|
|
@@ -4274,9 +4318,9 @@ declare namespace LocalJSX {
|
|
|
4274
4318
|
*/
|
|
4275
4319
|
"isTypingIndicatorVisible"?: boolean;
|
|
4276
4320
|
/**
|
|
4277
|
-
* List of items to display in the feed. These items must be sorted by their `timestamp` in descending order.
|
|
4321
|
+
* List of items to display in the feed. These items must be sorted by their `timestamp` in descending order. See the [ChatListItem](#/type/ChatListItem/) type for the kinds of items that can appear in the list.
|
|
4278
4322
|
*/
|
|
4279
|
-
"items"?:
|
|
4323
|
+
"items"?: ChatListItem[];
|
|
4280
4324
|
/**
|
|
4281
4325
|
* The date and time of the last time the user visited the Notification List. When provided, the feed will display a divider line between the last visited items (the old items which have a `timestamp` earlier than `lastVisitedTimestamp`) and the newer items. If there are no newer items, the divider line will not be displayed.
|
|
4282
4326
|
*/
|
|
@@ -6581,6 +6625,7 @@ declare namespace LocalJSX {
|
|
|
6581
6625
|
interface IntrinsicElements {
|
|
6582
6626
|
"limebb-alert-dialog": LimebbAlertDialog;
|
|
6583
6627
|
"limebb-browser": LimebbBrowser;
|
|
6628
|
+
"limebb-chat-icon-list": LimebbChatIconList;
|
|
6584
6629
|
"limebb-chat-item": LimebbChatItem;
|
|
6585
6630
|
"limebb-chat-list": LimebbChatList;
|
|
6586
6631
|
"limebb-component-config": LimebbComponentConfig;
|
|
@@ -6699,6 +6744,13 @@ declare module "@stencil/core" {
|
|
|
6699
6744
|
* @beta
|
|
6700
6745
|
*/
|
|
6701
6746
|
"limebb-browser": LocalJSX.LimebbBrowser & JSXBase.HTMLAttributes<HTMLLimebbBrowserElement>;
|
|
6747
|
+
/**
|
|
6748
|
+
* Chat icon list
|
|
6749
|
+
* Renders a labeled, left-aligned row of slightly-overlapping icons,
|
|
6750
|
+
* used inside `limebb-chat-list` as an alternative to a speech bubble.
|
|
6751
|
+
* @private
|
|
6752
|
+
*/
|
|
6753
|
+
"limebb-chat-icon-list": LocalJSX.LimebbChatIconList & JSXBase.HTMLAttributes<HTMLLimebbChatIconListElement>;
|
|
6702
6754
|
/**
|
|
6703
6755
|
* Chat item
|
|
6704
6756
|
* Renders each chat bubble in the list.
|
|
@@ -6717,6 +6769,7 @@ declare module "@stencil/core" {
|
|
|
6717
6769
|
* @exampleComponent limebb-example-chat-list-with-promoted-action
|
|
6718
6770
|
* @exampleComponent limebb-example-chat-list-with-helper-text
|
|
6719
6771
|
* @exampleComponent limebb-example-chat-list-with-error
|
|
6772
|
+
* @exampleComponent limebb-example-chat-list-with-icon-list
|
|
6720
6773
|
* @beta
|
|
6721
6774
|
*/
|
|
6722
6775
|
"limebb-chat-list": LocalJSX.LimebbChatList & JSXBase.HTMLAttributes<HTMLLimebbChatListElement>;
|
|
@@ -3,6 +3,8 @@ export * from './components/card/card.types';
|
|
|
3
3
|
export * from './components/locale-picker/language-picker.types';
|
|
4
4
|
export * from './components/feed/feed-item/feed-item.types';
|
|
5
5
|
export * from './components/chat-list/chat-item/chat-item.types';
|
|
6
|
+
export * from './components/chat-list/chat-icon-list/chat-icon-list.types';
|
|
7
|
+
export * from './components/chat-list/chat-list.types';
|
|
6
8
|
export * from './components/notification-list/notification-item/notification-item.types';
|
|
7
9
|
export * from './components/browser/browser-item.types';
|
|
8
10
|
export * from './components/text-editor/text-editor.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-crm-building-blocks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.116.0",
|
|
4
4
|
"description": "A home for shared components meant for use with Lime CRM",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@limetech/eslint-config": "^3.0.1",
|
|
38
|
-
"@limetech/lime-elements": "^39.13.
|
|
38
|
+
"@limetech/lime-elements": "^39.13.3",
|
|
39
39
|
"@limetech/lime-web-components": "^6.13.1",
|
|
40
40
|
"@limetech/lime-web-components-testing": "^1.0.0",
|
|
41
41
|
"@lundalogik/lime-icons8": "^2.38.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-52cf8641.js";import{c as l}from"./p-199799ff.js";const n=[{trigger:"rich-text",icon:"font_style_formatting",translationKey:"webclient.composer-toolbar.rich-text"},{trigger:"mention",icon:"email_sign_92447",translationKey:"webclient.composer-toolbar.mention",helperLabel:"@"},{trigger:"text-snippet",icon:"rich_text_converter",translationKey:"webclient.composer-toolbar.text-snippet",helperLabel:"!"},{trigger:"internal-link",icon:"hashtag_large",translationKey:"webclient.composer-toolbar.internal-link",helperLabel:"#"}],o=class{constructor(i){e(this,i),this.triggerInsert=t(this,"triggerInsert",7),this.filesSelected=t(this,"filesSelected",7),this.mentions=!1,this.textSnippets=!1,this.internalLinks=!1,this.richText=!1,this.handleTriggerSelected=e=>{e.stopPropagation(),this.triggerInsert.emit(e.detail.value)},this.handleFilesSelected=e=>{e.stopPropagation(),this.filesSelected.emit(e.detail)}}render(){return[i("div",{key:"7b2b399e4dde1bb090dcdec3021fbbf669ea7d74",class:"actions"},i("slot",{key:"4c019b51586bb3256ac59ad46e5e996ef10bd890",name:"leading"}),this.renderFileInput(),this.renderTriggerActions(),i("slot",{key:"8daa1e5d6e5093042b46fbd5dd9f22e276ea08f1",name:"trailing"})),i("slot",{key:"c59850954e112e1aac342f3dd1544d2f94e696ee",name:"primary-action"})]}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(l.Translate)}get triggerActions(){const e={mention:this.mentions,"text-snippet":this.textSnippets,"internal-link":this.internalLinks,"rich-text":this.richText};return n.filter((t=>e[t.trigger])).map((e=>{var t,i;return{text:null!==(i=null===(t=this.translator)||void 0===t?void 0:t.get(e.translationKey))&&void 0!==i?i:e.trigger,commandText:e.helperLabel,icon:e.icon,iconOnly:!0,value:e.trigger}}))}renderTriggerActions(){const e=this.triggerActions;if(0!==e.length)return i("limel-action-bar",{actions:e,onItemSelected:this.handleTriggerSelected})}renderFileInput(){var e,t,l,n,o,r;if(this.fileInput)return i("limel-file-input",{accept:null!==(e=this.fileInput.accept)&&void 0!==e?e:"*",multiple:null!==(t=this.fileInput.multiple)&&void 0!==t&&t,disabled:null!==(l=this.fileInput.disabled)&&void 0!==l&&l,onFilesSelected:this.handleFilesSelected},i("limel-icon-button",{icon:"attach",disabled:null!==(n=this.fileInput.disabled)&&void 0!==n&&n,label:null===(o=this.translator)||void 0===o?void 0:o.get("webclient.attach-files"),helperLabel:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.attach-files-helper")}))}};o.style="*{box-sizing:border-box;min-width:0}:host(limebb-composer-toolbar){box-sizing:border-box;display:flex;align-items:center;width:100%;max-width:100%;gap:0.5rem}.actions{display:flex;align-items:center;flex-wrap:nowrap;flex-grow:1}limel-icon-button,::slotted(limel-icon-button){display:inline-block;scale:0.86}limel-file-input{flex-shrink:0}";export{o as limebb_composer_toolbar}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as i}from"./p-52cf8641.js";import{c as r}from"./p-199799ff.js";const o=class{constructor(t){e(this,t),this.hasError=!1,this.createActionBarItem=e=>{var t,i;if("separator"in e)return e;let r={value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled};return!e.label&&e.icon?r=Object.assign(Object.assign({},r),{icon:e.icon,text:null!==(i=e.description)&&void 0!==i?i:r.text,iconOnly:!0}):e.icon&&(r=Object.assign(Object.assign({},r),{icon:e.icon})),r},this.handleActionBarItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)},this.createMenuItem=e=>{var t,i;return"separator"in e?e:{value:e,text:null!==(t=e.label)&&void 0!==t?t:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=e=>{var t;e.stopPropagation();const i=null===(t=e.detail.value)||void 0===t?void 0:t.command;i&&this.commandbus.handle(i)}}render(){const e=`helper-text-${this.item.id}`;return t(i,{key:"df64ed9c4080499035f5d599fbf03edf2fc711bd",id:this.item.id,"aria-describedby":this.helperText?e:void 0,"aria-live":this.hasError?"assertive":"off",class:{[`${this.item.ui}`]:!0}},t("div",{key:"b615241104c1c5b93b4ead5adcb0ff40a6d61271",class:"bubble-content"},t("div",{key:"2e23b9a4e8bc0709bfeb795cfe2590c244979b6f",class:"icon-picture"},this.renderIcon(),this.renderAuthorPicture()),this.renderErrorSign(),t("div",{key:"2d2692e9d0627956a99e8486e44ca7fa9267a25e",class:"item"},this.renderHeader(),this.renderValue(),t("footer",{key:"3b68b893d3c8a8e113ca3c15bf1d336e0722839f"},this.renderHelperText(e),this.renderTimestamp()))),this.renderPromotedAction())}renderErrorSign(){if(this.hasError)return t("limel-icon",{class:"error-sign",name:"brake_warning"})}renderHeader(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.name)return t("header",null,this.renderAuthorName(),t("div",{class:"action-buttons"},this.renderUnpromotedActionsMenu()))}renderIcon(){var e,i,r,o;if(this.item.icon)return t("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderHelperText(e){if(this.helperText)return t("span",{class:"helper-text",id:e},this.helperText)}renderValue(){if(this.item.value)return t("limel-markdown",{class:"body-text reset-img-height",value:this.item.value})}renderAuthorName(){var e,i;if("string"==typeof(null===(e=this.item.author)||void 0===e?void 0:e.name))return t("span",{class:"author"},this.item.author.name);if("object"==typeof(null===(i=this.item.author)||void 0===i?void 0:i.name)){const{href:e,title:i,text:r}=this.item.author.name;return t("a",{class:"author",href:e,title:i},r)}}renderAuthorPicture(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.picture)return"limel-ai-avatar"===this.item.author.picture?t("limel-ai-avatar",{class:"author-avatar"}):t("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderUnpromotedActionsMenu(){var e,i;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return t("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},t("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderPromotedAction(){if(!this.item.promotedActions)return;const e=this.item.promotedActions.map(this.createActionBarItem);return t("div",{class:"action-bar"},t("div",{class:"action-bar-hider"},t("limel-action-bar",{accessibleLabel:"Action bar",actions:e,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return t("span",{class:"timestamp"},this.dateTimeFormatter.format(e,"timeofday"))}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(r.CommandBus)}};o.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-chat-item){display:flex;flex-direction:column;gap:0.25rem;min-width:0;min-height:0;max-width:calc(100% - 2rem)}.bubble-content{display:flex;gap:0.25rem;min-width:0;min-height:0}:host(limebb-chat-item:hover) .helper-text,:host(limebb-chat-item:hover) .timestamp,:host(limebb-chat-item:focus-within) .helper-text,:host(limebb-chat-item:focus-within) .timestamp{opacity:1}:host(limebb-chat-item.mine){margin-left:auto}:host(limebb-chat-item.mine) .item{border-bottom-right-radius:0.125rem;background-color:rgb(var(--color-sky-default), 0.2)}:host(limebb-chat-item.mine) .bubble-content{justify-content:end}:host(limebb-chat-item.mine) .icon-picture{order:2}:host(limebb-chat-item.theirs){margin-right:auto}:host(limebb-chat-item.theirs) .item{border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-300), 0.7)}.item{display:flex;flex-direction:column;border-radius:1.25rem;padding:0 0.25rem 0.25rem 0.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.icon-picture{display:flex;flex-direction:column;gap:0.5rem;align-items:center;justify-content:flex-end}.icon-picture:has(.author-avatar) limel-icon{width:1.25rem;padding:0.125rem}.icon{--icon-background-color:rgb(var(--contrast-500), 0.5);flex-shrink:0;padding:0.375rem;width:2.25rem;backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}limel-ai-avatar.author-avatar{background-color:rgb(var(--color-glaucous-darker))}header{display:flex;justify-content:space-between;align-items:center;min-height:2rem;padding-left:0.5rem}header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.body-text{padding:0.25rem 0.5rem}footer{display:flex;justify-content:space-between;align-items:end;gap:0.5rem;font-size:x-small}footer:not(:empty){padding:0 0.25rem 0.125rem 0.5rem}footer *{transition:opacity 0.2s ease;opacity:0.4}.timestamp{margin-left:auto}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-promoted-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-promoted-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-promoted-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-promoted-action-bar-grid-template-rows-transition-delay);padding-top:0;padding-bottom:0.75rem}:host(limebb-chat-item:hover) .action-bar,:host(limebb-chat-item:focus-within) .action-bar,:host(limebb-chat-item:focus-visible) .action-bar{--limebb-promoted-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-chat-item:hover) limel-action-bar,:host(limebb-chat-item:focus-within) limel-action-bar,:host(limebb-chat-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-chat-item:hover),:host(limebb-chat-item:focus-within){--limebb-promoted-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-promoted-action-bar-grid-template-rows-transition-delay:0.7s}.action-bar{min-width:0;width:calc(100% - calc(2rem + 0.25rem))}:host(limebb-chat-item.theirs) .action-bar{margin-left:calc(2rem + 0.25rem)}:host(limebb-chat-item[has-error]:not([has-error=false])) .bubble-content{cursor:help}:host(limebb-chat-item[has-error]:not([has-error=false])) .item{border:1px solid rgb(var(--color-red-default))}:host(limebb-chat-item[has-error]:not([has-error=false])) .error-sign{color:rgb(var(--color-red-default));flex-shrink:0;width:1.25rem;align-self:center}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .action-bar{padding-left:1.25rem}:host(limebb-chat-item.mine[has-error]:not([has-error=false])) .helper-text{opacity:1;color:rgb(var(--color-red-default))}';const a=class{constructor(t){e(this,t)}render(){return t("div",{key:"b935ce2320a2be224b39409f8787554acdc4118c",class:"typing-ellipsis"},t("div",{key:"906f4069dda78564797563f516fa4f7202e280e2",class:"circle"}),t("div",{key:"9aa4aec7fef5b6194fe9ed200f77419435e4a68c",class:"circle"}),t("div",{key:"b4993c098ffffc9fae8e5e32665bda523450409d",class:"circle"}))}};a.style="*{box-sizing:border-box}.typing-ellipsis{position:relative;display:inline-flex;align-items:center;gap:0.25rem;height:1.5rem;padding:0 0.5rem;border-radius:10rem;border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-600), 0.4);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.circle{position:relative;height:0.5rem;width:0.5rem;background:rgb(var(--contrast-800));border-radius:50%}.circle:first-of-type{animation:ellipsis-typing-indicator 1.2s infinite}.circle:nth-of-type(2){animation:ellipsis-typing-indicator 1.2s infinite 0.2s}.circle:nth-of-type(3){animation:ellipsis-typing-indicator 1.2s infinite 0.4s}@keyframes ellipsis-typing-indicator{0%{top:0}6.25%{top:-1px}12.5%{top:0;background:rgb(var(--contrast-1000))}18.75%{top:1px}25%{top:0}}";export{o as limebb_chat_item,a as limebb_typing_indicator}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-52cf8641.js";import{c as r}from"./p-199799ff.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:"1aa955956f1efb361777c52b27047a3169bb7492",class:{"is-empty":0===this.items.length&&!this.isTypingIndicatorVisible},"aria-busy":this.isBusy(),role:"log"},this.renderSpinner(),e("div",{key:"ca0412d181544f901b0741ce5753aba56cf35081",class:"typing-indicator-height-animation"},e("div",{key:"107508f3a978f7cd8dd671fa12d6a57c86e8af82"},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}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,g as o}from"./p-52cf8641.js";import{c as e}from"./p-199799ff.js";const n=class{constructor(o){i(this,o),this.change=t(this,"change",7),this.copy=t(this,"copy",7),this.type="component",this.copyLabel="Copy value",this.hideCopyButton=!1,this.allItems=[],this.getConfigs=()=>({component:()=>this.webComponentRegistry.getAll(),command:()=>this.commandbus.getAll()}[this.type]()),this.getConfigValue=i=>"name"in i&&"string"==typeof i.name?i.name:"id"in i&&"string"==typeof i.id?i.id:"",this.hasTag=i=>!this.tags||this.tags.some((t=>{var s;return null===(s=i.tags)||void 0===s?void 0:s.includes(t)})),this.handleBlur=()=>{const i=this.currentInput;i&&this.isValidIdentifier(i)&&this.change.emit(this.currentInput)},this.handleChange=i=>{var t;i.stopPropagation(),this.change.emit(null===(t=i.detail)||void 0===t?void 0:t.value)},this.handleCopyButton=()=>{navigator.clipboard.writeText(this.value),this.copy.emit(this.value)},this.handleKeyUp=i=>{var t;if("Enter"!==i.key)return;const s=null!==(t=this.currentInput)&&void 0!==t?t:"";this.isValidIdentifier(s)&&this.change.emit(this.currentInput)},this.isValidIdentifier=i=>"component"!==this.type||Boolean(customElements.get(i)),this.renderPicker=()=>{let i=this.allItems.find((i=>this.value===i.value));return!i&&this.value&&(i={text:this.value,value:this.value,icon:{name:"question",color:"rgb(var(--color-glaucous-light))"}}),s("limel-picker",{disabled:this.disabled,helperText:this.helperText,label:this.label,readonly:this.readonly,required:this.required,searcher:this.search,value:i,title:null==i?void 0:i.text,onBlur:this.handleBlur,onChange:this.handleChange,onKeyUp:this.handleKeyUp})},this.renderCopyButton=()=>{if(!this.hideCopyButton)return s("limel-icon-button",{icon:"copy",disabled:!this.value,label:this.copyLabel,onClick:this.handleCopyButton})},this.search=async i=>i?this.allItems.filter(this.isItemMatching(i.toLocaleLowerCase())):this.allItems,this.isItemMatching=i=>t=>{var s,o;return t.text.toLocaleLowerCase().includes(i)||(null===(s=t.secondaryText)||void 0===s?void 0:s.toLocaleLowerCase().includes(i))||(null===(o=t.value)||void 0===o?void 0:o.toLocaleLowerCase().includes(i))}}componentWillLoad(){this.allItems=this.getConfigs().filter(this.hasTag).map((i=>{var t,s;return{value:this.getConfigValue(i),text:this.translator.get(null!==(t=i.title)&&void 0!==t?t:this.getConfigValue(i)),secondaryText:this.translator.get(null!==(s=i.description)&&void 0!==s?s:""),icon:i.icon}})).sort(((i,t)=>i.text.localeCompare(t.text)))}render(){return[this.renderPicker(),this.renderCopyButton()]}get currentInput(){var i,t,s,o,e,n;return null===(n=null===(e=null===(o=null===(s=null===(t=null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector("limel-picker"))||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.querySelector("limel-chip-set"))||void 0===o?void 0:o.shadowRoot)||void 0===e?void 0:e.querySelector("input"))||void 0===n?void 0:n.value}get webComponentRegistry(){return this.platform.get(e.WebComponentRegistry)}get commandbus(){return this.platform.get(e.CommandBus)}get translator(){return this.platform.get(e.Translate)}get host(){return o(this)}};n.style=":host(limebb-component-picker){position:relative;display:flex;align-items:center}:host(limebb-component-picker) limel-picker{flex-grow:1;min-width:0}:host(limebb-component-picker) limel-icon-button{position:absolute;right:0.25rem}";export{n as limebb_component_picker}
|