@schibsted/account-sdk-browser 5.2.2 → 5.2.5
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/README.md +78 -58
- package/es5/global.js +79 -17
- 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 +68 -12
- 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 +79 -17
- 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 +34 -1
- 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/package.json +1 -1
- package/src/global-registry.js +20 -0
- package/src/identity.d.ts +24 -3
- package/src/identity.js +35 -12
- package/src/monetization.js +2 -0
- package/src/payment.js +2 -0
- package/src/version.js +1 -1
package/es5/payment.js
CHANGED
|
@@ -787,6 +787,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
787
787
|
/* harmony import */ var _popup_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(136);
|
|
788
788
|
/* harmony import */ var _RESTClient_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(149);
|
|
789
789
|
/* harmony import */ var _spidTalk_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(175);
|
|
790
|
+
/* harmony import */ var _global_registry_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(176);
|
|
790
791
|
/* Copyright 2024 Schibsted Products & Technology AS. Licensed under the terms of the MIT license.
|
|
791
792
|
* See LICENSE.md in the project root.
|
|
792
793
|
*/
|
|
@@ -815,6 +816,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
815
816
|
|
|
816
817
|
|
|
817
818
|
|
|
819
|
+
|
|
818
820
|
var globalWindow = function globalWindow() {
|
|
819
821
|
return window;
|
|
820
822
|
};
|
|
@@ -850,6 +852,7 @@ var Payment = /*#__PURE__*/function () {
|
|
|
850
852
|
this.publisher = publisher;
|
|
851
853
|
this._setSpidServerUrl(env);
|
|
852
854
|
this._setBffServerUrl(env);
|
|
855
|
+
Object(_global_registry_js__WEBPACK_IMPORTED_MODULE_16__["registerGlobal"])(window, 'Payment', this);
|
|
853
856
|
}
|
|
854
857
|
|
|
855
858
|
/**
|
|
@@ -8815,6 +8818,36 @@ function emulate(global) {
|
|
|
8815
8818
|
}
|
|
8816
8819
|
}
|
|
8817
8820
|
|
|
8821
|
+
/***/ }),
|
|
8822
|
+
/* 176 */
|
|
8823
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
8824
|
+
|
|
8825
|
+
"use strict";
|
|
8826
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8827
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerGlobal", function() { return registerGlobal; });
|
|
8828
|
+
/**
|
|
8829
|
+
* Registers a component as a property on the provided global object, if not already registered, and dispatches an event to notify listeners.
|
|
8830
|
+
* The event is dispatched on `document` and will have the name `$sch${componentClassName}:ready` and a `detail` property with the instance.
|
|
8831
|
+
*
|
|
8832
|
+
* @param {any} global typically `window`
|
|
8833
|
+
* @param {string} componentClassName the name of the component to register, 'identity', 'monetization' or 'payment'
|
|
8834
|
+
* @param {any} instance the instance of the component to register
|
|
8835
|
+
* @returns {void}
|
|
8836
|
+
*/
|
|
8837
|
+
var registerGlobal = function registerGlobal(global, componentClassName, instance) {
|
|
8838
|
+
var prefixedName = "sch".concat(componentClassName);
|
|
8839
|
+
if (!global[prefixedName]) {
|
|
8840
|
+
global[prefixedName] = instance;
|
|
8841
|
+
}
|
|
8842
|
+
if (typeof global.dispatchEvent === 'function') {
|
|
8843
|
+
global.dispatchEvent(new CustomEvent("".concat(prefixedName, ":ready"), {
|
|
8844
|
+
detail: {
|
|
8845
|
+
instance: instance
|
|
8846
|
+
}
|
|
8847
|
+
}));
|
|
8848
|
+
}
|
|
8849
|
+
};
|
|
8850
|
+
|
|
8818
8851
|
/***/ })
|
|
8819
8852
|
/******/ ]);
|
|
8820
8853
|
//# sourceMappingURL=payment.js.map
|