nice-elements 1.9.4 → 1.9.6
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 +8 -0
- package/README.md +1 -1
- package/bower.json +1 -1
- package/dist/nice.js +102 -98
- package/dist/nice.min.js +1 -1
- package/package.json +1 -1
- package/src/components/nice-dropdown/nice-dropdown.html +3 -3
- package/src/components/nice-dropdown/nice-dropdown.js +13 -9
- package/src/components/nice-svgs/nice-svgs.html +1 -1
- package/src/services/nice-service.js +1 -1
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<!------------------------- Dropdown menu ------------------------->
|
|
28
28
|
<div class="nice-dropdown-menu-wrapper">
|
|
29
29
|
<div class="nice-dropdown-menu" ng-if="isOpen">
|
|
30
|
-
<div class="search-bar" ng-if="searchFunction">
|
|
30
|
+
<div class="search-bar" ng-if="!noSearch && searchFunction">
|
|
31
31
|
<input ng-model="internal.search" ng-model-options="{ debounce: 500 }" ng-change="handleSearch()" placeholder="{{ searchText }}" />
|
|
32
32
|
<div class="count" ng-if="internalList && internalList._metadata && enableLoadMore">{{ internalList.length }}/{{ internalList._metadata.count }}</div>
|
|
33
33
|
<nice-icon ng-if="!internal.search" class="icon" icon="icon-search"></nice-icon>
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
<div class="nice-dropdown-actions" ng-if="multiple">
|
|
37
37
|
<button class="btn btn-default btn-sm" ng-click="selectAll()" translate translate-context="Nice">All</button>
|
|
38
|
-
<button class="btn btn-default btn-sm" ng-click="selectNone()"
|
|
38
|
+
<button class="btn btn-default btn-sm" ng-click="selectNone()">{{ nullableText }}</button>
|
|
39
39
|
</div>
|
|
40
40
|
<div class="nice-dropdown-items" aria-labelledby="nice-dropdown-{{ id }}" role="listbox">
|
|
41
41
|
<div role="none" class="nice-no-data" ng-if="internalList && internalList.length == 0">{{ noDataText }}</div>
|
|
42
|
-
<button role="option" class="nice-dropdown-item null-item" ng-if="nullable && internalList.length != 0" ng-click="handleSelected(null, -1)" ng-disabled="isDisabled">
|
|
42
|
+
<button role="option" class="nice-dropdown-item null-item" ng-if="!multiple && nullable && internalList.length != 0" ng-click="handleSelected(null, -1)" ng-disabled="isDisabled">
|
|
43
43
|
{{ nullableText }}
|
|
44
44
|
</button>
|
|
45
45
|
<button role="option" class="nice-dropdown-item" ng-repeat="item in internalList" ng-click="handleSelected(item, $index)" ng-class="{ 'selected': item._selected }" ng-disabled="isDisabled">
|
|
@@ -40,6 +40,7 @@ angular.module('niceElements')
|
|
|
40
40
|
noDataText: '@',
|
|
41
41
|
selectText: '@',
|
|
42
42
|
searchText: '@',
|
|
43
|
+
noSearch: '=',
|
|
43
44
|
nullableText: '@',
|
|
44
45
|
selectedText: '@',
|
|
45
46
|
dropdownDistance: '@',
|
|
@@ -321,19 +322,21 @@ angular.module('niceElements')
|
|
|
321
322
|
|
|
322
323
|
if ($scope.selected != null) {
|
|
323
324
|
// Remove selected flag
|
|
324
|
-
if (
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
325
|
+
if (!$scope.selectedIsKey) {
|
|
326
|
+
if ($scope.multiple) {
|
|
327
|
+
angular.forEach(obj, function (o) {
|
|
328
|
+
o._selected = undefined;
|
|
329
|
+
});
|
|
330
|
+
} else {
|
|
331
|
+
obj._selected = undefined;
|
|
332
|
+
}
|
|
330
333
|
}
|
|
331
334
|
|
|
332
335
|
// Selected is object
|
|
333
336
|
if ($scope.selectedIsKey) {
|
|
334
337
|
if ($scope.multiple) {
|
|
335
|
-
|
|
336
|
-
|
|
338
|
+
obj = obj.map(function (o) {
|
|
339
|
+
return o[$scope.objKey];
|
|
337
340
|
});
|
|
338
341
|
} else {
|
|
339
342
|
obj = obj[$scope.objKey];
|
|
@@ -386,10 +389,11 @@ angular.module('niceElements')
|
|
|
386
389
|
// Not object
|
|
387
390
|
if ($scope.multiple) {
|
|
388
391
|
// Multiple
|
|
389
|
-
angular.forEach($scope.selected, function (s) {
|
|
392
|
+
angular.forEach($scope.selected, function (s, index) {
|
|
390
393
|
if (i[$scope.objKey] == s) {
|
|
391
394
|
i._selected = true;
|
|
392
395
|
// $scope.selected.push(i);
|
|
396
|
+
$scope.selected[index] = i
|
|
393
397
|
// $scope.selectedIndex = index;
|
|
394
398
|
}
|
|
395
399
|
});
|
|
@@ -1231,7 +1231,7 @@
|
|
|
1231
1231
|
<path d="m364 102.4-1.8-1.4c.4 0 .7 0 1-.2.1-.1.3-.4.3-.8l1.1 1 .6.5v.4a.5.5 0 0 1 0 .2.6.6 0 0 1-.4.2h-.7z" />
|
|
1232
1232
|
<path d="M366.2 103.8a11.8 11.8 0 0 1-2-1.3h.7a.8.8 0 0 0 .4-.2l.1-.4a1 1 0 0 0 0-.2 10.5 10.5 0 0 0 2.1 1.4c0 .3 0 .4-.3.5a3 3 0 0 1-1 .1z" />
|
|
1233
1233
|
<path d="M368.4 104.7a11.9 11.9 0 0 1-2-.8c.4 0 .7 0 1-.2.2 0 .3-.2.3-.5a10.8 10.8 0 0 0 1.3.6v.4l-.5.4s-.1 0 0 0z" />
|
|
1234
|
-
<path d="M373.2 104.2s.4-.1.2 0c-1.4 1-3.1 1-4.8.5.3-.1.5-.2.6-.4a.6.6 0 0 0 0-.5l1.7.4a.4.4 0 0 1-.1.3l-.5.3s-.1 0 0 .1c0 .1 0 0 0 0 .3 0 .5-.2.6-.3a.6.6 0 0 0 .2-.4 9 9 0 0 0 2 0zm-9.7 24-.2.4-1.2.3c0 .3 0 .4.3.4l.7-.3c.1 0 0 .5-.5.8v.1c.4.6 1.4.4 1.9.3a3 3 0 0 0 1.3-1l-.3-.6c-.4.1-.6 0-.5-.2a3.9 3.9 0 0 0-1.5-.2zm-15.1-4.8c-.3.3-.7.5-1 .6-.2 0-.6.1-.6.3 0 .1.2.3.4.2.4-.5.7-.2.2.2v.3c.5.4 1.6.5 2.2.2.3-.2.6-.5.2-.9a1.7 1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