Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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.1.0 to 1.2.0

dist/sp-core-library_en-us.js

15

CHANGELOG.json

@@ -5,2 +5,17 @@ {

{
"version": "1.2.0",
"tag": "@microsoft/sp-core-library_v1.2.0",
"date": "Fri, 25 Aug 2017 20:31:17 GMT",
"comments": {
"minor": [
{
"comment": "Add event infrastructure (beta)"
},
{
"comment": "Use lockstep version for all SPFx packages"
}
]
}
},
{
"version": "1.1.0",

@@ -7,0 +22,0 @@ "tag": "@microsoft/sp-core-library_v1.1.0",

10

CHANGELOG.md
# Change Log - @microsoft/sp-core-library
This log was last generated on Tue, 06 Jun 2017 01:30:31 GMT and should not be manually modified.
This log was last generated on Fri, 25 Aug 2017 22:24:38 GMT and should not be manually modified.
## 1.2.0
Fri, 25 Aug 2017 20:31:17 GMT
### Minor changes
- Add event infrastructure (beta)
- Use lockstep version for all SPFx packages
## 1.1.0

@@ -6,0 +14,0 @@ Thu, 25 May 2017 21:09:42 GMT

9

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

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

"componentType": "Library",
"version": "1.1.0",
"version": "1.2.0",
"manifestVersion": 2,

@@ -15,8 +15,9 @@ "loaderConfig": {

"sp-core-library": {
"type": "path",
"path": "dist/sp-core-library.js"
"type": "localizedPath",
"paths": {},
"defaultPath": "dist/sp-core-library_en-us.js"
},
"@microsoft/sp-lodash-subset": {
"type": "component",
"version": "1.1.0",
"version": "1.2.0",
"id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a"

@@ -23,0 +24,0 @@ }

@@ -1,2 +0,2 @@

define("7263c7d0-1d6a-45ec-8d85-d4d1d234171b_1.1.0", ["@microsoft/sp-lodash-subset"], function(__WEBPACK_EXTERNAL_MODULE_22__) { return /******/ (function(modules) { // webpackBootstrap
define("7263c7d0-1d6a-45ec-8d85-d4d1d234171b_1.2.0", ["@microsoft/sp-lodash-subset","resx-strings"], function(__WEBPACK_EXTERNAL_MODULE_25__, __WEBPACK_EXTERNAL_MODULE_26__) { return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache

@@ -66,3 +66,3 @@ /******/ var installedModules = {};

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 23);
/******/ return __webpack_require__(__webpack_require__.s = 27);
/******/ })

@@ -78,3 +78,3 @@ /************************************************************************/

var Text_1 = __webpack_require__(2);
var StringsProxy_1 = __webpack_require__(1);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var Validate = (function () {

@@ -85,3 +85,3 @@ function Validate() {

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

@@ -91,6 +91,6 @@ };

if (value === null) {
throw new Error(Text_1.default.format(StringsProxy_1.default.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(StringsProxy_1.default.isUndefinedValidateError, variableName));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isUndefinedValidateError, variableName));
}

@@ -101,3 +101,3 @@ };

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

@@ -117,15 +117,6 @@ };

Object.defineProperty(exports, "__esModule", { value: true });
var strings = {};
function setStrings(newStrings) {
for (var key in newStrings) {
if (newStrings.hasOwnProperty(key)) {
strings[key] = newStrings[key];
}
}
}
exports.setStrings = setStrings;
if (false) {
setStrings(require('./SPCoreLibraryStrings.resx').default);
}
exports.default = strings;
var strings = ( false)
? require('resx-strings/en-us.json')
: __webpack_require__(26);
exports.default = strings['_gIErrcTokcw+/VVwa+ReIA'];

@@ -140,3 +131,3 @@

Object.defineProperty(exports, "__esModule", { value: true });
var StringsProxy_1 = __webpack_require__(1);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var Text = (function () {

@@ -151,6 +142,6 @@ function Text() {

if (s === null) {
throw new Error(StringsProxy_1.default.isNullValidateError.replace('{0}', 's'));
throw new Error(SPCoreLibraryStrings_resx_1.default.isNullValidateError.replace('{0}', 's'));
}
if (s === undefined) {
throw new Error(StringsProxy_1.default.isUndefinedValidateError.replace('{0}', 's'));
throw new Error(SPCoreLibraryStrings_resx_1.default.isUndefinedValidateError.replace('{0}', 's'));
}

@@ -172,6 +163,6 @@ return s.replace(Text.FORMAT_REGEX, function (match) {

};
Text.FORMAT_REGEX = /\{\d+\}/g;
Text.FORMAT_ARGS_REGEX = /[\{\}]/g;
return Text;
}());
Text.FORMAT_REGEX = /\{\d+\}/g;
Text.FORMAT_ARGS_REGEX = /[\{\}]/g;
exports.default = Text;

@@ -189,3 +180,3 @@

var Text_1 = __webpack_require__(2);
var StringsProxy_1 = __webpack_require__(1);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var Guid = (function () {

@@ -201,3 +192,3 @@ function Guid(guid) {

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

@@ -251,6 +242,6 @@ return guid;

};
Guid.empty = new Guid('00000000-0000-0000-0000-000000000000');
Guid._guidRegEx = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
return Guid;
}());
Guid.empty = new Guid('00000000-0000-0000-0000-000000000000');
Guid._guidRegEx = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
exports.default = Guid;

@@ -266,2 +257,34 @@

Object.defineProperty(exports, "__esModule", { value: true });
var DefaultLogHandler_1 = __webpack_require__(24);
var Log = (function () {
function Log() {
}
Log._initialize = function (logHandler) {
Log._logHandler = logHandler;
};
Log.verbose = function (source, message, scope) {
Log._logHandler.verbose(source, message, scope);
};
Log.info = function (source, message, scope) {
Log._logHandler.info(source, message, scope);
};
Log.warn = function (source, message, scope) {
Log._logHandler.warn(source, message, scope);
};
Log.error = function (source, error, scope) {
Log._logHandler.error(source, error, scope);
};
Log._logHandler = new DefaultLogHandler_1.default();
return Log;
}());
exports.default = Log;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Validate_1 = __webpack_require__(0);

@@ -287,5 +310,5 @@ var ServiceKey = (function () {

};
ServiceKey._lastId = 0;
return ServiceKey;
}());
ServiceKey._lastId = 0;
exports.default = ServiceKey;

@@ -295,89 +318,2 @@

/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var UrlQueryParameterCollection = (function () {
function UrlQueryParameterCollection(url) {
this._queryParameterList = this._getUrlQueryParameterArray(url);
}
UrlQueryParameterCollection.prototype.getValue = function (param) {
for (var _i = 0, _a = this._queryParameterList; _i < _a.length; _i++) {
var queryParam = _a[_i];
if (param === undefined) {
if (queryParam.key === undefined) {
return queryParam.value;
}
continue;
}
else if (param.toUpperCase() === queryParam.key) {
return queryParam.value;
}
}
return undefined;
};
UrlQueryParameterCollection.prototype.getValues = function (param) {
var queryParams = [];
for (var _i = 0, _a = this._queryParameterList; _i < _a.length; _i++) {
var queryParam = _a[_i];
if (param === undefined) {
if (queryParam.key === undefined) {
queryParams.push(queryParam.value);
}
continue;
}
else if (param.toUpperCase() === queryParam.key) {
queryParams.push(queryParam.value);
}
}
return queryParams.length > 0 ? queryParams : undefined;
};
UrlQueryParameterCollection.prototype._getUrlQueryParameterArray = function (url) {
var queryParameterList = [];
var urlParser = document.createElement('a');
urlParser.href = url;
var queryParams = urlParser.search.substring(1).split('&');
for (var _i = 0, queryParams_1 = queryParams; _i < queryParams_1.length; _i++) {
var queryParam = queryParams_1[_i];
if (queryParam !== '') {
var equalsIndex = queryParam.indexOf('=');
var key = void 0;
var value = void 0;
if (equalsIndex < 0) {
key = queryParam;
value = undefined;
}
else if (equalsIndex === 0) {
key = '';
value = queryParam.length === 1 ? '' : queryParam.substring(1);
}
else {
key = queryParam.substring(0, equalsIndex);
value =
queryParam.substring(equalsIndex).length === 1 ?
'' :
queryParam.substring(equalsIndex + 1);
}
queryParameterList.push({
key: decodeURIComponent(key.toUpperCase()),
value: value
});
}
else {
queryParameterList.push({
key: undefined,
value: undefined
});
}
}
return queryParameterList;
};
return UrlQueryParameterCollection;
}());
exports.default = UrlQueryParameterCollection;
/***/ }),
/* 6 */

@@ -390,4 +326,4 @@ /***/ (function(module, exports, __webpack_require__) {

var Text_1 = __webpack_require__(2);
var StringsProxy_1 = __webpack_require__(1);
var Validate_1 = __webpack_require__(0);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var Version = (function () {

@@ -408,3 +344,3 @@ function Version(major, minor, patch, revision) {

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

@@ -501,25 +437,70 @@ Version.tryParse = function (versionString) {

Object.defineProperty(exports, "__esModule", { value: true });
var DefaultLogHandler_1 = __webpack_require__(21);
var Log = (function () {
function Log() {
var Validate_1 = __webpack_require__(0);
var Text_1 = __webpack_require__(2);
var Log_1 = __webpack_require__(4);
var EventManager = (function () {
function EventManager() {
this._listeners = new Map();
}
Log._initialize = function (logHandler) {
Log._logHandler = logHandler;
Object.defineProperty(EventManager, "instance", {
get: function () {
if (!this._instance) {
this._instance = new EventManager();
}
return this._instance;
},
enumerable: true,
configurable: true
});
EventManager.prototype._raiseEvent = function (eventName, eventArgs) {
var _this = this;
Validate_1.default.isNonemptyString(eventName, 'eventName');
Validate_1.default.isNotNullOrUndefined(eventArgs, 'eventArgs');
if (!this._listeners.has(eventName)) {
return;
}
this._listeners.get(eventName).forEach(function (listener) {
if (listener.observer.isDisposed) {
_this.unregisterEvent(eventName, listener.observer, listener.eventHandler);
}
else {
try {
listener.eventHandler.apply(listener.observer, eventArgs);
}
catch (e) {
var errorMessage = Text_1.default.format(
'Failed to execute event handler for component "{0}"', listener.observer.componentId);
Log_1.default.error(EventManager._logSource, new Error(errorMessage));
}
}
});
};
Log.verbose = function (source, message, scope) {
Log._logHandler.verbose(source, message, scope);
EventManager.prototype.registerEvent = function (eventName, observer, eventHandler) {
Validate_1.default.isNonemptyString(eventName, 'eventName');
Validate_1.default.isNotNullOrUndefined(observer, 'component');
Validate_1.default.isNotNullOrUndefined(eventHandler, 'eventHandler');
if (!this._listeners.has(eventName)) {
this._listeners.set(eventName, []);
}
this._listeners.get(eventName).push({ observer: observer, eventHandler: eventHandler });
};
Log.info = function (source, message, scope) {
Log._logHandler.info(source, message, scope);
EventManager.prototype.unregisterEvent = function (eventName, observer, eventHandler) {
Validate_1.default.isNonemptyString(eventName, 'eventName');
Validate_1.default.isNotNullOrUndefined(observer, 'component');
Validate_1.default.isNotNullOrUndefined(eventHandler, 'eventHandler');
if (!this._listeners.has(eventName)) {
return;
}
var filteredListeners = this._listeners.get(eventName).filter(function (el) { return el.observer !== observer || el.eventHandler !== eventHandler; });
if (filteredListeners.length === this._listeners.get(eventName).length) {
var errorMessage = Text_1.default.format(
'Failed to remove event handler for component "{0}". Event handler was not registered.', observer.componentId);
Log_1.default.error(EventManager._logSource, new Error(errorMessage));
}
this._listeners.set(eventName, filteredListeners);
};
Log.warn = function (source, message, scope) {
Log._logHandler.warn(source, message, scope);
};
Log.error = function (source, error, scope) {
Log._logHandler.error(source, error, scope);
};
return Log;
EventManager._logSource = 'EventManager';
return EventManager;
}());
Log._logHandler = new DefaultLogHandler_1.default();
exports.default = Log;
exports.default = EventManager;

@@ -686,3 +667,3 @@

var Validate_1 = __webpack_require__(0);
var StringsProxy_1 = __webpack_require__(1);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var EnvironmentType;

@@ -703,3 +684,3 @@ (function (EnvironmentType) {

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

@@ -755,15 +736,15 @@ };

};
JsonUtilities._escapableChars = /[\\\"\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JsonUtilities._substibuteChars = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"': '\\"',
'\'': '\\\'',
'\\': '\\\\'
};
return JsonUtilities;
}());
JsonUtilities._escapableChars = /[\\\"\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JsonUtilities._substibuteChars = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"': '\\"',
'\'': '\\\'',
'\\': '\\\\'
};
exports.default = JsonUtilities;

@@ -790,3 +771,3 @@

var Validate_1 = __webpack_require__(0);
var StringsProxy_1 = __webpack_require__(1);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var SPError = (function (_super) {

@@ -843,3 +824,3 @@ __extends(SPError, _super);

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

@@ -850,3 +831,3 @@ ]);

errorMessageArray = errorMessageArray.concat([
StringsProxy_1.default.spErrorCallStackText,
SPCoreLibraryStrings_resx_1.default.spErrorCallStackText,
this.stack

@@ -857,3 +838,3 @@ ]);

errorMessageArray = errorMessageArray.concat([
StringsProxy_1.default.spErrorLogPropertiesText,
SPCoreLibraryStrings_resx_1.default.spErrorLogPropertiesText,
JSON.stringify(this._logProperties)

@@ -879,22 +860,39 @@ ]);

Object.defineProperty(exports, "__esModule", { value: true });
var UrlQueryParameterCollection_1 = __webpack_require__(5);
var DISABLED_FLIGHT_PREFIX = '!';
var SPFlight = (function () {
function SPFlight() {
}
SPFlight.initialize = function (flights, allowQueryFlights) {
SPFlight.initialize = function (flights, debugFlights) {
this._isInitialized = true;
this._enabledFlightsMap = flights || [];
if (allowQueryFlights) {
if (debugFlights && debugFlights.length > 0) {
try {
var queryParams = new UrlQueryParameterCollection_1.default(window.location.href);
var debugFlights = queryParams.getValue('debugFlights');
if (debugFlights) {
this._debugFlights = debugFlights.split(',').map(function (value) { return parseInt(value, 10); });
var debugFlightStrings = debugFlights.split(',');
this._forceEnabledFlights = debugFlightStrings
.filter(function (value) { return value[0] !== DISABLED_FLIGHT_PREFIX; })
.map(function (value) { return parseInt(value, 10); })
.filter(function (value) { return !isNaN(value); });
this._forceDisabledFlights = debugFlightStrings
.filter(function (value) { return value[0] === DISABLED_FLIGHT_PREFIX; })
.map(function (value) { return parseInt(value.slice(1), 10); })
.filter(function (value) { return !isNaN(value); });
console.log("Debug flights are enabled.");
if (this._forceEnabledFlights.length > 0) {
console.log("Enabled flights: " + this._forceEnabledFlights.join(', '));
}
if (this._forceDisabledFlights.length > 0) {
console.log("Disabled flights: " + this._forceDisabledFlights.join(', '));
}
}
catch (error) {
this._debugFlights = [];
this._forceEnabledFlights = [];
this._forceDisabledFlights = [];
console.log("Error parsing debugFlights query string parameter: " + error);
}
}
else {
this._forceEnabledFlights = [];
this._forceDisabledFlights = [];
}
this._validateDebugFlights();
};

@@ -908,5 +906,8 @@ SPFlight.isEnabled = function (flight) {

}
if (this._debugFlights.indexOf(flight) !== -1) {
if (this._forceEnabledFlights.indexOf(flight) !== -1) {
return true;
}
if (this._forceDisabledFlights.indexOf(flight) !== -1) {
return false;
}
var enabledFlightsIndex = flight >> 5;

@@ -919,7 +920,14 @@ if (enabledFlightsIndex < 0 || enabledFlightsIndex >= this._enabledFlightsMap.length) {

};
SPFlight._validateDebugFlights = function () {
var debugFlightsSet = new Set(this._forceEnabledFlights.concat(this._forceDisabledFlights));
if (debugFlightsSet.size < (this._forceEnabledFlights.length + this._forceDisabledFlights.length)) {
throw new Error('There are flights that are forced to be both enabled and disabled');
}
};
SPFlight._isInitialized = false;
SPFlight._forceEnabledFlights = [];
SPFlight._forceDisabledFlights = [];
SPFlight._enabledFlightsMap = [];
return SPFlight;
}());
SPFlight._isInitialized = false;
SPFlight._debugFlights = [];
SPFlight._enabledFlightsMap = [];
exports.default = SPFlight;

@@ -936,7 +944,6 @@

var Guid_1 = __webpack_require__(3);
var UrlQueryParameterCollection_1 = __webpack_require__(5);
var SPKillSwitch = (function () {
function SPKillSwitch() {
}
SPKillSwitch.initialize = function (killSwitchGuids, allowQueryKillSwitch) {
SPKillSwitch.initialize = function (killSwitchGuids, debugKillswitches) {
this._isInitialized = true;

@@ -953,11 +960,7 @@ this._activatedKillSwitches = new Map();

}
if (allowQueryKillSwitch) {
if (debugKillswitches && debugKillswitches.length) {
try {
var queryParams = new UrlQueryParameterCollection_1.default(window.location.href);
var killSwitches = queryParams.getValue('debugKillSwitches');
if (killSwitches && killSwitches.length) {
for (var killSwitch in killSwitches.split(',').map(function (value) { return Guid_1.default.tryParse(value); })) {
if (killSwitch) {
this._activatedKillSwitches.set(killSwitch.toString(), true);
}
for (var killSwitch in debugKillswitches.split(',').map(function (value) { return Guid_1.default.tryParse(value); })) {
if (killSwitch) {
this._activatedKillSwitches.set(killSwitch.toString(), true);
}

@@ -980,6 +983,6 @@ }

};
SPKillSwitch._isInitialized = false;
SPKillSwitch._activatedKillSwitches = new Map();
return SPKillSwitch;
}());
SPKillSwitch._isInitialized = false;
SPKillSwitch._activatedKillSwitches = new Map();
exports.default = SPKillSwitch;

@@ -997,3 +1000,3 @@

var Validate_1 = __webpack_require__(0);
var Log_1 = __webpack_require__(7);
var Log_1 = __webpack_require__(4);
var Session = (function () {

@@ -1041,4 +1044,48 @@ function Session() {

Object.defineProperty(exports, "__esModule", { value: true });
var StringsProxy_1 = __webpack_require__(1);
var Validate_1 = __webpack_require__(0);
var EventManager_1 = __webpack_require__(7);
var Event = (function () {
function Event(name) {
Validate_1.default.isNonemptyString(name, 'name');
this._name = name;
}
Event.prototype.add = function (observer, eventHandler) {
Validate_1.default.isNotNullOrUndefined(observer, 'component');
Validate_1.default.isNotNullOrUndefined(eventHandler, 'eventHandler');
EventManager_1.default.instance.registerEvent(this._name, observer, eventHandler);
};
Event.prototype.remove = function (observer, eventHandler) {
Validate_1.default.isNotNullOrUndefined(observer, 'component');
Validate_1.default.isNotNullOrUndefined(eventHandler, 'eventHandler');
EventManager_1.default.instance.unregisterEvent(this._name, observer, eventHandler);
};
return Event;
}());
exports.default = Event;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var EventArgs = (function () {
function EventArgs() {
}
return EventArgs;
}());
exports.default = EventArgs;
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Text_1 = __webpack_require__(2);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var ServiceScope = (function () {

@@ -1064,6 +1111,6 @@ function ServiceScope(parent) {

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

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

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

@@ -1113,6 +1160,6 @@ this._finished = true;

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

@@ -1139,3 +1186,3 @@ this._registrations[serviceKey.id] = { serviceKey: serviceKey, service: service };

/***/ }),
/* 18 */
/* 20 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1146,3 +1193,3 @@

Object.defineProperty(exports, "__esModule", { value: true });
var ServiceKey_1 = __webpack_require__(4);
var ServiceKey_1 = __webpack_require__(5);
var RandomNumberGenerator = (function () {

@@ -1154,5 +1201,5 @@ function RandomNumberGenerator(serviceScope) {

};
RandomNumberGenerator.serviceKey = ServiceKey_1.default.create('sp-core-library:RandomNumberGenerator', RandomNumberGenerator);
return RandomNumberGenerator;
}());
RandomNumberGenerator.serviceKey = ServiceKey_1.default.create('sp-core-library:RandomNumberGenerator', RandomNumberGenerator);
exports.default = RandomNumberGenerator;

@@ -1162,3 +1209,3 @@

/***/ }),
/* 19 */
/* 21 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1169,3 +1216,3 @@

Object.defineProperty(exports, "__esModule", { value: true });
var ServiceKey_1 = __webpack_require__(4);
var ServiceKey_1 = __webpack_require__(5);
var TimeProvider = (function () {

@@ -1180,5 +1227,5 @@ function TimeProvider(serviceScope) {

};
TimeProvider.serviceKey = ServiceKey_1.default.create('sp-core-library:TimeProvider', TimeProvider);
return TimeProvider;
}());
TimeProvider.serviceKey = ServiceKey_1.default.create('sp-core-library:TimeProvider', TimeProvider);
exports.default = TimeProvider;

@@ -1188,3 +1235,3 @@

/***/ }),
/* 20 */
/* 22 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1195,3 +1242,90 @@

Object.defineProperty(exports, "__esModule", { value: true });
var lodash = __webpack_require__(22);
var UrlQueryParameterCollection = (function () {
function UrlQueryParameterCollection(url) {
this._queryParameterList = this._getUrlQueryParameterArray(url);
}
UrlQueryParameterCollection.prototype.getValue = function (param) {
for (var _i = 0, _a = this._queryParameterList; _i < _a.length; _i++) {
var queryParam = _a[_i];
if (param === undefined) {
if (queryParam.key === undefined) {
return queryParam.value;
}
continue;
}
else if (param.toUpperCase() === queryParam.key) {
return queryParam.value;
}
}
return undefined;
};
UrlQueryParameterCollection.prototype.getValues = function (param) {
var queryParams = [];
for (var _i = 0, _a = this._queryParameterList; _i < _a.length; _i++) {
var queryParam = _a[_i];
if (param === undefined) {
if (queryParam.key === undefined) {
queryParams.push(queryParam.value);
}
continue;
}
else if (param.toUpperCase() === queryParam.key) {
queryParams.push(queryParam.value);
}
}
return queryParams.length > 0 ? queryParams : undefined;
};
UrlQueryParameterCollection.prototype._getUrlQueryParameterArray = function (url) {
var queryParameterList = [];
var urlParser = document.createElement('a');
urlParser.href = url;
var queryParams = urlParser.search.substring(1).split('&');
for (var _i = 0, queryParams_1 = queryParams; _i < queryParams_1.length; _i++) {
var queryParam = queryParams_1[_i];
if (queryParam !== '') {
var equalsIndex = queryParam.indexOf('=');
var key = void 0;
var value = void 0;
if (equalsIndex < 0) {
key = queryParam;
value = undefined;
}
else if (equalsIndex === 0) {
key = '';
value = queryParam.length === 1 ? '' : queryParam.substring(1);
}
else {
key = queryParam.substring(0, equalsIndex);
value =
queryParam.substring(equalsIndex).length === 1 ?
'' :
queryParam.substring(equalsIndex + 1);
}
queryParameterList.push({
key: decodeURIComponent(key.toUpperCase()),
value: value
});
}
else {
queryParameterList.push({
key: undefined,
value: undefined
});
}
}
return queryParameterList;
};
return UrlQueryParameterCollection;
}());
exports.default = UrlQueryParameterCollection;
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var lodash = __webpack_require__(25);
var Validate_1 = __webpack_require__(0);

@@ -1216,3 +1350,3 @@ var UrlUtilities = (function () {

/***/ }),
/* 21 */
/* 24 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1224,3 +1358,3 @@

var Text_1 = __webpack_require__(2);
var StringsProxy_1 = __webpack_require__(1);
var SPCoreLibraryStrings_resx_1 = __webpack_require__(1);
var DefaultLogHandler = (function () {

@@ -1231,3 +1365,3 @@ function DefaultLogHandler() {

if (true) {
console.log(Text_1.default.format(StringsProxy_1.default.logVerboseLevelMessage, source));
console.log(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logVerboseLevelMessage, source));
}

@@ -1237,3 +1371,3 @@ };

if (true) {
console.info(Text_1.default.format(StringsProxy_1.default.logInfoLevelMessage, source));
console.info(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logInfoLevelMessage, source));
}

@@ -1243,3 +1377,3 @@ };

if (true) {
console.warn(Text_1.default.format(StringsProxy_1.default.logWarningLevelMessage, source));
console.warn(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logWarningLevelMessage, source));
}

@@ -1249,3 +1383,3 @@ };

if (true) {
console.error(Text_1.default.format(StringsProxy_1.default.logErrorLevelMessage, source, error.message));
console.error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logErrorLevelMessage, source, error.message));
}

@@ -1259,9 +1393,15 @@ };

/***/ }),
/* 22 */
/* 25 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_22__;
module.exports = __WEBPACK_EXTERNAL_MODULE_25__;
/***/ }),
/* 23 */
/* 26 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_26__;
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {

@@ -1290,13 +1430,13 @@

exports.Validate = Validate_1.default;
var UrlUtilities_1 = __webpack_require__(20);
var UrlUtilities_1 = __webpack_require__(23);
exports.UrlUtilities = UrlUtilities_1.default;
var UrlQueryParameterCollection_1 = __webpack_require__(5);
var UrlQueryParameterCollection_1 = __webpack_require__(22);
exports.UrlQueryParameterCollection = UrlQueryParameterCollection_1.default;
var TimeProvider_1 = __webpack_require__(19);
var TimeProvider_1 = __webpack_require__(21);
exports.TimeProvider = TimeProvider_1.default;
var RandomNumberGenerator_1 = __webpack_require__(18);
var RandomNumberGenerator_1 = __webpack_require__(20);
exports.RandomNumberGenerator = RandomNumberGenerator_1.default;
var ServiceKey_1 = __webpack_require__(4);
var ServiceKey_1 = __webpack_require__(5);
exports.ServiceKey = ServiceKey_1.default;
var ServiceScope_1 = __webpack_require__(17);
var ServiceScope_1 = __webpack_require__(19);
exports.ServiceScope = ServiceScope_1.default;

@@ -1314,4 +1454,10 @@ var Session_1 = __webpack_require__(16);

exports.SPError = SPError_1.default;
var Log_1 = __webpack_require__(7);
var Log_1 = __webpack_require__(4);
exports.Log = Log_1.default;
var Event_1 = __webpack_require__(17);
exports.Event = Event_1.default;
var EventArgs_1 = __webpack_require__(18);
exports.EventArgs = EventArgs_1.default;
var EventManager_1 = __webpack_require__(7);
exports._EventManager = EventManager_1.default;

@@ -1318,0 +1464,0 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Validate_1 = require("./Validate");
var StringsProxy_1 = require("./StringsProxy");
var SPCoreLibraryStrings_resx_1 = require("./SPCoreLibraryStrings.resx");
var EnvironmentType;

@@ -20,3 +20,3 @@ (function (EnvironmentType) {

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

@@ -23,0 +23,0 @@ };

@@ -108,3 +108,3 @@ import { IRandomNumberGenerator } from './serviceScope/provider/RandomNumberGenerator';

*/
private constructor(guid);
private constructor();
}

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

var Text_1 = require("./Text");
var StringsProxy_1 = require("./StringsProxy");
var SPCoreLibraryStrings_resx_1 = require("./SPCoreLibraryStrings.resx");
var Guid = (function () {

@@ -17,3 +17,3 @@ function Guid(guid) {

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

@@ -67,6 +67,6 @@ return guid;

};
Guid.empty = new Guid('00000000-0000-0000-0000-000000000000');
Guid._guidRegEx = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
return Guid;
}());
Guid.empty = new Guid('00000000-0000-0000-0000-000000000000');
Guid._guidRegEx = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
exports.default = Guid;
/**
* [ALPHA]
* Used to report the level of support for the web browser, along with a warning message.

@@ -23,3 +22,2 @@ *

/**
* [ALPHA]
* Browser support level for a component.

@@ -26,0 +24,0 @@ *

@@ -23,1 +23,6 @@ export { default as _BrowserDetection, Browser as _Browser, IBrowserInformation as _IBrowserInformation, OS as _OS } from './BrowserDetection';

export { default as ILogHandler } from './log/ILogHandler';
export { IDisposable } from './IDisposable';
export { default as Event } from './events/Event';
export { default as EventArgs } from './events/EventArgs';
export { default as _EventManager } from './events/EventManager';
export { IEventObserver } from './events/IEventObserver';

@@ -46,1 +46,7 @@ "use strict";

exports.Log = Log_1.default;
var Event_1 = require("./events/Event");
exports.Event = Event_1.default;
var EventArgs_1 = require("./events/EventArgs");
exports.EventArgs = EventArgs_1.default;
var EventManager_1 = require("./events/EventManager");
exports._EventManager = EventManager_1.default;
/**
* [ALPHA]
* Utililty code to help manipulate JSON objects/strings.

@@ -4,0 +3,0 @@ * @see {@link http://www.json.org}

@@ -16,15 +16,15 @@ "use strict";

};
JsonUtilities._escapableChars = /[\\\"\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JsonUtilities._substibuteChars = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"': '\\"',
'\'': '\\\'',
'\\': '\\\\'
};
return JsonUtilities;
}());
JsonUtilities._escapableChars = /[\\\"\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JsonUtilities._substibuteChars = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"': '\\"',
'\'': '\\\'',
'\\': '\\\\'
};
exports.default = JsonUtilities;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Text_1 = require("../Text");
var StringsProxy_1 = require("../StringsProxy");
var SPCoreLibraryStrings_resx_1 = require("./../SPCoreLibraryStrings.resx");
var DefaultLogHandler = (function () {

@@ -10,3 +10,3 @@ function DefaultLogHandler() {

if (DEBUG && !UNIT_TEST) {
console.log(Text_1.default.format(StringsProxy_1.default.logVerboseLevelMessage, source));
console.log(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logVerboseLevelMessage, source));
}

@@ -16,3 +16,3 @@ };

if (DEBUG && !UNIT_TEST) {
console.info(Text_1.default.format(StringsProxy_1.default.logInfoLevelMessage, source));
console.info(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logInfoLevelMessage, source));
}

@@ -22,3 +22,3 @@ };

if (DEBUG && !UNIT_TEST) {
console.warn(Text_1.default.format(StringsProxy_1.default.logWarningLevelMessage, source));
console.warn(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.logWarningLevelMessage, source));
}

@@ -28,3 +28,3 @@ };

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

@@ -31,0 +31,0 @@ };

import { default as ServiceScope } from '../serviceScope/ServiceScope';
/**
* [ALPHA]
* The redirectable implementation for the Log class.

@@ -5,0 +4,0 @@ *

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

};
Log._logHandler = new DefaultLogHandler_1.default();
return Log;
}());
Log._logHandler = new DefaultLogHandler_1.default();
exports.default = Log;

@@ -21,3 +21,3 @@ define([], function() {

"spErrorInnerErrorText": "INNERERROR:",
"spErrorCallStackText": "Pentwr Galwadau",
"spErrorCallStackText": "PENTWR GALWADAU:",
"spErrorLogPropertiesText": "LOGPROPERTIES:"

@@ -24,0 +24,0 @@ }

@@ -20,5 +20,5 @@ define([], function() {

"serviceScopeProvideServiceThatAlreadyExists": "A chave de serviço \"{0}\" já foi registada neste âmbito",
"spErrorInnerErrorText": "INNERERROR:",
"spErrorCallStackText": "PILHADECHAMADAS:",
"spErrorLogPropertiesText": "LOGPROPERTIES:"
"spErrorInnerErrorText": "ERRO INTERNO:",
"spErrorCallStackText": "PILHA DE CHAMADAS:",
"spErrorLogPropertiesText": "PROPRIEDADES DO REGISTO:"
}

@@ -25,0 +25,0 @@ };

define([], function() {
var strings = {
"_gIErrcTokcw+/VVwa+ReIA": {
"invalidEnvironmentTypeError": "[!!--##***ĘƞvĭŕőŋmȇŋťŤƴƥȅ ıŝ ĩŋväļıđ##--!!]",
"invalidGuidStringError": "[!!--##***Ĭŋvâłıđ ĢŮĮƊ šţřĩŋğ: \"{0}\"##--!!]",
"isFalseValidateError": "[!!--##***Ţĥȇ vāŀůȇ ƒơř \"{0}\" įś ƒàŀŝė##--!!]",
"isNullValidateError": "[!!--##***Ţĥȅ vāļūě ƒŏŗ \"{0}\" mŭśŧ ƞơţ ƀē ňũŀł##--!!]",
"isUndefinedValidateError": "[!!--##***Ţĥȅ vāľűě ƒơŗ \"{0}\" mųŝť ŋōť ɓȇ ũƞďęƒīńĕđ##--!!]",
"isEmptyStringValidateError": "[!!--##***Ťħě väľűė ƒōŗ \"{0}\" mũŝŧ ƞōť Ƅȇ àƞ ēmƿţɏ šţřĭŋĝ##--!!]",
"invalidVersionStringError": "[!!--##***Īņvȃľĭď vėŕšĭőń šţŗıńğ: \"{0}\"##--!!]",
"logVerboseLevelMessage": "[!!--##***{0}: VȆŖßŐŚȄ {1}##--!!]",
"invalidEnvironmentTypeError": "[!!--##***ĔņvıřōŋmėʼnţŦŷƿȅ ĭš įņvàľĭđ##--!!]",
"invalidGuidStringError": "[!!--##***Īʼnvǻĺĩď ĞŪĬĎ ŝťŕīƞĝ: \"{0}\"##--!!]",
"isFalseValidateError": "[!!--##***Ťħȅ vąŀůę ƒŏŕ \"{0}\" ĭş ƒãľśė##--!!]",
"isNullValidateError": "[!!--##***Ţĥĕ vāľŭē ƒōŗ \"{0}\" mũşť ňơŧ ƅě ʼnũĺľ##--!!]",
"isUndefinedValidateError": "[!!--##***Ŧĥȅ văŀũȅ ƒőŗ \"{0}\" mūśť ņōť ƅě ůƞđēƒıńȅď##--!!]",
"isEmptyStringValidateError": "[!!--##***Ţĥę vȃŀŭȇ ƒōŕ \"{0}\" mũŝť ńōŧ ƀȇ ąň ēmƥŧŷ śţŗįƞġ##--!!]",
"invalidVersionStringError": "[!!--##***Īŋvǻłīď vēřŝıơň ŝţřĭŋġ: \"{0}\"##--!!]",
"logVerboseLevelMessage": "[!!--##***{0}: VĔƦɃŐŚȄ {1}##--!!]",
"logInfoLevelMessage": "[!!--##***{0}: {1}##--!!]",
"logWarningLevelMessage": "[!!--##***{0}: ŴĂŖŇĪŅĞ {1}##--!!]",
"logErrorLevelMessage": "[!!--##***{0}: ĒƦŖƠŘ: {1}##--!!]",
"serviceScopeConsumingBeforeFinished": "[!!--##***Ċâʼnňŏŧ ćōńśųmė śȇŗvīčȇş ƀęćȃűšě ŧĥȅ śčŏƿȇ ıŝ ʼnŏť ƒĭʼnışĥēď ɏȅť##--!!]",
"serviceScopeConsumingDuringAutoCreation": "[!!--##***Ćãńƞőŧ ćơƞşűmē šȇŕvĩċĕś đųŕīņġ ŚĕŗvĭčēŚċŏƿē ąŭŧōĉŗěȃťįőň##--!!]",
"serviceScopeAlreadyFinishedError": "[!!--##***Ŧħė ŠȅřvĩčěŚċōƿȅ ĩś ãļřēâďɏ ƒįńīŝħĕđ##--!!]",
"serviceScopeProvideServiceAfterFinishedError": "[!!--##***Ćáňʼnŏť ŗȅğīšţēŗ şěřvĩčȇ ɓȅčâũśȇ ŧĥȇ şĉōƿĕ ıś ãłŕȇȃđƴ ƒıʼnĩšĥęđ##--!!]",
"serviceScopeProvideServiceThatAlreadyExists": "[!!--##***Ŧħė śĕŕvįčě ĸȅŷ \"{0}\" ħȃś àĺŗěåđŷ Ƃȇēʼn řȇĝĩšťȇŕȇď įʼn ŧĥįŝ ščőƿȅ##--!!]",
"spErrorInnerErrorText": "[!!--##***İŊŅĚŘĚŖŘŎƦ:##--!!]",
"spErrorCallStackText": "[!!--##***ĈÃĹŁŞŢÄČĶ:##--!!]",
"spErrorLogPropertiesText": "[!!--##***ŁŌĞƤŖŎƤĒŘŤĨĒŠ:##--!!]"
"logWarningLevelMessage": "[!!--##***{0}: ŴȂŔŃĮŇĜ {1}##--!!]",
"logErrorLevelMessage": "[!!--##***{0}: ĘŖŖŌŔ: {1}##--!!]",
"serviceScopeConsumingBeforeFinished": "[!!--##***Ćȁŋņŏť čőŋšūmě šĕŗvīĉěş ƅēĉàųšę ŧĥȇ śćőƿȇ ıš ņơŧ ƒĭƞĩśħēď ȳȅŧ##--!!]",
"serviceScopeConsumingDuringAutoCreation": "[!!--##***Ċȁƞńŏţ čơʼnšūmė şȇřvıčěš đũŕįƞġ ŚĕřvĩčěŜĉơƿĕ ȃůţōčŗėȃţĩōń##--!!]",
"serviceScopeAlreadyFinishedError": "[!!--##***Ŧħĕ ŜȇŕvĩčȅŜĉőƿē īŝ ȃļŕĕåđɏ ƒıʼnĭśĥȅď##--!!]",
"serviceScopeProvideServiceAfterFinishedError": "[!!--##***Ĉãņƞőŧ ŕėģīšŧěŕ şėŗvĭċę Ƃęćǻůŝę ťĥė şćơƥė ĩŝ äľŕėãđȳ ƒĭŋįşħēđ##--!!]",
"serviceScopeProvideServiceThatAlreadyExists": "[!!--##***Ťĥę śȅŕvıċē ƙȅŷ \"{0}\" ħäş ãļŕĕȁďŷ Ƅęȇń ŕĕġįşţěŕēď ĭņ ţĥįš ŝćōƥȇ##--!!]",
"spErrorInnerErrorText": "[!!--##***ĨŃŅĘŖĔŔŘƠŘ:##--!!]",
"spErrorCallStackText": "[!!--##***ĈĂĻĿŠŢȀĈƘ:##--!!]",
"spErrorLogPropertiesText": "[!!--##***ĿŎĞƤƦŎƤĖƦŢĬĘŞ:##--!!]"
}

@@ -24,0 +24,0 @@ };

{
"_gIErrcTokcw+/VVwa+ReIA": {
"invalidEnvironmentTypeError": "[!!--##***ĘƞvĭŕőŋmȇŋťŤƴƥȅ ıŝ ĩŋväļıđ##--!!]",
"invalidGuidStringError": "[!!--##***Ĭŋvâłıđ ĢŮĮƊ šţřĩŋğ: \"{0}\"##--!!]",
"isFalseValidateError": "[!!--##***Ţĥȇ vāŀůȇ ƒơř \"{0}\" įś ƒàŀŝė##--!!]",
"isNullValidateError": "[!!--##***Ţĥȅ vāļūě ƒŏŗ \"{0}\" mŭśŧ ƞơţ ƀē ňũŀł##--!!]",
"isUndefinedValidateError": "[!!--##***Ţĥȅ vāľűě ƒơŗ \"{0}\" mųŝť ŋōť ɓȇ ũƞďęƒīńĕđ##--!!]",
"isEmptyStringValidateError": "[!!--##***Ťħě väľűė ƒōŗ \"{0}\" mũŝŧ ƞōť Ƅȇ àƞ ēmƿţɏ šţřĭŋĝ##--!!]",
"invalidVersionStringError": "[!!--##***Īņvȃľĭď vėŕšĭőń šţŗıńğ: \"{0}\"##--!!]",
"logVerboseLevelMessage": "[!!--##***{0}: VȆŖßŐŚȄ {1}##--!!]",
"invalidEnvironmentTypeError": "[!!--##***ĔņvıřōŋmėʼnţŦŷƿȅ ĭš įņvàľĭđ##--!!]",
"invalidGuidStringError": "[!!--##***Īʼnvǻĺĩď ĞŪĬĎ ŝťŕīƞĝ: \"{0}\"##--!!]",
"isFalseValidateError": "[!!--##***Ťħȅ vąŀůę ƒŏŕ \"{0}\" ĭş ƒãľśė##--!!]",
"isNullValidateError": "[!!--##***Ţĥĕ vāľŭē ƒōŗ \"{0}\" mũşť ňơŧ ƅě ʼnũĺľ##--!!]",
"isUndefinedValidateError": "[!!--##***Ŧĥȅ văŀũȅ ƒőŗ \"{0}\" mūśť ņōť ƅě ůƞđēƒıńȅď##--!!]",
"isEmptyStringValidateError": "[!!--##***Ţĥę vȃŀŭȇ ƒōŕ \"{0}\" mũŝť ńōŧ ƀȇ ąň ēmƥŧŷ śţŗįƞġ##--!!]",
"invalidVersionStringError": "[!!--##***Īŋvǻłīď vēřŝıơň ŝţřĭŋġ: \"{0}\"##--!!]",
"logVerboseLevelMessage": "[!!--##***{0}: VĔƦɃŐŚȄ {1}##--!!]",
"logInfoLevelMessage": "[!!--##***{0}: {1}##--!!]",
"logWarningLevelMessage": "[!!--##***{0}: ŴĂŖŇĪŅĞ {1}##--!!]",
"logErrorLevelMessage": "[!!--##***{0}: ĒƦŖƠŘ: {1}##--!!]",
"serviceScopeConsumingBeforeFinished": "[!!--##***Ċâʼnňŏŧ ćōńśųmė śȇŗvīčȇş ƀęćȃűšě ŧĥȅ śčŏƿȇ ıŝ ʼnŏť ƒĭʼnışĥēď ɏȅť##--!!]",
"serviceScopeConsumingDuringAutoCreation": "[!!--##***Ćãńƞőŧ ćơƞşűmē šȇŕvĩċĕś đųŕīņġ ŚĕŗvĭčēŚċŏƿē ąŭŧōĉŗěȃťįőň##--!!]",
"serviceScopeAlreadyFinishedError": "[!!--##***Ŧħė ŠȅřvĩčěŚċōƿȅ ĩś ãļřēâďɏ ƒįńīŝħĕđ##--!!]",
"serviceScopeProvideServiceAfterFinishedError": "[!!--##***Ćáňʼnŏť ŗȅğīšţēŗ şěřvĩčȇ ɓȅčâũśȇ ŧĥȇ şĉōƿĕ ıś ãłŕȇȃđƴ ƒıʼnĩšĥęđ##--!!]",
"serviceScopeProvideServiceThatAlreadyExists": "[!!--##***Ŧħė śĕŕvįčě ĸȅŷ \"{0}\" ħȃś àĺŗěåđŷ Ƃȇēʼn řȇĝĩšťȇŕȇď įʼn ŧĥįŝ ščőƿȅ##--!!]",
"spErrorInnerErrorText": "[!!--##***İŊŅĚŘĚŖŘŎƦ:##--!!]",
"spErrorCallStackText": "[!!--##***ĈÃĹŁŞŢÄČĶ:##--!!]",
"spErrorLogPropertiesText": "[!!--##***ŁŌĞƤŖŎƤĒŘŤĨĒŠ:##--!!]"
"logWarningLevelMessage": "[!!--##***{0}: ŴȂŔŃĮŇĜ {1}##--!!]",
"logErrorLevelMessage": "[!!--##***{0}: ĘŖŖŌŔ: {1}##--!!]",
"serviceScopeConsumingBeforeFinished": "[!!--##***Ćȁŋņŏť čőŋšūmě šĕŗvīĉěş ƅēĉàųšę ŧĥȇ śćőƿȇ ıš ņơŧ ƒĭƞĩśħēď ȳȅŧ##--!!]",
"serviceScopeConsumingDuringAutoCreation": "[!!--##***Ċȁƞńŏţ čơʼnšūmė şȇřvıčěš đũŕįƞġ ŚĕřvĩčěŜĉơƿĕ ȃůţōčŗėȃţĩōń##--!!]",
"serviceScopeAlreadyFinishedError": "[!!--##***Ŧħĕ ŜȇŕvĩčȅŜĉőƿē īŝ ȃļŕĕåđɏ ƒıʼnĭśĥȅď##--!!]",
"serviceScopeProvideServiceAfterFinishedError": "[!!--##***Ĉãņƞőŧ ŕėģīšŧěŕ şėŗvĭċę Ƃęćǻůŝę ťĥė şćơƥė ĩŝ äľŕėãđȳ ƒĭŋįşħēđ##--!!]",
"serviceScopeProvideServiceThatAlreadyExists": "[!!--##***Ťĥę śȅŕvıċē ƙȅŷ \"{0}\" ħäş ãļŕĕȁďŷ Ƅęȇń ŕĕġįşţěŕēď ĭņ ţĥįš ŝćōƥȇ##--!!]",
"spErrorInnerErrorText": "[!!--##***ĨŃŅĘŖĔŔŘƠŘ:##--!!]",
"spErrorCallStackText": "[!!--##***ĈĂĻĿŠŢȀĈƘ:##--!!]",
"spErrorLogPropertiesText": "[!!--##***ĿŎĞƤƦŎƤĖƦŢĬĘŞ:##--!!]"
}
}
define([], function() {
var strings = {
"_gIErrcTokcw+/VVwa+ReIA": {
"invalidEnvironmentTypeError": "***ĘƞvĭřơņmęńťŢɏƥȅ ĭŝ ĩňvąŀĭđ",
"invalidGuidStringError": "***İʼnvȃłĩď ĢŪĨĎ şťŗįňĝ: \"{0}\"",
"isFalseValidateError": "***Ŧĥȇ väłŭĕ ƒōř \"{0}\" īŝ ƒåłŝȅ",
"isNullValidateError": "***Ťĥȅ vǻľųę ƒōŕ \"{0}\" můŝť ƞőŧ ƃě ńŭĺł",
"isUndefinedValidateError": "***Ţĥȇ vȃľũě ƒơŕ \"{0}\" mųšť ņōţ ƅĕ ũńďęƒĭńěď",
"isEmptyStringValidateError": "***Ţħę vàŀūĕ ƒōř \"{0}\" můśŧ ŋőŧ ƀě āƞ ēmƥťŷ śŧřīņĝ",
"invalidVersionStringError": "***İŋvăļıď vēřşĭőŋ şŧŕĭʼnġ: \"{0}\"",
"logVerboseLevelMessage": "***{0}: VĒƦʙŎŞĘ {1}",
"invalidEnvironmentTypeError": "***ĒņvĩŕōƞmęŋťŢŷƿē ĭş ĩńvàŀĩđ",
"invalidGuidStringError": "***Ĩňvàŀĭđ ĞŪĬƉ şţŗĩƞğ: \"{0}\"",
"isFalseValidateError": "***Ţħȇ vāłůĕ ƒŏř \"{0}\" ış ƒäŀšę",
"isNullValidateError": "***Ţħȇ vȁļŭȅ ƒơř \"{0}\" mūŝť ƞōŧ ƅĕ ňůĺł",
"isUndefinedValidateError": "***Ťĥę vàŀūē ƒōŕ \"{0}\" mũśţ ŋơŧ Ƅě ŭŋđėƒįŋēđ",
"isEmptyStringValidateError": "***Ŧħȅ vāļųȅ ƒőŗ \"{0}\" mūśţ ŋōŧ Ƃē äņ ėmƥťɏ şţŕīňğ",
"invalidVersionStringError": "***Ĩʼnváĺįđ věŕšīŏń śţŗįňġ: \"{0}\"",
"logVerboseLevelMessage": "***{0}: VȄŖɃŐŞĒ {1}",
"logInfoLevelMessage": "***{0}: {1}",
"logWarningLevelMessage": "***{0}: ŴĂŘŅĮŃĞ {1}",
"logErrorLevelMessage": "***{0}: ȄƦƦƠŔ: {1}",
"serviceScopeConsumingBeforeFinished": "***Ċäņƞŏť ćŏňŝūmȅ śēřvīċĕš ƃėċâųšĕ ťĥȇ šċơƿė īş ňőŧ ƒīʼnīšĥĕď ȳěţ",
"serviceScopeConsumingDuringAutoCreation": "***Čäƞňơţ čōńśũmȇ śĕŕvįćēş ďűŗĩňġ ŜȇřvĭċĕŞċōƥě ãűţŏċŕȇǻŧįōƞ",
"serviceScopeAlreadyFinishedError": "***Ŧħȇ ŞěŗvıĉēŜĉōƿȇ ĭŝ âļřĕăďɏ ƒįʼnĩšĥȅđ",
"serviceScopeProvideServiceAfterFinishedError": "***Ĉăņƞơţ ŕȇġĭšŧěř šėřvıċȅ ƀĕċåũśę ţĥĕ ŝċŏƿē įš ãłŕȅáďɏ ƒĭňışħęď",
"serviceScopeProvideServiceThatAlreadyExists": "***Ŧħę śȇřvĩĉȇ ĸęȳ \"{0}\" ĥàś âļřȅàďƴ Ƃĕȇʼn řėĝįśťėřȇď įņ ťĥĩŝ šĉōƿė",
"spErrorInnerErrorText": "***ĬŃŇĒŔĚƦŖŌŘ:",
"spErrorCallStackText": "***ĈÁĽĽŠŦÀČƘ:",
"spErrorLogPropertiesText": "***ĿŐĢƤƦŌƤĖŔŦĮȆŚ:"
"logWarningLevelMessage": "***{0}: ŴÀŖŇĮŃĜ {1}",
"logErrorLevelMessage": "***{0}: ĖƦŖŐƦ: {1}",
"serviceScopeConsumingBeforeFinished": "***Ċąŋƞőť ċơƞşůmȇ şēřvįĉȇş ɓĕĉāűšĕ ťĥē ŝčőƿȇ įŝ ņőť ƒĩŋīšħěđ ȳȇţ",
"serviceScopeConsumingDuringAutoCreation": "***Ċąňŋŏŧ ćơňśųmȇ şȇŗvĩćȇŝ ďųřĩņġ ŚęŕvıċēŜċőƥĕ āűţōċŕȇȁŧĭŏŋ",
"serviceScopeAlreadyFinishedError": "***Ťħē ŞęŕvįčėŠčōƿē īş āłŕęȃďŷ ƒĩʼnĭśĥēď",
"serviceScopeProvideServiceAfterFinishedError": "***Ĉȁŋʼnŏŧ ŕěğįşţēř šěŗvīĉē ƃȅćâūśē ţĥĕ ŝčơƥȇ īŝ āĺřēȁďƴ ƒıňıŝħȅđ",
"serviceScopeProvideServiceThatAlreadyExists": "***Ťħė ŝēřvįčȇ ĸėȳ \"{0}\" ħäš äłřĕãđɏ ƀėĕņ ŕȅĝĩşŧěŕěď īň ţħĩŝ šćŏƥȅ",
"spErrorInnerErrorText": "***ĬŃŅĒŘĒŖƦŌƦ:",
"spErrorCallStackText": "***ĆÃŁĽŠŦÃČƘ:",
"spErrorLogPropertiesText": "***ĿŎĞƤŖŎƤȄŔŢĬȆŜ:"
}

@@ -24,0 +24,0 @@ };

{
"_gIErrcTokcw+/VVwa+ReIA": {
"invalidEnvironmentTypeError": "***ĘƞvĭřơņmęńťŢɏƥȅ ĭŝ ĩňvąŀĭđ",
"invalidGuidStringError": "***İʼnvȃłĩď ĢŪĨĎ şťŗįňĝ: \"{0}\"",
"isFalseValidateError": "***Ŧĥȇ väłŭĕ ƒōř \"{0}\" īŝ ƒåłŝȅ",
"isNullValidateError": "***Ťĥȅ vǻľųę ƒōŕ \"{0}\" můŝť ƞőŧ ƃě ńŭĺł",
"isUndefinedValidateError": "***Ţĥȇ vȃľũě ƒơŕ \"{0}\" mųšť ņōţ ƅĕ ũńďęƒĭńěď",
"isEmptyStringValidateError": "***Ţħę vàŀūĕ ƒōř \"{0}\" můśŧ ŋőŧ ƀě āƞ ēmƥťŷ śŧřīņĝ",
"invalidVersionStringError": "***İŋvăļıď vēřşĭőŋ şŧŕĭʼnġ: \"{0}\"",
"logVerboseLevelMessage": "***{0}: VĒƦʙŎŞĘ {1}",
"invalidEnvironmentTypeError": "***ĒņvĩŕōƞmęŋťŢŷƿē ĭş ĩńvàŀĩđ",
"invalidGuidStringError": "***Ĩňvàŀĭđ ĞŪĬƉ şţŗĩƞğ: \"{0}\"",
"isFalseValidateError": "***Ţħȇ vāłůĕ ƒŏř \"{0}\" ış ƒäŀšę",
"isNullValidateError": "***Ţħȇ vȁļŭȅ ƒơř \"{0}\" mūŝť ƞōŧ ƅĕ ňůĺł",
"isUndefinedValidateError": "***Ťĥę vàŀūē ƒōŕ \"{0}\" mũśţ ŋơŧ Ƅě ŭŋđėƒįŋēđ",
"isEmptyStringValidateError": "***Ŧħȅ vāļųȅ ƒőŗ \"{0}\" mūśţ ŋōŧ Ƃē äņ ėmƥťɏ şţŕīňğ",
"invalidVersionStringError": "***Ĩʼnváĺįđ věŕšīŏń śţŗįňġ: \"{0}\"",
"logVerboseLevelMessage": "***{0}: VȄŖɃŐŞĒ {1}",
"logInfoLevelMessage": "***{0}: {1}",
"logWarningLevelMessage": "***{0}: ŴĂŘŅĮŃĞ {1}",
"logErrorLevelMessage": "***{0}: ȄƦƦƠŔ: {1}",
"serviceScopeConsumingBeforeFinished": "***Ċäņƞŏť ćŏňŝūmȅ śēřvīċĕš ƃėċâųšĕ ťĥȇ šċơƿė īş ňőŧ ƒīʼnīšĥĕď ȳěţ",
"serviceScopeConsumingDuringAutoCreation": "***Čäƞňơţ čōńśũmȇ śĕŕvįćēş ďűŗĩňġ ŜȇřvĭċĕŞċōƥě ãűţŏċŕȇǻŧįōƞ",
"serviceScopeAlreadyFinishedError": "***Ŧħȇ ŞěŗvıĉēŜĉōƿȇ ĭŝ âļřĕăďɏ ƒįʼnĩšĥȅđ",
"serviceScopeProvideServiceAfterFinishedError": "***Ĉăņƞơţ ŕȇġĭšŧěř šėřvıċȅ ƀĕċåũśę ţĥĕ ŝċŏƿē įš ãłŕȅáďɏ ƒĭňışħęď",
"serviceScopeProvideServiceThatAlreadyExists": "***Ŧħę śȇřvĩĉȇ ĸęȳ \"{0}\" ĥàś âļřȅàďƴ Ƃĕȇʼn řėĝįśťėřȇď įņ ťĥĩŝ šĉōƿė",
"spErrorInnerErrorText": "***ĬŃŇĒŔĚƦŖŌŘ:",
"spErrorCallStackText": "***ĈÁĽĽŠŦÀČƘ:",
"spErrorLogPropertiesText": "***ĿŐĢƤƦŌƤĖŔŦĮȆŚ:"
"logWarningLevelMessage": "***{0}: ŴÀŖŇĮŃĜ {1}",
"logErrorLevelMessage": "***{0}: ĖƦŖŐƦ: {1}",
"serviceScopeConsumingBeforeFinished": "***Ċąŋƞőť ċơƞşůmȇ şēřvįĉȇş ɓĕĉāűšĕ ťĥē ŝčőƿȇ įŝ ņőť ƒĩŋīšħěđ ȳȇţ",
"serviceScopeConsumingDuringAutoCreation": "***Ċąňŋŏŧ ćơňśųmȇ şȇŗvĩćȇŝ ďųřĩņġ ŚęŕvıċēŜċőƥĕ āűţōċŕȇȁŧĭŏŋ",
"serviceScopeAlreadyFinishedError": "***Ťħē ŞęŕvįčėŠčōƿē īş āłŕęȃďŷ ƒĩʼnĭśĥēď",
"serviceScopeProvideServiceAfterFinishedError": "***Ĉȁŋʼnŏŧ ŕěğįşţēř šěŗvīĉē ƃȅćâūśē ţĥĕ ŝčơƥȇ īŝ āĺřēȁďƴ ƒıňıŝħȅđ",
"serviceScopeProvideServiceThatAlreadyExists": "***Ťħė ŝēřvįčȇ ĸėȳ \"{0}\" ħäš äłřĕãđɏ ƀėĕņ ŕȅĝĩşŧěŕěď īň ţħĩŝ šćŏƥȅ",
"spErrorInnerErrorText": "***ĬŃŅĒŘĒŖƦŌƦ:",
"spErrorCallStackText": "***ĆÃŁĽŠŦÃČƘ:",
"spErrorLogPropertiesText": "***ĿŎĞƤŖŎƤȄŔŢĬȆŜ:"
}
}

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

};
RandomNumberGenerator.serviceKey = ServiceKey_1.default.create('sp-core-library:RandomNumberGenerator', RandomNumberGenerator);
return RandomNumberGenerator;
}());
RandomNumberGenerator.serviceKey = ServiceKey_1.default.create('sp-core-library:RandomNumberGenerator', RandomNumberGenerator);
exports.default = RandomNumberGenerator;

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

};
TimeProvider.serviceKey = ServiceKey_1.default.create('sp-core-library:TimeProvider', TimeProvider);
return TimeProvider;
}());
TimeProvider.serviceKey = ServiceKey_1.default.create('sp-core-library:TimeProvider', TimeProvider);
exports.default = TimeProvider;

@@ -29,5 +29,5 @@ import ServiceScope from './ServiceScope';

*/
static create<T>(name: string, serviceClass: {
static create<TKey>(name: string, serviceClass: {
new (serviceScope: ServiceScope);
}): ServiceKey<T>;
}): ServiceKey<TKey>;
/**

@@ -41,4 +41,4 @@ * Constructs a new ServiceKey whose default implementation will be obtained

*/
static createCustom<T>(name: string, defaultCreator: ServiceCreator<T>): ServiceKey<T>;
private constructor(id, name, defaultCreator);
static createCustom<TKey>(name: string, defaultCreator: ServiceCreator<TKey>): ServiceKey<TKey>;
private constructor();
}

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

};
ServiceKey._lastId = 0;
return ServiceKey;
}());
ServiceKey._lastId = 0;
exports.default = ServiceKey;

@@ -122,4 +122,4 @@ import ServiceKey from './ServiceKey';

startNewChild(): ServiceScope;
private constructor(parent);
private constructor();
private _processPendingCallbacks();
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StringsProxy_1 = require("../StringsProxy");
var Text_1 = require("../Text");
var SPCoreLibraryStrings_resx_1 = require("./../SPCoreLibraryStrings.resx");
var ServiceScope = (function () {

@@ -25,6 +25,6 @@ function ServiceScope(parent) {

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

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

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

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

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

@@ -80,0 +80,0 @@ this._registrations[serviceKey.id] = { serviceKey: serviceKey, service: service };

{
"$schema": "../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",
"$schema": "https://dev.office.com/json-schemas/spfx/client-side-component-manifest.schema.json",

@@ -4,0 +4,0 @@ "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",

@@ -28,3 +28,3 @@ /**

}
declare var _default: IStrings;
declare const _default: IStrings;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var strings = UNIT_TEST
var strings = (typeof UNIT_TEST === 'undefined' || UNIT_TEST)
? require('resx-strings/en-us.json')
: require('resx-strings');
exports.default = strings['_gIErrcTokcw+/VVwa+ReIA'];
/**
* [ALPHA]
* The purpose of this class is to help make the SharePoint framework errors more robust.

@@ -17,3 +16,3 @@ * On top of the base Error class functionality, this class adds the concept of error codes.

*/
innerError: Error;
innerError: Error | undefined;
/**

@@ -20,0 +19,0 @@ * Error id.

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

var Validate_1 = require("./Validate");
var StringsProxy_1 = require("./StringsProxy");
var SPCoreLibraryStrings_resx_1 = require("./SPCoreLibraryStrings.resx");
var SPError = (function (_super) {

@@ -67,3 +67,3 @@ __extends(SPError, _super);

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

@@ -74,3 +74,3 @@ ]);

errorMessageArray = errorMessageArray.concat([
StringsProxy_1.default.spErrorCallStackText,
SPCoreLibraryStrings_resx_1.default.spErrorCallStackText,
this.stack

@@ -81,3 +81,3 @@ ]);

errorMessageArray = errorMessageArray.concat([
StringsProxy_1.default.spErrorLogPropertiesText,
SPCoreLibraryStrings_resx_1.default.spErrorLogPropertiesText,
JSON.stringify(this._logProperties)

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

@@ -17,6 +17,12 @@ /**

/**
* List of SharePoint flight feature IDs. Populated through the debugFlights query string parameter.
* List of SharePoint flight feature IDs that are forced to be enabled
* through the debugFlights query string parameter.
*/
private static _debugFlights;
private static _forceEnabledFlights;
/**
* List of SharePoint flight feature IDs that are forced to be disabled
* through the debugFlights query string parameter.
*/
private static _forceDisabledFlights;
/**
* Array of bits (indexed by flight number, where 1 means that flight is enabled).

@@ -29,3 +35,3 @@ */

*/
static initialize(flights: number[], allowQueryFlights: boolean): void;
static initialize(flights: number[], debugFlights?: string): void;
/**

@@ -37,2 +43,3 @@ * NOT FOR USE BY THIRD PARTY DEVELOPERS

static isEnabled(flight: number): boolean;
private static _validateDebugFlights();
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var UrlQueryParameterCollection_1 = require("./url/UrlQueryParameterCollection");
var DISABLED_FLIGHT_PREFIX = '!';
var SPFlight = (function () {
function SPFlight() {
}
SPFlight.initialize = function (flights, allowQueryFlights) {
SPFlight.initialize = function (flights, debugFlights) {
this._isInitialized = true;
this._enabledFlightsMap = flights || [];
if (allowQueryFlights) {
if (debugFlights && debugFlights.length > 0) {
try {
var queryParams = new UrlQueryParameterCollection_1.default(window.location.href);
var debugFlights = queryParams.getValue('debugFlights');
if (debugFlights) {
this._debugFlights = debugFlights.split(',').map(function (value) { return parseInt(value, 10); });
var debugFlightStrings = debugFlights.split(',');
this._forceEnabledFlights = debugFlightStrings
.filter(function (value) { return value[0] !== DISABLED_FLIGHT_PREFIX; })
.map(function (value) { return parseInt(value, 10); })
.filter(function (value) { return !isNaN(value); });
this._forceDisabledFlights = debugFlightStrings
.filter(function (value) { return value[0] === DISABLED_FLIGHT_PREFIX; })
.map(function (value) { return parseInt(value.slice(1), 10); })
.filter(function (value) { return !isNaN(value); });
console.log("Debug flights are enabled.");
if (this._forceEnabledFlights.length > 0) {
console.log("Enabled flights: " + this._forceEnabledFlights.join(', '));
}
if (this._forceDisabledFlights.length > 0) {
console.log("Disabled flights: " + this._forceDisabledFlights.join(', '));
}
}
catch (error) {
this._debugFlights = [];
this._forceEnabledFlights = [];
this._forceDisabledFlights = [];
console.log("Error parsing debugFlights query string parameter: " + error);
}
}
else {
this._forceEnabledFlights = [];
this._forceDisabledFlights = [];
}
this._validateDebugFlights();
};

@@ -31,5 +48,8 @@ SPFlight.isEnabled = function (flight) {

}
if (this._debugFlights.indexOf(flight) !== -1) {
if (this._forceEnabledFlights.indexOf(flight) !== -1) {
return true;
}
if (this._forceDisabledFlights.indexOf(flight) !== -1) {
return false;
}
var enabledFlightsIndex = flight >> 5;

@@ -42,7 +62,14 @@ if (enabledFlightsIndex < 0 || enabledFlightsIndex >= this._enabledFlightsMap.length) {

};
SPFlight._validateDebugFlights = function () {
var debugFlightsSet = new Set(this._forceEnabledFlights.concat(this._forceDisabledFlights));
if (debugFlightsSet.size < (this._forceEnabledFlights.length + this._forceDisabledFlights.length)) {
throw new Error('There are flights that are forced to be both enabled and disabled');
}
};
SPFlight._isInitialized = false;
SPFlight._forceEnabledFlights = [];
SPFlight._forceDisabledFlights = [];
SPFlight._enabledFlightsMap = [];
return SPFlight;
}());
SPFlight._isInitialized = false;
SPFlight._debugFlights = [];
SPFlight._enabledFlightsMap = [];
exports.default = SPFlight;

@@ -16,3 +16,3 @@ import Guid from './Guid';

[key: string]: boolean;
}, allowQueryKillSwitch: boolean): void;
}, debugKillswitches?: string): void;
/**

@@ -19,0 +19,0 @@ * Returns true if the switch is activated.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Guid_1 = require("./Guid");
var UrlQueryParameterCollection_1 = require("./url/UrlQueryParameterCollection");
var SPKillSwitch = (function () {
function SPKillSwitch() {
}
SPKillSwitch.initialize = function (killSwitchGuids, allowQueryKillSwitch) {
SPKillSwitch.initialize = function (killSwitchGuids, debugKillswitches) {
this._isInitialized = true;

@@ -20,11 +19,7 @@ this._activatedKillSwitches = new Map();

}
if (allowQueryKillSwitch) {
if (debugKillswitches && debugKillswitches.length) {
try {
var queryParams = new UrlQueryParameterCollection_1.default(window.location.href);
var killSwitches = queryParams.getValue('debugKillSwitches');
if (killSwitches && killSwitches.length) {
for (var killSwitch in killSwitches.split(',').map(function (value) { return Guid_1.default.tryParse(value); })) {
if (killSwitch) {
this._activatedKillSwitches.set(killSwitch.toString(), true);
}
for (var killSwitch in debugKillswitches.split(',').map(function (value) { return Guid_1.default.tryParse(value); })) {
if (killSwitch) {
this._activatedKillSwitches.set(killSwitch.toString(), true);
}

@@ -47,6 +42,6 @@ }

};
SPKillSwitch._isInitialized = false;
SPKillSwitch._activatedKillSwitches = new Map();
return SPKillSwitch;
}());
SPKillSwitch._isInitialized = false;
SPKillSwitch._activatedKillSwitches = new Map();
exports.default = SPKillSwitch;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var index_1 = require("./index");
var test_api_1 = require("./../test-api");
var Guid_1 = require("../Guid");

@@ -22,4 +22,4 @@ describe('Guid tests', function () {

'9x4f312y-z365-45b4-b6ef-fa24e512e7e5',
index_1.TEST_UNDEFINED,
index_1.TEST_NULL
test_api_1.TEST_UNDEFINED,
test_api_1.TEST_NULL
];

@@ -29,4 +29,4 @@ var invalidNormalizedGuids = [

'9x4f312y-z365-45b4-b6ef-fa24e512e7e5',
index_1.TEST_UNDEFINED,
index_1.TEST_NULL
test_api_1.TEST_UNDEFINED,
test_api_1.TEST_NULL
];

@@ -33,0 +33,0 @@ describe('Static methods', function () {

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

var chai_2 = require("chai");
var index_1 = require("./index");
var test_api_1 = require("./../test-api");
var JsonUtilities_1 = require("../JsonUtilities");

@@ -17,4 +17,4 @@ describe('Json tests', function () {

it('Returns null for null or undefined json', function () {
chai_2.expect(JsonUtilities_1.default.encode(index_1.TEST_NULL)).to.be.undefined;
chai_2.expect(JsonUtilities_1.default.encode(index_1.TEST_UNDEFINED)).to.be.undefined;
chai_2.expect(JsonUtilities_1.default.encode(test_api_1.TEST_NULL)).to.be.undefined;
chai_2.expect(JsonUtilities_1.default.encode(test_api_1.TEST_UNDEFINED)).to.be.undefined;
});

@@ -21,0 +21,0 @@ it('Encodes json correctly', function () {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var index_1 = require("./index");
var test_api_1 = require("./../test-api");
var SPFlight_1 = require("../SPFlight");

@@ -27,23 +27,23 @@ describe('SPFlight tests', function () {

it('Can parse an undefined flights array', function () {
SPFlight_1.default.initialize(index_1.TEST_UNDEFINED, false);
SPFlight_1.default.initialize(test_api_1.TEST_UNDEFINED);
chai_1.assert.isTrue(true);
});
it('Can parse a null flights array', function () {
SPFlight_1.default.initialize(index_1.TEST_NULL, false);
SPFlight_1.default.initialize(test_api_1.TEST_NULL);
chai_1.assert.isTrue(true);
});
it('Can parse an empty flights array', function () {
SPFlight_1.default.initialize(emptyFlights, false);
SPFlight_1.default.initialize(emptyFlights);
chai_1.assert.isTrue(true);
});
it('Can parse a flights array with an undefined entry', function () {
SPFlight_1.default.initialize(flightsWithUndefined, false);
SPFlight_1.default.initialize(flightsWithUndefined);
chai_1.assert.isTrue(true);
});
it('Can parse a flights array with an null entry', function () {
SPFlight_1.default.initialize(flightsWithNull, false);
SPFlight_1.default.initialize(flightsWithNull);
chai_1.assert.isTrue(true);
});
it('Can parse a valid flights array', function () {
SPFlight_1.default.initialize(validFlights, false);
SPFlight_1.default.initialize(validFlights);
describe('Valid SPFlight Array tests', function () {

@@ -60,6 +60,6 @@ it('Can find flights contained in SPFlight object', function () {

it('Cannot find a null flight in a valid flights array', function () {
chai_1.assert.isTrue(!SPFlight_1.default.isEnabled(index_1.TEST_NULL));
chai_1.assert.isTrue(!SPFlight_1.default.isEnabled(test_api_1.TEST_NULL));
});
it('Cannot find an undefined flight in a valid flights array', function () {
chai_1.assert.isTrue(!SPFlight_1.default.isEnabled(index_1.TEST_UNDEFINED));
chai_1.assert.isTrue(!SPFlight_1.default.isEnabled(test_api_1.TEST_UNDEFINED));
});

@@ -69,2 +69,41 @@ });

});
describe('Debug flights', function () {
it('Can add an non-existing enabled flight', function () {
SPFlight_1.default.initialize(validFlights, '123');
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(123));
});
it('Can add a non-existing disabled flight', function () {
SPFlight_1.default.initialize(validFlights, '!123');
chai_1.assert.isFalse(SPFlight_1.default.isEnabled(123));
});
it('Can add an existing enabled flight', function () {
SPFlight_1.default.initialize(validFlights, '573');
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(573));
});
it('Can add an existing disabled flight', function () {
SPFlight_1.default.initialize(validFlights, '!573');
chai_1.assert.isFalse(SPFlight_1.default.isEnabled(573));
});
it('empty string initializes properly', function () {
SPFlight_1.default.initialize(validFlights, '');
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(573));
});
it('flight number followed by comma initializes properly', function () {
SPFlight_1.default.initialize(validFlights, '123,');
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(573));
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(123));
});
it('flight number preceded by comma initializes properly', function () {
SPFlight_1.default.initialize(validFlights, ',123');
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(573));
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(123));
});
it('exclamation sign initializes properly', function () {
SPFlight_1.default.initialize(validFlights, '!');
chai_1.assert.isTrue(SPFlight_1.default.isEnabled(573));
});
it('A flight both enabled and disabled causes an error', function () {
chai_1.assert.throws(function () { return SPFlight_1.default.initialize(validFlights, '5,!5'); });
});
});
});
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var index_1 = require("./index");
var test_api_1 = require("./../test-api");
var SPKillSwitch_1 = require("../SPKillSwitch");

@@ -68,47 +68,47 @@ var Guid_1 = require("../Guid");

it('Can parse an undefined killswitch array', function () {
SPKillSwitch_1.default.initialize(index_1.TEST_UNDEFINED, false);
SPKillSwitch_1.default.initialize(test_api_1.TEST_UNDEFINED);
chai_1.assert.isTrue(true);
});
it('Can parse a null killswitch array', function () {
SPKillSwitch_1.default.initialize(index_1.TEST_NULL, false);
SPKillSwitch_1.default.initialize(test_api_1.TEST_NULL);
chai_1.assert.isTrue(true);
});
it('Can parse an empty killswitch array', function () {
SPKillSwitch_1.default.initialize(emptyKillSwitches, false);
SPKillSwitch_1.default.initialize(emptyKillSwitches);
chai_1.assert.isTrue(true);
});
it('Can parse a killswitch array with an undefined entry', function () {
SPKillSwitch_1.default.initialize(validKillSwitchesWithUndefined, false);
SPKillSwitch_1.default.initialize(validKillSwitchesWithUndefined);
chai_1.assert.isTrue(true);
});
it('Can parse a killswitch array with an null entry', function () {
SPKillSwitch_1.default.initialize(validKillSwitchesWithNull, false);
SPKillSwitch_1.default.initialize(validKillSwitchesWithNull);
chai_1.assert.isTrue(true);
});
it('Can parse a normalized killswitch array with an undefined entry', function () {
SPKillSwitch_1.default.initialize(validNormalizedKillSwitchesWithUndefined, false);
SPKillSwitch_1.default.initialize(validNormalizedKillSwitchesWithUndefined);
chai_1.assert.isTrue(true);
});
it('Can parse a normalized killswitch array with an null entry', function () {
SPKillSwitch_1.default.initialize(validNormalizedKillSwitchesWithNull, false);
SPKillSwitch_1.default.initialize(validNormalizedKillSwitchesWithNull);
chai_1.assert.isTrue(true);
});
it('Can parse a valid killswitch array', function () {
SPKillSwitch_1.default.initialize(validKillSwitches, false);
SPKillSwitch_1.default.initialize(validKillSwitches);
chai_1.assert.isTrue(true);
});
it('Can parse a valid normalized killswitch array', function () {
SPKillSwitch_1.default.initialize(validNormalizedKillSwitches, false);
SPKillSwitch_1.default.initialize(validNormalizedKillSwitches);
chai_1.assert.isTrue(true);
});
it('Can parse an invalid killswitch array', function () {
SPKillSwitch_1.default.initialize(invalidKillSwitches, false);
SPKillSwitch_1.default.initialize(invalidKillSwitches);
chai_1.assert.isTrue(true);
});
it('Can parse a invalid normalized killswitch array', function () {
SPKillSwitch_1.default.initialize(invalidNormalizedKillSwitches, false);
SPKillSwitch_1.default.initialize(invalidNormalizedKillSwitches);
chai_1.assert.isTrue(true);
});
it('Can parse an array with both valid and invalidkillswitches', function () {
SPKillSwitch_1.default.initialize(validAndInvalidKillSwitches, false);
SPKillSwitch_1.default.initialize(validAndInvalidKillSwitches);
describe('SPKillSwitches object tests', function () {

@@ -126,6 +126,6 @@ it('Can find a killswitch contained in SPKillSwitch object', function () {

it('Cannot find a null killswitch in a SPKillSwitch object', function () {
chai_1.assert.isTrue(!SPKillSwitch_1.default.isActivated(index_1.TEST_NULL, '9/17/2015', 'SPEED_FeatureX'));
chai_1.assert.isTrue(!SPKillSwitch_1.default.isActivated(test_api_1.TEST_NULL, '9/17/2015', 'SPEED_FeatureX'));
});
it('Cannot find an undefined killswitch in a SPKillSwitch object', function () {
chai_1.assert.isTrue(!SPKillSwitch_1.default.isActivated(index_1.TEST_UNDEFINED, '9/17/2015', 'SPEED_FeatureX'));
chai_1.assert.isTrue(!SPKillSwitch_1.default.isActivated(test_api_1.TEST_UNDEFINED, '9/17/2015', 'SPEED_FeatureX'));
});

@@ -132,0 +132,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var index_1 = require("./index");
var test_api_1 = require("./../test-api");
var Text_1 = require("../Text");

@@ -10,4 +10,4 @@ var Guid_1 = require("../Guid");

it('should throw when using invalid input', function (done) {
chai_1.assert.throws(function () { Text_1.default.format(index_1.TEST_UNDEFINED); });
chai_1.assert.throws(function () { Text_1.default.format(index_1.TEST_NULL); });
chai_1.assert.throws(function () { Text_1.default.format(test_api_1.TEST_UNDEFINED); });
chai_1.assert.throws(function () { Text_1.default.format(test_api_1.TEST_NULL); });
done();

@@ -29,3 +29,3 @@ });

chai_1.assert.equal(Text_1.default.format('Test #{1}', 1), 'Test #{1}');
chai_1.assert.equal(Text_1.default.format('Test {0} and {1}', index_1.TEST_NULL, index_1.TEST_UNDEFINED), 'Test null and undefined');
chai_1.assert.equal(Text_1.default.format('Test {0} and {1}', test_api_1.TEST_NULL, test_api_1.TEST_UNDEFINED), 'Test null and undefined');
done();

@@ -32,0 +32,0 @@ });

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var StringsProxy_1 = require("./StringsProxy");
var SPCoreLibraryStrings_resx_1 = require("./SPCoreLibraryStrings.resx");
var Text = (function () {

@@ -13,6 +13,6 @@ function Text() {

if (s === null) {
throw new Error(StringsProxy_1.default.isNullValidateError.replace('{0}', 's'));
throw new Error(SPCoreLibraryStrings_resx_1.default.isNullValidateError.replace('{0}', 's'));
}
if (s === undefined) {
throw new Error(StringsProxy_1.default.isUndefinedValidateError.replace('{0}', 's'));
throw new Error(SPCoreLibraryStrings_resx_1.default.isUndefinedValidateError.replace('{0}', 's'));
}

@@ -34,6 +34,6 @@ return s.replace(Text.FORMAT_REGEX, function (match) {

};
Text.FORMAT_REGEX = /\{\d+\}/g;
Text.FORMAT_ARGS_REGEX = /[\{\}]/g;
return Text;
}());
Text.FORMAT_REGEX = /\{\d+\}/g;
Text.FORMAT_ARGS_REGEX = /[\{\}]/g;
exports.default = Text;
/**
* [ALPHA]
* Common helper functions for working with URLs. These utilities are intended to be simple,

@@ -4,0 +3,0 @@ * small, and very broadly applicable.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Text_1 = require("./Text");
var StringsProxy_1 = require("./StringsProxy");
var SPCoreLibraryStrings_resx_1 = require("./SPCoreLibraryStrings.resx");
var Validate = (function () {

@@ -10,3 +10,3 @@ function Validate() {

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

@@ -16,6 +16,6 @@ };

if (value === null) {
throw new Error(Text_1.default.format(StringsProxy_1.default.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(StringsProxy_1.default.isUndefinedValidateError, variableName));
throw new Error(Text_1.default.format(SPCoreLibraryStrings_resx_1.default.isUndefinedValidateError, variableName));
}

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

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

@@ -29,0 +29,0 @@ };

@@ -131,3 +131,3 @@ /**

*/
private constructor(major, minor, patch?, revision?);
private constructor();
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Text_1 = require("./Text");
var StringsProxy_1 = require("./StringsProxy");
var Validate_1 = require("./Validate");
var SPCoreLibraryStrings_resx_1 = require("./SPCoreLibraryStrings.resx");
var Version = (function () {

@@ -21,3 +21,3 @@ function Version(major, minor, patch, revision) {

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

@@ -24,0 +24,0 @@ Version.tryParse = function (versionString) {

{
"name": "@microsoft/sp-core-library",
"version": "1.1.0",
"version": "1.2.0",
"description": "SharePoint Framework core libraries",

@@ -10,3 +10,3 @@ "license": "SEE LICENSE IN \"EULA\" FOLDER",

"devDependencies": {
"@ms/sp-build-internal-web": "~0.6.0",
"@ms/sp-build-internal-web": "~0.6.1",
"@types/chai": "3.4.34",

@@ -18,4 +18,4 @@ "@types/mocha": "2.2.38",

"dependencies": {
"@microsoft/sp-lodash-subset": "~1.1.0",
"@microsoft/sp-module-interfaces": "~1.1.0",
"@microsoft/sp-lodash-subset": "~1.2.0",
"@microsoft/sp-module-interfaces": "~1.2.0",
"@types/es6-collections": "0.5.29",

@@ -22,0 +22,0 @@ "@types/webpack-env": "1.13.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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