Skip to content

Commit b41277c

Browse files
committed
Merge branch 'stevebeauge-features/upgrade-to-spfx-1.15' into dev
2 parents 2ba9c17 + 257c74a commit b41277c

File tree

250 files changed

+11051
-12256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+11051
-12256
lines changed

.eslintrc.js

Lines changed: 361 additions & 0 deletions
Large diffs are not rendered by default.

.github/fabricbot.json

Lines changed: 969 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,6 @@ docs/documentation/site
4242

4343
# release
4444
release
45-
*.scss.d.ts
45+
*.scss.d.ts
46+
47+
.heft

.yo-rc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@microsoft/generator-sharepoint": {
3-
"version": "1.14.0",
3+
"version": "1.15.2",
44
"libraryName": "sp-dev-fx-controls-react",
55
"libraryId": "92b1e52c-a5fa-490a-bcf4-76080f39442c",
66
"environment": "spo",

package-lock.json

Lines changed: 6048 additions & 8518 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
"@fluentui/react-northstar": "0.51.3",
2525
"@fluentui/react-theme-provider": "^0.18.5",
2626
"@fluentui/scheme-utilities": "^8.2.12",
27-
"@fluentui/theme": "^2.4.7",
27+
"@fluentui/theme": "^2.6.6",
2828
"@microsoft/mgt-react": "2.3.0",
2929
"@microsoft/mgt-spfx": "2.3.0",
30-
"@microsoft/sp-core-library": "1.14.0",
31-
"@microsoft/sp-listview-extensibility": "1.14.0",
32-
"@microsoft/sp-loader": "1.14.0",
33-
"@microsoft/sp-lodash-subset": "1.14.0",
34-
"@microsoft/sp-office-ui-fabric-core": "1.14.0",
35-
"@microsoft/sp-property-pane": "1.14.0",
36-
"@microsoft/sp-webpart-base": "1.14.0",
30+
"@microsoft/sp-core-library": "1.15.2",
31+
"@microsoft/sp-listview-extensibility": "1.15.2",
32+
"@microsoft/sp-loader": "1.15.2",
33+
"@microsoft/sp-lodash-subset": "1.15.2",
34+
"@microsoft/sp-office-ui-fabric-core": "1.15.2",
35+
"@microsoft/sp-property-pane": "1.15.2",
36+
"@microsoft/sp-webpart-base": "1.15.2",
3737
"@monaco-editor/loader": "^1.3.1",
3838
"@pnp/sp": "2.5.0",
3939
"@pnp/telemetry-js": "2.0.0",
@@ -53,7 +53,7 @@
5353
"moment": "2.29.4",
5454
"monaco-editor": "^0.32.1",
5555
"nano-css": "^5.3.4",
56-
"office-ui-fabric-react": "7.174.1",
56+
"office-ui-fabric-react": "7.185.7",
5757
"react": "16.13.1",
5858
"react-accessible-accordion": "^3.3.3",
5959
"react-dom": "16.13.1",
@@ -63,11 +63,13 @@
6363
"spfx-uifabric-themes": "^0.9.0"
6464
},
6565
"devDependencies": {
66+
"@microsoft/eslint-config-spfx": "1.15.2",
67+
"@microsoft/eslint-plugin-spfx": "1.15.2",
6668
"@microsoft/microsoft-graph-types": "^2.1.0",
67-
"@microsoft/rush-stack-compiler-3.9": "0.4.47",
68-
"@microsoft/sp-build-web": "1.14.0",
69-
"@microsoft/sp-module-interfaces": "1.14.0",
70-
"@microsoft/sp-tslint-rules": "1.14.0",
69+
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
70+
"@microsoft/sp-build-web": "1.15.2",
71+
"@microsoft/sp-module-interfaces": "1.15.2",
72+
"@rushstack/eslint-config": "2.5.1",
7173
"@types/chart.js": "2.7.40",
7274
"@types/enzyme": "^2.8.12",
7375
"@types/es6-promise": "0.0.33",
@@ -81,13 +83,14 @@
8183
"@types/react-dom": "16.9.8",
8284
"@types/react-mentions": "^4.1.3",
8385
"@types/sinon": "2.3.4",
84-
"@types/webpack-env": "1.13.1",
85-
"ajv": "~5.2.2",
86+
"@types/webpack-env": "1.15.2",
87+
"ajv": "6.12.5",
8688
"amd-loader": "0.0.8",
8789
"chai": "^4.3.4",
8890
"codecov": "3.8.3",
8991
"enzyme": "^3.11.0",
9092
"enzyme-adapter-react-16": "^1.15.6",
93+
"eslint-plugin-react-hooks": "4.3.0",
9194
"gulp": "4.0.2",
9295
"husky": "^6.0.0",
9396
"identity-obj-proxy": "^3.0.0",
@@ -98,9 +101,9 @@
98101
"react-addons-test-utils": "15.6.0",
99102
"request-promise": "4.2.5",
100103
"sonarqube-scanner": "2.1.2",
101-
"spfx-fast-serve-helpers": "~1.14.0",
104+
"spfx-fast-serve-helpers": "~1.15.3",
102105
"ts-jest": "^25.5.1",
103-
"tslib": "2.0.0",
106+
"tslib": "2.3.1",
104107
"tslint-microsoft-contrib": "6.2.0",
105108
"webpack-bundle-analyzer": "^4.1.0"
106109
},

src/common/Interfaces.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { ISPField } from './SPEntities';
1010
export interface IContext {
1111
spHttpClient: SPHttpClient;
1212
pageContext: PageContext;
13-
listView?: ListViewAccessor | null;
14-
field?: SPField | null;
13+
listView?: ListViewAccessor | undefined;
14+
field?: SPField | undefined;
1515
}
1616

1717
/**
@@ -26,4 +26,4 @@ export interface IFields {
2626
*/
2727
export interface IProps {
2828
context: IContext;
29-
}
29+
}

src/common/SPEntities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export interface ICultureDateTimeFormat {
155155
TimeSeparator: string;
156156
UniversalSortableDateTimePattern: string;
157157
YearMonthPattern: string;
158-
eras: any[];
158+
eras: any[]; // eslint-disable-line @typescript-eslint/no-explicit-any
159159
}
160160

161161
/**

src/common/dal/ListItemRepository.ts

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
11
import { SPHttpClient } from '@microsoft/sp-http';
22

33
export class ListItemRepository {
4-
constructor(protected SiteUrl: string, protected SPClient: SPHttpClient) {
4+
constructor(protected SiteUrl: string, protected SPClient: SPHttpClient) {
55

6-
}
7-
/**
8-
*
9-
* @param filterText text value of the filter part of oData query 'Id eq 1'
10-
* @param listId
11-
* @param internalColumnName
12-
* @param keyInternalColumnName
13-
* @param webUrl
14-
* @param top
15-
* @param orderBy text value of the filter part of oData query 'Title desc, Created'
16-
*/
17-
public async getListItemsByFilterClause(filterText: string, listId: string, internalColumnName: string, keyInternalColumnName?: string, webUrl?: string, top?: number, orderBy?: string): Promise<any[]> {
18-
try {
19-
const webAbsoluteUrl = !webUrl ? this.SiteUrl : webUrl;
20-
let apiUrl = `${webAbsoluteUrl}/_api/web/lists('${listId}')/items?$select=${keyInternalColumnName || 'Id'},${internalColumnName}&$filter=${filterText}&$top=${top}`;
21-
if (orderBy) {
22-
apiUrl += `&$orderBy=${orderBy}`;
23-
}
24-
const data = await this.SPClient.get(apiUrl, SPHttpClient.configurations.v1);
25-
if (data.ok) {
26-
const results = await data.json();
27-
if (results && results.value && results.value.length > 0) {
28-
return results.value;
29-
}
30-
}
31-
32-
return [];
33-
} catch (error) {
34-
return Promise.reject(error);
6+
}
7+
/**
8+
*
9+
* @param filterText text value of the filter part of oData query 'Id eq 1'
10+
* @param listId
11+
* @param internalColumnName
12+
* @param keyInternalColumnName
13+
* @param webUrl
14+
* @param top
15+
* @param orderBy text value of the filter part of oData query 'Title desc, Created'
16+
*/
17+
public async getListItemsByFilterClause(
18+
filterText: string,
19+
listId: string,
20+
internalColumnName: string,
21+
keyInternalColumnName?: string,
22+
webUrl?: string,
23+
top?: number,
24+
orderBy?: string
25+
): Promise<any[]> { // eslint-disable-line @typescript-eslint/no-explicit-any
26+
try {
27+
const webAbsoluteUrl = !webUrl ? this.SiteUrl : webUrl;
28+
let apiUrl = `${webAbsoluteUrl}/_api/web/lists('${listId}')/items?$select=${keyInternalColumnName || 'Id'},${internalColumnName}&$filter=${filterText}&$top=${top}`;
29+
if (orderBy) {
30+
apiUrl += `&$orderBy=${orderBy}`;
31+
}
32+
const data = await this.SPClient.get(apiUrl, SPHttpClient.configurations.v1);
33+
if (data.ok) {
34+
const results = await data.json();
35+
if (results && results.value && results.value.length > 0) {
36+
return results.value;
3537
}
38+
}
39+
40+
return [];
41+
} catch (error) {
42+
return Promise.reject(error);
3643
}
44+
}
3745
}

src/common/extensions/String.extensions.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ declare global {
1111
}
1212
}
1313

14-
declare var window: any;
14+
declare const window: any; // eslint-disable-line @typescript-eslint/no-explicit-any
15+
16+
/* eslint-disable no-extend-native */
1517

1618
/**
1719
* Parses number in invariant culture
@@ -60,7 +62,7 @@ String.prototype._parseNumber = function (culture: ICultureInfo): number {
6062
}
6163
let intPart: string;
6264
let fractionalPart: string;
63-
let decimalSeparatorIdx: number = base.indexOf(numberFormat.NumberDecimalSeparator);
65+
const decimalSeparatorIdx: number = base.indexOf(numberFormat.NumberDecimalSeparator);
6466
if (decimalSeparatorIdx < 0) {
6567
intPart = base;
6668
fractionalPart = null;
@@ -70,11 +72,11 @@ String.prototype._parseNumber = function (culture: ICultureInfo): number {
7072
fractionalPart = base.substr(decimalSeparatorIdx + numberFormat.NumberDecimalSeparator.length);
7173
}
7274
intPart = intPart.split(numberFormat.NumberGroupSeparator).join('');
73-
var n = numberFormat.NumberGroupSeparator.replace(/\u00A0/g, ' ');
75+
const n = numberFormat.NumberGroupSeparator.replace(/\u00A0/g, ' ');
7476
if (numberFormat.NumberGroupSeparator !== n) {
7577
intPart = intPart.split(n).join('');
7678
}
77-
var result: string = symbol + intPart;
79+
let result: string = symbol + intPart;
7880
if (fractionalPart !== null) {
7981
result += '.' + fractionalPart;
8082
}
@@ -128,3 +130,5 @@ String.prototype._parseNumberNegativePattern = function (numberFormat: ICultureN
128130
}
129131
return ['', this];
130132
};
133+
134+
/* eslint-enable no-extend-native */

0 commit comments

Comments
 (0)