Skip to content

Commit 3eeaf82

Browse files
committed
fix(*): fix lint and types
1 parent 2a8171f commit 3eeaf82

File tree

7 files changed

+35
-24
lines changed

7 files changed

+35
-24
lines changed

src/components/chat/chat-message-list.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ export default class IgcChatMessageListComponent extends LitElement {
3232
@property({ type: Boolean, attribute: 'disable-auto-scroll' })
3333
public disableAutoScroll = false;
3434

35-
@property({ type: Function })
35+
@property({ attribute: false })
3636
public attachmentTemplate?: AttachmentTemplate;
3737

38-
@property({ type: Function })
38+
@property({ attribute: false })
3939
public attachmentHeaderTemplate?: AttachmentTemplate;
4040

41-
@property({ type: Function })
41+
@property({ attribute: false })
4242
public attachmentActionsTemplate?: AttachmentTemplate;
4343

44-
@property({ type: Function })
44+
@property({ attribute: false })
4545
public attachmentContentTemplate?: AttachmentTemplate;
4646

47-
@property({ type: Function })
47+
@property({ attribute: false })
4848
public messageActionsTemplate?: MessageActionsTemplate;
4949

5050
private formatDate(date: Date): string {

src/components/chat/chat-message.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { property } from 'lit/decorators.js';
33
import IgcAvatarComponent from '../avatar/avatar.js';
44
import { registerComponent } from '../common/definitions/register.js';
55
import { renderMarkdown } from './markdown-util.js';
6-
import { IgcMessageAttachmentsComponent } from './message-attachments.js';
6+
import IgcMessageAttachmentsComponent from './message-attachments.js';
77
import { styles } from './themes/message.base.css.js';
88
import type {
99
AttachmentTemplate,
@@ -34,19 +34,19 @@ export default class IgcChatMessageComponent extends LitElement {
3434
@property({ reflect: true, attribute: false })
3535
public message: IgcMessage | undefined;
3636

37-
@property({ type: Function })
37+
@property({ attribute: false })
3838
public attachmentTemplate?: AttachmentTemplate;
3939

40-
@property({ type: Function })
40+
@property({ attribute: false })
4141
public attachmentHeaderTemplate?: AttachmentTemplate;
4242

43-
@property({ type: Function })
43+
@property({ attribute: false })
4444
public attachmentActionsTemplate?: AttachmentTemplate;
4545

46-
@property({ type: Function })
46+
@property({ attribute: false })
4747
public attachmentContentTemplate?: AttachmentTemplate;
4848

49-
@property({ type: Function })
49+
@property({ attribute: false })
5050
public messageActionsTemplate?: MessageActionsTemplate;
5151

5252
protected override render() {

src/components/chat/chat.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,19 @@ export default class IgcChatComponent extends EventEmitterMixin<
7575
@property({ type: String, attribute: 'header-text', reflect: true })
7676
public headerText = '';
7777

78-
@property({ type: Function })
78+
@property({ attribute: false })
7979
public attachmentTemplate?: AttachmentTemplate;
8080

81-
@property({ type: Function })
81+
@property({ attribute: false })
8282
public attachmentHeaderTemplate?: AttachmentTemplate;
8383

84-
@property({ type: Function })
84+
@property({ attribute: false })
8585
public attachmentActionsTemplate?: AttachmentTemplate;
8686

87-
@property({ type: Function })
87+
@property({ attribute: false })
8888
public attachmentContentTemplate?: AttachmentTemplate;
8989

90-
@property({ type: Function })
90+
@property({ attribute: false })
9191
public messageActionsTemplate?: MessageActionsTemplate;
9292

9393
public override connectedCallback() {

src/components/chat/message-attachments.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
* @element igc-message-attachments
2222
*
2323
*/
24-
export class IgcMessageAttachmentsComponent extends LitElement {
24+
export default class IgcMessageAttachmentsComponent extends LitElement {
2525
/** @private */
2626
public static readonly tagName = 'igc-message-attachments';
2727

@@ -42,16 +42,16 @@ export class IgcMessageAttachmentsComponent extends LitElement {
4242
@property({ type: String })
4343
previewImage = '';
4444

45-
@property({ type: Function })
45+
@property({ attribute: false })
4646
attachmentTemplate: AttachmentTemplate | undefined;
4747

48-
@property({ type: Function })
48+
@property({ attribute: false })
4949
attachmentHeaderTemplate: AttachmentTemplate | undefined;
5050

51-
@property({ type: Function })
51+
@property({ attribute: false })
5252
attachmentActionsTemplate: AttachmentTemplate | undefined;
5353

54-
@property({ type: Function })
54+
@property({ attribute: false })
5555
attachmentContentTemplate: AttachmentTemplate | undefined;
5656

5757
constructor() {

src/components/chat/themes/input.base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ igc-file-input::part(file-names){
2222
}
2323

2424
.input-container.dragging{
25-
background-color: rgba(10, 132, 255, 0.1);
25+
background-color: black;
2626
border: 2px dashed #0A84FF;
2727
}
2828

src/components/chat/themes/message.base.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@
3535
}
3636

3737
.message-container pre {
38-
background-color: rgba(0, 0, 0, 0.05);
38+
background-color: black;
3939
padding: 8px;
4040
border-radius: 4px;
4141
overflow-x: auto;
4242
margin: 8px 0;
4343
}
4444

4545
.message-container code {
46-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
46+
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
4747
font-size: 0.9em;
4848
padding: 2px 4px;
4949
border-radius: 4px;

src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export { default as IgcCarouselComponent } from './components/carousel/carousel.
1515
export { default as IgcCarouselIndicatorComponent } from './components/carousel/carousel-indicator.js';
1616
export { default as IgcCarouselSlideComponent } from './components/carousel/carousel-slide.js';
1717
export { default as IgcChatComponent } from './components/chat/chat.js';
18+
export { default as IgcChatInputComponent } from './components/chat/chat-input.js';
19+
export { default as IgcChatMessageComponent } from './components/chat/chat-message.js';
20+
export { default as IgcChatMessageListComponent } from './components/chat/chat-message-list.js';
21+
export { default as IgcChatMessageAttachmentsComponent } from './components/chat/message-attachments.js';
1822
export { default as IgcCheckboxComponent } from './components/checkbox/checkbox.js';
1923
export { default as IgcCircularProgressComponent } from './components/progress/circular-progress.js';
2024
export { default as IgcCircularGradientComponent } from './components/progress/circular-gradient.js';
@@ -95,6 +99,7 @@ export type { IgcBannerComponentEventMap } from './components/banner/banner.js';
9599
export type { IgcButtonGroupComponentEventMap } from './components/button-group/button-group.js';
96100
export type { IgcCalendarComponentEventMap } from './components/calendar/types.js';
97101
export type { IgcCarouselComponentEventMap } from './components/carousel/carousel.js';
102+
export type { IgcChatComponentEventMap } from './components/chat/chat.js';
98103
export type { IgcCheckboxComponentEventMap } from './components/checkbox/checkbox-base.js';
99104
export type { IgcCheckboxComponentEventMap as IgcSwitchComponentEventMap } from './components/checkbox/checkbox-base.js';
100105
export type { IgcChipComponentEventMap } from './components/chip/chip.js';
@@ -155,3 +160,9 @@ export type {
155160
IgcComboChangeEventArgs,
156161
} from './components/combo/types.js';
157162
export type { IconMeta } from './components/icon/registry/types.js';
163+
export type {
164+
IgcMessage,
165+
IgcMessageAttachment,
166+
AttachmentTemplate,
167+
MessageActionsTemplate,
168+
} from './components/chat/types.js';

0 commit comments

Comments
 (0)