nice-elements 1.14.0 → 1.14.1
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 +16 -11
- package/dist/nice.min.js +1 -1
- package/dist/style.css +36 -2
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +2 -2
- package/package.json +1 -1
- package/src/components/nice-alert/nice-alert.scss +5 -0
- package/src/components/nice-date/nice-date.scss +1 -0
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +1 -0
- package/src/components/nice-dropdown/nice-dropdown.html +3 -3
- package/src/components/nice-dropdown/nice-dropdown.js +5 -0
- package/src/components/nice-dropdown/nice-dropdown.scss +20 -0
- package/src/components/nice-input/nice-input.scss +1 -1
- package/src/components/nice-notification/nice-notification.scss +3 -1
- package/src/components/nice-percent/nice-percent.html +5 -5
- package/src/components/nice-toggle/nice-toggle.html +1 -1
- package/src/components/nice-toggle/nice-toggle.scss +15 -1
- package/src/components/nice-upload/nice-upload.html +1 -1
- package/src/components/nice-upload/nice-upload.scss +3 -0
- package/src/services/nice-service.js +1 -1
package/package.json
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
<input class="hidden-input" ng-model="model" ng-required="required" ng-disabled="disabled" tabindex="-1" />
|
|
12
12
|
<div class="btn-dropdown-inside" ng-transclude="button" ng-if="selected != null">
|
|
13
13
|
<span ng-if="!multiple">{{ selected[objValue] }}</span>
|
|
14
|
-
<span ng-if="multiple">
|
|
15
|
-
<span ng-if="selected.length >
|
|
16
|
-
<span ng-if="selected.length
|
|
14
|
+
<span ng-if="multiple" class="multiple-selected" ng-class="{ 'has-more': selected.length > maxSelectedShown }">
|
|
15
|
+
<span ng-if="selected.length > 0" class="multiple-selected-values"><span ng-repeat="item in selected | limitTo: maxSelectedShown">{{ item[objValue] }}{{ $last ? '' : ', ' }}</span></span>
|
|
16
|
+
<span ng-if="selected.length > maxSelectedShown" class="multiple-selected-more">+{{ selected.length - maxSelectedShown }} {{ moreText }}</span>
|
|
17
17
|
<span ng-if="selected.length == 0" class="not-selected">{{ nullableText }}</span>
|
|
18
18
|
</span>
|
|
19
19
|
</div>
|
|
@@ -46,6 +46,8 @@ angular.module('niceElements')
|
|
|
46
46
|
noSearch: '=',
|
|
47
47
|
nullableText: '@',
|
|
48
48
|
selectedText: '@',
|
|
49
|
+
maxSelectedShown: '@?', // Multiple: number of selected values shown before "+x more" (default 4)
|
|
50
|
+
moreText: '@?', // Multiple: text after "+x" (default "more")
|
|
49
51
|
dropdownDistance: '@',
|
|
50
52
|
searchFunction: '=?',
|
|
51
53
|
filterFunction: '=?',
|
|
@@ -65,6 +67,9 @@ angular.module('niceElements')
|
|
|
65
67
|
if (!$scope.nullableText) { $scope.nullableText = gettextCatalog.getString("None", null, "Nice"); }
|
|
66
68
|
if (!$scope.selectText) { $scope.selectText = gettextCatalog.getString("None", null, "Nice"); }
|
|
67
69
|
if (!$scope.selectedText) { $scope.selectedText = gettextCatalog.getString("selected", null, "Nice"); }
|
|
70
|
+
if (!$scope.moreText) { $scope.moreText = gettextCatalog.getString("more", null, "Nice"); }
|
|
71
|
+
$scope.maxSelectedShown = parseInt($scope.maxSelectedShown, 10);
|
|
72
|
+
if (isNaN($scope.maxSelectedShown) || $scope.maxSelectedShown < 1) { $scope.maxSelectedShown = 4; }
|
|
68
73
|
if (!$scope.addButtonFunction) { $scope.addButtonFunction = null; }
|
|
69
74
|
if (!$scope.placement) { $scope.placement = "bottom-start"; }
|
|
70
75
|
$scope.noMargin = $scope.noMargin === 'true' || $scope.noMargin === true;
|
|
@@ -205,6 +205,26 @@
|
|
|
205
205
|
line-height: 1.2;
|
|
206
206
|
margin-top: 1px;
|
|
207
207
|
flex-grow: 1;
|
|
208
|
+
|
|
209
|
+
.multiple-selected {
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: baseline;
|
|
212
|
+
min-width: 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.multiple-selected-values {
|
|
216
|
+
overflow: hidden;
|
|
217
|
+
text-overflow: ellipsis;
|
|
218
|
+
white-space: nowrap;
|
|
219
|
+
min-width: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.multiple-selected-more {
|
|
223
|
+
flex-shrink: 0;
|
|
224
|
+
margin-left: 6px;
|
|
225
|
+
opacity: 0.6;
|
|
226
|
+
white-space: nowrap;
|
|
227
|
+
}
|
|
208
228
|
}
|
|
209
229
|
|
|
210
230
|
.caret {
|
|
@@ -96,7 +96,8 @@
|
|
|
96
96
|
flex: 0 0 auto;
|
|
97
97
|
width: 20px;
|
|
98
98
|
height: 20px;
|
|
99
|
-
margin-right:
|
|
99
|
+
margin-right: 1rem;
|
|
100
|
+
flex-shrink: 0;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
.notification-content {
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
text-align: left;
|
|
110
111
|
font-size: 1em;
|
|
111
112
|
font-weight: bold;
|
|
113
|
+
margin-bottom: 3px;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
& a {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<ng-form class="nice-component nice-input" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="form">
|
|
1
|
+
<ng-form class="nice-component nice-percent nice-input nice-input-type-number" ng-class="{ 'margin-bottom-0' : noMargin, 'nice-component-inline': isInline }" name="form">
|
|
2
2
|
<div class="row">
|
|
3
3
|
<!------------------------- Title ------------------------->
|
|
4
4
|
<nice-title text="title || niceTitle" help="help" required="required" description="description" label-width="labelWidth"></nice-title>
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<!------------------------- Field ------------------------->
|
|
7
7
|
<div class="nice-field col-xs-12" ng-class="fieldWidth ? fieldWidth : 'col-sm-8'">
|
|
8
8
|
<div class="input-group has-feedback symbol" ng-class="{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
'has-warning': !isDisabled && form.$invalid && form.$dirty && !hideValid,
|
|
10
|
+
'has-success': !isDisabled && form.$valid && form.$dirty && showValid,
|
|
11
|
+
'disabled': isDisabled
|
|
12
|
+
}">
|
|
13
13
|
<input class="form-control" type="text" max="100" min="0" ng-model="internalModel" placeholder="{{ placeholder }}" ng-required="required" ng-keypress="keypress($event)" ng-change="change()" ng-disabled="isDisabled">
|
|
14
14
|
<span class="input-group-addon">%</span>
|
|
15
15
|
<!--<span ng-if="!disabled && showValid && form.$valid && form.$dirty" class="glyphicon glyphicon-ok form-control-feedback feedback-valid" aria-hidden="true"></span>-->
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<button type="button" class="nice-toggle-field" ng-click="toggle()" ng-disabled="isDisabled">
|
|
22
22
|
<div class="nice-toggle-field-handle">
|
|
23
23
|
<nice-icon ng-if="showIcons && model" icon="icon-check"></nice-icon>
|
|
24
|
-
<nice-icon ng-if="showIcons && !model" icon="icon-x"></nice-icon>
|
|
24
|
+
<!-- <nice-icon ng-if="showIcons && !model" icon="icon-x"></nice-icon> -->
|
|
25
25
|
</div>
|
|
26
26
|
</button>
|
|
27
27
|
</div>
|
|
@@ -81,9 +81,16 @@
|
|
|
81
81
|
cursor: not-allowed;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
// &:active {
|
|
85
|
+
// .nice-toggle-field-handle {
|
|
86
|
+
// transform: scale(1);
|
|
87
|
+
// }
|
|
88
|
+
// }
|
|
89
|
+
|
|
84
90
|
&:hover {
|
|
85
91
|
.nice-toggle-field-handle {
|
|
86
92
|
background: var(--nice-border-color-darker);
|
|
93
|
+
transform: scale(0.8);
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
96
|
|
|
@@ -95,7 +102,8 @@
|
|
|
95
102
|
height: 19px;
|
|
96
103
|
background: var(--nice-border-color);
|
|
97
104
|
border-radius: 50%;
|
|
98
|
-
transition: all 0.
|
|
105
|
+
transition: all 0.20s ease;
|
|
106
|
+
transform: scale(0.7);
|
|
99
107
|
|
|
100
108
|
display: flex;
|
|
101
109
|
flex-direction: column;
|
|
@@ -117,12 +125,18 @@
|
|
|
117
125
|
.nice-toggle-field-handle {
|
|
118
126
|
background: var(--nice-input-bg);
|
|
119
127
|
left: calc(100% - 22px);
|
|
128
|
+
transform: scale(1);
|
|
120
129
|
|
|
121
130
|
.nice-icon {
|
|
122
131
|
color: var(--nice-primary-color);
|
|
123
132
|
}
|
|
124
133
|
}
|
|
125
134
|
|
|
135
|
+
&:hover {
|
|
136
|
+
.nice-toggle-field-handle {
|
|
137
|
+
transform: scale(0.8);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
126
140
|
}
|
|
127
141
|
|
|
128
142
|
&.nice-toggle-success {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="text text-placeholder" ng-if="dragging" translate translate-group="Nice">Drop file here</div>
|
|
15
15
|
<div class="error" ng-if="error">{{ error }}</div>
|
|
16
16
|
</div>
|
|
17
|
-
<div ng-if="imageSource" ng-transclude>
|
|
17
|
+
<div ng-if="imageSource && !(loading && uploadProgress != null)" ng-transclude>
|
|
18
18
|
<img data-ng-src="{{ imageSource }}" />
|
|
19
19
|
</div>
|
|
20
20
|
</div>
|