@provoly/dashboard 1.4.18 → 1.4.20

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 (190) hide show
  1. package/admin/components/admin-classes/admin-classes-view/admin-attributes-edit/admin-attributes-edit.component.d.ts +2 -3
  2. package/admin/components/admin-classes/admin-classes-view/admin-attributes-new/admin-attributes-new.component.d.ts +2 -3
  3. package/admin/components/admin-classes/store/admin-class.effects.d.ts +22 -8
  4. package/admin/components/admin-dataset/store/admin-dataset.effects.d.ts +13 -5
  5. package/admin/components/admin-fields/store/fields.effects.d.ts +7 -5
  6. package/admin/store/admin.effects.d.ts +3 -1
  7. package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-edit/admin-abac-rules-edit.component.mjs +3 -3
  8. package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-new/admin-abac-rules-new.component.mjs +3 -3
  9. package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-view/admin-abac-rules-view.component.mjs +3 -3
  10. package/esm2022/admin/components/admin-classes/admin-classes-customize/admin-classes-customize.component.mjs +4 -4
  11. package/esm2022/admin/components/admin-classes/admin-classes-customize/symbol/admin-classes-customize-symbol.component.mjs +2 -2
  12. package/esm2022/admin/components/admin-classes/admin-classes-edit/admin-classes-edit.component.mjs +2 -2
  13. package/esm2022/admin/components/admin-classes/admin-classes-form/admin-classes-form.component.mjs +2 -2
  14. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-edit/admin-attributes-edit.component.mjs +5 -6
  15. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +3 -3
  16. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-new/admin-attributes-new.component.mjs +5 -6
  17. package/esm2022/admin/components/admin-classes/admin-classes-view/admin-classes-view.component.mjs +4 -4
  18. package/esm2022/admin/components/admin-classes/admin-classes.component.mjs +3 -3
  19. package/esm2022/admin/components/admin-classes/store/admin-class.effects.mjs +14 -13
  20. package/esm2022/admin/components/admin-dataset/admin-dataset.component.mjs +3 -3
  21. package/esm2022/admin/components/admin-dataset/admin-form-dataset/admin-form-dataset.component.mjs +3 -3
  22. package/esm2022/admin/components/admin-dataset/store/admin-dataset.effects.mjs +7 -8
  23. package/esm2022/admin/components/admin-environment/store/environment.effects.mjs +2 -2
  24. package/esm2022/admin/components/admin-fields/admin-fields-edit/admin-fields-edit.component.mjs +2 -2
  25. package/esm2022/admin/components/admin-fields/admin-fields-form/admin-fields-form.component.mjs +2 -2
  26. package/esm2022/admin/components/admin-fields/admin-fields.component.mjs +4 -4
  27. package/esm2022/admin/components/admin-fields/store/fields.effects.mjs +7 -10
  28. package/esm2022/admin/components/admin-links/admin-links-new/admin-links-new.component.mjs +3 -3
  29. package/esm2022/admin/components/admin-links/admin-links.component.mjs +3 -3
  30. package/esm2022/admin/components/admin-links/store/links.effects.mjs +2 -2
  31. package/esm2022/admin/components/admin-menu/admin-menu.component.mjs +2 -2
  32. package/esm2022/admin/components/admin-metadata/admin-metadata.component.mjs +2 -2
  33. package/esm2022/admin/components/admin-metadata-rules/store/metadata-rules.effects.mjs +2 -2
  34. package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.effects.mjs +2 -2
  35. package/esm2022/admin/components/admin-predicates/store/predicates.effects.mjs +2 -2
  36. package/esm2022/admin/components/admin-relation-types/admin-relation-types.component.mjs +2 -2
  37. package/esm2022/admin/components/admin-user/store/admin-user.effects.mjs +2 -2
  38. package/esm2022/admin/components/shared/add-category-modal/add-category-modal.component.mjs +2 -2
  39. package/esm2022/admin/store/admin.effects.mjs +2 -2
  40. package/esm2022/components/metadata-editor/store/metadata.effects.mjs +2 -2
  41. package/esm2022/components/text-editor/component/text-editor.component.mjs +2 -2
  42. package/esm2022/dataset/components/dataset-detail/dataset-detail.component.mjs +3 -4
  43. package/esm2022/dataset/components/dataset.component.mjs +4 -4
  44. package/esm2022/filters/autocomplete/autocomplete.component.mjs +4 -4
  45. package/esm2022/filters/number/number-filter.component.mjs +2 -2
  46. package/esm2022/filters/text/text-filter.component.mjs +2 -2
  47. package/esm2022/import/components/form/import-form.component.mjs +2 -2
  48. package/esm2022/import/components/list/import-list.component.mjs +2 -2
  49. package/esm2022/import/store/import.effects.mjs +2 -2
  50. package/esm2022/lib/core/components/select/select.component.mjs +2 -2
  51. package/esm2022/lib/core/components/share/access-rights-share-modal/access-rights-share-modal.component.mjs +3 -3
  52. package/esm2022/lib/core/components/snackbar/snackbar.service.mjs +2 -2
  53. package/esm2022/lib/core/components/upload/upload.component.mjs +2 -2
  54. package/esm2022/lib/core/errors/http-error-interceptor.service.mjs +2 -2
  55. package/esm2022/lib/core/model/filter.interface.mjs +1 -1
  56. package/esm2022/lib/core/store/aggregation/backend-aggregation.service.mjs +3 -4
  57. package/esm2022/lib/core/store/category/category.actions.mjs +3 -3
  58. package/esm2022/lib/core/store/category/category.effects.mjs +10 -6
  59. package/esm2022/lib/core/store/class/class.actions.mjs +3 -3
  60. package/esm2022/lib/core/store/class/class.effects.mjs +10 -6
  61. package/esm2022/lib/core/store/config/config.actions.mjs +2 -2
  62. package/esm2022/lib/core/store/config/config.effects.mjs +13 -8
  63. package/esm2022/lib/core/store/config/open-map-tiles.service.mjs +2 -2
  64. package/esm2022/lib/core/store/data-source/data-source.actions.mjs +8 -8
  65. package/esm2022/lib/core/store/data-source/data-source.effects.mjs +21 -21
  66. package/esm2022/lib/core/store/field/field.actions.mjs +3 -3
  67. package/esm2022/lib/core/store/field/field.effects.mjs +10 -6
  68. package/esm2022/lib/core/store/image/image.effects.mjs +2 -2
  69. package/esm2022/lib/core/store/item/item.effects.mjs +2 -2
  70. package/esm2022/lib/core/store/relation-types/relation-types.actions.mjs +4 -4
  71. package/esm2022/lib/core/store/relation-types/relation-types.effects.mjs +11 -10
  72. package/esm2022/lib/core/store/search/search.actions.mjs +1 -1
  73. package/esm2022/lib/core/store/search/search.effects.mjs +3 -2
  74. package/esm2022/lib/core/store/search/search.selectors.mjs +3 -1
  75. package/esm2022/lib/core/store/search/search.service.mjs +4 -9
  76. package/esm2022/lib/dashboard/action-bus/effect/action-bus.effects.mjs +2 -2
  77. package/esm2022/lib/dashboard/components/context-menu/context-menu.component.mjs +2 -2
  78. package/esm2022/lib/dashboard/components/dashboard.component.mjs +29 -23
  79. package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-list/datasource-list.component.mjs +3 -4
  80. package/esm2022/lib/dashboard/components/widgets/datasource-selector/datasource-selector.component.mjs +2 -2
  81. package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-instanciator.component.mjs +2 -2
  82. package/esm2022/lib/dashboard/store/dashboard.effects.mjs +2 -2
  83. package/esm2022/lib/dashboard/store/manifest.service.mjs +2 -2
  84. package/esm2022/lib/dashboard/store/refresh.service.mjs +2 -2
  85. package/esm2022/lib/dashboard/store/wms.service.mjs +2 -2
  86. package/esm2022/notification/components/notification/content/notification-content.component.mjs +2 -2
  87. package/esm2022/pipeline/components/pipeline-editor/pipeline-editor.component.mjs +3 -5
  88. package/esm2022/pipeline/factory/pipeline-component-factory.service.mjs +2 -2
  89. package/esm2022/pipeline/store/pipeline.effects.mjs +2 -2
  90. package/esm2022/pipeline-components/input-datasource/component/input-datasource.component.mjs +2 -3
  91. package/esm2022/pipeline-components/input-datasource/input-datasource.module.mjs +2 -2
  92. package/esm2022/pipeline-components/output-dataset/component/output-dataset.component.mjs +2 -2
  93. package/esm2022/pipeline-components/output-dataset/output-dataset.module.mjs +2 -2
  94. package/esm2022/restitution/components/restitution/restitution.component.mjs +5 -5
  95. package/esm2022/search/search-fulltext/store/search-fulltext.effects.mjs +2 -2
  96. package/esm2022/search/search-home/search-home.component.mjs +3 -4
  97. package/esm2022/search/search-mono-class/components/search-mono-class/search-mono-class.component.mjs +2 -2
  98. package/esm2022/search/search-mono-class/components/search-order/search-order.component.mjs +2 -2
  99. package/esm2022/search/search-mono-class/components/search-select-attribute/search-select-attribute.component.mjs +1 -1
  100. package/esm2022/search/search-mono-class/store/search-mono-class.effects.mjs +2 -2
  101. package/esm2022/search/search-multi-class/store/search-multi-class.effects.mjs +2 -2
  102. package/esm2022/search/search-tools/search-tools.component.mjs +5 -6
  103. package/esm2022/toolbox/components/filter-settings/filter-settings.component.mjs +2 -2
  104. package/esm2022/toolbox/components/named-query/named-query.component.mjs +2 -2
  105. package/esm2022/toolbox/components/select-grid-layout/select-grid-layout.component.mjs +2 -2
  106. package/esm2022/toolbox/components/toolbox.component.mjs +2 -2
  107. package/esm2022/tooltips/attribute/attribute-tooltip.component.mjs +2 -2
  108. package/esm2022/widgets/widget-analytic/component/widget-analytic.component.mjs +2 -2
  109. package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +2 -2
  110. package/esm2022/widgets/widget-detail/component/widget-detail.component.mjs +2 -2
  111. package/esm2022/widgets/widget-graph/component/widget-graph.component.mjs +10 -13
  112. package/esm2022/widgets/widget-image/component/widget-image.component.mjs +2 -2
  113. package/esm2022/widgets/widget-table/component/widget-table.component.mjs +3 -3
  114. package/esm2022/widgets/widget-table/get-value/get-value.pipe.mjs +2 -2
  115. package/esm2022/widgets/widget-table/resizable/resizable.directive.mjs +2 -2
  116. package/esm2022/widgets/widget-template/component/widget-template.component.mjs +2 -2
  117. package/esm2022/widgets/widget-tile/component/widget-tile.component.mjs +2 -2
  118. package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +2 -2
  119. package/fesm2022/provoly-dashboard-admin.mjs +121 -123
  120. package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
  121. package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +12 -13
  122. package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
  123. package/fesm2022/provoly-dashboard-components-text-editor.mjs +1 -2
  124. package/fesm2022/provoly-dashboard-components-text-editor.mjs.map +1 -1
  125. package/fesm2022/provoly-dashboard-dataset.mjs +5 -6
  126. package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
  127. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs +3 -3
  128. package/fesm2022/provoly-dashboard-filters-autocomplete.mjs.map +1 -1
  129. package/fesm2022/provoly-dashboard-filters-number.mjs +1 -2
  130. package/fesm2022/provoly-dashboard-filters-number.mjs.map +1 -1
  131. package/fesm2022/provoly-dashboard-filters-text.mjs +1 -2
  132. package/fesm2022/provoly-dashboard-filters-text.mjs.map +1 -1
  133. package/fesm2022/provoly-dashboard-import.mjs +5 -6
  134. package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
  135. package/fesm2022/provoly-dashboard-notification.mjs +3 -4
  136. package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
  137. package/fesm2022/provoly-dashboard-pipeline-components-input-datasource.mjs +2 -3
  138. package/fesm2022/provoly-dashboard-pipeline-components-input-datasource.mjs.map +1 -1
  139. package/fesm2022/provoly-dashboard-pipeline-components-output-dataset.mjs +2 -2
  140. package/fesm2022/provoly-dashboard-pipeline-components-output-dataset.mjs.map +1 -1
  141. package/fesm2022/provoly-dashboard-pipeline.mjs +16 -18
  142. package/fesm2022/provoly-dashboard-pipeline.mjs.map +1 -1
  143. package/fesm2022/provoly-dashboard-restitution.mjs +4 -4
  144. package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
  145. package/fesm2022/provoly-dashboard-search.mjs +19 -20
  146. package/fesm2022/provoly-dashboard-search.mjs.map +1 -1
  147. package/fesm2022/provoly-dashboard-toolbox.mjs +3 -4
  148. package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
  149. package/fesm2022/provoly-dashboard-tooltips-attribute.mjs +1 -2
  150. package/fesm2022/provoly-dashboard-tooltips-attribute.mjs.map +1 -1
  151. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs +1 -2
  152. package/fesm2022/provoly-dashboard-widgets-widget-analytic.mjs.map +1 -1
  153. package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +1 -2
  154. package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
  155. package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs +1 -2
  156. package/fesm2022/provoly-dashboard-widgets-widget-detail.mjs.map +1 -1
  157. package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs +8 -12
  158. package/fesm2022/provoly-dashboard-widgets-widget-graph.mjs.map +1 -1
  159. package/fesm2022/provoly-dashboard-widgets-widget-image.mjs +1 -1
  160. package/fesm2022/provoly-dashboard-widgets-widget-image.mjs.map +1 -1
  161. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs +2 -3
  162. package/fesm2022/provoly-dashboard-widgets-widget-table.mjs.map +1 -1
  163. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs +1 -2
  164. package/fesm2022/provoly-dashboard-widgets-widget-template.mjs.map +1 -1
  165. package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs +1 -2
  166. package/fesm2022/provoly-dashboard-widgets-widget-tile.mjs.map +1 -1
  167. package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +1 -2
  168. package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -1
  169. package/fesm2022/provoly-dashboard.mjs +989 -975
  170. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  171. package/lib/core/model/filter.interface.d.ts +1 -0
  172. package/lib/core/store/category/category.actions.d.ts +7 -3
  173. package/lib/core/store/category/category.effects.d.ts +4 -2
  174. package/lib/core/store/class/class.actions.d.ts +7 -3
  175. package/lib/core/store/class/class.effects.d.ts +4 -2
  176. package/lib/core/store/config/config.actions.d.ts +5 -1
  177. package/lib/core/store/config/config.effects.d.ts +12 -4
  178. package/lib/core/store/data-source/data-source.actions.d.ts +23 -11
  179. package/lib/core/store/data-source/data-source.effects.d.ts +23 -15
  180. package/lib/core/store/field/field.actions.d.ts +7 -3
  181. package/lib/core/store/field/field.effects.d.ts +4 -2
  182. package/lib/core/store/relation-types/relation-types.actions.d.ts +9 -5
  183. package/lib/core/store/relation-types/relation-types.effects.d.ts +8 -6
  184. package/lib/core/store/search/search.actions.d.ts +2 -0
  185. package/lib/core/store/search/search.selectors.d.ts +5 -0
  186. package/lib/core/store/search/search.service.d.ts +1 -1
  187. package/lib/dashboard/components/dashboard.component.d.ts +5 -3
  188. package/package.json +11 -11
  189. package/search/search-mono-class/store/search-mono-class.effects.d.ts +1 -1
  190. package/widgets/widget-graph/component/widget-graph.component.d.ts +2 -5
@@ -3,22 +3,21 @@ import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
3
3
  import * as i3 from '@angular/common';
4
4
  import { CommonModule, AsyncPipe, DOCUMENT } from '@angular/common';
5
5
  import * as i1$1 from '@angular/common/http';
6
- import { HttpHeaders, HttpUrlEncodingCodec, HttpParams, HttpClientModule } from '@angular/common/http';
6
+ import { HttpHeaders, HttpParams, HttpUrlEncodingCodec, HttpClientModule } from '@angular/common/http';
7
7
  import * as i0 from '@angular/core';
8
- import { InjectionToken, Injectable, Directive, Optional, Inject, Input, Component, Pipe, ChangeDetectionStrategy, HostBinding, NgModule, Injector, EventEmitter, Output, TemplateRef, ViewChild, SecurityContext, ContentChildren, forwardRef, HostListener, ViewContainerRef, ViewChildren, ViewEncapsulation, createNgModule } from '@angular/core';
8
+ import { InjectionToken, Injectable, Directive, Optional, Inject, Input, Component, Pipe, ChangeDetectionStrategy, HostBinding, NgModule, Injector, EventEmitter, Output, TemplateRef, ViewChild, SecurityContext, ContentChildren, forwardRef, HostListener, ViewContainerRef, signal, ViewChildren, ViewEncapsulation, createNgModule } from '@angular/core';
9
9
  import * as i2 from '@angular/router';
10
10
  import { NavigationEnd, RouterModule } from '@angular/router';
11
11
  import * as i1$2 from '@ngrx/effects';
12
12
  import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
13
13
  import * as i1 from '@ngrx/store';
14
14
  import { createAction, props, createReducer, on, createFeatureSelector, createSelector, StoreModule } from '@ngrx/store';
15
- import { of, Subscription, filter, combineLatest, debounceTime, BehaviorSubject, map, Subject, windowTime, switchMap, mergeMap, from as from$1, forkJoin, catchError as catchError$1, startWith, throwError, take, withLatestFrom as withLatestFrom$1, tap as tap$1, combineLatestWith, merge, distinctUntilChanged as distinctUntilChanged$1, groupBy, EMPTY, share, ReplaySubject, delay, fromEvent, auditTime, interval } from 'rxjs';
15
+ import { of, Subscription, filter, combineLatest, debounceTime, BehaviorSubject, map, Subject, windowTime, switchMap, distinctUntilChanged, mergeMap, from as from$1, withLatestFrom, catchError, forkJoin, startWith, tap, throwError, take, combineLatestWith, merge, groupBy, EMPTY, share, ReplaySubject, delay, fromEvent, auditTime, interval } from 'rxjs';
16
16
  import * as i3$1 from '@angular/platform-browser';
17
17
  import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
18
18
  import * as i3$2 from '@angular/cdk/a11y';
19
19
  import { A11yModule } from '@angular/cdk/a11y';
20
20
  import equal from 'fast-deep-equal/es6';
21
- import { distinctUntilChanged, filter as filter$1, debounceTime as debounceTime$1, mergeMap as mergeMap$1, map as map$1, catchError, withLatestFrom, tap, delay as delay$1 } from 'rxjs/operators';
22
21
  import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations';
23
22
  import { Style, Icon } from 'ol/style';
24
23
  import { createEntityAdapter } from '@ngrx/entity';
@@ -1645,11 +1644,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1645
1644
  }] });
1646
1645
 
1647
1646
  const DataSourceActions = {
1648
- load: createAction('[Datasource] load'),
1647
+ load: createAction('[Datasource] load', props()),
1649
1648
  namedQuery: {
1650
- load: createAction('[NamedQuery] load'),
1651
- loaded: createAction('[NamedQuery] loaded', props()),
1652
- failure: createAction('[NamedQuery] failure', props()),
1649
+ load: createAction('[NamedQuery] (bus) load', props()),
1650
+ loaded: createAction('[NamedQuery] (bus) loaded', props()),
1651
+ failure: createAction('[NamedQuery] (bus) failure', props()),
1653
1652
  post: createAction('[NamedQuery] post', props()),
1654
1653
  delete: createAction('[NamedQuery] delete', props()),
1655
1654
  addFavorite: createAction('[NamedQuery] add favorite', props()),
@@ -1662,9 +1661,9 @@ const DataSourceActions = {
1662
1661
  stopRename: createAction('[NamedQuery] stop rename')
1663
1662
  },
1664
1663
  dataset: {
1665
- loadDataset: createAction('[Dataset] load datasets'),
1666
- loadedDataset: createAction('[Dataset] loaded datasets', props()),
1667
- failure: createAction('[Dataset] failure effect Dataset', props()),
1664
+ loadDataset: createAction('[Dataset] (bus) load datasets', props()),
1665
+ loadedDataset: createAction('[Dataset] (bus) loaded datasets', props()),
1666
+ failure: createAction('[Dataset] (bus) failure effect Dataset', props()),
1668
1667
  listVersions: createAction('[Dataset] Get Dataset versions', props()),
1669
1668
  listVersionsSuccess: createAction('[Dataset] Get Dataset versions Success', props()),
1670
1669
  listVersionsFailure: createAction('[Dataset] Get Dataset versions Failure'),
@@ -1910,7 +1909,7 @@ const ConfigActions = {
1910
1909
  defineUrls: createAction('[Config] (bus) defining urls', props()),
1911
1910
  updateIcons: createAction('[Config] (bus) updating icons', props()),
1912
1911
  saveIcons: createAction('[Config] (bus) saving icons', props()),
1913
- loadCustomization: createAction('[Config] (bus) load all class customization'),
1912
+ loadCustomization: createAction('[Config] (bus) load all class customization', props()),
1914
1913
  loadedCustomization: createAction('[Config] (bus) customization loaded', props()),
1915
1914
  getMapStyles: createAction('[Config] get map styles'),
1916
1915
  defineMapStyles: createAction('[Config] (bus) defining map styles', props()),
@@ -2972,7 +2971,7 @@ class PryUploadComponent {
2972
2971
  asyncEmit(file) {
2973
2972
  const tmpSub = this.store
2974
2973
  .select(ImagesSelectors.lastAdded)
2975
- .pipe(filter$1((image) => !!image))
2974
+ .pipe(filter((image) => !!image))
2976
2975
  .subscribe((name) => {
2977
2976
  this.uploaded.emit(name);
2978
2977
  this.uploadedFile.emit(file);
@@ -3004,9 +3003,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
3004
3003
  }] } });
3005
3004
 
3006
3005
  const ClassActions = {
3007
- load: createAction('[Class] Load Classes'),
3006
+ load: createAction('[Class] (bus) Load Classes', props()),
3008
3007
  loadSuccess: createAction('[Class Api] (bus) Load Classes Success', props()),
3009
- loadFailure: createAction('[Class Api] Load Classes Failure', props()),
3008
+ loadFailure: createAction('[Class Api] (bus) Load Classes Failure', props()),
3010
3009
  loadDatasetCount: createAction('[Class Api] Load DatasetCount'),
3011
3010
  loadDatasetCountSuccess: createAction('[Class Api] Load DatasetCount Success', props()),
3012
3011
  loadDatasetCountFailure: createAction('[Class Api] Load DatasetCount Failure', props())
@@ -3377,44 +3376,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
3377
3376
  }] } });
3378
3377
 
3379
3378
  const CategoryActions = {
3380
- load: createAction('[Category] Load Categories'),
3379
+ load: createAction('[Category] (bus) Load Categories', props()),
3381
3380
  loadSuccess: createAction('[Category Api] (bus) Load Categories Success', props()),
3382
- loadFailure: createAction('[Category Api] Load Categories Failure', props())
3381
+ loadFailure: createAction('[Category Api] (bus) Load Categories Failure', props())
3383
3382
  };
3384
3383
 
3385
- class CategoryService {
3386
- constructor(httpClient, store) {
3387
- this.httpClient = httpClient;
3388
- this.store = store;
3389
- }
3390
- getCategories() {
3391
- return this.store
3392
- .select(ConfigSelectors.refUrl)
3393
- .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/model/categories`))));
3394
- }
3395
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3396
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryService, providedIn: 'root' }); }
3397
- }
3398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryService, decorators: [{
3399
- type: Injectable,
3400
- args: [{
3401
- providedIn: 'root'
3402
- }]
3403
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
3404
-
3405
- class CategoryEffects {
3406
- constructor(actions$, categoryService) {
3407
- this.actions$ = actions$;
3408
- this.categoryService = categoryService;
3409
- this.loadCategories$ = createEffect(() => this.actions$.pipe(ofType(CategoryActions.load), debounceTime$1(200), mergeMap$1((action) => this.categoryService.getCategories().pipe(map$1((categories) => CategoryActions.loadSuccess({ categories })), catchError((error) => [CategoryActions.loadFailure({ error: error })])))));
3410
- }
3411
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryEffects, deps: [{ token: i1$2.Actions }, { token: CategoryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3412
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryEffects }); }
3413
- }
3414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryEffects, decorators: [{
3415
- type: Injectable
3416
- }], ctorParameters: () => [{ type: i1$2.Actions }, { type: CategoryService }] });
3417
-
3418
3384
  const categoriesFeatureKey = '@pry/model/categories';
3419
3385
  function sortByName$1(a, b) {
3420
3386
  return a.name.localeCompare(b.name);
@@ -3431,49 +3397,410 @@ function categoryReducer(state, action) {
3431
3397
  return internalReducer$2(state, action);
3432
3398
  }
3433
3399
 
3434
- class ClassService {
3435
- constructor(httpClient, store) {
3436
- this.httpClient = httpClient;
3437
- this.store = store;
3438
- }
3439
- /**
3440
- * Returns the list of business classes
3441
- */
3442
- getClasses() {
3443
- return this.store
3444
- .select(ConfigSelectors.refUrl)
3445
- .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/model/class`))));
3446
- }
3447
- getDatasetCounts() {
3448
- return this.store
3449
- .select(ConfigSelectors.refUrl)
3450
- .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/model/class/datasets/count`))));
3451
- }
3452
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3453
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassService, providedIn: 'root' }); }
3454
- }
3455
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassService, decorators: [{
3456
- type: Injectable,
3457
- args: [{
3458
- providedIn: 'root'
3459
- }]
3460
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
3400
+ const feature$5 = createFeatureSelector(categoriesFeatureKey);
3401
+ const entities$1 = createSelector(feature$5, selectEntities$1);
3402
+ const categories = createSelector(feature$5, selectAll$1);
3403
+ const CategorySelectors = {
3404
+ feature: feature$5,
3405
+ entities: entities$1,
3406
+ categories
3407
+ };
3461
3408
 
3462
- class ClassEffects {
3463
- constructor(actions$, classService) {
3464
- this.actions$ = actions$;
3465
- this.classService = classService;
3466
- this.loadClasses$ = createEffect(() => this.actions$.pipe(ofType(ClassActions.load), debounceTime$1(200), mergeMap$1((action) => this.classService.getClasses().pipe(map$1((classes) => ClassActions.loadSuccess({ classes })), catchError((error) => [ClassActions.loadFailure({ error: error })])))));
3467
- this.loadDatasetCount$ = createEffect(() => this.actions$.pipe(ofType(ClassActions.loadDatasetCount), mergeMap$1((action) => this.classService.getDatasetCounts().pipe(map$1((datasetCounts) => {
3468
- return ClassActions.loadDatasetCountSuccess({ datasetCounts: datasetCounts });
3469
- }), catchError((error) => [ClassActions.loadDatasetCountFailure({ error: error })])))));
3409
+ var DashboardGridLayout;
3410
+ (function (DashboardGridLayout) {
3411
+ DashboardGridLayout["FULL"] = "1";
3412
+ DashboardGridLayout["THIRD_VERTICAL"] = "1/3v";
3413
+ DashboardGridLayout["THIRD_HORIZONTAL"] = "1/3h";
3414
+ DashboardGridLayout["HALF_VERTICAL"] = "1/2v";
3415
+ DashboardGridLayout["HALF_HORIZONTAL"] = "1/2h";
3416
+ DashboardGridLayout["QUARTER"] = "1/4";
3417
+ DashboardGridLayout["MANUAL"] = "0";
3418
+ })(DashboardGridLayout || (DashboardGridLayout = {}));
3419
+
3420
+ var ViewMode;
3421
+ (function (ViewMode) {
3422
+ ViewMode["CATALOG"] = "catalog";
3423
+ ViewMode["CONSULT"] = "consult";
3424
+ ViewMode["CREATION"] = "creation";
3425
+ ViewMode["EDITION"] = "edition";
3426
+ ViewMode["EDITOR"] = "editor";
3427
+ ViewMode["SEARCH"] = "search";
3428
+ ViewMode["CUSTOM"] = "custom";
3429
+ })(ViewMode || (ViewMode = {}));
3430
+ const DashboardActions = {
3431
+ join: createAction('[Dashboard] joined', props()),
3432
+ leave: createAction('[Dashboard] leave', props()),
3433
+ updateManifest: createAction('[Dashboard] (bus) updating manifest', props()),
3434
+ updateManifestAfterFetch: createAction('[Dashboard] (bus) updating manifest after fetch', props()),
3435
+ updateManifestWithoutActivation: createAction('[Dashboard] (bus) updating manifest but do not activate it', props()),
3436
+ updateManifestAfterTenantJoin: createAction('[Dashboard] (bus) updating manifest after tenant join', props()),
3437
+ updateManifestAfterTenantLeave: createAction('[Dashboard] (bus) updating manifest after tenant leave', props()),
3438
+ selectPresentation: createAction('[Dashboard] (bus) selectPresentation', props()),
3439
+ setInitialPresentation: createAction('[Dashboard] (bus) set initial presentation', props()),
3440
+ declareSenderId: createAction('[Dashboard] self-updating manifest', props()),
3441
+ updateDashboardManifest: createAction('[Dashboard] updating dashboard view', props()),
3442
+ updateWidgetManifest: createAction('[Dashboard] updating widget view', props()),
3443
+ addWidgetToPresentation: createAction('[Dashboard] add widget to presentation', props()),
3444
+ updateWidgetInPresentation: createAction('[Dashboard] update widget in presentation', props()),
3445
+ requestAllRoutes: createAction('[Dashboard] (bus) requesting route update'),
3446
+ requestManifestsToEmit: createAction('[Dashboard] (bus) pre-save manifest, asking all widgets to emit'),
3447
+ updateRouteManifest: createAction('[Dashboard] (bus) updating route', props()),
3448
+ fetchManifestsList: createAction('[Dashboard] (bus) fetching available manifests'),
3449
+ setRefreshRate: createAction('[Dashboard] (bus) setting refreshRate', props()),
3450
+ updateManifestsList: createAction('[Dashboard] (bus) received manifests list', props()),
3451
+ fetchStaticManifest: createAction('[Dashboard] (bus) fetching staticManifest', props()),
3452
+ fetchMoreItems: createAction('[Dashboard] (bus) fetching more items', props()),
3453
+ endLoading: createAction('[Dashboard] end loading'),
3454
+ updateStaticManifest: createAction('[Dashboard] (bus) received staticManifest', props()),
3455
+ loadManifest: createAction('[Dashboard] (bus) load manifest', props()),
3456
+ loadAndActivateManifest: createAction('[Dashboard] (bus) load and activate manifest', props()),
3457
+ downloadManifest: createAction('[Dashboard] download manifest', props()),
3458
+ confirmManifestDeletion: createAction('[Dashboard] confirm manifest deletion', props()),
3459
+ deleteManifest: createAction('[Dashboard] deleting manifest', props()),
3460
+ saveManifest: createAction('[Dashboard] save manifest', props()),
3461
+ solveCollisions: createAction('[Dashboard] solving collisions'),
3462
+ clearManifest: createAction('[Dashboard] clear manifest'),
3463
+ followManifestRoute: createAction('[Dashboard] (bus) follow manifest route'),
3464
+ moveWidget: createAction('[Dashboard] moving widget', props()),
3465
+ maximizeWidget: createAction('[Dashboard] maximize widget', props()),
3466
+ assertResultSets: createAction('[Dashboard] assert resultSet', props()),
3467
+ updateResultSet: createAction('[Dashboard] (bus) received named resultSet (not-active-action)', props()),
3468
+ addRelationsToResultSets: createAction('[Dashboard] (bus) add relations to resultSet', props()),
3469
+ removeRelationsFromResultSets: createAction('[Dashboard] (bus) remove relations from resultSet', props()),
3470
+ addItemToResultSets: createAction('[Dashboard] (bus) add item to resultSet', props()),
3471
+ startingMissingViews: createAction('[Dashboard] opening missing views for manifest'),
3472
+ setAvailableNamedQueries: createAction('[Dashboard] (bus) set available rs names', props()),
3473
+ setDefaultDatasource: createAction('[Dashboard] set current rs name', props()),
3474
+ updateDashboardParams: createAction('[Dashboard] set dashboard cell params', props()),
3475
+ toggleEditionMode: createAction('[Dashboard] toggle edition mode', props()),
3476
+ select: createAction('[Dashboard] (bus) select item', props()),
3477
+ selectMany: createAction('[Dashboard] (bus) select items', props()),
3478
+ invertSelection: createAction('[Dashboard] (bus) invert selection'),
3479
+ fetchObjectsDetails: createAction('[Dashboard] fetch objects details', props()),
3480
+ updateObjectsDetails: createAction('[Dashboard] (bus) update objects details', props()),
3481
+ explore: createAction('[Dashboard] (bus) isolate in data set', props()),
3482
+ detail: createAction('[Dashboard] (bus) add detail view', props()),
3483
+ proximity: createAction('[Dashboard] proximity search', props()),
3484
+ multiSnackBar: createAction('[Dashboard] (bus) display snack message', props()),
3485
+ quickOrder: createAction('[Dashboard] (bus) quick order', props()),
3486
+ setGridLayout: createAction('[Dashboard] set grid layout', props()),
3487
+ propagateGridLayout: createAction('[Dashboard] (bus) change grid layout', props()),
3488
+ createTab: createAction('[Dashboard] (bus) create new tab'),
3489
+ restoreInitialManifest: createAction('[Dashboard] (bus) restoring missing tabs'),
3490
+ setFilters: createAction('[Dashboard] (bus) set datasource filters', props()),
3491
+ updateFilters: createAction('[Dashboard] (bus) update datasource filters', props()),
3492
+ removeFilter: createAction('[Dashboard] (bus) remove filter in presentation', props()),
3493
+ removeFilters: createAction('[Dashboard] (bus) remove filters'),
3494
+ updateFilterValue: createAction('[Dashboard] (bus) update filter value', props()),
3495
+ clearAllFilterValues: createAction('[Dashboard] (bus) clear all filter values'),
3496
+ dispatchFilters: createAction('[Dashboard] (bus) apply filters to presentation datasources', props()),
3497
+ resetWmsFeatures: createAction('[Widget map] Reset Wms layer features', props()),
3498
+ getWmsFeatures: createAction('[Widget map] Get Wms layer features', props()),
3499
+ addWmsFeatures: createAction('[Widget map] Set Wms layer features', props()),
3500
+ getWfsFeatures: createAction('[Widget map] Get wfs Features for point', props()),
3501
+ getWfsFeaturesForPointStackTooltips: createAction('[Widget map] Get wfs Features for showing stack tooltips', props()),
3502
+ updateDisplayOptions: createAction('[Dashboard/Display] (bus) Update displayed dashboard management features', props()),
3503
+ getCapability: createAction('[Widget map] Get Wms capability', props()),
3504
+ updateCapability: createAction('[Widget map] Store Wms capability', props()),
3505
+ addManifestMetadata: createAction('[Dashboard] Add manifest metadata', props()),
3506
+ deleteManifestMetadata: createAction('[Dashboard] Delete manifest metadata', props()),
3507
+ triggerAggregate: createAction('[Dashboard] (bus) Triggering aggregates for datasource', props()),
3508
+ loadPresentation: createAction('[Dashboard] load presentation', props())
3509
+ };
3510
+
3511
+ const BASE_DISPLAY_OPTIONS = {
3512
+ presentationTitle: true,
3513
+ search: false,
3514
+ catalog: false,
3515
+ useFilters: false,
3516
+ toolbox: {
3517
+ edit_action: false,
3518
+ save_view: false,
3519
+ save_view_as: false,
3520
+ filter_settings: false,
3521
+ new_tab: false,
3522
+ clear_view: false,
3523
+ default_size: false,
3524
+ refresh_datasets: false,
3525
+ automate_refresh: false,
3526
+ edit_presentation_content: false,
3527
+ share: false,
3528
+ delete: false,
3529
+ dashboard_details: false,
3530
+ edit_presentation: false
3531
+ },
3532
+ edit_toggle: false,
3533
+ widgetContextMenu: {
3534
+ datasourceSelection: true,
3535
+ parameters: true,
3536
+ window: true,
3537
+ maximize: true,
3538
+ addToCatalog: true,
3539
+ delete: true,
3540
+ changeSpot: true
3541
+ }
3542
+ };
3543
+ function getDisplayOptions(mode) {
3544
+ switch (mode) {
3545
+ case ViewMode.CONSULT:
3546
+ return {
3547
+ ...BASE_DISPLAY_OPTIONS,
3548
+ useFilters: true,
3549
+ toolbox: {
3550
+ ...BASE_DISPLAY_OPTIONS.toolbox,
3551
+ save_view_as: true,
3552
+ refresh_datasets: true,
3553
+ edit_presentation_content: true,
3554
+ share: true,
3555
+ delete: true,
3556
+ dashboard_details: true,
3557
+ edit_presentation: true
3558
+ },
3559
+ widgetContextMenu: false
3560
+ };
3561
+ case ViewMode.SEARCH:
3562
+ return {
3563
+ ...BASE_DISPLAY_OPTIONS,
3564
+ presentationTitle: false,
3565
+ search: true,
3566
+ toolbox: { ...BASE_DISPLAY_OPTIONS.toolbox, clear_view: true, default_size: true, refresh_datasets: true },
3567
+ edit_toggle: true
3568
+ };
3569
+ case ViewMode.EDITION:
3570
+ case ViewMode.CREATION:
3571
+ return {
3572
+ ...BASE_DISPLAY_OPTIONS,
3573
+ catalog: true,
3574
+ useFilters: true,
3575
+ toolbox: {
3576
+ edit_action: false,
3577
+ save_view: true,
3578
+ save_view_as: true,
3579
+ filter_settings: true,
3580
+ new_tab: true,
3581
+ clear_view: true,
3582
+ default_size: true,
3583
+ refresh_datasets: true,
3584
+ automate_refresh: true,
3585
+ edit_presentation_content: false,
3586
+ share: true,
3587
+ delete: false,
3588
+ dashboard_details: true,
3589
+ edit_presentation: true
3590
+ },
3591
+ edit_toggle: true,
3592
+ widgetContextMenu: true
3593
+ };
3594
+ default:
3595
+ return BASE_DISPLAY_OPTIONS;
3470
3596
  }
3471
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassEffects, deps: [{ token: i1$2.Actions }, { token: ClassService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3472
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassEffects }); }
3473
3597
  }
3474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassEffects, decorators: [{
3475
- type: Injectable
3476
- }], ctorParameters: () => [{ type: i1$2.Actions }, { type: ClassService }] });
3598
+
3599
+ const NEW_WINDOW_TARGET = -1;
3600
+ const feature$4 = createFeatureSelector('@pry/dashboard');
3601
+ const manifests = createSelector(feature$4, (state) => state?.manifests);
3602
+ const rank = createSelector(manifests, (manifests) => manifests?.tenants.indexOf(manifests.sender));
3603
+ const currentManifestId = createSelector(manifests, (manifests) => manifests.currentId);
3604
+ const globalManifest = createSelector(manifests,
3605
+ // @ts-ignore
3606
+ (manifests) => ({ windows: [], ...manifests?.manifest }) ?? { windows: [] });
3607
+ const staticManifest = createSelector(manifests,
3608
+ // @ts-ignore
3609
+ (manifests) => ({ windows: [], ...manifests?.staticManifest }) ?? { windows: [] });
3610
+ const loading = createSelector(manifests, (manifests) => !!manifests?.loading);
3611
+ const refreshRates = createSelector(globalManifest, (manifests) => manifests.refreshRates ?? {});
3612
+ const windowManifest = createSelector(globalManifest, rank, (manifest, rank) => manifest.windows[rank] ?? { widgets: [] });
3613
+ const gridLayout = createSelector(windowManifest, (manifest) => ((manifest.grid ?? {}).layout ?? DashboardGridLayout.MANUAL));
3614
+ const memoizeWidgetManifest = {};
3615
+ const widgetManifest = (index) => {
3616
+ if (!memoizeWidgetManifest[index]) {
3617
+ memoizeWidgetManifest[index] = createSelector(windowManifest, (windowManifest) => windowManifest.widgets[index] ??
3618
+ {
3619
+ type: 'placeholder',
3620
+ layout: { x: 1, y: 1, width: 1, height: 1 }
3621
+ });
3622
+ }
3623
+ return memoizeWidgetManifest[index];
3624
+ };
3625
+ const manifestsList = createSelector(manifests, (manifests) => manifests.list);
3626
+ const tenants = createSelector(manifests, (manifests) => manifests.tenants ?? []);
3627
+ const targetTenantsIndexes = createSelector(manifests, rank, (manifests, rank) => [
3628
+ NEW_WINDOW_TARGET,
3629
+ ...(manifests.tenants ?? []).map((ten, idx) => idx).filter((idx) => idx !== rank)
3630
+ ]);
3631
+ const results = createSelector(feature$4, (state) => state?.results);
3632
+ const resultSets = createSelector(results, (results) => results.resultSets ?? {});
3633
+ const resultSetsParams = createSelector(results, (results) => results.resultSetsParams ?? {});
3634
+ const namedQueriesNames = createSelector(resultSets, (state) => Object.keys(state) ?? []);
3635
+ const availableNamedQueries = createSelector(results, (results) => {
3636
+ return [...new Set([...results.availableDatasourceNames, ...Object.keys(results.resultSets)])];
3637
+ });
3638
+ const defaultDatasourceNames = createSelector(results, (results) => results.defaultDatasource ?? 'current');
3639
+ const selectedItemIds = createSelector(results, (results) => results.selectedItems ?? []);
3640
+ const objectDetails = createSelector(results, (results) => results.objectDetails ?? {});
3641
+ const quickOrder = createSelector(results, (results) => results.quickOrder ?? {});
3642
+ const allItems = createSelector(results, (results) => Object.keys(results.resultSets)
3643
+ .map((rsKey) => Object.keys(results.resultSets[rsKey].items)
3644
+ .map((classKey) => results.resultSets[rsKey].items[classKey])
3645
+ .reduce((p, c) => [...p, ...c], []))
3646
+ .reduce((p, c) => [...p, ...c], []));
3647
+ const getItemsByIds = (ids) => createSelector(allItems, (items) => items.filter((item) => ids.includes(item.id)));
3648
+ const selectedItems = createSelector(selectedItemIds, allItems, (itemNames, allItems) => itemNames.map((name) => allItems.find((it) => it.id === name)) ?? []);
3649
+ const dashboard = createSelector(feature$4, (state) => state?.dashboard ?? {});
3650
+ const dashboardCellParams = createSelector(dashboard, (dashboard) => dashboard.params ?? {});
3651
+ const dashboardEditionMode = createSelector(dashboard, (dashboard) => dashboard.editionMode ?? false);
3652
+ const namedQueriesUses = createSelector(globalManifest, (manifest) => manifest.windows
3653
+ .map((window, idx) => ({ windowIndex: idx, widgets: window.widgets }))
3654
+ .map(({ windowIndex, widgets }) => (widgets ?? []).map((widget) => (Array.isArray(widget.datasource) ? widget.datasource : [widget.datasource])
3655
+ .filter((rsName) => rsName !== undefined)
3656
+ .map((rsName) => ({
3657
+ rsName,
3658
+ windowIndex,
3659
+ type: widget.type,
3660
+ layout: widget.layout
3661
+ }))))
3662
+ .reduce((p, c) => [...p, ...c], [])
3663
+ .reduce((p, c) => [...p, ...c], [])
3664
+ .reduce((p, c) => ({ ...p, [c.rsName ?? '']: [...(p[c.rsName ?? ''] || []), { ...c }] }), {}));
3665
+ const presentation = createSelector(feature$4, (state) => state?.presentation);
3666
+ const isCurrentPresentationModified = createSelector(presentation, globalManifest, (state, global) => !equal(global, state.initial));
3667
+ const currentManifest = createSelector(feature$4, (state) => state?.presentation.current);
3668
+ const filters = createSelector(feature$4, (state) => state?.manifests.manifest.filters ?? []);
3669
+ const datasourceFilters = createSelector(feature$4, (state) => state?.manifests.manifest.filters
3670
+ ? state?.manifests.manifest.filters.reduce((obj, filter) => (filter.attributes.forEach((attribute) => (obj[attribute.datasource] || (obj[attribute.datasource] = [])).push({
3671
+ attribute: attribute.id,
3672
+ operator: filter.operator ?? '',
3673
+ value: filter.value,
3674
+ type: filter.type
3675
+ })),
3676
+ obj), {})
3677
+ : {});
3678
+ const memoizeFeatures = {};
3679
+ const wmsFeatures = (componentId) => {
3680
+ if (!memoizeFeatures[componentId]) {
3681
+ memoizeFeatures[componentId] = createSelector(feature$4, (state) => state.wmsFeatures[componentId] ?? []);
3682
+ }
3683
+ return memoizeFeatures[componentId];
3684
+ };
3685
+ const displayOptions = createSelector(feature$4, (state) => state?.display ?? BASE_DISPLAY_OPTIONS);
3686
+ const capabilities = createSelector(feature$4, (state) => state?.capabilities);
3687
+ const DashboardSelectors = {
3688
+ feature: feature$4,
3689
+ rank,
3690
+ currentManifestId,
3691
+ globalManifest,
3692
+ refreshRates,
3693
+ windowManifest,
3694
+ widgetManifest,
3695
+ manifestsList,
3696
+ gridLayout,
3697
+ tenants,
3698
+ resultSets,
3699
+ resultSetsParams,
3700
+ namedQueriesNames,
3701
+ namedQueriesUses,
3702
+ availableNamedQueries,
3703
+ defaultDatasourceNames,
3704
+ selectedItemIds,
3705
+ allItems,
3706
+ getItemsByIds,
3707
+ selectedItems,
3708
+ objectDetails,
3709
+ targetTenantsIndexes,
3710
+ dashboard,
3711
+ dashboardCellParams,
3712
+ dashboardEditionMode,
3713
+ staticManifest,
3714
+ loading,
3715
+ quickOrder,
3716
+ presentation,
3717
+ currentManifest,
3718
+ filters,
3719
+ isCurrentPresentationModified,
3720
+ datasourceFilters,
3721
+ wmsFeatures,
3722
+ displayOptions,
3723
+ capabilities
3724
+ };
3725
+
3726
+ class CategoryService {
3727
+ constructor(httpClient, store) {
3728
+ this.httpClient = httpClient;
3729
+ this.store = store;
3730
+ }
3731
+ getCategories() {
3732
+ return this.store
3733
+ .select(ConfigSelectors.refUrl)
3734
+ .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/model/categories`))));
3735
+ }
3736
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3737
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryService, providedIn: 'root' }); }
3738
+ }
3739
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryService, decorators: [{
3740
+ type: Injectable,
3741
+ args: [{
3742
+ providedIn: 'root'
3743
+ }]
3744
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
3745
+
3746
+ class CategoryEffects {
3747
+ constructor(actions$, categoryService, store) {
3748
+ this.actions$ = actions$;
3749
+ this.categoryService = categoryService;
3750
+ this.store = store;
3751
+ this.loadCategories$ = createEffect(() => this.actions$.pipe(ofType(CategoryActions.load), withLatestFrom(this.store.select(CategorySelectors.categories), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, categories, rank]) => (action.force || categories.length === 0) && rank === 0), mergeMap((action) => this.categoryService.getCategories().pipe(map((categories) => CategoryActions.loadSuccess({ categories })), catchError((error) => [CategoryActions.loadFailure({ error: error })])))));
3752
+ }
3753
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryEffects, deps: [{ token: i1$2.Actions }, { token: CategoryService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3754
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryEffects }); }
3755
+ }
3756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CategoryEffects, decorators: [{
3757
+ type: Injectable
3758
+ }], ctorParameters: () => [{ type: i1$2.Actions }, { type: CategoryService }, { type: i1.Store }] });
3759
+
3760
+ class ClassService {
3761
+ constructor(httpClient, store) {
3762
+ this.httpClient = httpClient;
3763
+ this.store = store;
3764
+ }
3765
+ /**
3766
+ * Returns the list of business classes
3767
+ */
3768
+ getClasses() {
3769
+ return this.store
3770
+ .select(ConfigSelectors.refUrl)
3771
+ .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/model/class`))));
3772
+ }
3773
+ getDatasetCounts() {
3774
+ return this.store
3775
+ .select(ConfigSelectors.refUrl)
3776
+ .pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/model/class/datasets/count`))));
3777
+ }
3778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3779
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassService, providedIn: 'root' }); }
3780
+ }
3781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassService, decorators: [{
3782
+ type: Injectable,
3783
+ args: [{
3784
+ providedIn: 'root'
3785
+ }]
3786
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
3787
+
3788
+ class ClassEffects {
3789
+ constructor(actions$, classService, store) {
3790
+ this.actions$ = actions$;
3791
+ this.classService = classService;
3792
+ this.store = store;
3793
+ this.loadClasses$ = createEffect(() => this.actions$.pipe(ofType(ClassActions.load), withLatestFrom(this.store.select(ClassSelectors.classes), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, classes, rank]) => (action.force || classes.length === 0) && rank === 0), mergeMap(() => this.classService.getClasses().pipe(map((classes) => ClassActions.loadSuccess({ classes })), catchError((error) => [ClassActions.loadFailure({ error: error })])))));
3794
+ this.loadDatasetCount$ = createEffect(() => this.actions$.pipe(ofType(ClassActions.loadDatasetCount), mergeMap((action) => this.classService.getDatasetCounts().pipe(map((datasetCounts) => {
3795
+ return ClassActions.loadDatasetCountSuccess({ datasetCounts: datasetCounts });
3796
+ }), catchError((error) => [ClassActions.loadDatasetCountFailure({ error: error })])))));
3797
+ }
3798
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassEffects, deps: [{ token: i1$2.Actions }, { token: ClassService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3799
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassEffects }); }
3800
+ }
3801
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ClassEffects, decorators: [{
3802
+ type: Injectable
3803
+ }], ctorParameters: () => [{ type: i1$2.Actions }, { type: ClassService }, { type: i1.Store }] });
3477
3804
 
3478
3805
  const SYMBOL_DOMAIN = 'symbol';
3479
3806
  const TABLE_ATTR_DOMAIN = 'tableAttr';
@@ -3537,7 +3864,7 @@ class ConfigService {
3537
3864
  * Get a list of all widgets from catalog
3538
3865
  */
3539
3866
  getAllWidgets() {
3540
- return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/widget/catalog`))), catchError$1((error) => {
3867
+ return this.store.select(ConfigSelectors.refUrl).pipe(mergeMap((url) => this.httpClient.get(encodeURI(`${url}/widget/catalog`))), catchError((error) => {
3541
3868
  if (error.error instanceof Error) {
3542
3869
  // A client-side or network error occurred
3543
3870
  if (ConfigService.warn) {
@@ -3566,7 +3893,7 @@ class ConfigService {
3566
3893
  }));
3567
3894
  }
3568
3895
  handleBackendVersion(url) {
3569
- return this.httpClient.get(encodeURI(url)).pipe(catchError$1(() => of({})));
3896
+ return this.httpClient.get(encodeURI(url)).pipe(catchError(() => of({})));
3570
3897
  }
3571
3898
  getAllVersions() {
3572
3899
  return combineLatest([
@@ -3582,7 +3909,7 @@ class ConfigService {
3582
3909
  this.handleBackendVersion(`${replay}/about/version`),
3583
3910
  this.handleBackendVersion(`${exec}/about/version`),
3584
3911
  this.handleBackendVersion(`${transfo}/about/version`),
3585
- this.httpClient.get(encodeURI(`/assets/pry.version`)).pipe(startWith({}), map((version) => (version ? { libVersion: version } : {})), catchError$1(() => of({})))
3912
+ this.httpClient.get(encodeURI(`/assets/pry.version`)).pipe(startWith({}), map((version) => (version ? { libVersion: version } : {})), catchError(() => of({})))
3586
3913
  ];
3587
3914
  return combineLatest(allVersions).pipe(map(([refVersion, dataVersion, replayVersion, execVersion, tranfoVersion, frontend]) => {
3588
3915
  const versions = {};
@@ -3621,7 +3948,7 @@ class OpenMapTilesService {
3621
3948
  this.pRegexp = new RegExp(/<p class="identifier">(.*?)<.p>/gm);
3622
3949
  }
3623
3950
  getStyles() {
3624
- return this.store.select(ConfigSelectors.mapUrl).pipe(filter$1((mapUrl) => !!mapUrl), mergeMap((url) => this.httpClient.get(encodeURI(`${url}`), { responseType: 'text' })), map((html) => {
3951
+ return this.store.select(ConfigSelectors.mapUrl).pipe(filter((mapUrl) => !!mapUrl), mergeMap((url) => this.httpClient.get(encodeURI(`${url}`), { responseType: 'text' })), map((html) => {
3625
3952
  const h3matches = html.match(this.h3Regexp);
3626
3953
  const pMatches = html.match(this.pRegexp);
3627
3954
  return (h3matches
@@ -3652,20 +3979,25 @@ class ConfigEffects {
3652
3979
  this.snackBar = snackBar;
3653
3980
  this.translateService = translateService;
3654
3981
  this.pryDialog = pryDialog;
3655
- this.mapStyles$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.getMapStyles), withLatestFrom(this.store.select(ConfigSelectors.mapStyles)), filter$1(([action, mapStyles]) => !mapStyles || mapStyles.length === 0), mergeMap$1(([action]) => this.openMapTilesService.getStyles().pipe(map$1((styles) => ConfigActions.defineMapStyles({ styles }))))));
3656
- this.saveIconDefinitions$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveIcons), mergeMap$1((action) => this.configService
3982
+ this.mapStyles$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.getMapStyles), withLatestFrom(this.store.select(ConfigSelectors.mapStyles)), filter(([action, mapStyles]) => !mapStyles || mapStyles.length === 0), mergeMap(([action]) => this.openMapTilesService.getStyles().pipe(map((styles) => ConfigActions.defineMapStyles({ styles }))))));
3983
+ this.saveIconDefinitions$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveIcons), mergeMap((action) => this.configService
3657
3984
  .saveDefinitions(action.definitions, SYMBOL_DOMAIN)
3658
- .pipe(map$1(() => ConfigActions.loadCustomization())))));
3659
- this.saveTableAttributes$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveTableDefaultAttributes), mergeMap$1((action) => this.configService
3985
+ .pipe(map(() => ConfigActions.loadCustomization({ force: true }))))));
3986
+ this.saveTableAttributes$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveTableDefaultAttributes), mergeMap((action) => this.configService
3660
3987
  .saveDefinitions(action.definitions, TABLE_ATTR_DOMAIN)
3661
- .pipe(map$1(() => ConfigActions.loadCustomization())))));
3662
- this.saveTileAttributes$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveTileAttributes), mergeMap$1((action) => this.configService
3988
+ .pipe(map(() => ConfigActions.loadCustomization({ force: true }))))));
3989
+ this.saveTileAttributes$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveTileAttributes), mergeMap((action) => this.configService
3663
3990
  .saveDefinitions(action.definitions, TILE_ATTR_DOMAIN)
3664
- .pipe(map$1(() => ConfigActions.loadCustomization())))));
3665
- this.saveTemplates$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveTooltip), mergeMap$1((action) => this.configService
3991
+ .pipe(map(() => ConfigActions.loadCustomization({ force: true }))))));
3992
+ this.saveTemplates$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveTooltip), mergeMap((action) => this.configService
3666
3993
  .saveDefinitions(action.definitions, TOOLTIPS_DOMAIN)
3667
- .pipe(map$1(() => ConfigActions.loadCustomization())))));
3668
- this.getCustomization$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadCustomization), debounceTime(100), mergeMap$1((action) => this.configService.getAllClassParams().pipe(mergeMap$1((allDefinitions) => {
3994
+ .pipe(map(() => ConfigActions.loadCustomization({ force: true }))))));
3995
+ this.getCustomization$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadCustomization), withLatestFrom(this.store.select(ConfigSelectors.iconDefinitions), this.store.select(ConfigSelectors.tableDefaultAttributesDefinitions), this.store.select(ConfigSelectors.tooltipDefinitions), this.store.select(ConfigSelectors.tileAttributesDefinitions), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, iconsDef, tableDef, tooltipDef, tileDef, rank]) => (action.force ||
3996
+ (Object.keys(iconsDef).length === 0 &&
3997
+ Object.keys(tableDef).length === 0 &&
3998
+ Object.keys(tooltipDef).length === 1 &&
3999
+ Object.keys(tileDef).length === 0)) &&
4000
+ rank === 0), mergeMap((action) => this.configService.getAllClassParams().pipe(mergeMap((allDefinitions) => {
3669
4001
  const icons = allDefinitions
3670
4002
  .filter((def) => def.domain === SYMBOL_DOMAIN)
3671
4003
  .reduce((p, c) => ({
@@ -3698,10 +4030,10 @@ class ConfigEffects {
3698
4030
  }), {});
3699
4031
  return [ConfigActions.loadedCustomization({ icons, tableAttributes, tooltips, filters, tileAttributes })];
3700
4032
  })))));
3701
- this.saveWidget$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveWidget), mergeMap$1((action) => this.configService.saveWidget(action.widget).pipe(tap(() => this.snackBar.open({
4033
+ this.saveWidget$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.saveWidget), mergeMap((action) => this.configService.saveWidget(action.widget).pipe(tap(() => this.snackBar.open({
3702
4034
  message: this.translateService.instant('@pry.toolbox.catalog.saved', { viewId: action.widget.name }),
3703
4035
  type: 'success'
3704
- })), map$1(() => ConfigActions.loadWidgets()), catchError$1((error) => {
4036
+ })), map(() => ConfigActions.loadWidgets()), catchError((error) => {
3705
4037
  this.snackBar.open({
3706
4038
  message: this.translateService.instant('@pry.toolbox.catalog.saveErrorCode.' + +(error.error?.code ?? 'UNKNOWN'), {
3707
4039
  name: action.widget.name
@@ -3728,9 +4060,9 @@ class ConfigEffects {
3728
4060
  };
3729
4061
  this.pryDialog.open(PryDialogConfirmComponent, { data });
3730
4062
  })), { dispatch: false });
3731
- this.deleteRestitution$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.deleteRestitution), mergeMap$1((action) => this.configService.deleteRestitution(action.id).pipe(map$1(() => ConfigActions.loadWidgets())))));
3732
- this.loadWidget$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadWidgets), mergeMap$1((action) => this.configService.getAllWidgets().pipe(map$1((widgets) => ConfigActions.loadedWidgets({ widgets }))))));
3733
- this.loadChartOption$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadChartOption), withLatestFrom(this.store.select(ConfigSelectors.chartOption)), map$1(([action, chartOptions]) => {
4063
+ this.deleteRestitution$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.deleteRestitution), mergeMap((action) => this.configService.deleteRestitution(action.id).pipe(map(() => ConfigActions.loadWidgets())))));
4064
+ this.loadWidget$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadWidgets), mergeMap((action) => this.configService.getAllWidgets().pipe(map((widgets) => ConfigActions.loadedWidgets({ widgets }))))));
4065
+ this.loadChartOption$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadChartOption), withLatestFrom(this.store.select(ConfigSelectors.chartOption)), map(([action, chartOptions]) => {
3734
4066
  const chartOption = {
3735
4067
  type: chartOptions.type ?? ChartOptionDefault.type,
3736
4068
  subType: chartOptions.subType ?? ChartOptionDefault.subType,
@@ -3739,10 +4071,10 @@ class ConfigEffects {
3739
4071
  };
3740
4072
  return ConfigActions.loadedChartOption({ chartOption });
3741
4073
  })));
3742
- this.loadVersions$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadVersions), mergeMap$1((action) => this.configService.getAllVersions().pipe(map$1((versionsData) => {
4074
+ this.loadVersions$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadVersions), mergeMap((action) => this.configService.getAllVersions().pipe(map((versionsData) => {
3743
4075
  return ConfigActions.loadVersionsSuccess({ versions: versionsData });
3744
- }), catchError$1((error) => [ConfigActions.loadVersionsFailure({ error: error })])))));
3745
- this.loadAccessGroups$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadAccessGroups), withLatestFrom(this.store.select(ConfigSelectors.accessGroups)), filter$1(([_, groups]) => groups.length === 0), mergeMap$1((_) => this.configService.getAccessGroups().pipe(map$1((groups) => ConfigActions.loadAccessGroupsSuccess({ groups })), catchError$1((error) => {
4076
+ }), catchError((error) => [ConfigActions.loadVersionsFailure({ error: error })])))));
4077
+ this.loadAccessGroups$ = createEffect(() => this.actions$.pipe(ofType(ConfigActions.loadAccessGroups), withLatestFrom(this.store.select(ConfigSelectors.accessGroups)), filter(([_, groups]) => groups.length === 0), mergeMap((_) => this.configService.getAccessGroups().pipe(map((groups) => ConfigActions.loadAccessGroupsSuccess({ groups })), catchError((error) => {
3746
4078
  this.snackBar.open({
3747
4079
  message: error,
3748
4080
  type: 'error'
@@ -3765,359 +4097,42 @@ class ContextMenuEffects {
3765
4097
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContextMenuEffects }); }
3766
4098
  }
3767
4099
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContextMenuEffects, decorators: [{
3768
- type: Injectable
3769
- }], ctorParameters: () => [{ type: i1$2.Actions }] });
3770
-
3771
- const ContextMenuActions = {
3772
- open: createAction('[ContextMenu] open', props()),
3773
- hide: createAction('[ContextMenu] hide')
3774
- };
3775
-
3776
- const contextMenuFeatureKey = '@pry/context-menu';
3777
- const initialContextMenuState = {
3778
- opened: false,
3779
- clientX: 0,
3780
- clientY: 0,
3781
- itemId: '',
3782
- from: '',
3783
- resultSet: undefined,
3784
- coordinates: undefined,
3785
- allowObjectCreation: false
3786
- };
3787
- const contextMenuReducer = createReducer(initialContextMenuState, on(ContextMenuActions.open, (state, action) => ({
3788
- ...state,
3789
- opened: true,
3790
- clientX: action.clientX,
3791
- clientY: action.clientY,
3792
- itemId: action.itemId,
3793
- resultSet: action.resultSet,
3794
- from: action.from,
3795
- coordinates: action.coordinates,
3796
- allowObjectCreation: action.allowObjectCreation
3797
- })), on(ContextMenuActions.hide, (state, action) => ({
3798
- ...state,
3799
- opened: false,
3800
- itemId: '',
3801
- resultSet: undefined,
3802
- from: ''
3803
- })));
3804
-
3805
- var ViewMode;
3806
- (function (ViewMode) {
3807
- ViewMode["CATALOG"] = "catalog";
3808
- ViewMode["CONSULT"] = "consult";
3809
- ViewMode["CREATION"] = "creation";
3810
- ViewMode["EDITION"] = "edition";
3811
- ViewMode["EDITOR"] = "editor";
3812
- ViewMode["SEARCH"] = "search";
3813
- ViewMode["CUSTOM"] = "custom";
3814
- })(ViewMode || (ViewMode = {}));
3815
- const DashboardActions = {
3816
- join: createAction('[Dashboard] joined', props()),
3817
- leave: createAction('[Dashboard] leave', props()),
3818
- updateManifest: createAction('[Dashboard] (bus) updating manifest', props()),
3819
- updateManifestAfterFetch: createAction('[Dashboard] (bus) updating manifest after fetch', props()),
3820
- updateManifestWithoutActivation: createAction('[Dashboard] (bus) updating manifest but do not activate it', props()),
3821
- updateManifestAfterTenantJoin: createAction('[Dashboard] (bus) updating manifest after tenant join', props()),
3822
- updateManifestAfterTenantLeave: createAction('[Dashboard] (bus) updating manifest after tenant leave', props()),
3823
- selectPresentation: createAction('[Dashboard] (bus) selectPresentation', props()),
3824
- setInitialPresentation: createAction('[Dashboard] (bus) set initial presentation', props()),
3825
- declareSenderId: createAction('[Dashboard] self-updating manifest', props()),
3826
- updateDashboardManifest: createAction('[Dashboard] updating dashboard view', props()),
3827
- updateWidgetManifest: createAction('[Dashboard] updating widget view', props()),
3828
- addWidgetToPresentation: createAction('[Dashboard] add widget to presentation', props()),
3829
- updateWidgetInPresentation: createAction('[Dashboard] update widget in presentation', props()),
3830
- requestAllRoutes: createAction('[Dashboard] (bus) requesting route update'),
3831
- requestManifestsToEmit: createAction('[Dashboard] (bus) pre-save manifest, asking all widgets to emit'),
3832
- updateRouteManifest: createAction('[Dashboard] (bus) updating route', props()),
3833
- fetchManifestsList: createAction('[Dashboard] (bus) fetching available manifests'),
3834
- setRefreshRate: createAction('[Dashboard] (bus) setting refreshRate', props()),
3835
- updateManifestsList: createAction('[Dashboard] (bus) received manifests list', props()),
3836
- fetchStaticManifest: createAction('[Dashboard] (bus) fetching staticManifest', props()),
3837
- fetchMoreItems: createAction('[Dashboard] (bus) fetching more items', props()),
3838
- endLoading: createAction('[Dashboard] end loading'),
3839
- updateStaticManifest: createAction('[Dashboard] (bus) received staticManifest', props()),
3840
- loadManifest: createAction('[Dashboard] (bus) load manifest', props()),
3841
- loadAndActivateManifest: createAction('[Dashboard] (bus) load and activate manifest', props()),
3842
- downloadManifest: createAction('[Dashboard] download manifest', props()),
3843
- confirmManifestDeletion: createAction('[Dashboard] confirm manifest deletion', props()),
3844
- deleteManifest: createAction('[Dashboard] deleting manifest', props()),
3845
- saveManifest: createAction('[Dashboard] save manifest', props()),
3846
- solveCollisions: createAction('[Dashboard] solving collisions'),
3847
- clearManifest: createAction('[Dashboard] clear manifest'),
3848
- followManifestRoute: createAction('[Dashboard] (bus) follow manifest route'),
3849
- moveWidget: createAction('[Dashboard] moving widget', props()),
3850
- maximizeWidget: createAction('[Dashboard] maximize widget', props()),
3851
- assertResultSets: createAction('[Dashboard] assert resultSet', props()),
3852
- updateResultSet: createAction('[Dashboard] (bus) received named resultSet (not-active-action)', props()),
3853
- addRelationsToResultSets: createAction('[Dashboard] (bus) add relations to resultSet', props()),
3854
- removeRelationsFromResultSets: createAction('[Dashboard] (bus) remove relations from resultSet', props()),
3855
- addItemToResultSets: createAction('[Dashboard] (bus) add item to resultSet', props()),
3856
- startingMissingViews: createAction('[Dashboard] opening missing views for manifest'),
3857
- setAvailableNamedQueries: createAction('[Dashboard] (bus) set available rs names', props()),
3858
- setDefaultDatasource: createAction('[Dashboard] set current rs name', props()),
3859
- updateDashboardParams: createAction('[Dashboard] set dashboard cell params', props()),
3860
- toggleEditionMode: createAction('[Dashboard] toggle edition mode', props()),
3861
- select: createAction('[Dashboard] (bus) select item', props()),
3862
- selectMany: createAction('[Dashboard] (bus) select items', props()),
3863
- invertSelection: createAction('[Dashboard] (bus) invert selection'),
3864
- fetchObjectsDetails: createAction('[Dashboard] fetch objects details', props()),
3865
- updateObjectsDetails: createAction('[Dashboard] (bus) update objects details', props()),
3866
- explore: createAction('[Dashboard] (bus) isolate in data set', props()),
3867
- detail: createAction('[Dashboard] (bus) add detail view', props()),
3868
- proximity: createAction('[Dashboard] proximity search', props()),
3869
- multiSnackBar: createAction('[Dashboard] (bus) display snack message', props()),
3870
- quickOrder: createAction('[Dashboard] (bus) quick order', props()),
3871
- setGridLayout: createAction('[Dashboard] set grid layout', props()),
3872
- propagateGridLayout: createAction('[Dashboard] (bus) change grid layout', props()),
3873
- createTab: createAction('[Dashboard] (bus) create new tab'),
3874
- restoreInitialManifest: createAction('[Dashboard] (bus) restoring missing tabs'),
3875
- setFilters: createAction('[Dashboard] (bus) set datasource filters', props()),
3876
- updateFilters: createAction('[Dashboard] (bus) update datasource filters', props()),
3877
- removeFilter: createAction('[Dashboard] (bus) remove filter in presentation', props()),
3878
- removeFilters: createAction('[Dashboard] (bus) remove filters'),
3879
- updateFilterValue: createAction('[Dashboard] (bus) update filter value', props()),
3880
- clearAllFilterValues: createAction('[Dashboard] (bus) clear all filter values'),
3881
- dispatchFilters: createAction('[Dashboard] (bus) apply filters to presentation datasources', props()),
3882
- resetWmsFeatures: createAction('[Widget map] Reset Wms layer features', props()),
3883
- getWmsFeatures: createAction('[Widget map] Get Wms layer features', props()),
3884
- addWmsFeatures: createAction('[Widget map] Set Wms layer features', props()),
3885
- getWfsFeatures: createAction('[Widget map] Get wfs Features for point', props()),
3886
- getWfsFeaturesForPointStackTooltips: createAction('[Widget map] Get wfs Features for showing stack tooltips', props()),
3887
- updateDisplayOptions: createAction('[Dashboard/Display] (bus) Update displayed dashboard management features', props()),
3888
- getCapability: createAction('[Widget map] Get Wms capability', props()),
3889
- updateCapability: createAction('[Widget map] Store Wms capability', props()),
3890
- addManifestMetadata: createAction('[Dashboard] Add manifest metadata', props()),
3891
- deleteManifestMetadata: createAction('[Dashboard] Delete manifest metadata', props()),
3892
- triggerAggregate: createAction('[Dashboard] (bus) Triggering aggregates for datasource', props()),
3893
- loadPresentation: createAction('[Dashboard] load presentation', props())
3894
- };
3895
-
3896
- var DashboardGridLayout;
3897
- (function (DashboardGridLayout) {
3898
- DashboardGridLayout["FULL"] = "1";
3899
- DashboardGridLayout["THIRD_VERTICAL"] = "1/3v";
3900
- DashboardGridLayout["THIRD_HORIZONTAL"] = "1/3h";
3901
- DashboardGridLayout["HALF_VERTICAL"] = "1/2v";
3902
- DashboardGridLayout["HALF_HORIZONTAL"] = "1/2h";
3903
- DashboardGridLayout["QUARTER"] = "1/4";
3904
- DashboardGridLayout["MANUAL"] = "0";
3905
- })(DashboardGridLayout || (DashboardGridLayout = {}));
3906
-
3907
- const BASE_DISPLAY_OPTIONS = {
3908
- presentationTitle: true,
3909
- search: false,
3910
- catalog: false,
3911
- useFilters: false,
3912
- toolbox: {
3913
- edit_action: false,
3914
- save_view: false,
3915
- save_view_as: false,
3916
- filter_settings: false,
3917
- new_tab: false,
3918
- clear_view: false,
3919
- default_size: false,
3920
- refresh_datasets: false,
3921
- automate_refresh: false,
3922
- edit_presentation_content: false,
3923
- share: false,
3924
- delete: false,
3925
- dashboard_details: false,
3926
- edit_presentation: false
3927
- },
3928
- edit_toggle: false,
3929
- widgetContextMenu: {
3930
- datasourceSelection: true,
3931
- parameters: true,
3932
- window: true,
3933
- maximize: true,
3934
- addToCatalog: true,
3935
- delete: true,
3936
- changeSpot: true
3937
- }
3938
- };
3939
- function getDisplayOptions(mode) {
3940
- switch (mode) {
3941
- case ViewMode.CONSULT:
3942
- return {
3943
- ...BASE_DISPLAY_OPTIONS,
3944
- useFilters: true,
3945
- toolbox: {
3946
- ...BASE_DISPLAY_OPTIONS.toolbox,
3947
- save_view_as: true,
3948
- refresh_datasets: true,
3949
- edit_presentation_content: true,
3950
- share: true,
3951
- delete: true,
3952
- dashboard_details: true,
3953
- edit_presentation: true
3954
- },
3955
- widgetContextMenu: false
3956
- };
3957
- case ViewMode.SEARCH:
3958
- return {
3959
- ...BASE_DISPLAY_OPTIONS,
3960
- presentationTitle: false,
3961
- search: true,
3962
- toolbox: { ...BASE_DISPLAY_OPTIONS.toolbox, clear_view: true, default_size: true, refresh_datasets: true },
3963
- edit_toggle: true
3964
- };
3965
- case ViewMode.EDITION:
3966
- case ViewMode.CREATION:
3967
- return {
3968
- ...BASE_DISPLAY_OPTIONS,
3969
- catalog: true,
3970
- useFilters: true,
3971
- toolbox: {
3972
- edit_action: false,
3973
- save_view: true,
3974
- save_view_as: true,
3975
- filter_settings: true,
3976
- new_tab: true,
3977
- clear_view: true,
3978
- default_size: true,
3979
- refresh_datasets: true,
3980
- automate_refresh: true,
3981
- edit_presentation_content: false,
3982
- share: true,
3983
- delete: false,
3984
- dashboard_details: true,
3985
- edit_presentation: true
3986
- },
3987
- edit_toggle: true,
3988
- widgetContextMenu: true
3989
- };
3990
- default:
3991
- return BASE_DISPLAY_OPTIONS;
3992
- }
3993
- }
3994
-
3995
- const NEW_WINDOW_TARGET = -1;
3996
- const feature$5 = createFeatureSelector('@pry/dashboard');
3997
- const manifests = createSelector(feature$5, (state) => state?.manifests);
3998
- const rank = createSelector(manifests, (manifests) => manifests?.tenants.indexOf(manifests.sender));
3999
- const currentManifestId = createSelector(manifests, (manifests) => manifests.currentId);
4000
- const globalManifest = createSelector(manifests,
4001
- // @ts-ignore
4002
- (manifests) => ({ windows: [], ...manifests?.manifest }) ?? { windows: [] });
4003
- const staticManifest = createSelector(manifests,
4004
- // @ts-ignore
4005
- (manifests) => ({ windows: [], ...manifests?.staticManifest }) ?? { windows: [] });
4006
- const loading = createSelector(manifests, (manifests) => !!manifests?.loading);
4007
- const refreshRates = createSelector(globalManifest, (manifests) => manifests.refreshRates ?? {});
4008
- const windowManifest = createSelector(globalManifest, rank, (manifest, rank) => manifest.windows[rank] ?? { widgets: [] });
4009
- const gridLayout = createSelector(windowManifest, (manifest) => ((manifest.grid ?? {}).layout ?? DashboardGridLayout.MANUAL));
4010
- const memoizeWidgetManifest = {};
4011
- const widgetManifest = (index) => {
4012
- if (!memoizeWidgetManifest[index]) {
4013
- memoizeWidgetManifest[index] = createSelector(windowManifest, (windowManifest) => windowManifest.widgets[index] ??
4014
- {
4015
- type: 'placeholder',
4016
- layout: { x: 1, y: 1, width: 1, height: 1 }
4017
- });
4018
- }
4019
- return memoizeWidgetManifest[index];
4020
- };
4021
- const manifestsList = createSelector(manifests, (manifests) => manifests.list);
4022
- const tenants = createSelector(manifests, (manifests) => manifests.tenants ?? []);
4023
- const targetTenantsIndexes = createSelector(manifests, rank, (manifests, rank) => [
4024
- NEW_WINDOW_TARGET,
4025
- ...(manifests.tenants ?? []).map((ten, idx) => idx).filter((idx) => idx !== rank)
4026
- ]);
4027
- const results = createSelector(feature$5, (state) => state?.results);
4028
- const resultSets = createSelector(results, (results) => results.resultSets ?? {});
4029
- const resultSetsParams = createSelector(results, (results) => results.resultSetsParams ?? {});
4030
- const namedQueriesNames = createSelector(resultSets, (state) => Object.keys(state) ?? []);
4031
- const availableNamedQueries = createSelector(results, (results) => {
4032
- return [...new Set([...results.availableDatasourceNames, ...Object.keys(results.resultSets)])];
4033
- });
4034
- const defaultDatasourceNames = createSelector(results, (results) => results.defaultDatasource ?? 'current');
4035
- const selectedItemIds = createSelector(results, (results) => results.selectedItems ?? []);
4036
- const objectDetails = createSelector(results, (results) => results.objectDetails ?? {});
4037
- const quickOrder = createSelector(results, (results) => results.quickOrder ?? {});
4038
- const allItems = createSelector(results, (results) => Object.keys(results.resultSets)
4039
- .map((rsKey) => Object.keys(results.resultSets[rsKey].items)
4040
- .map((classKey) => results.resultSets[rsKey].items[classKey])
4041
- .reduce((p, c) => [...p, ...c], []))
4042
- .reduce((p, c) => [...p, ...c], []));
4043
- const getItemsByIds = (ids) => createSelector(allItems, (items) => items.filter((item) => ids.includes(item.id)));
4044
- const selectedItems = createSelector(selectedItemIds, allItems, (itemNames, allItems) => itemNames.map((name) => allItems.find((it) => it.id === name)) ?? []);
4045
- const dashboard = createSelector(feature$5, (state) => state?.dashboard ?? {});
4046
- const dashboardCellParams = createSelector(dashboard, (dashboard) => dashboard.params ?? {});
4047
- const dashboardEditionMode = createSelector(dashboard, (dashboard) => dashboard.editionMode ?? false);
4048
- const namedQueriesUses = createSelector(globalManifest, (manifest) => manifest.windows
4049
- .map((window, idx) => ({ windowIndex: idx, widgets: window.widgets }))
4050
- .map(({ windowIndex, widgets }) => (widgets ?? []).map((widget) => (Array.isArray(widget.datasource) ? widget.datasource : [widget.datasource])
4051
- .filter((rsName) => rsName !== undefined)
4052
- .map((rsName) => ({
4053
- rsName,
4054
- windowIndex,
4055
- type: widget.type,
4056
- layout: widget.layout
4057
- }))))
4058
- .reduce((p, c) => [...p, ...c], [])
4059
- .reduce((p, c) => [...p, ...c], [])
4060
- .reduce((p, c) => ({ ...p, [c.rsName ?? '']: [...(p[c.rsName ?? ''] || []), { ...c }] }), {}));
4061
- const presentation = createSelector(feature$5, (state) => state?.presentation);
4062
- const isCurrentPresentationModified = createSelector(presentation, globalManifest, (state, global) => !equal(global, state.initial));
4063
- const currentManifest = createSelector(feature$5, (state) => state?.presentation.current);
4064
- const filters = createSelector(feature$5, (state) => state?.manifests.manifest.filters ?? []);
4065
- const datasourceFilters = createSelector(feature$5, (state) => state?.manifests.manifest.filters
4066
- ? state?.manifests.manifest.filters.reduce((obj, filter) => (filter.attributes.forEach((attribute) => (obj[attribute.datasource] || (obj[attribute.datasource] = [])).push({
4067
- attribute: attribute.id,
4068
- operator: filter.operator ?? '',
4069
- value: filter.value,
4070
- type: filter.type
4071
- })),
4072
- obj), {})
4073
- : {});
4074
- const memoizeFeatures = {};
4075
- const wmsFeatures = (componentId) => {
4076
- if (!memoizeFeatures[componentId]) {
4077
- memoizeFeatures[componentId] = createSelector(feature$5, (state) => state.wmsFeatures[componentId] ?? []);
4078
- }
4079
- return memoizeFeatures[componentId];
4080
- };
4081
- const displayOptions = createSelector(feature$5, (state) => state?.display ?? BASE_DISPLAY_OPTIONS);
4082
- const capabilities = createSelector(feature$5, (state) => state?.capabilities);
4083
- const DashboardSelectors = {
4084
- feature: feature$5,
4085
- rank,
4086
- currentManifestId,
4087
- globalManifest,
4088
- refreshRates,
4089
- windowManifest,
4090
- widgetManifest,
4091
- manifestsList,
4092
- gridLayout,
4093
- tenants,
4094
- resultSets,
4095
- resultSetsParams,
4096
- namedQueriesNames,
4097
- namedQueriesUses,
4098
- availableNamedQueries,
4099
- defaultDatasourceNames,
4100
- selectedItemIds,
4101
- allItems,
4102
- getItemsByIds,
4103
- selectedItems,
4104
- objectDetails,
4105
- targetTenantsIndexes,
4106
- dashboard,
4107
- dashboardCellParams,
4108
- dashboardEditionMode,
4109
- staticManifest,
4110
- loading,
4111
- quickOrder,
4112
- presentation,
4113
- currentManifest,
4114
- filters,
4115
- isCurrentPresentationModified,
4116
- datasourceFilters,
4117
- wmsFeatures,
4118
- displayOptions,
4119
- capabilities
4100
+ type: Injectable
4101
+ }], ctorParameters: () => [{ type: i1$2.Actions }] });
4102
+
4103
+ const ContextMenuActions = {
4104
+ open: createAction('[ContextMenu] open', props()),
4105
+ hide: createAction('[ContextMenu] hide')
4106
+ };
4107
+
4108
+ const contextMenuFeatureKey = '@pry/context-menu';
4109
+ const initialContextMenuState = {
4110
+ opened: false,
4111
+ clientX: 0,
4112
+ clientY: 0,
4113
+ itemId: '',
4114
+ from: '',
4115
+ resultSet: undefined,
4116
+ coordinates: undefined,
4117
+ allowObjectCreation: false
4120
4118
  };
4119
+ const contextMenuReducer = createReducer(initialContextMenuState, on(ContextMenuActions.open, (state, action) => ({
4120
+ ...state,
4121
+ opened: true,
4122
+ clientX: action.clientX,
4123
+ clientY: action.clientY,
4124
+ itemId: action.itemId,
4125
+ resultSet: action.resultSet,
4126
+ from: action.from,
4127
+ coordinates: action.coordinates,
4128
+ allowObjectCreation: action.allowObjectCreation
4129
+ })), on(ContextMenuActions.hide, (state, action) => ({
4130
+ ...state,
4131
+ opened: false,
4132
+ itemId: '',
4133
+ resultSet: undefined,
4134
+ from: ''
4135
+ })));
4121
4136
 
4122
4137
  const SearchActions = {
4123
4138
  search: createAction('[Search] search', props()),
@@ -4130,208 +4145,6 @@ const SearchActions = {
4130
4145
  setPossibleFilterValues: createAction('[Dashboard] (bus) set possible filter values', props())
4131
4146
  };
4132
4147
 
4133
- const operators = [
4134
- 'EQUALS',
4135
- 'CONTAINS',
4136
- 'I_CONTAINS',
4137
- 'GREATER_THAN',
4138
- 'START_WITH',
4139
- 'END_WITH',
4140
- 'LOWER_THAN',
4141
- 'INSIDE',
4142
- 'OUTSIDE',
4143
- 'IN',
4144
- 'NOT_IN'
4145
- ];
4146
- class FilterParamEncoder extends HttpUrlEncodingCodec {
4147
- constructor() {
4148
- super();
4149
- }
4150
- encodeValue(v) {
4151
- const hasOperator = operators.includes(v.split(',')?.[1]);
4152
- if (hasOperator) {
4153
- return v;
4154
- }
4155
- return encodeURIComponent(v);
4156
- }
4157
- }
4158
-
4159
- class DateUtils {
4160
- static formatDate(date) {
4161
- // prettier-ignore
4162
- return `${date.getFullYear()}-${(date.getMonth() + 1 + "").padStart(2, "0")}-${(date.getDate() + "").padStart(2, "0")}T${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}`;
4163
- }
4164
- static onlyPastDateValidator(control) {
4165
- const today = new Date();
4166
- if (new Date(control.value) <= today) {
4167
- return null;
4168
- }
4169
- else {
4170
- return { dateValidator: { valid: false } };
4171
- }
4172
- }
4173
- /**
4174
- * Converts a string date into an ISO-8601 string format
4175
- *
4176
- * Works with this formats :
4177
- * - "YYYY-MM-DD" : '2024-12-31' --> '2024-12-31T00:00:00.000Z'
4178
- * - "MM/DD/YYYY" : '12/31/2024' --> '2024-12-30T23:00:00.000Z' (format FR donc prise en compte de la locale : UTC+1)
4179
- * - "YYYY" : '2025' --> '2025-01-01T00:00:00.000Z'
4180
- *
4181
- * @param dateAsString the date to convert (example : 2024-12-31)
4182
- * @see Date.parse
4183
- * @see Date.toISOString
4184
- */
4185
- static parseToIsoString(dateAsString) {
4186
- try {
4187
- return new Date(Date.parse(dateAsString)).toISOString();
4188
- }
4189
- catch (error) {
4190
- return '';
4191
- }
4192
- }
4193
- static isInTheFuture(date) {
4194
- return new Date(date) > new Date(DateUtils.formatDate(new Date()));
4195
- }
4196
- }
4197
-
4198
- class SearchService {
4199
- constructor(httpClient, store) {
4200
- this.httpClient = httpClient;
4201
- this.store = store;
4202
- this.transformations = [];
4203
- this.filters = {};
4204
- this.limits = {};
4205
- this.datasources = [];
4206
- store.select(DashboardSelectors.datasourceFilters).subscribe((filters) => {
4207
- this.filters = filters;
4208
- });
4209
- store.select(ConfigSelectors.limits).subscribe((limits) => {
4210
- this.limits = limits;
4211
- });
4212
- store.select(DataSourceSelectors.getDataSources).subscribe((datasources) => {
4213
- this.datasources = datasources;
4214
- });
4215
- }
4216
- getItems(id, quickOrder, excludeGeo, searchAfter, linkedItems = []) {
4217
- const params = this.getItemsFilter(id, this.getOrder(quickOrder));
4218
- if (!id) {
4219
- console.warn('Not sending items request with no datasource attached.');
4220
- return of({ items: {}, relations: [] });
4221
- }
4222
- return this.store.select(ConfigSelectors.dataUrl).pipe(mergeMap((url) => {
4223
- const ds = this.datasources.find((d) => d.id === id);
4224
- return this.httpClient.post(encodeURI(`${url}/data-sources/id/${id}/items`), {
4225
- type: ds?.sourceType === 'namedQuery' ? ds.request.type : NamedQueryTypes.MONO_CLASS,
4226
- excludeGeo: excludeGeo ?? false,
4227
- searchAfter: searchAfter ?? undefined,
4228
- linkedItems
4229
- }, { params });
4230
- }), map((rs) => this.applyTransformations(id, rs)));
4231
- }
4232
- getItemsSerializedParams(id, quickOrder = {}) {
4233
- return '|' + this.getItemsFilter(id, this.getOrder(quickOrder[id])).toString() + '|';
4234
- }
4235
- getItemsFilter(id, cumulative, includeLimit = true) {
4236
- let params = cumulative ?? new HttpParams({ encoder: new FilterParamEncoder() });
4237
- if (this.filters[id]) {
4238
- this.filters[id]
4239
- .filter((filter) => filter.value !== null && filter.value !== undefined)
4240
- .forEach((filter) => {
4241
- let valuesToAddToParams = filter.value;
4242
- // INSIDE and OUTSIDE operators uses 2 values but not sent in an array, values are separated by a coma
4243
- // wich must not be encoded (as if values were in an array)
4244
- const isMultiValued = ['INSIDE', 'OUTSIDE'].find((val) => val === filter.operator) !== undefined;
4245
- if (isMultiValued) {
4246
- valuesToAddToParams = filter.value.split(',');
4247
- }
4248
- // date filter value must be send in ISO-8601 format
4249
- if (filter.type === 'date') {
4250
- valuesToAddToParams = isMultiValued
4251
- ? valuesToAddToParams.map((value) => DateUtils.parseToIsoString(value))
4252
- : DateUtils.parseToIsoString(valuesToAddToParams);
4253
- }
4254
- const value = Array.isArray(valuesToAddToParams)
4255
- ? valuesToAddToParams.map((v) => encodeURIComponent(v.toString().split(',').join('\\,'))).join(',')
4256
- : encodeURIComponent(valuesToAddToParams.toString().replace(/,/g, '\\,'));
4257
- params = params.append('filter', `${filter.attribute},${filter.operator},${value}`);
4258
- });
4259
- }
4260
- if (includeLimit) {
4261
- const limit = this.limits[id];
4262
- if (limit) {
4263
- params = params.append('limit', limit);
4264
- }
4265
- }
4266
- return params;
4267
- }
4268
- getOrder(quickOrder) {
4269
- let params = new HttpParams({ encoder: new FilterParamEncoder() });
4270
- if (quickOrder) {
4271
- params = params.append('order', `${quickOrder.attribute},${quickOrder.asc ?? ''}`);
4272
- }
4273
- else {
4274
- params = params.append('order', 'true,asc');
4275
- }
4276
- return params;
4277
- }
4278
- /**
4279
- * Launch a search request (and saves it as current search)
4280
- * @param condition
4281
- */
4282
- search(condition, id, withLinkedItems = []) {
4283
- return this.store.select(ConfigSelectors.dataUrl).pipe(filter((url) => !!url), take(1), withLatestFrom$1(this.store.select(DashboardSelectors.quickOrder), this.store.select(ConfigSelectors.limits)), mergeMap(([url, quickOrder, limits]) => {
4284
- const params = {};
4285
- if (quickOrder[DEFAULT_NAMED_QUERY_ID]) {
4286
- params['order'] = `${quickOrder[DEFAULT_NAMED_QUERY_ID]?.attribute},${quickOrder[DEFAULT_NAMED_QUERY_ID]?.asc ?? ''}`;
4287
- }
4288
- const otherParams = {};
4289
- if (withLinkedItems.length > 0) {
4290
- if (withLinkedItems.includes('destination')) {
4291
- otherParams['withDestinationItems'] = 'true';
4292
- }
4293
- if (withLinkedItems.includes('source')) {
4294
- otherParams['withSourceItems'] = 'true';
4295
- }
4296
- }
4297
- const _condition = { ...condition, limit: limits[DEFAULT_NAMED_QUERY_ID] ?? limits['default'], ...otherParams };
4298
- return this.httpClient.post(encodeURI(`${url}/items/search`), _condition, { params });
4299
- }), map((rs) => this.applyTransformations(id ?? DEFAULT_NAMED_QUERY_ID, rs)));
4300
- }
4301
- /**
4302
- * Allows to add a transformation function when getting results from backend
4303
- * @param func
4304
- */
4305
- addTransformation(func) {
4306
- this.transformations.push(func);
4307
- }
4308
- /**
4309
- * Apply all transformation functions
4310
- * @param id
4311
- * @param rs
4312
- */
4313
- applyTransformations(id, rs) {
4314
- let transformed = rs;
4315
- this.transformations.forEach((func) => (transformed = func(id, transformed)));
4316
- return transformed;
4317
- }
4318
- autocomplete(attributes, search = '', limit) {
4319
- return this.store.select(ConfigSelectors.dataUrl).pipe(switchMap((url) => this.httpClient.post(encodeURI(`${url}/data-sources/values`), {
4320
- attributes: (attributes ?? []).map((attr) => ({ datasource: attr.datasource, attribute: attr.id })),
4321
- value: search,
4322
- limit
4323
- })));
4324
- }
4325
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SearchService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
4326
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SearchService, providedIn: 'root' }); }
4327
- }
4328
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SearchService, decorators: [{
4329
- type: Injectable,
4330
- args: [{
4331
- providedIn: 'root'
4332
- }]
4333
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
4334
-
4335
4148
  class DataSourceService {
4336
4149
  constructor(store, httpClient, translateService) {
4337
4150
  this.store = store;
@@ -4457,9 +4270,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
4457
4270
  }], ctorParameters: () => [{ type: i1.Store }, { type: i1$1.HttpClient }, { type: PryI18nService }] });
4458
4271
 
4459
4272
  class DataSourceEffects {
4460
- constructor(actions$, searchService, dataSourceService, snackBar, translate, store, pryDialog) {
4273
+ constructor(actions$, dataSourceService, snackBar, translate, store, pryDialog) {
4461
4274
  this.actions$ = actions$;
4462
- this.searchService = searchService;
4463
4275
  this.dataSourceService = dataSourceService;
4464
4276
  this.snackBar = snackBar;
4465
4277
  this.translate = translate;
@@ -4485,16 +4297,16 @@ class DataSourceEffects {
4485
4297
  actions.push(SearchActions.getDatasourceItems({ id: this.idNamedQuery, excludeGeo: false, from: 'postNameQuery$' }));
4486
4298
  }
4487
4299
  this.idNamedQuery = undefined;
4488
- actions.push(DataSourceActions.namedQuery.load());
4300
+ actions.push(DataSourceActions.namedQuery.load({ force: true }));
4489
4301
  return actions;
4490
4302
  }), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4491
- this.getNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.load), debounceTime(100), switchMap(() => this.dataSourceService.get()), map((namedQueryList) => DataSourceActions.namedQuery.loaded({ list: namedQueryList })), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4303
+ this.getNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.load), withLatestFrom(this.store.select(DataSourceSelectors.getAllNamedQuery), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, nq, rank]) => (action.force || nq.length === 0) && rank === 0), switchMap(() => this.dataSourceService.get()), map((namedQueryList) => DataSourceActions.namedQuery.loaded({ list: namedQueryList })), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4492
4304
  this.loaded$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.loaded), map((action) => {
4493
4305
  return DashboardActions.setAvailableNamedQueries({ names: action.list.map((nq) => nq.id) });
4494
4306
  })));
4495
- this.deleteNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.delete), switchMap((props) => this.dataSourceService.delete(props.id).pipe(mergeMap(() => [DataSourceActions.namedQuery.load()]), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])))));
4496
- this.addFavoriteNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.addFavorite), switchMap((props) => this.dataSourceService.addFavorite(props.id)), mergeMap(() => [DataSourceActions.namedQuery.load()]), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4497
- this.deleteFavoriteNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.deleteFavorite), switchMap((props) => this.dataSourceService.deleteFavorite(props.id)), mergeMap(() => [DataSourceActions.namedQuery.load()]), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4307
+ this.deleteNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.delete), switchMap((props) => this.dataSourceService.delete(props.id).pipe(mergeMap(() => [DataSourceActions.namedQuery.load({ force: true })]), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])))));
4308
+ this.addFavoriteNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.addFavorite), switchMap((props) => this.dataSourceService.addFavorite(props.id)), mergeMap(() => [DataSourceActions.namedQuery.load({ force: true })]), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4309
+ this.deleteFavoriteNamedQuery$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.deleteFavorite), switchMap((props) => this.dataSourceService.deleteFavorite(props.id)), mergeMap(() => [DataSourceActions.namedQuery.load({ force: true })]), catchError((error) => [DataSourceActions.namedQuery.failure({ error })])));
4498
4310
  this.tryEdit$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.namedQuery.edit), withLatestFrom(this.store.select(DataSourceSelectors.editInProgress)), map(([action, inProgress]) => {
4499
4311
  if (!inProgress) {
4500
4312
  return DataSourceActions.namedQuery.openEdit(action);
@@ -4531,10 +4343,13 @@ class DataSourceEffects {
4531
4343
  manifest: widgetManifestCopy
4532
4344
  });
4533
4345
  })));
4534
- this.loadedDataset$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.loadDataset), mergeMap((action) => this.dataSourceService
4346
+ this.loadedDataset$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.loadDataset), withLatestFrom(this.store.select(DataSourceSelectors.datasets), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, dss, rank]) => (action.force || dss.length === 0) && rank === 0), mergeMap(() => this.dataSourceService
4535
4347
  .getDatasets()
4536
4348
  .pipe(map((dsd) => DataSourceActions.dataset.loadedDataset({ datasets: dsd }))))));
4537
- this.loadDataset$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.load), debounceTime(100), mergeMap((action) => [DataSourceActions.namedQuery.load(), DataSourceActions.dataset.loadDataset()])));
4349
+ this.loadDataset$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.load), debounceTime(100), mergeMap((action) => [
4350
+ DataSourceActions.namedQuery.load({ force: action.force }),
4351
+ DataSourceActions.dataset.loadDataset({ force: action.force })
4352
+ ])));
4538
4353
  this.listVersions$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.listVersions), switchMap((action) => this.dataSourceService.getDatasetVersions(action).pipe(map((response) => DataSourceActions.dataset.listVersionsSuccess({
4539
4354
  versions: response.body ?? [],
4540
4355
  totalVersionCount: +(response.headers.get('x-total-count') ?? 0)
@@ -4543,14 +4358,14 @@ class DataSourceEffects {
4543
4358
  this.deactivateDatasetVersion$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.deactivateDatasetVersion), switchMap((action) => this.dataSourceService.deactivateDatasetVersion(action.versionId).pipe(map(() => DataSourceActions.dataset.deactivateDatasetVersionSuccess({ datasetId: action.datasetId })), catchError((error) => [DataSourceActions.dataset.deactivateDatasetVersionFailure({ error })])))));
4544
4359
  this.activateDatasetVersion$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.activateDatasetVersion), switchMap((action) => this.dataSourceService.activateDatasetVersion(action.versionId).pipe(map(() => DataSourceActions.dataset.activateDatasetVersionSuccess({ datasetId: action.datasetId })), catchError((error) => [DataSourceActions.dataset.activateDatasetVersionFailure({ error })])))));
4545
4360
  this.activateOrDeactivateDatasetVersionSuccess$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.activateDatasetVersionSuccess, DataSourceActions.dataset.deactivateDatasetVersionSuccess), map((action) => {
4546
- this.store.dispatch(DataSourceActions.dataset.loadDataset());
4361
+ this.store.dispatch(DataSourceActions.dataset.loadDataset({ force: true }));
4547
4362
  return DataSourceActions.dataset.listVersionsByDatasetId({ id: action.datasetId });
4548
4363
  })));
4549
4364
  this.previewsGetById$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.previews.getById), switchMap((action) => this.dataSourceService.getPreviews(action.id).pipe(map((previews) => DataSourceActions.dataset.previews.getByIdSuccess({ previews })), catchError((error) => [DataSourceActions.dataset.previews.getByIdFailure({ error })])))));
4550
4365
  this.updateDatasetVersionInfo = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.updateDatasetVersionInfo), switchMap((action) => this.dataSourceService
4551
4366
  .updateDatasetVersionInfo(action.version)
4552
4367
  .pipe(map((previews) => DataSourceActions.dataset.updateDatasetVersionInfoSuccess({ version: action.version }))))));
4553
- this.confirmDeleteDatasetVersion$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.confirmDeleteVersion), tap$1((action) => {
4368
+ this.confirmDeleteDatasetVersion$ = createEffect(() => this.actions$.pipe(ofType(DataSourceActions.dataset.confirmDeleteVersion), tap((action) => {
4554
4369
  const data = {
4555
4370
  title: '@pry.dataset.version.delete.title',
4556
4371
  message: '@pry.dataset.version.delete.message',
@@ -4574,17 +4389,50 @@ class DataSourceEffects {
4574
4389
  .getCategories()
4575
4390
  .pipe(map((categories) => DataSourceActions.dataset.getCategoriesSuccess({ categories }))))));
4576
4391
  }
4577
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DataSourceEffects, deps: [{ token: i1$2.Actions }, { token: SearchService }, { token: DataSourceService }, { token: PrySnackbarService }, { token: PryI18nService }, { token: i1.Store }, { token: PryDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4392
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DataSourceEffects, deps: [{ token: i1$2.Actions }, { token: DataSourceService }, { token: PrySnackbarService }, { token: PryI18nService }, { token: i1.Store }, { token: PryDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4578
4393
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DataSourceEffects }); }
4579
4394
  }
4580
4395
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DataSourceEffects, decorators: [{
4581
4396
  type: Injectable
4582
- }], ctorParameters: () => [{ type: i1$2.Actions }, { type: SearchService }, { type: DataSourceService }, { type: PrySnackbarService }, { type: PryI18nService }, { type: i1.Store }, { type: PryDialogService }] });
4397
+ }], ctorParameters: () => [{ type: i1$2.Actions }, { type: DataSourceService }, { type: PrySnackbarService }, { type: PryI18nService }, { type: i1.Store }, { type: PryDialogService }] });
4583
4398
 
4584
4399
  const FieldActions = {
4585
- load: createAction('[Field] Load Fields'),
4400
+ load: createAction('[Field] (bus) Load Fields', props()),
4586
4401
  loadSuccess: createAction('[Field Api] (bus) Load Fields Success', props()),
4587
- loadFailure: createAction('[Field Api] Load Fields Failure', props())
4402
+ loadFailure: createAction('[Field Api] (bus) Load Fields Failure', props())
4403
+ };
4404
+
4405
+ const fieldsFeatureKey = '@pry/model/fields';
4406
+ function sortByName(a, b) {
4407
+ return a.name.localeCompare(b.name);
4408
+ }
4409
+ const adapter = createEntityAdapter({
4410
+ sortComparer: sortByName
4411
+ });
4412
+ const initialState = adapter.getInitialState({
4413
+ // additional entity state properties
4414
+ });
4415
+ const internalReducer$1 = createReducer(initialState, on(FieldActions.loadSuccess, (state, action) => adapter.setAll(action.fields, state)));
4416
+ const { selectIds, selectEntities, selectAll, selectTotal } = adapter.getSelectors();
4417
+ function fieldReducer(state, action) {
4418
+ return internalReducer$1(state, action);
4419
+ }
4420
+
4421
+ const feature$3 = createFeatureSelector(fieldsFeatureKey);
4422
+ const entities = createSelector(feature$3, selectEntities);
4423
+ const fields = createSelector(feature$3, selectAll);
4424
+ const memoizeFieldById = {};
4425
+ const fieldById = (id) => {
4426
+ if (!memoizeFieldById[id]) {
4427
+ memoizeFieldById[id] = createSelector(entities, (entities) => entities[id]);
4428
+ }
4429
+ return memoizeFieldById[id];
4430
+ };
4431
+ const FieldSelectors = {
4432
+ feature: feature$3,
4433
+ entities,
4434
+ fields,
4435
+ fieldById
4588
4436
  };
4589
4437
 
4590
4438
  class FieldService {
@@ -4623,40 +4471,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
4623
4471
  }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
4624
4472
 
4625
4473
  class FieldEffects {
4626
- constructor(actions$, fieldService) {
4474
+ constructor(actions$, fieldService, store) {
4627
4475
  this.actions$ = actions$;
4628
4476
  this.fieldService = fieldService;
4629
- this.loadFields$ = createEffect(() => this.actions$.pipe(ofType(FieldActions.load), debounceTime$1(200), mergeMap$1((action) => this.fieldService.getFields().pipe(map$1((fields) => FieldActions.loadSuccess({ fields })), catchError((error) => [FieldActions.loadFailure({ error: error })])))));
4477
+ this.store = store;
4478
+ this.loadFields$ = createEffect(() => this.actions$.pipe(ofType(FieldActions.load), withLatestFrom(this.store.select(FieldSelectors.fields), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, fields, rank]) => (action.force || fields.length === 0) && rank === 0), mergeMap(() => this.fieldService.getFields().pipe(map((fields) => FieldActions.loadSuccess({ fields })), catchError((error) => [FieldActions.loadFailure({ error: error })])))));
4630
4479
  }
4631
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FieldEffects, deps: [{ token: i1$2.Actions }, { token: FieldService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4480
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FieldEffects, deps: [{ token: i1$2.Actions }, { token: FieldService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
4632
4481
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FieldEffects }); }
4633
4482
  }
4634
4483
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FieldEffects, decorators: [{
4635
4484
  type: Injectable
4636
- }], ctorParameters: () => [{ type: i1$2.Actions }, { type: FieldService }] });
4637
-
4638
- const fieldsFeatureKey = '@pry/model/fields';
4639
- function sortByName(a, b) {
4640
- return a.name.localeCompare(b.name);
4641
- }
4642
- const adapter = createEntityAdapter({
4643
- sortComparer: sortByName
4644
- });
4645
- const initialState = adapter.getInitialState({
4646
- // additional entity state properties
4647
- });
4648
- const internalReducer$1 = createReducer(initialState, on(FieldActions.loadSuccess, (state, action) => adapter.setAll(action.fields, state)));
4649
- const { selectIds, selectEntities, selectAll, selectTotal } = adapter.getSelectors();
4650
- function fieldReducer(state, action) {
4651
- return internalReducer$1(state, action);
4652
- }
4485
+ }], ctorParameters: () => [{ type: i1$2.Actions }, { type: FieldService }, { type: i1.Store }] });
4653
4486
 
4654
4487
  class ImageEffects {
4655
4488
  constructor(actions$, imageService) {
4656
4489
  this.actions$ = actions$;
4657
4490
  this.imageService = imageService;
4658
- this.loadImages$ = createEffect(() => this.actions$.pipe(ofType(ImageActions.load), debounceTime$1(50), mergeMap$1(() => this.imageService.getImages().pipe(map$1((images) => ImageActions.loadSuccess({ images })), catchError((error) => [ImageActions.loadFailure({ error })])))));
4659
- this.addImages$ = createEffect(() => this.actions$.pipe(ofType(ImageActions.add), mergeMap$1((action) => this.imageService.upload(action.file, action.mediaType, action.imageType).pipe(mergeMap$1((name) => [ImageActions.load(), ImageActions.added({ name })]), catchError((error) => [ImageActions.loadFailure({ error })])))));
4491
+ this.loadImages$ = createEffect(() => this.actions$.pipe(ofType(ImageActions.load), debounceTime(50), mergeMap(() => this.imageService.getImages().pipe(map((images) => ImageActions.loadSuccess({ images })), catchError((error) => [ImageActions.loadFailure({ error })])))));
4492
+ this.addImages$ = createEffect(() => this.actions$.pipe(ofType(ImageActions.add), mergeMap((action) => this.imageService.upload(action.file, action.mediaType, action.imageType).pipe(mergeMap((name) => [ImageActions.load(), ImageActions.added({ name })]), catchError((error) => [ImageActions.loadFailure({ error })])))));
4660
4493
  }
4661
4494
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ImageEffects, deps: [{ token: i1$2.Actions }, { token: ImageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4662
4495
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ImageEffects }); }
@@ -4665,16 +4498,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
4665
4498
  type: Injectable
4666
4499
  }], ctorParameters: () => [{ type: i1$2.Actions }, { type: ImageService }] });
4667
4500
 
4668
- const feature$4 = createFeatureSelector(contextMenuFeatureKey);
4669
- const opened = createSelector(feature$4, (state) => state?.opened);
4670
- const position = createSelector(feature$4, (state) => ({ clientX: state?.clientX ?? 0, clientY: state?.clientY ?? 0 }));
4671
- const itemId = createSelector(feature$4, (state) => state.itemId);
4672
- const from = createSelector(feature$4, (state) => state.from);
4673
- const coordinates = createSelector(feature$4, (state) => state.coordinates);
4674
- const resultSet = createSelector(feature$4, (state) => state.resultSet);
4675
- const allowObjectCreation = createSelector(feature$4, (state) => state.allowObjectCreation);
4501
+ const feature$2 = createFeatureSelector(contextMenuFeatureKey);
4502
+ const opened = createSelector(feature$2, (state) => state?.opened);
4503
+ const position = createSelector(feature$2, (state) => ({ clientX: state?.clientX ?? 0, clientY: state?.clientY ?? 0 }));
4504
+ const itemId = createSelector(feature$2, (state) => state.itemId);
4505
+ const from = createSelector(feature$2, (state) => state.from);
4506
+ const coordinates = createSelector(feature$2, (state) => state.coordinates);
4507
+ const resultSet = createSelector(feature$2, (state) => state.resultSet);
4508
+ const allowObjectCreation = createSelector(feature$2, (state) => state.allowObjectCreation);
4676
4509
  const ContextMenuSelectors = {
4677
- feature: feature$4,
4510
+ feature: feature$2,
4678
4511
  opened,
4679
4512
  position,
4680
4513
  itemId,
@@ -4876,7 +4709,7 @@ class ItemEffects {
4876
4709
  this.store = store;
4877
4710
  this.snackBar = snackBar;
4878
4711
  this.translateService = translateService;
4879
- this.create$ = createEffect(() => this.actions$.pipe(ofType(ItemActions.create), withLatestFrom(this.store.select(ContextMenuSelectors.resultSet)), mergeMap$1(([action, resultSet]) => this.service.create(action.item, action.datasetVersionId, action.mode).pipe(mergeMap$1((items) => (items ?? (action.item ? [action.item] : []))
4712
+ this.create$ = createEffect(() => this.actions$.pipe(ofType(ItemActions.create), withLatestFrom(this.store.select(ContextMenuSelectors.resultSet)), mergeMap(([action, resultSet]) => this.service.create(action.item, action.datasetVersionId, action.mode).pipe(mergeMap((items) => (items ?? (action.item ? [action.item] : []))
4880
4713
  .map((item) => [
4881
4714
  ItemActions.createSuccess({ id: item.id }),
4882
4715
  DashboardActions.addItemToResultSets({ item, resultSet })
@@ -4902,9 +4735,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
4902
4735
  }], ctorParameters: () => [{ type: i1$2.Actions }, { type: ItemService }, { type: i1.Store }, { type: PrySnackbarService }, { type: PryI18nService }] });
4903
4736
 
4904
4737
  const RelationTypesActions = {
4905
- load: createAction('[Relation Types] Load Relation Types'),
4906
- loadSuccess: createAction('[Relation Types Api] Load Relation Types Success', props()),
4907
- loadFailure: createAction('[Relation Types Api] Load Relation Types Failure', props()),
4738
+ load: createAction('[Relation Types] (bus) Load Relation Types', props()),
4739
+ loadSuccess: createAction('[Relation Types Api] (bus) Load Relation Types Success', props()),
4740
+ loadFailure: createAction('[Relation Types Api] (bus) Load Relation Types Failure', props()),
4908
4741
  saveRelationType: createAction('[Relation Types] Save Relation Types', props()),
4909
4742
  saveRelationTypeSuccess: createAction('[Relation Types Api] Save Relation Types Success'),
4910
4743
  saveRelationTypeFailure: createAction('[Relation Types Api] Save Relation Types Failure', props()),
@@ -4923,118 +4756,376 @@ const RelationTypesActions = {
4923
4756
  closeDeleteModale: createAction('[Relation Types] Close delete modal')
4924
4757
  };
4925
4758
 
4759
+ const relationTypesFeatureKey = '@pry/relation-types';
4760
+ const initialRelationTypeState = {
4761
+ relationsTypes: [],
4762
+ loading: false,
4763
+ openModal: false,
4764
+ openDeleteModale: false
4765
+ };
4766
+ const relationTypeReducer = createReducer(initialRelationTypeState, on(RelationTypesActions.load, (state, action) => ({
4767
+ ...state,
4768
+ loading: true
4769
+ })), on(RelationTypesActions.loadSuccess, (state, action) => ({
4770
+ ...state,
4771
+ relationsTypes: [...action.datas],
4772
+ loading: false
4773
+ })), on(RelationTypesActions.loadFailure, (state, action) => ({
4774
+ ...state,
4775
+ loading: false
4776
+ })), on(RelationTypesActions.selectRelationType, (state, action) => ({
4777
+ ...state,
4778
+ selectedRelationType: state.relationsTypes.find((rt) => rt.id === action.id)
4779
+ })), on(RelationTypesActions.unSelectRelationType, (state, action) => ({
4780
+ ...state,
4781
+ selectedRelationType: undefined
4782
+ })), on(RelationTypesActions.openModal, (state, action) => ({
4783
+ ...state,
4784
+ openModal: true
4785
+ })), on(RelationTypesActions.closeModal, (state, action) => ({
4786
+ ...state,
4787
+ openModal: false
4788
+ })));
4789
+
4790
+ const feature$1 = createFeatureSelector(relationTypesFeatureKey);
4791
+ const relationsTypes = createSelector(feature$1, (state) => {
4792
+ const arrayForSort = state?.relationsTypes ? [...state.relationsTypes] : [];
4793
+ return arrayForSort.sort((a, b) => a.name.localeCompare(b.name));
4794
+ });
4795
+ const selectedRelationType = createSelector(feature$1, (state) => state?.selectedRelationType);
4796
+ const openModal = createSelector(feature$1, (state) => state.openModal);
4797
+ const openDeleteModale = createSelector(feature$1, (state) => state.openDeleteModale);
4798
+ const RelationTypesSelectors = {
4799
+ feature: feature$1,
4800
+ relationsTypes,
4801
+ selectedRelationType,
4802
+ openModal,
4803
+ openDeleteModale
4804
+ };
4805
+
4926
4806
  class RelationTypesService {
4927
4807
  constructor(store, httpClient) {
4928
4808
  this.store = store;
4929
4809
  this.httpClient = httpClient;
4930
4810
  }
4931
- addRelationType(id, name) {
4932
- return this.store
4933
- .select(ConfigSelectors.refUrl)
4934
- .pipe(mergeMap((url) => this.httpClient.post(`${url}/relation-types`, { id: id, name: name })));
4811
+ addRelationType(id, name) {
4812
+ return this.store
4813
+ .select(ConfigSelectors.refUrl)
4814
+ .pipe(mergeMap((url) => this.httpClient.post(`${url}/relation-types`, { id: id, name: name })));
4815
+ }
4816
+ getRelationsTypes() {
4817
+ return this.store
4818
+ .select(ConfigSelectors.refUrl)
4819
+ .pipe(mergeMap((url) => this.httpClient.get(`${url}/relation-types`)));
4820
+ }
4821
+ deleteRelationType(id) {
4822
+ return this.store
4823
+ .select(ConfigSelectors.refUrl)
4824
+ .pipe(mergeMap((url) => this.httpClient.delete(`${url}/relation-types/id/${id}`)));
4825
+ }
4826
+ createRelation(sources, destination, relationType, inversion) {
4827
+ let relations = [];
4828
+ if (inversion) {
4829
+ relations = sources.map((source) => ({ source: destination, destination: source, relationType }));
4830
+ }
4831
+ else {
4832
+ relations = sources.map((source) => ({ destination, source, relationType }));
4833
+ }
4834
+ return this.store.select(ConfigSelectors.dataUrl).pipe(mergeMap((url) => this.httpClient.post(`${url}/relations`, relations)), map(() => relations));
4835
+ }
4836
+ deleteRelation(source, destination, relationType) {
4837
+ const relation = { source, destination, relationType };
4838
+ return this.store.select(ConfigSelectors.dataUrl).pipe(mergeMap((url) => this.httpClient.delete(`${url}/relations`, { body: relation })), map(() => relation));
4839
+ }
4840
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesService, deps: [{ token: i1.Store }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
4841
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesService, providedIn: 'root' }); }
4842
+ }
4843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesService, decorators: [{
4844
+ type: Injectable,
4845
+ args: [{
4846
+ providedIn: 'root'
4847
+ }]
4848
+ }], ctorParameters: () => [{ type: i1.Store }, { type: i1$1.HttpClient }] });
4849
+
4850
+ class RelationTypesEffects {
4851
+ constructor(actions$, service, store, pryDialog) {
4852
+ this.actions$ = actions$;
4853
+ this.service = service;
4854
+ this.store = store;
4855
+ this.pryDialog = pryDialog;
4856
+ this.loadRelationsTypes$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.load), withLatestFrom(this.store.select(RelationTypesSelectors.relationsTypes), this.store.select(DashboardSelectors.rank)), debounceTime(200), filter(([action, relationTypes, rank]) => (action.force || relationTypes.length === 0) && rank === 0), mergeMap((action) => this.service.getRelationsTypes().pipe(map((datas) => RelationTypesActions.loadSuccess({ datas })), catchError((error) => [RelationTypesActions.loadFailure({ error })])))));
4857
+ this.saveRelationType$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.saveRelationType), mergeMap((action) => this.service.addRelationType(action.id, action.name).pipe(map((data) => RelationTypesActions.saveRelationTypeSuccess()), catchError((error) => [RelationTypesActions.saveRelationTypeFailure({ error })])))));
4858
+ this.saveRelationTypeSuccess$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.saveRelationTypeSuccess), map((action) => {
4859
+ return RelationTypesActions.load({ force: true });
4860
+ })));
4861
+ this.deleteRelationType$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.deleteRelationType), mergeMap((action) => {
4862
+ if (!action.relationType.deletable) {
4863
+ const data = {
4864
+ title: '@pry.admin.infoModalTitle',
4865
+ message: '@pry.admin.relationTypes.deleteModalMessage',
4866
+ actions: [{ id: 0, label: '@pry.admin.closeModale' }]
4867
+ };
4868
+ this.pryDialog.open(PryDialogConfirmComponent, { data });
4869
+ return [];
4870
+ }
4871
+ else {
4872
+ return this.service.deleteRelationType(action.relationType.id).pipe(map((data) => RelationTypesActions.deleteRelationTypeSuccess()), catchError((error) => [RelationTypesActions.deleteRelationTypeFailure({ error })]));
4873
+ }
4874
+ })));
4875
+ this.createRelation$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.createRelation), mergeMap((action) => this.service.createRelation(action.from, action.to, action.typeId, action.inversion).pipe(mergeMap((relations) => [
4876
+ RelationTypesActions.createRelationSuccess(),
4877
+ DashboardActions.addRelationsToResultSets({ relations })
4878
+ ]), catchError((error) => [RelationTypesActions.createRelationFailure({ error })])))));
4879
+ this.deleteRelation$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.deleteRelation), mergeMap((action) => this.service.deleteRelation(action.from, action.to, action.typeId).pipe(map((relation) => DashboardActions.removeRelationsFromResultSets({ relation })), catchError((error) => [RelationTypesActions.createRelationFailure({ error })])))));
4880
+ }
4881
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesEffects, deps: [{ token: i1$2.Actions }, { token: RelationTypesService }, { token: i1.Store }, { token: PryDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
4882
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesEffects }); }
4883
+ }
4884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesEffects, decorators: [{
4885
+ type: Injectable
4886
+ }], ctorParameters: () => [{ type: i1$2.Actions }, { type: RelationTypesService }, { type: i1.Store }, { type: PryDialogService }] });
4887
+
4888
+ const searchFeatureKey = '@pry/search';
4889
+ const initialSearchState = {
4890
+ searchLoading: [],
4891
+ payload: undefined,
4892
+ id: undefined,
4893
+ possibleFilterValues: {}
4894
+ };
4895
+ const searchReducer = createReducer(initialSearchState, on(SearchActions.search, (state, action) => ({
4896
+ ...state,
4897
+ searchLoading: [...new Set([...state.searchLoading, action.id ?? DEFAULT_NAMED_QUERY_ID])],
4898
+ payload: action.payload,
4899
+ id: action.id
4900
+ })), on(SearchActions.getDatasourceItems, (state, action) => ({
4901
+ ...state,
4902
+ searchLoading: [...new Set([...state.searchLoading, action.id])]
4903
+ })), on(SearchActions.searchSuccess, (state, action) => ({
4904
+ ...state,
4905
+ searchLoading: [...state.searchLoading.filter((id) => id !== (action.id ?? DEFAULT_NAMED_QUERY_ID))]
4906
+ })), on(SearchActions.searchFailure, (state, action) => ({
4907
+ ...state,
4908
+ searchLoading: [...state.searchLoading.filter((id) => id !== (action.id ?? DEFAULT_NAMED_QUERY_ID))]
4909
+ })), on(SearchActions.setSearchLoading, (state, action) => ({
4910
+ ...state,
4911
+ searchLoading: action.start
4912
+ ? [...new Set([...state.searchLoading, ...action.datasources])]
4913
+ : [...state.searchLoading.filter((id) => !action.datasources.includes(id))]
4914
+ })), on(SearchActions.setPossibleFilterValues, (state, { filterId, values }) => ({
4915
+ ...state,
4916
+ possibleFilterValues: {
4917
+ ...state.possibleFilterValues,
4918
+ [filterId]: values
4919
+ }
4920
+ })));
4921
+
4922
+ const feature = createFeatureSelector(searchFeatureKey);
4923
+ const searchLoading = createSelector(feature, (state) => state.searchLoading);
4924
+ const possibleFilterValues = (filterId) => createSelector(feature, (state) => filterId && state.possibleFilterValues[filterId] ? state.possibleFilterValues[filterId] : []);
4925
+ const filterValues = createSelector(feature, (state) => state.possibleFilterValues);
4926
+ const SearchSelectors = {
4927
+ feature,
4928
+ searchLoading,
4929
+ filterValues,
4930
+ possibleFilterValues
4931
+ };
4932
+
4933
+ const operators = [
4934
+ 'EQUALS',
4935
+ 'CONTAINS',
4936
+ 'I_CONTAINS',
4937
+ 'GREATER_THAN',
4938
+ 'START_WITH',
4939
+ 'END_WITH',
4940
+ 'LOWER_THAN',
4941
+ 'INSIDE',
4942
+ 'OUTSIDE',
4943
+ 'IN',
4944
+ 'NOT_IN'
4945
+ ];
4946
+ class FilterParamEncoder extends HttpUrlEncodingCodec {
4947
+ constructor() {
4948
+ super();
4949
+ }
4950
+ encodeValue(v) {
4951
+ const hasOperator = operators.includes(v.split(',')?.[1]);
4952
+ if (hasOperator) {
4953
+ return v;
4954
+ }
4955
+ return encodeURIComponent(v);
4956
+ }
4957
+ }
4958
+
4959
+ class DateUtils {
4960
+ static formatDate(date) {
4961
+ // prettier-ignore
4962
+ return `${date.getFullYear()}-${(date.getMonth() + 1 + "").padStart(2, "0")}-${(date.getDate() + "").padStart(2, "0")}T${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")}`;
4963
+ }
4964
+ static onlyPastDateValidator(control) {
4965
+ const today = new Date();
4966
+ if (new Date(control.value) <= today) {
4967
+ return null;
4968
+ }
4969
+ else {
4970
+ return { dateValidator: { valid: false } };
4971
+ }
4972
+ }
4973
+ /**
4974
+ * Converts a string date into an ISO-8601 string format
4975
+ *
4976
+ * Works with this formats :
4977
+ * - "YYYY-MM-DD" : '2024-12-31' --> '2024-12-31T00:00:00.000Z'
4978
+ * - "MM/DD/YYYY" : '12/31/2024' --> '2024-12-30T23:00:00.000Z' (format FR donc prise en compte de la locale : UTC+1)
4979
+ * - "YYYY" : '2025' --> '2025-01-01T00:00:00.000Z'
4980
+ *
4981
+ * @param dateAsString the date to convert (example : 2024-12-31)
4982
+ * @see Date.parse
4983
+ * @see Date.toISOString
4984
+ */
4985
+ static parseToIsoString(dateAsString) {
4986
+ try {
4987
+ return new Date(Date.parse(dateAsString)).toISOString();
4988
+ }
4989
+ catch (error) {
4990
+ return '';
4991
+ }
4992
+ }
4993
+ static isInTheFuture(date) {
4994
+ return new Date(date) > new Date(DateUtils.formatDate(new Date()));
4995
+ }
4996
+ }
4997
+
4998
+ class SearchService {
4999
+ constructor(httpClient, store) {
5000
+ this.httpClient = httpClient;
5001
+ this.store = store;
5002
+ this.transformations = [];
5003
+ this.filters = {};
5004
+ this.limits = {};
5005
+ this.datasources = [];
5006
+ store.select(DashboardSelectors.datasourceFilters).subscribe((filters) => {
5007
+ this.filters = filters;
5008
+ });
5009
+ store.select(ConfigSelectors.limits).subscribe((limits) => {
5010
+ this.limits = limits;
5011
+ });
5012
+ store.select(DataSourceSelectors.getDataSources).subscribe((datasources) => {
5013
+ this.datasources = datasources;
5014
+ });
5015
+ }
5016
+ getItems(id, quickOrder, excludeGeo, searchAfter, linkedItems = []) {
5017
+ const params = this.getItemsFilter(id, this.getOrder(quickOrder));
5018
+ if (!id) {
5019
+ console.warn('Not sending items request with no datasource attached.');
5020
+ return of({ items: {}, relations: [] });
5021
+ }
5022
+ return this.store.select(ConfigSelectors.dataUrl).pipe(mergeMap((url) => {
5023
+ const ds = this.datasources.find((d) => d.id === id);
5024
+ return this.httpClient.post(encodeURI(`${url}/data-sources/id/${id}/items`), {
5025
+ type: ds?.sourceType === 'namedQuery' ? ds.request.type : NamedQueryTypes.MONO_CLASS,
5026
+ excludeGeo: excludeGeo ?? false,
5027
+ searchAfter: searchAfter ?? undefined,
5028
+ linkedItems,
5029
+ limit: this.limits[id] || this.limits['default']
5030
+ }, { params });
5031
+ }), map((rs) => this.applyTransformations(id, rs)));
4935
5032
  }
4936
- getRelationsTypes() {
4937
- return this.store
4938
- .select(ConfigSelectors.refUrl)
4939
- .pipe(mergeMap((url) => this.httpClient.get(`${url}/relation-types`)));
5033
+ getItemsSerializedParams(id, quickOrder = {}) {
5034
+ return '|' + this.getItemsFilter(id, this.getOrder(quickOrder[id])).toString() + '|';
4940
5035
  }
4941
- deleteRelationType(id) {
4942
- return this.store
4943
- .select(ConfigSelectors.refUrl)
4944
- .pipe(mergeMap((url) => this.httpClient.delete(`${url}/relation-types/id/${id}`)));
5036
+ getItemsFilter(id, cumulative) {
5037
+ let params = cumulative ?? new HttpParams({ encoder: new FilterParamEncoder() });
5038
+ if (this.filters[id]) {
5039
+ this.filters[id]
5040
+ .filter((filter) => filter.value !== null && filter.value !== undefined)
5041
+ .forEach((filter) => {
5042
+ let valuesToAddToParams = filter.value;
5043
+ // INSIDE and OUTSIDE operators uses 2 values but not sent in an array, values are separated by a coma
5044
+ // wich must not be encoded (as if values were in an array)
5045
+ const isMultiValued = ['INSIDE', 'OUTSIDE'].find((val) => val === filter.operator) !== undefined;
5046
+ if (isMultiValued) {
5047
+ valuesToAddToParams = filter.value.split(',');
5048
+ }
5049
+ // date filter value must be send in ISO-8601 format
5050
+ if (filter.type === 'date') {
5051
+ valuesToAddToParams = isMultiValued
5052
+ ? valuesToAddToParams.map((value) => DateUtils.parseToIsoString(value))
5053
+ : DateUtils.parseToIsoString(valuesToAddToParams);
5054
+ }
5055
+ const value = Array.isArray(valuesToAddToParams)
5056
+ ? valuesToAddToParams.map((v) => encodeURIComponent(v.toString().split(',').join('\\,'))).join(',')
5057
+ : encodeURIComponent(valuesToAddToParams.toString().replace(/,/g, '\\,'));
5058
+ params = params.append('filter', `${filter.attribute},${filter.operator},${value}`);
5059
+ });
5060
+ }
5061
+ return params;
4945
5062
  }
4946
- createRelation(sources, destination, relationType, inversion) {
4947
- let relations = [];
4948
- if (inversion) {
4949
- relations = sources.map((source) => ({ source: destination, destination: source, relationType }));
5063
+ getOrder(quickOrder) {
5064
+ let params = new HttpParams({ encoder: new FilterParamEncoder() });
5065
+ if (quickOrder) {
5066
+ params = params.append('order', `${quickOrder.attribute},${quickOrder.asc ?? ''}`);
4950
5067
  }
4951
5068
  else {
4952
- relations = sources.map((source) => ({ destination, source, relationType }));
5069
+ params = params.append('order', 'true,asc');
4953
5070
  }
4954
- return this.store.select(ConfigSelectors.dataUrl).pipe(mergeMap((url) => this.httpClient.post(`${url}/relations`, relations)), map(() => relations));
5071
+ return params;
4955
5072
  }
4956
- deleteRelation(source, destination, relationType) {
4957
- const relation = { source, destination, relationType };
4958
- return this.store.select(ConfigSelectors.dataUrl).pipe(mergeMap((url) => this.httpClient.delete(`${url}/relations`, { body: relation })), map(() => relation));
5073
+ /**
5074
+ * Launch a search request (and saves it as current search)
5075
+ * @param condition
5076
+ */
5077
+ search(condition, id, withLinkedItems = []) {
5078
+ return this.store.select(ConfigSelectors.dataUrl).pipe(filter((url) => !!url), take(1), withLatestFrom(this.store.select(DashboardSelectors.quickOrder), this.store.select(ConfigSelectors.limits)), mergeMap(([url, quickOrder, limits]) => {
5079
+ const params = {};
5080
+ if (quickOrder[DEFAULT_NAMED_QUERY_ID]) {
5081
+ params['order'] = `${quickOrder[DEFAULT_NAMED_QUERY_ID]?.attribute},${quickOrder[DEFAULT_NAMED_QUERY_ID]?.asc ?? ''}`;
5082
+ }
5083
+ const otherParams = {};
5084
+ if (withLinkedItems.length > 0) {
5085
+ if (withLinkedItems.includes('destination')) {
5086
+ otherParams['withDestinationItems'] = 'true';
5087
+ }
5088
+ if (withLinkedItems.includes('source')) {
5089
+ otherParams['withSourceItems'] = 'true';
5090
+ }
5091
+ }
5092
+ const _condition = { ...condition, limit: limits[DEFAULT_NAMED_QUERY_ID] ?? limits['default'], ...otherParams };
5093
+ return this.httpClient.post(encodeURI(`${url}/items/search`), _condition, { params });
5094
+ }), map((rs) => this.applyTransformations(id ?? DEFAULT_NAMED_QUERY_ID, rs)));
4959
5095
  }
4960
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesService, deps: [{ token: i1.Store }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
4961
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesService, providedIn: 'root' }); }
5096
+ /**
5097
+ * Allows to add a transformation function when getting results from backend
5098
+ * @param func
5099
+ */
5100
+ addTransformation(func) {
5101
+ this.transformations.push(func);
5102
+ }
5103
+ /**
5104
+ * Apply all transformation functions
5105
+ * @param id
5106
+ * @param rs
5107
+ */
5108
+ applyTransformations(id, rs) {
5109
+ let transformed = rs;
5110
+ this.transformations.forEach((func) => (transformed = func(id, transformed)));
5111
+ return transformed;
5112
+ }
5113
+ autocomplete(attributes, search = '', limit) {
5114
+ return this.store.select(ConfigSelectors.dataUrl).pipe(switchMap((url) => this.httpClient.post(encodeURI(`${url}/data-sources/values`), {
5115
+ attributes: (attributes ?? []).map((attr) => ({ datasource: attr.datasource, attribute: attr.id })),
5116
+ value: search,
5117
+ limit
5118
+ })));
5119
+ }
5120
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SearchService, deps: [{ token: i1$1.HttpClient }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
5121
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SearchService, providedIn: 'root' }); }
4962
5122
  }
4963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesService, decorators: [{
5123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SearchService, decorators: [{
4964
5124
  type: Injectable,
4965
5125
  args: [{
4966
5126
  providedIn: 'root'
4967
5127
  }]
4968
- }], ctorParameters: () => [{ type: i1.Store }, { type: i1$1.HttpClient }] });
4969
-
4970
- class RelationTypesEffects {
4971
- constructor(actions$, service, router, pryDialog) {
4972
- this.actions$ = actions$;
4973
- this.service = service;
4974
- this.router = router;
4975
- this.pryDialog = pryDialog;
4976
- this.loadRelationsTypes$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.load), debounceTime(100), mergeMap$1((action) => this.service.getRelationsTypes().pipe(map$1((datas) => RelationTypesActions.loadSuccess({ datas })), catchError((error) => [RelationTypesActions.loadFailure({ error })])))));
4977
- this.saveRelationType$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.saveRelationType), mergeMap$1((action) => this.service.addRelationType(action.id, action.name).pipe(map$1((data) => RelationTypesActions.saveRelationTypeSuccess()), catchError((error) => [RelationTypesActions.saveRelationTypeFailure({ error })])))));
4978
- this.saveRelationTypeSuccess$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.saveRelationTypeSuccess), map$1((action) => {
4979
- return RelationTypesActions.load();
4980
- })));
4981
- this.deleteRelationType$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.deleteRelationType), mergeMap$1((action) => {
4982
- if (!action.relationType.deletable) {
4983
- const data = {
4984
- title: '@pry.admin.infoModalTitle',
4985
- message: '@pry.admin.relationTypes.deleteModalMessage',
4986
- actions: [{ id: 0, label: '@pry.admin.closeModale' }]
4987
- };
4988
- this.pryDialog.open(PryDialogConfirmComponent, { data });
4989
- return [];
4990
- }
4991
- else {
4992
- return this.service.deleteRelationType(action.relationType.id).pipe(map$1((data) => RelationTypesActions.deleteRelationTypeSuccess()), catchError((error) => [RelationTypesActions.deleteRelationTypeFailure({ error })]));
4993
- }
4994
- })));
4995
- this.createRelation$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.createRelation), mergeMap$1((action) => this.service.createRelation(action.from, action.to, action.typeId, action.inversion).pipe(mergeMap$1((relations) => [
4996
- RelationTypesActions.createRelationSuccess(),
4997
- DashboardActions.addRelationsToResultSets({ relations })
4998
- ]), catchError((error) => [RelationTypesActions.createRelationFailure({ error })])))));
4999
- this.deleteRelation$ = createEffect(() => this.actions$.pipe(ofType(RelationTypesActions.deleteRelation), mergeMap$1((action) => this.service.deleteRelation(action.from, action.to, action.typeId).pipe(map$1((relation) => DashboardActions.removeRelationsFromResultSets({ relation })), catchError((error) => [RelationTypesActions.createRelationFailure({ error })])))));
5000
- }
5001
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesEffects, deps: [{ token: i1$2.Actions }, { token: RelationTypesService }, { token: i2.Router }, { token: PryDialogService }], target: i0.ɵɵFactoryTarget.Injectable }); }
5002
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesEffects }); }
5003
- }
5004
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: RelationTypesEffects, decorators: [{
5005
- type: Injectable
5006
- }], ctorParameters: () => [{ type: i1$2.Actions }, { type: RelationTypesService }, { type: i2.Router }, { type: PryDialogService }] });
5007
-
5008
- const relationTypesFeatureKey = '@pry/relation-types';
5009
- const initialRelationTypeState = {
5010
- relationsTypes: [],
5011
- loading: false,
5012
- openModal: false,
5013
- openDeleteModale: false
5014
- };
5015
- const relationTypeReducer = createReducer(initialRelationTypeState, on(RelationTypesActions.load, (state, action) => ({
5016
- ...state,
5017
- loading: true
5018
- })), on(RelationTypesActions.loadSuccess, (state, action) => ({
5019
- ...state,
5020
- relationsTypes: [...action.datas],
5021
- loading: false
5022
- })), on(RelationTypesActions.loadFailure, (state, action) => ({
5023
- ...state,
5024
- loading: false
5025
- })), on(RelationTypesActions.selectRelationType, (state, action) => ({
5026
- ...state,
5027
- selectedRelationType: state.relationsTypes.find((rt) => rt.id === action.id)
5028
- })), on(RelationTypesActions.unSelectRelationType, (state, action) => ({
5029
- ...state,
5030
- selectedRelationType: undefined
5031
- })), on(RelationTypesActions.openModal, (state, action) => ({
5032
- ...state,
5033
- openModal: true
5034
- })), on(RelationTypesActions.closeModal, (state, action) => ({
5035
- ...state,
5036
- openModal: false
5037
- })));
5128
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i1.Store }] });
5038
5129
 
5039
5130
  class BaseWidgetComponent extends SubscriptionnerDirective {
5040
5131
  set widgetIndex(index) {
@@ -5062,13 +5153,13 @@ class BaseWidgetComponent extends SubscriptionnerDirective {
5062
5153
  this._widgetSize$ = new BehaviorSubject({ width: 300, height: 300 });
5063
5154
  this.open$ = new Subject();
5064
5155
  this.manifestModified = new EventEmitter();
5065
- this.manifest$ = this.observableList$.pipe(combineLatestWith(this.staticManifest$), switchMap(([observables, staticManifest]) => (!staticManifest ? merge(...observables) : of(staticManifest))), distinctUntilChanged$1((p, v) => equal(p, v)));
5156
+ this.manifest$ = this.observableList$.pipe(combineLatestWith(this.staticManifest$), switchMap(([observables, staticManifest]) => (!staticManifest ? merge(...observables) : of(staticManifest))), distinctUntilChanged((p, v) => equal(p, v)));
5066
5157
  this.subscriptions.add(this.manifest$.subscribe((manifest) => (this.manifest = manifest)));
5067
5158
  this.displayHeader$ = this.manifest$.pipe(map((manifest) => manifest.header === undefined || manifest.header));
5068
5159
  this.widgetSize$ = this._widgetSize$.pipe(startWith({
5069
5160
  width: 300,
5070
5161
  height: 300
5071
- }), distinctUntilChanged$1((p, c) => p.width === c.width && p.height === c.height), debounceTime(100), distinctUntilChanged$1((p, c) => p.width === c.width && p.height === c.height));
5162
+ }), distinctUntilChanged((p, c) => p.width === c.width && p.height === c.height), debounceTime(100), distinctUntilChanged((p, c) => p.width === c.width && p.height === c.height));
5072
5163
  document.addEventListener('emit-manifest', () => this.emitManifest());
5073
5164
  }
5074
5165
  ngAfterViewChecked() {
@@ -5275,15 +5366,15 @@ class SearchEffects {
5275
5366
  this.searchService = searchService;
5276
5367
  this.store = store;
5277
5368
  this.widgetFactoryService = widgetFactoryService;
5278
- this.searchNamed$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), withLatestFrom$1(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.quickOrder), this.store.select(DashboardSelectors.resultSets)), filter(([_, rank]) => rank === 0), filter(([props, rank]) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), groupBy(([props, rank, quickOrder, rs]) => props.id), mergeMap((group$) => group$.pipe(debounceTime(100), switchMap(([props, rank, quickOrder, rs]) => this.searchService
5369
+ this.searchNamed$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.quickOrder), this.store.select(DashboardSelectors.resultSets)), filter(([_, rank]) => rank === 0), filter(([props, rank]) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), groupBy(([props, rank, quickOrder, rs]) => props.id), mergeMap((group$) => group$.pipe(debounceTime(100), switchMap(([props, rank, quickOrder, rs]) => this.searchService
5279
5370
  .getItems(props.id, quickOrder[props.id], props.excludeGeo, props.next ? rs[props.id].searchAfter : undefined, props.linkedItems)
5280
5371
  .pipe(map((resultSet) => SearchActions.searchSuccess({
5281
5372
  resultSet,
5282
5373
  id: props.id,
5283
5374
  params: this.searchService.getItemsSerializedParams(props.id, quickOrder),
5284
5375
  next: props.next
5285
- })), catchError$1((error) => [SearchActions.searchFailure({ error, id: props.id })])))))));
5286
- this.fetchMore$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchMoreItems), withLatestFrom$1(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.resultSets)), filter(([props, rank, rs]) => rank === 0 && !!rs[props.id].searchAfter), debounceTime(300), mergeMap(([props]) => {
5376
+ })), catchError((error) => [SearchActions.searchFailure({ error, id: props.id })])))))));
5377
+ this.fetchMore$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchMoreItems), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.resultSets)), filter(([props, rank, rs]) => rank === 0 && !!rs[props.id].searchAfter), debounceTime(300), mergeMap(([props]) => {
5287
5378
  const ds = this.widgetFactoryService.datasourcesToAutoLoad({
5288
5379
  type: props.widgetType,
5289
5380
  datasource: [props.id]
@@ -5302,14 +5393,14 @@ class SearchEffects {
5302
5393
  })));
5303
5394
  this.search$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.search), mergeMap((props) => this.searchService.search(props.payload, props.id, props.linkedItems).pipe(map((resultSet) => {
5304
5395
  return SearchActions.searchSuccess({ resultSet, id: props.id });
5305
- }), catchError$1((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
5396
+ }), catchError((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
5306
5397
  this.searchSuccess$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.searchSuccess), map((action) => DashboardActions.updateResultSet({
5307
5398
  id: action.id ?? DEFAULT_NAMED_QUERY_ID,
5308
5399
  resultSet: action.resultSet,
5309
5400
  params: action.params,
5310
5401
  next: action.next
5311
5402
  }))));
5312
- this.getPossibleFilterValues$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getPossibleFilterValues), mergeMap((action) => this.searchService
5403
+ this.getPossibleFilterValues$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getPossibleFilterValues), withLatestFrom(this.store.select(SearchSelectors.filterValues), this.store.select(DashboardSelectors.rank)), filter(([action, filterValues, rank]) => (action.force || !filterValues[action.filterId] || filterValues[action.filterId].length === 0) && rank === 0), mergeMap(([action]) => this.searchService
5313
5404
  .autocomplete(action.attributes, '', action.limit)
5314
5405
  .pipe(map((values) => SearchActions.setPossibleFilterValues({ filterId: action.filterId, values }))))));
5315
5406
  }
@@ -5320,40 +5411,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
5320
5411
  type: Injectable
5321
5412
  }], ctorParameters: () => [{ type: i1$2.Actions }, { type: SearchService }, { type: i1.Store }, { type: WidgetFactoryService }] });
5322
5413
 
5323
- const searchFeatureKey = '@pry/search';
5324
- const initialSearchState = {
5325
- searchLoading: [],
5326
- payload: undefined,
5327
- id: undefined,
5328
- possibleFilterValues: {}
5329
- };
5330
- const searchReducer = createReducer(initialSearchState, on(SearchActions.search, (state, action) => ({
5331
- ...state,
5332
- searchLoading: [...new Set([...state.searchLoading, action.id ?? DEFAULT_NAMED_QUERY_ID])],
5333
- payload: action.payload,
5334
- id: action.id
5335
- })), on(SearchActions.getDatasourceItems, (state, action) => ({
5336
- ...state,
5337
- searchLoading: [...new Set([...state.searchLoading, action.id])]
5338
- })), on(SearchActions.searchSuccess, (state, action) => ({
5339
- ...state,
5340
- searchLoading: [...state.searchLoading.filter((id) => id !== (action.id ?? DEFAULT_NAMED_QUERY_ID))]
5341
- })), on(SearchActions.searchFailure, (state, action) => ({
5342
- ...state,
5343
- searchLoading: [...state.searchLoading.filter((id) => id !== (action.id ?? DEFAULT_NAMED_QUERY_ID))]
5344
- })), on(SearchActions.setSearchLoading, (state, action) => ({
5345
- ...state,
5346
- searchLoading: action.start
5347
- ? [...new Set([...state.searchLoading, ...action.datasources])]
5348
- : [...state.searchLoading.filter((id) => !action.datasources.includes(id))]
5349
- })), on(SearchActions.setPossibleFilterValues, (state, { filterId, values }) => ({
5350
- ...state,
5351
- possibleFilterValues: {
5352
- ...state.possibleFilterValues,
5353
- [filterId]: values
5354
- }
5355
- })));
5356
-
5357
5414
  class AccordionComponent {
5358
5415
  constructor() { }
5359
5416
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -5526,23 +5583,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
5526
5583
  type: Input
5527
5584
  }] } });
5528
5585
 
5529
- const feature$3 = createFeatureSelector(fieldsFeatureKey);
5530
- const entities$1 = createSelector(feature$3, selectEntities);
5531
- const fields = createSelector(feature$3, selectAll);
5532
- const memoizeFieldById = {};
5533
- const fieldById = (id) => {
5534
- if (!memoizeFieldById[id]) {
5535
- memoizeFieldById[id] = createSelector(entities$1, (entities) => entities[id]);
5536
- }
5537
- return memoizeFieldById[id];
5538
- };
5539
- const FieldSelectors = {
5540
- feature: feature$3,
5541
- entities: entities$1,
5542
- fields,
5543
- fieldById
5544
- };
5545
-
5546
5586
  class TranslateIdPipe {
5547
5587
  constructor(store, translateService, symbolService) {
5548
5588
  this.store = store;
@@ -5796,15 +5836,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
5796
5836
  }]
5797
5837
  }], ctorParameters: () => [{ type: PryI18nService }] });
5798
5838
 
5799
- const feature$2 = createFeatureSelector(searchFeatureKey);
5800
- const searchLoading = createSelector(feature$2, (state) => state.searchLoading);
5801
- const possibleFilterValues = (filterId) => createSelector(feature$2, (state) => filterId && state.possibleFilterValues[filterId] ? state.possibleFilterValues[filterId] : []);
5802
- const SearchSelectors = {
5803
- feature: feature$2,
5804
- searchLoading,
5805
- possibleFilterValues
5806
- };
5807
-
5808
5839
  const latLonToGeographicFieldTransformation = (latAttrName, lonAttrName, locAttrName, datasetIds = []) => (id, result) => {
5809
5840
  if (datasetIds.length > 0 && !datasetIds.includes(id)) {
5810
5841
  return result;
@@ -5839,15 +5870,6 @@ const latLonToGeographicFieldTransformation = (latAttrName, lonAttrName, locAttr
5839
5870
  return targetResultSet;
5840
5871
  };
5841
5872
 
5842
- const feature$1 = createFeatureSelector(categoriesFeatureKey);
5843
- const entities = createSelector(feature$1, selectEntities$1);
5844
- const categories = createSelector(feature$1, selectAll$1);
5845
- const CategorySelectors = {
5846
- feature: feature$1,
5847
- entities,
5848
- categories
5849
- };
5850
-
5851
5873
  var PryVisibilityType;
5852
5874
  (function (PryVisibilityType) {
5853
5875
  PryVisibilityType["PRIVATE"] = "PRIVATE";
@@ -5855,22 +5877,6 @@ var PryVisibilityType;
5855
5877
  PryVisibilityType["RESTRICTED"] = "RESTRICTED";
5856
5878
  })(PryVisibilityType || (PryVisibilityType = {}));
5857
5879
 
5858
- const feature = createFeatureSelector(relationTypesFeatureKey);
5859
- const relationsTypes = createSelector(feature, (state) => {
5860
- const arrayForSort = state?.relationsTypes ? [...state.relationsTypes] : [];
5861
- return arrayForSort.sort((a, b) => a.name.localeCompare(b.name));
5862
- });
5863
- const selectedRelationType = createSelector(feature, (state) => state?.selectedRelationType);
5864
- const openModal = createSelector(feature, (state) => state.openModal);
5865
- const openDeleteModale = createSelector(feature, (state) => state.openDeleteModale);
5866
- const RelationTypesSelectors = {
5867
- feature,
5868
- relationsTypes,
5869
- selectedRelationType,
5870
- openModal,
5871
- openDeleteModale
5872
- };
5873
-
5874
5880
  class PryAggregationService {
5875
5881
  aggregate(datasource, options) {
5876
5882
  throw new Error('You must declare the use of an aggregation service. Add PryBackendAggregationService, PryFrontendAggregationService or a custom service');
@@ -5985,7 +5991,7 @@ class PryBackendAggregationService extends PryAggregationService {
5985
5991
  if (options.abscissa && options.abscissa.limit) {
5986
5992
  params = params.set('limit', `${options.abscissa.limit}`);
5987
5993
  }
5988
- params = this.searchService.getItemsFilter(targetDatasource, params, false);
5994
+ params = this.searchService.getItemsFilter(targetDatasource, params);
5989
5995
  const key = `${this.dataUrl}_${targetDatasource}_${params.toString()}`;
5990
5996
  if (!this.cache[key] || this.cache[key].time + 1000 < new Date().getTime()) {
5991
5997
  this.cache[key] = {
@@ -5993,7 +5999,7 @@ class PryBackendAggregationService extends PryAggregationService {
5993
5999
  .get(`${this.dataUrl}/data-sources/id/${targetDatasource}/items/aggregate`, {
5994
6000
  params
5995
6001
  })
5996
- .pipe(debounceTime$1(100), map((result) => ({
6002
+ .pipe(debounceTime(100), map((result) => ({
5997
6003
  ...result,
5998
6004
  operation: options.ordinate.operation === Operation.NONE ? Operation.NONE : result.operation
5999
6005
  })), share()),
@@ -8363,7 +8369,7 @@ class PryAccessRightsShareModalComponent {
8363
8369
  this.data = data;
8364
8370
  this.accessRightsByGroup = {};
8365
8371
  this.disableShareButton$ = new BehaviorSubject(false);
8366
- this.store.dispatch(DataSourceActions.dataset.loadDataset());
8372
+ this.store.dispatch(DataSourceActions.dataset.loadDataset({}));
8367
8373
  this.store.dispatch(ConfigActions.loadAccessGroups());
8368
8374
  this.manifest = this.data.manifest;
8369
8375
  this.accessRightsByGroup = { ...this.manifest.accessRightsByGroup };
@@ -8919,9 +8925,9 @@ class WidgetInstanciatorComponent extends SubscriptionnerDirective {
8919
8925
  }
8920
8926
  ngAfterViewInit() {
8921
8927
  // Dynamically create associated component
8922
- this.widgetManifest$ = combineLatest([this.staticManifest$, this._widgetIndex$]).pipe(distinctUntilChanged$1(), switchMap(([staticManifest, index]) => !!staticManifest ? of(staticManifest) : this.store.select(DashboardSelectors.widgetManifest(index))), distinctUntilChanged$1((p, c) => equal(p, c)));
8928
+ this.widgetManifest$ = combineLatest([this.staticManifest$, this._widgetIndex$]).pipe(distinctUntilChanged(), switchMap(([staticManifest, index]) => !!staticManifest ? of(staticManifest) : this.store.select(DashboardSelectors.widgetManifest(index))), distinctUntilChanged((p, c) => equal(p, c)));
8923
8929
  this.subscriptions.add(this.widgetManifest$
8924
- .pipe(map((widgetManifest) => ({ type: widgetManifest.type, layout: widgetManifest.layout })), distinctUntilChanged$1((p, c) => equal(p, c)), withLatestFrom(this.widgetManifest$), map(([triggering, widgetManifest]) => widgetManifest))
8930
+ .pipe(map((widgetManifest) => ({ type: widgetManifest.type, layout: widgetManifest.layout })), distinctUntilChanged((p, c) => equal(p, c)), withLatestFrom(this.widgetManifest$), map(([triggering, widgetManifest]) => widgetManifest))
8925
8931
  .subscribe((widgetManifest) => {
8926
8932
  this.componentRef.clear();
8927
8933
  this.instanceSubscription?.unsubscribe();
@@ -9346,12 +9352,12 @@ class DashboardComponent extends SubscriptionnerDirective {
9346
9352
  set forceModeEdition(mode) {
9347
9353
  this.forceModeEdition$.next(mode);
9348
9354
  }
9349
- constructor(store, overlay, viewContainerRef, widgetFactoryService) {
9355
+ constructor(store, overlay, viewContainerRef, el) {
9350
9356
  super();
9351
9357
  this.store = store;
9352
9358
  this.overlay = overlay;
9353
9359
  this.viewContainerRef = viewContainerRef;
9354
- this.widgetFactoryService = widgetFactoryService;
9360
+ this.el = el;
9355
9361
  this.manifest = null;
9356
9362
  this.modeEdition = false;
9357
9363
  this.staticDashboard$ = new BehaviorSubject(null);
@@ -9359,6 +9365,8 @@ class DashboardComponent extends SubscriptionnerDirective {
9359
9365
  this.indexForRemoval = -1;
9360
9366
  this.params = {};
9361
9367
  this.forceModeEdition$ = new BehaviorSubject(undefined);
9368
+ this.width = signal(10);
9369
+ this.height = signal(10);
9362
9370
  this.CloseOnDragOut = true;
9363
9371
  this.noBackground = false;
9364
9372
  this.canCalculateView = false;
@@ -9388,11 +9396,11 @@ class DashboardComponent extends SubscriptionnerDirective {
9388
9396
  this.DashboardGridLayout = DashboardGridLayout;
9389
9397
  this.layout = DashboardGridLayout.MANUAL;
9390
9398
  this.loading$ = this.store.select(DashboardSelectors.loading);
9391
- this.dataFetching$ = this.store.select(SearchSelectors.searchLoading).pipe(delay$1(10));
9399
+ this.dataFetching$ = this.store.select(SearchSelectors.searchLoading).pipe(delay(10));
9392
9400
  this.modeEdition$ = combineLatest([
9393
9401
  this.store.select(DashboardSelectors.dashboardEditionMode),
9394
9402
  this.forceModeEdition$
9395
- ]).pipe(map$1(([storeMode, forceMode]) => (forceMode === undefined ? storeMode : forceMode)));
9403
+ ]).pipe(map(([storeMode, forceMode]) => (forceMode === undefined ? storeMode : forceMode)));
9396
9404
  this.subscriptions.add(this.modeEdition$.subscribe((mode) => {
9397
9405
  this.modeEdition = mode;
9398
9406
  if (!mode) {
@@ -9401,7 +9409,7 @@ class DashboardComponent extends SubscriptionnerDirective {
9401
9409
  }));
9402
9410
  this.targetIndexes$ = this.store.select(DashboardSelectors.targetTenantsIndexes);
9403
9411
  this.subscriptions.add(this.store.select(DashboardSelectors.dashboardCellParams).subscribe((params) => (this.dashboardParams = params)));
9404
- this.windowManifest$ = this.store.select(DashboardSelectors.windowManifest).pipe(combineLatestWith(this.staticDashboard$), switchMap(([windowManifest, staticDashboard]) => (!staticDashboard ? of(windowManifest) : of(staticDashboard))), map$1((_wManifest) => {
9412
+ this.windowManifest$ = this.store.select(DashboardSelectors.windowManifest).pipe(combineLatestWith(this.staticDashboard$), switchMap(([windowManifest, staticDashboard]) => (!staticDashboard ? of(windowManifest) : of(staticDashboard))), map((_wManifest) => {
9405
9413
  const wManifest = structuredClone(_wManifest);
9406
9414
  if (wManifest.grid?.layout && wManifest.grid.layout !== DashboardGridLayout.MANUAL) {
9407
9415
  // Complete with placeholders
@@ -9424,7 +9432,7 @@ class DashboardComponent extends SubscriptionnerDirective {
9424
9432
  }
9425
9433
  return wManifest;
9426
9434
  }), distinctUntilChanged((p, c) => equal(p, c)));
9427
- this.nonFillerWidgets$ = this.windowManifest$.pipe(map$1((wManifest) => (wManifest.widgets ?? []).filter((w) => w.type !== 'filler').length));
9435
+ this.nonFillerWidgets$ = this.windowManifest$.pipe(map((wManifest) => (wManifest.widgets ?? []).filter((w) => w.type !== 'filler').length));
9428
9436
  this.subscriptions.add(this.staticDashboard$.subscribe((manifest) => {
9429
9437
  if (!!manifest) {
9430
9438
  this.store.dispatch(DashboardActions.assertResultSets({
@@ -9437,13 +9445,13 @@ class DashboardComponent extends SubscriptionnerDirective {
9437
9445
  this.store.dispatch(DashboardActions.assertResultSets({}));
9438
9446
  }
9439
9447
  }));
9440
- this.store.dispatch(FieldActions.load());
9441
- this.store.dispatch(ClassActions.load());
9442
- this.store.dispatch(CategoryActions.load());
9448
+ this.store.dispatch(FieldActions.load({}));
9449
+ this.store.dispatch(ClassActions.load({}));
9450
+ this.store.dispatch(CategoryActions.load({}));
9443
9451
  this.store.dispatch(ConfigActions.getMapStyles());
9444
- this.store.dispatch(DataSourceActions.load());
9445
- this.store.dispatch(RelationTypesActions.load());
9446
- this.store.dispatch(ConfigActions.loadCustomization());
9452
+ this.store.dispatch(DataSourceActions.load({}));
9453
+ this.store.dispatch(RelationTypesActions.load({}));
9454
+ this.store.dispatch(ConfigActions.loadCustomization({}));
9447
9455
  this.subscriptions.add(fromEvent(window, 'resize')
9448
9456
  .pipe(auditTime(100))
9449
9457
  .subscribe(() => {
@@ -9455,7 +9463,7 @@ class DashboardComponent extends SubscriptionnerDirective {
9455
9463
  this.calculateView();
9456
9464
  }));
9457
9465
  this.subscriptions.add(fromEvent(window, 'keydown')
9458
- .pipe(map$1(($event) => $event), filter$1(($event) => $event.key === 'L' && $event.ctrlKey && $event.shiftKey))
9466
+ .pipe(map(($event) => $event), filter(($event) => $event.key === 'L' && $event.ctrlKey && $event.shiftKey))
9459
9467
  .subscribe(() => this.store.dispatch(DashboardActions.toggleEditionMode({}))));
9460
9468
  this.subscriptions.add(fromEvent(window, 'mouseup').subscribe(() => {
9461
9469
  this.clearActions();
@@ -9469,23 +9477,29 @@ class DashboardComponent extends SubscriptionnerDirective {
9469
9477
  this.subscriptions.add(this.store.select(DashboardSelectors.gridLayout).subscribe((layout) => {
9470
9478
  this.layout = layout;
9471
9479
  }));
9472
- this.gridTemplateRows$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map$1(([manifest, stacked]) => this.generateRows(stacked && this.manifest
9480
+ this.gridTemplateRows$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map(([manifest, stacked]) => this.generateRows(stacked && this.manifest
9473
9481
  ? this.manifest?.widgets.map((wm) => wm.layout.height).reduce((wm1, wm2) => wm1 + wm2, 0)
9474
9482
  : manifest.grid?.rows ?? DEFAULT_ROWS_NUMBER)));
9475
- this.gridTemplateColumns$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map$1(([manifest, stacked]) => this.generateColumns(stacked ? 1 : manifest.grid?.columns || DEFAULT_COLUMNS_NUMBER)));
9476
- this.backgroundArea$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map$1(([manifest, stacked]) => !stacked
9483
+ this.gridTemplateColumns$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map(([manifest, stacked]) => this.generateColumns(stacked ? 1 : manifest.grid?.columns || DEFAULT_COLUMNS_NUMBER)));
9484
+ this.backgroundArea$ = combineLatest([this.windowManifest$, this.stacked$]).pipe(map(([manifest, stacked]) => !stacked
9477
9485
  ? `1/1/${(manifest.grid?.rows ?? DEFAULT_ROWS_NUMBER) + 1}/${(manifest.grid?.columns ?? DEFAULT_COLUMNS_NUMBER) + 1}`
9478
9486
  : `1/1/${(manifest.grid?.columns ?? DEFAULT_COLUMNS_NUMBER) + 1}/1`));
9479
9487
  this.separators$ = this.store
9480
9488
  .select(DashboardSelectors.gridLayout)
9481
- .pipe(map$1((layout) => layout === DashboardGridLayout.MANUAL ? [] : WidgetPlacementUtils.getLayout(layout)?.places ?? []));
9489
+ .pipe(map((layout) => layout === DashboardGridLayout.MANUAL ? [] : WidgetPlacementUtils.getLayout(layout)?.places ?? []));
9482
9490
  }
9483
9491
  ngOnInit() {
9484
9492
  if (this.displayOptions)
9485
9493
  this.store.dispatch(DashboardActions.updateDisplayOptions({ mode: ViewMode.CUSTOM, customDisplay: this.displayOptions }));
9494
+ this.updateSelfSize();
9486
9495
  }
9487
9496
  ngAfterViewInit() {
9488
9497
  this.canCalculateView = true;
9498
+ this.updateSelfSize();
9499
+ }
9500
+ updateSelfSize() {
9501
+ this.width.set(this.el.nativeElement.clientWidth);
9502
+ this.height.set(this.el.nativeElement.clientHeight);
9489
9503
  }
9490
9504
  /***
9491
9505
  * Manage display
@@ -9876,13 +9890,13 @@ class DashboardComponent extends SubscriptionnerDirective {
9876
9890
  }
9877
9891
  }));
9878
9892
  }
9879
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: WidgetFactoryService }], target: i0.ɵɵFactoryTarget.Component }); }
9880
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", forceModeEdition: "forceModeEdition", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "instanciators", predicate: WidgetInstanciatorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n @for (\n widgetManifest of (windowManifest$ | async)?.widgets || []; track trackWidgets(widgetIndex,\n widgetManifest); let widgetIndex = $index) {\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n @if (modeEdition) {\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if ({\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n }; as data) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div\n class=\"no-widget\"\n [style.grid-area]=\"backgroundArea$ | async\"\n >\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"params.gridWidth\"\n [style.height.px]=\"params.gridHeight\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i8.PryPageLoaderComponent, selector: "pry-page-loader", inputs: ["image", "imageAltText"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: ContextMenuComponent, selector: "pry-context-menu" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
9893
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, deps: [{ token: i1.Store }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
9894
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: DashboardComponent, selector: "pry-dashboard", inputs: { staticDashboard: "staticDashboard", forceModeEdition: "forceModeEdition", CloseOnDragOut: "CloseOnDragOut", displayOptions: "displayOptions", noBackground: "noBackground", breakpoint: "breakpoint" }, outputs: { rowHeight: "rowHeight", rows: "rows" }, viewQueries: [{ propertyName: "templateModal", first: true, predicate: ["templateModal"], descendants: true, read: TemplateRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "instanciators", predicate: WidgetInstanciatorComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\n ) {\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n @if (modeEdition) {\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i8.PryPageLoaderComponent, selector: "pry-page-loader", inputs: ["image", "imageAltText"] }, { kind: "component", type: WidgetInstanciatorComponent, selector: "pry-widget-instanciator", inputs: ["widgetIndex", "staticManifest", "standalone", "open$"], outputs: ["manifestModified"] }, { kind: "component", type: ContextMenuComponent, selector: "pry-context-menu" }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: I18nPipe, name: "i18n" }] }); }
9881
9895
  }
9882
9896
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardComponent, decorators: [{
9883
9897
  type: Component,
9884
- args: [{ selector: 'pry-dashboard', template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n @for (\n widgetManifest of (windowManifest$ | async)?.widgets || []; track trackWidgets(widgetIndex,\n widgetManifest); let widgetIndex = $index) {\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n @if (modeEdition) {\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if ({\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n }; as data) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div\n class=\"no-widget\"\n [style.grid-area]=\"backgroundArea$ | async\"\n >\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"params.gridWidth\"\n [style.height.px]=\"params.gridHeight\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
9885
- }], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: WidgetFactoryService }], propDecorators: { templateModal: [{
9898
+ args: [{ selector: 'pry-dashboard', template: "<div class=\"o-dashboard-edit\" [class.-edit]=\"modeEdition$ | async\">\n <div class=\"o-dashboard-add -rows\">\n <button (click)=\"changeSize('rows', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('rows', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <p>{{ '@pry.grid.rows' | i18n }}</p>\n </div>\n <div class=\"o-dashboard-add -cols\">\n <p>{{ '@pry.grid.columns' | i18n }}</p>\n <button (click)=\"changeSize('columns', -1)\">\n <pry-icon iconSvg=\"remove\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n <button (click)=\"changeSize('columns', +1)\">\n <pry-icon iconSvg=\"add\" [width]=\"12\" [height]=\"12\"></pry-icon>\n </button>\n </div>\n <div\n class=\"o-dashboard-grid\"\n [style.gridTemplateColumns]=\"gridTemplateColumns$ | async\"\n [style.gridTemplateRows]=\"gridTemplateRows$ | async\"\n [style.gridGap]=\"dashboardParams.gridGap + 'px'\"\n #grid\n (mousemove)=\"movingMouse($event)\"\n (drop)=\"dropping($event)\"\n (dragover)=\"dragMove($event)\"\n (dragleave)=\"dragLeave($event)\"\n (dragenter)=\"dragEnter($event)\"\n >\n @for (\n widgetManifest of (windowManifest$ | async)?.widgets || [];\n track trackWidgets(widgetIndex, widgetManifest);\n let widgetIndex = $index\n ) {\n <div\n class=\"o-dashboard-widget\"\n [class.-edited]=\"modeEdition\"\n [style.gridColumn]=\"gridColumn(widgetManifest.layout)\"\n [style.gridRow]=\"gridRow(widgetManifest.layout)\"\n (drop)=\"droppingInWidget($event, widgetIndex)\"\n >\n @if (modeEdition) {\n <div class=\"resize nw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-nw')\">\n <pry-icon iconSvg=\"north_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize sw-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-sw')\">\n <pry-icon iconSvg=\"south_west\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize ne-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-ne')\">\n <pry-icon iconSvg=\"north_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize se-resize\" (mousedown)=\"startResize($event, widgetIndex, 'resize-se')\">\n <pry-icon iconSvg=\"south_east\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"resize delete\" (mousedown)=\"toggleRemoveConfirm($event, widgetIndex)\">\n <pry-icon iconSvg=\"close\" [animation]=\"false\"></pry-icon>\n </div>\n <div class=\"move\" draggable=\"true\" (dragstart)=\"dragStart($event, widgetIndex)\">\n <div class=\"move-inside move-{{ widgetManifest.type }}\">\n <span>{{ widgetManifest.title ?? ('@pry.toolbox.' + widgetManifest.type | i18n) }}</span>\n </div>\n </div>\n }\n @if (!modeEdition) {\n <pry-widget-instanciator\n [staticManifest]=\"widgetManifest\"\n [widgetIndex]=\"widgetIndex\"\n ></pry-widget-instanciator>\n }\n </div>\n }\n\n @if (!noBackground) {\n @if (\n {\n noWidgets: (nonFillerWidgets$ | async) === 0,\n globalLoading: loading$ | async,\n fetchLoading: (dataFetching$ | async)?.length ?? 1 > 0\n };\n as data\n ) {\n @if (data.noWidgets) {\n @if (data.globalLoading) {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <pry-page-loader></pry-page-loader>\n <span class=\"no-widget__text\">{{ '@pry.widget.target.loading' | i18n }}...</span>\n </div>\n } @else {\n <div class=\"no-widget\" [style.grid-area]=\"backgroundArea$ | async\">\n <img\n class=\"no-widget__search\"\n src=\"../../../assets/svgs/pry_recherche.svg\"\n alt=\"{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}\"\n />\n <span class=\"no-widget__text\">{{\n (layout === DashboardGridLayout.MANUAL\n ? '@pry.widget.target.none_manual'\n : '@pry.widget.target.none_auto'\n ) | i18n\n }}</span>\n </div>\n }\n }\n <div\n class=\"a-page-loader backdrop\"\n [style.display]=\"data.fetchLoading && !data.globalLoading ? 'flex' : 'none'\"\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n >\n <pry-page-loader></pry-page-loader>\n <p>{{ '@pry.widget.target.loading' | i18n }}...</p>\n </div>\n }\n }\n </div>\n</div>\n<pry-context-menu></pry-context-menu>\n\n<ng-template #templateModal>\n <div class=\"o-modal\">\n <div class=\"o-modal__top\">\n <div class=\"o-modal__top__title\">\n <h2 class=\"a-h2\" id=\"dialog_title\">\n {{ '@pry.widget.modalTitle' | i18n }}\n </h2>\n </div>\n <div class=\"o-modal__top__close\">\n <button class=\"a-btn a-btn--icon-only\" (click)=\"cancelRemoveConfirm()\">\n <pry-icon iconSvg=\"close\" [height]=\"35\" [width]=\"35\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.toolbox.close' | i18n }}</span>\n </button>\n </div>\n </div>\n <div class=\"m-btn-group\">\n <button type=\"button\" (click)=\"cancelRemoveConfirm()\" class=\"a-btn a-btn--secondary\">\n {{ '@pry.toolbox.manifest.close' | i18n }}\n </button>\n <button type=\"submit\" (click)=\"confirmRemove()\" class=\"a-btn a-btn--primary\">\n {{ '@pry.toolbox.manifest.validate' | i18n }}\n </button>\n </div>\n </div>\n</ng-template>\n" }]
9899
+ }], ctorParameters: () => [{ type: i1.Store }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }], propDecorators: { templateModal: [{
9886
9900
  type: ViewChild,
9887
9901
  args: ['templateModal', { read: TemplateRef }]
9888
9902
  }], instanciators: [{
@@ -10605,7 +10619,7 @@ class ActionBusEffects {
10605
10619
  this.busService = busService;
10606
10620
  this.forwardOnBus$ = createEffect(() => this.actions$.pipe(
10607
10621
  // For actions with type containing "(bus)", automatically transfer it on the data-bus to propagate to other windows
10608
- filter$1((action) => action.type.includes('(bus)')), tap((action) => this.busService.postData(action))), { dispatch: false });
10622
+ filter((action) => action.type.includes('(bus)')), tap((action) => this.busService.postData(action))), { dispatch: false });
10609
10623
  }
10610
10624
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ActionBusEffects, deps: [{ token: i1$2.Actions }, { token: i1.Store }, { token: BusService }], target: i0.ɵɵFactoryTarget.Injectable }); }
10611
10625
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ActionBusEffects }); }
@@ -10768,7 +10782,7 @@ class DataWidgetComponent extends BaseWidgetComponent {
10768
10782
  relations: [],
10769
10783
  merged: resultSetArray.length
10770
10784
  });
10771
- }), distinctUntilChanged$1((p, v) => equal(p, v)));
10785
+ }), distinctUntilChanged((p, v) => equal(p, v)));
10772
10786
  }
10773
10787
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DataWidgetComponent, deps: [{ token: i1.Store }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
10774
10788
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: DataWidgetComponent, selector: "pry-data-widget", inputs: { openData$: "openData$", staticResultSet: "staticResultSet" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
@@ -10841,7 +10855,7 @@ class PryDatasourceListComponent extends SubscriptionnerDirective {
10841
10855
  this.consultedDataset = new EventEmitter();
10842
10856
  this.datasourceSelected = new EventEmitter();
10843
10857
  this.searchOrCategoryChanged = new EventEmitter();
10844
- this.store.dispatch(DataSourceActions.load());
10858
+ this.store.dispatch(DataSourceActions.load({}));
10845
10859
  this.datasources$ = combineLatest([
10846
10860
  this.store.select(DataSourceSelectors.getDataSourcesSorted),
10847
10861
  this.selectedDatasources$
@@ -10854,7 +10868,7 @@ class PryDatasourceListComponent extends SubscriptionnerDirective {
10854
10868
  this.subscriptions.add(this.selectedCategories$.subscribe((_) => {
10855
10869
  this.searchOrCategoryChanged.next();
10856
10870
  }));
10857
- this.subscriptions.add(this.search$.pipe(debounceTime$1(100)).subscribe((_) => {
10871
+ this.subscriptions.add(this.search$.pipe(debounceTime(100)).subscribe((_) => {
10858
10872
  this.searchOrCategoryChanged.next();
10859
10873
  }));
10860
10874
  }
@@ -10941,7 +10955,7 @@ class DatasourceSelectorComponent extends SubscriptionnerDirective {
10941
10955
  this.itemsChanged.emit(selectedIds);
10942
10956
  this.detectChanges();
10943
10957
  }));
10944
- this.subscriptions.add(this.searchOrCategoryChanged$.pipe(delay$1(50)).subscribe(() => {
10958
+ this.subscriptions.add(this.searchOrCategoryChanged$.pipe(delay(50)).subscribe(() => {
10945
10959
  this.detectChanges();
10946
10960
  }));
10947
10961
  }
@@ -11073,7 +11087,7 @@ class PryWidgetHeaderComponent extends SubscriptionnerDirective {
11073
11087
  this.type = LibraryTypes.ILLUSTRATION;
11074
11088
  this.windowManifest$ = this.store
11075
11089
  .select(DashboardSelectors.windowManifest)
11076
- .pipe(distinctUntilChanged$1((p, c) => equal(p, c)));
11090
+ .pipe(distinctUntilChanged((p, c) => equal(p, c)));
11077
11091
  this.targetIndexes$ = this.store.select(DashboardSelectors.targetTenantsIndexes);
11078
11092
  this.subscriptions.add(this.windowManifest$.subscribe((manifest) => {
11079
11093
  this.windowManifest = manifest;
@@ -11913,12 +11927,12 @@ class ManifestService {
11913
11927
  if (!!actual) {
11914
11928
  return this.httpClient
11915
11929
  .put(encodeURI(`${url}/users/me/dashboards/id/${id}/default`), {})
11916
- .pipe(map$1(() => true));
11930
+ .pipe(map(() => true));
11917
11931
  }
11918
11932
  else {
11919
11933
  return this.httpClient
11920
11934
  .delete(encodeURI(`${url}/users/me/dashboards/default`), {})
11921
- .pipe(map$1(() => false));
11935
+ .pipe(map(() => false));
11922
11936
  }
11923
11937
  }));
11924
11938
  }
@@ -11986,7 +12000,7 @@ class RefreshService {
11986
12000
  start() {
11987
12001
  if (!this.subscription) {
11988
12002
  this.subscription = interval(1000)
11989
- .pipe(withLatestFrom(this.store.select(DashboardSelectors.refreshRates), this.store.select(DashboardSelectors.globalManifest)), map$1(([interval, refreshRates, globalManifest]) => {
12003
+ .pipe(withLatestFrom(this.store.select(DashboardSelectors.refreshRates), this.store.select(DashboardSelectors.globalManifest)), map(([interval, refreshRates, globalManifest]) => {
11990
12004
  const datasources = this.widgetFactoryService.getObjectsToAutoLoad(globalManifest).datasources;
11991
12005
  return Object.keys(refreshRates)
11992
12006
  .filter((key) => datasources.map((ds) => ds.datasetId).includes(key))
@@ -12116,7 +12130,7 @@ class DashboardEffects {
12116
12130
  this.wmsService = wmsService;
12117
12131
  this.widgetFactoryService = widgetFactoryService;
12118
12132
  this.i18nService = i18nService;
12119
- this.join$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.join), delay(1000), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.selectedItemIds), this.store.select(DashboardSelectors.presentation), this.store.select(DashboardSelectors.displayOptions)), filter$1(([action, rank, tenants, manifest, resultSets, display]) => rank === 0), debounceTime$1(200), map$1(([action, rank, tenants, manifest, resultSets, selectedIds, presentation, display]) => DashboardActions.updateManifestAfterTenantJoin({
12133
+ this.join$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.join), delay(1000), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.selectedItemIds), this.store.select(DashboardSelectors.presentation), this.store.select(DashboardSelectors.displayOptions)), filter(([action, rank, tenants, manifest, resultSets, display]) => rank === 0), debounceTime(200), map(([action, rank, tenants, manifest, resultSets, selectedIds, presentation, display]) => DashboardActions.updateManifestAfterTenantJoin({
12120
12134
  tenants, // we already have added tenant in the reduce of the "join" action
12121
12135
  manifest: {
12122
12136
  ...manifest,
@@ -12128,7 +12142,7 @@ class DashboardEffects {
12128
12142
  presentation,
12129
12143
  display
12130
12144
  }))));
12131
- this.leave$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.leave), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.selectedItemIds)), filter$1(([action, rank, tenants, manifest]) => rank === 0 || (tenants[0] === action.sender && rank === 1)), map$1(([action, rank, tenants, manifest, selectedIds]) => {
12145
+ this.leave$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.leave), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.selectedItemIds)), filter(([action, rank, tenants, manifest]) => rank === 0 || (tenants[0] === action.sender && rank === 1)), map(([action, rank, tenants, manifest, selectedIds]) => {
12132
12146
  const leaverRank = tenants.indexOf(action.sender);
12133
12147
  const newTenantsList = [...tenants];
12134
12148
  const newWindowList = [...manifest.windows];
@@ -12145,10 +12159,10 @@ class DashboardEffects {
12145
12159
  selectedIds
12146
12160
  });
12147
12161
  })));
12148
- this.fetchStaticManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchStaticManifest), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.selectedItemIds)), filter$1(([action, rank]) => rank === 0), mergeMap$1(([action, rank]) => this.manifestService
12162
+ this.fetchStaticManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchStaticManifest), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.selectedItemIds)), filter(([action, rank]) => rank === 0), mergeMap(([action, rank]) => this.manifestService
12149
12163
  .get(action.id)
12150
- .pipe(map$1((staticManifest) => DashboardActions.updateStaticManifest({ staticManifest }))))));
12151
- this.loadAndActivateManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.loadAndActivateManifest, DashboardActions.loadManifest), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.selectedItemIds)), filter$1(([action, rank]) => rank === 0), mergeMap$1(([action, rank, selectedIds]) => this.manifestService.get(action.id).pipe(mergeMap$1((manifest) => {
12164
+ .pipe(map((staticManifest) => DashboardActions.updateStaticManifest({ staticManifest }))))));
12165
+ this.loadAndActivateManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.loadAndActivateManifest, DashboardActions.loadManifest), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.selectedItemIds)), filter(([action, rank]) => rank === 0), mergeMap(([action, rank, selectedIds]) => this.manifestService.get(action.id).pipe(mergeMap((manifest) => {
12152
12166
  return action.type === DashboardActions.loadAndActivateManifest.type
12153
12167
  ? [
12154
12168
  DashboardActions.updateManifestAfterFetch({ manifest, manifestId: action.id, selectedIds }),
@@ -12156,7 +12170,7 @@ class DashboardEffects {
12156
12170
  ]
12157
12171
  : [DashboardActions.updateManifestWithoutActivation({ manifest, manifestId: action.id, selectedIds })];
12158
12172
  })))));
12159
- this.clearManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.clearManifest), withLatestFrom(this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.selectedItemIds)), map$1(([action, manifest, selectedIds]) => DashboardActions.updateManifestAfterFetch({ manifest, manifestId: '', selectedIds }))));
12173
+ this.clearManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.clearManifest), withLatestFrom(this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.selectedItemIds)), map(([action, manifest, selectedIds]) => DashboardActions.updateManifestAfterFetch({ manifest, manifestId: '', selectedIds }))));
12160
12174
  this.downloadManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.downloadManifest), tap((action) => this.manifestService.get(action.id).subscribe((manifest) => {
12161
12175
  const dataStr = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(manifest));
12162
12176
  const dlAnchorElem = document.createElement('a');
@@ -12169,11 +12183,11 @@ class DashboardEffects {
12169
12183
  this.router.navigateByUrl(manifest.route);
12170
12184
  }
12171
12185
  })), { dispatch: false });
12172
- this.endLoadingAfterFollowingManifestRoute$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.followManifestRoute), map$1((action) => DashboardActions.endLoading())));
12173
- this.requestManifestRoute$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.requestAllRoutes), map$1(() => DashboardActions.updateRouteManifest({ route: this.router.url }))));
12186
+ this.endLoadingAfterFollowingManifestRoute$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.followManifestRoute), map((action) => DashboardActions.endLoading())));
12187
+ this.requestManifestRoute$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.requestAllRoutes), map(() => DashboardActions.updateRouteManifest({ route: this.router.url }))));
12174
12188
  this.requestManifestsToEmit$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.requestManifestsToEmit), tap(() => document.dispatchEvent(new CustomEvent('emit-manifest')))), { dispatch: false });
12175
- this.dispatchFilter$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.dispatchFilters), map$1(() => DashboardActions.requestManifestsToEmit())));
12176
- this.assertResultSets$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.assertResultSets, DashboardActions.dispatchFilters, DashboardActions.clearAllFilterValues), withLatestFrom(this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.resultSetsParams), this.store.select(DashboardSelectors.quickOrder)), mergeMap$1(([action, manifest, resultSets, resultSetsParams, quickOrder]) => {
12189
+ this.dispatchFilter$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.dispatchFilters), map(() => DashboardActions.requestManifestsToEmit())));
12190
+ this.assertResultSets$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.assertResultSets, DashboardActions.dispatchFilters, DashboardActions.clearAllFilterValues), withLatestFrom(this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.resultSets), this.store.select(DashboardSelectors.resultSetsParams), this.store.select(DashboardSelectors.quickOrder)), mergeMap(([action, manifest, resultSets, resultSetsParams, quickOrder]) => {
12177
12191
  const manifestToCheck = (action.type === DashboardActions.assertResultSets.type ||
12178
12192
  action.type === DashboardActions.dispatchFilters.type) &&
12179
12193
  action.staticManifest
@@ -12212,8 +12226,8 @@ class DashboardEffects {
12212
12226
  }));
12213
12227
  return [...toItemsActions, ...toAggregateActions];
12214
12228
  })));
12215
- this.sendAggregatesEvent$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.triggerAggregate), filter$1((action) => action.id !== DEFAULT_NAMED_QUERY_ID && action.id !== EXPLORE_NAMED_QUERY_ID), tap((action) => window.dispatchEvent(new CustomEvent('datasourceRefresh', { detail: action.id })))), { dispatch: false });
12216
- this.startMissingViewAfterViewUpdate$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateManifest, DashboardActions.updateManifestAfterFetch, DashboardActions.updateManifestAfterTenantLeave, DashboardActions.updateManifestAfterTenantJoin, DashboardActions.explore, DashboardActions.detail, DashboardActions.restoreInitialManifest, DashboardActions.createTab, DashboardActions.moveWidget), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0), mergeMap$1((action) => [
12229
+ this.sendAggregatesEvent$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.triggerAggregate), filter((action) => action.id !== DEFAULT_NAMED_QUERY_ID && action.id !== EXPLORE_NAMED_QUERY_ID), tap((action) => window.dispatchEvent(new CustomEvent('datasourceRefresh', { detail: action.id })))), { dispatch: false });
12230
+ this.startMissingViewAfterViewUpdate$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateManifest, DashboardActions.updateManifestAfterFetch, DashboardActions.updateManifestAfterTenantLeave, DashboardActions.updateManifestAfterTenantJoin, DashboardActions.explore, DashboardActions.detail, DashboardActions.restoreInitialManifest, DashboardActions.createTab, DashboardActions.moveWidget), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter(([action, rank]) => rank === 0), mergeMap((action) => [
12217
12231
  DashboardActions.startingMissingViews(),
12218
12232
  DashboardActions.assertResultSets({}),
12219
12233
  DashboardActions.solveCollisions()
@@ -12221,7 +12235,7 @@ class DashboardEffects {
12221
12235
  this.updateTitle$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateManifest, DashboardActions.updateManifestAfterTenantJoin, DashboardActions.updateManifestAfterTenantLeave, DashboardActions.updateManifestAfterFetch, DashboardActions.declareSenderId), withLatestFrom(this.store.select(DashboardSelectors.rank)), tap(([action, rank]) => {
12222
12236
  this.titleService.changeTitle();
12223
12237
  })), { dispatch: false });
12224
- this.openOther$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.startingMissingViews), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest)), debounceTime$1(1000), filter$1(([action, rank, tenants, manifest]) => rank === 0), tap(([action, rank, tenants, manifest]) => {
12238
+ this.openOther$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.startingMissingViews), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.tenants), this.store.select(DashboardSelectors.globalManifest)), debounceTime(1000), filter(([action, rank, tenants, manifest]) => rank === 0), tap(([action, rank, tenants, manifest]) => {
12225
12239
  manifest.windows.forEach((windowManifest, index) => {
12226
12240
  if (!tenants[index]) {
12227
12241
  // If no window is opened for this part, then open one
@@ -12229,7 +12243,7 @@ class DashboardEffects {
12229
12243
  }
12230
12244
  });
12231
12245
  })), { dispatch: false });
12232
- this.saveManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.saveManifest), withLatestFrom(this.store.select(DashboardSelectors.globalManifest)), withLatestFrom(this.store.select(DataSourceSelectors.datasets)), mergeMap$1(([[action, currentManifest], datasets]) => this.manifestService
12246
+ this.saveManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.saveManifest), withLatestFrom(this.store.select(DashboardSelectors.globalManifest)), withLatestFrom(this.store.select(DataSourceSelectors.datasets)), mergeMap(([[action, currentManifest], datasets]) => this.manifestService
12233
12247
  .save(action.name, action.manifest ?? currentManifest, action.id, action.description, action.image, action.metadata, action.accessRightsByGroup, action.additionalInformation)
12234
12248
  .pipe(tap((response) => {
12235
12249
  this.snackBar.open({
@@ -12255,7 +12269,7 @@ class DashboardEffects {
12255
12269
  };
12256
12270
  this.pryDialog.open(PryDialogConfirmComponent, { data });
12257
12271
  }
12258
- }), map$1(() => action.manifest ?? currentManifest), catchError((error) => {
12272
+ }), map(() => action.manifest ?? currentManifest), catchError((error) => {
12259
12273
  this.snackBar.open({
12260
12274
  message: this.translateService.instant('@pry.toolbox.manifest.saveErrorCode.' + (error.error?.code ?? 'UNKNOWN'), {
12261
12275
  name: action.name
@@ -12263,12 +12277,12 @@ class DashboardEffects {
12263
12277
  type: 'error'
12264
12278
  });
12265
12279
  return throwError(() => error);
12266
- }))), withLatestFrom(this.store.select(DashboardSelectors.selectedItemIds)), mergeMap$1(([manifest, selectedIds]) => [
12280
+ }))), withLatestFrom(this.store.select(DashboardSelectors.selectedItemIds)), mergeMap(([manifest, selectedIds]) => [
12267
12281
  DashboardActions.fetchManifestsList(),
12268
12282
  DashboardActions.setInitialPresentation({ initial: manifest }),
12269
12283
  DashboardActions.updateManifest({ manifest, selectedIds })
12270
12284
  ])));
12271
- this.listManifests$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchManifestsList), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter$1(([action, rank]) => rank === 0 || rank === -1), debounceTime$1(100), mergeMap$1(([action, rank]) => this.manifestService.list().pipe(map$1((manifests) => DashboardActions.updateManifestsList({ manifests }))))));
12285
+ this.listManifests$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchManifestsList), withLatestFrom(this.store.select(DashboardSelectors.rank)), filter(([action, rank]) => rank === 0 || rank === -1), debounceTime(100), mergeMap(([action, rank]) => this.manifestService.list().pipe(map((manifests) => DashboardActions.updateManifestsList({ manifests }))))));
12272
12286
  this.confirmManifestDeletion$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.confirmManifestDeletion), tap((action) => {
12273
12287
  const data = {
12274
12288
  title: '@pry.widget.modalTitle',
@@ -12287,23 +12301,23 @@ class DashboardEffects {
12287
12301
  };
12288
12302
  this.pryDialog.open(PryDialogConfirmComponent, { data });
12289
12303
  })), { dispatch: false });
12290
- this.deleteManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.deleteManifest), mergeMap$1((action) => this.manifestService.delete(action.id).pipe(map$1(() => DashboardActions.fetchManifestsList())))));
12291
- this.fetchObjectsDetails$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchObjectsDetails), mergeMap$1((action) => merge(...action.ids.map((id) => this.itemService.get(id)))), map$1((item) => DashboardActions.updateObjectsDetails({ list: { [item.id]: item } }))));
12292
- this.proximitySearch$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.proximity), withLatestFrom(this.store.select(DashboardSelectors.resultSets)), mergeMap$1(([action, resultSets]) => this.itemService.proximity(action.id).pipe(map$1((proxRs) => {
12304
+ this.deleteManifest$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.deleteManifest), mergeMap((action) => this.manifestService.delete(action.id).pipe(map(() => DashboardActions.fetchManifestsList())))));
12305
+ this.fetchObjectsDetails$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.fetchObjectsDetails), mergeMap((action) => merge(...action.ids.map((id) => this.itemService.get(id)))), map((item) => DashboardActions.updateObjectsDetails({ list: { [item.id]: item } }))));
12306
+ this.proximitySearch$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.proximity), withLatestFrom(this.store.select(DashboardSelectors.resultSets)), mergeMap(([action, resultSets]) => this.itemService.proximity(action.id).pipe(map((proxRs) => {
12293
12307
  return DashboardActions.updateResultSet({
12294
12308
  id: action.targetResultSet,
12295
12309
  resultSet: ResultsetUtils.mergeResultSets(proxRs, resultSets[action.targetResultSet])
12296
12310
  });
12297
12311
  })))));
12298
- this.explore$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.explore), mergeMap$1((action) => [DashboardActions.proximity({ id: action.id, targetResultSet: EXPLORE_NAMED_QUERY_ID })])));
12299
- this.detailAsLoadInWidget$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.detail), map$1((action) => DashboardActions.addWidgetToPresentation({
12312
+ this.explore$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.explore), mergeMap((action) => [DashboardActions.proximity({ id: action.id, targetResultSet: EXPLORE_NAMED_QUERY_ID })])));
12313
+ this.detailAsLoadInWidget$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.detail), map((action) => DashboardActions.addWidgetToPresentation({
12300
12314
  id: '',
12301
12315
  widgetType: 'detail',
12302
12316
  additionalOptions: {
12303
12317
  itemIds: action.ids
12304
12318
  }
12305
12319
  }))));
12306
- this.updateWidgetInPresentation$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateWidgetInPresentation), withLatestFrom(this.store.select(DashboardSelectors.globalManifest)), mergeMap$1(([action, manifest]) => {
12320
+ this.updateWidgetInPresentation$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.updateWidgetInPresentation), withLatestFrom(this.store.select(DashboardSelectors.globalManifest)), mergeMap(([action, manifest]) => {
12307
12321
  // Check if a widget with same datasource and type already exist in current presentation
12308
12322
  const widgetToMatch = this.toolboxManifestService.get(action.widgetType);
12309
12323
  let additionalMatchingFn;
@@ -12339,7 +12353,7 @@ class DashboardEffects {
12339
12353
  }
12340
12354
  return result;
12341
12355
  })));
12342
- this.addWidgetToPresentation$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.addWidgetToPresentation), withLatestFrom(this.store.select(DashboardSelectors.gridLayout), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.dashboardCellParams), this.store.select(DashboardSelectors.selectedItemIds)), map$1(([action, layout, _globalManifest, rank, params, selectedIds]) => {
12356
+ this.addWidgetToPresentation$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.addWidgetToPresentation), withLatestFrom(this.store.select(DashboardSelectors.gridLayout), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.dashboardCellParams), this.store.select(DashboardSelectors.selectedItemIds)), map(([action, layout, _globalManifest, rank, params, selectedIds]) => {
12343
12357
  const manifestGlobal = structuredClone(_globalManifest);
12344
12358
  // Create new configuration
12345
12359
  const newOptions = this.toolboxManifestService.get(action.widgetType) ?? {
@@ -12410,7 +12424,7 @@ class DashboardEffects {
12410
12424
  }
12411
12425
  return DashboardActions.updateManifest({ manifest: manifestGlobal, selectedIds });
12412
12426
  })));
12413
- this.moveWidget$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.moveWidget), withLatestFrom(this.store.select(DashboardSelectors.gridLayout), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.dashboardCellParams), this.store.select(DashboardSelectors.selectedItemIds)), map$1(([action, layout, _globalManifest, rank, params, selectedIds]) => {
12427
+ this.moveWidget$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.moveWidget), withLatestFrom(this.store.select(DashboardSelectors.gridLayout), this.store.select(DashboardSelectors.globalManifest), this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.dashboardCellParams), this.store.select(DashboardSelectors.selectedItemIds)), map(([action, layout, _globalManifest, rank, params, selectedIds]) => {
12414
12428
  const manifestGlobal = structuredClone(_globalManifest);
12415
12429
  const newWindows = [...manifestGlobal.windows];
12416
12430
  // Creating new current window manifest, without moved widget
@@ -12478,16 +12492,16 @@ class DashboardEffects {
12478
12492
  return DashboardActions.updateManifest({ manifest: { ...manifestGlobal, windows: newWindows }, selectedIds });
12479
12493
  })));
12480
12494
  this.multiSnackBar$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.multiSnackBar), tap((action) => this.snackBar.open(action.message))), { dispatch: false });
12481
- this.relaunchAfterOrder$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.quickOrder), map$1((action) => SearchActions.getDatasourceItems({
12495
+ this.relaunchAfterOrder$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.quickOrder), map((action) => SearchActions.getDatasourceItems({
12482
12496
  id: action.datasourceId,
12483
12497
  excludeGeo: true,
12484
12498
  from: 'DashboardEffects.relaunchAfterOrder$'
12485
12499
  }))));
12486
- this.propagateGridLayout$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.windowManifest)), map$1(([action, rank, windowManifest]) => DashboardActions.propagateGridLayout({ manifest: windowManifest, rank }))));
12487
- this.toggleEditionModeIfNotManual$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), filter$1((action) => action.layout !== DashboardGridLayout.MANUAL), map$1(() => DashboardActions.toggleEditionMode({ force: false }))));
12488
- this.getCapability$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getCapability), withLatestFrom(this.store.select(DashboardSelectors.capabilities)), filter$1(([action, capabilities]) => (!!capabilities && !!action.url && (!capabilities[action.url] || !capabilities[action.url].doc)) ||
12489
- !!action.force), mergeMap$1(([action, _]) => this.wmsService.getCapabilities(action.url).pipe(map$1((capability) => DashboardActions.updateCapability({ url: action.url, capability })), startWith(DashboardActions.updateCapability({ url: action.url, capability: null }))))));
12490
- this.getWmsFeatures = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWmsFeatures), mergeMap$1((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), map$1(([action, json]) => {
12500
+ this.propagateGridLayout$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.windowManifest)), map(([action, rank, windowManifest]) => DashboardActions.propagateGridLayout({ manifest: windowManifest, rank }))));
12501
+ this.toggleEditionModeIfNotManual$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.setGridLayout), filter((action) => action.layout !== DashboardGridLayout.MANUAL), map(() => DashboardActions.toggleEditionMode({ force: false }))));
12502
+ this.getCapability$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getCapability), withLatestFrom(this.store.select(DashboardSelectors.capabilities)), filter(([action, capabilities]) => (!!capabilities && !!action.url && (!capabilities[action.url] || !capabilities[action.url].doc)) ||
12503
+ !!action.force), mergeMap(([action, _]) => this.wmsService.getCapabilities(action.url).pipe(map((capability) => DashboardActions.updateCapability({ url: action.url, capability })), startWith(DashboardActions.updateCapability({ url: action.url, capability: null }))))));
12504
+ this.getWmsFeatures = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWmsFeatures), mergeMap((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), map(([action, json]) => {
12491
12505
  return DashboardActions.addWmsFeatures({
12492
12506
  features: json.features.map((feature) => {
12493
12507
  const result = {
@@ -12503,7 +12517,7 @@ class DashboardEffects {
12503
12517
  componentId: action.componentId
12504
12518
  });
12505
12519
  })));
12506
- this.getWfsFeaturesForPointStack = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWfsFeaturesForPointStackTooltips), mergeMap$1((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), mergeMap$1(([action, wmsJson]) => {
12520
+ this.getWfsFeaturesForPointStack = createEffect(() => this.actions$.pipe(ofType(DashboardActions.getWfsFeaturesForPointStackTooltips), mergeMap((action) => combineLatest([of(action), this.wmsService.getWmsFeatures(action.url)])), mergeMap(([action, wmsJson]) => {
12507
12521
  // check if data is actually a stack of points
12508
12522
  if (wmsJson.features[0] &&
12509
12523
  wmsJson.features[0].properties.count &&
@@ -12512,11 +12526,11 @@ class DashboardEffects {
12512
12526
  let envBBOXCoords = [...wmsJson.features[0].properties.envBBOX.matchAll(/\d+.\d+/g)].map((m) => parseFloat(m[0]));
12513
12527
  return this.wmsService
12514
12528
  .getWfsFeatures(action.url, envBBOXCoords)
12515
- .pipe(map$1((wfsJson) => ({ action, json: wfsJson })));
12529
+ .pipe(map((wfsJson) => ({ action, json: wfsJson })));
12516
12530
  }
12517
12531
  // if data is not a stack just add features without calling wfs service
12518
12532
  return of({ action, json: wmsJson });
12519
- }), map$1(({ action, json }) => DashboardActions.addWmsFeatures({
12533
+ }), map(({ action, json }) => DashboardActions.addWmsFeatures({
12520
12534
  features: json.features.map((feature) => ({
12521
12535
  id: feature.id,
12522
12536
  oClass: action.oClass,
@@ -12530,7 +12544,7 @@ class DashboardEffects {
12530
12544
  console.error('Error while fetching WFS features', error);
12531
12545
  return of(DashboardActions.addWmsFeatures({ features: [], componentId: 'error' }));
12532
12546
  })));
12533
- this.addManifestMetadata = createEffect(() => this.actions$.pipe(ofType(DashboardActions.addManifestMetadata), mergeMap$1((action) => this.manifestService.addMetadata(action.presentationId, action.metadataId, action.value).pipe(map$1(() => DashboardActions.fetchManifestsList()), catchError((error) => {
12547
+ this.addManifestMetadata = createEffect(() => this.actions$.pipe(ofType(DashboardActions.addManifestMetadata), mergeMap((action) => this.manifestService.addMetadata(action.presentationId, action.metadataId, action.value).pipe(map(() => DashboardActions.fetchManifestsList()), catchError((error) => {
12534
12548
  if (error.status === 404) {
12535
12549
  this.snackBar.open({
12536
12550
  type: 'error',
@@ -12541,16 +12555,16 @@ class DashboardEffects {
12541
12555
  }
12542
12556
  return throwError(() => error);
12543
12557
  })))));
12544
- this.deleteManifestMetadata$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.deleteManifestMetadata), mergeMap$1((action) => this.manifestService
12558
+ this.deleteManifestMetadata$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.deleteManifestMetadata), mergeMap((action) => this.manifestService
12545
12559
  .deleteMetadata(action.presentationId, action.metadataId)
12546
- .pipe(map$1(() => DashboardActions.fetchManifestsList())))));
12560
+ .pipe(map(() => DashboardActions.fetchManifestsList())))));
12547
12561
  this.loadPresentation$ = createEffect(() => this.actions$.pipe(ofType(DashboardActions.loadPresentation), tap(() => this.store.dispatch(DashboardActions.updateManifest({
12548
12562
  manifest: { windows: [] },
12549
12563
  selectedIds: []
12550
12564
  }))), tap((action) => this.store.dispatch(DashboardActions.selectPresentation({
12551
12565
  presentation: action.presentation,
12552
12566
  viewMode: action.viewMode
12553
- }))), tap((action) => this.titleService.changeTitle(action.presentation.name)), mergeMap$1((action) => this.manifestService.get(action.presentation.id).pipe(mergeMap$1((manifest) => [
12567
+ }))), tap((action) => this.titleService.changeTitle(action.presentation.name)), mergeMap((action) => this.manifestService.get(action.presentation.id).pipe(mergeMap((manifest) => [
12554
12568
  DashboardActions.updateManifest({
12555
12569
  manifest,
12556
12570
  selectedIds: [],