From 00b777e427141e7a7d36dfeeadeb70657332bb4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Ate=C5=9F=20UZUN?= Date: Fri, 11 Aug 2023 14:15:13 +0300 Subject: [PATCH 1/4] isInt function refactoring --- search-parts/src/helpers/LocalizationHelper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search-parts/src/helpers/LocalizationHelper.ts b/search-parts/src/helpers/LocalizationHelper.ts index f11dddc1..26133402 100644 --- a/search-parts/src/helpers/LocalizationHelper.ts +++ b/search-parts/src/helpers/LocalizationHelper.ts @@ -78,7 +78,7 @@ class LocalizationHelper { private static isInt(value: any): boolean { const x = parseFloat(value); - return !isNaN(value) && (x | 0) === x; + return Number.isInteger(x); } /** @@ -92,4 +92,4 @@ class LocalizationHelper { } } -export default LocalizationHelper; \ No newline at end of file +export default LocalizationHelper; From 27390e580ffb02dfedc9ad62f2ccc556b1593d13 Mon Sep 17 00:00:00 2001 From: Mustafa UZUN Date: Fri, 11 Aug 2023 17:23:21 +0300 Subject: [PATCH 2/4] parseFloat to Number --- search-parts/src/helpers/LocalizationHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/search-parts/src/helpers/LocalizationHelper.ts b/search-parts/src/helpers/LocalizationHelper.ts index 26133402..7fe7987f 100644 --- a/search-parts/src/helpers/LocalizationHelper.ts +++ b/search-parts/src/helpers/LocalizationHelper.ts @@ -77,7 +77,7 @@ class LocalizationHelper { } private static isInt(value: any): boolean { - const x = parseFloat(value); + const x = Number(value); return Number.isInteger(x); } From 07c65a5af18feaae2a6e7cf8d05cd2f4612a356d Mon Sep 17 00:00:00 2001 From: Mikael Svenson Date: Wed, 23 Aug 2023 13:19:44 +0200 Subject: [PATCH 3/4] Remove app insights tracking --- search-parts/package-lock.json | 198 ------------------ search-parts/package.json | 1 - search-parts/src/common/Constants.ts | 6 - .../ISearchResultsWebPartProps.ts | 5 - .../searchResults/SearchResultsWebPart.ts | 35 ---- .../src/webparts/searchResults/loc/da-dk.js | 5 +- .../src/webparts/searchResults/loc/de-de.js | 5 +- .../src/webparts/searchResults/loc/en-us.js | 5 +- .../src/webparts/searchResults/loc/es-es.js | 5 +- .../src/webparts/searchResults/loc/fi-fi.js | 5 +- .../src/webparts/searchResults/loc/fr-fr.js | 5 +- .../webparts/searchResults/loc/mystrings.d.ts | 5 +- .../src/webparts/searchResults/loc/nb-no.js | 5 +- .../src/webparts/searchResults/loc/nl-nl.js | 5 +- .../src/webparts/searchResults/loc/pl-pl.js | 5 +- .../src/webparts/searchResults/loc/pt-br.js | 5 +- .../src/webparts/searchResults/loc/sv-SE.js | 5 +- 17 files changed, 12 insertions(+), 293 deletions(-) diff --git a/search-parts/package-lock.json b/search-parts/package-lock.json index 2ce92105..debb943e 100644 --- a/search-parts/package-lock.json +++ b/search-parts/package-lock.json @@ -12,7 +12,6 @@ "@fluentui/react": "^8.109.7", "@fluentui/react-file-type-icons": "8.8.18", "@fluentui/react-theme-provider": "0.19.16", - "@microsoft/applicationinsights-web": "^2.8.9", "@microsoft/mgt-react": "^2.10.1", "@microsoft/mgt-sharepoint-provider": "^2.10.1", "@microsoft/sp-component-base": "1.15.2", @@ -2459,110 +2458,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/@microsoft/applicationinsights-analytics-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-2.8.11.tgz", - "integrity": "sha512-RwGnRDIAjyX/5yDJOueGfQkKwg7B1FTeIsv4wJ303CJD2wKSxxhE9rqYIPl5tKGqzv/uzmE/fiKuqiVlp7vcLg==", - "dependencies": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-channel-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-2.8.11.tgz", - "integrity": "sha512-DGDNzT4DMlSvUzWjA4y3tDg47+QYOPV+W07vlfdPwGgLwrl4n6Q4crrW8Y/IOpthHAKDU8rolSAUvP3NqxPi4Q==", - "dependencies": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-common": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-2.8.11.tgz", - "integrity": "sha512-Cxu4gRajkYv9buEtrcLGHK97AqGK62feN9jH9/JSjUSiSFhbnWtYvEg1EMqMI/P4pneu53yLJloITB+TKwmK7A==", - "dependencies": { - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-core-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.11.tgz", - "integrity": "sha512-6ScXplyb9Zb0K6TQRfqStm20j5lIe/Dslf65ozows6ibDcKkWl2ZdqzFhymVJZz1WRNpSyD4aA8qnqmslIER6g==", - "dependencies": { - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-dependencies-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-2.8.11.tgz", - "integrity": "sha512-eCjNouBvvnu+E3jLdfQgSIx3AUvmBDd14ZJNOjkvsaURhgRyWkBX3enT+RjrVrqyNQ74ZpHZpIJEqj90l28SsA==", - "dependencies": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-properties-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-2.8.11.tgz", - "integrity": "sha512-cuX8jwycBYX81SXmGTNK7JSJod3l8l3FIH0HPgPayCQy7CdHYlfKPTKE9q3I9qD1GO/3ER9yozuKpE+12Wk/2w==", - "dependencies": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-shims": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.2.tgz", - "integrity": "sha512-PoHEgsnmcqruLNHZ/amACqdJ6YYQpED0KSRe6J7gIJTtpZC1FfFU9b1fmDKDKtFoUSrPzEh1qzO3kmRZP0betg==" - }, - "node_modules/@microsoft/applicationinsights-web": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web/-/applicationinsights-web-2.8.11.tgz", - "integrity": "sha512-cLJl3MLQtvbwXU0hvFLl6S2/rIdoZKpZL8cvdaT0cXqd5XIiMbeUOxWHLf2hxT8IlIeVlu5nnFILeRYOFZowvw==", - "dependencies": { - "@microsoft/applicationinsights-analytics-js": "2.8.11", - "@microsoft/applicationinsights-channel-js": "2.8.11", - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-dependencies-js": "2.8.11", - "@microsoft/applicationinsights-properties-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - }, - "peerDependencies": { - "tslib": "*" - } - }, "node_modules/@microsoft/decorators": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@microsoft/decorators/-/decorators-1.17.1.tgz", @@ -2574,11 +2469,6 @@ "node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0" } }, - "node_modules/@microsoft/dynamicproto-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.9.tgz", - "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" - }, "node_modules/@microsoft/eslint-config-spfx": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/@microsoft/eslint-config-spfx/-/eslint-config-spfx-1.15.2.tgz", @@ -43995,89 +43885,6 @@ } } }, - "@microsoft/applicationinsights-analytics-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-analytics-js/-/applicationinsights-analytics-js-2.8.11.tgz", - "integrity": "sha512-RwGnRDIAjyX/5yDJOueGfQkKwg7B1FTeIsv4wJ303CJD2wKSxxhE9rqYIPl5tKGqzv/uzmE/fiKuqiVlp7vcLg==", - "requires": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "@microsoft/applicationinsights-channel-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-2.8.11.tgz", - "integrity": "sha512-DGDNzT4DMlSvUzWjA4y3tDg47+QYOPV+W07vlfdPwGgLwrl4n6Q4crrW8Y/IOpthHAKDU8rolSAUvP3NqxPi4Q==", - "requires": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "@microsoft/applicationinsights-common": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-2.8.11.tgz", - "integrity": "sha512-Cxu4gRajkYv9buEtrcLGHK97AqGK62feN9jH9/JSjUSiSFhbnWtYvEg1EMqMI/P4pneu53yLJloITB+TKwmK7A==", - "requires": { - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "@microsoft/applicationinsights-core-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.11.tgz", - "integrity": "sha512-6ScXplyb9Zb0K6TQRfqStm20j5lIe/Dslf65ozows6ibDcKkWl2ZdqzFhymVJZz1WRNpSyD4aA8qnqmslIER6g==", - "requires": { - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "@microsoft/applicationinsights-dependencies-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-dependencies-js/-/applicationinsights-dependencies-js-2.8.11.tgz", - "integrity": "sha512-eCjNouBvvnu+E3jLdfQgSIx3AUvmBDd14ZJNOjkvsaURhgRyWkBX3enT+RjrVrqyNQ74ZpHZpIJEqj90l28SsA==", - "requires": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "@microsoft/applicationinsights-properties-js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-properties-js/-/applicationinsights-properties-js-2.8.11.tgz", - "integrity": "sha512-cuX8jwycBYX81SXmGTNK7JSJod3l8l3FIH0HPgPayCQy7CdHYlfKPTKE9q3I9qD1GO/3ER9yozuKpE+12Wk/2w==", - "requires": { - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "@microsoft/applicationinsights-shims": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.2.tgz", - "integrity": "sha512-PoHEgsnmcqruLNHZ/amACqdJ6YYQpED0KSRe6J7gIJTtpZC1FfFU9b1fmDKDKtFoUSrPzEh1qzO3kmRZP0betg==" - }, - "@microsoft/applicationinsights-web": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web/-/applicationinsights-web-2.8.11.tgz", - "integrity": "sha512-cLJl3MLQtvbwXU0hvFLl6S2/rIdoZKpZL8cvdaT0cXqd5XIiMbeUOxWHLf2hxT8IlIeVlu5nnFILeRYOFZowvw==", - "requires": { - "@microsoft/applicationinsights-analytics-js": "2.8.11", - "@microsoft/applicationinsights-channel-js": "2.8.11", - "@microsoft/applicationinsights-common": "2.8.11", - "@microsoft/applicationinsights-core-js": "2.8.11", - "@microsoft/applicationinsights-dependencies-js": "2.8.11", - "@microsoft/applicationinsights-properties-js": "2.8.11", - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, "@microsoft/decorators": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@microsoft/decorators/-/decorators-1.17.1.tgz", @@ -44086,11 +43893,6 @@ "tslib": "2.3.1" } }, - "@microsoft/dynamicproto-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.9.tgz", - "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" - }, "@microsoft/eslint-config-spfx": { "version": "1.15.2", "resolved": "https://registry.npmjs.org/@microsoft/eslint-config-spfx/-/eslint-config-spfx-1.15.2.tgz", diff --git a/search-parts/package.json b/search-parts/package.json index aa02093d..299e21b8 100644 --- a/search-parts/package.json +++ b/search-parts/package.json @@ -16,7 +16,6 @@ "@fluentui/react": "^8.109.7", "@fluentui/react-file-type-icons": "8.8.18", "@fluentui/react-theme-provider": "0.19.16", - "@microsoft/applicationinsights-web": "^2.8.9", "@microsoft/mgt-react": "^2.10.1", "@microsoft/mgt-sharepoint-provider": "^2.10.1", "@microsoft/sp-component-base": "1.15.2", diff --git a/search-parts/src/common/Constants.ts b/search-parts/src/common/Constants.ts index 0127fbd2..b7cfd73d 100644 --- a/search-parts/src/common/Constants.ts +++ b/search-parts/src/common/Constants.ts @@ -14,12 +14,6 @@ export class Constants { * The client tag to append to all REST calls to SharePoint */ public static readonly X_CLIENTSERVICE_CLIENTTAG = 'NonISV|PnP|ModernSearch'; - - /** - * The PnP Application Insights instrumentation key and events for stats tracking - */ - public static readonly PNP_APP_INSIGHTS_INSTRUMENTATION_KEY = '0f0b9db6-680c-480c-804d-f75830e2c383'; - public static readonly PNP_MODERN_SEARCH_EVENT_NAME = 'pnpModernSearchV4'; } export enum AutoCalculatedDataSourceFields { diff --git a/search-parts/src/webparts/searchResults/ISearchResultsWebPartProps.ts b/search-parts/src/webparts/searchResults/ISearchResultsWebPartProps.ts index 06cde182..af1f6c6c 100644 --- a/search-parts/src/webparts/searchResults/ISearchResultsWebPartProps.ts +++ b/search-parts/src/webparts/searchResults/ISearchResultsWebPartProps.ts @@ -173,11 +173,6 @@ export default interface ISearchResultsWebPartProps extends IBaseWebPartProps { */ selectedItemFieldValue: DynamicProperty; - /** - * Flag indicating if telemetry are enabled - */ - enableTelemetry: boolean; - /** * The queryModifier properties */ diff --git a/search-parts/src/webparts/searchResults/SearchResultsWebPart.ts b/search-parts/src/webparts/searchResults/SearchResultsWebPart.ts index 7281ee1c..17fb5204 100644 --- a/search-parts/src/webparts/searchResults/SearchResultsWebPart.ts +++ b/search-parts/src/webparts/searchResults/SearchResultsWebPart.ts @@ -58,7 +58,6 @@ import { BuiltinFilterTemplates } from '../../layouts/AvailableTemplates'; import { IExtensibilityConfiguration } from '../../models/common/IExtensibilityConfiguration'; import { IDataVerticalSourceData } from '../../models/dynamicData/IDataVerticalSourceData'; import { BaseWebPart } from '../../common/BaseWebPart'; -import { ApplicationInsights } from '@microsoft/applicationinsights-web'; import commonStyles from '../../styles/Common.module.scss'; import { UrlHelper } from '../../helpers/UrlHelper'; import { ObjectHelper } from '../../helpers/ObjectHelper'; @@ -526,34 +525,6 @@ export default class SearchResultsWebPart extends BaseWebPart Date: Wed, 23 Aug 2023 13:29:19 +0200 Subject: [PATCH 4/4] Bump to v4.9.3 --- search-parts/config/package-solution.json | 2 +- search-parts/package-lock.json | 4 ++-- search-parts/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/search-parts/config/package-solution.json b/search-parts/config/package-solution.json index 72ffd132..bfe7dc41 100644 --- a/search-parts/config/package-solution.json +++ b/search-parts/config/package-solution.json @@ -3,7 +3,7 @@ "solution": { "name": "PnP Modern Search - Search Web Parts - v4", "id": "59903278-dd5d-4e9e-bef6-562aae716b8b", - "version": "4.9.2.0", + "version": "4.9.3.0", "includeClientSideAssets": true, "skipFeatureDeployment": true, "isDomainIsolated": false, diff --git a/search-parts/package-lock.json b/search-parts/package-lock.json index debb943e..12295cbb 100644 --- a/search-parts/package-lock.json +++ b/search-parts/package-lock.json @@ -1,12 +1,12 @@ { "name": "@pnp/modern-search-web-parts", - "version": "4.9.2", + "version": "4.9.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@pnp/modern-search-web-parts", - "version": "4.9.2", + "version": "4.9.3", "dependencies": { "@fluentui/font-icons-mdl2": "8.5.18", "@fluentui/react": "^8.109.7", diff --git a/search-parts/package.json b/search-parts/package.json index 299e21b8..df0f604e 100644 --- a/search-parts/package.json +++ b/search-parts/package.json @@ -1,6 +1,6 @@ { "name": "@pnp/modern-search-web-parts", - "version": "4.9.2", + "version": "4.9.3", "private": true, "main": "lib/index.js", "engines": {