|
8 | 8 | import * as MicrosoftGraph from '@microsoft/microsoft-graph-types'; |
9 | 9 | import { html, TemplateResult } from 'lit'; |
10 | 10 | import { property } from 'lit/decorators.js'; |
11 | | -import { |
12 | | - Providers, |
13 | | - ProviderState, |
14 | | - MgtTemplatedComponent, |
15 | | - prepScopes, |
16 | | - mgtHtml, |
17 | | - customElement, |
18 | | - CollectionResponse |
19 | | -} from '@microsoft/mgt-element'; |
| 11 | +import { Providers, ProviderState, MgtTemplatedComponent, mgtHtml, customElement } from '@microsoft/mgt-element'; |
20 | 12 | import '../../styles/style-helper'; |
21 | 13 | import '../mgt-person/mgt-person'; |
22 | 14 | import { styles } from './mgt-agenda-css'; |
23 | 15 | import { getEventsPageIterator, getEventsQueryPageIterator } from './mgt-agenda.graph'; |
24 | 16 | import { SvgIcon, getSvg } from '../../utils/SvgHelper'; |
25 | 17 | import { MgtPeople } from '../mgt-people/mgt-people'; |
26 | 18 | import { registerFluentComponents } from '../../utils/FluentComponents'; |
27 | | -import { fluentCard, fluentTooltip } from '@fluentui/web-components'; |
| 19 | +import { fluentCard } from '@fluentui/web-components'; |
28 | 20 | import { classMap } from 'lit/directives/class-map.js'; |
29 | | -registerFluentComponents(fluentCard, fluentTooltip); |
| 21 | +registerFluentComponents(fluentCard); |
30 | 22 |
|
31 | 23 | /** |
32 | 24 | * Web Component which represents events in a user or group calendar. |
@@ -407,38 +399,16 @@ export class MgtAgenda extends MgtTemplatedComponent { |
407 | 399 | * @memberof MgtAgenda |
408 | 400 | */ |
409 | 401 | protected renderTitle(event: MicrosoftGraph.Event): TemplateResult { |
410 | | - let eventDescription = event?.bodyPreview ? event.bodyPreview.slice(0, 100) : ''; |
411 | | - const hasDescription = eventDescription !== ''; |
412 | | - |
413 | | - const eventSubjectClasses = { |
414 | | - 'event-subject': true, |
415 | | - narrow: this._isNarrow |
416 | | - }; |
417 | | - |
418 | | - eventDescription = eventDescription.split(' ').slice(0, -1).join(' ') + '...'; |
419 | | - |
420 | | - const hasDescriptionDiv = html` |
421 | | - <div |
422 | | - aria-describedby="tooltip-${event.id}" |
423 | | - class="${classMap(eventSubjectClasses)}" |
424 | | - id=${event.id}> |
425 | | - ${event.subject} |
426 | | - </div> |
427 | | - <fluent-tooltip |
428 | | - id="tooltip-${event.id}" |
429 | | - position="right" |
430 | | - anchor="${event.id}"> |
431 | | - ${eventDescription} |
432 | | - </fluent-tooltip> |
433 | | - `; |
434 | | - |
435 | | - const noDescriptionDiv = html` |
| 402 | + return html` |
436 | 403 | <div |
437 | 404 | aria-label=${event.subject} |
438 | | - class="${classMap(eventSubjectClasses)}"> |
439 | | - ${event.subject} |
| 405 | + class="${classMap({ |
| 406 | + 'event-subject': true, |
| 407 | + narrow: this._isNarrow |
| 408 | + })}" |
| 409 | + > |
| 410 | + ${event.subject} |
440 | 411 | </div>`; |
441 | | - return hasDescription ? hasDescriptionDiv : noDescriptionDiv; |
442 | 412 | } |
443 | 413 |
|
444 | 414 | /** |
|
0 commit comments