From 28900087ecfe52314e95efbf7c6cbf1e32236c5b Mon Sep 17 00:00:00 2001 From: mohammadamer Date: Tue, 16 Mar 2021 14:02:54 +0200 Subject: [PATCH 1/7] Update spservice.ts to fix delete events Update spservice.ts to fix issue with delete recurrence events that has no recurrence Exception. --- samples/react-calendar/src/services/spservices.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/react-calendar/src/services/spservices.ts b/samples/react-calendar/src/services/spservices.ts index b5bb0dd82..5c3e28d68 100644 --- a/samples/react-calendar/src/services/spservices.ts +++ b/samples/react-calendar/src/services/spservices.ts @@ -246,7 +246,7 @@ export default class spservices { break; case '1': // recurrence Event // if delete is a main recrrence delete all recurrences and main recurrence - if (recurrenceSeriesEdited) { + if (!recurrenceSeriesEdited) { // delete execptions if exists before delete recurrence event await this.deleteRecurrenceExceptions(event, siteUrl, listId); await web.lists.getById(listId).items.getById(event.Id).delete(); From e67e9b6352202e815e63f882359942e0b268f091 Mon Sep 17 00:00:00 2001 From: Eric Overfield Date: Tue, 16 Mar 2021 15:16:33 -0700 Subject: [PATCH 2/7] update README for rss reader --- samples/react-rss-reader/README.md | 8 ++++++-- .../src/webparts/rssReader/RssReaderWebPart.manifest.json | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/samples/react-rss-reader/README.md b/samples/react-rss-reader/README.md index f93641e1f..7de26edd7 100644 --- a/samples/react-rss-reader/README.md +++ b/samples/react-rss-reader/README.md @@ -5,7 +5,7 @@ A RSS Reader original based on work completed by Olivier Carpentier's from: https://github.com/OlivierCC/spfx-40-fantastics/tree/master/src/webparts/rssReader Root project: https://github.com/OlivierCC/spfx-40-fantastics -React RSS Reader utilizes SharePoint Framework v1.7.0 with no dependency on jQuery or a RSS Feed library. This project does utilize https://sharepoint.github.io/sp-dev-fx-property-controls/, and Moment React for date manipulation. Handlebar template option derived from React Search Refiners: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-search-refiners. +React RSS Reader utilizes SharePoint Framework v1.11.0 with no dependency on jQuery or a RSS Feed library. This project does utilize https://sharepoint.github.io/sp-dev-fx-property-controls/, and Moment React for date manipulation. Handlebar template option derived from React Search Refiners (PnP Modern Search): https://microsoft-search.github.io/pnp-modern-search/. Use NodeJS version 10 to compile or rebuild the spfx solution. Main features include: @@ -58,10 +58,14 @@ Version|Date|Comments - Clone this repository ### SPFx -- In the command line run: +- In the command line, with a version of Node 10, i.e. 10.16.3, run: - `npm install` - `gulp serve` +- To bundle and package the installable .sppkg, run: + - `gulp bundle --ship` + - `gulp package-solution --ship` + ## Web Parts Configuration ### RSS Reader Web Part diff --git a/samples/react-rss-reader/src/webparts/rssReader/RssReaderWebPart.manifest.json b/samples/react-rss-reader/src/webparts/rssReader/RssReaderWebPart.manifest.json index f0c11381d..ff0e75372 100644 --- a/samples/react-rss-reader/src/webparts/rssReader/RssReaderWebPart.manifest.json +++ b/samples/react-rss-reader/src/webparts/rssReader/RssReaderWebPart.manifest.json @@ -17,10 +17,10 @@ "groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other "group": { "default": "Social Tools" }, "title": { "default": "Rss Reader" }, - "description": { "default": "Basic Rss Reader utilizing FeedEK" }, + "description": { "default": "Basic Rss Reader" }, "officeFabricIconFontName": "InternetSharing", "properties": { - "feedUrl": "https://techcommunity.microsoft.com/gxcuf89792/rss/board?board.id=Office365Blog", + "feedUrl": "https://www.reddit.com/r/Office365/.rss?format=xml", "feedService": 2, "feedServiceUrl": "", "feedServiceApiKey": "", From d7f623adbf6af607d1276de5a5fed3ad1bf80479 Mon Sep 17 00:00:00 2001 From: mohammadamer Date: Thu, 18 Mar 2021 17:45:16 +0200 Subject: [PATCH 3/7] Update spservice.ts to fix delete events Change the RecurrentID to Date type Some fixes for RecurrentID in some places since it became a Date Type applied SharePoint Standard functionality for deleting one occurrence of recurrent event by adding prefix "Deleted" --- samples/react-calendar/src/services/spservices.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/samples/react-calendar/src/services/spservices.ts b/samples/react-calendar/src/services/spservices.ts index 5c3e28d68..7f916b5eb 100644 --- a/samples/react-calendar/src/services/spservices.ts +++ b/samples/react-calendar/src/services/spservices.ts @@ -91,7 +91,7 @@ export default class spservices { UID: newEvent.UID, RecurrenceData: newEvent.RecurrenceData ? await this.deCodeHtmlEntities(newEvent.RecurrenceData) : "", MasterSeriesItemID: newEvent.MasterSeriesItemID, - RecurrenceID: newEvent.RecurrenceID ? await this.getUtcTime(newEvent.RecurrenceID) : undefined, + RecurrenceID: newEvent.RecurrenceID ? newEvent.RecurrenceID : undefined, }); } catch (error) { @@ -240,20 +240,21 @@ export default class spservices { switch (event.EventType.toString()) { case '4': // Exception Recurrence Event results = await web.lists.getById(listId).items.getById(event.Id).update({ - Title: `Delete: ${event.title}`, + Title: `Deleted: ${event.title}`, EventType: '3', }); break; case '1': // recurrence Event // if delete is a main recrrence delete all recurrences and main recurrence - if (!recurrenceSeriesEdited) { + if (recurrenceSeriesEdited) { // delete execptions if exists before delete recurrence event await this.deleteRecurrenceExceptions(event, siteUrl, listId); await web.lists.getById(listId).items.getById(event.Id).delete(); } else { - // delete a single recurrence Exception. add new entry with eventtype 3 - - event.RecurrenceID = event.EventDate.toString(); + //Applying the Standard funactionality of SharePoint When deleting for deleting one occurrence of recurrent event by + // 1) adding prefix "Deleted" to event title 2) Set RecurrenceID to event Date 3) Set MasterSeriesItemID to event ID 4)Set fRecurrence to true 5) Set event type to 3 + event.title = `Deleted: ${event.title}`; + event.RecurrenceID = event.EventDate; event.MasterSeriesItemID = event.ID.toString(); event.fRecurrence = true; event.EventType = '3'; @@ -532,7 +533,7 @@ export default class spservices { Duration: event.Duration, RecurrenceData: event.RecurrenceData ? await this.deCodeHtmlEntities(event.RecurrenceData) : "", fRecurrence: event.fRecurrence, - RecurrenceID: event.RecurrenceID ? await this.getLocalTime(event.RecurrenceID) : undefined, + RecurrenceID: event.RecurrenceID ? event.RecurrenceID : undefined, MasterSeriesItemID: event.MasterSeriesItemID, UID: event.UID.replace("{", "").replace("}", ""), }); From 4cecbce672335bdfd252dc204f0ac47111a384db Mon Sep 17 00:00:00 2001 From: mohammadamer Date: Thu, 18 Mar 2021 18:00:18 +0200 Subject: [PATCH 4/7] Change RecurrenceID to Date type Change RecurrenceID to Date type like SharePoint Standard functionality to solve the issue of deleting one occurrence of recurrent event --- samples/react-calendar/src/controls/Event/event.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/react-calendar/src/controls/Event/event.tsx b/samples/react-calendar/src/controls/Event/event.tsx index c444f9c38..3102c40ca 100644 --- a/samples/react-calendar/src/controls/Event/event.tsx +++ b/samples/react-calendar/src/controls/Event/event.tsx @@ -176,7 +176,7 @@ export class Event extends React.Component { } else { if (this.state.eventData.EventType == '1') { // recurrence exception - eventData.RecurrenceID = eventData.EventDate.toString(); + eventData.RecurrenceID = eventData.EventDate; eventData.MasterSeriesItemID = eventData.ID.toString(); eventData.EventType = "4"; eventData.fRecurrence = true; From 2aa033e3724d5283072600d65478c368b4444576 Mon Sep 17 00:00:00 2001 From: mohammadamer Date: Thu, 18 Mar 2021 18:02:12 +0200 Subject: [PATCH 5/7] Change RecurrenceID to Date type Change RecurrenceID to Date type like SharePoint Standard functionality to solve the issue of deleting one occurrence of recurrent event --- samples/react-calendar/src/services/IEventData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/react-calendar/src/services/IEventData.ts b/samples/react-calendar/src/services/IEventData.ts index c5cab8557..a62765ffb 100644 --- a/samples/react-calendar/src/services/IEventData.ts +++ b/samples/react-calendar/src/services/IEventData.ts @@ -20,6 +20,6 @@ export interface IEventData { fRecurrence?: string | boolean; EventType?: string; UID?: string; - RecurrenceID?: string; + RecurrenceID?: Date; MasterSeriesItemID?: string; } From 974e5e671f19a414ef0663f4597ad54192e2a932 Mon Sep 17 00:00:00 2001 From: Hugo Bernier Date: Sun, 21 Mar 2021 01:14:43 -0400 Subject: [PATCH 6/7] Updated readme and sample.json --- samples/react-calendar/README.md | 17 ++++++++++++----- samples/react-calendar/assets/sample.json | 9 ++++++++- .../react-calendar/config/package-solution.json | 2 +- samples/react-calendar/package-lock.json | 2 +- samples/react-calendar/package.json | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/samples/react-calendar/README.md b/samples/react-calendar/README.md index 1dd894e5f..2ea80ec39 100644 --- a/samples/react-calendar/README.md +++ b/samples/react-calendar/README.md @@ -84,9 +84,14 @@ The Web Part checks the user's permissions for the View, Add, Edit, and Delete e ![calendar](assets/screen9.png) -## Used SharePoint Framework Version +## Compatibility + +![SPFx 1.10](https://img.shields.io/badge/SPFx-1.10.0-green.svg) +![Node.js LTS 6.x | LTS 8.x](https://img.shields.io/badge/Node.js-LTS%206.x%20%7C%20LTS%208.x-green.svg) +![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg) +![Teams N/A: Untested with Microsoft Teams](https://img.shields.io/badge/Teams-N%2FA-lightgrey.svg "Untested with Microsoft Teams") +![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench") -![1.10.0](https://img.shields.io/badge/version-1.10.0-green.svg) ## Applies to @@ -100,7 +105,7 @@ Property |Type|Required| comments --------------------|----|--------|---------- Site Url of Calendar List | Text| yes| Calendar list| Choice/Dropdown | yes| this is filled with all list of type "event list" created -Start Date | Date | yes | Event Date +Start Date | Date | yes | Event Date End Date| Date| yes | Event Date ## Solution @@ -109,11 +114,12 @@ The Web Part Use PnPjs library, Office-ui-fabric-react components. react Big-Cal Solution|Author(s) --------|--------- +Calendar Web PArt|[Mohammed Amer](https://www.linkedin.com/in/mohammad3mer/) ([@https://twitter.com/Mohammad3mer](https://twitter.com/Mohammad3mer)) +Calendar Web Part|Abderahman Moujahid +Calendar Web Part|Hugo Bernier ([@bernier](https://twitter.com/bernierh), [Tahoe Ninjas](https://tahoeninjas.blog/)) Calendar Web Part|João Mendes Calendar Web Part|Mohamed Derhalli -Calendar Web Part (Upgrade)|Hugo Bernier ([@bernier](https://twitter.com/bernierh), [Tahoe Ninjas](https://tahoeninjas.blog/)) Calendar Web Part|Nanddeep Nachan ([@NanddeepNachan](https://twitter.com/NanddeepNachan)) -Calendar Web Part|Abderahman Moujahid ## Version history @@ -128,6 +134,7 @@ Version|Date|Comments 1.0.6|December 3, 2020|Fixed all-day events (#1623) 1.0.7|December 4, 2020|Fixed styling Year view + Dutch localization 1.0.8|December 24, 2020|Fixed timezone difference (#1646) +1.0.9|March 16, 2021|Fixed issue deleting events (#1773) ## Disclaimer diff --git a/samples/react-calendar/assets/sample.json b/samples/react-calendar/assets/sample.json index 850161972..73039160a 100644 --- a/samples/react-calendar/assets/sample.json +++ b/samples/react-calendar/assets/sample.json @@ -189,6 +189,13 @@ "company": "", "pictureUrl": "https://avatars.githubusercontent.com/u/36161889?s=460\u0026u=afdd5f6681bc375ee3811482dec79824c12d8170\u0026v=4", "name": "Abderahman Moujahid" + }, + { + "gitHubAccount": "mohammadamer", + "company": "Atea Global Services", + "pictureUrl": "https://avatars.githubusercontent.com/u/19314043?s=460&u=79acb7fd0ad466e1040ddd8a739fa93385018b81&v=4", + "name": "Mohammed Amer", + "twitter": "Mohammad3mer" } ], "references": [ @@ -204,4 +211,4 @@ } ] } -] \ No newline at end of file +] diff --git a/samples/react-calendar/config/package-solution.json b/samples/react-calendar/config/package-solution.json index 1e348ebe4..4560161d7 100644 --- a/samples/react-calendar/config/package-solution.json +++ b/samples/react-calendar/config/package-solution.json @@ -3,7 +3,7 @@ "solution": { "name": "react-calendar-client-side-solution", "id": "3a13208b-3874-4036-9262-4edd22e88187", - "version": "1.0.8.0", + "version": "1.0.9.0", "includeClientSideAssets": true, "skipFeatureDeployment": true, "isDomainIsolated": false diff --git a/samples/react-calendar/package-lock.json b/samples/react-calendar/package-lock.json index b89d80254..e6ee108fd 100644 --- a/samples/react-calendar/package-lock.json +++ b/samples/react-calendar/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-calendar", - "version": "1.0.2", + "version": "1.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/samples/react-calendar/package.json b/samples/react-calendar/package.json index 54d45c0bf..bd2969083 100644 --- a/samples/react-calendar/package.json +++ b/samples/react-calendar/package.json @@ -1,7 +1,7 @@ { "name": "react-calendar", "main": "lib/index.js", - "version": "1.0.4", + "version": "1.0.9", "private": true, "engines": { "node": ">=0.10.0" From 490e66b2a723787a0e93fc998f9cbb56361906f5 Mon Sep 17 00:00:00 2001 From: Hugo Bernier Date: Sun, 21 Mar 2021 11:57:05 -0400 Subject: [PATCH 7/7] Updated readme --- samples/react-image-editor/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/react-image-editor/README.md b/samples/react-image-editor/README.md index 0304b606a..e166d6fe5 100644 --- a/samples/react-image-editor/README.md +++ b/samples/react-image-editor/README.md @@ -39,9 +39,9 @@ The Placeholder and FilePicker are components from the [sp-dev-fx-controls-react ## Compatibility -![SPFx 1.4.0](https://img.shields.io/badge/SPFx-1.4.0-green.svg) +![SPFx 1.4.0](https://img.shields.io/badge/SPFx-1.4.0-green.svg) ![Node.js LTS 6.x](https://img.shields.io/badge/Node.js-LTS%206.x-green.svg) -![SharePoint 2016 | 2019 | Online](https://img.shields.io/badge/SharePoint-2016%20%7C%202019%20%7C%20Online-green.svg) +![SharePoint 2019 | Online](https://img.shields.io/badge/SharePoint-2019%20%7C%20Online-yellow.svg) ![Teams No: Not designed for Microsoft Teams](https://img.shields.io/badge/Teams-No-red.svg "Not designed for Microsoft Teams") ![Workbench Local | Hosted](https://img.shields.io/badge/Workbench-Local%20%7C%20Hosted-green.svg) @@ -92,7 +92,7 @@ Version|Date|Comments ## Usage * PNP Placeholder control if not Configured -* PNP WebpartTitle control (toggle Show/Hide in property pane) +* PNP WebPartTitle control (toggle Show/Hide in property pane) * PNP FilePicker control to pick Images (is mocked on local workbench) * Office UI Fabric