@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,82 +0,0 @@
1
- import { SwitchViewAction } from '../../../types';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
- import { Component, Input, OnInit, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';
4
- import { fromEvent } from 'rxjs';
5
- import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators';
6
- import { HeaderMetaItem, RouterViewAction, ViewAction } from '../../../types';
7
-
8
- @Component({
9
- selector: 'lib-view-layout',
10
- templateUrl: './view-layout.component.html'
11
- })
12
- export class ViewLayoutComponent implements OnInit {
13
- // tslint:disable-next-line:no-input-rename
14
- @ViewChild('search') private searchInput$?: ElementRef;
15
- // tslint:disable-next-line:no-input-rename
16
- @Input('show-header') header = true;
17
- @Input() fluid = false;
18
- @Input() title = 'no title';
19
- @Input() icon: string | null = null;
20
- @Input() actions: ViewAction[] | null = null;
21
- @Input() busy = false;
22
- // tslint:disable-next-line:no-input-rename
23
- @Input('search-placeholder') searchPlaceholder: string | null = 'αναζήτηση';
24
- @Input() view: string | null = null;
25
- // tslint:disable-next-line:no-input-rename
26
- @Input('meta-items') metaItems: HeaderMetaItem[] | null = [];
27
- // tslint:disable-next-line:no-output-on-prefix
28
- @Output() onAction: EventEmitter<ViewAction> = new EventEmitter<ViewAction>();
29
- // tslint:disable-next-line:no-output-on-prefix
30
- @Output() onSearch: EventEmitter<string> = new EventEmitter<string>();
31
-
32
- constructor(private route$: ActivatedRoute, private router$: Router) { }
33
-
34
- ngOnInit(): void {
35
- if (this.searchInput$?.nativeElement){
36
- fromEvent(this.searchInput$.nativeElement, 'keyup').pipe(
37
- map((event: any) => {
38
- return event.target.value; // Get input value.
39
- }),
40
- filter(inputValue => inputValue.length >= 3 || inputValue.length === 0),
41
- // If character length greater than minimumSearchCharacters setting.
42
- debounceTime(1000), // Time in milliseconds between key events.
43
- distinctUntilChanged() // If previous query is different from current.
44
- ).subscribe();
45
- }
46
- }
47
-
48
- public emitActionClick(action: ViewAction): void {
49
- this.onAction.emit(action);
50
- }
51
-
52
- public routerLinkActionClick(action: RouterViewAction | any): void {
53
- // console.log('routerLinkActionClick', action);
54
- if (action.outlet) {
55
- this.router$.navigate(['', { outlets: { rightpane: action.link } }]);
56
- } else {
57
- this.router$.navigate([action.link]);
58
- }
59
- }
60
-
61
- searchActionClick(action: ViewAction, text: string): void {
62
- this.onSearch.emit(text);
63
- }
64
-
65
- searchActionType(text: string): void {
66
- this.onSearch.emit(this.searchInput$?.nativeElement.value);
67
- }
68
-
69
- public handleClear(event: any): void {
70
- console.log('handle clear!!!');
71
- event.stopPropagation();
72
- this.onSearch.emit(event.target?.value);
73
- }
74
-
75
- public switchViewActionClick(action: SwitchViewAction | any): void {
76
- // console.log('switchViewActionClick', action);
77
- this.view = action.param;
78
- if (action && action.param) {
79
- this.router$.navigate([], { queryParams: { view: action.param }, queryParamsHandling: 'merge', skipLocationChange: false });
80
- }
81
- }
82
- }
@@ -1,135 +0,0 @@
1
- import { AvatarInitialsComponent } from './controls/avatar-initials/avatar-initials.component';
2
- import { ToasterService } from './services/toaster.service';
3
- import { ToasterComponent } from './controls/toaster/toaster.component';
4
- import { ToasterContainerComponent } from './controls/toaster/toaster-container.component';
5
- import { DatepickerComponent } from './controls/date-picker/date-picker.component';
6
- import { SidePaneComponent } from './controls/side-pane/side-pane.component';
7
- import { ListDetailsSectionComponent } from './controls/list-view/list-details-section.component';
8
- import { CommonModule } from '@angular/common';
9
- import { RouterModule } from '@angular/router';
10
- import { UnauthorizedComponent } from './pages/http-status/unauthorized/unauthorized.component';
11
- import { PageNotFoundComponent } from './pages/http-status/page-not-found/page-not-found.component';
12
- import { ErrorComponent } from './pages/http-status/error/error.component';
13
- import { LoggedOutComponent } from './pages/auth/logged-out/logged-out.component';
14
- import { AuthCallbackComponent } from './pages/auth/auth-callback/auth-callback.component';
15
- import { IndiceAuthModule } from '@indice/ng-auth';
16
- import { SkeletonLoaderComponent } from './controls/skeleton-loader/skeleton-loader.component';
17
- import { ListTileComponent } from './controls/list-view/list-tile.component';
18
- import { ListColumnComponent } from './controls/list-view/list-column.component';
19
- import { NgModule } from '@angular/core';
20
- import { DropDownMenuComponent } from './controls/drop-down-menu/drop-down-menu.component';
21
- import { ListViewComponent } from './controls/list-view/list-view.component';
22
- import { PagerComponent } from './controls/pager/pager.component';
23
- import { ClickOutsideDirective } from './directives/click-outside.directive';
24
- import { ShellFooterComponent } from './layouts/shell/shell-footer/shell-footer.component';
25
- import { ShellHeaderComponent } from './layouts/shell/shell-header/shell-header.component';
26
- import { ShellLayoutComponent } from './layouts/shell/shell-layout/shell-layout.component';
27
- import { FormLayoutComponent } from './layouts/views/form-layout/form-layout.component';
28
- import { ModelViewLayoutComponent } from './layouts/views/model-view-layout/model-view-layout.component';
29
- import { SideViewLayoutComponent } from './layouts/views/side-view-layout/side-view-layout.component';
30
- import { ViewLayoutComponent } from './layouts/views/view-layout/view-layout.component';
31
- import { AuthRenewComponent } from './pages/auth/auth-renew/auth-renew.component';
32
- import { AddressPipe } from './pipes/address.pipe';
33
- import { DurationFormatPipe } from './pipes/duration-format.pipe';
34
- import { CollapsiblePanelComponent } from './controls/collapsible-panel/collapsible-panel.component';
35
- import { KpiTileComponent } from './controls/kpi-tile/kpi-tile.component';
36
- import { DynamicComponentHostDirective } from './directives/dynamic-component-host.directive';
37
- import { ListViewEmptyStateComponent } from './controls/list-view/list-view-empty-state.component';
38
- import { ToggleComponent } from './controls/toggle/toggle.component';
39
- import { NavLinksListComponent } from './controls/nav-links-list/nav-links-list.component';
40
- import { NotificationsIndicatorComponent } from './controls/notifications-indicator/notifications-indicator.component';
41
-
42
- @NgModule({
43
- declarations: [
44
- // diectives
45
- ClickOutsideDirective,
46
- DynamicComponentHostDirective,
47
- // controls
48
- DropDownMenuComponent,
49
- PagerComponent,
50
- ListViewComponent,
51
- ListColumnComponent,
52
- ListTileComponent,
53
- ListDetailsSectionComponent,
54
- ListViewEmptyStateComponent,
55
- SkeletonLoaderComponent,
56
- CollapsiblePanelComponent,
57
- KpiTileComponent,
58
- SidePaneComponent,
59
- DatepickerComponent,
60
- AvatarInitialsComponent,
61
- ToggleComponent,
62
- // Toaster
63
- ToasterContainerComponent,
64
- ToasterComponent,
65
- // shell layout
66
- ShellLayoutComponent,
67
- ShellHeaderComponent,
68
- ShellFooterComponent,
69
- // view layouts
70
- ViewLayoutComponent,
71
- SideViewLayoutComponent,
72
- ModelViewLayoutComponent,
73
- FormLayoutComponent,
74
- // pages (common)
75
- AuthCallbackComponent,
76
- AuthRenewComponent,
77
- LoggedOutComponent,
78
- ErrorComponent,
79
- PageNotFoundComponent,
80
- UnauthorizedComponent,
81
- // pipes
82
- AddressPipe,
83
- DurationFormatPipe,
84
- NavLinksListComponent,
85
- NotificationsIndicatorComponent
86
- ],
87
- imports: [
88
- CommonModule,
89
- RouterModule,
90
- IndiceAuthModule
91
- ],
92
- exports: [
93
- ClickOutsideDirective,
94
- DropDownMenuComponent,
95
- PagerComponent,
96
- ListViewComponent,
97
- ListColumnComponent,
98
- ListTileComponent,
99
- ListDetailsSectionComponent,
100
- ListViewEmptyStateComponent,
101
- KpiTileComponent,
102
- SkeletonLoaderComponent,
103
- ShellLayoutComponent,
104
- ShellHeaderComponent,
105
- ShellFooterComponent,
106
- ViewLayoutComponent,
107
- SideViewLayoutComponent,
108
- ModelViewLayoutComponent,
109
- FormLayoutComponent,
110
- AuthCallbackComponent,
111
- AuthRenewComponent,
112
- LoggedOutComponent,
113
- ErrorComponent,
114
- PageNotFoundComponent,
115
- UnauthorizedComponent,
116
- AddressPipe,
117
- DurationFormatPipe,
118
- CollapsiblePanelComponent,
119
- SidePaneComponent,
120
- DatepickerComponent,
121
- ToasterContainerComponent,
122
- ToasterComponent,
123
- AvatarInitialsComponent,
124
- ToggleComponent
125
- ]
126
- })
127
- export class IndiceComponentsModule {
128
- // tslint:disable-next-line:typedef
129
- static forRoot() {
130
- return {
131
- ngModule: IndiceComponentsModule,
132
- providers: [ToasterService]
133
- };
134
- }
135
- }
@@ -1 +0,0 @@
1
- <lib-view-layout [title]="status" [busy]="true"></lib-view-layout>
@@ -1,22 +0,0 @@
1
- import { Component, Inject, OnInit } from '@angular/core';
2
- import { Router } from '@angular/router';
3
-
4
- import { AuthService } from '@indice/ng-auth';
5
-
6
- @Component({
7
- selector: 'lib-auth-callback',
8
- templateUrl: './auth-callback.component.html'
9
- })
10
- export class AuthCallbackComponent implements OnInit {
11
- constructor(@Inject(AuthService) private authService: AuthService, private router: Router) { }
12
-
13
- public status = 'παρακαλώ περιμένετε...';
14
-
15
- public ngOnInit(): void {
16
- this.authService.signinRedirectCallback().subscribe((user) => {
17
- if (user) {
18
- this.router.navigateByUrl(user.state?.url || '/');
19
- }
20
- });
21
- }
22
- }
@@ -1,20 +0,0 @@
1
- import { Component, Inject, OnInit } from '@angular/core';
2
- import { Router } from '@angular/router';
3
-
4
- import { AuthService } from '@indice/ng-auth';
5
-
6
- @Component({
7
- selector: 'lib-auth-renew',
8
- template: ''
9
- })
10
- export class AuthRenewComponent implements OnInit {
11
- constructor(@Inject(AuthService) private authService: AuthService, private router: Router) { }
12
-
13
- public ngOnInit(): void {
14
- this.authService.signinSilentCallback().subscribe(user => {
15
- if (!user) {
16
- this.router.navigate(['/unauthorized']);
17
- }
18
- });
19
- }
20
- }
@@ -1 +0,0 @@
1
- <lib-view-layout title="Έχετε αποσυνδεθεί με επιτυχία!"></lib-view-layout>
@@ -1,22 +0,0 @@
1
- import { AuthService } from '@indice/ng-auth';
2
- import { Component, Inject, OnInit } from '@angular/core';
3
-
4
-
5
- @Component({
6
- // tslint:disable-next-line:component-selector
7
- selector: 'lib-logged-out',
8
- templateUrl: './logged-out.component.html'
9
- })
10
- export class LoggedOutComponent implements OnInit {
11
- constructor(@Inject(AuthService) private authService: AuthService) { }
12
-
13
- public status = 'working on it, please give me a sec...';
14
- public finished = false;
15
-
16
- public ngOnInit(): void {
17
- this.authService.removeUser().subscribe(() => {
18
- this.status = 'Thank you!';
19
- this.finished = true;
20
- });
21
- }
22
- }
@@ -1,13 +0,0 @@
1
- <lib-view-layout [show-header]="false" title="500 - παρουσιάστηκε σφάλμα!">
2
- <div class="bg-gray-600 view-container">
3
- <div class="max-w-2xl mx-auto text-center py-16 px-4 sm:py-20 sm:px-6 lg:px-8">
4
- <h2 class="text-3xl font-extrabold text-white sm:text-4xl">
5
- <span class="block">500</span>
6
- </h2>
7
- <p class="mt-4 text-lg leading-6 text-gray-200">σφάλμα, κατι δεν πήγε καλά...!</p>
8
- <a href="/" class="mt-8 inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-sm rounded-sm text-gray-600 bg-white hover:bg-gray-50 sm:w-auto">
9
- πατήστε εδώ για να επιστρέψετε
10
- </a>
11
- </div>
12
- </div>
13
- </lib-view-layout>
@@ -1,13 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-error',
5
- templateUrl: './error.component.html'
6
- })
7
- export class ErrorComponent implements OnInit {
8
- public error = 'Error!';
9
-
10
- ngOnInit(): void {
11
- }
12
-
13
- }
@@ -1,14 +0,0 @@
1
- <lib-view-layout [show-header]="false" title="404 - δεν βρέθηκε!">
2
- <div class="text-gray-900">
3
- <div class="max-w-4xl mx-auto text-center py-16 px-4 sm:py-20 sm:px-6 lg:px-8">
4
- <h2 class="text-3xl font-extrabold sm:text-4xl">
5
- <span class="block">404</span>
6
- </h2>
7
- <p class="mt-4 text-lg leading-6 text-gray-800">δεν βρέθηκε η σελίδα που ζητήσατε!</p>
8
- <a href="/"
9
- class="mt-8 inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-sm rounded-sm text-gray-600 bg-white hover:bg-gray-50 sm:w-auto">
10
- πατήστε εδώ για να επιστρέψετε
11
- </a>
12
- </div>
13
- </div>
14
- </lib-view-layout>
@@ -1,14 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-page-not-found',
5
- templateUrl: './page-not-found.component.html'
6
- })
7
- export class PageNotFoundComponent implements OnInit {
8
-
9
- constructor() { }
10
-
11
- ngOnInit(): void {
12
- }
13
-
14
- }
@@ -1,15 +0,0 @@
1
- <lib-view-layout [show-header]="false" title="401 - δεν επιτρέπεται η πρόσβαση!">
2
- <div class="bg-gray-600 view-container">
3
- <div class="max-w-2xl mx-auto text-center py-16 px-4 sm:py-20 sm:px-6 lg:px-8">
4
- <h2 class="text-3xl font-extrabold text-white sm:text-4xl">
5
- <span class="block">401</span>
6
- </h2>
7
- <p class="mt-4 text-lg leading-6 text-gray-200">δεν έχετε τα κατάλληλα δικαιώματα πρόσβασης!</p>
8
- <a href="/" class="mt-8 inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-sm rounded-sm text-gray-600 bg-white hover:bg-gray-50 sm:w-auto">
9
- πατήστε εδώ για να επιστρέψετε
10
- </a>
11
- </div>
12
- </div>
13
- </lib-view-layout>
14
-
15
-
@@ -1,11 +0,0 @@
1
- import { Component, Inject, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'lib-unauthorized',
5
- templateUrl: './unauthorized.component.html'
6
- })
7
- export class UnauthorizedComponent implements OnInit {
8
- constructor() { }
9
-
10
- public ngOnInit(): void { }
11
- }
@@ -1,17 +0,0 @@
1
- import { Pipe, PipeTransform } from '@angular/core';
2
- import { IAddress } from '../types';
3
-
4
- @Pipe({
5
- name: 'address',
6
- pure: false
7
- })
8
- export class AddressPipe implements PipeTransform {
9
-
10
- transform(value: IAddress | undefined): string {
11
- if (value === undefined || null || '') {
12
- return '';
13
- }
14
- // tslint:disable-next-line:no-non-null-assertion
15
- return `${value.street || ''}${value.streetNumber ? ' ' + value.streetNumber : ''}${value.city ? ', ' + value.city : ''}${+value.postalCode! ? ', ' + +value.postalCode! : ''}`;
16
- }
17
- }
@@ -1,67 +0,0 @@
1
- import { Pipe, PipeTransform } from '@angular/core';
2
-
3
- @Pipe({
4
- name: 'durationFormat',
5
- pure: false
6
- })
7
- export class DurationFormatPipe implements PipeTransform {
8
-
9
- transform(value: any, arg1: any, arg2: any): string {
10
-
11
- let days: any;
12
- let seconds: any;
13
- let minutes: any;
14
- let hours: any;
15
-
16
- if (arg1 === 'ms' && arg2 === 'hhmmss') {
17
- seconds = Math.floor((value / 1000) % 60);
18
- minutes = Math.floor(((value / (1000 * 60)) % 60));
19
- hours = Math.floor((value / (1000 * 60 * 60)));
20
- return this.format(arg2, seconds, minutes, hours, days);
21
-
22
- } else if (arg1 === 's' && arg2 === 'hhmmss') {
23
- seconds = Math.floor((value % 60));
24
- minutes = Math.floor(((value / 60) % 60));
25
- hours = Math.floor(((value / 60) / 60));
26
- return this.format(arg2, seconds, minutes, hours, days);
27
-
28
- } else if (arg1 === 'ms' && (arg2 === 'ddhhmmss' || arg2 === 'ddhhmmssLong')) {
29
- seconds = Math.floor(((value / 1000) % 60));
30
- minutes = Math.floor((value / (1000 * 60) % 60));
31
- hours = Math.floor((value / (1000 * 60 * 60) % 24));
32
- days = Math.floor((value / (1000 * 60 * 60 * 24)));
33
- return this.format(arg2, seconds, minutes, hours, days);
34
-
35
- } else if (arg1 === 's' && (arg2 === 'ddhhmmss' || arg2 === 'ddhhmmssLong')) {
36
- seconds = Math.floor(value % 60);
37
- minutes = Math.floor(((value / 60) % 60));
38
- hours = Math.floor(((value / 60) / 60) % 24);
39
- days = Math.floor((((value / 60) / 60) / 24));
40
- return this.format(arg2, seconds, minutes, hours, days);
41
-
42
- }
43
- else {
44
- return value;
45
- }
46
- }
47
-
48
- private format(arg2: string, seconds: any, minutes: any, hours: any, days: any): any {
49
- (days < 10) ? days = '0' + days : days;
50
- (hours < 10) ? hours = '0' + hours : hours;
51
- (minutes < 10) ? minutes = '0' + minutes : minutes;
52
- (seconds < 10) ? seconds = '0' + seconds : seconds;
53
-
54
- switch (arg2) {
55
- case 'hhmmss':
56
- return `${hours}:${minutes}:${seconds}`;
57
-
58
- case 'ddhhmmss':
59
- return `${days}d, ${hours}h, ${minutes}m, ${seconds}s`;
60
-
61
- case 'ddhhmmssLong':
62
- return `${days} days, ${hours} hours, ${minutes} minutes, ${seconds} seconds`;
63
- }
64
- return undefined;
65
- }
66
-
67
- }
@@ -1,31 +0,0 @@
1
- import { TemplateRef } from '@angular/core';
2
-
3
- /**
4
- * Options passed to {@link ComponentLoader.show}.
5
- *
6
- * @internal
7
- */
8
- export class ComponentLoaderOptions {
9
- /**
10
- * The content to be drawn inside `<ng-content>` of `ComponentLoader` attached component.
11
- * @remarks
12
- * `content` can be `Component` , `TemplateRef` or `String`.
13
- */
14
- content?: string | TemplateRef<unknown>;
15
- /**
16
- * The data to be passed to view for `TemplateRef` case.
17
- */
18
- context?: unknown;
19
- /**
20
- * Initial data to be passed to `content` for `Component` case.
21
- */
22
- initialState?: unknown;
23
- /**
24
- * Other properties passed to attached component.
25
- */
26
- [key: string]: unknown;
27
- /**
28
- * id` - The id of the attached component ref.
29
- */
30
- id?: number | string;
31
- }