@ovh-ux/ng-ovh-browser-alert 2.0.7 → 2.1.1
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/CHANGELOG.md +19 -0
- package/dist/cjs/index.js +72 -99
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +72 -99
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/ng-ovh-browser-alert.js +75 -102
- package/dist/umd/ng-ovh-browser-alert.js.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.1.1](https://github.com/ovh/manager/compare/@ovh-ux/ng-ovh-browser-alert@2.1.0...@ovh-ux/ng-ovh-browser-alert@2.1.1) (2023-12-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ovh-ux/ng-ovh-browser-alert
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.1.0](https://github.com/ovh/manager/compare/@ovh-ux/ng-ovh-browser-alert@2.0.7...@ovh-ux/ng-ovh-browser-alert@2.1.0) (2023-11-21)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* migrate from vuepress to vitepress ([6968c85](https://github.com/ovh/manager/commit/6968c85f00e19c41bc240abb37a50e9dacf9c5e5))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [2.0.7](https://github.com/ovh/manager/compare/@ovh-ux/ng-ovh-browser-alert@2.0.6...@ovh-ux/ng-ovh-browser-alert@2.0.7) (2023-09-07)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @ovh-ux/ng-ovh-browser-alert
|
package/dist/cjs/index.js
CHANGED
|
@@ -24,42 +24,53 @@ function _classCallCheck(instance, Constructor) {
|
|
|
24
24
|
throw new TypeError("Cannot call a class as a function");
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
27
|
function _defineProperties(target, props) {
|
|
29
28
|
for (var i = 0; i < props.length; i++) {
|
|
30
29
|
var descriptor = props[i];
|
|
31
30
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
32
31
|
descriptor.configurable = true;
|
|
33
32
|
if ("value" in descriptor) descriptor.writable = true;
|
|
34
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33
|
+
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
|
|
38
36
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
39
37
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
40
38
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
40
|
+
writable: false
|
|
41
|
+
});
|
|
41
42
|
return Constructor;
|
|
42
43
|
}
|
|
44
|
+
function _toPrimitive(input, hint) {
|
|
45
|
+
if (typeof input !== "object" || input === null) return input;
|
|
46
|
+
var prim = input[Symbol.toPrimitive];
|
|
47
|
+
if (prim !== undefined) {
|
|
48
|
+
var res = prim.call(input, hint || "default");
|
|
49
|
+
if (typeof res !== "object") return res;
|
|
50
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
51
|
+
}
|
|
52
|
+
return (hint === "string" ? String : Number)(input);
|
|
53
|
+
}
|
|
54
|
+
function _toPropertyKey(arg) {
|
|
55
|
+
var key = _toPrimitive(arg, "string");
|
|
56
|
+
return typeof key === "symbol" ? key : String(key);
|
|
57
|
+
}
|
|
43
58
|
|
|
44
59
|
var BrowserAlertController = /*#__PURE__*/function () {
|
|
45
60
|
BrowserAlertController.$inject = ["$scope", "ovhBrowserAlertService"];
|
|
46
|
-
|
|
47
61
|
function BrowserAlertController($scope, ovhBrowserAlertService) {
|
|
48
62
|
_classCallCheck(this, BrowserAlertController);
|
|
49
|
-
|
|
50
63
|
this.$scope = $scope;
|
|
51
64
|
this.ovhBrowserAlertService = ovhBrowserAlertService;
|
|
52
65
|
this.$scope.isSupported = this.ovhBrowserAlertService.isSupported();
|
|
53
66
|
this.$scope.isDeprecated = this.ovhBrowserAlertService.isDeprecated();
|
|
54
67
|
}
|
|
55
|
-
|
|
56
68
|
_createClass(BrowserAlertController, [{
|
|
57
69
|
key: "dismissAlert",
|
|
58
70
|
value: function dismissAlert() {
|
|
59
71
|
this.$scope.isDismissed = true;
|
|
60
72
|
}
|
|
61
73
|
}]);
|
|
62
|
-
|
|
63
74
|
return BrowserAlertController;
|
|
64
75
|
}();
|
|
65
76
|
|
|
@@ -82,47 +93,45 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
82
93
|
* https://github.com/ded/bowser
|
|
83
94
|
* MIT License | (c) Dustin Diaz 2015
|
|
84
95
|
*/
|
|
96
|
+
|
|
85
97
|
!function (root, name, definition) {
|
|
86
98
|
if (module.exports) module.exports = definition();else root[name] = definition();
|
|
87
99
|
}(commonjsGlobal, 'bowser', function () {
|
|
88
100
|
/**
|
|
89
101
|
* See useragents.js for examples of navigator.userAgent
|
|
90
102
|
*/
|
|
91
|
-
var t = true;
|
|
92
103
|
|
|
104
|
+
var t = true;
|
|
93
105
|
function detect(ua) {
|
|
94
106
|
function getFirstMatch(regex) {
|
|
95
107
|
var match = ua.match(regex);
|
|
96
108
|
return match && match.length > 1 && match[1] || '';
|
|
97
109
|
}
|
|
98
|
-
|
|
99
110
|
function getSecondMatch(regex) {
|
|
100
111
|
var match = ua.match(regex);
|
|
101
112
|
return match && match.length > 1 && match[2] || '';
|
|
102
113
|
}
|
|
103
|
-
|
|
104
114
|
var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase(),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
115
|
+
likeAndroid = /like android/i.test(ua),
|
|
116
|
+
android = !likeAndroid && /android/i.test(ua),
|
|
117
|
+
nexusMobile = /nexus\s*[0-6]\s*/i.test(ua),
|
|
118
|
+
nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua),
|
|
119
|
+
chromeos = /CrOS/.test(ua),
|
|
120
|
+
silk = /silk/i.test(ua),
|
|
121
|
+
sailfish = /sailfish/i.test(ua),
|
|
122
|
+
tizen = /tizen/i.test(ua),
|
|
123
|
+
webos = /(web|hpw)(o|0)s/i.test(ua),
|
|
124
|
+
windowsphone = /windows phone/i.test(ua);
|
|
125
|
+
/SamsungBrowser/i.test(ua);
|
|
126
|
+
var windows = !windowsphone && /windows/i.test(ua),
|
|
127
|
+
mac = !iosdevice && !silk && /macintosh/i.test(ua),
|
|
128
|
+
linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua),
|
|
129
|
+
edgeVersion = getSecondMatch(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),
|
|
130
|
+
versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i),
|
|
131
|
+
tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua),
|
|
132
|
+
mobile = !tablet && /[^-]mobi/i.test(ua),
|
|
133
|
+
xbox = /xbox/i.test(ua),
|
|
134
|
+
result;
|
|
126
135
|
if (/opera/i.test(ua)) {
|
|
127
136
|
// an old Opera
|
|
128
137
|
result = {
|
|
@@ -215,7 +224,6 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
215
224
|
osname: 'Windows Phone',
|
|
216
225
|
windowsphone: t
|
|
217
226
|
};
|
|
218
|
-
|
|
219
227
|
if (edgeVersion) {
|
|
220
228
|
result.msedge = t;
|
|
221
229
|
result.version = edgeVersion;
|
|
@@ -269,7 +277,6 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
269
277
|
firefox: t,
|
|
270
278
|
version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
|
|
271
279
|
};
|
|
272
|
-
|
|
273
280
|
if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
|
|
274
281
|
result.firefoxos = t;
|
|
275
282
|
result.osname = 'Firefox OS';
|
|
@@ -349,15 +356,14 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
349
356
|
name: 'Safari',
|
|
350
357
|
safari: t
|
|
351
358
|
};
|
|
352
|
-
|
|
353
359
|
if (versionIdentifier) {
|
|
354
360
|
result.version = versionIdentifier;
|
|
355
361
|
}
|
|
356
362
|
} else if (iosdevice) {
|
|
357
363
|
result = {
|
|
358
364
|
name: iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'
|
|
359
|
-
};
|
|
360
|
-
|
|
365
|
+
};
|
|
366
|
+
// WTF: version is not part of user agent in web apps
|
|
361
367
|
if (versionIdentifier) {
|
|
362
368
|
result.version = versionIdentifier;
|
|
363
369
|
}
|
|
@@ -372,9 +378,9 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
372
378
|
name: getFirstMatch(/^(.*)\/(.*) /),
|
|
373
379
|
version: getSecondMatch(/^(.*)\/(.*) /)
|
|
374
380
|
};
|
|
375
|
-
}
|
|
376
|
-
|
|
381
|
+
}
|
|
377
382
|
|
|
383
|
+
// set webkit or gecko flag for browsers based on these engines
|
|
378
384
|
if (!result.msedge && /(apple)?webkit/i.test(ua)) {
|
|
379
385
|
if (/(apple)?webkit\/537\.36/i.test(ua)) {
|
|
380
386
|
result.name = result.name || "Blink";
|
|
@@ -383,7 +389,6 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
383
389
|
result.name = result.name || "Webkit";
|
|
384
390
|
result.webkit = t;
|
|
385
391
|
}
|
|
386
|
-
|
|
387
392
|
if (!result.version && versionIdentifier) {
|
|
388
393
|
result.version = versionIdentifier;
|
|
389
394
|
}
|
|
@@ -391,9 +396,9 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
391
396
|
result.name = result.name || "Gecko";
|
|
392
397
|
result.gecko = t;
|
|
393
398
|
result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i);
|
|
394
|
-
}
|
|
395
|
-
|
|
399
|
+
}
|
|
396
400
|
|
|
401
|
+
// set OS flags for platforms that have multiple browsers
|
|
397
402
|
if (!result.windowsphone && (android || result.silk)) {
|
|
398
403
|
result.android = t;
|
|
399
404
|
result.osname = 'Android';
|
|
@@ -414,47 +419,35 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
414
419
|
result.linux = t;
|
|
415
420
|
result.osname = 'Linux';
|
|
416
421
|
}
|
|
417
|
-
|
|
418
422
|
function getWindowsVersion(s) {
|
|
419
423
|
switch (s) {
|
|
420
424
|
case 'NT':
|
|
421
425
|
return 'NT';
|
|
422
|
-
|
|
423
426
|
case 'XP':
|
|
424
427
|
return 'XP';
|
|
425
|
-
|
|
426
428
|
case 'NT 5.0':
|
|
427
429
|
return '2000';
|
|
428
|
-
|
|
429
430
|
case 'NT 5.1':
|
|
430
431
|
return 'XP';
|
|
431
|
-
|
|
432
432
|
case 'NT 5.2':
|
|
433
433
|
return '2003';
|
|
434
|
-
|
|
435
434
|
case 'NT 6.0':
|
|
436
435
|
return 'Vista';
|
|
437
|
-
|
|
438
436
|
case 'NT 6.1':
|
|
439
437
|
return '7';
|
|
440
|
-
|
|
441
438
|
case 'NT 6.2':
|
|
442
439
|
return '8';
|
|
443
|
-
|
|
444
440
|
case 'NT 6.3':
|
|
445
441
|
return '8.1';
|
|
446
|
-
|
|
447
442
|
case 'NT 10.0':
|
|
448
443
|
return '10';
|
|
449
|
-
|
|
450
444
|
default:
|
|
451
445
|
return undefined;
|
|
452
446
|
}
|
|
453
|
-
}
|
|
454
|
-
|
|
447
|
+
}
|
|
455
448
|
|
|
449
|
+
// OS version extraction
|
|
456
450
|
var osVersion = '';
|
|
457
|
-
|
|
458
451
|
if (result.windows) {
|
|
459
452
|
osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i));
|
|
460
453
|
} else if (result.windowsphone) {
|
|
@@ -476,46 +469,40 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
476
469
|
} else if (result.tizen) {
|
|
477
470
|
osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);
|
|
478
471
|
}
|
|
479
|
-
|
|
480
472
|
if (osVersion) {
|
|
481
473
|
result.osversion = osVersion;
|
|
482
|
-
}
|
|
483
|
-
|
|
474
|
+
}
|
|
484
475
|
|
|
476
|
+
// device type extraction
|
|
485
477
|
var osMajorVersion = !result.windows && osVersion.split('.')[0];
|
|
486
|
-
|
|
487
478
|
if (tablet || nexusTablet || iosdevice == 'ipad' || android && (osMajorVersion == 3 || osMajorVersion >= 4 && !mobile) || result.silk) {
|
|
488
479
|
result.tablet = t;
|
|
489
480
|
} else if (mobile || iosdevice == 'iphone' || iosdevice == 'ipod' || android || nexusMobile || result.blackberry || result.webos || result.bada) {
|
|
490
481
|
result.mobile = t;
|
|
491
|
-
}
|
|
492
|
-
// http://developer.yahoo.com/yui/articles/gbs
|
|
493
|
-
|
|
482
|
+
}
|
|
494
483
|
|
|
484
|
+
// Graded Browser Support
|
|
485
|
+
// http://developer.yahoo.com/yui/articles/gbs
|
|
495
486
|
if (result.msedge || result.msie && result.version >= 10 || result.yandexbrowser && result.version >= 15 || result.vivaldi && result.version >= 1.0 || result.chrome && result.version >= 20 || result.samsungBrowser && result.version >= 4 || result.whale && compareVersions([result.version, '1.0']) === 1 || result.mzbrowser && compareVersions([result.version, '6.0']) === 1 || result.focus && compareVersions([result.version, '1.0']) === 1 || result.firefox && result.version >= 20.0 || result.safari && result.version >= 6 || result.opera && result.version >= 10.0 || result.ios && result.osversion && result.osversion.split(".")[0] >= 6 || result.blackberry && result.version >= 10.1 || result.chromium && result.version >= 20) {
|
|
496
487
|
result.a = t;
|
|
497
488
|
} else if (result.msie && result.version < 10 || result.chrome && result.version < 20 || result.firefox && result.version < 20.0 || result.safari && result.version < 6 || result.opera && result.version < 10.0 || result.ios && result.osversion && result.osversion.split(".")[0] < 6 || result.chromium && result.version < 20) {
|
|
498
489
|
result.c = t;
|
|
499
490
|
} else result.x = t;
|
|
500
|
-
|
|
501
491
|
return result;
|
|
502
492
|
}
|
|
503
|
-
|
|
504
493
|
var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '');
|
|
505
|
-
|
|
506
494
|
bowser.test = function (browserList) {
|
|
507
495
|
for (var i = 0; i < browserList.length; ++i) {
|
|
508
496
|
var browserItem = browserList[i];
|
|
509
|
-
|
|
510
497
|
if (typeof browserItem === 'string') {
|
|
511
498
|
if (browserItem in bowser) {
|
|
512
499
|
return true;
|
|
513
500
|
}
|
|
514
501
|
}
|
|
515
502
|
}
|
|
516
|
-
|
|
517
503
|
return false;
|
|
518
504
|
};
|
|
505
|
+
|
|
519
506
|
/**
|
|
520
507
|
* Get version precisions count
|
|
521
508
|
*
|
|
@@ -525,11 +512,10 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
525
512
|
* @param {string} version
|
|
526
513
|
* @return {number}
|
|
527
514
|
*/
|
|
528
|
-
|
|
529
|
-
|
|
530
515
|
function getVersionPrecision(version) {
|
|
531
516
|
return version.split(".").length;
|
|
532
517
|
}
|
|
518
|
+
|
|
533
519
|
/**
|
|
534
520
|
* Array::map polyfill
|
|
535
521
|
*
|
|
@@ -537,22 +523,18 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
537
523
|
* @param {Function} iterator
|
|
538
524
|
* @return {Array}
|
|
539
525
|
*/
|
|
540
|
-
|
|
541
|
-
|
|
542
526
|
function map(arr, iterator) {
|
|
543
527
|
var result = [],
|
|
544
|
-
|
|
545
|
-
|
|
528
|
+
i;
|
|
546
529
|
if (Array.prototype.map) {
|
|
547
530
|
return Array.prototype.map.call(arr, iterator);
|
|
548
531
|
}
|
|
549
|
-
|
|
550
532
|
for (i = 0; i < arr.length; i++) {
|
|
551
533
|
result.push(iterator(arr[i]));
|
|
552
534
|
}
|
|
553
|
-
|
|
554
535
|
return result;
|
|
555
536
|
}
|
|
537
|
+
|
|
556
538
|
/**
|
|
557
539
|
* Calculate browser version weight
|
|
558
540
|
*
|
|
@@ -565,21 +547,22 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
565
547
|
* @param {Array<String>} versions versions to compare
|
|
566
548
|
* @return {Number} comparison result
|
|
567
549
|
*/
|
|
568
|
-
|
|
569
|
-
|
|
570
550
|
function compareVersions(versions) {
|
|
571
551
|
// 1) get common precision for both versions, for example for "10.0" and "9" it should be 2
|
|
572
552
|
var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));
|
|
573
553
|
var chunks = map(versions, function (version) {
|
|
574
|
-
var delta = precision - getVersionPrecision(version);
|
|
554
|
+
var delta = precision - getVersionPrecision(version);
|
|
575
555
|
|
|
576
|
-
|
|
556
|
+
// 2) "9" -> "9.0" (for precision = 2)
|
|
557
|
+
version = version + new Array(delta + 1).join(".0");
|
|
577
558
|
|
|
559
|
+
// 3) "9.0" -> ["000000000"", "000000009"]
|
|
578
560
|
return map(version.split("."), function (chunk) {
|
|
579
561
|
return new Array(20 - chunk.length).join("0") + chunk;
|
|
580
562
|
}).reverse();
|
|
581
|
-
});
|
|
563
|
+
});
|
|
582
564
|
|
|
565
|
+
// iterate in reverse order by reversed chunks array
|
|
583
566
|
while (--precision >= 0) {
|
|
584
567
|
// 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true)
|
|
585
568
|
if (chunks[0][precision] > chunks[1][precision]) {
|
|
@@ -594,6 +577,7 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
594
577
|
}
|
|
595
578
|
}
|
|
596
579
|
}
|
|
580
|
+
|
|
597
581
|
/**
|
|
598
582
|
* Check if browser is unsupported
|
|
599
583
|
*
|
|
@@ -612,41 +596,36 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
612
596
|
* @param {String} [ua] user agent string
|
|
613
597
|
* @return {Boolean}
|
|
614
598
|
*/
|
|
615
|
-
|
|
616
|
-
|
|
617
599
|
function isUnsupportedBrowser(minVersions, strictMode, ua) {
|
|
618
|
-
var _bowser = bowser;
|
|
600
|
+
var _bowser = bowser;
|
|
619
601
|
|
|
602
|
+
// make strictMode param optional with ua param usage
|
|
620
603
|
if (typeof strictMode === 'string') {
|
|
621
604
|
ua = strictMode;
|
|
622
605
|
strictMode = void 0;
|
|
623
606
|
}
|
|
624
|
-
|
|
625
607
|
if (strictMode === void 0) {
|
|
626
608
|
strictMode = false;
|
|
627
609
|
}
|
|
628
|
-
|
|
629
610
|
if (ua) {
|
|
630
611
|
_bowser = detect(ua);
|
|
631
612
|
}
|
|
632
|
-
|
|
633
613
|
var version = "" + _bowser.version;
|
|
634
|
-
|
|
635
614
|
for (var browser in minVersions) {
|
|
636
615
|
if (minVersions.hasOwnProperty(browser)) {
|
|
637
616
|
if (_bowser[browser]) {
|
|
638
617
|
if (typeof minVersions[browser] !== 'string') {
|
|
639
618
|
throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));
|
|
640
|
-
}
|
|
641
|
-
|
|
619
|
+
}
|
|
642
620
|
|
|
621
|
+
// browser version and min supported version.
|
|
643
622
|
return compareVersions([version, minVersions[browser]]) < 0;
|
|
644
623
|
}
|
|
645
624
|
}
|
|
646
625
|
}
|
|
647
|
-
|
|
648
626
|
return strictMode; // not found
|
|
649
627
|
}
|
|
628
|
+
|
|
650
629
|
/**
|
|
651
630
|
* Check if browser is supported
|
|
652
631
|
*
|
|
@@ -655,27 +634,24 @@ var bowser = createCommonjsModule(function (module) {
|
|
|
655
634
|
* @param {String} [ua] user agent string
|
|
656
635
|
* @return {Boolean}
|
|
657
636
|
*/
|
|
658
|
-
|
|
659
|
-
|
|
660
637
|
function check(minVersions, strictMode, ua) {
|
|
661
638
|
return !isUnsupportedBrowser(minVersions, strictMode, ua);
|
|
662
639
|
}
|
|
663
|
-
|
|
664
640
|
bowser.isUnsupportedBrowser = isUnsupportedBrowser;
|
|
665
641
|
bowser.compareVersions = compareVersions;
|
|
666
642
|
bowser.check = check;
|
|
643
|
+
|
|
667
644
|
/*
|
|
668
645
|
* Set our detect method to the main bowser object so we can
|
|
669
646
|
* reuse it to test other user agents.
|
|
670
647
|
* This is needed to implement future tests.
|
|
671
648
|
*/
|
|
672
|
-
|
|
673
649
|
bowser._detect = detect;
|
|
650
|
+
|
|
674
651
|
/*
|
|
675
652
|
* Set our detect public method to the main bowser object
|
|
676
653
|
* This is needed to implement bowser in server side
|
|
677
654
|
*/
|
|
678
|
-
|
|
679
655
|
bowser.detect = detect;
|
|
680
656
|
return bowser;
|
|
681
657
|
});
|
|
@@ -703,12 +679,10 @@ var SUPPORTED_BROWSERS = {
|
|
|
703
679
|
};
|
|
704
680
|
|
|
705
681
|
/* eslint-disable class-methods-use-this */
|
|
706
|
-
|
|
707
682
|
var BrowserAlertService = /*#__PURE__*/function () {
|
|
708
683
|
function BrowserAlertService() {
|
|
709
684
|
_classCallCheck(this, BrowserAlertService);
|
|
710
685
|
}
|
|
711
|
-
|
|
712
686
|
_createClass(BrowserAlertService, [{
|
|
713
687
|
key: "isSupported",
|
|
714
688
|
value: function isSupported() {
|
|
@@ -720,12 +694,11 @@ var BrowserAlertService = /*#__PURE__*/function () {
|
|
|
720
694
|
return !bowser.check(SUPPORTED_BROWSERS.deprecated);
|
|
721
695
|
}
|
|
722
696
|
}]);
|
|
723
|
-
|
|
724
697
|
return BrowserAlertService;
|
|
725
698
|
}();
|
|
726
699
|
|
|
727
700
|
var moduleName = 'ngOvhBrowserAlert';
|
|
728
|
-
angular__default[
|
|
701
|
+
angular__default["default"].module(moduleName, []).service('ovhBrowserAlertService', BrowserAlertService).component('ovhBrowserAlert', component);
|
|
729
702
|
|
|
730
703
|
module.exports = moduleName;
|
|
731
704
|
//# sourceMappingURL=index.js.map
|