@sgcloud-sgsistemas/base 1.3.1 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sgcloud-sgsistemas/base",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Base para os sistemas da mobiage",
5
5
  "repository": {
6
6
  "type": "private",
@@ -257,6 +257,10 @@ mb-topbar-notifications {
257
257
  color: var(--error);
258
258
  }
259
259
 
260
+ .fas.fa-check-circle.warn {
261
+ color: var(--warn);
262
+ }
263
+
260
264
  .remove-notification {
261
265
  display: flex;
262
266
  flex-direction: column;
@@ -14,13 +14,11 @@ const controller = function ($scope, $timeout, mbSidemenuService, hotkeys) {
14
14
  const incrementSelected = () => {
15
15
  if ($scope.selected === undefined) {
16
16
  $scope.selected = [0, 0];
17
- } else {
18
- let [groupIndex, resultIndex] = $scope.selected;
19
-
20
- if (resultIndex < $scope.result[groupIndex].children.length - 1) {
17
+ } else if ($scope.selected[0] < $scope.result.length) {
18
+ if ($scope.selected[1] < $scope.result[$scope.selected[0]].children.length - 1) {
21
19
  $scope.selected[1] += 1;
22
- } else {
23
- $scope.selected[0] = (groupIndex < $scope.result.length - 1) ? groupIndex + 1 : 0;
20
+ } else if (!($scope.selected[0] === $scope.result.length - 1 && $scope.selected[1] === $scope.result[$scope.selected[0]].children.length - 1)) {
21
+ $scope.selected[0] += 1;
24
22
  $scope.selected[1] = 0;
25
23
  }
26
24
  }
@@ -28,12 +26,10 @@ const controller = function ($scope, $timeout, mbSidemenuService, hotkeys) {
28
26
 
29
27
  const decrementSelected = () => {
30
28
  if ($scope.selected !== undefined) {
31
- let [groupIndex, resultIndex] = $scope.selected;
32
-
33
- if (resultIndex > 0) {
29
+ if ($scope.selected[1] > 0) {
34
30
  $scope.selected[1] -= 1;
35
- } else {
36
- $scope.selected[0] = (groupIndex > 0) ? groupIndex - 1 : $scope.result.length - 1;
31
+ } else if ($scope.selected[0] > 0) {
32
+ $scope.selected[0] -= 1;
37
33
  $scope.selected[1] = $scope.result[$scope.selected[0]].children.length - 1;
38
34
  }
39
35
  }
@@ -134,7 +130,7 @@ const controller = function ($scope, $timeout, mbSidemenuService, hotkeys) {
134
130
  }
135
131
  });
136
132
  // TO-DO (Limitar resultados parando o algoritmo ao chegar no limite de resultados)
137
- return elements.sort((a, b) => a.name.length - b.name.length)
133
+ return elements.sort((a, b) => a.matchesCount > b.matchesCount).reverse();
138
134
  };
139
135
 
140
136
  /* Para cada tipo, faz um elemento no array */