@indice/ng-components 0.2.139 → 0.2.141

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 (228) hide show
  1. package/README.md +4 -4
  2. package/{src/assets/styles/indice-ng-icons-inline.css → _styles.css} +3501 -2286
  3. package/esm2020/indice-ng-components.mjs +5 -0
  4. package/esm2020/lib/controls/avatar-initials/avatar-initials.component.mjs +48 -0
  5. package/esm2020/lib/controls/collapsible-panel/collapsible-panel.component.mjs +20 -0
  6. package/esm2020/lib/controls/date-picker/date-picker.component.mjs +260 -0
  7. package/esm2020/lib/controls/drop-down-menu/drop-down-menu.component.mjs +68 -0
  8. package/esm2020/lib/controls/kpi-tile/kpi-tile.component.mjs +36 -0
  9. package/esm2020/lib/controls/list-view/list-column.component.mjs +25 -0
  10. package/esm2020/lib/controls/list-view/list-details-section.component.mjs +17 -0
  11. package/esm2020/lib/controls/list-view/list-tile.component.mjs +17 -0
  12. package/esm2020/lib/controls/list-view/list-view-empty-state.component.mjs +29 -0
  13. package/esm2020/lib/controls/list-view/list-view.component.mjs +183 -0
  14. package/esm2020/lib/controls/nav-links-list/nav-links-list.component.mjs +37 -0
  15. package/esm2020/lib/controls/notifications-indicator/notifications-indicator.component.mjs +77 -0
  16. package/esm2020/lib/controls/pager/pager.component.mjs +130 -0
  17. package/esm2020/lib/controls/side-pane/side-pane.component.mjs +72 -0
  18. package/esm2020/lib/controls/skeleton-loader/skeleton-loader.component.mjs +25 -0
  19. package/esm2020/lib/controls/toaster/toaster-container.component.mjs +28 -0
  20. package/esm2020/lib/controls/toaster/toaster.component.mjs +31 -0
  21. package/esm2020/lib/controls/toggle/toggle.component.mjs +64 -0
  22. package/esm2020/lib/directives/click-outside.directive.mjs +189 -0
  23. package/esm2020/lib/directives/dynamic-component-host.directive.mjs +17 -0
  24. package/esm2020/lib/helpers/base-list.component.mjs +181 -0
  25. package/esm2020/lib/icons.mjs +32 -0
  26. package/esm2020/lib/layouts/shell/shell-footer/shell-footer.component.mjs +19 -0
  27. package/esm2020/lib/layouts/shell/shell-header/shell-header.component.mjs +135 -0
  28. package/esm2020/lib/layouts/shell/shell-layout/shell-layout.component.mjs +101 -0
  29. package/esm2020/lib/layouts/views/form-layout/form-layout.component.mjs +80 -0
  30. package/esm2020/lib/layouts/views/model-view-layout/model-view-layout.component.mjs +49 -0
  31. package/esm2020/lib/layouts/views/side-view-layout/side-view-layout.component.mjs +98 -0
  32. package/esm2020/lib/layouts/views/view-layout/view-layout.component.mjs +104 -0
  33. package/esm2020/lib/ng-components.module.mjs +221 -0
  34. package/esm2020/lib/pages/auth/auth-callback/auth-callback.component.mjs +30 -0
  35. package/esm2020/lib/pages/auth/auth-renew/auth-renew.component.mjs +31 -0
  36. package/esm2020/lib/pages/auth/logged-out/logged-out.component.mjs +28 -0
  37. package/esm2020/lib/pages/http-status/error/error.component.mjs +17 -0
  38. package/esm2020/lib/pages/http-status/page-not-found/page-not-found.component.mjs +15 -0
  39. package/esm2020/lib/pages/http-status/unauthorized/unauthorized.component.mjs +14 -0
  40. package/esm2020/lib/pipes/address.pipe.mjs +21 -0
  41. package/esm2020/lib/pipes/duration-format.pipe.mjs +64 -0
  42. package/esm2020/lib/services/component-loader/component-loader-options.class.mjs +8 -0
  43. package/esm2020/lib/services/component-loader/component-loader.class.mjs +188 -0
  44. package/esm2020/lib/services/component-loader/component-loader.factory.mjs +32 -0
  45. package/esm2020/lib/services/component-loader/content-ref.class.mjs +13 -0
  46. package/esm2020/lib/services/modal-service/modal-backdrop-component.mjs +44 -0
  47. package/esm2020/lib/services/modal-service/modal-container-component.mjs +126 -0
  48. package/esm2020/lib/services/modal-service/modal-options.class.mjs +35 -0
  49. package/esm2020/lib/services/modal-service/modal-service.mjs +219 -0
  50. package/esm2020/lib/services/modal-service/modal-styles.class.mjs +11 -0
  51. package/esm2020/lib/services/modal-service/modal.class.mjs +27 -0
  52. package/esm2020/lib/services/toaster.service.mjs +24 -0
  53. package/esm2020/lib/tokens.mjs +5 -0
  54. package/esm2020/lib/types.mjs +117 -0
  55. package/esm2020/public-api.mjs +53 -0
  56. package/fesm2015/indice-ng-components.mjs +3268 -0
  57. package/fesm2015/indice-ng-components.mjs.map +1 -0
  58. package/fesm2020/indice-ng-components.mjs +3225 -0
  59. package/fesm2020/indice-ng-components.mjs.map +1 -0
  60. package/indice-ng-components.d.ts +5 -0
  61. package/lib/controls/avatar-initials/avatar-initials.component.d.ts +14 -0
  62. package/lib/controls/collapsible-panel/collapsible-panel.component.d.ts +10 -0
  63. package/lib/controls/date-picker/date-picker.component.d.ts +48 -0
  64. package/lib/controls/drop-down-menu/drop-down-menu.component.d.ts +25 -0
  65. package/lib/controls/kpi-tile/kpi-tile.component.d.ts +13 -0
  66. package/lib/controls/list-view/list-column.component.d.ts +9 -0
  67. package/lib/controls/list-view/list-details-section.component.d.ts +7 -0
  68. package/lib/controls/list-view/list-tile.component.d.ts +7 -0
  69. package/lib/controls/list-view/list-view-empty-state.component.d.ts +11 -0
  70. package/lib/controls/list-view/list-view.component.d.ts +55 -0
  71. package/lib/controls/nav-links-list/nav-links-list.component.d.ts +15 -0
  72. package/lib/controls/notifications-indicator/notifications-indicator.component.d.ts +23 -0
  73. package/lib/controls/pager/pager.component.d.ts +36 -0
  74. package/lib/controls/side-pane/side-pane.component.d.ts +18 -0
  75. package/lib/controls/skeleton-loader/skeleton-loader.component.d.ts +11 -0
  76. package/lib/controls/toaster/toaster-container.component.d.ts +13 -0
  77. package/lib/controls/toaster/toaster.component.d.ts +15 -0
  78. package/lib/controls/toggle/toggle.component.d.ts +19 -0
  79. package/lib/directives/click-outside.directive.d.ts +40 -0
  80. package/lib/directives/dynamic-component-host.directive.d.ts +9 -0
  81. package/lib/helpers/base-list.component.d.ts +42 -0
  82. package/lib/icons.d.ts +30 -0
  83. package/lib/layouts/shell/shell-footer/shell-footer.component.d.ts +8 -0
  84. package/lib/layouts/shell/shell-header/shell-header.component.d.ts +41 -0
  85. package/lib/layouts/shell/shell-layout/shell-layout.component.d.ts +28 -0
  86. package/lib/layouts/views/form-layout/form-layout.component.d.ts +24 -0
  87. package/lib/layouts/views/model-view-layout/model-view-layout.component.d.ts +25 -0
  88. package/lib/layouts/views/side-view-layout/side-view-layout.component.d.ts +28 -0
  89. package/lib/layouts/views/view-layout/view-layout.component.d.ts +31 -0
  90. package/lib/ng-components.module.d.ts +49 -0
  91. package/lib/pages/auth/auth-callback/auth-callback.component.d.ts +13 -0
  92. package/lib/pages/auth/auth-renew/auth-renew.component.d.ts +12 -0
  93. package/lib/pages/auth/logged-out/logged-out.component.d.ts +12 -0
  94. package/lib/pages/http-status/error/error.component.d.ts +8 -0
  95. package/lib/pages/http-status/page-not-found/page-not-found.component.d.ts +8 -0
  96. package/lib/pages/http-status/unauthorized/unauthorized.component.d.ts +8 -0
  97. package/lib/pipes/address.pipe.d.ts +8 -0
  98. package/lib/pipes/duration-format.pipe.d.ts +8 -0
  99. package/lib/services/component-loader/component-loader-options.class.d.ts +30 -0
  100. package/lib/services/component-loader/component-loader.class.d.ts +92 -0
  101. package/lib/services/component-loader/component-loader.factory.d.ts +24 -0
  102. package/lib/services/component-loader/content-ref.class.d.ts +12 -0
  103. package/lib/services/modal-service/modal-backdrop-component.d.ts +20 -0
  104. package/lib/services/modal-service/modal-container-component.d.ts +33 -0
  105. package/lib/services/modal-service/modal-options.class.d.ts +81 -0
  106. package/lib/services/modal-service/modal-service.d.ts +58 -0
  107. package/lib/services/modal-service/modal-styles.class.d.ts +10 -0
  108. package/lib/services/modal-service/modal.class.d.ts +43 -0
  109. package/lib/services/toaster.service.d.ts +11 -0
  110. package/lib/tokens.d.ts +5 -0
  111. package/lib/types.d.ts +153 -0
  112. package/{src/assets/styles/modal.css → modal.css} +157 -157
  113. package/package.json +24 -20
  114. package/{src/public-api.ts → public-api.d.ts} +43 -60
  115. package/CHANGELOG.md +0 -1
  116. package/karma.conf.js +0 -44
  117. package/ng-package.json +0 -10
  118. package/scripts/css-bundle.ts +0 -33
  119. package/src/_styles.css +0 -36
  120. package/src/_tests/utilities.service.spec.ts +0 -16
  121. package/src/assets/styles/avatar-initials.css +0 -37
  122. package/src/assets/styles/base.css +0 -46
  123. package/src/assets/styles/cards.css +0 -71
  124. package/src/assets/styles/collapsible-panel.css +0 -25
  125. package/src/assets/styles/components.css +0 -34
  126. package/src/assets/styles/date-picker.component.css +0 -0
  127. package/src/assets/styles/drop-down-menu.css +0 -50
  128. package/src/assets/styles/form-layout.css +0 -49
  129. package/src/assets/styles/list-view-empty-state.css +0 -0
  130. package/src/assets/styles/list-view.css +0 -64
  131. package/src/assets/styles/model-view-layout.css +0 -45
  132. package/src/assets/styles/nav-links.css +0 -35
  133. package/src/assets/styles/notifications-indicator.component.css +0 -43
  134. package/src/assets/styles/pager.css +0 -29
  135. package/src/assets/styles/shell-layout.css +0 -232
  136. package/src/assets/styles/side-pane.css +0 -46
  137. package/src/assets/styles/side-view-layout.css +0 -58
  138. package/src/assets/styles/toast.css +0 -72
  139. package/src/assets/styles/toggle.css +0 -26
  140. package/src/assets/styles/view-layout.css +0 -58
  141. package/src/lib/controls/avatar-initials/avatar-initials.component.html +0 -3
  142. package/src/lib/controls/avatar-initials/avatar-initials.component.ts +0 -47
  143. package/src/lib/controls/collapsible-panel/collapsible-panel.component.html +0 -15
  144. package/src/lib/controls/collapsible-panel/collapsible-panel.component.ts +0 -16
  145. package/src/lib/controls/date-picker/date-picker.component.html +0 -133
  146. package/src/lib/controls/date-picker/date-picker.component.ts +0 -258
  147. package/src/lib/controls/drop-down-menu/drop-down-menu.component.html +0 -61
  148. package/src/lib/controls/drop-down-menu/drop-down-menu.component.ts +0 -59
  149. package/src/lib/controls/kpi-tile/kpi-tile.component.html +0 -18
  150. package/src/lib/controls/kpi-tile/kpi-tile.component.ts +0 -26
  151. package/src/lib/controls/list-view/list-column.component.ts +0 -10
  152. package/src/lib/controls/list-view/list-details-section.component.ts +0 -8
  153. package/src/lib/controls/list-view/list-tile.component.ts +0 -8
  154. package/src/lib/controls/list-view/list-view-empty-state.component.html +0 -20
  155. package/src/lib/controls/list-view/list-view-empty-state.component.ts +0 -19
  156. package/src/lib/controls/list-view/list-view.component.html +0 -151
  157. package/src/lib/controls/list-view/list-view.component.ts +0 -146
  158. package/src/lib/controls/nav-links-list/nav-links-list.component.html +0 -27
  159. package/src/lib/controls/nav-links-list/nav-links-list.component.ts +0 -25
  160. package/src/lib/controls/notifications-indicator/notifications-indicator.component.html +0 -78
  161. package/src/lib/controls/notifications-indicator/notifications-indicator.component.ts +0 -75
  162. package/src/lib/controls/pager/pager.component.html +0 -33
  163. package/src/lib/controls/pager/pager.component.ts +0 -106
  164. package/src/lib/controls/side-pane/side-pane.component.html +0 -10
  165. package/src/lib/controls/side-pane/side-pane.component.ts +0 -59
  166. package/src/lib/controls/skeleton-loader/skeleton-loader.component.html +0 -112
  167. package/src/lib/controls/skeleton-loader/skeleton-loader.component.ts +0 -20
  168. package/src/lib/controls/toaster/toaster-container.component.html +0 -1
  169. package/src/lib/controls/toaster/toaster-container.component.ts +0 -27
  170. package/src/lib/controls/toaster/toaster.component.html +0 -103
  171. package/src/lib/controls/toaster/toaster.component.ts +0 -26
  172. package/src/lib/controls/toggle/toggle.component.html +0 -15
  173. package/src/lib/controls/toggle/toggle.component.ts +0 -58
  174. package/src/lib/directives/click-outside.directive.ts +0 -196
  175. package/src/lib/directives/dynamic-component-host.directive.ts +0 -7
  176. package/src/lib/directives/screen-size.directive.ts +0 -67
  177. package/src/lib/helpers/base-list.component.ts +0 -204
  178. package/src/lib/icons.ts +0 -39
  179. package/src/lib/layouts/shell/shell-footer/shell-footer.component.html +0 -71
  180. package/src/lib/layouts/shell/shell-footer/shell-footer.component.ts +0 -14
  181. package/src/lib/layouts/shell/shell-header/shell-header.component.html +0 -199
  182. package/src/lib/layouts/shell/shell-header/shell-header.component.ts +0 -111
  183. package/src/lib/layouts/shell/shell-layout/shell-layout.component.html +0 -36
  184. package/src/lib/layouts/shell/shell-layout/shell-layout.component.ts +0 -91
  185. package/src/lib/layouts/views/form-layout/form-layout.component.html +0 -67
  186. package/src/lib/layouts/views/form-layout/form-layout.component.ts +0 -66
  187. package/src/lib/layouts/views/model-view-layout/model-view-layout.component.html +0 -43
  188. package/src/lib/layouts/views/model-view-layout/model-view-layout.component.ts +0 -37
  189. package/src/lib/layouts/views/side-view-layout/side-view-layout.component.html +0 -36
  190. package/src/lib/layouts/views/side-view-layout/side-view-layout.component.ts +0 -67
  191. package/src/lib/layouts/views/view-layout/view-layout.component.html +0 -68
  192. package/src/lib/layouts/views/view-layout/view-layout.component.ts +0 -82
  193. package/src/lib/ng-components.module.ts +0 -135
  194. package/src/lib/pages/auth/auth-callback/auth-callback.component.html +0 -1
  195. package/src/lib/pages/auth/auth-callback/auth-callback.component.ts +0 -22
  196. package/src/lib/pages/auth/auth-renew/auth-renew.component.ts +0 -20
  197. package/src/lib/pages/auth/logged-out/logged-out.component.html +0 -1
  198. package/src/lib/pages/auth/logged-out/logged-out.component.ts +0 -22
  199. package/src/lib/pages/http-status/error/error.component.html +0 -13
  200. package/src/lib/pages/http-status/error/error.component.ts +0 -13
  201. package/src/lib/pages/http-status/page-not-found/page-not-found.component.html +0 -14
  202. package/src/lib/pages/http-status/page-not-found/page-not-found.component.ts +0 -14
  203. package/src/lib/pages/http-status/unauthorized/unauthorized.component.html +0 -15
  204. package/src/lib/pages/http-status/unauthorized/unauthorized.component.ts +0 -11
  205. package/src/lib/pipes/address.pipe.ts +0 -17
  206. package/src/lib/pipes/duration-format.pipe.ts +0 -67
  207. package/src/lib/services/component-loader/component-loader-options.class.ts +0 -31
  208. package/src/lib/services/component-loader/component-loader.class.ts +0 -226
  209. package/src/lib/services/component-loader/component-loader.factory.ts +0 -27
  210. package/src/lib/services/component-loader/content-ref.class.ts +0 -10
  211. package/src/lib/services/interceptors/bad-request.interceptor.ts +0 -34
  212. package/src/lib/services/modal-service/modal-backdrop-component.ts +0 -40
  213. package/src/lib/services/modal-service/modal-container-component.ts +0 -125
  214. package/src/lib/services/modal-service/modal-options.class.ts +0 -92
  215. package/src/lib/services/modal-service/modal-service.ts +0 -237
  216. package/src/lib/services/modal-service/modal-styles.class.ts +0 -11
  217. package/src/lib/services/modal-service/modal.class.ts +0 -45
  218. package/src/lib/services/shell-state-service.service.ts +0 -10
  219. package/src/lib/services/toaster.service.ts +0 -23
  220. package/src/lib/services/utilities.service.ts +0 -40
  221. package/src/lib/tokens.ts +0 -6
  222. package/src/lib/types.ts +0 -210
  223. package/src/test.ts +0 -28
  224. package/tsconfig.lib.json +0 -26
  225. package/tsconfig.lib.prod.json +0 -10
  226. package/tsconfig.spec.json +0 -17
  227. package/tslint.json +0 -17
  228. package/webpack.config.js +0 -36
@@ -1,59 +0,0 @@
1
- import { SidePaneOverlayType, SidePaneSize } from './../../types';
2
- import { Router } from '@angular/router';
3
- import { Component, Input, OnInit, OnDestroy, Inject, EventEmitter, Output } from '@angular/core';
4
- import { DOCUMENT } from '@angular/common';
5
-
6
- @Component({
7
- selector: 'lib-side-pane',
8
- templateUrl: './side-pane.component.html'
9
- })
10
- export class SidePaneComponent implements OnInit, OnDestroy {
11
- // tslint:disable-next-line:no-input-rename
12
- @Input('visible') showPane = false;
13
- public sizeContainerStyle = 'side-pane-box-size';
14
- public overlayStyle = 'side-pane-overlay';
15
- @Output() onComplete: EventEmitter<boolean> = new EventEmitter<boolean>();
16
-
17
- constructor(private router: Router, @Inject(DOCUMENT) private document: any,) { }
18
-
19
- ngOnDestroy(): void {
20
- }
21
-
22
- ngOnInit(): void {
23
- }
24
-
25
- public onSidePaneActivated(component: any): void {
26
- this.document.body.classList.add('modal-active');
27
- let sizeStyleSuffix = '';
28
- const state = this.router.getCurrentNavigation()?.extras.state;
29
- if (state) {
30
- if (state.paneSize) {
31
- if (state.paneSize === SidePaneSize.Small25) {
32
- sizeStyleSuffix = '-25';
33
- } else if (state.paneSize === SidePaneSize.Medium50) {
34
- sizeStyleSuffix = '-50';
35
- } else if (state.paneSize === SidePaneSize.Large75) {
36
- sizeStyleSuffix = '-75';
37
- }
38
- }
39
- if (state.paneOverlay) {
40
- if (state.paneOverlay === SidePaneOverlayType.None) {
41
- this.overlayStyle = 'side-pane-overlay-opacity-0';
42
- } else if (state.paneOverlay === SidePaneOverlayType.Dark) {
43
- this.overlayStyle = 'side-pane-overlay-opacity-50';
44
- } else {
45
- this.overlayStyle = 'side-pane-overlay';
46
- }
47
- }
48
- }
49
- this.sizeContainerStyle = `side-pane-box-size${sizeStyleSuffix}`;
50
- this.showPane = true;
51
- }
52
-
53
- public onSidePaneDeactivated($event: any): void {
54
- this.document.body.classList.remove('modal-active');
55
- this.showPane = false;
56
- this.onComplete.emit(true);
57
- }
58
-
59
- }
@@ -1,112 +0,0 @@
1
- <!-- <h1>SKELETON LOADER!</h1> -->
2
- <ng-container *ngSwitch="type">
3
- <div class="cards-deck-4" *ngSwitchCase="'tiles'">
4
- <ng-container *ngFor="let i of counter(count)">
5
- <div class="relative p-4 w-full bg-white rounded-lg overflow-hidden shadow hover:shadow-md rounded-lg">
6
- <div class="animate-pulse flex flex-col">
7
- <div class="rounded w-full h-32 bg-gray-200"></div>
8
- <div class="flex flex-col mt-5">
9
- <div class="w-full h-5 bg-gray-200 rounded"></div>
10
- <div class="mt-2 w-10/12 h-3 bg-gray-200 rounded"></div>
11
- <div class="mt-2 w-8/12 h-3 bg-gray-200 rounded"></div>
12
- </div>
13
-
14
- <div class="grid grid-cols-2 mt-5 gap-x-2 gap-y-1">
15
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
16
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
17
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
18
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
19
- </div>
20
-
21
- <div class="flex items-center mt-5">
22
- <div>
23
- <div class="rounded-full bg-gray-200 w-10 h-10"></div>
24
- </div>
25
- <div class="flex justify-between w-full ml-3">
26
- <div class="w-5/12 h-3 bg-gray-200 rounded"></div>
27
- <div class="w-2/12 h-3 bg-gray-200 rounded"></div>
28
- </div>
29
- </div>
30
- </div>
31
- </div>
32
- </ng-container>
33
- </div>
34
- <div class="cards-deck-3" *ngSwitchCase="'large-tiles'">
35
- <ng-container *ngFor="let i of counter(count)">
36
- <div class="relative p-4 w-full bg-white rounded-lg overflow-hidden shadow hover:shadow-md rounded-lg">
37
- <div class="animate-pulse flex flex-col">
38
- <div class="rounded w-full h-52 bg-gray-200"></div>
39
- <div class="flex flex-col mt-5">
40
- <div class="w-full h-5 bg-gray-200 rounded"></div>
41
- <div class="mt-2 w-10/12 h-3 bg-gray-200 rounded"></div>
42
- <div class="mt-2 w-8/12 h-3 bg-gray-200 rounded"></div>
43
- </div>
44
-
45
- <div class="grid grid-cols-2 mt-5 gap-x-2 gap-y-1">
46
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
47
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
48
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
49
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
50
- </div>
51
-
52
- <div class="flex items-center mt-5">
53
- <div>
54
- <div class="rounded-full bg-gray-200 w-10 h-10"></div>
55
- </div>
56
- <div class="flex justify-between w-full ml-3">
57
- <div class="w-5/12 h-3 bg-gray-200 rounded"></div>
58
- <div class="w-2/12 h-3 bg-gray-200 rounded"></div>
59
- </div>
60
- </div>
61
- </div>
62
- </div>
63
- </ng-container>
64
- </div>
65
- <div class="cards-deck-1" *ngSwitchCase="'table'">
66
- <ng-container *ngFor="let i of counter(count)">
67
- <div class="border border-light-blue-300 shadow rounded-sm p-4 max-w-sm w-full mx-auto mb-4">
68
- <div class="animate-pulse flex space-x-4">
69
- <div class="rounded-full bg-light-blue-400 h-12 w-12">&nbsp;</div>
70
- <div class="flex-1 space-y-4 py-1">
71
- <div class="h-4 bg-light-blue-400 rounded w-3/4">&nbsp;</div>
72
- <div class="space-y-2">
73
- <div class="h-4 bg-light-blue-400 rounded">&nbsp;</div>
74
- <div class="h-4 bg-light-blue-400 rounded w-5/6">&nbsp;</div>
75
- </div>
76
- </div>
77
- </div>
78
- </div>
79
- </ng-container>
80
- </div>
81
- <div class="cards-deck-3" *ngSwitchDefault>
82
- <ng-container *ngFor="let i of counter(count)">
83
- <div class="relative p-4 w-full bg-white rounded-lg overflow-hidden shadow hover:shadow-md rounded-lg">
84
- <div class="animate-pulse flex flex-col">
85
- <div class="rounded w-full h-52 bg-gray-200"></div>
86
- <div class="flex flex-col mt-5">
87
- <div class="w-full h-5 bg-gray-200 rounded"></div>
88
- <div class="mt-2 w-10/12 h-3 bg-gray-200 rounded"></div>
89
- <div class="mt-2 w-8/12 h-3 bg-gray-200 rounded"></div>
90
- </div>
91
-
92
- <div class="grid grid-cols-2 mt-5 gap-x-2 gap-y-1">
93
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
94
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
95
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
96
- <div class="mt-2 w-full h-3 bg-gray-200 rounded"></div>
97
- </div>
98
-
99
- <div class="flex items-center mt-5">
100
- <div>
101
- <div class="rounded-full bg-gray-200 w-10 h-10"></div>
102
- </div>
103
- <div class="flex justify-between w-full ml-3">
104
- <div class="w-5/12 h-3 bg-gray-200 rounded"></div>
105
- <div class="w-2/12 h-3 bg-gray-200 rounded"></div>
106
- </div>
107
- </div>
108
- </div>
109
- </div>
110
- </ng-container>
111
- </div>
112
- </ng-container>
@@ -1,20 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- // tslint:disable-next-line:component-selector
5
- selector: 'lib-skeleton-loader',
6
- templateUrl: './skeleton-loader.component.html'
7
- })
8
- export class SkeletonLoaderComponent implements OnInit {
9
- @Input() count = 5;
10
- @Input() type = 'tiles'; // 'large-tile', 'table'
11
- constructor() { }
12
-
13
- ngOnInit(): void {
14
- }
15
-
16
- public counter(i: number): number[] {
17
- return new Array(i);
18
- }
19
-
20
- }
@@ -1 +0,0 @@
1
- <lib-toaster *ngFor="let toast of toasts; let i=index" [toast]="toast" [i]="i" (remove)="remove($event)"></lib-toaster>
@@ -1,27 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
- import { ToasterService } from '../../services/toaster.service';
3
- import { Toast } from '../../types';
4
-
5
- @Component({
6
- selector: 'lib-toaster-container',
7
- templateUrl: './toaster-container.component.html'
8
- })
9
- export class ToasterContainerComponent implements OnInit {
10
-
11
- toasts: Toast[] = [];
12
-
13
- constructor(private toaster: ToasterService) { }
14
-
15
- ngOnInit(): void {
16
- this.toaster.toast$
17
- .subscribe(toast => {
18
- this.toasts = [toast, ...this.toasts];
19
- setTimeout(() => this.toasts.pop(), toast.delay || 6000);
20
- });
21
- }
22
-
23
- remove(index: number): void {
24
- this.toasts = this.toasts.slice(0, index).concat(this.toasts.slice(index + 1));
25
- }
26
-
27
- }
@@ -1,103 +0,0 @@
1
- <div aria-live="assertive"
2
- [ngClass]="closed ? 'toast-closed': 'toast z-50'"
3
- [ngStyle]="isMobile ? { 'margin-bottom.px': i * 85 } : {'margin-top.px': i * 85 }">
4
- <div class="toast-container">
5
- <div class="toast-pill">
6
- <div class="toast-context-padding">
7
- <div class="toast-context"
8
- [ngSwitch]="toast?.type">
9
- <div class="toast-icon"
10
- *ngSwitchCase="'info'">
11
- <svg class="h-5 w-5 text-blue-400"
12
- xmlns="http://www.w3.org/2000/svg"
13
- viewBox="0 0 20 20"
14
- fill="currentColor"
15
- aria-hidden="true">
16
- <path fill-rule="evenodd"
17
- d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
18
- clip-rule="evenodd" />
19
- </svg>
20
- </div>
21
- <div class="toast-icon"
22
- *ngSwitchCase="'success'">
23
- <svg class="h-5 w-5 text-green-400"
24
- xmlns="http://www.w3.org/2000/svg"
25
- fill="none"
26
- viewBox="0 0 24 24"
27
- stroke="currentColor"
28
- aria-hidden="true">
29
- <path stroke-linecap="round"
30
- stroke-linejoin="round"
31
- stroke-width="2"
32
- d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
33
- </svg>
34
- </div>
35
- <div class="toast-icon"
36
- *ngSwitchCase="'error'">
37
- <svg class="h-5 w-5 text-red-400"
38
- xmlns="http://www.w3.org/2000/svg"
39
- viewBox="0 0 20 20"
40
- fill="currentColor"
41
- aria-hidden="true">
42
- <path fill-rule="evenodd"
43
- d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
44
- clip-rule="evenodd" />
45
- </svg>
46
- </div>
47
- <div class="toast-icon"
48
- *ngSwitchCase="'warning'">
49
- <svg class="h-5 w-5 text-yellow-400"
50
- xmlns="http://www.w3.org/2000/svg"
51
- viewBox="0 0 20 20"
52
- fill="currentColor"
53
- aria-hidden="true">
54
- <path fill-rule="evenodd"
55
- d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z"
56
- clip-rule="evenodd" />
57
- </svg>
58
- </div>
59
- <div class="toast-icon"
60
- *ngSwitchDefault>
61
- <svg class="h-5 w-5 text-green-400"
62
- xmlns="http://www.w3.org/2000/svg"
63
- fill="none"
64
- viewBox="0 0 24 24"
65
- stroke="currentColor"
66
- aria-hidden="true">
67
- <path stroke-linecap="round"
68
- stroke-linejoin="round"
69
- stroke-width="2"
70
- d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
71
- </svg>
72
- </div>
73
-
74
- <div class="ml-3 w-0 flex-1">
75
- <p class="toast-title"
76
- *ngIf="toast?.title">
77
- {{toast?.title}}
78
- </p>
79
- <p class="toast-body">
80
- {{toast?.body}}
81
- </p>
82
- </div>
83
- <div class="toast-close-icon">
84
- <button class="toast-close-button"
85
- (click)="closeToast(i)">
86
- <span class="sr-only">Close</span>
87
- <!-- Heroicon name: solid/x -->
88
- <svg class="h-5 w-5"
89
- xmlns="http://www.w3.org/2000/svg"
90
- viewBox="0 0 20 20"
91
- fill="currentColor"
92
- aria-hidden="true">
93
- <path fill-rule="evenodd"
94
- d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
95
- clip-rule="evenodd" />
96
- </svg>
97
- </button>
98
- </div>
99
- </div>
100
- </div>
101
- </div>
102
- </div>
103
- </div>
@@ -1,26 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
2
- import { Toast } from '../../types';
3
-
4
- @Component({
5
- selector: 'lib-toaster',
6
- templateUrl: './toaster.component.html'
7
- })
8
- export class ToasterComponent implements OnInit {
9
-
10
- @Input() toast: Toast | undefined;
11
- @Input() i = 0;
12
- @Output() remove = new EventEmitter<number>();
13
- public isMobile = false;
14
- public closed = false;
15
-
16
- constructor() { }
17
-
18
- ngOnInit(): void {
19
- window.screen.width > 640 ? this.isMobile = false : this.isMobile = true;
20
- }
21
-
22
- public closeToast(index: number): void {
23
- this.closed = true;
24
- setTimeout(() => this.remove.emit(index), 100);
25
- }
26
- }
@@ -1,15 +0,0 @@
1
- <button type="button"
2
- [ngClass]="value ? (disabled ? 'on disabled' : 'on') : 'off'"
3
- class="toggle-button"
4
- role="switch"
5
- aria-checked="false"
6
- aria-labelledby="isPrivate"
7
- (click)="changeValue()"
8
- (blur)="onBlur($event)"
9
- value="{{value}}"
10
- [disabled]="disabled"
11
- [title]="disabled ? 'Το αρχείο πρέπει να είναι ιδωτικό' : 'Ιδιωτικό'">
12
- <span aria-hidden="true"
13
- [ngClass]="value ? 'enabled-anim' : 'disabled-anim'"
14
- class="toggle-span"></span>
15
- </button>
@@ -1,58 +0,0 @@
1
- import { Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core';
2
- import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
3
-
4
- @Component({
5
- selector: 'lib-toggle',
6
- templateUrl: './toggle.component.html',
7
- providers: [
8
- {
9
- provide: NG_VALUE_ACCESSOR,
10
- useExisting: forwardRef(() => ToggleComponent),
11
- multi: true
12
- }
13
- ]
14
- })
15
- export class ToggleComponent implements OnInit, ControlValueAccessor {
16
- @Input()
17
- public value: boolean | null | undefined;
18
- @Input()
19
- public disabled:boolean | null | undefined;
20
- @Output() valueChange: EventEmitter<Boolean> = new EventEmitter<Boolean>();
21
-
22
- private onChange$: any | undefined = undefined;
23
- private onTouched$: any | undefined = undefined;
24
-
25
- constructor() { }
26
-
27
- writeValue(obj: any): void {
28
- if(obj) {
29
- this.value = obj || false;
30
- }
31
- }
32
- registerOnChange(fn: any): void {
33
- this.onChange$ = fn;
34
- }
35
- registerOnTouched(fn: any): void {
36
- this.onTouched$ = fn;
37
- }
38
-
39
- public onBlur(event: any): void {
40
- if(this.onTouched$) {
41
- this.onTouched$();
42
- }
43
- }
44
-
45
- ngOnInit(): void {
46
- }
47
-
48
- public changeValue(){
49
- this.value = !this.value;
50
- this.valueChange.emit(this.value);
51
- if(this.onChange$) {
52
- this.onChange$(this.value);
53
- }
54
- if(this.onTouched$) {
55
- this.onTouched$();
56
- }
57
- }
58
- }
@@ -1,196 +0,0 @@
1
- //
2
- // https://github.com/arkon/ng-click-outside
3
- // the project is inactive - so imoved the directive code in our project
4
- //
5
- import {
6
- Directive,
7
- ElementRef,
8
- EventEmitter,
9
- Inject,
10
- Input,
11
- OnChanges,
12
- OnDestroy,
13
- OnInit,
14
- Output,
15
- PLATFORM_ID,
16
- SimpleChanges,
17
- NgZone,
18
- } from '@angular/core';
19
- import { isPlatformBrowser } from '@angular/common';
20
-
21
- // tslint:disable-next-line:directive-selector
22
- @Directive({ selector: '[clickOutside]' })
23
- export class ClickOutsideDirective implements OnInit, OnChanges, OnDestroy {
24
-
25
- @Input() clickOutsideEnabled = true;
26
-
27
- @Input() attachOutsideOnClick = false;
28
- @Input() delayClickOutsideInit = false;
29
- @Input() emitOnBlur = false;
30
-
31
- @Input() exclude = '';
32
- @Input() excludeBeforeClick = false;
33
-
34
- @Input() clickOutsideEvents = '';
35
-
36
- @Output() clickOutside: EventEmitter<Event> = new EventEmitter<Event>();
37
-
38
- // tslint:disable-next-line:variable-name
39
- private _nodesExcluded: Array<HTMLElement> = [];
40
- // tslint:disable-next-line:variable-name
41
- private _events: Array<string> = ['click'];
42
-
43
- constructor(
44
- // tslint:disable-next-line:variable-name
45
- private _el: ElementRef,
46
- // tslint:disable-next-line:variable-name
47
- private _ngZone: NgZone,
48
- @Inject(PLATFORM_ID) private platformId: any) {
49
- this._initOnClickBody = this._initOnClickBody.bind(this);
50
- this._onClickBody = this._onClickBody.bind(this);
51
- this._onWindowBlur = this._onWindowBlur.bind(this);
52
- }
53
-
54
- ngOnInit(): void {
55
- if (!isPlatformBrowser(this.platformId)) { return; }
56
-
57
- this._init();
58
- }
59
-
60
- ngOnDestroy(): void {
61
- if (!isPlatformBrowser(this.platformId)) { return; }
62
-
63
- this._removeClickOutsideListener();
64
- this._removeAttachOutsideOnClickListener();
65
- this._removeWindowBlurListener();
66
- }
67
-
68
- ngOnChanges(changes: SimpleChanges): void {
69
- if (!isPlatformBrowser(this.platformId)) { return; }
70
-
71
- // tslint:disable-next-line:no-string-literal
72
- if (changes['attachOutsideOnClick'] || changes['exclude'] || changes['emitOnBlur']) {
73
- this._init();
74
- }
75
- }
76
-
77
- private _init(): void {
78
- if (this.clickOutsideEvents !== '') {
79
- this._events = this.clickOutsideEvents.split(',').map(e => e.trim());
80
- }
81
-
82
- this._excludeCheck();
83
-
84
- if (this.attachOutsideOnClick) {
85
- this._initAttachOutsideOnClickListener();
86
- } else {
87
- this._initOnClickBody();
88
- }
89
-
90
- if (this.emitOnBlur) {
91
- this._initWindowBlurListener();
92
- }
93
- }
94
-
95
- private _initOnClickBody(): void {
96
- if (this.delayClickOutsideInit) {
97
- setTimeout(this._initClickOutsideListener.bind(this));
98
- } else {
99
- this._initClickOutsideListener();
100
- }
101
- }
102
-
103
- private _excludeCheck(): void {
104
- if (this.exclude) {
105
- try {
106
- const nodes = Array.from(document.querySelectorAll(this.exclude)) as Array<HTMLElement>;
107
- if (nodes) {
108
- this._nodesExcluded = nodes;
109
- }
110
- } catch (err) {
111
- console.error('[ng-click-outside] Check your exclude selector syntax.', err);
112
- }
113
- }
114
- }
115
-
116
- private _onClickBody(ev: Event): void {
117
- if (!this.clickOutsideEnabled) { return; }
118
-
119
- if (this.excludeBeforeClick) {
120
- this._excludeCheck();
121
- }
122
-
123
- if (!this._el.nativeElement.contains(ev.target) && !this._shouldExclude(ev.target)) {
124
- this._emit(ev);
125
-
126
- if (this.attachOutsideOnClick) {
127
- this._removeClickOutsideListener();
128
- }
129
- }
130
- }
131
-
132
- /**
133
- * Resolves problem with outside click on iframe
134
- * @see https://github.com/arkon/ng-click-outside/issues/32
135
- */
136
- private _onWindowBlur(ev: Event): void {
137
- setTimeout(() => {
138
- if (!document.hidden) {
139
- this._emit(ev);
140
- }
141
- });
142
- }
143
-
144
- private _emit(ev: Event): void {
145
- if (!this.clickOutsideEnabled) { return; }
146
-
147
- this._ngZone.run(() => this.clickOutside.emit(ev));
148
- }
149
-
150
- private _shouldExclude(target: any): boolean {
151
- // tslint:disable-next-line:prefer-const
152
- for (let excludedNode of this._nodesExcluded) {
153
- if (excludedNode.contains(target)) {
154
- return true;
155
- }
156
- }
157
-
158
- return false;
159
- }
160
-
161
- private _initClickOutsideListener(): void {
162
- this._ngZone.runOutsideAngular(() => {
163
- this._events.forEach(e => document.addEventListener(e, this._onClickBody));
164
- });
165
- }
166
-
167
- private _removeClickOutsideListener(): void {
168
- this._ngZone.runOutsideAngular(() => {
169
- this._events.forEach(e => document.removeEventListener(e, this._onClickBody));
170
- });
171
- }
172
-
173
- private _initAttachOutsideOnClickListener(): void {
174
- this._ngZone.runOutsideAngular(() => {
175
- this._events.forEach(e => this._el.nativeElement.addEventListener(e, this._initOnClickBody));
176
- });
177
- }
178
-
179
- private _removeAttachOutsideOnClickListener(): void {
180
- this._ngZone.runOutsideAngular(() => {
181
- this._events.forEach(e => this._el.nativeElement.removeEventListener(e, this._initOnClickBody));
182
- });
183
- }
184
-
185
- private _initWindowBlurListener(): void {
186
- this._ngZone.runOutsideAngular(() => {
187
- window.addEventListener('blur', this._onWindowBlur);
188
- });
189
- }
190
-
191
- private _removeWindowBlurListener(): void {
192
- this._ngZone.runOutsideAngular(() => {
193
- window.removeEventListener('blur', this._onWindowBlur);
194
- });
195
- }
196
- }
@@ -1,7 +0,0 @@
1
- import { Directive, ViewContainerRef, Input } from '@angular/core';
2
-
3
- @Directive({ selector: '[appDynamicComponentHost]' })
4
- export class DynamicComponentHostDirective {
5
- @Input() hostName: string = '';
6
- constructor(public viewContainerRef: ViewContainerRef) {}
7
- }