@bizdoc/core 1.6.14 → 1.7.0-next.1

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 (97) hide show
  1. package/assets/bizdoc-schema.json +26 -19
  2. package/assets/fonts/LICENSE.txt +202 -0
  3. package/assets/fonts/MaterialIcons-Regular.ijmap +1 -0
  4. package/assets/fonts/MaterialIcons-Regular.svg +2373 -0
  5. package/assets/fonts/README.md +9 -0
  6. package/assets/fonts/Roboto-Black.ttf +0 -0
  7. package/assets/fonts/Roboto-BlackItalic.ttf +0 -0
  8. package/assets/fonts/Roboto-Bold.ttf +0 -0
  9. package/assets/fonts/Roboto-BoldItalic.ttf +0 -0
  10. package/assets/fonts/Roboto-Italic.ttf +0 -0
  11. package/assets/fonts/Roboto-Light.ttf +0 -0
  12. package/assets/fonts/Roboto-LightItalic.ttf +0 -0
  13. package/assets/fonts/Roboto-Medium.ttf +0 -0
  14. package/assets/fonts/Roboto-MediumItalic.ttf +0 -0
  15. package/assets/fonts/Roboto-Regular.ttf +0 -0
  16. package/assets/fonts/Roboto-Thin.ttf +0 -0
  17. package/assets/fonts/Roboto-ThinItalic.ttf +0 -0
  18. package/assets/fonts/codepoints +932 -0
  19. package/assets/fonts/material-icons.css +36 -0
  20. package/assets/themes/brown.min.css +80 -80
  21. package/assets/themes/dark.min.css +75 -75
  22. package/assets/themes/default.min.css +87 -87
  23. package/assets/themes/green.min.css +80 -80
  24. package/assets/themes/indigo.min.css +80 -80
  25. package/bundles/bizdoc-core.umd.js +364 -294
  26. package/bundles/bizdoc-core.umd.js.map +1 -1
  27. package/esm2015/lib/app.component.js +6 -2
  28. package/esm2015/lib/bizdoc.module.js +19 -22
  29. package/esm2015/lib/core/authentication.js +1 -98
  30. package/esm2015/lib/core/configuration.js +1 -1
  31. package/esm2015/lib/core/controls/combination-picker-body.js +2 -2
  32. package/esm2015/lib/core/http.interceptor.js +24 -18
  33. package/esm2015/lib/core/models.js +1 -1
  34. package/esm2015/lib/core/session.service.js +11 -21
  35. package/esm2015/lib/cube/chart/chart.component.js +8 -7
  36. package/esm2015/lib/cube/info/cube-info.service.js +2 -2
  37. package/esm2015/lib/dashboard/cube/accum-cube.widget.js +18 -8
  38. package/esm2015/lib/dashboard/cube/cube-analysis.base.js +18 -7
  39. package/esm2015/lib/dashboard/cube/cube-chart.widget.js +27 -12
  40. package/esm2015/lib/dashboard/score/peers-performance.widget.js +4 -2
  41. package/esm2015/lib/home/notifications/notifications.component.js +2 -2
  42. package/esm2015/lib/home/sign/sign.component.js +12 -3
  43. package/esm2015/lib/login/forgot/forgot.component.js +2 -2
  44. package/esm2015/lib/login/form.authentication.js +70 -0
  45. package/esm2015/lib/login/okta.authentication.js +40 -0
  46. package/esm2015/lib/login/okta.component.js +11 -14
  47. package/esm2015/lib/login/okta.interceptor.js +1 -1
  48. package/esm2015/lib/login/prompt/prompt.component.js +10 -4
  49. package/esm2015/lib/login/signin-info.service.js +1 -1
  50. package/esm2015/lib/shared.module.js +21 -10
  51. package/esm2015/lib/system.module.js +3 -3
  52. package/esm2015/public-api.js +4 -1
  53. package/fesm2015/bizdoc-core.js +340 -277
  54. package/fesm2015/bizdoc-core.js.map +1 -1
  55. package/lib/app.component.d.ts +1 -0
  56. package/lib/bizdoc.module.d.ts +1 -2
  57. package/lib/core/authentication.d.ts +2 -33
  58. package/lib/core/configuration.d.ts +6 -0
  59. package/lib/core/http.interceptor.d.ts +4 -2
  60. package/lib/core/models.d.ts +1 -0
  61. package/lib/core/session.service.d.ts +7 -9
  62. package/lib/cube/info/cube-info.service.d.ts +1 -1
  63. package/lib/dashboard/cube/accum-cube.widget.d.ts +4 -2
  64. package/lib/dashboard/cube/cube-analysis.base.d.ts +11 -3
  65. package/lib/dashboard/cube/cube-chart.widget.d.ts +4 -3
  66. package/lib/login/forgot/forgot.component.d.ts +1 -1
  67. package/lib/login/form.authentication.d.ts +30 -0
  68. package/lib/login/okta.authentication.d.ts +13 -0
  69. package/lib/login/okta.component.d.ts +2 -3
  70. package/lib/login/prompt/prompt.component.d.ts +2 -2
  71. package/lib/shared.module.d.ts +2 -1
  72. package/package.json +6 -6
  73. package/public-api.d.ts +3 -0
  74. package/src/assets/bizdoc-schema.json +26 -19
  75. package/src/assets/fonts/LICENSE.txt +202 -0
  76. package/src/assets/fonts/MaterialIcons-Regular.ijmap +1 -0
  77. package/src/assets/fonts/MaterialIcons-Regular.svg +2373 -0
  78. package/src/assets/fonts/README.md +9 -0
  79. package/src/assets/fonts/Roboto-Black.ttf +0 -0
  80. package/src/assets/fonts/Roboto-BlackItalic.ttf +0 -0
  81. package/src/assets/fonts/Roboto-Bold.ttf +0 -0
  82. package/src/assets/fonts/Roboto-BoldItalic.ttf +0 -0
  83. package/src/assets/fonts/Roboto-Italic.ttf +0 -0
  84. package/src/assets/fonts/Roboto-Light.ttf +0 -0
  85. package/src/assets/fonts/Roboto-LightItalic.ttf +0 -0
  86. package/src/assets/fonts/Roboto-Medium.ttf +0 -0
  87. package/src/assets/fonts/Roboto-MediumItalic.ttf +0 -0
  88. package/src/assets/fonts/Roboto-Regular.ttf +0 -0
  89. package/src/assets/fonts/Roboto-Thin.ttf +0 -0
  90. package/src/assets/fonts/Roboto-ThinItalic.ttf +0 -0
  91. package/src/assets/fonts/codepoints +932 -0
  92. package/src/assets/fonts/material-icons.css +36 -0
  93. package/src/assets/themes/brown.min.css +80 -80
  94. package/src/assets/themes/dark.min.css +75 -75
  95. package/src/assets/themes/default.min.css +87 -87
  96. package/src/assets/themes/green.min.css +80 -80
  97. package/src/assets/themes/indigo.min.css +80 -80
@@ -128,8 +128,8 @@ import * as i11 from '@syncfusion/ej2-angular-diagrams';
128
128
  import { Diagram, UndoRedo, ConnectorDrawingTool, DiagramConstraints, DiagramTools, NodeConstraints, ConnectorConstraints, SelectorConstraints, Node, SymbolPaletteComponent, ComplexHierarchicalTree, ConnectorBridging, BpmnDiagrams, DataBinding, LineRouting, LineDistribution, LayoutAnimation, PortVisibility, ConnectionPointOrigin, SnapConstraints, ComplexHierarchicalTreeService, DiagramModule, SymbolPaletteModule, ConnectorBridgingService, LineRoutingService, BpmnDiagramsService, LayoutAnimationService, UndoRedoService, SnappingService, ConnectorEditingService, ToolBase } from '@syncfusion/ej2-angular-diagrams';
129
129
  import * as i8$1 from '@syncfusion/ej2-angular-schedule';
130
130
  import { Schedule, Day, WorkWeek, Month, MonthAgenda, Agenda, Year, ScheduleModule, ExcelExportService as ExcelExportService$2, DayService, WorkWeekService, MonthService, MonthAgendaService, ICalendarExportService, AgendaService, YearService } from '@syncfusion/ej2-angular-schedule';
131
- import { OKTA_CONFIG } from '@okta/okta-angular';
132
131
  import * as OktaSignIn from '@okta/okta-signin-widget';
132
+ import { OKTA_CONFIG } from '@okta/okta-angular';
133
133
  import { CircularGauge, Annotations, GaugeTooltip, CircularGaugeComponent, Legend as Legend$1, CircularGaugeModule, AnnotationsService, GaugeTooltipService, LegendService as LegendService$1 } from '@syncfusion/ej2-angular-circulargauge';
134
134
  import * as i9$5 from '@syncfusion/ej2-angular-kanban';
135
135
  import { KanbanComponent, KanbanModule } from '@syncfusion/ej2-angular-kanban';
@@ -990,7 +990,6 @@ class SessionService {
990
990
  this._themeChange = new Subject();
991
991
  this.loaded = this._loaded.asObservable();
992
992
  this.themeChange = this._themeChange.asObservable();
993
- this._guide = new Subject();
994
993
  this._firebase = new FirebaseService(this._config ? this._config.firebase : null, this);
995
994
  ('serviceWorker' in navigator) && this._loadSw();
996
995
  _config && _config.maps && this._loadMaps();
@@ -1100,7 +1099,9 @@ class SessionService {
1100
1099
  observe.next();
1101
1100
  this._loaded.next();
1102
1101
  }
1103
- this._connect();
1102
+ this._hub.state !== HubConnectionState.Connected && this._hub.start();
1103
+ this._firebase.state !== FirebaseState.Activated &&
1104
+ this._firebase.activate();
1104
1105
  }, () => observe.error());
1105
1106
  });
1106
1107
  }
@@ -1110,38 +1111,27 @@ class SessionService {
1110
1111
  registerDevice(type, token) {
1111
1112
  return this._http.post('/api/account/registerDevice', { type, token });
1112
1113
  }
1113
- pushRefresh(profile) {
1114
- this._profile = profile;
1115
- this._connect();
1116
- return this._changeTheme(this.theme).pipe(tap(() => this._loaded.next()));
1117
- }
1118
- _connect() {
1119
- this._hub.state !== HubConnectionState.Connected && this._hub.start();
1120
- this._firebase.state !== FirebaseState.Activated &&
1121
- this._firebase.activate();
1122
- }
1123
- mayImpersonate(search, credentials) {
1124
- const { username, password } = credentials || {};
1114
+ mayImpersonate(search) {
1125
1115
  return this._http.put('/api/account/granted', {
1126
- username, password, search
1116
+ search
1127
1117
  });
1128
1118
  }
1129
1119
  impersonate(userId) {
1130
- return this._http.post('/api/account/switch', {
1120
+ return this._http.post('/api/account/impersonate', {
1131
1121
  userId
1132
1122
  });
1133
1123
  }
1134
1124
  inboxTouch() {
1135
- this._http.put('/api/account/inboxview', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
1125
+ return this._http.put('/api/account/inboxview', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
1136
1126
  this.profile.inboxCount = 0;
1137
1127
  this.profile.options.inboxView = e.time;
1138
- })).subscribe();
1128
+ })).toPromise();
1139
1129
  }
1140
1130
  notificationsTouch() {
1141
- this._http.put('/api/account/notificationsView', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
1131
+ return this._http.put('/api/account/notificationsView', {}, { headers: { 'no-progress': 'true' } }).pipe(tap(e => {
1142
1132
  this.profile.notificationsCount = 0;
1143
1133
  this.profile.options.notificationsView = e.time;
1144
- })).subscribe();
1134
+ })).toPromise();
1145
1135
  }
1146
1136
  _getBrowserLang() {
1147
1137
  let lang = navigator.language;
@@ -9540,7 +9530,7 @@ class CubeChartComponent {
9540
9530
  }
9541
9531
  /** */
9542
9532
  _prepare() {
9543
- const { view: { chartType } } = this._info;
9533
+ const { view: { chartType, indexChartType } } = this._info;
9544
9534
  this.series = this._data.map(s => {
9545
9535
  switch (s.type) {
9546
9536
  case 'Index':
@@ -9552,8 +9542,9 @@ class CubeChartComponent {
9552
9542
  type: 'Spline',
9553
9543
  width: 2,
9554
9544
  fill: this._session.getPrimery(),
9545
+ stackingGroup: 'index',
9555
9546
  marker: {
9556
- visible: true,
9547
+ visible: !indexChartType || indexChartType === 'Line' || indexChartType === 'Spline',
9557
9548
  shape: 'Diamond',
9558
9549
  height: 10,
9559
9550
  width: 10
@@ -9567,7 +9558,7 @@ class CubeChartComponent {
9567
9558
  dataSource: s.points,
9568
9559
  type: chartType || 'Column',
9569
9560
  marker: {
9570
- visible: chartType === 'Line' || chartType === 'Spline',
9561
+ visible: !chartType || chartType === 'Line' || chartType === 'Spline',
9571
9562
  height: 10,
9572
9563
  width: 10
9573
9564
  }
@@ -9610,12 +9601,12 @@ class CubeChartComponent {
9610
9601
  ;
9611
9602
  pointClick(evt) {
9612
9603
  const { view: { xAxis, series } } = this._info;
9613
- const axes = {}, serie = this._data[evt.seriesIndex], { type, name } = serie;
9614
- if (series && series.length && type !== 'Index')
9604
+ const axes = {}, serie = this._data[evt.seriesIndex], { type, name, points } = serie;
9605
+ if (series && series.length)
9615
9606
  for (let i = 0; i < series.length; i++)
9616
9607
  axes[series[i]] = name.split(AXES_CODE_DIVIDER)[i];
9617
9608
  for (let i = 0; i < xAxis.length; i++) {
9618
- const x = evt.series.dataSource[evt.pointIndex].x;
9609
+ const x = points[evt.pointIndex].x;
9619
9610
  axes[xAxis[i]] = x.split(AXES_CODE_DIVIDER)[i];
9620
9611
  }
9621
9612
  this.explore.emit({ axes, index: type === 'Index' ? name : null });
@@ -15815,66 +15806,40 @@ const ROUTES = [
15815
15806
  { path: '', redirectTo: 'dashboard', pathMatch: 'full' }
15816
15807
  ];
15817
15808
 
15818
- const DEFAULT_SCOPES = ["openid", "profile", 'email'];
15819
15809
  class AuthenticationImpl {
15820
- }
15821
- class OktaAuthentication extends AuthenticationImpl {
15822
- constructor(_okta) {
15823
- super();
15824
- this._okta = _okta;
15825
- }
15826
- signIn(username, password, rememberMe, impersonate) {
15827
- return from(this._okta.oktaAuth.signInWithCredentials({ password, username, }).
15828
- then(transaction => {
15829
- if (transaction.status === 'SUCCESS') {
15830
- this._okta.oktaAuth.session.setCookieAndRedirect(transaction.sessionToken); // Sets a cookie on redirect
15831
- //this._okta.oktaAuth.token.getWithRedirect({sessionToken: transaction.sessionToken, responseType: 'id_token'})
15832
- }
15833
- else {
15834
- throw 'We cannot handle the ' + transaction.status + ' status';
15835
- }
15836
- }));
15837
- }
15838
- signOut() {
15839
- return from(this._okta.oktaAuth.signOut());
15840
- }
15841
- }
15842
- OktaAuthentication.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaAuthentication, deps: [{ token: OKTA_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
15843
- OktaAuthentication.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaAuthentication });
15844
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaAuthentication, decorators: [{
15845
- type: Injectable
15846
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
15847
- type: Inject,
15848
- args: [OKTA_CONFIG]
15849
- }] }]; } });
15810
+ }
15811
+
15850
15812
  class FormAuthentication extends AuthenticationImpl {
15851
- constructor(_http, _session) {
15813
+ constructor(_http) {
15852
15814
  super();
15853
15815
  this._http = _http;
15854
- this._session = _session;
15855
15816
  }
15856
- signIn(username, password, rememberMe, impersonate) {
15857
- if (!rememberMe)
15858
- localStorage.clear();
15817
+ getAccessToken() {
15818
+ const accessToken = this._accessToken ||
15819
+ sessionStorage.getItem('token') ||
15820
+ localStorage.getItem('token');
15821
+ return accessToken;
15822
+ }
15823
+ authenticate(username, password, options = {}) {
15859
15824
  return new Observable(observe => {
15860
- this._http.post('/api/account/login', {
15861
- username, password,
15862
- rememberMe,
15863
- impersonate: impersonate !== '' ? impersonate : null
15825
+ this._http.post('/api/aspidentity/login', {
15826
+ username, password
15864
15827
  }).subscribe(r => {
15865
- if (rememberMe) {
15828
+ if (options.rememberMe) {
15829
+ localStorage.setItem('token', r.tokenId);
15866
15830
  localStorage.setItem('username', username);
15867
15831
  localStorage.setItem('displayName', r.name);
15868
15832
  r.photo && localStorage.setItem('photo', r.photo);
15869
- (r.byGender || r.gender) && localStorage.setItem('gender', r.byGender || r.gender);
15833
+ (r.gender) && localStorage.setItem('gender', r.gender);
15870
15834
  }
15871
- this._session.pushRefresh(r).subscribe(() => {
15872
- observe.next(LoginResult.OK);
15873
- observe.complete();
15874
- });
15875
- }, e => {
15835
+ else {
15836
+ sessionStorage.setItem('token', r.tokenId);
15837
+ }
15838
+ observe.next();
15839
+ observe.complete();
15840
+ }, (e) => {
15876
15841
  let reason;
15877
- switch (e.statusCode) {
15842
+ switch (e.status) {
15878
15843
  default:
15879
15844
  reason = LoginResult.Failed;
15880
15845
  }
@@ -15883,10 +15848,10 @@ class FormAuthentication extends AuthenticationImpl {
15883
15848
  });
15884
15849
  }
15885
15850
  signOut() {
15886
- return this._http.post('/api/account/signout', null);
15851
+ return this._http.post('/api/aspidentity/signout', null).toPromise();
15887
15852
  }
15888
15853
  forgot(email) {
15889
- return this._http.post('/api/account/forgot', { email });
15854
+ return this._http.post('/api/aspidentity/forgot', { email });
15890
15855
  }
15891
15856
  get photo() {
15892
15857
  return localStorage.getItem('photo');
@@ -15898,11 +15863,11 @@ class FormAuthentication extends AuthenticationImpl {
15898
15863
  return localStorage.getItem('username');
15899
15864
  }
15900
15865
  }
15901
- FormAuthentication.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: FormAuthentication, deps: [{ token: i1.HttpClient }, { token: SessionService }], target: i0.ɵɵFactoryTarget.Injectable });
15866
+ FormAuthentication.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: FormAuthentication, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
15902
15867
  FormAuthentication.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: FormAuthentication });
15903
15868
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: FormAuthentication, decorators: [{
15904
15869
  type: Injectable
15905
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: SessionService }]; } });
15870
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
15906
15871
  var LoginResult;
15907
15872
  (function (LoginResult) {
15908
15873
  LoginResult[LoginResult["OK"] = 0] = "OK";
@@ -15999,7 +15964,7 @@ class CredetialsComponent {
15999
15964
  });
16000
15965
  }
16001
15966
  ngOnInit() {
16002
- this.users$ = this.impersonate.valueChanges.pipe(debounceTime(250), takeUntil(this._destroy), switchMap(() => this._session.mayImpersonate('', { username: this.username.value, password: this.password.value })));
15967
+ this.users$ = this.impersonate.valueChanges.pipe(debounceTime(250), takeUntil(this._destroy), switchMap(() => this._auth.authenticate(this.username.value, this.password.value)), switchMap(() => this._session.mayImpersonate('')));
16003
15968
  }
16004
15969
  toggleHide(evt) {
16005
15970
  this.hide = !this.hide;
@@ -16028,7 +15993,13 @@ class CredetialsComponent {
16028
15993
  this.form.disable({ emitEvent: false });
16029
15994
  this.loggingChange.emit(true);
16030
15995
  const { value: { username, password, rememberMe, impersonate } } = this.form;
16031
- this._auth.signIn(username, password, rememberMe, impersonate).subscribe(() => this.success.emit(), e => {
15996
+ this._auth.authenticate(username, password, { rememberMe }).
15997
+ subscribe(() => {
15998
+ if (impersonate)
15999
+ this._session.impersonate(impersonate).subscribe(() => this.success.emit());
16000
+ else
16001
+ this.success.emit();
16002
+ }, e => {
16032
16003
  let message;
16033
16004
  switch (e) {
16034
16005
  default:
@@ -16225,6 +16196,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
16225
16196
  }]
16226
16197
  }], ctorParameters: function () { return [{ type: i1$2.OverlayRef }, { type: SessionService }]; } });
16227
16198
 
16199
+ const DEFAULT_SCOPES = ["openid", "profile", 'email'];
16200
+ class OktaAuthentication extends AuthenticationImpl {
16201
+ constructor(_okta) {
16202
+ super();
16203
+ this._okta = _okta;
16204
+ }
16205
+ getAccessToken() {
16206
+ return this._okta.oktaAuth.getAccessToken();
16207
+ }
16208
+ isAuthenticated() {
16209
+ return this._okta.oktaAuth.isAuthenticated();
16210
+ }
16211
+ //signIn(username: string, password: string, rememberMe: boolean): Observable<any> {
16212
+ // return from(this._okta.oktaAuth.signInWithCredentials({ password, username, }).
16213
+ // then(transaction => {
16214
+ // if (transaction.status === 'SUCCESS') {
16215
+ // this._okta.oktaAuth.session.setCookieAndRedirect(transaction.sessionToken); // Sets a cookie on redirect
16216
+ // //this._okta.oktaAuth.token.getWithRedirect({sessionToken: transaction.sessionToken, responseType: 'id_token'})
16217
+ // } else {
16218
+ // throw 'We cannot handle the ' + transaction.status + ' status';
16219
+ // }
16220
+ // }));
16221
+ //}
16222
+ signOut() {
16223
+ return this._okta.oktaAuth.signOut();
16224
+ }
16225
+ }
16226
+ OktaAuthentication.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaAuthentication, deps: [{ token: OKTA_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
16227
+ OktaAuthentication.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaAuthentication });
16228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaAuthentication, decorators: [{
16229
+ type: Injectable
16230
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
16231
+ type: Inject,
16232
+ args: [OKTA_CONFIG]
16233
+ }] }]; } });
16234
+
16235
+ /** */
16228
16236
  class OktaComponent {
16229
16237
  //hide = true;
16230
16238
  //readonly username = new FormControl(null, Validators.required);
@@ -16237,8 +16245,7 @@ class OktaComponent {
16237
16245
  //});
16238
16246
  //@ViewChild('uname', { read: ElementRef }) usernameElement: ElementRef<HTMLInputElement>;
16239
16247
  //signing: boolean;
16240
- constructor(_session, _translate, _overlayRef, _config, _okta) {
16241
- this._session = _session;
16248
+ constructor(_translate, _overlayRef, _config, _okta) {
16242
16249
  this._translate = _translate;
16243
16250
  this._overlayRef = _overlayRef;
16244
16251
  this._config = _config;
@@ -16266,20 +16273,18 @@ class OktaComponent {
16266
16273
  'primaryauth.submit': this._translate.get('SignIn'),
16267
16274
  },
16268
16275
  },
16269
- authParams: {
16270
- issuer: `https://${okta.domain}/oauth2/${okta.serverId || 'default'}`,
16271
- scopes: okta.scopes || DEFAULT_SCOPES
16272
- },
16276
+ authClient: this._okta.oktaAuth,
16273
16277
  useInteractionCodeFlow: false,
16274
16278
  });
16275
16279
  signIn.showSignInToGetTokens({
16276
16280
  el: '#sign-in-widget',
16281
+ scopes: DEFAULT_SCOPES
16277
16282
  }).then((tokens) => __awaiter(this, void 0, void 0, function* () {
16278
16283
  // Remove the widget
16279
16284
  signIn.remove();
16280
16285
  // In this flow the redirect to Okta occurs in a hidden iframe
16281
16286
  yield this._okta.oktaAuth.handleLoginRedirect(tokens);
16282
- this._session.refresh().subscribe(() => this._overlayRef.detach());
16287
+ this._overlayRef.detach();
16283
16288
  })).catch(err => {
16284
16289
  // Typically due to misconfiguration
16285
16290
  throw err;
@@ -16289,12 +16294,12 @@ class OktaComponent {
16289
16294
  //this.usernameElement.nativeElement.focus();
16290
16295
  }
16291
16296
  }
16292
- OktaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaComponent, deps: [{ token: SessionService }, { token: TranslateService }, { token: i1$2.OverlayRef }, { token: BIZDOC_CONFIG }, { token: OKTA_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
16297
+ OktaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaComponent, deps: [{ token: TranslateService }, { token: i1$2.OverlayRef }, { token: BIZDOC_CONFIG }, { token: OKTA_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
16293
16298
  OktaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: OktaComponent, selector: "ng-component", ngImport: i0, template: `<div id="sign-in-widget"></div>`, isInline: true });
16294
16299
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaComponent, decorators: [{
16295
16300
  type: Component,
16296
16301
  args: [{ template: `<div id="sign-in-widget"></div>` }]
16297
- }], ctorParameters: function () { return [{ type: SessionService }, { type: TranslateService }, { type: i1$2.OverlayRef }, { type: undefined, decorators: [{
16302
+ }], ctorParameters: function () { return [{ type: TranslateService }, { type: i1$2.OverlayRef }, { type: undefined, decorators: [{
16298
16303
  type: Inject,
16299
16304
  args: [BIZDOC_CONFIG]
16300
16305
  }] }, { type: undefined, decorators: [{
@@ -16996,8 +17001,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
16996
17001
  args: [AccumulationChartComponent]
16997
17002
  }] } });
16998
17003
 
17004
+ /** opens cube preview and explore */
17005
+ class CubeInfo {
17006
+ constructor(_session, _service, _router, _popup, _cf) {
17007
+ this._session = _session;
17008
+ this._service = _service;
17009
+ this._router = _router;
17010
+ this._popup = _popup;
17011
+ this._cf = _cf;
17012
+ }
17013
+ navigate(axes, options) {
17014
+ const { cube, view, serie, xAxis, filters, aggregate, indices, sum } = options || {};
17015
+ const ccube = cube ? this._session.profile.cubes.find(c => c.name === cube) : this._session.profile.cubes[0];
17016
+ if (isArray(axes))
17017
+ axes = this._mapAxes(ccube, axes);
17018
+ if (view)
17019
+ this._router.navigate(['cube', ccube.name, 'v', view], {
17020
+ queryParams: axes
17021
+ });
17022
+ else {
17023
+ this._router.navigate(['cube', ccube.name, 'i', xAxis, serie], {
17024
+ queryParams: axes,
17025
+ state: { indices, aggregate, filters, sum }
17026
+ });
17027
+ }
17028
+ }
17029
+ /**
17030
+ *
17031
+ * @param axes
17032
+ * @param options
17033
+ */
17034
+ popup(axes, element, options) {
17035
+ const cube = options && options.cube ? this._session.profile.cubes.find(c => c.name === options.cube) : this._session.profile.cubes[0];
17036
+ const { template } = cube;
17037
+ if (isArray(axes))
17038
+ axes = this._mapAxes(cube, axes);
17039
+ if (template) {
17040
+ const comp = this._cf.component(template);
17041
+ this._open(comp, element, {
17042
+ axes,
17043
+ options
17044
+ });
17045
+ }
17046
+ else {
17047
+ if (!options)
17048
+ throw 'no options';
17049
+ this._open(CubeInfoComponent, element, {
17050
+ axes,
17051
+ options
17052
+ });
17053
+ }
17054
+ }
17055
+ /**
17056
+ *
17057
+ * @param axes
17058
+ * @param options
17059
+ */
17060
+ explore(axes, options) {
17061
+ const { index, base, cube: name, scope } = options || {};
17062
+ const cube = name ? this._session.profile.cubes.find(c => c.name === name) : this._session.profile.cubes[0];
17063
+ if (isArray(axes))
17064
+ axes = this._mapAxes(cube, axes);
17065
+ base && this._service.base(cube.name, axes, base);
17066
+ this._router.navigate(['cube', cube.name, 'explore'], {
17067
+ queryParams: axes,
17068
+ state: {
17069
+ index, scope
17070
+ }
17071
+ });
17072
+ }
17073
+ /**
17074
+ * axes as map
17075
+ * @param cube
17076
+ * @param axes
17077
+ */
17078
+ _mapAxes(cube, axes) {
17079
+ const filters = {};
17080
+ axes.forEach((a, i) => a && (filters[cube.axes[i].name] = a));
17081
+ return filters;
17082
+ }
17083
+ _open(comp, element, data) {
17084
+ this._popup.open(comp, element, {
17085
+ data
17086
+ });
17087
+ }
17088
+ }
17089
+ CubeInfo.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeInfo, deps: [{ token: SessionService }, { token: CubeService }, { token: RouterImpl }, { token: Popup }, { token: BizDocComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
17090
+ CubeInfo.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeInfo });
17091
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeInfo, decorators: [{
17092
+ type: Injectable
17093
+ }], ctorParameters: function () { return [{ type: SessionService }, { type: CubeService }, { type: RouterImpl }, { type: Popup }, { type: BizDocComponentFactoryResolver }]; } });
17094
+
16999
17095
  class CubeAnalysisBase {
17000
- constructor(ref, _session, _ds, _service) {
17096
+ constructor(ref, _info, _session, _ds, _service) {
17097
+ this._info = _info;
17001
17098
  this._session = _session;
17002
17099
  this._ds = _ds;
17003
17100
  this._service = _service;
@@ -17027,6 +17124,15 @@ class CubeAnalysisBase {
17027
17124
  this._data && this.onResize(d);
17028
17125
  });
17029
17126
  }
17127
+ get series() { return this._series; }
17128
+ get xAxis() { return this._xAxis; }
17129
+ explore(axes, options) {
17130
+ this._info.explore(axes, {
17131
+ cube: this._cube.name,
17132
+ index: options && options.index ? options.index : null,
17133
+ scope: this._options.scope
17134
+ });
17135
+ }
17030
17136
  onBind(data) {
17031
17137
  const observables = [];
17032
17138
  data.forEach(s => {
@@ -17058,11 +17164,11 @@ class CubeAnalysisBase {
17058
17164
  }
17059
17165
  }
17060
17166
  CubeAnalysisBase.nextId = 0;
17061
- CubeAnalysisBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeAnalysisBase, deps: [{ token: WidgetRef }, { token: SessionService }, { token: DatasourceService }, { token: CubeService }], target: i0.ɵɵFactoryTarget.Directive });
17167
+ CubeAnalysisBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeAnalysisBase, deps: [{ token: WidgetRef }, { token: CubeInfo }, { token: SessionService }, { token: DatasourceService }, { token: CubeService }], target: i0.ɵɵFactoryTarget.Directive });
17062
17168
  CubeAnalysisBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.6", type: CubeAnalysisBase, ngImport: i0 });
17063
17169
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeAnalysisBase, decorators: [{
17064
17170
  type: Directive
17065
- }], ctorParameters: function () { return [{ type: WidgetRef }, { type: SessionService }, { type: DatasourceService }, { type: CubeService }]; } });
17171
+ }], ctorParameters: function () { return [{ type: WidgetRef }, { type: CubeInfo }, { type: SessionService }, { type: DatasourceService }, { type: CubeService }]; } });
17066
17172
 
17067
17173
  AccumulationChart.Inject(AccumulationDataLabel, AccumulationTooltip);
17068
17174
  function cardColor() {
@@ -17070,8 +17176,8 @@ function cardColor() {
17070
17176
  }
17071
17177
  /** statistics component*/
17072
17178
  class CubeAccumAnalysisWidget extends CubeAnalysisBase {
17073
- constructor(ref, session, ds, cube, _elementRef) {
17074
- super(ref, session, ds, cube);
17179
+ constructor(ref, info, session, ds, cube, _elementRef) {
17180
+ super(ref, info, session, ds, cube);
17075
17181
  this._elementRef = _elementRef;
17076
17182
  this.data = [];
17077
17183
  this.startAngle = 0;
@@ -17164,6 +17270,7 @@ class CubeAccumAnalysisWidget extends CubeAnalysisBase {
17164
17270
  background: 'transparent',
17165
17271
  legendSettings: this.legend,
17166
17272
  enableAnimation: true,
17273
+ pointClick: this.pointClick.bind(this),
17167
17274
  tooltip: this.tooltip,
17168
17275
  currencyCode: this.currencyCode,
17169
17276
  tooltipRender: this.tooltipRender.bind(this),
@@ -17171,12 +17278,19 @@ class CubeAccumAnalysisWidget extends CubeAnalysisBase {
17171
17278
  series
17172
17279
  }, this._elementRef.nativeElement);
17173
17280
  }
17281
+ pointClick(evt) {
17282
+ const axes = {};
17283
+ const x = evt.series.dataSource[evt.pointIndex].x.split(AXES_CODE_DIVIDER);
17284
+ for (let i = 0; i < this.xAxis.length; i++)
17285
+ axes[this.xAxis[i]] = x[i];
17286
+ this.explore(axes);
17287
+ }
17174
17288
  ngOnDestroy() {
17175
17289
  this.chart && this.chart.destroy();
17176
17290
  super.ngOnDestroy();
17177
17291
  }
17178
17292
  }
17179
- CubeAccumAnalysisWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeAccumAnalysisWidget, deps: [{ token: WidgetRef }, { token: SessionService }, { token: DatasourceService }, { token: CubeService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
17293
+ CubeAccumAnalysisWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeAccumAnalysisWidget, deps: [{ token: WidgetRef }, { token: CubeInfo }, { token: SessionService }, { token: DatasourceService }, { token: CubeService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
17180
17294
  CubeAccumAnalysisWidget.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: CubeAccumAnalysisWidget, selector: "bizdoc-accum-cube-analysis", host: { attributes: { "dir": "ltr" }, properties: { "id": "id" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
17181
17295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeAccumAnalysisWidget, decorators: [{
17182
17296
  type: Component,
@@ -17189,13 +17303,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
17189
17303
  dir: 'ltr'
17190
17304
  }
17191
17305
  }]
17192
- }], ctorParameters: function () { return [{ type: WidgetRef }, { type: SessionService }, { type: DatasourceService }, { type: CubeService }, { type: i0.ElementRef }]; } });
17306
+ }], ctorParameters: function () { return [{ type: WidgetRef }, { type: CubeInfo }, { type: SessionService }, { type: DatasourceService }, { type: CubeService }, { type: i0.ElementRef }]; } });
17193
17307
 
17194
17308
  Chart$1.Inject(DateTime$1, BarSeries$1, AreaSeries$1, BubbleSeries$1, ColumnSeries$1, LineSeries$1, PolarSeries$1, RadarSeries$1, SplineSeries$1, SplineAreaSeries$1, ScatterSeries$1, StackingLineSeries$1, StackingAreaSeries$1, StackingColumnSeries$1, StackingBarSeries$1, StepAreaSeries$1, StepLineSeries$1);
17195
17309
  /** statistics component*/
17196
17310
  class CubeChartAnalysisWidget extends CubeAnalysisBase {
17197
- constructor(ref, session, ds, cube, _elementRef, _translate) {
17198
- super(ref, session, ds, cube);
17311
+ constructor(ref, session, ds, cube, info, _elementRef, _translate) {
17312
+ super(ref, info, session, ds, cube);
17199
17313
  this._elementRef = _elementRef;
17200
17314
  this._translate = _translate;
17201
17315
  this.type = this._options.chartType || 'Column';
@@ -17233,12 +17347,14 @@ class CubeChartAnalysisWidget extends CubeAnalysisBase {
17233
17347
  this.animation = { enable: true };
17234
17348
  }
17235
17349
  onLoad(data) {
17236
- this.series = data.map(s => {
17350
+ const series = data.map(s => {
17237
17351
  if (s.type === 'Index')
17238
17352
  return {
17239
- yName: 'y', xName: 'name', type: this.indexType,
17353
+ yName: 'y', xName: 'name',
17354
+ type: this.indexType,
17240
17355
  name: s.title,
17241
17356
  width: 2,
17357
+ stackingGroup: 'index',
17242
17358
  marker: {
17243
17359
  shape: 'Diamond', width: 4
17244
17360
  },
@@ -17254,7 +17370,7 @@ class CubeChartAnalysisWidget extends CubeAnalysisBase {
17254
17370
  };
17255
17371
  });
17256
17372
  this.chart && this.chart.destroy();
17257
- if (data.entries.length || this.series.length > 1)
17373
+ if (series.length)
17258
17374
  this.chart = new Chart$1({
17259
17375
  width: '100%',
17260
17376
  height: this.height,
@@ -17265,16 +17381,27 @@ class CubeChartAnalysisWidget extends CubeAnalysisBase {
17265
17381
  primaryXAxis: this.primaryXAxis,
17266
17382
  primaryYAxis: this.primaryYAxis,
17267
17383
  tooltip: this.tooltip,
17268
- //tooltipRender: this.tooltipRender.bind(this),
17269
17384
  palettes: this.palettes,
17270
17385
  currencyCode: this.currencyCode,
17271
- series: this.series,
17386
+ series,
17387
+ pointClick: this.pointClick.bind(this),
17272
17388
  legendSettings: {
17273
17389
  isInversed: this._session.inverse,
17274
- visible: this.series.length > 1
17390
+ visible: series.length > 1
17275
17391
  }
17276
17392
  }, this._elementRef.nativeElement);
17277
17393
  }
17394
+ pointClick(evt) {
17395
+ const axes = {}, serie = this._data[evt.seriesIndex], { type, name, points } = serie;
17396
+ if (this.series.length && type !== 'Index')
17397
+ for (let i = 0; i < this.series.length; i++)
17398
+ axes[this.series[i]] = name.split(AXES_CODE_DIVIDER)[i];
17399
+ for (let i = 0; i < this.xAxis.length; i++) {
17400
+ const x = points[evt.pointIndex].x;
17401
+ axes[this.xAxis[i]] = x.split(AXES_CODE_DIVIDER)[i];
17402
+ }
17403
+ this.explore(axes, { index: type === 'Index' ? name : null });
17404
+ }
17278
17405
  onThemeChange() {
17279
17406
  this.onBind(this._data);
17280
17407
  }
@@ -17295,7 +17422,7 @@ class CubeChartAnalysisWidget extends CubeAnalysisBase {
17295
17422
  super.ngOnDestroy();
17296
17423
  }
17297
17424
  }
17298
- CubeChartAnalysisWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeChartAnalysisWidget, deps: [{ token: WidgetRef }, { token: SessionService }, { token: DatasourceService }, { token: CubeService }, { token: i0.ElementRef }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component });
17425
+ CubeChartAnalysisWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeChartAnalysisWidget, deps: [{ token: WidgetRef }, { token: SessionService }, { token: DatasourceService }, { token: CubeService }, { token: CubeInfo }, { token: i0.ElementRef }, { token: TranslateService }], target: i0.ɵɵFactoryTarget.Component });
17299
17426
  CubeChartAnalysisWidget.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: CubeChartAnalysisWidget, selector: "bizdoc-cube-chart-analysis", host: { attributes: { "dir": "ltr" }, properties: { "id": "id" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
17300
17427
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeChartAnalysisWidget, decorators: [{
17301
17428
  type: Component,
@@ -17308,7 +17435,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
17308
17435
  dir: 'ltr'
17309
17436
  }
17310
17437
  }]
17311
- }], ctorParameters: function () { return [{ type: WidgetRef }, { type: SessionService }, { type: DatasourceService }, { type: CubeService }, { type: i0.ElementRef }, { type: TranslateService }]; } });
17438
+ }], ctorParameters: function () { return [{ type: WidgetRef }, { type: SessionService }, { type: DatasourceService }, { type: CubeService }, { type: CubeInfo }, { type: i0.ElementRef }, { type: TranslateService }]; } });
17312
17439
 
17313
17440
  let CubeAnalysisWidget = class CubeAnalysisWidget {
17314
17441
  constructor(_ref, _resolver, _injector, _vc) {
@@ -17884,7 +18011,9 @@ let PeersPerformanceWidget = PeersPerformanceWidget_1 = class PeersPerformanceWi
17884
18011
  this.tooltip = {
17885
18012
  enable: true, type: ['Range', 'Pointer'], textStyle: {
17886
18013
  fontFamily: FONT_FAMILY
17887
- }
18014
+ },
18015
+ annotationSettings: {},
18016
+ showAtMousePosition: false
17888
18017
  };
17889
18018
  this.margin = { left: 0, top: 0, right: 0, bottom: 0 };
17890
18019
  this._standardHigh = 0;
@@ -19441,8 +19570,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
19441
19570
  }] });
19442
19571
 
19443
19572
  class AppHttpInterceptor {
19444
- constructor(baseUrl, _session, _messaging) {
19573
+ constructor(baseUrl, _session, _auth, _messaging) {
19445
19574
  this._session = _session;
19575
+ this._auth = _auth;
19446
19576
  this._messaging = _messaging;
19447
19577
  this._ongoing = new Subject();
19448
19578
  this.active$ = this._ongoing.asObservable().pipe(map(c => c > 0));
@@ -19456,26 +19586,30 @@ class AppHttpInterceptor {
19456
19586
  this._baseUrl = '';
19457
19587
  }
19458
19588
  intercept(req, next) {
19459
- const url = this._baseUrl + req.url;
19589
+ const url = this._baseUrl + req.url, connectionId = this._messaging.connectionId, headers = {
19590
+ 'accept-language': this._session.language,
19591
+ };
19592
+ if (connectionId)
19593
+ headers['connection-id'] = connectionId;
19594
+ const accessToken = this._auth.getAccessToken();
19595
+ if (accessToken)
19596
+ headers['Authorization'] = `Bearer ${accessToken}`;
19460
19597
  const request = req.clone({
19461
- setHeaders: {
19462
- 'accept-language': this._session.language,
19463
- 'connection-id': this._messaging.connectionId || ''
19464
- },
19598
+ setHeaders: headers,
19465
19599
  url
19466
19600
  });
19467
- const observe = next.handle(request).pipe(catchError((e) => {
19468
- return throwError(e);
19469
- }));
19470
- if (!req.headers.has('no-progress')) {
19601
+ const noprogress = req.headers.has('no-progress');
19602
+ if (!noprogress) {
19471
19603
  this._ongoing.next(1);
19472
- return observe.pipe(tap(event => event instanceof HttpResponse
19604
+ return next.handle(request)
19605
+ .pipe(tap(event => event instanceof HttpResponse
19473
19606
  && this._ongoing.next(0), () => this._ongoing.next(0)));
19474
19607
  }
19475
- return observe;
19608
+ else
19609
+ return next.handle(request);
19476
19610
  }
19477
19611
  }
19478
- AppHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AppHttpInterceptor, deps: [{ token: 'BASE_URL', optional: true }, { token: SessionService }, { token: HubService }], target: i0.ɵɵFactoryTarget.Injectable });
19612
+ AppHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AppHttpInterceptor, deps: [{ token: 'BASE_URL', optional: true }, { token: SessionService }, { token: AuthenticationImpl }, { token: HubService }], target: i0.ɵɵFactoryTarget.Injectable });
19479
19613
  AppHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AppHttpInterceptor, providedIn: 'root' });
19480
19614
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: AppHttpInterceptor, decorators: [{
19481
19615
  type: Injectable,
@@ -19485,7 +19619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
19485
19619
  args: ['BASE_URL']
19486
19620
  }, {
19487
19621
  type: Optional
19488
- }] }, { type: SessionService }, { type: HubService }]; } });
19622
+ }] }, { type: SessionService }, { type: AuthenticationImpl }, { type: HubService }]; } });
19489
19623
 
19490
19624
  /** sign component*/
19491
19625
  class QuickSignComponent {
@@ -19498,10 +19632,19 @@ class QuickSignComponent {
19498
19632
  }
19499
19633
  signOut() {
19500
19634
  this._popupRef.close();
19501
- this._ps.ask('SignOutAsk', 'SignOut', { ok: 'Yes', cancel: 'No' }).subscribe(ok => ok && this._auth.signOut().subscribe(() => {
19635
+ const task = () => {
19502
19636
  this._ps.mask('Goodbye');
19503
19637
  location.assign('/');
19504
- }));
19638
+ };
19639
+ this._ps.ask('SignOutAsk', 'SignOut', { ok: 'Yes', cancel: 'No' }).subscribe(ok => {
19640
+ if (ok) {
19641
+ if (this._auth.signOut)
19642
+ this._auth.signOut().
19643
+ then(task);
19644
+ else
19645
+ task();
19646
+ }
19647
+ });
19505
19648
  }
19506
19649
  impersonate() {
19507
19650
  this._popupRef.close();
@@ -19995,7 +20138,7 @@ class QuickNotificationsComponent extends NotificationsComponentBase {
19995
20138
  }
19996
20139
  }
19997
20140
  QuickNotificationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: QuickNotificationsComponent, deps: [{ token: PopupRef }, { token: PanesRouter }, { token: NotificationsService }, { token: SessionService }, { token: i0.Injector }, { token: OptionsService }], target: i0.ɵɵFactoryTarget.Component });
19998
- QuickNotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: QuickNotificationsComponent, selector: "bizdoc-notifications", usesInheritance: true, ngImport: i0, template: "<mat-nav-list role=\"list\">\r\n <!--dense-->\r\n <mat-list-item role=\"listitem\" *ngFor=\"let n of notifications | sort: 'sent' : 'desc' | slice:0:9; let i=index\" class=\"item\" [class.read]=\"n.read\" (click)=\"open(n, $event)\">\r\n <h3 *ngComponentOutlet=\"n.comp; injector: n.injector\" matLine></h3>\r\n <p matLine><span [matTooltip]=\"n.sent | amCalendar\">{{n.sent | amTimeAgo }}</span></p>\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" [matMenuTriggerData]=\"{muted: false}\" class=\"tool\"><mat-icon>more_vert</mat-icon></button>\r\n <mat-menu #options>\r\n <ng-template matMenuContent let-muted=\"muted\">\r\n <button mat-menu-item (click)=\"mute(n, true)\">{{ (!(muted | async) ? 'Mute': 'Unmute') | translate}}</button>\r\n </ng-template>\r\n </mat-menu>\r\n </mat-list-item>\r\n</mat-nav-list>\r\n<div class=\"tools\">\r\n <a (click)=\"all()\">{{'ShowAll'|translate}}</a>&nbsp;\r\n <span class=\"divider\"></span>\r\n <a (click)='options()'>{{'Options'|translate}}</a>\r\n</div>\r\n", styles: [".item .tool{opacity:.1}.item:hover .tool{opacity:1}.tools{display:flex;flex-direction:row;font-feature-settings:\"smcp\",\"c2sc\";font-variant-caps:all-small-caps;font-size:medium;padding:8px}\n"], components: [{ type: i2$3.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: i2$3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i7.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i9$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i6$1.MatLine, selector: "[mat-line], [matLine]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i9$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i9$2.MatMenuContent, selector: "ng-template[matMenuContent]" }], pipes: { "slice": i10.SlicePipe, "sort": ArraySortPipe, "amCalendar": i14.CalendarPipe, "amTimeAgo": i14.TimeAgoPipe, "translate": TranslatePipe, "async": i10.AsyncPipe } });
20141
+ QuickNotificationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.6", type: QuickNotificationsComponent, selector: "bizdoc-notifications", usesInheritance: true, ngImport: i0, template: "<mat-nav-list role=\"list\">\r\n <!--dense-->\r\n <mat-list-item role=\"listitem\" *ngFor=\"let n of notifications | sort: 'sent' : 'desc' | slice:0:9; let i=index\" class=\"item\" [class.read]=\"n.read\" (click)=\"open(n, $event)\">\r\n <h3 *ngComponentOutlet=\"n.comp; injector: n.injector\" matLine></h3>\r\n <p matLine><span [matTooltip]=\"n.sent | amCalendar\">{{n.sent | amTimeAgo }}</span></p>\r\n <button mat-icon-button [matMenuTriggerFor]=\"options\" [matMenuTriggerData]=\"{muted: false}\" class=\"tool\"><mat-icon>more_vert</mat-icon></button>\r\n <mat-menu #options>\r\n <ng-template matMenuContent let-muted=\"muted\">\r\n <button mat-menu-item (click)=\"mute(n, true)\">{{ (!(muted | async) ? 'Mute': 'Unmute') | translate}}</button>\r\n </ng-template>\r\n </mat-menu>\r\n </mat-list-item>\r\n</mat-nav-list>\r\n<div class=\"tools row\">\r\n <a (click)=\"all()\">{{'ShowAll'|translate}}</a>&nbsp;\r\n <span class=\"divider\"></span>\r\n <a (click)='options()'>{{'Options'|translate}}</a>\r\n</div>\r\n", styles: [".item .tool{opacity:.1}.item:hover .tool{opacity:1}.tools{font-feature-settings:\"smcp\",\"c2sc\";font-variant-caps:all-small-caps;font-size:medium;padding:8px}\n"], components: [{ type: i2$3.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: i2$3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i7.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i9$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }], directives: [{ type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModuleFactory"] }, { type: i6$1.MatLine, selector: "[mat-line], [matLine]" }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i9$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i9$2.MatMenuContent, selector: "ng-template[matMenuContent]" }], pipes: { "slice": i10.SlicePipe, "sort": ArraySortPipe, "amCalendar": i14.CalendarPipe, "amTimeAgo": i14.TimeAgoPipe, "translate": TranslatePipe, "async": i10.AsyncPipe } });
19999
20142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: QuickNotificationsComponent, decorators: [{
20000
20143
  type: Component,
20001
20144
  args: [{
@@ -21429,7 +21572,11 @@ class BizDocApp {
21429
21572
  document.dir = doc.dir = body.dir = this.dir = 'rtl';
21430
21573
  enableRtl();
21431
21574
  }
21432
- this._session.refresh().subscribe(this._initialize.bind(this), () => this._signIn.pop().subscribe(this._initialize.bind(this)));
21575
+ this._connect();
21576
+ }
21577
+ _connect() {
21578
+ this._session.refresh().subscribe(this._initialize.bind(this), () => this._signIn.pop().
21579
+ subscribe(this._connect.bind(this)));
21433
21580
  }
21434
21581
  _initialize() {
21435
21582
  if (isMobile()) {
@@ -22044,97 +22191,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
22044
22191
  args: [TemplateRef, { static: true }]
22045
22192
  }] } });
22046
22193
 
22047
- /** opens cube preview and explore */
22048
- class CubeInfo {
22049
- constructor(_session, _service, _router, _popup, _cf) {
22050
- this._session = _session;
22051
- this._service = _service;
22052
- this._router = _router;
22053
- this._popup = _popup;
22054
- this._cf = _cf;
22055
- }
22056
- navigate(axes, options) {
22057
- const { cube, view, serie, xAxis, filters, aggregate, indices, sum } = options || {};
22058
- const ccube = cube ? this._session.profile.cubes.find(c => c.name === cube) : this._session.profile.cubes[0];
22059
- if (isArray(axes))
22060
- axes = this._mapAxes(ccube, axes);
22061
- if (view)
22062
- this._router.navigate(['cube', ccube.name, 'v', view], {
22063
- queryParams: axes
22064
- });
22065
- else {
22066
- this._router.navigate(['cube', ccube.name, 'i', xAxis, serie], {
22067
- queryParams: axes,
22068
- state: { indices, aggregate, filters, sum }
22069
- });
22070
- }
22071
- }
22072
- /**
22073
- *
22074
- * @param axes
22075
- * @param options
22076
- */
22077
- open(axes, element, options) {
22078
- const cube = options && options.cube ? this._session.profile.cubes.find(c => c.name === options.cube) : this._session.profile.cubes[0];
22079
- const { template } = cube;
22080
- if (isArray(axes))
22081
- axes = this._mapAxes(cube, axes);
22082
- if (template) {
22083
- const comp = this._cf.component(template);
22084
- this._open(comp, element, {
22085
- axes,
22086
- options
22087
- });
22088
- }
22089
- else {
22090
- if (!options)
22091
- throw 'no options';
22092
- this._open(CubeInfoComponent, element, {
22093
- axes,
22094
- options
22095
- });
22096
- }
22097
- }
22098
- /**
22099
- *
22100
- * @param axes
22101
- * @param options
22102
- */
22103
- explore(axes, options) {
22104
- const { index, base, cube: name, scope } = options || {};
22105
- const cube = name ? this._session.profile.cubes.find(c => c.name === name) : this._session.profile.cubes[0];
22106
- if (isArray(axes))
22107
- axes = this._mapAxes(cube, axes);
22108
- base && this._service.base(cube.name, axes, base);
22109
- this._router.navigate(['cube', cube.name, 'explore'], {
22110
- queryParams: axes,
22111
- state: {
22112
- index, scope
22113
- }
22114
- });
22115
- }
22116
- /**
22117
- * axes as map
22118
- * @param cube
22119
- * @param axes
22120
- */
22121
- _mapAxes(cube, axes) {
22122
- const filters = {};
22123
- axes.forEach((a, i) => a && (filters[cube.axes[i].name] = a));
22124
- return filters;
22125
- }
22126
- _open(comp, element, data) {
22127
- this._popup.open(comp, element, {
22128
- data
22129
- });
22130
- }
22131
- }
22132
- CubeInfo.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeInfo, deps: [{ token: SessionService }, { token: CubeService }, { token: RouterImpl }, { token: Popup }, { token: BizDocComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
22133
- CubeInfo.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeInfo });
22134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: CubeInfo, decorators: [{
22135
- type: Injectable
22136
- }], ctorParameters: function () { return [{ type: SessionService }, { type: CubeService }, { type: RouterImpl }, { type: Popup }, { type: BizDocComponentFactoryResolver }]; } });
22137
-
22138
22194
  const COMBINATION_PICKER_BODY = new InjectionToken('combination_body');
22139
22195
  /** */
22140
22196
  class CombinationPickerBody {
@@ -22252,7 +22308,7 @@ class CombinationPickerBody {
22252
22308
  const { defaults } = this._data.exploreSettings || {};
22253
22309
  const axes = Object.assign({}, defaults);
22254
22310
  codes.slice(0, this._axes.length).forEach((a, i) => axes[this._axes[i].name] = a);
22255
- this._accountInfo.open(axes, evt.srcElement, Object.assign(Object.assign({}, this._data.exploreSettings), { cube: this._cube.name }));
22311
+ this._accountInfo.popup(axes, evt.srcElement, Object.assign(Object.assign({}, this._data.exploreSettings), { cube: this._cube.name }));
22256
22312
  evt.cancelBubble = true;
22257
22313
  evt.preventDefault();
22258
22314
  evt.stopPropagation();
@@ -23232,11 +23288,28 @@ const CORE_COMPONENTS = [
23232
23288
  CubeDocumentsComponent, CubeGridDocumentsComponent, TasksComponent, UsageReportArgs, UsageChartComponent, UsagePivotComponent
23233
23289
  ];
23234
23290
  class SharedModule {
23235
- static forChild() {
23291
+ static forChild(config) {
23292
+ const { formats, maps } = config || {};
23236
23293
  registerComponents(CORE_COMPONENTS);
23294
+ const providers = [{
23295
+ provide: RouterImpl, useClass: !config || !config.routing || config.routing === 'ng' ? NgRouter : PaneRouter
23296
+ },
23297
+ {
23298
+ provide: MAT_DATE_FORMATS, useValue: {
23299
+ parse: {
23300
+ dateInput: 'LL',
23301
+ },
23302
+ display: {
23303
+ dateInput: (formats || {}).date || 'll',
23304
+ monthYearLabel: 'MMM YYYY',
23305
+ dateA11yLabel: 'LL',
23306
+ monthYearA11yLabel: 'MMMM YYYY',
23307
+ }
23308
+ }
23309
+ }];
23237
23310
  return {
23238
23311
  ngModule: SharedModule,
23239
- providers: []
23312
+ providers
23240
23313
  };
23241
23314
  }
23242
23315
  }
@@ -23345,9 +23418,6 @@ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
23345
23418
  GuideService, OptionsService,
23346
23419
  BizDocComponentFactoryResolver, PromptService, TranslateService,
23347
23420
  ToolbarService, HtmlEditorService,
23348
- {
23349
- provide: RouterImpl, useClass: isMobile() ? NgRouter : PaneRouter
23350
- },
23351
23421
  { provide: HTTP_INTERCEPTORS, useClass: AppHttpInterceptor, multi: true },
23352
23422
  { provide: APP_INITIALIZER, useFactory: TranslateProviderFactory, deps: [TranslateService], multi: true },
23353
23423
  ], imports: [[
@@ -23460,9 +23530,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
23460
23530
  GuideService, OptionsService,
23461
23531
  BizDocComponentFactoryResolver, PromptService, TranslateService,
23462
23532
  ToolbarService, HtmlEditorService,
23463
- {
23464
- provide: RouterImpl, useClass: isMobile() ? NgRouter : PaneRouter
23465
- },
23466
23533
  { provide: HTTP_INTERCEPTORS, useClass: AppHttpInterceptor, multi: true },
23467
23534
  { provide: APP_INITIALIZER, useFactory: TranslateProviderFactory, deps: [TranslateService], multi: true },
23468
23535
  ],
@@ -25770,7 +25837,7 @@ const SYSTEM_COMPONENTS = [RoleNodeComponent, ManageCubeIndexUtility, Permission
25770
25837
  PatternsComponent, SystemDiffComponent, DocumentTraceComponent];
25771
25838
  class SystemModule {
25772
25839
  static forChild() {
25773
- SYSTEM_COMPONENTS.forEach(c => REGISTRY[c['__bizdoc']] = c);
25840
+ registerComponents(SYSTEM_COMPONENTS);
25774
25841
  return {
25775
25842
  ngModule: SystemModule,
25776
25843
  providers: []
@@ -26029,52 +26096,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
26029
26096
  }]
26030
26097
  }] });
26031
26098
 
26032
- class OktaHttpInterceptor {
26033
- constructor(_okta) {
26034
- this._okta = _okta;
26035
- }
26036
- _isAuthenticated() {
26037
- return from(this._okta.oktaAuth.isAuthenticated());
26038
- }
26039
- intercept(req, next) {
26040
- return this._isAuthenticated()
26041
- .pipe(switchMap$1(isAuthenticated => {
26042
- if (!isAuthenticated)
26043
- return next.handle(req);
26044
- const accessToken = this._okta.oktaAuth.getAccessToken();
26045
- req = req.clone({
26046
- setHeaders: {
26047
- Authorization: `Bearer ${accessToken}`
26048
- }
26049
- });
26050
- return next.handle(req);
26051
- }));
26052
- }
26053
- }
26054
- OktaHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaHttpInterceptor, deps: [{ token: OKTA_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
26055
- OktaHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaHttpInterceptor, providedIn: 'root' });
26056
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaHttpInterceptor, decorators: [{
26057
- type: Injectable,
26058
- args: [{ providedIn: 'root' }]
26059
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
26060
- type: Inject,
26061
- args: [OKTA_CONFIG]
26062
- }] }]; } });
26063
-
26064
26099
  class BizDocModule {
26065
- static forChild(config) {
26066
- const { components } = config || {};
26067
- components && registerComponents(components);
26068
- return {
26069
- ngModule: BizDocModule,
26070
- providers: []
26071
- };
26072
- }
26073
26100
  static forRoot(config) {
26074
- const { formats, routes, components, okta } = config;
26101
+ const { formats, routes, components, okta, baseUrl } = config;
26075
26102
  registerComponents(components);
26076
26103
  const providers = [
26077
26104
  { provide: PANES_DATA, useValue: PANES_CONFIG.concat(routes || []) },
26105
+ {
26106
+ provide: BIZDOC_CONFIG,
26107
+ useValue: config
26108
+ },
26078
26109
  {
26079
26110
  provide: MAT_DATE_FORMATS, useValue: {
26080
26111
  parse: {
@@ -26088,10 +26119,6 @@ class BizDocModule {
26088
26119
  }
26089
26120
  }
26090
26121
  },
26091
- {
26092
- provide: BIZDOC_CONFIG,
26093
- useValue: config
26094
- }
26095
26122
  ];
26096
26123
  if (okta) {
26097
26124
  providers.push({
@@ -26105,15 +26132,19 @@ class BizDocModule {
26105
26132
  }),
26106
26133
  }
26107
26134
  });
26108
- providers.push({ provide: HTTP_INTERCEPTORS, useClass: OktaHttpInterceptor, multi: true });
26109
26135
  providers.push({
26110
26136
  provide: AuthenticationImpl, useClass: OktaAuthentication
26111
26137
  });
26112
26138
  }
26113
- else
26139
+ else {
26114
26140
  providers.push({
26115
26141
  provide: AuthenticationImpl, useClass: FormAuthentication
26116
26142
  });
26143
+ }
26144
+ baseUrl &&
26145
+ providers.push({
26146
+ provide: 'BASE_URL', useValue: baseUrl
26147
+ });
26117
26148
  return {
26118
26149
  ngModule: BizDocModule,
26119
26150
  providers
@@ -26136,7 +26167,7 @@ BizDocModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
26136
26167
  MobileModule,
26137
26168
  DesktopModule,
26138
26169
  SystemModule.forChild(),
26139
- SharedModule.forChild()
26170
+ SharedModule.forChild({ routing: isMobile() ? 'ng' : 'pane' })
26140
26171
  ], SharedModule,
26141
26172
  MaterialModule] });
26142
26173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: BizDocModule, decorators: [{
@@ -26155,7 +26186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
26155
26186
  MobileModule,
26156
26187
  DesktopModule,
26157
26188
  SystemModule.forChild(),
26158
- SharedModule.forChild()
26189
+ SharedModule.forChild({ routing: isMobile() ? 'ng' : 'pane' })
26159
26190
  ],
26160
26191
  exports: [
26161
26192
  SharedModule,
@@ -26164,9 +26195,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImpor
26164
26195
  }]
26165
26196
  }] });
26166
26197
 
26198
+ class OktaHttpInterceptor {
26199
+ constructor(_okta) {
26200
+ this._okta = _okta;
26201
+ }
26202
+ _isAuthenticated() {
26203
+ return from(this._okta.oktaAuth.isAuthenticated());
26204
+ }
26205
+ intercept(req, next) {
26206
+ return this._isAuthenticated()
26207
+ .pipe(switchMap$1(isAuthenticated => {
26208
+ if (!isAuthenticated)
26209
+ return next.handle(req);
26210
+ const accessToken = this._okta.oktaAuth.getAccessToken();
26211
+ req = req.clone({
26212
+ setHeaders: {
26213
+ Authorization: `Bearer ${accessToken}`
26214
+ }
26215
+ });
26216
+ return next.handle(req);
26217
+ }));
26218
+ }
26219
+ }
26220
+ OktaHttpInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaHttpInterceptor, deps: [{ token: OKTA_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
26221
+ OktaHttpInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaHttpInterceptor, providedIn: 'root' });
26222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0, type: OktaHttpInterceptor, decorators: [{
26223
+ type: Injectable,
26224
+ args: [{ providedIn: 'root' }]
26225
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
26226
+ type: Inject,
26227
+ args: [OKTA_CONFIG]
26228
+ }] }]; } });
26229
+
26167
26230
  /**
26168
26231
  * Generated bundle index. Do not edit.
26169
26232
  */
26170
26233
 
26171
- export { AccountService, AceInput, ActionDialog, ActionPicker, ActionPipe, ActionRef, ActionsWidget, AddressInput, ArraySortPipe, AssignActionComponent, AttachmentInfo, AttachmentPreview, AvatarComponent, BIZDOC_CONFIG, BizDoc, BizDocApp, BizDocModule, BrowseFilterComponent, BrowseItemsComponent, ChatInfo, ColorPicker, CombinationPicker, CombinationPickerBody, CombinationPool, CommentsComponent, CompareContextDirective, CompareDepartmentsWidget, CompareGroupDirective, CompareNameDirective, ComposeFormComponent, ContactsComponent, ConversationComponent, CubeAccumAnalysisWidget, CubeAnalysisWidget, CubeChartAnalysisWidget, CubeDocumentsComponent, CubeDocumentsWidget, CubeFilterComponent, CubeGridDocumentsComponent, CubeInfo, CubeInfoTableComponent, CubeService, CubeViewComponent, CubeWidgetFilterComponent, DEFAULT_POLICY, DRAFT, DashboardComponent, DatasourceService, DateRangePipe, DocumentInfo, DocumentInfoComponent, DocumentResolveService, DocumentViewRef, DocumentViewsComponent, DurationFormatPipe, EnterExitLeft, EnterExitRight, EnterExitTop, ExploreDocumentComponent, ExploreItemsComponent, FadeSlideInOut, FieldType, FilterPipe, FlowViewComponent, FormPipe, FormRef, GuideService, INBOX, IdentityName, JoinPipe, LottieAnimation, MailboxService, MapInfo, MatIconAnimate, MaterialModule, NavigationEnd, NavigationSelected, NavigationStart, NgxComponentOutlet, NotificationsTableComponent, OktaHttpInterceptor, OpenPolicy, POPUP_DATA, PaneRef, PanesRouter, ParamNavigation, PeersPerformanceWidget, PendingResultsWidget, PersonalActivityWidget, PersonalScoreWidget, Popup, PopupRef, PrivilegeDisabledDirective, PrivilegeHiddenDirective, PulseAnimation, QueryParamNavigation, QuickCommentComponent, RecentsWidget, RecipientResolveService, ReportArgumentsComponent, ReportRef, ReportViewerComponent, ReturnActionComponent, RolePipe, RouterImpl, SanitizeHtmlPipe, SaveChangesDialog, ScheduleViewComponent, SearchInput, SessionMode, SessionService, ShakeAnimation, SharedModule, SlotRouterDirective, StatePipe, SubstitutionComponent, TagsComponent, TasksComponent, TimePicker, TimespanInput, TooltipDirective, TraceViewComponent, TranslatePipe, TranslateService, TypeAutocomplete, TypeSelect, TypeValuePipe, UsageChartComponent, UsagePivotComponent, UsageReportArgs, UserNamePipe, UtilityRef, VersionCompareComponent, WidgetItemComponent, WidgetRef, isArray, isBoolean, isDate, isMobile, isObject, isString, modelize, registerComponents };
26234
+ export { AccountService, AceInput, ActionDialog, ActionPicker, ActionPipe, ActionRef, ActionsWidget, AddressInput, ArraySortPipe, AssignActionComponent, AttachmentInfo, AttachmentPreview, AuthenticationImpl, AvatarComponent, BIZDOC_CONFIG, BizDoc, BizDocApp, BizDocModule, BrowseFilterComponent, BrowseItemsComponent, ChatInfo, ColorPicker, CombinationPicker, CombinationPickerBody, CombinationPool, CommentsComponent, CompareContextDirective, CompareDepartmentsWidget, CompareGroupDirective, CompareNameDirective, ComposeFormComponent, ContactsComponent, ConversationComponent, CubeAccumAnalysisWidget, CubeAnalysisWidget, CubeChartAnalysisWidget, CubeDocumentsComponent, CubeDocumentsWidget, CubeFilterComponent, CubeGridDocumentsComponent, CubeInfo, CubeInfoTableComponent, CubeService, CubeViewComponent, CubeWidgetFilterComponent, DEFAULT_POLICY, DRAFT, DashboardComponent, DatasourceService, DateRangePipe, DocumentInfo, DocumentInfoComponent, DocumentResolveService, DocumentViewRef, DocumentViewsComponent, DurationFormatPipe, EnterExitLeft, EnterExitRight, EnterExitTop, ExploreDocumentComponent, ExploreItemsComponent, FadeSlideInOut, FieldType, FilterPipe, FlowViewComponent, FormAuthentication, FormPipe, FormRef, GuideService, INBOX, IdentityName, JoinPipe, LottieAnimation, MailboxService, MapInfo, MatIconAnimate, MaterialModule, NavigationEnd, NavigationSelected, NavigationStart, NgxComponentOutlet, NotificationsTableComponent, OktaAuthentication, OktaHttpInterceptor, OpenPolicy, POPUP_DATA, PaneRef, PanesRouter, ParamNavigation, PeersPerformanceWidget, PendingResultsWidget, PersonalActivityWidget, PersonalScoreWidget, Popup, PopupRef, PrivilegeDisabledDirective, PrivilegeHiddenDirective, PulseAnimation, QueryParamNavigation, QuickCommentComponent, RecentsWidget, RecipientResolveService, ReportArgumentsComponent, ReportRef, ReportViewerComponent, ReturnActionComponent, RolePipe, RouterImpl, SanitizeHtmlPipe, SaveChangesDialog, ScheduleViewComponent, SearchInput, SessionMode, SessionService, ShakeAnimation, SharedModule, SlotRouterDirective, StatePipe, SubstitutionComponent, TagsComponent, TasksComponent, TimePicker, TimespanInput, TooltipDirective, TraceViewComponent, TranslatePipe, TranslateService, TypeAutocomplete, TypeSelect, TypeValuePipe, UsageChartComponent, UsagePivotComponent, UsageReportArgs, UserNamePipe, UtilityRef, VersionCompareComponent, WidgetItemComponent, WidgetRef, isArray, isBoolean, isDate, isMobile, isObject, isString, modelize, registerComponents };
26172
26235
  //# sourceMappingURL=bizdoc-core.js.map