@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,67 +0,0 @@
1
- import { Directive, ElementRef, HostListener, AfterViewInit, Input, TemplateRef, ViewContainerRef } from '@angular/core';
2
- import { ScreenSizeService } from '../services/screen-size-service';
3
- import { IScreenSize, SCREEN_SIZE } from '../types';
4
-
5
- @Directive({
6
- // tslint:disable-next-line:directive-selector
7
- selector: '[visibleForScreen]'
8
- })
9
- export class ScreenSizeDirective implements AfterViewInit {
10
- private hasView = false;
11
- private prefix = 'is-';
12
- private sizes: IScreenSize[] = [
13
- {
14
- id: SCREEN_SIZE.XS, name: 'xs',
15
- css: `d-block d-sm-none`
16
- }, {
17
- id: SCREEN_SIZE.SM, name: 'sm',
18
- css: `d-none d-sm-block d-md-none`
19
- }, {
20
- id: SCREEN_SIZE.MD, name: 'md',
21
- css: `d-none d-md-block d-lg-none`
22
- }, {
23
- id: SCREEN_SIZE.LG, name: 'lg',
24
- css: `d-none d-lg-block d-xl-none`
25
- }, {
26
- id: SCREEN_SIZE.XL, name: 'xl',
27
- css: `d-none d-xl-block`
28
- }
29
- ];
30
-
31
- @Input() set visibleForScreen(size: string) {
32
- this.updateElementVisibility(size);
33
- }
34
-
35
- private currentSize: IScreenSize | undefined = undefined;
36
- constructor(private templateRef: TemplateRef<any>, private viewContainer: ViewContainerRef) { }
37
-
38
- @HostListener('window:resize', [])
39
- private onResize(): void {
40
- this.detectScreenSize();
41
- }
42
-
43
- public ngAfterViewInit(): void {
44
- this.detectScreenSize();
45
- }
46
-
47
- private detectScreenSize(): void {
48
- this.currentSize = this.sizes.find(x => {
49
- const el = this.viewContainer.element.nativeElement.querySelector(`.${this.prefix}${x.id}`);
50
- const isVisible = window.getComputedStyle(el).display !== 'none';
51
- return isVisible;
52
- });
53
- //console.log('detectScreenSize', this.currentSize);
54
- }
55
-
56
- private updateElementVisibility(target: string): void {
57
- // if it should be rendered and it is not already rendered
58
- // DO IT, DO IT NOWWWW
59
- if (!this.hasView && this.currentSize && this.currentSize.name === target) {
60
- this.viewContainer.createEmbeddedView(this.templateRef);
61
- this.hasView = true;
62
- } else {
63
- this.viewContainer.clear();
64
- this.hasView = false;
65
- }
66
- }
67
- }
@@ -1,204 +0,0 @@
1
- import { Observable, Subscription, of } from 'rxjs';
2
- import { Component, OnInit, OnDestroy } from '@angular/core';
3
- import { ActivatedRoute, Router } from '@angular/router';
4
- import { HeaderMetaItem, IResultSet, MenuOption, RouterViewAction, ViewAction, ListViewType } from '../types';
5
- import { Icons } from '../icons';
6
-
7
- @Component({ template: '' })
8
- export abstract class BaseListComponent<T> implements OnInit, OnDestroy {
9
- public items: T[] | null | undefined = null;
10
- public view: string = ListViewType.Tiles;
11
- public title: string | null = null;
12
- public actions: ViewAction[] = [];
13
- public loaderItems: any[] = [1, 2, 3, 4, 5];
14
- public page = 1;
15
- public pageSize = 20;
16
- public count = 0;
17
- public sort: string | null = '';
18
- public sortdir: string | null = '-';
19
- public search: string | null = '';
20
- public sortOptions: MenuOption[] = [];
21
- public metaItems: HeaderMetaItem[] = [];
22
- public abstract newItemLink: string | null;
23
- private routeSub$: Subscription | undefined;
24
-
25
- constructor(private route$: ActivatedRoute, private router$: Router) {
26
- }
27
-
28
- ngOnDestroy(): void {
29
- if (this.routeSub$) {
30
- this.routeSub$.unsubscribe();
31
- }
32
- }
33
-
34
- public getViewActions(): Observable<ViewAction[]> {
35
- const actions = [
36
- new ViewAction('search', null, null, Icons.Search, 'αναζήτηση'),
37
- new ViewAction('refresh', null, null, Icons.Refresh, 'ανανέωση στοιχείων')
38
- ];
39
- if (this.newItemLink) {
40
- actions.push(new RouterViewAction(Icons.Add, this.newItemLink, 'rightpane', 'προσθήκη νέας εγγραφής;'));
41
- }
42
- return of(actions);
43
- }
44
-
45
- ngOnInit(): void {
46
- this.getViewActions().subscribe(actions => {
47
- this.actions = actions || [];
48
- });
49
-
50
- this.metaItems = [
51
- { key: 'count', icon: Icons.ItemsCount, text: 'παρακαλώ περιμένετε...' }
52
- ];
53
-
54
- // disabled external route changes monitoring due to sync issues - which is bad :) - refresh from url will not work
55
- // until i come up with a solution...
56
-
57
- this.routeSub$ = this.route$.queryParamMap.subscribe(params => {
58
- if (params.keys.length === 0) {
59
- return;
60
- }
61
-
62
- // changing the view mode does not require reloading...
63
- this.view = params.get('view') || ListViewType.Tiles;
64
- // console.log('route changes ', this.view);
65
-
66
- // if (params.get('search') !== this.search) {
67
- // this.searchChanged(params.get('search'));
68
- // }
69
-
70
- // const page = +(params.get('page') || 1);
71
- // if (page !== this.page) {
72
- // this.page = page;
73
- // }
74
-
75
- // const size = +(params.get('pagesize') || 20);
76
- // if (this.pageSize !== size) {
77
- // this.pageSize = size;
78
- // }
79
-
80
- // if (params.get('search') !== this.search) {
81
- // this.search = params.get('search');
82
- // }
83
-
84
- // if (params.get('sort') !== this.sort) {
85
- // this.sort = params.get('sort');
86
- // }
87
-
88
- // if (params.get('sortdir') !== this.sortdir) {
89
- // this.sortdir = params.get('sortdir');
90
- // }
91
-
92
- });
93
-
94
- // just to sync params in query
95
- this.setRouteParams(true);
96
- this.load();
97
- }
98
-
99
- private setRouteParams(locationChange: boolean = false): void {
100
- this.router$.navigate([], {
101
- relativeTo: this.route$, queryParams: {
102
- view: this.view,
103
- page: this.page,
104
- pagesize: this.pageSize,
105
- search: this.search,
106
- sort: this.sort,
107
- dir: this.sortdir
108
- }, queryParamsHandling: 'merge', skipLocationChange: locationChange
109
- });
110
- }
111
-
112
- public actionHandler($event: ViewAction): void {
113
- // console.log('BaseListComponent actionHandler', $event);
114
- if ($event.key === 'refresh') {
115
- this.refresh();
116
- }
117
- }
118
-
119
- private load(): void {
120
- // console.log('BaseListComponent LOAD');
121
- this.count = 0;
122
- this.items = null;
123
- this.loadItems().subscribe(result => {
124
- this.count = result ? result.count : 0;
125
- this.items = result?.items;
126
- this.updateHeaderMeta();
127
- }, err => {
128
- this.count = 0;
129
- this.items = null;
130
- this.updateHeaderMeta();
131
- });
132
- }
133
-
134
- private updateHeaderMeta(): void {
135
- const count = this.metaItems?.filter(m => m.key === 'count')[0];
136
- if (count) {
137
- this.count === 1 ? count.text = `${this.count} αποτέλεσμα` : count.text = `${this.count} αποτελέσματα`;
138
- }
139
- }
140
-
141
- public abstract loadItems(): Observable<IResultSet<T> | null | undefined>;
142
-
143
- public clear(): void {
144
- this.count = 0;
145
- this.page = 1;
146
- this.items = null;
147
- this.search = null;
148
- this.setRouteParams();
149
- this.load();
150
- }
151
-
152
- public refresh(): void {
153
- this.count = 0;
154
- this.page = 1;
155
- this.items = null;
156
- this.setRouteParams();
157
- this.load();
158
- }
159
-
160
- public pageChanged(page: number): void {
161
- if (this.page !== page) {
162
- this.page = page;
163
- this.setRouteParams();
164
- this.load();
165
- }
166
- }
167
-
168
- public pageSizeChanged(pageSize: number): void {
169
- if (this.pageSize !== pageSize) {
170
- this.pageSize = pageSize;
171
- this.page = 1;
172
- this.setRouteParams();
173
- this.refresh();
174
- }
175
- }
176
-
177
- public sortChanged(sort: string): void {
178
- // console.log('base-list sortChanged', sort);
179
- if (this.sort !== sort) {
180
- this.page = 1;
181
- this.sort = sort;
182
- this.setRouteParams();
183
- this.refresh();
184
- }
185
- }
186
-
187
- public sortdirChanged(sortdir: string): void {
188
- if (this.sortdir !== sortdir) {
189
- this.page = 1;
190
- this.sortdir = sortdir;
191
- this.setRouteParams();
192
- this.refresh();
193
- }
194
- }
195
-
196
- public searchChanged(searchText: string | null): void {
197
- this.count = 0;
198
- this.page = 1;
199
- this.items = null;
200
- this.search = searchText;
201
- this.setRouteParams();
202
- this.load();
203
- }
204
- }
package/src/lib/icons.ts DELETED
@@ -1,39 +0,0 @@
1
- export class Icons {
2
- // https://uifabricicons.azurewebsites.net/
3
- public static Dashboard = `ms-Icon ms-Icon--HomeGroup `;
4
- public static Locations = `ms-Icon ms-Icon--MapPin `;
5
- public static ChargePoints = `ms-Icon ms-Icon--ChatBot `;
6
- public static Transations = `ms-Icon ms-Icon--PaymentCard `;
7
- public static Badges = `ms-Icon ms-Icon--IDBadge `;
8
-
9
- public static Information = `ms-Icon ms-Icon--Info`;
10
- public static Refresh = `ms-Icon ms-Icon--Refresh`;
11
- public static Search = `ms-Icon ms-Icon--Search`;
12
- public static Add = `ms-Icon ms-Icon--Add`;
13
- public static Delete = `ms-Icon ms-Icon--Delete`;
14
- public static SendEmail = `ms-Icon ms-Icon--NewMail`;
15
- public static Filter = `ms-Icon ms-Icon--Filter`;
16
- public static Export = `ms-Icon ms-Icon--ExcelDocument`;
17
- public static Import = `ms-Icon ms-Icon--PeopleAdd`;
18
-
19
- public static TilesView = `ms-Icon ms-Icon--AppIconDefault`;
20
- public static TableView = `ms-Icon ms-Icon--Table`;
21
- public static MapView = `ms-Icon ms-Icon--MapPin`;
22
- public static EntryView = `ms-Icon ms-Icon--EntryView`;
23
-
24
- public static Separator = `ms-Icon ms-Icon--Separator text-white`;
25
-
26
- public static ItemsCount = 'ms-Icon ms-Icon--Boards';
27
-
28
- public static Heart = 'ms-Icon ms-Icon--Heart';
29
- public static HeartBroken = 'ms-Icon ms-Icon--HeartBroken';
30
- public static DateTime = 'ms-Icon ms-Icon--ReminderTime';
31
-
32
- public static Expand = 'ms-Icon ms-Icon--ChevronDown';
33
- public static Collapse = 'ms-Icon ms-Icon--ChevronUp';
34
-
35
- public static SortAsc = 'ms-Icon ms-Icon--Ascending';
36
- public static SortDesc = 'ms-Icon ms-Icon--Descending';
37
-
38
- public static Details = ' ms-Icon ms-Icon--AccountActivity'
39
- }
@@ -1,71 +0,0 @@
1
- <footer class="shell-footer-component-container">
2
- <div class="shell-footer-paddings">
3
- <div class="shell-footer-component-container-inner">
4
- <div class="shell-footer-sections-container">
5
- <div class="shell-footer-section">
6
- <img class="shell-footer-logo-h" src="assets/images/branding/indice.png" alt="INDICE logo" />
7
- <nav class="mt-4">
8
- <ul class="space-y-2">
9
- <ng-container *ngFor="let link of links.brand | async">
10
- <li>
11
- <a [href]="link.path" class="shell-footer-link">{{ link.text }}</a>
12
- </li>
13
- </ng-container>
14
- </ul>
15
- </nav>
16
- </div>
17
- <div class="shell-footer-section-links">
18
- <h5 class="shell-footer-section-title">Legal</h5>
19
- <nav class="mt-4">
20
- <ul class="grid lg:grid-cols-2">
21
- <ng-container *ngFor="let link of links.legal | async">
22
- <li class="mb-2">
23
- <a [href]="link.path" class="shell-footer-link">{{ link.text }}</a>
24
- </li>
25
- </ng-container>
26
- </ul>
27
- </nav>
28
- </div>
29
- <div class="shell-footer-section-links">
30
- <h5 class="shell-footer-section-title">Follow us</h5>
31
- <nav class="mt-4">
32
- <ul class="grid lg:grid-cols-2">
33
- <li class="mb-2">
34
- <a href="#" class="shell-footer-social">
35
- <svg class="shell-footer-social-icon" aria-hidden="true" fill="currentColor" viewBox="0 0 24 24">
36
- <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"/>
37
- </svg>
38
- <span> Twitter </span>
39
- </a>
40
- </li>
41
- <li class="mb-2">
42
- <a href="#" class="shell-footer-social">
43
- <svg class="shell-footer-social-icon" aria-hidden="true" fill="currentColor" viewBox="0 0 24 24">
44
- <path fill-rule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" clip-rule="evenodd"/>
45
- </svg>
46
- <span> Instagram </span>
47
- </a>
48
- </li>
49
- <li class="mb-2">
50
- <a href="#" class="shell-footer-social">
51
- <svg class="shell-footer-social-icon" aria-hidden="true" fill="currentColor" viewBox="0 0 24 24" >
52
- <path fill-rule="evenodd" d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z" clip-rule="evenodd"/>
53
- </svg>
54
- <span> Facebook </span>
55
- </a>
56
- </li>
57
- </ul>
58
- </nav>
59
- </div>
60
- </div>
61
- </div>
62
- <div class="shell-footer-copyright">
63
- <!--<nav class="flex flex-wrap justify-center space-x-6">
64
- <a href="#" class="font-normal text-sm hover:text-gray-100 mb-2">Cookie settings</a>
65
- </nav>-->
66
- <p class="text-sm text-center sm:text-right">
67
- © 2021 INDICE. All rights reserved.
68
- </p>
69
- </div>
70
- </div>
71
- </footer>
@@ -1,14 +0,0 @@
1
- import { Component, Inject } from '@angular/core';
2
- import { APP_LINKS } from '../../../tokens';
3
- import { IAppLinks } from '../../../types';
4
-
5
- @Component({
6
- selector: 'lib-shell-footer',
7
- templateUrl: './shell-footer.component.html'
8
-
9
- })
10
-
11
- export class ShellFooterComponent {
12
- constructor(@Inject(APP_LINKS) public links: IAppLinks) {
13
- }
14
- }
@@ -1,199 +0,0 @@
1
- <nav>
2
- <div class="shell-header-paddings">
3
- <div [class]="border ? 'shell-header-border' : ''">
4
- <div class="shell-header-menu-container">
5
- <div class="shell-header-logo-container">
6
- <div>
7
- <a href="#" [routerLink]="['/']"><img class="app-logo" [src]="config.appLogo" [alt]="config.appLogoAlt" /></a>
8
- </div>
9
- </div>
10
-
11
- <div class="shell-header-link-container">
12
- <div class="shell-header-link-container-inner">
13
- <lib-nav-links-list
14
- [links]="sectionLinks"
15
- [active-fragment]="activeFragment"
16
- [link-class]="'nav-link'"
17
- [link-active-class]="'nav-link-active'">
18
- </lib-nav-links-list>
19
- </div>
20
- </div>
21
-
22
- <div *ngIf="langs && langs.length > 1 && currentLang" class="shell-header-links-far-container">
23
- <button class="text-blue-300 hover:text-blue-500">
24
- <span>{{currentLang}}</span>
25
- <i class="text-xs ml-1 ms-Icon ms-Icon--ChevronDown"></i>
26
- </button>
27
- </div>
28
-
29
- <div class="shell-header-md-visible">
30
- <div class="shell-header-links-far-container" (clickOutside)="onClickOutside($event)">
31
-
32
- <lib-nav-links-list
33
- [links]="links.profileActions"
34
- [active-fragment]="activeFragment"
35
- [link-class]="'shell-header-menu-rounded-button'"
36
- [link-active-class]="'shell-header-menu-rounded-button-active'">
37
- </lib-nav-links-list>
38
-
39
- <!-- <ng-container *ngFor="let link of links.profileActions | async">
40
- <a class="shell-header-menu-rounded-button"
41
- (clickOutside)="onClickOutside($event)"
42
- [attr.href]="link.path"
43
- [attr.target]="link.external ? '_blank' : '_self'">
44
- <span class="sr-only">{{ link.text }}</span>
45
- <i *ngIf="link.icon" [class]="link.icon"></i>
46
- </a>
47
- </ng-container> -->
48
-
49
- <!-- Username -->
50
- <div *ngIf="profileMenuVisible" class="ml-2 relative">
51
- <div [ngClass]="{'shell-header-profile': showUserNameOnHeader}">
52
- <div *ngIf="user && showUserNameOnHeader" class="shell-header-profile-userName">
53
- {{ user.profile.name }}
54
- </div>
55
- </div>
56
- </div>
57
-
58
- <!-- Notifications dropdown -->
59
- <div *ngIf="showAlerts && user" class="ml-2">
60
- <lib-notifications-indicator></lib-notifications-indicator>
61
- </div>
62
-
63
- <!-- Profile dropdown -->
64
- <div *ngIf="profileMenuVisible" class="ml-2 relative" (clickOutside)="onClickOutside($event)">
65
- <div [ngClass]="{'shell-header-profile': showUserNameOnHeader}">
66
- <button type="button" *ngIf="user" (click)="userMenuExpanded = !userMenuExpanded"
67
- class="shell-header-profile-dropdown-button"
68
- id="user-menu"
69
- aria-expanded="false"
70
- aria-haspopup="true">
71
- <span class="sr-only">Open user menu</span>
72
- <span class="avatar-container">
73
- <span class="avatar-text">{{this.avatarName}}</span>
74
- </span>
75
- </button>
76
-
77
- <button type="button"
78
- *ngIf="!user"
79
- (click)="signin(null)"
80
- class="shell-header-profile-dropdown-button"
81
- id="user-menu"
82
- aria-expanded="false"
83
- aria-haspopup="true">
84
- <span class="sr-only">sign in</span>
85
- <span class="avatar-container">
86
- <span class="avatar-text"><i class="ms-Icon ms-Icon--Signin"></i></span>
87
- </span>
88
- </button>
89
-
90
- <div *ngIf="userMenuExpanded"
91
- [ngClass]="showUserNameOnHeader ? 'shell-header-profile-dropdown-with-username' : 'shell-header-profile-dropdown'"
92
- role="menu"
93
- aria-orientation="vertical"
94
- aria-labelledby="user-menu">
95
- <lib-nav-links-list
96
- [links]="links.profile"
97
- [active-fragment]="activeFragment"
98
- [link-class]="'nav-link-profile'"
99
- [link-active-class]="'nav-link-profile-active'">
100
- </lib-nav-links-list>
101
- </div>
102
-
103
- </div>
104
- </div>
105
- </div>
106
- </div>
107
-
108
- <div class="mobile-menu-button-container">
109
- <!-- Mobile menu button -->
110
- <button type="button"
111
- (click)="mobileMenuExpanded = !mobileMenuExpanded"
112
- class="mobile-menu-button"
113
- aria-controls="mobile-menu"
114
- [attr.aria-expanded]="mobileMenuExpanded">
115
- <span class="sr-only">Open main menu</span>
116
- <!--Heroicon name: outline/menu Menu open: "hidden", Menu closed: "block"-->
117
- <svg xmlns="http://www.w3.org/2000/svg"
118
- fill="none"
119
- viewBox="0 0 24 24"
120
- stroke="currentColor"
121
- aria-hidden="true"
122
- [class]="mobileMenuExpanded ? 'hidden':'block h-6 w-6'">
123
- <path stroke-linecap="round"
124
- stroke-linejoin="round"
125
- stroke-width="2"
126
- d="M4 6h16M4 12h16M4 18h16" />
127
- </svg>
128
- <!--Heroicon name: outline/x Menu open: "block", Menu closed: "hidden"-->
129
- <svg xmlns="http://www.w3.org/2000/svg"
130
- fill="none"
131
- viewBox="0 0 24 24"
132
- stroke="currentColor"
133
- aria-hidden="true"
134
- [class]="mobileMenuExpanded ? 'block h-6 w-6':'hidden'">
135
- <path stroke-linecap="round"
136
- stroke-linejoin="round"
137
- stroke-width="2"
138
- d="M6 18L18 6M6 6l12 12" />
139
- </svg>
140
- </button>
141
- </div>
142
-
143
- </div>
144
- </div>
145
- </div>
146
- <!-- Mobile menu, show/hide based on menu state. -->
147
- <div class="mobile-menu-container" *ngIf="mobileMenuExpanded" id="mobile-menu">
148
- <lib-nav-links-list
149
- [links]="sectionLinks"
150
- [active-fragment]="activeFragment"
151
- [link-class]="'nav-link-mobile'"
152
- [link-active-class]="'nav-link-mobile-active'"
153
- [container-class]="'mobile-menu-link-container'">
154
- </lib-nav-links-list>
155
-
156
- <div *ngIf="!user">
157
- <a href="#" (click)="signin($event)" class="nav-link-mobile">
158
- <i class="ms-Icon ms-Icon--Signin mr-2"></i>Σύνδεση
159
- </a>
160
- </div>
161
-
162
- <div class="mobile-menu-user-info-container" *ngIf="user">
163
- <div class="mobile-menu-user-info-container-inner">
164
- <div class="flex-shrink-0">
165
- <span class="mobile-menu-avatar-container">
166
- <span class="mobile-menu-avatar-name">{{ this.avatarName }}</span>
167
- </span>
168
- </div>
169
- <div class="ml-3">
170
- <div class="mobile-menu-user-name">{{ user.profile.name }}</div>
171
- <div class="mobile-menu-user-email">{{ user.profile.email }}</div>
172
- </div>
173
- <button class="mobile-menu-rounded-button">
174
- <span class="sr-only">View notifications</span>
175
- <!-- Heroicon name: outline/bell -->
176
- <svg class="mobile-menu-rounded-button-icon-style"
177
- xmlns="http://www.w3.org/2000/svg"
178
- fill="none"
179
- viewBox="0 0 24 24"
180
- stroke="currentColor"
181
- aria-hidden="true">
182
- <path stroke-linecap="round"
183
- stroke-linejoin="round"
184
- stroke-width="2"
185
- d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
186
- </svg>
187
- </button>
188
- </div>
189
- </div>
190
-
191
- <lib-nav-links-list
192
- [links]="links.profile"
193
- [active-fragment]="activeFragment"
194
- [link-class]="'nav-link-mobile'"
195
- [link-active-class]="'nav-link-mobile-active'"
196
- [container-class]="'mobile-menu-link-container'">
197
- </lib-nav-links-list>
198
- </div>
199
- </nav>