@osimatic/helpers-js 1.5.13 → 1.5.14
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/form_helper.js +0 -12
- package/media.js +2 -9
- package/package.json +4 -4
package/form_helper.js
CHANGED
|
@@ -200,18 +200,6 @@ class FormHelper {
|
|
|
200
200
|
|
|
201
201
|
static initTypeFields(form) {
|
|
202
202
|
form = toEl(form);
|
|
203
|
-
if (typeof Modernizr != 'undefined') {
|
|
204
|
-
if (!Modernizr.inputtypes.date) {
|
|
205
|
-
form.querySelectorAll('input[type="date"]').forEach(el => el.style.maxWidth = '120px');
|
|
206
|
-
}
|
|
207
|
-
if (!Modernizr.inputtypes.time) {
|
|
208
|
-
form.querySelectorAll('input[type="time"]').forEach(el => {
|
|
209
|
-
el.style.maxWidth = '100px';
|
|
210
|
-
el.placeholder = 'hh:mm';
|
|
211
|
-
});
|
|
212
|
-
form.querySelectorAll('input[type="time"][step="1"]').forEach(el => el.placeholder = 'hh:mm:ss');
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
203
|
|
|
216
204
|
// Show/Hide password
|
|
217
205
|
form.querySelectorAll('input[type="password"]').forEach(inputEl => {
|
package/media.js
CHANGED
|
@@ -157,16 +157,9 @@ class UserMedia {
|
|
|
157
157
|
/** Generic => all other errors */
|
|
158
158
|
|
|
159
159
|
static requestMediaPermissions(constraints) {
|
|
160
|
-
/*try {
|
|
161
|
-
console.log(require.resolve("bowser"));
|
|
162
|
-
} catch(e) {
|
|
163
|
-
return;
|
|
164
|
-
}*/
|
|
165
|
-
|
|
166
160
|
return new Promise((resolve, reject) => {
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const browserName = browser.getBrowserName();
|
|
161
|
+
const { UAParser } = require('ua-parser-js');
|
|
162
|
+
const browserName = new UAParser(window.navigator.userAgent).getBrowser().name;
|
|
170
163
|
|
|
171
164
|
navigator.mediaDevices.getUserMedia(typeof constraints !== 'undefined' ? constraints : { audio: true, video: true })
|
|
172
165
|
.then((stream) => resolve(stream))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osimatic/helpers-js",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.14",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -18,9 +18,6 @@
|
|
|
18
18
|
"libphonenumber-js": "^1.12.39",
|
|
19
19
|
"ua-parser-js": "^2.0.9"
|
|
20
20
|
},
|
|
21
|
-
"publishConfig": {
|
|
22
|
-
"access": "public"
|
|
23
|
-
},
|
|
24
21
|
"peerDependencies": {
|
|
25
22
|
"intl-tel-input": ">=19.0",
|
|
26
23
|
"leaflet": ">=1.9"
|
|
@@ -30,6 +27,9 @@
|
|
|
30
27
|
"jest-environment-jsdom": "^30.2.0",
|
|
31
28
|
"whatwg-fetch": "^3.6.20"
|
|
32
29
|
},
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
},
|
|
33
33
|
"jest": {
|
|
34
34
|
"testEnvironment": "node",
|
|
35
35
|
"testMatch": [
|