@digipair/skill-web-notification 0.8.14 → 0.8.16
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/index.cjs.js +12 -0
- package/index.esm.js +12 -0
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -371,6 +371,7 @@ function _instanceof(left, right) {
|
|
|
371
371
|
|
|
372
372
|
var toastify = toastify$1.exports;
|
|
373
373
|
|
|
374
|
+
const BASE_URL = 'https://cdn.jsdelivr.net/npm';
|
|
374
375
|
const Toastify = toastify;
|
|
375
376
|
let NotificationService = class NotificationService {
|
|
376
377
|
async information(params, _pinsSettingsList, _context) {
|
|
@@ -397,6 +398,17 @@ let NotificationService = class NotificationService {
|
|
|
397
398
|
duration: 3000
|
|
398
399
|
}).showToast();
|
|
399
400
|
}
|
|
401
|
+
constructor(){
|
|
402
|
+
let link = document.querySelector('#digipair-skill-web-notification-css');
|
|
403
|
+
if (!link) {
|
|
404
|
+
link = document.createElement('link');
|
|
405
|
+
link.id = 'digipair-skill-web-notification-css';
|
|
406
|
+
link.rel = 'stylesheet';
|
|
407
|
+
link.href = `${BASE_URL}/toastify-js/src/toastify.min.css`;
|
|
408
|
+
link.type = 'text/css';
|
|
409
|
+
document.head.appendChild(link);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
400
412
|
};
|
|
401
413
|
const information = (params, pinsSettingsList, context)=>new NotificationService().information(params, pinsSettingsList, context);
|
|
402
414
|
const error = (params, pinsSettingsList, context)=>new NotificationService().error(params, pinsSettingsList, context);
|
package/index.esm.js
CHANGED
|
@@ -367,6 +367,7 @@ function _instanceof(left, right) {
|
|
|
367
367
|
|
|
368
368
|
var toastify = toastify$1.exports;
|
|
369
369
|
|
|
370
|
+
const BASE_URL = 'https://cdn.jsdelivr.net/npm';
|
|
370
371
|
const Toastify = toastify;
|
|
371
372
|
let NotificationService = class NotificationService {
|
|
372
373
|
async information(params, _pinsSettingsList, _context) {
|
|
@@ -393,6 +394,17 @@ let NotificationService = class NotificationService {
|
|
|
393
394
|
duration: 3000
|
|
394
395
|
}).showToast();
|
|
395
396
|
}
|
|
397
|
+
constructor(){
|
|
398
|
+
let link = document.querySelector('#digipair-skill-web-notification-css');
|
|
399
|
+
if (!link) {
|
|
400
|
+
link = document.createElement('link');
|
|
401
|
+
link.id = 'digipair-skill-web-notification-css';
|
|
402
|
+
link.rel = 'stylesheet';
|
|
403
|
+
link.href = `${BASE_URL}/toastify-js/src/toastify.min.css`;
|
|
404
|
+
link.type = 'text/css';
|
|
405
|
+
document.head.appendChild(link);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
396
408
|
};
|
|
397
409
|
const information = (params, pinsSettingsList, context)=>new NotificationService().information(params, pinsSettingsList, context);
|
|
398
410
|
const error = (params, pinsSettingsList, context)=>new NotificationService().error(params, pinsSettingsList, context);
|