Merge pull request #2175 from mohammadamer/react-calendar-upgrade-spfx

React calendar upgrade spfx
This commit is contained in:
Hugo Bernier 2022-01-03 00:33:50 -05:00 committed by GitHub
commit 8bddddf676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 16232 additions and 7999 deletions

View File

@ -1,25 +0,0 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# change these settings to your own preference
indent_style = space
indent_size = 2
# we recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[{package,bower}.json]
indent_style = space
indent_size = 2

View File

@ -9,6 +9,7 @@ node_modules
# Build generated files
dist
lib
release
solution
temp
#*.sppkg

View File

@ -22,7 +22,7 @@
"framework": "react",
"plusBeta": true,
"isCreatingSolution": true,
"version": "1.10.0",
"version": "1.12.1",
"libraryName": "react-calendar",
"libraryId": "3a13208b-3874-4036-9262-4edd22e88187",
"packageManager": "npm",

View File

@ -143,7 +143,7 @@ Version|Date|Comments
1.0.13|October 2, 2021|Fix to make sure Today is always visible and highlighted.
1.0.14|October 16, 2021|Resolve unhandled exception that happens clicking on recurrent events
1.0.15|November 22, 2021|Fix All Day event issue that makes All Day events date expanded to another day instead of being full day event.
1.0.16|December 21, 2021|Upgraded to SPFx 1.12.1
## Minimal Path to Awesome

View File

@ -9,7 +9,7 @@
"This Web Part allows you to manage events in a calendar. Uses a list of existing calendars on any website. The location and name of the list and the dates of the events to be displayed are defined in the properties of the web part."
],
"created": "2020-12-04",
"modified": "2021-11-22",
"modified": "2021-12-21",
"products": [
"SharePoint"
],
@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.10.0"
"value": "1.12.1"
},
{
"key": "SPFX-TEAMSTAB",

View File

@ -1,4 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
"deployCdnPath": "temp/deploy"
"deployCdnPath": "./release/assets/"
}

View File

@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./temp/deploy/",
"workingDir": "./release/assets/",
"account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "react-calendar",
"accessKey": "<!-- ACCESS KEY -->"

View File

@ -13,13 +13,20 @@ const gulpSequence = require('gulp-sequence');
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'));
return result;
};
// Create clean distrubution package
gulp.task('dist', gulpSequence('clean', 'bundle', 'package-solution'));
// Create clean development package
gulp.task('dev', gulpSequence('clean', 'bundle', 'package-solution'));
/**
* Webpack Bundle Anlayzer
* Reference and gulp task

File diff suppressed because it is too large Load Diff

View File

@ -15,35 +15,30 @@
"test:watch": "./node_modules/.bin/jest --config ./config/jest.config.json --watchAll"
},
"dependencies": {
"@microsoft/sp-core-library": "1.10.0",
"@microsoft/sp-lodash-subset": "1.10.0",
"@microsoft/sp-office-ui-fabric-core": "1.10.0",
"@microsoft/sp-property-pane": "1.10.0",
"@microsoft/sp-webpart-base": "1.10.0",
"@microsoft/sp-core-library": "1.12.1",
"@microsoft/sp-lodash-subset": "1.12.1",
"@microsoft/sp-office-ui-fabric-core": "1.12.1",
"@microsoft/sp-property-pane": "1.12.1",
"@microsoft/sp-webpart-base": "1.12.1",
"@pnp/pnpjs": "^1.3.0",
"@pnp/spfx-controls-react": "1.12.0",
"@pnp/spfx-property-controls": "1.14.1",
"@types/draft-js": "^0.10.30",
"@types/es6-promise": "0.0.33",
"@types/globalize": "0.0.34",
"@types/jquery": "^3.3.29",
"@types/react": "16.8.8",
"@types/react-big-calendar": "^0.24.6",
"@types/react-dom": "16.8.3",
"@types/webpack-env": "1.13.1",
"@uifabric/fluent-theme": "^0.16.7",
"browserslist": "^4.12.0",
"caniuse-lite": "^1.0.30001079",
"draft-js": "^0.10.5",
"draftjs-to-html": "^0.8.4",
"globalize": "^1.4.2",
"immutable": "^4.0.0-rc.12",
"jquery": "^3.3.1",
"moment": "^2.24.0",
"office-ui-fabric-react": "6.189.2",
"react": "16.8.5",
"office-ui-fabric-react": "7.156.0",
"react": "16.9.0",
"react-big-calendar": "^0.24.6",
"react-dom": "16.8.5",
"react-dom": "16.9.0",
"react-draft-wysiwyg": "^1.13.2",
"spfx-uifabric-themes": "^0.6.0",
"string-format": "^2.0.0",
@ -57,16 +52,19 @@
"@microsoft/rush-stack-compiler-2.9": "0.7.7",
"@microsoft/rush-stack-compiler-3.2": "0.3.17",
"@microsoft/rush-stack-compiler-3.3": "0.3.5",
"@microsoft/sp-build-web": "1.10.0",
"@microsoft/sp-module-interfaces": "1.10.0",
"@microsoft/sp-tslint-rules": "1.10.0",
"@microsoft/sp-webpart-workbench": "1.10.0",
"@types/chai": "3.4.34",
"@types/mocha": "2.2.38",
"@microsoft/rush-stack-compiler-3.7": "0.2.3",
"@microsoft/sp-build-web": "1.12.1",
"@microsoft/sp-module-interfaces": "1.12.1",
"@microsoft/sp-tslint-rules": "1.12.1",
"@microsoft/sp-webpart-workbench": "1.12.1",
"@types/es6-promise": "0.0.33",
"@types/react": "16.9.36",
"@types/react-dom": "16.9.8",
"@types/webpack-env": "1.13.1",
"@types/xml2js": "^0.4.4",
"@voitanos/jest-preset-spfx-react16": "^1.1.0",
"ajv": "~5.2.2",
"gulp": "~3.9.1",
"gulp": "4.0.2",
"gulp-sequence": "1.0.0",
"gulp-stylelint": "^8.0.0",
"jest": "^23.6.0",
@ -75,5 +73,14 @@
"stylelint-config-standard": "^18.2.0",
"stylelint-scss": "^3.5.4",
"webpack-bundle-analyzer": "^3.1.0"
},
"solution": {
"developer": {
"name": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"websiteUrl": "",
"mpnId": ""
}
}
}

View File

@ -123,6 +123,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
this.onSelectDateStart = this.onSelectDateStart.bind(this);
this.onUpdateCoordinates = this.onUpdateCoordinates.bind(this);
this.onGetErrorMessageTitle = this.onGetErrorMessageTitle.bind(this);
this.onChangeEventTitle = this.onChangeEventTitle.bind(this);
this.getPeoplePickerItems = this.getPeoplePickerItems.bind(this);
this.hidePanel = this.hidePanel.bind(this);
this.onDelete = this.onDelete.bind(this);
@ -410,10 +411,21 @@ export class Event extends React.Component<IEventProps, IEventState> {
if (value.length === 0) {
returnMessage = strings.EventTitleErrorMessage;
} else {
this.setState({ eventData: { ...this.state.eventData, title: value }, disableButton: false, errorMessage: '' });
this.setState({disableButton: false, errorMessage: '' });
}
return returnMessage;
}
/**
*
* @private
* @memberof Event
*/
private onChangeEventTitle (event:any) {
const eventTitle = event.target.value;
this.setState({eventData: {...this.state.eventData, title: eventTitle}});
}
/**
*
* @private
@ -923,6 +935,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
<TextField
label={strings.EventTitleLabel}
value={this.state.eventData ? this.state.eventData.title : ''}
onChange={this.onChangeEventTitle}
onGetErrorMessage={this.onGetErrorMessageTitle}
deferredValidationTime={500}
disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true}

View File

@ -1,5 +1,5 @@
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json",
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.7/includes/tsconfig-web.json",
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,
@ -20,20 +20,17 @@
"./node_modules/@microsoft"
],
"types": [
"es6-promise",
"webpack-env"
],
"lib": [
"es5",
"dom",
"es2015.collection"
"es2015.collection",
"es2015.promise"
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"lib"
"src/**/*.ts",
"src/**/*.tsx"
]
}

View File

@ -1,5 +1,5 @@
{
"extends": "@microsoft/sp-tslint-rules/base-tslint.json",
"extends": "./node_modules/@microsoft/sp-tslint-rules/base-tslint.json",
"rules": {
"class-name": false,
"export-name": false,