@geogirafe/lib-geoportal 1.2.0-dev.2829479244 → 1.2.0-dev.2829697690

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.
@@ -348,6 +348,44 @@ export function extractNotDefaultExportValueNames(code) {
348
348
  return exportNames;
349
349
  }
350
350
 
351
+ export function haslazyLoadedInLibDecorator(code, exportName) {
352
+ // Check if a specific exported class/function is decorated with @lazyLoadedInLib
353
+ // Split code into lines and look for @lazyLoadedInLib decorator immediately followed by export
354
+
355
+ const lines = code.split('\n');
356
+
357
+ for (let i = 0; i < lines.length; i++) {
358
+ const line = lines[i];
359
+ const trimmedLine = line.trim();
360
+
361
+ // Check if this line has an export of the named item
362
+ // Look for: export default class ExportName OR export class ExportName
363
+ const exportKeywordIndex = trimmedLine.indexOf('export');
364
+ if (exportKeywordIndex !== -1) {
365
+ // Check if this export line contains our exportName
366
+ const classMatch = trimmedLine.match(
367
+ /export\s+(?:default\s+)?(?:async\s+)?(?:abstract\s+)?(class|function|const)\s+(\w+)/i
368
+ );
369
+ if (classMatch && classMatch[2] === exportName) {
370
+ // Check if the previous line has @lazyLoadedInLib
371
+ if (i > 0 && lines[i - 1].includes('@lazyLoadedInLib')) {
372
+ return true;
373
+ }
374
+
375
+ // Check if the same line has @lazyLoadedInLib before the export keyword
376
+ if (trimmedLine.includes('@lazyLoadedInLib')) {
377
+ const index = trimmedLine.indexOf('@lazyLoadedInLib');
378
+ if (index >= 0 && index < exportKeywordIndex) {
379
+ return true;
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
385
+
386
+ return false;
387
+ }
388
+
351
389
  export function appendImportExtension(code, extension) {
352
390
  if (!extension.startsWith('.')) {
353
391
  extension = `.${extension}`;
package/decorators.d.ts CHANGED
@@ -3,3 +3,8 @@
3
3
  * @constructor
4
4
  */
5
5
  export declare function UsedInTemplateOnly(_reason?: string): (_target: object, _propertyKey: string, _descriptor: PropertyDescriptor) => void;
6
+ /**
7
+ * Use this Decorator to mark a class that should not be exported in the library main files.
8
+ * @constructor
9
+ */
10
+ export declare function lazyLoadedInLib(): (_target: Function) => void;
package/decorators.js CHANGED
@@ -6,3 +6,10 @@
6
6
  export function UsedInTemplateOnly(_reason = 'Method is used in HTML Template') {
7
7
  return function (_target, _propertyKey, _descriptor) { };
8
8
  }
9
+ /**
10
+ * Use this Decorator to mark a class that should not be exported in the library main files.
11
+ * @constructor
12
+ */
13
+ export function lazyLoadedInLib() {
14
+ return function (_target) { };
15
+ }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geogirafe.org"
7
7
  },
8
- "version": "1.2.0-dev.2829479244",
8
+ "version": "1.2.0-dev.2829697690",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.2.0-dev.2829479244", "build":"2829479244", "date":"08/09/2026"}
1
+ {"version":"1.2.0-dev.2829697690", "build":"2829697690", "date":"08/09/2026"}
@@ -51,6 +51,9 @@ export default class AbstractConnectManager {
51
51
  return url.toString();
52
52
  }
53
53
  getLogoutRedirectUrl() {
54
+ if (this.context.configManager.Config.oauth?.issuer.customLogoutRedirectUrl) {
55
+ return this.context.configManager.Config.oauth?.issuer.customLogoutRedirectUrl;
56
+ }
54
57
  const url = new URL(this.context.urlManager.getBaseUrlPath());
55
58
  url.searchParams.append('authentified', 'false');
56
59
  url.hash = this.context.urlManager.getHash() ?? '';
@@ -225,6 +225,7 @@ declare class GirafeConfig {
225
225
  customLoginParams: {
226
226
  [key: string]: string;
227
227
  };
228
+ customLogoutRedirectUrl?: string;
228
229
  };
229
230
  geomapfish: {
230
231
  userInfoUrl: string;
@@ -423,7 +423,8 @@ class GirafeConfig {
423
423
  audienceExcludedPaths: config.oauth.issuer.audienceExcludedPaths ?? [],
424
424
  alwaysSendCookies: config.oauth.issuer.alwaysSendCookies ?? false,
425
425
  customSilentLoginParams: config.oauth.issuer.customSilentLoginParams ?? {},
426
- customLoginParams: config.oauth.issuer.customLoginParams ?? {}
426
+ customLoginParams: config.oauth.issuer.customLoginParams ?? {},
427
+ customLogoutRedirectUrl: config.oauth.issuer.customLogoutRedirectUrl
427
428
  };
428
429
  const geomapfishConfig = {
429
430
  userInfoUrl: config.oauth.geomapfish.userInfoUrl,
@@ -1,11 +1,18 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
1
7
  // SPDX-License-Identifier: Apache-2.0
2
8
  import * as Cesium from 'cesium';
3
9
  import { CallbackProperty, Cartesian2, Cartesian3, Cartographic, Color, EllipsoidGeodesic, Entity, ScreenSpaceEventType, PolygonHierarchy } from 'cesium';
4
10
  import { KML, GeoJSON } from 'ol/format.js';
5
11
  import DrawingFeature, { DrawingShape } from './drawingFeature.js';
6
12
  import proj4 from 'proj4';
13
+ import { lazyLoadedInLib } from '../../decorators.js';
7
14
  const CLAMP_TO_GROUND = Cesium.HeightReference.CLAMP_TO_GROUND;
8
- export default class CesiumDrawing {
15
+ let CesiumDrawing = class CesiumDrawing {
9
16
  // Writes drawn features into the specified location in the extended state
10
17
  stateLocation;
11
18
  activeShapePoints = [];
@@ -407,4 +414,8 @@ export default class CesiumDrawing {
407
414
  }
408
415
  });
409
416
  }
410
- }
417
+ };
418
+ CesiumDrawing = __decorate([
419
+ lazyLoadedInLib()
420
+ ], CesiumDrawing);
421
+ export default CesiumDrawing;
package/tools/main.d.ts CHANGED
@@ -14,7 +14,6 @@ export { default as GirafeConfig } from './configuration/girafeconfig.js';
14
14
  export { defaultNewsSanitizeConfig, defaultPermalinkSanitizeConfig, defaultQuerySanitizeConfig } from './configuration/sanitizeconfig-defaults.js';
15
15
  export { default as GirafeContext } from './context/context.js';
16
16
  export type { default as IGirafeContext } from './context/icontext.js';
17
- export { default as CesiumDrawing } from './drawing/cesiumDrawing.js';
18
17
  export type { DrawingShape, ArrowStyle, ArrowPosition, LineStroke, MeasureInformation, SerializedFeature } from './drawing/drawingFeature.js';
19
18
  export { default as DrawingFeature } from './drawing/drawingFeature.js';
20
19
  export { default as DrawingSerializer } from './drawing/drawingSerializer.js';
package/tools/main.js CHANGED
@@ -12,7 +12,6 @@ export { default as ConfigManager } from './configuration/configmanager.js';
12
12
  export { default as GirafeConfig } from './configuration/girafeconfig.js';
13
13
  export { defaultNewsSanitizeConfig, defaultPermalinkSanitizeConfig, defaultQuerySanitizeConfig } from './configuration/sanitizeconfig-defaults.js';
14
14
  export { default as GirafeContext } from './context/context.js';
15
- export { default as CesiumDrawing } from './drawing/cesiumDrawing.js';
16
15
  export { default as DrawingFeature } from './drawing/drawingFeature.js';
17
16
  export { default as DrawingSerializer } from './drawing/drawingSerializer.js';
18
17
  export { default as DrawingState } from './drawing/drawingState.js';