nice-elements 1.12.2 → 1.12.4
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 +161 -106
- package/dist/nice.min.js +1 -1
- package/dist/style.css +38 -11
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +2 -2
- package/package.json +2 -2
- package/src/components/nice-alert/nice-alert.html +1 -1
- package/src/components/nice-alert/nice-alert.js +2 -1
- package/src/components/nice-alert/nice-alert.scss +15 -0
- package/src/components/nice-checkbox/nice-checkbox.scss +11 -11
- package/src/components/nice-choice/nice-choice.js +41 -42
- package/src/components/nice-comment/nice-comment.js +1 -1
- package/src/components/nice-date/nice-date.html +5 -2
- package/src/components/nice-date/nice-date.js +24 -7
- package/src/components/nice-date-input/nice-date-input.html +13 -5
- package/src/components/nice-date-input/nice-date-input.js +32 -15
- package/src/components/nice-date-input/nice-date-input.scss +8 -1
- package/src/components/nice-date-range/nice-date-range.js +1 -1
- package/src/components/nice-input/nice-input.js +12 -12
- package/src/components/nice-percent/nice-percent.js +2 -2
- package/src/components/nice-search/nice-search.js +11 -11
- package/src/components/nice-svgs/nice-svgs.html +10 -0
- package/src/components/nice-upload/nice-upload.js +5 -5
- package/src/services/nice-service.js +1 -1
- package/src/styles/_nice-common.scss +9 -10
- package/src/styles/_variables.scss +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.12.4 (15.5.2025)
|
|
4
|
+
|
|
5
|
+
- added icon-x-o and icon-check-o,
|
|
6
|
+
- added largeIcon prop to nice alert,
|
|
7
|
+
- added success type to nice alert,
|
|
8
|
+
- worked on nice input and choice props,
|
|
9
|
+
- worked on boolean props
|
|
10
|
+
|
|
11
|
+
## v1.12.3 (17.4.2025)
|
|
12
|
+
|
|
13
|
+
- added nice date placeholder and nullable props,
|
|
14
|
+
- added nice date input placeholder and nullable props
|
|
15
|
+
|
|
3
16
|
## v1.12.2 (15.4.2025)
|
|
4
17
|
|
|
5
18
|
- fixed eslint warnings,
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Nice elements v1.12.
|
|
3
|
+
# Nice elements v1.12.4
|
|
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
|
@@ -21,7 +21,8 @@ angular.module('niceElements')
|
|
|
21
21
|
niceTitle: '@?',
|
|
22
22
|
message: '@?',
|
|
23
23
|
fitContent: '=?',
|
|
24
|
-
iconCenter: '@?'
|
|
24
|
+
iconCenter: '@?',
|
|
25
|
+
largeIcon: '@?'
|
|
25
26
|
},
|
|
26
27
|
controller: function ($scope) {
|
|
27
28
|
if (!$scope.type) $scope.type = "error";
|
|
@@ -500,30 +501,30 @@ angular.module('niceElements')
|
|
|
500
501
|
isDisabled: '=',
|
|
501
502
|
fieldWidth: '@',
|
|
502
503
|
labelWidth: '@',
|
|
503
|
-
listIsObj: '
|
|
504
|
-
selectedIsObj: '
|
|
504
|
+
listIsObj: '=?',
|
|
505
|
+
selectedIsObj: '=?',
|
|
505
506
|
objValue: '@',
|
|
506
507
|
objKey: '@',
|
|
507
|
-
noMargin: '
|
|
508
|
-
multiple: '
|
|
508
|
+
noMargin: '=?',
|
|
509
|
+
multiple: '=?',
|
|
509
510
|
help: '@',
|
|
510
|
-
isInline: '
|
|
511
|
+
isInline: '=?',
|
|
511
512
|
onChange: '&?'
|
|
512
513
|
},
|
|
513
|
-
|
|
514
|
-
if (
|
|
515
|
-
if (
|
|
516
|
-
if (
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
scope.firstTime = true;
|
|
524
|
-
scope.checkIfFirstTime = function () {
|
|
525
|
-
if (scope.firstTime) {
|
|
526
|
-
scope.firstTime = false;
|
|
514
|
+
controller: function ($attrs, $scope) {
|
|
515
|
+
if (!$attrs.title) { $attrs.title = ''; }
|
|
516
|
+
if (!$attrs.fieldWidth) { $attrs.fieldWidth = 'col-sm-8'; }
|
|
517
|
+
if (!$attrs.labelWidth) { $attrs.labelWidth = 'col-sm-4'; }
|
|
518
|
+
if (!$attrs.objValue) { $attrs.objValue = 'value'; }
|
|
519
|
+
if (!$attrs.objKey) { $attrs.objKey = 'id'; }
|
|
520
|
+
$scope.multiple = $scope.multiple === 'true' || $scope.multiple === true;
|
|
521
|
+
$scope.selectedIsObj = $scope.selectedIsObj === 'true' || $scope.selectedIsObj === true;
|
|
522
|
+
$scope.listIsObj = $scope.listIsObj === 'true' || $scope.listIsObj === true;
|
|
523
|
+
|
|
524
|
+
$scope.firstTime = true;
|
|
525
|
+
$scope.checkIfFirstTime = function () {
|
|
526
|
+
if ($scope.firstTime) {
|
|
527
|
+
$scope.firstTime = false;
|
|
527
528
|
return true;
|
|
528
529
|
} else {
|
|
529
530
|
return false;
|
|
@@ -531,48 +532,47 @@ angular.module('niceElements')
|
|
|
531
532
|
};
|
|
532
533
|
|
|
533
534
|
// If selected is not yet defined
|
|
534
|
-
if (!angular.isDefined(scope.model)) {
|
|
535
|
-
if (scope.multiple) {
|
|
536
|
-
scope.model = [];
|
|
535
|
+
if (!angular.isDefined($scope.model)) {
|
|
536
|
+
if ($scope.multiple) {
|
|
537
|
+
$scope.model = [];
|
|
537
538
|
}
|
|
538
539
|
}
|
|
539
540
|
|
|
540
541
|
// Set internalList
|
|
541
|
-
if (scope.listIsObj) {
|
|
542
|
-
scope.internalList = scope.list;
|
|
542
|
+
if ($scope.listIsObj) {
|
|
543
|
+
$scope.internalList = $scope.list;
|
|
543
544
|
} else {
|
|
544
|
-
scope.internalList = _.map(scope.list, function (val) {
|
|
545
|
+
$scope.internalList = _.map($scope.list, function (val) {
|
|
545
546
|
const obj = {};
|
|
546
|
-
obj[scope.objKey] = val;
|
|
547
|
-
obj[scope.objValue] = val;
|
|
547
|
+
obj[$scope.objKey] = val;
|
|
548
|
+
obj[$scope.objValue] = val;
|
|
548
549
|
return obj;
|
|
549
550
|
});
|
|
550
551
|
}
|
|
551
552
|
|
|
552
553
|
// Set internalSelected
|
|
553
|
-
if (scope.selectedIsObj) {
|
|
554
|
-
scope.internalSelected = scope.model;
|
|
554
|
+
if ($scope.selectedIsObj) {
|
|
555
|
+
$scope.internalSelected = $scope.model;
|
|
555
556
|
} else {
|
|
556
|
-
if (scope.multiple) {
|
|
557
|
-
scope.internalSelected = _.map(scope.model, function (val) {
|
|
557
|
+
if ($scope.multiple) {
|
|
558
|
+
$scope.internalSelected = _.map($scope.model, function (val) {
|
|
558
559
|
const obj = {};
|
|
559
|
-
obj[scope.objKey] = val;
|
|
560
|
-
obj[scope.objValue] = val;
|
|
560
|
+
obj[$scope.objKey] = val;
|
|
561
|
+
obj[$scope.objValue] = val;
|
|
561
562
|
return obj;
|
|
562
563
|
});
|
|
563
564
|
} else {
|
|
564
|
-
if (scope.model) {
|
|
565
|
+
if ($scope.model) {
|
|
565
566
|
const obj = {};
|
|
566
|
-
obj[scope.objKey] = scope.model;
|
|
567
|
-
obj[scope.objValue] = scope.model;
|
|
568
|
-
scope.internalSelected = obj;
|
|
567
|
+
obj[$scope.objKey] = $scope.model;
|
|
568
|
+
obj[$scope.objValue] = $scope.model;
|
|
569
|
+
$scope.internalSelected = obj;
|
|
569
570
|
} else {
|
|
570
|
-
scope.internalSelected = scope.internalList[0];
|
|
571
|
+
$scope.internalSelected = $scope.internalList[0];
|
|
571
572
|
}
|
|
572
573
|
}
|
|
573
574
|
}
|
|
574
|
-
|
|
575
|
-
controller: function ($rootScope, $scope) {
|
|
575
|
+
|
|
576
576
|
const getFilter = function (item) {
|
|
577
577
|
// Create filter for finding object by objValue with _.where()
|
|
578
578
|
const filter = {};
|
|
@@ -588,7 +588,7 @@ angular.module('niceElements')
|
|
|
588
588
|
if (event.buttons == 1 && $scope.multiple) {
|
|
589
589
|
$scope.toggle(item);
|
|
590
590
|
}
|
|
591
|
-
}
|
|
591
|
+
};
|
|
592
592
|
|
|
593
593
|
$scope.setDefault = function () {
|
|
594
594
|
if (!$scope.multiple) {
|
|
@@ -672,7 +672,7 @@ angular.module('niceElements')
|
|
|
672
672
|
if ($scope.multiple) {
|
|
673
673
|
$scope.internalSelected = _.map(value_new, function (item) {
|
|
674
674
|
return _.find($scope.internalList, getFilter(item));
|
|
675
|
-
})
|
|
675
|
+
});
|
|
676
676
|
} else {
|
|
677
677
|
$scope.internalSelected = _.find($scope.internalList, getFilter(value_new));
|
|
678
678
|
}
|
|
@@ -828,11 +828,11 @@ angular.module('niceElements')
|
|
|
828
828
|
link: function postLink(scope, element, attrs) {
|
|
829
829
|
if (scope.model == null) { scope.model = ''; }
|
|
830
830
|
if (!attrs.placeholder) { attrs.placeholder = ''; }
|
|
831
|
-
if (!attrs.noTextLabel) { angular.isDefined(attrs.noTextLabel); }
|
|
832
831
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
833
832
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
834
833
|
if (!attrs.help) { attrs.help = ''; }
|
|
835
834
|
if (!attrs.rows) { attrs.rows = 1; }
|
|
835
|
+
attrs.noTextLabel = attrs.noTextLabel === 'true' || attrs.noTextLabel === true;
|
|
836
836
|
|
|
837
837
|
const textareas = element.find('textarea');
|
|
838
838
|
|
|
@@ -898,17 +898,22 @@ angular.module('niceElements')
|
|
|
898
898
|
help: '@',
|
|
899
899
|
isInline: '=',
|
|
900
900
|
onChange: '&?',
|
|
901
|
-
required: '='
|
|
901
|
+
required: '=',
|
|
902
|
+
nullable: '=',
|
|
903
|
+
placeholderDate: '@',
|
|
904
|
+
placeholderTime: '@',
|
|
902
905
|
},
|
|
903
|
-
controller: function ($scope, $timeout) {
|
|
906
|
+
controller: function ($scope, $timeout, gettextCatalog) {
|
|
904
907
|
$scope.formatDate = "DD.MM.YYYY";
|
|
905
908
|
$scope.formatTime = "HH:mm";
|
|
906
909
|
if ($scope.date === undefined) $scope.date = true;
|
|
907
910
|
if ($scope.time === undefined) $scope.time = true;
|
|
908
|
-
|
|
911
|
+
if (!$scope.placeholderDate) { $scope.placeholderDate = gettextCatalog.getString("••.••.••••", null, "Nice"); }
|
|
912
|
+
if (!$scope.placeholderTime) { $scope.placeholderTime = gettextCatalog.getString("••:••", null, "Nice"); }
|
|
913
|
+
if (!$scope.model && !$scope.nullable) $scope.model = moment($scope.model) || moment().set({ 'second': 0, 'millisecond': 0 });
|
|
909
914
|
$scope.inner = {
|
|
910
|
-
timeModel: angular.copy($scope.model),
|
|
911
|
-
dateModel: angular.copy($scope.model)
|
|
915
|
+
timeModel: angular.copy($scope.model || moment()),
|
|
916
|
+
dateModel: angular.copy($scope.model || moment()),
|
|
912
917
|
};
|
|
913
918
|
|
|
914
919
|
$scope.dateChanged = function () {
|
|
@@ -916,17 +921,18 @@ angular.module('niceElements')
|
|
|
916
921
|
$scope.modelDate = $scope.inner.dateModel.format($scope.formatDate);
|
|
917
922
|
$scope.handleChange();
|
|
918
923
|
});
|
|
919
|
-
}
|
|
924
|
+
};
|
|
920
925
|
|
|
921
926
|
$scope.timeChanged = function () {
|
|
922
927
|
$timeout(function () {
|
|
923
928
|
$scope.modelTime = $scope.inner.timeModel.format($scope.formatTime);
|
|
924
929
|
$scope.handleChange();
|
|
925
930
|
});
|
|
926
|
-
}
|
|
931
|
+
};
|
|
927
932
|
|
|
928
933
|
// -------------------- On date change --------------------
|
|
929
934
|
$scope.handleChange = function () {
|
|
935
|
+
if (!$scope.date) $scope.modelDate = moment().format($scope.formatDate);
|
|
930
936
|
const newModel = moment($scope.modelDate + " " + $scope.modelTime, $scope.formatDate + " " + $scope.formatTime).seconds(0).milliseconds(0);
|
|
931
937
|
if (newModel.isValid()) {
|
|
932
938
|
$scope.model = newModel;
|
|
@@ -937,13 +943,25 @@ angular.module('niceElements')
|
|
|
937
943
|
}
|
|
938
944
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
939
945
|
$scope.niceDateInputForm.$setDirty();
|
|
940
|
-
}
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
// -------------------- Clear --------------------
|
|
949
|
+
$scope.clear = function () {
|
|
950
|
+
$scope.model = null;
|
|
951
|
+
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
952
|
+
$scope.niceDateInputForm.$setDirty();
|
|
953
|
+
};
|
|
941
954
|
|
|
942
955
|
// -------------------- Format model --------------------
|
|
943
956
|
$scope.formatModel = function () {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
957
|
+
if (!$scope.model) {
|
|
958
|
+
$scope.modelDate = null;
|
|
959
|
+
$scope.modelTime = null;
|
|
960
|
+
} else {
|
|
961
|
+
$scope.modelDate = $scope.model.format($scope.formatDate);
|
|
962
|
+
$scope.modelTime = $scope.model.format($scope.formatTime);
|
|
963
|
+
}
|
|
964
|
+
};
|
|
947
965
|
$scope.formatModel();
|
|
948
966
|
|
|
949
967
|
// -------------------- Date --------------------
|
|
@@ -972,13 +990,12 @@ angular.module('niceElements')
|
|
|
972
990
|
$scope.$watch('model', function () {
|
|
973
991
|
$scope.formatModel();
|
|
974
992
|
$scope.inner = {
|
|
975
|
-
timeModel: angular.copy($scope.model),
|
|
976
|
-
dateModel: angular.copy($scope.model)
|
|
993
|
+
timeModel: angular.copy($scope.model || moment()),
|
|
994
|
+
dateModel: angular.copy($scope.model || moment())
|
|
977
995
|
};
|
|
978
|
-
|
|
979
996
|
});
|
|
980
997
|
}
|
|
981
|
-
}
|
|
998
|
+
};
|
|
982
999
|
}
|
|
983
1000
|
);
|
|
984
1001
|
'use strict';
|
|
@@ -1018,7 +1035,7 @@ angular.module('niceElements')
|
|
|
1018
1035
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
1019
1036
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
1020
1037
|
if (!attrs.format) { attrs.format = 'dd.MM.yyyy'; }
|
|
1021
|
-
attrs.noMargin =
|
|
1038
|
+
attrs.noMargin = attrs.noMargin === 'true' || attrs.noMargin === true;
|
|
1022
1039
|
|
|
1023
1040
|
if (!angular.isDefined(scope.model)) {
|
|
1024
1041
|
let model = null;
|
|
@@ -1093,11 +1110,14 @@ angular.module('niceElements')
|
|
|
1093
1110
|
isInline: '=',
|
|
1094
1111
|
onChange: '&?',
|
|
1095
1112
|
required: '=',
|
|
1113
|
+
nullable: '=',
|
|
1114
|
+
placeholder: '@',
|
|
1096
1115
|
placement: '@', // Describes the preferred placement of the popper
|
|
1097
1116
|
},
|
|
1098
1117
|
controller: function ($scope, $element, $timeout, gettextCatalog) {
|
|
1099
1118
|
$scope.isOpen = false;
|
|
1100
1119
|
if (!$scope.placement) { $scope.placement = "bottom-start"; }
|
|
1120
|
+
if (!$scope.placeholder) { $scope.placeholder = gettextCatalog.getString("Select date", null, "Nice"); }
|
|
1101
1121
|
if ($scope.date == undefined) $scope.date = true;
|
|
1102
1122
|
if ($scope.time == undefined) $scope.time = false;
|
|
1103
1123
|
$scope.hours = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
|
|
@@ -1106,7 +1126,7 @@ angular.module('niceElements')
|
|
|
1106
1126
|
nextMonth: gettextCatalog.getString("Next month", null, "Nice"),
|
|
1107
1127
|
prevMonth: gettextCatalog.getString("Previous month", null, "Nice"),
|
|
1108
1128
|
};
|
|
1109
|
-
if (!$scope.model) $scope.model = moment();
|
|
1129
|
+
if (!$scope.model && !$scope.nullable) $scope.model = moment();
|
|
1110
1130
|
$scope.innerDate = {
|
|
1111
1131
|
month: 0,
|
|
1112
1132
|
year: 0,
|
|
@@ -1183,13 +1203,13 @@ angular.module('niceElements')
|
|
|
1183
1203
|
selectedDate = $scope._removeTime(selectedDate);
|
|
1184
1204
|
selectedDate.hours($scope.innerDate.hour);
|
|
1185
1205
|
selectedDate.minutes($scope.innerDate.minute);
|
|
1186
|
-
$scope.innerDate.value = $scope.formatDate(selectedDate);
|
|
1187
1206
|
|
|
1188
1207
|
$scope.model = angular.copy(selectedDate);
|
|
1208
|
+
$scope.innerDate.value = $scope.formatDate($scope.model);
|
|
1189
1209
|
$timeout(function () {
|
|
1190
1210
|
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
1191
1211
|
$scope.forma.$setDirty();
|
|
1192
|
-
})
|
|
1212
|
+
});
|
|
1193
1213
|
};
|
|
1194
1214
|
|
|
1195
1215
|
|
|
@@ -1209,6 +1229,18 @@ angular.module('niceElements')
|
|
|
1209
1229
|
};
|
|
1210
1230
|
|
|
1211
1231
|
|
|
1232
|
+
// ------------------ Clear ------------------
|
|
1233
|
+
$scope.clear = function () {
|
|
1234
|
+
$scope.isOpen = false;
|
|
1235
|
+
$scope.model = null;
|
|
1236
|
+
$timeout(function () {
|
|
1237
|
+
if ($scope.onChange) $scope.onChange({ model: $scope.model });
|
|
1238
|
+
$scope.forma.$setDirty();
|
|
1239
|
+
$scope.isOpen = false;
|
|
1240
|
+
});
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
|
|
1212
1244
|
// ------------------ Handle date change ------------------
|
|
1213
1245
|
$scope.handleDateChange = function () {
|
|
1214
1246
|
$scope.innerDate.date.year($scope.innerDate.year);
|
|
@@ -1285,6 +1317,8 @@ angular.module('niceElements')
|
|
|
1285
1317
|
|
|
1286
1318
|
// ------------------ Format date ------------------
|
|
1287
1319
|
$scope.formatDate = function (date) {
|
|
1320
|
+
if (!date) return "";
|
|
1321
|
+
date = moment(date);
|
|
1288
1322
|
if ($scope.time) return date.format('D.M.YYYY • H:mm');
|
|
1289
1323
|
else return date.format('D.M.YYYY');
|
|
1290
1324
|
};
|
|
@@ -1361,20 +1395,20 @@ angular.module('niceElements')
|
|
|
1361
1395
|
$scope.innerDate.minute = 0;
|
|
1362
1396
|
}
|
|
1363
1397
|
|
|
1364
|
-
$scope.innerDate.value = $scope.formatDate($scope.
|
|
1398
|
+
$scope.innerDate.value = $scope.formatDate($scope.model);
|
|
1365
1399
|
};
|
|
1366
1400
|
|
|
1367
1401
|
|
|
1368
1402
|
// ------------------ Bootstrap ------------------
|
|
1369
1403
|
$scope.bootstrap = function () {
|
|
1370
|
-
$scope.setInnerDate(moment($scope.model));
|
|
1404
|
+
$scope.setInnerDate($scope.model ? moment($scope.model) : moment());
|
|
1371
1405
|
$scope.getTime();
|
|
1372
1406
|
|
|
1373
1407
|
if (!$scope.time) {
|
|
1374
1408
|
$scope.model = $scope._removeTime($scope.model);
|
|
1375
1409
|
}
|
|
1376
1410
|
|
|
1377
|
-
$scope.innerDate.value = $scope.formatDate(
|
|
1411
|
+
$scope.innerDate.value = $scope.formatDate($scope.model);
|
|
1378
1412
|
$scope._buildMonth();
|
|
1379
1413
|
};
|
|
1380
1414
|
|
|
@@ -1387,7 +1421,7 @@ angular.module('niceElements')
|
|
|
1387
1421
|
$scope.isOpen = !$scope.isOpen;
|
|
1388
1422
|
$timeout(function () {
|
|
1389
1423
|
if ($scope.popper) $scope.popper.update();
|
|
1390
|
-
})
|
|
1424
|
+
});
|
|
1391
1425
|
}
|
|
1392
1426
|
};
|
|
1393
1427
|
}
|
|
@@ -3830,21 +3864,21 @@ angular.module('niceElements')
|
|
|
3830
3864
|
required: '=',
|
|
3831
3865
|
fieldWidth: '@',
|
|
3832
3866
|
labelWidth: '@',
|
|
3833
|
-
hideValid: '
|
|
3834
|
-
showValid: '
|
|
3835
|
-
textArea: '
|
|
3836
|
-
textAreaLines: '
|
|
3867
|
+
hideValid: '=?',
|
|
3868
|
+
showValid: '=?',
|
|
3869
|
+
textArea: '=?',
|
|
3870
|
+
textAreaLines: '=?',
|
|
3837
3871
|
symbol: '@',
|
|
3838
3872
|
help: '@',
|
|
3839
3873
|
name: '@',
|
|
3840
|
-
noMargin: '
|
|
3874
|
+
noMargin: '=?',
|
|
3841
3875
|
minDecimalsCutZeros: '@', // Use this field to tell how much decimal places must always be, even if number is ceil.
|
|
3842
3876
|
tabIndex: '@',
|
|
3843
|
-
isFocused: '
|
|
3844
|
-
isInline: '
|
|
3877
|
+
isFocused: '=?',
|
|
3878
|
+
isInline: '=?',
|
|
3845
3879
|
onChange: '&?',
|
|
3846
3880
|
onClear: '&?',
|
|
3847
|
-
numbersOnly: '
|
|
3881
|
+
numbersOnly: '=?', // Allow only numbers in the input
|
|
3848
3882
|
positiveOnly: '=?', // Allow only positive numbers in the input
|
|
3849
3883
|
multilanguage: '=?', // Multiple languages object
|
|
3850
3884
|
multilanguageField: '@?', // Multiple languages field name
|
|
@@ -3865,10 +3899,10 @@ angular.module('niceElements')
|
|
|
3865
3899
|
if (!$attrs.help) { $attrs.help = ''; }
|
|
3866
3900
|
if (!$attrs.name) { $attrs.name = ''; }
|
|
3867
3901
|
if (!$attrs.minDecimalsCutZeros) { $attrs.minDecimalsCutZeros = 0; }
|
|
3868
|
-
$attrs.hideValid =
|
|
3869
|
-
$attrs.showValid =
|
|
3870
|
-
$attrs.noMargin =
|
|
3871
|
-
$scope.textArea = $
|
|
3902
|
+
$attrs.hideValid = $attrs.hideValid === 'true' || $attrs.hideValid === true;
|
|
3903
|
+
$attrs.showValid = $attrs.showValid === 'true' || $attrs.showValid === true;
|
|
3904
|
+
$attrs.noMargin = $attrs.noMargin === 'true' || $attrs.noMargin === true;
|
|
3905
|
+
$scope.textArea = $scope.textArea == 'true' || $scope.textArea == true;
|
|
3872
3906
|
$attrs.required = $attrs.required === 'true' || $attrs.required === true;
|
|
3873
3907
|
$scope.inputMode = null;
|
|
3874
3908
|
$scope.lastKey = null;
|
|
@@ -4495,11 +4529,11 @@ angular.module('niceElements')
|
|
|
4495
4529
|
|
|
4496
4530
|
link: function (scope, element, attrs) {
|
|
4497
4531
|
if (!attrs.title) { attrs.title = ''; }
|
|
4498
|
-
attrs.required = angular.isDefined(attrs.required);
|
|
4499
4532
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
4500
4533
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
4501
4534
|
if (!attrs.placeholder) { attrs.placeholder = ''; }
|
|
4502
|
-
attrs.
|
|
4535
|
+
attrs.required = attrs.required === 'true' || attrs.required === true;
|
|
4536
|
+
attrs.noMargin = attrs.noMargin === 'true' || attrs.noMargin === true;
|
|
4503
4537
|
},
|
|
4504
4538
|
|
|
4505
4539
|
controller: function ($rootScope, $scope) {
|
|
@@ -4865,21 +4899,21 @@ angular.module('niceElements')
|
|
|
4865
4899
|
isInline: '=',
|
|
4866
4900
|
onChange: '&?'
|
|
4867
4901
|
},
|
|
4868
|
-
link: function (scope, element, attrs
|
|
4869
|
-
|
|
4902
|
+
link: function (scope, element, attrs) {
|
|
4870
4903
|
if (!attrs.title) { attrs.title = ''; }
|
|
4871
4904
|
if (!attrs.placeholder) { attrs.placeholder = ''; }
|
|
4872
|
-
attrs.required = angular.isDefined(attrs.required);
|
|
4873
4905
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
4874
4906
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
4875
|
-
attrs.hideValid = angular.isDefined(attrs.hideValid);
|
|
4876
|
-
attrs.showDropdown = angular.isDefined(attrs.showDropdown);
|
|
4877
|
-
attrs.clearInput = angular.isDefined(attrs.clearInput);
|
|
4878
|
-
attrs.resetSearchInput = angular.isDefined(attrs.resetSearchInput);
|
|
4879
|
-
attrs.disableRow = angular.isDefined(attrs.disableRow);
|
|
4880
|
-
attrs.noMargin = angular.isDefined(attrs.noMargin);
|
|
4881
4907
|
if (!attrs.setText) { attrs.setText = ''; }
|
|
4882
4908
|
|
|
4909
|
+
attrs.required = attrs.required === 'true' || attrs.required === true;
|
|
4910
|
+
attrs.hideValid = attrs.hideValid === 'true' || attrs.hideValid === true;
|
|
4911
|
+
attrs.showDropdown = attrs.showDropdown === 'true' || attrs.showDropdown === true;
|
|
4912
|
+
attrs.clearInput = attrs.clearInput === 'true' || attrs.clearInput === true;
|
|
4913
|
+
attrs.resetSearchInput = attrs.resetSearchInput === 'true' || attrs.resetSearchInput === true;
|
|
4914
|
+
attrs.disableRow = attrs.disableRow === 'true' || attrs.disableRow === true;
|
|
4915
|
+
attrs.noMargin = attrs.noMargin === 'true' || attrs.noMargin === true;
|
|
4916
|
+
|
|
4883
4917
|
// This is used for connecting directive's scope to transcluded html.
|
|
4884
4918
|
// transcludeFn(scope, function(clone, scope) {
|
|
4885
4919
|
// var el = element.find('.nice-search');
|
|
@@ -5065,9 +5099,9 @@ angular.module('niceElements')
|
|
|
5065
5099
|
$scope.remove = function () {
|
|
5066
5100
|
$scope.model = null;
|
|
5067
5101
|
$scope.modelString = null;
|
|
5068
|
-
}
|
|
5102
|
+
};
|
|
5069
5103
|
}
|
|
5070
|
-
}
|
|
5104
|
+
};
|
|
5071
5105
|
});
|
|
5072
5106
|
|
|
5073
5107
|
'use strict';
|
|
@@ -5799,12 +5833,12 @@ angular.module('niceElements')
|
|
|
5799
5833
|
if (!attrs.fieldWidth) { attrs.fieldWidth = 'col-sm-8'; }
|
|
5800
5834
|
if (!attrs.labelWidth) { attrs.labelWidth = 'col-sm-4'; }
|
|
5801
5835
|
if (!attrs.maxFileSize) scope.maxFileSize = 1; // 1MB
|
|
5802
|
-
attrs.noMargin =
|
|
5836
|
+
attrs.noMargin = attrs.noMargin === 'true' || attrs.noMargin === true;
|
|
5803
5837
|
|
|
5804
|
-
scope.startDragging = function () { $timeout(function () { scope.dragging = true; }); }
|
|
5805
|
-
scope.endDragging = function () { $timeout(function () { scope.dragging = false; }); }
|
|
5806
|
-
scope.startDraggingGlobal = function () { $timeout(function () { scope.draggingGlobal = true; }); }
|
|
5807
|
-
scope.endDraggingGlobal = function () { $timeout(function () { scope.dragging = false; scope.draggingGlobal = false; }); }
|
|
5838
|
+
scope.startDragging = function () { $timeout(function () { scope.dragging = true; }); };
|
|
5839
|
+
scope.endDragging = function () { $timeout(function () { scope.dragging = false; }); };
|
|
5840
|
+
scope.startDraggingGlobal = function () { $timeout(function () { scope.draggingGlobal = true; }); };
|
|
5841
|
+
scope.endDraggingGlobal = function () { $timeout(function () { scope.dragging = false; scope.draggingGlobal = false; }); };
|
|
5808
5842
|
|
|
5809
5843
|
scope.dragging = false;
|
|
5810
5844
|
scope.draggingGlobal = false;
|
|
@@ -6224,7 +6258,7 @@ angular.module('niceElements')
|
|
|
6224
6258
|
.service('NiceService', function ($rootScope) {
|
|
6225
6259
|
const service = {
|
|
6226
6260
|
name: "Nice elements",
|
|
6227
|
-
version: "1.12.
|
|
6261
|
+
version: "1.12.3",
|
|
6228
6262
|
getHeader: function () {
|
|
6229
6263
|
return {};
|
|
6230
6264
|
},
|
|
@@ -6307,7 +6341,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6307
6341
|
'use strict';
|
|
6308
6342
|
|
|
6309
6343
|
$templateCache.put('src/components/nice-alert/nice-alert.html',
|
|
6310
|
-
"<div class=\"nice-alert\" ng-class=\"['nice-alert-' + type, { 'nice-alert-fit': fitContent, 'nice-icon-center': iconCenter }]\">\n" +
|
|
6344
|
+
"<div class=\"nice-alert\" ng-class=\"['nice-alert-' + type, { 'nice-alert-large-icon': largeIcon, 'nice-alert-fit': fitContent, 'nice-icon-center': iconCenter }]\">\n" +
|
|
6311
6345
|
" <nice-icon class=\"nice-alert-icon\" icon=\"{{ icon }}\" ng-if=\"icon\"></nice-icon>\n" +
|
|
6312
6346
|
" <div class=\"nice-alert-body\">\n" +
|
|
6313
6347
|
" <div class=\"nice-alert-title\" ng-if=\"niceTitle\">{{ niceTitle }}</div>\n" +
|
|
@@ -6484,7 +6518,7 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6484
6518
|
|
|
6485
6519
|
|
|
6486
6520
|
$templateCache.put('src/components/nice-date-input/nice-date-input.html',
|
|
6487
|
-
"<div class=\"nice-component nice-date-input\" ng-form=\"niceDateInputForm\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline, 'error': niceDateInputForm.$invalid }\">\n" +
|
|
6521
|
+
"<div class=\"nice-component nice-date-input\" ng-form=\"niceDateInputForm\" ng-class=\"{ 'margin-bottom-0': noMargin, 'nice-component-inline': isInline, 'error': niceDateInputForm.$invalid, 'nice-date-input-no-date': !date }\">\n" +
|
|
6488
6522
|
" <div class=\"row\">\n" +
|
|
6489
6523
|
" \n" +
|
|
6490
6524
|
" <nice-title text=\"title || niceTitle\" help=\"help\" required=\"required\" label-width=\"labelWidth\"></nice-title>\n" +
|
|
@@ -6492,10 +6526,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6492
6526
|
" \n" +
|
|
6493
6527
|
" <div class=\"nice-field col-xs-12\" ng-class=\"[fieldWidth ? fieldWidth : 'col-sm-8', { 'nice-disabled': isDisabled }]\">\n" +
|
|
6494
6528
|
" <div class=\"input-group nice-date-input\" ng-show=\"date\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
|
|
6495
|
-
" <input type=\"text\" class=\"form-control\" ng-model=\"modelDate\" ng-blur=\"dateBlur($event)\" ng-disabled=\"isDisabled\">\n" +
|
|
6529
|
+
" <input type=\"text\" class=\"form-control\" ng-model=\"modelDate\" placeholder=\"{{ placeholderDate }}\" ng-blur=\"dateBlur($event)\" ng-disabled=\"isDisabled\">\n" +
|
|
6496
6530
|
" <nice-popup placement=\"bottom\">\n" +
|
|
6497
6531
|
" <nice-popup-target>\n" +
|
|
6498
|
-
" <span class=\"input-group-btn\">\n" +
|
|
6532
|
+
" <span class=\"input-group-btns input-group-btn\">\n" +
|
|
6533
|
+
" <button type=\"button\" class=\"btn btn-default btn-right\" ng-if=\"model && nullable\" tabindex=\"-1\" ng-disabled=\"isDisabled\" ng-click=\"clear()\">\n" +
|
|
6534
|
+
" <nice-icon icon=\"icon-x\"></nice-icon>\n" +
|
|
6535
|
+
" </button>\n" +
|
|
6536
|
+
"\n" +
|
|
6499
6537
|
" <button type=\"button\" class=\"btn btn-default btn-right\" tabindex=\"-1\" ng-disabled=\"isDisabled\">\n" +
|
|
6500
6538
|
" <nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
6501
6539
|
" </button>\n" +
|
|
@@ -6508,10 +6546,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6508
6546
|
" </nice-popup>\n" +
|
|
6509
6547
|
" </div>\n" +
|
|
6510
6548
|
" <div class=\"input-group nice-time-input\" ng-show=\"time\" ng-class=\"{ 'has-warning': !disabled && niceDateInputForm.$invalid && niceDateInputForm.$dirty }\">\n" +
|
|
6511
|
-
" <input type=\"text\" class=\"form-control\" ng-model=\"modelTime\" ng-blur=\"timeBlur($event)\" ng-disabled=\"isDisabled\">\n" +
|
|
6549
|
+
" <input type=\"text\" class=\"form-control\" ng-model=\"modelTime\" placeholder=\"{{ placeholderTime }}\" ng-blur=\"timeBlur($event)\" ng-disabled=\"isDisabled\">\n" +
|
|
6512
6550
|
" <nice-popup placement=\"bottom\">\n" +
|
|
6513
6551
|
" <nice-popup-target>\n" +
|
|
6514
|
-
" <span class=\"input-group-btn\">\n" +
|
|
6552
|
+
" <span class=\"input-group-btns input-group-btn\">\n" +
|
|
6553
|
+
" <button type=\"button\" class=\"btn btn-default btn-right\" ng-if=\"model && nullable && !date\" tabindex=\"-1\" ng-disabled=\"isDisabled\" ng-click=\"clear()\">\n" +
|
|
6554
|
+
" <nice-icon icon=\"icon-x\"></nice-icon>\n" +
|
|
6555
|
+
" </button>\n" +
|
|
6556
|
+
"\n" +
|
|
6515
6557
|
" <button type=\"button\" class=\"btn btn-default btn-right\" tabindex=\"-1\" ng-disabled=\"isDisabled\">\n" +
|
|
6516
6558
|
" <nice-icon icon=\"icon-clock\"></nice-icon>\n" +
|
|
6517
6559
|
" </button>\n" +
|
|
@@ -6563,11 +6605,14 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
6563
6605
|
"\n" +
|
|
6564
6606
|
" \n" +
|
|
6565
6607
|
" <div class=\"nice-date-button input-group\" ng-class=\"{ 'open': isOpen }\" ng-show=\"!inline\" ng-click=\"toggleOpen()\">\n" +
|
|
6566
|
-
" <input type=\"text\" class=\"form-control\" value=\"{{
|
|
6608
|
+
" <input type=\"text\" class=\"form-control\" value=\"{{ innerDate.value }}\" placeholder=\"{{ placeholder }}\" readonly=\"readonly\" ng-disabled=\"isDisabled\">\n" +
|
|
6567
6609
|
" <span class=\"input-group-btn\">\n" +
|
|
6568
|
-
" <button type=\"button\" class=\"btn btn-default btn-right\" ng-disabled=\"isDisabled\">\n" +
|
|
6610
|
+
" <button type=\"button\" class=\"btn btn-default btn-right\" ng-disabled=\"isDisabled\" ng-if=\"!(model && nullable)\">\n" +
|
|
6569
6611
|
" <nice-icon icon=\"icon-calendar\"></nice-icon>\n" +
|
|
6570
6612
|
" </button>\n" +
|
|
6613
|
+
" <button type=\"button\" class=\"btn btn-default btn-right\" ng-disabled=\"isDisabled\" ng-if=\"model && nullable\" ng-click=\"clear()\">\n" +
|
|
6614
|
+
" <nice-icon icon=\"icon-x\"></nice-icon>\n" +
|
|
6615
|
+
" </button>\n" +
|
|
6571
6616
|
" </span>\n" +
|
|
6572
6617
|
" </div>\n" +
|
|
6573
6618
|
"\n" +
|
|
@@ -8535,6 +8580,16 @@ angular.module('niceElements').run(['$templateCache', function($templateCache) {
|
|
|
8535
8580
|
" <path d=\"M23.6 7.70001L21.8 5.90001C21.5 5.60001 21 5.60001 20.6 5.80001C20.4 5.90001 19.1 6.90001 18.1 5.90001C17.1 4.90001 18.1 3.60001 18.2 3.40001C18.5 3.00001 18.4 2.50001 18.1 2.20001L16.3 0.400006C16.1 0.200006 15.9 0.100006 15.7 0.100006C15.5 0.100006 15.2 0.200006 15.1 0.400006L0.399976 15C0.199976 15.2 0.0999756 15.4 0.0999756 15.6C0.0999756 15.8 0.199976 16.1 0.399976 16.2L2.19998 18C2.59998 18.4 3.09998 18.4 3.49998 18C3.69998 17.8 4.79998 16.9 5.89998 18C6.99998 19.1 6.19998 20.1 5.89998 20.4C5.69998 20.6 5.59998 20.8 5.59998 21C5.59998 21.2 5.69998 21.5 5.89998 21.6L7.69998 23.4C7.89998 23.6 8.09998 23.7 8.29998 23.7C8.49998 23.7 8.79997 23.6 8.89997 23.4L23.6 9.00001C24 8.60001 24 8.00001 23.6 7.70001ZM18.1 12L17 10.9L15.9 12L17 13.1L8.29998 21.8L7.69998 21.2C7.79998 21 7.99998 20.7 8.09998 20.4C8.49998 19.2 8.19998 17.9 7.19998 17C5.69998 15.5 4.09998 15.8 2.99998 16.4L2.39998 15.8L10.9 7.00001L12 8.10001L13.1 7.00001L12 5.90001L15.7 2.20001L16.4 3.00001C15.8 4.10001 15.5 5.80001 16.9 7.20001C18.3 8.60001 20 8.30001 21.1 7.70001L21.8 8.40001L18.1 12Z\"></path>\n" +
|
|
8536
8581
|
" </symbol>\n" +
|
|
8537
8582
|
"\n" +
|
|
8583
|
+
" <symbol id=\"icon-x-o\" viewBox=\"0 0 36 36\">\n" +
|
|
8584
|
+
" <path d=\"M34 18C34 9.16344 26.8366 2 18 2C9.16344 2 2 9.16344 2 18C2 26.8366 9.16344 34 18 34V36C8.05887 36 0 27.9411 0 18C0 8.05887 8.05887 0 18 0C27.9411 0 36 8.05887 36 18C36 27.9411 27.9411 36 18 36V34C26.8366 34 34 26.8366 34 18Z\"/>\n" +
|
|
8585
|
+
" <path d=\"M11.293 12.707L16.586 18L11.293 23.293C10.902 23.684 10.902 24.317 11.293 24.707C11.684 25.097 12.317 25.098 12.707 24.707L18 19.414L23.293 24.707C23.684 25.098 24.317 25.098 24.707 24.707C25.097 24.316 25.098 23.683 24.707 23.293L19.414 18L24.707 12.707C25.098 12.316 25.098 11.683 24.707 11.293C24.316 10.903 23.683 10.902 23.293 11.293L18 16.586L12.707 11.293C12.316 10.902 11.683 10.902 11.293 11.293C10.903 11.684 10.902 12.317 11.293 12.707Z\"/>\n" +
|
|
8586
|
+
" </symbol>\n" +
|
|
8587
|
+
"\n" +
|
|
8588
|
+
" <symbol id=\"icon-check-o\" viewBox=\"0 0 36 36\">\n" +
|
|
8589
|
+
" <path d=\"M34 18C34 9.16344 26.8366 2 18 2C9.16344 2 2 9.16344 2 18C2 26.8366 9.16344 34 18 34V36C8.05887 36 0 27.9411 0 18C0 8.05887 8.05887 0 18 0C27.9411 0 36 8.05887 36 18C36 27.9411 27.9411 36 18 36V34C26.8366 34 34 26.8366 34 18Z\"/>\n" +
|
|
8590
|
+
" <path d=\"M25.2931 11.293L15.0001 21.586L10.7071 17.293C10.3161 16.902 9.68312 16.902 9.29312 17.293C8.90312 17.684 8.90212 18.317 9.29312 18.707L14.2931 23.707C14.6841 24.098 15.3171 24.098 15.7071 23.707L26.7071 12.707C27.0981 12.316 27.0981 11.683 26.7071 11.293C26.3161 10.903 25.6831 10.902 25.2931 11.293V11.293Z\"/>\n" +
|
|
8591
|
+
" </symbol>\n" +
|
|
8592
|
+
"\n" +
|
|
8538
8593
|
" <symbol id=\"icon-seat\" viewBox=\"0 0 370 370\">\n" +
|
|
8539
8594
|
" <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M31 261H339V300C339 329.823 314.823 354 285 354H85C55.1766 354 31 329.823 31 300V261ZM73.372 321C65.9937 316.906 61 309.036 61 300V291H309V300C309 309.036 304.006 316.906 296.628 321C293.183 322.911 289.219 324 285 324H85C80.7813 324 76.8167 322.911 73.372 321Z\"></path>\n" +
|
|
8540
8595
|
" <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M339 291H249V227C249 202.147 269.147 182 294 182C318.853 182 339 202.147 339 227V291ZM309 227C309 218.716 302.284 212 294 212C285.716 212 279 218.716 279 227V261H309V227Z\"></path>\n" +
|