@schibsted/account-sdk-browser 5.2.3 → 5.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/README.md +79 -59
- package/es5/global.js +127 -60
- package/es5/global.js.map +1 -1
- package/es5/global.min.js +1 -1
- package/es5/global.min.js.map +1 -1
- package/es5/identity.js +34 -1
- package/es5/identity.js.map +1 -1
- package/es5/identity.min.js +1 -1
- package/es5/identity.min.js.map +1 -1
- package/es5/index.js +127 -60
- package/es5/index.js.map +1 -1
- package/es5/index.min.js +1 -1
- package/es5/index.min.js.map +1 -1
- package/es5/monetization.js +615 -554
- package/es5/monetization.js.map +1 -1
- package/es5/monetization.min.js +1 -1
- package/es5/monetization.min.js.map +1 -1
- package/es5/payment.js +33 -0
- package/es5/payment.js.map +1 -1
- package/es5/payment.min.js +1 -1
- package/es5/payment.min.js.map +1 -1
- package/identity.js +1 -1
- package/index.js +1 -1
- package/monetization.js +1 -1
- package/package.json +1 -1
- package/payment.js +1 -1
- package/src/global-registry.js +20 -0
- package/src/identity.js +4 -0
- package/src/monetization.js +20 -6
- package/src/payment.js +2 -0
- package/src/version.js +1 -1
package/es5/identity.js
CHANGED
|
@@ -883,6 +883,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
883
883
|
/* harmony import */ var _SDKError_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(189);
|
|
884
884
|
/* harmony import */ var _spidTalk_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(222);
|
|
885
885
|
/* harmony import */ var _version_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(223);
|
|
886
|
+
/* harmony import */ var _global_registry_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(224);
|
|
886
887
|
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
|
|
887
888
|
* See LICENSE.md in the project root.
|
|
888
889
|
*/
|
|
@@ -972,6 +973,7 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
972
973
|
|
|
973
974
|
|
|
974
975
|
|
|
976
|
+
|
|
975
977
|
/**
|
|
976
978
|
* @typedef {object} LoginOptions
|
|
977
979
|
* @property {string} state - An opaque value used by the client to maintain state between
|
|
@@ -1180,6 +1182,7 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
|
|
|
1180
1182
|
_this._setOauthServerUrl(env);
|
|
1181
1183
|
_this._setGlobalSessionServiceUrl(env);
|
|
1182
1184
|
_this._unblockSessionCall();
|
|
1185
|
+
Object(_global_registry_js__WEBPACK_IMPORTED_MODULE_66__["registerGlobal"])(window, 'Identity', _assertThisInitialized(_this));
|
|
1183
1186
|
return _this;
|
|
1184
1187
|
}
|
|
1185
1188
|
|
|
@@ -12166,9 +12169,39 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12166
12169
|
|
|
12167
12170
|
|
|
12168
12171
|
|
|
12169
|
-
var version = '5.2.
|
|
12172
|
+
var version = '5.2.6';
|
|
12170
12173
|
/* harmony default export */ __webpack_exports__["default"] = (version);
|
|
12171
12174
|
|
|
12175
|
+
/***/ }),
|
|
12176
|
+
/* 224 */
|
|
12177
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12178
|
+
|
|
12179
|
+
"use strict";
|
|
12180
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12181
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerGlobal", function() { return registerGlobal; });
|
|
12182
|
+
/**
|
|
12183
|
+
* Registers a component as a property on the provided global object, if not already registered, and dispatches an event to notify listeners.
|
|
12184
|
+
* The event is dispatched on `document` and will have the name `$sch${componentClassName}:ready` and a `detail` property with the instance.
|
|
12185
|
+
*
|
|
12186
|
+
* @param {any} global typically `window`
|
|
12187
|
+
* @param {string} componentClassName the name of the component to register, 'identity', 'monetization' or 'payment'
|
|
12188
|
+
* @param {any} instance the instance of the component to register
|
|
12189
|
+
* @returns {void}
|
|
12190
|
+
*/
|
|
12191
|
+
var registerGlobal = function registerGlobal(global, componentClassName, instance) {
|
|
12192
|
+
var prefixedName = "sch".concat(componentClassName);
|
|
12193
|
+
if (!global[prefixedName]) {
|
|
12194
|
+
global[prefixedName] = instance;
|
|
12195
|
+
}
|
|
12196
|
+
if (typeof global.dispatchEvent === 'function') {
|
|
12197
|
+
global.dispatchEvent(new CustomEvent("".concat(prefixedName, ":ready"), {
|
|
12198
|
+
detail: {
|
|
12199
|
+
instance: instance
|
|
12200
|
+
}
|
|
12201
|
+
}));
|
|
12202
|
+
}
|
|
12203
|
+
};
|
|
12204
|
+
|
|
12172
12205
|
/***/ })
|
|
12173
12206
|
/******/ ]);
|
|
12174
12207
|
//# sourceMappingURL=identity.js.map
|