Merge pull request #1232 from westerdaled/issue-949-fix

committing changes to resolve issue 949
This commit is contained in:
Hugo Bernier 2020-04-21 19:40:57 -04:00 committed by GitHub
commit 56fef46c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 4 deletions

View File

@ -5,6 +5,7 @@
"id": "cccbd72b-7b89-4128-9348-0a4850ded8fd",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false
},
"paths": {

View File

@ -1,7 +1,53 @@
'use strict';
const gulp = require('gulp');
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.`);
// This section is inspired by Stefan Bauer's article at https://n8d.at/how-to-version-new-sharepoint-framework-projects/
// Stefan rocks!
let syncVersionsSubtask = build.subTask('version-sync', function (gulp, buildOptions, done) {
this.log('Synching versions');
// import gulp utilits to write error messages
const gutil = require('gulp-util');
// import file system utilities form nodeJS
const fs = require('fs');
// read package.json
var pkgConfig = require('./package.json');
// read configuration of web part solution file
var pkgSolution = require('./config/package-solution.json');
// log old version
this.log('package-solution.json version:\t' + pkgSolution.solution.version);
// Generate new MS compliant version number
var newVersionNumber = pkgConfig.version.split('-')[0] + '.0';
if (pkgSolution.solution.version !== newVersionNumber) {
// assign newly generated version number to web part version
pkgSolution.solution.version = newVersionNumber;
// log new version
this.log('New package-solution.json version:\t' + pkgSolution.solution.version);
// write changed package-solution file
fs.writeFile('./config/package-solution.json', JSON.stringify(pkgSolution, null, 4));
}
else {
this.log('package-solution.json version is up-to-date');
}
done();
});
let syncVersionTask = build.task('version-sync', syncVersionsSubtask);
build.rig.addPreBuildTask(syncVersionTask);
build.initialize(gulp);

View File

@ -1,6 +1,6 @@
{
"name": "react-kanban-board",
"version": "0.0.1",
"version": "1.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "react-kanban-board",
"version": "0.0.1",
"version": "1.0.1",
"private": true,
"engines": {
"node": ">=0.10.0"

View File

@ -12,7 +12,7 @@
// Components that allow authors to embed arbitrary script code should set this to true.
// https://support.office.com/en-us/article/Turn-scripting-capabilities-on-or-off-1f2c515f-5d7e-448a-9fd7-835da935584f
"requiresCustomScript": false,
"supportedHosts": ["SharePointWebPart"],
"supportedHosts": ["SharePointWebPart", "TeamsTab"],
"preconfiguredEntries": [{
"groupId": "5c03119e-3074-46fd-976b-c60198311f70", // Other

View File

@ -33,6 +33,8 @@ export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoa
public render(): void {
const element: React.ReactElement<IKanbanBoardProps > = React.createElement(
KanbanBoard,
{
@ -73,7 +75,8 @@ export default class KanbanBoardWebPart extends BaseClientSideWebPart<IKanbanBoa
}
protected onPropertyPaneConfigurationStart(){
sp.web.lists.filter("BaseTemplate eq 171").select("Title").get().then(res => {
// Use the list template ID to locate both the old style task lists (107) and newer task lists (171)
sp.web.lists.filter("BaseTemplate eq 171 or BaseTemplate eq 107").select("Title").get().then(res => {
this.properties.lists = res.map((val,index) => {
return {
key: val.Title,