Merge branch 'main' into BugFixes

This commit is contained in:
Hugo Bernier 2023-06-12 10:41:22 -04:00 committed by GitHub
commit 94ef409a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
338 changed files with 144424 additions and 135983 deletions

1
.gitignore vendored
View File

@ -54,3 +54,4 @@ samples/**/release/
samples/**/node_modules
samples/react-kiota-custom-api-client/TeamifiedApi/appsettings.Development.json
samples/react-kiota-custom-api-client/teamified-client/package-lock.json

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net452" />
<package id="bootstrap" version="3.4.1" targetFramework="net452" />
<package id="jQuery" version="1.10.2" targetFramework="net452" />
<package id="jQuery" version="3.5.0" targetFramework="net452" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
<package id="bootstrap" version="3.4.1" targetFramework="net45" />
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="jQuery" version="1.10.2" targetFramework="net45" />
<package id="jQuery.Validation" version="1.19.3" targetFramework="net45" />
<package id="jQuery" version="3.5.0" targetFramework="net45" />
<package id="jQuery.Validation" version="1.19.4" targetFramework="net45" />
<package id="Microsoft.AspNet.Cors" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net45" />

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,7 @@
"zone.js": "^0.8.26"
},
"devDependencies": {
"@microsoft/sp-build-web": "~1.15.2",
"@microsoft/sp-build-web": "~1.17.2",
"@microsoft/sp-module-interfaces": "~1.4.1",
"@microsoft/sp-webpart-workbench": "~1.12.1",
"@types/chai": ">=3.4.34 <3.6.0",

View File

@ -73,9 +73,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -92,7 +92,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@azure/core-tracing": {
@ -106,9 +106,9 @@
}
},
"@types/node-fetch": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
"integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dev": true,
"requires": {
"@types/node": "*",
@ -140,9 +140,9 @@
}
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
@ -161,9 +161,9 @@
}
},
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
"dev": true
},
"universalify": {
@ -187,6 +187,16 @@
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"xml2js": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
@ -27761,16 +27771,6 @@
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
},
"xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@
"jquery": "^3.5.0"
},
"devDependencies": {
"@microsoft/sp-build-web": "1.15.2",
"@microsoft/sp-build-web": "1.17.2",
"@microsoft/sp-module-interfaces": "1.7.0",
"@microsoft/sp-webpart-workbench": "1.12.1",
"@types/chai": "3.4.34",

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
"@types/webpack-env": ">=1.12.1 <1.14.0"
},
"devDependencies": {
"@microsoft/sp-build-web": "~1.15.2",
"@microsoft/sp-build-web": "~1.17.2",
"@microsoft/sp-module-interfaces": "~1.1.1",
"@microsoft/sp-webpart-workbench": "~1.12.1",
"gulp": "~3.9.1",

6
samples/package-lock.json generated Normal file
View File

@ -0,0 +1,6 @@
{
"name": "samples",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net461" />
<package id="bootstrap" version="3.4.1" targetFramework="net461" />
<package id="jQuery" version="1.10.2" targetFramework="net461" />
<package id="jQuery.Validation" version="1.19.3" targetFramework="net461" />
<package id="jQuery" version="3.5.0" targetFramework="net461" />
<package id="jQuery.Validation" version="1.19.4" targetFramework="net461" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net461" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net452" />
<package id="bootstrap" version="3.4.1" targetFramework="net452" />
<package id="jQuery" version="1.10.2" targetFramework="net452" />
<package id="jQuery" version="3.5.0" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net452" />

View File

@ -6557,11 +6557,6 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -6653,9 +6648,9 @@
"integrity": "sha1-4rwxvHEqr/ugU6pN1GvITrXSCQ8="
},
"adaptive-expressions": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.15.0.tgz",
"integrity": "sha512-J2SiExW0quYT0CZtqV4xRmJAOprM5o0HWA9FtGk3YZ6ZTo4d/2byIskRluhPf31Uh025nZ5ojxGkuVSjdtAY1w==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -6663,14 +6658,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -6678,6 +6673,19 @@
"xpath": "^0.0.32"
},
"dependencies": {
"@xmldom/xmldom": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"fast-xml-parser": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.5"
}
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@ -11139,14 +11147,6 @@
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"requires": {
"strnum": "^1.0.4"
}
},
"fastparse": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",

View File

@ -6543,11 +6543,6 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -6639,9 +6634,9 @@
"integrity": "sha1-4rwxvHEqr/ugU6pN1GvITrXSCQ8="
},
"adaptive-expressions": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.15.0.tgz",
"integrity": "sha512-J2SiExW0quYT0CZtqV4xRmJAOprM5o0HWA9FtGk3YZ6ZTo4d/2byIskRluhPf31Uh025nZ5ojxGkuVSjdtAY1w==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -6649,14 +6644,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -6664,6 +6659,19 @@
"xpath": "^0.0.32"
},
"dependencies": {
"@xmldom/xmldom": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"fast-xml-parser": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.5"
}
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@ -11120,14 +11128,6 @@
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"requires": {
"strnum": "^1.0.4"
}
},
"fastparse": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",

View File

@ -4703,9 +4703,9 @@
}
},
"@xmldom/xmldom": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.5.tgz",
"integrity": "sha512-0dpjDLeCXYThL2YhqZcd/spuwoH+dmnFoND9ZxZkAYxp1IJUB2GP16ow2MJRsjVxy8j1Qv8BJRmN5GKnbDKCmQ=="
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
@ -4799,9 +4799,9 @@
"integrity": "sha1-4rwxvHEqr/ugU6pN1GvITrXSCQ8="
},
"adaptive-expressions": {
"version": "4.18.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.18.0.tgz",
"integrity": "sha512-zG3HNjDCCthXWAGQgD6CpQbC3tFFSrq7uQl/9d7Afq/1cRJT7t1j8B7Q82jBcAlqC6hmI/JQhnmcEKrm6vgOZQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -4809,14 +4809,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.8.3",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -8078,9 +8078,9 @@
"dev": true
},
"dayjs": {
"version": "1.11.6",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz",
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
"version": "1.11.8",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.8.tgz",
"integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ=="
},
"deasync": {
"version": "0.1.21",
@ -9498,11 +9498,11 @@
"dev": true
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
}
},
"fastparse": {

View File

@ -18,7 +18,7 @@
"@pnp/sp": "^2.0.3",
"@pnp/spfx-controls-react": "1.16.0",
"@pnp/spfx-property-controls": "^1.18.0",
"adaptive-expressions": "^4.18.0",
"adaptive-expressions": "^4.20.0",
"adaptivecards": "^2.9.0",
"adaptivecards-fluentui": "^0.5.3",
"adaptivecards-templating": "^2.1.0",

View File

@ -5826,11 +5826,6 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -5917,9 +5912,9 @@
"integrity": "sha512-tJf2bRwolKA8/J+wcy4CFOTAva8gpueHplptfjz3Wt1XOb7Y1jnwdm2VdkFZQUhxCtd/xPvcRSAQP2+ROtAD5g=="
},
"adaptive-expressions": {
"version": "4.17.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.17.0.tgz",
"integrity": "sha512-tSmH1OW9A6yaWuG58lhbDs/vArSS14Tu2ShAJ4cJ4zH6sshLw8ZF2MfJ21GfL842CCIKUNd0eNA19lUh/7D5Yw==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -5927,14 +5922,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -5942,6 +5937,19 @@
"xpath": "^0.0.32"
},
"dependencies": {
"@xmldom/xmldom": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"fast-xml-parser": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.5"
}
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@ -10361,14 +10369,6 @@
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"requires": {
"strnum": "^1.0.4"
}
},
"fastest-stable-stringify": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-2.0.2.tgz",

View File

@ -10,6 +10,7 @@ Attempts to replicate the functionality of Page Properties with the following im
- Support for hyperlink fields
- Support for currency
- Improved support for dates
- Support for Multiline text fields
![see the difference](./assets/diff-screencap.png)
@ -47,6 +48,7 @@ None
- [Mike Homol](https://github.com/mhomol)
- [Abderahman Moujahid](https://github.com/Abderahman88)
- [Valeras Narbutas](https://github.com/ValerasNarbutas)
- [Nishkalank Bezawada](https://github.com/NishkalankBezawada)
## Version history
@ -56,6 +58,8 @@ Version|Date|Comments
1.0.1|September 22, 2021|Added support for multi-language sites
1.0.2|December 24, 2021|Fix retrieving fields from SitePages
1.0.3|January 12, 2022|Fix formatting of date, number and currency values
1.0.5|June 05, 2023|Support for Multiline text fields
## Minimal Path to Awesome

View File

@ -12,7 +12,8 @@
"- Support for image fields",
"- Support for hyperlink fields",
"- Support for currency",
"- Improved support for dates"
"- Improved support for dates",
"- Support for Multiline text fields"
],
"creationDateTime": "2021-03-30",
"updateDateTime": "2023-03-06",
@ -69,6 +70,12 @@
"company": "",
"pictureUrl": "https://avatars.githubusercontent.com/u/36161889?s=460\u0026u=afdd5f6681bc375ee3811482dec79824c12d8170\u0026v=4",
"name": "Abderahman Moujahid"
},
{
"gitHubAccount": "NishkalankBezawada",
"company": "Tietoevry, Sweden",
"pictureUrl": "https://avatars.githubusercontent.com/u/47456098?v=4",
"name": "Nishkalank Bezawada"
}
],
"references": [

View File

@ -82,7 +82,8 @@ export default class AdvancedPagePropertiesWebPart extends BaseClientSideWebPart
// eslint-disable-next-line @typescript-eslint/no-explicit-any
_fields.forEach((field: any) => {
if (!field.FromBaseType && !field.Hidden && field.SchemaXml.indexOf("ShowInListSettings=\"FALSE\"") === -1
&& field.TypeAsString !== "Boolean" && field.TypeAsString !== "Note") {
//&& field.TypeAsString !== "Boolean" && field.TypeAsString !== "Note") {
&& field.TypeAsString !== "Boolean") {
const internalFieldName = field.InternalName == "LinkTitle" ? "Title" : field.InternalName;
this._availableProperties.push({ key: internalFieldName, text: field.Title });
Log.Write(field.TypeAsString);

View File

@ -41,6 +41,25 @@
width: max-content;
}
.multiTextCapsule{
width: 100%;
display: -webkit-box !important;
word-break: break-word;
line-height: 1.4;
max-height: 50%;
max-width: 100%;
-webkit-line-clamp: 10;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: normal;
box-sizing: border-box;
padding: 4px 8px 5px 8px;
border-radius: 16px;
-ms-flex-align: center;
align-items: center;
}
.urlValue {
margin: 4px 4px 4px 4px;
cursor: pointer;

View File

@ -151,6 +151,10 @@ const AdvancedPageProperties: React.FunctionComponent<IAdvancedPagePropertiesPro
return (
<span className={styles.standardCapsule} style={{backgroundColor: semanticColors.accentButtonBackground, color: semanticColors.accentButtonText}}>{val}</span>
);
case "Note":
return (
<span className={styles.multiTextCapsule} style={{backgroundColor: semanticColors.accentButtonBackground, color: semanticColors.accentButtonText}}>{val}</span>
);
default:
return (
<span className={styles.standardCapsule} style={{backgroundColor: semanticColors.accentButtonBackground, color: semanticColors.accentButtonText}}>{val}</span>

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@
"react-dom": "16.3.2"
},
"devDependencies": {
"@microsoft/sp-build-web": "1.15.2",
"@microsoft/sp-build-web": "1.17.2",
"@microsoft/sp-module-interfaces": "1.7.1",
"@microsoft/sp-webpart-workbench": "1.12.1",
"gulp": "~3.9.1",

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@
"@microsoft/eslint-config-spfx": "1.15.2",
"@microsoft/eslint-plugin-spfx": "1.15.2",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/sp-build-web": "1.15.2",
"@microsoft/sp-build-web": "1.17.2",
"@microsoft/sp-module-interfaces": "1.15.2",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "16.9.51",
@ -38,7 +38,7 @@
"gulp-postcss": "^9.0.1",
"postcss": "^8.4.18",
"postcss-import": "^15.0.0",
"spfx-fast-serve-helpers": "~1.15.0",
"spfx-fast-serve-helpers": "~1.17.0",
"tailwindcss": "^3.1.8",
"typescript": "4.5.5"
}

View File

@ -73,9 +73,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -92,7 +92,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@azure/core-tracing": {
@ -106,9 +106,9 @@
}
},
"@types/node-fetch": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
"integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dev": true,
"requires": {
"@types/node": "*",
@ -140,9 +140,9 @@
}
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
@ -161,9 +161,9 @@
}
},
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
"dev": true
},
"universalify": {
@ -187,6 +187,16 @@
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"xml2js": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
@ -25073,16 +25083,6 @@
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
},
"xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",

View File

@ -98,9 +98,9 @@
}
},
"node_modules/@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^1.0.0",
@ -117,7 +117,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"engines": {
"node": ">=14.0.0"
@ -31211,9 +31211,9 @@
"dev": true
},
"node_modules/xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"dependencies": {
"sax": ">=0.6.0",
@ -31583,9 +31583,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -31602,7 +31602,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@types/node-fetch": {
@ -56656,9 +56656,9 @@
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",

View File

@ -4254,6 +4254,23 @@
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-clientv1@npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@microsoft/sp-component-base": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@microsoft/sp-component-base/-/sp-component-base-1.16.1.tgz",
@ -4303,6 +4320,25 @@
"@microsoft/sp-http-base": "1.16.1",
"@microsoft/sp-http-msgraph": "1.16.1",
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-loader": {
@ -4402,6 +4438,15 @@
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"optional": true
},
"isomorphic-fetch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
"integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
"requires": {
"node-fetch": "^2.6.1",
"whatwg-fetch": "^3.4.1"
}
},
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
@ -4687,6 +4732,16 @@
"msal": "1.4.13",
"msalLegacy": "npm:msal@1.4.12",
"tslib": "~1.10.0"
},
"dependencies": {
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
}
}
},
"@microsoft/sp-lodash-subset": {
@ -4711,6 +4766,14 @@
"tslib": "^1.9.3"
}
},
"msalLegacy": {
"version": "npm:msalLegacy@npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
},
"tslib": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
@ -5290,6 +5353,23 @@
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@microsoft/sp-diagnostics": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@microsoft/sp-diagnostics/-/sp-diagnostics-1.16.1.tgz",
@ -5298,6 +5378,15 @@
"@microsoft/sp-core-library": "1.16.1",
"@microsoft/sp-lodash-subset": "1.16.1"
}
},
"isomorphic-fetch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
"integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
"requires": {
"node-fetch": "^2.6.1",
"whatwg-fetch": "^3.4.1"
}
}
}
},
@ -5640,6 +5729,23 @@
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-clientv1@npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@microsoft/sp-diagnostics": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@microsoft/sp-diagnostics/-/sp-diagnostics-1.16.1.tgz",
@ -5672,6 +5778,25 @@
"@microsoft/sp-http-base": "1.16.1",
"@microsoft/sp-http-msgraph": "1.16.1",
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-loader": {
@ -5766,6 +5891,15 @@
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"optional": true
},
"isomorphic-fetch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
"integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
"requires": {
"node-fetch": "^2.6.1",
"whatwg-fetch": "^3.4.1"
}
},
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
@ -5901,6 +6035,16 @@
"msal": "1.4.13",
"msalLegacy": "npm:msal@1.4.12",
"tslib": "~1.10.0"
},
"dependencies": {
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
}
}
},
"@microsoft/sp-lodash-subset": {
@ -5935,6 +6079,14 @@
"tslib": "^1.9.3"
}
},
"msalLegacy": {
"version": "npm:msalLegacy@npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
},
"office-ui-fabric-react": {
"version": "7.180.0",
"resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-7.180.0.tgz",
@ -6229,6 +6381,23 @@
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-clientv1@npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@microsoft/sp-component-base": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@microsoft/sp-component-base/-/sp-component-base-1.16.1.tgz",
@ -6278,6 +6447,25 @@
"@microsoft/sp-http-base": "1.16.1",
"@microsoft/sp-http-msgraph": "1.16.1",
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-odata-types": {
@ -6340,6 +6528,15 @@
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"optional": true
},
"isomorphic-fetch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
"integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
"requires": {
"node-fetch": "^2.6.1",
"whatwg-fetch": "^3.4.1"
}
},
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
@ -6417,6 +6614,23 @@
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-clientv1@npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@microsoft/sp-component-base": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@microsoft/sp-component-base/-/sp-component-base-1.16.1.tgz",
@ -6466,6 +6680,25 @@
"@microsoft/sp-http-base": "1.16.1",
"@microsoft/sp-http-msgraph": "1.16.1",
"tslib": "2.3.1"
},
"dependencies": {
"@microsoft/microsoft-graph-clientv1": {
"version": "npm:@microsoft/microsoft-graph-client@1.7.2-spfx",
"resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz",
"integrity": "sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==",
"requires": {
"es6-promise": "^4.2.6",
"isomorphic-fetch": "^3.0.0",
"tslib": "^1.9.3"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
}
}
},
"@microsoft/sp-loader": {
@ -6513,6 +6746,14 @@
"tslib": "2.3.1"
}
},
"@microsoft/teams-js-v2": {
"version": "npm:@microsoft/teams-js@2.4.1",
"resolved": "https://registry.npmjs.org/@microsoft/teams-js/-/teams-js-2.4.1.tgz",
"integrity": "sha512-rHOVt3Duw1HJrsZq0FO09qMGVGI5eg6hkVKIxsuyJQ5WMPaGMAcF5A0QlXBzVwa9cocNyv8JYeMeJAh+svnLnw==",
"requires": {
"debug": "4.3.3"
}
},
"@rushstack/loader-raw-script": {
"version": "1.3.260",
"resolved": "https://registry.npmjs.org/@rushstack/loader-raw-script/-/loader-raw-script-1.3.260.tgz",
@ -6560,6 +6801,23 @@
"integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
"optional": true
},
"debug": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"requires": {
"ms": "2.1.2"
}
},
"isomorphic-fetch": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
"integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
"requires": {
"node-fetch": "^2.6.1",
"whatwg-fetch": "^3.4.1"
}
},
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
@ -7602,6 +7860,16 @@
"msal": "1.4.13",
"msalLegacy": "npm:msal@1.4.12",
"tslib": "~1.10.0"
},
"dependencies": {
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
}
}
},
"@microsoft/sp-module-interfaces": {
@ -10715,11 +10983,6 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -10820,9 +11083,9 @@
"integrity": "sha1-4rwxvHEqr/ugU6pN1GvITrXSCQ8="
},
"adaptive-expressions": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.15.0.tgz",
"integrity": "sha512-J2SiExW0quYT0CZtqV4xRmJAOprM5o0HWA9FtGk3YZ6ZTo4d/2byIskRluhPf31Uh025nZ5ojxGkuVSjdtAY1w==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -10830,14 +11093,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -10845,6 +11108,19 @@
"xpath": "^0.0.32"
},
"dependencies": {
"@xmldom/xmldom": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"fast-xml-parser": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.5"
}
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@ -15542,14 +15818,6 @@
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"requires": {
"strnum": "^1.0.4"
}
},
"fastparse": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",

View File

@ -12291,9 +12291,9 @@
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ==",
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==",
"engines": {
"node": ">=10.0.0"
}
@ -12419,9 +12419,9 @@
}
},
"node_modules/adaptive-expressions": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.17.1.tgz",
"integrity": "sha512-9iELTnge5lLcIJVxWZdhYWJnlfjKgWHt8W7eSw5vaTURaI48taN7sruWwz9tUQcQF0lIa+7TB3cXJ/16Lr0UBQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"dependencies": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -12429,14 +12429,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -17837,18 +17837,24 @@
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"node_modules/fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"funding": [
{
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
},
{
"type": "github",
"url": "https://github.com/sponsors/NaturalIntelligence"
}
],
"dependencies": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
},
"bin": {
"xml2js": "cli.js"
},
"funding": {
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
"fxparser": "src/cli/cli.js"
}
},
"node_modules/fastest-stable-stringify": {
@ -43849,9 +43855,9 @@
}
},
"@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ=="
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
@ -43948,9 +43954,9 @@
"integrity": "sha512-tJf2bRwolKA8/J+wcy4CFOTAva8gpueHplptfjz3Wt1XOb7Y1jnwdm2VdkFZQUhxCtd/xPvcRSAQP2+ROtAD5g=="
},
"adaptive-expressions": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.17.1.tgz",
"integrity": "sha512-9iELTnge5lLcIJVxWZdhYWJnlfjKgWHt8W7eSw5vaTURaI48taN7sruWwz9tUQcQF0lIa+7TB3cXJ/16Lr0UBQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -43958,14 +43964,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -48369,11 +48375,11 @@
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
}
},
"fastest-stable-stringify": {

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@
"@microsoft/eslint-config-spfx": "1.15.2",
"@microsoft/eslint-plugin-spfx": "1.15.2",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/sp-build-web": "1.15.2",
"@microsoft/sp-build-web": "1.17.2",
"@microsoft/sp-module-interfaces": "1.15.2",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "16.9.51",

View File

@ -73,9 +73,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -92,7 +92,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@azure/core-tracing": {
@ -106,9 +106,9 @@
}
},
"@types/node-fetch": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
"integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dev": true,
"requires": {
"@types/node": "*",
@ -140,9 +140,9 @@
}
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
@ -161,9 +161,9 @@
}
},
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
"dev": true
},
"universalify": {
@ -187,6 +187,16 @@
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"xml2js": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
@ -29623,16 +29633,6 @@
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
},
"xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",

View File

@ -109,9 +109,9 @@
}
},
"node_modules/@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^1.0.0",
@ -128,7 +128,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"engines": {
"node": ">=14.0.0"
@ -31185,9 +31185,9 @@
"dev": true
},
"node_modules/xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"dependencies": {
"sax": ">=0.6.0",
@ -31557,9 +31557,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -31576,7 +31576,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@types/node-fetch": {
@ -56600,9 +56600,9 @@
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",

View File

@ -121,9 +121,9 @@
}
},
"node_modules/@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"dependencies": {
"@azure/abort-controller": "^1.0.0",
@ -140,7 +140,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"engines": {
"node": ">=14.0.0"
@ -13558,9 +13558,9 @@
}
},
"node_modules/adaptive-expressions": {
"version": "4.19.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.19.0.tgz",
"integrity": "sha512-qezl+UYLmDT4AcveNza8z+7fkXoFnL0h3JgTMddR6o2d9DgFJl5GaZ1QC2FcN0twpWikHsYKSMCOE9kYW7gUUQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"peer": true,
"dependencies": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
@ -13576,7 +13576,7 @@
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -19397,19 +19397,25 @@
"dev": true
},
"node_modules/fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"funding": [
{
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
},
{
"type": "github",
"url": "https://github.com/sponsors/NaturalIntelligence"
}
],
"peer": true,
"dependencies": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
},
"bin": {
"xml2js": "cli.js"
},
"funding": {
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
"fxparser": "src/cli/cli.js"
}
},
"node_modules/fastest-levenshtein": {
@ -38732,9 +38738,9 @@
"dev": true
},
"node_modules/xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"dependencies": {
"sax": ">=0.6.0",
@ -39119,9 +39125,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -39138,7 +39144,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@types/node-fetch": {
@ -49833,9 +49839,9 @@
"integrity": "sha512-tJf2bRwolKA8/J+wcy4CFOTAva8gpueHplptfjz3Wt1XOb7Y1jnwdm2VdkFZQUhxCtd/xPvcRSAQP2+ROtAD5g=="
},
"adaptive-expressions": {
"version": "4.19.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.19.0.tgz",
"integrity": "sha512-qezl+UYLmDT4AcveNza8z+7fkXoFnL0h3JgTMddR6o2d9DgFJl5GaZ1QC2FcN0twpWikHsYKSMCOE9kYW7gUUQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"peer": true,
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
@ -49851,7 +49857,7 @@
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -54503,12 +54509,12 @@
"dev": true
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"peer": true,
"requires": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
}
},
"fastest-levenshtein": {
@ -69856,9 +69862,9 @@
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",

View File

@ -73,9 +73,9 @@
}
},
"@azure/core-http": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.1.tgz",
"integrity": "sha512-cur03BUwV0Tbv81bQBOLafFB02B6G++K6F2O3IMl8pSE2QlXm3cu11bfyBNlDUKi5U+xnB3GC63ae3athhkx6Q==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"dev": true,
"requires": {
"@azure/abort-controller": "^1.0.0",
@ -92,7 +92,7 @@
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"dependencies": {
"@azure/core-tracing": {
@ -106,9 +106,9 @@
}
},
"@types/node-fetch": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz",
"integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.3.tgz",
"integrity": "sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==",
"dev": true,
"requires": {
"@types/node": "*",
@ -140,9 +140,9 @@
}
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dev": true,
"requires": {
"whatwg-url": "^5.0.0"
@ -161,9 +161,9 @@
}
},
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
"dev": true
},
"universalify": {
@ -187,6 +187,16 @@
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"xml2js": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
@ -25377,16 +25387,6 @@
"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
"dev": true
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
},
"xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",

View File

@ -7178,11 +7178,6 @@
"@xtuc/long": "4.2.2"
}
},
"@xmldom/xmldom": {
"version": "0.7.6",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.6.tgz",
"integrity": "sha512-HHXP9hskkFQHy8QxxUXkS7946FFIhYVfGqsk0WLwllmexN9x/+R4UBLvurHEuyXRfVEObVR8APuQehykLviwSQ=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
@ -7268,9 +7263,9 @@
"integrity": "sha1-4rwxvHEqr/ugU6pN1GvITrXSCQ8="
},
"adaptive-expressions": {
"version": "4.15.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.15.0.tgz",
"integrity": "sha512-J2SiExW0quYT0CZtqV4xRmJAOprM5o0HWA9FtGk3YZ6ZTo4d/2byIskRluhPf31Uh025nZ5ojxGkuVSjdtAY1w==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -7278,14 +7273,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -7293,6 +7288,19 @@
"xpath": "^0.0.32"
},
"dependencies": {
"@xmldom/xmldom": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"fast-xml-parser": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.5"
}
},
"lru-cache": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
@ -11603,14 +11611,6 @@
"resolved": "https://registry.npmjs.org/fast-loops/-/fast-loops-1.1.3.tgz",
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"requires": {
"strnum": "^1.0.4"
}
},
"fastparse": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz",

View File

@ -0,0 +1,39 @@
// 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.11.0",
"image": "docker.io/m365pnp/spfx:1.11.0",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
4321,
35729,
5432
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
"5432": {
"protocol": "https",
"label": "Workbench",
"onAutoForward": "silent"
},
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}

View File

@ -0,0 +1,31 @@
echo
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
npm install
## commands to create dev certificate and copy it to the root folder of the project
echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
gulp trust-dev-cert
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.cer
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.pem
## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
then
echo "# .CER Certificates" >> .gitignore
echo "*.cer" >> .gitignore
fi
## add *.pem to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.pem' ./.gitignore
then
echo "# .PEM Certificates" >> .gitignore
echo "*.pem" >> .gitignore
fi
echo
echo -e "\e[1;92mReady!\e[0m"
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"

View File

@ -4,13 +4,12 @@
> **NOTE:** This web part was built with SPFx 1.11.0, making it only compatible with SharePoint Online. If you wish, you can use [an earlier version of this web part](../react-content-query-onprem/README.md) which is compatible on-premises versions of SharePoint.
The **Content Query web part** is a modern version of the good old **Content by Query web part** that was introduced in SharePoint 2007. Built for Office 365, this modern version is built using the **SharePoint Framework (SPFx)** and uses the latest *Web Stack* practices.
The **Content Query web part** is a modern version of the good old **Content by Query web part** that was introduced in SharePoint 2007. Built for Office 365, this modern version is built using the **SharePoint Framework (SPFx)** and uses the latest *Web Stack* practices.
While the original web part was based on an **XSLT** templating engine, this *React* web part is based on the well known [Handlebars templating engine](http://handlebarsjs.com), which empowers users to create simple, yet powerful **HTML** templates for rendering the queried content. This new version also lets the user query *any site collections* which resides on the same domain URL, add *unlimited filters*, query `DateTime` fields to the *nearest minute* rather than being limited to a day, and much more.
![Web Part Preview](assets/toolpart.gif)
## Compatibility
| :warning: Important |
@ -38,6 +37,7 @@ While the original web part was based on an **XSLT** templating engine, this *Re
* [Paolo Pialorsi](https://github.com/PaoloPia)
* [Simon-Pierre Plante](https://github.com/spplante)
* [Abderahman Moujahid](https://github.com/Abderahman88)
* [Chris Lizon](https://github.com/ChrisLizon)
## Version history
@ -46,8 +46,8 @@ Version|Date|Comments
1.0.0|May 04, 2017|Initial release
1.0.1|July 23rd 15, 2017|Updated to GA Version
1.0.3|August 12, 2017|Added external scripts functionality
1.0.4|August 31, 2017|Fixed a bug where tenant sites/sub-sites were missing from the **Web Url** dropdown
1.0.5|September 1st, 2017|Added a **Site Url** parameter next to the **Web Url** parameter in order to narrow down the results
1.0.4|August 31, 2017|Fixed a bug where tenant sites/sub-sites were missing from the **Web URL** dropdown
1.0.5|September 1st, 2017|Added a **Site URL** parameter next to the **Web URL** parameter in order to narrow down the results
1.0.6|September 19, 2017|Upgraded to SharePoint drop 1.2.0 and added the site URL and web URL preselection when adding the web part for the first time on a page. Also fixed a bug with fields that had spaces in their internal names (automatically replaced with `_x0020_` by SharePoint).
1.0.7|November 17, 2017|Reverted to drop 1.1.0 in order to keep compatibility for SP2016 on-premise
1.0.8|March 17, 2018|Updated to store the selected list using its ID instead of its title, so the web part keeps working if the list title gets updated.
@ -65,7 +65,7 @@ Version|Date|Comments
### Global dependencies
> This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit https://aka.ms/spfx-devcontainer for further instructions.
> This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit https://aka.ms/spfx-devcontainer for further instructions.
Requires Gulp globally installed:
@ -81,14 +81,17 @@ Download & install all dependencies, build, bundle & package the project
# download & install dependencies
npm install
#If you receive an error Cannot find module 'worker_threads' you will need to tell Node 10 to use the experiemental worker features via environment variable. In Powershell this is accomplished like this:
$env:NODE_OPTIONS="--experimental-worker"
# transpile all TypeScript & SCSS => JavaScript & CSS
gulp build
# create component bundle & manifest
gulp bundle
gulp bundle --ship
# create SharePoint package
gulp package-solution
gulp package-solution --ship
```
These commands produce the following:
@ -285,7 +288,6 @@ Property | Description
`{{MyField.jsonValue}}` | Returns a JSON object value of the field. For example, an *Image* field JSON value would return a JSON object which contains the `serverRelativeUrl` property
`{{MyField.personValue}}` | Returns an object value of a person field. The `personValue` property provides `email`, `displayName` and `image` properties. The `image` property contains `small`, `medium`, and `large` properties, each of which pointing to the profile image URL for the small, medium, and large profile images.
##### Handlebars
```handlebars
@ -341,7 +343,6 @@ If you need custom logic files that can interact precisely **before** or **after
```javascript
ReactContentQuery.ExternalScripts.MyScriptFile = {
onPreRender: function(wpContext, handlebarsContext) {
// Do something before rendering (ie: adding a custom block helper)
},
@ -349,7 +350,6 @@ ReactContentQuery.ExternalScripts.MyScriptFile = {
onPostRender: function(wpContext, handlebarsContext) {
// Do something after rendering (ie: calling a plugin on the generated HTML)
}
}
```
@ -426,7 +426,6 @@ If you have a SharePoint list containing a user field (like a **Created By** or
For example, to use the `mgt-person` component with a person field called `MyPersonField`, you would use the following template:
```handlebars
<mgt-person person-query="{{MyPersonField.personValue.email}}" view="twoLines"></mgt-person>
```
@ -495,10 +494,8 @@ For questions regarding this sample, [create a new question](https://github.com/
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-content-query-online&template=question.yml&sample=react-content-query-online&authors=@YOURGITHUBUSERNAME&title=react-content-query-online%20-%20).
## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-content-query-online" />

View File

@ -9,7 +9,7 @@
"The React Content Query Web Part is a modern version of the good old Content by Query Web Part that was introduced in SharePoint 2007. Built for SharePoint Online, this modern version is built against the new SharePoint Framework (SPFx) and uses the latest Web Stack practices. While the original Web Part was based on a XSLT templating engine, this React Web Part is based on the well known Handlebars templating engine, which empowers users to create simple, yet powerfull HTML templates for rendering the queried content. This new version also lets the user query any site collections which resides on the same domain url, add unlimited filters, query DateTime fields to the nearest minute rather than being limited to a day, and much more."
],
"creationDateTime": "2021-01-07",
"updateDateTime": "2021-01-07",
"updateDateTime": "2023-05-04",
"products": [
"SharePoint"
],
@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.10.0"
"value": "1.11.0"
}
],
"thumbnails": [
@ -136,7 +136,12 @@
"company": "",
"pictureUrl": "https://avatars.githubusercontent.com/u/36161889?s=460\u0026u=afdd5f6681bc375ee3811482dec79824c12d8170\u0026v=4",
"name": "Abderahman Moujahid"
}
},
{
"gitHubAccount": "ChrisLizon",
"name": "Chris Lizon",
"pictureUrl": "https://github.com/ChrisLizon.png"
}
],
"references": [
{

File diff suppressed because it is too large Load Diff

View File

@ -13,12 +13,13 @@
},
"dependencies": {
"@microsoft/mgt": "^2.0.1",
"@microsoft/sp-build-web": "1.11.0",
"@microsoft/sp-core-library": "1.11.0",
"@microsoft/sp-lodash-subset": "1.11.0",
"@microsoft/sp-office-ui-fabric-core": "1.11.0",
"@microsoft/sp-property-pane": "1.11.0",
"@microsoft/sp-webpart-base": "1.11.0",
"@pnp/spfx-controls-react": "^2.3.0",
"@pnp/spfx-controls-react": "2.3.0",
"@pnp/spfx-property-controls": "2.2.0",
"@types/handlebars": "4.0.32",
"acorn": ">=5.7.4",
@ -65,7 +66,6 @@
"devDependencies": {
"@microsoft/rush-stack-compiler-2.9": "0.7.16",
"@microsoft/rush-stack-compiler-3.3": "0.3.5",
"@microsoft/sp-build-web": "1.16.1",
"@microsoft/sp-module-interfaces": "1.11.0",
"@microsoft/sp-tslint-rules": "1.11.0",
"@microsoft/sp-webpart-workbench": "1.12.1",
@ -81,7 +81,7 @@
"gulp-sequence": "1.0.0",
"gulp-stylelint": "^13.0.0",
"jest": "^23.6.0",
"stylelint": "^13.0.0",
"stylelint": "14.16.1",
"stylelint-config-standard": "^20.0.0",
"stylelint-scss": "^3.14.2",
"tslint-microsoft-contrib": "^5.0.0",

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@
"@types/webpack-env": ">=1.12.1 <1.14.0"
},
"devDependencies": {
"@microsoft/sp-build-web": "~1.15.2",
"@microsoft/sp-build-web": "~1.17.2",
"@microsoft/sp-module-interfaces": "~1.1.0",
"@microsoft/sp-webpart-workbench": "~1.12.1",
"gulp": "~4.0.2",

View File

@ -12296,9 +12296,9 @@
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.9.tgz",
"integrity": "sha512-yceMpm/xd4W2a85iqZyO09gTnHvXF6pyiWjD2jcOJs7hRoZtNNOO1eJlhHj1ixA+xip2hOyGn+LgcvLCMo5zXA==",
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q==",
"engines": {
"node": ">=10.0.0"
}
@ -12424,9 +12424,9 @@
}
},
"node_modules/adaptive-expressions": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.17.1.tgz",
"integrity": "sha512-9iELTnge5lLcIJVxWZdhYWJnlfjKgWHt8W7eSw5vaTURaI48taN7sruWwz9tUQcQF0lIa+7TB3cXJ/16Lr0UBQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"dependencies": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -12434,14 +12434,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -17869,18 +17869,24 @@
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"node_modules/fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"funding": [
{
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
},
{
"type": "github",
"url": "https://github.com/sponsors/NaturalIntelligence"
}
],
"dependencies": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
},
"bin": {
"xml2js": "cli.js"
},
"funding": {
"type": "paypal",
"url": "https://paypal.me/naturalintelligence"
"fxparser": "src/cli/cli.js"
}
},
"node_modules/fastest-stable-stringify": {
@ -43796,9 +43802,9 @@
}
},
"@xmldom/xmldom": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.9.tgz",
"integrity": "sha512-yceMpm/xd4W2a85iqZyO09gTnHvXF6pyiWjD2jcOJs7hRoZtNNOO1eJlhHj1ixA+xip2hOyGn+LgcvLCMo5zXA=="
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.8.tgz",
"integrity": "sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q=="
},
"@xtuc/ieee754": {
"version": "1.2.0",
@ -43895,9 +43901,9 @@
"integrity": "sha512-tJf2bRwolKA8/J+wcy4CFOTAva8gpueHplptfjz3Wt1XOb7Y1jnwdm2VdkFZQUhxCtd/xPvcRSAQP2+ROtAD5g=="
},
"adaptive-expressions": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.17.1.tgz",
"integrity": "sha512-9iELTnge5lLcIJVxWZdhYWJnlfjKgWHt8W7eSw5vaTURaI48taN7sruWwz9tUQcQF0lIa+7TB3cXJ/16Lr0UBQ==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/adaptive-expressions/-/adaptive-expressions-4.20.0.tgz",
"integrity": "sha512-/m0gXtwb75iK0UBftwoK8La7Ch/TqfrT5doAoLya1VAaeOEIzDzHIbMe1G6B7/N+Nn/waZFMexrqDW7d01lbdA==",
"requires": {
"@microsoft/recognizers-text-data-types-timex-expression": "1.3.0",
"@types/atob-lite": "^2.0.0",
@ -43905,14 +43911,14 @@
"@types/lodash.isequal": "^4.5.5",
"@types/lru-cache": "^5.1.0",
"@types/xmldom": "^0.1.30",
"@xmldom/xmldom": "^0.7.4",
"@xmldom/xmldom": "^0.8.6",
"antlr4ts": "0.5.0-alpha.3",
"atob-lite": "^2.0.0",
"big-integer": "^1.6.48",
"btoa-lite": "^1.0.0",
"d3-format": "^1.4.4",
"dayjs": "^1.10.3",
"fast-xml-parser": "^3.19.0",
"fast-xml-parser": "^4.1.2",
"jspath": "^0.4.0",
"lodash.isequal": "^4.5.0",
"lru-cache": "^5.1.1",
@ -48331,11 +48337,11 @@
"integrity": "sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g=="
},
"fast-xml-parser": {
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz",
"integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==",
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.4.tgz",
"integrity": "sha512-fbfMDvgBNIdDJLdLOwacjFAPYt67tr31H9ZhWSm45CDAxvd0I6WTlSOUo7K2P/K5sA5JgMKG64PI3DMcaFdWpQ==",
"requires": {
"strnum": "^1.0.4"
"strnum": "^1.0.5"
}
},
"fastest-stable-stringify": {

View File

@ -0,0 +1,39 @@
// 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.16.1",
"image": "docker.io/m365pnp/spfx:1.16.1",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
4321,
35729
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
// Not needed for SPFx>= 1.12.1
// "5432": {
// "protocol": "https",
// "label": "Workbench",
// "onAutoForward": "silent"
// },
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}

View File

@ -0,0 +1,33 @@
echo
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
npm install
## commands to create dev certificate and copy it to the root folder of the project
echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
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
# Copy the PEM ecrtificate for non-Windows hosts
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
then
echo "# .CER Certificates" >> .gitignore
echo "*.cer" >> .gitignore
fi
## add *.pem to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.pem' ./.gitignore
then
echo "# .PEM Certificates" >> .gitignore
echo "*.pem" >> .gitignore
fi
echo
echo -e "\e[1;92mReady!\e[0m"
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"

View File

@ -0,0 +1,352 @@
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
parserOptions: { tsconfigRootDir: __dirname },
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
'parserOptions': {
'project': './tsconfig.json',
'ecmaVersion': 2018,
'sourceType': 'module'
},
rules: {
// Prevent usage of the JavaScript null value, while allowing code to access existing APIs that may require null. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/no-new-null': 1,
// Require Jest module mocking APIs to be called before any other statements in their code block. https://www.npmjs.com/package/@rushstack/eslint-plugin
'@rushstack/hoist-jest-mock': 1,
// Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime. https://www.npmjs.com/package/@rushstack/eslint-plugin-security
'@rushstack/security/no-unsafe-regexp': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/adjacent-overload-signatures': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
//
// CONFIGURATION: By default, these are banned: String, Boolean, Number, Object, Symbol
'@typescript-eslint/ban-types': [
1,
{
'extendDefaults': false,
'types': {
'String': {
'message': 'Use \'string\' instead',
'fixWith': 'string'
},
'Boolean': {
'message': 'Use \'boolean\' instead',
'fixWith': 'boolean'
},
'Number': {
'message': 'Use \'number\' instead',
'fixWith': 'number'
},
'Object': {
'message': 'Use \'object\' instead, or else define a proper TypeScript type:'
},
'Symbol': {
'message': 'Use \'symbol\' instead',
'fixWith': 'symbol'
},
'Function': {
'message': 'The \'Function\' type accepts any function-like value.\nIt provides no type safety when calling the function, which can be a common source of bugs.\nIt also accepts things like class declarations, which will throw at runtime as they will not be called with \'new\'.\nIf you are expecting the function to accept certain arguments, you should explicitly define the function shape.'
}
}
}
],
// RATIONALE: Code is more readable when the type of every variable is immediately obvious.
// Even if the compiler may be able to infer a type, this inference will be unavailable
// to a person who is reviewing a GitHub diff. This rule makes writing code harder,
// but writing code is a much less important activity than reading it.
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/explicit-function-return-type': [
1,
{
'allowExpressions': true,
'allowTypedFunctionExpressions': true,
'allowHigherOrderFunctions': false
}
],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: although this is a recommended rule, it is up to dev to select coding style.
// Set to 1 (warning) or 2 (error) to enable.
'@typescript-eslint/explicit-member-accessibility': 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-array-constructor': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
//
// RATIONALE: The "any" keyword disables static type checking, the main benefit of using TypeScript.
// This rule should be suppressed only in very special cases such as JSON.stringify()
// where the type really can be anything. Even if the type is flexible, another type
// may be more appropriate such as "unknown", "{}", or "Record<k,V>".
'@typescript-eslint/no-explicit-any': 1,
// RATIONALE: The #1 rule of promises is that every promise chain must be terminated by a catch()
// handler. Thus wherever a Promise arises, the code must either append a catch handler,
// or else return the object to a caller (who assumes this responsibility). Unterminated
// promise chains are a serious issue. Besides causing errors to be silently ignored,
// they can also cause a NodeJS process to terminate unexpectedly.
'@typescript-eslint/no-floating-promises': 2,
// RATIONALE: Catches a common coding mistake.
'@typescript-eslint/no-for-in-array': 2,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-misused-new': 2,
// RATIONALE: The "namespace" keyword is not recommended for organizing code because JavaScript lacks
// a "using" statement to traverse namespaces. Nested namespaces prevent certain bundler
// optimizations. If you are declaring loose functions/variables, it's better to make them
// static members of a class, since classes support property getters and their private
// members are accessible by unit tests. Also, the exercise of choosing a meaningful
// class name tends to produce more discoverable APIs: for example, search+replacing
// the function "reverse()" is likely to return many false matches, whereas if we always
// write "Text.reverse()" is more unique. For large scale organization, it's recommended
// to decompose your code into separate NPM packages, which ensures that component
// dependencies are tracked more conscientiously.
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-namespace': [
1,
{
'allowDeclarations': false,
'allowDefinitionFiles': false
}
],
// RATIONALE: Parameter properties provide a shorthand such as "constructor(public title: string)"
// that avoids the effort of declaring "title" as a field. This TypeScript feature makes
// code easier to write, but arguably sacrifices readability: In the notes for
// "@typescript-eslint/member-ordering" we pointed out that fields are central to
// a class's design, so we wouldn't want to bury them in a constructor signature
// just to save some typing.
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-parameter-properties': 0,
// RATIONALE: When left in shipping code, unused variables often indicate a mistake. Dead code
// may impact performance.
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-unused-vars': [
1,
{
'vars': 'all',
// Unused function arguments often indicate a mistake in JavaScript code. However in TypeScript code,
// the compiler catches most of those mistakes, and unused arguments are fairly common for type signatures
// that are overriding a base class method or implementing an interface.
'args': 'none'
}
],
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/no-use-before-define': [
2,
{
'functions': false,
'classes': true,
'variables': true,
'enums': true,
'typedefs': true
}
],
// Disallows require statements except in import statements.
// In other words, the use of forms such as var foo = require("foo") are banned. Instead use ES6 style imports or import foo = require("foo") imports.
'@typescript-eslint/no-var-requires': 'error',
// RATIONALE: The "module" keyword is deprecated except when describing legacy libraries.
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'@typescript-eslint/prefer-namespace-keyword': 1,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: it's up to developer to decide if he wants to add type annotations
// Set to 1 (warning) or 2 (error) to enable the rule
'@typescript-eslint/no-inferrable-types': 0,
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
// Rationale to disable: declaration of empty interfaces may be helpful for generic types scenarios
'@typescript-eslint/no-empty-interface': 0,
// RATIONALE: This rule warns if setters are defined without getters, which is probably a mistake.
'accessor-pairs': 1,
// RATIONALE: In TypeScript, if you write x["y"] instead of x.y, it disables type checking.
'dot-notation': [
1,
{
'allowPattern': '^_'
}
],
// RATIONALE: Catches code that is likely to be incorrect
'eqeqeq': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'for-direction': 1,
// RATIONALE: Catches a common coding mistake.
'guard-for-in': 2,
// RATIONALE: If you have more than 2,000 lines in a single source file, it's probably time
// to split up your code.
'max-lines': ['warn', { max: 2000 }],
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-async-promise-executor': 2,
// RATIONALE: Deprecated language feature.
'no-caller': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-compare-neg-zero': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-cond-assign': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-constant-condition': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-control-regex': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-debugger': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-delete-var': 2,
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-duplicate-case': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-character-class': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-empty-pattern': 1,
// RATIONALE: Eval is a security concern and a performance concern.
'no-eval': 1,
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-ex-assign': 2,
// RATIONALE: System types are global and should not be tampered with in a scalable code base.
// If two different libraries (or two versions of the same library) both try to modify
// a type, only one of them can win. Polyfills are acceptable because they implement
// a standardized interoperable contract, but polyfills are generally coded in plain
// JavaScript.
'no-extend-native': 1,
// Disallow unnecessary labels
'no-extra-label': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-fallthrough': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-func-assign': 1,
// RATIONALE: Catches a common coding mistake.
'no-implied-eval': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-invalid-regexp': 2,
// RATIONALE: Catches a common coding mistake.
'no-label-var': 2,
// RATIONALE: Eliminates redundant code.
'no-lone-blocks': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-misleading-character-class': 2,
// RATIONALE: Catches a common coding mistake.
'no-multi-str': 2,
// RATIONALE: It's generally a bad practice to call "new Thing()" without assigning the result to
// a variable. Either it's part of an awkward expression like "(new Thing()).doSomething()",
// or else implies that the constructor is doing nontrivial computations, which is often
// a poor class design.
'no-new': 1,
// RATIONALE: Obsolete language feature that is deprecated.
'no-new-func': 2,
// RATIONALE: Obsolete language feature that is deprecated.
'no-new-object': 2,
// RATIONALE: Obsolete notation.
'no-new-wrappers': 1,
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-octal': 2,
// RATIONALE: Catches code that is likely to be incorrect
'no-octal-escape': 2,
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-regex-spaces': 2,
// RATIONALE: Catches a common coding mistake.
'no-return-assign': 2,
// RATIONALE: Security risk.
'no-script-url': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-self-assign': 2,
// RATIONALE: Catches a common coding mistake.
'no-self-compare': 2,
// RATIONALE: This avoids statements such as "while (a = next(), a && a.length);" that use
// commas to create compound expressions. In general code is more readable if each
// step is split onto a separate line. This also makes it easier to set breakpoints
// in the debugger.
'no-sequences': 1,
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-shadow-restricted-names': 2,
// RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-sparse-arrays': 2,
// RATIONALE: Although in theory JavaScript allows any possible data type to be thrown as an exception,
// such flexibility adds pointless complexity, by requiring every catch block to test
// the type of the object that it receives. Whereas if catch blocks can always assume
// that their object implements the "Error" contract, then the code is simpler, and
// we generally get useful additional information like a call stack.
'no-throw-literal': 2,
// RATIONALE: Catches a common coding mistake.
'no-unmodified-loop-condition': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unsafe-finally': 2,
// RATIONALE: Catches a common coding mistake.
'no-unused-expressions': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-unused-labels': 1,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-useless-catch': 1,
// RATIONALE: Avoids a potential performance problem.
'no-useless-concat': 1,
// RATIONALE: The "var" keyword is deprecated because of its confusing "hoisting" behavior.
// Always use "let" or "const" instead.
//
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
'no-var': 2,
// RATIONALE: Generally not needed in modern code.
'no-void': 1,
// RATIONALE: Obsolete language feature that is deprecated.
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'no-with': 2,
// RATIONALE: Makes logic easier to understand, since constants always have a known value
// @typescript-eslint\eslint-plugin\dist\configs\eslint-recommended.js
'prefer-const': 1,
// RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
'promise/param-names': 2,
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-atomic-updates': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'require-yield': 1,
// "Use strict" is redundant when using the TypeScript compiler.
'strict': [
2,
'never'
],
// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
'use-isnan': 2,
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
// Set to 1 (warning) or 2 (error) to enable.
// Rationale to disable: !!{}
'no-extra-boolean-cast': 0,
// ====================================================================
// @microsoft/eslint-plugin-spfx
// ====================================================================
'@microsoft/spfx/import-requires-chunk-name': 1,
'@microsoft/spfx/no-require-ensure': 2,
'@microsoft/spfx/pair-react-dom-render-unmount': 1
}
},
{
// For unit tests, we can be a little bit less strict. The settings below revise the
// defaults specified in the extended configurations, as well as above.
files: [
// Test files
'*.test.ts',
'*.test.tsx',
'*.spec.ts',
'*.spec.tsx',
// Facebook convention
'**/__mocks__/*.ts',
'**/__mocks__/*.tsx',
'**/__tests__/*.ts',
'**/__tests__/*.tsx',
// Microsoft convention
'**/test/*.ts',
'**/test/*.tsx'
],
rules: {}
}
]
};

34
samples/react-dashboards/.gitignore vendored Normal file
View File

@ -0,0 +1,34 @@
# Logs
logs
*.log
npm-debug.log*
# Dependency directories
node_modules
# Build generated files
dist
lib
release
solution
temp
*.sppkg
.heft
# Coverage directory used by tools like istanbul
coverage
# OSX
.DS_Store
# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj
# Resx Generated Code
*.resx.ts
# Styles Generated Code
*.scss.ts

View File

@ -0,0 +1,4 @@
{
"MD013": false,
"MD034":false
}

View File

@ -0,0 +1,16 @@
!dist
config
gulpfile.js
release
src
temp
tsconfig.json
tslint.json
*.log
.yo-rc.json
.vscode

View File

@ -0,0 +1,21 @@
{
"@microsoft/generator-sharepoint": {
"packageManager": "pnpm",
"plusBeta": false,
"isCreatingSolution": false,
"nodeVersion": "16.14.2",
"sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.4.1"
},
"version": "1.16.1",
"libraryName": "spfx-applicationinsights",
"libraryId": "09af0554-67db-4a65-baa6-872dee7117a8",
"environment": "spo",
"solutionName": "spfx-applicationinsights",
"solutionShortDescription": "spfx-applicationinsights description",
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"componentType": "webpart"
}
}

View File

@ -0,0 +1,208 @@
# Application Insights and Cost Management Dashboards
## Summary
Sharing Application Insights and solution's cost information with your stakeholders typically requires either using _Azure Dashboards_ or using _Power BI_. This sample solution allows displaying this dashboards directly in a SharePoint site or a tab in MS Teams, moving it close to the users.
This solution consists of two web parts:
- **Application Insights** executes Kusto query against the Application Insights service in your Azure tenant
![Application insights](./assets/AppInsights.png)
- **Cost Insights** queries the usage data for the specified scope (management group, subscription, resource group)
![Cost Insights](./assets/CostInsights.png)
## Compatibility
This sample is optimally compatible with the following environment configuration:
![SPFx 1.16.1](https://img.shields.io/badge/SPFx-1.16.1-green.svg)
![Node.js v16 | v14 | v12](https://img.shields.io/badge/Node.js-v16%20%7C%20v14%20%7C%20v12-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
## Applies to
- [SharePoint Framework](https://aka.ms/spfx)
- [Microsoft 365 tenant](https://docs.microsoft.com//sharepoint/dev/spfx/set-up-your-developer-tenant)
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram)
## Authors
* [Kinga Kazala](https://github.com/kkazala)
## Version history
| Version | Date | Comments |
| ------- | ---------------- | --------------- |
| 1.0 | May 30, 2023 | Initial release |
## Prerequisites
- Azure tenant
- Application Insights resource (for Application Insights web part)
- Read access to Cost Management data (for Cost Insights web part), see **Required access to view data** in the [Azure EA subscription scopes](https://learn.microsoft.com//azure/cost-management-billing/costs/assign-access-acm-data#azure-ea-subscription-scopes) table
- SharePoint Administrator or Global Administrator to install the solution
- Global Administrator permissions to approve required API access:
- Windows Azure Service Management API: user_impersonation
- Application Insights API: user_impersonation
## Minimal Path to Awesome
- Clone this repository
- Ensure that you are at the solution folder
- to debug, in the command-line run:
- `npm install` / `pnpm install`
- `gulp serve --nobrowser`
- to deploy, in the command-line run:
- `gulp bundle --ship`
- `gulp package-solution --ship`
## Configuration
### API Connection
Configuration dashboard allows defining connection settings.
**Application Insights** requires **Application ID**, which you may find by navigating to **Application Insights** / **API Access** (Configure group)
**Cost Management** access may be **scoped** to a management group, subscription and resource group.
Both APIs are accessed using **user impersonation**.
![Edit API Connection](./assets/EditApiConnection.png)
> **Optionally**, and for **Application Insights only**, you may enable access with Application ID and Key. To do so, open the web part properties panel and in the Developer Settings section, enable authentication with ApiKey and AppId:
>
> ![Enable access with API Key](./assets/EnableApiKey.png)
### Kusto Query / Cost Query
Both web parts have example queries that you may use to test the solution, or to treat as a starting point for defining your own queries.
![EditQuery](./assets/EditQuery.gif)
**Application Insights logs** are retrieved using the **Application Insights API** and your custom Kusto query.
In case you want to refer to the _time range_ defined in the web part, type `{TimeRange:start}` in the Kusto query:
![Time Range](./assets/TimeRange.png)
> Please **test** your query using either [Application Insights / Query - Get](https://learn.microsoft.com//rest/api/application-insights/query/get?tabs=HTTP#code-0) or query editor in Azure portal (Application Insights / Logs) to ensure the query is correct. Some expression you may use in Workspaces will not work in Application Insights Logs API and therefore, will also fail when executed using this web part.
**Cost information** is retrieved using the **Cost Management Usage API** and your custom JSON request. Please test it using [Cost Management / Query - Usage](https://learn.microsoft.com//rest/api/cost-management/query/usage?tabs=HTTP#code-try-0)
### Rendering results
Results may be displayed in a **table**, a **chart**, or **both**.
Table may be optionally formatted as a **heatmap**, chart supports _line chart_, _area chart_, _bar chart_, _column chart_ and _pie chart_ styles.
![Edit layout](./assets/EditLayout.gif)
Colors may be changed to either SharePoint theme's accent colors, or gradient colors using one of the SharePoint accents.
![Edit colors and chart type](./assets/EditColors.gif)
Chart is rendered using [Chart Control](https://pnp.github.io/sp-dev-fx-controls-react/controls/ChartControl/) with dependency on `chart.js 2.9.4`. Labels and data series are detected based on the data types, e.g. _datetime_, _string_ or _number_; currently there is no option to define custom data mappings.
### Authentication
User impersonation is executed using [AadHttpClient](https://learn.microsoft.com//sharepoint/dev/spfx/use-aadhttpclient). To call the APIs, the solution requires the following **Application** API permissions:
- Windows Azure Service Management API: user_impersonation
- Application Insights API: user_impersonation
These permissions will be requested automatically once the solution is deployed, and must be granted by a Global Admin using [API access](https://yoursharepoint-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx#/webApiPermissionManagement) page in SharePoint Administration
Authentication with `Application ID` and `API key` is also allowed for Application Insights dashboard (see _Api Connection_ above)
### Caching
`PnPClientStorage` is used to cache query results in local storage to avoid [throttling](https://learn.microsoft.com//azure/azure-resource-manager/management/request-limits-and-throttling). This is especially important when querying cost management APIs (see more information below).
By default, caching duration is set to:
- **15 minutes** for **Application Insights Dashboard**, and
- **1 day** for **Cost Insights Dashboard**
Cache duration for **Application Insights Dashboard** may be extended or disabled using web part properties panel. In case you want to delete the cache manually, the key names for this solution start with **spfxDashboard**.
## Accessing Application Insights Data
To query Application Insights using the Application Insights Data Access API, you must **authenticate**:
- To query your workspaces, use Azure Active Directory (Azure AD) authentication.
- To quickly explore the API without using Azure AD authentication, you can use an API key to query sample data in a non-production environment. You may try it here [here](https://learn.microsoft.com/rest/api/application-insights/query/get?tabs=HTTP#code-0), by adding **x-api-key** header set to **ApiKey** value
The Log Analytics API supports Azure AD authentication with three different Azure AD OAuth2 flows: authorization code, **implicit**, client credentials.
Client-side applications that are incapable of storing a secret, such as SharePoint Framework solutions, use **OAuth implicit flow**. In SharePoint Framework solutions, authorization by using the OAuth implicit flow is done as part of the framework through MSGraphClient and AadHttpClient, both of which are introduced in SharePoint Framework v1.4.1.
Developers building a SharePoint Framework solution that requires access to specific resources secured with Azure AD list these resources along with the required permission scopes in the solution manifest. When deploying the solution package to the app catalog, SharePoint creates permission requests and prompts the administrator to manage the requested permissions. For each requested permission, a **global administrator** can decide whether they want to grant or deny the specific permission.
All permissions are granted to the whole tenant and not to a specific application that has requested them. When the administrator grants a specific permission, its added to the SharePoint Online Client Extensibility Azure AD application, which is provisioned by Microsoft in every Azure AD and which is used by the SharePoint Framework in the OAuth flow to provide solutions with valid access tokens.
## References
### Application Insights
- [Application Insights overview](https://learn.microsoft.com//azure/azure-monitor/app/app-insights-overview)
- [Application Insights API](https://learn.microsoft.com//rest/api/application-insights/)
- [Application Insights demo data](https://aka.ms/AIAnalyticsDemo)
- [KQL quick reference](https://learn.microsoft.com//azure/data-explorer/kql-quick-reference)
-[Fun With KQL Variants Of Project](https://arcanecode.com/2022/06/06/fun-with-kql-variants-of-project/)
- [Resources, roles, and access control in Application Insights](https://learn.microsoft.com//azure/azure-monitor/app/resources-roles-access-control) - Assign access to users in the resource group or subscription to which your application resource belongs, not in the resource itself.
### Cost Management
- [Cost Management API](https://learn.microsoft.com//rest/api/cost-management/)
- [Cost Management Dimensions](https://learn.microsoft.com//rest/api/cost-management/dimensions/list?tabs=HTTP#code-try-0)
- [How to optimize your cloud investment with Cost Management](https://learn.microsoft.com//azure/cost-management-billing/costs/cost-mgt-best-practices)
- [Retrieve large cost datasets recurringly with exports](https://learn.microsoft.com//azure/cost-management-billing/costs/ingest-azure-usage-at-scale)
- [Manage costs with automation](https://learn.microsoft.com//azure/cost-management-billing/costs/manage-automation
)
>If you want to get the latest cost data, query at most once per day. Reports are refreshed every four hours. If you call more frequently, you'll receive identical data.
>The data in Usage Details is provided on a per meter basis, per day.
>
>If you want to get large amounts of exported data regularly, see [Retrieve large cost datasets recurringly with exports](https://learn.microsoft.com//azure/cost-management-billing/costs/ingest-azure-usage-at-scale).
>
>
>If you have scopes with a large amount of usage data (for example a Billing Account), consider placing multiple calls to child scopes so you get more manageable files that you can download. If your dataset is more than 2 GB month-to-month, consider using exports as a more scalable solution.
### Using Azure APIs
- [Connect to Azure AD-secured APIs in SharePoint Framework solutions](https://learn.microsoft.com//sharepoint/dev/spfx/use-aadhttpclient)
- [Application IDs of commonly used Microsoft applications](https://learn.microsoft.com//troubleshoot/azure/active-directory/verify-first-party-apps-sign-in#application-ids-of-commonly-used-microsoft-applications)
- [Throttling](https://learn.microsoft.com//azure/azure-resource-manager/management/request-limits-and-throttling) - The resource provider requests are also throttled per principal user ID and per hour.
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development
#### Used Application API
- `f5c26e74-f226-4ae8-85f0-b4af0080ac9e` Application Insights API
- `797f4846-ba00-4fd7-ba43-dac1f8f63013` Windows Azure Service Management API
## Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment.
You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3A%22sample%3A%20react-dashboards%22) to see if anybody else is having the same issues.
You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-webparts/discussions?discussions_q=react-dashboards) and see what the community is saying.
If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-dashboards&template=bug-report.yml&sample=react-dashboards&authors=@kkazala&title=react-dashboards%20-%20).
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-dashboards&template=question.yml&sample=react-dashboards&authors=@kkazala&title=react-dashboards%20-%20).
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-dashboards&template=suggestion.yml&sample=react-dashboards&authors=@kkazala&title=react-dashboards%20-%20).
## Disclaimer
**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-dashboards" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,50 @@
[
{
"name": "pnp-sp-dev-spfx-web-parts-react-dashboards",
"source": "pnp",
"title": "Application Insights and Cost Management Dashboards",
"shortDescription": "Sharing Application Insights and solution's cost information with your stakeholders typically requires either using _Azure Dashboards_ or using _Power BI_. This sample solution allows displaying this dashboards directly in a SharePoint site or a tab in MS Teams, moving it close to the users.",
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-dashboards",
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-dashboards",
"longDescription": [
"Sharing Application Insights and solution's cost information with your stakeholders typically requires either using _Azure Dashboards_ or using _Power BI_. This sample solution allows displaying this dashboards directly in a SharePoint site or a tab in MS Teams, moving it close to the users."
],
"creationDateTime": "2023-06-05",
"updateDateTime": "2023-06-05",
"products": [
"SharePoint"
],
"metadata": [
{
"key": "CLIENT-SIDE-DEV",
"value": "React"
},
{
"key": "SPFX-VERSION",
"value": "1.16.1"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-dashboards/assets/AppInsights.png",
"alt": "Web Part Preview"
}
],
"authors": [
{
"gitHubAccount": "kkazala",
"pictureUrl": "https://github.com/kkazala.png",
"name": "Kinga Kazala"
}
],
"references": [
{
"name": "Build your first SharePoint client-side web part",
"description": "Client-side web parts are client-side components that run in the context of a SharePoint page. Client-side web parts can be deployed to SharePoint environments that support the SharePoint Framework. You can also use modern JavaScript web frameworks, tools, and libraries to build them.",
"url": "https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part"
}
]
}
]

View File

@ -0,0 +1,30 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
"version": "2.0",
"bundles": {
"application-insights-dashboard-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/applicationInsightsLogs/ApplicationInsightsLogsWebPart.js",
"manifest": "./src/webparts/applicationInsightsLogs/ApplicationInsightsLogsWebPart.manifest.json"
}
]
},
"cost-insights-dashboard-web-part": {
"components": [
{
"entrypoint": "./lib/webparts/costInsightsDashboard/CostInsightsDashboardWebPart.js",
"manifest": "./src/webparts/costInsightsDashboard/CostInsightsDashboardWebPart.manifest.json"
}
]
}
},
"externals": {},
"localizedResources": {
"ControlStrings": "node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js",
"CommonDasboardWebPartStrings": "lib/loc/{locale}.js",
"AppInsightsDasboardWebPartStrings": "lib/webparts/applicationInsightsLogs/loc/{locale}.js",
"CostInsightsWebPartStrings": "lib/webparts/costInsightsDashboard/loc/{locale}.js",
"ApplicationInsightsMetricsWebPartStrings": "lib/webparts/applicationInsightsMetrics/loc/{locale}.js"
}
}

View File

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

View File

@ -0,0 +1,66 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "Application Insights and Cost Management dashboards",
"id": "09af0554-67db-4a65-baa6-872dee7117a8",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"webApiPermissionRequests": [
{
"resource": "Windows Azure Service Management API",
"scope": "user_impersonation"
},
{
"resource": "Application Insights API",
"scope": "user_impersonation"
}
// {
// "resource": "Microsoft Graph", //Microsoft Graph
// "scope": "user_impersonation"
// },
// {
// "resource": "Office 365 SharePoint Online", //Office 365 SharePoint Online
// "scope": "user_impersonation"
// }
],
"developer": {
"name": "Kinga Kazala (ETHZ)",
"websiteUrl": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"mpnId": "Undefined-1.16.1"
},
"metadata": {
"shortDescription": {
"default": "Display data and charts from Application Insights and Cost Management"
},
"longDescription": {
"default": "Display data and charts from Application Insights and Cost Management. \n\n The solution uses REST API endpoints: \n\n - Application Insights: https://learn.microsoft.com/en-us/rest/api/application-insights/query/get \n\n - Cost Management: https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage"
},
"screenshotPaths": [
"assets/Cost.png",
"assets/OperationsPerformance.png",
"assets/PagesViews.png",
"assets/PagesViewTrend.png",
"assets/EditKusto.png"
],
"videoUrl": ""
},
"features": [
{
"title": "SPFx ApplicationInsights and Cost Management Dashboards Feature",
"description": "The feature that activates elements of the spfx-applicationinsights solution.",
"id": "b3316c57-f3f8-4d2b-9b95-7250831dc33f",
"version": "1.0.0.0"
}
],
"supportedLocales": [
"en-us"
]
},
"paths": {
"zippedPackage": "solution/spfx-applicationinsights.sppkg"
}
}

View File

@ -0,0 +1,3 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}

View File

@ -0,0 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json",
"port": 4321,
"https": true,
"initialPage": "https://enter-your-SharePoint-site/_layouts/workbench.aspx"
}

View File

@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": "<!-- PATH TO CDN -->"
}

16
samples/react-dashboards/gulpfile.js vendored Normal file
View File

@ -0,0 +1,16 @@
'use strict';
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.`);
var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
var result = getTasks.call(build.rig);
result.set('serve', result.get('serve-deprecated'));
return result;
};
build.initialize(require('gulp'));

View File

@ -0,0 +1,52 @@
{
"name": "spfx-applicationinsights",
"version": "1.0.0",
"private": true,
"engines": {
"node": ">=16.13.0 <17.0.0"
},
"main": "lib/index.js",
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},
"dependencies": {
"@fluentui/react": "^8.106.5",
"@fluentui/react-hooks": "^8.6.16",
"@microsoft/sp-component-base": "1.16.1",
"@microsoft/sp-core-library": "1.16.1",
"@microsoft/sp-http": "1.16.1",
"@microsoft/sp-lodash-subset": "1.16.1",
"@microsoft/sp-office-ui-fabric-core": "1.16.1",
"@microsoft/sp-property-pane": "1.16.1",
"@microsoft/sp-webpart-base": "1.16.1",
"@pnp/core": "^3.13.0",
"@pnp/logging": "^3.13.0",
"@pnp/spfx-controls-react": "^3.12.0",
"@pnp/telemetry-js": "^2.0.0",
"chart.js": "2.9.4",
"color": "4.2.3",
"moment": "^2.29.4",
"react": "17.0.1",
"react-dom": "17.0.1",
"tslib": "2.3.1"
},
"devDependencies": {
"@microsoft/eslint-config-spfx": "1.16.1",
"@microsoft/eslint-plugin-spfx": "1.16.1",
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
"@microsoft/sp-build-web": "1.16.1",
"@microsoft/sp-module-interfaces": "1.16.1",
"@rushstack/eslint-config": "2.5.1",
"@types/chart.js": "2.9.37",
"@types/color": "^3.0.3",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5",
"eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2",
"typescript": "4.5.5"
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

View File

@ -0,0 +1,132 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
interface colInfo {
name: string;
type: string;
}
interface responseBody {
columns: colInfo[];
rows: any[];
}
interface IApiResponseError {
code: string;
message?: string;
innererror?: {
code: string;
message: string;
innererror: {
line: number;
message: string;
pos: number;
token: string;
}
}
}
export interface IResponseJson {
error?: IApiResponseError
tables: any[],
columns: Map<string, string>
}
export interface ICostMngmtResponseJson {
properties?: {
columns: [],
rows: [],
// nextLink: string
}
error?: {
code: string;
message: string;
}
}
export interface IAppInsightsResponseJson {
tables: {
columns: [],
rows: [],
// nextLink: string
}[],
error?: IApiResponseError
}
export default class ApiHelper {
private static parseColumns = (responseColumns: any, colRenames?: Map<string, string>): string[] => {
const columns = responseColumns.reduce((acc: any, currVal: colInfo) => {
if (colRenames?.has(currVal.name)) {
acc.push(colRenames.get(currVal.name));
}
else {
acc.push(currVal.name);
}
return acc;
}, []);
return columns;
}
//suport for data types returned Application Insights API and Cost Management API
public static get NumericTypes(): string[] {
return ['int', 'long', 'real', 'decimal', 'Number'];
}
public static get StringTypes(): string[] {
return ['string', 'String'];
}
public static get DateTimeTypes(): string[] {
return ['datetime'];
}
public static IsNumericalType = (type: string): boolean => {
return ApiHelper.NumericTypes.includes(type);
}
public static IsStringType = (type: string): boolean => {
return ApiHelper.StringTypes.includes(type);
}
public static IsDateTimeType = (type: string): boolean => {
return ApiHelper.DateTimeTypes.includes(type);
}
public static GetParsedResponse = <T>(response: { body: responseBody, error: any }, colRenames?: Map<string, string>): IResponseJson => {
if (response.error) {
return {
error: response.error,
tables: [],
columns: new Map()
}
}
else if (response.body) {
return ApiHelper.ParseResponse<T>(response.body, colRenames);
}
}
public static ParseResponse = <T>(responseBody: responseBody, colRenames?: Map<string, string>): IResponseJson => {
const response: IResponseJson = {
tables: [],
columns: new Map()
}
const columns = ApiHelper.parseColumns(responseBody.columns, colRenames)
response.tables = responseBody.rows.reduce((acc: any[], currRow: []) => {
const v: Map<string, any> = new Map();
for (let i = 0; i < columns.length; ++i) {
v.set(columns[i], currRow[i]);
}
acc.push(Object.fromEntries<T>(v));
return acc;
}, []);
response.columns = responseBody.columns.reduce((acc: any, currVal: colInfo) => {
if (colRenames?.has(currVal.name)) {
acc.set(colRenames.get(currVal.name), currVal.type);
}
else {
acc.set(currVal.name, currVal.type);
}
return acc;
}, new Map<string, string>());
return response;
}
public static GetColByType = (colInfo: Map<string, string>, type: string): string[] => {
return [...colInfo.entries()]
.filter(({ 1: v }) => { return (v === type); })
.map(([k]) => k);
}
public static GetColByTypes = (colInfo: Map<string, string>, type: string[]): string[] => {
return [...colInfo.entries()]
.filter(({ 1: v }) => { return (type.includes(v)); })
.map(([k]) => k);
}
}

View File

@ -0,0 +1,93 @@
import { PnPClientStorage } from "@pnp/core";
import moment from "moment";
import { IResponseJson } from "./ApiHelper";
import { CacheExpiration } from "./CommonProps";
export interface DropDownOption {
key: number;
text: string;
}
export interface QueryPreset extends DropDownOption {
description: string;
query: string;
columnsOrdering?: string[];
sortby?: string;
}
export default class ApiQueryHelper {
protected static queries: QueryPreset[];
public static get Queries(): DropDownOption[] {
return this.queries;
}
public static get Presets(): QueryPreset[] {
return this.queries;
}
public static GetQueryById(key: number): QueryPreset {
return this.queries.find((q) => q.key === key);
}
public static GetSanitisedQuery = (query: string): string => {
return query
.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, '')
.replace(/\s+/gm, ' ');
}
public static GetHash(str: string): string {
let hash = 0, i, chr;
if (str.length === 0) return hash.toString();
for (i = 0; i < str.length; i++) {
chr = str.charCodeAt(i);
hash = ((hash << 5) - hash) + chr;
hash |= 0; // Convert to 32bit integer
}
return `spfxDashboard_${hash.toString()}`;
}
public static GetCachedResponse = (hash: string): IResponseJson => {
const pnpStorage = new PnPClientStorage();
pnpStorage.local
.deleteExpired()
.catch((e) => console.log(e));
const lastResponseT = pnpStorage.local.get(`${hash}_data`);
const lastResponseC = JSON.parse(pnpStorage.local.get(`${hash}_columns`));
if (lastResponseT && lastResponseC) {
return {
tables: lastResponseT,
columns: new Map(Object.entries(lastResponseC))
};
}
return null;
}
public static SaveCachedResponse(hash: string, response: IResponseJson, cacheExpiration: CacheExpiration): void {
//By default, the local cache size is 1 GB.
const pnpStorage = new PnPClientStorage();
const expiry = ApiQueryHelper.getExpirationDate(cacheExpiration);
if (expiry) {
pnpStorage.local.put(
`${hash}_data`,
response.tables,
expiry
);
pnpStorage.local.put(
`${hash}_columns`,
JSON.stringify(Object.fromEntries(response.columns)),
expiry
);
}
}
private static getExpirationDate(expiration: string): Date {
const key = CacheExpiration[expiration as keyof typeof CacheExpiration]
switch (key) {
case CacheExpiration.FifteenMinutes:
return moment().add(15, 'minutes').toDate();
case CacheExpiration.OneHour:
return moment().add(1, 'hour').toDate();
case CacheExpiration.OneDay:
return moment().endOf('day').toDate()
default:
return null;
}
}
}

View File

@ -0,0 +1,166 @@
import { AadHttpClient, AadHttpClientFactory, HttpClient, HttpClientResponse, IHttpClientOptions } from "@microsoft/sp-http";
import ApiHelper, { IAppInsightsResponseJson, IResponseJson } from "./ApiHelper";
import ApiQueryHelper from "./ApiQueryHelper";
import { AppInsightsQueryHelper } from "./AppInsightsQueryHelper";
import { AppInsightsEndpointType, AppInsights_AuthSSO, CacheExpiration, IAppInsightsConfig, IAppInsightsQuery, ICacheConfig } from "./CommonProps";
export class AppInsightsHelperSSO {
private _postUrl: string = '';
private requestHeaders: Headers = new Headers();
private httpClientOptions: IHttpClientOptions = {};
private aadHttpClientFactory: AadHttpClientFactory = null;
private spfxSpoApiConnectClient: AadHttpClient = null;
private endpointType: AppInsightsEndpointType;
private cacheDuration: CacheExpiration;
private cacheKey: string;
constructor(config: AppInsights_AuthSSO, cache: ICacheConfig,) {
this.aadHttpClientFactory = config.aadHttpClientFactory;
this._postUrl = AppInsightsQueryHelper.GetAPIEndpoint(config.appId, config.endpoint);
this.requestHeaders.append("Content-type", "application/json; charset=utf-8");
this.httpClientOptions = { headers: this.requestHeaders };
this.endpointType = config.endpoint;
this.cacheDuration = cache.cacheDuration;
this.cacheKey = `${config.appId}-${cache.userLoginName}`
}
public GetAPIResponse = async (config: IAppInsightsQuery): Promise<IResponseJson> => {
const urlQuery = (AppInsightsEndpointType[this.endpointType as keyof typeof AppInsightsEndpointType] === AppInsightsEndpointType.query)
? `query=${AppInsightsQueryHelper.GetUrlQuery(config.query, config.dateSelection)}`
: AppInsightsQueryHelper.GetUrlQuery(config.query, config.dateSelection)
const requestHash = ApiQueryHelper.GetHash(`${this.cacheKey}-${urlQuery}`);//TODO: this.cacheKey
const cacheEnabled = CacheExpiration[this.cacheDuration.toString() as keyof typeof CacheExpiration] !== CacheExpiration.Disabled;
if (cacheEnabled) {
const lastResponse = ApiQueryHelper.GetCachedResponse(requestHash);
if (lastResponse) {
console.info("AppInsightsHelper: Using cached response")
return lastResponse;
}
}
//if cache disabled or no cached response, get live response
try {
console.info("AppInsightsHelper: Using live response")
await this.init();
const response = await this.getParsedResponse(urlQuery);
if (response && !response.error && cacheEnabled) {
console.info("AppInsightsHelper: Saving response to cache")
ApiQueryHelper.SaveCachedResponse(
requestHash,
response,
this.cacheDuration);//expiration at end of day
}
return response;
} catch (error) {
console.error(error);
}
}
public GetGroupBy = (query: string): string[] => {
return [];
}
private init = async (): Promise<void> => {
return await this.aadHttpClientFactory
.getClient(AppInsightsQueryHelper.ClientId)
.then((client: AadHttpClient): void => {
this.spfxSpoApiConnectClient = client;
})
.catch(err => {
console.error(err)
});
}
private getParsedResponse = async<T>(urlQuery: string, colRenames?: Map<string, string>): Promise<IResponseJson> => {
const response = await this.spfxSpoApiConnectClient.get(`${this._postUrl}${urlQuery}`, AadHttpClient.configurations.v1, this.httpClientOptions);
const responseJson: IAppInsightsResponseJson = await response.json();
return ApiHelper.GetParsedResponse<T>(
{
body: responseJson.tables
? responseJson.tables[0]
: { columns: [], rows: [] },
error: responseJson.error
},
colRenames);
}
}
export default class AppInsightsHelper {
private _postUrl: string = "";
private requestHeaders: Headers = new Headers();
private httpClientOptions: IHttpClientOptions = {};
private httpClient: HttpClient = null;
private endpointType: AppInsightsEndpointType;
private cacheDuration: CacheExpiration;
private cacheKey: string;
constructor(config: IAppInsightsConfig, cache: ICacheConfig, httpclient: HttpClient) {
this.httpClient = httpclient;
this._postUrl = AppInsightsQueryHelper.GetAPIEndpoint(config.appId, config.endpoint);
this.requestHeaders.append("Content-type", "application/json; charset=utf-8");
this.requestHeaders.append("x-api-key", config.appKey);
this.httpClientOptions = { headers: this.requestHeaders };
this.endpointType = config.endpoint;
this.cacheDuration = cache.cacheDuration;
this.cacheKey = `${config.appId}-${config.appKey}`
}
public GetAPIResponse = async (config: IAppInsightsQuery): Promise<IResponseJson> => {
const urlQuery = (AppInsightsEndpointType[this.endpointType as keyof typeof AppInsightsEndpointType] === AppInsightsEndpointType.query)
? `query=${AppInsightsQueryHelper.GetUrlQuery(config.query, config.dateSelection)}`
: AppInsightsQueryHelper.GetUrlQuery(config.query, config.dateSelection)
const requestHash = ApiQueryHelper.GetHash(`${this.cacheKey}-${urlQuery}`);
const cacheEnabled = CacheExpiration[this.cacheDuration.toString() as keyof typeof CacheExpiration] !== CacheExpiration.Disabled;
if (cacheEnabled) {
const lastResponse = ApiQueryHelper.GetCachedResponse(requestHash);
if (lastResponse) {
console.info("AppInsightsHelper: Using cached response")
return lastResponse;
}
}
//if cache disabled or no cached response, get live response
try {
console.info("AppInsightsHelper: Using live response")
const response = await this.getParsedResponse(`${this._postUrl}${urlQuery}`);
if (response && !response.error && cacheEnabled) {
console.info("AppInsightsHelper: Saving response to cache")
ApiQueryHelper.SaveCachedResponse(
requestHash,
response,
this.cacheDuration)
}
return response;
} catch (error) {
console.error(error);
}
}
public GetGroupBy = (query: string): string[] => {
return [];
}
private getParsedResponse = async<T>(urlQuery: string, colRenames?: Map<string, string>): Promise<IResponseJson> => {
const response: HttpClientResponse = await this.httpClient.get(urlQuery, HttpClient.configurations.v1, this.httpClientOptions);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const responseJson: IAppInsightsResponseJson = await response.json();
return ApiHelper.GetParsedResponse<T>(
{
body: responseJson.tables
? responseJson.tables[0]
: { columns: [], rows: [] },
error: responseJson.error
},
colRenames);
};
}

View File

@ -0,0 +1,162 @@
import moment from "moment";
import ApiQueryHelper, { QueryPreset } from "./ApiQueryHelper";
import { ChartStyles } from "./DashboardHelper";
import TimeHelper from "./TimeHelper";
enum TimeSpanKusto {
"PT1H" = "1h",
"PT6H" = "6h",
"PT12H" = "12h",
"P1D" = "1d",
"P3D" = "3d",
"P7D" = "7d",
"P15D" = "15d",
"P30D" = "30d",
"P45D" = "45d",
"P60D" = "60d",
"P75D" = "75d",
"P90D" = "90d"
}
export interface ChartConfig {
chartStyle: ChartStyles;
settings: string;
isSupported: boolean;
}
class AppInsightsQueryHelper extends ApiQueryHelper {
public static get ClientId(): string {
return "https://api.applicationinsights.io";
}
public static GetUrlQuery = (query: string, dateSpan: string): string => {
const _setTimeRange = (query: string, dateSpan: string): string => {
if (dateSpan.includes('-')) {
const dates: string[] = dateSpan.split('-')
.map(dt => {
return `"${TimeHelper.getQueryDateFormat(moment(Number(dt)).utc().format())}"`;
})
return query.replaceAll('{TimeRange:start}', dates[0]).replaceAll('{TimeRange:end}', dates[1]);
}
else {
const start = `ago(${AppInsightsQueryHelper.GetKustoTime(dateSpan)})`;
const end = 'now()';
return query.replaceAll('{TimeRange:start}', start).replaceAll('{TimeRange:end}', end);
}
}
const queryParam = encodeURIComponent(
_setTimeRange(
AppInsightsQueryHelper.GetSanitisedQuery(query),
dateSpan)
);
const timeStamp = dateSpan.includes('-')
? dateSpan.split('-')
.map(dt => {
return moment(Number(dt)).format('YYYY-MM-DDThh:mm:ss')
})
.join('/')
: dateSpan
return (query.indexOf('where timestamp') > 0)
? `${queryParam}`
: `${queryParam}&timespan=${timeStamp}`;
}
public static GetKustoTime = (dateSpan: string): string => {
return TimeSpanKusto[dateSpan as keyof typeof TimeSpanKusto]
}
public static GetChartConfig = (query: string): ChartConfig => {
const regexObj = /render(\s)+(?<vis>\S+)((\s)+with(\s)+\((?<settings>[^)]+))*/g
const found = regexObj.exec(
AppInsightsQueryHelper.GetSanitisedQuery(query)
);
const chartName = found?.groups?.vis ?? "";
return {
chartStyle: ChartStyles[chartName as keyof typeof ChartStyles] ?? null,
settings: found?.groups?.settings ?? "",
isSupported: Object.keys(ChartStyles).includes(chartName)
}
}
public static GetAPIEndpoint = (appId: string, dataEndpoint: string): string => {
return `${AppInsightsQueryHelper.ClientId}/v1/apps/${appId ?? '____'}/${dataEndpoint}?`
}
public static IsConfigValid = (isDevMode: boolean, appId: string, appKey?: string): boolean => {
return isDevMode
? appId !== "" && appKey !== ""
: appId !== ""
}
}
class AppInsightsQueryLogsHelper extends AppInsightsQueryHelper {
private static empty: QueryPreset = {
key: 100,
text: "---",
description: "Write your custom Kusto query",
query: "",
};
private static pageViewsTrend: QueryPreset = {
key: 1,
text: "Page views trend",
description: "Chart the page views count",
query: `pageViews
| where client_Type == 'Browser'
| summarize pageViews = sum(itemCount) by bin(timestamp,30m)
| sort by timestamp asc
| render linechart
`,
};
private static slowestPages: QueryPreset = {
key: 2,
text: "Slowest pages",
description: "What are the 3 slowest pages, and how slow are they? ",
query: `pageViews
| where notempty(duration) and client_Type == 'Browser'
| extend total_duration=duration*itemCount
| summarize avgDuration=(sum(total_duration)/sum(itemCount)) by operation_Name
| top 3 by avgDuration desc
`,
};
private static operationsPerformance: QueryPreset = {
key: 3,
text: "Operations performance ",
description: "Calculate request count and duration by operations. ",
query: `requests
| summarize RequestsCount=sum(itemCount), AverageDuration=avg(duration), percentiles(duration, 50, 95, 99) by operation_Name // you can replace 'operation_Name' with another value to segment by a different property
| order by RequestsCount desc // order from highest to lower (descending)`,
};
private static pageViewsHeatmap: QueryPreset = {
key: 4,
text: "Page views heatmap",
description: "Display page views heatmap per calendarweek",
query: `let start = startofweek({TimeRange:start});
let end= endofweek({TimeRange:end});
let dow = dynamic(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]);
pageViews
| where timestamp >= start
| where client_Type == 'Browser'
| make-series Metric=sum(itemCount) default=0 on timestamp in range(start, end, 1d)
| mvexpand timestamp to typeof(datetime), Metric to typeof(long)
| extend WeekDay = toint(dayofweek(timestamp) / 1d), KW=week_of_year(timestamp)
| extend WeekDayName=tostring(dow[WeekDay])
| order by timestamp asc
| project-away timestamp,WeekDay
| evaluate pivot(WeekDayName, sum(Metric))
| project tostring(KW),column_ifexists("Mon",""),column_ifexists("Tue",""),column_ifexists("Wed",""),column_ifexists("Thu",""),column_ifexists("Fri",""),column_ifexists("Sat",""),column_ifexists("Sun","")`,
};
protected static override queries: QueryPreset[] = [this.empty, this.pageViewsTrend, this.slowestPages, this.operationsPerformance, this.pageViewsHeatmap];
}
export { AppInsightsQueryHelper, AppInsightsQueryLogsHelper };

View File

@ -0,0 +1,231 @@
import { ChartLegendOptions, ChartOptions, ChartXAxe, TickOptions, TimeUnit } from "chart.js";
import ChartHelper from "./ChartHelper";
//#region DataSetStylesConfig
const dataSetPropStyle_Line = {
lineTension: 0,
borderWidth: 1
}
const dataSetPropStyle_Bar = {
barThickness: 'flex',
}
const dataSetPropStyle_BarTime = {
barThickness: 'flex',
maxBarThickness: 10,
minBarLength: 2,
}
const dataSetPropStyle_Pie = {
}
const dataSetPropStyle_None = {
}
const DataSetStylesConfig = {
Line: dataSetPropStyle_Line,
Bar: dataSetPropStyle_Bar,
BarTime: dataSetPropStyle_BarTime,
Pie: dataSetPropStyle_Pie,
None: dataSetPropStyle_None
}
//#endregion
//#region ChartOptionsConfig
const legendOptions: ChartLegendOptions = {
display: true,
position: 'bottom',
labels: {
usePointStyle: true,
boxWidth: 5,
},
onClick: () => { return false; }, // disable legend onClick functionality that filters datasets
}
const timeAxeConfig: ChartXAxe = {
type: "time",
time: {
unit: 'day',
},
gridLines: {
color: 'rgba(0, 0, 0, 0.1)',
zeroLineColor: 'rgba(0, 0, 0, 0.1)',
lineWidth: 0.5,
zeroLineWidth: 0.5
}
}
const xAxeTicksOptions: TickOptions = {
fontSize: 12,
maxRotation: 90,
callback: (value) => { return ChartHelper.GetText(value, 25) }
}
const yAxeTicksOptions: TickOptions = {
fontSize: 12,
callback: (value) => { return ChartHelper.GetText(value, 20) }
}
const xAxesOptions: ChartXAxe = {
offset: true,
ticks: {
source: 'auto',
...xAxeTicksOptions
}
}
const xAxesOptions_Bar: ChartXAxe = {
ticks:
{
beginAtZero: true,
...xAxeTicksOptions
}
}
const yAxesOptions: ChartXAxe = {
ticks: {
min: 0,
...yAxeTicksOptions
}
}
const yAxesOptions_Bar: ChartXAxe = {
ticks: {
min: 0,
beginAtZero: true,
...yAxeTicksOptions
},
scaleLabel: {
display: false,
labelString: 'Y'
}
}
const chartOptionsBase: ChartOptions = {
legend: legendOptions,
responsive: true,
maintainAspectRatio: true,
layout: {
padding: 10
},
elements: {
point: {
radius: 2,
hitRadius: 5,
hoverRadius: 3,
},
}
}
const chartOptionsLine: ChartOptions = {
...chartOptionsBase,
scales: {
xAxes: [
xAxesOptions
],
yAxes: [
yAxesOptions
]
}
}
const chartOptionsLine_TimeX: ChartOptions = {
...chartOptionsBase,
scales: {
xAxes: [{
...xAxesOptions,
...timeAxeConfig,
offset: true,
}],
yAxes: [
yAxesOptions
]
}
}
const chartOptions_TimeXGranularity = (timeGranularity: TimeUnit): ChartOptions => {
return {
scales: {
xAxes: [{
time: {
unit: timeGranularity,
}
}]
}
}
}
const chartOptions_TimeYGranularity = (timeGranularity: TimeUnit): ChartOptions => {
return {
scales: {
yAxes: [{
time: {
unit: timeGranularity,
}
}]
}
}
}
const chartOptionsHorizontalBar: ChartOptions = {
...chartOptionsBase,
scales: {
xAxes: [
xAxesOptions_Bar
],
yAxes: [
yAxesOptions_Bar
]
}
}
const chartOptionsHorizontalBar_TimeY: ChartOptions = {
...chartOptionsBase,
scales: {
xAxes: [
xAxesOptions_Bar
],
yAxes: [{
...yAxesOptions_Bar,
...timeAxeConfig,
offset: true,
}]
}
}
const chartOptionsVerticalBar: ChartOptions = {
...chartOptionsBase,
scales: {
xAxes: [
xAxesOptions_Bar
],
yAxes: [
yAxesOptions_Bar
]
}
}
const chartOptionsVerticalBar_TimeX: ChartOptions = {
...chartOptionsBase,
scales: {
xAxes: [{
...xAxesOptions_Bar,
...timeAxeConfig,
offset: true,
}],
yAxes: [
yAxesOptions_Bar
]
}
}
const chartOptionsPie: ChartOptions = {
...chartOptionsBase,
}
const ChartOptionsConfig = {
Line: chartOptionsLine,
Line_TimeX: chartOptionsLine_TimeX,
BarHorizontal: chartOptionsHorizontalBar,
BarHorizontal_TimeY: chartOptionsHorizontalBar_TimeY,
BarVertical: chartOptionsVerticalBar,
BarVertical_TimeX: chartOptionsVerticalBar_TimeX,
TimeAxe: timeAxeConfig,
TimeXGranularity: chartOptions_TimeXGranularity,
TimeYGranularity: chartOptions_TimeYGranularity,
Pie: chartOptionsPie
}
//#endregion
export { DataSetStylesConfig, ChartOptionsConfig };

View File

@ -0,0 +1,417 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { cloneDeep, merge, uniq } from "@microsoft/sp-lodash-subset";
import { ChartType, PaletteGenerator } from "@pnp/spfx-controls-react";
import { ChartData, ChartDataSets, ChartOptions, TimeUnit } from "chart.js";
import stringsCommon from "CommonDasboardWebPartStrings";
import moment from "moment";
import { ColumnsInfo, DataTypesInfo } from "../components/InsightsChart/IInsightsChartProps";
import ApiHelper from "./ApiHelper";
import { ChartOptionsConfig, DataSetStylesConfig } from "./ChartConfigHelper";
import ColorsHelper, { ThemedPalette } from "./ColorsHelper";
import { ChartStyles } from "./DashboardHelper";
export enum ChartAxis {
"x",
"y"
}
export default class ChartHelper {
private static OPACITY = 0.7;
private static GetColValues_TimeAxisX = (items: any[], colName_Label: string, colName_Value: string): { x: number; y: Date; }[] => {
return items.map(
i => {
return {
x: Number(Number(i[colName_Value]).toFixed(3)),
y: moment(i[colName_Label]).toDate(),
}
}
)
}
private static GetColValues_TimeAxisY = (items: any[], colName_Label: string, colName_Value: string): { x: Date; y: number; }[] => {
return items.map(
i => {
return {
x: moment(i[colName_Label]).toDate(),
y: Number(Number(i[colName_Value]).toFixed(3))
}
}
)
}
private static GetColValues_PointFormat = (items: any[], colName_Label: string, colName_Value: string): { x: number; y: number; }[] => {
return items.map(
i => {
return {
x: Number(Number(i[colName_Label]).toFixed(3)),
y: Number(Number(i[colName_Value]).toFixed(3))
}
}
)
}
private static GetColValues_Number = (items: any[], colName_Value: string): number[] => {
return items.map(i => Number(Number(i[colName_Value]).toFixed(3)));
}
private static GetLabels = (items: any[], colName_Label: string): string[] | Date[] => {
return items.map(i => i[colName_Label]);
}
public static GetText = (value: string | number, length: number): string => {
const val = value.toString();
return val.length > length ? val.substring(0, length) + '...' : val;
}
public static GetDataInfo = (items: any[], dataTypes: Map<string, string>, chartType?: ChartStyles): DataTypesInfo => {
const _getStackingSupport = (chartType: ChartStyles, colLength: number): boolean => {
return (chartType === ChartStyles.barchart || chartType === ChartStyles.columnchart) && (colLength > 1)
}
const _getTimeAxisSupport = (chartType: ChartStyles, colLength: number): boolean => {
return colLength > 0 && chartType !== ChartStyles.piechart;
}
const _getChartTypeSupport = (dataTypes: Map<string, string>, chartStyle?: ChartStyles): { isSupported: boolean, error?: string } => {
const supportedChartTypes: ChartType[] = ChartHelper.GetSupportedChartTypes(dataTypes);
const currChartType: ChartType = ChartHelper.GetChartType(chartStyle);
if (supportedChartTypes.includes(currChartType)) {
return {
isSupported: true
}
}
else {
switch (currChartType) {
case ChartType.Pie:
return {
isSupported: false,
error: stringsCommon.Msg_FailedVisErrPie// "Pie needs 1 num column"
}
default:
return {
isSupported: false,
error: stringsCommon.Msg_FailedVisErrOneNumerical// "No num columns found"
}
}
}
}
const _hasDifferentDates = (items: any[], colName_DateTime: string): boolean => {
const i = items.map(i => i[colName_DateTime]);
return uniq(i).length > 1;
}
const _getTimeGranularity = (items: any[], colName_DateTime: string): TimeUnit => {
const i = items.map(i => i[colName_DateTime]);
const uniqDates = uniq(i);
if (uniqDates.length > 1) {
const diff = moment(uniqDates[1]).diff(moment(uniqDates[0]));
if (diff < 1000 * 60 * 60 * 24) {
return 'hour';
}
else if (diff < 1000 * 60 * 60 * 24 * 30) {
return 'day';
}
else if (diff < 1000 * 60 * 60 * 24 * 365) {
return 'month';
}
else {
return 'year';
}
}
else {
return 'day';
}
}
//not supported in a chart:'bool', 'boolean', 'dynamic','guid', 'timespan', 'time'
const colName_Number = ApiHelper.GetColByTypes(dataTypes, ApiHelper.NumericTypes);
const colName_DateTime = ApiHelper.GetColByTypes(dataTypes, ApiHelper.DateTimeTypes);
const colName_String = ApiHelper.GetColByTypes(dataTypes, ApiHelper.StringTypes);
//stacking is suppored only for barchart and columnchart
const stackSupported = _getStackingSupport(chartType, colName_Number.length);
const timeAxisSupported = _getTimeAxisSupport(chartType, colName_DateTime.length) && _hasDifferentDates(items, colName_DateTime[0]);
const chartTypeSupported = _getChartTypeSupport(dataTypes, chartType);
const timeGranularity = timeAxisSupported ? _getTimeGranularity(items, colName_DateTime[0]) : undefined;
return {
colNumber: colName_Number,
colDateTime: colName_DateTime,
colString: colName_String,
isStacked: stackSupported,
hasTimeAxis: timeAxisSupported,
timeGranularity: timeGranularity,
isSupported: chartTypeSupported.isSupported, //isChartTypeSupported
errorMsg: chartTypeSupported.error
}
}
public static GetChartType = (chartStyle?: ChartStyles): ChartType => {
switch (chartStyle) {
case ChartStyles.barchart:
return ChartType.HorizontalBar;
case ChartStyles.columnchart:
return ChartType.Bar;
case ChartStyles.piechart:
return ChartType.Pie;
case ChartStyles.areachart:
case ChartStyles.linechart:
default:
return ChartType.Line;
}
}
public static GetChartData = (items: any[], hasTimeAxis: boolean, isHorizontal: boolean, columnsInfo: ColumnsInfo, chartType: ChartType, fillChart: boolean, chartPalette: ThemedPalette): ChartData => {
const _getColors = (chartType: ChartType, itemsLength: number, valuesLength: number): string[] => {
return chartType === ChartType.Pie
? ColorsHelper.GetThemeMonochromaticColors(chartPalette as ThemedPalette, itemsLength).Colors
: ColorsHelper.GetThemeMonochromaticColors(chartPalette as ThemedPalette, valuesLength).Colors
}
const _getColumnsInfo = (columnsInfo: ColumnsInfo, hasTimeAxis: boolean): { label: string, values: string[], series: string[] } => {
if (hasTimeAxis) {
return {
label: columnsInfo.colDateTime[0],
values: columnsInfo.colNumber,
series: columnsInfo.colString
}
} else if (columnsInfo.colString[0] ?? columnsInfo.colDateTime[0]) {
return {
label: columnsInfo.colString[0] ?? columnsInfo.colDateTime[0],
values: columnsInfo.colNumber,
series: columnsInfo.colString.splice(0, 1)
}
}
else {
return {
label: columnsInfo.colNumber[0],
values: columnsInfo.colNumber.slice(1),
series: columnsInfo.colString
}
}
}
const _getGroupedBySeries = (series: string[], items: any[]): Map<string, any> => {
const groupBy = series[0]
return items.reduce((prev: Map<string, any>, curr) => {
const { [groupBy]: groupByVal, ...rest } = curr;
prev.set(groupByVal, prev.has(groupByVal) ? [...prev.get(groupByVal), rest] : [rest]);
return prev;
}, new Map<string, any>());
}
const _getDataTimeAxis = (items: any[], colName_Label: string, colName_Values: string[], series: string[], chartDataConfig: ChartDataSets, isHorizontal: boolean, fillChart: boolean): ChartData => {
if (colName_Values.length === 1 && series.length > 0) {
let count = 0;
const dataSets: ChartDataSets[] = []
const groupedBySeries = _getGroupedBySeries(series, items);
const colors = ColorsHelper.GetThemeMonochromaticColors(chartPalette as ThemedPalette, groupedBySeries.size).Colors
groupedBySeries.forEach((value: any, key: string) => {
const _color = colors[count++];
const dataSet: ChartDataSets = {
label: key,
data: isHorizontal
? ChartHelper.GetColValues_TimeAxisX(value, colName_Label, colName_Values[0])
: ChartHelper.GetColValues_TimeAxisY(value, colName_Label, colName_Values[0]),
fill: fillChart,
backgroundColor: PaletteGenerator.alpha(_color, ChartHelper.OPACITY),
borderColor: _color,
...chartDataConfig
}
dataSets.push(dataSet);
});
console.log(dataSets);
return {
datasets: dataSets
}
}
else {
const colors = ColorsHelper.GetThemeMonochromaticColors(chartPalette as ThemedPalette, colName_Values.length).Colors
return {
datasets: colName_Values.map((col: string, index: number) => {
const _color = colors[index];
return {
label: col,
data: isHorizontal
? ChartHelper.GetColValues_TimeAxisX(items, colName_Label, col)
: ChartHelper.GetColValues_TimeAxisY(items, colName_Label, col),
fill: fillChart,
backgroundColor: PaletteGenerator.alpha(_color, ChartHelper.OPACITY),
borderColor: _color,
...chartDataConfig
}
})
};
}
}
const _getDataPie = (items: any[], colName_Label: string, colName_Values: string[], chartDataConfig: ChartDataSets, fillChart: boolean, colors: string[]): ChartData => {
return {
labels: ChartHelper.GetLabels(items, colName_Label),
datasets: colName_Values.map((col: string, index: number) => {
return {
label: col,
data: ChartHelper.GetColValues_Number(items, col),
fill: fillChart,
backgroundColor: PaletteGenerator.alpha(colors, ChartHelper.OPACITY),
borderWidth: 0,
...chartDataConfig
}
})
};
}
const _getData = (items: any[], colName_Label: string, colName_Values: string[], chartDataConfig: ChartDataSets, fillChart: boolean, colors: string[]): ChartData => {
return {
labels: ChartHelper.GetLabels(items, colName_Label),
datasets: colName_Values.map((col: string, index: number) => {
return {
label: col,
data: ChartHelper.GetColValues_Number(items, col),
fill: fillChart,
backgroundColor: PaletteGenerator.alpha(colors[index], ChartHelper.OPACITY),
borderColor: colors[index],
...chartDataConfig
}
})
};
}
const dataSetStylesConfig = ChartHelper.GetDataSetStylesConfig(chartType, hasTimeAxis);
const colsInfo = _getColumnsInfo(columnsInfo, hasTimeAxis);
const colors = _getColors(chartType, items.length, colsInfo.values.length);
//no time axis, all other charts => [labels, data]
//time Axis but just 1 date => hasTimeAxis=false, get string column as label
if (chartType === ChartType.Pie) {
return _getDataPie(
items,
colsInfo.label,
colsInfo.values,
dataSetStylesConfig,
fillChart,
colors
);
}
else if (hasTimeAxis) {
return _getDataTimeAxis(
items,
colsInfo.label,
colsInfo.values,
colsInfo.series,
dataSetStylesConfig,
isHorizontal,
fillChart,
);
}
else {
return _getData(
items,
colsInfo.label,
colsInfo.values,
dataSetStylesConfig,
fillChart,
colors
)
}
}
public static GetDataSetStylesConfig = (chartType: ChartType, hasTimeAxis: boolean): {} => {
switch (chartType) {
case ChartType.Line:
return DataSetStylesConfig.Line;
case ChartType.Bar://column
return hasTimeAxis ? DataSetStylesConfig.BarTime : DataSetStylesConfig.Bar;
case ChartType.HorizontalBar:
return hasTimeAxis ? DataSetStylesConfig.BarTime : DataSetStylesConfig.Bar;
case ChartType.Pie:
return DataSetStylesConfig.Pie;
default:
return DataSetStylesConfig.None;
}
}
public static GetSupportedChartTypes = (dataTypes: Map<string, string>): ChartType[] => {
const colName_Number = ApiHelper.GetColByTypes(dataTypes, ApiHelper.NumericTypes);
const colName_DateTime = ApiHelper.GetColByTypes(dataTypes, ApiHelper.DateTimeTypes);
const colName_String = ApiHelper.GetColByTypes(dataTypes, ApiHelper.StringTypes);
const chartTypes: ChartType[] = [];
if (colName_Number.length > 0) {
chartTypes.push(ChartType.Line);
chartTypes.push(ChartType.Bar);
chartTypes.push(ChartType.HorizontalBar);
}
if (colName_DateTime.length > 0) {
chartTypes.push(ChartType.Line);
chartTypes.push(ChartType.Bar);
chartTypes.push(ChartType.HorizontalBar);
}
if (colName_String.length > 0 && colName_Number.length < 2) {
chartTypes.push(ChartType.Pie);
}
return chartTypes;
}
public static GetChartOptions = (chartType: ChartType, hasTimeAxis: boolean, timeGranularity: TimeUnit, isStacked: boolean): ChartOptions => {
const options = ChartHelper.getOptions(chartType, hasTimeAxis, timeGranularity)
if (hasTimeAxis && timeGranularity !== undefined) {
if (options.scales.xAxes[0].time?.unit) {
options.scales.xAxes[0].time.unit = timeGranularity;
}
if (options.scales.yAxes[0].time?.unit) {
options.scales.yAxes[0].time.unit = timeGranularity;
}
}
return isStacked
? ChartHelper.configureStacked(options)
: options;
}
private static mergeOptionsX = (options: ChartOptions, timeGranularity: TimeUnit): ChartOptions => {
if (timeGranularity !== undefined)
return merge({}, options, ChartOptionsConfig.TimeXGranularity(timeGranularity))
else
return options;
}
private static mergeOptionsY = (options: ChartOptions, timeGranularity: TimeUnit): ChartOptions => {
if (timeGranularity !== undefined)
return merge({}, options, ChartOptionsConfig.TimeYGranularity(timeGranularity))
else
return options;
}
private static getOptions = (chartType: ChartType, hasTimeAxis: boolean, timeGranularity: TimeUnit): ChartOptions => {
let chartOption = {}
switch (chartType) {
case ChartType.Line: {
chartOption = hasTimeAxis
? ChartHelper.mergeOptionsX(ChartOptionsConfig.Line_TimeX, timeGranularity)
: ChartOptionsConfig.Line;
break;
}
case ChartType.Bar: { //column
chartOption = hasTimeAxis
? ChartHelper.mergeOptionsX(ChartOptionsConfig.BarVertical_TimeX, timeGranularity)
: ChartOptionsConfig.BarVertical;
break;
}
case ChartType.HorizontalBar: {
chartOption = hasTimeAxis
? ChartHelper.mergeOptionsY(ChartOptionsConfig.BarHorizontal_TimeY, timeGranularity)
: ChartOptionsConfig.BarHorizontal;
break;
}
case ChartType.Pie:
chartOption = ChartOptionsConfig.Pie;
break;
}
return chartOption;
}
private static configureStacked = (chartOptions: ChartOptions): ChartOptions => {
const options = cloneDeep(chartOptions)
if (options.scales.xAxes && options.scales.yAxes) {
options.scales.yAxes[0].stacked = true;
options.scales.xAxes[0].stacked = true;
}
return options;
}
}

Some files were not shown because too many files have changed in this diff Show More