@provoly/dashboard 0.15.2 → 0.15.3

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 (26) hide show
  1. package/esm2022/lib/core/auth/geoAuth.service.mjs +26 -0
  2. package/esm2022/lib/core/core.module.mjs +8 -2
  3. package/esm2022/lib/core/public-api.mjs +2 -1
  4. package/esm2022/lib/core/store/search/search.effects.mjs +3 -3
  5. package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +10 -4
  6. package/esm2022/restitution/components/restitution/restitution.component.mjs +5 -2
  7. package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +8 -3
  8. package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +5 -1
  9. package/esm2022/widgets/widget-map/component/widget-map.component.mjs +24 -20
  10. package/fesm2022/provoly-dashboard-restitution.mjs +4 -1
  11. package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
  12. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +7 -2
  13. package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
  14. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +23 -15
  15. package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
  16. package/fesm2022/provoly-dashboard.mjs +46 -10
  17. package/fesm2022/provoly-dashboard.mjs.map +1 -1
  18. package/lib/core/auth/geoAuth.service.d.ts +12 -0
  19. package/lib/core/core.module.d.ts +1 -0
  20. package/lib/core/public-api.d.ts +1 -0
  21. package/lib/core/store/search/search.effects.d.ts +3 -0
  22. package/lib/core/toolbox/toolbox-menu.service.d.ts +2 -0
  23. package/package.json +18 -18
  24. package/restitution/components/restitution/restitution.component.d.ts +7 -0
  25. package/widgets/widget-map/component/widget-map-layer.service.d.ts +3 -1
  26. package/widgets/widget-map/component/widget-map.component.d.ts +4 -6
@@ -12,7 +12,7 @@ import * as i1$3 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, mergeMap, from as from$1, forkJoin, catchError as catchError$1, throwError, switchMap, tap as tap$1, merge, ReplaySubject, combineLatestWith, distinctUntilChanged as distinctUntilChanged$1, startWith, delay, fromEvent, auditTime, interval } from 'rxjs';
15
+ import { of, Subscription, filter, combineLatest, debounceTime, BehaviorSubject, map, Subject, mergeMap, from as from$1, forkJoin, catchError as catchError$1, throwError, switchMap, tap as tap$1, withLatestFrom as withLatestFrom$1, merge, ReplaySubject, combineLatestWith, distinctUntilChanged as distinctUntilChanged$1, startWith, delay, fromEvent, auditTime, interval } from 'rxjs';
16
16
  import * as i3 from '@angular/platform-browser';
17
17
  import { Style, Icon } from 'ol/style';
18
18
  import { createEntityAdapter } from '@ngrx/entity';
@@ -4858,13 +4858,14 @@ class SearchEffects {
4858
4858
  this.actions$ = actions$;
4859
4859
  this.searchService = searchService;
4860
4860
  this.store = store;
4861
- this.searchNamed$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), withLatestFrom(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.quickOrder)), filter(([_, rank]) => rank === 0), filter(([props, rank]) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), mergeMap$1(([props, rank, quickOrder]) => this.searchService.getItems(props.id, quickOrder[props.id]).pipe(map$1((resultSet) => SearchActions.searchSuccess({
4861
+ this.searchNamed$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), withLatestFrom$1(this.store.select(DashboardSelectors.rank), this.store.select(DashboardSelectors.quickOrder)), filter(([_, rank]) => rank === 0), filter(([props, rank]) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), mergeMap(([props, rank, quickOrder]) => this.searchService.getItems(props.id, quickOrder[props.id]).pipe(map((resultSet) => SearchActions.searchSuccess({
4862
4862
  resultSet,
4863
4863
  id: props.id,
4864
4864
  params: this.searchService.getItemsSerializedParams(props.id, quickOrder)
4865
- })), catchError((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
4866
- this.search$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.search), mergeMap$1((props) => this.searchService.search(props.payload).pipe(map$1((resultSet) => SearchActions.searchSuccess({ resultSet, id: props.id })), catchError((error) => [SearchActions.searchFailure({ error })])))));
4867
- this.searchSuccess$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.searchSuccess), map$1((action) => DashboardActions.updateResultSet({
4865
+ })), catchError$1((error) => [SearchActions.searchFailure({ error, id: props.id })])))));
4866
+ this.updateAggregatesInWidget$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.getDatasourceItems), filter((props) => props.id !== DEFAULT_NAMED_QUERY_ID && props.id !== EXPLORE_NAMED_QUERY_ID), tap$1((props) => document.dispatchEvent(new CustomEvent('datasourceRefresh', { detail: props.id })))), { dispatch: false });
4867
+ this.search$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.search), mergeMap((props) => this.searchService.search(props.payload).pipe(map((resultSet) => SearchActions.searchSuccess({ resultSet, id: props.id })), catchError$1((error) => [SearchActions.searchFailure({ error })])))));
4868
+ this.searchSuccess$ = createEffect(() => this.actions$.pipe(ofType(SearchActions.searchSuccess), map((action) => DashboardActions.updateResultSet({
4868
4869
  id: action.id ?? DEFAULT_NAMED_QUERY_ID,
4869
4870
  resultSet: action.resultSet,
4870
4871
  params: action.params
@@ -4996,6 +4997,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImpor
4996
4997
  args: [TabComponent]
4997
4998
  }] } });
4998
4999
 
5000
+ class PryGeoAuthService {
5001
+ }
5002
+ const PRY_GEOAUTH_TOKEN = new InjectionToken('PRY_GEOAUTH_TOKEN');
5003
+ class PryDefaultGeoAuthService extends PryGeoAuthService {
5004
+ constructor() {
5005
+ super();
5006
+ }
5007
+ customLoader(tile, src) {
5008
+ const client = new XMLHttpRequest();
5009
+ client.open('GET', src);
5010
+ // Exemple of how to pass authentification header
5011
+ // client.setRequestHeader('Authorization', 'Basic ' + window.btoa('user:pass'));
5012
+ client.onload = () => {
5013
+ tile.getImage().src = src;
5014
+ };
5015
+ client.send();
5016
+ }
5017
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryDefaultGeoAuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5018
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryDefaultGeoAuthService }); }
5019
+ }
5020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryDefaultGeoAuthService, decorators: [{
5021
+ type: Injectable
5022
+ }], ctorParameters: function () { return []; } });
5023
+
4999
5024
  const SELECTORS = [
5000
5025
  TranslateIdPipe,
5001
5026
  TranslateItemToSymbolPipe,
@@ -5020,9 +5045,14 @@ class PryCoreModule {
5020
5045
  static forRoot(access) {
5021
5046
  const defaultAccessProvider = { provide: PRY_ACCESS_TOKEN, useClass: PryDefaultAccessService };
5022
5047
  const defaultGuardProvider = { provide: PRY_ACCESS_GUARD, useClass: PryDefaultAccessGuard };
5048
+ const defaultGeoAuthProvider = { provide: PRY_GEOAUTH_TOKEN, useClass: PryDefaultGeoAuthService };
5023
5049
  return {
5024
5050
  ngModule: PryCoreModule,
5025
- providers: [access?.accessProvider ?? defaultAccessProvider, access?.guardProvider ?? defaultGuardProvider]
5051
+ providers: [
5052
+ access?.accessProvider ?? defaultAccessProvider,
5053
+ access?.guardProvider ?? defaultGuardProvider,
5054
+ access?.geoAuthProvider ?? defaultGeoAuthProvider
5055
+ ]
5026
5056
  };
5027
5057
  }
5028
5058
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: PryCoreModule, deps: [{ token: PryI18nService }], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -8850,7 +8880,12 @@ class ToolboxMenuService {
8850
8880
  return types.map((type) => {
8851
8881
  const matchingMenu = menuStructure.find((menu) => menu.label.replace('@pry.toolbox.sub.', '').indexOf(type) >= 0);
8852
8882
  if (!!matchingMenu) {
8853
- return { type, label: matchingMenu.label, icon: matchingMenu.icon };
8883
+ return {
8884
+ type,
8885
+ label: matchingMenu.label,
8886
+ icon: matchingMenu.icon,
8887
+ manifest: Object.values(manifests).find((manifest) => manifest.type === type)
8888
+ };
8854
8889
  }
8855
8890
  const matchingSubMenu = menuStructure
8856
8891
  .map((menu) => menu.sub.find((sub) => sub.label.replace('@pry.toolbox.', '').indexOf(type) >= 0))
@@ -8859,10 +8894,11 @@ class ToolboxMenuService {
8859
8894
  return {
8860
8895
  type,
8861
8896
  label: matchingSubMenu.label,
8862
- icon: matchingSubMenu.icon.replace('assets/svgs/', '').replace(/.svg$/, '')
8897
+ icon: matchingSubMenu.icon.replace('assets/svgs/', '').replace(/.svg$/, ''),
8898
+ manifest: Object.values(manifests).find((manifest) => manifest.type === type)
8863
8899
  };
8864
8900
  }
8865
- return { type, label: type, icon: DEFAULT_ICON_URL };
8901
+ return { type, label: type, icon: DEFAULT_ICON_URL, manifest: {} };
8866
8902
  });
8867
8903
  }));
8868
8904
  }
@@ -11706,5 +11742,5 @@ function filterLoader(module, prop) {
11706
11742
  * Generated bundle index. Do not edit.
11707
11743
  */
11708
11744
 
11709
- export { AccordionComponent, AccordionItemComponent, Aggregation, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_GAP_PX, DEFAULT_ICON_URL, DEFAULT_MSG_TIMEOUT, DEFAULT_NAMED_QUERY_ID, DEFAULT_PROJECTION, DEFAULT_RESTITUTION_ICON_URL, DEFAULT_ROWS_NUMBER, DEFAULT_ROW_HEIGHT_PX, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DatasourceUtils, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, DefaultViewGuard, DisplayMode, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, FIELD_OPTIONS, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterInstanciatorComponent, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemUtils, LibraryTypes, LoopScrollColumnComponent, METADATA_TYPE, META_OPTIONS, MIME_TYPE_RESULTSET, MIME_TYPE_WIDGET_MANIFEST, MIME_TYPE_WIDGET_SIZE, MIME_TYPE_WIDGET_TYPE, ManifestService, ManifestUtils, ManifestsComponent, MarkSubType, MarkType, MetadataComponent, NamedQueryTypes, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFrontendAggregationService, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryModalStatusComponent, PryModalStatusModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryTooltipDirective, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SearchActions, SearchSelectors, SearchService, SettingsComponent, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getDisplayOptions, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, selectIds$2 as selectIds, selectTotal$2 as selectTotal, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
11745
+ export { AccordionComponent, AccordionItemComponent, Aggregation, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_GAP_PX, DEFAULT_ICON_URL, DEFAULT_MSG_TIMEOUT, DEFAULT_NAMED_QUERY_ID, DEFAULT_PROJECTION, DEFAULT_RESTITUTION_ICON_URL, DEFAULT_ROWS_NUMBER, DEFAULT_ROW_HEIGHT_PX, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DatasourceUtils, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, DefaultViewGuard, DisplayMode, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, FIELD_OPTIONS, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterInstanciatorComponent, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemUtils, LibraryTypes, LoopScrollColumnComponent, METADATA_TYPE, META_OPTIONS, MIME_TYPE_RESULTSET, MIME_TYPE_WIDGET_MANIFEST, MIME_TYPE_WIDGET_SIZE, MIME_TYPE_WIDGET_TYPE, ManifestService, ManifestUtils, ManifestsComponent, MarkSubType, MarkType, MetadataComponent, NamedQueryTypes, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PRY_GEOAUTH_TOKEN, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDefaultGeoAuthService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFrontendAggregationService, PryGeoAuthService, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryModalStatusComponent, PryModalStatusModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryTooltipDirective, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SearchActions, SearchSelectors, SearchService, SettingsComponent, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getDisplayOptions, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, selectIds$2 as selectIds, selectTotal$2 as selectTotal, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
11710
11746
  //# sourceMappingURL=provoly-dashboard.mjs.map