Socket
Socket
Sign inDemoInstall

@microsoft/sp-core-library

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/sp-core-library - npm Package Compare versions

Comparing version 1.16.1 to 1.17.0-beta.1

dist/sp-core-library_default_b2300d2384181f8ac103.js

134

dist/7263c7d0-1d6a-45ec-8d85-d4d1d234171b.manifest.json

@@ -5,3 +5,3 @@ {

"componentType": "Library",
"version": "1.16.1",
"version": "1.17.0",
"manifestVersion": 2,

@@ -17,67 +17,67 @@ "loaderConfig": {

"paths": {
"default": "sp-core-library_default_cc6040588812ab09c68b.js",
"en-US": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"qps-ploca": "sp-core-library_qps-ploca_cc6040588812ab09c68b.js",
"qps-ploc": "sp-core-library_qps-ploc_cc6040588812ab09c68b.js",
"en-GB": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-NZ": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-IE": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-AU": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"bn": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"chr": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"dv": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"div": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"fil": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"haw": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"iu": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"lo": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"moh": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"sq": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"am": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"hy": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"mk": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"bs": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"my": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"dz": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-CY": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-EG": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-IL": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-IS": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-JO": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-KE": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-KW": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-MK": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-MT": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-PK": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-QA": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-SA": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-LK": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-AE": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-VN": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"is": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"km": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"kh": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"mt": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"fa": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"gd": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"sr-Cyrl-BA": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"sr-Latn-BA": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"sd": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"si": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"so": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"ti-ET": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"uz": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-SG": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-HK": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-MY": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-PH": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-TT": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-AZ": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-BH": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-BN": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"en-ID": "sp-core-library_en-us_cc6040588812ab09c68b.js",
"mi": "sp-core-library_en-us_cc6040588812ab09c68b.js"
"default": "sp-core-library_default_b2300d2384181f8ac103.js",
"en-US": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"qps-ploca": "sp-core-library_qps-ploca_b2300d2384181f8ac103.js",
"qps-ploc": "sp-core-library_qps-ploc_b2300d2384181f8ac103.js",
"en-GB": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-NZ": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-IE": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-AU": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"bn": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"chr": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"dv": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"div": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"fil": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"haw": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"iu": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"lo": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"moh": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"sq": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"am": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"hy": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"mk": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"bs": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"my": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"dz": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-CY": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-EG": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-IL": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-IS": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-JO": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-KE": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-KW": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-MK": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-MT": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-PK": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-QA": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-SA": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-LK": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-AE": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-VN": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"is": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"km": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"kh": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"mt": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"fa": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"gd": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"sr-Cyrl-BA": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"sr-Latn-BA": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"sd": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"si": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"so": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"ti-ET": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"uz": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-SG": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-HK": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-MY": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-PH": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-TT": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-AZ": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-BH": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-BN": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"en-ID": "sp-core-library_en-us_b2300d2384181f8ac103.js",
"mi": "sp-core-library_en-us_b2300d2384181f8ac103.js"
},
"defaultPath": "sp-core-library_default_cc6040588812ab09c68b.js"
"defaultPath": "sp-core-library_default_b2300d2384181f8ac103.js"
},

@@ -92,3 +92,3 @@ "tslib": {

"id": "2e09fb9b-13bb-48f2-859f-97d6fff71176",
"version": "1.3.26"
"version": "1.3.107"
},

@@ -98,3 +98,3 @@ "@microsoft/sp-lodash-subset": {

"id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a",
"version": "1.16.1"
"version": "1.17.0"
}

@@ -101,0 +101,0 @@ }

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.31.2"
"packageVersion": "7.33.6"
}
]
}

@@ -13,2 +13,3 @@ "use strict";

var _vivaConnections1PAppId = 'sharepointportal_d2c6f111-ffad-42a0-b65e-ee00425598aa';
var _vivaTopicsAppId = 'sharepointportal_3ff145dc-86a3-4da8-a570-a3114e49c29a';
var _classHomeAppId = 'ClassHomePage_81fe9dd3-8207-4480-b846-cf1a967af129';

@@ -40,3 +41,7 @@ var _teamsAppEntityId = 'TeamsAppEntityId';

BrowserUtilities.getTeamsAppType = function () {
var appHostType;
var appHostType = !SPKillSwitch_1.default.isActivated('dffc3500-e600-43dc-ad02-7c0d87e3d5f6'
/* 01/23/2022, 'Change the app host value to Default from NA and rename error stack field' */
)
? 'SPPages'
: undefined;
if (BrowserUtilities.isMEEBridgeApplicationHosted()) {

@@ -69,2 +74,16 @@ appHostType = 'MEEBridge'; // VivaConnections Mobile

};
/** Returns the Product information for ASHA for Customer Promise implementations to consume.
* We have SPO Sites and Connections (Viva) as 2 main identified products for many of our Customer Promise scenarios in WEX.
* This method checks if a page is hosted within Teams and the hosted app is Viva1P to identify 'Connections',
* else we return the default 'SPO Sites' as Product.
* Edu scenario is categorized under SPO Sites product and will be further differentiated using endpoint value further.
*/
BrowserUtilities.getASHAProduct = function () {
if (BrowserUtilities.isViva1PHosted()) {
return 'Connections';
}
else {
return 'SPO Sites';
}
};
/**

@@ -89,2 +108,17 @@ * Returns true if current page is loaded as iFrame under secure broker app

/**
* Returns true if current page is loaded as iFrame under secure broker app
* @returns
*/
BrowserUtilities.isRequestComingFromSecureBroker = function () {
try {
return (BrowserUtilities.isTeamsBrowserOrDesktop() &&
!!new URL(window.location.href).searchParams.get(exports.BROKER_IN_USE_KEY));
}
catch (_a) {
// no-op, we want to default to not using secure broker
// (window.location.href is not a valid URL would hit here).
return false;
}
};
/**
* Set flags in session storage indicating current page is loaded as iFrame under secure broker app.

@@ -118,46 +152,28 @@ * It is callers responsibility to ensure it is indeed loaded using secure broker app.

BrowserUtilities.isViva1PHosted = function () {
if (!SPKillSwitch_1.default.isActivated('2badfa2e-6e1a-489b-97d9-a1f1f192a25c'
/* '09/19/2022', 'Fix utility methods in teams' */
)) {
try {
return (BrowserUtilities.isTeamsHosted() &&
(localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _vivaConnections1PAppId);
}
catch (_a) {
return false;
}
try {
return (BrowserUtilities.isTeamsHosted() &&
(localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _vivaConnections1PAppId);
}
catch (_a) {
return false;
}
};
/**
* Returns true if we are in the VivaTopics App.
*/
BrowserUtilities.isVivaTopicsHosted = function () {
try {
if (BrowserUtilities._isViva1PHosted === undefined) {
BrowserUtilities._isViva1PHosted =
BrowserUtilities.isTeamsHosted() &&
(localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _vivaConnections1PAppId;
}
return !!(BrowserUtilities.isTeamsHosted() && (localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _vivaTopicsAppId);
}
catch (_b) {
catch (_a) {
return false;
}
return BrowserUtilities._isViva1PHosted;
};
BrowserUtilities.isEduClassHosted = function () {
if (!SPKillSwitch_1.default.isActivated('2badfa2e-6e1a-489b-97d9-a1f1f192a25c'
/* '09/19/2022', 'Fix utility methods in teams' */
)) {
try {
return (BrowserUtilities.isTeamsHosted() && (localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _classHomeAppId);
}
catch (_a) {
return false;
}
}
try {
if (BrowserUtilities._isClassHomeHosted === undefined) {
BrowserUtilities._isClassHomeHosted =
BrowserUtilities.isTeamsHosted() && (localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _classHomeAppId;
}
return BrowserUtilities.isTeamsHosted() && (localStorage === null || localStorage === void 0 ? void 0 : localStorage.getItem(_teamsAppEntityId)) === _classHomeAppId;
}
catch (_b) {
catch (_a) {
return false;
}
return BrowserUtilities._isClassHomeHosted;
};

@@ -173,3 +189,4 @@ BrowserUtilities.isTeamsAndroidHosted = function () {

*/
/.* TeamsMobile-Android.*/.test(ua) || /[?&]env=TeamsWebView/.test(location.search);
/.* TeamsMobile-Android.*/.test(ua) ||
(this._isUseEnvTeamsWebViewKSActive() ? /[?&]env=TeamsWebView/.test(location.search) : false);
}

@@ -187,3 +204,4 @@ return BrowserUtilities._isTeamsAndroid;

*/
/.* TeamsMobile-iOS.*/.test(ua) || /[?&]env=TeamsWebView/.test(location.search);
/.* TeamsMobile-iOS.*/.test(ua) ||
(this._isUseEnvTeamsWebViewKSActive() ? /[?&]env=TeamsWebView/.test(location.search) : false);
}

@@ -197,3 +215,3 @@ return BrowserUtilities._isTeamsIOS;

/* Electron WebView (scoped to Microsoft Teams for now) - Desktop Client scenario */
/Teams\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+)).* Electron\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+))/.test(ua) || /[?&]env=TeamsWebView/.test(location.search);
/Teams\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+)).* Electron\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+))/.test(ua) || (this._isUseEnvTeamsWebViewKSActive() ? /[?&]env=TeamsWebView/.test(location.search) : false);
}

@@ -203,14 +221,4 @@ return BrowserUtilities._isTeamsWebView;

BrowserUtilities.isTeams1PVivaDesktopHosted = function () {
if (!SPKillSwitch_1.default.isActivated('2badfa2e-6e1a-489b-97d9-a1f1f192a25c'
/* '09/19/2022', 'Fix utility methods in teams' */
)) {
return (BrowserUtilities.isTeamsWebViewHosted() &&
localStorage.getItem(_teamsAppEntityId) === _vivaConnections1PAppId);
}
if (BrowserUtilities._isTeams1PVivaDesktop === undefined) {
BrowserUtilities._isTeams1PVivaDesktop =
BrowserUtilities.isTeamsWebViewHosted() &&
localStorage.getItem(_teamsAppEntityId) === _vivaConnections1PAppId;
}
return BrowserUtilities._isTeams1PVivaDesktop;
return (BrowserUtilities.isTeamsWebViewHosted() &&
localStorage.getItem(_teamsAppEntityId) === _vivaConnections1PAppId);
};

@@ -293,6 +301,3 @@ /**

BrowserUtilities.isTeamsHosted = function () {
var isFixCommandBarShowingUpInTeams = SPKillSwitch_1.default.isActivated('2f0ced0e-6dcc-4a09-8178-1e6abca476c8'
/* '09/02/2022', 'Fix command bar not showing up in teams' */
);
var isWindowNativeInterface = Boolean(!isFixCommandBarShowingUpInTeams && window.parent === window.self && window.nativeInterface);
var isWindowNativeInterface = Boolean(window.parent === window.self && window.nativeInterface);
return (isWindowNativeInterface ||

@@ -429,11 +434,8 @@ BrowserUtilities.isTeamsWebViewHosted() ||

/**
* Returns true if we are on or navigated from the VivaHome layouts page.
* Returns true if user is navigated from the VivaHome layouts page.
*/
BrowserUtilities.isFromVivaHome = function () {
return (SPFlight_1.default.isEnabled(1252 /* VivaHomeIsolatedDomainCards */) &&
(window.location.pathname.toLowerCase().indexOf('/_layouts/15/vivahome.aspx') !== -1 ||
(!SPKillSwitch_1.default.isActivated('3d971311-4763-44a9-9e95-c3ea405d5009'
/* '10/05/2022', 'Fix Myhub cards on Dashboard page when navigated from viva home' */
) &&
window.location.search.indexOf('isFromVivaHome=true') !== -1)));
return (!SPKillSwitch_1.default.isActivated('e67cbc4f-48e9-4078-9352-269082e1631c'
/* '10/20/2022', 'if user is navigated from the VivaHome layouts page' */
) && window.location.search.indexOf('isFromVivaHome=true') !== -1);
};

@@ -472,2 +474,12 @@ /**

};
/*
The same KS is used in other places
1. /odsp-common/teams/odsp-teams-shared/src/utilities/KillSwitches.ts
2. sp-client/apps/sp-pages/src/core/common/PagesKillSwitches.ts
*/
BrowserUtilities._isUseEnvTeamsWebViewKSActive = function () {
return SPKillSwitch_1.default.isActivated('1ef1d321-c5f8-486b-81c0-8eca90583194'
/* '10/28/2022', 'Remove all occurences of env=TeamsWebView' */
);
};
return BrowserUtilities;

@@ -474,0 +486,0 @@ }());

@@ -6,3 +6,3 @@ "use strict";

var Validate_1 = tslib_1.__importDefault(require("./Validate"));
var strings = tslib_1.__importStar(require("./SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./SPCoreLibraryStrings.resx"));
/**

@@ -60,3 +60,3 @@ * Indicates the general type of environment where the SharePoint Framework is running.

if (!EnvironmentType.hasOwnProperty(data.type.toString())) {
throw new Error(strings.invalidEnvironmentTypeError);
throw new Error(SPCoreLibraryStrings_resx_1.default.invalidEnvironmentTypeError);
}

@@ -63,0 +63,0 @@ };

@@ -6,3 +6,3 @@ "use strict";

var Text_1 = tslib_1.__importDefault(require("./Text"));
var strings = tslib_1.__importStar(require("./SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./SPCoreLibraryStrings.resx"));
/**

@@ -61,3 +61,3 @@ * This class represents a globally unique identifier, as described by

if (!guid) {
throw new Error(Text_1.default.format(strings.invalidGuidStringError, guidString));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.invalidGuidStringError, guidString));
}

@@ -64,0 +64,0 @@ return guid;

@@ -8,3 +8,3 @@ "use strict";

var Text_1 = tslib_1.__importDefault(require("../Text"));
var strings = tslib_1.__importStar(require("./../SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./../SPCoreLibraryStrings.resx"));
/**

@@ -20,3 +20,3 @@ * The redirectable implementation for the Log class.

if (DEBUG && !DEPRECATED_UNIT_TEST) {
console.log(Text_1.default.format(strings.logVerboseLevelMessage, source, message));
console.log(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logVerboseLevelMessage, source, message));
}

@@ -26,3 +26,3 @@ };

if (DEBUG && !DEPRECATED_UNIT_TEST) {
console.info(Text_1.default.format(strings.logInfoLevelMessage, source, message));
console.info(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logInfoLevelMessage, source, message));
}

@@ -32,3 +32,3 @@ };

if (DEBUG && !DEPRECATED_UNIT_TEST) {
console.warn(Text_1.default.format(strings.logWarningLevelMessage, source, message));
console.warn(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logWarningLevelMessage, source, message));
}

@@ -38,3 +38,3 @@ };

if (DEBUG && !DEPRECATED_UNIT_TEST) {
console.error(Text_1.default.format(strings.logErrorLevelMessage, source, error.message));
console.error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logErrorLevelMessage, source, error.message));
}

@@ -41,0 +41,0 @@ };

@@ -5,3 +5,3 @@ "use strict";

var Text_1 = tslib_1.__importDefault(require("../Text"));
var strings = tslib_1.__importStar(require("./../SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./../SPCoreLibraryStrings.resx"));
/**

@@ -108,6 +108,6 @@ * The service locator pattern used by the SharePoint Framework.

if (!this._finished) {
throw new Error(strings.serviceScopeConsumingBeforeFinished);
throw new Error(SPCoreLibraryStrings_resx_1.default.serviceScopeConsumingBeforeFinished);
}
if (this._autocreating) {
throw new Error(strings.serviceScopeConsumingDuringAutoCreation);
throw new Error(SPCoreLibraryStrings_resx_1.default.serviceScopeConsumingDuringAutoCreation);
}

@@ -154,3 +154,3 @@ var registration = this._registrations[serviceKey.id];

if (this._finished) {
throw new Error(strings.serviceScopeAlreadyFinishedError);
throw new Error(SPCoreLibraryStrings_resx_1.default.serviceScopeAlreadyFinishedError);
}

@@ -206,6 +206,6 @@ this._finished = true;

if (this._finished) {
throw new Error(strings.serviceScopeProvideServiceAfterFinishedError);
throw new Error(SPCoreLibraryStrings_resx_1.default.serviceScopeProvideServiceAfterFinishedError);
}
if (this._registrations[serviceKey.id]) {
throw new Error(Text_1.default.format(strings.serviceScopeProvideServiceThatAlreadyExists, serviceKey.name));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.serviceScopeProvideServiceThatAlreadyExists, serviceKey.name));
}

@@ -212,0 +212,0 @@ this._registerService(serviceKey, service);

@@ -6,3 +6,3 @@ "use strict";

var Validate_1 = tslib_1.__importDefault(require("./Validate"));
var strings = tslib_1.__importStar(require("./SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./SPCoreLibraryStrings.resx"));
/**

@@ -107,3 +107,3 @@ * The purpose of this class is to help make the SharePoint framework errors more robust.

errorMessageArray = errorMessageArray.concat([
strings.spErrorInnerErrorText,
SPCoreLibraryStrings_resx_1.default.spErrorInnerErrorText,
this.innerError.message

@@ -113,7 +113,7 @@ ]);

if (this.stack) {
errorMessageArray = errorMessageArray.concat([strings.spErrorCallStackText, this.stack]);
errorMessageArray = errorMessageArray.concat([SPCoreLibraryStrings_resx_1.default.spErrorCallStackText, this.stack]);
}
if (this._logProperties) {
errorMessageArray = errorMessageArray.concat([
strings.spErrorLogPropertiesText,
SPCoreLibraryStrings_resx_1.default.spErrorLogPropertiesText,
JSON.stringify(this._logProperties)

@@ -120,0 +120,0 @@ ]);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var strings = tslib_1.__importStar(require("./SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./SPCoreLibraryStrings.resx"));
/**

@@ -39,6 +39,6 @@ * Operations for working with strings that contain text.

// tslint:disable-line:no-null-keyword
throw new Error(strings.isNullValidateError.replace('{0}', 's'));
throw new Error(SPCoreLibraryStrings_resx_1.default.isNullValidateError.replace('{0}', 's'));
}
if (s === undefined) {
throw new Error(strings.isUndefinedValidateError.replace('{0}', 's'));
throw new Error(SPCoreLibraryStrings_resx_1.default.isUndefinedValidateError.replace('{0}', 's'));
}

@@ -45,0 +45,0 @@ return s.replace(Text.FORMAT_REGEX, function (match) {

@@ -146,2 +146,14 @@ "use strict";

};
/**
* Detects if a url is absolute url
*
* Examples:
* ```
* isAbsoluteUrl('http://example.com') ---> true
* isAbsoluteUrl('/test/123') ---> false
* ```
*/
UrlUtilities.isAbsoluteUrl = function (url) {
return /^([a-z][a-z\d\-]*:)?\/\//i.test(url);
};
return UrlUtilities;

@@ -148,0 +160,0 @@ }());

@@ -5,3 +5,3 @@ "use strict";

var Text_1 = tslib_1.__importDefault(require("./Text"));
var strings = tslib_1.__importStar(require("./SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./SPCoreLibraryStrings.resx"));
/**

@@ -29,3 +29,3 @@ * Performs common validation tests for properties and function parameters.

if (!value) {
throw new Error(Text_1.default.format(strings.isFalseValidateError, variableName));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isFalseValidateError, variableName));
}

@@ -44,6 +44,6 @@ };

/* tslint:enable:no-null-keyword */
throw new Error(Text_1.default.format(strings.isNullValidateError, variableName));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isNullValidateError, variableName));
}
if (value === undefined) {
throw new Error(Text_1.default.format(strings.isUndefinedValidateError, variableName));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isUndefinedValidateError, variableName));
}

@@ -59,3 +59,3 @@ };

if (!value || (value && value.length === 0)) {
throw new Error(Text_1.default.format(strings.isEmptyStringValidateError, variableName));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isEmptyStringValidateError, variableName));
}

@@ -70,3 +70,3 @@ };

if (value.isDisposed) {
throw new Error(Text_1.default.format(strings.isDisposedValidateError, className));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isDisposedValidateError, className));
}

@@ -73,0 +73,0 @@ };

@@ -6,3 +6,3 @@ "use strict";

var Validate_1 = tslib_1.__importDefault(require("./Validate"));
var strings = tslib_1.__importStar(require("./SPCoreLibraryStrings.resx"));
var SPCoreLibraryStrings_resx_1 = tslib_1.__importDefault(require("./SPCoreLibraryStrings.resx"));
/**

@@ -57,3 +57,3 @@ * Represents a version number with two, three, or four parts.

}
throw new Error(Text_1.default.format(strings.invalidVersionStringError, versionString));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.invalidVersionStringError, versionString));
};

@@ -60,0 +60,0 @@ /**

{
"name": "@microsoft/sp-core-library",
"version": "1.16.1",
"version": "1.17.0-beta.1",
"description": "SharePoint Framework core libraries",

@@ -14,15 +14,15 @@ "license": "https://aka.ms/spfx/license",

"devDependencies": {
"@ms/odsp-core-bundle": "1.3.26",
"@ms/spfx-internal-web-build-rig": "0.1.0",
"@rushstack/heft": "0.47.11",
"@rushstack/heft": "0.48.8",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"react": "17.0.1",
"react-dom": "17.0.1"
"react-dom": "17.0.1",
"@ms/odsp-core-bundle": "1.3.107",
"@ms/spfx-internal-web-build-rig": "0.1.0"
},
"dependencies": {
"@microsoft/sp-lodash-subset": "1.16.1",
"@microsoft/sp-module-interfaces": "1.16.1",
"@microsoft/sp-odata-types": "1.16.1",
"tslib": "2.3.1"
"tslib": "2.3.1",
"@microsoft/sp-lodash-subset": "1.17.0-beta.1",
"@microsoft/sp-module-interfaces": "1.17.0-beta.1",
"@microsoft/sp-odata-types": "1.17.0-beta.1"
},

@@ -29,0 +29,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc