Converted to SPFx 1.5 and added Exchange Public Calendar feed support (#548)
This commit is contained in:
parent
415b771e86
commit
3a1f2e92ed
|
@ -1,8 +1,11 @@
|
|||
{
|
||||
"@microsoft/generator-sharepoint": {
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.0",
|
||||
"libraryName": "react-calendar-feed",
|
||||
"libraryId": "dd42aa00-b07d-48a2-8896-cc2f8c0d3fae",
|
||||
"environment": "spo"
|
||||
"environment": "spo",
|
||||
"isCreatingSolution": true,
|
||||
"packageManager": "npm",
|
||||
"componentType": "webpart"
|
||||
}
|
||||
}
|
|
@ -15,7 +15,7 @@ For more information about how this solution was built, including some design de
|
|||
|
||||
## Used SharePoint Framework Version
|
||||
|
||||
![SPFx v1.4.1](https://img.shields.io/badge/SPFx-1.4.1-green.svg)
|
||||
![SPFx v1.5](https://img.shields.io/badge/SPFx-1.5-green.svg)
|
||||
|
||||
## Applies to
|
||||
|
||||
|
@ -29,6 +29,7 @@ Before you can use this web part example, you will need one of the following:
|
|||
* A publicly-accessible iCal feed (i.e.: .ics)
|
||||
* A publicly-accessible RSS feed of events (e.g.: Google calendar)
|
||||
* A WordPress WP-FullCalendar feed
|
||||
* An Exchange Public Calendar
|
||||
|
||||
It is important that all feeds do not require authentication. Also, make sure that your calendar includes upcoming events, as the web part will filter out evens that are earlier than today's date.
|
||||
|
||||
|
@ -45,6 +46,7 @@ react-calendar-feed | Hugo Bernier ([Tahoe Ninjas](http://tahoeninjas.blog), @be
|
|||
Version|Date|Comments
|
||||
-------|----|--------
|
||||
1.0|May 15, 2018|Initial release
|
||||
2.0|June 25, 2018|Converted to SPFx 1.5 and added Exchange Public Calendar support
|
||||
|
||||
## Disclaimer
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/spfx-build/config.2.0.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
|
||||
"version": "2.0",
|
||||
"bundles": {
|
||||
"calendar-feed-summary-web-part": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
|
||||
"workingDir": "./temp/deploy/",
|
||||
"account": "<!-- STORAGE ACCOUNT NAME -->",
|
||||
"container": "react-calendar-feed",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
|
||||
"solution": {
|
||||
"name": "react-calendar-feed-client-side-solution",
|
||||
"id": "dd42aa00-b07d-48a2-8896-cc2f8c0d3fae",
|
||||
"version": "1.0.0.0",
|
||||
"version": "1.0.1.2",
|
||||
"includeClientSideAssets": true
|
||||
},
|
||||
"paths": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/core-build/serve.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
|
||||
"port": 4321,
|
||||
"https": true,
|
||||
"initialPage": "https://localhost:5432/workbench",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/core-build/tslint.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/core-build/tslint.schema.json",
|
||||
// Display errors as warnings
|
||||
"displayAsWarning": true,
|
||||
// The TSLint task may have been configured with several custom lint rules
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
|
||||
"cdnBasePath": "<!-- PATH TO CDN -->"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-calendar-feed",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-calendar-feed",
|
||||
"version": "0.0.1",
|
||||
"version": "1.1.0",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
@ -17,11 +17,13 @@
|
|||
"@microsoft/sp-webpart-base": "~1.4.1",
|
||||
"@pnp/spfx-controls-react": "^1.3.0",
|
||||
"@pnp/spfx-property-controls": "^1.6.0",
|
||||
"@types/es6-promise": "0.0.33",
|
||||
"@types/react": "15.6.6",
|
||||
"@types/react-dom": "15.5.6",
|
||||
"@types/webpack-env": ">=1.12.1 <1.14.0",
|
||||
"ical.js": "^1.2.2",
|
||||
"ics-js": "^0.10.2",
|
||||
"jquery": "^3.3.1",
|
||||
"moment": "^2.22.1",
|
||||
"react": "15.6.2",
|
||||
"react-dom": "15.6.2",
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { css } from "@uifabric/utilities/lib/css";
|
||||
import { IconButton } from "office-ui-fabric-react/lib/Button";
|
||||
import * as React from "react";
|
||||
import Slider from "react-slick";
|
||||
import { ICarouselContainerProps, ICarouselContainerState } from ".";
|
||||
import styles from "./CarouselContainer.module.scss";
|
||||
import { css } from '@uifabric/utilities/lib/css';
|
||||
import { IconButton } from 'office-ui-fabric-react/lib/Button';
|
||||
import * as React from 'react';
|
||||
import Slider from 'react-slick';
|
||||
import { ICarouselContainerProps, ICarouselContainerState } from '.';
|
||||
import styles from './CarouselContainer.module.scss';
|
||||
|
||||
/**
|
||||
* Carousel container
|
||||
|
@ -23,28 +23,32 @@ export class CarouselContainer extends React.Component<ICarouselContainerProps,
|
|||
autoplaySpeed: 5000,
|
||||
dots: true,
|
||||
infinite: true,
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3,
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 4,
|
||||
speed: 500,
|
||||
centerPadding: "50px",
|
||||
pauseOnHover: true,
|
||||
variableWidth: false,
|
||||
useCSS: true,
|
||||
rows: 1,
|
||||
respondTo: 'slider',
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 600,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 1000,
|
||||
settings: {
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 4,
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
breakpoint: 2560,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: 801,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2,
|
||||
}
|
||||
},
|
||||
// there is no 1 slide option, as it converts to narrow view
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export * from "./CarouselContainer";
|
||||
export * from "./CarouselContainer.types";
|
||||
export * from './CarouselContainer';
|
||||
export * from './CarouselContainer.types';
|
|
@ -1,8 +1,8 @@
|
|||
import * as moment from "moment";
|
||||
import { css } from "office-ui-fabric-react/lib/Utilities";
|
||||
import * as React from "react";
|
||||
import styles from "./DateBox.module.scss";
|
||||
import { DateBoxSize, IDateBoxProps, IDateBoxState } from "./DateBox.types";
|
||||
import * as moment from 'moment';
|
||||
import { css } from 'office-ui-fabric-react/lib/Utilities';
|
||||
import * as React from 'react';
|
||||
import styles from './DateBox.module.scss';
|
||||
import { DateBoxSize, IDateBoxProps, IDateBoxState } from './DateBox.types';
|
||||
|
||||
/**
|
||||
* Shows a date in a SharePoint-looking date
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export * from "./DateBox";
|
||||
export * from "./DateBox.types";
|
||||
export * from './DateBox';
|
||||
export * from './DateBox.types';
|
|
@ -1,14 +1,15 @@
|
|||
import { Guid } from "@microsoft/sp-core-library";
|
||||
import * as strings from "CalendarFeedSummaryWebPartStrings";
|
||||
import * as ICS from "ics-js";
|
||||
import * as moment from "moment";
|
||||
import { ActionButton, DocumentCard, DocumentCardType, FocusZone, css } from "office-ui-fabric-react";
|
||||
import * as React from "react";
|
||||
import { IEventCardProps, IEventCardState } from ".";
|
||||
import { DateBox, DateBoxSize } from "../DateBox";
|
||||
import styles from "./EventCard.module.scss";
|
||||
const AllDayFormat: string = "dddd, MMMM Do YYYY";
|
||||
const LocalizedTimeFormat: string = "llll";
|
||||
import { Guid } from '@microsoft/sp-core-library';
|
||||
import * as strings from 'CalendarFeedSummaryWebPartStrings';
|
||||
import * as ICS from 'ics-js';
|
||||
import * as moment from 'moment';
|
||||
import { ActionButton, DocumentCard, DocumentCardType, FocusZone, css } from 'office-ui-fabric-react';
|
||||
import * as React from 'react';
|
||||
import { IEventCardProps, IEventCardState } from '.';
|
||||
import { DateBox, DateBoxSize } from '../DateBox';
|
||||
import styles from './EventCard.module.scss';
|
||||
const AllDayFormat: string = 'dddd, MMMM Do YYYY';
|
||||
const LocalizedTimeFormat: string = 'llll';
|
||||
import { Text } from '@microsoft/sp-core-library';
|
||||
/**
|
||||
* Shows an event in a document card
|
||||
*/
|
||||
|
@ -42,7 +43,7 @@ export class EventCard extends React.Component<IEventCardProps, IEventCardState>
|
|||
data-is-focusable={true}
|
||||
data-is-focus-item={true}
|
||||
role="listitem"
|
||||
aria-label={strings.EventCardWrapperArialLabel.replace("{0}", title).replace("{1}", `${dateString}`)}
|
||||
aria-label={Text.format(strings.EventCardWrapperArialLabel, title, `${dateString}`)}
|
||||
tabIndex={0}
|
||||
>
|
||||
<DocumentCard
|
||||
|
@ -97,7 +98,7 @@ export class EventCard extends React.Component<IEventCardProps, IEventCardState>
|
|||
data-is-focusable={true}
|
||||
data-is-focus-item={true}
|
||||
role="listitem"
|
||||
aria-label={strings.EventCardWrapperArialLabel.replace("{0}", title).replace("{1}", dateString)}
|
||||
aria-label={Text.format(strings.EventCardWrapperArialLabel, title, dateString)}
|
||||
>
|
||||
<DocumentCard
|
||||
className={css(styles.root, styles.rootIsActionable, styles.rootIsCompact)}
|
||||
|
@ -113,10 +114,8 @@ export class EventCard extends React.Component<IEventCardProps, IEventCardState>
|
|||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className={styles.category}>{category}</div>
|
||||
<div className={styles.title} data-automation-id="event-card-title">{title}</div>
|
||||
<div className={styles.datetime}>{dateString}</div>
|
||||
<div className={styles.location}>{location}</div>
|
||||
</div>
|
||||
</DocumentCard>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ICalendarEvent } from "../../../../lib/shared/services/CalendarService";
|
||||
import { ICalendarEvent } from '../../../../lib/shared/services/CalendarService';
|
||||
|
||||
export interface IEventCardProps {
|
||||
isEditMode: boolean;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export * from "./EventCard";
|
||||
export * from "./EventCard.types";
|
||||
export * from './EventCard';
|
||||
export * from './EventCard.types';
|
|
@ -1,10 +1,10 @@
|
|||
import { ActionButton, IButtonProps } from "office-ui-fabric-react/lib/Button";
|
||||
import { Icon } from "office-ui-fabric-react/lib/Icon";
|
||||
import { css } from "office-ui-fabric-react/lib/Utilities";
|
||||
import * as React from "react";
|
||||
import { IPagingProps, IPagingState } from ".";
|
||||
import styles from "./Paging.module.scss";
|
||||
import * as strings from "CalendarFeedSummaryWebPartStrings";
|
||||
import { ActionButton, IButtonProps } from 'office-ui-fabric-react/lib/Button';
|
||||
import { Icon } from 'office-ui-fabric-react/lib/Icon';
|
||||
import { css } from 'office-ui-fabric-react/lib/Utilities';
|
||||
import * as React from 'react';
|
||||
import { IPagingProps, IPagingState } from '.';
|
||||
import styles from './Paging.module.scss';
|
||||
import * as strings from 'CalendarFeedSummaryWebPartStrings';
|
||||
|
||||
/**
|
||||
* A custom pagination control designed to look & feel like Office UI Fabric
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export * from "./Paging";
|
||||
export * from "./Paging.types";
|
||||
export * from './Paging';
|
||||
export * from './Paging.types';
|
|
@ -1,9 +1,9 @@
|
|||
import { HttpClient, HttpClientResponse } from "@microsoft/sp-http";
|
||||
import { IWebPartContext } from "@microsoft/sp-webpart-base";
|
||||
import * as moment from "moment";
|
||||
import { CalendarEventRange } from ".";
|
||||
import { ICalendarEvent } from "./ICalendarEvent";
|
||||
import { ICalendarService } from "./ICalendarService";
|
||||
import { HttpClient, HttpClientResponse } from '@microsoft/sp-http';
|
||||
import { IWebPartContext } from '@microsoft/sp-webpart-base';
|
||||
import * as moment from 'moment';
|
||||
import { CalendarEventRange } from '.';
|
||||
import { ICalendarEvent } from './ICalendarEvent';
|
||||
import { ICalendarService } from './ICalendarService';
|
||||
|
||||
/**
|
||||
* Base Calendar Service
|
||||
|
@ -88,9 +88,9 @@ export abstract class BaseCalendarService implements ICalendarService {
|
|||
*/
|
||||
protected fetchResponseAsJson(feedUrl: string): Promise<any> {
|
||||
return this.fetchResponse(feedUrl)
|
||||
.then((response: HttpClientResponse) => response.json(), (error: any) => {
|
||||
throw error;
|
||||
});
|
||||
.then((response: HttpClientResponse) => response.json(), (error: any) => {
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as moment from "moment";
|
||||
import * as moment from 'moment';
|
||||
|
||||
export enum DateRange {
|
||||
OneWeek,
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { MockCalendarService } from "./MockCalendarService";
|
||||
import { RSSCalendarService } from "./RSSCalendarService";
|
||||
import { WordPressFullCalendarService } from "./WordPressFullCalendarService";
|
||||
import { iCalCalendarService } from "./iCalCalendarService";
|
||||
import { MockCalendarService } from './MockCalendarService';
|
||||
import { RSSCalendarService } from './RSSCalendarService';
|
||||
import { WordPressFullCalendarService } from './WordPressFullCalendarService';
|
||||
import { iCalCalendarService } from './iCalCalendarService';
|
||||
import { ExchangePublicCalendarService } from './ExchangePublicCalendarService';
|
||||
|
||||
export class CalendarServiceProviderList {
|
||||
public static getProviders(): any[] {
|
||||
|
@ -16,6 +17,12 @@ export class CalendarServiceProviderList {
|
|||
});
|
||||
}
|
||||
|
||||
providers.push({
|
||||
label: "Exchange Public Calendar",
|
||||
key: "exchange",
|
||||
initialize: () => new ExchangePublicCalendarService()
|
||||
});
|
||||
|
||||
providers.push({
|
||||
label: "WordPress",
|
||||
key: "wordpress",
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* Exchange Public Calendar Service
|
||||
*/
|
||||
import { ICalendarService } from '..';
|
||||
import { ICalendarEvent } from '../ICalendarEvent';
|
||||
import { iCalCalendarService } from '../iCalCalendarService';
|
||||
|
||||
// tslint:disable-next-line:class-name
|
||||
export class ExchangePublicCalendarService extends iCalCalendarService implements ICalendarService {
|
||||
constructor() {
|
||||
super();
|
||||
this.Name = "Exchange";
|
||||
}
|
||||
|
||||
public getEvents = (): Promise<ICalendarEvent[]> => {
|
||||
// Exchange public calendar shares are really ICS calendars.
|
||||
// we allow users to pass either the .html URL or
|
||||
// the .ics, but we really need the .ics file
|
||||
|
||||
const htmlExtension:string = ".html";
|
||||
if (this.FeedUrl.indexOf(htmlExtension, this.FeedUrl.length - htmlExtension.length) >= 0) {
|
||||
// the url ends with .html. Replace it with .ics
|
||||
const root: string = this.FeedUrl.substring(0, this.FeedUrl.length - htmlExtension.length);
|
||||
this.FeedUrl= `${root}.ics`;
|
||||
}
|
||||
|
||||
return this.getEvents();
|
||||
}
|
||||
|
||||
private changeExtensionToIcs(url: string): string {
|
||||
const htmlExtension:string = ".html";
|
||||
if (url.indexOf(htmlExtension, url.length - htmlExtension.length) >= 0) {
|
||||
// the url ends with .html. Replace it with .ics
|
||||
const root: string = url.substring(0, url.length - htmlExtension.length);
|
||||
return `${root}.ics`;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
export * from './ExchangePublicCalendarService';
|
|
@ -1,5 +1,5 @@
|
|||
import { IWebPartContext } from "@microsoft/sp-webpart-base";
|
||||
import { CalendarEventRange, ICalendarEvent } from ".";
|
||||
import { IWebPartContext } from '@microsoft/sp-webpart-base';
|
||||
import { CalendarEventRange, ICalendarEvent } from '.';
|
||||
|
||||
export interface ICalendarService {
|
||||
Context: IWebPartContext;
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
* This provider will NOT be listed in the list of available providers when this solution is packaged with --ship.
|
||||
* Don't freak out, it didn't just disappear.
|
||||
*/
|
||||
import * as moment from "moment";
|
||||
import { BaseCalendarService } from "../BaseCalendarService";
|
||||
import { ICalendarEvent } from "../ICalendarEvent";
|
||||
import { ICalendarService } from "../ICalendarService";
|
||||
import * as moment from 'moment';
|
||||
import { BaseCalendarService } from '../BaseCalendarService';
|
||||
import { ICalendarEvent } from '../ICalendarEvent';
|
||||
import { ICalendarService } from '../ICalendarService';
|
||||
|
||||
const today: Date = new Date();
|
||||
const sampleEvents: ICalendarEvent[] = [
|
||||
|
@ -23,9 +23,9 @@ const sampleEvents: ICalendarEvent[] = [
|
|||
{
|
||||
"title": "This event will be in one week",
|
||||
"start": moment().add(1, "w").toDate(),
|
||||
"end": moment().add(1, "w").toDate(),
|
||||
"end": moment().add(1, "w").add(1, "h").toDate(),
|
||||
"url": "https://www.contoso.com/news-events/events/2/",
|
||||
"allDay": true,
|
||||
"allDay": false,
|
||||
"category": "Meeting",
|
||||
"location": undefined,
|
||||
"description": undefined
|
||||
|
|
|
@ -1 +1 @@
|
|||
export * from "./MockCalendarService";
|
||||
export * from './MockCalendarService';
|
|
@ -6,12 +6,12 @@
|
|||
* every one I could find on NPM and GitHub and found that they did not meet my needs.
|
||||
* I'm open to suggestions, though, if you have a library that you think would work better.
|
||||
*/
|
||||
import { HttpClientResponse } from "@microsoft/sp-http";
|
||||
import * as convert from "xml-js";
|
||||
import { ICalendarService } from "..";
|
||||
import { BaseCalendarService } from "../BaseCalendarService";
|
||||
import { ICalendarEvent } from "../ICalendarEvent";
|
||||
import { escape, unescape } from "@microsoft/sp-lodash-subset";
|
||||
import { HttpClientResponse } from '@microsoft/sp-http';
|
||||
import * as convert from 'xml-js';
|
||||
import { ICalendarService } from '..';
|
||||
import { BaseCalendarService } from '../BaseCalendarService';
|
||||
import { ICalendarEvent } from '../ICalendarEvent';
|
||||
import { escape, unescape } from '@microsoft/sp-lodash-subset';
|
||||
|
||||
export class RSSCalendarService extends BaseCalendarService implements ICalendarService {
|
||||
constructor() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
export * from "./RSSCalendarService";
|
||||
export * from './RSSCalendarService';
|
|
@ -1,10 +1,10 @@
|
|||
/**
|
||||
* ExtensionService
|
||||
*/
|
||||
import { ICalendarService } from "..";
|
||||
import { BaseCalendarService } from "../BaseCalendarService";
|
||||
import { ICalendarEvent } from "../ICalendarEvent";
|
||||
import { IWordPressFullCalendarEventResponse } from "./IWordPressFullCalendarEventResponse";
|
||||
import { ICalendarService } from '..';
|
||||
import { BaseCalendarService } from '../BaseCalendarService';
|
||||
import { ICalendarEvent } from '../ICalendarEvent';
|
||||
import { IWordPressFullCalendarEventResponse } from './IWordPressFullCalendarEventResponse';
|
||||
|
||||
export class WordPressFullCalendarService extends BaseCalendarService implements ICalendarService {
|
||||
constructor() {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
export * from "./IWordPressFullCalendarEventResponse";
|
||||
export * from "./WordPressFullCalendarService";
|
||||
export * from './IWordPressFullCalendarEventResponse';
|
||||
export * from './WordPressFullCalendarService';
|
|
@ -1,11 +1,11 @@
|
|||
/**
|
||||
* ExtensionService
|
||||
*/
|
||||
import { HttpClientResponse } from "@microsoft/sp-http";
|
||||
import * as ICAL from "ical.js";
|
||||
import { ICalendarService } from "..";
|
||||
import { BaseCalendarService } from "../BaseCalendarService";
|
||||
import { ICalendarEvent } from "../ICalendarEvent";
|
||||
import { HttpClientResponse } from '@microsoft/sp-http';
|
||||
import * as ICAL from 'ical.js';
|
||||
import { ICalendarService } from '..';
|
||||
import { BaseCalendarService } from '../BaseCalendarService';
|
||||
import { ICalendarEvent } from '../ICalendarEvent';
|
||||
|
||||
// tslint:disable-next-line:class-name
|
||||
export class iCalCalendarService extends BaseCalendarService implements ICalendarService {
|
||||
|
|
|
@ -1 +1 @@
|
|||
export * from "./iCalCalendarService";
|
||||
export * from './iCalCalendarService';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export * from "./ICalendarEvent";
|
||||
export * from "./ICalendarService";
|
||||
export * from "./CalendarEventRange";
|
||||
export * from "./CalendarServiceProviderList";
|
||||
export * from './ICalendarEvent';
|
||||
export * from './ICalendarService';
|
||||
export * from './CalendarEventRange';
|
||||
export * from './CalendarServiceProviderList';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$schema": "https://dev.office.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json",
|
||||
"id": "b83bb343-bc5e-460c-9efd-52de06d32ffa",
|
||||
"alias": "CalendarFeedSummaryWebPart",
|
||||
"componentType": "WebPart",
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import { Version } from "@microsoft/sp-core-library";
|
||||
import { Version } from '@microsoft/sp-core-library';
|
||||
// tslint:disable-next-line:max-line-length
|
||||
import { BaseClientSideWebPart, IPropertyPaneConfiguration, IPropertyPaneDropdownOption, PropertyPaneDropdown } from "@microsoft/sp-webpart-base";
|
||||
import { CalloutTriggers } from "@pnp/spfx-property-controls/lib/PropertyFieldHeader";
|
||||
import { PropertyFieldNumber } from "@pnp/spfx-property-controls/lib/PropertyFieldNumber";
|
||||
import { PropertyFieldSliderWithCallout } from "@pnp/spfx-property-controls/lib/PropertyFieldSliderWithCallout";
|
||||
import { PropertyFieldTextWithCallout } from "@pnp/spfx-property-controls/lib/PropertyFieldTextWithCallout";
|
||||
import { PropertyFieldToggleWithCallout } from "@pnp/spfx-property-controls/lib/PropertyFieldToggleWithCallout";
|
||||
import * as strings from "CalendarFeedSummaryWebPartStrings";
|
||||
import * as React from "react";
|
||||
import * as ReactDom from "react-dom";
|
||||
import { CalendarEventRange, DateRange, ICalendarService } from "../../shared/services/CalendarService";
|
||||
import { CalendarServiceProviderList } from "../../shared/services/CalendarService/CalendarServiceProviderList";
|
||||
import { ICalendarFeedSummaryWebPartProps } from "./CalendarFeedSummaryWebPart.types";
|
||||
import CalendarFeedSummary from "./components/CalendarFeedSummary";
|
||||
import { ICalendarFeedSummaryProps } from "./components/CalendarFeedSummary.types";
|
||||
import { BaseClientSideWebPart, IPropertyPaneConfiguration, IPropertyPaneDropdownOption, PropertyPaneDropdown } from '@microsoft/sp-webpart-base';
|
||||
import { CalloutTriggers } from '@pnp/spfx-property-controls/lib/PropertyFieldHeader';
|
||||
import { PropertyFieldNumber } from '@pnp/spfx-property-controls/lib/PropertyFieldNumber';
|
||||
import { PropertyFieldSliderWithCallout } from '@pnp/spfx-property-controls/lib/PropertyFieldSliderWithCallout';
|
||||
import { PropertyFieldTextWithCallout } from '@pnp/spfx-property-controls/lib/PropertyFieldTextWithCallout';
|
||||
import { PropertyFieldToggleWithCallout } from '@pnp/spfx-property-controls/lib/PropertyFieldToggleWithCallout';
|
||||
import * as strings from 'CalendarFeedSummaryWebPartStrings';
|
||||
import * as React from 'react';
|
||||
import * as ReactDom from 'react-dom';
|
||||
import { CalendarEventRange, DateRange, ICalendarService } from '../../shared/services/CalendarService';
|
||||
import { CalendarServiceProviderList } from '../../shared/services/CalendarService/CalendarServiceProviderList';
|
||||
import { ICalendarFeedSummaryWebPartProps } from './CalendarFeedSummaryWebPart.types';
|
||||
import CalendarFeedSummary from './components/CalendarFeedSummary';
|
||||
import { ICalendarFeedSummaryProps } from './components/CalendarFeedSummary.types';
|
||||
|
||||
// this is the same width that the SharePoint events web parts use to render as narrow
|
||||
const MaxMobileWidth: number = 480;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { DateRange } from "../../shared/services/CalendarService";
|
||||
import { DateRange } from '../../shared/services/CalendarService';
|
||||
|
||||
/**
|
||||
* Web part properties stored in web part configuration
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { DisplayMode } from "@microsoft/sp-core-library";
|
||||
import { SPComponentLoader } from "@microsoft/sp-loader";
|
||||
import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
|
||||
import { WebPartTitle } from "@pnp/spfx-controls-react/lib/WebPartTitle";
|
||||
import * as strings from "CalendarFeedSummaryWebPartStrings";
|
||||
import * as moment from "moment";
|
||||
import { FocusZone, FocusZoneDirection, List, Spinner, css } from "office-ui-fabric-react";
|
||||
import * as React from "react";
|
||||
import { CarouselContainer } from "../../../shared/components/CarouselContainer";
|
||||
import { EventCard } from "../../../shared/components/EventCard";
|
||||
import { Paging } from "../../../shared/components/Paging";
|
||||
import { CalendarServiceProviderType, ICalendarEvent, ICalendarService } from "../../../shared/services/CalendarService";
|
||||
import styles from "./CalendarFeedSummary.module.scss";
|
||||
import { ICalendarFeedSummaryProps, ICalendarFeedSummaryState, IFeedCache } from "./CalendarFeedSummary.types";
|
||||
import { DisplayMode } from '@microsoft/sp-core-library';
|
||||
import { SPComponentLoader } from '@microsoft/sp-loader';
|
||||
import { Placeholder } from '@pnp/spfx-controls-react/lib/Placeholder';
|
||||
import { WebPartTitle } from '@pnp/spfx-controls-react/lib/WebPartTitle';
|
||||
import * as strings from 'CalendarFeedSummaryWebPartStrings';
|
||||
import * as moment from 'moment';
|
||||
import { FocusZone, FocusZoneDirection, List, Spinner, css } from 'office-ui-fabric-react';
|
||||
import * as React from 'react';
|
||||
import { CarouselContainer } from '../../../shared/components/CarouselContainer';
|
||||
import { EventCard } from '../../../shared/components/EventCard';
|
||||
import { Paging } from '../../../shared/components/Paging';
|
||||
import { CalendarServiceProviderType, ICalendarEvent, ICalendarService } from '../../../shared/services/CalendarService';
|
||||
import styles from './CalendarFeedSummary.module.scss';
|
||||
import { ICalendarFeedSummaryProps, ICalendarFeedSummaryState, IFeedCache } from './CalendarFeedSummary.types';
|
||||
|
||||
// the key used when caching events
|
||||
const CacheKey: string = "calendarFeedSummary";
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
* file because that's what the Office UI Fabric team does and
|
||||
* I kinda liked it.
|
||||
*/
|
||||
import { DisplayMode } from "@microsoft/sp-core-library";
|
||||
import { IWebPartContext } from "@microsoft/sp-webpart-base";
|
||||
import { Moment } from "moment";
|
||||
import { ICalendarEvent, ICalendarService } from "../../../shared/services/CalendarService";
|
||||
import { DisplayMode } from '@microsoft/sp-core-library';
|
||||
import { IWebPartContext } from '@microsoft/sp-webpart-base';
|
||||
import { Moment } from 'moment';
|
||||
import { ICalendarEvent, ICalendarService } from '../../../shared/services/CalendarService';
|
||||
|
||||
/**
|
||||
* The props for the calendar feed summary component
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "es5",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "commonjs",
|
||||
"module": "esnext",
|
||||
"jsx": "react",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
|
|
Loading…
Reference in New Issue