nice-elements 1.11.0 → 1.11.2
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 +10 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +24 -13
- package/dist/nice.min.js +1 -1
- package/dist/style.css +7 -4
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +1 -1
- package/package.json +1 -1
- package/src/components/nice-calendar/nice-calendar.js +19 -9
- package/src/components/nice-calendar/nice-calendar.scss +7 -4
- package/src/components/nice-input/nice-input.html +2 -2
- package/src/components/nice-input/nice-input.js +1 -0
- package/src/components/nice-slot/nice-slot.js +1 -1
- package/src/services/nice-service.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.11.2 (20.2.2025)
|
|
4
|
+
|
|
5
|
+
- worked on nice calendar popup
|
|
6
|
+
- added nullable prop to nice calendar
|
|
7
|
+
|
|
8
|
+
## v1.11.1 (17.1.2025)
|
|
9
|
+
|
|
10
|
+
- added autocomplete to nice-input,
|
|
11
|
+
- fixed nice slot niceTitle
|
|
12
|
+
|
|
3
13
|
## v1.11.0 (11.12.2024)
|
|
4
14
|
|
|
5
15
|
- created nice virtual scroll component,
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Nice elements v1.11.
|
|
3
|
+
# Nice elements v1.11.2
|
|
4
4
|
|
|
5
5
|
Nice elements is an AngularJS v1.5.8 module that contains nice form elements like inputs, choice fields, search, toggle, dropdown, etc.
|
|
6
6
|
|
package/bower.json
CHANGED
package/dist/nice.js
CHANGED
|
@@ -97,7 +97,8 @@ angular.module('niceElements')
|
|
|
97
97
|
help: '@',
|
|
98
98
|
isInline: '=',
|
|
99
99
|
onChange: '&?',
|
|
100
|
-
required: '='
|
|
100
|
+
required: '=',
|
|
101
|
+
nullable: '='
|
|
101
102
|
},
|
|
102
103
|
link: function (scope, element) {
|
|
103
104
|
// ------------------ Init default values ------------------
|
|
@@ -114,8 +115,10 @@ angular.module('niceElements')
|
|
|
114
115
|
|
|
115
116
|
|
|
116
117
|
// ------------------ Check if attributes are set ------------------
|
|
117
|
-
if (!scope.
|
|
118
|
-
|
|
118
|
+
if (!scope.nullable) {
|
|
119
|
+
if (!scope.startDate) scope.startDate = moment().minutes(0).second(0).millisecond(0);
|
|
120
|
+
if (!scope.endDate) scope.endDate = moment().minutes(0).second(0).millisecond(0);
|
|
121
|
+
}
|
|
119
122
|
|
|
120
123
|
|
|
121
124
|
// ------------------ Look for model changes ------------------
|
|
@@ -149,18 +152,22 @@ angular.module('niceElements')
|
|
|
149
152
|
scope.startDate.seconds(0);
|
|
150
153
|
scope.startDate.millisecond(0);
|
|
151
154
|
scope.endDateHour = 0;
|
|
152
|
-
scope.
|
|
155
|
+
scope.endDateMinute = 0;
|
|
153
156
|
scope.endDate.hours(23);
|
|
154
157
|
scope.endDate.minutes(59);
|
|
155
158
|
scope.endDate.seconds(59);
|
|
156
159
|
scope.endDate.millisecond(999);
|
|
157
160
|
} else {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
if (scope.startDate) {
|
|
162
|
+
scope.startDateHour = moment(scope.startDate).hours();
|
|
163
|
+
scope.startDateMinute = moment(scope.startDate).minutes();
|
|
164
|
+
}
|
|
165
|
+
if (scope.endDate) {
|
|
166
|
+
scope.endDateHour = moment(scope.endDate).hours();
|
|
167
|
+
scope.endDateMinute = moment(scope.endDate).minutes();
|
|
168
|
+
}
|
|
162
169
|
}
|
|
163
|
-
|
|
170
|
+
|
|
164
171
|
scope.month = angular.copy(moment(scope.startDate));
|
|
165
172
|
const start = angular.copy(moment(scope.startDate));
|
|
166
173
|
_removeTimeWithDate(start.date(0));
|
|
@@ -304,6 +311,7 @@ angular.module('niceElements')
|
|
|
304
311
|
|
|
305
312
|
// ------------------ Check if dates are equal without time ------------------
|
|
306
313
|
scope.isSameDay = function (date1, date2) {
|
|
314
|
+
if(!date1 || !date2) return false;
|
|
307
315
|
const d1 = _removeTime(angular.copy(date1));
|
|
308
316
|
const d2 = _removeTime(angular.copy(date2));
|
|
309
317
|
return d1.isSame(d2);
|
|
@@ -312,12 +320,14 @@ angular.module('niceElements')
|
|
|
312
320
|
|
|
313
321
|
// ------------------ Check if date is between start and end date ------------------
|
|
314
322
|
scope.isBetweenRange = function (date) {
|
|
323
|
+
if(!scope.endDate || !scope.startDate) return false;
|
|
315
324
|
return (date.isBefore(moment(scope.endDate)) && date.isAfter(moment(scope.startDate)));
|
|
316
325
|
};
|
|
317
326
|
|
|
318
327
|
|
|
319
328
|
// ------------------ Format date ------------------
|
|
320
329
|
scope.formatDate = function (date) {
|
|
330
|
+
if (!date) return "-";
|
|
321
331
|
if (scope.time) return moment(date).format('D.M.YYYY • H:mm');
|
|
322
332
|
else return moment(date).format('D.M.YYYY');
|
|
323
333
|
};
|
|
@@ -3809,6 +3819,7 @@ angular.module('niceElements')
|
|
|
3809
3819
|
positiveOnly: '=?', // Allow only positive numbers in the input
|
|
3810
3820
|
multilanguage: '=?', // Multiple languages object
|
|
3811
3821
|
multilanguageField: '@?', // Multiple languages field name
|
|
3822
|
+
autocomplete: "@?"
|
|
3812
3823
|
},
|
|
3813
3824
|
|
|
3814
3825
|
link: function (scope, element, attrs) {
|
|
@@ -5321,7 +5332,7 @@ angular.module('niceElements')
|
|
|
5321
5332
|
link: function postLink(scope, element, attrs) {
|
|
5322
5333
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
5323
5334
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
5324
|
-
if (!attrs.
|
|
5335
|
+
if (!attrs.niceTitle) { attrs.niceTitle = ' '; }
|
|
5325
5336
|
}
|
|
5326
5337
|
};
|
|
5327
5338
|
});
|
|
@@ -6179,7 +6190,7 @@ angular.module('niceElements')
|
|
|
6179
6190
|
.service('NiceService', function ($rootScope) {
|
|
6180
6191
|
const service = {
|
|
6181
6192
|
name: "Nice elements",
|
|
6182
|
-
version: "1.11.
|
|
6193
|
+
version: "1.11.2",
|
|
6183
6194
|
getHeader: function () {
|
|
6184
6195
|
return {};
|
|
6185
6196
|
},
|
|
@@ -6882,8 +6893,8 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6882
6893
|
" 'symbol': symbol,\n" +
|
|
6883
6894
|
" 'nice-disabled': isDisabled\n" +
|
|
6884
6895
|
" }\">\n" +
|
|
6885
|
-
"<textarea ng-if=\"textArea\" class=\"form-control\" ng-model=\"$parent.internalModel\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" rows=\"{{textAreaLines}}\" max=\"{{ max }}\" min=\"{{ min }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\"></textarea>\n" +
|
|
6886
|
-
"<input ng-if=\"!textArea\" class=\"form-control\" type=\"{{ internalType }}\" inputmode=\"{{ inputMode }}\" ng-model=\"$parent.internalModel\" name=\"{{ name }}\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" max=\"{{ max }}\" min=\"{{ min }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-keypress=\"keypress($event)\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\">\n" +
|
|
6896
|
+
"<textarea ng-if=\"textArea\" class=\"form-control\" ng-model=\"$parent.internalModel\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" rows=\"{{textAreaLines}}\" max=\"{{ max }}\" min=\"{{ min }}\" autocomplete=\"{{ autocomplete }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\"></textarea>\n" +
|
|
6897
|
+
"<input ng-if=\"!textArea\" class=\"form-control\" type=\"{{ internalType }}\" inputmode=\"{{ inputMode }}\" ng-model=\"$parent.internalModel\" name=\"{{ name }}\" id=\"{{ id }}\" tabindex=\"{{ tabIndex }}\" placeholder=\"{{ placeholder }}\" max=\"{{ max }}\" min=\"{{ min }}\" autocomplete=\"{{ autocomplete }}\" ng-minlength=\"minlength\" ng-maxlength=\"maxlength\" ng-required=\"required\" ng-keypress=\"keypress($event)\" ng-pattern=\"regexexp\" ng-disabled=\"isDisabled\">\n" +
|
|
6887
6898
|
"<div class=\"input-group-addon\" ng-if=\"symbol\">{{ symbol }}</div>\n" +
|
|
6888
6899
|
"<button type=\"button\" class=\"input-group-btn\" ng-if=\"multilanguageField\" ng-click=\"openMultilanguage()\">\n" +
|
|
6889
6900
|
"<nice-icon icon=\"icon-translate\"></nice-icon>\n" +
|