@sgcloud-sgsistemas/base 1.0.0

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.
Files changed (140) hide show
  1. package/README.md +505 -0
  2. package/app.js +686 -0
  3. package/assets/img/custom-icon.svg +1 -0
  4. package/assets/img/logo-finance.png +0 -0
  5. package/assets/img/logo.png +0 -0
  6. package/assets/img/logo_company.png +0 -0
  7. package/assets/img/perfil.png +0 -0
  8. package/config/postcss.config.js +14 -0
  9. package/config/webpack.config.common.js +53 -0
  10. package/config/webpack.config.dev.js +50 -0
  11. package/config/webpack.config.prod.js +49 -0
  12. package/index.html +115 -0
  13. package/package.json +64 -0
  14. package/resources/audio/mouth-pop.mp3 +0 -0
  15. package/src/index.js +1 -0
  16. package/src/modules/base/components/container/container.style.scss +7 -0
  17. package/src/modules/base/components/container/container.template.html +2 -0
  18. package/src/modules/base/components/container/index.js +9 -0
  19. package/src/modules/base/components/content-container/content-container.style.scss +36 -0
  20. package/src/modules/base/components/content-container/content-container.template.html +8 -0
  21. package/src/modules/base/components/content-container/index.js +9 -0
  22. package/src/modules/base/controllers/base.controller.js +39 -0
  23. package/src/modules/base/index.js +42 -0
  24. package/src/modules/base/providers/theme.provider.js +12 -0
  25. package/src/modules/base/providers/themes.list.js +233 -0
  26. package/src/modules/base/styles/base.animations.scss +43 -0
  27. package/src/modules/base/styles/base.flex.scss +45 -0
  28. package/src/modules/base/styles/base.style.scss +169 -0
  29. package/src/modules/base/templates/base.template.html +6 -0
  30. package/src/modules/footer/components/footer/footer.controller.js +17 -0
  31. package/src/modules/footer/components/footer/footer.style.scss +0 -0
  32. package/src/modules/footer/components/footer/footer.template.html +25 -0
  33. package/src/modules/footer/components/footer/index.js +13 -0
  34. package/src/modules/footer/controllers/footer.controller.js +13 -0
  35. package/src/modules/footer/index.js +19 -0
  36. package/src/modules/footer/services/footer.service.js +24 -0
  37. package/src/modules/footer/styles/footer.animations.scss +11 -0
  38. package/src/modules/footer/styles/footer.style.scss +28 -0
  39. package/src/modules/footer/templates/footer.template.html +1 -0
  40. package/src/modules/pageloader/controllers/pageloader.controller.js +60 -0
  41. package/src/modules/pageloader/index.js +15 -0
  42. package/src/modules/pageloader/services/pageloader.service.js +15 -0
  43. package/src/modules/pageloader/styles/pageloader.style.scss +67 -0
  44. package/src/modules/pageloader/templates/pageloader.template.html +9 -0
  45. package/src/modules/side-content/components/btn/btn.controller.js +55 -0
  46. package/src/modules/side-content/components/btn/btn.style.scss +48 -0
  47. package/src/modules/side-content/components/btn/btn.template.html +18 -0
  48. package/src/modules/side-content/components/btn/index.js +17 -0
  49. package/src/modules/side-content/controllers/side-content.controller.js +93 -0
  50. package/src/modules/side-content/index.js +17 -0
  51. package/src/modules/side-content/services/side-content.service.js +49 -0
  52. package/src/modules/side-content/styles/side-content.style.scss +73 -0
  53. package/src/modules/side-content/templates/side-content.template.html +25 -0
  54. package/src/modules/side-menu/components/btn/btn.controller.js +13 -0
  55. package/src/modules/side-menu/components/btn/btn.style.scss +75 -0
  56. package/src/modules/side-menu/components/btn/btn.template.html +43 -0
  57. package/src/modules/side-menu/components/btn/index.js +26 -0
  58. package/src/modules/side-menu/components/category/category.style.scss +47 -0
  59. package/src/modules/side-menu/components/category/category.template.html +23 -0
  60. package/src/modules/side-menu/components/category/index.js +13 -0
  61. package/src/modules/side-menu/components/html/html.controller.js +5 -0
  62. package/src/modules/side-menu/components/html/html.template.html +3 -0
  63. package/src/modules/side-menu/components/html/index.js +14 -0
  64. package/src/modules/side-menu/components/item/index.js +29 -0
  65. package/src/modules/side-menu/components/item/item.template.html +40 -0
  66. package/src/modules/side-menu/components/link/index.js +18 -0
  67. package/src/modules/side-menu/components/link/link.controller.js +48 -0
  68. package/src/modules/side-menu/components/link/link.style.scss +10 -0
  69. package/src/modules/side-menu/components/link/link.template.html +21 -0
  70. package/src/modules/side-menu/components/quick-menu/index.js +14 -0
  71. package/src/modules/side-menu/components/quick-menu/quick-menu.controller.js +67 -0
  72. package/src/modules/side-menu/components/quick-menu/quick-menu.style.scss +151 -0
  73. package/src/modules/side-menu/components/quick-menu/quick-menu.template.html +44 -0
  74. package/src/modules/side-menu/components/sub-category/index.js +20 -0
  75. package/src/modules/side-menu/components/sub-category/sub-category.controller.js +16 -0
  76. package/src/modules/side-menu/components/sub-category/sub-category.style.scss +48 -0
  77. package/src/modules/side-menu/components/sub-category/sub-category.template.html +47 -0
  78. package/src/modules/side-menu/controllers/sideMenu.js +71 -0
  79. package/src/modules/side-menu/index.js +33 -0
  80. package/src/modules/side-menu/services/sideMenu.js +12 -0
  81. package/src/modules/side-menu/styles/side-menu.style.scss +86 -0
  82. package/src/modules/side-menu/templates/side-menu.template.html +30 -0
  83. package/src/modules/themes/themes.style.scss +227 -0
  84. package/src/modules/top-notifications/components/notification/index.js +17 -0
  85. package/src/modules/top-notifications/components/notification/notification.controller.js +168 -0
  86. package/src/modules/top-notifications/components/notification/notification.style.scss +210 -0
  87. package/src/modules/top-notifications/components/notification/notification.template.html +22 -0
  88. package/src/modules/top-notifications/controllers/top-notifications.controller.js +33 -0
  89. package/src/modules/top-notifications/index.js +18 -0
  90. package/src/modules/top-notifications/services/top-notifications.services.js +108 -0
  91. package/src/modules/top-notifications/styles/top-notifications.style.scss +0 -0
  92. package/src/modules/top-notifications/templates/top-notifications.template.html +5 -0
  93. package/src/modules/topbar/components/cashier/cashier.controller.js +17 -0
  94. package/src/modules/topbar/components/cashier/cashier.styles.scss +79 -0
  95. package/src/modules/topbar/components/cashier/cashier.template.html +32 -0
  96. package/src/modules/topbar/components/cashier/index.js +14 -0
  97. package/src/modules/topbar/components/cashier/service/cashier.service.js +43 -0
  98. package/src/modules/topbar/components/environment/environment.html +24 -0
  99. package/src/modules/topbar/components/environment/environment.js +16 -0
  100. package/src/modules/topbar/components/environment/environment.scss +137 -0
  101. package/src/modules/topbar/components/environment/index.js +11 -0
  102. package/src/modules/topbar/components/environment/service/environment.service.js +19 -0
  103. package/src/modules/topbar/components/notifications/index.js +13 -0
  104. package/src/modules/topbar/components/notifications/notifications.controller.js +108 -0
  105. package/src/modules/topbar/components/notifications/notifications.styles.scss +282 -0
  106. package/src/modules/topbar/components/notifications/notifications.template.html +154 -0
  107. package/src/modules/topbar/components/search/components/input/index.js +19 -0
  108. package/src/modules/topbar/components/search/components/input/input.controller.js +19 -0
  109. package/src/modules/topbar/components/search/components/input/input.style.scss +74 -0
  110. package/src/modules/topbar/components/search/components/input/input.template.html +8 -0
  111. package/src/modules/topbar/components/search/components/result-line/index.js +16 -0
  112. package/src/modules/topbar/components/search/components/result-line/result-line.controller.js +69 -0
  113. package/src/modules/topbar/components/search/components/result-line/result-line.style.scss +58 -0
  114. package/src/modules/topbar/components/search/components/result-line/result-line.template.html +29 -0
  115. package/src/modules/topbar/components/search/controllers/search.controller.js +298 -0
  116. package/src/modules/topbar/components/search/index.js +21 -0
  117. package/src/modules/topbar/components/search/styles/search.style.scss +114 -0
  118. package/src/modules/topbar/components/search/templates/search.template.html +48 -0
  119. package/src/modules/topbar/components/user/components/btn/btn.style.scss +35 -0
  120. package/src/modules/topbar/components/user/components/btn/btn.template.html +36 -0
  121. package/src/modules/topbar/components/user/components/btn/index.js +15 -0
  122. package/src/modules/topbar/components/user/components/link/index.js +18 -0
  123. package/src/modules/topbar/components/user/components/link/link.controller.js +15 -0
  124. package/src/modules/topbar/components/user/components/link/link.style.scss +13 -0
  125. package/src/modules/topbar/components/user/components/link/link.template.html +26 -0
  126. package/src/modules/topbar/components/user/components/loading/index.js +14 -0
  127. package/src/modules/topbar/components/user/components/loading/loading.animations.scss +9 -0
  128. package/src/modules/topbar/components/user/components/loading/loading.style.scss +12 -0
  129. package/src/modules/topbar/components/user/components/loading/loading.template.html +3 -0
  130. package/src/modules/topbar/components/user/controllers/user.controller.js +200 -0
  131. package/src/modules/topbar/components/user/index.js +27 -0
  132. package/src/modules/topbar/components/user/services/user.service.js +14 -0
  133. package/src/modules/topbar/components/user/styles/user.animations.scss +27 -0
  134. package/src/modules/topbar/components/user/styles/user.style.scss +997 -0
  135. package/src/modules/topbar/components/user/templates/user.template.html +252 -0
  136. package/src/modules/topbar/controllers/topbar.controller.js +27 -0
  137. package/src/modules/topbar/index.js +31 -0
  138. package/src/modules/topbar/services/base-notification-service.js +40 -0
  139. package/src/modules/topbar/styles/topbar.style.scss +211 -0
  140. package/src/modules/topbar/templates/topbar.template.html +93 -0
@@ -0,0 +1,154 @@
1
+ <div class="mb"
2
+ tabindex="-1"
3
+ notifications>
4
+ <i class="far fa-bell"
5
+ tabindex="-1"
6
+ class="bell"
7
+ ng-click="toogle()"></i>
8
+ <div class="mb-tn-number"
9
+ tabindex="-1"
10
+ ng-style="{'width': getWidth(total), 'right': getRight(total)}"
11
+ ng-show="total > 0">
12
+ {{ total }}
13
+ </div>
14
+ <div class="mb-tn-wrapper"
15
+ tabindex="-1"
16
+ ng-class="{open: notificationOpen}">
17
+ <div class="empty-notification"
18
+ tabindex="-1"
19
+ ng-show="notifications.length == 0">
20
+ <svg xmlns="http://www.w3.org/2000/svg"
21
+ xmlns:xlink="http://www.w3.org/1999/xlink"
22
+ version="1.1"
23
+ x="0px"
24
+ y="0px"
25
+ viewBox="0 0 100 100"
26
+ enable-background="new 0 0 100 100"
27
+ xml:space="preserve">
28
+ <path fill="#000000"
29
+ d="M78.382,69.688c-1.328,0-2.812-2.807-2.812-6.562V44.125h-0.015c-0.13-11.322-8.998-20.726-20.66-22.731 c-0.243-2.356-2.217-4.206-4.638-4.206c-2.421,0-4.395,1.85-4.638,4.206c-11.662,2.005-20.53,11.409-20.66,22.731h-0.015v19.001 c0,3.755-1.485,6.562-2.812,6.562c-1.551,0-2.812,1.261-2.812,2.812c0,1.551,1.262,2.812,2.812,2.812h19.783 c0.473,4.208,4.01,7.5,8.343,7.5c4.332,0,7.87-3.292,8.342-7.5h19.783c1.551,0,2.812-1.262,2.812-2.812 C81.194,70.949,79.933,69.688,78.382,69.688z M50.257,19.062c1.287,0,2.364,0.874,2.695,2.056c-0.887-0.088-1.784-0.137-2.695-0.137 c-0.912,0-1.81,0.049-2.696,0.137C47.893,19.936,48.969,19.062,50.257,19.062z M26.819,63.125v-18.75 c0-11.865,10.514-21.519,23.438-21.519c12.923,0,23.438,9.653,23.438,21.519v18.75c0,2.725,0.661,5.041,1.708,6.562H25.11 C26.158,68.166,26.819,65.85,26.819,63.125z M50.257,80.938c-3.298,0-6.008-2.454-6.468-5.625h12.935 C56.264,78.484,53.554,80.938,50.257,80.938z M78.382,73.438h-56.25c-0.516,0-0.938-0.421-0.938-0.938 c0-0.517,0.421-0.938,0.938-0.938h56.25c0.516,0,0.938,0.421,0.938,0.938C79.319,73.017,78.898,73.438,78.382,73.438z" />
30
+ <ellipse fill="#000000"
31
+ cx="40.881"
32
+ cy="50.938"
33
+ rx="1.875"
34
+ ry="2.812" />
35
+ <ellipse fill="#000000"
36
+ cx="59.632"
37
+ cy="50.938"
38
+ rx="1.875"
39
+ ry="2.812" />
40
+ <path fill="#000000"
41
+ d="M55.907,56.562c-0.518,0-0.938,0.419-0.938,0.938c0,2.586-2.102,4.688-4.688,4.688s-4.688-2.102-4.688-4.688 c0-0.518-0.419-0.938-0.938-0.938S43.72,56.982,43.72,57.5c0,3.619,2.944,6.563,6.562,6.563s6.562-2.944,6.562-6.563 C56.845,56.982,56.425,56.562,55.907,56.562z" />
42
+ </svg>
43
+ <label tabindex="-1" class="label-notification-empty">Sem novidades no momento</label>
44
+ </div>
45
+
46
+ <div style="max-height: 450px;overflow: auto;"
47
+ tabindex="-1"
48
+ ng-show="notificationsNews.length > 0 || notificationsOlds.length > 0">
49
+ <div class="row" tabindex="-1">
50
+ <div class="col-md-12"
51
+ tabindex="-1"
52
+ style="display: flex;
53
+ align-items: center;
54
+ justify-content: flex-end;
55
+ cursor: auto;">
56
+ <i class="fas fa-cog"
57
+ tabindex="-1"
58
+ ng-click="openSetting()"
59
+ style="margin: 12px 12px 0px 0px;
60
+ color: #666;
61
+ font-size: 16px;
62
+ cursor: pointer;"></i>
63
+ </div>
64
+ </div>
65
+ <div class="notification-group"
66
+ tabindex="-1"
67
+ ng-repeat="group in notifications">
68
+ <div class="row"
69
+ tabindex="-1"
70
+ style="cursor: auto;">
71
+ <div class="col-md-7" tabindex="-1">
72
+ <label tabindex="-1" class="mb-notification-label-category">{{ group.label }}</label>
73
+ </div>
74
+ <div ng-show="group.active"
75
+ tabindex="-1"
76
+ class="col-md-5 justify-end">
77
+ <a class="link"
78
+ tabindex="-1"
79
+ ng-click="clearAllNoticationsOlds()">Limpar Anteriores</a>
80
+ </div>
81
+ </div>
82
+ <div class="notifition-item notification-bottom"
83
+ tabindex="-1"
84
+ ng-repeat="notification in group.items"
85
+ first="{{ $first }}"
86
+ last="{{ $last }}">
87
+ <div class="notifition-item"
88
+ tabindex="-1"
89
+ ng-click="handleClickNotification($event, notification); toogle()">
90
+ <div class="notification-icon" tabindex="-1">
91
+ <i ng-class="notification.icon"
92
+ tabindex="-1"
93
+ ng-show="notification.type !== 'IMPORTATION_PROGRESS'"></i>
94
+ <i ng-class="{[notification.icon] : notification.data.progress < 100, 'fas fa-check-circle': notification.data.progress == 100 && !notification.data.failed, 'fas fa-times-circle': notification.data.progress == 100 && notification.data.failed}"
95
+ tabindex="-1"
96
+ ng-show="notification.type === 'IMPORTATION_PROGRESS'"></i>
97
+ </div>
98
+ <div class="notification-metadata" tabindex="-1">
99
+ <label class="notification-title"
100
+ tabindex="-1"
101
+ ng-bind-html="trustAsHtml(notification.title)"></label>
102
+ <label class="notification-time" tabindex="-1">
103
+ {{ notification.time }}
104
+ </label>
105
+ <label class="notification-body"
106
+ tabindex="-1"
107
+ ng-bind-html="trustAsHtml(notification.body)"></label>
108
+ <div class="notification-actions"
109
+ tabindex="-1"
110
+ ng-show="notification.actions.length > 0">
111
+ <button ng-repeat="action in notification.actions"
112
+ tabindex="-1"
113
+ ng-class="action.style"
114
+ ng-click="handleClickNotification($event, notification, action)">
115
+ {{ action.label }}
116
+ </span>
117
+ </button>
118
+ </div>
119
+ <div class="progress-wrapper"
120
+ tabindex="-1"
121
+ ng-if="notification.type === 'IMPORTATION_PROGRESS'">
122
+ <div class="mbg-progress-bar"
123
+ tabindex="-1"
124
+ style="--percentage: {{notification.data.progress}}%">
125
+ </div>
126
+ <label tabindex="-1" class="progress-label">{{notification.data.progress}}%</label>
127
+ </div>
128
+ <div class="info-import" tabindex="-1">
129
+ <span ng-show="notification.data.total" tabindex="-1">{{notification.data.current}}/{{notification.data.total}}</span>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ <div ng-show="notification.read"
134
+ tabindex="-1"
135
+ class="remove-notification">
136
+ <i class="fas fa-times"
137
+ tabindex="-1"
138
+ ng-click="removeNotification(notification)"></i>
139
+ </div>
140
+ </div>
141
+ </div>
142
+ <div class="row" tabindex="-1">
143
+ <div class="col-md-12 see-more-wrapper" tabindex="-1">
144
+ <a class="button-see-more"
145
+ tabindex="-1"
146
+ ng-if="!(totalDisplay >= total)"
147
+ ng-click="seeMore()">
148
+ Ver mais</a>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ <span tabindex="-1"class="arrow-up"></span>
153
+ </div>
154
+ </div>
@@ -0,0 +1,19 @@
1
+ import template from './input.template.html';
2
+ import controller from './input.controller';
3
+ import './input.style.scss';
4
+
5
+ const input = {
6
+ bindings: {
7
+ icon: '@',
8
+ name: '@',
9
+ type: '@',
10
+ placeholder: '@',
11
+ onFocus: '&?',
12
+ onBlur: '&?',
13
+ onChangeValue: '&?'
14
+ },
15
+ controller,
16
+ template
17
+ };
18
+
19
+ export default input;
@@ -0,0 +1,19 @@
1
+ const controller = function () {
2
+ this.focus = false;
3
+
4
+ this.focusInputInside = () => {
5
+ this.focus = true;
6
+ if (typeof this.onFocus === 'function') {
7
+ this.onFocus();
8
+ }
9
+ };
10
+ this.blurInputInside = () => {
11
+ this.focus = false;
12
+ this.value = null;
13
+ if (typeof this.onBlur === 'function') {
14
+ this.onBlur();
15
+ }
16
+ };
17
+ };
18
+
19
+ export default controller;
@@ -0,0 +1,74 @@
1
+ @import '../../../../../themes/themes.style.scss';
2
+
3
+ .mb[search-input] {
4
+ height: 30px;
5
+ background-color: #ffffff;
6
+ @include themify(background-color, backgroundSideMenu);
7
+ border-radius: 5px;
8
+ overflow: hidden;
9
+ padding-right: 15px;
10
+ position: relative;
11
+ z-index: 510;
12
+ border-radius: 34px;
13
+ border: none;
14
+ padding-left: 10px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+
19
+ &.mb-tsi-active {
20
+ border-color: #00bbbd;
21
+ @include themify(border-color, color1);
22
+ }
23
+
24
+ > .mb-tsi-icon-container {
25
+ display: inline-block;
26
+ line-height: 30px;
27
+ width: 30px;
28
+ text-align: center;
29
+ color: #ccc;
30
+ @include themify(color, neutral3);
31
+ font-size: 16px;
32
+
33
+ &.mb-tsi-active {
34
+ color: #00bbbd;
35
+ @include themify(color, color1);
36
+ }
37
+ }
38
+
39
+ > .mb-tsi-input-container {
40
+ height: 100%;
41
+
42
+ /* 100% menos o tamanho do container do ícone menos 5px */
43
+ width: calc(100% - 30px);
44
+ display: inline-block;
45
+
46
+ > .mb-tsi-input {
47
+ display: inline-block;
48
+ height: 30px;
49
+ width: 100%;
50
+ border: none;
51
+ background-color: transparent;
52
+ // color: #ccc;
53
+ // @include themify(color, neutral3);
54
+ font-family: 'Montserrat', sans-serif;
55
+ font-size: 14px;
56
+
57
+ &.mb-tsi-active {
58
+ color: #00bbbd;
59
+ @include themify(color, color1);
60
+ }
61
+
62
+ &::placeholder {
63
+ // color: #ccc;
64
+ // @include themify(color, neutral3);
65
+ color: #555555;
66
+ font-weight: 500;
67
+ }
68
+
69
+ &:active, &:focus {
70
+ outline: none;
71
+ }
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,8 @@
1
+ <div class="mb" tabindex="-1" search-input ng-class="{'mb-tsi-active' : $ctrl.focus, 'error' : $ctrl.error}">
2
+ <div class="mb-tsi-icon-container" tabindex="-1" ng-class="{'mb-tsi-active' : $ctrl.focus}">
3
+ <i class="fas" ng-class="$ctrl.icon" tabindex="-1"></i>
4
+ </div>
5
+ <div class="mb-tsi-input-container" tabindex="-1">
6
+ <input id="mb-tsi-input" tabindex="-1" ng-change="$ctrl.onChangeValue({text: $ctrl.value})" ng-model="$ctrl.value" ng-focus="$ctrl.focusInputInside()" ng-blur="$ctrl.blurInputInside()" placeholder="{{$ctrl.placeholder}}" class="mb-tsi-input" ng-class="{'mb-tsi-active' : $ctrl.focus}" type="{{$ctrl.type}}" name="{{$ctrl.name}}">
7
+ </div>
8
+ </div>
@@ -0,0 +1,16 @@
1
+ import controller from './result-line.controller';
2
+ import template from './result-line.template.html';
3
+ import './result-line.style.scss';
4
+
5
+ const component = {
6
+ bindings: {
7
+ line: '<',
8
+ index: '<',
9
+ selected: '<',
10
+ onSelect: '&'
11
+ },
12
+ template,
13
+ controller
14
+ };
15
+
16
+ export default component;
@@ -0,0 +1,69 @@
1
+ const controller = function ($scope) {
2
+ $scope.maintext = '';
3
+
4
+ const highLightMatches = (line) => {
5
+ const hightLighted = [];
6
+ const name = line.name.trim();
7
+ if (line.matches !== undefined) {
8
+ line.matches.forEach((match) => {
9
+ if (match.index.name === 'name') {
10
+ for (let i = 0; i < match.matches.length; i += 1) {
11
+ const indiceInicial = match.matches[i][0];
12
+ const indiceFinal = match.matches[i][1];
13
+ if (i === 0) {
14
+ /* Caso esteja no início */
15
+ if (indiceInicial === 0) {
16
+ hightLighted.push({ text: name.substring(indiceInicial, indiceFinal), highLight: true });
17
+ /* Caso o indice final não seja o fim da palavra */
18
+ if (indiceFinal < name.length) {
19
+ if (i === match.matches.length - 1) {
20
+ hightLighted.push({ text: name.substring(indiceFinal, name.length), highLight: false });
21
+ } else {
22
+ const indiceInicialProx = match.matches[i + 1][0];
23
+ if (name.substring(indiceFinal, indiceInicialProx).length > 0) {
24
+ hightLighted.push({ text: name.substring(indiceFinal, indiceInicialProx), highLight: false });
25
+ }
26
+ }
27
+ }
28
+ } else {
29
+ hightLighted.push({ text: name.substring(0, indiceInicial), highLight: false });
30
+ hightLighted.push({ text: name.substring(indiceInicial, indiceFinal), highLight: true });
31
+ if (i === match.matches.length - 1) {
32
+ if (name.substring(indiceFinal, name.length).length > 0) {
33
+ hightLighted.push({ text: name.substring(indiceFinal, name.length), highLight: false });
34
+ }
35
+ } else {
36
+ const indiceInicialProx = match.matches[i + 1][0];
37
+ if (name.substring(indiceFinal, indiceInicialProx).length > 0) {
38
+ hightLighted.push({ text: name.substring(indiceFinal, indiceInicialProx), highLight: false });
39
+ }
40
+ }
41
+ }
42
+ /* Caso esteja no final da lista de matches */
43
+ } else if (i === match.matches.length - 1) {
44
+ hightLighted.push({ text: name.substring(indiceInicial, indiceFinal), highLight: true });
45
+ if (name.substring(indiceFinal, name.length).length > 0) {
46
+ hightLighted.push({ text: name.substring(indiceFinal, name.length), highLight: false });
47
+ }
48
+ } else {
49
+ hightLighted.push({ text: name.substring(indiceInicial, indiceFinal), highLight: true });
50
+ const indiceInicialProx = match.matches[i + 1][0];
51
+ if (name.substring(indiceFinal, indiceInicialProx).length > 0) {
52
+ hightLighted.push({ text: name.substring(indiceFinal, indiceInicialProx), highLight: false });
53
+ }
54
+ }
55
+ }
56
+ }
57
+ });
58
+ } else {
59
+ hightLighted.push({ text: name, highLight: false });
60
+ }
61
+ $scope.maintext = hightLighted;
62
+ };
63
+
64
+ this.$onInit = () => {
65
+ highLightMatches(this.line);
66
+ };
67
+ };
68
+
69
+ export default controller;
@@ -0,0 +1,58 @@
1
+ @import "../../../../../themes/themes.style.scss";
2
+
3
+ $background: #f2f2f2;
4
+
5
+ .mb[autocomplete-line] {
6
+ width: 100%;
7
+ text-align: left;
8
+ align-items: flex-start;
9
+ color: #ccc;
10
+
11
+ @include themify(color, neutral2);
12
+
13
+ background-color: $background;
14
+ transition: background-color 100ms linear;
15
+ font-weight: 700;
16
+ font-size: 14px;
17
+ cursor: pointer;
18
+
19
+ > .mb-tsal-link {
20
+ padding: 7.5px 15px 7.5px 35px;
21
+ width: 100%;
22
+ height: 100%;
23
+ color: inherit;
24
+ text-decoration: none;
25
+ display: block;
26
+
27
+ > .mb-tsal-link-text {
28
+ display: inline-block;
29
+ margin: 0px;
30
+ padding: 0px;
31
+ text-align: left;
32
+ white-space: pre;
33
+ letter-spacing: 0px;
34
+ color: inherit;
35
+
36
+ &.mb-tsal-highlight {
37
+ background-color: rgb(255, 246, 192);
38
+ outline: rgb(230, 214, 152) solid 1px;
39
+ }
40
+ }
41
+
42
+ &:visited, &:focus, &:active {
43
+ color: inherit;
44
+ text-decoration: none;
45
+ outline: none;
46
+ box-shadow: none;
47
+ }
48
+ }
49
+
50
+ &.mb-tsal-link-active, &:active {
51
+ > .mb-tsal-link {
52
+ background-color: #fff;
53
+ color: #8228A2;
54
+
55
+ @include themify(color, color1);
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,29 @@
1
+ <div ng-class="{'mb-tsal-link-active': $ctrl.selected[0] === $ctrl.index[0] && $ctrl.selected[1] === $ctrl.index[1]}"
2
+ ng-mouseenter="$ctrl.onSelect({ index: $ctrl.index })"
3
+ class="mb"
4
+ autocomplete-line>
5
+ <a tabindex="-1"
6
+ class="mb-tsal-link"
7
+ ng-if="$ctrl.line.actionType === 'state'"
8
+ ui-sref="{{$ctrl.line.action}}">
9
+ <span ng-repeat="text in maintext"
10
+ class="mb-tsal-link-text"
11
+ ng-class="{'mb-tsal-highlight':text.highLight}">{{text.text}}</span>
12
+ </a>
13
+ <a tabindex="-1"
14
+ class="mb-tsal-link"
15
+ ng-if="$ctrl.line.actionType === 'link'"
16
+ href="{{$ctrl.line.action}}">
17
+ <span ng-repeat="text in maintext"
18
+ class="mb-tsal-link-text"
19
+ ng-class="{'mb-tsal-highlight':text.highLight}">{{text.text}}</span>
20
+ </a>
21
+ <a tabindex="-1"
22
+ class="mb-tsal-link"
23
+ ng-if="$ctrl.line.actionType === 'function'"
24
+ ng-click="$ctrl.line.action()">
25
+ <span ng-repeat="text in maintext"
26
+ class="mb-tsal-link-text"
27
+ ng-class="{'mb-tsal-highlight':text.highLight}">{{text.text}}</span>
28
+ </a>
29
+ </div>