nice-elements 1.7.1 → 1.7.3
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 +13 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +16 -3
- package/dist/nice.min.js +1 -1
- package/dist/style.css +16 -3
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-date-input/nice-date-input.scss +2 -0
- package/src/components/nice-dropdown/nice-dropdown.scss +1 -0
- package/src/components/nice-input/nice-input.html +4 -1
- package/src/components/nice-input/nice-input.js +6 -0
- package/src/filters/nice-date.js +5 -2
- package/src/filters/nice-highlight.js +1 -0
- package/src/styles/_nice-buttons.scss +9 -3
- package/src/styles/_nice-common.scss +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.7.3 (22.12.2022)
|
|
4
|
+
|
|
5
|
+
- added regex error and regex-raw to nice input component
|
|
6
|
+
|
|
7
|
+
## v1.7.2 (15.12.2022)
|
|
8
|
+
|
|
9
|
+
- fixed nice dropdown alignment,
|
|
10
|
+
- fixed input addon border color on focus,
|
|
11
|
+
- fixed nice highlight null value,
|
|
12
|
+
- added more button icon and text margins,
|
|
13
|
+
- added addSeconds to niceDate filter,
|
|
14
|
+
- added filters example page
|
|
15
|
+
|
|
3
16
|
## v1.7.1 (8.12.2022)
|
|
4
17
|
|
|
5
18
|
- fixed nice-date-input,
|
package/README.md
CHANGED
package/bower.json
CHANGED
package/dist/nice.js
CHANGED
|
@@ -3597,6 +3597,8 @@ angular.module('niceElements')
|
|
|
3597
3597
|
type: '@',
|
|
3598
3598
|
title: '@?',
|
|
3599
3599
|
regex: '@?',
|
|
3600
|
+
regexRaw: '@?',
|
|
3601
|
+
regexError: '@?',
|
|
3600
3602
|
placeholder: '@',
|
|
3601
3603
|
min: '@?',
|
|
3602
3604
|
max: '@?',
|
|
@@ -3687,6 +3689,10 @@ angular.module('niceElements')
|
|
|
3687
3689
|
scope.regexexp = new RegExp(scope.regex);
|
|
3688
3690
|
}
|
|
3689
3691
|
|
|
3692
|
+
if (angular.isDefined(scope.regexRaw) && scope.regexRaw != '') {
|
|
3693
|
+
scope.regexexp = regexRaw;
|
|
3694
|
+
}
|
|
3695
|
+
|
|
3690
3696
|
scope.$watch('model', function (value_new, value_old) {
|
|
3691
3697
|
scope.internalModel = scope.model;
|
|
3692
3698
|
});
|
|
@@ -5394,9 +5400,12 @@ angular.module('niceElements')
|
|
|
5394
5400
|
* Filter in the niceElements.
|
|
5395
5401
|
*/
|
|
5396
5402
|
angular.module('niceElements').filter('niceDate', function () {
|
|
5397
|
-
return function(object,
|
|
5403
|
+
return function (object, addTime, addSeconds) {
|
|
5398
5404
|
var formatString = "D.M.YYYY";
|
|
5399
|
-
if (
|
|
5405
|
+
if (addTime) {
|
|
5406
|
+
formatString = "D.M.YYYY • H:mm";
|
|
5407
|
+
if (addSeconds) formatString += ":ss";
|
|
5408
|
+
}
|
|
5400
5409
|
return moment(object).format(formatString);
|
|
5401
5410
|
};
|
|
5402
5411
|
});
|
|
@@ -5410,6 +5419,7 @@ angular.module('niceElements').filter('niceDate', function () {
|
|
|
5410
5419
|
*/
|
|
5411
5420
|
angular.module('niceElements').filter('niceHighlight', function () {
|
|
5412
5421
|
return function (value, highlightedText) {
|
|
5422
|
+
if (!value) return "";
|
|
5413
5423
|
var regex = new RegExp(highlightedText, 'gmi');
|
|
5414
5424
|
var newValue = String(value).replace(regex, "<span class='nice-highligh'>$&</span>");
|
|
5415
5425
|
return newValue;
|
|
@@ -6066,7 +6076,10 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6066
6076
|
"</div>\n" +
|
|
6067
6077
|
"<div ng-if=\"forma.$error && forma.$dirty\">\n" +
|
|
6068
6078
|
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.email\" translate translate-context=\"Nice\">Email is not valid.</div>\n" +
|
|
6069
|
-
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\"
|
|
6079
|
+
"<div class=\"error-message\" ng-if=\"forma.$dirty && forma.$error.pattern\">\n" +
|
|
6080
|
+
"<span ng-if=\"regexError\">{{ regexError }}</span>\n" +
|
|
6081
|
+
"<span ng-if=\"!regexError\" translate translate-context=\"Nice\">This field requires a specific pattern.</span>\n" +
|
|
6082
|
+
"</div>\n" +
|
|
6070
6083
|
"<div class=\"error-message\" ng-if=\"forma.$error.minlength\">\n" +
|
|
6071
6084
|
"<translate translate-context=\"Nice\">Your input is too short. It must contain at least</translate> {{ minlength }} <translate translate-context=\"Nice\">characters</translate>.\n" +
|
|
6072
6085
|
"</div>\n" +
|