Merge branch 'pnp:main' into react-tabaccordion
This commit is contained in:
commit
138c6fb3a7
|
@ -1,7 +1,7 @@
|
||||||
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
|
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
|
||||||
{
|
{
|
||||||
"name": "SPFx 1.8.2",
|
"name": "SPFx 1.14.0",
|
||||||
"image": "docker.io/m365pnp/spfx:1.8.2",
|
"image": "docker.io/m365pnp/spfx:1.14.0",
|
||||||
// Set *default* container specific settings.json values on container create.
|
// Set *default* container specific settings.json values on container create.
|
||||||
"settings": {},
|
"settings": {},
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
|
@ -12,8 +12,7 @@
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [
|
"forwardPorts": [
|
||||||
4321,
|
4321,
|
||||||
35729,
|
35729
|
||||||
5432
|
|
||||||
],
|
],
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
"4321": {
|
"4321": {
|
||||||
|
@ -22,11 +21,12 @@
|
||||||
"onAutoForward": "silent",
|
"onAutoForward": "silent",
|
||||||
"requireLocalPort": true
|
"requireLocalPort": true
|
||||||
},
|
},
|
||||||
"5432": {
|
// Not needed for SPFx>= 1.12.1
|
||||||
"protocol": "https",
|
// "5432": {
|
||||||
"label": "Workbench",
|
// "protocol": "https",
|
||||||
"onAutoForward": "silent"
|
// "label": "Workbench",
|
||||||
},
|
// "onAutoForward": "silent"
|
||||||
|
// },
|
||||||
"35729": {
|
"35729": {
|
||||||
"protocol": "https",
|
"protocol": "https",
|
||||||
"label": "LiveReload",
|
"label": "LiveReload",
|
||||||
|
@ -36,4 +36,4 @@
|
||||||
},
|
},
|
||||||
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
|
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
|
||||||
"remoteUser": "node"
|
"remoteUser": "node"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,11 @@ echo
|
||||||
echo -e "\e[1;94mGenerating dev certificate\e[0m"
|
echo -e "\e[1;94mGenerating dev certificate\e[0m"
|
||||||
gulp trust-dev-cert
|
gulp trust-dev-cert
|
||||||
|
|
||||||
|
# Convert the generated PEM certificate to a CER certificate
|
||||||
|
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer
|
||||||
|
|
||||||
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.cer
|
# Copy the PEM ecrtificate for non-Windows hosts
|
||||||
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.pem
|
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
|
||||||
|
|
||||||
## add *.cer to .gitignore to prevent certificates from being saved in repo
|
## add *.cer to .gitignore to prevent certificates from being saved in repo
|
||||||
if ! grep -Fxq '*.cer' ./.gitignore
|
if ! grep -Fxq '*.cer' ./.gitignore
|
||||||
|
|
|
@ -31,3 +31,7 @@ obj
|
||||||
|
|
||||||
# Styles Generated Code
|
# Styles Generated Code
|
||||||
*.scss.ts
|
*.scss.ts
|
||||||
|
# .CER Certificates
|
||||||
|
*.cer
|
||||||
|
# .PEM Certificates
|
||||||
|
*.pem
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
!dist
|
||||||
|
config
|
||||||
|
|
||||||
|
gulpfile.js
|
||||||
|
|
||||||
|
release
|
||||||
|
src
|
||||||
|
temp
|
||||||
|
|
||||||
|
tsconfig.json
|
||||||
|
tslint.json
|
||||||
|
|
||||||
|
*.log
|
||||||
|
|
||||||
|
.yo-rc.json
|
||||||
|
.vscode
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"@microsoft/generator-sharepoint": {
|
"@microsoft/generator-sharepoint": {
|
||||||
"version": "1.8.2",
|
"version": "1.14.0",
|
||||||
"libraryName": "happy-birdthay",
|
"libraryName": "happy-birthday",
|
||||||
"libraryId": "57890dd1-b655-4ec8-85ec-e47a9b696e7c",
|
"libraryId": "57890dd1-b655-4ec8-85ec-e47a9b696e7c",
|
||||||
"environment": "spo",
|
"environment": "spo",
|
||||||
"packageManager": "npm",
|
"packageManager": "npm",
|
||||||
|
|
|
@ -17,8 +17,8 @@ But you can synchronize the Birthdays list with other applications HR Systems, o
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
![SPFx 1.12.1](https://img.shields.io/badge/SPFx-1.12.1-green.svg)
|
![SPFx 1.14.0](https://img.shields.io/badge/SPFx-1.14.0-green.svg)
|
||||||
![Node.js v14 | v12 | v10](https://img.shields.io/badge/Node.js-v14%20%7C%20v12%20%7C%20v10-green.svg)
|
![Node.js v14 | v12](https://img.shields.io/badge/Node.js-v14%20|%20v12-green.svg)
|
||||||
![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.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")
|
![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")
|
![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench")
|
||||||
|
@ -36,13 +36,13 @@ Existing list in tenant root site, with the Title "Birthdays" and columns:
|
||||||
|
|
||||||
Column Internal Name|Type|Required| comments
|
Column Internal Name|Type|Required| comments
|
||||||
--------------------|----|--------|----------
|
--------------------|----|--------|----------
|
||||||
JobTitle| Text| no|
|
JobTitle | Text| no
|
||||||
Birthday| DateTime | true|
|
Birthday | DateTime | true
|
||||||
userAADGUID| Text| no | required if used Azure Function to get Birthdays from AAD
|
userAADGUID | Text | no | required if used Azure Function to get Birthdays from AAD
|
||||||
Title| Text| true
|
Title | Text | true
|
||||||
email| Text| true
|
email | Text | true
|
||||||
|
|
||||||
> **IMPORTANT:** After create a column Index on column "Birthday"
|
> **IMPORTANT:** Create index on column "Birthday".
|
||||||
|
|
||||||
## Solution
|
## Solution
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ Version|Date|Comments
|
||||||
1.0.0|November 6, 2018|Initial release
|
1.0.0|November 6, 2018|Initial release
|
||||||
1.1.0|July 23, 2019 | new version
|
1.1.0|July 23, 2019 | new version
|
||||||
2.0.0|June 16, 2021 | Upgraded to SPFx 1.12.1
|
2.0.0|June 16, 2021 | Upgraded to SPFx 1.12.1
|
||||||
|
3.0.0|April 7, 2022 | Upgraded to SPFx 1.14.0
|
||||||
|
|
||||||
## Minimal Path to Awesome
|
## Minimal Path to Awesome
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"The Web Part Birthdays shows the upcoming birthdays in the company, the web part reads birthdays from a list located on the tenant\u0027s root site with title \u0022Birthdays.\u0022"
|
"The Web Part Birthdays shows the upcoming birthdays in the company, the web part reads birthdays from a list located on the tenant\u0027s root site with title \u0022Birthdays.\u0022"
|
||||||
],
|
],
|
||||||
"creationDateTime": "2019-07-23",
|
"creationDateTime": "2019-07-23",
|
||||||
"updateDateTime": "2021-06-16",
|
"updateDateTime": "2022-04-07",
|
||||||
"products": [
|
"products": [
|
||||||
"SharePoint"
|
"SharePoint"
|
||||||
],
|
],
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "SPFX-VERSION",
|
"key": "SPFX-VERSION",
|
||||||
"value": "1.12.1"
|
"value": "1.14.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "SPFX-TEAMSTAB",
|
"key": "SPFX-TEAMSTAB",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"$schema": "https://developer.microsoft.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",
|
"version": "2.0",
|
||||||
"bundles": {
|
"bundles": {
|
||||||
"happy-birdthay-web-part": {
|
"happy-birthday-web-part": {
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
"entrypoint": "./lib/webparts/Birthdays/BirthdaysWebPart.js",
|
"entrypoint": "./lib/webparts/Birthdays/BirthdaysWebPart.js",
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
|
|
||||||
"deployCdnPath": "temp/deploy"
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://developer.microsoft.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/",
|
"workingDir": "./release/assets/",
|
||||||
"account": "<!-- STORAGE ACCOUNT NAME -->",
|
"account": "<!-- STORAGE ACCOUNT NAME -->",
|
||||||
"container": "happy-birdthay",
|
"container": "happy-birthday",
|
||||||
"accessKey": "<!-- ACCESS KEY -->"
|
"accessKey": "<!-- ACCESS KEY -->"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,38 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
|
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
|
||||||
"solution": {
|
"solution": {
|
||||||
"name": "happy-birdthay-anniversary-client-side-solution",
|
"name": "happy-birthday-anniversary-client-side-solution",
|
||||||
"id": "474e78f8-113f-4057-a9a9-640241137620",
|
"id": "474e78f8-113f-4057-a9a9-640241137620",
|
||||||
"version": "2.0.0.0",
|
"version": "3.0.0.0",
|
||||||
"includeClientSideAssets": true,
|
"includeClientSideAssets": true,
|
||||||
"skipFeatureDeployment": true,
|
"skipFeatureDeployment": true,
|
||||||
"isDomainIsolated": false,
|
"isDomainIsolated": false,
|
||||||
|
"developer": {
|
||||||
|
"name": "",
|
||||||
|
"privacyUrl": "",
|
||||||
|
"termsOfUseUrl": "",
|
||||||
|
"websiteUrl": "",
|
||||||
|
"mpnId": "Undefined-1.14.0"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"shortDescription": {
|
||||||
|
"default": "birthdays-anniversary"
|
||||||
|
},
|
||||||
|
"longDescription": {
|
||||||
|
"default": "birthdays-anniversary"
|
||||||
|
},
|
||||||
|
"screenshotPaths": [],
|
||||||
|
"videoUrl": "",
|
||||||
|
"categories": []
|
||||||
|
},
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"title": "birthdays-anniversary Feature",
|
||||||
|
"description": "The feature that activates elements of the birthdays-anniversary solution.",
|
||||||
|
"id": "22eb0871-ae82-49b1-8d14-9dd9e1ec4d30",
|
||||||
|
"version": "3.0.0.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
"webApiPermissionRequests": [
|
"webApiPermissionRequests": [
|
||||||
{
|
{
|
||||||
"resource": "Microsoft Graph",
|
"resource": "Microsoft Graph",
|
||||||
|
|
|
@ -2,9 +2,5 @@
|
||||||
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
|
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
|
||||||
"port": 4321,
|
"port": 4321,
|
||||||
"https": true,
|
"https": true,
|
||||||
"initialPage": "https://localhost:5432/workbench",
|
"initialPage": "https://enter-your-SharePoint-site/_layouts/workbench.aspx"
|
||||||
"api": {
|
|
||||||
"port": 5432,
|
|
||||||
"entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,13 @@ const gulp = require('gulp');
|
||||||
const build = require('@microsoft/sp-build-web');
|
const build = require('@microsoft/sp-build-web');
|
||||||
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
|
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
|
||||||
|
|
||||||
|
var getTasks = build.rig.getTasks;
|
||||||
|
build.rig.getTasks = function () {
|
||||||
|
var result = getTasks.call(build.rig);
|
||||||
|
|
||||||
|
result.set('serve', result.get('serve-deprecated'));
|
||||||
|
|
||||||
build.initialize(gulp);
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
build.initialize(require('gulp'));
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "birthdays-anniversay",
|
"name": "birthdays-anniversary",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"main": "lib/index.js",
|
||||||
"node": ">=0.10.0"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp bundle",
|
"build": "gulp bundle",
|
||||||
"clean": "gulp clean",
|
"clean": "gulp clean",
|
||||||
|
@ -12,40 +10,37 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@microsoft/loader-set-webpack-public-path": "^3.4.5",
|
"@microsoft/loader-set-webpack-public-path": "^3.4.5",
|
||||||
"@microsoft/rush-stack-compiler-3.2": "^0.3.37",
|
"@microsoft/sp-core-library": "1.14.0",
|
||||||
"@microsoft/sp-core-library": "1.8.2",
|
"@microsoft/sp-lodash-subset": "1.14.0",
|
||||||
"@microsoft/sp-lodash-subset": "1.8.2",
|
"@microsoft/sp-office-ui-fabric-core": "1.14.0",
|
||||||
"@microsoft/sp-office-ui-fabric-core": "1.8.2",
|
"@microsoft/sp-property-pane": "1.14.0",
|
||||||
"@microsoft/sp-webpart-base": "^1.12.1",
|
"@microsoft/sp-webpart-base": "1.14.0",
|
||||||
"@pnp/common": "^1.3.11",
|
"@pnp/common": "^1.3.11",
|
||||||
"@pnp/graph": "^1.3.11",
|
"@pnp/graph": "^1.3.11",
|
||||||
"@pnp/logging": "^1.3.11",
|
"@pnp/logging": "^1.3.11",
|
||||||
"@pnp/odata": "^1.3.11",
|
"@pnp/odata": "^1.3.11",
|
||||||
"@pnp/sp": "^1.3.11",
|
"@pnp/sp": "^1.3.11",
|
||||||
"@pnp/spfx-controls-react": "1.10.0",
|
"@pnp/spfx-controls-react": "3.7.2",
|
||||||
"@pnp/spfx-property-controls": "1.12.0",
|
"@pnp/spfx-property-controls": "1.12.0",
|
||||||
"@types/es6-promise": "0.0.33",
|
"moment": "^2.29.1",
|
||||||
"@types/react": "16.7.22",
|
"office-ui-fabric-react": "7.174.1",
|
||||||
"@types/react-dom": "16.8.0",
|
"react": "16.13.1",
|
||||||
"@types/webpack-env": "1.13.1",
|
"react-dom": "16.13.1"
|
||||||
"moment": "^2.29.2",
|
|
||||||
"office-ui-fabric-react": "6.143.0",
|
|
||||||
"react": "16.7.0",
|
|
||||||
"react-dom": "16.7.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@microsoft/rush-stack-compiler-2.9": "0.7.7",
|
"@microsoft/rush-stack-compiler-3.9": "0.4.48",
|
||||||
"@microsoft/set-webpack-public-path-plugin": "^2.4.0",
|
"@microsoft/set-webpack-public-path-plugin": "^2.4.0",
|
||||||
"@microsoft/sp-build-web": "^1.12.1",
|
"@microsoft/sp-build-web": "1.14.0",
|
||||||
"@microsoft/sp-module-interfaces": "1.8.2",
|
"@microsoft/sp-module-interfaces": "1.14.0",
|
||||||
"@microsoft/sp-tslint-rules": "1.8.2",
|
"@microsoft/sp-tslint-rules": "1.14.0",
|
||||||
"@microsoft/sp-webpart-workbench": "^1.12.1",
|
"@types/es6-promise": "0.0.33",
|
||||||
"@types/chai": "3.4.34",
|
"@types/react": "16.9.51",
|
||||||
"@types/mocha": "2.2.38",
|
"@types/react-dom": "16.9.8",
|
||||||
|
"@types/webpack-env": "1.13.1",
|
||||||
"ajv": "~5.2.2",
|
"ajv": "~5.2.2",
|
||||||
"gulp": "~3.9.1"
|
"gulp": "4.0.2"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@types/react": "16.7.22"
|
"@types/react": "16.8.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss';
|
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
||||||
|
|
||||||
.happyBirdthay {
|
.happyBirthday {
|
||||||
.documentCard {
|
.documentCard {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|
|
@ -2,9 +2,8 @@ import * as React from 'react';
|
||||||
import styles from './HappyBirthdayCard.module.scss';
|
import styles from './HappyBirthdayCard.module.scss';
|
||||||
import { IHappyBirthdayCardProps } from './IHappyBirthdayCardProps';
|
import { IHappyBirthdayCardProps } from './IHappyBirthdayCardProps';
|
||||||
import { IHappyBirthdayCardPState } from './IHappyBirthdayCardState';
|
import { IHappyBirthdayCardPState } from './IHappyBirthdayCardState';
|
||||||
import { escape } from '@microsoft/sp-lodash-subset';
|
import { IPersonaSharedProps, Persona, PersonaSize, IPersonaProps } from 'office-ui-fabric-react/lib/Persona';
|
||||||
import { IPersonaSharedProps, Persona, PersonaSize, IPersonaProps, PersonaPresence } from 'office-ui-fabric-react/lib/Persona';
|
import { Image, ImageFit } from 'office-ui-fabric-react/lib/Image';
|
||||||
import { Image, IImageProps, ImageFit } from 'office-ui-fabric-react/lib/Image';
|
|
||||||
import { Label } from 'office-ui-fabric-react/lib/Label';
|
import { Label } from 'office-ui-fabric-react/lib/Label';
|
||||||
import * as strings from 'ControlStrings';
|
import * as strings from 'ControlStrings';
|
||||||
import { Icon } from 'office-ui-fabric-react/lib/Icon';
|
import { Icon } from 'office-ui-fabric-react/lib/Icon';
|
||||||
|
@ -109,10 +108,10 @@ export class HappyBirthdayCard extends React.Component<IHappyBirthdayCardProps,
|
||||||
}
|
}
|
||||||
// Render
|
// Render
|
||||||
public render(): React.ReactElement<IHappyBirthdayCardProps> {
|
public render(): React.ReactElement<IHappyBirthdayCardProps> {
|
||||||
|
|
||||||
this._birthdayMsg = this.state.isBirthdayToday ? (this.props.anniversary? strings.HappyAnniversaryMsg: strings.HappyBirthdayMsg) : (this.props.anniversary? strings.NextAnniversaryMsg: strings.NextBirthdayMsg);
|
this._birthdayMsg = this.state.isBirthdayToday ? (this.props.anniversary? strings.HappyAnniversaryMsg: strings.HappyBirthdayMsg) : (this.props.anniversary? strings.NextAnniversaryMsg: strings.NextBirthdayMsg);
|
||||||
return (
|
return (
|
||||||
<div className={styles.happyBirdthay}>
|
<div className={styles.happyBirthday}>
|
||||||
<div className={styles.documentCardWrapper}>
|
<div className={styles.documentCardWrapper}>
|
||||||
<div className={styles.documentCard}>
|
<div className={styles.documentCard}>
|
||||||
<Image
|
<Image
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
export interface IHappyBirthdayCardPState {
|
export interface IHappyBirthdayCardPState {
|
||||||
|
|
||||||
isBirthdayToday: boolean;
|
isBirthdayToday: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
define([], function() {
|
define([], function() {
|
||||||
return {
|
return {
|
||||||
"BirdthayControlDefaultDay": "Today",
|
"BirthdayControlDefaultDay": "Today",
|
||||||
"HappyBirthdayMsg": "Happy Birthday!",
|
"HappyBirthdayMsg": "Happy Birthday!",
|
||||||
"NextBirthdayMsg": "Next Birthday",
|
"NextBirthdayMsg": "Next Birthday",
|
||||||
"HappyAnniversaryMsg": "Happy Anniversary!",
|
"HappyAnniversaryMsg": "Happy Anniversary!",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
declare interface IControlStrings {
|
declare interface IControlStrings {
|
||||||
BirdthayControlDefaultDay: string,
|
BirthdayControlDefaultDay: string,
|
||||||
HappyBirthdayMsg: string,
|
HappyBirthdayMsg: string,
|
||||||
NextBirthdayMsg: string,
|
NextBirthdayMsg: string,
|
||||||
HappyAnniversaryMsg: string,
|
HappyAnniversaryMsg: string,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss';
|
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
||||||
|
|
||||||
.happyBirthday {
|
.happyBirthday {
|
||||||
.backgroundImgBallons{
|
.backgroundImgBallons{
|
||||||
|
|
|
@ -2,29 +2,12 @@ import * as React from 'react';
|
||||||
import styles from './HappyBirthday.module.scss';
|
import styles from './HappyBirthday.module.scss';
|
||||||
import { IHappyBirthdayProps } from './IHappyBirthdayProps';
|
import { IHappyBirthdayProps } from './IHappyBirthdayProps';
|
||||||
import { IHappbirthdayState } from './IHappybirthdayState';
|
import { IHappbirthdayState } from './IHappybirthdayState';
|
||||||
import { escape } from '@microsoft/sp-lodash-subset';
|
|
||||||
import { IUser } from './IUser';
|
import { IUser } from './IUser';
|
||||||
import HappyBirdthayCard from '../../controls/happyBirthdayCard/HappyBirthdayCard';
|
import HappyBirthdayCard from '../../controls/happyBirthdayCard/HappyBirthdayCard';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { Image, IImageProps, ImageFit } from 'office-ui-fabric-react/lib/Image';
|
|
||||||
import { Label } from 'office-ui-fabric-react/lib/Label';
|
|
||||||
import * as strings from 'ControlStrings';
|
|
||||||
|
|
||||||
export class HappyBirthday extends React.Component<IHappyBirthdayProps, IHappbirthdayState> {
|
export class HappyBirthday extends React.Component<IHappyBirthdayProps, IHappbirthdayState> {
|
||||||
|
|
||||||
private _showBirthdays: boolean = true;
|
|
||||||
constructor(props: IHappyBirthdayProps) {
|
|
||||||
super(props);
|
|
||||||
console.log(props.imageTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async componentDidMount() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public componentDidUpdate(prevProps: IHappyBirthdayProps, prevState: IHappbirthdayState): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
public render(): React.ReactElement<IHappyBirthdayProps> {
|
public render(): React.ReactElement<IHappyBirthdayProps> {
|
||||||
return (
|
return (
|
||||||
<div className={styles.happyBirthday}>
|
<div className={styles.happyBirthday}>
|
||||||
|
@ -32,7 +15,7 @@ export class HappyBirthday extends React.Component<IHappyBirthdayProps, IHappbir
|
||||||
this.props.users.map((user: IUser) => {
|
this.props.users.map((user: IUser) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<HappyBirdthayCard userName={user.userName}
|
<HappyBirthdayCard userName={user.userName}
|
||||||
jobDescription={user.jobDescription}
|
jobDescription={user.jobDescription}
|
||||||
birthday={moment(user.birthday, ["MM-DD-YYYY", "YYYY-MM-DD", "DD/MM/YYYY", "MM/DD/YYYY"]).format('Do MMMM')}
|
birthday={moment(user.birthday, ["MM-DD-YYYY", "YYYY-MM-DD", "DD/MM/YYYY", "MM/DD/YYYY"]).format('Do MMMM')}
|
||||||
anniversary={user.anniversary}
|
anniversary={user.anniversary}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { IUser } from './IUser';
|
import { IUser } from './IUser';
|
||||||
import { WebPartContext } from "@microsoft/sp-webpart-base";
|
|
||||||
export interface IHappyBirthdayProps {
|
export interface IHappyBirthdayProps {
|
||||||
users: IUser[];
|
users: IUser[];
|
||||||
imageTemplate: string;
|
imageTemplate: string;
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
|
|
||||||
import { WebPartContext } from "@microsoft/sp-webpart-base";
|
import { WebPartContext } from "@microsoft/sp-webpart-base";
|
||||||
import { ApplicationCustomizerContext } from "@microsoft/sp-application-base";
|
import { MSGraphClient } from "@microsoft/sp-http";
|
||||||
import { SPHttpClient, SPHttpClientResponse, MSGraphClient } from "@microsoft/sp-http";
|
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
|
|
||||||
export class SPService {
|
export class SPService {
|
||||||
private graphClient: MSGraphClient = null;
|
private graphClient: MSGraphClient = null;
|
||||||
private birthdayListTitle: string = "Birthdays";
|
private birthdayListTitle: string = "Birthdays";
|
||||||
constructor(private _context: WebPartContext | ApplicationCustomizerContext) {
|
constructor(private _context: WebPartContext) {
|
||||||
|
|
||||||
}
|
}
|
||||||
// Get Profiles
|
// Get Profiles
|
||||||
|
@ -21,9 +19,9 @@ export class SPService {
|
||||||
_month = parseInt(moment().format('MM'));
|
_month = parseInt(moment().format('MM'));
|
||||||
_day = parseInt(moment().format('DD'));
|
_day = parseInt(moment().format('DD'));
|
||||||
_filter = "fields/Birthday ge '" + _today + "'";
|
_filter = "fields/Birthday ge '" + _today + "'";
|
||||||
// If we are in Dezember we have to look if there are birthday in January
|
// If we are in December we have to look if there are birthdays in January
|
||||||
// we have to build a condition to select birthday in January based on number of upcommingDays
|
// we have to build a condition to select birthday in January based on number of upcommingDays
|
||||||
// we can not use the year for teste , the year is always 2000.
|
// we can not use the year for test, the year is always 2000.
|
||||||
console.log(_month);
|
console.log(_month);
|
||||||
_countdays = _day + upcommingDays;
|
_countdays = _day + upcommingDays;
|
||||||
_f = 0;
|
_f = 0;
|
||||||
|
|
|
@ -13,7 +13,6 @@ import {
|
||||||
import * as strings from 'BirthdaysWebPartStrings';
|
import * as strings from 'BirthdaysWebPartStrings';
|
||||||
import Birthdays from './components/Birthdays';
|
import Birthdays from './components/Birthdays';
|
||||||
import { IBirthdaysProps } from './components/IBirthdaysProps';
|
import { IBirthdaysProps } from './components/IBirthdaysProps';
|
||||||
import { Version } from '@microsoft/sp-core-library';
|
|
||||||
|
|
||||||
export interface IBirthdaysWebPartProps {
|
export interface IBirthdaysWebPartProps {
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '~@microsoft/sp-office-ui-fabric-core/dist/sass/SPFabricCore.scss';
|
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
||||||
|
|
||||||
.happyBirthday {
|
.happyBirthday {
|
||||||
.backgroundImgBallons{
|
.backgroundImgBallons{
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styles from './Birthdays.module.scss';
|
import styles from './Birthdays.module.scss';
|
||||||
import { IBirthdaysProps } from './IBirthdaysProps';
|
import { IBirthdaysProps } from './IBirthdaysProps';
|
||||||
import { escape } from '@microsoft/sp-lodash-subset';
|
|
||||||
import { HappyBirthday, IUser } from '../../../controls/happybirthday';
|
import { HappyBirthday, IUser } from '../../../controls/happybirthday';
|
||||||
import * as moment from 'moment';
|
import * as moment from 'moment';
|
||||||
import { IBirthdayState } from './IBirthdaysState';
|
import { IBirthdayState } from './IBirthdaysState';
|
||||||
import SPService from '../../../services/SPService';
|
import SPService from '../../../services/SPService';
|
||||||
import { WebPartTitle } from "@pnp/spfx-controls-react/lib/WebPartTitle";
|
import { WebPartTitle } from "@pnp/spfx-controls-react/lib/WebPartTitle";
|
||||||
const imgBackgroundBallons: string = require('../../../../assets/ballonsBackgroud.png');
|
const imgBackgroundBallons: string = require('../../../../assets/ballonsBackgroud.png');
|
||||||
import { Image, IImageProps, ImageFit } from 'office-ui-fabric-react/lib/Image';
|
import { Image, ImageFit } from 'office-ui-fabric-react/lib/Image';
|
||||||
import { Label } from 'office-ui-fabric-react/lib/Label';
|
import { Label } from 'office-ui-fabric-react/lib/Label';
|
||||||
import * as strings from 'ControlStrings';
|
import * as strings from 'ControlStrings';
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {IUser } from '../../../services/IUser';
|
import { IUser } from '../../../services/IUser';
|
||||||
export interface IBirthdayState{
|
export interface IBirthdayState{
|
||||||
Users : IUser[] ;
|
Users : IUser[] ;
|
||||||
showBirthdays: boolean;
|
showBirthdays: boolean;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.2/MicrosoftTeams.schema.json",
|
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.2/MicrosoftTeams.schema.json",
|
||||||
"manifestVersion": "1.2",
|
"manifestVersion": "1.2",
|
||||||
"packageName": "HappyBirdthayAnniversary",
|
"packageName": "HappyBirthdayAnniversary",
|
||||||
"id": "b0069b7e-8ec8-4e14-a76c-0c8bcb33993e",
|
"id": "b0069b7e-8ec8-4e14-a76c-0c8bcb33993e",
|
||||||
"version": "0.1",
|
"version": "0.1",
|
||||||
"developer": {
|
"developer": {
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
"short": "HappyBirthdayAnniversary"
|
"short": "HappyBirthdayAnniversary"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"short": "HappyBirdthay & anniversary description",
|
"short": "HappyBirthday & anniversary description",
|
||||||
"full": "HappyBirdthay & anniversary description"
|
"full": "HappyBirthday & anniversary description"
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons": {
|
||||||
"outline": "tab20x20.png",
|
"outline": "tab20x20.png",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.2/includes/tsconfig-web.json",
|
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.9/includes/tsconfig-web.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
@ -19,20 +19,17 @@
|
||||||
"./node_modules/@microsoft"
|
"./node_modules/@microsoft"
|
||||||
],
|
],
|
||||||
"types": [
|
"types": [
|
||||||
"es6-promise",
|
|
||||||
"webpack-env"
|
"webpack-env"
|
||||||
],
|
],
|
||||||
"lib": [
|
"lib": [
|
||||||
"es5",
|
"es5",
|
||||||
"dom",
|
"dom",
|
||||||
"es2015.collection"
|
"es2015.collection",
|
||||||
|
"es2015.promise"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts"
|
"src/**/*.ts",
|
||||||
],
|
"src/**/*.tsx"
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"lib"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,29 @@
|
||||||
{
|
{
|
||||||
"extends": "@microsoft/sp-tslint-rules/base-tslint.json",
|
"extends": "./node_modules/@microsoft/sp-tslint-rules/base-tslint.json",
|
||||||
"rules": {
|
"rules": {
|
||||||
"class-name": false,
|
"class-name": false,
|
||||||
"export-name": false,
|
"export-name": false,
|
||||||
"forin": false,
|
"forin": false,
|
||||||
"label-position": false,
|
"label-position": false,
|
||||||
"member-access": true,
|
"member-access": true,
|
||||||
"no-arg": false,
|
"no-arg": false,
|
||||||
"no-console": false,
|
"no-console": false,
|
||||||
"no-construct": false,
|
"no-construct": false,
|
||||||
"no-duplicate-variable": true,
|
"no-duplicate-variable": true,
|
||||||
"no-eval": false,
|
"no-eval": false,
|
||||||
"no-function-expression": true,
|
"no-function-expression": true,
|
||||||
"no-internal-module": true,
|
"no-internal-module": true,
|
||||||
"no-shadowed-variable": true,
|
"no-shadowed-variable": true,
|
||||||
"no-switch-case-fall-through": true,
|
"no-switch-case-fall-through": true,
|
||||||
"no-unnecessary-semicolons": true,
|
"no-unnecessary-semicolons": true,
|
||||||
"no-unused-expression": true,
|
"no-unused-expression": true,
|
||||||
"no-use-before-declare": true,
|
"no-with-statement": true,
|
||||||
"no-with-statement": true,
|
"semicolon": true,
|
||||||
"semicolon": true,
|
"trailing-comma": false,
|
||||||
"trailing-comma": false,
|
"typedef": false,
|
||||||
"typedef": false,
|
"typedef-whitespace": false,
|
||||||
"typedef-whitespace": false,
|
"use-named-parameter": true,
|
||||||
"use-named-parameter": true,
|
"variable-name": false,
|
||||||
"variable-name": false,
|
"whitespace": false
|
||||||
"whitespace": false
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue