@provoly/dashboard 1.4.28 → 1.4.29

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.
@@ -5602,28 +5602,53 @@ class PryGeoAuthService {
5602
5602
  const PRY_GEOAUTH_TOKEN = new InjectionToken('PRY_GEOAUTH_TOKEN');
5603
5603
  const CONTENT_TYPE = 'Content-Type';
5604
5604
  const ERROR_CONTENT_REGEXP = new RegExp('<ServiceException [\\S\\s]*>([\\S\\s]*)<\\/ServiceException>', 'gm');
5605
+ const GEOSERVER_FAILURE_FN = {
5606
+ func: (action, snackBarService, i18nService, store) => {
5607
+ switch (action.code) {
5608
+ default:
5609
+ console.error(`Geoserver error [${action.code}]: ${action.reason}`);
5610
+ snackBarService.open({
5611
+ type: 'error',
5612
+ message: i18nService.instant('@pry.geoAuth.failure', { reason: action.reason })
5613
+ });
5614
+ break;
5615
+ case -2:
5616
+ console.warn(`Strange geoserver return [${action.code}]: ${action.reason}`);
5617
+ break;
5618
+ }
5619
+ }
5620
+ };
5605
5621
  class PryDefaultGeoAuthService extends PryGeoAuthService {
5606
- constructor(httpClient, snack, i18nService) {
5622
+ constructor(httpClient, snack, i18nService, store) {
5607
5623
  super();
5608
5624
  this.httpClient = httpClient;
5609
5625
  this.snack = snack;
5610
5626
  this.i18nService = i18nService;
5627
+ this.store = store;
5611
5628
  }
5612
5629
  customLoader(tile, src) {
5613
- this.httpClient.get(src, { observe: 'response', params: {}, responseType: 'blob' }).subscribe((blob) => {
5630
+ this.httpClient
5631
+ .get(src, { observe: 'response', params: {}, responseType: 'blob' })
5632
+ .pipe(catchError((err) => {
5633
+ GEOSERVER_FAILURE_FN.func({
5634
+ code: err.status,
5635
+ reason: err.statusText
5636
+ }, this.snack, this.i18nService, this.store);
5637
+ return throwError(err);
5638
+ }))
5639
+ .subscribe((blob) => {
5614
5640
  if (blob.headers.has(CONTENT_TYPE) && (blob.headers.get(CONTENT_TYPE) ?? '').indexOf('text/xml') >= 0) {
5615
5641
  blob.body.text().then((text) => {
5616
5642
  const match = text.match(ERROR_CONTENT_REGEXP);
5617
5643
  const reason = match[0].replace(/\r/g, '').replace(/\n/g, '').replace(/\s\s/g, ' ');
5618
- if (!!reason) {
5619
- console.error(`Geoserver error: ${reason}`);
5620
- this.snack.open({
5621
- type: 'error',
5622
- message: this.i18nService.instant('@pry.geoAuth.failure', { reason })
5623
- });
5644
+ if (reason.includes('401') && reason.includes('RemoteException')) {
5645
+ GEOSERVER_FAILURE_FN.func({ code: 401, reason }, this.snack, this.i18nService, this.store);
5646
+ }
5647
+ else if (!!reason) {
5648
+ GEOSERVER_FAILURE_FN.func({ code: -1, reason }, this.snack, this.i18nService, this.store);
5624
5649
  }
5625
5650
  else {
5626
- console.warn(`Strange geoserver return ${text}`);
5651
+ GEOSERVER_FAILURE_FN.func({ code: -2, reason }, this.snack, this.i18nService, this.store);
5627
5652
  }
5628
5653
  });
5629
5654
  }
@@ -5632,12 +5657,12 @@ class PryDefaultGeoAuthService extends PryGeoAuthService {
5632
5657
  }
5633
5658
  });
5634
5659
  }
5635
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDefaultGeoAuthService, deps: [{ token: i1$1.HttpClient }, { token: PrySnackbarService }, { token: PryI18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
5660
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDefaultGeoAuthService, deps: [{ token: i1$1.HttpClient }, { token: PrySnackbarService }, { token: PryI18nService }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
5636
5661
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDefaultGeoAuthService }); }
5637
5662
  }
5638
5663
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: PryDefaultGeoAuthService, decorators: [{
5639
5664
  type: Injectable
5640
- }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: PrySnackbarService }, { type: PryI18nService }] });
5665
+ }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: PrySnackbarService }, { type: PryI18nService }, { type: i1.Store }] });
5641
5666
 
5642
5667
  class EllipsisDirective {
5643
5668
  constructor(elementRef, renderer) {
@@ -12634,8 +12659,8 @@ class DashboardEffects {
12634
12659
  }),
12635
12660
  DashboardActions.followManifestRoute()
12636
12661
  ])))));
12637
- dashboardInitService.init();
12638
- refreshService.start();
12662
+ this.dashboardInitService.init();
12663
+ this.refreshService.start();
12639
12664
  }
12640
12665
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardEffects, deps: [{ token: DashboardInitService }, { token: i1$2.Actions }, { token: i1.Store }, { token: ManifestService }, { token: ItemService }, { token: PryTitleService }, { token: PryI18nService }, { token: PrySnackbarService }, { token: i2.Router }, { token: RefreshService }, { token: ToolboxManifestService }, { token: BusService }, { token: SearchService }, { token: PryDialogService }, { token: WmsService }, { token: WidgetFactoryService }, { token: PryI18nService }], target: i0.ɵɵFactoryTarget.Injectable }); }
12641
12666
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: DashboardEffects }); }
@@ -13668,5 +13693,5 @@ function filterLoader(module, prop) {
13668
13693
  * Generated bundle index. Do not edit.
13669
13694
  */
13670
13695
 
13671
- export { ALIGNMENT_OPTIONS, AUTHENTICATED_USERS_GROUP, AccordionComponent, AccordionItemComponent, Aggregation, BASE_DISPLAY_OPTIONS, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ChipsSelectorComponent, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_DASHBOARD_ICON_URL, 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, DEFAULT_SEARCH_LIMIT_NUMBER, DEFAULT_TABLE_WIDGET_STYLE, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DatasourceUtils, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, EllipsisDirective, FIELD_I18N, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterGroupComponent, FilterInstanciatorComponent, FilterParamEncoder, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemActions, ItemService, 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, NON_EXCLUDE_GEO_WIDGET_TYPES, NamedQueryTypes, NumericFieldTypes, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PRY_GEOAUTH_TOKEN, PUBLIC_GROUP, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessRightsShareComponent, PryAccessRightsShareModalComponent, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryChipsSelectorModule, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatasourceCardComponent, PryDatasourceListComponent, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDefaultGeoAuthService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFilterGroupCssComponent, PryFrontendAggregationService, PryGeoAuthService, PryGroupShareComponent, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareMode, PryShareModule, PrySinceDateModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryStatusModalComponent, PryStatusModalModule, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, READ_ACCESS, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SYSTEM_GROUPS, SearchActions, SearchSelectors, SearchService, SettingsComponent, SinceDatePipe, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, TextFieldTypes, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WRITE_ACCESS, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, canManifestBeMadePublic, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getAccessArray, getAccessRightsArrayByGroup, getAccessRightsStringByGroup, getAccessString, getCommonDatasourceGroupsForManifest, getDisplayOptions, getGroupLabel, getGroupLabelByName, getShareLevel, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
13696
+ export { ALIGNMENT_OPTIONS, AUTHENTICATED_USERS_GROUP, AccordionComponent, AccordionItemComponent, Aggregation, BASE_DISPLAY_OPTIONS, BaseFilterComponent, BaseFilterModule, BaseLayoutComponent, BaseMenuComponent, BaseToolboxComponent, BaseTooltipComponent, BaseTooltipModule, BaseWidgetComponent, BaseWidgetModule, BusService, CategoryActions, CategorySelectors, CategoryService, ChartOptionDefault, ChipsSelectorComponent, ClassActions, ClassSelectors, ClassService, ConfigActions, ConfigSelectors, ConfigService, ContextMenuActions, ContextMenuComponent, ContextMenuSelectors, DEFAULT_CATEGORY_UUID, DEFAULT_COLUMNS_NUMBER, DEFAULT_DASHBOARD_ICON_URL, 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, DEFAULT_SEARCH_LIMIT_NUMBER, DEFAULT_TABLE_WIDGET_STYLE, DELAY_FOR_HIDE, DashboardActions, DashboardComponent, DashboardGridLayout, DashboardSelectors, DataSourceActions, DataSourceSelectors, DataSourceService, DataWidgetComponent, DatasourceSelectorComponent, DatasourceUtils, DateRangeHighlightPipe, DateUtils, DefaultTooltipComponent, ENV_OPTIONS, EXPLORE_NAMED_QUERY_ID, EllipsisDirective, FIELD_I18N, FIELD_UUID, FILTERS_DOMAIN, FILTER_DEFINITION, FieldActions, FieldSelectors, FieldService, FieldType, FilterFactoryService, FilterGroupComponent, FilterInstanciatorComponent, FilterParamEncoder, GEOSERVER_FAILURE_FN, GeoMetadata, GeometricFieldTypes, GetSecuredImagePipe, GraphType, HTTP_ORIGIN_METADATA, I18nPipe, INTERNALLY_STORED_IMAGE_PREFIX, IconPosition, ImageActions, ImageService, ImagesSelectors, ItemActions, ItemService, 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, NON_EXCLUDE_GEO_WIDGET_TYPES, NamedQueryTypes, NumericFieldTypes, OPERATOR_OPTIONS, Operation, PRY_ACCESS_GUARD, PRY_ACCESS_TOKEN, PRY_CUSTOMEVENT_TYPE, PRY_DIALOG_DATA, PRY_GEOAUTH_TOKEN, PUBLIC_GROUP, PryAboutComponent, PryAboutModule, PryAccessDirective, PryAccessRightsShareComponent, PryAccessRightsShareModalComponent, PryAccessUtils, PryAggregationService, PryBackendAggregationService, PryBaseAccess, PryBaseAccessGuard, PryChipsSelectorModule, PryCoreModule, PryDashboardModule, PryDatasetType, PryDatasourceCardComponent, PryDatasourceListComponent, PryDatePickerComponent, PryDatePickerModule, PryDefaultAccessGuard, PryDefaultAccessService, PryDefaultGeoAuthService, PryDialogConfirmComponent, PryDialogRef, PryDialogService, PryEditInputComponent, PryEditInputModule, PryFilterGroupCssComponent, PryFrontendAggregationService, PryGeoAuthService, PryGroupShareComponent, PryHiddenWhenOverlay, PryHiddenWhenOverlayDirective, PryHttpErrorInterceptorService, PryI18nModule, PryI18nService, PryIconComponent, PryIconModule, PryModalComponent, PryModalModule, PryNqColorSelectorComponent, PryObjectEditionComponent, PryOverlayDirective, PryOverlayModule, PryRangeComponent, PryRangeModule, PrySelectComponent, PrySelectImageComponent, PrySelectModule, PryShareComponent, PryShareMode, PryShareModule, PrySinceDateModule, PrySnackbarComponent, PrySnackbarModule, PrySnackbarService, PrySortDataPipe, PrySortHeaderComponent, PrySortHeaderDirective, PrySortModule, PrySortTableDirective, PryStatusModalComponent, PryStatusModalModule, PryTimePickerComponent, PryTitleService, PryToggleComponent, PryToggleModule, PryUploadComponent, PryVisibilityType, PryWidgetHeaderComponent, READ_ACCESS, RawService, RelationTypesActions, RelationTypesSelectors, RelationTypesService, ResultSetSizePipe, ResultsetUtils, SYMBOL_DOMAIN, SYSTEM_GROUPS, SearchActions, SearchSelectors, SearchService, SettingsComponent, SinceDatePipe, SubscriptionnerDirective, SymbolService, TABLE_ATTR_DOMAIN, TILE_ATTR_DOMAIN, TOOLTIPS_DOMAIN, TOOLTIP_DEFINITION, TabComponent, TabGroupComponent, TextFieldTypes, ToolboxManifestService, ToolboxMenuService, TooltipFactoryService, TooltipMode, TranslateIdPipe, TranslateItemToSymbolPipe, UNKNOWN_DATASOURCE, USE_CURRENT_RESULTSET, VARIABLE_TYPE, VegaColorType, VegaType, ViewMode, VizualizeRawComponent, WIDGET_DEFINITION, WIDGET_HEADER_HEIGHT, WRITE_ACCESS, WebsocketService, WidgetFactoryService, WidgetInstanciatorComponent, WidgetPlaceholderComponent, WidgetPlacementUtils, WmsService, adapter$2 as adapter, aggregationDefault, baseItemProperties, canManifestBeMadePublic, classReducer, classesFeatureKey, compareOperationFunctions, contextMenuFeatureKey, contextMenuReducer, createPlacedWidgetCopy, dashboardFeatureKey, dashboardInitialState, dashboardReducer, dataSourceFeatureKey, dataSourceReducer, deepMerge, defaultColors, defaultMenuStructure, enTranslations$1 as enTranslations, filterLoader, frTranslations$1 as frTranslations, getAccessArray, getAccessRightsArrayByGroup, getAccessRightsStringByGroup, getAccessString, getCommonDatasourceGroupsForManifest, getDisplayOptions, getGroupLabel, getGroupLabelByName, getShareLevel, httpErrorOptions, imageFeatureKey, imageReducer, initialClassState, initialContextMenuState, initialDataSourceState, initialImageState, initialSearchState, latLonToGeographicFieldTransformation, markTypesDefault, notificationFeatureKey, orderWidgetsAccordingToPlacement, searchFeatureKey, searchReducer, selectAll$2 as selectAll, selectEntities$2 as selectEntities, solveCollisions, solvingCollisionOptions, sortByName$2 as sortByName, subTypesDefault, tooltipLoader, vegaColorSchemesDefault, widgetLoader, widgetMapConfig };
13672
13697
  //# sourceMappingURL=provoly-dashboard.mjs.map