barsa-tiles 1.0.456 → 2.0.2

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 (172) hide show
  1. package/{esm2020 → esm2022}/barsa-tiles.mjs +4 -4
  2. package/esm2022/lib/action-item/action-item.component.mjs +17 -0
  3. package/{esm2020 → esm2022}/lib/action-links.pipe.mjs +16 -16
  4. package/esm2022/lib/actions-link/actions-link.component.mjs +41 -0
  5. package/esm2022/lib/app-finder/app-finder.component.mjs +52 -0
  6. package/esm2022/lib/app-finder-app-list/app-finder-app-list.component.mjs +39 -0
  7. package/esm2022/lib/app-finder-group/app-finder-group.component.mjs +41 -0
  8. package/esm2022/lib/app-finder.service.mjs +121 -0
  9. package/esm2022/lib/barsa-shellbar/barsa-shellbar.component.mjs +183 -0
  10. package/esm2022/lib/barsa-tiles.module.mjs +225 -0
  11. package/esm2022/lib/change-app-tile/change-app-tile.component.mjs +46 -0
  12. package/esm2022/lib/create-app-group/create-app-group.component.mjs +43 -0
  13. package/esm2022/lib/directives/emptylist.directive.mjs +36 -0
  14. package/esm2022/lib/feed-tile/feed-tile.component.mjs +31 -0
  15. package/{esm2020 → esm2022}/lib/footer-edit-tile/footer-edit-tile.component.mjs +13 -13
  16. package/esm2022/lib/footer-tile/footer-tile.component.mjs +27 -0
  17. package/esm2022/lib/form-app-finder/form-app-finder.component.mjs +95 -0
  18. package/esm2022/lib/form-tile/form-tile.component.mjs +34 -0
  19. package/esm2022/lib/logo-tile/logo-tile.component.mjs +23 -0
  20. package/{esm2020 → esm2022}/lib/micro-tile-chart-area/micro-tile-chart-area.component.mjs +40 -40
  21. package/{esm2020 → esm2022}/lib/micro-tile-chart-bar/micro-tile-chart-bar.component.mjs +29 -29
  22. package/esm2022/lib/micro-tile-chart-bullet/micro-tile-chart-bullet.component.mjs +26 -0
  23. package/{esm2020 → esm2022}/lib/micro-tile-chart-circular/micro-tile-chart-circular.component.mjs +20 -20
  24. package/{esm2020 → esm2022}/lib/micro-tile-chart-comparison/micro-tile-chart-comparison.component.mjs +31 -31
  25. package/{esm2020 → esm2022}/lib/micro-tile-chart-line/micro-tile-chart-line.component.mjs +32 -32
  26. package/{esm2020 → esm2022}/lib/micro-tile-chart-stackbar/micro-tile-chart-stackbar.component.mjs +27 -27
  27. package/{esm2020 → esm2022}/lib/models/app-tile-footer-section.mjs +1 -1
  28. package/{esm2020 → esm2022}/lib/models/app-tile-footer.mjs +1 -1
  29. package/{esm2020 → esm2022}/lib/models/app-tile-group-pin.mjs +1 -1
  30. package/esm2022/lib/models/base-bt-tile-component.mjs +26 -0
  31. package/{esm2020 → esm2022}/lib/models/base-tile-component.mjs +58 -58
  32. package/{esm2020 → esm2022}/lib/models/base-tile-setting.mjs +1 -1
  33. package/{esm2020 → esm2022}/lib/models/feed-tile-setting.mjs +1 -1
  34. package/{esm2020 → esm2022}/lib/models/index.mjs +13 -13
  35. package/{esm2020 → esm2022}/lib/models/logo-tile-setting.mjs +1 -1
  36. package/{esm2020 → esm2022}/lib/models/micro-tile-chart-bullet-setting.mjs +1 -1
  37. package/{esm2020 → esm2022}/lib/models/news-tile-setting.mjs +1 -1
  38. package/{esm2020 → esm2022}/lib/models/numeric-tile-setting.mjs +1 -1
  39. package/{esm2020 → esm2022}/lib/models/profile-tile-setting.mjs +1 -1
  40. package/esm2022/lib/models/tile-setting.mjs +2 -0
  41. package/{esm2020 → esm2022}/lib/models/user-portal-settings.mjs +1 -1
  42. package/esm2022/lib/news-tile/news-tile.component.mjs +53 -0
  43. package/esm2022/lib/notification-group/notification-group.component.mjs +116 -0
  44. package/esm2022/lib/notification-group-header/notification-group-header.component.mjs +38 -0
  45. package/esm2022/lib/numeric-tile/numeric-tile.component.mjs +64 -0
  46. package/esm2022/lib/pin-tile/pin-tile.component.mjs +110 -0
  47. package/esm2022/lib/pipes/group-tiles.pipe.mjs +31 -0
  48. package/{esm2020 → esm2022}/lib/pipes/home-group.pipe.mjs +17 -17
  49. package/esm2022/lib/pipes/tile-home-filter.pipe.mjs +28 -0
  50. package/esm2022/lib/pipes/tile-prop.pipe.mjs +32 -0
  51. package/esm2022/lib/popover-app-finder/filter-apps-grouped.pipe.mjs +36 -0
  52. package/esm2022/lib/popover-app-finder/popover-app-finder.component.mjs +112 -0
  53. package/esm2022/lib/profile-tile/profile-tile.component.mjs +25 -0
  54. package/esm2022/lib/shellbar/shellbar.component.mjs +201 -0
  55. package/esm2022/lib/simple-tile/simple-tile.component.mjs +22 -0
  56. package/esm2022/lib/tile/tile.component.mjs +70 -0
  57. package/esm2022/lib/tile-renderer.directive.mjs +70 -0
  58. package/esm2022/lib/tile-style.directive.mjs +29 -0
  59. package/esm2022/lib/tiles-viewer/tiles-viewer.component.mjs +167 -0
  60. package/esm2022/lib/tiles-viewer-container/tiles-viewer-container.component.mjs +164 -0
  61. package/esm2022/lib/tiles-viewer-group/tiles-viewer-group.component.mjs +88 -0
  62. package/esm2022/lib/tiles-viewer.service.mjs +130 -0
  63. package/esm2022/lib/tiles.service.mjs +589 -0
  64. package/{esm2020 → esm2022}/public-api.mjs +46 -45
  65. package/fesm2022/barsa-tiles.mjs +3179 -0
  66. package/fesm2022/barsa-tiles.mjs.map +1 -0
  67. package/index.d.ts +5 -5
  68. package/lib/action-item/action-item.component.d.ts +6 -6
  69. package/lib/action-links.pipe.d.ts +7 -7
  70. package/lib/actions-link/actions-link.component.d.ts +17 -17
  71. package/lib/app-finder/app-finder.component.d.ts +24 -24
  72. package/lib/app-finder-app-list/app-finder-app-list.component.d.ts +20 -20
  73. package/lib/app-finder-group/app-finder-group.component.d.ts +14 -14
  74. package/lib/app-finder.service.d.ts +33 -33
  75. package/lib/barsa-shellbar/barsa-shellbar.component.d.ts +104 -97
  76. package/lib/barsa-tiles.module.d.ts +91 -86
  77. package/lib/change-app-tile/change-app-tile.component.d.ts +20 -20
  78. package/lib/create-app-group/create-app-group.component.d.ts +19 -19
  79. package/lib/directives/emptylist.directive.d.ts +14 -14
  80. package/lib/feed-tile/feed-tile.component.d.ts +11 -11
  81. package/lib/footer-edit-tile/footer-edit-tile.component.d.ts +6 -6
  82. package/lib/footer-tile/footer-tile.component.d.ts +11 -11
  83. package/lib/form-app-finder/form-app-finder.component.d.ts +38 -38
  84. package/lib/form-tile/form-tile.component.d.ts +24 -24
  85. package/lib/logo-tile/logo-tile.component.d.ts +7 -7
  86. package/lib/micro-tile-chart-area/micro-tile-chart-area.component.d.ts +8 -8
  87. package/lib/micro-tile-chart-bar/micro-tile-chart-bar.component.d.ts +12 -12
  88. package/lib/micro-tile-chart-bullet/micro-tile-chart-bullet.component.d.ts +16 -16
  89. package/lib/micro-tile-chart-circular/micro-tile-chart-circular.component.d.ts +7 -7
  90. package/lib/micro-tile-chart-comparison/micro-tile-chart-comparison.component.d.ts +8 -8
  91. package/lib/micro-tile-chart-line/micro-tile-chart-line.component.d.ts +8 -8
  92. package/lib/micro-tile-chart-stackbar/micro-tile-chart-stackbar.component.d.ts +8 -8
  93. package/lib/models/app-tile-footer-section.d.ts +6 -6
  94. package/lib/models/app-tile-footer.d.ts +8 -8
  95. package/lib/models/app-tile-group-pin.d.ts +5 -5
  96. package/lib/models/base-bt-tile-component.d.ts +9 -9
  97. package/lib/models/base-tile-component.d.ts +26 -26
  98. package/lib/models/base-tile-setting.d.ts +5 -5
  99. package/lib/models/feed-tile-setting.d.ts +7 -7
  100. package/lib/models/index.d.ts +13 -13
  101. package/lib/models/logo-tile-setting.d.ts +6 -6
  102. package/lib/models/micro-tile-chart-bullet-setting.d.ts +10 -10
  103. package/lib/models/news-tile-setting.d.ts +4 -4
  104. package/lib/models/numeric-tile-setting.d.ts +9 -9
  105. package/lib/models/profile-tile-setting.d.ts +7 -7
  106. package/lib/models/tile-setting.d.ts +10 -10
  107. package/lib/models/user-portal-settings.d.ts +9 -9
  108. package/lib/news-tile/news-tile.component.d.ts +19 -19
  109. package/lib/notification-group/notification-group.component.d.ts +54 -55
  110. package/lib/notification-group-header/notification-group-header.component.d.ts +15 -15
  111. package/lib/numeric-tile/numeric-tile.component.d.ts +16 -12
  112. package/lib/pin-tile/pin-tile.component.d.ts +30 -30
  113. package/lib/pipes/group-tiles.pipe.d.ts +14 -14
  114. package/lib/pipes/home-group.pipe.d.ts +9 -9
  115. package/lib/pipes/tile-home-filter.pipe.d.ts +8 -8
  116. package/lib/pipes/tile-prop.pipe.d.ts +8 -8
  117. package/lib/popover-app-finder/filter-apps-grouped.pipe.d.ts +13 -0
  118. package/lib/popover-app-finder/popover-app-finder.component.d.ts +39 -0
  119. package/lib/profile-tile/profile-tile.component.d.ts +7 -7
  120. package/lib/shellbar/shellbar.component.d.ts +94 -94
  121. package/lib/simple-tile/simple-tile.component.d.ts +10 -10
  122. package/lib/tile/tile.component.d.ts +22 -20
  123. package/lib/tile-renderer.directive.d.ts +28 -28
  124. package/lib/tile-style.directive.d.ts +12 -0
  125. package/lib/tiles-viewer/tiles-viewer.component.d.ts +65 -63
  126. package/lib/tiles-viewer-container/tiles-viewer-container.component.d.ts +59 -57
  127. package/lib/tiles-viewer-group/tiles-viewer-group.component.d.ts +39 -39
  128. package/lib/tiles-viewer.service.d.ts +42 -42
  129. package/lib/tiles.service.d.ts +75 -75
  130. package/package.json +7 -13
  131. package/public-api.d.ts +42 -41
  132. package/esm2020/lib/action-item/action-item.component.mjs +0 -18
  133. package/esm2020/lib/actions-link/actions-link.component.mjs +0 -42
  134. package/esm2020/lib/app-finder/app-finder.component.mjs +0 -53
  135. package/esm2020/lib/app-finder-app-list/app-finder-app-list.component.mjs +0 -40
  136. package/esm2020/lib/app-finder-group/app-finder-group.component.mjs +0 -42
  137. package/esm2020/lib/app-finder.service.mjs +0 -121
  138. package/esm2020/lib/barsa-shellbar/barsa-shellbar.component.mjs +0 -166
  139. package/esm2020/lib/barsa-tiles.module.mjs +0 -206
  140. package/esm2020/lib/change-app-tile/change-app-tile.component.mjs +0 -47
  141. package/esm2020/lib/create-app-group/create-app-group.component.mjs +0 -44
  142. package/esm2020/lib/directives/emptylist.directive.mjs +0 -36
  143. package/esm2020/lib/feed-tile/feed-tile.component.mjs +0 -32
  144. package/esm2020/lib/footer-tile/footer-tile.component.mjs +0 -28
  145. package/esm2020/lib/form-app-finder/form-app-finder.component.mjs +0 -95
  146. package/esm2020/lib/form-tile/form-tile.component.mjs +0 -35
  147. package/esm2020/lib/logo-tile/logo-tile.component.mjs +0 -23
  148. package/esm2020/lib/micro-tile-chart-bullet/micro-tile-chart-bullet.component.mjs +0 -27
  149. package/esm2020/lib/models/base-bt-tile-component.mjs +0 -30
  150. package/esm2020/lib/models/tile-setting.mjs +0 -2
  151. package/esm2020/lib/news-tile/news-tile.component.mjs +0 -54
  152. package/esm2020/lib/notification-group/notification-group.component.mjs +0 -116
  153. package/esm2020/lib/notification-group-header/notification-group-header.component.mjs +0 -39
  154. package/esm2020/lib/numeric-tile/numeric-tile.component.mjs +0 -34
  155. package/esm2020/lib/pin-tile/pin-tile.component.mjs +0 -111
  156. package/esm2020/lib/pipes/group-tiles.pipe.mjs +0 -31
  157. package/esm2020/lib/pipes/tile-home-filter.pipe.mjs +0 -28
  158. package/esm2020/lib/pipes/tile-prop.pipe.mjs +0 -32
  159. package/esm2020/lib/profile-tile/profile-tile.component.mjs +0 -26
  160. package/esm2020/lib/shellbar/shellbar.component.mjs +0 -200
  161. package/esm2020/lib/simple-tile/simple-tile.component.mjs +0 -23
  162. package/esm2020/lib/tile/tile.component.mjs +0 -61
  163. package/esm2020/lib/tile-renderer.directive.mjs +0 -70
  164. package/esm2020/lib/tiles-viewer/tiles-viewer.component.mjs +0 -157
  165. package/esm2020/lib/tiles-viewer-container/tiles-viewer-container.component.mjs +0 -158
  166. package/esm2020/lib/tiles-viewer-group/tiles-viewer-group.component.mjs +0 -88
  167. package/esm2020/lib/tiles-viewer.service.mjs +0 -130
  168. package/esm2020/lib/tiles.service.mjs +0 -589
  169. package/fesm2015/barsa-tiles.mjs +0 -2977
  170. package/fesm2015/barsa-tiles.mjs.map +0 -1
  171. package/fesm2020/barsa-tiles.mjs +0 -2941
  172. package/fesm2020/barsa-tiles.mjs.map +0 -1
@@ -1,2941 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Component, ChangeDetectionStrategy, Input, HostListener, Pipe, HostBinding, EventEmitter, Directive, Output, ElementRef, ViewChild, TemplateRef, Inject, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
3
- import * as i1 from 'barsa-novin-ray-core';
4
- import { BarsaApi, TilePropsComponent, BaseComponent, PreventDefaulEvent, BaseDirective, fromIntersectionObserver, IntersectionStatus, APP_VERSION, BaseModule, BarsaNovinRayCoreModule } from 'barsa-novin-ray-core';
5
- import { Subject, BehaviorSubject, of, from, takeUntil as takeUntil$1, filter as filter$1, interval, combineLatest, forkJoin } from 'rxjs';
6
- import { startWith, shareReplay, takeUntil, distinctUntilChanged, filter, tap, concatMap, debounceTime, exhaustMap, finalize, map, withLatestFrom } from 'rxjs/operators';
7
- import * as i1$1 from '@fundamental-ngx/core';
8
- import { TabListComponent, CarouselComponent, ComboboxComponent, FundamentalNgxCoreModule, GridListModule } from '@fundamental-ngx/core';
9
- import * as i1$2 from '@angular/common';
10
- import { DOCUMENT, CommonModule, LowerCasePipe } from '@angular/common';
11
- import * as i1$3 from '@fundamental-ngx/core/tile';
12
- import * as i2$1 from '@fundamental-ngx/core/button';
13
- import * as i3 from '@fundamental-ngx/core/menu';
14
- import * as i5 from 'barsa-sap-ui';
15
- import { BarsaSapUiModule } from 'barsa-sap-ui';
16
- import * as i2 from '@fundamental-ngx/core/icon';
17
- import * as i2$2 from '@angular/cdk/drag-drop';
18
- import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
19
- import * as i3$1 from '@fundamental-ngx/core/busy-indicator';
20
- import * as i6 from '@fundamental-ngx/core/layout-panel';
21
- import * as i9 from '@fundamental-ngx/core/title';
22
- import * as i8 from '@fundamental-ngx/core/panel';
23
- import * as i10 from '@fundamental-ngx/core/toolbar';
24
- import * as i2$3 from '@fundamental-ngx/core/avatar';
25
- import * as i4 from '@fundamental-ngx/core/card';
26
- import * as i5$1 from '@fundamental-ngx/core/fixed-card-layout';
27
- import * as i4$1 from '@fundamental-ngx/core/list';
28
- import * as i1$4 from '@angular/forms';
29
- import { UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
30
- import * as i7 from '@fundamental-ngx/core/input-group';
31
- import * as i5$2 from '@fundamental-ngx/core/bar';
32
- import * as i6$1 from '@fundamental-ngx/core/form';
33
- import * as i8$1 from '@fundamental-ngx/core/dialog';
34
- import * as i10$1 from '@fundamental-ngx/core/utils';
35
- import * as i6$2 from '@fundamental-ngx/core/dynamic-page';
36
- import * as i8$2 from '@fundamental-ngx/core/switch';
37
- import * as i9$1 from '@fundamental-ngx/core/tabs';
38
- import * as i2$4 from 'barsa-echarts';
39
- import { BarsaEchartsModule } from 'barsa-echarts';
40
- import * as i3$2 from '@fundamental-ngx/core/carousel';
41
- import * as i6$3 from '@fundamental-ngx/core/checkbox';
42
- import * as i3$3 from '@angular/platform-browser';
43
- import * as i8$3 from '@fundamental-ngx/core/product-switch';
44
- import * as i9$2 from '@fundamental-ngx/core/popover';
45
- import * as i10$2 from '@fundamental-ngx/core/shellbar';
46
- import * as i4$2 from '@fundamental-ngx/core/notification';
47
- import { CdkTableModule } from '@angular/cdk/table';
48
-
49
- class TilesService {
50
- constructor(_portalService, _rtlService, _bbbTranslatePipe) {
51
- this._portalService = _portalService;
52
- this._rtlService = _rtlService;
53
- this._bbbTranslatePipe = _bbbTranslatePipe;
54
- this.shellbarSource = new Subject();
55
- this._OnDestroy$ = new Subject();
56
- this._homeAppTileGroupsSource = new BehaviorSubject([]);
57
- this.pinTilesSource = new Subject();
58
- this._appTileGroupsSource = new BehaviorSubject(null);
59
- this._edithomeSource = new BehaviorSubject(false);
60
- this._componentSettings$ = new Subject();
61
- BarsaApi.Bw.TilesService = this;
62
- this.homeAppTileGroups$ = this._homeAppTileGroupsSource.asObservable();
63
- this.pinTiles$ = this.pinTilesSource.asObservable().pipe(startWith(null));
64
- this.shellbarSource = new Subject();
65
- this.shellbar$ = this.shellbarSource.asObservable().pipe(shareReplay(1));
66
- this.appTileGroups$ = this._appTileGroupsSource.pipe(shareReplay(1));
67
- this.edit$ = this._edithomeSource.asObservable().pipe(takeUntil(this._OnDestroy$), distinctUntilChanged());
68
- this.deviceSize$ = this._portalService.deviceSize$;
69
- this._rtlService.rtl.next(BarsaApi.LoginFormData.IsRtl);
70
- this.loadAllAppTileGroups();
71
- this.appTileGroups$
72
- .pipe(filter((moForReportModel) => moForReportModel !== null), tap((moForReportModel) => {
73
- if (moForReportModel) {
74
- this._allAppsLoaded(moForReportModel);
75
- }
76
- }))
77
- .subscribe();
78
- BarsaApi.Ul.ApplicationCtrlr.on('GlobalRefreshTile', this._onApplication_GlobalRefreshTile.bind(this));
79
- }
80
- get componentSettings$() {
81
- return this._componentSettings$.asObservable();
82
- }
83
- get appTileGroups() {
84
- return this._appTileGroupsSource.getValue();
85
- }
86
- ngOnDestroy() {
87
- this._OnDestroy$.next();
88
- }
89
- _onApplication_GlobalRefreshTile(sender, appTilesTitle) {
90
- const allApps = this._appTileGroupsSource.getValue();
91
- const appTiles = [];
92
- if (allApps) {
93
- appTilesTitle.forEach((c) => {
94
- const selectedTile = this.findAppTileWithKey(allApps, 'A_App_AppKey', c);
95
- if (selectedTile) {
96
- appTiles.push(selectedTile);
97
- }
98
- });
99
- this._updateAppTileFromNotification(allApps, appTiles);
100
- this._appTileGroupsSource.next(allApps);
101
- }
102
- }
103
- _updateAppTileFromNotification(allApps, appTiles) {
104
- if (!appTiles?.length) {
105
- return;
106
- }
107
- BarsaApi.Bw.RunBlMethodAsync({
108
- Parameters: [appTiles.map((c) => (c.AppTile?.Id ? c.AppTile?.Id : c.Id))],
109
- Method: 'RefreshAppTiles',
110
- SuccessFn: (result) => {
111
- result.MoDataList.forEach((c) => this.updateAppTile(allApps, c));
112
- this._appTileGroupsSource.next({ ...allApps });
113
- },
114
- FailFn: () => { }
115
- });
116
- }
117
- loadAppTileGroups(appTileGroup) {
118
- if (!appTileGroup || appTileGroup.$TilesLoaded) {
119
- return;
120
- }
121
- const allApps = this._appTileGroupsSource.getValue();
122
- if (allApps) {
123
- const selectedAppTilegroup = allApps?.MoDataList.find((c) => c.Id === appTileGroup.Id);
124
- if (selectedAppTilegroup) {
125
- this._loadAppTilesOfAppTileGroup(selectedAppTilegroup, allApps);
126
- selectedAppTilegroup.$Children?.forEach((subGroup) => {
127
- this._loadAppTilesOfAppTileGroup(subGroup, allApps);
128
- });
129
- }
130
- }
131
- }
132
- saveTilesStackContent(tilesStackContent) {
133
- const userPortalSettings = this._portalService.userPortalSettings['UserPortalSettings'];
134
- if (userPortalSettings == null) {
135
- return Promise.resolve();
136
- }
137
- userPortalSettings.TilesStackContent = tilesStackContent;
138
- userPortalSettings.$State = 'Modified';
139
- return this._saveUserPortalSettings(userPortalSettings).then(() => this._portalService.setUserPortalSettings(userPortalSettings));
140
- }
141
- loadUserPortalSettings() {
142
- return this._portalService.getData('UserPortalSetting').pipe(concatMap((data) => {
143
- if (data) {
144
- return of(data);
145
- }
146
- else {
147
- return this.loadFromServerUserPortalSetting();
148
- }
149
- }));
150
- }
151
- refreshTile(appTile) {
152
- return new Promise((resolve, reject) => {
153
- BarsaApi.Bw.RunBlMethodAsync({
154
- Parameters: [appTile.Id],
155
- Method: 'RefreshTile',
156
- SuccessFn: (newAppTile) => {
157
- if (newAppTile.MoDataList?.length) {
158
- resolve(newAppTile.MoDataList[0]);
159
- }
160
- reject(`refresh tile not found apptile width title: ${appTile.Title}`);
161
- },
162
- FailFn: () => {
163
- reject(null);
164
- }
165
- });
166
- });
167
- }
168
- loadFromServerUserPortalSetting() {
169
- return from(new Promise((resolve, reject) => {
170
- BarsaApi.Bw.RunBlMethodAsync({
171
- Parameters: [],
172
- Method: 'GetUserPortalSettings',
173
- SuccessFn: (userPortalSetting) => {
174
- this._portalService.setData('UserPortalSetting', userPortalSetting);
175
- resolve(userPortalSetting);
176
- },
177
- FailFn: () => {
178
- reject(null);
179
- }
180
- });
181
- }));
182
- }
183
- toggleAppGroupSettingVisible(appGroup) {
184
- return from(new Promise((resolve, reject) => {
185
- BarsaApi.Bw.RunBlMethodAsync({
186
- Parameters: [appGroup.Id],
187
- Method: 'ToggleAppTileGroupSettingVisible',
188
- SuccessFn: (appGroupSetting) => {
189
- this._updateAppTileGroupSettings(appGroup, appGroupSetting);
190
- resolve(appGroupSetting);
191
- },
192
- FailFn: () => {
193
- reject(null);
194
- }
195
- });
196
- })).pipe(tap((appGroupSetting) => {
197
- this._updateAppGroupSetting(appGroup, appGroupSetting);
198
- }));
199
- }
200
- resetAppGroupSetting(appGroup) {
201
- return from(new Promise((resolve, reject) => {
202
- BarsaApi.Bw.RunBlMethodAsync({
203
- Parameters: [appGroup.Id],
204
- Method: 'ResetAppTileGroupSettingVisible',
205
- SuccessFn: (appGroupSetting) => {
206
- this._updateAppTileGroupSettings(appGroup, appGroupSetting);
207
- resolve(appGroupSetting);
208
- },
209
- FailFn: () => {
210
- reject(null);
211
- }
212
- });
213
- })).pipe(tap((appGroupSetting) => {
214
- this._updateAppGroupSetting(appGroup, appGroupSetting);
215
- }));
216
- }
217
- deleteAppGroup(appGroup) {
218
- return from(new Promise((resolve, reject) => {
219
- BarsaApi.Bw.RunBlMethodAsync({
220
- Parameters: [appGroup.Id],
221
- Method: 'DeleteAppGroup',
222
- SuccessFn: () => {
223
- resolve(appGroup.Id);
224
- },
225
- FailFn: () => {
226
- reject(null);
227
- }
228
- });
229
- })).pipe(tap((appGroupId) => {
230
- const allApps = this.appTileGroups;
231
- if (allApps) {
232
- allApps.MoDataList = allApps.MoDataList.filter((c) => c.Id !== appGroupId);
233
- this._appTileGroupsSource.next(allApps);
234
- }
235
- }));
236
- }
237
- changeAppTileSetting(appTile) {
238
- const allApps = this.appTileGroups;
239
- const selectedGroup = this.findGroupWithAppTileId(allApps, appTile.Id);
240
- if (selectedGroup === null) {
241
- return of(null);
242
- }
243
- return from(new Promise((resolve, reject) => {
244
- BarsaApi.Bw.RunBlMethodAsync({
245
- Parameters: [selectedGroup.Id, appTile.Id, appTile.Title, appTile.Subtitle],
246
- Method: 'ChangeAppTileSetting',
247
- SuccessFn: () => {
248
- this._nextAllAppTileGroups(allApps);
249
- resolve(selectedGroup);
250
- },
251
- FailFn: () => {
252
- reject(null);
253
- }
254
- });
255
- })).pipe(tap((appGroupSetting) => this.updataAppTileSetting(selectedGroup, appGroupSetting)));
256
- }
257
- saveAppGroupOrders(appGroups) {
258
- const groupOrders = appGroups.map((c) => c.Id);
259
- return from(new Promise((resolve, reject) => {
260
- BarsaApi.Bw.RunBlMethodAsync({
261
- Parameters: [groupOrders],
262
- Method: 'ChangeOrderAppTileGroups',
263
- SuccessFn: () => {
264
- resolve();
265
- },
266
- FailFn: () => {
267
- reject(null);
268
- }
269
- });
270
- })).pipe();
271
- }
272
- createAppGroup(title) {
273
- return from(new Promise((resolve, reject) => {
274
- BarsaApi.Bw.RunBlMethodAsync({
275
- Parameters: [title],
276
- Method: 'CreateAppTileGroup',
277
- SuccessFn: (mo) => {
278
- resolve(mo);
279
- },
280
- FailFn: () => {
281
- reject(null);
282
- }
283
- });
284
- })).pipe(tap((mo) => this.addAppGroup(mo)));
285
- }
286
- saveOrderAppTiles(appGroup, appTiles, isActionLink = false, appTileIdTransferedId = '0') {
287
- BarsaApi.Bw.RunBlMethodAsync({
288
- Parameters: [appGroup.Id, appTiles, isActionLink, appTileIdTransferedId],
289
- Method: 'ChangeOrderAppTiles',
290
- SuccessFn: () => { },
291
- FailFn: () => { }
292
- });
293
- }
294
- updateAppTile(allApps, appTile) {
295
- const selectedAppTile = this.findAppTileWithKey(allApps, 'A_App_Component.Settings.Id', appTile.A_App_Component.Settings.Id);
296
- if (selectedAppTile) {
297
- BarsaApi.Common.Merger.FastMerge(selectedAppTile.A_App_Component.Settings, appTile.A_App_Component.Settings);
298
- this._componentSettings$.next(selectedAppTile.A_App_Component.Settings);
299
- }
300
- }
301
- updataAppTileSetting(selectedGroup, appGroupSetting) {
302
- const allApps = this.appTileGroups;
303
- allApps?.MoDataList.forEach((appGroup) => {
304
- if (appGroup.Id === selectedGroup.Id) {
305
- appGroup.UserAppTileGroupSetting = appGroupSetting;
306
- }
307
- });
308
- this._appTileGroupsSource.next(allApps);
309
- }
310
- addAppGroup(mo) {
311
- const allApps = this.appTileGroups;
312
- if (allApps) {
313
- allApps.MoDataList.push(mo);
314
- this._appTileGroupsSource.next(allApps);
315
- }
316
- }
317
- singlePinTileChanged(appTileId) {
318
- const allApps = this.appTileGroups;
319
- const group = this.findGroupWithAppTileId(allApps, appTileId);
320
- if (group === null) {
321
- return of(false);
322
- }
323
- return from(new Promise((resolve, reject) => {
324
- BarsaApi.Bw.RunBlMethodAsync({
325
- Parameters: [group.Id, appTileId],
326
- Method: 'RemoveAppTileFromTileGroup',
327
- SuccessFn: (setting) => {
328
- this._updateAppTileGroupSettings(group, setting);
329
- this._nextAllAppTileGroups(allApps);
330
- resolve(true);
331
- },
332
- FailFn: () => {
333
- reject(false);
334
- }
335
- });
336
- }));
337
- }
338
- pinTileChanged(appTileGroupsPin, app, callback) {
339
- const allApps = this.appTileGroups;
340
- const visible = appTileGroupsPin.map((c) => c.visible);
341
- const groupChanges = appTileGroupsPin.map((c) => new BarsaApi.Common.MetaObjectWeb({
342
- Id: c.appTileGroup.Id,
343
- TypeDefId: allApps?.TypeDefId
344
- }));
345
- BarsaApi.Bw.RunBlMethodAsync({
346
- Parameters: [groupChanges, visible, app.Id],
347
- Method: 'TilePinChanged',
348
- SuccessFn: (settings) => {
349
- this._tilePinChange(appTileGroupsPin, allApps);
350
- callback(settings);
351
- },
352
- FailFn: () => {
353
- // TODO show error
354
- }
355
- });
356
- }
357
- _tilePinChange(appTileGroupsPin, allApps) {
358
- for (const appTileGroupPin of appTileGroupsPin) {
359
- let selectedAppGroup;
360
- const appGroupId = appTileGroupPin.appTileGroup.Id;
361
- allApps?.MoDataList.forEach((c) => {
362
- if (c.Id === appGroupId) {
363
- selectedAppGroup = c;
364
- }
365
- else if (!selectedAppGroup) {
366
- selectedAppGroup = c.$Children?.find((child) => child.Id === appGroupId);
367
- }
368
- });
369
- if (selectedAppGroup && selectedAppGroup.$TilesLoaded) {
370
- // let moDataList = selectedAppGroup.AppTiles.MoDataList;
371
- // if (appTileGroups[i].visible)
372
- // selectedAppGroup.AppTiles.MoDataList = [...moDataList, settings[i]];
373
- // else
374
- // selectedAppGroup.AppTiles.MoDataList = moDataList.filter(
375
- // (c) => c.App.Id !== app.Id
376
- // );
377
- this._loadAppTilesOfAppTileGroup(selectedAppGroup, allApps);
378
- }
379
- }
380
- this._nextAllAppTileGroups(allApps);
381
- }
382
- loadShellbar() {
383
- BarsaApi.Bw.RunBlMethodAsync({
384
- Parameters: [BarsaApi.LoginFormData.PortalId],
385
- Method: 'LoadShellbarByPortalId',
386
- SuccessFn: (shellbar) => {
387
- this.shellbarSource.next(shellbar);
388
- },
389
- FailFn: () => {
390
- // TODO show error
391
- }
392
- });
393
- // this._portalService
394
- // .ReportExecutePromise('Shellbar')
395
- // .then((moForReportModel) => this.shellbarSource.next(moForReportModel.MoDataList[0]));
396
- }
397
- loadAllAppTileGroups() {
398
- this._portalService
399
- .ReportExecute('AllAppTileGroups')
400
- .subscribe((allApps) => this._nextAllAppTileGroups(allApps));
401
- }
402
- _setTileInfo(appTile) {
403
- {
404
- const title = BarsaApi.Common.Util.TryGetValue(appTile, 'Component.Settings.TileSetting.Title', null);
405
- appTile.TileTitle = !appTile.Title ? title : appTile.Title;
406
- const subtitle = BarsaApi.Common.Util.TryGetValue(appTile, 'Component.Settings.TileSetting.Subtitle', null);
407
- appTile.Subtitle = !appTile.Subtitle ? subtitle : appTile.Subtitle;
408
- }
409
- }
410
- getTileGroups() {
411
- return this._appTileGroupsSource.getValue();
412
- }
413
- setEditHome(edit) {
414
- this._edithomeSource.next(edit);
415
- }
416
- _allAppsLoaded(moForReportModel) {
417
- moForReportModel.MoDataList.forEach((c) => {
418
- this._prepareNavigator(c);
419
- });
420
- this._setHomeAppTileGroups(moForReportModel.MoDataList);
421
- }
422
- _loadAppTilesOfAppTileGroup(selectedAppTilegroup, allApps) {
423
- const callback = () => {
424
- this._nextAllAppTileGroups(allApps);
425
- };
426
- if (!selectedAppTilegroup.UserAppTileGroupSetting) {
427
- this._loadAppTilesByAppTileGroup(selectedAppTilegroup, callback);
428
- }
429
- else {
430
- this._loadAppTilesByAppTileGroupSetting(selectedAppTilegroup, callback);
431
- }
432
- }
433
- _loadAppTilesByAppTileGroup(appGroup, callback) {
434
- BarsaApi.Bw.RunBlMethodAsync({
435
- Parameters: [appGroup.Id],
436
- Method: 'LoadAllAppTilesByAppTileGroup',
437
- SuccessFn: (appTiles) => {
438
- this._updateAppTilesOfAppTileGroup(appGroup, appTiles);
439
- callback();
440
- },
441
- FailFn: () => {
442
- // TODO show error
443
- }
444
- });
445
- }
446
- _updateAppTilesOfAppTileGroup(selectedAppTilegroup, appTiles) {
447
- if (this.appTileGroups) {
448
- selectedAppTilegroup = { ...selectedAppTilegroup, $TilesLoaded: true };
449
- appTiles.MoDataList.forEach((element) => {
450
- element.Component = element.A_App_Component ?? element.A_AppTile_App_Component;
451
- element.DynamicCommand = element.A_App_DynamicCommand ?? element.A_AppTile_App_DynamicCommand;
452
- element.Predefined = element.Predefined ?? element.A_AppTile_Predefined;
453
- });
454
- const apptileGroupIndex = this.appTileGroups?.MoDataList.findIndex((c) => c.Id === selectedAppTilegroup.Id || c.Id === selectedAppTilegroup.$ParentId);
455
- selectedAppTilegroup.AppTiles = appTiles;
456
- const tileGroup = this.appTileGroups.MoDataList[apptileGroupIndex];
457
- if (selectedAppTilegroup.$ParentId) {
458
- if (tileGroup.$Children) {
459
- const idOfSubGroup = tileGroup.$Children.findIndex((c) => c.Id === selectedAppTilegroup.Id);
460
- tileGroup.$Children[idOfSubGroup] = selectedAppTilegroup;
461
- }
462
- this.appTileGroups.MoDataList[apptileGroupIndex] = { ...tileGroup };
463
- }
464
- else {
465
- this.appTileGroups.MoDataList[apptileGroupIndex] = selectedAppTilegroup;
466
- }
467
- }
468
- }
469
- _loadAppTilesByAppTileGroupSetting(appTileGroup, callback) {
470
- BarsaApi.Bw.RunBlMethodAsync({
471
- Parameters: [appTileGroup.Id],
472
- Method: 'LoadAllAppTilesByUserAppTileGroupSettings',
473
- SuccessFn: (appTiles) => {
474
- this._updateAppTilesOfAppTileGroup(appTileGroup, appTiles);
475
- callback();
476
- },
477
- FailFn: () => {
478
- // TODO show error
479
- }
480
- });
481
- }
482
- _nextAllAppTileGroups(newAllApps = null) {
483
- const allApps = newAllApps ?? this._appTileGroupsSource.getValue();
484
- this._appTileGroupsSource.next(allApps ? { ...allApps } : null);
485
- }
486
- _setHomeAppTileGroups(appGroups) {
487
- let newAppGroups = [...appGroups];
488
- newAppGroups = newAppGroups
489
- .filter((c) => c.Visible)
490
- .sort((a, b) => Number(a.navigatorOrderItem) - Number(b.navigatorOrderItem));
491
- this._homeAppTileGroupsSource.next(newAppGroups);
492
- }
493
- _saveUserPortalSettings(userPortalSettings) {
494
- return new Promise((resolve, reject) => {
495
- BarsaApi.Bw.RunBlMethodAsync({
496
- Parameters: [new BarsaApi.Common.MetaObjectWeb(userPortalSettings)],
497
- Method: 'SaveUserPortalSettings',
498
- SuccessFn: () => {
499
- resolve();
500
- },
501
- FailFn: () => {
502
- reject(null);
503
- }
504
- });
505
- });
506
- }
507
- _updateAppGroupSetting(appGroup, appGroupSetting) {
508
- const allApps = this.appTileGroups;
509
- const selectedAppGroup = allApps?.MoDataList.find((c) => c.Id === appGroup.Id);
510
- if (selectedAppGroup && allApps) {
511
- selectedAppGroup.UserAppTileGroupSetting = appGroupSetting;
512
- this._nextAllAppTileGroups(allApps);
513
- }
514
- }
515
- findAppTileWithKey(allApps, key, value) {
516
- let selectedTile;
517
- if (typeof value === 'string') {
518
- value = BarsaApi.Common.Util.ReplaceArabicCharchter(value);
519
- }
520
- if (!allApps) {
521
- return null;
522
- }
523
- allApps.MoDataList.forEach((appGroup) => {
524
- if (selectedTile) {
525
- return;
526
- }
527
- selectedTile = appGroup.navigatorTiles.find((c) => BarsaApi.Common.Util.TryGetValue(c, key, null) === value);
528
- appGroup.$Children?.forEach((subGroup) => {
529
- if (selectedTile) {
530
- return;
531
- }
532
- selectedTile = subGroup.navigatorTiles.find((c) => BarsaApi.Common.Util.TryGetValue(c, key, null) === value);
533
- });
534
- });
535
- return selectedTile;
536
- }
537
- findGroupWithAppTileId(allApps, appTileId) {
538
- let selectedGroup;
539
- if (!allApps) {
540
- return null;
541
- }
542
- allApps.MoDataList.forEach((appGroup) => {
543
- if (selectedGroup) {
544
- return;
545
- }
546
- if (appGroup.navigatorTiles.some((appTile) => appTile.Id === appTileId)) {
547
- selectedGroup = appGroup;
548
- return;
549
- }
550
- appGroup.$Children?.forEach((subGroup) => {
551
- if (subGroup.navigatorTiles.some((appTile) => appTile.Id === appTileId)) {
552
- selectedGroup = subGroup;
553
- return;
554
- }
555
- });
556
- });
557
- return selectedGroup;
558
- }
559
- _findGroupWithAppGroupId(allApps, appGroupId) {
560
- let selectedGroup;
561
- if (!allApps) {
562
- return null;
563
- }
564
- allApps.MoDataList.forEach((appGroup) => {
565
- if (selectedGroup) {
566
- return;
567
- }
568
- if (appGroup.Id === appGroupId) {
569
- selectedGroup = appGroup;
570
- return;
571
- }
572
- appGroup.$Children?.forEach((subGroup) => {
573
- if (subGroup.Id === appGroupId) {
574
- selectedGroup = subGroup;
575
- return;
576
- }
577
- });
578
- });
579
- return selectedGroup;
580
- }
581
- _updateAppTileGroupSettings(appTileGroup, setting) {
582
- appTileGroup.UserAppTileGroupSetting = setting;
583
- appTileGroup = JSON.parse(JSON.stringify(appTileGroup));
584
- this._nextAllAppTileGroups();
585
- return appTileGroup;
586
- }
587
- _prepareNavigator(appTileGroup) {
588
- appTileGroup.$TileSettingChanged = false;
589
- appTileGroup.$Disabledpin = false;
590
- appTileGroup.navigatorTitle = BarsaApi.Common.Util.TryGetValue(appTileGroup, 'UserAppTileGroupSetting.Title', appTileGroup.Title);
591
- appTileGroup.navigatorTitle = appTileGroup.navigatorTitle =
592
- appTileGroup.navigatorTitle === '' ? appTileGroup.Title : appTileGroup.navigatorTitle;
593
- appTileGroup.navigatorTitle = this._bbbTranslatePipe.transform(appTileGroup.navigatorTitle);
594
- const orderItem = BarsaApi.Common.Util.TryGetValue(appTileGroup, 'UserAppTileGroupSetting.OrderItem', null);
595
- if (orderItem !== null) {
596
- appTileGroup.navigatorOrderItem = orderItem;
597
- }
598
- else {
599
- appTileGroup.navigatorOrderItem = appTileGroup.OrderItem;
600
- }
601
- const visible = BarsaApi.Common.Util.TryGetValue(appTileGroup, 'UserAppTileGroupSetting.Visible', null);
602
- if (visible !== null) {
603
- appTileGroup.navigatorVisible = visible;
604
- }
605
- else {
606
- appTileGroup.navigatorVisible = appTileGroup.Visible;
607
- }
608
- const appTiles = appTileGroup.AppTiles?.MoDataList ?? [];
609
- appTileGroup.navigatorTiles = appTiles
610
- .filter((c) => c.Visible && !c.IsActionLink)
611
- .sort((a, b) => Number(a.OrderItem) - Number(b.OrderItem));
612
- appTileGroup.navigatorActionLinks = appTiles
613
- .filter((c) => c.Visible && c.IsActionLink)
614
- .sort((a, b) => Number(a.OrderItemActionLink) - Number(b.OrderItemActionLink));
615
- appTileGroup.navigatorTiles.forEach((appTile) => this._setTileInfo(appTile));
616
- appTileGroup.navigatorActionLinks.forEach((appTile) => this._setTileInfo(appTile));
617
- appTileGroup.$Children?.forEach((subAppTileGroup) => {
618
- this._prepareNavigator(subAppTileGroup);
619
- });
620
- }
621
- }
622
- TilesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesService, deps: [{ token: i1.PortalService }, { token: i1$1.RtlService }, { token: i1.BbbTranslatePipe }], target: i0.ɵɵFactoryTarget.Injectable });
623
- TilesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesService, providedIn: 'root' });
624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesService, decorators: [{
625
- type: Injectable,
626
- args: [{
627
- providedIn: 'root'
628
- }]
629
- }], ctorParameters: function () { return [{ type: i1.PortalService }, { type: i1$1.RtlService }, { type: i1.BbbTranslatePipe }]; } });
630
-
631
- class BaseTileComponent extends TilePropsComponent {
632
- constructor(el, _renderer2, _cdr, _tilesService) {
633
- super(el, _renderer2, _cdr);
634
- this.el = el;
635
- this._renderer2 = _renderer2;
636
- this._cdr = _cdr;
637
- this._tilesService = _tilesService;
638
- }
639
- get settings() {
640
- const data = this.data?.Component?.Settings;
641
- return data ? data : this.parameters;
642
- }
643
- get backColor() {
644
- return this.settings.TileSetting.BackColor;
645
- }
646
- get title() {
647
- return this.data.TileTitle;
648
- }
649
- get subtitle() {
650
- return this.data.Subtitle;
651
- }
652
- get double() {
653
- return this.settings.TileSetting.IsDouble;
654
- }
655
- get badge() {
656
- return this.settings.TileSetting.Badge;
657
- }
658
- get footer() {
659
- return this.settings.TileSetting.Footer;
660
- }
661
- get tileSetting() {
662
- return this.settings.TileSetting;
663
- }
664
- setEditHome(val) {
665
- this.edit = val;
666
- this._cdr.detectChanges();
667
- }
668
- onTileClick() {
669
- if (this.context) {
670
- this.context.FireEvent('click', this.context);
671
- }
672
- }
673
- }
674
- BaseTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BaseTileComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: TilesService }], target: i0.ɵɵFactoryTarget.Component });
675
- BaseTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BaseTileComponent, selector: "bt-base-tile", usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
676
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BaseTileComponent, decorators: [{
677
- type: Component,
678
- args: [{
679
- selector: 'bt-base-tile',
680
- template: '',
681
- changeDetection: ChangeDetectionStrategy.OnPush
682
- }]
683
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: TilesService }]; } });
684
-
685
- class BaseBtTileComponent extends BaseTileComponent {
686
- ngOnInit() {
687
- super.ngOnInit();
688
- this._tilesService.componentSettings$
689
- .pipe(takeUntil$1(this._onDestroy$), filter$1((c) => c.Id === this.settings.Id))
690
- .subscribe((c) => {
691
- this._cdr.detectChanges();
692
- });
693
- this._renderer2.addClass(this.el.nativeElement, 'barsa-tile');
694
- if (this.backColor) {
695
- this._renderer2.setStyle(this.el.nativeElement, 'background-color', `${this.backColor}`);
696
- this._renderer2.addClass(this.el.nativeElement, 'customColor');
697
- }
698
- }
699
- }
700
- BaseBtTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BaseBtTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
701
- BaseBtTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BaseBtTileComponent, selector: "bt-base-bt-tile", usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BaseBtTileComponent, decorators: [{
703
- type: Component,
704
- args: [{
705
- selector: 'bt-base-bt-tile',
706
- template: '',
707
- changeDetection: ChangeDetectionStrategy.OnPush
708
- }]
709
- }] });
710
-
711
- class FooterTileComponent extends BaseComponent {
712
- get twoColumn() {
713
- return this.settings.TwoColumn;
714
- }
715
- get firstSection() {
716
- return this.settings.FirstSection;
717
- }
718
- get secondSection() {
719
- return this.settings.SecondSection;
720
- }
721
- }
722
- FooterTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FooterTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
723
- FooterTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FooterTileComponent, selector: "bt-footer-tile", inputs: { settings: "settings" }, usesInheritance: true, ngImport: i0, template: "<div fd-tile-footer [twoColumn]=\"twoColumn\">\r\n <ng-container *ngIf=\"twoColumn; else oneColumn\">\r\n <div fd-tile-section>\r\n <fd-icon fd-tile-refresh [font]=\"firstSection.Icon | sapFont\" [glyph]=\"firstSection.Icon\"></fd-icon>\r\n <span fd-tile-footer-text>{{ firstSection.Text | bbbTranslate }}</span>\r\n </div>\r\n <div fd-tile-section>\r\n <fd-icon fd-tile-refresh [font]=\"secondSection.Icon | sapFont\" [glyph]=\"secondSection.Icon\"></fd-icon>\r\n <span fd-tile-footer-text>{{ secondSection.Text | bbbTranslate }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-template #oneColumn>\r\n <fd-icon fd-tile-refresh [font]=\"firstSection.Icon | sapFont\" [glyph]=\"firstSection.Icon\"></fd-icon>\r\n <span fd-tile-footer-text>{{ firstSection.Text | bbbTranslate }}</span>\r\n </ng-template>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "directive", type: i1$3.TileFooterDirective, selector: "[fdTileFooter], [fd-tile-footer]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileSectionDirective, selector: "[fdTileSection], [fd-tile-section]" }, { kind: "directive", type: i1$3.TileRefreshDirective, selector: "[fdTileRefresh], [fd-tile-refresh]", inputs: ["glyph", "class", "ariaLabel"] }, { kind: "directive", type: i1$3.TileFooterTextDirective, selector: "[fdTileFooterText], [fd-tile-footer-text]" }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }, { kind: "pipe", type: i5.SapFontPipe, name: "sapFont" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FooterTileComponent, decorators: [{
725
- type: Component,
726
- args: [{ selector: 'bt-footer-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div fd-tile-footer [twoColumn]=\"twoColumn\">\r\n <ng-container *ngIf=\"twoColumn; else oneColumn\">\r\n <div fd-tile-section>\r\n <fd-icon fd-tile-refresh [font]=\"firstSection.Icon | sapFont\" [glyph]=\"firstSection.Icon\"></fd-icon>\r\n <span fd-tile-footer-text>{{ firstSection.Text | bbbTranslate }}</span>\r\n </div>\r\n <div fd-tile-section>\r\n <fd-icon fd-tile-refresh [font]=\"secondSection.Icon | sapFont\" [glyph]=\"secondSection.Icon\"></fd-icon>\r\n <span fd-tile-footer-text>{{ secondSection.Text | bbbTranslate }}</span>\r\n </div>\r\n </ng-container>\r\n <ng-template #oneColumn>\r\n <fd-icon fd-tile-refresh [font]=\"firstSection.Icon | sapFont\" [glyph]=\"firstSection.Icon\"></fd-icon>\r\n <span fd-tile-footer-text>{{ firstSection.Text | bbbTranslate }}</span>\r\n </ng-template>\r\n</div>\r\n" }]
727
- }], propDecorators: { settings: [{
728
- type: Input
729
- }] } });
730
-
731
- class TileComponent extends TilePropsComponent {
732
- constructor() {
733
- super(...arguments);
734
- this.runningCommand = false;
735
- }
736
- onClick(ev) {
737
- if (this.edit || this.disableClick || this.runningCommand || !this.dynamicCommand) {
738
- return false;
739
- }
740
- PreventDefaulEvent(ev);
741
- const command = this.dynamicCommand;
742
- const e = { command, DynamicSetting: null };
743
- this.runningCommand = true;
744
- this._cdr.detectChanges();
745
- BarsaApi.Common.CustomCodeManager.RunDynamicCommand(command.Id, e, () => {
746
- this.runningCommand = false;
747
- this._cdr.detectChanges();
748
- });
749
- return false;
750
- }
751
- }
752
- TileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
753
- TileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TileComponent, selector: "bt-tile", inputs: { type: "type", footerTemplate: "footerTemplate", footer: "footer", disableClick: "disableClick", title: "title", icon: "icon", subtitle: "subtitle", isDouble: "isDouble", edit: "edit", dynamicCommand: "dynamicCommand" }, host: { listeners: { "click": "onClick($event)" } }, usesInheritance: true, ngImport: i0, template: "<fd-tile [type]=\"type\" [double]=\"isDouble\" [action]=\"edit\">\n <ng-container *ngIf=\"edit && !data.Locked\">\n <button fd-button fd-tile-action-close fdType=\"transparent\" (click)=\"hideClick.emit()\"></button>\n <button fd-button fd-tile-action-indicator fdType=\"transparent\" [fdMenuTrigger]=\"menu\"></button>\n </ng-container>\n <div fd-tile-header>\n <h1 fd-tile-title>\n {{ title | bbbTranslate }}\n </h1>\n <h2 fd-tile-subtitle>\n {{ subtitle | bbbTranslate }}\n </h2>\n </div>\n <ng-content></ng-content>\n <ng-container [ngTemplateOutlet]=\"footerTemplate ? footerTemplate : defaultFooter\"></ng-container>\n</fd-tile>\n<ng-template #defaultFooter>\n <bt-footer-tile *ngIf=\"footer\" [settings]=\"footer\"></bt-footer-tile>\n</ng-template>\n<fd-menu #menu>\n <li fd-menu-item>\n <a (click)=\"menu.close(); renameClick.emit()\" fd-menu-interactive>\n <span fd-menu-title>{{ 'Rename' | bbbTranslate }}</span>\n </a>\n </li>\n</fd-menu>\n<bsu-mask *ngIf=\"runningCommand\"></bsu-mask>\n", styles: [":host,fd-tile{display:block}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i3.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "component", type: i3.MenuItemComponent, selector: "li[fd-menu-item]", inputs: ["disabled", "itemId", "submenu"], outputs: ["onSelect"], exportAs: ["fd-menu-item"] }, { kind: "directive", type: i3.MenuInteractiveDirective, selector: "[fd-menu-interactive]" }, { kind: "directive", type: i3.MenuTitleDirective, selector: "[fd-menu-title]" }, { kind: "directive", type: i3.MenuTriggerDirective, selector: "[fdMenuTrigger]", inputs: ["fdMenuTrigger"] }, { kind: "component", type: i1$3.TileComponent, selector: "fd-tile", inputs: ["class", "size", "double", "type", "action", "clickable"], outputs: ["tileClick"] }, { kind: "directive", type: i1$3.TileHeaderDirective, selector: "[fdTileHeader], [fd-tile-header]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileTitleDirective, selector: "[fdTileTitle], [fd-tile-title]" }, { kind: "directive", type: i1$3.TileSubtitleDirective, selector: "[fdTileTitle], [fd-tile-subtitle]" }, { kind: "directive", type: i1$3.TileActionCloseDirective, selector: "[fdTileActionClose], [fd-tile-action-close]", inputs: ["class"] }, { kind: "directive", type: i1$3.TileActionIndicatorDirective, selector: "[fdTileActionIndicator], [fd-tile-action-indicator]", inputs: ["class"] }, { kind: "component", type: i5.MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }, { kind: "component", type: FooterTileComponent, selector: "bt-footer-tile", inputs: ["settings"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
754
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TileComponent, decorators: [{
755
- type: Component,
756
- args: [{ selector: 'bt-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-tile [type]=\"type\" [double]=\"isDouble\" [action]=\"edit\">\n <ng-container *ngIf=\"edit && !data.Locked\">\n <button fd-button fd-tile-action-close fdType=\"transparent\" (click)=\"hideClick.emit()\"></button>\n <button fd-button fd-tile-action-indicator fdType=\"transparent\" [fdMenuTrigger]=\"menu\"></button>\n </ng-container>\n <div fd-tile-header>\n <h1 fd-tile-title>\n {{ title | bbbTranslate }}\n </h1>\n <h2 fd-tile-subtitle>\n {{ subtitle | bbbTranslate }}\n </h2>\n </div>\n <ng-content></ng-content>\n <ng-container [ngTemplateOutlet]=\"footerTemplate ? footerTemplate : defaultFooter\"></ng-container>\n</fd-tile>\n<ng-template #defaultFooter>\n <bt-footer-tile *ngIf=\"footer\" [settings]=\"footer\"></bt-footer-tile>\n</ng-template>\n<fd-menu #menu>\n <li fd-menu-item>\n <a (click)=\"menu.close(); renameClick.emit()\" fd-menu-interactive>\n <span fd-menu-title>{{ 'Rename' | bbbTranslate }}</span>\n </a>\n </li>\n</fd-menu>\n<bsu-mask *ngIf=\"runningCommand\"></bsu-mask>\n", styles: [":host,fd-tile{display:block}\n"] }]
757
- }], propDecorators: { type: [{
758
- type: Input
759
- }], footerTemplate: [{
760
- type: Input
761
- }], footer: [{
762
- type: Input
763
- }], disableClick: [{
764
- type: Input
765
- }], title: [{
766
- type: Input
767
- }], icon: [{
768
- type: Input
769
- }], subtitle: [{
770
- type: Input
771
- }], isDouble: [{
772
- type: Input
773
- }], edit: [{
774
- type: Input
775
- }], dynamicCommand: [{
776
- type: Input
777
- }], onClick: [{
778
- type: HostListener,
779
- args: ['click', ['$event']]
780
- }] } });
781
-
782
- class TilePropPipe {
783
- transform(data, prop, parameters) {
784
- if (data) {
785
- if (prop === 'Title') {
786
- return data.TileTitle;
787
- }
788
- if (prop === 'Subtitle') {
789
- return data.Subtitle;
790
- }
791
- if (prop === 'DynamicCommand') {
792
- return data['DynamicCommand'];
793
- }
794
- const val = data.Component.Settings.TileSetting[prop];
795
- if (typeof val === 'undefined') {
796
- return data.Component.Settings[prop];
797
- }
798
- return val;
799
- }
800
- return parameters ? parameters.TileSetting[prop] : '';
801
- }
802
- }
803
- TilePropPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilePropPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
804
- TilePropPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: TilePropPipe, name: "tileProp" });
805
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilePropPipe, decorators: [{
806
- type: Pipe,
807
- args: [{
808
- name: 'tileProp'
809
- }]
810
- }] });
811
-
812
- class FormTileComponent extends BaseBtTileComponent {
813
- ngOnInit() {
814
- super.ngOnInit();
815
- const options = {
816
- Parameters: [],
817
- Method: this.settings.RunBlMethod,
818
- SuccessFn: (mo) => {
819
- this.params = {
820
- moId: mo.$State === 'New' ? '0' : mo.Id,
821
- typeDefId: this.settings.TypeDef.Id,
822
- viewId: this.settings.TypeViewEntity.Id
823
- };
824
- this._cdr.detectChanges();
825
- },
826
- FailFn: () => { }
827
- };
828
- BarsaApi.Bw.RunBlMethodAsync(options);
829
- }
830
- }
831
- FormTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FormTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
832
- FormTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FormTileComponent, selector: "bt-form-tile", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n [disableClick]=\"true\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n>\r\n <div fd-tile-content>\r\n <bnrc-form *ngIf=\"params\" [params]=\"params\"></bnrc-form>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}bnrc-form{z-index:3}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i1.FormComponent, selector: "bnrc-form", inputs: ["params", "customFormPanelUi", "formPanelCtrl", "UlvMainCtrlr", "formPanelCtrlId", "saveOnChange", "inlineEditInReport"], outputs: ["titleChanged", "moChanged", "formClose", "formRendered", "bruleAction", "beforeTransition", "afterTransition"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
833
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FormTileComponent, decorators: [{
834
- type: Component,
835
- args: [{ selector: 'bt-form-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n [disableClick]=\"true\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n>\r\n <div fd-tile-content>\r\n <bnrc-form *ngIf=\"params\" [params]=\"params\"></bnrc-form>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}bnrc-form{z-index:3}\n"] }]
836
- }] });
837
-
838
- class ActionItemComponent extends TileComponent {
839
- }
840
- ActionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ActionItemComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
841
- ActionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ActionItemComponent, selector: "bt-action-item", usesInheritance: true, ngImport: i0, template: "<div [class.action-item-edit-mode]=\"edit\" class=\"action-item\">\n <fd-icon *ngIf=\"icon\" [glyph]=\"icon\"></fd-icon>\n <h1 fd-tile-title>{{ title }}</h1>\n\n <h2 fd-tile-subtitle *ngIf=\"subtitle\">{{ subtitle }}</h2>\n\n <div *ngIf=\"edit && !data.Locked\" class=\"buttons\">\n <button fd-button fd-tile-action-close fdType=\"transparent\" (click)=\"hideClick.emit()\"></button>\n <button fd-button fd-tile-action-indicator fdType=\"transparent\" [fdMenuTrigger]=\"menu\"></button>\n </div>\n <fd-menu #menu>\n <li fd-menu-item>\n <a (click)=\"menu.close(); renameClick.emit()\" fd-menu-interactive>\n <span fd-menu-title>{{ 'Rename' | bbbTranslate }}</span>\n </a>\n </li>\n </fd-menu>\n</div>\n", styles: [".action-item{display:flex;justify-content:space-between;height:100%;align-items:center;column-gap:10px;padding:7px;background-color:var(--sapTile_Background, #fff);cursor:pointer;box-shadow:var(--sapContent_Shadow0, 0 0 0 .0625rem rgba(0, 0, 0, .1), 0 .125rem .5rem 0 rgba(0, 0, 0, .1));border-radius:var(--sapElement_BorderCornerRadius, .25rem);border:.0625rem solid var(--sapTile_BorderColor, transparent)}.action-item:hover{background-color:var(--sapBackgroundColor);border-color:var(--sapTile_Interactive_BorderColor)}.action-item fd-icon{color:var(--sapLinkColor, #0a6ed1);font-size:1.3rem;line-height:0}.action-item-edit-mode h1,.action-item-edit-mode h2{opacity:.3}.action-item-edit-mode .buttons{display:flex;column-gap:2px}.action-item-edit-mode .buttons button{display:flex}h1{text-decoration:none;color:var(--sapLinkColor, #0a6ed1);text-shadow:var(--sapContent_TextShadow, 0 0 .125rem #fff)}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "component", type: i3.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "component", type: i3.MenuItemComponent, selector: "li[fd-menu-item]", inputs: ["disabled", "itemId", "submenu"], outputs: ["onSelect"], exportAs: ["fd-menu-item"] }, { kind: "directive", type: i3.MenuInteractiveDirective, selector: "[fd-menu-interactive]" }, { kind: "directive", type: i3.MenuTitleDirective, selector: "[fd-menu-title]" }, { kind: "directive", type: i3.MenuTriggerDirective, selector: "[fdMenuTrigger]", inputs: ["fdMenuTrigger"] }, { kind: "directive", type: i1$3.TileTitleDirective, selector: "[fdTileTitle], [fd-tile-title]" }, { kind: "directive", type: i1$3.TileSubtitleDirective, selector: "[fdTileTitle], [fd-tile-subtitle]" }, { kind: "directive", type: i1$3.TileActionCloseDirective, selector: "[fdTileActionClose], [fd-tile-action-close]", inputs: ["class"] }, { kind: "directive", type: i1$3.TileActionIndicatorDirective, selector: "[fdTileActionIndicator], [fd-tile-action-indicator]", inputs: ["class"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
842
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ActionItemComponent, decorators: [{
843
- type: Component,
844
- args: [{ selector: 'bt-action-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class.action-item-edit-mode]=\"edit\" class=\"action-item\">\n <fd-icon *ngIf=\"icon\" [glyph]=\"icon\"></fd-icon>\n <h1 fd-tile-title>{{ title }}</h1>\n\n <h2 fd-tile-subtitle *ngIf=\"subtitle\">{{ subtitle }}</h2>\n\n <div *ngIf=\"edit && !data.Locked\" class=\"buttons\">\n <button fd-button fd-tile-action-close fdType=\"transparent\" (click)=\"hideClick.emit()\"></button>\n <button fd-button fd-tile-action-indicator fdType=\"transparent\" [fdMenuTrigger]=\"menu\"></button>\n </div>\n <fd-menu #menu>\n <li fd-menu-item>\n <a (click)=\"menu.close(); renameClick.emit()\" fd-menu-interactive>\n <span fd-menu-title>{{ 'Rename' | bbbTranslate }}</span>\n </a>\n </li>\n </fd-menu>\n</div>\n", styles: [".action-item{display:flex;justify-content:space-between;height:100%;align-items:center;column-gap:10px;padding:7px;background-color:var(--sapTile_Background, #fff);cursor:pointer;box-shadow:var(--sapContent_Shadow0, 0 0 0 .0625rem rgba(0, 0, 0, .1), 0 .125rem .5rem 0 rgba(0, 0, 0, .1));border-radius:var(--sapElement_BorderCornerRadius, .25rem);border:.0625rem solid var(--sapTile_BorderColor, transparent)}.action-item:hover{background-color:var(--sapBackgroundColor);border-color:var(--sapTile_Interactive_BorderColor)}.action-item fd-icon{color:var(--sapLinkColor, #0a6ed1);font-size:1.3rem;line-height:0}.action-item-edit-mode h1,.action-item-edit-mode h2{opacity:.3}.action-item-edit-mode .buttons{display:flex;column-gap:2px}.action-item-edit-mode .buttons button{display:flex}h1{text-decoration:none;color:var(--sapLinkColor, #0a6ed1);text-shadow:var(--sapContent_TextShadow, 0 0 .125rem #fff)}\n"] }]
845
- }] });
846
-
847
- class ActionsLinkComponent extends BaseComponent {
848
- /**
849
- *
850
- */
851
- constructor(_cdr) {
852
- super();
853
- this._cdr = _cdr;
854
- }
855
- ngOnInit() {
856
- super.ngOnInit();
857
- this.hide = this.actionsLink?.length === 0;
858
- }
859
- ngOnChanges(changes) {
860
- super.ngOnChanges(changes);
861
- const { actionsLink } = changes;
862
- if (!actionsLink.firstChange) {
863
- this.hide = actionsLink.currentValue?.length === 0;
864
- this._cdr.detectChanges();
865
- }
866
- }
867
- }
868
- ActionsLinkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ActionsLinkComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
869
- ActionsLinkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ActionsLinkComponent, selector: "bt-actions-link", inputs: { actionsLink: "actionsLink", edit: "edit" }, host: { properties: { "class.hide": "this.hide" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<bt-action-item\n *ngFor=\"let actionItem of actionsLink\"\n cdkDrag\n [data]=\"actionItem\"\n [edit]=\"edit\"\n [title]=\"actionItem | tileProp: 'Title'\"\n [subtitle]=\"actionItem | tileProp: 'Subtitle'\"\n [dynamicCommand]=\"actionItem | tileProp: 'DynamicCommand'\"\n [isDouble]=\"actionItem | tileProp: 'IsDouble'\"\n [footer]=\"actionItem | tileProp: 'Footer'\"\n [icon]=\"actionItem | tileProp: 'Icon'\"\n [cdkDragDisabled]=\"!actionItem || actionItem.Locked\"\n [mo]=\"actionItem\"\n>\n</bt-action-item>\n", styles: [":host{display:flex;width:100%;row-gap:3px;flex-wrap:wrap;border-radius:var(--sapElement_BorderCornerRadius, .25rem);column-gap:3px;padding:1rem 0}bt-action-item{margin-top:auto;margin-bottom:auto}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: ActionItemComponent, selector: "bt-action-item" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
870
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ActionsLinkComponent, decorators: [{
871
- type: Component,
872
- args: [{ selector: 'bt-actions-link', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-action-item\n *ngFor=\"let actionItem of actionsLink\"\n cdkDrag\n [data]=\"actionItem\"\n [edit]=\"edit\"\n [title]=\"actionItem | tileProp: 'Title'\"\n [subtitle]=\"actionItem | tileProp: 'Subtitle'\"\n [dynamicCommand]=\"actionItem | tileProp: 'DynamicCommand'\"\n [isDouble]=\"actionItem | tileProp: 'IsDouble'\"\n [footer]=\"actionItem | tileProp: 'Footer'\"\n [icon]=\"actionItem | tileProp: 'Icon'\"\n [cdkDragDisabled]=\"!actionItem || actionItem.Locked\"\n [mo]=\"actionItem\"\n>\n</bt-action-item>\n", styles: [":host{display:flex;width:100%;row-gap:3px;flex-wrap:wrap;border-radius:var(--sapElement_BorderCornerRadius, .25rem);column-gap:3px;padding:1rem 0}bt-action-item{margin-top:auto;margin-bottom:auto}\n"] }]
873
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { hide: [{
874
- type: HostBinding,
875
- args: ['class.hide']
876
- }], actionsLink: [{
877
- type: Input
878
- }], edit: [{
879
- type: Input
880
- }] } });
881
-
882
- class TileRendererDirective extends BaseDirective {
883
- constructor(_cdr, _portalService, _vcr, _injector, _el) {
884
- super(_el);
885
- this._cdr = _cdr;
886
- this._portalService = _portalService;
887
- this._vcr = _vcr;
888
- this._injector = _injector;
889
- this._el = _el;
890
- this.hideClick = new EventEmitter();
891
- this.renameClick = new EventEmitter();
892
- }
893
- ngOnInit() {
894
- super.ngOnInit();
895
- if (!this.component) {
896
- return;
897
- }
898
- const { Module, ModuleFileName, Name, Selector } = this.component;
899
- this._portalService
900
- .getComponent(Module, ModuleFileName, Name, Selector, this._injector)
901
- .pipe(takeUntil(this._onDestroy$))
902
- .subscribe((componentRef) => {
903
- const instance = componentRef.instance;
904
- instance.data = this.data;
905
- instance.edit = this.edit;
906
- instance.hideClick.pipe(takeUntil(this._onDestroy$)).subscribe(() => {
907
- this.hideClick.emit();
908
- });
909
- instance.renameClick.pipe(takeUntil(this._onDestroy$)).subscribe(() => this.renameClick.emit());
910
- this._vcr.insert(componentRef.hostView);
911
- this._tileRef = componentRef;
912
- // this._cdr.detectChanges();
913
- });
914
- }
915
- ngOnChanges(changes) {
916
- const { edit } = changes;
917
- if (edit && !edit.firstChange) {
918
- this._tileRef.instance.setEditHome(edit.currentValue);
919
- }
920
- }
921
- ngOnDestroy() {
922
- super.ngOnDestroy();
923
- if (this._tileRef) {
924
- this._tileRef.destroy();
925
- }
926
- }
927
- }
928
- TileRendererDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TileRendererDirective, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.PortalService }, { token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
929
- TileRendererDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: TileRendererDirective, selector: "[tileRenderer]", inputs: { component: "component", data: "data", edit: "edit" }, outputs: { hideClick: "hideClick", renameClick: "renameClick" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
930
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TileRendererDirective, decorators: [{
931
- type: Directive,
932
- args: [{
933
- selector: '[tileRenderer]'
934
- }]
935
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.PortalService }, { type: i0.ViewContainerRef }, { type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { component: [{
936
- type: Input
937
- }], data: [{
938
- type: Input
939
- }], edit: [{
940
- type: Input
941
- }], hideClick: [{
942
- type: Output
943
- }], renameClick: [{
944
- type: Output
945
- }] } });
946
-
947
- class TilesViewerGroupComponent extends BaseComponent {
948
- constructor(_el) {
949
- super();
950
- this._el = _el;
951
- this.tilesDropped = new EventEmitter();
952
- this.hideAppTileClick = new EventEmitter();
953
- this.renameAppTileClick = new EventEmitter();
954
- this.toggleGroup = new EventEmitter();
955
- this.resetGroup = new EventEmitter();
956
- this.deleteGroup = new EventEmitter();
957
- this.marginRightTile = null;
958
- }
959
- ngAfterViewInit() {
960
- super.ngAfterViewInit();
961
- if (this.deviceSize === 's') {
962
- const t = document.body.clientWidth % 154;
963
- this.marginRightTile = t / 3;
964
- }
965
- }
966
- onDrop(appTileGroup, event) {
967
- if (!this.edit || appTileGroup.Locked) {
968
- return;
969
- }
970
- this.tilesDropped.emit({ appTileGroup, event });
971
- }
972
- onAppTileHideClick(appTile) {
973
- this.hideAppTileClick.emit(appTile);
974
- }
975
- onAppTileRenameClick(appTile) {
976
- this.renameAppTileClick.emit(appTile);
977
- }
978
- onDelete(appTileGroup) {
979
- this.deleteGroup.emit(appTileGroup);
980
- }
981
- onToggleShowHide(appTileGroup) {
982
- this.toggleGroup.emit(appTileGroup);
983
- }
984
- onReset(appTileGroup) {
985
- this.resetGroup.emit(appTileGroup);
986
- }
987
- }
988
- TilesViewerGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerGroupComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
989
- TilesViewerGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TilesViewerGroupComponent, selector: "bt-tiles-viewer-group", inputs: { appTileGroup: "appTileGroup", stackContent: "stackContent", edit: "edit", rtl: "rtl", isAppTileSubGroup: "isAppTileSubGroup", deviceSize: "deviceSize" }, outputs: { tilesDropped: "tilesDropped", hideAppTileClick: "hideAppTileClick", renameAppTileClick: "renameAppTileClick", toggleGroup: "toggleGroup", resetGroup: "resetGroup", deleteGroup: "deleteGroup" }, usesInheritance: true, ngImport: i0, template: "<fd-layout-panel [fixed]=\"true\" [attr.editHome]=\"edit\" cdkDrag [cdkDragDisabled]=\"!edit || !stackContent\">\n <fd-layout-panel-header *ngIf=\"edit || stackContent || isAppTileSubGroup\">\n <fd-layout-panel-head>\n <h2 fd-layout-panel-title>{{ appTileGroup.navigatorTitle }}</h2>\n </fd-layout-panel-head>\n <fd-layout-panel-actions *ngIf=\"edit\" class=\"group-btns\">\n <fd-toolbar [shouldOverflow]=\"false\" [fdType]=\"'transparent'\" [clearBorder]=\"true\">\n <button\n fd-button\n fd-toolbar-item\n [label]=\"!appTileGroup.navigatorVisible ? ('Show' | bbbTranslate) : ('Hide' | bbbTranslate)\"\n (click)=\"onToggleShowHide(appTileGroup)\"\n ></button>\n <button\n fd-button\n *ngIf=\"appTileGroup.Predefined && appTileGroup.$TileSettingChanged\"\n [label]=\"'Refresh' | bbbTranslate\"\n (click)=\"onReset(appTileGroup)\"\n ></button>\n <button\n *ngIf=\"!appTileGroup.Predefined\"\n fd-button\n [label]=\"'Delete' | bbbTranslate\"\n [fdType]=\"'negative'\"\n (click)=\"onDelete(appTileGroup)\"\n ></button>\n </fd-toolbar>\n </fd-layout-panel-actions>\n </fd-layout-panel-header>\n <fd-layout-panel-body [bleed]=\"!stackContent\" [class.small-size]=\"deviceSize === 's'\">\n <div\n class=\"tile-wrapper\"\n [ngClass]=\"{ rtl: rtl, ltr: !rtl, s: deviceSize === 's' }\"\n fd-panel-content\n #tiles=\"cdkDropList\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"onDrop(appTileGroup, $event)\"\n [cdkDropListConnectedTo]=\"actionLinks\"\n [cdkDropListData]=\"{\n isTile: true,\n items: appTileGroup.navigatorTiles || []\n }\"\n >\n <ng-container *ngIf=\"!edit\">\n <fd-busy-indicator fd-title *ngIf=\"!appTileGroup.$TilesLoaded\" [loading]=\"true\"></fd-busy-indicator>\n\n <h5 fd-title *ngIf=\"!appTileGroup.navigatorTiles.length && appTileGroup.$TilesLoaded\"></h5>\n </ng-container>\n <div\n *ngFor=\"let appTile of appTileGroup.navigatorTiles; let k = index\"\n [class.edit-home]=\"edit\"\n [class.isdouble]=\"appTile.Component?.Settings?.TileSetting?.IsDouble\"\n cdkDrag\n [cdkDragDisabled]=\"!edit || appTileGroup.Locked\"\n >\n <span\n [dynamicCommand]=\"appTile.DynamicCommand\"\n [enableCommand]=\"!edit && appTile.Component\"\n tileRenderer\n [data]=\"appTile\"\n [edit]=\"edit\"\n [component]=\"appTile.Component\"\n (hideClick)=\"onAppTileHideClick(appTile)\"\n (renameClick)=\"onAppTileRenameClick(appTile)\"\n ></span>\n </div>\n <fd-tile class=\"add-tile\" *ngIf=\"edit\" [routerLink]=\"['/home/appfinder']\">\n <div>\n <fd-icon glyph=\"add\"></fd-icon>\n </div>\n </fd-tile>\n </div>\n </fd-layout-panel-body>\n</fd-layout-panel>\n\n<bt-actions-link\n [class.actions-link-edit-home]=\"edit\"\n [actionsLink]=\"appTileGroup.navigatorActionLinks\"\n [edit]=\"edit\"\n [style.min-height]=\"edit ? '4rem' : 'auto'\"\n cdkDropList\n #actionLinks=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListConnectedTo]=\"tiles\"\n (cdkDropListDropped)=\"onDrop(appTileGroup, $event)\"\n [cdkDropListData]=\"{\n isTile: false,\n items: appTileGroup.navigatorActionLinks || []\n }\"\n>\n</bt-actions-link>\n<ng-container *ngFor=\"let appTileSubGroup of appTileGroup.$Children\">\n <bt-tiles-viewer-group\n [appTileGroup]=\"appTileSubGroup\"\n [edit]=\"edit\"\n [rtl]=\"rtl\"\n [stackContent]=\"stackContent\"\n [isAppTileSubGroup]=\"true\"\n [deviceSize]=\"deviceSize\"\n (tilesDropped)=\"tilesDropped.emit($event)\"\n (renameAppTileClick)=\"renameAppTileClick.emit($event)\"\n (hideAppTileClick)=\"hideAppTileClick.emit($event)\"\n (resetGroup)=\"resetGroup.emit($event)\"\n (deleteGroup)=\"deleteGroup.emit($event)\"\n (toggleGroup)=\"toggleGroup.emit($event)\"\n ></bt-tiles-viewer-group>\n</ng-container>\n", styles: [":host{display:block}fd-layout-panel{box-shadow:none}fd-layout-panel fd-layout-panel-body:not(.small-size){margin-top:.5rem}fd-layout-panel fd-layout-panel-body.small-size{padding:1rem .5rem}fd-layout-panel[editHome=false]{background:transparent}::ng-deep .fd-panel__header{border:none;padding-left:0;padding-right:0}::ng-deep fd-panel[edithome=false] .fd-panel__header:first-child{display:none}::ng-deep .fd-panel__content{border-bottom:none;padding:1px}.tile-wrapper{column-gap:3px;row-gap:1rem;display:inline-flex;flex-wrap:wrap;align-items:center}.actions-link-edit-home{background-color:var(--sapGroup_ContentBackground, #fff);border-color:var(--sapGroup_ContentBorderColor, #d9d9d9);border-width:var(--sapElement_BorderWidth, .0625rem);border-style:solid}.add-tile{background-color:transparent!important}.add-tile ::ng-deep div{background-color:transparent!important;margin:10px 0}.add-tile div:first-child{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.add-tile fd-icon{font-size:1.5rem;color:#3c4043}fd-layout-panel-body.small-size{display:flex;justify-content:center}fd-layout-panel-body.small-size .tile-wrapper{display:grid;grid-template-columns:154px 154px;gap:1rem}fd-layout-panel-body.small-size .tile-wrapper .isdouble{grid-column-start:1;grid-column-end:3}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i3$1.BusyIndicatorComponent, selector: "fd-busy-indicator", inputs: ["loading", "size", "block", "ariaLabel", "title", "label", "ariaLive"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "component", type: i6.LayoutPanelComponent, selector: "fd-layout-panel", inputs: ["backgroundImage"] }, { kind: "component", type: i6.LayoutPanelHeaderComponent, selector: "fd-layout-panel-header" }, { kind: "component", type: i6.LayoutPanelHeadComponent, selector: "fd-layout-panel-head" }, { kind: "directive", type: i6.LayoutPanelTitleDirective, selector: "[fd-layout-panel-title]" }, { kind: "component", type: i6.LayoutPanelActionsComponent, selector: "fd-layout-panel-actions" }, { kind: "component", type: i6.LayoutPanelBodyComponent, selector: "fd-layout-panel-body", inputs: ["bleed"] }, { kind: "component", type: i9.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: i8.PanelContentDirective, selector: "[fd-panel-content]", inputs: ["height", "minHeight", "maxHeight", "ariaLabel", "ariaLabelledBy", "role", "id"] }, { kind: "component", type: i1$3.TileComponent, selector: "fd-tile", inputs: ["class", "size", "double", "type", "action", "clickable"], outputs: ["tileClick"] }, { kind: "component", type: i10.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i10.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "component", type: ActionsLinkComponent, selector: "bt-actions-link", inputs: ["actionsLink", "edit"] }, { kind: "component", type: TilesViewerGroupComponent, selector: "bt-tiles-viewer-group", inputs: ["appTileGroup", "stackContent", "edit", "rtl", "isAppTileSubGroup", "deviceSize"], outputs: ["tilesDropped", "hideAppTileClick", "renameAppTileClick", "toggleGroup", "resetGroup", "deleteGroup"] }, { kind: "directive", type: TileRendererDirective, selector: "[tileRenderer]", inputs: ["component", "data", "edit"], outputs: ["hideClick", "renameClick"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerGroupComponent, decorators: [{
991
- type: Component,
992
- args: [{ selector: 'bt-tiles-viewer-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-layout-panel [fixed]=\"true\" [attr.editHome]=\"edit\" cdkDrag [cdkDragDisabled]=\"!edit || !stackContent\">\n <fd-layout-panel-header *ngIf=\"edit || stackContent || isAppTileSubGroup\">\n <fd-layout-panel-head>\n <h2 fd-layout-panel-title>{{ appTileGroup.navigatorTitle }}</h2>\n </fd-layout-panel-head>\n <fd-layout-panel-actions *ngIf=\"edit\" class=\"group-btns\">\n <fd-toolbar [shouldOverflow]=\"false\" [fdType]=\"'transparent'\" [clearBorder]=\"true\">\n <button\n fd-button\n fd-toolbar-item\n [label]=\"!appTileGroup.navigatorVisible ? ('Show' | bbbTranslate) : ('Hide' | bbbTranslate)\"\n (click)=\"onToggleShowHide(appTileGroup)\"\n ></button>\n <button\n fd-button\n *ngIf=\"appTileGroup.Predefined && appTileGroup.$TileSettingChanged\"\n [label]=\"'Refresh' | bbbTranslate\"\n (click)=\"onReset(appTileGroup)\"\n ></button>\n <button\n *ngIf=\"!appTileGroup.Predefined\"\n fd-button\n [label]=\"'Delete' | bbbTranslate\"\n [fdType]=\"'negative'\"\n (click)=\"onDelete(appTileGroup)\"\n ></button>\n </fd-toolbar>\n </fd-layout-panel-actions>\n </fd-layout-panel-header>\n <fd-layout-panel-body [bleed]=\"!stackContent\" [class.small-size]=\"deviceSize === 's'\">\n <div\n class=\"tile-wrapper\"\n [ngClass]=\"{ rtl: rtl, ltr: !rtl, s: deviceSize === 's' }\"\n fd-panel-content\n #tiles=\"cdkDropList\"\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListDropped)=\"onDrop(appTileGroup, $event)\"\n [cdkDropListConnectedTo]=\"actionLinks\"\n [cdkDropListData]=\"{\n isTile: true,\n items: appTileGroup.navigatorTiles || []\n }\"\n >\n <ng-container *ngIf=\"!edit\">\n <fd-busy-indicator fd-title *ngIf=\"!appTileGroup.$TilesLoaded\" [loading]=\"true\"></fd-busy-indicator>\n\n <h5 fd-title *ngIf=\"!appTileGroup.navigatorTiles.length && appTileGroup.$TilesLoaded\"></h5>\n </ng-container>\n <div\n *ngFor=\"let appTile of appTileGroup.navigatorTiles; let k = index\"\n [class.edit-home]=\"edit\"\n [class.isdouble]=\"appTile.Component?.Settings?.TileSetting?.IsDouble\"\n cdkDrag\n [cdkDragDisabled]=\"!edit || appTileGroup.Locked\"\n >\n <span\n [dynamicCommand]=\"appTile.DynamicCommand\"\n [enableCommand]=\"!edit && appTile.Component\"\n tileRenderer\n [data]=\"appTile\"\n [edit]=\"edit\"\n [component]=\"appTile.Component\"\n (hideClick)=\"onAppTileHideClick(appTile)\"\n (renameClick)=\"onAppTileRenameClick(appTile)\"\n ></span>\n </div>\n <fd-tile class=\"add-tile\" *ngIf=\"edit\" [routerLink]=\"['/home/appfinder']\">\n <div>\n <fd-icon glyph=\"add\"></fd-icon>\n </div>\n </fd-tile>\n </div>\n </fd-layout-panel-body>\n</fd-layout-panel>\n\n<bt-actions-link\n [class.actions-link-edit-home]=\"edit\"\n [actionsLink]=\"appTileGroup.navigatorActionLinks\"\n [edit]=\"edit\"\n [style.min-height]=\"edit ? '4rem' : 'auto'\"\n cdkDropList\n #actionLinks=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListConnectedTo]=\"tiles\"\n (cdkDropListDropped)=\"onDrop(appTileGroup, $event)\"\n [cdkDropListData]=\"{\n isTile: false,\n items: appTileGroup.navigatorActionLinks || []\n }\"\n>\n</bt-actions-link>\n<ng-container *ngFor=\"let appTileSubGroup of appTileGroup.$Children\">\n <bt-tiles-viewer-group\n [appTileGroup]=\"appTileSubGroup\"\n [edit]=\"edit\"\n [rtl]=\"rtl\"\n [stackContent]=\"stackContent\"\n [isAppTileSubGroup]=\"true\"\n [deviceSize]=\"deviceSize\"\n (tilesDropped)=\"tilesDropped.emit($event)\"\n (renameAppTileClick)=\"renameAppTileClick.emit($event)\"\n (hideAppTileClick)=\"hideAppTileClick.emit($event)\"\n (resetGroup)=\"resetGroup.emit($event)\"\n (deleteGroup)=\"deleteGroup.emit($event)\"\n (toggleGroup)=\"toggleGroup.emit($event)\"\n ></bt-tiles-viewer-group>\n</ng-container>\n", styles: [":host{display:block}fd-layout-panel{box-shadow:none}fd-layout-panel fd-layout-panel-body:not(.small-size){margin-top:.5rem}fd-layout-panel fd-layout-panel-body.small-size{padding:1rem .5rem}fd-layout-panel[editHome=false]{background:transparent}::ng-deep .fd-panel__header{border:none;padding-left:0;padding-right:0}::ng-deep fd-panel[edithome=false] .fd-panel__header:first-child{display:none}::ng-deep .fd-panel__content{border-bottom:none;padding:1px}.tile-wrapper{column-gap:3px;row-gap:1rem;display:inline-flex;flex-wrap:wrap;align-items:center}.actions-link-edit-home{background-color:var(--sapGroup_ContentBackground, #fff);border-color:var(--sapGroup_ContentBorderColor, #d9d9d9);border-width:var(--sapElement_BorderWidth, .0625rem);border-style:solid}.add-tile{background-color:transparent!important}.add-tile ::ng-deep div{background-color:transparent!important;margin:10px 0}.add-tile div:first-child{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.add-tile fd-icon{font-size:1.5rem;color:#3c4043}fd-layout-panel-body.small-size{display:flex;justify-content:center}fd-layout-panel-body.small-size .tile-wrapper{display:grid;grid-template-columns:154px 154px;gap:1rem}fd-layout-panel-body.small-size .tile-wrapper .isdouble{grid-column-start:1;grid-column-end:3}\n"] }]
993
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { appTileGroup: [{
994
- type: Input
995
- }], stackContent: [{
996
- type: Input
997
- }], edit: [{
998
- type: Input
999
- }], rtl: [{
1000
- type: Input
1001
- }], isAppTileSubGroup: [{
1002
- type: Input
1003
- }], deviceSize: [{
1004
- type: Input
1005
- }], tilesDropped: [{
1006
- type: Output
1007
- }], hideAppTileClick: [{
1008
- type: Output
1009
- }], renameAppTileClick: [{
1010
- type: Output
1011
- }], toggleGroup: [{
1012
- type: Output
1013
- }], resetGroup: [{
1014
- type: Output
1015
- }], deleteGroup: [{
1016
- type: Output
1017
- }] } });
1018
-
1019
- class EmptyListDirective {
1020
- constructor(templateRef, viewContainer, bbbPipe) {
1021
- this.templateRef = templateRef;
1022
- this.viewContainer = viewContainer;
1023
- this.bbbPipe = bbbPipe;
1024
- this.hasView = false;
1025
- }
1026
- set emptyList(list) {
1027
- if (!list || (!list.length && !this.hasView)) {
1028
- const _view = this.viewContainer.createEmbeddedView(this.templateRef);
1029
- this.setNoData(_view);
1030
- this.hasView = true;
1031
- }
1032
- else if (list && list.length > 0 && this.hasView) {
1033
- this.viewContainer.clear();
1034
- this.hasView = false;
1035
- }
1036
- }
1037
- setNoData(view) {
1038
- view.rootNodes[0].innerHTML = this.bbbPipe.transform('NoData');
1039
- }
1040
- }
1041
- EmptyListDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EmptyListDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i1.BbbTranslatePipe }], target: i0.ɵɵFactoryTarget.Directive });
1042
- EmptyListDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.7", type: EmptyListDirective, selector: "[emptyList]", inputs: { emptyList: "emptyList" }, ngImport: i0 });
1043
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: EmptyListDirective, decorators: [{
1044
- type: Directive,
1045
- args: [{
1046
- selector: '[emptyList]'
1047
- }]
1048
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i1.BbbTranslatePipe }]; }, propDecorators: { emptyList: [{
1049
- type: Input
1050
- }] } });
1051
-
1052
- class AppFinderAppListComponent extends BaseComponent {
1053
- constructor() {
1054
- super(...arguments);
1055
- this.pinClick = new EventEmitter();
1056
- this.appTileGroupsPinChange = new EventEmitter();
1057
- }
1058
- onPinTap(app) {
1059
- this.pinClick.emit(app);
1060
- }
1061
- }
1062
- AppFinderAppListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderAppListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1063
- AppFinderAppListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: AppFinderAppListComponent, selector: "bt-app-finder-app-list", inputs: { appGroup: "appGroup", mobile: "mobile", searchTerm: "searchTerm", pinnedAppInAppTileGroups: "pinnedAppInAppTileGroups" }, outputs: { pinClick: "pinClick", appTileGroupsPinChange: "appTileGroupsPinChange" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"appGroup\">\r\n <h5 fd-title *emptyList=\"appGroup.Apps\"></h5>\r\n <ng-container *ngIf=\"(appGroup.Apps | filterStr: { Title: searchTerm, mode: 'contains' }).length > 0\">\r\n <fd-fixed-card-layout [disableDragDrop]=\"true\">\r\n <ng-container\r\n *ngFor=\"let app of appGroup.Apps | filterStr: { Title: searchTerm, mode: 'contains' }; let i = index\"\r\n >\r\n <fd-card *fdCardDef=\"i\">\r\n <fd-card-header [dynCommand]=\"app.DynamicCommand\" [mo]=\"app\">\r\n <fd-avatar *ngIf=\"app.Icon\" [glyph]=\"app.Icon\" size=\"s\" [title]=\"app.Title\"></fd-avatar>\r\n <h2 fd-card-title class=\"header-title\">\r\n {{ app.Title }}\r\n </h2>\r\n <h3 fd-card-subtitle></h3>\r\n </fd-card-header>\r\n <fd-card-content>\r\n <button\r\n fd-button\r\n [glyph]=\"'pushpin-off'\"\r\n [fdType]=\"\r\n pinnedAppInAppTileGroups[app.Id]\r\n ? pinnedAppInAppTileGroups[app.Id].length\r\n ? 'emphasized'\r\n : 'standard'\r\n : app.$HasPinned\r\n ? 'emphasized'\r\n : 'standard'\r\n \"\r\n (click)=\"onPinTap(app)\"\r\n ></button>\r\n </fd-card-content>\r\n </fd-card>\r\n </ng-container>\r\n </fd-fixed-card-layout>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{display:block;flex-grow:1;padding:1rem}button{cursor:pointer}h3{padding-bottom:.5rem}fd-fixed-card-layout,h5{padding-bottom:2rem;display:block}.header-title{padding-bottom:30px}fd-card-content{padding:10px;cursor:default}@media (max-width: 767px){:host{padding:0 1rem}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "backgroundImage", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i4.CardComponent, selector: "fd-card", inputs: ["badge", "isLoading", "cardType", "id", "role"] }, { kind: "component", type: i4.CardHeaderComponent, selector: "fd-card-header", inputs: ["interactive", "tabindex"] }, { kind: "component", type: i4.CardContentComponent, selector: "fd-card-content" }, { kind: "directive", type: i4.CardTitleDirective, selector: "[fd-card-title]" }, { kind: "directive", type: i4.CardSubtitleDirective, selector: "[fd-card-subtitle]" }, { kind: "component", type: i5$1.FixedCardLayoutComponent, selector: "fd-fixed-card-layout", inputs: ["disableDragDrop", "dragStartDelay", "cardMinimumWidth", "columnsWidthConfig", "maxColumns"], outputs: ["layoutChange", "cardDraggedDropped"] }, { kind: "directive", type: i5$1.CardDefinitionDirective, selector: "[fdCardDef]", inputs: ["fdCardDef"] }, { kind: "component", type: i9.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: i1.DynamicCommandDirective, selector: "[dynCommand]", inputs: ["dynCommand", "mo", "enableCommand"], outputs: ["commandClick"] }, { kind: "directive", type: EmptyListDirective, selector: "[emptyList]", inputs: ["emptyList"] }, { kind: "pipe", type: i1.FilterStringPipe, name: "filterStr" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1064
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderAppListComponent, decorators: [{
1065
- type: Component,
1066
- args: [{ selector: 'bt-app-finder-app-list', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"appGroup\">\r\n <h5 fd-title *emptyList=\"appGroup.Apps\"></h5>\r\n <ng-container *ngIf=\"(appGroup.Apps | filterStr: { Title: searchTerm, mode: 'contains' }).length > 0\">\r\n <fd-fixed-card-layout [disableDragDrop]=\"true\">\r\n <ng-container\r\n *ngFor=\"let app of appGroup.Apps | filterStr: { Title: searchTerm, mode: 'contains' }; let i = index\"\r\n >\r\n <fd-card *fdCardDef=\"i\">\r\n <fd-card-header [dynCommand]=\"app.DynamicCommand\" [mo]=\"app\">\r\n <fd-avatar *ngIf=\"app.Icon\" [glyph]=\"app.Icon\" size=\"s\" [title]=\"app.Title\"></fd-avatar>\r\n <h2 fd-card-title class=\"header-title\">\r\n {{ app.Title }}\r\n </h2>\r\n <h3 fd-card-subtitle></h3>\r\n </fd-card-header>\r\n <fd-card-content>\r\n <button\r\n fd-button\r\n [glyph]=\"'pushpin-off'\"\r\n [fdType]=\"\r\n pinnedAppInAppTileGroups[app.Id]\r\n ? pinnedAppInAppTileGroups[app.Id].length\r\n ? 'emphasized'\r\n : 'standard'\r\n : app.$HasPinned\r\n ? 'emphasized'\r\n : 'standard'\r\n \"\r\n (click)=\"onPinTap(app)\"\r\n ></button>\r\n </fd-card-content>\r\n </fd-card>\r\n </ng-container>\r\n </fd-fixed-card-layout>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host{display:block;flex-grow:1;padding:1rem}button{cursor:pointer}h3{padding-bottom:.5rem}fd-fixed-card-layout,h5{padding-bottom:2rem;display:block}.header-title{padding-bottom:30px}fd-card-content{padding:10px;cursor:default}@media (max-width: 767px){:host{padding:0 1rem}}\n"] }]
1067
- }], propDecorators: { appGroup: [{
1068
- type: Input
1069
- }], mobile: [{
1070
- type: Input
1071
- }], searchTerm: [{
1072
- type: Input
1073
- }], pinnedAppInAppTileGroups: [{
1074
- type: Input
1075
- }], pinClick: [{
1076
- type: Output
1077
- }], appTileGroupsPinChange: [{
1078
- type: Output
1079
- }] } });
1080
-
1081
- class AppFinderGroupComponent extends BaseComponent {
1082
- constructor() {
1083
- super(...arguments);
1084
- this.selectedIdChange = new EventEmitter();
1085
- }
1086
- ngOnChanges(changes) {
1087
- super.ngOnChanges(changes);
1088
- if (changes.appGroups && !changes.appGroups.firstChange) {
1089
- const appGroups = changes.appGroups.currentValue;
1090
- if (appGroups && appGroups.length > 0 && !this.selectedId) {
1091
- this.selectedIdChange.emit(appGroups[0].Id);
1092
- }
1093
- }
1094
- }
1095
- OnMenuGroupClick(group) {
1096
- this.selectedIdChange.emit(group.Id);
1097
- }
1098
- OnGroupClick(group) {
1099
- this.selectedIdChange.emit(group.Id);
1100
- }
1101
- }
1102
- AppFinderGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1103
- AppFinderGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: AppFinderGroupComponent, selector: "bt-app-finder-group", inputs: { appGroups: "appGroups", selectedId: "selectedId", listMode: "listMode" }, outputs: { selectedIdChange: "selectedIdChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"listMode; else menuTpl\">\r\n <div class=\"app-groups\">\r\n <ul fd-list [selection]=\"true\">\r\n <li\r\n fd-list-item\r\n *ngFor=\"let group of appGroups; let i = index\"\r\n [selected]=\"group.Id === selectedId\"\r\n (click)=\"OnGroupClick(group)\"\r\n >\r\n <span fd-list-title>\r\n {{ group.Title }}\r\n </span>\r\n </li>\r\n </ul>\r\n </div>\r\n</ng-container>\r\n<ng-template #menuTpl>\r\n <li *ngFor=\"let group of appGroups; let i = index\" fd-menu-item [selected]=\"group.Id === selectedId\">\r\n <a fd-menu-interactive (click)=\"OnMenuGroupClick(group)\">\r\n <span fd-menu-title>\r\n {{ group.Title }}\r\n </span>\r\n </a>\r\n </li>\r\n</ng-template>\r\n", styles: [".app-groups{width:25vw;border-left:.0625rem solid var(--sapGroup_TitleBorderColor, #d9d9d9)}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline"], outputs: ["focusEscapeList"] }, { kind: "component", type: i4$1.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i4$1.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: i3.MenuItemComponent, selector: "li[fd-menu-item]", inputs: ["disabled", "itemId", "submenu"], outputs: ["onSelect"], exportAs: ["fd-menu-item"] }, { kind: "directive", type: i3.MenuInteractiveDirective, selector: "[fd-menu-interactive]" }, { kind: "directive", type: i3.MenuTitleDirective, selector: "[fd-menu-title]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderGroupComponent, decorators: [{
1105
- type: Component,
1106
- args: [{ selector: 'bt-app-finder-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"listMode; else menuTpl\">\r\n <div class=\"app-groups\">\r\n <ul fd-list [selection]=\"true\">\r\n <li\r\n fd-list-item\r\n *ngFor=\"let group of appGroups; let i = index\"\r\n [selected]=\"group.Id === selectedId\"\r\n (click)=\"OnGroupClick(group)\"\r\n >\r\n <span fd-list-title>\r\n {{ group.Title }}\r\n </span>\r\n </li>\r\n </ul>\r\n </div>\r\n</ng-container>\r\n<ng-template #menuTpl>\r\n <li *ngFor=\"let group of appGroups; let i = index\" fd-menu-item [selected]=\"group.Id === selectedId\">\r\n <a fd-menu-interactive (click)=\"OnMenuGroupClick(group)\">\r\n <span fd-menu-title>\r\n {{ group.Title }}\r\n </span>\r\n </a>\r\n </li>\r\n</ng-template>\r\n", styles: [".app-groups{width:25vw;border-left:.0625rem solid var(--sapGroup_TitleBorderColor, #d9d9d9)}\n"] }]
1107
- }], propDecorators: { appGroups: [{
1108
- type: Input
1109
- }], selectedId: [{
1110
- type: Input
1111
- }], listMode: [{
1112
- type: Input
1113
- }], selectedIdChange: [{
1114
- type: Output
1115
- }] } });
1116
-
1117
- class AppFinderComponent extends BaseComponent {
1118
- constructor() {
1119
- super(...arguments);
1120
- this.contentDensity = 'compact';
1121
- this.pinClick = new EventEmitter();
1122
- this.selectedAppGroupIdChange = new EventEmitter();
1123
- }
1124
- onSearchSubmit() {
1125
- this.searchTerm = this.searchTerm2;
1126
- }
1127
- }
1128
- AppFinderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1129
- AppFinderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: AppFinderComponent, selector: "bt-app-finder", inputs: { appGroups: "appGroups", deviceSize: "deviceSize", sideContentSize: "sideContentSize", selectedAppGroup: "selectedAppGroup", selectedAppGroupId: "selectedAppGroupId", mobile: "mobile", contentDensity: "contentDensity", contentHeight: "contentHeight", pinnedAppInAppTileGroups: "pinnedAppInAppTileGroups" }, outputs: { pinClick: "pinClick", selectedAppGroupIdChange: "selectedAppGroupIdChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"wrapper\">\n <ng-container *ngIf=\"appGroups; else loading\">\n <fd-toolbar [fdType]=\"'solid'\">\n <button\n fd-toolbar-item\n fd-button\n [fdMenu]=\"true\"\n [glyph]=\"'menu2'\"\n [fdType]=\"'transparent'\"\n [fdMenuTrigger]=\"menu\"\n [label]=\"selectedAppGroup?.Title\"\n *ngIf=\"deviceSize === 's'\"\n ></button>\n <fd-toolbar-spacer></fd-toolbar-spacer>\n <fd-input-group\n fd-toolbar-item\n type=\"search\"\n glyph=\"search\"\n [glyphAriaLabel]=\"'Search' | bbbTranslate\"\n [placeholder]=\"'Search' | bbbTranslate\"\n [button]=\"true\"\n [disabled]=\"false\"\n [(ngModel)]=\"searchTerm2\"\n (addOnButtonClicked)=\"onSearchSubmit()\"\n (keydown.enter)=\"onSearchSubmit()\"\n >\n </fd-input-group>\n </fd-toolbar>\n <div style=\"display: flex; overflow-y: auto\" [style.height]=\"contentHeight\">\n <div class=\"app-groups\">\n <bt-app-finder-group\n *ngIf=\"deviceSize !== 's'\"\n [appGroups]=\"appGroups\"\n [listMode]=\"true\"\n [selectedId]=\"selectedAppGroupId\"\n (selectedIdChange)=\"selectedAppGroupIdChange.emit($event)\"\n >\n </bt-app-finder-group>\n </div>\n <bt-app-finder-app-list\n [appGroup]=\"selectedAppGroup\"\n [mobile]=\"mobile\"\n [searchTerm]=\"searchTerm\"\n [pinnedAppInAppTileGroups]=\"pinnedAppInAppTileGroups\"\n (pinClick)=\"pinClick.emit($event)\"\n ></bt-app-finder-app-list>\n </div>\n <fd-menu\n #menu\n [mobile]=\"deviceSize === 's'\"\n [mobileConfig]=\"{ title: 'Groups' | bbbTranslate, hasCloseButton: true }\"\n >\n <bt-app-finder-group\n *ngIf=\"deviceSize === 's'\"\n [appGroups]=\"appGroups\"\n [selectedId]=\"selectedAppGroupId\"\n (selectedIdChange)=\"menu.close(); selectedAppGroupIdChange.emit($event)\"\n >\n </bt-app-finder-group>\n </fd-menu>\n </ng-container>\n <ng-template #loading>\n <bsu-mask></bsu-mask>\n </ng-template>\n</div>\n", styles: [":host{display:block;background-color:var(--sapBackgroundColor, #f7f7f7);color:var(--sapTextColor, #32363a)}:host ::ng-deep .fd-list__title{line-height:1.5rem}.wrapper{display:flex;flex-direction:column}fd-toolbar{width:100%}::ng-deep span.fd-toolbar__spacer{display:none}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i7.InputGroupComponent, selector: "fd-input-group", inputs: ["inputTemplate", "placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledby", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "component", type: i3.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "directive", type: i3.MenuTriggerDirective, selector: "[fdMenuTrigger]", inputs: ["fdMenuTrigger"] }, { kind: "component", type: i10.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i10.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "component", type: i10.ToolbarSpacerComponent, selector: "fd-toolbar-spacer", inputs: ["width", "class", "fixed"] }, { kind: "directive", type: i1.MobileDirective, selector: "[mobile]" }, { kind: "component", type: i5.MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }, { kind: "component", type: AppFinderGroupComponent, selector: "bt-app-finder-group", inputs: ["appGroups", "selectedId", "listMode"], outputs: ["selectedIdChange"] }, { kind: "component", type: AppFinderAppListComponent, selector: "bt-app-finder-app-list", inputs: ["appGroup", "mobile", "searchTerm", "pinnedAppInAppTileGroups"], outputs: ["pinClick", "appTileGroupsPinChange"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderComponent, decorators: [{
1131
- type: Component,
1132
- args: [{ selector: 'bt-app-finder', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wrapper\">\n <ng-container *ngIf=\"appGroups; else loading\">\n <fd-toolbar [fdType]=\"'solid'\">\n <button\n fd-toolbar-item\n fd-button\n [fdMenu]=\"true\"\n [glyph]=\"'menu2'\"\n [fdType]=\"'transparent'\"\n [fdMenuTrigger]=\"menu\"\n [label]=\"selectedAppGroup?.Title\"\n *ngIf=\"deviceSize === 's'\"\n ></button>\n <fd-toolbar-spacer></fd-toolbar-spacer>\n <fd-input-group\n fd-toolbar-item\n type=\"search\"\n glyph=\"search\"\n [glyphAriaLabel]=\"'Search' | bbbTranslate\"\n [placeholder]=\"'Search' | bbbTranslate\"\n [button]=\"true\"\n [disabled]=\"false\"\n [(ngModel)]=\"searchTerm2\"\n (addOnButtonClicked)=\"onSearchSubmit()\"\n (keydown.enter)=\"onSearchSubmit()\"\n >\n </fd-input-group>\n </fd-toolbar>\n <div style=\"display: flex; overflow-y: auto\" [style.height]=\"contentHeight\">\n <div class=\"app-groups\">\n <bt-app-finder-group\n *ngIf=\"deviceSize !== 's'\"\n [appGroups]=\"appGroups\"\n [listMode]=\"true\"\n [selectedId]=\"selectedAppGroupId\"\n (selectedIdChange)=\"selectedAppGroupIdChange.emit($event)\"\n >\n </bt-app-finder-group>\n </div>\n <bt-app-finder-app-list\n [appGroup]=\"selectedAppGroup\"\n [mobile]=\"mobile\"\n [searchTerm]=\"searchTerm\"\n [pinnedAppInAppTileGroups]=\"pinnedAppInAppTileGroups\"\n (pinClick)=\"pinClick.emit($event)\"\n ></bt-app-finder-app-list>\n </div>\n <fd-menu\n #menu\n [mobile]=\"deviceSize === 's'\"\n [mobileConfig]=\"{ title: 'Groups' | bbbTranslate, hasCloseButton: true }\"\n >\n <bt-app-finder-group\n *ngIf=\"deviceSize === 's'\"\n [appGroups]=\"appGroups\"\n [selectedId]=\"selectedAppGroupId\"\n (selectedIdChange)=\"menu.close(); selectedAppGroupIdChange.emit($event)\"\n >\n </bt-app-finder-group>\n </fd-menu>\n </ng-container>\n <ng-template #loading>\n <bsu-mask></bsu-mask>\n </ng-template>\n</div>\n", styles: [":host{display:block;background-color:var(--sapBackgroundColor, #f7f7f7);color:var(--sapTextColor, #32363a)}:host ::ng-deep .fd-list__title{line-height:1.5rem}.wrapper{display:flex;flex-direction:column}fd-toolbar{width:100%}::ng-deep span.fd-toolbar__spacer{display:none}\n"] }]
1133
- }], propDecorators: { appGroups: [{
1134
- type: Input
1135
- }], deviceSize: [{
1136
- type: Input
1137
- }], sideContentSize: [{
1138
- type: Input
1139
- }], selectedAppGroup: [{
1140
- type: Input
1141
- }], selectedAppGroupId: [{
1142
- type: Input
1143
- }], mobile: [{
1144
- type: Input
1145
- }], contentDensity: [{
1146
- type: Input
1147
- }], contentHeight: [{
1148
- type: Input
1149
- }], pinnedAppInAppTileGroups: [{
1150
- type: Input
1151
- }], pinClick: [{
1152
- type: Output
1153
- }], selectedAppGroupIdChange: [{
1154
- type: Output
1155
- }] } });
1156
-
1157
- class ChangeAppTileComponent extends BaseComponent {
1158
- constructor(fb, dialogRef, bbbPipe) {
1159
- super();
1160
- this.fb = fb;
1161
- this.dialogRef = dialogRef;
1162
- this.bbbPipe = bbbPipe;
1163
- this.title = dialogRef.data.TileTitle;
1164
- this.subtitle = dialogRef.data.Subtitle;
1165
- }
1166
- ngOnInit() {
1167
- super.ngOnInit();
1168
- this.appGroupForm = this.fb.group({
1169
- title: new UntypedFormControl(this.title, [Validators.required]),
1170
- subtitle: new UntypedFormControl(this.subtitle)
1171
- });
1172
- this.RequiredText = this.bbbPipe
1173
- .transform(')AlertFieldIsMandatory')
1174
- .replace('{0}', this.bbbPipe.transform('Title'));
1175
- }
1176
- onSave() {
1177
- this.submitted = true;
1178
- if (this.appGroupForm.valid) {
1179
- this.dialogRef.close({ title: this.title, subtitle: this.subtitle });
1180
- }
1181
- }
1182
- }
1183
- ChangeAppTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ChangeAppTileComponent, deps: [{ token: i1$4.UntypedFormBuilder }, { token: i1$1.DialogRef }, { token: i1.BbbTranslatePipe }], target: i0.ɵɵFactoryTarget.Component });
1184
- ChangeAppTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ChangeAppTileComponent, selector: "bt-change-app-tile", usesInheritance: true, ngImport: i0, template: "<fd-dialog>\r\n <fd-dialog-header>\r\n <h1 fd-title>{{ dialogRef.data.$Caption }}</h1>\r\n <button fd-dialog-close-button (click)=\"dialogRef.dismiss()\"></button>\r\n </fd-dialog-header>\r\n <fd-dialog-body [formGroup]=\"appGroupForm\">\r\n <div fd-form-item>\r\n <label fd-form-label [required]=\"true\">{{ 'Title' | bbbTranslate }}</label>\r\n <fd-form-input-message-group>\r\n <fd-input-group\r\n class=\"form-control\"\r\n formControlName=\"title\"\r\n form-control\r\n [button]=\"true\"\r\n [(ngModel)]=\"title\"\r\n [state]=\"submitted && appGroupForm.controls.title.errors ? 'error' : 'information'\"\r\n >\r\n </fd-input-group>\r\n <fd-form-message *ngIf=\"submitted && appGroupForm.controls.title.errors\" type=\"error\">\r\n {{ RequiredText }}\r\n </fd-form-message>\r\n </fd-form-input-message-group>\r\n </div>\r\n <br />\r\n <div fd-form-item>\r\n <label fd-form-label>{{ 'Subtitle' | bbbTranslate }}</label>\r\n <fd-form-input-message-group>\r\n <fd-input-group formControlName=\"subtitle\" form-control [button]=\"true\" [(ngModel)]=\"subtitle\">\r\n </fd-input-group>\r\n </fd-form-input-message-group>\r\n </div>\r\n </fd-dialog-body>\r\n\r\n <fd-dialog-footer>\r\n <fd-button-bar [label]=\"'Save' | bbbTranslate\" fdType=\"emphasized\" (click)=\"onSave()\"> </fd-button-bar>\r\n <fd-button-bar\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n fdInitialFocus\r\n fdType=\"transparent\"\r\n (click)=\"this.dialogRef.close()\"\r\n >\r\n </fd-button-bar>\r\n </fd-dialog-footer>\r\n</fd-dialog>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i5$2.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "component", type: i6$1.FormItemComponent, selector: "[fd-form-item]", inputs: ["isInline", "horizontal"] }, { kind: "component", type: i6$1.FormLabelComponent, selector: "[fd-form-label]", inputs: ["required", "colon", "checkbox", "radio", "alignLabelEnd", "inlineHelpTitle", "inlineHelpGlyph", "inlineHelpTriggers", "inlineHelpBodyPlacement", "inlineHelpPlacement", "id"] }, { kind: "component", type: i6$1.FormMessageComponent, selector: "fd-form-message", inputs: ["type", "static", "embedded", "class"] }, { kind: "component", type: i6$1.FormInputMessageGroupComponent, selector: "fd-form-input-message-group", inputs: ["triggers", "closeOnOutsideClick", "fillControlMode", "noArrow", "closeOnEscapeKey", "placement", "isOpen"], outputs: ["isOpenChange"] }, { kind: "component", type: i7.InputGroupComponent, selector: "fd-input-group", inputs: ["inputTemplate", "placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledby", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "component", type: i8$1.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i8$1.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i8$1.DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: i8$1.DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "component", type: i8$1.DialogCloseButtonComponent, selector: "[fd-dialog-close-button]", inputs: ["mobile", "title"] }, { kind: "component", type: i9.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: i10$1.InitialFocusDirective, selector: "[fdInitialFocus], [fd-initial-focus]", inputs: ["fd-initial-focus", "enabled", "focusLastElement"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ChangeAppTileComponent, decorators: [{
1186
- type: Component,
1187
- args: [{ selector: 'bt-change-app-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-dialog>\r\n <fd-dialog-header>\r\n <h1 fd-title>{{ dialogRef.data.$Caption }}</h1>\r\n <button fd-dialog-close-button (click)=\"dialogRef.dismiss()\"></button>\r\n </fd-dialog-header>\r\n <fd-dialog-body [formGroup]=\"appGroupForm\">\r\n <div fd-form-item>\r\n <label fd-form-label [required]=\"true\">{{ 'Title' | bbbTranslate }}</label>\r\n <fd-form-input-message-group>\r\n <fd-input-group\r\n class=\"form-control\"\r\n formControlName=\"title\"\r\n form-control\r\n [button]=\"true\"\r\n [(ngModel)]=\"title\"\r\n [state]=\"submitted && appGroupForm.controls.title.errors ? 'error' : 'information'\"\r\n >\r\n </fd-input-group>\r\n <fd-form-message *ngIf=\"submitted && appGroupForm.controls.title.errors\" type=\"error\">\r\n {{ RequiredText }}\r\n </fd-form-message>\r\n </fd-form-input-message-group>\r\n </div>\r\n <br />\r\n <div fd-form-item>\r\n <label fd-form-label>{{ 'Subtitle' | bbbTranslate }}</label>\r\n <fd-form-input-message-group>\r\n <fd-input-group formControlName=\"subtitle\" form-control [button]=\"true\" [(ngModel)]=\"subtitle\">\r\n </fd-input-group>\r\n </fd-form-input-message-group>\r\n </div>\r\n </fd-dialog-body>\r\n\r\n <fd-dialog-footer>\r\n <fd-button-bar [label]=\"'Save' | bbbTranslate\" fdType=\"emphasized\" (click)=\"onSave()\"> </fd-button-bar>\r\n <fd-button-bar\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n fdInitialFocus\r\n fdType=\"transparent\"\r\n (click)=\"this.dialogRef.close()\"\r\n >\r\n </fd-button-bar>\r\n </fd-dialog-footer>\r\n</fd-dialog>\r\n" }]
1188
- }], ctorParameters: function () { return [{ type: i1$4.UntypedFormBuilder }, { type: i1$1.DialogRef }, { type: i1.BbbTranslatePipe }]; } });
1189
-
1190
- class TilesViewerService {
1191
- constructor(dialogService, tilesService) {
1192
- this.dialogService = dialogService;
1193
- this.tilesService = tilesService;
1194
- this._onDestroy$ = new Subject();
1195
- this._hideTileSource = new Subject();
1196
- this._updateAppTileSettingSource = new Subject();
1197
- this._deleteGroupSource = new Subject();
1198
- this._loadAppGroupSource = new Subject();
1199
- this._saveAppGroupOrdersSource = new Subject();
1200
- this.saveAppGroupOrders$ = this._saveAppGroupOrdersSource.asObservable();
1201
- this._resetAppGroupSource = new Subject();
1202
- this.resetAppGroup$ = this._resetAppGroupSource.asObservable();
1203
- this._hideAppGroupSource = new Subject();
1204
- this.hideAppGroup$ = this._hideAppGroupSource.asObservable();
1205
- this._viewLoadingSource = new BehaviorSubject(false);
1206
- this.viewLoading$ = this._viewLoadingSource.asObservable().pipe(debounceTime(200));
1207
- this.hideTile$ = this._hideTileSource.asObservable();
1208
- this.updateAppTileSetting$ = this._updateAppTileSettingSource.asObservable();
1209
- this.deleteAppGroup$ = this._deleteGroupSource.asObservable();
1210
- this._loadAppGroupSource
1211
- .asObservable()
1212
- .pipe(takeUntil(this._onDestroy$))
1213
- .subscribe((group) => {
1214
- this.tilesService.loadAppTileGroups(group);
1215
- });
1216
- this.hideTile$
1217
- .pipe(tap(() => this.setLoading()), takeUntil(this._onDestroy$), exhaustMap((appTile) => this.tilesService
1218
- .singlePinTileChanged(appTile.AppTile ? appTile.AppTile.Id : appTile.Id)
1219
- .pipe(finalize(() => this.setLoaded()))), finalize(() => this.setLoaded()))
1220
- .subscribe();
1221
- this.updateAppTileSetting$
1222
- .pipe(takeUntil(this._onDestroy$), tap(() => this.setLoading()), exhaustMap((appTile) => this.tilesService.changeAppTileSetting(appTile).pipe(finalize(() => {
1223
- this.setLoaded();
1224
- }))), finalize(() => {
1225
- this.setLoaded();
1226
- }))
1227
- .subscribe();
1228
- this.deleteAppGroup$
1229
- .pipe(tap(() => this.setLoading()), takeUntil(this._onDestroy$), exhaustMap((appGroup) => this.tilesService.deleteAppGroup(appGroup).pipe(finalize(() => {
1230
- this.setLoaded();
1231
- }))))
1232
- .subscribe();
1233
- this.resetAppGroup$
1234
- .pipe(takeUntil(this._onDestroy$), tap(() => this.setLoading()), exhaustMap((appGroup) => this.tilesService.resetAppGroupSetting(appGroup).pipe(finalize(() => {
1235
- this.setLoaded();
1236
- }))), finalize(() => {
1237
- this.setLoaded();
1238
- }))
1239
- .subscribe();
1240
- this.hideAppGroup$
1241
- .pipe(takeUntil(this._onDestroy$), tap(() => this.setLoading()), exhaustMap((appGroup) => this.tilesService.toggleAppGroupSettingVisible(appGroup).pipe(finalize(() => {
1242
- this.setLoaded();
1243
- }))), finalize(() => {
1244
- this.setLoaded();
1245
- }))
1246
- .subscribe();
1247
- this.saveAppGroupOrders$
1248
- .pipe(takeUntil(this._onDestroy$), tap(() => this.setLoading()), exhaustMap((appGroups) => this.tilesService.saveAppGroupOrders(appGroups).pipe(finalize(() => {
1249
- this.setLoaded();
1250
- }))), finalize(() => {
1251
- this.setLoaded();
1252
- }))
1253
- .subscribe();
1254
- }
1255
- get selectedAppGroupId() {
1256
- return localStorage.getItem('selectedTab') ?? '';
1257
- }
1258
- set selectedAppGroupId(groupId) {
1259
- localStorage.setItem('selectedTab', groupId);
1260
- }
1261
- setSelectedTab(group) {
1262
- this.selectedAppGroupId = group.Id;
1263
- }
1264
- loadAppGroup(group) {
1265
- this._loadAppGroupSource.next(group);
1266
- }
1267
- ngOnDestroy() {
1268
- this._onDestroy$.next();
1269
- }
1270
- openRenameForm(appTile) {
1271
- const newGroupDialogRef = this.dialogService.open(ChangeAppTileComponent, {
1272
- data: appTile,
1273
- verticalPadding: true,
1274
- responsivePadding: true
1275
- });
1276
- newGroupDialogRef.afterClosed.subscribe((setting) => {
1277
- if (setting) {
1278
- const newAppTile = { ...appTile };
1279
- newAppTile.Title = newAppTile.TileTitle = setting.title;
1280
- newAppTile.Subtitle = setting.subtitle;
1281
- this._updateAppTileSettingSource.next(newAppTile);
1282
- }
1283
- });
1284
- }
1285
- resetAppGroup(appGroup) {
1286
- this._resetAppGroupSource.next(appGroup);
1287
- }
1288
- toggleAppGroupSettingVisible(appGroup) {
1289
- this._hideAppGroupSource.next(appGroup);
1290
- }
1291
- deleteAppGroup(appGroup) {
1292
- this._deleteGroupSource.next(appGroup);
1293
- }
1294
- hideTile(appTile) {
1295
- this._hideTileSource.next(appTile);
1296
- }
1297
- saveAppGroupOrders(appGroups) {
1298
- this._saveAppGroupOrdersSource.next(appGroups);
1299
- }
1300
- setLoaded() {
1301
- this._viewLoadingSource.next(false);
1302
- }
1303
- setLoading() {
1304
- this._viewLoadingSource.next(true);
1305
- }
1306
- }
1307
- TilesViewerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerService, deps: [{ token: i1$1.DialogService }, { token: TilesService }], target: i0.ɵɵFactoryTarget.Injectable });
1308
- TilesViewerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerService });
1309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerService, decorators: [{
1310
- type: Injectable
1311
- }], ctorParameters: function () { return [{ type: i1$1.DialogService }, { type: TilesService }]; } });
1312
-
1313
- class TilesViewerComponent extends BaseComponent {
1314
- constructor(_cdr, _saveScrollPosition) {
1315
- super();
1316
- this._cdr = _cdr;
1317
- this._saveScrollPosition = _saveScrollPosition;
1318
- this.pageContentClass = true;
1319
- this.stackContentChange = new EventEmitter();
1320
- this.closeEditHome = new EventEmitter();
1321
- this.save = new EventEmitter();
1322
- this.listDropped = new EventEmitter();
1323
- this.tabChanged = new EventEmitter();
1324
- this.toggleGroup = new EventEmitter();
1325
- this.resetGroup = new EventEmitter();
1326
- this.deleteGroup = new EventEmitter();
1327
- this.hideAppTileClick = new EventEmitter();
1328
- this.renameAppTileClick = new EventEmitter();
1329
- this.tilesDropped = new EventEmitter();
1330
- this._rtl = BarsaApi.LoginFormData.IsRtl;
1331
- this.id = 'tilesviewer';
1332
- }
1333
- ngOnInit() {
1334
- super.ngOnInit();
1335
- const elDom = this.contentPageRef.nativeElement;
1336
- elDom.addEventListener('scroll', () => {
1337
- this._saveScrollPosition.setScrollPosition(this.id, elDom.scrollTop);
1338
- });
1339
- this._tilesIntersection = fromIntersectionObserver(elDom, {
1340
- root: null,
1341
- rootMargin: '0px',
1342
- threshold: 0
1343
- }, 0, false)
1344
- .pipe(takeUntil$1(this._onDestroy$))
1345
- .subscribe((e) => {
1346
- this._onInView(e);
1347
- });
1348
- }
1349
- onSelectedTabChange(selectedTab, appTileGroups) {
1350
- let firstSelected = false;
1351
- if (!this.selectedTabTitle) {
1352
- firstSelected = true;
1353
- }
1354
- const selectedTabTitle = selectedTab.title || '';
1355
- this.selectedTabTitle = selectedTabTitle;
1356
- setTimeout(() => {
1357
- this.tabChanged.emit({
1358
- firstSelected,
1359
- selectedTabTitle,
1360
- tabPanels: this.tabListComponent.tabPanels.toArray(),
1361
- appTileGroups
1362
- });
1363
- });
1364
- }
1365
- onDropGroup(appTileGroups, event) {
1366
- if (!this.edit) {
1367
- return;
1368
- }
1369
- this.listDropped.emit({ appTileGroups, event });
1370
- }
1371
- onDrop($event) {
1372
- this.tilesDropped.emit($event);
1373
- }
1374
- onStackContentChanged(checked) {
1375
- this.stackContentChange.emit(checked);
1376
- }
1377
- onExitEditHome(appGroups) {
1378
- this.save.emit(appGroups);
1379
- }
1380
- onCloseEditHome() {
1381
- this.closeEditHome.emit();
1382
- }
1383
- _trackById(item, index) {
1384
- return item ? item.Id : index;
1385
- }
1386
- _onInView(e) {
1387
- this.formVisibilityStatus = e;
1388
- if (this.formVisibilityStatus === IntersectionStatus.Visible) {
1389
- const scrollTop = this._saveScrollPosition.getScrollPosition(this.id);
1390
- // window.scrollTo({ top: scrollTop, behavior: 'smooth' });
1391
- this.contentPageRef.nativeElement.scrollTop = scrollTop;
1392
- // this._cdr.detectChanges();
1393
- }
1394
- }
1395
- }
1396
- TilesViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.SaveScrollPositionService }], target: i0.ɵɵFactoryTarget.Component });
1397
- TilesViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TilesViewerComponent, selector: "bt-tiles-viewer", inputs: { appTileGroups: "appTileGroups", loading: "loading", edit: "edit", rtl: "rtl", stackContent: "stackContent", deviceSize: "deviceSize", selectedAppGroupId: "selectedAppGroupId", DynamicComponents: "DynamicComponents" }, outputs: { stackContentChange: "stackContentChange", closeEditHome: "closeEditHome", save: "save", listDropped: "listDropped", tabChanged: "tabChanged", toggleGroup: "toggleGroup", resetGroup: "resetGroup", deleteGroup: "deleteGroup", hideAppTileClick: "hideAppTileClick", renameAppTileClick: "renameAppTileClick", tilesDropped: "tilesDropped" }, host: { properties: { "class.page-content": "this.pageContentClass", "attr.rtl": "this._rtl" } }, viewQueries: [{ propertyName: "tabListComponent", first: true, predicate: TabListComponent, descendants: true }, { propertyName: "contentPageRef", first: true, predicate: ["contentPage"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<fd-dynamic-page\n size=\"large\"\n [ariaLabel]=\"'HomeEdit' | bbbTranslate\"\n [autoResponsive]=\"true\"\n [class.stack-mode]=\"stackContent\"\n>\n <fd-dynamic-page-header *ngIf=\"edit\" [title]=\"'HomeEdit' | bbbTranslate\">\n <fd-dynamic-page-global-actions>\n <fd-toolbar *ngIf=\"edit\" fdType=\"transparent\" [clearBorder]=\"true\">\n <label fd-form-label fd-toolbar-item>Stacked Content </label>\n <fd-switch\n fd-toolbar-item\n [checked]=\"stackContent\"\n (checkedChange)=\"onStackContentChanged($event)\"\n ></fd-switch>\n </fd-toolbar>\n </fd-dynamic-page-global-actions>\n <fd-dynamic-page-layout-actions>\n <fd-toolbar fdType=\"transparent\" [clearBorder]=\"true\">\n <button fd-button fdType=\"transparent\" aria-label=\"Close\" title=\"Close\" (click)=\"onCloseEditHome()\">\n <i class=\"sap-icon--decline\"></i>\n </button>\n </fd-toolbar>\n </fd-dynamic-page-layout-actions>\n </fd-dynamic-page-header>\n <fd-dynamic-page-content #contentPage>\n <ng-container\n *ngTemplateOutlet=\"\n stackContent ? renderTabsStacked : renderTabs;\n context: {\n $implicit: appTileGroups,\n stackContent: stackContent,\n edit: edit\n }\n \"\n ></ng-container>\n </fd-dynamic-page-content>\n <fd-dynamic-page-footer>\n <div fd-bar barDesign=\"footer\" *ngIf=\"edit\">\n <div fd-bar-right>\n <fd-button-bar\n [label]=\"'SaveAndClose' | bbbTranslate\"\n fdType=\"emphasized\"\n (click)=\"onExitEditHome(appTileGroups)\"\n ></fd-button-bar>\n </div>\n </div>\n </fd-dynamic-page-footer>\n</fd-dynamic-page>\n\n<ng-template #loadingTpl>\n <bsu-mask></bsu-mask>\n</ng-template>\n\n<ng-template #renderTabs let-appTileGroups let-stackContent=\"stackContent\" let-edit=\"edit\">\n <fd-tab-list\n class=\"tile-tabs\"\n [size]=\"deviceSize\"\n [collapseOverflow]=\"true\"\n [expandOverflowText]=\"'More' | bbbTranslate\"\n cdkDropList\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onDropGroup(appTileGroups, $event)\"\n (selectedTabChange)=\"onSelectedTabChange($event, appTileGroups)\"\n >\n <ng-container *ngFor=\"let appTileGroup of appTileGroups; let i = index; trackBy: _trackById\">\n <fd-tab\n *ngIf=\"edit || appTileGroup.navigatorVisible\"\n [title]=\"appTileGroup.navigatorTitle | bbbTranslate\"\n [ngClass]=\"'fd-tabs--' + deviceSize\"\n [class.is-expanded]=\"selectedTabTitle === (appTileGroup.navigatorTitle | bbbTranslate)\"\n >\n <fd-dynamic-page-content [id]=\"appTileGroup.Id\">\n <ng-container\n *ngTemplateOutlet=\"\n renderGroup;\n context: {\n $implicit: appTileGroup,\n stackContent: stackContent,\n edit: edit,\n isAppTileSubGroup: false\n }\n \"\n ></ng-container>\n </fd-dynamic-page-content>\n </fd-tab>\n </ng-container>\n </fd-tab-list>\n</ng-template>\n<ng-template #renderTabsStacked let-appTileGroups let-stackContent=\"stackContent\" let-edit=\"edit\">\n <fd-tab-list\n class=\"tile-tabs\"\n [size]=\"deviceSize\"\n [collapseOverflow]=\"true\"\n [expandOverflowText]=\"'More' | bbbTranslate\"\n [stackContent]=\"true\"\n [maxContentHeight]=\"stackContent ? 'calc(99vh - 2.75rem - 44px)' : 'calc(100vh - 44px)'\"\n cdkDropList\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onDropGroup(appTileGroups, $event)\"\n >\n <ng-container *ngFor=\"let appTileGroup of appTileGroups; let i = index; trackBy: _trackById\">\n <fd-tab\n *ngIf=\"edit || appTileGroup.navigatorVisible\"\n [title]=\"appTileGroup.navigatorTitle | bbbTranslate\"\n [ngClass]=\"'fd-tabs--' + deviceSize\"\n [count]=\"appTileGroup.$Children?.length\"\n >\n <fd-dynamic-page-content [id]=\"appTileGroup.Id\">\n <ng-container\n *ngTemplateOutlet=\"\n renderGroup;\n context: {\n $implicit: appTileGroup,\n stackContent: stackContent,\n edit: edit,\n isAppTileSubGroup: false\n }\n \"\n ></ng-container>\n </fd-dynamic-page-content>\n </fd-tab>\n </ng-container>\n </fd-tab-list>\n</ng-template>\n<ng-template\n #renderGroup\n let-appTileGroup\n let-stackContent=\"stackContent\"\n let-edit=\"edit\"\n let-isAppTileSubGroup=\"isAppTileSubGroup\"\n>\n <bt-tiles-viewer-group\n [appTileGroup]=\"appTileGroup\"\n [edit]=\"edit\"\n [rtl]=\"rtl\"\n [deviceSize]=\"deviceSize\"\n [stackContent]=\"stackContent\"\n [isAppTileSubGroup]=\"isAppTileSubGroup\"\n (tilesDropped)=\"onDrop($event)\"\n (renameAppTileClick)=\"renameAppTileClick.emit($event)\"\n (hideAppTileClick)=\"hideAppTileClick.emit($event)\"\n (resetGroup)=\"resetGroup.emit($event)\"\n (deleteGroup)=\"deleteGroup.emit($event)\"\n (toggleGroup)=\"toggleGroup.emit($event)\"\n ></bt-tiles-viewer-group>\n</ng-template>\n", styles: [":host{display:block}:host ::ng-deep .fd-panel__header{border:none;padding-left:0;padding-right:0}:host ::ng-deep fd-panel[edithome=false] .fd-panel__header:first-child{display:none}:host ::ng-deep .fd-panel__content{border-bottom:none;padding:1px}:host ::ng-deep fd-tab-list[noSpy] .fd-tabs__content{overflow-y:initial}:host ::ng-deep fd-dynamic-page section{height:calc(100vh - 44px)!important}:host ::ng-deep .footer-spacer{height:0}.fd-tabs__panel:not(.is-expanded){display:none}fd-dynamic-page.stack-mode fd-dynamic-page-content{overflow-y:hidden}fd-dynamic-page-content{padding:0!important}@media (max-width: 599px){bnrc-dynamic-component{margin-right:0!important;margin-left:0!important}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: i5$2.BarComponent, selector: "[fd-bar]", inputs: ["class", "barDesign", "inPage", "inHomePage", "size"] }, { kind: "directive", type: i5$2.BarRightDirective, selector: "[fd-bar-right]" }, { kind: "component", type: i5$2.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i6$2.DynamicPageComponent, selector: "fd-dynamic-page", inputs: ["role", "ariaLabel", "background", "autoResponsive", "size", "offset", "expandContent"] }, { kind: "component", type: i6$2.DynamicPageHeaderComponent, selector: "fd-dynamic-page-header", inputs: ["title", "subtitle"] }, { kind: "component", type: i6$2.DynamicPageGlobalActionsComponent, selector: "fd-dynamic-page-global-actions" }, { kind: "component", type: i6$2.DynamicPageLayoutActionsComponent, selector: "fd-dynamic-page-layout-actions" }, { kind: "component", type: i6$2.DynamicPageContentComponent, selector: "fd-dynamic-page-content", inputs: ["tabLabel", "id"] }, { kind: "component", type: i6$2.DynamicPageFooterComponent, selector: "fd-dynamic-page-footer" }, { kind: "component", type: i6$1.FormLabelComponent, selector: "[fd-form-label]", inputs: ["required", "colon", "checkbox", "radio", "alignLabelEnd", "inlineHelpTitle", "inlineHelpGlyph", "inlineHelpTriggers", "inlineHelpBodyPlacement", "inlineHelpPlacement", "id"] }, { kind: "component", type: i8$2.SwitchComponent, selector: "fd-switch", inputs: ["activeText", "inactiveText", "disabled", "id", "name", "required", "checked", "semantic", "ariaLabel", "ariaLabelledby", "ariaLabelledBy", "semanticAcceptLabel", "semanticDeclineLabel"], outputs: ["checkedChange"] }, { kind: "component", type: i9$1.TabListComponent, selector: "fd-tab-list", inputs: ["size", "mode", "collapseOverflow", "maxVisibleTabs", "stackContent", "maxContentHeight", "collapsibleTabs", "expandOverflowText", "defaultTab", "selectDefaultOnTabsChange"], outputs: ["selectedTabChange", "visibleItemsCount", "hiddenItemsCount"] }, { kind: "component", type: i9$1.TabPanelComponent, selector: "fd-tab", inputs: ["id", "ariaLabel", "ariaLabelledBy", "title", "count", "glyph", "header", "disabled", "tabState"], outputs: ["opened", "closed"] }, { kind: "component", type: i10.ToolbarComponent, selector: "fd-toolbar", inputs: ["class", "shouldOverflow", "fdType", "hasTitle", "title", "active", "clearBorder", "forceOverflow", "tabindex"] }, { kind: "directive", type: i10.ToolbarItemDirective, selector: "[fd-toolbar-item]" }, { kind: "component", type: i5.MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }, { kind: "component", type: TilesViewerGroupComponent, selector: "bt-tiles-viewer-group", inputs: ["appTileGroup", "stackContent", "edit", "rtl", "isAppTileSubGroup", "deviceSize"], outputs: ["tilesDropped", "hideAppTileClick", "renameAppTileClick", "toggleGroup", "resetGroup", "deleteGroup"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerComponent, decorators: [{
1399
- type: Component,
1400
- args: [{ selector: 'bt-tiles-viewer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-dynamic-page\n size=\"large\"\n [ariaLabel]=\"'HomeEdit' | bbbTranslate\"\n [autoResponsive]=\"true\"\n [class.stack-mode]=\"stackContent\"\n>\n <fd-dynamic-page-header *ngIf=\"edit\" [title]=\"'HomeEdit' | bbbTranslate\">\n <fd-dynamic-page-global-actions>\n <fd-toolbar *ngIf=\"edit\" fdType=\"transparent\" [clearBorder]=\"true\">\n <label fd-form-label fd-toolbar-item>Stacked Content </label>\n <fd-switch\n fd-toolbar-item\n [checked]=\"stackContent\"\n (checkedChange)=\"onStackContentChanged($event)\"\n ></fd-switch>\n </fd-toolbar>\n </fd-dynamic-page-global-actions>\n <fd-dynamic-page-layout-actions>\n <fd-toolbar fdType=\"transparent\" [clearBorder]=\"true\">\n <button fd-button fdType=\"transparent\" aria-label=\"Close\" title=\"Close\" (click)=\"onCloseEditHome()\">\n <i class=\"sap-icon--decline\"></i>\n </button>\n </fd-toolbar>\n </fd-dynamic-page-layout-actions>\n </fd-dynamic-page-header>\n <fd-dynamic-page-content #contentPage>\n <ng-container\n *ngTemplateOutlet=\"\n stackContent ? renderTabsStacked : renderTabs;\n context: {\n $implicit: appTileGroups,\n stackContent: stackContent,\n edit: edit\n }\n \"\n ></ng-container>\n </fd-dynamic-page-content>\n <fd-dynamic-page-footer>\n <div fd-bar barDesign=\"footer\" *ngIf=\"edit\">\n <div fd-bar-right>\n <fd-button-bar\n [label]=\"'SaveAndClose' | bbbTranslate\"\n fdType=\"emphasized\"\n (click)=\"onExitEditHome(appTileGroups)\"\n ></fd-button-bar>\n </div>\n </div>\n </fd-dynamic-page-footer>\n</fd-dynamic-page>\n\n<ng-template #loadingTpl>\n <bsu-mask></bsu-mask>\n</ng-template>\n\n<ng-template #renderTabs let-appTileGroups let-stackContent=\"stackContent\" let-edit=\"edit\">\n <fd-tab-list\n class=\"tile-tabs\"\n [size]=\"deviceSize\"\n [collapseOverflow]=\"true\"\n [expandOverflowText]=\"'More' | bbbTranslate\"\n cdkDropList\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onDropGroup(appTileGroups, $event)\"\n (selectedTabChange)=\"onSelectedTabChange($event, appTileGroups)\"\n >\n <ng-container *ngFor=\"let appTileGroup of appTileGroups; let i = index; trackBy: _trackById\">\n <fd-tab\n *ngIf=\"edit || appTileGroup.navigatorVisible\"\n [title]=\"appTileGroup.navigatorTitle | bbbTranslate\"\n [ngClass]=\"'fd-tabs--' + deviceSize\"\n [class.is-expanded]=\"selectedTabTitle === (appTileGroup.navigatorTitle | bbbTranslate)\"\n >\n <fd-dynamic-page-content [id]=\"appTileGroup.Id\">\n <ng-container\n *ngTemplateOutlet=\"\n renderGroup;\n context: {\n $implicit: appTileGroup,\n stackContent: stackContent,\n edit: edit,\n isAppTileSubGroup: false\n }\n \"\n ></ng-container>\n </fd-dynamic-page-content>\n </fd-tab>\n </ng-container>\n </fd-tab-list>\n</ng-template>\n<ng-template #renderTabsStacked let-appTileGroups let-stackContent=\"stackContent\" let-edit=\"edit\">\n <fd-tab-list\n class=\"tile-tabs\"\n [size]=\"deviceSize\"\n [collapseOverflow]=\"true\"\n [expandOverflowText]=\"'More' | bbbTranslate\"\n [stackContent]=\"true\"\n [maxContentHeight]=\"stackContent ? 'calc(99vh - 2.75rem - 44px)' : 'calc(100vh - 44px)'\"\n cdkDropList\n cdkDropListOrientation=\"vertical\"\n (cdkDropListDropped)=\"onDropGroup(appTileGroups, $event)\"\n >\n <ng-container *ngFor=\"let appTileGroup of appTileGroups; let i = index; trackBy: _trackById\">\n <fd-tab\n *ngIf=\"edit || appTileGroup.navigatorVisible\"\n [title]=\"appTileGroup.navigatorTitle | bbbTranslate\"\n [ngClass]=\"'fd-tabs--' + deviceSize\"\n [count]=\"appTileGroup.$Children?.length\"\n >\n <fd-dynamic-page-content [id]=\"appTileGroup.Id\">\n <ng-container\n *ngTemplateOutlet=\"\n renderGroup;\n context: {\n $implicit: appTileGroup,\n stackContent: stackContent,\n edit: edit,\n isAppTileSubGroup: false\n }\n \"\n ></ng-container>\n </fd-dynamic-page-content>\n </fd-tab>\n </ng-container>\n </fd-tab-list>\n</ng-template>\n<ng-template\n #renderGroup\n let-appTileGroup\n let-stackContent=\"stackContent\"\n let-edit=\"edit\"\n let-isAppTileSubGroup=\"isAppTileSubGroup\"\n>\n <bt-tiles-viewer-group\n [appTileGroup]=\"appTileGroup\"\n [edit]=\"edit\"\n [rtl]=\"rtl\"\n [deviceSize]=\"deviceSize\"\n [stackContent]=\"stackContent\"\n [isAppTileSubGroup]=\"isAppTileSubGroup\"\n (tilesDropped)=\"onDrop($event)\"\n (renameAppTileClick)=\"renameAppTileClick.emit($event)\"\n (hideAppTileClick)=\"hideAppTileClick.emit($event)\"\n (resetGroup)=\"resetGroup.emit($event)\"\n (deleteGroup)=\"deleteGroup.emit($event)\"\n (toggleGroup)=\"toggleGroup.emit($event)\"\n ></bt-tiles-viewer-group>\n</ng-template>\n", styles: [":host{display:block}:host ::ng-deep .fd-panel__header{border:none;padding-left:0;padding-right:0}:host ::ng-deep fd-panel[edithome=false] .fd-panel__header:first-child{display:none}:host ::ng-deep .fd-panel__content{border-bottom:none;padding:1px}:host ::ng-deep fd-tab-list[noSpy] .fd-tabs__content{overflow-y:initial}:host ::ng-deep fd-dynamic-page section{height:calc(100vh - 44px)!important}:host ::ng-deep .footer-spacer{height:0}.fd-tabs__panel:not(.is-expanded){display:none}fd-dynamic-page.stack-mode fd-dynamic-page-content{overflow-y:hidden}fd-dynamic-page-content{padding:0!important}@media (max-width: 599px){bnrc-dynamic-component{margin-right:0!important;margin-left:0!important}}\n"] }]
1401
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.SaveScrollPositionService }]; }, propDecorators: { tabListComponent: [{
1402
- type: ViewChild,
1403
- args: [TabListComponent]
1404
- }], contentPageRef: [{
1405
- type: ViewChild,
1406
- args: ['contentPage', { static: true, read: ElementRef }]
1407
- }], pageContentClass: [{
1408
- type: HostBinding,
1409
- args: ['class.page-content']
1410
- }], appTileGroups: [{
1411
- type: Input
1412
- }], loading: [{
1413
- type: Input
1414
- }], edit: [{
1415
- type: Input
1416
- }], rtl: [{
1417
- type: Input
1418
- }], stackContent: [{
1419
- type: Input
1420
- }], deviceSize: [{
1421
- type: Input
1422
- }], selectedAppGroupId: [{
1423
- type: Input
1424
- }], DynamicComponents: [{
1425
- type: Input
1426
- }], stackContentChange: [{
1427
- type: Output
1428
- }], closeEditHome: [{
1429
- type: Output
1430
- }], save: [{
1431
- type: Output
1432
- }], listDropped: [{
1433
- type: Output
1434
- }], tabChanged: [{
1435
- type: Output
1436
- }], toggleGroup: [{
1437
- type: Output
1438
- }], resetGroup: [{
1439
- type: Output
1440
- }], deleteGroup: [{
1441
- type: Output
1442
- }], hideAppTileClick: [{
1443
- type: Output
1444
- }], renameAppTileClick: [{
1445
- type: Output
1446
- }], tilesDropped: [{
1447
- type: Output
1448
- }], _rtl: [{
1449
- type: HostBinding,
1450
- args: ['attr.rtl']
1451
- }] } });
1452
-
1453
- class TilesViewerContainerComponent extends BaseComponent {
1454
- constructor(_portalService, _tilesService, _tilesViewerService) {
1455
- super();
1456
- this._portalService = _portalService;
1457
- this._tilesService = _tilesService;
1458
- this._tilesViewerService = _tilesViewerService;
1459
- this.changedOrder = false;
1460
- this.userStackContent = false;
1461
- this.initialStackContentValue = false;
1462
- this.firstSelected = false;
1463
- this.stackContent$ = this._portalService.userPortalSettings$.pipe(takeUntil(this._onDestroy$), map((settings) => settings['UserPortalSettings']), map((settings) => settings?.TilesStackContent), distinctUntilChanged());
1464
- this.stackContent$.subscribe((stackContent) => {
1465
- this.initialStackContentValue = this.userStackContent = stackContent;
1466
- if (stackContent) {
1467
- }
1468
- });
1469
- }
1470
- ngOnInit() {
1471
- super.ngOnInit();
1472
- this.viewLoading$ = this._tilesViewerService.viewLoading$;
1473
- this.rtl$ = this._portalService.rtl$;
1474
- this.deviceSize$ = this._portalService.deviceSize$;
1475
- this.edit$ = this._tilesService.edit$;
1476
- this.appTileGroups$ = this._tilesService.homeAppTileGroups$;
1477
- this.appTileGroups$.pipe(withLatestFrom(this.stackContent$)).subscribe(([tiles, stackContent]) => {
1478
- if (tiles && stackContent) {
1479
- tiles.forEach((c) => {
1480
- this._tilesService.loadAppTileGroups(c);
1481
- });
1482
- }
1483
- });
1484
- }
1485
- ngOnDestroy() {
1486
- super.ngOnDestroy();
1487
- this._tilesService.setEditHome(false);
1488
- }
1489
- onSelectedTabChange(e) {
1490
- const { firstSelected, selectedTabTitle, appTileGroups: appGroups, tabPanels } = e;
1491
- let appTileGroup;
1492
- if (firstSelected) {
1493
- const lastSelectedAppGroupId = this._tilesViewerService.selectedAppGroupId;
1494
- if (lastSelectedAppGroupId) {
1495
- appTileGroup = appGroups.find((c) => c.Id === lastSelectedAppGroupId);
1496
- if (appTileGroup) {
1497
- const lastTab = tabPanels.find((c) => c.title === appTileGroup?.navigatorTitle);
1498
- if (lastTab) {
1499
- appTileGroup = appGroups.find((c) => c.Id === lastSelectedAppGroupId);
1500
- lastTab.open(true);
1501
- }
1502
- }
1503
- }
1504
- }
1505
- if (!appTileGroup) {
1506
- appTileGroup = appGroups.find((c) => c.navigatorTitle === selectedTabTitle);
1507
- }
1508
- if (appTileGroup) {
1509
- this._tilesViewerService.setSelectedTab(appTileGroup);
1510
- this._tilesViewerService.loadAppGroup(appTileGroup);
1511
- }
1512
- }
1513
- onDropGroup(e) {
1514
- const { event, appTileGroups: appGroups } = e;
1515
- moveItemInArray(appGroups, event.previousIndex, event.currentIndex);
1516
- this.changedOrder = true;
1517
- // this.saveOrderAppTiles(allApps, group);
1518
- }
1519
- onDrop(e) {
1520
- const { appTileGroup: group, event } = e;
1521
- const previousContainer = event.previousContainer;
1522
- const container = event.container;
1523
- const containerIsTile = container.data.isTile;
1524
- const previousItems = previousContainer.data.items;
1525
- const containerItems = container.data.items;
1526
- const { previousIndex, currentIndex } = event;
1527
- if (previousContainer === container) {
1528
- moveItemInArray(previousItems, previousIndex, currentIndex);
1529
- if (containerIsTile) {
1530
- this._saveOrderAppTiles(group);
1531
- }
1532
- else {
1533
- this._saveOrderActionLinks(group);
1534
- }
1535
- }
1536
- else {
1537
- transferArrayItem(previousItems, containerItems, previousIndex, currentIndex);
1538
- const appTileIdTransferedId = containerItems[currentIndex]?.AppTile?.Id ?? containerItems[currentIndex].Id;
1539
- if (containerIsTile) {
1540
- this._saveOrderActionLinks(group);
1541
- this._saveOrderAppTiles(group, appTileIdTransferedId);
1542
- }
1543
- else {
1544
- this._saveOrderAppTiles(group);
1545
- this._saveOrderActionLinks(group, appTileIdTransferedId);
1546
- }
1547
- }
1548
- }
1549
- onStackContentChanged(checked) {
1550
- this.userStackContent = checked;
1551
- }
1552
- onExitEditHome(appTileGroups) {
1553
- if (this.changedOrder) {
1554
- this._tilesViewerService.saveAppGroupOrders(appTileGroups);
1555
- this.changedOrder = false;
1556
- }
1557
- if (this.userStackContent !== this.initialStackContentValue) {
1558
- this._tilesService.saveTilesStackContent(this.userStackContent);
1559
- }
1560
- this._setEditHome(false);
1561
- }
1562
- onCloseEditHome() {
1563
- this._setEditHome(false);
1564
- }
1565
- onDelete(appTileGroup) {
1566
- this._tilesViewerService.deleteAppGroup(appTileGroup);
1567
- }
1568
- onToggleShowHide(appTileGroup) {
1569
- this._tilesViewerService.toggleAppGroupSettingVisible(appTileGroup);
1570
- }
1571
- onReset(appTileGroup) {
1572
- this._tilesViewerService.resetAppGroup(appTileGroup);
1573
- }
1574
- onHideAppTile(appTile) {
1575
- this._tilesViewerService.hideTile(appTile);
1576
- }
1577
- onRenameAppTile(appTile) {
1578
- this._tilesViewerService.openRenameForm(appTile);
1579
- }
1580
- _setEditHome(val) {
1581
- this._tilesService.setEditHome(val);
1582
- }
1583
- _saveOrderAppTiles(appTileGroup, appTileIdTransferedId = '0') {
1584
- const appTiles = appTileGroup.navigatorTiles.map((appTile) => appTile.AppTile ? appTile.AppTile.Id : appTile.Id);
1585
- this._tilesService.saveOrderAppTiles(appTileGroup, appTiles, false, appTileIdTransferedId);
1586
- }
1587
- _saveOrderActionLinks(appTileGroup, appTileIdTransferedId = '0') {
1588
- const actionLinks = appTileGroup.navigatorActionLinks.map((appTile) => appTile.AppTile ? appTile.AppTile.Id : appTile.Id);
1589
- this._tilesService.saveOrderAppTiles(appTileGroup, actionLinks, true, appTileIdTransferedId);
1590
- }
1591
- }
1592
- TilesViewerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerContainerComponent, deps: [{ token: i1.PortalService }, { token: TilesService }, { token: TilesViewerService }], target: i0.ɵɵFactoryTarget.Component });
1593
- TilesViewerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: TilesViewerContainerComponent, selector: "bt-tiles-viewer-container", providers: [TilesViewerService], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"appTileGroups$ | async as appTileGroups; else loading\">\n <bt-tiles-viewer\n *ngIf=\"appTileGroups; else empty\"\n [appTileGroups]=\"appTileGroups\"\n [loading]=\"(viewLoading$ | async)!!\"\n [edit]=\"(edit$ | async)!!\"\n [rtl]=\"(rtl$ | async)!!\"\n [stackContent]=\"(stackContent$ | async)!!\"\n [deviceSize]=\"(deviceSize$ | async)!!\"\n (stackContentChange)=\"onStackContentChanged($event)\"\n (closeEditHome)=\"onCloseEditHome()\"\n (save)=\"onExitEditHome($event)\"\n (listDropped)=\"onDropGroup($event)\"\n (tabChanged)=\"onSelectedTabChange($event)\"\n (toggleGroup)=\"onToggleShowHide($event)\"\n (resetGroup)=\"onReset($event)\"\n (deleteGroup)=\"onDelete($event)\"\n (tilesDropped)=\"onDrop($event)\"\n (hideAppTileClick)=\"onHideAppTile($event)\"\n (renameAppTileClick)=\"onRenameAppTile($event)\"\n ></bt-tiles-viewer>\n</ng-container>\n<ng-template #empty>\n <bsu-no-data></bsu-no-data>\n</ng-template>\n\n<ng-template #loading>\n <bsu-mask></bsu-mask>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }, { kind: "component", type: i5.NoDataComponent, selector: "bsu-no-data", inputs: ["simple"] }, { kind: "component", type: TilesViewerComponent, selector: "bt-tiles-viewer", inputs: ["appTileGroups", "loading", "edit", "rtl", "stackContent", "deviceSize", "selectedAppGroupId", "DynamicComponents"], outputs: ["stackContentChange", "closeEditHome", "save", "listDropped", "tabChanged", "toggleGroup", "resetGroup", "deleteGroup", "hideAppTileClick", "renameAppTileClick", "tilesDropped"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TilesViewerContainerComponent, decorators: [{
1595
- type: Component,
1596
- args: [{ selector: 'bt-tiles-viewer-container', providers: [TilesViewerService], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"appTileGroups$ | async as appTileGroups; else loading\">\n <bt-tiles-viewer\n *ngIf=\"appTileGroups; else empty\"\n [appTileGroups]=\"appTileGroups\"\n [loading]=\"(viewLoading$ | async)!!\"\n [edit]=\"(edit$ | async)!!\"\n [rtl]=\"(rtl$ | async)!!\"\n [stackContent]=\"(stackContent$ | async)!!\"\n [deviceSize]=\"(deviceSize$ | async)!!\"\n (stackContentChange)=\"onStackContentChanged($event)\"\n (closeEditHome)=\"onCloseEditHome()\"\n (save)=\"onExitEditHome($event)\"\n (listDropped)=\"onDropGroup($event)\"\n (tabChanged)=\"onSelectedTabChange($event)\"\n (toggleGroup)=\"onToggleShowHide($event)\"\n (resetGroup)=\"onReset($event)\"\n (deleteGroup)=\"onDelete($event)\"\n (tilesDropped)=\"onDrop($event)\"\n (hideAppTileClick)=\"onHideAppTile($event)\"\n (renameAppTileClick)=\"onRenameAppTile($event)\"\n ></bt-tiles-viewer>\n</ng-container>\n<ng-template #empty>\n <bsu-no-data></bsu-no-data>\n</ng-template>\n\n<ng-template #loading>\n <bsu-mask></bsu-mask>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
1597
- }], ctorParameters: function () { return [{ type: i1.PortalService }, { type: TilesService }, { type: TilesViewerService }]; } });
1598
-
1599
- class MicroTileChartBulletComponent extends BaseBtTileComponent {
1600
- ngOnInit() {
1601
- super.ngOnInit();
1602
- this.target = this.settings.Target;
1603
- this.value = this.settings.Value;
1604
- this.range = this.settings.Range;
1605
- this.forecast = this.settings.Forecast;
1606
- this.suffix = this.settings.Suffix;
1607
- this.separatorLines = this.settings.SeparatorLines;
1608
- this.isDelta = this.settings.IsDelta;
1609
- }
1610
- }
1611
- MicroTileChartBulletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartBulletComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1612
- MicroTileChartBulletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartBulletComponent, selector: "bt-micro-tile-chart-bullet", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-bullet\r\n *ngIf=\"double\"\r\n [target]=\"target\"\r\n [value]=\"value\"\r\n [range]=\"range\"\r\n [forecast]=\"forecast\"\r\n [isDelta]=\"isDelta\"\r\n [separatorLines]=\"separatorLines\"\r\n [suffix]=\"suffix\"\r\n >\r\n </be-micro-chart-bullet>\r\n\r\n <be-micro-chart-bullet\r\n [target]=\"target\"\r\n [value]=\"value\"\r\n [range]=\"range\"\r\n [forecast]=\"forecast\"\r\n [isDelta]=\"double ? false : isDelta\"\r\n [separatorLines]=\"separatorLines\"\r\n [suffix]=\"suffix\"\r\n >\r\n </be-micro-chart-bullet>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host ::ng-deep .fd-tile__content{display:flex;column-gap:20px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartBulletComponent, selector: "be-micro-chart-bullet", inputs: ["range", "value", "forecast", "target", "suffix", "separatorLines", "isDelta"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1613
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartBulletComponent, decorators: [{
1614
- type: Component,
1615
- args: [{ selector: 'bt-micro-tile-chart-bullet', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-bullet\r\n *ngIf=\"double\"\r\n [target]=\"target\"\r\n [value]=\"value\"\r\n [range]=\"range\"\r\n [forecast]=\"forecast\"\r\n [isDelta]=\"isDelta\"\r\n [separatorLines]=\"separatorLines\"\r\n [suffix]=\"suffix\"\r\n >\r\n </be-micro-chart-bullet>\r\n\r\n <be-micro-chart-bullet\r\n [target]=\"target\"\r\n [value]=\"value\"\r\n [range]=\"range\"\r\n [forecast]=\"forecast\"\r\n [isDelta]=\"double ? false : isDelta\"\r\n [separatorLines]=\"separatorLines\"\r\n [suffix]=\"suffix\"\r\n >\r\n </be-micro-chart-bullet>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host ::ng-deep .fd-tile__content{display:flex;column-gap:20px}\n"] }]
1616
- }] });
1617
-
1618
- class NewsTileComponent extends BaseBtTileComponent {
1619
- constructor() {
1620
- super(...arguments);
1621
- this.isStop = false;
1622
- }
1623
- get twoColumn() {
1624
- return this.footer.TwoColumn;
1625
- }
1626
- ngOnInit() {
1627
- super.ngOnInit();
1628
- const slides = this.settings.Report.MoDataList;
1629
- if (slides.length) {
1630
- this._updateTile(slides[0]);
1631
- interval(5000)
1632
- .pipe(takeUntil(this._onDestroy$), tap(() => {
1633
- if (!this.isStop) {
1634
- this.carouselComponent.next();
1635
- }
1636
- }))
1637
- .subscribe();
1638
- }
1639
- this.slides = slides;
1640
- }
1641
- slideChange(activeSlide) {
1642
- const currentSlide = activeSlide.activeItems[0].value;
1643
- this._updateTile(currentSlide);
1644
- }
1645
- _updateTile(newsMo) {
1646
- this.activeNews = newsMo;
1647
- }
1648
- }
1649
- NewsTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NewsTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1650
- NewsTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NewsTileComponent, selector: "bt-news-tile", viewQueries: [{ propertyName: "carouselComponent", first: true, predicate: CarouselComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<bt-tile\n [data]=\"data\"\n [type]=\"'launch'\"\n [footerTemplate]=\"newsFooter\"\n [edit]=\"edit\"\n [title]=\"data | tileProp: 'Title':parameters\"\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\n [footer]=\"data | tileProp: 'Footer':parameters\"\n (hideClick)=\"hideClick.emit()\"\n (renameClick)=\"renameClick.emit()\"\n (click)=\"onTileClick()\"\n>\n <div fd-tile-content style=\"align-items: center; padding-top: 1rem\">\n <span>\n {{ activeNews?.Text | bbbTranslate }}\n </span>\n\n <div class=\"wrapper-carousel\">\n <div class=\"cover\"></div>\n <button\n fd-button\n *ngIf=\"slides.length > 1\"\n fdType=\"transparent\"\n [glyph]=\"isStop ? 'play' : 'pause'\"\n (click)=\"isStop = !isStop; $event.preventDefault(); $event.stopPropagation()\"\n ></button>\n <fd-carousel\n carouselIndicatorsOrientation=\"top\"\n [slideTransitionDuration]=\"1000\"\n (slideChange)=\"slideChange($event)\"\n [loop]=\"true\"\n [navigation]=\"false\"\n [navigatorInPageIndicator]=\"false\"\n width=\"100%\"\n >\n <fd-carousel-item *ngFor=\"let slide of slides\" [value]=\"slide\">\n <img\n [src]=\"slide.Img ? (slide.Img.FileId | picFieldSrc: 'ID':null:slide.Img.FileId:335:170) : ''\"\n />\n </fd-carousel-item>\n </fd-carousel>\n </div>\n </div>\n</bt-tile>\n\n<!-- tile footer-->\n<ng-template #newsFooter>\n <div fd-tile-footer [twoColumn]=\"twoColumn\" *untilInView=\"el\">\n <ng-container *ngIf=\"twoColumn; else oneColumn\">\n <div fd-tile-section>\n <span fd-tile-footer-text>{{ activeNews?.Footer1 | bbbTranslate }}</span>\n </div>\n <div fd-tile-section>\n <span fd-tile-footer-text>{{ activeNews?.Footer2 | bbbTranslate }}</span>\n </div>\n </ng-container>\n <ng-template #oneColumn>\n <span fd-tile-footer-text>{{ activeNews?.Footer1 | bbbTranslate }}</span>\n </ng-template>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:block}:host bt-tile{position:relative}:host bt-tile .wrapper-carousel{position:absolute;top:0;width:100%;height:100%;left:0;z-index:0}:host bt-tile .wrapper-carousel img{width:335px;height:165px;object-fit:cover}:host ::ng-deep span{z-index:3;color:#fff}:host ::ng-deep button{position:absolute;right:15px;top:15px;display:none}:host ::ng-deep button fd-icon{z-index:4;min-width:1.5rem!important;font-size:1.5rem!important;color:#fff!important}:host ::ng-deep .fd-carousel__content{z-index:3}:host ::ng-deep .fd-carousel__page-indicator-container{position:absolute;bottom:0;display:none;background-color:transparent}:host ::ng-deep .fd-carousel__page-indicator-container ol{z-index:5}:host ::ng-deep .fd-carousel__page-indicator-container ol li{background-color:#dad7d7}:host ::ng-deep .fd-carousel__page-indicator-container ol li.fd-carousel__page-indicator--active{background-color:#fff}:host .cover{background-color:#064079d9;position:absolute;bottom:0;left:0;right:0;height:50%;z-index:4;opacity:.6}:host:hover ::ng-deep .fd-carousel__page-indicator-container{display:inherit}:host:hover ::ng-deep button{display:inline-flex}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i3$2.CarouselComponent, selector: "fd-carousel", inputs: ["id", "ariaLabel", "ariaLabelledBy", "ariaDescribedBy", "pageIndicatorsOrientation", "height", "width", "loop", "leftNavigationBtnLabel", "rightNavigationBtnLabel", "navigation", "navigatorInPageIndicator", "numericIndicator", "pageIndicatorContainer", "pageIndicator", "resourceStrings", "slideTransitionDuration", "swipeEnabled", "vertical", "visibleSlidesCount"], outputs: ["slideChange"] }, { kind: "component", type: i3$2.CarouselItemComponent, selector: "fd-carousel-item", inputs: ["id", "ariaLabel", "ariaLabelledBy", "ariaDescribedBy", "loading", "title", "initialHeight", "initialWidth", "value"] }, { kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileFooterDirective, selector: "[fdTileFooter], [fd-tile-footer]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileSectionDirective, selector: "[fdTileSection], [fd-tile-section]" }, { kind: "directive", type: i1$3.TileFooterTextDirective, selector: "[fdTileFooterText], [fd-tile-footer-text]" }, { kind: "directive", type: i1.UntilInViewDirective, selector: "[untilInView]", inputs: ["untilInView", "intersectionDebounce"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: i1.PictureFieldSourcePipe, name: "picFieldSrc" }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1651
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NewsTileComponent, decorators: [{
1652
- type: Component,
1653
- args: [{ selector: 'bt-news-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\n [data]=\"data\"\n [type]=\"'launch'\"\n [footerTemplate]=\"newsFooter\"\n [edit]=\"edit\"\n [title]=\"data | tileProp: 'Title':parameters\"\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\n [footer]=\"data | tileProp: 'Footer':parameters\"\n (hideClick)=\"hideClick.emit()\"\n (renameClick)=\"renameClick.emit()\"\n (click)=\"onTileClick()\"\n>\n <div fd-tile-content style=\"align-items: center; padding-top: 1rem\">\n <span>\n {{ activeNews?.Text | bbbTranslate }}\n </span>\n\n <div class=\"wrapper-carousel\">\n <div class=\"cover\"></div>\n <button\n fd-button\n *ngIf=\"slides.length > 1\"\n fdType=\"transparent\"\n [glyph]=\"isStop ? 'play' : 'pause'\"\n (click)=\"isStop = !isStop; $event.preventDefault(); $event.stopPropagation()\"\n ></button>\n <fd-carousel\n carouselIndicatorsOrientation=\"top\"\n [slideTransitionDuration]=\"1000\"\n (slideChange)=\"slideChange($event)\"\n [loop]=\"true\"\n [navigation]=\"false\"\n [navigatorInPageIndicator]=\"false\"\n width=\"100%\"\n >\n <fd-carousel-item *ngFor=\"let slide of slides\" [value]=\"slide\">\n <img\n [src]=\"slide.Img ? (slide.Img.FileId | picFieldSrc: 'ID':null:slide.Img.FileId:335:170) : ''\"\n />\n </fd-carousel-item>\n </fd-carousel>\n </div>\n </div>\n</bt-tile>\n\n<!-- tile footer-->\n<ng-template #newsFooter>\n <div fd-tile-footer [twoColumn]=\"twoColumn\" *untilInView=\"el\">\n <ng-container *ngIf=\"twoColumn; else oneColumn\">\n <div fd-tile-section>\n <span fd-tile-footer-text>{{ activeNews?.Footer1 | bbbTranslate }}</span>\n </div>\n <div fd-tile-section>\n <span fd-tile-footer-text>{{ activeNews?.Footer2 | bbbTranslate }}</span>\n </div>\n </ng-container>\n <ng-template #oneColumn>\n <span fd-tile-footer-text>{{ activeNews?.Footer1 | bbbTranslate }}</span>\n </ng-template>\n </div>\n</ng-template>\n", styles: [":host{position:relative;display:block}:host bt-tile{position:relative}:host bt-tile .wrapper-carousel{position:absolute;top:0;width:100%;height:100%;left:0;z-index:0}:host bt-tile .wrapper-carousel img{width:335px;height:165px;object-fit:cover}:host ::ng-deep span{z-index:3;color:#fff}:host ::ng-deep button{position:absolute;right:15px;top:15px;display:none}:host ::ng-deep button fd-icon{z-index:4;min-width:1.5rem!important;font-size:1.5rem!important;color:#fff!important}:host ::ng-deep .fd-carousel__content{z-index:3}:host ::ng-deep .fd-carousel__page-indicator-container{position:absolute;bottom:0;display:none;background-color:transparent}:host ::ng-deep .fd-carousel__page-indicator-container ol{z-index:5}:host ::ng-deep .fd-carousel__page-indicator-container ol li{background-color:#dad7d7}:host ::ng-deep .fd-carousel__page-indicator-container ol li.fd-carousel__page-indicator--active{background-color:#fff}:host .cover{background-color:#064079d9;position:absolute;bottom:0;left:0;right:0;height:50%;z-index:4;opacity:.6}:host:hover ::ng-deep .fd-carousel__page-indicator-container{display:inherit}:host:hover ::ng-deep button{display:inline-flex}\n"] }]
1654
- }], propDecorators: { carouselComponent: [{
1655
- type: ViewChild,
1656
- args: [CarouselComponent]
1657
- }] } });
1658
-
1659
- class MicroTileChartComparisonComponent extends BaseBtTileComponent {
1660
- constructor() {
1661
- super(...arguments);
1662
- this.chartData = {
1663
- data: [
1664
- { value: 5, color: '#de890d', label: 'تاخیر' },
1665
- {
1666
- value: 45,
1667
- color: '#dc0d0e',
1668
- label: 'هم اکنون'
1669
- },
1670
- { value: 100, color: '#3fa45b', label: 'به موقع' }
1671
- ],
1672
- suffix: '%'
1673
- };
1674
- }
1675
- }
1676
- MicroTileChartComparisonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartComparisonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1677
- MicroTileChartComparisonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartComparisonComponent, selector: "bt-micro-tile-chart-comparison", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-comparison [data]=\"chartData\" [size]=\"double ? 'l' : 's'\"></be-micro-chart-comparison>\r\n </div>\r\n</bt-tile>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartComparisonComponent, selector: "be-micro-chart-comparison", inputs: ["data", "size"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1678
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartComparisonComponent, decorators: [{
1679
- type: Component,
1680
- args: [{ selector: 'bt-micro-tile-chart-comparison', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-comparison [data]=\"chartData\" [size]=\"double ? 'l' : 's'\"></be-micro-chart-comparison>\r\n </div>\r\n</bt-tile>\r\n" }]
1681
- }] });
1682
-
1683
- class MicroTileChartStackbarComponent extends BaseBtTileComponent {
1684
- constructor() {
1685
- super(...arguments);
1686
- this.charData = {
1687
- data: [
1688
- { value: 20, color: '#3fa45b' },
1689
- { value: 30, color: '#e9730c' },
1690
- { value: 50, color: '#dc0d0e' }
1691
- ],
1692
- suffix: '%'
1693
- };
1694
- }
1695
- }
1696
- MicroTileChartStackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartStackbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1697
- MicroTileChartStackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartStackbarComponent, selector: "bt-micro-tile-chart-stackbar", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-stackbar [data]=\"charData\"></be-micro-chart-stackbar>\r\n </div>\r\n</bt-tile>\r\n", styles: [".chart{width:100%}\n"], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartStackbarComponent, selector: "be-micro-chart-stackbar", inputs: ["data"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartStackbarComponent, decorators: [{
1699
- type: Component,
1700
- args: [{ selector: 'bt-micro-tile-chart-stackbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-stackbar [data]=\"charData\"></be-micro-chart-stackbar>\r\n </div>\r\n</bt-tile>\r\n", styles: [".chart{width:100%}\n"] }]
1701
- }] });
1702
-
1703
- class MicroTileChartLineComponent extends BaseBtTileComponent {
1704
- constructor() {
1705
- super(...arguments);
1706
- this.chartData = {
1707
- data: [
1708
- { value: 2, label: '1 آبان' },
1709
- { value: 4, label: 'آبان 20' },
1710
- {
1711
- value: 3,
1712
- label: 'آبان 27'
1713
- },
1714
- { value: 5, label: 'آبان 30' }
1715
- ],
1716
- color: '',
1717
- suffix: 'M'
1718
- };
1719
- }
1720
- }
1721
- MicroTileChartLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartLineComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1722
- MicroTileChartLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartLineComponent, selector: "bt-micro-tile-chart-line", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-line [line]=\"chartData\"></be-micro-chart-line>\r\n </div>\r\n</bt-tile>\r\n", styles: ["be-micro-chart-bar{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartLineComponent, selector: "be-micro-chart-line", inputs: ["line"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartLineComponent, decorators: [{
1724
- type: Component,
1725
- args: [{ selector: 'bt-micro-tile-chart-line', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-line [line]=\"chartData\"></be-micro-chart-line>\r\n </div>\r\n</bt-tile>\r\n", styles: ["be-micro-chart-bar{display:flex;flex-direction:column}\n"] }]
1726
- }] });
1727
-
1728
- class MicroTileChartCircularComponent extends BaseBtTileComponent {
1729
- constructor() {
1730
- super(...arguments);
1731
- this.chartData = 70;
1732
- }
1733
- }
1734
- MicroTileChartCircularComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartCircularComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1735
- MicroTileChartCircularComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartCircularComponent, selector: "bt-micro-tile-chart-circular", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-circular [data]=\"chartData\"></be-micro-chart-circular>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartCircularComponent, selector: "be-micro-chart-circular", inputs: ["data"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartCircularComponent, decorators: [{
1737
- type: Component,
1738
- args: [{ selector: 'bt-micro-tile-chart-circular', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-circular [data]=\"chartData\"></be-micro-chart-circular>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}\n"] }]
1739
- }] });
1740
-
1741
- class MicroTileChartAreaComponent extends BaseBtTileComponent {
1742
- constructor() {
1743
- super(...arguments);
1744
- this.chartData = {
1745
- areas: [
1746
- { data: [2.5, 2.5, 2.5, 2.5], color: '#3fa45b' },
1747
- {
1748
- data: [2, 2, 2, 2],
1749
- color: '#e9730c'
1750
- },
1751
- { data: [1.5, 1.5, 1.5, 1.5], color: '#dc0d0e' }
1752
- ],
1753
- line: {
1754
- data: [
1755
- { value: 2, label: 'june 1' },
1756
- { value: 4, label: 'june 20' },
1757
- { value: 3, label: 'june 27' },
1758
- { value: 5, label: 'june 30' }
1759
- ],
1760
- suffix: 'M'
1761
- },
1762
- firstValueColor: '#3fa45b',
1763
- lastValueColor: '#dc0d0e'
1764
- };
1765
- }
1766
- }
1767
- MicroTileChartAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1768
- MicroTileChartAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartAreaComponent, selector: "bt-micro-tile-chart-area", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-area\r\n [style.flex-direction]=\"double ? 'row' : 'column'\"\r\n [chartData]=\"chartData\"\r\n [size]=\"double ? 'l' : 's'\"\r\n ></be-micro-chart-area>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}be-micro-chart-area{display:flex}\n"], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartAreaComponent, selector: "be-micro-chart-area", inputs: ["size", "chartData"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1769
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartAreaComponent, decorators: [{
1770
- type: Component,
1771
- args: [{ selector: 'bt-micro-tile-chart-area', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-area\r\n [style.flex-direction]=\"double ? 'row' : 'column'\"\r\n [chartData]=\"chartData\"\r\n [size]=\"double ? 'l' : 's'\"\r\n ></be-micro-chart-area>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}be-micro-chart-area{display:flex}\n"] }]
1772
- }] });
1773
-
1774
- class MicroTileChartBarComponent extends BaseBtTileComponent {
1775
- constructor() {
1776
- super(...arguments);
1777
- this.chartData = [
1778
- { value: 5, color: '#dc0d0e', label: 'q1' },
1779
- { value: 10, color: '#dc0d0e', label: 'q4' },
1780
- { value: 20, color: '#e9730c', label: 'q2' },
1781
- { value: 36, color: '#3fa45b', label: 'q3' }
1782
- ];
1783
- this.extraData = {
1784
- value: 1.8,
1785
- suffix: 'M'
1786
- };
1787
- }
1788
- }
1789
- MicroTileChartBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1790
- MicroTileChartBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: MicroTileChartBarComponent, selector: "bt-micro-tile-chart-bar", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-bar [data]=\"chartData\" [size]=\"double ? 'l' : 's'\" [extraData]=\"extraData\"></be-micro-chart-bar>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: i2$4.MicroChartBarComponent, selector: "be-micro-chart-bar", inputs: ["data", "size", "extraData"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1791
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: MicroTileChartBarComponent, decorators: [{
1792
- type: Component,
1793
- args: [{ selector: 'bt-micro-tile-chart-bar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <be-micro-chart-bar [data]=\"chartData\" [size]=\"double ? 'l' : 's'\" [extraData]=\"extraData\"></be-micro-chart-bar>\r\n </div>\r\n</bt-tile>\r\n", styles: [":host{display:block}\n"] }]
1794
- }] });
1795
-
1796
- class CreateAppGroupComponent extends BaseComponent {
1797
- constructor(fb, dialogRef, bbbPipe) {
1798
- super();
1799
- this.fb = fb;
1800
- this.dialogRef = dialogRef;
1801
- this.bbbPipe = bbbPipe;
1802
- }
1803
- ngOnInit() {
1804
- super.ngOnInit();
1805
- this.appGroupForm = this.fb.group({
1806
- title: new UntypedFormControl(this.title, [Validators.required])
1807
- });
1808
- const mandatoryFieldText = this.bbbPipe.transform('AlertFieldIsMandatory');
1809
- const titleText = this.bbbPipe.transform('Title');
1810
- this.RequiredText = mandatoryFieldText.replace('{0}', titleText);
1811
- }
1812
- onSave() {
1813
- this.submitted = true;
1814
- if (this.appGroupForm.valid) {
1815
- this.dialogRef.close(this.title);
1816
- }
1817
- }
1818
- }
1819
- CreateAppGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CreateAppGroupComponent, deps: [{ token: i1$4.UntypedFormBuilder }, { token: i1$1.DialogRef }, { token: i1.BbbTranslatePipe }], target: i0.ɵɵFactoryTarget.Component });
1820
- CreateAppGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: CreateAppGroupComponent, selector: "bt-create-app-group", usesInheritance: true, ngImport: i0, template: "<fd-dialog>\r\n <fd-dialog-header>\r\n <h1 fd-title>{{ dialogRef.data.title }}</h1>\r\n <button fd-dialog-close-button (click)=\"dialogRef.dismiss()\"></button>\r\n </fd-dialog-header>\r\n\r\n <fd-dialog-body>\r\n <div fd-form-item [formGroup]=\"appGroupForm\">\r\n <label fd-form-label [required]=\"true\"> {{ 'Title' | bbbTranslate }}</label>\r\n <fd-form-input-message-group>\r\n <fd-input-group\r\n class=\"form-control\"\r\n formControlName=\"title\"\r\n form-control\r\n [button]=\"true\"\r\n [(ngModel)]=\"title\"\r\n [state]=\"submitted && appGroupForm.controls.title.errors ? 'error' : 'information'\"\r\n >\r\n </fd-input-group>\r\n <fd-form-message *ngIf=\"submitted && appGroupForm.controls.title.errors\" type=\"error\">\r\n {{ RequiredText }}\r\n </fd-form-message>\r\n </fd-form-input-message-group>\r\n </div>\r\n </fd-dialog-body>\r\n\r\n <fd-dialog-footer>\r\n <fd-button-bar [label]=\"'Save' | bbbTranslate\" fdType=\"emphasized\" (click)=\"onSave()\"> </fd-button-bar>\r\n <fd-button-bar\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n fdInitialFocus\r\n fdType=\"transparent\"\r\n (click)=\"this.dialogRef.dismiss()\"\r\n >\r\n </fd-button-bar>\r\n </fd-dialog-footer>\r\n</fd-dialog>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i5$2.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "component", type: i6$1.FormItemComponent, selector: "[fd-form-item]", inputs: ["isInline", "horizontal"] }, { kind: "component", type: i6$1.FormLabelComponent, selector: "[fd-form-label]", inputs: ["required", "colon", "checkbox", "radio", "alignLabelEnd", "inlineHelpTitle", "inlineHelpGlyph", "inlineHelpTriggers", "inlineHelpBodyPlacement", "inlineHelpPlacement", "id"] }, { kind: "component", type: i6$1.FormMessageComponent, selector: "fd-form-message", inputs: ["type", "static", "embedded", "class"] }, { kind: "component", type: i6$1.FormInputMessageGroupComponent, selector: "fd-form-input-message-group", inputs: ["triggers", "closeOnOutsideClick", "fillControlMode", "noArrow", "closeOnEscapeKey", "placement", "isOpen"], outputs: ["isOpenChange"] }, { kind: "component", type: i7.InputGroupComponent, selector: "fd-input-group", inputs: ["inputTemplate", "placement", "required", "inline", "placeholder", "addOnText", "buttonFocusable", "type", "glyph", "button", "disabled", "readonly", "state", "isControl", "showFocus", "isExpanded", "glyphAriaLabel", "iconTitle", "ariaLabelledby", "ariaLabelledBy"], outputs: ["addOnButtonClicked", "search"] }, { kind: "component", type: i8$1.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i8$1.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i8$1.DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: i8$1.DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "component", type: i8$1.DialogCloseButtonComponent, selector: "[fd-dialog-close-button]", inputs: ["mobile", "title"] }, { kind: "component", type: i9.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: i10$1.InitialFocusDirective, selector: "[fdInitialFocus], [fd-initial-focus]", inputs: ["fd-initial-focus", "enabled", "focusLastElement"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: CreateAppGroupComponent, decorators: [{
1822
- type: Component,
1823
- args: [{ selector: 'bt-create-app-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-dialog>\r\n <fd-dialog-header>\r\n <h1 fd-title>{{ dialogRef.data.title }}</h1>\r\n <button fd-dialog-close-button (click)=\"dialogRef.dismiss()\"></button>\r\n </fd-dialog-header>\r\n\r\n <fd-dialog-body>\r\n <div fd-form-item [formGroup]=\"appGroupForm\">\r\n <label fd-form-label [required]=\"true\"> {{ 'Title' | bbbTranslate }}</label>\r\n <fd-form-input-message-group>\r\n <fd-input-group\r\n class=\"form-control\"\r\n formControlName=\"title\"\r\n form-control\r\n [button]=\"true\"\r\n [(ngModel)]=\"title\"\r\n [state]=\"submitted && appGroupForm.controls.title.errors ? 'error' : 'information'\"\r\n >\r\n </fd-input-group>\r\n <fd-form-message *ngIf=\"submitted && appGroupForm.controls.title.errors\" type=\"error\">\r\n {{ RequiredText }}\r\n </fd-form-message>\r\n </fd-form-input-message-group>\r\n </div>\r\n </fd-dialog-body>\r\n\r\n <fd-dialog-footer>\r\n <fd-button-bar [label]=\"'Save' | bbbTranslate\" fdType=\"emphasized\" (click)=\"onSave()\"> </fd-button-bar>\r\n <fd-button-bar\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n fdInitialFocus\r\n fdType=\"transparent\"\r\n (click)=\"this.dialogRef.dismiss()\"\r\n >\r\n </fd-button-bar>\r\n </fd-dialog-footer>\r\n</fd-dialog>\r\n" }]
1824
- }], ctorParameters: function () { return [{ type: i1$4.UntypedFormBuilder }, { type: i1$1.DialogRef }, { type: i1.BbbTranslatePipe }]; } });
1825
-
1826
- class PinTileComponent extends BaseComponent {
1827
- constructor(_dialogService, _dialogRef, bbbPipe) {
1828
- super();
1829
- this._dialogService = _dialogService;
1830
- this._dialogRef = _dialogRef;
1831
- this.bbbPipe = bbbPipe;
1832
- this.newGroupText = BarsaApi.LoginFormData.IsRtl
1833
- ? this.bbbPipe.transform('Groups') + ' ' + this.bbbPipe.transform('New')
1834
- : this.bbbPipe.transform('New') + ' ' + this.bbbPipe.transform('Groups');
1835
- this.app = _dialogRef.data.app;
1836
- this.appTileGroups = _dialogRef.data.appTileGroups;
1837
- this.pinnedAppInTileGroups = _dialogRef.data.pinnedAppInTileGroups;
1838
- }
1839
- ngOnInit() {
1840
- this._setLoading(true);
1841
- const tileGroupsId = this.pinnedAppInTileGroups[this.app.Id];
1842
- this.appTileGroups.forEach((appGroup) => {
1843
- this._setDefaultPinTile(appGroup, tileGroupsId);
1844
- });
1845
- this._setLoading(false);
1846
- }
1847
- onAccept() {
1848
- const appTileGroupsPin = [];
1849
- this.appTileGroups.forEach((group) => {
1850
- this._getChangedPinTileGroups(group, appTileGroupsPin);
1851
- });
1852
- this._close({ appTileGroupsPin, app: this.app });
1853
- }
1854
- onClose() {
1855
- this._close();
1856
- }
1857
- onNewGroup() {
1858
- this.newGroupDialogRef = this._dialogService.open(CreateAppGroupComponent, {
1859
- data: { title: this.newGroupText },
1860
- verticalPadding: true,
1861
- mobile: this.mobile,
1862
- responsivePadding: true
1863
- });
1864
- this.newGroupDialogRef.afterClosed.subscribe(() => {
1865
- // if (result) {
1866
- // this.dialogRef.loading(true);
1867
- // this.tilesService
1868
- // .createAppGroup(result)
1869
- // .pipe(
1870
- // takeUntil(this._onDestroy$),
1871
- // finalize(() => {
1872
- // this.dialogRef.loading(false);
1873
- // })
1874
- // )
1875
- // .subscribe();
1876
- // }
1877
- });
1878
- }
1879
- _setLoading(loading) {
1880
- this._dialogRef.loading(loading);
1881
- }
1882
- _setDefaultPinTile(appTileGroup, tileGroupsId) {
1883
- appTileGroup.$PinTile = appTileGroup.$DefaultPinTile =
1884
- tileGroupsId.includes(appTileGroup.Id) || tileGroupsId.includes(appTileGroup.UserAppTileGroupSetting?.Id);
1885
- appTileGroup.$Children?.forEach((subGroup) => {
1886
- this._setDefaultPinTile(subGroup, tileGroupsId);
1887
- });
1888
- appTileGroup.$Disabledpin = false;
1889
- }
1890
- _getChangedPinTileGroups(appTileGroup, appTileGroupsPin) {
1891
- if (appTileGroup.$PinTile && !appTileGroup.$DefaultPinTile) {
1892
- // Add
1893
- appTileGroupsPin.push({ appTileGroup, visible: true });
1894
- }
1895
- else if (appTileGroup.$PinTile === false && appTileGroup.$DefaultPinTile) {
1896
- // Remove
1897
- appTileGroupsPin.push({ appTileGroup, visible: false });
1898
- }
1899
- appTileGroup.$Children?.forEach((subGroup) => {
1900
- this._getChangedPinTileGroups(subGroup, appTileGroupsPin);
1901
- });
1902
- }
1903
- _close(result) {
1904
- this._dialogRef.close(result);
1905
- }
1906
- }
1907
- PinTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PinTileComponent, deps: [{ token: i1$1.DialogService }, { token: i1$1.DialogRef }, { token: i1.BbbTranslatePipe }], target: i0.ɵɵFactoryTarget.Component });
1908
- PinTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: PinTileComponent, selector: "bt-pin-tile", inputs: { app: "app", appTileGroups: "appTileGroups", mobile: "mobile", pin: "pin" }, usesInheritance: true, ngImport: i0, template: "<fd-dialog>\r\n <fd-dialog-header>\r\n <h1 fd-title>{{ 'AddToList' | bbbTranslate }}</h1>\r\n </fd-dialog-header>\r\n <fd-dialog-body>\r\n <ul fd-list [navigationIndicator]=\"true\" style=\"margin-bottom: 1rem\">\r\n <li fd-list-item [navigationIndicator]=\"true\" (click)=\"onNewGroup()\">\r\n <fd-icon glyph=\"add\"></fd-icon><span fd-list-title>{{ newGroupText }}</span>\r\n </li>\r\n <ng-container *ngFor=\"let appTileGroup of appTileGroups\">\r\n <li *ngIf=\"!appTileGroup.$Disabledpin\" fd-list-item [selected]=\"appTileGroup.$PinTile\">\r\n <fd-checkbox [(ngModel)]=\"appTileGroup.$PinTile\"></fd-checkbox>\r\n <span fd-list-title>{{ appTileGroup.navigatorTitle || appTileGroup.Title }}</span>\r\n </li>\r\n <ng-container *ngFor=\"let subGroup of appTileGroup.$Children\">\r\n <li *ngIf=\"!subGroup.$Disabledpin\" fd-list-item [selected]=\"subGroup.$PinTile\">\r\n <fd-checkbox [(ngModel)]=\"subGroup.$PinTile\"></fd-checkbox>\r\n <span fd-list-title>{{ subGroup.navigatorTitle || subGroup.Title }}</span>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </fd-dialog-body>\r\n\r\n <fd-dialog-footer>\r\n <ng-template fdTemplate=\"footer\">\r\n <div fd-bar-left></div>\r\n <div fd-bar-right>\r\n <fd-button-bar fd-initial-focus fdType=\"emphasized\" [label]=\"'OK' | bbbTranslate\" (click)=\"onAccept()\">\r\n </fd-button-bar>\r\n <fd-button-bar\r\n fd-initial-focus\r\n fdType=\"transparent\"\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n (click)=\"onClose()\"\r\n >\r\n </fd-button-bar>\r\n </div>\r\n </ng-template>\r\n </fd-dialog-footer>\r\n</fd-dialog>\r\n", styles: [":host ::ng-deep .cdk-drag{cursor:default!important}:host *{cursor:default!important}li{cursor:pointer}fd-dialog-body,fd-dialog-footer,fd-dialog-header{cursor:default}fd-icon{padding:0 5px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$2.BarLeftDirective, selector: "[fd-bar-left]" }, { kind: "directive", type: i5$2.BarRightDirective, selector: "[fd-bar-right]" }, { kind: "component", type: i5$2.ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabel", "ariaLabelledby", "id"] }, { kind: "component", type: i6$3.CheckboxComponent, selector: "fd-checkbox", inputs: ["ariaLabel", "value", "ariaLabelledBy", "ariaDescribedBy", "title", "inputId", "state", "name", "label", "disabled", "tristate", "tristateSelectable", "labelClass", "required", "values"], outputs: ["focusChange"] }, { kind: "component", type: i2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "component", type: i4$1.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline"], outputs: ["focusEscapeList"] }, { kind: "component", type: i4$1.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i4$1.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "component", type: i8$1.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i8$1.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i8$1.DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: i8$1.DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "component", type: i9.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "directive", type: i10$1.TemplateDirective, selector: "[fdTemplate]", inputs: ["fdTemplate"] }, { kind: "directive", type: i10$1.InitialFocusDirective, selector: "[fdInitialFocus], [fd-initial-focus]", inputs: ["fd-initial-focus", "enabled", "focusLastElement"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1909
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: PinTileComponent, decorators: [{
1910
- type: Component,
1911
- args: [{ selector: 'bt-pin-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fd-dialog>\r\n <fd-dialog-header>\r\n <h1 fd-title>{{ 'AddToList' | bbbTranslate }}</h1>\r\n </fd-dialog-header>\r\n <fd-dialog-body>\r\n <ul fd-list [navigationIndicator]=\"true\" style=\"margin-bottom: 1rem\">\r\n <li fd-list-item [navigationIndicator]=\"true\" (click)=\"onNewGroup()\">\r\n <fd-icon glyph=\"add\"></fd-icon><span fd-list-title>{{ newGroupText }}</span>\r\n </li>\r\n <ng-container *ngFor=\"let appTileGroup of appTileGroups\">\r\n <li *ngIf=\"!appTileGroup.$Disabledpin\" fd-list-item [selected]=\"appTileGroup.$PinTile\">\r\n <fd-checkbox [(ngModel)]=\"appTileGroup.$PinTile\"></fd-checkbox>\r\n <span fd-list-title>{{ appTileGroup.navigatorTitle || appTileGroup.Title }}</span>\r\n </li>\r\n <ng-container *ngFor=\"let subGroup of appTileGroup.$Children\">\r\n <li *ngIf=\"!subGroup.$Disabledpin\" fd-list-item [selected]=\"subGroup.$PinTile\">\r\n <fd-checkbox [(ngModel)]=\"subGroup.$PinTile\"></fd-checkbox>\r\n <span fd-list-title>{{ subGroup.navigatorTitle || subGroup.Title }}</span>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n </ul>\r\n </fd-dialog-body>\r\n\r\n <fd-dialog-footer>\r\n <ng-template fdTemplate=\"footer\">\r\n <div fd-bar-left></div>\r\n <div fd-bar-right>\r\n <fd-button-bar fd-initial-focus fdType=\"emphasized\" [label]=\"'OK' | bbbTranslate\" (click)=\"onAccept()\">\r\n </fd-button-bar>\r\n <fd-button-bar\r\n fd-initial-focus\r\n fdType=\"transparent\"\r\n [label]=\"'Cancel' | bbbTranslate\"\r\n (click)=\"onClose()\"\r\n >\r\n </fd-button-bar>\r\n </div>\r\n </ng-template>\r\n </fd-dialog-footer>\r\n</fd-dialog>\r\n", styles: [":host ::ng-deep .cdk-drag{cursor:default!important}:host *{cursor:default!important}li{cursor:pointer}fd-dialog-body,fd-dialog-footer,fd-dialog-header{cursor:default}fd-icon{padding:0 5px}\n"] }]
1912
- }], ctorParameters: function () { return [{ type: i1$1.DialogService }, { type: i1$1.DialogRef }, { type: i1.BbbTranslatePipe }]; }, propDecorators: { app: [{
1913
- type: Input
1914
- }], appTileGroups: [{
1915
- type: Input
1916
- }], mobile: [{
1917
- type: Input
1918
- }], pin: [{
1919
- type: Input
1920
- }] } });
1921
-
1922
- class AppFinderService {
1923
- constructor(_portalService, _tileService) {
1924
- this._portalService = _portalService;
1925
- this._tileService = _tileService;
1926
- this._appGroupsSource = new BehaviorSubject([]);
1927
- this._OnDestroy$ = new Subject();
1928
- this._selectedAppGroupIdSource = new Subject();
1929
- this._pinnedAppInAppTileGroupsSource = new BehaviorSubject({});
1930
- this.loadAppGroups();
1931
- this.deviceSize$ = this._tileService.deviceSize$;
1932
- this.pinnedAppInAppTileGroups$ = this._pinnedAppInAppTileGroupsSource.asObservable();
1933
- this.appGroups$ = this._appGroupsSource.asObservable();
1934
- this.selectedAppGroupId$ = this._selectedAppGroupIdSource.asObservable().pipe(distinctUntilChanged());
1935
- this.selectedAppGroup$ = combineLatest([this.appGroups$, this.selectedAppGroupId$]).pipe(map(([moDataList, selectedId]) => moDataList?.find((c) => c.Id === selectedId)));
1936
- }
1937
- get deviceSize() {
1938
- return this._portalService.deviceSize;
1939
- }
1940
- get appTileGroups() {
1941
- return this._tileService.appTileGroups?.MoDataList;
1942
- }
1943
- ngOnDestroy() {
1944
- this._OnDestroy$.next();
1945
- }
1946
- loadAppGroups() {
1947
- this._portalService
1948
- .ReportExecute('UserAppGroups')
1949
- .subscribe((allApps) => this._nextAllApps(allApps.MoDataList));
1950
- }
1951
- selectAppGroup(appGroupId) {
1952
- const appGroups = this._appGroupsSource.getValue();
1953
- const group = appGroups.find((c) => c.Id === appGroupId);
1954
- if (group) {
1955
- this._selectedAppGroupIdSource.next(appGroupId);
1956
- this.loadAppsByAppGroup(appGroups, group);
1957
- }
1958
- }
1959
- loadAppsByAppGroup(appGroups, appGroup) {
1960
- if (appGroup.Apps) {
1961
- return;
1962
- }
1963
- const reportWrapper = BarsaApi.Bw.RunBlMethod('LoadAppsByAppGroup', appGroup.Id);
1964
- const moForReport = reportWrapper.Unwrap();
1965
- appGroup.Apps = appGroup.Apps ?? [];
1966
- const apps = moForReport.MoDataList;
1967
- if (apps.length > 0) {
1968
- const customColumns = Object.keys(apps[0]).filter((c) => c.indexOf('$Caption') > -1 && !c.startsWith('$'));
1969
- apps.forEach((app) => {
1970
- customColumns.forEach((column) => {
1971
- app.$HasPinned = app.$HasPinned || Number(app[column.split('$Caption')[0]]);
1972
- });
1973
- });
1974
- }
1975
- appGroup.Apps = [...appGroup.Apps, ...apps];
1976
- this._nextAllApps(appGroups);
1977
- }
1978
- loadPinnedAppInTileGroups(app) {
1979
- const appId = app.Id;
1980
- const val = this._pinnedAppInAppTileGroupsSource.getValue();
1981
- if (val[appId]) {
1982
- return val;
1983
- }
1984
- const reportWrapper = BarsaApi.Bw.RunBlMethod('PinnedAppInTileGroups', appId);
1985
- const moForReport = reportWrapper.Unwrap();
1986
- val[appId] = val[appId] ?? [];
1987
- const apps = moForReport.MoDataList;
1988
- if (apps.length > 0) {
1989
- apps.forEach((itemApp) => {
1990
- const predefined = itemApp.Id.Id;
1991
- const userSetting = itemApp.UserAppTileGroupSetting?.Id;
1992
- if (predefined) {
1993
- val[appId] = [...val[appId], predefined];
1994
- }
1995
- if (userSetting) {
1996
- val[appId] = [...val[appId], userSetting];
1997
- }
1998
- });
1999
- }
2000
- this._pinnedAppInAppTileGroupsSource.next(val);
2001
- return val;
2002
- }
2003
- pinTileChanged(appTileGroups, app, callback) {
2004
- this._tileService.pinTileChanged(appTileGroups, app, (settings) => {
2005
- const val = this._pinnedAppInAppTileGroupsSource.getValue();
2006
- const appId = app.Id;
2007
- for (let i = 0; i < appTileGroups.length; i++) {
2008
- const appTileSetting = settings[i];
2009
- const appTileGroupSettingId = appTileSetting.UserAppTileGroupSettingId;
2010
- const appTileGroupId = appTileSetting.AppTileGroupId;
2011
- if (appTileGroups[i].visible) {
2012
- val[appId] = [...val[appId], appTileGroupSettingId, appTileGroupId];
2013
- }
2014
- else {
2015
- val[appId] = val[appId].filter((c) => c !== appTileGroupSettingId && c !== appTileGroupId);
2016
- }
2017
- }
2018
- this._pinnedAppInAppTileGroupsSource.next({ ...val });
2019
- callback();
2020
- });
2021
- }
2022
- _nextAllApps(appGroups) {
2023
- const newAppGroups = appGroups ?? this._appGroupsSource.getValue();
2024
- this._appGroupsSource.next([...newAppGroups]);
2025
- }
2026
- }
2027
- AppFinderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderService, deps: [{ token: i1.PortalService }, { token: TilesService }], target: i0.ɵɵFactoryTarget.Injectable });
2028
- AppFinderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderService, providedIn: 'root' });
2029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: AppFinderService, decorators: [{
2030
- type: Injectable,
2031
- args: [{
2032
- providedIn: 'root'
2033
- }]
2034
- }], ctorParameters: function () { return [{ type: i1.PortalService }, { type: TilesService }]; } });
2035
-
2036
- class FormAppFinderComponent extends BaseComponent {
2037
- constructor(_cdr, _dialogService, _appFinderService, _el, _contentDensityService) {
2038
- super();
2039
- this._cdr = _cdr;
2040
- this._dialogService = _dialogService;
2041
- this._appFinderService = _appFinderService;
2042
- this._el = _el;
2043
- this.isAllSelected = true;
2044
- this.contentDensity$ = _contentDensityService.contentDensity.asObservable();
2045
- this.appGroups$ = this._appFinderService.appGroups$;
2046
- this.selectedAppGroup$ = this._appFinderService.selectedAppGroup$;
2047
- this.selectedAppGroupId$ = this._appFinderService.selectedAppGroupId$;
2048
- this.deviceSize$ = this._appFinderService.deviceSize$;
2049
- this.pinnedAppInAppTileGroups$ = this._appFinderService.pinnedAppInAppTileGroups$;
2050
- this.mobile$ = this.deviceSize$.pipe(map((c) => c === 's'));
2051
- }
2052
- ngOnInit() {
2053
- super.ngOnInit();
2054
- this.contentHeight = 'calc(' + this._el.nativeElement.offsetHeight + 'px - 2.75rem)';
2055
- this.sideContentSize$ = this.deviceSize$.pipe(takeUntil(this._onDestroy$), map((deviceSize) => {
2056
- switch (deviceSize) {
2057
- case 's':
2058
- return 'sm';
2059
- case 'm':
2060
- return 'md';
2061
- case 'l':
2062
- return 'lg';
2063
- case 'xl':
2064
- return 'xl';
2065
- default:
2066
- return 'l';
2067
- }
2068
- }));
2069
- }
2070
- onSelectedAppGroupChange(appGroupId) {
2071
- this._changeGroup(appGroupId);
2072
- }
2073
- onPinClick(app) {
2074
- const pinnedAppInTileGroups = this._appFinderService.loadPinnedAppInTileGroups(app);
2075
- const appTileGroups = this._appFinderService.appTileGroups;
2076
- const deviceSize = this._appFinderService.deviceSize;
2077
- const mobile = deviceSize === 's';
2078
- this._dialogService
2079
- .open(PinTileComponent, {
2080
- data: { app, pinnedAppInTileGroups, appTileGroups },
2081
- minWidth: '350px',
2082
- minHeight: '420px',
2083
- draggable: false,
2084
- mobile,
2085
- resizable: false,
2086
- verticalPadding: false,
2087
- backdropClickCloseable: false
2088
- })
2089
- .afterClosed.subscribe((result) => {
2090
- this._appTileGroupsPinChange(result);
2091
- });
2092
- }
2093
- onRefresh() { }
2094
- async _appTileGroupsPinChange(result) {
2095
- try {
2096
- // Will try to ask for permission
2097
- this._appFinderService.pinTileChanged(result.appTileGroupsPin, result.app, () => {
2098
- this._cdr.detectChanges();
2099
- });
2100
- }
2101
- catch (err) {
2102
- // show msg error
2103
- }
2104
- finally {
2105
- // show toast successful
2106
- }
2107
- }
2108
- _changeGroup(appGroupId) {
2109
- this.isAllSelected = false;
2110
- this._appFinderService.selectAppGroup(appGroupId);
2111
- this._cdr.detectChanges();
2112
- }
2113
- }
2114
- FormAppFinderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FormAppFinderComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.DialogService }, { token: AppFinderService }, { token: i0.ElementRef }, { token: i1$1.ContentDensityService }], target: i0.ɵɵFactoryTarget.Component });
2115
- FormAppFinderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FormAppFinderComponent, selector: "bt-form-app-finder", usesInheritance: true, ngImport: i0, template: "<bt-app-finder\r\n [appGroups]=\"(appGroups$ | async)!!\"\r\n [selectedAppGroupId]=\"(selectedAppGroupId$ | async)!!\"\r\n [selectedAppGroup]=\"(selectedAppGroup$ | async)!!\"\r\n [mobile]=\"(mobile$ | async)!!\"\r\n [sideContentSize]=\"(sideContentSize$ | async)!!\"\r\n [deviceSize]=\"(deviceSize$ | async)!!\"\r\n [contentDensity]=\"(contentDensity$ | async) ?? 'compact'\"\r\n [pinnedAppInAppTileGroups]=\"(pinnedAppInAppTileGroups$ | async)!!\"\r\n [contentHeight]=\"contentHeight\"\r\n (selectedAppGroupIdChange)=\"onSelectedAppGroupChange($event)\"\r\n (pinClick)=\"onPinClick($event)\"\r\n>\r\n</bt-app-finder>\r\n", styles: [":host{display:block;min-height:100vh}\n"], dependencies: [{ kind: "directive", type: i1.MobileDirective, selector: "[mobile]" }, { kind: "component", type: AppFinderComponent, selector: "bt-app-finder", inputs: ["appGroups", "deviceSize", "sideContentSize", "selectedAppGroup", "selectedAppGroupId", "mobile", "contentDensity", "contentHeight", "pinnedAppInAppTileGroups"], outputs: ["pinClick", "selectedAppGroupIdChange"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FormAppFinderComponent, decorators: [{
2117
- type: Component,
2118
- args: [{ selector: 'bt-form-app-finder', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-app-finder\r\n [appGroups]=\"(appGroups$ | async)!!\"\r\n [selectedAppGroupId]=\"(selectedAppGroupId$ | async)!!\"\r\n [selectedAppGroup]=\"(selectedAppGroup$ | async)!!\"\r\n [mobile]=\"(mobile$ | async)!!\"\r\n [sideContentSize]=\"(sideContentSize$ | async)!!\"\r\n [deviceSize]=\"(deviceSize$ | async)!!\"\r\n [contentDensity]=\"(contentDensity$ | async) ?? 'compact'\"\r\n [pinnedAppInAppTileGroups]=\"(pinnedAppInAppTileGroups$ | async)!!\"\r\n [contentHeight]=\"contentHeight\"\r\n (selectedAppGroupIdChange)=\"onSelectedAppGroupChange($event)\"\r\n (pinClick)=\"onPinClick($event)\"\r\n>\r\n</bt-app-finder>\r\n", styles: [":host{display:block;min-height:100vh}\n"] }]
2119
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.DialogService }, { type: AppFinderService }, { type: i0.ElementRef }, { type: i1$1.ContentDensityService }]; } });
2120
-
2121
- class FooterEditTileComponent extends BaseComponent {
2122
- }
2123
- FooterEditTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FooterEditTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2124
- FooterEditTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FooterEditTileComponent, selector: "bt-footer-edit-tile", usesInheritance: true, ngImport: i0, template: "<button fd-button [glyph]=\"'pushpin-off'\" fdType=\"\"></button>\r\n", styles: [":host{border-top:1px solid #ccc;padding-bottom:5px}\n"], dependencies: [{ kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FooterEditTileComponent, decorators: [{
2126
- type: Component,
2127
- args: [{ selector: 'bt-footer-edit-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button fd-button [glyph]=\"'pushpin-off'\" fdType=\"\"></button>\r\n", styles: [":host{border-top:1px solid #ccc;padding-bottom:5px}\n"] }]
2128
- }] });
2129
-
2130
- class NumericTileComponent extends BaseBtTileComponent {
2131
- get launchIcon() {
2132
- return this.settings.LaunchIcon;
2133
- }
2134
- get kpiState() {
2135
- return this.settings.ContentKpiState;
2136
- }
2137
- get kpi() {
2138
- return this.settings.ContentKpi;
2139
- }
2140
- get scaleState() {
2141
- return this.settings.ScaleState;
2142
- }
2143
- get scaleText() {
2144
- return this.settings.ScaleText;
2145
- }
2146
- get scaleArrowIcon() {
2147
- return this.settings.ScaleArrowIcon;
2148
- }
2149
- }
2150
- NumericTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumericTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2151
- NumericTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NumericTileComponent, selector: "bt-numeric-tile", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <div fd-numeric-content>\r\n <div fd-numeric-content-launch-icon-container>\r\n <i fd-numeric-content-launch-icon [glyph]=\"launchIcon\" [class]=\"launchIcon | sapFontClass\"></i>\r\n </div>\r\n <div fd-numeric-content-kpi-container>\r\n <div fd-numeric-content-kpi [state]=\"kpiState\">{{ kpi }}</div>\r\n </div>\r\n <div fd-numeric-content-scale-container style=\"padding-top: 0.2rem\">\r\n <div fd-numeric-content-scale [state]=\"scaleState\">\r\n <span\r\n fd-numeric-content-scale-arrow\r\n [glyph]=\"scaleArrowIcon\"\r\n [class]=\"scaleArrowIcon | sapFontClass\"\r\n ></span>\r\n <span fd-numeric-content-scale-text>{{ scaleText }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</bt-tile>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.NumericContentDirective, selector: "[fd-numeric-content]", inputs: ["class", "size"] }, { kind: "directive", type: i1$3.NumericContentKpiContainerDirective, selector: "[fd-numeric-content-kpi-container]" }, { kind: "directive", type: i1$3.NumericContentKpiDirective, selector: "[fd-numeric-content-kpi]", inputs: ["state", "class", "glyph"] }, { kind: "directive", type: i1$3.NumericContentLaunchIconContainerDirective, selector: "[fd-numeric-content-launch-icon-container]" }, { kind: "directive", type: i1$3.NumericContentLaunchIconDirective, selector: "[fd-numeric-content-launch-icon]", inputs: ["class", "glyph"] }, { kind: "directive", type: i1$3.NumericContentScaleArrowDirective, selector: "[fd-numeric-content-scale-arrow]", inputs: ["class", "glyph"] }, { kind: "directive", type: i1$3.NumericContentScaleContainerDirective, selector: "[fd-numeric-content-scale-container]" }, { kind: "directive", type: i1$3.NumericContentScaleDirective, selector: "[fd-numeric-content-scale]", inputs: ["state", "class"] }, { kind: "directive", type: i1$3.NumericContentScaleTextDirective, selector: "[fd-numeric-content-scale-text]" }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: i5.SapFontClassPipe, name: "sapFontClass" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NumericTileComponent, decorators: [{
2153
- type: Component,
2154
- args: [{ selector: 'bt-numeric-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <div fd-numeric-content>\r\n <div fd-numeric-content-launch-icon-container>\r\n <i fd-numeric-content-launch-icon [glyph]=\"launchIcon\" [class]=\"launchIcon | sapFontClass\"></i>\r\n </div>\r\n <div fd-numeric-content-kpi-container>\r\n <div fd-numeric-content-kpi [state]=\"kpiState\">{{ kpi }}</div>\r\n </div>\r\n <div fd-numeric-content-scale-container style=\"padding-top: 0.2rem\">\r\n <div fd-numeric-content-scale [state]=\"scaleState\">\r\n <span\r\n fd-numeric-content-scale-arrow\r\n [glyph]=\"scaleArrowIcon\"\r\n [class]=\"scaleArrowIcon | sapFontClass\"\r\n ></span>\r\n <span fd-numeric-content-scale-text>{{ scaleText }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</bt-tile>\r\n" }]
2155
- }] });
2156
-
2157
- class LogoTileComponent extends BaseBtTileComponent {
2158
- get fileId() {
2159
- let fileId = this.settings.Logo?.FileId;
2160
- if (!fileId) {
2161
- fileId = this.settings.CalcLogo?.FileId;
2162
- }
2163
- return fileId;
2164
- }
2165
- }
2166
- LogoTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LogoTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2167
- LogoTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: LogoTileComponent, selector: "bt-logo-tile", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n>\r\n <div fd-tile-content>\r\n <img fd-tile-logo [src]=\"fileId | picFieldSrc: 'GetPictureFromFileInfo':null\" />\r\n </div>\r\n</bt-tile>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileLogoDirective, selector: "[fdTileLogo], [fd-tile-logo]" }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: i1.PictureFieldSourcePipe, name: "picFieldSrc" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: LogoTileComponent, decorators: [{
2169
- type: Component,
2170
- args: [{ selector: 'bt-logo-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n>\r\n <div fd-tile-content>\r\n <img fd-tile-logo [src]=\"fileId | picFieldSrc: 'GetPictureFromFileInfo':null\" />\r\n </div>\r\n</bt-tile>\r\n" }]
2171
- }] });
2172
-
2173
- class FeedTileComponent extends BaseBtTileComponent {
2174
- get twoColumn() {
2175
- return this.settings.TwoColumn;
2176
- }
2177
- get text() {
2178
- return this.settings.ContentText;
2179
- }
2180
- get byline() {
2181
- return this.settings.ContentByLine;
2182
- }
2183
- get kpi() {
2184
- return this.settings.ContentKpi;
2185
- }
2186
- get state() {
2187
- return this.settings.State;
2188
- }
2189
- }
2190
- FeedTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FeedTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2191
- FeedTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: FeedTileComponent, selector: "bt-feed-tile", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'feed'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content [twoColumn]=\"twoColumn\">\r\n <ng-container *ngIf=\"twoColumn; else oneColumn\">\r\n <div fd-tile-section>\r\n <div fd-tile-content-text>{{ text | bbbTranslate }}</div>\r\n <div fd-tile-content-byline>{{ byline }}</div>\r\n </div>\r\n <div fd-tile-section>\r\n <div fd-numeric-content>\r\n <div fd-numeric-content-kpi-container>\r\n <div fd-numeric-content-kpi [state]=\"state\">{{ kpi }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-template #oneColumn>\r\n <div fd-numeric-content>\r\n <div fd-numeric-content-kpi-container>\r\n <div fd-numeric-content-kpi [state]=\"state\">{{ kpi }}</div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n</bt-tile>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileSectionDirective, selector: "[fdTileSection], [fd-tile-section]" }, { kind: "directive", type: i1$3.TileContentBylineDirective, selector: "[fdTileContentByline], [fd-tile-content-byline]" }, { kind: "directive", type: i1$3.TileContentTextDirective, selector: "[fdTileContentText], [fd-tile-content-text]" }, { kind: "directive", type: i1$3.NumericContentDirective, selector: "[fd-numeric-content]", inputs: ["class", "size"] }, { kind: "directive", type: i1$3.NumericContentKpiContainerDirective, selector: "[fd-numeric-content-kpi-container]" }, { kind: "directive", type: i1$3.NumericContentKpiDirective, selector: "[fd-numeric-content-kpi]", inputs: ["state", "class", "glyph"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: FeedTileComponent, decorators: [{
2193
- type: Component,
2194
- args: [{ selector: 'bt-feed-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'feed'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content [twoColumn]=\"twoColumn\">\r\n <ng-container *ngIf=\"twoColumn; else oneColumn\">\r\n <div fd-tile-section>\r\n <div fd-tile-content-text>{{ text | bbbTranslate }}</div>\r\n <div fd-tile-content-byline>{{ byline }}</div>\r\n </div>\r\n <div fd-tile-section>\r\n <div fd-numeric-content>\r\n <div fd-numeric-content-kpi-container>\r\n <div fd-numeric-content-kpi [state]=\"state\">{{ kpi }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-template #oneColumn>\r\n <div fd-numeric-content>\r\n <div fd-numeric-content-kpi-container>\r\n <div fd-numeric-content-kpi [state]=\"state\">{{ kpi }}</div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n</bt-tile>\r\n" }]
2195
- }] });
2196
-
2197
- class SimpleTileComponent extends BaseBtTileComponent {
2198
- ngOnInit() {
2199
- super.ngOnInit();
2200
- this.icon = this.settings.Icon;
2201
- this.iconColor = this.settings.IconColor;
2202
- }
2203
- }
2204
- SimpleTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: SimpleTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2205
- SimpleTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: SimpleTileComponent, selector: "bt-simple-tile", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <fd-icon *ngIf=\"icon\" [glyph]=\"icon\" [font]=\"icon | sapFont\" [style.color]=\"iconColor\"></fd-icon>\r\n </div>\r\n</bt-tile>\r\n", styles: ["::ng-deep .fd-tile--launch .fd-tile__content{align-items:normal!important}fd-icon{font-size:3rem}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: i5.SapFontPipe, name: "sapFont" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: SimpleTileComponent, decorators: [{
2207
- type: Component,
2208
- args: [{ selector: 'bt-simple-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <fd-icon *ngIf=\"icon\" [glyph]=\"icon\" [font]=\"icon | sapFont\" [style.color]=\"iconColor\"></fd-icon>\r\n </div>\r\n</bt-tile>\r\n", styles: ["::ng-deep .fd-tile--launch .fd-tile__content{align-items:normal!important}fd-icon{font-size:3rem}\n"] }]
2209
- }] });
2210
-
2211
- class ProfileTileComponent extends BaseBtTileComponent {
2212
- get fileId() {
2213
- let fileId = this.settings.Image?.FileId;
2214
- if (!fileId) {
2215
- fileId = this.settings.CalcImage;
2216
- }
2217
- return fileId;
2218
- }
2219
- }
2220
- ProfileTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProfileTileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2221
- ProfileTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ProfileTileComponent, selector: "bt-profile-tile", usesInheritance: true, ngImport: i0, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <span\r\n *ngIf=\"fileId; else showIcon\"\r\n class=\"profile\"\r\n fd-tile-profile-img\r\n [backgroundImage]=\"fileId | picFieldSrc: 'GetPictureFromFileInfo':null\"\r\n ></span>\r\n <ng-template #showIcon>\r\n <fd-icon\r\n *ngIf=\"settings.Icon; else avatar\"\r\n [font]=\"settings.Icon | sapFont\"\r\n fd-tile-profile-img\r\n style=\"font-size: 2rem\"\r\n [glyph]=\"settings.Icon\"\r\n ></fd-icon>\r\n </ng-template>\r\n <ng-template #avatar>\r\n <fd-icon font=\"SAP-icons-TNT\" fd-tile-profile-img style=\"font-size: 2rem\" glyph=\"user\"></fd-icon>\r\n </ng-template>\r\n </div>\r\n</bt-tile>\r\n", styles: [".profile{background-size:contain;background-repeat:no-repeat}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IconComponent, selector: "fd-icon", inputs: ["glyph", "font", "class", "ariaLabel"] }, { kind: "directive", type: i1$3.TileContentDirective, selector: "[fdTileContent], [fd-tile-content]", inputs: ["twoColumn"] }, { kind: "directive", type: i1$3.TileProfileImgDirective, selector: "[fdTileProfileImg], [fd-tile-profile-img]", inputs: ["id", "ariaLabel", "ariaLabelledby", "backgroundImage"] }, { kind: "component", type: TileComponent, selector: "bt-tile", inputs: ["type", "footerTemplate", "footer", "disableClick", "title", "icon", "subtitle", "isDouble", "edit", "dynamicCommand"] }, { kind: "pipe", type: i1.PictureFieldSourcePipe, name: "picFieldSrc" }, { kind: "pipe", type: i5.SapFontPipe, name: "sapFont" }, { kind: "pipe", type: TilePropPipe, name: "tileProp" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ProfileTileComponent, decorators: [{
2223
- type: Component,
2224
- args: [{ selector: 'bt-profile-tile', changeDetection: ChangeDetectionStrategy.OnPush, template: "<bt-tile\r\n [data]=\"data\"\r\n [type]=\"'launch'\"\r\n [edit]=\"edit\"\r\n [title]=\"data | tileProp: 'Title':parameters\"\r\n [subtitle]=\"data | tileProp: 'Subtitle':parameters\"\r\n [dynamicCommand]=\"data | tileProp: 'DynamicCommand':parameters\"\r\n [isDouble]=\"data | tileProp: 'IsDouble':parameters\"\r\n [footer]=\"data | tileProp: 'Footer':parameters\"\r\n (hideClick)=\"hideClick.emit()\"\r\n (renameClick)=\"renameClick.emit()\"\r\n (click)=\"onTileClick()\"\r\n>\r\n <div fd-tile-content>\r\n <span\r\n *ngIf=\"fileId; else showIcon\"\r\n class=\"profile\"\r\n fd-tile-profile-img\r\n [backgroundImage]=\"fileId | picFieldSrc: 'GetPictureFromFileInfo':null\"\r\n ></span>\r\n <ng-template #showIcon>\r\n <fd-icon\r\n *ngIf=\"settings.Icon; else avatar\"\r\n [font]=\"settings.Icon | sapFont\"\r\n fd-tile-profile-img\r\n style=\"font-size: 2rem\"\r\n [glyph]=\"settings.Icon\"\r\n ></fd-icon>\r\n </ng-template>\r\n <ng-template #avatar>\r\n <fd-icon font=\"SAP-icons-TNT\" fd-tile-profile-img style=\"font-size: 2rem\" glyph=\"user\"></fd-icon>\r\n </ng-template>\r\n </div>\r\n</bt-tile>\r\n", styles: [".profile{background-size:contain;background-repeat:no-repeat}\n"] }]
2225
- }] });
2226
-
2227
- class NotificationGroupHeaderComponent extends BaseComponent {
2228
- constructor(_cdr) {
2229
- super();
2230
- this._cdr = _cdr;
2231
- this.unreadCount = 0;
2232
- }
2233
- ngOnInit() {
2234
- super.ngOnInit();
2235
- this.setUnreadCount(this.notifications);
2236
- }
2237
- ngOnChanges(changes) {
2238
- super.ngOnChanges(changes);
2239
- const { notifications } = changes;
2240
- if (notifications && !notifications.firstChange) {
2241
- this.setUnreadCount(notifications.currentValue);
2242
- this._cdr.detectChanges();
2243
- }
2244
- }
2245
- setUnreadCount(notifications) {
2246
- this.unreadCount = notifications.filter((c) => c.Unread).length;
2247
- }
2248
- }
2249
- NotificationGroupHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NotificationGroupHeaderComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2250
- NotificationGroupHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NotificationGroupHeaderComponent, selector: "bt-notification-group-header", inputs: { notifications: "notifications", title: "title" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<h2 fd-notification-title [unread]=\"false\">\r\n {{ title | bbbTranslate }} ({{ notifications.length }})\r\n <strong *ngIf=\"unreadCount !== 0\">{{ 'New' | bbbTranslate }} ({{ unreadCount }})</strong>\r\n</h2>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$2.NotificationTitleDirective, selector: "[fdNotificationTitle], [fd-notification-title]", inputs: ["unread"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NotificationGroupHeaderComponent, decorators: [{
2252
- type: Component,
2253
- args: [{ selector: 'bt-notification-group-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<h2 fd-notification-title [unread]=\"false\">\r\n {{ title | bbbTranslate }} ({{ notifications.length }})\r\n <strong *ngIf=\"unreadCount !== 0\">{{ 'New' | bbbTranslate }} ({{ unreadCount }})</strong>\r\n</h2>\r\n" }]
2254
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { notifications: [{
2255
- type: Input
2256
- }], title: [{
2257
- type: Input
2258
- }] } });
2259
-
2260
- class NotificationGroupComponent extends BaseComponent {
2261
- constructor(_groupByPipe, _cdr) {
2262
- super();
2263
- this._groupByPipe = _groupByPipe;
2264
- this._cdr = _cdr;
2265
- this._deviceSize = '';
2266
- this.viewed = new EventEmitter();
2267
- this.remove = new EventEmitter();
2268
- this.actionClick = new EventEmitter();
2269
- this.show = new EventEmitter();
2270
- this.loadMore = new EventEmitter();
2271
- this.expanded = {};
2272
- this.tabList = [
2273
- { title: 'By Date', groupByItems: [] },
2274
- { title: 'By Type', groupByItems: [] },
2275
- { title: 'By Priority', groupByItems: [] }
2276
- ];
2277
- this.viewedNotifications = [];
2278
- }
2279
- ngOnInit() {
2280
- super.ngOnInit();
2281
- this._deviceSize = this.deviceSize;
2282
- this.applyGroupByItems(this.notifications);
2283
- }
2284
- ngOnChanges(changes) {
2285
- super.ngOnChanges(changes);
2286
- const { notifications } = changes;
2287
- if (notifications && !notifications.firstChange) {
2288
- this.applyGroupByItems(notifications.currentValue);
2289
- this._cdr.detectChanges();
2290
- }
2291
- }
2292
- applyGroupByItems(notifications) {
2293
- if (!notifications?.length) {
2294
- return;
2295
- }
2296
- this.tabList[0].groupByItems = this._groupByPipe.transform(notifications, 'CreationDate');
2297
- this.tabList[1].groupByItems = this._groupByPipe.transform(notifications, 'Subject');
2298
- this.tabList[2].groupByItems = this._groupByPipe.transform(notifications, 'Priority');
2299
- for (let i = 0; i < this.tabList.length; i++) {
2300
- if (this.tabList[i].groupByItems.length) {
2301
- const firstKey = this.tabList[i].groupByItems[0].key;
2302
- if (firstKey && typeof this.expanded[firstKey] === 'undefined') {
2303
- this.expanded[firstKey] = true;
2304
- }
2305
- }
2306
- }
2307
- }
2308
- _trackByTitle(_index, _) {
2309
- return _index;
2310
- }
2311
- _trackByKey(_index, item) {
2312
- return item.key;
2313
- }
2314
- _trackMoById(_index, mo) {
2315
- return mo.Id;
2316
- }
2317
- onVisibilityChange(e, mo, isLast) {
2318
- if (e === IntersectionStatus.Visible) {
2319
- if (mo.Unread) {
2320
- this.viewedNotifications = [...this.viewedNotifications.filter((c) => c.Unread), mo];
2321
- this.viewed.emit(mo);
2322
- }
2323
- if (isLast) {
2324
- this.loadMore.emit();
2325
- }
2326
- }
2327
- }
2328
- onWorkflowExecuteChoiceStatusChanged(e, mo) {
2329
- if (e.result && !e.error) {
2330
- this.remove.emit({ items: [mo], silent: true });
2331
- BarsaApi.Bw.Toast.Success(`${e.choice?.Title} ${BarsaApi.BBB.Action}`);
2332
- return;
2333
- }
2334
- mo.$ChoiceDefStatus = e;
2335
- this._cdr.detectChanges();
2336
- }
2337
- }
2338
- NotificationGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NotificationGroupComponent, deps: [{ token: i1.GroupByPipe }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2339
- NotificationGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: NotificationGroupComponent, selector: "bt-notification-group", inputs: { notifications: "notifications", loading: "loading", deviceSize: "deviceSize", notificationCount: "notificationCount" }, outputs: { viewed: "viewed", remove: "remove", actionClick: "actionClick", show: "show", loadMore: "loadMore" }, host: { properties: { "class": "this._deviceSize" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"notifications && notifications.length > 0; else noData\">\n <ng-container>\n <fd-notification-group>\n <fd-tab-list size=\"s\" [expandOverflowText]=\"'More' | bbbTranslate\">\n <fd-tab\n [title]=\"tab.title | bbbTranslate\"\n *ngFor=\"let tab of tabList; let index = index; trackBy: _trackByTitle\"\n >\n <fd-notification-group-list\n *ngFor=\"let groupItem of tab.groupByItems; let index = index; trackBy: _trackByKey\"\n >\n <fd-notification-group-header [(expanded)]=\"expanded[groupItem.key]\">\n <fd-notification-header>\n <bt-notification-group-header\n [notifications]=\"groupItem.value\"\n [title]=\"groupItem.key\"\n ></bt-notification-group-header>\n </fd-notification-header>\n <fd-notification-actions>\n <!-- <button fd-button label=\"Accept All\"></button> -->\n <button\n fd-button\n fdType=\"transparent\"\n [ariaLabel]=\"'DeleteAll' | bbbTranslate\"\n [title]=\"'DeleteAll' | bbbTranslate\"\n glyph=\"decline\"\n (click)=\"remove.emit({ items: groupItem.value, silent: false })\"\n ></button>\n </fd-notification-actions>\n </fd-notification-group-header>\n <ng-container\n *ngTemplateOutlet=\"\n notificationBody;\n context: { $implicit: groupItem.value, expanded: expanded[groupItem.key] }\n \"\n ></ng-container>\n <!-- <fd-notification-limit *ngIf=\"groupItem.value.length - 4 > 0\">\n <h1 fd-notification-limit-title>\n There are {{ groupItem.value.length - 4 }} more notifications\n </h1>\n <p fd-notification-limit-description>\n You need to close or take action on the listed notifications to display more.\n </p>\n </fd-notification-limit> -->\n </fd-notification-group-list>\n </fd-tab>\n </fd-tab-list>\n </fd-notification-group>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <bsu-no-data *ngIf=\"!loading; else loadingTpl\"></bsu-no-data>\n</ng-template>\n<ng-template #loadingTpl>\n <div style=\"height: 30px; position: relative\">\n <bsu-mask [top]=\"'10px'\"></bsu-mask>\n </div>\n</ng-template>\n<ng-template #notificationItem> </ng-template>\n\n<ng-template #notificationBody let-notifications let-exapanded=\"expanded\">\n <div style=\"max-height: 346px; overflow-y: auto; overflow-x: hidden\">\n <ng-container *ngFor=\"let mo of notifications; trackBy: _trackMoById; let first = first; let last = last\">\n <bsu-notification-item\n [notificationItem]=\"mo\"\n (viewed)=\"viewed.emit($event)\"\n (remove)=\"remove.emit($event)\"\n (show)=\"show.emit($event)\"\n (actionClick)=\"actionClick.emit($event)\"\n intersectionObserver\n [intersectionThreshold]=\"0.5\"\n [deviceSize]=\"deviceSize\"\n (visibilityChange)=\"onVisibilityChange($event, mo, last)\"\n ></bsu-notification-item>\n </ng-container>\n <ng-container *ngIf=\"loading\">\n <ng-container *ngTemplateOutlet=\"loadingTpl\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{display:block;min-width:600px}:host ::ng-deep .fd-tabs__content{overflow:hidden}:host ::ng-deep .fd-notification{padding:0;box-shadow:none}fd-notification{margin:0;padding-left:0rem!important;padding-right:0rem!important}fd-notification-body{position:relative}.noloading{visibility:hidden;height:0;width:0}.loading{visibility:visible;height:100%;width:100%}:host.s{min-width:auto}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "component", type: i4$2.NotificationHeaderComponent, selector: "fd-notification-header", inputs: ["uniqueId"] }, { kind: "component", type: i4$2.NotificationActionsComponent, selector: "fd-notification-actions" }, { kind: "component", type: i4$2.NotificationGroupHeaderComponent, selector: "fd-notification-group-header", inputs: ["expandCompact", "expandAriaLabel", "expandAriaLabelledBy", "expanded"], outputs: ["expandedChange"] }, { kind: "component", type: i4$2.NotificationGroupComponent, selector: "fd-notification-group", inputs: ["class", "mobile", "width"] }, { kind: "component", type: i4$2.NotificationGroupListComponent, selector: "fd-notification-group-list" }, { kind: "component", type: i9$1.TabListComponent, selector: "fd-tab-list", inputs: ["size", "mode", "collapseOverflow", "maxVisibleTabs", "stackContent", "maxContentHeight", "collapsibleTabs", "expandOverflowText", "defaultTab", "selectDefaultOnTabsChange"], outputs: ["selectedTabChange", "visibleItemsCount", "hiddenItemsCount"] }, { kind: "component", type: i9$1.TabPanelComponent, selector: "fd-tab", inputs: ["id", "ariaLabel", "ariaLabelledBy", "title", "count", "glyph", "header", "disabled", "tabState"], outputs: ["opened", "closed"] }, { kind: "directive", type: i1.IntersectionObserverDirective, selector: "[intersectionObserver]", inputs: ["intersectionDebounce", "intersectionRootMargin", "intersectionRoot", "intersectionThreshold"], outputs: ["visibilityChange"] }, { kind: "component", type: i5.MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }, { kind: "component", type: i5.NoDataComponent, selector: "bsu-no-data", inputs: ["simple"] }, { kind: "component", type: i5.NotificationItemComponent, selector: "bsu-notification-item", inputs: ["option", "notificationItem", "showCloseButton", "deviceSize"], outputs: ["viewed", "remove", "actionClick", "show", "close"] }, { kind: "component", type: NotificationGroupHeaderComponent, selector: "bt-notification-group-header", inputs: ["notifications", "title"] }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2340
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: NotificationGroupComponent, decorators: [{
2341
- type: Component,
2342
- args: [{ selector: 'bt-notification-group', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"notifications && notifications.length > 0; else noData\">\n <ng-container>\n <fd-notification-group>\n <fd-tab-list size=\"s\" [expandOverflowText]=\"'More' | bbbTranslate\">\n <fd-tab\n [title]=\"tab.title | bbbTranslate\"\n *ngFor=\"let tab of tabList; let index = index; trackBy: _trackByTitle\"\n >\n <fd-notification-group-list\n *ngFor=\"let groupItem of tab.groupByItems; let index = index; trackBy: _trackByKey\"\n >\n <fd-notification-group-header [(expanded)]=\"expanded[groupItem.key]\">\n <fd-notification-header>\n <bt-notification-group-header\n [notifications]=\"groupItem.value\"\n [title]=\"groupItem.key\"\n ></bt-notification-group-header>\n </fd-notification-header>\n <fd-notification-actions>\n <!-- <button fd-button label=\"Accept All\"></button> -->\n <button\n fd-button\n fdType=\"transparent\"\n [ariaLabel]=\"'DeleteAll' | bbbTranslate\"\n [title]=\"'DeleteAll' | bbbTranslate\"\n glyph=\"decline\"\n (click)=\"remove.emit({ items: groupItem.value, silent: false })\"\n ></button>\n </fd-notification-actions>\n </fd-notification-group-header>\n <ng-container\n *ngTemplateOutlet=\"\n notificationBody;\n context: { $implicit: groupItem.value, expanded: expanded[groupItem.key] }\n \"\n ></ng-container>\n <!-- <fd-notification-limit *ngIf=\"groupItem.value.length - 4 > 0\">\n <h1 fd-notification-limit-title>\n There are {{ groupItem.value.length - 4 }} more notifications\n </h1>\n <p fd-notification-limit-description>\n You need to close or take action on the listed notifications to display more.\n </p>\n </fd-notification-limit> -->\n </fd-notification-group-list>\n </fd-tab>\n </fd-tab-list>\n </fd-notification-group>\n </ng-container>\n</ng-container>\n<ng-template #noData>\n <bsu-no-data *ngIf=\"!loading; else loadingTpl\"></bsu-no-data>\n</ng-template>\n<ng-template #loadingTpl>\n <div style=\"height: 30px; position: relative\">\n <bsu-mask [top]=\"'10px'\"></bsu-mask>\n </div>\n</ng-template>\n<ng-template #notificationItem> </ng-template>\n\n<ng-template #notificationBody let-notifications let-exapanded=\"expanded\">\n <div style=\"max-height: 346px; overflow-y: auto; overflow-x: hidden\">\n <ng-container *ngFor=\"let mo of notifications; trackBy: _trackMoById; let first = first; let last = last\">\n <bsu-notification-item\n [notificationItem]=\"mo\"\n (viewed)=\"viewed.emit($event)\"\n (remove)=\"remove.emit($event)\"\n (show)=\"show.emit($event)\"\n (actionClick)=\"actionClick.emit($event)\"\n intersectionObserver\n [intersectionThreshold]=\"0.5\"\n [deviceSize]=\"deviceSize\"\n (visibilityChange)=\"onVisibilityChange($event, mo, last)\"\n ></bsu-notification-item>\n </ng-container>\n <ng-container *ngIf=\"loading\">\n <ng-container *ngTemplateOutlet=\"loadingTpl\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{display:block;min-width:600px}:host ::ng-deep .fd-tabs__content{overflow:hidden}:host ::ng-deep .fd-notification{padding:0;box-shadow:none}fd-notification{margin:0;padding-left:0rem!important;padding-right:0rem!important}fd-notification-body{position:relative}.noloading{visibility:hidden;height:0;width:0}.loading{visibility:visible;height:100%;width:100%}:host.s{min-width:auto}\n"] }]
2343
- }], ctorParameters: function () { return [{ type: i1.GroupByPipe }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { notifications: [{
2344
- type: Input
2345
- }], loading: [{
2346
- type: Input
2347
- }], deviceSize: [{
2348
- type: Input
2349
- }], notificationCount: [{
2350
- type: Input
2351
- }], _deviceSize: [{
2352
- type: HostBinding,
2353
- args: ['class']
2354
- }], viewed: [{
2355
- type: Output
2356
- }], remove: [{
2357
- type: Output
2358
- }], actionClick: [{
2359
- type: Output
2360
- }], show: [{
2361
- type: Output
2362
- }], loadMore: [{
2363
- type: Output
2364
- }] } });
2365
-
2366
- class BarsaShellbarComponent extends BaseComponent {
2367
- constructor(_notificationService, _dialogService, _document, appVersion) {
2368
- super();
2369
- this._notificationService = _notificationService;
2370
- this._dialogService = _dialogService;
2371
- this._document = _document;
2372
- this.appVersion = appVersion;
2373
- this.openNotificationPanel = new EventEmitter();
2374
- this.cultureChanged = new EventEmitter();
2375
- this.notificationLoadMore = new EventEmitter();
2376
- this.removeNotification = new EventEmitter();
2377
- this.notifiationActionClick = new EventEmitter();
2378
- this.notificationViewed = new EventEmitter();
2379
- this.isOpenNotificatoin = false;
2380
- this.user = {
2381
- initials: 'WW',
2382
- colorAccent: 1
2383
- };
2384
- this.searchTerms = ['مرخصی', 'ماموریت', 'تیکت', 'پروژه'];
2385
- this.showVersion = false;
2386
- this._viewedNotifications$ = new Subject();
2387
- this.onBellNotification = () => {
2388
- this._document?.body && this._document.body.click();
2389
- this._dialogService
2390
- .open(this._notificationsDialog, {
2391
- mobile: true,
2392
- fullScreen: true,
2393
- verticalPadding: false,
2394
- closeOnNavigation: true
2395
- })
2396
- .afterLoaded.subscribe(() => {
2397
- this.openNotificationPanel.emit();
2398
- });
2399
- };
2400
- this._viewedNotifications = [];
2401
- this.onOpenNotification = () => {
2402
- this.isOpenNotificatoin = true;
2403
- this.openNotificationPanel.emit();
2404
- };
2405
- this.onLanguage = (e) => {
2406
- const culture = e.currentTarget.textContent.trim();
2407
- this._changeCulture(culture);
2408
- };
2409
- this.showVersion = !BarsaApi.LoginFormData.IsServiceDesk;
2410
- this.showVersion = false;
2411
- }
2412
- ngOnInit() {
2413
- super.ngOnInit();
2414
- }
2415
- onCultureChange(culture) {
2416
- this._changeCulture(culture);
2417
- }
2418
- onShowNotification(e) {
2419
- this.isOpenNotificatoin = false;
2420
- this._notificationService.ShowNotificationRelatedMo(e);
2421
- }
2422
- onNotificationItemViewed(viewedMo) {
2423
- this.notificationViewed.emit(viewedMo);
2424
- }
2425
- onRemoveNotifications(e) {
2426
- this.removeNotification.emit(e);
2427
- }
2428
- onNotificationAction(e) {
2429
- this.notifiationActionClick.emit(e);
2430
- }
2431
- onNotificationLoadMore() {
2432
- this.notificationLoadMore.emit();
2433
- }
2434
- _changeCulture(culture) {
2435
- this.cultureChanged.emit(culture);
2436
- }
2437
- }
2438
- BarsaShellbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaShellbarComponent, deps: [{ token: i1.NotificationService }, { token: i1$1.DialogService }, { token: DOCUMENT }, { token: APP_VERSION }], target: i0.ɵɵFactoryTarget.Component });
2439
- BarsaShellbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: BarsaShellbarComponent, selector: "bt-barsa-shellbar", inputs: { cssCustomUrl: "cssCustomUrl", cssUrl: "cssUrl", allowAnonymous: "allowAnonymous", multiLanguages: "multiLanguages", userLoggedIn: "userLoggedIn", settings: "settings", productMenuControl: "productMenuControl", deviceSize: "deviceSize", cultures: "cultures", shellbarData: "shellbarData", notificationCount: "notificationCount", notifcationLoaded: "notifcationLoaded", notificationLoading: "notificationLoading", notifications: "notifications", productMenuItems1: "productMenuItems1", bodyClick: "bodyClick", logo: "logo", actions: "actions", userMenu: "userMenu", productSwitcher: "productSwitcher", subtitle: "subtitle" }, outputs: { openNotificationPanel: "openNotificationPanel", cultureChanged: "cultureChanged", notificationLoadMore: "notificationLoadMore", removeNotification: "removeNotification", notifiationActionClick: "notifiationActionClick", notificationViewed: "notificationViewed" }, viewQueries: [{ propertyName: "comboboxComponent", first: true, predicate: ComboboxComponent, descendants: true }, { propertyName: "popoverComponent", first: true, predicate: ["popoverComponent"], descendants: true }, { propertyName: "_notificationsDialog", first: true, predicate: ["notificationsDialog"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<link *ngIf=\"cssUrl\" type=\"text/css\" rel=\"stylesheet\" [href]=\"cssUrl\" />\n<link *ngIf=\"cssCustomUrl\" type=\"text/css\" rel=\"stylesheet\" [href]=\"cssCustomUrl\" />\n\n<fd-shellbar *ngIf=\"userLoggedIn || allowAnonymous\" [size]=\"deviceSize\" [ngClass]=\"deviceSize\">\n <fd-shellbar-logo *ngIf=\"logo\">\n <a\n [style.backgroundImage]=\"'url(' + (logo?.FileId | picFieldSrc: 'GetPictureFromFileInfo':null) + ')'\"\n href=\"/\"\n class=\"fd-shellbar__logo fd-shellbar__logo--image-replaced\"\n aria-label=\"Barsa Novin Ray\"\n ></a>\n </fd-shellbar-logo>\n\n <fd-product-menu\n *ngIf=\"!settings?.HideProductMenu && productMenuItems1 && productMenuItems1.length > 0\"\n [control]=\"productMenuControl\"\n [closePopoverOnSelect]=\"true\"\n [items]=\"productMenuItems1\"\n >\n </fd-product-menu>\n\n <fd-shellbar-subtitle> {{ subtitle | bbbTranslate }}{{ showVersion ? appVersion : '' }} </fd-shellbar-subtitle>\n <fd-shellbar-actions\n *ngIf=\"user && (userMenu?.length || !settings?.HideLanguage)\"\n [user]=\"user\"\n [userMenu]=\"userMenu\"\n #langRef\n >\n <fd-shellbar-action\n *ngFor=\"let action of actions\"\n [glyph]=\"action.Icon\"\n [callback]=\"action.Callback\"\n [label]=\"action.Label\"\n >\n </fd-shellbar-action>\n <fd-shellbar-action\n *ngIf=\"deviceSize === 's' && userLoggedIn && !settings?.HideNotifications\"\n [glyph]=\"'bell'\"\n [label]=\"'Notifications' | bbbTranslate\"\n [notificationCount]=\"notificationCount.unread ?? 0\"\n [notificationLabel]=\"'Notifications' | bbbTranslate\"\n [callback]=\"onBellNotification\"\n >\n </fd-shellbar-action>\n <fd-popover\n *ngIf=\"!settings?.HideNotifications && userLoggedIn\"\n [(isOpen)]=\"isOpenNotificatoin\"\n [triggers]=\"[]\"\n [focusTrapped]=\"true\"\n [noArrow]=\"true\"\n placement=\"bottom\"\n title=\"Notification Popover\"\n [focusAutoCapture]=\"true\"\n [mobile]=\"deviceSize === 's'\"\n #popoverComponent\n >\n <fd-popover-control>\n <fd-shellbar-action\n [glyph]=\"'bell'\"\n [label]=\"'Notification'\"\n [notificationCount]=\"notificationCount.unread\"\n [notificationLabel]=\"'Notification Label'\"\n [callback]=\"onOpenNotification\"\n >\n </fd-shellbar-action>\n </fd-popover-control>\n <fd-popover-body style=\"min-width: 320px; overflow-x: auto; box-shadow: var(--sapContent_Shadow0)\">\n <ng-container\n *ngTemplateOutlet=\"notificationGroupTpl; context: { notificationCount: notificationCount }\"\n ></ng-container>\n </fd-popover-body>\n </fd-popover>\n\n <fd-shellbar-action\n *ngIf=\"!settings?.HideLanguage && deviceSize !== 's' && multiLanguages\"\n [glyph]=\"'world'\"\n [label]=\"'language'\"\n [fdMenuTrigger]=\"menu\"\n (callback)=\"(onLanguage)\"\n >\n </fd-shellbar-action>\n <ng-container *ngIf=\"!settings?.HideLanguage && deviceSize === 's' && multiLanguages\">\n <fd-shellbar-action\n *ngFor=\"let culture of cultures | keyvalue\"\n [label]=\"culture.value\"\n [callback]=\"onLanguage\"\n class=\"culture-abbrivation\"\n [glyph]=\"culture.key\"\n [ngClass]=\"'flags'\"\n >\n </fd-shellbar-action>\n </ng-container>\n\n <fd-product-switch *ngIf=\"productSwitcher?.length\">\n <fd-product-switch-body [products]=\"productSwitcher\" [forceListMode]=\"deviceSize === 's'\">\n </fd-product-switch-body>\n </fd-product-switch>\n </fd-shellbar-actions>\n</fd-shellbar>\n<ng-template #loading>\n <bsu-mask></bsu-mask>\n</ng-template>\n\n<fd-menu #menu>\n <ul fd-list>\n <li fd-list-item *ngFor=\"let culture of cultures | keyvalue\">\n <a fd-list-link (click)=\"onCultureChange(culture.value)\">\n <span fd-list-title>\n <img width=\"14px\" height=\"12px\" [src]=\"'/assets/flags/' + culture.key + '.png'\" />\n <span class=\"culture-abbrivation\" [ngClass]=\"culture.key\"> {{ culture.key }}</span>\n </span>\n </a>\n </li>\n </ul>\n</fd-menu>\n<ng-template #notificationGroupTpl let-notificationCount=\"notificationCount\">\n <div style=\"position: relative; height: 100px\" *ngIf=\"!notifcationLoaded && notificationLoading === true\">\n <bsu-mask size=\"s\"></bsu-mask>\n </div>\n <bt-notification-group\n [notifications]=\"notifications\"\n [notificationCount]=\"notificationCount\"\n [loading]=\"notificationLoading === true\"\n (viewed)=\"onNotificationItemViewed($event)\"\n (remove)=\"onRemoveNotifications($event)\"\n (show)=\"popoverComponent.close(); onShowNotification($event)\"\n (actionClick)=\"popoverComponent.close(); onNotificationAction($event)\"\n (loadMore)=\"onNotificationLoadMore()\"\n [deviceSize]=\"deviceSize\"\n ></bt-notification-group>\n</ng-template>\n\n<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #notificationsDialog>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <h1 id=\"fd-dialog-header-10\" fd-title>{{ 'Notification' | bbbTranslate }}</h1>\n <button fd-dialog-close-button (click)=\"dialog.dismiss()\"></button>\n </fd-dialog-header>\n <fd-dialog-body class=\"mobile\">\n <ng-container\n *ngTemplateOutlet=\"notificationGroupTpl; context: { notificationCount: notificationCount }\"\n ></ng-container>\n </fd-dialog-body>\n </fd-dialog>\n</ng-template>\n", styles: [":host{display:contents}:host ::ng-deep fd-shellbar-actions fd-avatar{background-color:transparent!important;color:var(--sapShell_InteractiveTextColor, #d1e8ff)}:host ::ng-deep fd-combobox .fd-input-group input{min-width:2rem;height:1.625rem;margin-top:.1875rem;margin-bottom:.1875rem;padding:0 .5rem;box-sizing:border-box}:host ::ng-deep fd-combobox .fd-input-group span{min-width:2rem;min-height:1.625rem}:host ::ng-deep .fd-shellbar__subtitle{font-size:1rem}:host ::ng-deep .fd-shellbar--s{padding:0}:host ::ng-deep .fd-shellbar--s ::ng-deep .fd-shellbar__subtitle{display:block;overflow:hidden;text-wrap:wrap;width:100%;word-break:break-all}:host ::ng-deep .fd-shellbar--s ::ng-deep .fd-shellbar__group.fd-shellbar__group--product{flex:1}:host ::ng-deep .fd-shellbar--s ::ng-deep .fd-shellbar__group.fd-shellbar__group--actions{max-width:120px}.fd-shellbar__logo{min-height:3rem;height:3rem;width:3rem}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$1.ListComponent, selector: "[fd-list], [fdList]", inputs: ["dropdownMode", "multiInputMode", "mobileMode", "hasMessage", "noBorder", "navigationIndicator", "selection", "keyboardSupport", "byline"], outputs: ["focusEscapeList"] }, { kind: "component", type: i4$1.ListItemComponent, selector: "[fdListItem] ,[fd-list-item]", inputs: ["selected", "ariaDescribedBy", "noData", "action", "interactive", "growing", "counter", "unread", "selectedListItemScreenReaderText", "navigatedListItemScreenReaderText", "navigatableListItemScreenReaderText"], outputs: ["keyDown"] }, { kind: "directive", type: i4$1.ListTitleDirective, selector: "[fd-list-title], [fdListTitle]", inputs: ["wrap"] }, { kind: "directive", type: i4$1.ListLinkDirective, selector: "[fd-list-link], [fdListLink]", inputs: ["navigationIndicator", "navigated"] }, { kind: "component", type: i3.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "directive", type: i3.MenuTriggerDirective, selector: "[fdMenuTrigger]", inputs: ["fdMenuTrigger"] }, { kind: "component", type: i8$1.DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig"] }, { kind: "component", type: i8$1.DialogBodyComponent, selector: "fd-dialog-body" }, { kind: "component", type: i8$1.DialogHeaderComponent, selector: "fd-dialog-header" }, { kind: "component", type: i8$1.DialogCloseButtonComponent, selector: "[fd-dialog-close-button]", inputs: ["mobile", "title"] }, { kind: "component", type: i9.TitleComponent, selector: "h1[fd-title], h2[fd-title], h3[fd-title], h4[fd-title], h5[fd-title], h6[fd-title]", inputs: ["headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: i8$3.ProductSwitchComponent, selector: "fd-product-switch", inputs: ["placement", "ariaLabel", "disabled"] }, { kind: "component", type: i8$3.ProductSwitchBodyComponent, selector: "fd-product-switch-body", inputs: ["dragAndDropEnabled", "products", "forceListMode"], outputs: ["productsChange", "itemClicked"] }, { kind: "component", type: i9$2.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i9$2.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i9$2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "component", type: i10$2.ShellbarComponent, selector: "fd-shellbar", inputs: ["size", "sideNav"] }, { kind: "component", type: i10$2.ProductMenuComponent, selector: "fd-product-menu", inputs: ["closeOnEscapeKey", "closeOnOutsideClick", "triggers", "placement", "disabled", "fillControlMode", "control", "items", "closePopoverOnSelect"] }, { kind: "component", type: i10$2.ShellbarSubtitleComponent, selector: "fd-shellbar-subtitle" }, { kind: "component", type: i10$2.ShellbarActionsComponent, selector: "fd-shellbar-actions", inputs: ["user", "userMenu", "closePopoverOnSelect", "collapsedItemMenuLabel"] }, { kind: "component", type: i10$2.ShellbarActionComponent, selector: "fd-shellbar-action", inputs: ["glyph", "callback", "label", "notificationLabel", "notificationCount"] }, { kind: "component", type: i10$2.ShellbarLogoComponent, selector: "fd-shellbar-logo" }, { kind: "directive", type: i1.MobileDirective, selector: "[mobile]" }, { kind: "component", type: i5.MaskComponent, selector: "bsu-mask", inputs: ["size", "top"] }, { kind: "component", type: NotificationGroupComponent, selector: "bt-notification-group", inputs: ["notifications", "loading", "deviceSize", "notificationCount"], outputs: ["viewed", "remove", "actionClick", "show", "loadMore"] }, { kind: "pipe", type: i1$2.KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: i1.PictureFieldSourcePipe, name: "picFieldSrc" }, { kind: "pipe", type: i1.BbbTranslatePipe, name: "bbbTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaShellbarComponent, decorators: [{
2441
- type: Component,
2442
- args: [{ selector: 'bt-barsa-shellbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<link *ngIf=\"cssUrl\" type=\"text/css\" rel=\"stylesheet\" [href]=\"cssUrl\" />\n<link *ngIf=\"cssCustomUrl\" type=\"text/css\" rel=\"stylesheet\" [href]=\"cssCustomUrl\" />\n\n<fd-shellbar *ngIf=\"userLoggedIn || allowAnonymous\" [size]=\"deviceSize\" [ngClass]=\"deviceSize\">\n <fd-shellbar-logo *ngIf=\"logo\">\n <a\n [style.backgroundImage]=\"'url(' + (logo?.FileId | picFieldSrc: 'GetPictureFromFileInfo':null) + ')'\"\n href=\"/\"\n class=\"fd-shellbar__logo fd-shellbar__logo--image-replaced\"\n aria-label=\"Barsa Novin Ray\"\n ></a>\n </fd-shellbar-logo>\n\n <fd-product-menu\n *ngIf=\"!settings?.HideProductMenu && productMenuItems1 && productMenuItems1.length > 0\"\n [control]=\"productMenuControl\"\n [closePopoverOnSelect]=\"true\"\n [items]=\"productMenuItems1\"\n >\n </fd-product-menu>\n\n <fd-shellbar-subtitle> {{ subtitle | bbbTranslate }}{{ showVersion ? appVersion : '' }} </fd-shellbar-subtitle>\n <fd-shellbar-actions\n *ngIf=\"user && (userMenu?.length || !settings?.HideLanguage)\"\n [user]=\"user\"\n [userMenu]=\"userMenu\"\n #langRef\n >\n <fd-shellbar-action\n *ngFor=\"let action of actions\"\n [glyph]=\"action.Icon\"\n [callback]=\"action.Callback\"\n [label]=\"action.Label\"\n >\n </fd-shellbar-action>\n <fd-shellbar-action\n *ngIf=\"deviceSize === 's' && userLoggedIn && !settings?.HideNotifications\"\n [glyph]=\"'bell'\"\n [label]=\"'Notifications' | bbbTranslate\"\n [notificationCount]=\"notificationCount.unread ?? 0\"\n [notificationLabel]=\"'Notifications' | bbbTranslate\"\n [callback]=\"onBellNotification\"\n >\n </fd-shellbar-action>\n <fd-popover\n *ngIf=\"!settings?.HideNotifications && userLoggedIn\"\n [(isOpen)]=\"isOpenNotificatoin\"\n [triggers]=\"[]\"\n [focusTrapped]=\"true\"\n [noArrow]=\"true\"\n placement=\"bottom\"\n title=\"Notification Popover\"\n [focusAutoCapture]=\"true\"\n [mobile]=\"deviceSize === 's'\"\n #popoverComponent\n >\n <fd-popover-control>\n <fd-shellbar-action\n [glyph]=\"'bell'\"\n [label]=\"'Notification'\"\n [notificationCount]=\"notificationCount.unread\"\n [notificationLabel]=\"'Notification Label'\"\n [callback]=\"onOpenNotification\"\n >\n </fd-shellbar-action>\n </fd-popover-control>\n <fd-popover-body style=\"min-width: 320px; overflow-x: auto; box-shadow: var(--sapContent_Shadow0)\">\n <ng-container\n *ngTemplateOutlet=\"notificationGroupTpl; context: { notificationCount: notificationCount }\"\n ></ng-container>\n </fd-popover-body>\n </fd-popover>\n\n <fd-shellbar-action\n *ngIf=\"!settings?.HideLanguage && deviceSize !== 's' && multiLanguages\"\n [glyph]=\"'world'\"\n [label]=\"'language'\"\n [fdMenuTrigger]=\"menu\"\n (callback)=\"(onLanguage)\"\n >\n </fd-shellbar-action>\n <ng-container *ngIf=\"!settings?.HideLanguage && deviceSize === 's' && multiLanguages\">\n <fd-shellbar-action\n *ngFor=\"let culture of cultures | keyvalue\"\n [label]=\"culture.value\"\n [callback]=\"onLanguage\"\n class=\"culture-abbrivation\"\n [glyph]=\"culture.key\"\n [ngClass]=\"'flags'\"\n >\n </fd-shellbar-action>\n </ng-container>\n\n <fd-product-switch *ngIf=\"productSwitcher?.length\">\n <fd-product-switch-body [products]=\"productSwitcher\" [forceListMode]=\"deviceSize === 's'\">\n </fd-product-switch-body>\n </fd-product-switch>\n </fd-shellbar-actions>\n</fd-shellbar>\n<ng-template #loading>\n <bsu-mask></bsu-mask>\n</ng-template>\n\n<fd-menu #menu>\n <ul fd-list>\n <li fd-list-item *ngFor=\"let culture of cultures | keyvalue\">\n <a fd-list-link (click)=\"onCultureChange(culture.value)\">\n <span fd-list-title>\n <img width=\"14px\" height=\"12px\" [src]=\"'/assets/flags/' + culture.key + '.png'\" />\n <span class=\"culture-abbrivation\" [ngClass]=\"culture.key\"> {{ culture.key }}</span>\n </span>\n </a>\n </li>\n </ul>\n</fd-menu>\n<ng-template #notificationGroupTpl let-notificationCount=\"notificationCount\">\n <div style=\"position: relative; height: 100px\" *ngIf=\"!notifcationLoaded && notificationLoading === true\">\n <bsu-mask size=\"s\"></bsu-mask>\n </div>\n <bt-notification-group\n [notifications]=\"notifications\"\n [notificationCount]=\"notificationCount\"\n [loading]=\"notificationLoading === true\"\n (viewed)=\"onNotificationItemViewed($event)\"\n (remove)=\"onRemoveNotifications($event)\"\n (show)=\"popoverComponent.close(); onShowNotification($event)\"\n (actionClick)=\"popoverComponent.close(); onNotificationAction($event)\"\n (loadMore)=\"onNotificationLoadMore()\"\n [deviceSize]=\"deviceSize\"\n ></bt-notification-group>\n</ng-template>\n\n<ng-template let-dialog let-dialogConfig=\"dialogConfig\" #notificationsDialog>\n <fd-dialog [dialogConfig]=\"dialogConfig\" [dialogRef]=\"dialog\">\n <fd-dialog-header>\n <h1 id=\"fd-dialog-header-10\" fd-title>{{ 'Notification' | bbbTranslate }}</h1>\n <button fd-dialog-close-button (click)=\"dialog.dismiss()\"></button>\n </fd-dialog-header>\n <fd-dialog-body class=\"mobile\">\n <ng-container\n *ngTemplateOutlet=\"notificationGroupTpl; context: { notificationCount: notificationCount }\"\n ></ng-container>\n </fd-dialog-body>\n </fd-dialog>\n</ng-template>\n", styles: [":host{display:contents}:host ::ng-deep fd-shellbar-actions fd-avatar{background-color:transparent!important;color:var(--sapShell_InteractiveTextColor, #d1e8ff)}:host ::ng-deep fd-combobox .fd-input-group input{min-width:2rem;height:1.625rem;margin-top:.1875rem;margin-bottom:.1875rem;padding:0 .5rem;box-sizing:border-box}:host ::ng-deep fd-combobox .fd-input-group span{min-width:2rem;min-height:1.625rem}:host ::ng-deep .fd-shellbar__subtitle{font-size:1rem}:host ::ng-deep .fd-shellbar--s{padding:0}:host ::ng-deep .fd-shellbar--s ::ng-deep .fd-shellbar__subtitle{display:block;overflow:hidden;text-wrap:wrap;width:100%;word-break:break-all}:host ::ng-deep .fd-shellbar--s ::ng-deep .fd-shellbar__group.fd-shellbar__group--product{flex:1}:host ::ng-deep .fd-shellbar--s ::ng-deep .fd-shellbar__group.fd-shellbar__group--actions{max-width:120px}.fd-shellbar__logo{min-height:3rem;height:3rem;width:3rem}\n"] }]
2443
- }], ctorParameters: function () { return [{ type: i1.NotificationService }, { type: i1$1.DialogService }, { type: Document, decorators: [{
2444
- type: Inject,
2445
- args: [DOCUMENT]
2446
- }] }, { type: undefined, decorators: [{
2447
- type: Inject,
2448
- args: [APP_VERSION]
2449
- }] }]; }, propDecorators: { cssCustomUrl: [{
2450
- type: Input
2451
- }], cssUrl: [{
2452
- type: Input
2453
- }], allowAnonymous: [{
2454
- type: Input
2455
- }], multiLanguages: [{
2456
- type: Input
2457
- }], userLoggedIn: [{
2458
- type: Input
2459
- }], settings: [{
2460
- type: Input
2461
- }], productMenuControl: [{
2462
- type: Input
2463
- }], deviceSize: [{
2464
- type: Input
2465
- }], cultures: [{
2466
- type: Input
2467
- }], shellbarData: [{
2468
- type: Input
2469
- }], notificationCount: [{
2470
- type: Input
2471
- }], notifcationLoaded: [{
2472
- type: Input
2473
- }], notificationLoading: [{
2474
- type: Input
2475
- }], notifications: [{
2476
- type: Input
2477
- }], productMenuItems1: [{
2478
- type: Input
2479
- }], bodyClick: [{
2480
- type: Input
2481
- }], logo: [{
2482
- type: Input
2483
- }], actions: [{
2484
- type: Input
2485
- }], userMenu: [{
2486
- type: Input
2487
- }], productSwitcher: [{
2488
- type: Input
2489
- }], subtitle: [{
2490
- type: Input
2491
- }], openNotificationPanel: [{
2492
- type: Output
2493
- }], cultureChanged: [{
2494
- type: Output
2495
- }], notificationLoadMore: [{
2496
- type: Output
2497
- }], removeNotification: [{
2498
- type: Output
2499
- }], notifiationActionClick: [{
2500
- type: Output
2501
- }], notificationViewed: [{
2502
- type: Output
2503
- }], comboboxComponent: [{
2504
- type: ViewChild,
2505
- args: [ComboboxComponent]
2506
- }], popoverComponent: [{
2507
- type: ViewChild,
2508
- args: ['popoverComponent', { static: false }]
2509
- }], _notificationsDialog: [{
2510
- type: ViewChild,
2511
- args: ['notificationsDialog', { static: true, read: TemplateRef }]
2512
- }] } });
2513
-
2514
- class ShellbarComponent extends BaseComponent {
2515
- constructor(_bbbTranslatePipe, _portalService, _breadCrumbService, _tilesService, _cdr, _domSanitizer, _notificationService, appVersion) {
2516
- super();
2517
- this._bbbTranslatePipe = _bbbTranslatePipe;
2518
- this._portalService = _portalService;
2519
- this._breadCrumbService = _breadCrumbService;
2520
- this._tilesService = _tilesService;
2521
- this._cdr = _cdr;
2522
- this._domSanitizer = _domSanitizer;
2523
- this._notificationService = _notificationService;
2524
- this.appVersion = appVersion;
2525
- this.isOpenNotificatoin = false;
2526
- this.user = {
2527
- initials: 'WW',
2528
- colorAccent: 1
2529
- };
2530
- this.allowAnonymous = true;
2531
- this.notifcationLoaded = false;
2532
- this._viewedNotifications$ = new Subject();
2533
- this._viewedNotifications = [];
2534
- this.bodyClick = ';$("body").click()';
2535
- this.onOpenNotification = () => {
2536
- this.isOpenNotificatoin = true;
2537
- this._handleOpenNotificationPanel();
2538
- };
2539
- this.onCultureChanged = (culture) => {
2540
- this._changeCulture(culture);
2541
- };
2542
- this.userLoggedIn$ = this._portalService.userLoggedIn$;
2543
- this.notifiationCountLoaded$ = this._notificationService.notificationCountLoaded$;
2544
- this._viewedNotifications$
2545
- .pipe(takeUntil(this._onDestroy$), tap((item) => this._viewedNotifications.push(item)), map((item) => this._viewedNotifications), debounceTime(2000), map((items) => items.map((item) => item.Tag)))
2546
- .subscribe((tags) => {
2547
- this._viewedNotifications = [];
2548
- this._notificationService.setNotificationViewed(tags);
2549
- });
2550
- }
2551
- get subtitle() {
2552
- if (!this.shellbarData) {
2553
- return '';
2554
- }
2555
- if (this._portalService.deviceSize === 's' && this.shellbarData.MobileSubtitle) {
2556
- return this.shellbarData.MobileSubtitle
2557
- ? `${this.shellbarData.MobileSubtitle} ${typeof this.shellbarData?.calcSubtitle === 'string' ? this.shellbarData.calcSubtitle : ''}`
2558
- : '';
2559
- }
2560
- return this.shellbarData.Subtitle
2561
- ? `${this.shellbarData?.Subtitle} ${typeof this.shellbarData?.calcSubtitle === 'string' ? this.shellbarData.calcSubtitle : ''}`
2562
- : '';
2563
- }
2564
- get logo() {
2565
- return this.shellbarData?.Logo;
2566
- }
2567
- get actions() {
2568
- return this.settings?.HideUserMenu ? [] : this.shellbarData?.ActionItems?.MoDataList ?? [];
2569
- }
2570
- get userMenu() {
2571
- const moDataList = BarsaApi.Common.Util.TryGetValue(this.shellbarData, 'UserMenuItems.MoDataList');
2572
- const items = moDataList ? [...moDataList] : [];
2573
- if (!items.length) {
2574
- return [];
2575
- }
2576
- items.forEach((c) => {
2577
- c.text = this._bbbTranslatePipe.transform(c.text);
2578
- c.callback = new Function(c.Code + this.bodyClick);
2579
- });
2580
- if (!BarsaApi.LoginFormData.IsAnonymous && BarsaApi.LoginFormData.IsUserLoggedIn) {
2581
- items.splice(0, 0, { Id: '-1', $Caption: '', text: BarsaApi.LoginFormData.UserDisplayName });
2582
- }
2583
- return this.settings?.HideUserMenu ? [] : items;
2584
- }
2585
- get productSwitcher() {
2586
- return (this.shellbarData?.ProductSwitchItems?.MoDataList ?? []);
2587
- }
2588
- get multiLanguages() {
2589
- return this.shellbarData?.MultiLanguages;
2590
- }
2591
- get productMenuItems() {
2592
- const items = this.shellbarData?.ProductMenuItems?.MoDataList ?? [];
2593
- items.forEach((c) => (c.callback = new Function(c.Code + this.bodyClick)));
2594
- return items;
2595
- }
2596
- ngOnInit() {
2597
- super.ngOnInit();
2598
- this.cultures = BarsaApi.LoginFormData.Cultures;
2599
- this.cssUrl$ = this._portalService.cssUrl$;
2600
- this.cssCustomUrl$ = this._portalService.cssCustomUrl$;
2601
- this.notificationsCount$ = this._notificationService.notificationCount$;
2602
- this._notificationService.notificationCount$.subscribe(() => this._cdr.detectChanges());
2603
- this.notificationLoading$ = this._notificationService.notificationLoading$;
2604
- this.notifications$ = this._notificationService.notifications$.pipe(takeUntil(this._onDestroy$), map((notifications) => this._mapNotifications(notifications)));
2605
- BarsaApi.Bw.SetUserPortalSettings = (userPortalSettings) => {
2606
- this._portalService.setUserPortalSettings(userPortalSettings);
2607
- };
2608
- BarsaApi.Bw.SetShellbarSubtitle = (calcSubtitle) => {
2609
- this.shellbarData.calcSubtitle = calcSubtitle;
2610
- this._cdr.detectChanges();
2611
- };
2612
- this.deviceSize$ = this._portalService.deviceSize$.pipe(takeUntil(this._onDestroy$));
2613
- this._breadCrumbService.breadcrumbs$.pipe(takeUntil(this._onDestroy$)).subscribe((breadCrumbs) => {
2614
- if (breadCrumbs.length > 0) {
2615
- this.productMenuControl = breadCrumbs[breadCrumbs.length - 1].label;
2616
- }
2617
- this._cdr.detectChanges();
2618
- });
2619
- this._tilesService.shellbar$.pipe(takeUntil(this._onDestroy$)).subscribe((mo) => {
2620
- this.shellbarData = mo;
2621
- // this._cdr.detectChanges();
2622
- forkJoin([of(this.productMenuItems), of([])]) // to append user defined
2623
- .pipe(takeUntil(this._onDestroy$), map(([s1, s2]) => [...s1, ...s2]))
2624
- .subscribe((c) => {
2625
- this.productMenuItems1 = c;
2626
- this._cdr.detectChanges();
2627
- });
2628
- });
2629
- if (this.allowAnonymous) {
2630
- this._tilesService.loadShellbar();
2631
- }
2632
- this._portalService.userLoggedIn$.pipe(takeUntil(this._onDestroy$)).subscribe((loggedIn) => {
2633
- if (!loggedIn) {
2634
- return;
2635
- }
2636
- this._tilesService.loadShellbar();
2637
- this._notificationService.loadUnreadNotificationCount();
2638
- });
2639
- }
2640
- onCultureChange(culture) {
2641
- this._changeCulture(culture);
2642
- }
2643
- onShowNotification(e) {
2644
- this.isOpenNotificatoin = false;
2645
- this._notificationService.ShowNotificationRelatedMo(e);
2646
- }
2647
- onNotificationItemViewed(viewedMo) {
2648
- this._viewedNotifications$.next(viewedMo);
2649
- }
2650
- onRemoveNotifications(e) {
2651
- this._notificationService.removeNotification(e.items);
2652
- }
2653
- onNotificationAction(e) {
2654
- this._portalService.ExecuteNotificationAction(e.item.Tag, e.btn.Title);
2655
- }
2656
- onNotificationLoadMore() {
2657
- this._notificationService.loadMore();
2658
- }
2659
- onNotificationWorkflowChoiceSuccess(result) { }
2660
- onNotificationWorkflowChoiceFailed(err) { }
2661
- onHandleOpenNotificationPanel() {
2662
- this._handleOpenNotificationPanel();
2663
- }
2664
- _handleOpenNotificationPanel() {
2665
- if (this.notifcationLoaded) {
2666
- return;
2667
- }
2668
- this.notifcationLoaded = true;
2669
- this._notificationService.loadNotifications();
2670
- }
2671
- _mapNotifications(notifications) {
2672
- return notifications.map((notification) => ({
2673
- ...notification,
2674
- contentSafeHtml: notification.Content
2675
- ? this._domSanitizer.bypassSecurityTrustHtml(notification.Content)
2676
- : ''
2677
- }));
2678
- }
2679
- _changeCulture(culture /* culture sample :English */) {
2680
- BarsaApi.Bw.SetCultureByDisplayName(culture);
2681
- BarsaApi.Bw.NavigateTo('/');
2682
- }
2683
- }
2684
- ShellbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ShellbarComponent, deps: [{ token: i1.BbbTranslatePipe }, { token: i1.PortalService }, { token: i1.BreadcrumbService }, { token: TilesService }, { token: i0.ChangeDetectorRef }, { token: i3$3.DomSanitizer }, { token: i1.NotificationService }, { token: APP_VERSION }], target: i0.ɵɵFactoryTarget.Component });
2685
- ShellbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.7", type: ShellbarComponent, selector: "bt-shellbar", viewQueries: [{ propertyName: "comboboxComponent", first: true, predicate: ComboboxComponent, descendants: true }, { propertyName: "popoverComponent", first: true, predicate: ["popoverComponent"], descendants: true }, { propertyName: "_notificationsDialog", first: true, predicate: ["notificationsDialog"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"userLoggedIn$ | async as userloggend; else noLoggedInShellbar\">\n <ng-container *ngIf=\"notifiationCountLoaded$ | async as notifiationCountLoaded\">\n <ng-container *ngIf=\"deviceSize$ | async as deviceSize\">\n <bt-barsa-shellbar\n *ngIf=\"shellbarData\"\n [cssUrl]=\"(cssUrl$ | async)!!\"\n [cssCustomUrl]=\"(cssCustomUrl$ | async)!!\"\n [userLoggedIn]=\"true\"\n [allowAnonymous]=\"allowAnonymous\"\n [deviceSize]=\"deviceSize\"\n [shellbarData]=\"shellbarData\"\n [productMenuControl]=\"productMenuControl\"\n [settings]=\"settings\"\n [multiLanguages]=\"multiLanguages\"\n [notificationCount]=\"(notificationsCount$ | async)!!\"\n [notifications]=\"(notifications$ | async) ?? []\"\n [notifcationLoaded]=\"notifcationLoaded\"\n [notificationLoading]=\"(notificationLoading$ | async) === true\"\n [cultures]=\"cultures\"\n [logo]=\"logo\"\n [actions]=\"actions\"\n [userMenu]=\"userMenu\"\n [productSwitcher]=\"productSwitcher\"\n [subtitle]=\"subtitle\"\n [productMenuItems1]=\"productMenuItems1\"\n (cultureChanged)=\"onCultureChanged($event)\"\n (notificationViewed)=\"onNotificationItemViewed($event)\"\n (notifiationActionClick)=\"onNotificationAction($event)\"\n (removeNotification)=\"onRemoveNotifications($event)\"\n (notificationLoadMore)=\"onNotificationLoadMore()\"\n (openNotificationPanel)=\"onHandleOpenNotificationPanel()\"\n >\n </bt-barsa-shellbar\n ></ng-container>\n </ng-container>\n</ng-container>\n<ng-template #noLoggedInShellbar>\n <bt-barsa-shellbar\n *ngIf=\"notificationsCount$ | async as notificationCount\"\n [cssUrl]=\"''\"\n [cssCustomUr]=\"''\"\n [userLoggedIn]=\"false\"\n [multiLanguages]=\"multiLanguages\"\n [userMenu]=\"userMenu\"\n [logo]=\"logo\"\n [productMenuItems1]=\"productMenuItems1\"\n [allowAnonymous]=\"allowAnonymous\"\n [deviceSize]=\"(deviceSize$ | async)!!\"\n [shellbarData]=\"shellbarData\"\n [cultures]=\"cultures\"\n [logo]=\"logo\"\n [actions]=\"actions\"\n [userMenu]=\"userMenu\"\n [productMenuControl]=\"productMenuControl\"\n [productSwitcher]=\"productSwitcher\"\n [subtitle]=\"subtitle\"\n [settings]=\"settings\"\n [notificationCount]=\"{ unread: 0, all: 0 }\"\n [notifications]=\"[]\"\n [notifcationLoaded]=\"true\"\n [notificationLoading]=\"false\"\n [cultures]=\"cultures\"\n [productMenuItems1]=\"productMenuItems1\"\n (cultureChanged)=\"onCultureChanged($event)\"\n >\n </bt-barsa-shellbar>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BarsaShellbarComponent, selector: "bt-barsa-shellbar", inputs: ["cssCustomUrl", "cssUrl", "allowAnonymous", "multiLanguages", "userLoggedIn", "settings", "productMenuControl", "deviceSize", "cultures", "shellbarData", "notificationCount", "notifcationLoaded", "notificationLoading", "notifications", "productMenuItems1", "bodyClick", "logo", "actions", "userMenu", "productSwitcher", "subtitle"], outputs: ["openNotificationPanel", "cultureChanged", "notificationLoadMore", "removeNotification", "notifiationActionClick", "notificationViewed"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ShellbarComponent, decorators: [{
2687
- type: Component,
2688
- args: [{ selector: 'bt-shellbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"userLoggedIn$ | async as userloggend; else noLoggedInShellbar\">\n <ng-container *ngIf=\"notifiationCountLoaded$ | async as notifiationCountLoaded\">\n <ng-container *ngIf=\"deviceSize$ | async as deviceSize\">\n <bt-barsa-shellbar\n *ngIf=\"shellbarData\"\n [cssUrl]=\"(cssUrl$ | async)!!\"\n [cssCustomUrl]=\"(cssCustomUrl$ | async)!!\"\n [userLoggedIn]=\"true\"\n [allowAnonymous]=\"allowAnonymous\"\n [deviceSize]=\"deviceSize\"\n [shellbarData]=\"shellbarData\"\n [productMenuControl]=\"productMenuControl\"\n [settings]=\"settings\"\n [multiLanguages]=\"multiLanguages\"\n [notificationCount]=\"(notificationsCount$ | async)!!\"\n [notifications]=\"(notifications$ | async) ?? []\"\n [notifcationLoaded]=\"notifcationLoaded\"\n [notificationLoading]=\"(notificationLoading$ | async) === true\"\n [cultures]=\"cultures\"\n [logo]=\"logo\"\n [actions]=\"actions\"\n [userMenu]=\"userMenu\"\n [productSwitcher]=\"productSwitcher\"\n [subtitle]=\"subtitle\"\n [productMenuItems1]=\"productMenuItems1\"\n (cultureChanged)=\"onCultureChanged($event)\"\n (notificationViewed)=\"onNotificationItemViewed($event)\"\n (notifiationActionClick)=\"onNotificationAction($event)\"\n (removeNotification)=\"onRemoveNotifications($event)\"\n (notificationLoadMore)=\"onNotificationLoadMore()\"\n (openNotificationPanel)=\"onHandleOpenNotificationPanel()\"\n >\n </bt-barsa-shellbar\n ></ng-container>\n </ng-container>\n</ng-container>\n<ng-template #noLoggedInShellbar>\n <bt-barsa-shellbar\n *ngIf=\"notificationsCount$ | async as notificationCount\"\n [cssUrl]=\"''\"\n [cssCustomUr]=\"''\"\n [userLoggedIn]=\"false\"\n [multiLanguages]=\"multiLanguages\"\n [userMenu]=\"userMenu\"\n [logo]=\"logo\"\n [productMenuItems1]=\"productMenuItems1\"\n [allowAnonymous]=\"allowAnonymous\"\n [deviceSize]=\"(deviceSize$ | async)!!\"\n [shellbarData]=\"shellbarData\"\n [cultures]=\"cultures\"\n [logo]=\"logo\"\n [actions]=\"actions\"\n [userMenu]=\"userMenu\"\n [productMenuControl]=\"productMenuControl\"\n [productSwitcher]=\"productSwitcher\"\n [subtitle]=\"subtitle\"\n [settings]=\"settings\"\n [notificationCount]=\"{ unread: 0, all: 0 }\"\n [notifications]=\"[]\"\n [notifcationLoaded]=\"true\"\n [notificationLoading]=\"false\"\n [cultures]=\"cultures\"\n [productMenuItems1]=\"productMenuItems1\"\n (cultureChanged)=\"onCultureChanged($event)\"\n >\n </bt-barsa-shellbar>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
2689
- }], ctorParameters: function () { return [{ type: i1.BbbTranslatePipe }, { type: i1.PortalService }, { type: i1.BreadcrumbService }, { type: TilesService }, { type: i0.ChangeDetectorRef }, { type: i3$3.DomSanitizer }, { type: i1.NotificationService }, { type: undefined, decorators: [{
2690
- type: Inject,
2691
- args: [APP_VERSION]
2692
- }] }]; }, propDecorators: { comboboxComponent: [{
2693
- type: ViewChild,
2694
- args: [ComboboxComponent]
2695
- }], popoverComponent: [{
2696
- type: ViewChild,
2697
- args: ['popoverComponent', { static: false }]
2698
- }], _notificationsDialog: [{
2699
- type: ViewChild,
2700
- args: ['notificationsDialog', { static: true, read: TemplateRef }]
2701
- }] } });
2702
-
2703
- class TileHomeFilterPipe {
2704
- transform(collection) {
2705
- return collection.filter((val) => this.matchFilter(val));
2706
- }
2707
- matchFilter(value) {
2708
- const match = Object.keys(value.Data).some((key) => {
2709
- if (key.startsWith('$')) {
2710
- return false;
2711
- }
2712
- if (key.startsWith('c')) {
2713
- return BarsaApi.Common.Util.TryGetValue(value, 'Data.' + key);
2714
- }
2715
- });
2716
- return match;
2717
- }
2718
- }
2719
- TileHomeFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TileHomeFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2720
- TileHomeFilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: TileHomeFilterPipe, name: "tileHomeFilter" });
2721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: TileHomeFilterPipe, decorators: [{
2722
- type: Pipe,
2723
- args: [{
2724
- name: 'tileHomeFilter'
2725
- }]
2726
- }] });
2727
-
2728
- class GroupTilesPipe {
2729
- transform(appGroup) {
2730
- const predefineTiles = appGroup.AppTiles;
2731
- if (predefineTiles?.length === 0) {
2732
- return of([]);
2733
- }
2734
- const predefine$ = of(predefineTiles);
2735
- const userDefine$ = of(appGroup.UserAppTileGroupSetting?.UserAppTilesSetting?.MoDataList);
2736
- return forkJoin([predefine$, userDefine$]).pipe(map(([s1, s2]) => [...s1, ...s2]), map((arrTiles) => {
2737
- const tempTiles = arrTiles.filter((c) => c.Visible).sort((a, b) => (a.OrderItem > b.OrderItem ? 1 : 0));
2738
- const group = { ...appGroup };
2739
- group.Title = BarsaApi.Common.Util.TryGetValue(group, 'UserAppTileGroupSetting.Title', group.Title);
2740
- group.OrderItem = BarsaApi.Common.Util.TryGetValue(group, 'UserAppTileGroupSetting.OrderItem', group.OrderItem);
2741
- return tempTiles;
2742
- }), shareReplay(1));
2743
- }
2744
- }
2745
- GroupTilesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupTilesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2746
- GroupTilesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: GroupTilesPipe, name: "groupTiles" });
2747
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: GroupTilesPipe, decorators: [{
2748
- type: Pipe,
2749
- args: [{
2750
- name: 'groupTiles'
2751
- }]
2752
- }] });
2753
-
2754
- class HomeGroupPipe {
2755
- constructor() { }
2756
- transform(appGroups) {
2757
- return appGroups.filter((c) => c.navigatorTiles && c.navigatorTiles.length > 0);
2758
- }
2759
- }
2760
- HomeGroupPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: HomeGroupPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2761
- HomeGroupPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: HomeGroupPipe, name: "homeGroup" });
2762
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: HomeGroupPipe, decorators: [{
2763
- type: Pipe,
2764
- args: [{
2765
- name: 'homeGroup'
2766
- }]
2767
- }], ctorParameters: function () { return []; } });
2768
-
2769
- class ActionLinksPipe {
2770
- transform(tiles) {
2771
- return tiles.filter((tile) => tile.IsActionLink);
2772
- }
2773
- }
2774
- ActionLinksPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ActionLinksPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2775
- ActionLinksPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: ActionLinksPipe, name: "actionLinks" });
2776
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: ActionLinksPipe, decorators: [{
2777
- type: Pipe,
2778
- args: [{
2779
- name: 'actionLinks'
2780
- }]
2781
- }] });
2782
-
2783
- const components = [
2784
- ShellbarComponent,
2785
- SimpleTileComponent,
2786
- TilesViewerComponent,
2787
- ProfileTileComponent,
2788
- FeedTileComponent,
2789
- FooterTileComponent,
2790
- TileComponent,
2791
- LogoTileComponent,
2792
- NumericTileComponent,
2793
- FooterEditTileComponent,
2794
- FormAppFinderComponent,
2795
- PinTileComponent,
2796
- ChangeAppTileComponent,
2797
- CreateAppGroupComponent,
2798
- MicroTileChartAreaComponent,
2799
- MicroTileChartCircularComponent,
2800
- MicroTileChartLineComponent,
2801
- MicroTileChartStackbarComponent,
2802
- MicroTileChartComparisonComponent,
2803
- MicroTileChartBarComponent,
2804
- MicroTileChartBulletComponent,
2805
- TilesViewerContainerComponent,
2806
- NewsTileComponent,
2807
- ActionsLinkComponent,
2808
- ActionItemComponent,
2809
- AppFinderComponent,
2810
- AppFinderGroupComponent,
2811
- AppFinderAppListComponent,
2812
- TilesViewerGroupComponent,
2813
- FormTileComponent,
2814
- BarsaShellbarComponent
2815
- ];
2816
- const pipes = [GroupTilesPipe, TileHomeFilterPipe, HomeGroupPipe, ActionLinksPipe, TilePropPipe];
2817
- const directives = [EmptyListDirective, TileRendererDirective];
2818
- class BarsaTilesModule extends BaseModule {
2819
- constructor(dcm, componentFactoryResolver) {
2820
- super(dcm, componentFactoryResolver, 'BarsaTilesModule');
2821
- this.dcm = dcm;
2822
- this.componentFactoryResolver = componentFactoryResolver;
2823
- this.dynamicComponents = [...components];
2824
- }
2825
- }
2826
- BarsaTilesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaTilesModule, deps: [{ token: i1.DynamicComponentService }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.NgModule });
2827
- BarsaTilesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.7", ngImport: i0, type: BarsaTilesModule, declarations: [ShellbarComponent,
2828
- SimpleTileComponent,
2829
- TilesViewerComponent,
2830
- ProfileTileComponent,
2831
- FeedTileComponent,
2832
- FooterTileComponent,
2833
- TileComponent,
2834
- LogoTileComponent,
2835
- NumericTileComponent,
2836
- FooterEditTileComponent,
2837
- FormAppFinderComponent,
2838
- PinTileComponent,
2839
- ChangeAppTileComponent,
2840
- CreateAppGroupComponent,
2841
- MicroTileChartAreaComponent,
2842
- MicroTileChartCircularComponent,
2843
- MicroTileChartLineComponent,
2844
- MicroTileChartStackbarComponent,
2845
- MicroTileChartComparisonComponent,
2846
- MicroTileChartBarComponent,
2847
- MicroTileChartBulletComponent,
2848
- TilesViewerContainerComponent,
2849
- NewsTileComponent,
2850
- ActionsLinkComponent,
2851
- ActionItemComponent,
2852
- AppFinderComponent,
2853
- AppFinderGroupComponent,
2854
- AppFinderAppListComponent,
2855
- TilesViewerGroupComponent,
2856
- FormTileComponent,
2857
- BarsaShellbarComponent, GroupTilesPipe, TileHomeFilterPipe, HomeGroupPipe, ActionLinksPipe, TilePropPipe, EmptyListDirective, TileRendererDirective, NotificationGroupComponent,
2858
- NotificationGroupHeaderComponent], imports: [CommonModule,
2859
- FormsModule,
2860
- DragDropModule,
2861
- CdkTableModule,
2862
- FundamentalNgxCoreModule,
2863
- GridListModule,
2864
- ReactiveFormsModule,
2865
- BarsaNovinRayCoreModule,
2866
- BarsaSapUiModule,
2867
- BarsaEchartsModule], exports: [ShellbarComponent,
2868
- SimpleTileComponent,
2869
- TilesViewerComponent,
2870
- ProfileTileComponent,
2871
- FeedTileComponent,
2872
- FooterTileComponent,
2873
- TileComponent,
2874
- LogoTileComponent,
2875
- NumericTileComponent,
2876
- FooterEditTileComponent,
2877
- FormAppFinderComponent,
2878
- PinTileComponent,
2879
- ChangeAppTileComponent,
2880
- CreateAppGroupComponent,
2881
- MicroTileChartAreaComponent,
2882
- MicroTileChartCircularComponent,
2883
- MicroTileChartLineComponent,
2884
- MicroTileChartStackbarComponent,
2885
- MicroTileChartComparisonComponent,
2886
- MicroTileChartBarComponent,
2887
- MicroTileChartBulletComponent,
2888
- TilesViewerContainerComponent,
2889
- NewsTileComponent,
2890
- ActionsLinkComponent,
2891
- ActionItemComponent,
2892
- AppFinderComponent,
2893
- AppFinderGroupComponent,
2894
- AppFinderAppListComponent,
2895
- TilesViewerGroupComponent,
2896
- FormTileComponent,
2897
- BarsaShellbarComponent] });
2898
- BarsaTilesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaTilesModule, providers: [TilesService, AppFinderService, LowerCasePipe], imports: [CommonModule,
2899
- FormsModule,
2900
- DragDropModule,
2901
- CdkTableModule,
2902
- FundamentalNgxCoreModule,
2903
- GridListModule,
2904
- ReactiveFormsModule,
2905
- BarsaNovinRayCoreModule,
2906
- BarsaSapUiModule,
2907
- BarsaEchartsModule] });
2908
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.7", ngImport: i0, type: BarsaTilesModule, decorators: [{
2909
- type: NgModule,
2910
- args: [{
2911
- schemas: [NO_ERRORS_SCHEMA],
2912
- imports: [
2913
- CommonModule,
2914
- FormsModule,
2915
- DragDropModule,
2916
- CdkTableModule,
2917
- FundamentalNgxCoreModule,
2918
- GridListModule,
2919
- ReactiveFormsModule,
2920
- BarsaNovinRayCoreModule,
2921
- BarsaSapUiModule,
2922
- BarsaEchartsModule
2923
- ],
2924
- providers: [TilesService, AppFinderService, LowerCasePipe],
2925
- declarations: [
2926
- ...components,
2927
- ...pipes,
2928
- ...directives,
2929
- NotificationGroupComponent,
2930
- NotificationGroupHeaderComponent
2931
- ],
2932
- exports: [...components]
2933
- }]
2934
- }], ctorParameters: function () { return [{ type: i1.DynamicComponentService }, { type: i0.ComponentFactoryResolver }]; } });
2935
-
2936
- /**
2937
- * Generated bundle index. Do not edit.
2938
- */
2939
-
2940
- export { ActionItemComponent, ActionsLinkComponent, AppFinderAppListComponent, AppFinderComponent, AppFinderGroupComponent, BarsaShellbarComponent, BarsaTilesModule, ChangeAppTileComponent, CreateAppGroupComponent, FeedTileComponent, FooterEditTileComponent, FooterTileComponent, FormAppFinderComponent, FormTileComponent, GroupTilesPipe, LogoTileComponent, MicroTileChartAreaComponent, MicroTileChartBarComponent, MicroTileChartBulletComponent, MicroTileChartCircularComponent, MicroTileChartComparisonComponent, MicroTileChartLineComponent, MicroTileChartStackbarComponent, NewsTileComponent, NumericTileComponent, PinTileComponent, ProfileTileComponent, ShellbarComponent, SimpleTileComponent, TileComponent, TileHomeFilterPipe, TilePropPipe, TilesService, TilesViewerComponent, TilesViewerContainerComponent, TilesViewerGroupComponent, TilesViewerService };
2941
- //# sourceMappingURL=barsa-tiles.mjs.map