@sumaris-net/ngx-components 1.15.4 → 1.15.7
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/bundles/sumaris-net.ngx-components.umd.js +21 -13
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/esm2015/src/app/core/form/entity-editor.class.js +5 -2
- package/esm2015/src/app/shared/dates.js +15 -1
- package/esm2015/src/app/shared/material/datetime/material.date.js +1 -1
- package/esm2015/src/app/shared/material/datetime/material.datetime.js +1 -1
- package/esm2015/src/app/shared/platforms.js +3 -11
- package/fesm2015/sumaris-net.ngx-components.js +21 -12
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/dates.d.ts +7 -0
- package/src/app/shared/platforms.d.ts +1 -6
- package/sumaris-net.ngx-components.metadata.json +1 -1
|
@@ -2616,6 +2616,20 @@
|
|
|
2616
2616
|
.tz(timezone, keepLocalTime)
|
|
2617
2617
|
.startOf('day');
|
|
2618
2618
|
};
|
|
2619
|
+
/**
|
|
2620
|
+
* Test if a date is on the given day of week
|
|
2621
|
+
* @param date
|
|
2622
|
+
* @param weekday
|
|
2623
|
+
* @param timezone
|
|
2624
|
+
*/
|
|
2625
|
+
DateUtils.isAtDay = function (date, weekday, timezone) {
|
|
2626
|
+
date = date && fromDateISOString(date);
|
|
2627
|
+
if (!date)
|
|
2628
|
+
return null;
|
|
2629
|
+
if (timezone)
|
|
2630
|
+
date = date.clone().tz(timezone).startOf('day');
|
|
2631
|
+
return date.day() === weekday;
|
|
2632
|
+
};
|
|
2619
2633
|
return DateUtils;
|
|
2620
2634
|
}());
|
|
2621
2635
|
function toDateISOString(value) {
|
|
@@ -4673,17 +4687,9 @@
|
|
|
4673
4687
|
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4674
4688
|
return expr.test(userAgent);
|
|
4675
4689
|
};
|
|
4676
|
-
var
|
|
4677
|
-
var userAgent = win.navigator.userAgent || win.navigator.vendor || window.opera;
|
|
4678
|
-
return /windows/i.test(userAgent);
|
|
4679
|
-
};
|
|
4680
|
-
/**
|
|
4681
|
-
* Detect desktop, by fine cursor. See https://github.com/ionic-team/ionic-framework/issues/19942
|
|
4682
|
-
* @param win
|
|
4683
|
-
*/
|
|
4684
|
-
var isDesktop = function (win) { return matchMedia(win, '(any-pointer:fine)'); };
|
|
4690
|
+
var isWindows = function (win) { return testUserAgent(win, /windows/i); };
|
|
4685
4691
|
var isTouchUi = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
|
|
4686
|
-
var isMobile = function (win) { return isTouchUi(win) && !
|
|
4692
|
+
var isMobile = function (win) { return isTouchUi(win) && !isWindows(win); };
|
|
4687
4693
|
var isIpad = function (win) {
|
|
4688
4694
|
// iOS 12 and below
|
|
4689
4695
|
if (testUserAgent(win, /iPad/i)) {
|
|
@@ -28339,7 +28345,10 @@
|
|
|
28339
28345
|
}
|
|
28340
28346
|
};
|
|
28341
28347
|
AppEntityEditor.prototype.setError = function (err, opts) {
|
|
28342
|
-
if (!err
|
|
28348
|
+
if (!err) {
|
|
28349
|
+
this.error = undefined;
|
|
28350
|
+
}
|
|
28351
|
+
else if (typeof err === 'string') {
|
|
28343
28352
|
console.error('[entity-editor] Error: ' + (err || ''));
|
|
28344
28353
|
this.error = err;
|
|
28345
28354
|
}
|
|
@@ -31512,7 +31521,6 @@
|
|
|
31512
31521
|
exports.isAndroid = isAndroid;
|
|
31513
31522
|
exports.isControlHasInput = isControlHasInput;
|
|
31514
31523
|
exports.isCordova = isCordova;
|
|
31515
|
-
exports.isDesktop = isDesktop;
|
|
31516
31524
|
exports.isEmptyArray = isEmptyArray;
|
|
31517
31525
|
exports.isIOS = isIOS;
|
|
31518
31526
|
exports.isInputElement = isInputElement;
|
|
@@ -31532,7 +31540,7 @@
|
|
|
31532
31540
|
exports.isProgressEvent = isProgressEvent;
|
|
31533
31541
|
exports.isResponseEvent = isResponseEvent;
|
|
31534
31542
|
exports.isTouchUi = isTouchUi;
|
|
31535
|
-
exports.
|
|
31543
|
+
exports.isWindows = isWindows;
|
|
31536
31544
|
exports.joinProperties = joinProperties;
|
|
31537
31545
|
exports.joinPropertiesPath = joinPropertiesPath;
|
|
31538
31546
|
exports.logFormErrors = logFormErrors;
|