@updevs/components 1.0.0-alpha.1 → 1.0.0-alpha.3

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 (310) hide show
  1. package/README.md +5 -22
  2. package/assets/styles/_bootstrap-components.scss +38 -0
  3. package/assets/styles/_bootstrap-config.scss +7 -0
  4. package/assets/styles/_bootstrap-override.scss +78 -0
  5. package/assets/styles/_config.scss +9 -0
  6. package/assets/styles/_core.scss +71 -0
  7. package/assets/styles/_mixins.scss +2 -0
  8. package/assets/styles/_updevs.scss +9 -0
  9. package/assets/styles/_utilities.scss +98 -0
  10. package/assets/styles/_variables-dark.scss +17 -0
  11. package/assets/styles/_variables.scss +934 -0
  12. package/assets/styles/fonts/_webfonts.scss +15 -0
  13. package/assets/styles/layout/_animations.scss +62 -0
  14. package/assets/styles/layout/_core.scss +61 -0
  15. package/assets/styles/layout/_dark.scss +72 -0
  16. package/assets/styles/layout/_footer.scss +12 -0
  17. package/assets/styles/layout/_navbar.scss +380 -0
  18. package/assets/styles/layout/_page.scss +169 -0
  19. package/assets/styles/layout/_root.scss +72 -0
  20. package/assets/styles/mixins/_functions.scss +43 -0
  21. package/assets/styles/mixins/_mixins.scss +68 -0
  22. package/assets/styles/ui/_accordion.scss +24 -0
  23. package/assets/styles/ui/_alerts.scss +59 -0
  24. package/assets/styles/ui/_avatars.scss +118 -0
  25. package/assets/styles/ui/_badges.scss +79 -0
  26. package/assets/styles/ui/_breadcrumbs.scss +50 -0
  27. package/assets/styles/ui/_button-group.scss +16 -0
  28. package/assets/styles/ui/_buttons.scss +265 -0
  29. package/assets/styles/ui/_calendars.scss +104 -0
  30. package/assets/styles/ui/_cards.scss +586 -0
  31. package/assets/styles/ui/_carousel.scss +68 -0
  32. package/assets/styles/ui/_charts.scss +61 -0
  33. package/assets/styles/ui/_chips.scss +0 -0
  34. package/assets/styles/ui/_close.scss +7 -0
  35. package/assets/styles/ui/_datagrid.scss +17 -0
  36. package/assets/styles/ui/_dropdowns.scss +117 -0
  37. package/assets/styles/ui/_empty.scss +65 -0
  38. package/assets/styles/ui/_flags.scss +31 -0
  39. package/assets/styles/ui/_forms.scss +224 -0
  40. package/assets/styles/ui/_grid.scss +115 -0
  41. package/assets/styles/ui/_icons.scss +72 -0
  42. package/assets/styles/ui/_images.scss +15 -0
  43. package/assets/styles/ui/_legend.scss +12 -0
  44. package/assets/styles/ui/_lists.scss +127 -0
  45. package/assets/styles/ui/_loaders.scss +72 -0
  46. package/assets/styles/ui/_login.scss +3 -0
  47. package/assets/styles/ui/_markdown.scss +42 -0
  48. package/assets/styles/ui/_modals.scss +67 -0
  49. package/assets/styles/ui/_nav.scss +92 -0
  50. package/assets/styles/ui/_offcanvas.scss +17 -0
  51. package/assets/styles/ui/_pagination.scss +56 -0
  52. package/assets/styles/ui/_payments.scss +28 -0
  53. package/assets/styles/ui/_placeholder.scss +9 -0
  54. package/assets/styles/ui/_popovers.scss +2 -0
  55. package/assets/styles/ui/_progress.scss +107 -0
  56. package/assets/styles/ui/_ribbons.scss +156 -0
  57. package/assets/styles/ui/_stars.scss +13 -0
  58. package/assets/styles/ui/_status.scss +163 -0
  59. package/assets/styles/ui/_steps.scss +152 -0
  60. package/assets/styles/ui/_switch-icon.scss +211 -0
  61. package/assets/styles/ui/_tables.scss +150 -0
  62. package/assets/styles/ui/_tags.scss +57 -0
  63. package/assets/styles/ui/_timeline.scss +61 -0
  64. package/assets/styles/ui/_toasts.scss +19 -0
  65. package/assets/styles/ui/_toolbar.scss +10 -0
  66. package/assets/styles/ui/_tracking.scss +29 -0
  67. package/assets/styles/ui/_type.scss +169 -0
  68. package/assets/styles/ui/forms/_form-check.scss +91 -0
  69. package/assets/styles/ui/forms/_form-colorinput.scss +54 -0
  70. package/assets/styles/ui/forms/_form-custom.scss +28 -0
  71. package/assets/styles/ui/forms/_form-icon.scss +35 -0
  72. package/assets/styles/ui/forms/_form-imagecheck.scss +104 -0
  73. package/assets/styles/ui/forms/_form-selectgroup.scss +153 -0
  74. package/assets/styles/ui/forms/_validation.scss +13 -0
  75. package/assets/styles/ui/typo/_hr.scss +74 -0
  76. package/assets/styles/utils/_background.scss +15 -0
  77. package/assets/styles/utils/_colors.scss +40 -0
  78. package/assets/styles/utils/_opacity.scss +7 -0
  79. package/assets/styles/utils/_scroll.scss +47 -0
  80. package/assets/styles/utils/_shadow.scss +17 -0
  81. package/assets/styles/utils/_sizing.scss +10 -0
  82. package/assets/styles/utils/_text.scss +15 -0
  83. package/button/ng-package.json +7 -0
  84. package/button/src/button.component.html +8 -0
  85. package/button/src/button.component.scss +5 -0
  86. package/button/src/button.component.spec.ts +23 -0
  87. package/button/src/button.component.ts +154 -0
  88. package/button/src/index.ts +1 -0
  89. package/button/src/public-api.ts +2 -0
  90. package/button/src/upd-button.module.ts +17 -0
  91. package/card/ng-package.json +7 -0
  92. package/card/src/card.component.html +105 -0
  93. package/card/src/card.component.scss +47 -0
  94. package/card/src/card.component.spec.ts +23 -0
  95. package/card/src/card.component.ts +112 -0
  96. package/card/src/directives/card-actions.directive.spec.ts +8 -0
  97. package/card/src/directives/card-actions.directive.ts +11 -0
  98. package/card/src/directives/card-footer.directive.spec.ts +8 -0
  99. package/card/src/directives/card-footer.directive.ts +11 -0
  100. package/card/src/directives/card-header.directive.spec.ts +8 -0
  101. package/card/src/directives/card-header.directive.ts +11 -0
  102. package/card/src/directives/card-image.directive.spec.ts +8 -0
  103. package/card/src/directives/card-image.directive.ts +11 -0
  104. package/card/src/directives/public-api.ts +4 -0
  105. package/card/src/index.ts +1 -0
  106. package/card/src/public-api.ts +3 -0
  107. package/card/src/types/card-state.type.ts +1 -0
  108. package/card/src/types/card-style.type.ts +1 -0
  109. package/card/src/types/hover-effect.type.ts +1 -0
  110. package/card/src/types/public-api.ts +5 -0
  111. package/card/src/types/ribbon-style.type.ts +1 -0
  112. package/card/src/types/status-position.type.ts +1 -0
  113. package/card/src/upd-card.module.ts +32 -0
  114. package/dropdown/ng-package.json +7 -0
  115. package/dropdown/src/dropdown.component.html +32 -0
  116. package/dropdown/src/dropdown.component.scss +19 -0
  117. package/dropdown/src/dropdown.component.spec.ts +23 -0
  118. package/dropdown/src/dropdown.component.ts +182 -0
  119. package/dropdown/src/index.ts +1 -0
  120. package/dropdown/src/models/dropdown-item.ts +22 -0
  121. package/dropdown/src/models/dropdown-item.type.ts +1 -0
  122. package/dropdown/src/models/public-api.ts +2 -0
  123. package/dropdown/src/public-api.ts +3 -0
  124. package/dropdown/src/upd-dropdown.module.ts +25 -0
  125. package/form/ng-package.json +7 -0
  126. package/form/src/form.module.ts +10 -0
  127. package/form/src/index.ts +1 -0
  128. package/form/src/public-api.ts +1 -0
  129. package/form-controls/checkbox/ng-package.json +7 -0
  130. package/form-controls/checkbox/src/checkbox.component.html +7 -0
  131. package/form-controls/checkbox/src/checkbox.component.scss +0 -0
  132. package/form-controls/checkbox/src/checkbox.component.spec.ts +23 -0
  133. package/form-controls/checkbox/src/checkbox.component.ts +48 -0
  134. package/form-controls/checkbox/src/index.ts +1 -0
  135. package/form-controls/checkbox/src/public-api.ts +3 -0
  136. package/form-controls/checkbox/src/upd-checkbox.module.ts +19 -0
  137. package/form-controls/input/ng-package.json +7 -0
  138. package/form-controls/input/src/directives/input-append.directive.spec.ts +8 -0
  139. package/form-controls/input/src/directives/input-append.directive.ts +11 -0
  140. package/form-controls/input/src/directives/input-prepend.directive.spec.ts +8 -0
  141. package/form-controls/input/src/directives/input-prepend.directive.ts +11 -0
  142. package/form-controls/input/src/directives/public-api.ts +2 -0
  143. package/form-controls/input/src/index.ts +1 -0
  144. package/form-controls/input/src/input.component.html +82 -0
  145. package/form-controls/input/src/input.component.scss +13 -0
  146. package/form-controls/input/src/input.component.spec.ts +23 -0
  147. package/form-controls/input/src/input.component.ts +124 -0
  148. package/form-controls/input/src/public-api.ts +4 -0
  149. package/form-controls/input/src/types/input.type.ts +1 -0
  150. package/form-controls/input/src/types/loader-position.type.ts +1 -0
  151. package/form-controls/input/src/types/public-api.ts +2 -0
  152. package/form-controls/input/src/upd-input.module.ts +29 -0
  153. package/form-controls/radio/ng-package.json +7 -0
  154. package/form-controls/radio/src/index.ts +1 -0
  155. package/form-controls/radio/src/public-api.ts +2 -0
  156. package/form-controls/radio/src/radio.component.html +7 -0
  157. package/form-controls/radio/src/radio.component.scss +0 -0
  158. package/form-controls/radio/src/radio.component.spec.ts +23 -0
  159. package/form-controls/radio/src/radio.component.ts +47 -0
  160. package/form-controls/radio/src/upd-radio.module.ts +17 -0
  161. package/form-controls/select/ng-package.json +7 -0
  162. package/form-controls/select/src/components/multiple/select-multiple.component.html +41 -0
  163. package/form-controls/select/src/components/multiple/select-multiple.component.scss +6 -0
  164. package/form-controls/select/src/components/multiple/select-multiple.component.spec.ts +21 -0
  165. package/form-controls/select/src/components/multiple/select-multiple.component.ts +69 -0
  166. package/form-controls/select/src/components/shared.scss +40 -0
  167. package/form-controls/select/src/components/single/select.component.html +53 -0
  168. package/form-controls/select/src/components/single/select.component.scss +3 -0
  169. package/form-controls/select/src/components/single/select.component.spec.ts +23 -0
  170. package/form-controls/select/src/components/single/select.component.ts +58 -0
  171. package/form-controls/select/src/index.ts +1 -0
  172. package/form-controls/select/src/models/abstractions/base-select.component.ts +259 -0
  173. package/form-controls/select/src/models/public-api.ts +1 -0
  174. package/form-controls/select/src/models/select-item.ts +26 -0
  175. package/form-controls/select/src/public-api.ts +4 -0
  176. package/form-controls/select/src/upd-select.module.ts +32 -0
  177. package/form-controls/textarea/ng-package.json +7 -0
  178. package/form-controls/textarea/src/index.ts +1 -0
  179. package/form-controls/textarea/src/public-api.ts +2 -0
  180. package/form-controls/textarea/src/textarea.component.html +8 -0
  181. package/form-controls/textarea/src/textarea.component.scss +0 -0
  182. package/form-controls/textarea/src/textarea.component.spec.ts +23 -0
  183. package/form-controls/textarea/src/textarea.component.ts +47 -0
  184. package/form-controls/textarea/src/upd-textarea.module.ts +17 -0
  185. package/form-controls/time-picker/ng-package.json +7 -0
  186. package/form-controls/time-picker/src/assets/i18n/en.json +5 -0
  187. package/form-controls/time-picker/src/assets/i18n/pt.json +5 -0
  188. package/form-controls/time-picker/src/index.ts +1 -0
  189. package/form-controls/time-picker/src/public-api.ts +3 -0
  190. package/form-controls/time-picker/src/time-picker.component.html +17 -0
  191. package/form-controls/time-picker/src/time-picker.component.scss +10 -0
  192. package/form-controls/time-picker/src/time-picker.component.spec.ts +21 -0
  193. package/form-controls/time-picker/src/time-picker.component.ts +110 -0
  194. package/form-controls/time-picker/src/time-selector/time-selector.component.html +44 -0
  195. package/form-controls/time-picker/src/time-selector/time-selector.component.scss +47 -0
  196. package/form-controls/time-picker/src/time-selector/time-selector.component.spec.ts +21 -0
  197. package/form-controls/time-picker/src/time-selector/time-selector.component.ts +107 -0
  198. package/form-controls/time-picker/src/upd-time-picker.module.ts +39 -0
  199. package/layout/ng-package.json +7 -0
  200. package/layout/src/abstractions/base-page.component.ts +21 -0
  201. package/layout/src/abstractions/public-api.ts +1 -0
  202. package/layout/src/assets/i18n/en.json +5 -0
  203. package/layout/src/assets/i18n/pt.json +5 -0
  204. package/layout/src/index.ts +1 -0
  205. package/layout/src/layouts/blank-layout/blank-layout.component.html +1 -0
  206. package/layout/src/layouts/blank-layout/blank-layout.component.scss +0 -0
  207. package/layout/src/layouts/blank-layout/blank-layout.component.spec.ts +23 -0
  208. package/layout/src/layouts/blank-layout/blank-layout.component.ts +10 -0
  209. package/layout/src/layouts/blank-layout/blank-layout.module.ts +17 -0
  210. package/layout/src/layouts/public-api.ts +4 -0
  211. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.html +14 -0
  212. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.scss +0 -0
  213. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.spec.ts +23 -0
  214. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.ts +31 -0
  215. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.ts +52 -0
  216. package/layout/src/models/public-api.ts +1 -0
  217. package/layout/src/models/upd-layout-config.model.ts +71 -0
  218. package/layout/src/models/upd-layout.config.ts +37 -0
  219. package/layout/src/pages/auth-flow/auth-flow-routing.module.ts +21 -0
  220. package/layout/src/pages/auth-flow/auth-flow.module.ts +29 -0
  221. package/layout/src/pages/auth-flow/logged-out/logged-out.component.html +1 -0
  222. package/layout/src/pages/auth-flow/logged-out/logged-out.component.scss +0 -0
  223. package/layout/src/pages/auth-flow/logged-out/logged-out.component.spec.ts +23 -0
  224. package/layout/src/pages/auth-flow/logged-out/logged-out.component.ts +10 -0
  225. package/layout/src/pages/auth-flow/login/login.component.html +96 -0
  226. package/layout/src/pages/auth-flow/login/login.component.scss +0 -0
  227. package/layout/src/pages/auth-flow/login/login.component.spec.ts +23 -0
  228. package/layout/src/pages/auth-flow/login/login.component.ts +26 -0
  229. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.html +1 -0
  230. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.scss +0 -0
  231. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.spec.ts +23 -0
  232. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.ts +10 -0
  233. package/layout/src/pages/auth-flow/public-api.ts +5 -0
  234. package/layout/src/pages/public-api.ts +1 -0
  235. package/layout/src/partials/footer/footer-copyright.directive.spec.ts +8 -0
  236. package/layout/src/partials/footer/footer-copyright.directive.ts +9 -0
  237. package/layout/src/partials/footer/footer.component.html +30 -0
  238. package/layout/src/partials/footer/footer.component.scss +0 -0
  239. package/{src/lib/components.component.spec.ts → layout/src/partials/footer/footer.component.spec.ts} +6 -6
  240. package/layout/src/partials/footer/footer.component.ts +73 -0
  241. package/layout/src/partials/footer/public-api.ts +2 -0
  242. package/layout/src/partials/header/header-style.type.ts +1 -0
  243. package/layout/src/partials/header/header.component.html +163 -0
  244. package/layout/src/partials/header/header.component.scss +0 -0
  245. package/layout/src/partials/header/header.component.spec.ts +23 -0
  246. package/layout/src/partials/header/header.component.ts +86 -0
  247. package/layout/src/partials/header/public-api.ts +2 -0
  248. package/layout/src/partials/page-header/page-header.component.html +19 -0
  249. package/layout/src/partials/page-header/page-header.component.scss +0 -0
  250. package/layout/src/partials/page-header/page-header.component.spec.ts +23 -0
  251. package/layout/src/partials/page-header/page-header.component.ts +11 -0
  252. package/layout/src/partials/page-header/public-api.ts +1 -0
  253. package/layout/src/partials/public-api.ts +4 -0
  254. package/layout/src/partials/sidebar/public-api.ts +1 -0
  255. package/layout/src/partials/sidebar/sidebar.component.html +62 -0
  256. package/layout/src/partials/sidebar/sidebar.component.scss +0 -0
  257. package/layout/src/partials/sidebar/sidebar.component.spec.ts +23 -0
  258. package/layout/src/partials/sidebar/sidebar.component.ts +161 -0
  259. package/layout/src/public-api.ts +7 -0
  260. package/layout/src/services/public-api.ts +1 -0
  261. package/{src/lib/components.service.spec.ts → layout/src/services/upd-layout-config.service.spec.ts} +4 -4
  262. package/layout/src/services/upd-layout-config.service.ts +20 -0
  263. package/layout/src/tools/layout.constants.ts +18 -0
  264. package/layout/src/upd-layout.module.ts +34 -0
  265. package/link/ng-package.json +7 -0
  266. package/link/src/index.ts +1 -0
  267. package/link/src/link.component.html +3 -0
  268. package/link/src/link.component.scss +3 -0
  269. package/link/src/link.component.spec.ts +23 -0
  270. package/link/src/link.component.ts +48 -0
  271. package/link/src/public-api.ts +3 -0
  272. package/link/src/target.type.ts +1 -0
  273. package/link/src/upd-link.module.ts +17 -0
  274. package/list/ng-package.json +7 -0
  275. package/list/src/assets/i18n/en.json +5 -0
  276. package/list/src/assets/i18n/pt.json +5 -0
  277. package/list/src/index.ts +1 -0
  278. package/list/src/list.component.html +58 -0
  279. package/list/src/list.component.scss +21 -0
  280. package/list/src/list.component.spec.ts +23 -0
  281. package/list/src/list.component.ts +147 -0
  282. package/list/src/models/badge-position.type.ts +1 -0
  283. package/list/src/models/list-item.model.ts +35 -0
  284. package/list/src/models/list-item.ts +21 -0
  285. package/list/src/models/public-api.ts +2 -0
  286. package/list/src/public-api.ts +3 -0
  287. package/list/src/upd-list.module.ts +30 -0
  288. package/ng-package.json +9 -6
  289. package/package.json +8 -5
  290. package/popover/ng-package.json +7 -0
  291. package/popover/src/index.ts +1 -0
  292. package/popover/src/popover.component.html +20 -0
  293. package/popover/src/popover.component.scss +8 -0
  294. package/popover/src/popover.component.spec.ts +23 -0
  295. package/popover/src/popover.component.ts +53 -0
  296. package/popover/src/popover.directive.spec.ts +8 -0
  297. package/popover/src/popover.directive.ts +128 -0
  298. package/popover/src/public-api.ts +3 -0
  299. package/popover/src/upd-popover.module.ts +20 -0
  300. package/src/lib/index.ts +1 -0
  301. package/src/lib/public-api.ts +2 -0
  302. package/src/lib/types/component-size.type.ts +1 -0
  303. package/src/lib/types/public-api.ts +2 -0
  304. package/src/lib/types/validation-status.type.ts +1 -0
  305. package/src/lib/upd-components.module.ts +6 -0
  306. package/src/public-api.ts +1 -7
  307. package/tsconfig.lib.json +11 -11
  308. package/src/lib/components.component.ts +0 -14
  309. package/src/lib/components.module.ts +0 -17
  310. package/src/lib/components.service.ts +0 -9
@@ -0,0 +1,44 @@
1
+ <div class="d-flex">
2
+ <div class="time-items-list">
3
+ <ul class="list">
4
+ <li *ngFor="let h of hoursList">
5
+ <div class="cell">{{h.toString().padStart(2, '0')}}</div>
6
+ </li>
7
+ </ul>
8
+ </div>
9
+ <div class="time-dots-separator">
10
+ <span>:</span>
11
+ </div>
12
+ <div class="time-items-list">
13
+ <ul class="list">
14
+ <li *ngFor="let m of minutesList">
15
+ <div class="cell">{{m.toString().padStart(2, '0')}}</div>
16
+ </li>
17
+ </ul>
18
+ </div>
19
+ <ng-container *ngIf="shouldSelectSeconds">
20
+ <div class="time-dots-separator">
21
+ <span>:</span>
22
+ </div>
23
+ <div class="time-items-list">
24
+ <ul class="list">
25
+ <li *ngFor="let s of secondsList">
26
+ <div class="cell">{{s.toString().padStart(2, '0')}}</div>
27
+ </li>
28
+ </ul>
29
+ </div>
30
+ </ng-container>
31
+ <ng-container *ngIf="!shouldUse24hFormat">
32
+ <div class="time-items-list">
33
+ <ul class="list">
34
+ <li>
35
+ <div class="cell">{{'AM' | transloco}}</div>
36
+ <div class="cell">{{'PM' | transloco}}</div>
37
+ </li>
38
+ </ul>
39
+ </div>
40
+ </ng-container>
41
+ </div>
42
+ <div>
43
+ <upd-button>{{'Select' | transloco}}</upd-button>
44
+ </div>
@@ -0,0 +1,47 @@
1
+ .time-dots-separator {
2
+ display: flex;
3
+ align-items: center;
4
+ }
5
+
6
+ .time-items-list {
7
+ padding-left: 15px;
8
+ padding-right: 15px;
9
+ display: flex;
10
+ justify-items: center;
11
+ flex: auto;
12
+ height: 240px;
13
+
14
+ .list {
15
+ position: relative;
16
+ flex: 1 0 auto;
17
+ margin: 0;
18
+ padding: 0;
19
+ overflow-y: auto;
20
+ text-align: center;
21
+ list-style: none;
22
+
23
+
24
+ li {
25
+ margin-top: 0;
26
+ display: block;
27
+ height: 40px;
28
+ cursor: pointer;
29
+
30
+ .-item {
31
+ display: block;
32
+ cursor: pointer;
33
+ transition: color .3s;
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ .list {
40
+ -ms-overflow-style: none; /* IE and Edge */
41
+ scrollbar-width: none; /* Firefox */
42
+ }
43
+
44
+ /* Hide scrollbar for Chrome, Safari and Opera */
45
+ .list::-webkit-scrollbar {
46
+ display: none;
47
+ }
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { TimeSelectorComponent } from './time-selector.component';
4
+
5
+ describe('TimeSelectorComponent', () => {
6
+ let component: TimeSelectorComponent;
7
+ let fixture: ComponentFixture<TimeSelectorComponent>;
8
+
9
+ beforeEach(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [TimeSelectorComponent]
12
+ });
13
+ fixture = TestBed.createComponent(TimeSelectorComponent);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,107 @@
1
+ import { Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'upd-time-selector',
5
+ templateUrl: './time-selector.component.html',
6
+ styleUrls: ['./time-selector.component.scss']
7
+ })
8
+ export class TimeSelectorComponent implements OnInit, OnChanges {
9
+ /**
10
+ * Whether seconds should be selectable.
11
+ */
12
+ @Input() shouldSelectSeconds = false;
13
+ /**
14
+ * Whether the 24-hour format will be used or the 12-hour one (AM/PM)
15
+ */
16
+ @Input() shouldUse24hFormat = true;
17
+ /**
18
+ * Hour from which where the list will begin.
19
+ */
20
+ @Input() startingHour = 0;
21
+ /**
22
+ * Hour from which where the list will end.
23
+ */
24
+ @Input() endingHour = 23;
25
+ /**
26
+ * Interval between hours displayed.
27
+ */
28
+ @Input() hourInterval = 1;
29
+ /**
30
+ * Minute from which where the list will begin.
31
+ */
32
+ @Input() startingMinute = 0;
33
+ /**
34
+ * Minute from which where the list will end.
35
+ */
36
+ @Input() endingMinute = 59;
37
+ /**
38
+ * Interval between minutes displayed.
39
+ */
40
+ @Input() minuteInterval = 5;
41
+ /**
42
+ * Second from which where the list will begin.
43
+ */
44
+ @Input() startingSecond = 0;
45
+ /**
46
+ * Second from which where the list will end.
47
+ */
48
+ @Input() endingSecond = 59;
49
+ /**
50
+ * Interval between seconds displayed.
51
+ */
52
+ @Input() secondInterval = 10;
53
+ /**
54
+ * Custom list of hours to be displayed for selection.
55
+ */
56
+ @Input() customHours?: number[];
57
+ /**
58
+ * Custom list of minutes to be displayed for selection.
59
+ */
60
+ @Input() customMinutes?: number[];
61
+ /**
62
+ * Custom list of seconds to be displayed for selection.
63
+ */
64
+ @Input() customSeconds?: number[];
65
+
66
+ hoursList: number[] = [];
67
+ minutesList: number[] = [];
68
+ secondsList: number[] = [];
69
+
70
+ ngOnInit(): void {
71
+ this.setupTimeLists();
72
+ }
73
+
74
+ ngOnChanges(changes: SimpleChanges): void {
75
+ this.setupTimeLists();
76
+ }
77
+
78
+ private setupTimeLists(): void {
79
+ this.hoursList = [];
80
+ this.minutesList = [];
81
+ this.secondsList = [];
82
+
83
+ if (!!this.customHours) {
84
+ this.hoursList = this.customHours;
85
+ } else {
86
+ this.setupTimeList(this.hoursList, this.startingHour, this.endingHour, this.hourInterval);
87
+ }
88
+
89
+ if (!!this.customMinutes) {
90
+ this.minutesList = this.customMinutes;
91
+ } else {
92
+ this.setupTimeList(this.minutesList, this.startingMinute, this.endingMinute, this.minuteInterval);
93
+ }
94
+
95
+ if (!!this.customSeconds) {
96
+ this.secondsList = this.customSeconds;
97
+ } else {
98
+ this.setupTimeList(this.secondsList, this.startingSecond, this.endingSecond, this.secondInterval);
99
+ }
100
+ }
101
+
102
+ private setupTimeList(list: number[], start: number, end: number, interval: number): void {
103
+ for (let i = start; i <= end; i += interval) {
104
+ list.push(i);
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,39 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { TranslocoService, TranslocoModule } from '@ngneat/transloco';
4
+ import { UpdInputModule } from '@updevs/components/form-controls/input';
5
+ import { UpdIconsModule } from '@updevs/icons';
6
+ import { UpdButtonModule } from '@updevs/components/button';
7
+ import { UpdListModule } from '@updevs/components/list';
8
+ import { UpdDropdownModule } from '@updevs/components/dropdown';
9
+
10
+ import * as en from './assets/i18n/en.json';
11
+ import * as pt from './assets/i18n/pt.json';
12
+ import { TimePickerComponent } from './time-picker.component';
13
+ import { TimeSelectorComponent } from './time-selector/time-selector.component';
14
+
15
+ @NgModule({
16
+ imports: [
17
+ CommonModule,
18
+ TranslocoModule,
19
+ UpdInputModule,
20
+ UpdIconsModule,
21
+ UpdButtonModule,
22
+ UpdListModule,
23
+ UpdDropdownModule
24
+ ],
25
+ declarations: [
26
+ TimePickerComponent,
27
+ TimeSelectorComponent
28
+ ],
29
+ exports: [
30
+ TimePickerComponent,
31
+ TimeSelectorComponent
32
+ ]
33
+ })
34
+ export class UpdTimePickerModule {
35
+ constructor(translocoService: TranslocoService) {
36
+ translocoService.setTranslation(en, 'en');
37
+ translocoService.setTranslation(pt, 'pt');
38
+ }
39
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "../../../../node_modules/@updevs/components/layout",
4
+ "lib": {
5
+ "entryFile": "src/index.ts"
6
+ }
7
+ }
@@ -0,0 +1,21 @@
1
+ import { OnDestroy, Directive, inject } from '@angular/core';
2
+ import { BaseComponent, LayoutService } from '@updevs/sdk/layout';
3
+
4
+ /**
5
+ * Basic page structure.
6
+ */
7
+ @Directive({})
8
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
9
+ export abstract class BasePageComponent extends BaseComponent implements OnDestroy {
10
+ protected _layoutService: LayoutService;
11
+
12
+ protected constructor() {
13
+ super();
14
+ this._layoutService = inject(LayoutService);
15
+ }
16
+
17
+ override ngOnDestroy(): void {
18
+ super.ngOnDestroy();
19
+ // TODO: clear subheader.
20
+ }
21
+ }
@@ -0,0 +1 @@
1
+ export * from './base-page.component';
@@ -0,0 +1,5 @@
1
+ {
2
+ "Footer": {
3
+ "AllRightsReserved": "All rights reserved."
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "Footer": {
3
+ "AllRightsReserved": "Todos os direitos reservados."
4
+ }
5
+ }
@@ -0,0 +1 @@
1
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ <p>blank-layout works!</p>
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { BlankLayoutComponent } from './blank-layout.component';
4
+
5
+ describe('BlankLayoutComponent', () => {
6
+ let component: BlankLayoutComponent;
7
+ let fixture: ComponentFixture<BlankLayoutComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ BlankLayoutComponent ]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(BlankLayoutComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,10 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'upd-blank-layout',
5
+ templateUrl: './blank-layout.component.html',
6
+ styleUrls: ['./blank-layout.component.scss']
7
+ })
8
+ export class BlankLayoutComponent {
9
+
10
+ }
@@ -0,0 +1,17 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+
4
+ import { BlankLayoutComponent } from './blank-layout.component';
5
+
6
+ @NgModule({
7
+ imports: [
8
+ CommonModule
9
+ ],
10
+ declarations: [
11
+ BlankLayoutComponent
12
+ ],
13
+ exports: [
14
+ BlankLayoutComponent
15
+ ]
16
+ })
17
+ export class BlankLayoutModule {}
@@ -0,0 +1,4 @@
1
+ export * from './blank-layout/blank-layout.module';
2
+ export * from './blank-layout/blank-layout.component';
3
+ export * from './vertical-sidebar-layout/vertical-sidebar-layout.module';
4
+ export * from './vertical-sidebar-layout/vertical-sidebar-layout.component';
@@ -0,0 +1,14 @@
1
+ <div class="page">
2
+ <upd-sidebar></upd-sidebar>
3
+ <upd-header></upd-header>
4
+
5
+ <div class="page-wrapper">
6
+ <upd-page-header *ngIf="showPageHeader" [model]="pageHeader!"></upd-page-header>
7
+ <div class="page-body">
8
+ <div class="container-xl">
9
+ <router-outlet></router-outlet>
10
+ </div>
11
+ </div>
12
+ <upd-footer></upd-footer>
13
+ </div>
14
+ </div>
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { VerticalSidebarLayoutComponent } from './vertical-sidebar-layout.component';
4
+
5
+ describe('VerticalSidebarLayoutComponent', () => {
6
+ let component: VerticalSidebarLayoutComponent;
7
+ let fixture: ComponentFixture<VerticalSidebarLayoutComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ VerticalSidebarLayoutComponent ]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(VerticalSidebarLayoutComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,31 @@
1
+ import { Component, ViewEncapsulation, OnInit, ChangeDetectorRef } from '@angular/core';
2
+ import { BaseComponent, LayoutService, PageHeaderModel } from '@updevs/sdk/layout';
3
+
4
+ @Component({
5
+ selector: 'upd-vertical-sidebar-layout',
6
+ templateUrl: './vertical-sidebar-layout.component.html',
7
+ styleUrls: ['./vertical-sidebar-layout.component.scss'],
8
+ encapsulation: ViewEncapsulation.None
9
+ })
10
+ export class VerticalSidebarLayoutComponent extends BaseComponent implements OnInit {
11
+ showPageHeader = false;
12
+ pageHeader?: PageHeaderModel;
13
+
14
+ constructor(
15
+ private changeDetectorRef: ChangeDetectorRef,
16
+ private layoutService: LayoutService
17
+ ) {
18
+ super();
19
+ }
20
+
21
+ ngOnInit(): void {
22
+ const pHeaderSub = this.layoutService.onPageHeaderChange.subscribe(ph => {
23
+ this.showPageHeader = !!ph;
24
+ this.pageHeader = ph;
25
+
26
+ this.changeDetectorRef.detectChanges();
27
+ });
28
+
29
+ this.addSubscriptions(pHeaderSub);
30
+ }
31
+ }
@@ -0,0 +1,52 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { RouterModule } from '@angular/router';
4
+ import { UpdIconsModule } from '@updevs/icons';
5
+ import { UpdButtonModule } from '@updevs/components/button';
6
+ import { UpdLinkModule } from '@updevs/components/link';
7
+ import { UpdCoreLayoutModule } from '@updevs/sdk/layout';
8
+ import { TranslocoModule, TranslocoService } from '@ngneat/transloco';
9
+
10
+ import * as en from '../../assets/i18n/en.json';
11
+ import * as pt from '../../assets/i18n/pt.json';
12
+ import { VerticalSidebarLayoutComponent } from './vertical-sidebar-layout.component';
13
+ import { FooterComponent } from '../../partials/footer/footer.component';
14
+ import { HeaderComponent } from '../../partials/header/header.component';
15
+ import { FooterCopyrightDirective } from '../../partials/footer/footer-copyright.directive';
16
+ import { SidebarComponent } from '../../partials/sidebar/sidebar.component';
17
+ import { PageHeaderComponent } from '../../partials/page-header/page-header.component';
18
+
19
+ @NgModule({
20
+ imports: [
21
+ CommonModule,
22
+ RouterModule,
23
+ TranslocoModule,
24
+ UpdIconsModule,
25
+ UpdCoreLayoutModule,
26
+ UpdButtonModule,
27
+ UpdLinkModule
28
+ ],
29
+ declarations: [
30
+ VerticalSidebarLayoutComponent,
31
+ FooterComponent,
32
+ HeaderComponent,
33
+ SidebarComponent,
34
+ PageHeaderComponent
35
+ ],
36
+ exports: [
37
+ VerticalSidebarLayoutComponent,
38
+ FooterComponent,
39
+ HeaderComponent,
40
+ SidebarComponent,
41
+ PageHeaderComponent
42
+ ],
43
+ providers: [
44
+ FooterCopyrightDirective
45
+ ]
46
+ })
47
+ export class VerticalSidebarLayoutModule {
48
+ constructor(translocoService: TranslocoService) {
49
+ translocoService.setTranslation(en, 'en');
50
+ translocoService.setTranslation(pt, 'pt');
51
+ }
52
+ }
@@ -0,0 +1 @@
1
+ export * from './upd-layout.config';
@@ -0,0 +1,71 @@
1
+ import { UpdLayoutConfig } from './upd-layout.config';
2
+
3
+ /**
4
+ * Layout configuration.
5
+ */
6
+ export class UpdLayoutConfigModel implements UpdLayoutConfig {
7
+ /**
8
+ * Main menu title.
9
+ */
10
+ menuTitle?: string;
11
+ /**
12
+ * Whether the menu should start expanded.
13
+ */
14
+ shouldMenuStartExpanded?: boolean;
15
+ /**
16
+ * Main application logo.
17
+ */
18
+ mainLogo?: string;
19
+ /**
20
+ * Small application logo.
21
+ */
22
+ smallLogo?: string;
23
+ /**
24
+ * Background image for the logged out page.
25
+ */
26
+ loggedOutBackground?: string;
27
+ /**
28
+ * Whether the default notifications button should be displayed.
29
+ */
30
+ showNotificationsButton?: boolean;
31
+ /**
32
+ * Whether the report error button should be displayed when an exception is thrown by the server.
33
+ */
34
+ displayReportErrorButton?: boolean;
35
+ /**
36
+ * Whether the logged user's menu should be displayed.
37
+ */
38
+ showUserMenu?: boolean;
39
+
40
+ constructor(init?: UpdLayoutConfig) {
41
+ Object.assign(this, init);
42
+
43
+ if (this.mainLogo === undefined) {
44
+ // this.mainLogo = LogoConstants.defaultLogo; // TODO: add images
45
+ }
46
+
47
+ if (this.smallLogo === undefined) {
48
+ // this.smallLogo = LogoConstants.smallLogo;
49
+ }
50
+
51
+ if (this.loggedOutBackground === undefined) {
52
+ // this.loggedOutBackground = ImageConstants.loggedOutBackground;
53
+ }
54
+
55
+ if (this.menuTitle === undefined) {
56
+ this.menuTitle = 'UpDevs';
57
+ }
58
+
59
+ if (this.showNotificationsButton === undefined) {
60
+ this.showNotificationsButton = true;
61
+ }
62
+
63
+ if (this.showUserMenu === undefined) {
64
+ this.showUserMenu = true;
65
+ }
66
+
67
+ if (this.displayReportErrorButton === undefined) {
68
+ this.displayReportErrorButton = false;
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Layout configuration.
3
+ */
4
+ export interface UpdLayoutConfig {
5
+ /**
6
+ * Main menu title.
7
+ */
8
+ menuTitle?: string;
9
+ /**
10
+ * Whether the menu should start expanded.
11
+ */
12
+ shouldMenuStartExpanded?: boolean;
13
+ /**
14
+ * Main application logo.
15
+ */
16
+ mainLogo?: string;
17
+ /**
18
+ * Small application logo.
19
+ */
20
+ smallLogo?: string;
21
+ /**
22
+ * Background image for the logged out page.
23
+ */
24
+ loggedOutBackground?: string;
25
+ /**
26
+ * Whether the default notifications button should be displayed.
27
+ */
28
+ showNotificationsButton?: boolean;
29
+ /**
30
+ * Whether the report error button should be displayed when an exception is thrown by the server.
31
+ */
32
+ displayReportErrorButton?: boolean;
33
+ /**
34
+ * Whether the logged user's menu should be displayed.
35
+ */
36
+ showUserMenu?: boolean;
37
+ }
@@ -0,0 +1,21 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { Routes, RouterModule } from '@angular/router';
3
+
4
+ import { OauthCallbackComponent } from './oauth-callback/oauth-callback.component';
5
+ import { LoggedOutComponent } from './logged-out/logged-out.component';
6
+ import { LoginComponent } from './login/login.component';
7
+
8
+ /**
9
+ * Auth flow routes.
10
+ */
11
+ export const routes: Routes = [
12
+ { path: 'oauth/callback', component: OauthCallbackComponent },
13
+ { path: 'logged-out', component: LoggedOutComponent },
14
+ { path: 'login', component: LoginComponent }
15
+ ];
16
+
17
+ @NgModule({
18
+ imports: [RouterModule.forRoot(routes, { useHash: true })],
19
+ exports: [RouterModule]
20
+ })
21
+ export class AuthFlowRoutingModule {}
@@ -0,0 +1,29 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { UpdButtonModule } from '@updevs/components/button';
4
+
5
+ import { LoginComponent } from './login/login.component';
6
+ import { OauthCallbackComponent } from './oauth-callback/oauth-callback.component';
7
+ import { LoggedOutComponent } from './logged-out/logged-out.component';
8
+ import { AuthFlowRoutingModule } from './auth-flow-routing.module';
9
+ import { FormsModule } from '@angular/forms';
10
+
11
+ @NgModule({
12
+ imports: [
13
+ CommonModule,
14
+ AuthFlowRoutingModule,
15
+ UpdButtonModule,
16
+ FormsModule
17
+ ],
18
+ declarations: [
19
+ LoginComponent,
20
+ OauthCallbackComponent,
21
+ LoggedOutComponent
22
+ ],
23
+ exports: [
24
+ LoginComponent,
25
+ OauthCallbackComponent,
26
+ LoggedOutComponent
27
+ ]
28
+ })
29
+ export class AuthFlowModule {}
@@ -0,0 +1 @@
1
+ <p>logged-out works!</p>