@osimatic/helpers-js 1.0.43 → 1.0.44
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.js +2 -1
- package/package.json +1 -1
- package/visitor.js +22 -0
package/index.js
CHANGED
|
@@ -21,6 +21,7 @@ const { sleep, refresh } = require('./util');
|
|
|
21
21
|
const { chr, ord, trim, empty } = require('./php.min');
|
|
22
22
|
|
|
23
23
|
// exports plugins "maison"
|
|
24
|
+
const { Browser } = require('./visitor');
|
|
24
25
|
const { DataTable } = require('./data_table');
|
|
25
26
|
const { Pagination, Navigation } = require('./paging');
|
|
26
27
|
const { DetailsSubArray } = require('./details_sub_array');
|
|
@@ -44,7 +45,7 @@ const { OpenStreetMap } = require('./open_street_map');
|
|
|
44
45
|
module.exports = {
|
|
45
46
|
Array, Object, Number, String,
|
|
46
47
|
HTTPRequest, Cookie, UrlAndQueryString, IBAN, BankCard, AudioMedia, UserMedia, PersonName, Email, TelephoneNumber, DateTime, TimestampUnix, SqlDate, SqlTime, SqlDateTime, Duration, File, CSV, Img, FormHelper, Country, PostalAddress, GeographicCoordinates, SocialNetwork,
|
|
47
|
-
DataTable, Pagination, Navigation, DetailsSubArray, SelectAll, MultipleActionInTable, FormDate, InputPeriod, ShoppingCart, FlashMessage, CountDown, ImportFromCsv, JwtToken, JwtSession, ListBox, WebRTC,
|
|
48
|
+
Browser, DataTable, Pagination, Navigation, DetailsSubArray, SelectAll, MultipleActionInTable, FormDate, InputPeriod, ShoppingCart, FlashMessage, CountDown, ImportFromCsv, JwtToken, JwtSession, ListBox, WebRTC,
|
|
48
49
|
sleep, refresh, chr, ord, trim, empty,
|
|
49
50
|
GoogleCharts, GoogleRecaptcha, GoogleMap, OpenStreetMap
|
|
50
51
|
};
|
package/package.json
CHANGED
package/visitor.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
class Browser {
|
|
2
|
+
static isOpera() {
|
|
3
|
+
return (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
|
|
4
|
+
}
|
|
5
|
+
static isFirefox() {
|
|
6
|
+
return typeof InstallTrigger !== 'undefined';
|
|
7
|
+
}
|
|
8
|
+
static isSafari() {
|
|
9
|
+
return Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
|
|
10
|
+
}
|
|
11
|
+
static isChrome() {
|
|
12
|
+
return !!window.chrome && !!window.chrome.webstore;
|
|
13
|
+
}
|
|
14
|
+
static isIE() {
|
|
15
|
+
return /*@cc_on!@*/false || !!document.documentMode;
|
|
16
|
+
}
|
|
17
|
+
static isEdge() {
|
|
18
|
+
return !isIE && !!window.StyleMedia;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = { Browser };
|