Skip to content

Commit 015c51e

Browse files
committed
wip
1 parent b72995a commit 015c51e

70 files changed

Lines changed: 274 additions & 273 deletions

File tree

Some content is hidden

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

.claude/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Read(//Users/alexterentiev/Work/community/sp-dev-fx-controls-react/**)",
5+
"Bash(node -e \"console.log\\(require\\(''/Users/alexterentiev/Work/community/sp-dev-fx-controls-react/node_modules/markdown-it/package.json''\\).version\\)\")",
6+
"Bash(npm info @types/markdown-it versions --json)",
7+
"Bash(node -e \"const v=JSON.parse\\(require\\(''fs''\\).readFileSync\\(''/dev/stdin'',''utf8''\\)\\); console.log\\(v.filter\\(x=>x.startsWith\\(''14.''\\)\\).join\\(''\\\\n''\\)\\)\")",
8+
"Bash(npm install --save-dev --save-exact @types/markdown-it@14.1.1)",
9+
"Bash(node -e \"console.log\\(require\\(''/Users/alexterentiev/Work/community/sp-dev-fx-controls-react/node_modules/uuid/package.json''\\).version\\)\")",
10+
"Bash(node -e \"console.log\\(require\\(''/Users/alexterentiev/Work/community/sp-dev-fx-controls-react/node_modules/color/package.json''\\).version\\)\")",
11+
"Bash(npm info @types/uuid versions --json)",
12+
"Bash(node -e \"const v=JSON.parse\\(require\\(''fs''\\).readFileSync\\(''/dev/stdin'',''utf8''\\)\\); const matching=v.filter\\(x=>x.startsWith\\(''8.''\\)\\); console.log\\(matching[matching.length-1]\\)\")",
13+
"Bash(npm info @types/color versions --json)",
14+
"Bash(node -e \"const v=JSON.parse\\(require\\(''fs''\\).readFileSync\\(''/dev/stdin'',''utf8''\\)\\); const matching=v.filter\\(x=>x.startsWith\\(''3.''\\)\\); console.log\\(matching[matching.length-1]\\)\")",
15+
"Bash(ls /Users/alexterentiev/Work/community/sp-dev-fx-controls-react/node_modules/color/*.d.ts)",
16+
"Bash(node -e \"const p=require\\(''/Users/alexterentiev/Work/community/sp-dev-fx-controls-react/node_modules/color/package.json''\\); console.log\\(p.types||p.typings||''none''\\)\")",
17+
"Bash(npm install --save-dev --save-exact @types/uuid@8.3.4 @types/color@3.0.6)"
18+
]
19+
}
20+
}

package-lock.json

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

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,21 @@
102102
"@rushstack/heft": "1.1.2",
103103
"@types/chai": "4.3.4",
104104
"@types/chart.js": "2.7.40",
105+
"@types/color": "3.0.6",
105106
"@types/enzyme": "^2.8.12",
106107
"@types/es6-promise": "3.3.0",
107108
"@types/he": "^1.1.2",
108109
"@types/heft-jest": "1.0.2",
109110
"@types/jest": "25.2.3",
110111
"@types/lodash": "4.14.202",
111112
"@types/maplibre-gl": "^1.13.2",
113+
"@types/markdown-it": "14.1.1",
112114
"@types/quill": "^1.3.10",
113115
"@types/react": "17.0.45",
114116
"@types/react-dom": "17.0.17",
115117
"@types/react-mentions": "^4.1.3",
116118
"@types/sinon": "10.0.13",
119+
"@types/uuid": "8.3.4",
117120
"@types/webpack-env": "~1.15.2",
118121
"@types/wicg-entries-api": "^2020.8.2",
119122
"@typescript-eslint/parser": "8.46.2",

src/common/extensions/String.extensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ String.prototype._parseNumberNegativePattern = function (numberFormat: ICultureN
128128
return ['-', this.substr(1, this.length - 2)];
129129
}
130130
}
131-
return ['', this];
131+
return ['', this] as string[];
132132
};
133133

134134
/* eslint-enable no-extend-native */

src/common/utilities/CustomFormatting.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ export default class CustomFormattingHelper {
106106
// to be evaluated:
107107
const styleProperties: React.CSSProperties = {};
108108
if (node.style) {
109-
for (const styleAttribute in node.style) {
110-
if (node.style[styleAttribute]) {
111-
styleProperties[styleAttribute] = this.evaluateCustomFormatContent(node.style[styleAttribute], context) as string;
109+
const nodeStyle = node.style as Record<string, string>;
110+
for (const styleAttribute in nodeStyle) {
111+
if (nodeStyle[styleAttribute]) {
112+
(styleProperties as Record<string, string>)[styleAttribute] = this.evaluateCustomFormatContent(nodeStyle[styleAttribute], context) as string;
112113
}
113114
}
114115
}

src/common/utilities/GeneralHelper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export class GeneralHelper {
260260
return result;
261261
}
262262

263-
public static formatBytes(bytes, decimals): string {
263+
public static formatBytes(bytes: number, decimals: number): string {
264264
if (bytes === 0) {
265265
return strings.EmptyFileSize;
266266
}
@@ -303,7 +303,7 @@ export class GeneralHelper {
303303
/**
304304
* Returns extension of the file
305305
*/
306-
public static getFileExtension(fileName): string {
306+
public static getFileExtension(fileName: string): string {
307307

308308
// Split the URL on the dots
309309
const splitFileName = fileName.toLowerCase().split('.');
@@ -321,8 +321,8 @@ export class GeneralHelper {
321321
return `.${extensionValue}`;
322322
}
323323

324-
private static _getEncodedChar(c): string {
325-
const o = {
324+
private static _getEncodedChar(c: string): string {
325+
const o: Record<string, string> = {
326326
"<": "&lt;",
327327
">": "&gt;",
328328
"&": "&amp;",

src/common/utilities/LocalesHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export class LocalesHelper {
22

3-
private static locales = {
3+
private static locales: Record<number, string> = {
44
1025: 'ar-SA',
55
1026: 'bg-BG',
66
1027: 'ca-ES',
@@ -53,7 +53,7 @@ export class LocalesHelper {
5353
10266: 'sr-Cyrl-RS',
5454
};
5555
public static getLocaleId(localeName: string): number {
56-
const pos: number = Object.keys(this.locales).findIndex(locKey => this.locales[locKey] === localeName);
56+
const pos: number = Object.keys(this.locales).findIndex(locKey => this.locales[parseInt(locKey)] === localeName);
5757
if (pos > -1) {
5858
return parseInt(Object.keys(this.locales)[pos]);
5959
}

0 commit comments

Comments
 (0)