geonetwork-ui 2.11.0-dev.6c8b66d60 → 2.11.0-dev.73a68fe82

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 (75) hide show
  1. package/fesm2022/geonetwork-ui.mjs +1260 -850
  2. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  3. package/index.d.ts +192 -75
  4. package/index.d.ts.map +1 -1
  5. package/package.json +6 -5
  6. package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +2 -0
  7. package/src/libs/api/metadata-converter/src/lib/fixtures/mel.records.dataset+featurecatalog.ts +395 -0
  8. package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +35 -8
  9. package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +19 -0
  10. package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +17 -6
  11. package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +110 -0
  12. package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +131 -0
  13. package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +9 -0
  14. package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -1
  15. package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +57 -25
  16. package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +83 -35
  17. package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -0
  18. package/src/libs/common/domain/src/lib/model/record/flags.model.ts +1 -0
  19. package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
  20. package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +14 -18
  21. package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +2 -0
  22. package/src/libs/common/domain/src/lib/model/search/filter.model.ts +4 -1
  23. package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -0
  24. package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +20 -1
  25. package/src/libs/common/fixtures/src/lib/records.fixtures.ts +42 -62
  26. package/src/libs/feature/dataviz/src/lib/service/data.service.ts +32 -19
  27. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-constraints/form-field-constraints.component.ts +3 -5
  28. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +2 -2
  29. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.css +0 -0
  30. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.html +18 -0
  31. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.ts +86 -0
  32. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +100 -88
  33. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +11 -4
  34. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +18 -4
  35. package/src/libs/feature/editor/src/lib/expressions.ts +67 -0
  36. package/src/libs/feature/editor/src/lib/fields.config.ts +13 -0
  37. package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +10 -4
  38. package/src/libs/feature/map/src/index.ts +0 -1
  39. package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +8 -3
  40. package/src/libs/feature/record/src/lib/state/mdview.effects.ts +3 -1
  41. package/src/libs/feature/record/src/lib/state/mdview.facade.ts +1 -1
  42. package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +7 -1
  43. package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +26 -4
  44. package/src/libs/feature/search/src/lib/geocoding/geocoding.service.ts +52 -8
  45. package/src/libs/feature/search/src/lib/location-search/location-search.component.html +11 -1
  46. package/src/libs/feature/search/src/lib/location-search/location-search.component.ts +77 -3
  47. package/src/libs/feature/search/src/lib/search-filters-summary-item/search-filters-summary-item.component.ts +1 -0
  48. package/src/libs/feature/search/src/lib/state/reducer.ts +1 -4
  49. package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +56 -4
  50. package/src/libs/feature/search/src/lib/utils/service/fields.ts +35 -10
  51. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +3 -3
  52. package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +2 -2
  53. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +0 -4
  54. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +2 -2
  55. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +3 -3
  56. package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +2 -1
  57. package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html +7 -1
  58. package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts +26 -3
  59. package/src/libs/util/app-config/src/index.ts +1 -0
  60. package/src/libs/util/app-config/src/lib/app-config.ts +338 -250
  61. package/src/libs/util/app-config/src/lib/fixtures.ts +37 -1
  62. package/src/libs/util/app-config/src/lib/model.ts +41 -1
  63. package/src/libs/util/app-config/src/lib/parse-utils.ts +8 -4
  64. package/src/libs/util/shared/src/lib/utils/geojson.ts +21 -10
  65. package/translations/de.json +12 -2
  66. package/translations/en.json +12 -2
  67. package/translations/es.json +12 -2
  68. package/translations/fr.json +17 -7
  69. package/translations/it.json +12 -2
  70. package/translations/nl.json +12 -2
  71. package/translations/pt.json +12 -2
  72. package/translations/sk.json +12 -2
  73. package/src/libs/feature/map/src/lib/style/index.ts +0 -2
  74. package/src/libs/feature/map/src/lib/style/map-style.fixtures.ts +0 -47
  75. package/src/libs/feature/map/src/lib/style/map-style.service.ts +0 -108
@@ -14,7 +14,7 @@ import * as i4 from '@ngx-translate/core';
14
14
  import { TranslateLoader, TranslateCompiler, TranslateDefaultParser, TranslateParser, TranslateService, provideTranslateService, TranslateDirective, TranslatePipe, TranslateModule } from '@ngx-translate/core';
15
15
  import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler';
16
16
  import { TranslateHttpLoader, TRANSLATE_HTTP_LOADER_CONFIG } from '@ngx-translate/http-loader';
17
- import { map as map$1, shareReplay as shareReplay$1, catchError, tap as tap$1, filter as filter$1, startWith as startWith$1, withLatestFrom, switchMap as switchMap$1, take, mergeMap, delay, debounceTime, distinctUntilChanged, finalize, throttleTime, first as first$1, pairwise as pairwise$1, share, defaultIfEmpty, toArray } from 'rxjs/operators';
17
+ import { map as map$1, shareReplay as shareReplay$1, catchError, tap as tap$1, withLatestFrom, filter as filter$1, startWith as startWith$1, switchMap as switchMap$1, take, mergeMap, delay, debounceTime, distinctUntilChanged, finalize, throttleTime, first as first$1, pairwise as pairwise$1, share, defaultIfEmpty, toArray } from 'rxjs/operators';
18
18
  import { lt, valid, coerce, satisfies, ltr } from 'semver';
19
19
  import chroma from 'chroma-js';
20
20
  import * as i1$1 from '@angular/common';
@@ -36,9 +36,6 @@ import { createLegendFromLayer } from '@geospatial-sdk/legend';
36
36
  import { mouseOnly, noModifierKeys, primaryAction, platformModifierKeyOnly } from 'ol/events/condition.js';
37
37
  import { defaults, DragPan, MouseWheelZoom } from 'ol/interaction.js';
38
38
  import { extend } from 'ol/extent.js';
39
- import * as TOML from '@ltd/j-toml';
40
- import { Style, Stroke, Fill, Circle } from 'ol/style.js';
41
- import CircleStyle from 'ol/style/Circle.js';
42
39
  import EmblaCarousel from 'embla-carousel';
43
40
  import { iconoirNavArrowLeft, iconoirNavArrowRight, iconoirLongArrowDownLeft, iconoirSearch, iconoirCalendar, iconoirArrowUp, iconoirLink, iconoirFramePlusIn, iconoirCloudUpload, iconoirUpload, iconoirTrash, iconoirSquareDashed, iconoirCheckCircle, iconoirReduce, iconoirNavArrowUp, iconoirNavArrowDown, iconoirExpand, iconoirSettings, iconoirDownload, iconoirPlus, iconoirBin, iconoirMediaImageXmark, iconoirMediaImage, iconoirAppWindow, iconoirCode, iconoirDatabase, iconoirAppleWallet, iconoirBank, iconoirList, iconoirTranslate, iconoirLock, iconoirUser, iconoirArrowLeft, iconoirLightBulbOn, iconoirImport, iconoirBadgeCheck, iconoirSystemShut, iconoirCircle, iconoirAttachment, iconoirRefresh } from '@ng-icons/iconoir';
44
41
  import { MatButtonModule } from '@angular/material/button';
@@ -55,7 +52,7 @@ import { matClose, matContentCopy, matExpandMore, matExpandLess, matSearch, matS
55
52
  import * as i1$4 from '@angular/material/checkbox';
56
53
  import { MatCheckboxModule } from '@angular/material/checkbox';
57
54
  import * as i1$5 from '@angular/material/tooltip';
58
- import { MatTooltipModule } from '@angular/material/tooltip';
55
+ import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
59
56
  import { MAT_DATE_LOCALE, MAT_DATE_FORMATS, DateAdapter } from '@angular/material/core';
60
57
  import { MAT_DATE_FNS_FORMATS, DateFnsAdapter } from '@angular/material-date-fns-adapter';
61
58
  import { enUS } from 'date-fns/locale/en-US';
@@ -73,7 +70,8 @@ import { MatTabsModule } from '@angular/material/tabs';
73
70
  import * as i2$2 from '@ngrx/effects';
74
71
  import { Actions, createEffect, ofType, EffectsModule } from '@ngrx/effects';
75
72
  import { valid as valid$1 } from 'geojson-validation';
76
- import { queryDataGouvFr, queryGeonames, queryGeoadmin } from '@geospatial-sdk/geocoding';
73
+ import { queryGeoplateforme, queryGeonames, queryGeoadmin } from '@geospatial-sdk/geocoding';
74
+ import pointer from 'jsonpointer';
77
75
  import { TemplatePortal } from '@angular/cdk/portal';
78
76
  import { parse as parse$3 } from 'marked';
79
77
  import * as i2$3 from '@angular/cdk/scrolling';
@@ -101,6 +99,7 @@ import { TextFieldModule } from '@angular/cdk/text-field';
101
99
  import * as i2$5 from '@ngrx/router-store';
102
100
  import { getRouterSelectors, routerReducer, StoreRouterConnectingModule, FullRouterStateSerializer } from '@ngrx/router-store';
103
101
  import { navigation } from '@ngrx/router-store/data-persistence';
102
+ import * as TOML from '@ltd/j-toml';
104
103
 
105
104
  class MetadataMapperContext {
106
105
  }
@@ -1139,7 +1138,7 @@ function kindToCodeListValue(record) {
1139
1138
  }
1140
1139
 
1141
1140
  function extractCharacterString() {
1142
- return pipe(fallback(findChildElement('gco:CharacterString', false), findChildElement('gmx:Anchor', false), findChildElement('gmx:MimeFileType', false)), readText());
1141
+ return pipe(fallback(findChildElement('gco:CharacterString', false), findChildElement('gmx:Anchor', false), findChildElement('gmx:MimeFileType', false), findChildElement('gco:LocalName', false)), readText());
1143
1142
  }
1144
1143
  /**
1145
1144
  * Translated values will also be collected in the translations object
@@ -2202,6 +2201,7 @@ class Iso19139Converter extends BaseConverter {
2202
2201
  lineage: readLineage$1,
2203
2202
  sourceRecords: readSourceRecords$1,
2204
2203
  associatedRecords: readAssociatedRecords$1,
2204
+ featureTypeDescriptions: () => undefined,
2205
2205
  onlineResources: readOnlineResources$2,
2206
2206
  temporalExtents: readTemporalExtents,
2207
2207
  spatialExtents: readSpatialExtents$1,
@@ -2241,6 +2241,7 @@ class Iso19139Converter extends BaseConverter {
2241
2241
  lineage: writeLineage$1,
2242
2242
  sourceRecords: writeSourceRecords$1,
2243
2243
  associatedRecords: writeAssociatedRecords$1,
2244
+ featureTypeDescriptions: () => undefined,
2244
2245
  onlineResources: writeOnlineResources$1,
2245
2246
  temporalExtents: writeTemporalExtents,
2246
2247
  spatialExtents: writeSpatialExtents,
@@ -2367,6 +2368,7 @@ class Iso19139Converter extends BaseConverter {
2367
2368
  const sourceRecords = this.readers['sourceRecords'](rootEl, tr);
2368
2369
  const associatedRecords = this.readers['associatedRecords'](rootEl, tr);
2369
2370
  const updateFrequency = this.readers['updateFrequency'](rootEl, tr);
2371
+ const featureTypeDescriptions = this.readers['featureTypeDescriptions'](rootEl, tr);
2370
2372
  return this.afterRecordRead({
2371
2373
  ...this.readBaseRecord(rootEl, tr),
2372
2374
  kind,
@@ -2377,6 +2379,7 @@ class Iso19139Converter extends BaseConverter {
2377
2379
  ...(spatialRepresentation && { spatialRepresentation }),
2378
2380
  temporalExtents,
2379
2381
  updateFrequency,
2382
+ ...(featureTypeDescriptions?.length && { featureTypeDescriptions }),
2380
2383
  translations: tr,
2381
2384
  });
2382
2385
  }
@@ -2466,6 +2469,8 @@ class Iso19139Converter extends BaseConverter {
2466
2469
  this.writers['resourceIdentifiers'](record, rootEl);
2467
2470
  if (record.kind === 'dataset') {
2468
2471
  fieldChanged('status') && this.writers['status'](record, rootEl);
2472
+ fieldChanged('featureTypeDescriptions') &&
2473
+ this.writers['featureTypeDescriptions'](record, rootEl);
2469
2474
  }
2470
2475
  if (record.kind === 'dataset' || record.kind === 'reuse') {
2471
2476
  fieldChanged('updateFrequency') &&
@@ -2633,6 +2638,34 @@ function readDefaultLanguage$1(rootEl) {
2633
2638
  function readOtherLanguages(rootEl) {
2634
2639
  return pipe(findChildrenElement('mdb:otherLocale', false), mapArray(readLocaleElement()), map((languages) => languages.filter((lang) => lang !== null)))(rootEl);
2635
2640
  }
2641
+ function extractCharacterStringOrText() {
2642
+ return fallback(extractCharacterString(), readText());
2643
+ }
2644
+ function extractListedValue() {
2645
+ return pipe(combine(pipe(findChildElement('gfc:code', false), extractCharacterString()), pipe(findChildElement('gfc:label', false), extractCharacterString()), pipe(findChildElement('gfc:definition', false), extractCharacterString())), map(([code, label, description]) => ({
2646
+ value: code ?? '',
2647
+ ...(label && { label }),
2648
+ ...(description && { description }),
2649
+ })));
2650
+ }
2651
+ function extractFeatureAttribute() {
2652
+ return pipe(combine(pipe(findChildElement('gfc:memberName', false), extractCharacterStringOrText()), pipe(findChildElement('gfc:designation', false), extractCharacterString()), pipe(findChildElement('gfc:definition', false), extractCharacterString()), pipe(findChildElement('gfc:code', false), extractCharacterString()), pipe(findNestedElement('gfc:valueType', 'gco:TypeName', 'gco:aName'), extractCharacterString()), pipe(findNestedElements('gfc:listedValue', 'gfc:FC_ListedValue'), mapArray(extractListedValue()), filterArray((value) => !!(value.value || value.label)))), map(([name, label, description, code, type, values]) => ({
2653
+ name: name ?? '',
2654
+ ...(label && { label }),
2655
+ ...(description && { description }),
2656
+ ...(code && { code }),
2657
+ ...(type && { type }),
2658
+ ...(values.length > 0 && { values }),
2659
+ })));
2660
+ }
2661
+ function readFeatureTypeDescriptions(rootEl) {
2662
+ return pipe(findNestedElements('mdb:contentInfo', 'mrc:MD_FeatureCatalogue', 'mrc:featureCatalogue', 'gfc:FC_FeatureCatalogue', 'gfc:featureType', 'gfc:FC_FeatureType'), mapArray(pipe(combine(pipe(findChildElement('gfc:typeName', false), extractCharacterStringOrText()), pipe(findChildElement('gfc:designation', false), extractCharacterString()), pipe(findChildElement('gfc:definition', false), extractCharacterString()), pipe(findNestedElements('gfc:carrierOfCharacteristics', 'gfc:FC_FeatureAttribute'), mapArray(extractFeatureAttribute()))), map(([name, label, description, attributes]) => ({
2663
+ name: name ?? '',
2664
+ ...(label && { label }),
2665
+ ...(description && { description }),
2666
+ attributes,
2667
+ })))))(rootEl);
2668
+ }
2636
2669
 
2637
2670
  function writeUniqueIdentifier$1(record, rootEl) {
2638
2671
  pipe(findNestedChildOrCreate('mdb:metadataIdentifier', 'mcc:MD_Identifier', 'mcc:code'), writeCharacterString(record.uniqueIdentifier))(rootEl);
@@ -2787,6 +2820,52 @@ function writeAssociatedRecords(record, rootEl) {
2787
2820
  .filter((assoc) => assoc.uniqueIdentifier && assoc.associationType)
2788
2821
  .map((assoc) => pipe(createNestedElement('mri:associatedResource', 'mri:MD_AssociatedResource'), appendChildren(pipe(createNestedElement('mri:associationType', 'mri:DS_AssociationTypeCode'), writeAttribute('codeList', 'http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#DS_AssociationTypeCode'), writeAttribute('codeListValue', assoc.associationType)), pipe(createElement('mri:metadataReference'), writeAttribute('uuidref', assoc.uniqueIdentifier)))))))(rootEl);
2789
2822
  }
2823
+ function createNilElement(name, nilReason) {
2824
+ return pipe(createElement(name), writeAttribute('gco:nilReason', nilReason));
2825
+ }
2826
+ function createFeatureCatalogueShell() {
2827
+ return pipe(createNestedElement('mdb:contentInfo', 'mrc:MD_FeatureCatalogue', 'mrc:featureCatalogue', 'gfc:FC_FeatureCatalogue'),
2828
+ // create mandatory elements which are not part of the model yet
2829
+ appendChildren(createNilElement('cat:name', 'missing'), createNilElement('cat:scope', 'missing'), createNilElement('cat:versionNumber', 'missing'), createNilElement('cat:versionDate', 'missing'), createNilElement('gfc:producer', 'missing')));
2830
+ }
2831
+ function createListedValue(value) {
2832
+ return pipe(createNestedElement('gfc:listedValue', 'gfc:FC_ListedValue'), appendChildren(value.label
2833
+ ? pipe(createElement('gfc:label'), writeCharacterString(value.label))
2834
+ : createNilElement('gfc:label', 'missing'), value.value
2835
+ ? pipe(createElement('gfc:code'), writeCharacterString(value.value))
2836
+ : null, value.description
2837
+ ? pipe(createElement('gfc:definition'), writeCharacterString(value.description))
2838
+ : null));
2839
+ }
2840
+ function createFeatureAttribute(attribute) {
2841
+ return pipe(createNestedElement('gfc:carrierOfCharacteristics', 'gfc:FC_FeatureAttribute'), appendChildren(pipe(createElement('gfc:memberName'), setTextContent(attribute.name)), attribute.description
2842
+ ? pipe(createElement('gfc:definition'), writeCharacterString(attribute.description))
2843
+ : null, createNilElement('gfc:cardinality', 'missing'), attribute.label
2844
+ ? pipe(createElement('gfc:designation'), writeCharacterString(attribute.label))
2845
+ : null, attribute.code
2846
+ ? pipe(createElement('gfc:code'), writeCharacterString(attribute.code))
2847
+ : null, attribute.type
2848
+ ? pipe(createNestedElement('gfc:valueType', 'gco:TypeName', 'gco:aName'), writeCharacterString(attribute.type))
2849
+ : null, ...(attribute.values ?? [])
2850
+ .filter((value) => value.value || value.label)
2851
+ .map(createListedValue)));
2852
+ }
2853
+ function createFeatureType(featureType) {
2854
+ return pipe(createNestedElement('gfc:featureType', 'gfc:FC_FeatureType'), appendChildren(pipe(createElement('gfc:typeName'), setTextContent(featureType.name)), featureType.description
2855
+ ? pipe(createElement('gfc:definition'), writeCharacterString(featureType.description))
2856
+ : null, pipe(createNestedElement('gfc:isAbstract', 'gco:Boolean'), setTextContent('false')), featureType.label
2857
+ ? pipe(createElement('gfc:designation'), writeCharacterString(featureType.label))
2858
+ : null, ...featureType.attributes.map(createFeatureAttribute), createNilElement('gfc:featureCatalogue', 'missing')));
2859
+ }
2860
+ function writeFeatureTypeDescriptions(record, rootEl) {
2861
+ const featureTypes = record.featureTypeDescriptions ?? [];
2862
+ const catalogues = findNestedElements('mdb:contentInfo', 'mrc:MD_FeatureCatalogue', 'mrc:featureCatalogue', 'gfc:FC_FeatureCatalogue')(rootEl);
2863
+ catalogues.forEach((catalogue) => removeChildrenByName('gfc:featureType')(catalogue));
2864
+ if (!featureTypes.length)
2865
+ return;
2866
+ const catalogue = catalogues[0] ?? appendChildTree(createFeatureCatalogueShell())(rootEl);
2867
+ appendChildren(...featureTypes.map(createFeatureType))(catalogue);
2868
+ }
2790
2869
 
2791
2870
  class Iso191153Converter extends Iso19139Converter {
2792
2871
  constructor() {
@@ -2803,6 +2882,7 @@ class Iso191153Converter extends Iso19139Converter {
2803
2882
  this.readers['lineage'] = readLineage;
2804
2883
  this.readers['sourceRecords'] = readSourceRecords;
2805
2884
  this.readers['associatedRecords'] = readAssociatedRecords;
2885
+ this.readers['featureTypeDescriptions'] = readFeatureTypeDescriptions;
2806
2886
  this.readers['onlineResources'] = readOnlineResources$1;
2807
2887
  this.readers['defaultLanguage'] = readDefaultLanguage$1;
2808
2888
  this.readers['otherLanguages'] = readOtherLanguages;
@@ -2823,6 +2903,7 @@ class Iso191153Converter extends Iso19139Converter {
2823
2903
  this.writers['lineage'] = writeLineage;
2824
2904
  this.writers['sourceRecords'] = writeSourceRecords;
2825
2905
  this.writers['associatedRecords'] = writeAssociatedRecords;
2906
+ this.writers['featureTypeDescriptions'] = writeFeatureTypeDescriptions;
2826
2907
  this.writers['onlineResources'] = writeOnlineResources;
2827
2908
  this.writers['status'] = writeStatus;
2828
2909
  this.writers['spatialRepresentation'] = writeSpatialRepresentation;
@@ -2912,10 +2993,12 @@ class Iso191153Converter extends Iso19139Converter {
2912
2993
  });
2913
2994
  }
2914
2995
  async writeRecord(record, reference) {
2915
- let result = await super.writeRecord(record, reference);
2916
- // fix gco namespace definition (changes between iso19139 and iso19115-3
2917
- result = result.replace('"http://www.isotc211.org/2005/gco"', '"http://standards.iso.org/iso/19115/-3/gco/1.0"');
2918
- return result;
2996
+ const result = await super.writeRecord(record, reference);
2997
+ // fix the gco and gfc namespace definitions (they change between iso19139 and iso19115-3);
2998
+ // only on the root element, where they are declared, so that nested declarations stay untouched
2999
+ return result.replace(/<mdb:MD_Metadata[^>]*>/, (rootTag) => rootTag
3000
+ .replace('"http://www.isotc211.org/2005/gco"', '"http://standards.iso.org/iso/19115/-3/gco/1.0"')
3001
+ .replace('"http://www.isotc211.org/2005/gfc"', '"http://standards.iso.org/iso/19110/gfc/1.1"'));
2919
3002
  }
2920
3003
  }
2921
3004
 
@@ -3459,6 +3542,7 @@ class DcatApConverter extends BaseConverter {
3459
3542
  lineage: () => '',
3460
3543
  sourceRecords: () => [],
3461
3544
  associatedRecords: () => [],
3545
+ featureTypeDescriptions: () => undefined,
3462
3546
  temporalExtents: () => [],
3463
3547
  spatialRepresentation: () => undefined,
3464
3548
  extras: () => undefined,
@@ -3494,6 +3578,7 @@ class DcatApConverter extends BaseConverter {
3494
3578
  lineage: () => undefined,
3495
3579
  sourceRecords: () => [],
3496
3580
  associatedRecords: () => [],
3581
+ featureTypeDescriptions: () => undefined,
3497
3582
  onlineResources: () => undefined,
3498
3583
  temporalExtents: () => undefined,
3499
3584
  spatialExtents: () => undefined,
@@ -18904,9 +18989,15 @@ class Gn4FieldMapper {
18904
18989
  isOpenData: (output, source) => this.addExtra({
18905
18990
  isOpenData: selectField(source, 'isOpenData') !== 'false',
18906
18991
  }, output),
18907
- featureTypes: (output, source) => this.addExtra({
18908
- featureTypes: selectField(source, 'featureTypes'),
18909
- }, output),
18992
+ featureTypes: (output, source) => {
18993
+ const featureTypes = getAsArray(selectField(source, 'featureTypes'));
18994
+ if (!featureTypes.length)
18995
+ return output;
18996
+ return {
18997
+ ...output,
18998
+ featureTypeDescriptions: this.featureTypesField(featureTypes),
18999
+ };
19000
+ },
18910
19001
  related: (output, source) => {
18911
19002
  const related = selectField(source, 'related');
18912
19003
  const fcatSource = selectField(getFirstValue(selectField(related, 'fcats')) ?? {}, '_source');
@@ -19042,6 +19133,27 @@ class Gn4FieldMapper {
19042
19133
  },
19043
19134
  };
19044
19135
  this.genericField = (output) => output;
19136
+ this.featureTypesField = (featureTypes) => featureTypes.map((featureType) => ({
19137
+ name: featureType.typeName ?? '',
19138
+ ...(featureType.definition && {
19139
+ description: featureType.definition,
19140
+ }),
19141
+ attributes: getAsArray(featureType.attributeTable ?? []).map((attr) => {
19142
+ const values = (attr.values ?? [])
19143
+ .filter((value) => value.code || value.label)
19144
+ .map((value) => ({
19145
+ value: value.code || '',
19146
+ ...(value.label && { label: value.label }),
19147
+ }));
19148
+ return {
19149
+ name: attr.name ?? '',
19150
+ ...(attr.definition && { description: attr.definition }),
19151
+ ...(attr.code && { code: attr.code }),
19152
+ ...(attr.type && { type: attr.type }),
19153
+ ...(values.length > 0 && { values }),
19154
+ };
19155
+ }),
19156
+ }));
19045
19157
  this.constraintField = (type, output, constraintArray) => {
19046
19158
  let outputField;
19047
19159
  switch (type) {
@@ -19664,10 +19776,25 @@ function getGeometryBoundingBox(geometry) {
19664
19776
  }
19665
19777
  }
19666
19778
  /**
19667
- * Builds the closed GeoJSON Polygon matching the given bounding box.
19779
+ * Builds the GeoJSON Geometry matching the given bounding box.
19668
19780
  */
19669
- function bboxToPolygon(bbox) {
19781
+ function bboxToGeometry(bbox) {
19670
19782
  const [minX, minY, maxX, maxY] = bbox;
19783
+ if (minX === maxX && minY === maxY) {
19784
+ return {
19785
+ type: 'Point',
19786
+ coordinates: [minX, minY],
19787
+ };
19788
+ }
19789
+ if (minX === maxX || minY === maxY) {
19790
+ return {
19791
+ type: 'LineString',
19792
+ coordinates: [
19793
+ [minX, minY],
19794
+ [maxX, maxY],
19795
+ ],
19796
+ };
19797
+ }
19671
19798
  return {
19672
19799
  type: 'Polygon',
19673
19800
  coordinates: [
@@ -19689,7 +19816,7 @@ function spatialExtentToGeometry(extent) {
19689
19816
  if (extent.geometry)
19690
19817
  return extent.geometry;
19691
19818
  if (extent.bbox)
19692
- return bboxToPolygon(extent.bbox);
19819
+ return bboxToGeometry(extent.bbox);
19693
19820
  return null;
19694
19821
  }
19695
19822
  /**
@@ -20452,7 +20579,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
20452
20579
  }] } });
20453
20580
 
20454
20581
  var name = "geonetwork-ui";
20455
- var version = "2.11.0-dev.6c8b66d60";
20582
+ var version = "2.11.0-dev.73a68fe82";
20456
20583
  var engines = {
20457
20584
  node: ">=24"
20458
20585
  };
@@ -20494,10 +20621,10 @@ var dependencies = {
20494
20621
  "@biesbjerg/ngx-translate-extract-marker": "~1.0.0",
20495
20622
  "@camptocamp/ogc-client": "1.3.1-dev.200c02a",
20496
20623
  "@duckdb/duckdb-wasm": "~1.32.0",
20497
- "@geospatial-sdk/core": "0.0.5-dev.78",
20498
- "@geospatial-sdk/geocoding": "0.0.5-dev.78",
20499
- "@geospatial-sdk/legend": "0.0.5-dev.78",
20500
- "@geospatial-sdk/openlayers": "0.0.5-dev.78",
20624
+ "@geospatial-sdk/core": "0.0.5-dev.86.sha-124eae3",
20625
+ "@geospatial-sdk/geocoding": "0.0.5-dev.86.sha-124eae3",
20626
+ "@geospatial-sdk/legend": "0.0.5-dev.86.sha-124eae3",
20627
+ "@geospatial-sdk/openlayers": "0.0.5-dev.86.sha-124eae3",
20501
20628
  "@ltd/j-toml": "~1.38.0",
20502
20629
  "@messageformat/core": "~3.4.0",
20503
20630
  "@ng-icons/core": "~32.5.0",
@@ -20514,6 +20641,7 @@ var dependencies = {
20514
20641
  "embla-carousel": "~8.6.0",
20515
20642
  "flag-icons": "~7.5.0",
20516
20643
  "geojson-validation": "~1.0.2",
20644
+ jsonpointer: "^5.0.1",
20517
20645
  marked: "~17.0.4",
20518
20646
  "ngx-dropzone": "~3.1.0",
20519
20647
  "ngx-translate-messageformat-compiler": "~7.2.0",
@@ -20690,6 +20818,7 @@ class ElasticsearchService {
20690
20818
  // runtime fields are computed using a Painless script
20691
20819
  // see: https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime-mapping-fields.html
20692
20820
  this.runtimeFields = {};
20821
+ this.fieldAliases = {};
20693
20822
  }
20694
20823
  // we're using getters in case the defined languages change over time
20695
20824
  get metadataLang() {
@@ -20761,6 +20890,9 @@ class ElasticsearchService {
20761
20890
  registerRuntimeField(fieldName, expression, type = 'keyword') {
20762
20891
  this.runtimeFields[fieldName] = { script: expression, type };
20763
20892
  }
20893
+ registerFieldAlias(fieldIdentifier, esFieldName) {
20894
+ this.fieldAliases[fieldIdentifier] = esFieldName;
20895
+ }
20764
20896
  getMetadataByIdsPayload(uuids) {
20765
20897
  return {
20766
20898
  query: {
@@ -20882,12 +21014,25 @@ class ElasticsearchService {
20882
21014
  }
20883
21015
  return Object.values(filters).find(isBoundingBox);
20884
21016
  }
20885
- // if a field registered min/max runtime fields, its dates form an interval
20886
- // the record matches if that interval intersects the filter range
21017
+ // builds a query matching records whose dates intersect the filter range
20887
21018
  buildDateRangeQuery(searchField, dateRange) {
21019
+ // fields ending with 'DateRange' maps as ES range type
21020
+ if (searchField.endsWith('DateRange')) {
21021
+ return {
21022
+ range: {
21023
+ [searchField]: {
21024
+ ...(dateRange.start && { gte: formatDate(dateRange.start) }),
21025
+ ...(dateRange.end && { lte: formatDate(dateRange.end) }),
21026
+ format: 'yyyy-MM-dd',
21027
+ relation: 'intersects',
21028
+ },
21029
+ },
21030
+ };
21031
+ }
20888
21032
  const minField = `${searchField}Min`;
20889
21033
  const maxField = `${searchField}Max`;
20890
21034
  if (minField in this.runtimeFields && maxField in this.runtimeFields) {
21035
+ // min/max runtime fields form an interval per record; match if it intersects the filter range
20891
21036
  const filter = [
20892
21037
  dateRange.start && {
20893
21038
  range: {
@@ -20942,7 +21087,7 @@ class ElasticsearchService {
20942
21087
  .filter((fieldname) => !Array.isArray(filters[fieldname]))
20943
21088
  .filter((fieldname) => filters[fieldname] &&
20944
21089
  JSON.stringify(filters[fieldname]) !== '{}')
20945
- .map((fieldname) => `${fieldname}:(${makeQuery(filters[fieldname])})`)
21090
+ .map((fieldname) => `${this.fieldAliases[fieldname] ?? fieldname}:(${makeQuery(filters[fieldname])})`)
20946
21091
  .join(' AND ');
20947
21092
  if (filters['gn-ui-crossFieldFilter']) {
20948
21093
  queryString = `${queryString} AND (${filters['gn-ui-crossFieldFilter']})`;
@@ -21010,7 +21155,7 @@ class ElasticsearchService {
21010
21155
  });
21011
21156
  }
21012
21157
  const boostGeometry = spatialFilterExtent
21013
- ? bboxToPolygon(spatialFilterExtent)
21158
+ ? bboxToGeometry(spatialFilterExtent)
21014
21159
  : geometry;
21015
21160
  if (boostGeometry) {
21016
21161
  // boosts applied using the filter geometry:
@@ -21018,15 +21163,19 @@ class ElasticsearchService {
21018
21163
  // * records intersecting the geometry receive a boost of 2
21019
21164
  // * records close to the geometry center receive a boost of 5 (based on the `location` field)
21020
21165
  // * records on the outskirt of the geometry receive a boost of 2.5
21021
- should.push({
21022
- geo_shape: {
21023
- geom: {
21024
- shape: boostGeometry,
21025
- relation: 'within',
21166
+ if (boostGeometry.type === 'Polygon' ||
21167
+ boostGeometry.type === 'MultiPolygon') {
21168
+ should.push({
21169
+ geo_shape: {
21170
+ geom: {
21171
+ shape: boostGeometry,
21172
+ relation: 'within',
21173
+ },
21174
+ boost: 5.0,
21026
21175
  },
21027
- boost: 5.0,
21028
- },
21029
- }, {
21176
+ });
21177
+ }
21178
+ should.push({
21030
21179
  geo_shape: {
21031
21180
  geom: {
21032
21181
  shape: boostGeometry,
@@ -21063,14 +21212,17 @@ class ElasticsearchService {
21063
21212
  getLength(westToCenter) +
21064
21213
  getLength(eastToCenter)) /
21065
21214
  4;
21066
- should.push({
21067
- distance_feature: {
21068
- field: 'location',
21069
- pivot: `${Math.round(cutoffDistance).toFixed(0)}m`,
21070
- origin: center,
21071
- boost: 5.0,
21072
- },
21073
- });
21215
+ const pivot = Math.round(cutoffDistance);
21216
+ if (pivot > 0) {
21217
+ should.push({
21218
+ distance_feature: {
21219
+ field: 'location',
21220
+ pivot: `${pivot.toFixed(0)}m`,
21221
+ origin: center,
21222
+ boost: 5.0,
21223
+ },
21224
+ });
21225
+ }
21074
21226
  }
21075
21227
  return {
21076
21228
  bool: {
@@ -21240,6 +21392,12 @@ class ElasticsearchService {
21240
21392
  order: {
21241
21393
  [`_${aggregation.sort[1]}`]: aggregation.sort[0],
21242
21394
  },
21395
+ ...(aggregation.includeValues && {
21396
+ include: aggregation.includeValues,
21397
+ }),
21398
+ ...(aggregation.excludeValues && {
21399
+ exclude: aggregation.excludeValues,
21400
+ }),
21243
21401
  },
21244
21402
  };
21245
21403
  case 'histogram':
@@ -21341,10 +21499,21 @@ class Gn4Repository {
21341
21499
  this.platformService = inject(PlatformServiceInterface);
21342
21500
  this.gn4LanguagesApi = inject(LanguagesApiService);
21343
21501
  this.settingsService = inject(Gn4SettingsService);
21502
+ this.gn4TagsApi = inject(TagsApiService);
21344
21503
  this.disableDraft = inject(DISABLE_DRAFT, { optional: true }) ?? false;
21345
21504
  this.defaultConverter = inject(DEFAULT_RECORD_CONVERTER);
21346
21505
  this._draftsChanged = new Subject();
21347
21506
  this.draftsChanged$ = this._draftsChanged.asObservable();
21507
+ /*
21508
+ * FLAGS
21509
+ * Note: in GN4 API, categories are named "tags"
21510
+ */
21511
+ this.categoriesIdentifierForFlags = this.gn4TagsApi.getTags().pipe(map$1((categories) => categories.reduce((acc, category) => {
21512
+ if (category.name.startsWith('geonetwork-ui-flag:')) {
21513
+ acc[category.name.replace(/^geonetwork-ui-flag:/, '')] = category.id;
21514
+ }
21515
+ return acc;
21516
+ }, {})), shareReplay$1(1));
21348
21517
  }
21349
21518
  search({ filters, fields, offset, limit, sort, filterIds, filterGeometry, }) {
21350
21519
  return this.gn4SearchApi
@@ -21374,42 +21543,16 @@ class Gn4Repository {
21374
21543
  ? this.gn4Mapper.readRecords(records)
21375
21544
  : of(null)));
21376
21545
  }
21377
- mapEmbeddedFeatureCatalog(featureTypes) {
21378
- return {
21379
- featureTypes: featureTypes.map((featureType) => ({
21380
- name: featureType.typeName || '',
21381
- definition: featureType.definition || '',
21382
- attributes: Array.isArray(featureType.attributeTable)
21383
- ? featureType.attributeTable.map((attr) => {
21384
- const values = attr.values
21385
- ?.filter((v) => v.code || v.label)
21386
- .map((v) => ({
21387
- code: v.code,
21388
- label: v.label,
21389
- }));
21390
- return {
21391
- name: attr.name,
21392
- code: attr.code,
21393
- definition: attr.definition,
21394
- type: attr.type,
21395
- ...(values?.length > 0 ? { values } : {}),
21396
- };
21397
- })
21398
- : [],
21399
- })),
21400
- };
21401
- }
21402
- getFeatureCatalog(record, visited = new Set() // prevent looping
21546
+ queryLinkedFeatureCatalog(record, visited = new Set() // prevent looping
21403
21547
  ) {
21404
- if (record.extras?.['featureTypes'] &&
21405
- Array.isArray(record.extras['featureTypes']) &&
21406
- record.extras['featureTypes'].length > 0) {
21407
- return of(this.mapEmbeddedFeatureCatalog(record.extras['featureTypes']));
21548
+ if ('featureTypeDescriptions' in record &&
21549
+ record.featureTypeDescriptions?.length > 0) {
21550
+ return of({ featureTypes: record.featureTypeDescriptions });
21408
21551
  }
21409
21552
  const featureCatalogIdentifier = record.extras['featureCatalogIdentifier'];
21410
21553
  if (featureCatalogIdentifier && !visited.has(featureCatalogIdentifier)) {
21411
21554
  visited.add(featureCatalogIdentifier);
21412
- return this.getRecord(featureCatalogIdentifier).pipe(switchMap((record) => record ? this.getFeatureCatalog(record, visited) : of(null)));
21555
+ return this.getRecord(featureCatalogIdentifier).pipe(switchMap((record) => record ? this.queryLinkedFeatureCatalog(record, visited) : of(null)));
21413
21556
  }
21414
21557
  return of(null);
21415
21558
  }
@@ -21672,6 +21815,32 @@ class Gn4Repository {
21672
21815
  removeRecordFromLocalStorage(recordId) {
21673
21816
  window.localStorage.removeItem(this.getLocalStorageKeyForRecord(recordId));
21674
21817
  }
21818
+ getCategoryIdForFlag(flagName) {
21819
+ return this.categoriesIdentifierForFlags.pipe(map$1((categories) => {
21820
+ const categoryId = categories[flagName];
21821
+ if (categoryId === undefined) {
21822
+ console.warn(`The record flag ${flagName} is not created on GeoNetwork backend; please create a category with the name geonetwork-ui-flag:${flagName} for this to work.`);
21823
+ return null;
21824
+ }
21825
+ return categoryId;
21826
+ }));
21827
+ }
21828
+ setRecordFlag(uniqueIdentifier, flagName, value) {
21829
+ return this.getCategoryIdForFlag(flagName).pipe(switchMap((categoryId) => {
21830
+ if (categoryId === null)
21831
+ return of();
21832
+ return value
21833
+ ? this.gn4RecordsApi.tagRecord(uniqueIdentifier, [categoryId], false)
21834
+ : this.gn4RecordsApi.deleteTags(uniqueIdentifier, [categoryId]);
21835
+ }));
21836
+ }
21837
+ getRecordFlag(uniqueIdentifier, flagName) {
21838
+ return this.gn4RecordsApi.getRecordTags(uniqueIdentifier).pipe(withLatestFrom(this.getCategoryIdForFlag(flagName)), map$1(([tags, categoryId]) => {
21839
+ if (categoryId === null)
21840
+ return false;
21841
+ return Array.from(tags).some((tag) => tag.id === categoryId);
21842
+ }));
21843
+ }
21675
21844
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: Gn4Repository, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
21676
21845
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: Gn4Repository }); }
21677
21846
  }
@@ -22287,6 +22456,9 @@ class Gn4PlatformService {
22287
22456
  this.me$ = this.disableAuth
22288
22457
  ? of(null)
22289
22458
  : of(true).pipe(switchMap(() => this.meApi.getMe()), switchMap((apiUser) => this.mapper.userFromMeApi(apiUser)), shareReplay$1({ bufferSize: 1, refCount: true }));
22459
+ this.isAdmin$ = this.disableAuth
22460
+ ? of(false)
22461
+ : of(true).pipe(switchMap(() => this.meApi.getMe()), map$1((apiUser) => !!apiUser?.admin), shareReplay$1({ bufferSize: 1, refCount: true }));
22290
22462
  /**
22291
22463
  * A map of already loaded thesauri (groups of keywords); the key is a URI
22292
22464
  * @private
@@ -22322,6 +22494,9 @@ class Gn4PlatformService {
22322
22494
  isAnonymous() {
22323
22495
  return this.isUserAnonymous$;
22324
22496
  }
22497
+ isAdministrator() {
22498
+ return this.isAdmin$;
22499
+ }
22325
22500
  getOrganizations() {
22326
22501
  return undefined;
22327
22502
  }
@@ -23082,714 +23257,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
23082
23257
  }]
23083
23258
  }] });
23084
23259
 
23085
- const flatten = (base, obj, keepLevel = false) => Object.keys(obj).reduce((prev, curr) => {
23086
- const path = base ? `${base}.${curr}` : curr;
23087
- const val = obj[curr];
23088
- if (keepLevel) {
23089
- return { ...prev, [path]: flatten('', val) };
23090
- }
23091
- else if (typeof val === 'object' && !Array.isArray(val)) {
23092
- return {
23093
- ...prev,
23094
- ...flatten(path, val),
23095
- };
23096
- }
23097
- else {
23098
- return { ...prev, [path]: val };
23099
- }
23100
- }, {});
23101
- const checkKeys = (input, mandatory, optional) => {
23102
- const keys = Object.keys(input);
23103
- const missing = mandatory.filter((key) => keys.indexOf(key) === -1);
23104
- const unrecognized = keys.filter((key) => mandatory.indexOf(key) === -1 && optional.indexOf(key) === -1);
23105
- return {
23106
- missing,
23107
- unrecognized,
23108
- };
23109
- };
23110
- /**
23111
- * Only keeps recognized keys, flatten nested values (to allow having "." in keys),
23112
- * pushes warnings and errors to the given arrays; returns null in case of error
23113
- */
23114
- function parseConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
23115
- if (typeof fullConfigObj[sectionName] !== 'object') {
23116
- if (mandatoryKeys.length === 0)
23117
- return null;
23118
- outErrors.push(`The [${sectionName}] mandatory section is missing.`);
23119
- return null;
23120
- }
23121
- const sectionConf = fullConfigObj[sectionName];
23122
- const keysCheck = checkKeys(sectionConf, mandatoryKeys, optionalKeys);
23123
- if (keysCheck.missing.length) {
23124
- // note: this is not thrown to allow merging several Errors down the line
23125
- outErrors.push(`In the [${sectionName}] section: ${keysCheck.missing.join(', ')}`);
23126
- return null;
23127
- }
23128
- else if (keysCheck.unrecognized.length) {
23129
- outWarnings.push(`In the [${sectionName}] section: ${keysCheck.unrecognized.join(', ')}`);
23130
- keysCheck.unrecognized.forEach((key) => delete sectionConf[key]);
23131
- }
23132
- return sectionConf;
23133
- }
23134
- /**
23135
- * Same as parseConfigSection but keeps all keys, recognized or not
23136
- * Also the first level is the language code (e.g. 'en')
23137
- * This is optional
23138
- */
23139
- function parseTranslationsConfigSection(fullConfigObj, sectionName) {
23140
- if (typeof fullConfigObj[sectionName] !== 'object') {
23141
- return {};
23142
- }
23143
- return flatten('', fullConfigObj[sectionName], true);
23144
- }
23145
- /**
23146
- * Same as parseConfigSection but handles an array of configs; this is
23147
- * considered optional; returns null in case of error in at least one of
23148
- * the sections
23149
- */
23150
- function parseMultiConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
23151
- const sections = fullConfigObj[sectionName];
23152
- if (!sections) {
23153
- return [];
23154
- }
23155
- if (!Array.isArray(sections)) {
23156
- outErrors.push(`Expected [[${sectionName}]] to be an array of sections.`);
23157
- return null;
23158
- }
23159
- const result = sections.map((section) => parseConfigSection({ [sectionName]: section }, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors));
23160
- if (result.some((r) => r === null)) {
23161
- return null;
23162
- }
23163
- return result;
23164
- }
23165
- function checkMetadataLanguage(parsedConfigSection, outWarnings) {
23166
- const lang2 = toLang2(parsedConfigSection.metadata_language.toLowerCase());
23167
- if (lang2?.length !== 2) {
23168
- outWarnings.push(`In the [global] section: metadata_language = "${parsedConfigSection.metadata_language}" is not a recognized ISO 639 language code`);
23169
- }
23170
- return parsedConfigSection;
23171
- }
23172
- function checkNewRecordDefaultLanguage(parsedConfigSection, outWarnings) {
23173
- const lang2 = toLang2(parsedConfigSection.new_record_default_language.toLowerCase());
23174
- if (!(lang2 in LANG_2_TO_3_MAPPER)) {
23175
- outWarnings.push(`In the [editing] section: new_record_default_language = "${parsedConfigSection.new_record_default_language}" is not a recognized ISO 639 language code`);
23176
- return {
23177
- ...parsedConfigSection,
23178
- new_record_default_language: undefined,
23179
- };
23180
- }
23181
- return {
23182
- ...parsedConfigSection,
23183
- new_record_default_language: lang2,
23184
- };
23185
- }
23186
- function checkNewRecordStandard(parsedConfigSection, outWarnings) {
23187
- const standard = parsedConfigSection.new_record_standard;
23188
- const normalizedStandard = typeof standard === 'string' ? standard.trim().toLowerCase() : null;
23189
- if (normalizedStandard === 'iso19139' ||
23190
- normalizedStandard === 'iso19115-3') {
23191
- return {
23192
- ...parsedConfigSection,
23193
- new_record_standard: normalizedStandard,
23194
- };
23195
- }
23196
- outWarnings.push(`In the [editing] section: new_record_standard = "${standard}" is not a supported metadata standard`);
23197
- return {
23198
- ...parsedConfigSection,
23199
- new_record_standard: undefined,
23200
- };
23201
- }
23202
-
23203
- /**
23204
- * This loader extends the default one based on JSON files but also loads custom translations
23205
- * defined in the app configuration
23206
- * Implements a fallback on default lang if translated labels are empty
23207
- */
23208
- class FileWithOverridesTranslateLoader extends FileTranslateLoader {
23209
- getTranslation(lang) {
23210
- const baseLang = lang.substring(0, 2); // removing the right part of e.g. en_EN
23211
- return super.getTranslation(baseLang).pipe(map$1((translations) => ({
23212
- ...translations,
23213
- ...getCustomTranslations(baseLang),
23214
- })));
23215
- }
23216
- }
23217
-
23218
- const MISSING_CONFIG_ERROR = `Application configuration was not initialized correctly.
23219
- This error might show up in case of an invalid/malformed configuration file.
23220
-
23221
- Note: make sure that you have called \`loadAppConfig\` from '../../../../../libs/util/app-config/src' before starting the Angular application.`;
23222
- let globalConfig = null;
23223
- function getGlobalConfig() {
23224
- if (globalConfig === null)
23225
- throw new Error(MISSING_CONFIG_ERROR);
23226
- return globalConfig;
23227
- }
23228
- let themeConfig = null;
23229
- function getThemeConfig() {
23230
- if (themeConfig === null)
23231
- throw new Error(MISSING_CONFIG_ERROR);
23232
- return themeConfig;
23233
- }
23234
- let mapConfig = null;
23235
- function getOptionalMapConfig() {
23236
- return mapConfig;
23237
- }
23238
- let searchConfig = null;
23239
- function getOptionalSearchConfig() {
23240
- return searchConfig;
23241
- }
23242
- let editorConfig = null;
23243
- function getOptionalEditorConfig() {
23244
- return editorConfig;
23245
- }
23246
- let metadataQualityConfig = null;
23247
- function getMetadataQualityConfig() {
23248
- return (metadataQualityConfig ||
23249
- {
23250
- ENABLED: false,
23251
- });
23252
- }
23253
- let customTranslations = null;
23254
- function getCustomTranslations(langCode) {
23255
- if (customTranslations === null)
23256
- throw new Error(MISSING_CONFIG_ERROR);
23257
- return langCode in customTranslations ? customTranslations[langCode] : {};
23258
- }
23259
- let appConfigLoaded = false;
23260
- function loadAppConfig(configUrl = 'assets/configuration/default.toml') {
23261
- console.log(`[geonetwork-ui] Loading application configuration from ${configUrl}`);
23262
- return fetch(configUrl)
23263
- .then((resp) => {
23264
- if (!resp.ok)
23265
- throw new Error('Configuration file could not be loaded');
23266
- return resp.text();
23267
- })
23268
- .then((conf) => {
23269
- let parsed;
23270
- try {
23271
- parsed = TOML.parse(conf, { joiner: '\n', bigint: false });
23272
- }
23273
- catch (e) {
23274
- throw new Error(`An error occurred when parsing the configuration file: ${e.message}`);
23275
- }
23276
- const errors = [];
23277
- const warnings = [];
23278
- let parsedGlobalSection = parseConfigSection(parsed, 'global', ['geonetwork4_api_url'], [
23279
- 'datahub_url',
23280
- 'edit_url_template',
23281
- 'proxy_path',
23282
- 'metadata_language',
23283
- 'login_url',
23284
- 'logout_url',
23285
- 'settings_url',
23286
- 'web_component_embedder_url',
23287
- 'languages',
23288
- 'contact_email',
23289
- 'reuse_form_url',
23290
- ], warnings, errors);
23291
- if (parsedGlobalSection?.metadata_language) {
23292
- parsedGlobalSection = checkMetadataLanguage(parsedGlobalSection, warnings);
23293
- }
23294
- globalConfig =
23295
- parsedGlobalSection === null
23296
- ? null
23297
- : {
23298
- GN4_API_URL: parsedGlobalSection.geonetwork4_api_url,
23299
- DATAHUB_URL: parsedGlobalSection.datahub_url,
23300
- EDIT_URL_TEMPLATE: parsedGlobalSection.edit_url_template,
23301
- PROXY_PATH: parsedGlobalSection.proxy_path,
23302
- METADATA_LANGUAGE: parsedGlobalSection.metadata_language
23303
- ? parsedGlobalSection.metadata_language.toLowerCase()
23304
- : undefined,
23305
- LOGIN_URL: parsedGlobalSection.login_url,
23306
- LOGOUT_URL: parsedGlobalSection.logout_url,
23307
- SETTINGS_URL: parsedGlobalSection.settings_url,
23308
- WEB_COMPONENT_EMBEDDER_URL: parsedGlobalSection.web_component_embedder_url,
23309
- LANGUAGES: parsedGlobalSection.languages,
23310
- CONTACT_EMAIL: parsedGlobalSection.contact_email,
23311
- REUSE_FORM_URL: parsedGlobalSection.reuse_form_url,
23312
- };
23313
- const parsedLayersSections = parseMultiConfigSection(parsed, 'map_layer', ['type'], ['name', 'url', 'data', 'styleUrl', 'accessToken'], warnings, errors);
23314
- const parsedMapSection = parseConfigSection(parsed, 'map', [], [
23315
- 'max_zoom',
23316
- 'do_not_tile_wms',
23317
- 'max_extent',
23318
- 'max_feature_count',
23319
- 'baselayer',
23320
- 'do_not_use_default_basemap',
23321
- 'external_viewer_url_template',
23322
- 'external_viewer_open_new_tab',
23323
- ], warnings, errors);
23324
- mapConfig =
23325
- parsedMapSection === null || parsedLayersSections === null
23326
- ? null
23327
- : {
23328
- MAX_ZOOM: parsedMapSection.max_zoom,
23329
- DO_NOT_TILE_WMS: parsedMapSection.do_not_tile_wms,
23330
- MAX_EXTENT: parsedMapSection.max_extent,
23331
- MAX_FEATURE_COUNT: parsedMapSection.max_feature_count,
23332
- EXTERNAL_VIEWER_URL_TEMPLATE: parsedMapSection.external_viewer_url_template,
23333
- EXTERNAL_VIEWER_OPEN_NEW_TAB: parsedMapSection.external_viewer_open_new_tab,
23334
- DO_NOT_USE_DEFAULT_BASEMAP: !!parsedMapSection.do_not_use_default_basemap,
23335
- MAP_LAYERS: parsedLayersSections.map((map_layer) => ({
23336
- TYPE: map_layer.type,
23337
- URL: map_layer.url,
23338
- NAME: map_layer.name,
23339
- DATA: map_layer.data,
23340
- STYLE_URL: map_layer.styleUrl,
23341
- ACCESS_TOKEN: map_layer.accessToken,
23342
- })),
23343
- };
23344
- const parsedThemeSection = parseConfigSection(parsed, 'theme', ['primary_color', 'secondary_color', 'main_color', 'background_color'], [
23345
- 'header_foreground_color',
23346
- 'main_font',
23347
- 'title_font',
23348
- 'fonts_stylesheet_url',
23349
- 'thumbnail_placeholder',
23350
- 'header_background',
23351
- 'favicon',
23352
- ], warnings, errors);
23353
- themeConfig =
23354
- parsedThemeSection === null
23355
- ? null
23356
- : {
23357
- PRIMARY_COLOR: parsedThemeSection.primary_color,
23358
- SECONDARY_COLOR: parsedThemeSection.secondary_color,
23359
- MAIN_COLOR: parsedThemeSection.main_color,
23360
- BACKGROUND_COLOR: parsedThemeSection.background_color,
23361
- HEADER_FOREGROUND_COLOR: parsedThemeSection.header_foreground_color,
23362
- THUMBNAIL_PLACEHOLDER: parsedThemeSection.thumbnail_placeholder,
23363
- HEADER_BACKGROUND: parsedThemeSection.header_background,
23364
- TITLE_FONT: parsedThemeSection.title_font,
23365
- MAIN_FONT: parsedThemeSection.main_font,
23366
- FONTS_STYLESHEET_URL: parsedThemeSection.fonts_stylesheet_url,
23367
- FAVICON: parsedThemeSection.favicon,
23368
- };
23369
- const parsedSearchSection = parseConfigSection(parsed, 'search', [], [
23370
- 'record_kind_quick_filter',
23371
- 'filter_geometry_data',
23372
- 'filter_geometry_url',
23373
- 'do_not_use_default_search_preset',
23374
- 'search_preset',
23375
- 'advanced_filters',
23376
- 'limit',
23377
- 'spatial_extent_max_file_size',
23378
- ], warnings, errors);
23379
- const parsedSearchParams = parseMultiConfigSection(parsed, 'search_preset', ['name'], ['sort', 'filters'], warnings, errors);
23380
- searchConfig =
23381
- parsedSearchSection === null
23382
- ? null
23383
- : {
23384
- RECORD_KIND_QUICK_FILTER: parsedSearchSection.record_kind_quick_filter,
23385
- FILTER_GEOMETRY_DATA: parsedSearchSection.filter_geometry_data,
23386
- FILTER_GEOMETRY_URL: parsedSearchSection.filter_geometry_url,
23387
- DO_NOT_USE_DEFAULT_SEARCH_PRESET: !!parsedSearchSection.do_not_use_default_search_preset,
23388
- SEARCH_PRESET: parsedSearchParams.map((param) => ({
23389
- sort: param.sort,
23390
- name: param.name,
23391
- filters: param.filters,
23392
- })),
23393
- ADVANCED_FILTERS: parsedSearchSection.advanced_filters,
23394
- LIMIT: parsedSearchSection.limit,
23395
- SPATIAL_EXTENT_MAX_FILE_SIZE: parsedSearchSection.spatial_extent_max_file_size,
23396
- };
23397
- const parsedMetadataQualitySection = parseConfigSection(parsed, 'metadata-quality', [], ['enabled'], warnings, errors);
23398
- metadataQualityConfig =
23399
- parsedMetadataQualitySection === null
23400
- ? null
23401
- : {
23402
- ENABLED: parsedMetadataQualitySection.enabled,
23403
- SORTABLE: parsedMetadataQualitySection.sortable,
23404
- };
23405
- let parsedEditingSection = parseConfigSection(parsed, 'editing', [], ['new_record_default_language', 'new_record_standard'], warnings, errors);
23406
- if (parsedEditingSection !== null &&
23407
- parsedEditingSection.new_record_default_language !== undefined) {
23408
- parsedEditingSection = checkNewRecordDefaultLanguage(parsedEditingSection, warnings);
23409
- }
23410
- if (parsedEditingSection !== null &&
23411
- parsedEditingSection.new_record_standard !== undefined) {
23412
- parsedEditingSection = checkNewRecordStandard(parsedEditingSection, warnings);
23413
- }
23414
- editorConfig =
23415
- parsedEditingSection === null
23416
- ? null
23417
- : {
23418
- NEW_RECORD_DEFAULT_LANGUAGE: parsedEditingSection.new_record_default_language,
23419
- NEW_RECORD_STANDARD: parsedEditingSection.new_record_standard,
23420
- };
23421
- customTranslations = parseTranslationsConfigSection(parsed, 'translations');
23422
- if (errors.length) {
23423
- throw new Error(`One or more mandatory settings were missing from the configuration file.
23424
- ${errors.join('\n')}`);
23425
- }
23426
- else if (warnings.length) {
23427
- console.warn(`One or more unexpected settings were encountered in the configuration file.
23428
- ${warnings.join('\n')}`);
23429
- }
23430
- appConfigLoaded = true;
23431
- });
23432
- }
23433
- function isConfigLoaded() {
23434
- return appConfigLoaded;
23435
- }
23436
- function _reset() {
23437
- globalConfig = null;
23438
- themeConfig = null;
23439
- editorConfig = null;
23440
- customTranslations = null;
23441
- }
23442
- const TRANSLATE_WITH_OVERRIDES_CONFIG = {
23443
- compiler: {
23444
- provide: TranslateCompiler,
23445
- useClass: TranslateMessageFormatCompiler,
23446
- },
23447
- loader: [
23448
- {
23449
- provide: TRANSLATE_HTTP_LOADER_CONFIG,
23450
- useValue: {
23451
- prefix: './assets/i18n/',
23452
- suffix: '.json',
23453
- },
23454
- },
23455
- {
23456
- provide: TranslateLoader,
23457
- useClass: FileWithOverridesTranslateLoader,
23458
- deps: [HttpClient, TRANSLATE_HTTP_LOADER_CONFIG],
23459
- },
23460
- ],
23461
- };
23462
-
23463
- const okAppConfigFixture = () => `
23464
- [global]
23465
- geonetwork4_api_url = "/geonetwork/srv/api"
23466
- proxy_path = "/proxy/?url="
23467
- metadata_language = "fre"
23468
- login_url = "/cas/login?service="
23469
- logout_url = "/geonetwork/signout"
23470
- settings_url = "/geonetwork/settings"
23471
- web_component_embedder_url = "/datahub/wc-embedder.html"
23472
-
23473
- [map]
23474
- max_zoom = 10
23475
- max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
23476
- do_not_use_default_basemap = false
23477
- external_viewer_url_template = 'https://example.com/myviewer?'
23478
- external_viewer_open_new_tab = true
23479
- [[map_layer]]
23480
- type = "wms"
23481
- url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
23482
- name = "masque_hdf_ign_carto_latin1"
23483
- [[map_layer]]
23484
- type = "wfs"
23485
- url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
23486
- name = "masque_hdf_ign_carto_latin1"
23487
-
23488
- [theme]
23489
- primary_color = "#093564"
23490
- secondary_color = "#c2e9dc"
23491
- main_color = "#212029" # All-purpose text color
23492
- background_color = "#fdfbff"
23493
- thumbnail_placeholder = 'assets/img/placeholder.svg'
23494
- header_background = 'teal'
23495
- header_foreground_color = "#872e2e"
23496
- main_font = 'sans-serif'
23497
- title_font = 'serif'
23498
- fonts_stylesheet_url = "https://fonts.googleapis.com/css2?family=Open+Sans"
23499
-
23500
- [search]
23501
- record_kind_quick_filter = false
23502
- filter_geometry_url = 'https://my.domain.org/geom.json'
23503
- do_not_use_default_search_preset = false
23504
- advanced_filters = ['publicationYear', 'documentStandard', 'inspireKeyword', 'topic', 'license']
23505
-
23506
- [[search_preset]]
23507
- sort = "-createDate"
23508
- name = 'filterByOrgs'
23509
- filters.q = 'Carto'
23510
- filters.organisation = ['Org1', 'Org2']
23511
- filters.format = ['ESRI Shapefile']
23512
- filters.topic = ['boundaries']
23513
- filters.publicationYear = ['2023', '2022']
23514
- filters.spatial = ['yes']
23515
-
23516
- [translations.en]
23517
- "my.first.key" = 'First label.'
23518
- "my.second.key" = """
23519
- Second label,
23520
- on two lines."""
23521
-
23522
- [translations.de]
23523
- my.first.key = 'Erste Etikett.'
23524
-
23525
- [translations.fr]
23526
- my.sample.text = "Un bon exemple de texte."
23527
- "my.quoted.text" = 'du texte entre guillements.'
23528
- `;
23529
- const appConfigWithTranslationFixture = () => okAppConfigFixture();
23530
- const minimalAppConfigFixture = () => `
23531
- [global]
23532
- geonetwork4_api_url = "/geonetwork/srv/api"
23533
- proxy_path = "/proxy/?url="
23534
-
23535
- [theme]
23536
- primary_color = "#093564"
23537
- secondary_color = "#c2e9dc"
23538
- main_color = "#212029" # All-purpose text color
23539
- background_color = "#fdfbff"
23540
- `;
23541
- const mapConfigFixture = () => ({
23542
- MAX_ZOOM: 10,
23543
- MAX_EXTENT: [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855],
23544
- DO_NOT_USE_DEFAULT_BASEMAP: false,
23545
- DO_NOT_TILE_WMS: false,
23546
- EXTERNAL_VIEWER_URL_TEMPLATE: 'https://example.com/myviewer/#/?actions=[{"type":"CATALOG:ADD_LAYERS_FROM_CATALOGS","layers":["${layer_name}"],"sources":[{"url":"${service_url}","type":"${service_type}"}]}]',
23547
- EXTERNAL_VIEWER_OPEN_NEW_TAB: true,
23548
- MAP_LAYERS: [
23549
- {
23550
- TYPE: 'xyz',
23551
- URL: 'https://some-basemap-server',
23552
- },
23553
- {
23554
- TYPE: 'wms',
23555
- URL: 'https://some-wms-server',
23556
- NAME: 'some_layername',
23557
- },
23558
- {
23559
- TYPE: 'wfs',
23560
- URL: 'https://some-wfs-server',
23561
- NAME: 'some_layername',
23562
- },
23563
- ],
23564
- });
23565
- const malformedConfigFixture = () => `
23566
- {
23567
- "I thought": "we were still doing json"
23568
- }
23569
- `;
23570
- const missingMandatoryConfigFixture = () => `
23571
- [theme]
23572
- primary_color = "#093564"
23573
- secondary_color = "#c2e9dc"
23574
- background_color = "#fdfbff"
23575
- main_font = 'sans-serif'
23576
- `;
23577
- const wrongLanguageCodeConfigFixture = () => `
23578
- [global]
23579
- geonetwork4_api_url = "/geonetwork/srv/api"
23580
- proxy_path = "/proxy/?url="
23581
- metadata_language = "abc"
23582
-
23583
- [map]
23584
-
23585
- [theme]
23586
- primary_color = "#093564"
23587
- secondary_color = "#c2e9dc"
23588
- main_color = "#212029" # All-purpose text color
23589
- background_color = "#fdfbff"
23590
- `;
23591
- const unrecognizedKeysConfigFixture = () => `
23592
- [global]
23593
- geonetwork4_api_url = "/geonetwork/srv/api"
23594
- proxy_path = "/proxy/?url="
23595
- metadata_language = "fre"
23596
- another_path = '/whatever'
23597
-
23598
- [map]
23599
- max_zoom = 10
23600
- max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
23601
- do_not_use_default_basemap = false
23602
- external_viewer_url_template = 'https://example.com/myviewer?'
23603
- external_viewer_open_new_tab = true
23604
- another_zoom = 15
23605
- [[map_layer]]
23606
- type = "wms"
23607
- url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
23608
- name = "masque_hdf_ign_carto_latin1"
23609
- [[map_layer]]
23610
- type = "wfs"
23611
- url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
23612
- name = "masque_hdf_ign_carto_latin1"
23613
- another_layer = "wrong layer definition"
23614
-
23615
- [theme]
23616
- primary_color = "#093564"
23617
- secondary_color = "#c2e9dc"
23618
- main_color = "#212029" # All-purpose text color
23619
- background_color = "#fdfbff"
23620
- thumbnail_placeholder = 'assets/img/placeholder.svg'
23621
- header_background = 'teal'
23622
- header_foreground_color = "#872e2e"
23623
- main_font = 'sans-serif'
23624
- title_font = 'serif'
23625
- another_color = 'red'
23626
- `;
23627
-
23628
- function getMapContextLayerFromConfig(config) {
23629
- switch (config.TYPE) {
23630
- case 'wms':
23631
- return {
23632
- type: 'wms',
23633
- url: config.URL,
23634
- name: config.NAME,
23635
- };
23636
- case 'wfs':
23637
- return {
23638
- type: 'wfs',
23639
- url: config.URL,
23640
- featureType: config.NAME,
23641
- };
23642
- case 'xyz':
23643
- return {
23644
- type: config.TYPE,
23645
- url: config.URL,
23646
- };
23647
- case 'geojson':
23648
- return {
23649
- type: config.TYPE,
23650
- ...(config.DATA ? { data: config.DATA } : { url: config.URL }),
23651
- };
23652
- case 'maplibre-style':
23653
- return {
23654
- type: config.TYPE,
23655
- styleUrl: config.STYLE_URL,
23656
- accessToken: config.ACCESS_TOKEN,
23657
- };
23658
- }
23659
- }
23660
-
23661
- class MapStyleService {
23662
- constructor() {
23663
- this.styles = {
23664
- default: this.createStyleFunction(this.createGeometryStyles({
23665
- color: isConfigLoaded() ? getThemeConfig().PRIMARY_COLOR : 'blue',
23666
- })),
23667
- defaultHL: this.createStyleFunction(this.createGeometryStyles({
23668
- color: isConfigLoaded() ? getThemeConfig().SECONDARY_COLOR : 'red',
23669
- isFocused: true,
23670
- })),
23671
- };
23672
- }
23673
- createGeometryStyles(options) {
23674
- const { color, isFocused } = options;
23675
- const zIndex = isFocused ? 10 : undefined;
23676
- return {
23677
- polygon: new Style({
23678
- fill: new Fill({
23679
- color: this.computeTransparentFillColor(color),
23680
- }),
23681
- stroke: new Stroke({
23682
- color: 'white',
23683
- width: 2,
23684
- }),
23685
- zIndex,
23686
- }),
23687
- point: new Style({
23688
- image: new CircleStyle({
23689
- fill: new Fill({
23690
- color,
23691
- }),
23692
- stroke: new Stroke({
23693
- color: 'white',
23694
- width: isFocused ? 3 : 2,
23695
- }),
23696
- radius: isFocused ? 8 : 7,
23697
- }),
23698
- zIndex,
23699
- }),
23700
- line: [
23701
- new Style({
23702
- stroke: new Stroke({
23703
- color: 'white',
23704
- width: isFocused ? 8 : 6,
23705
- }),
23706
- zIndex,
23707
- }),
23708
- new Style({
23709
- stroke: new Stroke({
23710
- color,
23711
- width: isFocused ? 3 : 2,
23712
- }),
23713
- zIndex,
23714
- }),
23715
- ],
23716
- };
23717
- }
23718
- createStyleFunction(styleByGeometryType) {
23719
- return (feature) => {
23720
- const geometryType = feature?.getGeometry()?.getType();
23721
- switch (geometryType) {
23722
- case 'LinearRing':
23723
- case 'LineString':
23724
- case 'MultiLineString':
23725
- return styleByGeometryType.line;
23726
- case 'Point':
23727
- case 'MultiPoint':
23728
- return styleByGeometryType.point;
23729
- case 'Circle':
23730
- case 'Polygon':
23731
- case 'MultiPolygon':
23732
- return styleByGeometryType.polygon;
23733
- default:
23734
- return styleByGeometryType.point;
23735
- }
23736
- };
23737
- }
23738
- computeTransparentFillColor(color, alpha = 0.25) {
23739
- return chroma(color).alpha(alpha).css();
23740
- }
23741
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MapStyleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
23742
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MapStyleService, providedIn: 'root' }); }
23743
- }
23744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MapStyleService, decorators: [{
23745
- type: Injectable,
23746
- args: [{
23747
- providedIn: 'root',
23748
- }]
23749
- }] });
23750
-
23751
- const colorPrimary = 'blue';
23752
- const colorSecondary = 'red';
23753
- const colorStroke = 'white';
23754
- const defaultMapStyleFixture = () => new Style({
23755
- image: new Circle({
23756
- fill: new Fill({
23757
- color: colorPrimary,
23758
- }),
23759
- stroke: new Stroke({
23760
- color: colorStroke,
23761
- width: 2,
23762
- }),
23763
- radius: 5,
23764
- }),
23765
- fill: new Fill({
23766
- color: 'rgba(0,0,255,0.25)',
23767
- }),
23768
- stroke: new Stroke({
23769
- color: colorStroke,
23770
- width: 2,
23771
- }),
23772
- });
23773
- const defaultMapStyleHlFixture = () => new Style({
23774
- image: new Circle({
23775
- fill: new Fill({
23776
- color: colorSecondary,
23777
- }),
23778
- stroke: new Stroke({
23779
- color: colorStroke,
23780
- width: 3,
23781
- }),
23782
- radius: 6,
23783
- }),
23784
- fill: new Fill({
23785
- color: 'rgba(255,0,0,0.25)',
23786
- }),
23787
- stroke: new Stroke({
23788
- color: colorSecondary,
23789
- width: 3,
23790
- }),
23791
- });
23792
-
23793
23260
  class AnchorLinkDirective {
23794
23261
  constructor() {
23795
23262
  this.changeDetector = inject(ChangeDetectorRef);
@@ -24306,15 +23773,15 @@ class AutocompleteComponent {
24306
23773
  getExtraClass() {
24307
23774
  if (this.allowSubmit) {
24308
23775
  if (this.enterButton) {
24309
- return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+var(--icon-padding))] inset-y-[--icon-padding]';
23776
+ return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+var(--icon-padding))] top-1/2 -translate-y-1/2';
24310
23777
  }
24311
23778
  else {
24312
- return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+0.25*var(--icon-width))] inset-y-[calc(0.25*var(--icon-width))]';
23779
+ return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+0.25*var(--icon-width))] top-1/2 -translate-y-1/2';
24313
23780
  }
24314
23781
  }
24315
23782
  else {
24316
23783
  if (!this.enterButton) {
24317
- return 'border rounded-lg absolute w-8 h-8 right-2 inset-y-2';
23784
+ return 'border rounded-lg absolute w-8 h-8 right-2 top-1/2 -translate-y-1/2';
24318
23785
  }
24319
23786
  }
24320
23787
  return 'border rounded-lg absolute w-8 h-8';
@@ -24459,7 +23926,7 @@ class AutocompleteComponent {
24459
23926
  provideNgIconsConfig({
24460
23927
  size: '1.75rem',
24461
23928
  }),
24462
- ], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: MatAutocompleteTrigger, descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "inputRef", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span class=\"w-full inline-block relative\">\n @if (!allowSubmit) {\n <div\n class=\"absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none\"\n >\n <ng-icon name=\"iconoirSearch\" class=\"text-primary search\"></ng-icon>\n </div>\n }\n <div class=\"flex flex-row\">\n <input\n #searchInput\n type=\"text\"\n class=\"gn-ui-text-input\"\n (input)=\"handleInput($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keyup.enter)=\"handleSearch()\"\n [ngClass]=\"{\n 'text-primary': searchActive && enterButton,\n 'text-gray-900': !searchActive,\n 'px-[--icon-width]': !allowSubmit,\n }\"\n />\n @if (searchInput.value && displayEnterBtn) {\n <gn-ui-button\n type=\"gray\"\n extraClass=\"w-32 h-8 !opacity-100\"\n [ngStyle]=\"{ left: enterBtnPosition + 'px' }\"\n class=\"absolute\"\n disabled=\"true\"\n >\n <ng-icon\n name=\"iconoirLongArrowDownLeft\"\n class=\"!w-4 text-gray-900 font-bold\"\n ></ng-icon>\n <span translate class=\"text-bold text-gray-900 font-bold\">\n Enter to search\n </span>\n </gn-ui-button>\n }\n </div>\n @if (searchInput.value) {\n <gn-ui-button\n type=\"primary\"\n [extraClass]=\"getExtraClass()\"\n data-test=\"clear-btn\"\n aria-label=\"Clear\"\n (buttonClick)=\"clear()\"\n >\n <ng-icon class=\"text-white\" name=\"matClose\"></ng-icon>\n </gn-ui-button>\n }\n @if (allowSubmit) {\n <gn-ui-button\n type=\"light\"\n extraClass=\"border-0 border-l-[1px] border-gray-300 hover:border-gray-500 text-primary hover:text-primary-darkest focus:text-primary-darkest absolute inset-y-[--icon-padding] right-[--icon-padding]\"\n aria-label=\"Trigger search\"\n data-test=\"autocomplete-submit-btn\"\n (buttonClick)=\"handleSearch()\"\n >\n <ng-icon name=\"iconoirSearch\"></ng-icon>\n </gn-ui-button>\n }\n\n @if (error) {\n <gn-ui-popup-alert\n class=\"absolute mt-2 w-full top-[100%] left-0\"\n icon=\"matErrorOutlineOutline\"\n position=\"top\"\n type=\"warning\"\n >\n <span translate>search.autocomplete.error</span>\n {{ error }}\n </gn-ui-popup-alert>\n }\n</span>\n\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"handleSelection($event)\"\n [displayWith]=\"displayWithFnInternal\"\n>\n @for (suggestion of suggestions$ | async; track suggestion) {\n <mat-option [value]=\"suggestion\" class=\"p-2 suggestion text-start\">\n @if (displayWithTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n displayWithTemplate;\n context: { $implicit: suggestion }\n \"\n ></ng-container>\n } @else {\n {{ displayWithFnInternal(suggestion) }}\n }\n </mat-option>\n }\n</mat-autocomplete>\n", styles: ["span{--icon-padding: var(--gn-ui-text-input-border-size, 2px);--icon-width: calc(var(--gn-ui-text-input-padding, .6em) * 2 + 1.25em)}span>*:not(gn-ui-popup-alert){font-size:var(--gn-ui-text-input-font-size, 1em)}input:placeholder-shown{text-overflow:ellipsis}gn-ui-button{--gn-ui-button-rounded: 0;--gn-ui-button-width: var(--icon-width);--gn-ui-button-padding: 0;font-size:1em}ng-icon.search{margin-top:.6rem;margin-left:.6rem}gn-ui-button:last-of-type{--gn-ui-button-rounded: 0 var(--gn-ui-text-input-rounded, .25em) var(--gn-ui-text-input-rounded, .25em) 0}.mat-mdc-option.suggestion.mat-mdc-option-active{background-color:var(--color-primary-lightest)}\n"], dependencies: [{ kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i1$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23929
+ ], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: MatAutocompleteTrigger, descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "inputRef", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<span class=\"w-full inline-block relative\">\n @if (!allowSubmit) {\n <div\n class=\"absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none flex items-center justify-center\"\n >\n <ng-icon name=\"iconoirSearch\" class=\"text-primary\"></ng-icon>\n </div>\n }\n <div class=\"flex flex-row\">\n <input\n #searchInput\n type=\"text\"\n class=\"gn-ui-text-input\"\n (input)=\"handleInput($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keyup.enter)=\"handleSearch()\"\n [ngClass]=\"{\n 'text-primary': searchActive && enterButton,\n 'text-gray-900': !searchActive,\n 'px-[--icon-width]': !allowSubmit,\n }\"\n />\n @if (searchInput.value && displayEnterBtn) {\n <gn-ui-button\n type=\"gray\"\n extraClass=\"w-32 h-8 !opacity-100\"\n [ngStyle]=\"{ left: enterBtnPosition + 'px' }\"\n class=\"absolute\"\n disabled=\"true\"\n >\n <ng-icon\n name=\"iconoirLongArrowDownLeft\"\n class=\"!w-4 text-gray-900 font-bold\"\n ></ng-icon>\n <span translate class=\"text-bold text-gray-900 font-bold\">\n Enter to search\n </span>\n </gn-ui-button>\n }\n </div>\n @if (searchInput.value) {\n <gn-ui-button\n type=\"primary\"\n [extraClass]=\"getExtraClass()\"\n data-test=\"clear-btn\"\n aria-label=\"Clear\"\n (buttonClick)=\"clear()\"\n >\n <ng-icon class=\"text-white\" name=\"matClose\"></ng-icon>\n </gn-ui-button>\n }\n @if (allowSubmit) {\n <gn-ui-button\n type=\"light\"\n extraClass=\"border-0 border-l-[1px] border-gray-300 hover:border-gray-500 text-primary hover:text-primary-darkest focus:text-primary-darkest absolute inset-y-[--icon-padding] right-[--icon-padding]\"\n aria-label=\"Trigger search\"\n data-test=\"autocomplete-submit-btn\"\n (buttonClick)=\"handleSearch()\"\n >\n <ng-icon name=\"iconoirSearch\"></ng-icon>\n </gn-ui-button>\n }\n\n @if (error) {\n <gn-ui-popup-alert\n class=\"absolute mt-2 w-full top-[100%] left-0\"\n icon=\"matErrorOutlineOutline\"\n position=\"top\"\n type=\"warning\"\n >\n <span translate>search.autocomplete.error</span>\n {{ error }}\n </gn-ui-popup-alert>\n }\n</span>\n\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"handleSelection($event)\"\n [displayWith]=\"displayWithFnInternal\"\n>\n @for (suggestion of suggestions$ | async; track suggestion) {\n <mat-option [value]=\"suggestion\" class=\"p-2 suggestion text-start\">\n @if (displayWithTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n displayWithTemplate;\n context: { $implicit: suggestion }\n \"\n ></ng-container>\n } @else {\n {{ displayWithFnInternal(suggestion) }}\n }\n </mat-option>\n }\n</mat-autocomplete>\n", styles: ["span{--icon-padding: var(--gn-ui-text-input-border-size, 2px);--icon-width: calc(var(--gn-ui-text-input-padding, .6em) * 2 + 1.25em)}span>*:not(gn-ui-popup-alert){font-size:var(--gn-ui-text-input-font-size, 1em)}input:placeholder-shown{text-overflow:ellipsis}gn-ui-button{--gn-ui-button-rounded: 0;--gn-ui-button-width: var(--icon-width);--gn-ui-button-padding: 0;font-size:1em}gn-ui-button:last-of-type{--gn-ui-button-rounded: 0 var(--gn-ui-text-input-rounded, .25em) var(--gn-ui-text-input-rounded, .25em) 0}.mat-mdc-option.suggestion.mat-mdc-option-active{background-color:var(--color-primary-lightest)}\n"], dependencies: [{ kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$2.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i1$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1$2.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24463
23930
  }
24464
23931
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AutocompleteComponent, decorators: [{
24465
23932
  type: Component,
@@ -24480,7 +23947,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
24480
23947
  provideNgIconsConfig({
24481
23948
  size: '1.75rem',
24482
23949
  }),
24483
- ], template: "<span class=\"w-full inline-block relative\">\n @if (!allowSubmit) {\n <div\n class=\"absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none\"\n >\n <ng-icon name=\"iconoirSearch\" class=\"text-primary search\"></ng-icon>\n </div>\n }\n <div class=\"flex flex-row\">\n <input\n #searchInput\n type=\"text\"\n class=\"gn-ui-text-input\"\n (input)=\"handleInput($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keyup.enter)=\"handleSearch()\"\n [ngClass]=\"{\n 'text-primary': searchActive && enterButton,\n 'text-gray-900': !searchActive,\n 'px-[--icon-width]': !allowSubmit,\n }\"\n />\n @if (searchInput.value && displayEnterBtn) {\n <gn-ui-button\n type=\"gray\"\n extraClass=\"w-32 h-8 !opacity-100\"\n [ngStyle]=\"{ left: enterBtnPosition + 'px' }\"\n class=\"absolute\"\n disabled=\"true\"\n >\n <ng-icon\n name=\"iconoirLongArrowDownLeft\"\n class=\"!w-4 text-gray-900 font-bold\"\n ></ng-icon>\n <span translate class=\"text-bold text-gray-900 font-bold\">\n Enter to search\n </span>\n </gn-ui-button>\n }\n </div>\n @if (searchInput.value) {\n <gn-ui-button\n type=\"primary\"\n [extraClass]=\"getExtraClass()\"\n data-test=\"clear-btn\"\n aria-label=\"Clear\"\n (buttonClick)=\"clear()\"\n >\n <ng-icon class=\"text-white\" name=\"matClose\"></ng-icon>\n </gn-ui-button>\n }\n @if (allowSubmit) {\n <gn-ui-button\n type=\"light\"\n extraClass=\"border-0 border-l-[1px] border-gray-300 hover:border-gray-500 text-primary hover:text-primary-darkest focus:text-primary-darkest absolute inset-y-[--icon-padding] right-[--icon-padding]\"\n aria-label=\"Trigger search\"\n data-test=\"autocomplete-submit-btn\"\n (buttonClick)=\"handleSearch()\"\n >\n <ng-icon name=\"iconoirSearch\"></ng-icon>\n </gn-ui-button>\n }\n\n @if (error) {\n <gn-ui-popup-alert\n class=\"absolute mt-2 w-full top-[100%] left-0\"\n icon=\"matErrorOutlineOutline\"\n position=\"top\"\n type=\"warning\"\n >\n <span translate>search.autocomplete.error</span>\n {{ error }}\n </gn-ui-popup-alert>\n }\n</span>\n\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"handleSelection($event)\"\n [displayWith]=\"displayWithFnInternal\"\n>\n @for (suggestion of suggestions$ | async; track suggestion) {\n <mat-option [value]=\"suggestion\" class=\"p-2 suggestion text-start\">\n @if (displayWithTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n displayWithTemplate;\n context: { $implicit: suggestion }\n \"\n ></ng-container>\n } @else {\n {{ displayWithFnInternal(suggestion) }}\n }\n </mat-option>\n }\n</mat-autocomplete>\n", styles: ["span{--icon-padding: var(--gn-ui-text-input-border-size, 2px);--icon-width: calc(var(--gn-ui-text-input-padding, .6em) * 2 + 1.25em)}span>*:not(gn-ui-popup-alert){font-size:var(--gn-ui-text-input-font-size, 1em)}input:placeholder-shown{text-overflow:ellipsis}gn-ui-button{--gn-ui-button-rounded: 0;--gn-ui-button-width: var(--icon-width);--gn-ui-button-padding: 0;font-size:1em}ng-icon.search{margin-top:.6rem;margin-left:.6rem}gn-ui-button:last-of-type{--gn-ui-button-rounded: 0 var(--gn-ui-text-input-rounded, .25em) var(--gn-ui-text-input-rounded, .25em) 0}.mat-mdc-option.suggestion.mat-mdc-option-active{background-color:var(--color-primary-lightest)}\n"] }]
23950
+ ], template: "<span class=\"w-full inline-block relative\">\n @if (!allowSubmit) {\n <div\n class=\"absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none flex items-center justify-center\"\n >\n <ng-icon name=\"iconoirSearch\" class=\"text-primary\"></ng-icon>\n </div>\n }\n <div class=\"flex flex-row\">\n <input\n #searchInput\n type=\"text\"\n class=\"gn-ui-text-input\"\n (input)=\"handleInput($event)\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keyup.enter)=\"handleSearch()\"\n [ngClass]=\"{\n 'text-primary': searchActive && enterButton,\n 'text-gray-900': !searchActive,\n 'px-[--icon-width]': !allowSubmit,\n }\"\n />\n @if (searchInput.value && displayEnterBtn) {\n <gn-ui-button\n type=\"gray\"\n extraClass=\"w-32 h-8 !opacity-100\"\n [ngStyle]=\"{ left: enterBtnPosition + 'px' }\"\n class=\"absolute\"\n disabled=\"true\"\n >\n <ng-icon\n name=\"iconoirLongArrowDownLeft\"\n class=\"!w-4 text-gray-900 font-bold\"\n ></ng-icon>\n <span translate class=\"text-bold text-gray-900 font-bold\">\n Enter to search\n </span>\n </gn-ui-button>\n }\n </div>\n @if (searchInput.value) {\n <gn-ui-button\n type=\"primary\"\n [extraClass]=\"getExtraClass()\"\n data-test=\"clear-btn\"\n aria-label=\"Clear\"\n (buttonClick)=\"clear()\"\n >\n <ng-icon class=\"text-white\" name=\"matClose\"></ng-icon>\n </gn-ui-button>\n }\n @if (allowSubmit) {\n <gn-ui-button\n type=\"light\"\n extraClass=\"border-0 border-l-[1px] border-gray-300 hover:border-gray-500 text-primary hover:text-primary-darkest focus:text-primary-darkest absolute inset-y-[--icon-padding] right-[--icon-padding]\"\n aria-label=\"Trigger search\"\n data-test=\"autocomplete-submit-btn\"\n (buttonClick)=\"handleSearch()\"\n >\n <ng-icon name=\"iconoirSearch\"></ng-icon>\n </gn-ui-button>\n }\n\n @if (error) {\n <gn-ui-popup-alert\n class=\"absolute mt-2 w-full top-[100%] left-0\"\n icon=\"matErrorOutlineOutline\"\n position=\"top\"\n type=\"warning\"\n >\n <span translate>search.autocomplete.error</span>\n {{ error }}\n </gn-ui-popup-alert>\n }\n</span>\n\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"handleSelection($event)\"\n [displayWith]=\"displayWithFnInternal\"\n>\n @for (suggestion of suggestions$ | async; track suggestion) {\n <mat-option [value]=\"suggestion\" class=\"p-2 suggestion text-start\">\n @if (displayWithTemplate) {\n <ng-container\n *ngTemplateOutlet=\"\n displayWithTemplate;\n context: { $implicit: suggestion }\n \"\n ></ng-container>\n } @else {\n {{ displayWithFnInternal(suggestion) }}\n }\n </mat-option>\n }\n</mat-autocomplete>\n", styles: ["span{--icon-padding: var(--gn-ui-text-input-border-size, 2px);--icon-width: calc(var(--gn-ui-text-input-padding, .6em) * 2 + 1.25em)}span>*:not(gn-ui-popup-alert){font-size:var(--gn-ui-text-input-font-size, 1em)}input:placeholder-shown{text-overflow:ellipsis}gn-ui-button{--gn-ui-button-rounded: 0;--gn-ui-button-width: var(--icon-width);--gn-ui-button-padding: 0;font-size:1em}gn-ui-button:last-of-type{--gn-ui-button-rounded: 0 var(--gn-ui-text-input-rounded, .25em) var(--gn-ui-text-input-rounded, .25em) 0}.mat-mdc-option.suggestion.mat-mdc-option-active{background-color:var(--color-primary-lightest)}\n"] }]
24484
23951
  }], propDecorators: { placeholder: [{
24485
23952
  type: Input
24486
23953
  }], enterButton: [{
@@ -25956,7 +25423,8 @@ class SearchFeatureCatalogComponent {
25956
25423
  const filtered = (this.featureCatalog?.featureTypes || []).filter((featureType) => {
25957
25424
  const fuzzyFilter = createFuzzyFilter(searchTerm);
25958
25425
  return (fuzzyFilter(featureType.name) ||
25959
- (featureType.definition && fuzzyFilter(featureType.definition)));
25426
+ (featureType.description &&
25427
+ fuzzyFilter(featureType.description)));
25960
25428
  });
25961
25429
  this.filteredFeatureCatalog = {
25962
25430
  ...this.featureCatalog,
@@ -26044,6 +25512,8 @@ marker('search.filters.spatialExtent.error.title');
26044
25512
  marker('search.filters.spatialExtent.error.outOfBounds');
26045
25513
  const LABEL_FROM_FILE = marker('search.filters.spatialExtent.bboxFromFile');
26046
25514
  const LABEL_FROM_FILE_DELETE = marker('search.filters.spatialExtent.bboxFromFileDelete');
25515
+ const LABEL_FROM_LOCATION = marker('search.filters.spatialExtent.bboxFromLocation');
25516
+ const LABEL_FROM_LOCATION_DELETE = marker('search.filters.spatialExtent.bboxFromLocationDelete');
26047
25517
  const LABEL_INITIAL = marker('search.filters.spatialExtent.bboxInitial');
26048
25518
  const LABEL_INITIAL_DELETE = marker('search.filters.spatialExtent.bboxInitialDelete');
26049
25519
  class SpatialExtentDropdownComponent {
@@ -26055,6 +25525,7 @@ class SpatialExtentDropdownComponent {
26055
25525
  this.errorChange = new EventEmitter();
26056
25526
  this.bbox = null;
26057
25527
  this.fileName = '';
25528
+ this.locationName = '';
26058
25529
  this.overlayPositions = [
26059
25530
  {
26060
25531
  originX: 'start',
@@ -26085,13 +25556,21 @@ class SpatialExtentDropdownComponent {
26085
25556
  return !!this.bbox;
26086
25557
  }
26087
25558
  get selectionLabelKey() {
26088
- return this.fileName ? LABEL_FROM_FILE : LABEL_INITIAL;
25559
+ if (this.fileName)
25560
+ return LABEL_FROM_FILE;
25561
+ if (this.locationName)
25562
+ return LABEL_FROM_LOCATION;
25563
+ return LABEL_INITIAL;
26089
25564
  }
26090
25565
  get selectionDeleteLabelKey() {
26091
- return this.fileName ? LABEL_FROM_FILE_DELETE : LABEL_INITIAL_DELETE;
25566
+ if (this.fileName)
25567
+ return LABEL_FROM_FILE_DELETE;
25568
+ if (this.locationName)
25569
+ return LABEL_FROM_LOCATION_DELETE;
25570
+ return LABEL_INITIAL_DELETE;
26092
25571
  }
26093
25572
  get selectionLabelParams() {
26094
- return { fileName: this.fileName };
25573
+ return { fileName: this.fileName, locationName: this.locationName };
26095
25574
  }
26096
25575
  openOverlay() {
26097
25576
  this.overlayMinWidth =
@@ -26128,6 +25607,7 @@ class SpatialExtentDropdownComponent {
26128
25607
  }
26129
25608
  this.bbox = bbox;
26130
25609
  this.fileName = file.name;
25610
+ this.locationName = '';
26131
25611
  this.bboxChange.emit(bbox);
26132
25612
  this.cd.markForCheck();
26133
25613
  }
@@ -26136,6 +25616,15 @@ class SpatialExtentDropdownComponent {
26136
25616
  return;
26137
25617
  }
26138
25618
  }
25619
+ setLocationBbox(bbox, name) {
25620
+ this.errorKey = null;
25621
+ this.bbox = bbox;
25622
+ this.locationName = name;
25623
+ this.fileName = '';
25624
+ this.fileInput?.clear();
25625
+ this.bboxChange.emit(bbox);
25626
+ this.cd.markForCheck();
25627
+ }
26139
25628
  handleFileError(error) {
26140
25629
  if (error === 'file-too-large') {
26141
25630
  this.setError(marker('search.filters.spatialExtent.error.fileTooLarge'), {
@@ -26154,6 +25643,7 @@ class SpatialExtentDropdownComponent {
26154
25643
  removeSelection(event) {
26155
25644
  this.bbox = null;
26156
25645
  this.fileName = '';
25646
+ this.locationName = '';
26157
25647
  this.errorKey = null;
26158
25648
  this.fileInput?.clear();
26159
25649
  this.bboxChange.emit(null);
@@ -26170,7 +25660,7 @@ class SpatialExtentDropdownComponent {
26170
25660
  matExpandLess,
26171
25661
  matExpandMore,
26172
25662
  }),
26173
- ], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: ["overlayOrigin"], descendants: true }, { propertyName: "overlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "fileInput", first: true, predicate: DragAndDropFileInputComponent, descendants: true }], ngImport: i0, template: "<gn-ui-button\n type=\"outline\"\n extraClass=\"bg-background w-full !p-[8px] !pl-[16px]\"\n [title]=\"title\"\n (buttonClick)=\"toggleOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n>\n <div class=\"grow flex items-center mr-2 gap-2 overflow-hidden\">\n <div class=\"text-left font-medium truncate py-1\">\n {{ title }}\n </div>\n @if (hasSelection) {\n <div\n class=\"bg-primary-lighter text-white shrink-0 rounded-full font-bold text-[12px] w-[22px] h-[22px] flex items-center justify-center\"\n >\n 1\n </div>\n }\n </div>\n <button class=\"h-6 w-6 flex items-center\" data-cy=\"clearSelection\">\n @if (hasSelection && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 mr-1.5 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"removeSelection($event)\"\n name=\"matClose\"\n ></ng-icon>\n }\n </button>\n <ng-icon\n [name]=\"overlayOpen ? 'matExpandLess' : 'matExpandMore'\"\n class=\"shrink-0 opacity-40\"\n >\n </ng-icon>\n</gn-ui-button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div\n class=\"bg-white border border-gray-400 rounded shadow-lg pt-[12px] px-[16px] overlay-container w-[280px] flex flex-col gap-2\"\n [style.min-width]=\"overlayMinWidth\"\n >\n <div class=\"text-xs text-black\">\n {{ 'search.filters.spatialExtent.helpText' | translate }}\n </div>\n\n <div\n [class]=\"\n (hasSelection\n ? 'border-b-[1px] border-gray-400 pb-[20px]'\n : 'pb-[12px]') + ' text-black'\n \"\n >\n <gn-ui-drag-and-drop-file-input\n accept=\".json,.geojson\"\n [placeholder]=\"'search.filters.spatialExtent.import' | translate\"\n [maxFileSizeMb]=\"maxFileSizeMb\"\n [showFileName]=\"false\"\n textClass=\"text-black truncate\"\n dropzoneBackgroundColor=\"transparent\"\n icon=\"iconoirUpload\"\n extraClass=\"gn-ui-gray-outline-input w-full !h-[32px] px-[8px] py-[4px] justify-between\"\n (fileChange)=\"handleFileSelected($event)\"\n (errorChange)=\"handleFileError($event)\"\n data-cy=\"importGeojson\"\n ></gn-ui-drag-and-drop-file-input>\n </div>\n\n @if (hasSelection) {\n <gn-ui-button\n [type]=\"'primary-light'\"\n [title]=\"selectionDeleteLabelKey | translate: selectionLabelParams\"\n (buttonClick)=\"removeSelection($event)\"\n extraClass=\"group gap-x-2 w-full h-[28px] px-[8px] py-[4px] mb-[12px] bg-primary-lighter text-white\"\n data-test=\"spatial-extent-selected-item\"\n >\n <ng-icon\n name=\"iconoirSquareDashed\"\n class=\"shrink-0\"\n size=\"15px\"\n ></ng-icon>\n <span class=\"group-hover:hidden truncate text-sm m-auto\">\n {{ selectionLabelKey | translate: selectionLabelParams }}\n </span>\n <span class=\"hidden group-hover:block truncate text-sm m-auto\">\n {{ selectionDeleteLabelKey | translate: selectionLabelParams }}\n </span>\n <ng-icon\n name=\"iconoirCheckCircle\"\n class=\"group-hover:hidden shrink-0\"\n size=\"14px\"\n ></ng-icon>\n <ng-icon\n name=\"iconoirTrash\"\n class=\"!hidden group-hover:!block shrink-0\"\n size=\"15px\"\n ></ng-icon>\n </gn-ui-button>\n }\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$7.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$7.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: DragAndDropFileInputComponent, selector: "gn-ui-drag-and-drop-file-input", inputs: ["placeholder", "accept", "maxFileSizeMb", "icon", "dropzoneBackgroundColor", "textClass", "extraClass", "showFileName"], outputs: ["fileChange", "errorChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25663
+ ], viewQueries: [{ propertyName: "overlayOrigin", first: true, predicate: ["overlayOrigin"], descendants: true }, { propertyName: "overlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "fileInput", first: true, predicate: DragAndDropFileInputComponent, descendants: true }], ngImport: i0, template: "<gn-ui-button\n type=\"outline\"\n extraClass=\"bg-background w-full !p-[8px] !pl-[16px]\"\n [title]=\"title\"\n (buttonClick)=\"toggleOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n>\n <div class=\"grow flex items-center mr-2 gap-2 overflow-hidden\">\n <div class=\"text-left font-medium truncate py-1\">\n {{ title }}\n </div>\n @if (hasSelection) {\n <div\n class=\"bg-primary-lighter text-white shrink-0 rounded-full font-bold text-[12px] w-[22px] h-[22px] flex items-center justify-center\"\n >\n 1\n </div>\n }\n </div>\n <button class=\"h-6 w-6 flex items-center\" data-cy=\"clearSelection\">\n @if (hasSelection && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 mr-1.5 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"removeSelection($event)\"\n name=\"matClose\"\n ></ng-icon>\n }\n </button>\n <ng-icon\n [name]=\"overlayOpen ? 'matExpandLess' : 'matExpandMore'\"\n class=\"shrink-0 opacity-40\"\n >\n </ng-icon>\n</gn-ui-button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div\n class=\"bg-white border border-gray-400 rounded shadow-lg pt-[12px] px-[16px] overlay-container w-[280px] flex flex-col gap-2\"\n [style.min-width]=\"overlayMinWidth\"\n >\n <div class=\"text-xs text-black\">\n {{ 'search.filters.spatialExtent.helpText' | translate }}\n </div>\n\n <div\n [class]=\"\n (hasSelection\n ? 'border-b-[1px] border-gray-400 pb-[20px]'\n : 'pb-[12px]') + ' text-black flex flex-col gap-[8px]'\n \"\n style=\"\n --gn-ui-text-input-rounded: 8px;\n --gn-ui-text-input-border-size: 1px;\n --gn-ui-text-input-padding: 6px;\n \"\n >\n <gn-ui-drag-and-drop-file-input\n accept=\".json,.geojson\"\n [placeholder]=\"'search.filters.spatialExtent.import' | translate\"\n [maxFileSizeMb]=\"maxFileSizeMb\"\n [showFileName]=\"false\"\n textClass=\"text-black truncate\"\n dropzoneBackgroundColor=\"transparent\"\n icon=\"iconoirUpload\"\n extraClass=\"gn-ui-gray-outline-input w-full !h-[32px] px-[8px] py-[4px] justify-between\"\n (fileChange)=\"handleFileSelected($event)\"\n (errorChange)=\"handleFileError($event)\"\n data-cy=\"importGeojson\"\n ></gn-ui-drag-and-drop-file-input>\n <ng-content></ng-content>\n </div>\n\n @if (hasSelection) {\n <gn-ui-button\n [type]=\"'primary-light'\"\n [title]=\"selectionDeleteLabelKey | translate: selectionLabelParams\"\n (buttonClick)=\"removeSelection($event)\"\n extraClass=\"group gap-x-2 w-full h-[28px] px-[8px] py-[4px] mb-[12px] bg-primary-lighter text-white\"\n data-test=\"spatial-extent-selected-item\"\n >\n <ng-icon\n name=\"iconoirSquareDashed\"\n class=\"shrink-0\"\n size=\"15px\"\n ></ng-icon>\n <span class=\"group-hover:hidden truncate text-sm m-auto\">\n {{ selectionLabelKey | translate: selectionLabelParams }}\n </span>\n <span class=\"hidden group-hover:block truncate text-sm m-auto\">\n {{ selectionDeleteLabelKey | translate: selectionLabelParams }}\n </span>\n <ng-icon\n name=\"iconoirCheckCircle\"\n class=\"group-hover:hidden shrink-0\"\n size=\"14px\"\n ></ng-icon>\n <ng-icon\n name=\"iconoirTrash\"\n class=\"!hidden group-hover:!block shrink-0\"\n size=\"15px\"\n ></ng-icon>\n </gn-ui-button>\n }\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i1$7.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$7.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: DragAndDropFileInputComponent, selector: "gn-ui-drag-and-drop-file-input", inputs: ["placeholder", "accept", "maxFileSizeMb", "icon", "dropzoneBackgroundColor", "textClass", "extraClass", "showFileName"], outputs: ["fileChange", "errorChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26174
25664
  }
26175
25665
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SpatialExtentDropdownComponent, decorators: [{
26176
25666
  type: Component,
@@ -26190,7 +25680,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
26190
25680
  matExpandLess,
26191
25681
  matExpandMore,
26192
25682
  }),
26193
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-button\n type=\"outline\"\n extraClass=\"bg-background w-full !p-[8px] !pl-[16px]\"\n [title]=\"title\"\n (buttonClick)=\"toggleOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n>\n <div class=\"grow flex items-center mr-2 gap-2 overflow-hidden\">\n <div class=\"text-left font-medium truncate py-1\">\n {{ title }}\n </div>\n @if (hasSelection) {\n <div\n class=\"bg-primary-lighter text-white shrink-0 rounded-full font-bold text-[12px] w-[22px] h-[22px] flex items-center justify-center\"\n >\n 1\n </div>\n }\n </div>\n <button class=\"h-6 w-6 flex items-center\" data-cy=\"clearSelection\">\n @if (hasSelection && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 mr-1.5 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"removeSelection($event)\"\n name=\"matClose\"\n ></ng-icon>\n }\n </button>\n <ng-icon\n [name]=\"overlayOpen ? 'matExpandLess' : 'matExpandMore'\"\n class=\"shrink-0 opacity-40\"\n >\n </ng-icon>\n</gn-ui-button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div\n class=\"bg-white border border-gray-400 rounded shadow-lg pt-[12px] px-[16px] overlay-container w-[280px] flex flex-col gap-2\"\n [style.min-width]=\"overlayMinWidth\"\n >\n <div class=\"text-xs text-black\">\n {{ 'search.filters.spatialExtent.helpText' | translate }}\n </div>\n\n <div\n [class]=\"\n (hasSelection\n ? 'border-b-[1px] border-gray-400 pb-[20px]'\n : 'pb-[12px]') + ' text-black'\n \"\n >\n <gn-ui-drag-and-drop-file-input\n accept=\".json,.geojson\"\n [placeholder]=\"'search.filters.spatialExtent.import' | translate\"\n [maxFileSizeMb]=\"maxFileSizeMb\"\n [showFileName]=\"false\"\n textClass=\"text-black truncate\"\n dropzoneBackgroundColor=\"transparent\"\n icon=\"iconoirUpload\"\n extraClass=\"gn-ui-gray-outline-input w-full !h-[32px] px-[8px] py-[4px] justify-between\"\n (fileChange)=\"handleFileSelected($event)\"\n (errorChange)=\"handleFileError($event)\"\n data-cy=\"importGeojson\"\n ></gn-ui-drag-and-drop-file-input>\n </div>\n\n @if (hasSelection) {\n <gn-ui-button\n [type]=\"'primary-light'\"\n [title]=\"selectionDeleteLabelKey | translate: selectionLabelParams\"\n (buttonClick)=\"removeSelection($event)\"\n extraClass=\"group gap-x-2 w-full h-[28px] px-[8px] py-[4px] mb-[12px] bg-primary-lighter text-white\"\n data-test=\"spatial-extent-selected-item\"\n >\n <ng-icon\n name=\"iconoirSquareDashed\"\n class=\"shrink-0\"\n size=\"15px\"\n ></ng-icon>\n <span class=\"group-hover:hidden truncate text-sm m-auto\">\n {{ selectionLabelKey | translate: selectionLabelParams }}\n </span>\n <span class=\"hidden group-hover:block truncate text-sm m-auto\">\n {{ selectionDeleteLabelKey | translate: selectionLabelParams }}\n </span>\n <ng-icon\n name=\"iconoirCheckCircle\"\n class=\"group-hover:hidden shrink-0\"\n size=\"14px\"\n ></ng-icon>\n <ng-icon\n name=\"iconoirTrash\"\n class=\"!hidden group-hover:!block shrink-0\"\n size=\"15px\"\n ></ng-icon>\n </gn-ui-button>\n }\n </div>\n</ng-template>\n" }]
25683
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-button\n type=\"outline\"\n extraClass=\"bg-background w-full !p-[8px] !pl-[16px]\"\n [title]=\"title\"\n (buttonClick)=\"toggleOverlay()\"\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n>\n <div class=\"grow flex items-center mr-2 gap-2 overflow-hidden\">\n <div class=\"text-left font-medium truncate py-1\">\n {{ title }}\n </div>\n @if (hasSelection) {\n <div\n class=\"bg-primary-lighter text-white shrink-0 rounded-full font-bold text-[12px] w-[22px] h-[22px] flex items-center justify-center\"\n >\n 1\n </div>\n }\n </div>\n <button class=\"h-6 w-6 flex items-center\" data-cy=\"clearSelection\">\n @if (hasSelection && !overlayOpen) {\n <ng-icon\n class=\"shrink-0 opacity-40 mr-1.5 hover:opacity-80 transition-colors clear-btn\"\n (click)=\"removeSelection($event)\"\n name=\"matClose\"\n ></ng-icon>\n }\n </button>\n <ng-icon\n [name]=\"overlayOpen ? 'matExpandLess' : 'matExpandMore'\"\n class=\"shrink-0 opacity-40\"\n >\n </ng-icon>\n</gn-ui-button>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"overlayOpen\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n (overlayOutsideClick)=\"closeOverlay()\"\n (detach)=\"closeOverlay()\"\n>\n <div\n class=\"bg-white border border-gray-400 rounded shadow-lg pt-[12px] px-[16px] overlay-container w-[280px] flex flex-col gap-2\"\n [style.min-width]=\"overlayMinWidth\"\n >\n <div class=\"text-xs text-black\">\n {{ 'search.filters.spatialExtent.helpText' | translate }}\n </div>\n\n <div\n [class]=\"\n (hasSelection\n ? 'border-b-[1px] border-gray-400 pb-[20px]'\n : 'pb-[12px]') + ' text-black flex flex-col gap-[8px]'\n \"\n style=\"\n --gn-ui-text-input-rounded: 8px;\n --gn-ui-text-input-border-size: 1px;\n --gn-ui-text-input-padding: 6px;\n \"\n >\n <gn-ui-drag-and-drop-file-input\n accept=\".json,.geojson\"\n [placeholder]=\"'search.filters.spatialExtent.import' | translate\"\n [maxFileSizeMb]=\"maxFileSizeMb\"\n [showFileName]=\"false\"\n textClass=\"text-black truncate\"\n dropzoneBackgroundColor=\"transparent\"\n icon=\"iconoirUpload\"\n extraClass=\"gn-ui-gray-outline-input w-full !h-[32px] px-[8px] py-[4px] justify-between\"\n (fileChange)=\"handleFileSelected($event)\"\n (errorChange)=\"handleFileError($event)\"\n data-cy=\"importGeojson\"\n ></gn-ui-drag-and-drop-file-input>\n <ng-content></ng-content>\n </div>\n\n @if (hasSelection) {\n <gn-ui-button\n [type]=\"'primary-light'\"\n [title]=\"selectionDeleteLabelKey | translate: selectionLabelParams\"\n (buttonClick)=\"removeSelection($event)\"\n extraClass=\"group gap-x-2 w-full h-[28px] px-[8px] py-[4px] mb-[12px] bg-primary-lighter text-white\"\n data-test=\"spatial-extent-selected-item\"\n >\n <ng-icon\n name=\"iconoirSquareDashed\"\n class=\"shrink-0\"\n size=\"15px\"\n ></ng-icon>\n <span class=\"group-hover:hidden truncate text-sm m-auto\">\n {{ selectionLabelKey | translate: selectionLabelParams }}\n </span>\n <span class=\"hidden group-hover:block truncate text-sm m-auto\">\n {{ selectionDeleteLabelKey | translate: selectionLabelParams }}\n </span>\n <ng-icon\n name=\"iconoirCheckCircle\"\n class=\"group-hover:hidden shrink-0\"\n size=\"14px\"\n ></ng-icon>\n <ng-icon\n name=\"iconoirTrash\"\n class=\"!hidden group-hover:!block shrink-0\"\n size=\"15px\"\n ></ng-icon>\n </gn-ui-button>\n }\n </div>\n</ng-template>\n" }]
26194
25684
  }], propDecorators: { title: [{
26195
25685
  type: Input
26196
25686
  }], maxFileSizeMb: [{
@@ -27459,9 +26949,7 @@ const initSearch = () => {
27459
26949
  },
27460
26950
  params: {
27461
26951
  filters: {},
27462
- pageSize: getOptionalSearchConfig()?.LIMIT
27463
- ? getOptionalSearchConfig().LIMIT
27464
- : DEFAULT_PAGE_SIZE,
26952
+ pageSize: DEFAULT_PAGE_SIZE,
27465
26953
  currentPage: 0,
27466
26954
  favoritesOnly: false,
27467
26955
  useSpatialFilter: true,
@@ -27910,10 +27398,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
27910
27398
  }]
27911
27399
  }] });
27912
27400
 
27401
+ const DEFAULT_GEOCODING_PROVIDER = [
27402
+ 'geonames',
27403
+ { maxRows: 5 },
27404
+ ];
27913
27405
  const GEOCODING_PROVIDER = new InjectionToken('geocoding-provider', {
27914
27406
  providedIn: 'root',
27915
- factory: () => ['geonames', { maxRows: 5 }],
27407
+ factory: () => DEFAULT_GEOCODING_PROVIDER,
27916
27408
  });
27409
+ // these options are arrays in the providers, but they can be configured
27410
+ // with a single value for simplicity
27411
+ const GEOCODING_PROVIDER_ARRAY_OPTIONS = {
27412
+ geoadmin: ['origins', 'features'],
27413
+ geoplateforme: [
27414
+ 'index',
27415
+ 'category',
27416
+ 'type',
27417
+ 'postCode',
27418
+ 'cityCode',
27419
+ 'depCode',
27420
+ ],
27421
+ };
27422
+ function wrapArrayOptions(options, keys) {
27423
+ const wrapped = { ...options };
27424
+ for (const key of keys) {
27425
+ if (typeof wrapped[key] === 'string') {
27426
+ wrapped[key] = [wrapped[key]];
27427
+ }
27428
+ }
27429
+ return wrapped;
27430
+ }
27917
27431
  class GeocodingService {
27918
27432
  constructor() {
27919
27433
  this.provider = inject(GEOCODING_PROVIDER);
@@ -27922,13 +27436,16 @@ class GeocodingService {
27922
27436
  let queryObservable;
27923
27437
  switch (this.provider[0]) {
27924
27438
  case 'geoadmin':
27925
- queryObservable = from(queryGeoadmin(text, this.provider[1]));
27439
+ queryObservable = from(queryGeoadmin(text, wrapArrayOptions(this.provider[1], GEOCODING_PROVIDER_ARRAY_OPTIONS.geoadmin)));
27926
27440
  break;
27927
27441
  case 'geonames':
27928
27442
  queryObservable = from(queryGeonames(text, this.provider[1]));
27929
27443
  break;
27930
- case 'data-gouv-fr':
27931
- queryObservable = from(queryDataGouvFr(text, this.provider[1]));
27444
+ case 'geoplateforme':
27445
+ queryObservable = from(queryGeoplateforme(text, {
27446
+ ...wrapArrayOptions(this.provider[1], GEOCODING_PROVIDER_ARRAY_OPTIONS.geoplateforme),
27447
+ returnTrueGeometry: true,
27448
+ }));
27932
27449
  break;
27933
27450
  default:
27934
27451
  return throwError(() => new Error(`Unsupported geocoding provider: ${this.provider[0]}`));
@@ -27945,29 +27462,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
27945
27462
  }]
27946
27463
  }] });
27947
27464
 
27465
+ const GEOCODING_PROVIDER_LABELS = new InjectionToken('geocodingProviderLabels', {
27466
+ factory: () => ({}),
27467
+ });
27948
27468
  class LocationSearchComponent {
27949
27469
  constructor() {
27950
27470
  this.geocodingService = inject(GeocodingService);
27471
+ this.labels = inject(GEOCODING_PROVIDER_LABELS);
27951
27472
  this.placeholder = '';
27952
27473
  this.resultSelected = new EventEmitter();
27474
+ this.bboxSelected = new EventEmitter();
27953
27475
  this.displayWithFn = (item) => item.label;
27954
27476
  this.searchAction = (text) => this.geocodingService.query(text);
27955
27477
  }
27478
+ getSecondaryLabel(result) {
27479
+ return this.resolveLabel(result, this.labels.secondary);
27480
+ }
27481
+ getMainLabel(result) {
27482
+ return this.resolveLabel(result, this.labels.main) ?? result.label;
27483
+ }
27484
+ getTertiaryLabel(result) {
27485
+ return this.resolveLabel(result, this.labels.tertiary);
27486
+ }
27487
+ getDisplayLabel(result) {
27488
+ const tertiary = this.getTertiaryLabel(result);
27489
+ return this.getMainLabel(result) + (tertiary ? ', ' + tertiary : '');
27490
+ }
27491
+ resolveLabel(result, path) {
27492
+ if (!path)
27493
+ return undefined;
27494
+ let value;
27495
+ try {
27496
+ value = pointer.get(result, path);
27497
+ }
27498
+ catch {
27499
+ return undefined;
27500
+ }
27501
+ const values = Array.isArray(value) ? value : [value];
27502
+ const label = values
27503
+ .filter((v) => typeof v === 'string' || typeof v === 'number')
27504
+ .join(', ');
27505
+ return label || undefined;
27506
+ }
27507
+ // geoplateforme keeps a simplified geometry in geom and puts the real one,
27508
+ // as a JSON string, in properties.truegeometry when returnTrueGeometry is set
27509
+ getGeometry(result) {
27510
+ const trueGeometry = result.properties?.['truegeometry'];
27511
+ if (typeof trueGeometry === 'string') {
27512
+ return JSON.parse(trueGeometry);
27513
+ }
27514
+ return trueGeometry ?? result.geom;
27515
+ }
27956
27516
  handleItemSelected(item) {
27957
- this.resultSelected.emit(item);
27517
+ const result = item;
27518
+ this.resultSelected.emit(result);
27519
+ const geometry = this.getGeometry(result);
27520
+ if (geometry) {
27521
+ this.bboxSelected.emit({
27522
+ bbox: getGeometryBoundingBox(geometry),
27523
+ label: this.getDisplayLabel(result),
27524
+ });
27525
+ }
27958
27526
  }
27959
27527
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LocationSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
27960
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: LocationSearchComponent, isStandalone: true, selector: "gn-ui-location-search", inputs: { placeholder: "placeholder", displayWithTemplate: "displayWithTemplate" }, outputs: { resultSelected: "resultSelected" }, ngImport: i0, template: "<gn-ui-autocomplete\n [action]=\"searchAction\"\n [displayWithFn]=\"displayWithFn\"\n [placeholder]=\"placeholder\"\n [displayWithTemplate]=\"displayWithTemplate\"\n (itemSelected)=\"handleItemSelected($event)\"\n>\n</gn-ui-autocomplete>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithTemplate", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27528
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: LocationSearchComponent, isStandalone: true, selector: "gn-ui-location-search", inputs: { placeholder: "placeholder" }, outputs: { resultSelected: "resultSelected", bboxSelected: "bboxSelected" }, ngImport: i0, template: "<gn-ui-autocomplete\n [action]=\"searchAction\"\n [displayWithFn]=\"displayWithFn\"\n [placeholder]=\"placeholder\"\n [displayWithTemplate]=\"defaultItemTpl\"\n [clearOnSelection]=\"true\"\n (itemSelected)=\"handleItemSelected($event)\"\n>\n</gn-ui-autocomplete>\n\n<ng-template #defaultItemTpl let-result>\n <div class=\"py-2\">\n @if (getSecondaryLabel(result)) {\n <div class=\"gn-ui-card-detail\">{{ getSecondaryLabel(result) }}</div>\n }\n <div class=\"gn-ui-card-title\">{{ getDisplayLabel(result) }}</div>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "enterButton", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "forceTrackPosition", "displayWithTemplate", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared", "isSearchActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
27961
27529
  }
27962
27530
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LocationSearchComponent, decorators: [{
27963
27531
  type: Component,
27964
- args: [{ selector: 'gn-ui-location-search', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [AutocompleteComponent], template: "<gn-ui-autocomplete\n [action]=\"searchAction\"\n [displayWithFn]=\"displayWithFn\"\n [placeholder]=\"placeholder\"\n [displayWithTemplate]=\"displayWithTemplate\"\n (itemSelected)=\"handleItemSelected($event)\"\n>\n</gn-ui-autocomplete>\n" }]
27532
+ args: [{ selector: 'gn-ui-location-search', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [AutocompleteComponent], template: "<gn-ui-autocomplete\n [action]=\"searchAction\"\n [displayWithFn]=\"displayWithFn\"\n [placeholder]=\"placeholder\"\n [displayWithTemplate]=\"defaultItemTpl\"\n [clearOnSelection]=\"true\"\n (itemSelected)=\"handleItemSelected($event)\"\n>\n</gn-ui-autocomplete>\n\n<ng-template #defaultItemTpl let-result>\n <div class=\"py-2\">\n @if (getSecondaryLabel(result)) {\n <div class=\"gn-ui-card-detail\">{{ getSecondaryLabel(result) }}</div>\n }\n <div class=\"gn-ui-card-title\">{{ getDisplayLabel(result) }}</div>\n </div>\n</ng-template>\n" }]
27965
27533
  }], propDecorators: { placeholder: [{
27966
27534
  type: Input
27967
- }], displayWithTemplate: [{
27968
- type: Input
27969
27535
  }], resultSelected: [{
27970
27536
  type: Output
27537
+ }], bboxSelected: [{
27538
+ type: Output
27971
27539
  }] } });
27972
27540
 
27973
27541
  // expects the replacement key ${uuid}
@@ -28128,6 +27696,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
28128
27696
  class AbstractSearchField {
28129
27697
  }
28130
27698
  class SimpleSearchField {
27699
+ get fieldIdentifier() {
27700
+ return this.customIdentifier ?? this.esFieldName;
27701
+ }
28131
27702
  constructor(esFieldName, injector, order = 'asc', orderType = 'key') {
28132
27703
  this.esFieldName = esFieldName;
28133
27704
  this.injector = injector;
@@ -28136,14 +27707,26 @@ class SimpleSearchField {
28136
27707
  this.repository = this.injector.get(RecordsRepositoryInterface);
28137
27708
  // FIXME: this is required to register runtime fields; abstract this as well
28138
27709
  this.esService = this.injector.get(ElasticsearchService);
27710
+ this.includeValues = [];
27711
+ this.excludeValues = [];
27712
+ }
27713
+ setFieldIdentifier(fieldIdentifier) {
27714
+ this.customIdentifier = fieldIdentifier;
27715
+ this.esService.registerFieldAlias(fieldIdentifier, this.esFieldName);
28139
27716
  }
28140
27717
  getAggregations() {
28141
27718
  return {
28142
- [this.esFieldName]: {
27719
+ [this.fieldIdentifier]: {
28143
27720
  type: 'terms',
28144
27721
  field: this.esFieldName,
28145
27722
  limit: 1000,
28146
27723
  sort: [this.order, this.orderType],
27724
+ ...(this.includeValues?.length && {
27725
+ includeValues: this.includeValues,
27726
+ }),
27727
+ ...(this.excludeValues?.length && {
27728
+ excludeValues: this.excludeValues,
27729
+ }),
28147
27730
  },
28148
27731
  };
28149
27732
  }
@@ -28151,7 +27734,7 @@ class SimpleSearchField {
28151
27734
  return bucket.term.toString();
28152
27735
  }
28153
27736
  getAvailableValues() {
28154
- return this.repository.aggregate(this.getAggregations()).pipe(map$1((response) => response[this.esFieldName].buckets || []), switchMap((buckets) => {
27737
+ return this.repository.aggregate(this.getAggregations()).pipe(map$1((response) => response[this.fieldIdentifier].buckets || []), switchMap((buckets) => {
28155
27738
  const bucketPromises = buckets.map(async (bucket) => ({
28156
27739
  label: `${await this.getBucketLabel(bucket)} (${bucket.count})`,
28157
27740
  value: bucket.term.toString(),
@@ -28164,7 +27747,7 @@ class SimpleSearchField {
28164
27747
  // FieldValue[]
28165
27748
  if (this.getType() === 'values') {
28166
27749
  return of({
28167
- [this.esFieldName]: values.reduce((acc, val) => {
27750
+ [this.fieldIdentifier]: values.reduce((acc, val) => {
28168
27751
  const value = val.toString();
28169
27752
  if (value !== '') {
28170
27753
  return { ...acc, [value]: true };
@@ -28175,11 +27758,11 @@ class SimpleSearchField {
28175
27758
  }
28176
27759
  // DateRange
28177
27760
  return of({
28178
- [this.esFieldName]: values[0] !== '' ? values[0] : {},
27761
+ [this.fieldIdentifier]: values[0] !== '' ? values[0] : {},
28179
27762
  });
28180
27763
  }
28181
27764
  getValuesForFilter(filters) {
28182
- const filter = filters[this.esFieldName];
27765
+ const filter = filters[this.fieldIdentifier];
28183
27766
  if (!filter)
28184
27767
  return of([]);
28185
27768
  // filter by expression
@@ -28197,6 +27780,9 @@ class SimpleSearchField {
28197
27780
  getType() {
28198
27781
  return 'values';
28199
27782
  }
27783
+ clone() {
27784
+ return Object.create(this);
27785
+ }
28200
27786
  }
28201
27787
  class TranslatedSearchField extends SimpleSearchField {
28202
27788
  constructor(esFieldName, injector, order = 'asc', orderType = 'key') {
@@ -28230,7 +27816,8 @@ class TranslatedSearchField extends SimpleSearchField {
28230
27816
  class MultilingualSearchField extends SimpleSearchField {
28231
27817
  // we're using a getter in case the token value changes over time
28232
27818
  get searchLanguage() {
28233
- return this.injector.get(METADATA_LANGUAGE, null);
27819
+ const language = this.injector.get(METADATA_LANGUAGE, null);
27820
+ return typeof language === 'function' ? language() : language;
28234
27821
  }
28235
27822
  constructor(esFieldName, injector, order = 'asc', orderType = 'key') {
28236
27823
  super(esFieldName, injector, order, orderType);
@@ -28466,11 +28053,11 @@ class BoundingBoxSearchField extends SimpleSearchField {
28466
28053
  }
28467
28054
  getFiltersForValues(values) {
28468
28055
  return of({
28469
- [this.esFieldName]: values.map(Number),
28056
+ [this.fieldIdentifier]: values.map(Number),
28470
28057
  });
28471
28058
  }
28472
28059
  getValuesForFilter(filters) {
28473
- const filter = filters[this.esFieldName];
28060
+ const filter = filters[this.fieldIdentifier];
28474
28061
  return of(isBoundingBox(filter) ? filter : []);
28475
28062
  }
28476
28063
  getType() {
@@ -28569,7 +28156,7 @@ class RecordKindField extends SimpleSearchField {
28569
28156
  }
28570
28157
  getFiltersForValues(values) {
28571
28158
  const filters = {
28572
- [this.esFieldName]: values.reduce((acc, value) => {
28159
+ [this.fieldIdentifier]: values.reduce((acc, value) => {
28573
28160
  if (value === '')
28574
28161
  return { ...acc, [value]: true };
28575
28162
  const keysToAdd = this.TYPE_MAPPING[value] || [value];
@@ -28592,7 +28179,7 @@ class RecordKindField extends SimpleSearchField {
28592
28179
  return of(filters);
28593
28180
  }
28594
28181
  getValuesForFilter(filters) {
28595
- const filter = filters[this.esFieldName];
28182
+ const filter = filters[this.fieldIdentifier];
28596
28183
  if (!filter)
28597
28184
  return of([]);
28598
28185
  const activeValues = Object.keys(filter).filter((v) => filter[v]);
@@ -28622,11 +28209,15 @@ marker('search.filters.publisherOrg');
28622
28209
  marker('search.filters.user');
28623
28210
  marker('search.filters.changeDate');
28624
28211
  marker('search.filters.resourceCreationRevisionDate');
28212
+ marker('search.filters.temporalExtent');
28625
28213
  marker('search.filters.spatialExtent');
28214
+ marker('search.filters.documentStandard');
28215
+ const CUSTOM_FIELDS = new InjectionToken('custom-fields');
28626
28216
  class FieldsService {
28627
28217
  constructor() {
28628
28218
  this.injector = inject(Injector);
28629
- this.fields = {
28219
+ this.customFields = inject(CUSTOM_FIELDS, { optional: true }) ?? [];
28220
+ this.baseFields = {
28630
28221
  organization: new OrganizationSearchField(this.injector),
28631
28222
  format: new SimpleSearchField('format', this.injector, 'asc'),
28632
28223
  resourceType: new ResourceTypeLegacyField(this.injector), // Deprecated, use `recordKind` instead
@@ -28646,9 +28237,31 @@ class FieldsService {
28646
28237
  user: new UserSearchField(this.injector),
28647
28238
  changeDate: new DateRangeSearchField('changeDate', this.injector, 'desc'),
28648
28239
  resourceCreationRevisionDate: new ResourceCreationRevisionDateSearchField(this.injector, 'desc'),
28240
+ temporalExtent: new DateRangeSearchField('resourceTemporalExtentDateRange', this.injector, 'desc'),
28649
28241
  availableServices: new AvailableServicesField(this.injector),
28650
28242
  spatialExtent: new BoundingBoxSearchField('spatialExtent', this.injector),
28651
28243
  };
28244
+ this.fields = { ...this.baseFields };
28245
+ for (const customField of this.customFields) {
28246
+ const baseField = this.baseFields[customField.baseFilter];
28247
+ if (!(baseField instanceof SimpleSearchField)) {
28248
+ console.warn(`The custom field '${customField.name}' relies on a base field '${customField.baseFilter}' that is not supported. This field will be ignored.`);
28249
+ continue;
28250
+ }
28251
+ if (!customField.name.includes(':')) {
28252
+ console.warn(`The custom field '${customField.name}' is not scoped with a prefix. Custom fields must have their names prefixed, for instance "myOrg:myKeywords". This field will be ignored.`);
28253
+ continue;
28254
+ }
28255
+ const newField = baseField.clone();
28256
+ newField.setFieldIdentifier(customField.name);
28257
+ if (customField.includeValues) {
28258
+ newField.includeValues = customField.includeValues;
28259
+ }
28260
+ if (customField.excludeValues) {
28261
+ newField.excludeValues = customField.excludeValues;
28262
+ }
28263
+ this.fields[customField.name] = newField;
28264
+ }
28652
28265
  }
28653
28266
  get supportedFields() {
28654
28267
  return Object.keys(this.fields);
@@ -28696,7 +28309,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
28696
28309
  args: [{
28697
28310
  providedIn: 'root',
28698
28311
  }]
28699
- }] });
28312
+ }], ctorParameters: () => [] });
28700
28313
 
28701
28314
  class ApiCardComponent {
28702
28315
  constructor() {
@@ -30722,14 +30335,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
30722
30335
  marker('feature.catalog.attribute.type');
30723
30336
  marker('feature.catalog.attribute.name');
30724
30337
  marker('feature.catalog.attribute.code');
30725
- marker('feature.catalog.attribute.definition');
30338
+ marker('feature.catalog.attribute.description');
30726
30339
  marker('feature.catalog.attribute.values');
30727
30340
  class FeatureCatalogListComponent {
30728
30341
  constructor() {
30729
30342
  this.COLUMNS_DEFAULT = [
30730
30343
  { key: 'type', width: '25%' },
30731
30344
  { key: 'name', width: '40%' },
30732
- { key: 'definition', width: 'minmax(0px, 1fr)' },
30345
+ { key: 'description', width: 'minmax(0px, 1fr)' },
30733
30346
  ];
30734
30347
  this.COLUMN_VALUES = {
30735
30348
  key: 'values',
@@ -30750,7 +30363,7 @@ class FeatureCatalogListComponent {
30750
30363
  return col.key;
30751
30364
  }
30752
30365
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureCatalogListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30753
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FeatureCatalogListComponent, isStandalone: true, selector: "gn-ui-feature-catalog-list", inputs: { filteredFeatureCatalog: "filteredFeatureCatalog" }, providers: [provideIcons({ iconoirList })], viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }, { propertyName: "scrollable", first: true, predicate: CdkScrollable, descendants: true, static: true }, { propertyName: "panelComponent", first: true, predicate: ["expanel"], descendants: true, read: ExpandablePanelComponent, static: true }], ngImport: i0, template: "<div\n cdkScrollable\n class=\"h-[562px] relative overflow-y-auto overflow-hidden\"\n data-cy=\"feat-catalog-scrollable\"\n>\n <div #scrollContainer class=\"flex flex-col gap-2 py-5 px-5\">\n @for (\n featureType of filteredFeatureCatalog?.featureTypes;\n track featureType\n ) {\n <div class=\"rounded shadow bg-white\">\n <gn-ui-expandable-panel\n #expanel\n [collapsed]=\"filteredFeatureCatalog?.featureTypes?.length !== 1\"\n iconColor=\"black\"\n >\n <ng-template #titleTemplate>\n <div class=\"px-2\">\n <div class=\"text-lg font-bold\">{{ featureType.name }}</div>\n @if (featureType.definition) {\n <div class=\"text-sm\">\n {{ featureType.definition }}\n </div>\n }\n </div>\n </ng-template>\n @if (expanel && !expanel.collapsed) {\n <div\n class=\"grid gap-0\"\n [style.grid-template-columns]=\"\n getGridTemplateColumns(featureType.attributes)\n \"\n data-cy=\"feature-type-content\"\n >\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"py-1 px-2 text-sm font-bold text-left border-t break-all\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n [ngClass]=\"col.class || ''\"\n data-test=\"column-label\"\n >\n {{ 'feature.catalog.attribute.' + col.key | translate }}\n </div>\n }\n @if (expanel && !expanel.collapsed) {\n @for (row of featureType.attributes; track row) {\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"bg-white text-sm font-normal text-left border-t\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n data-test=\"cell-content\"\n >\n @if (col.key === 'values') {\n @if (row.values?.length > 0) {\n <gn-ui-cell-popin\n #popinRef\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n >\n <div\n cellContent\n data-cy=\"values-cell-popin-trigger\"\n >\n <gn-ui-button\n type=\"light\"\n extraClass=\"bg-transparent border-none\"\n (buttonClick)=\"popinRef.openOverlay()\"\n >\n <ng-icon name=\"iconoirList\" size=\"24\"></ng-icon>\n </gn-ui-button>\n </div>\n <div\n popinContent\n class=\"max-h-60 overflow-y-auto min-w-64 py-4 px-6\"\n style=\"scrollbar-width: thin\"\n >\n <ul class=\"list-disc list-inside mr-4\">\n @for (v of row.values; track v) {\n <li>\n {{ v.label || v.code }}\n </li>\n }\n </ul>\n </div>\n </gn-ui-cell-popin>\n }\n } @else {\n <gn-ui-truncated-text\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n [text]=\"row[col.key]\"\n ></gn-ui-truncated-text>\n }\n </div>\n }\n }\n }\n </div>\n }\n </gn-ui-expandable-panel>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: CellPopinComponent, selector: "gn-ui-cell-popin", inputs: ["extraClass", "cdkScrollContainer", "scrollContainer", "activePopin"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ExpandablePanelComponent, selector: "gn-ui-expandable-panel", inputs: ["title", "iconColor", "collapsed"] }, { kind: "component", type: TruncatedTextComponent, selector: "gn-ui-truncated-text", inputs: ["text", "extraClass", "scrollContainer", "cdkScrollContainer"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2$3.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
30366
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FeatureCatalogListComponent, isStandalone: true, selector: "gn-ui-feature-catalog-list", inputs: { filteredFeatureCatalog: "filteredFeatureCatalog" }, providers: [provideIcons({ iconoirList })], viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true }, { propertyName: "scrollable", first: true, predicate: CdkScrollable, descendants: true, static: true }, { propertyName: "panelComponent", first: true, predicate: ["expanel"], descendants: true, read: ExpandablePanelComponent, static: true }], ngImport: i0, template: "<div\n cdkScrollable\n class=\"h-[562px] relative overflow-y-auto overflow-hidden\"\n data-cy=\"feat-catalog-scrollable\"\n>\n <div #scrollContainer class=\"flex flex-col gap-2 py-5 px-5\">\n @for (\n featureType of filteredFeatureCatalog?.featureTypes;\n track featureType\n ) {\n <div class=\"rounded shadow bg-white\">\n <gn-ui-expandable-panel\n #expanel\n [collapsed]=\"filteredFeatureCatalog?.featureTypes?.length !== 1\"\n iconColor=\"black\"\n >\n <ng-template #titleTemplate>\n <div class=\"px-2\">\n <div class=\"text-lg font-bold\">{{ featureType.name }}</div>\n @if (featureType.description) {\n <div class=\"text-sm\">\n {{ featureType.description }}\n </div>\n }\n </div>\n </ng-template>\n @if (expanel && !expanel.collapsed) {\n <div\n class=\"grid gap-0\"\n [style.grid-template-columns]=\"\n getGridTemplateColumns(featureType.attributes)\n \"\n data-cy=\"feature-type-content\"\n >\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"py-1 px-2 text-sm font-bold text-left border-t break-all\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n [ngClass]=\"col.class || ''\"\n data-test=\"column-label\"\n >\n {{ 'feature.catalog.attribute.' + col.key | translate }}\n </div>\n }\n @if (expanel && !expanel.collapsed) {\n @for (row of featureType.attributes; track row) {\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"bg-white text-sm font-normal text-left border-t\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n data-test=\"cell-content\"\n >\n @if (col.key === 'values') {\n @if (row.values?.length > 0) {\n <gn-ui-cell-popin\n #popinRef\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n >\n <div\n cellContent\n data-cy=\"values-cell-popin-trigger\"\n >\n <gn-ui-button\n type=\"light\"\n extraClass=\"bg-transparent border-none\"\n (buttonClick)=\"popinRef.openOverlay()\"\n >\n <ng-icon name=\"iconoirList\" size=\"24\"></ng-icon>\n </gn-ui-button>\n </div>\n <div\n popinContent\n class=\"max-h-60 overflow-y-auto min-w-64 py-4 px-6\"\n style=\"scrollbar-width: thin\"\n >\n <ul class=\"list-disc list-inside mr-4\">\n @for (v of row.values; track v) {\n <li>\n {{ v.label || v.value }}\n </li>\n }\n </ul>\n </div>\n </gn-ui-cell-popin>\n }\n } @else {\n <gn-ui-truncated-text\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n [text]=\"row[col.key]\"\n ></gn-ui-truncated-text>\n }\n </div>\n }\n }\n }\n </div>\n }\n </gn-ui-expandable-panel>\n </div>\n }\n </div>\n</div>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: CellPopinComponent, selector: "gn-ui-cell-popin", inputs: ["extraClass", "cdkScrollContainer", "scrollContainer", "activePopin"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ExpandablePanelComponent, selector: "gn-ui-expandable-panel", inputs: ["title", "iconColor", "collapsed"] }, { kind: "component", type: TruncatedTextComponent, selector: "gn-ui-truncated-text", inputs: ["text", "extraClass", "scrollContainer", "cdkScrollContainer"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2$3.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] }); }
30754
30367
  }
30755
30368
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FeatureCatalogListComponent, decorators: [{
30756
30369
  type: Component,
@@ -30763,7 +30376,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
30763
30376
  TruncatedTextComponent,
30764
30377
  NgIconComponent,
30765
30378
  ScrollingModule,
30766
- ], providers: [provideIcons({ iconoirList })], template: "<div\n cdkScrollable\n class=\"h-[562px] relative overflow-y-auto overflow-hidden\"\n data-cy=\"feat-catalog-scrollable\"\n>\n <div #scrollContainer class=\"flex flex-col gap-2 py-5 px-5\">\n @for (\n featureType of filteredFeatureCatalog?.featureTypes;\n track featureType\n ) {\n <div class=\"rounded shadow bg-white\">\n <gn-ui-expandable-panel\n #expanel\n [collapsed]=\"filteredFeatureCatalog?.featureTypes?.length !== 1\"\n iconColor=\"black\"\n >\n <ng-template #titleTemplate>\n <div class=\"px-2\">\n <div class=\"text-lg font-bold\">{{ featureType.name }}</div>\n @if (featureType.definition) {\n <div class=\"text-sm\">\n {{ featureType.definition }}\n </div>\n }\n </div>\n </ng-template>\n @if (expanel && !expanel.collapsed) {\n <div\n class=\"grid gap-0\"\n [style.grid-template-columns]=\"\n getGridTemplateColumns(featureType.attributes)\n \"\n data-cy=\"feature-type-content\"\n >\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"py-1 px-2 text-sm font-bold text-left border-t break-all\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n [ngClass]=\"col.class || ''\"\n data-test=\"column-label\"\n >\n {{ 'feature.catalog.attribute.' + col.key | translate }}\n </div>\n }\n @if (expanel && !expanel.collapsed) {\n @for (row of featureType.attributes; track row) {\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"bg-white text-sm font-normal text-left border-t\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n data-test=\"cell-content\"\n >\n @if (col.key === 'values') {\n @if (row.values?.length > 0) {\n <gn-ui-cell-popin\n #popinRef\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n >\n <div\n cellContent\n data-cy=\"values-cell-popin-trigger\"\n >\n <gn-ui-button\n type=\"light\"\n extraClass=\"bg-transparent border-none\"\n (buttonClick)=\"popinRef.openOverlay()\"\n >\n <ng-icon name=\"iconoirList\" size=\"24\"></ng-icon>\n </gn-ui-button>\n </div>\n <div\n popinContent\n class=\"max-h-60 overflow-y-auto min-w-64 py-4 px-6\"\n style=\"scrollbar-width: thin\"\n >\n <ul class=\"list-disc list-inside mr-4\">\n @for (v of row.values; track v) {\n <li>\n {{ v.label || v.code }}\n </li>\n }\n </ul>\n </div>\n </gn-ui-cell-popin>\n }\n } @else {\n <gn-ui-truncated-text\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n [text]=\"row[col.key]\"\n ></gn-ui-truncated-text>\n }\n </div>\n }\n }\n }\n </div>\n }\n </gn-ui-expandable-panel>\n </div>\n }\n </div>\n</div>\n" }]
30379
+ ], providers: [provideIcons({ iconoirList })], template: "<div\n cdkScrollable\n class=\"h-[562px] relative overflow-y-auto overflow-hidden\"\n data-cy=\"feat-catalog-scrollable\"\n>\n <div #scrollContainer class=\"flex flex-col gap-2 py-5 px-5\">\n @for (\n featureType of filteredFeatureCatalog?.featureTypes;\n track featureType\n ) {\n <div class=\"rounded shadow bg-white\">\n <gn-ui-expandable-panel\n #expanel\n [collapsed]=\"filteredFeatureCatalog?.featureTypes?.length !== 1\"\n iconColor=\"black\"\n >\n <ng-template #titleTemplate>\n <div class=\"px-2\">\n <div class=\"text-lg font-bold\">{{ featureType.name }}</div>\n @if (featureType.description) {\n <div class=\"text-sm\">\n {{ featureType.description }}\n </div>\n }\n </div>\n </ng-template>\n @if (expanel && !expanel.collapsed) {\n <div\n class=\"grid gap-0\"\n [style.grid-template-columns]=\"\n getGridTemplateColumns(featureType.attributes)\n \"\n data-cy=\"feature-type-content\"\n >\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"py-1 px-2 text-sm font-bold text-left border-t break-all\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n [ngClass]=\"col.class || ''\"\n data-test=\"column-label\"\n >\n {{ 'feature.catalog.attribute.' + col.key | translate }}\n </div>\n }\n @if (expanel && !expanel.collapsed) {\n @for (row of featureType.attributes; track row) {\n @for (\n col of getColumnsDefinition(featureType.attributes);\n track trackByColumn(i, col);\n let i = $index\n ) {\n <div\n class=\"bg-white text-sm font-normal text-left border-t\"\n [class.border-l]=\"i > 0\"\n [class.border-gray-300]=\"i > 0\"\n data-test=\"cell-content\"\n >\n @if (col.key === 'values') {\n @if (row.values?.length > 0) {\n <gn-ui-cell-popin\n #popinRef\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n >\n <div\n cellContent\n data-cy=\"values-cell-popin-trigger\"\n >\n <gn-ui-button\n type=\"light\"\n extraClass=\"bg-transparent border-none\"\n (buttonClick)=\"popinRef.openOverlay()\"\n >\n <ng-icon name=\"iconoirList\" size=\"24\"></ng-icon>\n </gn-ui-button>\n </div>\n <div\n popinContent\n class=\"max-h-60 overflow-y-auto min-w-64 py-4 px-6\"\n style=\"scrollbar-width: thin\"\n >\n <ul class=\"list-disc list-inside mr-4\">\n @for (v of row.values; track v) {\n <li>\n {{ v.label || v.value }}\n </li>\n }\n </ul>\n </div>\n </gn-ui-cell-popin>\n }\n } @else {\n <gn-ui-truncated-text\n [scrollContainer]=\"scrollContainer\"\n [cdkScrollContainer]=\"scrollable\"\n [text]=\"row[col.key]\"\n ></gn-ui-truncated-text>\n }\n </div>\n }\n }\n }\n </div>\n }\n </gn-ui-expandable-panel>\n </div>\n }\n </div>\n</div>\n" }]
30767
30380
  }], propDecorators: { filteredFeatureCatalog: [{
30768
30381
  type: Input
30769
30382
  }], scrollContainer: [{
@@ -31901,6 +31514,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
31901
31514
  ], template: "<div class=\"flex flex-col gap-6 p-6 items-start pointer-events-none\">\n @for (\n notification of notificationsService.notifications$ | async;\n track trackById($index, notification)\n ) {\n <gn-ui-notification\n class=\"max-w-full pointer-events-auto\"\n [text]=\"notification.text\"\n [type]=\"notification.type\"\n [title]=\"notification.title\"\n [closeMessage]=\"notification.closeMessage\"\n (notificationClose)=\"\n notificationsService.removeNotificationById(notification.id)\n \"\n [@enterExit]\n ></gn-ui-notification>\n }\n</div>\n" }]
31902
31515
  }] });
31903
31516
 
31517
+ marker('search.filters.spatialExtent.searchLocation');
31518
+ // in MB, null means no limit
31519
+ const SPATIAL_EXTENT_MAX_FILE_SIZE = new InjectionToken('spatialExtentMaxFileSize', { factory: () => null });
31904
31520
  class FilterDropdownComponent {
31905
31521
  constructor() {
31906
31522
  this.searchFacade = inject(SearchFacade);
@@ -31908,7 +31524,7 @@ class FilterDropdownComponent {
31908
31524
  this.fieldsService = inject(FieldsService);
31909
31525
  this.notificationsService = inject(NotificationsService);
31910
31526
  this.translateService = inject(TranslateService);
31911
- this.spatialExtentMaxFileSize = getOptionalSearchConfig()?.SPATIAL_EXTENT_MAX_FILE_SIZE;
31527
+ this.spatialExtentMaxFileSize = inject(SPATIAL_EXTENT_MAX_FILE_SIZE);
31912
31528
  this.selected$ = this.searchFacade.searchFilters$.pipe(switchMap((filters) => this.fieldsService.readFieldValuesFromFilters(filters)), map$1((fieldValues) => fieldValues[this.fieldName]), filter$1((selected) => !!selected), startWith$1([]), catchError(() => of([])));
31913
31529
  this.selectedDateRange$ = this.selected$.pipe(map$1((selected) => (Array.isArray(selected) ? {} : selected)));
31914
31530
  this.selectedBoundingBox$ = this.selected$.pipe(map$1((selected) => Array.isArray(selected) && selected.length > 0
@@ -31929,6 +31545,9 @@ class FilterDropdownComponent {
31929
31545
  .subscribe((filters) => this.searchService.updateFilters(filters));
31930
31546
  this.clearSpatialExtentErrorNotification();
31931
31547
  }
31548
+ onLocationSelected({ bbox, label }) {
31549
+ this.spatialExtentDropdown.setLocationBbox(bbox, label);
31550
+ }
31932
31551
  onSpatialExtentError(error) {
31933
31552
  this.clearSpatialExtentErrorNotification();
31934
31553
  this.spatialExtentErrorNotificationId =
@@ -31959,7 +31578,7 @@ class FilterDropdownComponent {
31959
31578
  .subscribe((filters) => this.searchService.updateFilters(filters));
31960
31579
  }
31961
31580
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FilterDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
31962
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FilterDropdownComponent, isStandalone: true, selector: "gn-ui-filter-dropdown", inputs: { fieldName: "fieldName", title: "title" }, ngImport: i0, template: "@if (fieldType === 'dateRange') {\n <gn-ui-date-range-dropdown\n [title]=\"title\"\n [dateRange]=\"(selectedDateRange$ | async) ?? {}\"\n (dateRangeChange)=\"onDateRangeChange($event)\"\n [attr.data-cy-field]=\"fieldName\"\n ></gn-ui-date-range-dropdown>\n} @else if (fieldType === 'spatialExtent') {\n <gn-ui-spatial-extent-dropdown\n [title]=\"title\"\n [initialBbox]=\"(selectedBoundingBox$ | async) ?? null\"\n [maxFileSizeMb]=\"spatialExtentMaxFileSize\"\n (bboxChange)=\"onBboxChange($event)\"\n (errorChange)=\"onSpatialExtentError($event)\"\n [attr.data-cy-field]=\"fieldName\"\n ></gn-ui-spatial-extent-dropdown>\n} @else {\n <gn-ui-dropdown-multiselect\n class=\"w-full\"\n [title]=\"title\"\n [maxRows]=\"6\"\n [choices]=\"(choices$ | async) || []\"\n [selected]=\"selected$ | async\"\n [allowSearch]=\"true\"\n (selectValues)=\"onSelectedValues($event)\"\n [attr.data-cy-field]=\"fieldName\"\n >\n </gn-ui-dropdown-multiselect>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DateRangeDropdownComponent, selector: "gn-ui-date-range-dropdown", inputs: ["title", "dateRange"], outputs: ["dateRangeChange"] }, { kind: "component", type: DropdownMultiselectComponent, selector: "gn-ui-dropdown-multiselect", inputs: ["title", "choices", "selected", "allowSearch", "maxRows", "searchInputValue"], outputs: ["selectValues"] }, { kind: "component", type: SpatialExtentDropdownComponent, selector: "gn-ui-spatial-extent-dropdown", inputs: ["title", "maxFileSizeMb", "initialBbox"], outputs: ["bboxChange", "errorChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
31581
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FilterDropdownComponent, isStandalone: true, selector: "gn-ui-filter-dropdown", inputs: { fieldName: "fieldName", title: "title" }, viewQueries: [{ propertyName: "spatialExtentDropdown", first: true, predicate: SpatialExtentDropdownComponent, descendants: true }], ngImport: i0, template: "@if (fieldType === 'dateRange') {\n <gn-ui-date-range-dropdown\n [title]=\"title\"\n [dateRange]=\"(selectedDateRange$ | async) ?? {}\"\n (dateRangeChange)=\"onDateRangeChange($event)\"\n [attr.data-cy-field]=\"fieldName\"\n ></gn-ui-date-range-dropdown>\n} @else if (fieldType === 'spatialExtent') {\n <gn-ui-spatial-extent-dropdown\n [title]=\"title\"\n [initialBbox]=\"(selectedBoundingBox$ | async) ?? null\"\n [maxFileSizeMb]=\"spatialExtentMaxFileSize\"\n (bboxChange)=\"onBboxChange($event)\"\n (errorChange)=\"onSpatialExtentError($event)\"\n [attr.data-cy-field]=\"fieldName\"\n >\n <gn-ui-location-search\n [placeholder]=\"'search.filters.spatialExtent.searchLocation' | translate\"\n (bboxSelected)=\"onLocationSelected($event)\"\n data-cy=\"locationSearch\"\n ></gn-ui-location-search>\n </gn-ui-spatial-extent-dropdown>\n} @else {\n <gn-ui-dropdown-multiselect\n class=\"w-full\"\n [title]=\"title\"\n [maxRows]=\"6\"\n [choices]=\"(choices$ | async) || []\"\n [selected]=\"selected$ | async\"\n [allowSearch]=\"true\"\n (selectValues)=\"onSelectedValues($event)\"\n [attr.data-cy-field]=\"fieldName\"\n >\n </gn-ui-dropdown-multiselect>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: DateRangeDropdownComponent, selector: "gn-ui-date-range-dropdown", inputs: ["title", "dateRange"], outputs: ["dateRangeChange"] }, { kind: "component", type: DropdownMultiselectComponent, selector: "gn-ui-dropdown-multiselect", inputs: ["title", "choices", "selected", "allowSearch", "maxRows", "searchInputValue"], outputs: ["selectValues"] }, { kind: "component", type: SpatialExtentDropdownComponent, selector: "gn-ui-spatial-extent-dropdown", inputs: ["title", "maxFileSizeMb", "initialBbox"], outputs: ["bboxChange", "errorChange"] }, { kind: "component", type: LocationSearchComponent, selector: "gn-ui-location-search", inputs: ["placeholder"], outputs: ["resultSelected", "bboxSelected"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
31963
31582
  }
31964
31583
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FilterDropdownComponent, decorators: [{
31965
31584
  type: Component,
@@ -31968,11 +31587,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
31968
31587
  DateRangeDropdownComponent,
31969
31588
  DropdownMultiselectComponent,
31970
31589
  SpatialExtentDropdownComponent,
31971
- ], template: "@if (fieldType === 'dateRange') {\n <gn-ui-date-range-dropdown\n [title]=\"title\"\n [dateRange]=\"(selectedDateRange$ | async) ?? {}\"\n (dateRangeChange)=\"onDateRangeChange($event)\"\n [attr.data-cy-field]=\"fieldName\"\n ></gn-ui-date-range-dropdown>\n} @else if (fieldType === 'spatialExtent') {\n <gn-ui-spatial-extent-dropdown\n [title]=\"title\"\n [initialBbox]=\"(selectedBoundingBox$ | async) ?? null\"\n [maxFileSizeMb]=\"spatialExtentMaxFileSize\"\n (bboxChange)=\"onBboxChange($event)\"\n (errorChange)=\"onSpatialExtentError($event)\"\n [attr.data-cy-field]=\"fieldName\"\n ></gn-ui-spatial-extent-dropdown>\n} @else {\n <gn-ui-dropdown-multiselect\n class=\"w-full\"\n [title]=\"title\"\n [maxRows]=\"6\"\n [choices]=\"(choices$ | async) || []\"\n [selected]=\"selected$ | async\"\n [allowSearch]=\"true\"\n (selectValues)=\"onSelectedValues($event)\"\n [attr.data-cy-field]=\"fieldName\"\n >\n </gn-ui-dropdown-multiselect>\n}\n" }]
31590
+ LocationSearchComponent,
31591
+ TranslatePipe,
31592
+ ], template: "@if (fieldType === 'dateRange') {\n <gn-ui-date-range-dropdown\n [title]=\"title\"\n [dateRange]=\"(selectedDateRange$ | async) ?? {}\"\n (dateRangeChange)=\"onDateRangeChange($event)\"\n [attr.data-cy-field]=\"fieldName\"\n ></gn-ui-date-range-dropdown>\n} @else if (fieldType === 'spatialExtent') {\n <gn-ui-spatial-extent-dropdown\n [title]=\"title\"\n [initialBbox]=\"(selectedBoundingBox$ | async) ?? null\"\n [maxFileSizeMb]=\"spatialExtentMaxFileSize\"\n (bboxChange)=\"onBboxChange($event)\"\n (errorChange)=\"onSpatialExtentError($event)\"\n [attr.data-cy-field]=\"fieldName\"\n >\n <gn-ui-location-search\n [placeholder]=\"'search.filters.spatialExtent.searchLocation' | translate\"\n (bboxSelected)=\"onLocationSelected($event)\"\n data-cy=\"locationSearch\"\n ></gn-ui-location-search>\n </gn-ui-spatial-extent-dropdown>\n} @else {\n <gn-ui-dropdown-multiselect\n class=\"w-full\"\n [title]=\"title\"\n [maxRows]=\"6\"\n [choices]=\"(choices$ | async) || []\"\n [selected]=\"selected$ | async\"\n [allowSearch]=\"true\"\n (selectValues)=\"onSelectedValues($event)\"\n [attr.data-cy-field]=\"fieldName\"\n >\n </gn-ui-dropdown-multiselect>\n}\n" }]
31972
31593
  }], propDecorators: { fieldName: [{
31973
31594
  type: Input
31974
31595
  }], title: [{
31975
31596
  type: Input
31597
+ }], spatialExtentDropdown: [{
31598
+ type: ViewChild,
31599
+ args: [SpatialExtentDropdownComponent]
31976
31600
  }] } });
31977
31601
 
31978
31602
  class FuzzySearchComponent {
@@ -32589,6 +32213,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
32589
32213
  marker('search.filters.summaryLabel.user');
32590
32214
  marker('search.filters.summaryLabel.changeDate');
32591
32215
  marker('search.filters.summaryLabel.resourceCreationRevisionDate');
32216
+ marker('search.filters.summaryLabel.temporalExtent');
32592
32217
  const OPEN_BOUND = '…';
32593
32218
  class SearchFiltersSummaryItemComponent {
32594
32219
  constructor() {
@@ -34152,7 +33777,7 @@ class DataService {
34152
33777
  }));
34153
33778
  }
34154
33779
  async getDownloadLinksFromOgcApiFeatures(ogcApiLink) {
34155
- const collectionInfo = await this.getDownloadUrlsFromOgcApi(ogcApiLink.url.href);
33780
+ const collectionInfo = await this.getDownloadUrlsFromOgcApi(ogcApiLink.url.href, ogcApiLink.name);
34156
33781
  return Object.keys(collectionInfo.bulkDownloadLinks).map((mimeType) => {
34157
33782
  const urlWithoutLimit = new URL(collectionInfo.bulkDownloadLinks[mimeType]);
34158
33783
  urlWithoutLimit.searchParams.delete('limit');
@@ -34165,27 +33790,31 @@ class DataService {
34165
33790
  };
34166
33791
  });
34167
33792
  }
34168
- async getDownloadUrlsFromOgcApi(url) {
33793
+ async getTargetCollectionId(endpoint, collectionId) {
33794
+ const collections = await endpoint.featureCollections;
33795
+ return collections.length === 1 && !collectionId
33796
+ ? collections[0]
33797
+ : collectionId;
33798
+ }
33799
+ async getDownloadUrlsFromOgcApi(url, collectionId) {
34169
33800
  const endpoint = new OgcApiEndpoint(url);
34170
- return await endpoint.featureCollections
34171
- .then((collections) => {
34172
- return endpoint.getCollectionInfo(collections[0]);
34173
- })
34174
- .catch((error) => {
34175
- throw new Error(`ogc.unreachable.unknown`);
34176
- });
33801
+ try {
33802
+ const id = await this.getTargetCollectionId(endpoint, collectionId);
33803
+ return await endpoint.getCollectionInfo(id);
33804
+ }
33805
+ catch {
33806
+ throw new Error('ogc.unreachable.unknown');
33807
+ }
34177
33808
  }
34178
- async getItemsFromOgcApi(url, limit) {
33809
+ async getItemsFromOgcApi(url, collectionId, limit) {
34179
33810
  const endpoint = new OgcApiEndpoint(url);
34180
- return await endpoint.featureCollections
34181
- .then((collections) => {
34182
- return collections.length
34183
- ? endpoint.getCollectionItems(collections[0], limit)
34184
- : null;
34185
- })
34186
- .catch(() => {
34187
- throw new Error(`ogc.unreachable.unknown`);
34188
- });
33811
+ try {
33812
+ const id = await this.getTargetCollectionId(endpoint, collectionId);
33813
+ return await endpoint.getCollectionItems(id, limit);
33814
+ }
33815
+ catch {
33816
+ throw new Error('ogc.unreachable.unknown');
33817
+ }
34189
33818
  }
34190
33819
  async getItemsFromStacApi(url, options) {
34191
33820
  return await StacEndpoint.getItemsFromUrl(url, options)
@@ -34273,7 +33902,7 @@ class DataService {
34273
33902
  }
34274
33903
  else if (link.type === 'service' &&
34275
33904
  link.accessServiceProtocol === 'ogcFeatures') {
34276
- return from(this.getDownloadUrlsFromOgcApi(link.url.href)).pipe(switchMap$1((collectionInfo) => {
33905
+ return from(this.getDownloadUrlsFromOgcApi(link.url.href, link.name)).pipe(switchMap$1((collectionInfo) => {
34277
33906
  const isMimeTypeJson = (mimeType) => {
34278
33907
  return mimeType.toLowerCase().indexOf('json') > -1;
34279
33908
  };
@@ -35217,7 +34846,7 @@ class MdViewFacade {
35217
34846
  if (this.linkClassifier.hasUsage(link, LinkUsage.GEODATA)) {
35218
34847
  if (link.type === 'service' &&
35219
34848
  link.accessServiceProtocol === 'ogcFeatures') {
35220
- return from(this.dataService.getItemsFromOgcApi(link.url.href, 1)).pipe(map$1((collectionRecords) => {
34849
+ return from(this.dataService.getItemsFromOgcApi(link.url.href, link.name, 1)).pipe(map$1((collectionRecords) => {
35221
34850
  return collectionRecords &&
35222
34851
  collectionRecords[0] &&
35223
34852
  collectionRecords[0].geometry
@@ -35300,7 +34929,7 @@ class MdViewEffects {
35300
34929
  }
35301
34930
  return loadFullMetadataSuccess({ full: record });
35302
34931
  }), catchError((error) => of(loadFullMetadataFailure({ otherError: error.message })))));
35303
- this.loadFeatureCatalog$ = createEffect(() => this.actions$.pipe(ofType(loadFullMetadataSuccess), filter$1(({ full }) => full !== undefined), switchMap$1(({ full }) => this.recordsRepository.getFeatureCatalog(full)), map$1((featureCatalog) => loadFeatureCatalogSuccess({
34932
+ this.loadFeatureCatalog$ = createEffect(() => this.actions$.pipe(ofType(loadFullMetadataSuccess), filter$1(({ full }) => full !== undefined), switchMap$1(({ full }) => this.recordsRepository.queryLinkedFeatureCatalog(full)), map$1((featureCatalog) => loadFeatureCatalogSuccess({
35304
34933
  datasetCatalog: featureCatalog,
35305
34934
  })), catchError((error) => of(loadFeatureCatalogFailure({
35306
34935
  error: error.message,
@@ -36959,6 +36588,15 @@ const DEFAULT_CONFIGURATION = {
36959
36588
  labelKey: marker('editor.record.form.field.title'),
36960
36589
  },
36961
36590
  },
36591
+ {
36592
+ model: 'flags',
36593
+ modelSpecifier: 'flags:IS_REFERENCE_DATASET',
36594
+ formFieldConfig: {
36595
+ labelKey: marker('editor.record.form.field.flags.IS_REFERENCE_DATASET'),
36596
+ hintKey: marker('editor.record.form.field.hint.flags.IS_REFERENCE_DATASET'),
36597
+ },
36598
+ hidden: '${record.kind != "dataset" || !user.isAdmin}',
36599
+ },
36962
36600
  {
36963
36601
  model: 'abstract',
36964
36602
  formFieldConfig: {
@@ -39843,6 +39481,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
39843
39481
  type: Output
39844
39482
  }] } });
39845
39483
 
39484
+ class FormFieldRecordFlagComponent {
39485
+ constructor() {
39486
+ this.flagName = input(...(ngDevMode ? [undefined, { debugName: "flagName" }] : []));
39487
+ this.labelKey = input(...(ngDevMode ? [undefined, { debugName: "labelKey" }] : []));
39488
+ this.hintKey = input(...(ngDevMode ? [undefined, { debugName: "hintKey" }] : []));
39489
+ this.editorFacade = inject(EditorFacade);
39490
+ this.repository = inject(RecordsRepositoryInterface);
39491
+ this.notificationsService = inject(NotificationsService);
39492
+ this.translateService = inject(TranslateService);
39493
+ this.record = toSignal(this.editorFacade.record$);
39494
+ this.recordKind = toSignal(this.editorFacade.record$.pipe(map$1((record) => record.kind)));
39495
+ this.initialValue$ = this.editorFacade.record$.pipe(filter((record) => !!record), switchMap$1((record) => this.repository.getRecordFlag(record.uniqueIdentifier, this.flagName())));
39496
+ }
39497
+ onToggle(enabled) {
39498
+ if (this.record() === null) {
39499
+ return;
39500
+ }
39501
+ this.repository
39502
+ .setRecordFlag(this.record().uniqueIdentifier, this.flagName(), enabled)
39503
+ .subscribe({
39504
+ next: () => {
39505
+ // do nothing
39506
+ },
39507
+ error: (error) => {
39508
+ this.notificationsService.showNotification({
39509
+ type: 'error',
39510
+ title: this.translateService.instant('editor.record.flag.saveError.title'),
39511
+ text: `${this.translateService.instant('editor.record.flag.saveError.body', {
39512
+ recordKind: this.recordKind(),
39513
+ })} ${error.message}`,
39514
+ }, undefined, error);
39515
+ },
39516
+ });
39517
+ }
39518
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldRecordFlagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39519
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FormFieldRecordFlagComponent, isStandalone: true, selector: "gn-ui-form-field-record-flag", inputs: { flagName: { classPropertyName: "flagName", publicName: "flagName", isSignal: true, isRequired: false, transformFunction: null }, labelKey: { classPropertyName: "labelKey", publicName: "labelKey", isSignal: true, isRequired: false, transformFunction: null }, hintKey: { classPropertyName: "hintKey", publicName: "hintKey", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex-1 flex justify-between items-center\">\n <gn-ui-check-toggle\n [label]=\"labelKey() | translate\"\n [value]=\"initialValue$ | async\"\n (toggled)=\"onToggle($event)\"\n [attr.data-cy]=\"'record-flag-toggle-' + flagName()\"\n ></gn-ui-check-toggle>\n\n @if (hintKey()) {\n <ng-icon\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"hintKey() | translate\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: CheckToggleComponent, selector: "gn-ui-check-toggle", inputs: ["title", "label", "value", "color"], outputs: ["toggled"] }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], viewProviders: [
39520
+ provideIcons({
39521
+ matHelpOutline,
39522
+ }),
39523
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39524
+ }
39525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldRecordFlagComponent, decorators: [{
39526
+ type: Component,
39527
+ args: [{ selector: 'gn-ui-form-field-record-flag', standalone: true, imports: [AsyncPipe, CheckToggleComponent, TranslatePipe, NgIcon, MatTooltip], viewProviders: [
39528
+ provideIcons({
39529
+ matHelpOutline,
39530
+ }),
39531
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex-1 flex justify-between items-center\">\n <gn-ui-check-toggle\n [label]=\"labelKey() | translate\"\n [value]=\"initialValue$ | async\"\n (toggled)=\"onToggle($event)\"\n [attr.data-cy]=\"'record-flag-toggle-' + flagName()\"\n ></gn-ui-check-toggle>\n\n @if (hintKey()) {\n <ng-icon\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"hintKey() | translate\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n }\n</div>\n" }]
39532
+ }], propDecorators: { flagName: [{ type: i0.Input, args: [{ isSignal: true, alias: "flagName", required: false }] }], labelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelKey", required: false }] }], hintKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintKey", required: false }] }] } });
39533
+
39846
39534
  class FormFieldComponent {
39847
39535
  constructor() {
39848
39536
  this.valueChange = new EventEmitter();
@@ -39861,6 +39549,7 @@ class FormFieldComponent {
39861
39549
  this.model === 'legalConstraints' ||
39862
39550
  this.model === 'securityConstraints' ||
39863
39551
  this.model === 'otherConstraints' ||
39552
+ this.model === 'flags' ||
39864
39553
  this.componentName === 'form-field-constraints-shortcuts');
39865
39554
  }
39866
39555
  get valueAsString() {
@@ -39900,6 +39589,9 @@ class FormFieldComponent {
39900
39589
  const identifiers = this.value;
39901
39590
  return identifiers?.[0]?.code || '';
39902
39591
  }
39592
+ get recordFlag() {
39593
+ return this.modelSpecifier?.replace(/^flags:/, '');
39594
+ }
39903
39595
  handleResourceIdentifierChange(code) {
39904
39596
  const identifiers = this.value;
39905
39597
  if (!code) {
@@ -39917,7 +39609,7 @@ class FormFieldComponent {
39917
39609
  }
39918
39610
  }
39919
39611
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39920
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.19", type: FormFieldComponent, isStandalone: true, selector: "gn-ui-form-field", inputs: { uniqueIdentifier: "uniqueIdentifier", recordKind: "recordKind", model: "model", modelSpecifier: "modelSpecifier", componentName: "componentName", config: "config", value: "value" }, outputs: { valueChange: "valueChange" }, providers: [provideIcons({ matEditOutline, matHelpOutline })], viewQueries: [{ propertyName: "titleInput", first: true, predicate: ["titleInput"], descendants: true }], hostDirectives: [{ directive: FieldFocusDirective }], ngImport: i0, template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container [ngSwitch]=\"model\">\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"flex flex-row flex-start items-center gap-3 mb-[12px]\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n <ng-icon\n *ngIf=\"config.hintKey\"\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'abstract'\">\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngSwitchCase=\"'overviews'\">\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceIdentifiers'\">\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceCreated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceUpdated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'updateFrequency'\">\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngSwitchCase=\"'associatedRecords'\">\n <gn-ui-form-field-associated-records\n [value]=\"valueAsAssociatedRecords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-associated-records>\n </ng-container>\n <ng-container *ngSwitchCase=\"'temporalExtents'\">\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spatialExtents'\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngSwitchCase=\"'keywords'\">\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngSwitchCase=\"'topics'\">\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n </ng-container>\n <ng-container *ngSwitchCase=\"'licenses'\">\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'legalConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'securityConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otherConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container\n ></ng-container>\n <ng-template #formFieldConstraints>\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints\n ></ng-template>\n\n <ng-container *ngSwitchCase=\"'contactsForResource'\">\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n <ng-container *ngSwitchCase=\"'contacts'\">\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:!link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-link-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-single-link-resource\n *ngIf=\"modelSpecifier === 'onlineResourceType:singleLink'\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!model\">\n <ng-container [ngSwitch]=\"componentName\">\n <ng-container *ngSwitchCase=\"'form-field-constraints-shortcuts'\">\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form-field-spatial-toggle'\">\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "component", type: FormFieldLicenseComponent, selector: "gn-ui-form-field-license", inputs: ["label", "recordLicences"], outputs: ["recordLicencesChange"] }, { kind: "component", type: FormFieldDateComponent, selector: "gn-ui-form-field-date", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldUpdateFrequencyComponent, selector: "gn-ui-form-field-update-frequency", inputs: ["value", "recordKind"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldAssociatedRecordsComponent, selector: "gn-ui-form-field-associated-records", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldTemporalExtentsComponent, selector: "gn-ui-form-field-temporal-extents", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSimpleComponent, selector: "gn-ui-form-field-simple", inputs: ["type", "readonly", "invalid", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldRichComponent, selector: "gn-ui-form-field-rich", inputs: ["label", "hint", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSpatialExtentComponent, selector: "gn-ui-form-field-spatial-extent" }, { kind: "component", type: FormFieldKeywordsComponent, selector: "gn-ui-form-field-keywords", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOverviewsComponent, selector: "gn-ui-form-field-overviews", inputs: ["metadataUuid", "recordKind", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsForResourceComponent, selector: "gn-ui-form-field-contacts-for-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineResourcesComponent, selector: "gn-ui-form-field-online-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineLinkResourcesComponent, selector: "gn-ui-form-field-online-link-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineSingleLinkResourceComponent, selector: "gn-ui-form-field-online-single-link-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsComponent, selector: "gn-ui-form-field-contacts", inputs: ["value", "modelSpecifier"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsComponent, selector: "gn-ui-form-field-constraints", inputs: ["label", "value", "constraintType"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsShortcutsComponent, selector: "gn-ui-form-field-constraints-shortcuts" }, { kind: "component", type: FormFieldSpatialToggleComponent, selector: "gn-ui-form-field-spatial-toggle" }, { kind: "component", type: FormFieldTopicsComponent, selector: "gn-ui-form-field-topics", inputs: ["value"], outputs: ["valueChange"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "directive", type: i4$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39612
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: FormFieldComponent, isStandalone: true, selector: "gn-ui-form-field", inputs: { uniqueIdentifier: "uniqueIdentifier", recordKind: "recordKind", model: "model", modelSpecifier: "modelSpecifier", componentName: "componentName", config: "config", value: "value" }, outputs: { valueChange: "valueChange" }, providers: [provideIcons({ matEditOutline, matHelpOutline })], viewQueries: [{ propertyName: "titleInput", first: true, predicate: ["titleInput"], descendants: true }], hostDirectives: [{ directive: FieldFocusDirective }], ngImport: i0, template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n @if (withoutWrapper) {\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n } @else {\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n }\n</div>\n\n<ng-template #fieldContent>\n @switch (model) {\n @case ('title') {\n <div class=\"flex flex-row flex-start items-center gap-3\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n @if (config.hintKey) {\n <ng-icon\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n }\n </div>\n </div>\n }\n @case ('abstract') {\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n }\n @case ('overviews') {\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n }\n @case ('resourceIdentifiers') {\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n }\n @case ('resourceCreated') {\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n }\n @case ('resourceUpdated') {\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n }\n @case ('updateFrequency') {\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n }\n @case ('associatedRecords') {\n <gn-ui-form-field-associated-records\n [value]=\"valueAsAssociatedRecords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-associated-records>\n }\n @case ('temporalExtents') {\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n }\n @case ('spatialExtents') {\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n }\n @case ('keywords') {\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n }\n @case ('topics') {\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n }\n @case ('licenses') {\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n }\n\n <!-- TODO: merge these cases together when migrated to angular 21 -->\n @case ('legalConstraints') {\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints>\n }\n @case ('securityConstraints') {\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints>\n }\n @case ('otherConstraints') {\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints>\n }\n\n @case ('contactsForResource') {\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n }\n @case ('contacts') {\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n }\n @case ('onlineResources') {\n @if (modelSpecifier === 'onlineResourceType:!link') {\n <gn-ui-form-field-online-resources\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n } @else if (modelSpecifier === 'onlineResourceType:link') {\n <gn-ui-form-field-online-link-resources\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n } @else if (modelSpecifier === 'onlineResourceType:singleLink') {\n <gn-ui-form-field-online-single-link-resource\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n }\n }\n @case ('flags') {\n <gn-ui-form-field-record-flag\n [flagName]=\"recordFlag\"\n [labelKey]=\"config.labelKey\"\n [hintKey]=\"config.hintKey\"\n ></gn-ui-form-field-record-flag>\n }\n }\n\n @if (!model) {\n @switch (componentName) {\n @case ('form-field-constraints-shortcuts') {\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n }\n @case ('form-field-spatial-toggle') {\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n }\n }\n }\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1$5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "component", type: FormFieldLicenseComponent, selector: "gn-ui-form-field-license", inputs: ["label", "recordLicences"], outputs: ["recordLicencesChange"] }, { kind: "component", type: FormFieldDateComponent, selector: "gn-ui-form-field-date", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldUpdateFrequencyComponent, selector: "gn-ui-form-field-update-frequency", inputs: ["value", "recordKind"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldAssociatedRecordsComponent, selector: "gn-ui-form-field-associated-records", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldTemporalExtentsComponent, selector: "gn-ui-form-field-temporal-extents", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSimpleComponent, selector: "gn-ui-form-field-simple", inputs: ["type", "readonly", "invalid", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldRichComponent, selector: "gn-ui-form-field-rich", inputs: ["label", "hint", "placeholder", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldSpatialExtentComponent, selector: "gn-ui-form-field-spatial-extent" }, { kind: "component", type: FormFieldKeywordsComponent, selector: "gn-ui-form-field-keywords", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOverviewsComponent, selector: "gn-ui-form-field-overviews", inputs: ["metadataUuid", "recordKind", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsForResourceComponent, selector: "gn-ui-form-field-contacts-for-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineResourcesComponent, selector: "gn-ui-form-field-online-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineLinkResourcesComponent, selector: "gn-ui-form-field-online-link-resources", inputs: ["metadataUuid", "value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldOnlineSingleLinkResourceComponent, selector: "gn-ui-form-field-online-single-link-resource", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldContactsComponent, selector: "gn-ui-form-field-contacts", inputs: ["value", "modelSpecifier"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsComponent, selector: "gn-ui-form-field-constraints", inputs: ["label", "value", "constraintType"], outputs: ["valueChange"] }, { kind: "component", type: FormFieldConstraintsShortcutsComponent, selector: "gn-ui-form-field-constraints-shortcuts" }, { kind: "component", type: FormFieldSpatialToggleComponent, selector: "gn-ui-form-field-spatial-toggle" }, { kind: "component", type: FormFieldTopicsComponent, selector: "gn-ui-form-field-topics", inputs: ["value"], outputs: ["valueChange"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "directive", type: i4$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "component", type: FormFieldRecordFlagComponent, selector: "gn-ui-form-field-record-flag", inputs: ["flagName", "labelKey", "hintKey"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
39921
39613
  }
39922
39614
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: FormFieldComponent, decorators: [{
39923
39615
  type: Component,
@@ -39947,7 +39639,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
39947
39639
  FormFieldTopicsComponent,
39948
39640
  TextFieldModule,
39949
39641
  NgIconComponent,
39950
- ], providers: [provideIcons({ matEditOutline, matHelpOutline })], hostDirectives: [FieldFocusDirective], template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container [ngSwitch]=\"model\">\n <ng-container *ngSwitchCase=\"'title'\">\n <div class=\"flex flex-row flex-start items-center gap-3 mb-[12px]\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n <ng-icon\n *ngIf=\"config.hintKey\"\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'abstract'\">\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngSwitchCase=\"'overviews'\">\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceIdentifiers'\">\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceCreated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'resourceUpdated'\">\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n </ng-container>\n <ng-container *ngSwitchCase=\"'updateFrequency'\">\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngSwitchCase=\"'associatedRecords'\">\n <gn-ui-form-field-associated-records\n [value]=\"valueAsAssociatedRecords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-associated-records>\n </ng-container>\n <ng-container *ngSwitchCase=\"'temporalExtents'\">\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spatialExtents'\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngSwitchCase=\"'keywords'\">\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngSwitchCase=\"'topics'\">\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n </ng-container>\n <ng-container *ngSwitchCase=\"'licenses'\">\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'legalConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'securityConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'otherConstraints'\">\n <ng-container *ngTemplateOutlet=\"formFieldConstraints\"></ng-container\n ></ng-container>\n <ng-template #formFieldConstraints>\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints\n ></ng-template>\n\n <ng-container *ngSwitchCase=\"'contactsForResource'\">\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n <ng-container *ngSwitchCase=\"'contacts'\">\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:!link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-link-resources\n *ngIf=\"modelSpecifier === 'onlineResourceType:link'\"\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n </ng-container>\n <ng-container *ngSwitchCase=\"'onlineResources'\">\n <gn-ui-form-field-online-single-link-resource\n *ngIf=\"modelSpecifier === 'onlineResourceType:singleLink'\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!model\">\n <ng-container [ngSwitch]=\"componentName\">\n <ng-container *ngSwitchCase=\"'form-field-constraints-shortcuts'\">\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n </ng-container>\n <ng-container *ngSwitchCase=\"'form-field-spatial-toggle'\">\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"] }]
39642
+ FormFieldRecordFlagComponent,
39643
+ ], providers: [provideIcons({ matEditOutline, matHelpOutline })], hostDirectives: [FieldFocusDirective], template: "<!-- TEMPORARY - disabling the open data switch -->\n<!-- <ng-container *ngIf=\"model === 'licenses'\">\n <gn-ui-form-field-open-data\n [value]=\"valueAsConstraints\"\n (valueChange)=\"valueChange.emit($event)\"\n (openDataChange)=\"toggleIsOpenData($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container> -->\n<div class=\"flex flex-col h-full\">\n @if (withoutWrapper) {\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n } @else {\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n }\n</div>\n\n<ng-template #fieldContent>\n @switch (model) {\n @case ('title') {\n <div class=\"flex flex-row flex-start items-center gap-3\">\n <textarea\n #titleInput\n cdkTextareaAutosize\n #autosize=\"cdkTextareaAutosize\"\n cdkAutosizeMinRows=\"1\"\n data-test=\"recordTitleInput\"\n class=\"grow font-title text-3xl font-normal overflow-hidden text-black/80\"\n [value]=\"valueAsString\"\n (change)=\"valueChange.emit($event.target.value)\"\n [placeholder]=\"\n 'editor.record.form.field.title.placeholder'\n | translate: { recordKind }\n \"\n ></textarea>\n <div class=\"flex flex-row justify-between self-start mt-0.5\">\n <ng-icon\n name=\"matEditOutline\"\n size=\"16\"\n class=\"m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n ></ng-icon>\n @if (config.hintKey) {\n <ng-icon\n name=\"matHelpOutline\"\n size=\"16\"\n class=\"m-2\"\n [matTooltip]=\"config.hintKey! | translate: { recordKind }\"\n matTooltipPosition=\"above\"\n ></ng-icon>\n }\n </div>\n </div>\n }\n @case ('abstract') {\n <gn-ui-form-field-rich\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [hint]=\"config.hintKey! | translate: { recordKind }\"\n [value]=\"valueAsString\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-rich>\n }\n @case ('overviews') {\n <gn-ui-form-field-overviews\n [metadataUuid]=\"uniqueIdentifier\"\n [recordKind]=\"recordKind\"\n [value]=\"valueAsOverviews\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-overviews>\n }\n @case ('resourceIdentifiers') {\n <gn-ui-form-field-simple\n [type]=\"'text'\"\n [value]=\"valueAsResourceIdentifierCode\"\n (valueChange)=\"handleResourceIdentifierChange($event)\"\n ></gn-ui-form-field-simple>\n }\n @case ('resourceCreated') {\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n }\n @case ('resourceUpdated') {\n <gn-ui-form-field-date\n [value]=\"valueAsDate\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-date>\n }\n @case ('updateFrequency') {\n <gn-ui-form-field-update-frequency\n [value]=\"valueAsUpdateFrequency\"\n (valueChange)=\"valueChange.emit($event)\"\n [recordKind]=\"recordKind\"\n ></gn-ui-form-field-update-frequency>\n }\n @case ('associatedRecords') {\n <gn-ui-form-field-associated-records\n [value]=\"valueAsAssociatedRecords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-associated-records>\n }\n @case ('temporalExtents') {\n <gn-ui-form-field-temporal-extents\n [value]=\"valueAsTemporalExtents\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-temporal-extents>\n }\n @case ('spatialExtents') {\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n }\n @case ('keywords') {\n <gn-ui-form-field-keywords\n [value]=\"valueAsKeywords\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-keywords>\n }\n @case ('topics') {\n <gn-ui-form-field-topics\n [value]=\"valueAsTopics\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-topics>\n }\n @case ('licenses') {\n <gn-ui-form-field-license\n [label]=\"config.labelKey! | translate: { recordKind }\"\n [recordLicences]=\"valueAsConstraints\"\n (recordLicencesChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-license>\n }\n\n <!-- TODO: merge these cases together when migrated to angular 21 -->\n @case ('legalConstraints') {\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints>\n }\n @case ('securityConstraints') {\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints>\n }\n @case ('otherConstraints') {\n <gn-ui-form-field-constraints\n [label]=\"config.labelKey\"\n [value]=\"valueAsConstraints\"\n [constraintType]=\"model\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-constraints>\n }\n\n @case ('contactsForResource') {\n <gn-ui-form-field-contacts-for-resource\n [value]=\"valueAsIndividuals\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts-for-resource>\n }\n @case ('contacts') {\n <gn-ui-form-field-contacts\n [value]=\"valueAsIndividuals\"\n [modelSpecifier]=\"modelSpecifier\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-contacts>\n }\n @case ('onlineResources') {\n @if (modelSpecifier === 'onlineResourceType:!link') {\n <gn-ui-form-field-online-resources\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-resources>\n } @else if (modelSpecifier === 'onlineResourceType:link') {\n <gn-ui-form-field-online-link-resources\n [metadataUuid]=\"uniqueIdentifier\"\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-link-resources>\n } @else if (modelSpecifier === 'onlineResourceType:singleLink') {\n <gn-ui-form-field-online-single-link-resource\n [value]=\"valueAsOnlineResources\"\n (valueChange)=\"valueChange.emit($event)\"\n ></gn-ui-form-field-online-single-link-resource>\n }\n }\n @case ('flags') {\n <gn-ui-form-field-record-flag\n [flagName]=\"recordFlag\"\n [labelKey]=\"config.labelKey\"\n [hintKey]=\"config.hintKey\"\n ></gn-ui-form-field-record-flag>\n }\n }\n\n @if (!model) {\n @switch (componentName) {\n @case ('form-field-constraints-shortcuts') {\n <gn-ui-form-field-constraints-shortcuts></gn-ui-form-field-constraints-shortcuts>\n }\n @case ('form-field-spatial-toggle') {\n <gn-ui-form-field-spatial-toggle></gn-ui-form-field-spatial-toggle>\n }\n }\n }\n</ng-template>\n", styles: [":host{scroll-margin-top:90px}\n"] }]
39951
39644
  }], propDecorators: { uniqueIdentifier: [{
39952
39645
  type: Input
39953
39646
  }], recordKind: [{
@@ -39978,9 +39671,13 @@ const TOKEN_OPERATOR_LOGICAL = ['==', '!='];
39978
39671
  const TOKEN_STRING_LITERAL = ["'", '"'];
39979
39672
  const TOKEN_GROUP_START = '(';
39980
39673
  const TOKEN_GROUP_END = ')';
39674
+ const TOKEN_OPERATOR_BOOLEAN = ['&&', '||'];
39675
+ const TOKEN_OPERATOR_NOT = '!';
39981
39676
  // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence
39982
39677
  const OPERATORS_BY_PRECEDENCE = [
39983
39678
  [TOKEN_OPERATOR_TERNARY_FIRST, TOKEN_OPERATOR_TERNARY_SECOND],
39679
+ TOKEN_OPERATOR_BOOLEAN,
39680
+ [TOKEN_OPERATOR_NOT],
39984
39681
  TOKEN_OPERATOR_LOGICAL,
39985
39682
  ];
39986
39683
  const ALL_OPERATORS = OPERATORS_BY_PRECEDENCE.flat();
@@ -40090,6 +39787,16 @@ function evaluateInternal(expression, currentContext) {
40090
39787
  pos++;
40091
39788
  continue;
40092
39789
  }
39790
+ // BOOLEAN LITERAL
39791
+ const isBooleanLiteral = readNext(expression, pos, 4) === 'true' ||
39792
+ readNext(expression, pos, 5) === 'false';
39793
+ if (isBooleanLiteral) {
39794
+ const literal = readNext(expression, pos, 4) === 'true' ? 'true' : 'false';
39795
+ pos += literal.length;
39796
+ const booleanLiteral = literal === 'true';
39797
+ currentEvaluator = () => booleanLiteral;
39798
+ continue;
39799
+ }
40093
39800
  // SYMBOL (NAME)
40094
39801
  const isSymbol = /[a-zA-Z]/.test(readNext(expression, pos));
40095
39802
  if (isSymbol) {
@@ -40180,6 +39887,35 @@ function evaluateInternal(expression, currentContext) {
40180
39887
  };
40181
39888
  continue;
40182
39889
  }
39890
+ // BOOLEAN OPERATORS
39891
+ const isBooleanOperator = TOKEN_OPERATOR_BOOLEAN.some((token) => readNext(expression, pos, token.length) === token);
39892
+ if (isBooleanOperator) {
39893
+ const matchingOperator = TOKEN_OPERATOR_BOOLEAN.find((token) => readNext(expression, pos, token.length) === token);
39894
+ const isAnd = matchingOperator === '&&';
39895
+ pos += matchingOperator.length;
39896
+ const leftEvaluator = currentEvaluator;
39897
+ const rightExpression = readUntilNextOperator(expression, pos, matchingOperator);
39898
+ pos += rightExpression.length;
39899
+ const rightEvaluator = evaluateInternal(rightExpression, currentContext).evaluator;
39900
+ currentEvaluator = (context) => {
39901
+ return isAnd
39902
+ ? Boolean(leftEvaluator(context) && rightEvaluator(context))
39903
+ : Boolean(leftEvaluator(context) || rightEvaluator(context));
39904
+ };
39905
+ continue;
39906
+ }
39907
+ // PREFIX OPERATORS
39908
+ const isNotOperator = readNext(expression, pos) === TOKEN_OPERATOR_NOT;
39909
+ if (isNotOperator) {
39910
+ pos++;
39911
+ const operandExpression = readUntilNextOperator(expression, pos, TOKEN_OPERATOR_NOT);
39912
+ pos += operandExpression.length;
39913
+ const operandEvaluator = evaluateInternal(operandExpression, currentContext).evaluator;
39914
+ currentEvaluator = (context) => {
39915
+ return !operandEvaluator(context);
39916
+ };
39917
+ continue;
39918
+ }
40183
39919
  // TERNARY OPERATOR
40184
39920
  const isTernary = readNext(expression, pos) === TOKEN_OPERATOR_TERNARY_FIRST;
40185
39921
  if (isTernary) {
@@ -40250,6 +39986,7 @@ class RecordFormComponent {
40250
39986
  constructor() {
40251
39987
  this.facade = inject(EditorFacade);
40252
39988
  this.notifications = inject(NotificationsService);
39989
+ this.platform = inject(PlatformServiceInterface);
40253
39990
  this.subscription = new Subscription();
40254
39991
  this.recordUniqueIdentifier$ = this.facade.record$.pipe(map$2((record) => record.uniqueIdentifier));
40255
39992
  this.recordKind$ = this.facade.record$.pipe(map$2((record) => record.kind));
@@ -40260,6 +39997,8 @@ class RecordFormComponent {
40260
39997
  this.formFields = viewChildren(FormFieldComponent, ...(ngDevMode ? [{ debugName: "formFields" }] : []));
40261
39998
  this.sectionFocusDirectives = viewChildren('sectionFocus', ...(ngDevMode ? [{ debugName: "sectionFocusDirectives" }] : []));
40262
39999
  this.recordSignal = toSignal(this.facade.record$, { requireSync: true });
40000
+ this.userSignal = toSignal(this.platform.getMe());
40001
+ this.isAdminSignal = toSignal(this.platform.isAdministrator());
40263
40002
  this.expressionCache = new Map();
40264
40003
  }
40265
40004
  focusField(model, sectionIndex) {
@@ -40284,7 +40023,7 @@ class RecordFormComponent {
40284
40023
  this.subscription.unsubscribe();
40285
40024
  }
40286
40025
  handleFieldValueChange(model, newValue) {
40287
- if (!model) {
40026
+ if (!model || model === 'flags') {
40288
40027
  return;
40289
40028
  }
40290
40029
  this.facade.updateRecordField(model, newValue);
@@ -40327,7 +40066,15 @@ ${errors.map((err) => `> ${err}`).join('\n')}`);
40327
40066
  text: 'An error happened while evaluating an expression inside the editor configuration; open the developer console for more information',
40328
40067
  });
40329
40068
  }
40330
- this.expressionCache.set(expression, computed(() => evaluator({ globals: { record: this.recordSignal() } })));
40069
+ this.expressionCache.set(expression, computed(() => evaluator({
40070
+ globals: {
40071
+ record: this.recordSignal(),
40072
+ user: {
40073
+ ...this.userSignal(),
40074
+ isAdmin: this.isAdminSignal(),
40075
+ },
40076
+ },
40077
+ })));
40331
40078
  return this.expressionCache.get(expression);
40332
40079
  }
40333
40080
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RecordFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -40934,6 +40681,669 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
40934
40681
  args: ['gnUiSearchRouterContainer']
40935
40682
  }] } });
40936
40683
 
40684
+ const flatten = (base, obj, keepLevel = false) => Object.keys(obj).reduce((prev, curr) => {
40685
+ const path = base ? `${base}.${curr}` : curr;
40686
+ const val = obj[curr];
40687
+ if (keepLevel) {
40688
+ return { ...prev, [path]: flatten('', val) };
40689
+ }
40690
+ else if (typeof val === 'object' && !Array.isArray(val)) {
40691
+ return {
40692
+ ...prev,
40693
+ ...flatten(path, val),
40694
+ };
40695
+ }
40696
+ else {
40697
+ return { ...prev, [path]: val };
40698
+ }
40699
+ }, {});
40700
+ const checkKeys = (input, mandatory, optional) => {
40701
+ const keys = Object.keys(input);
40702
+ const missing = mandatory.filter((key) => keys.indexOf(key) === -1);
40703
+ const unrecognized = keys.filter((key) => mandatory.indexOf(key) === -1 && optional.indexOf(key) === -1);
40704
+ return {
40705
+ missing,
40706
+ unrecognized,
40707
+ };
40708
+ };
40709
+ /**
40710
+ * Only keeps recognized keys, flatten nested values (to allow having "." in keys),
40711
+ * pushes warnings and errors to the given arrays; returns null in case of error
40712
+ */
40713
+ function parseConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
40714
+ if (typeof fullConfigObj[sectionName] !== 'object') {
40715
+ if (mandatoryKeys.length === 0)
40716
+ return null;
40717
+ outErrors.push(`The [${sectionName}] mandatory section is missing.`);
40718
+ return null;
40719
+ }
40720
+ const sectionConf = fullConfigObj[sectionName];
40721
+ const keysCheck = checkKeys(sectionConf, mandatoryKeys, optionalKeys);
40722
+ if (keysCheck.missing.length) {
40723
+ // note: this is not thrown to allow merging several Errors down the line
40724
+ outErrors.push(`In the [${sectionName}] section: ${keysCheck.missing.join(', ')}`);
40725
+ return null;
40726
+ }
40727
+ else if (keysCheck.unrecognized.length) {
40728
+ outWarnings.push(`In the [${sectionName}] section: ${keysCheck.unrecognized.join(', ')}`);
40729
+ keysCheck.unrecognized.forEach((key) => delete sectionConf[key]);
40730
+ }
40731
+ return sectionConf;
40732
+ }
40733
+ /**
40734
+ * Same as parseConfigSection but keeps all keys, recognized or not
40735
+ * Also the first level is the language code (e.g. 'en')
40736
+ * This is optional
40737
+ */
40738
+ function parseTranslationsConfigSection(fullConfigObj, sectionName) {
40739
+ if (typeof fullConfigObj[sectionName] !== 'object') {
40740
+ return {};
40741
+ }
40742
+ return flatten('', fullConfigObj[sectionName], true);
40743
+ }
40744
+ /**
40745
+ * Same as parseConfigSection but handles an array of configs; this is
40746
+ * considered optional; returns null in case of error in at least one of
40747
+ * the sections
40748
+ */
40749
+ function parseMultiConfigSection(fullConfigObj, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors) {
40750
+ const sections = fullConfigObj[sectionName];
40751
+ if (!sections) {
40752
+ return [];
40753
+ }
40754
+ if (!Array.isArray(sections)) {
40755
+ outErrors.push(`Expected [[${sectionName}]] to be an array of sections.`);
40756
+ return null;
40757
+ }
40758
+ const result = sections.map((section) => parseConfigSection({ [sectionName]: section }, sectionName, mandatoryKeys, optionalKeys, outWarnings, outErrors));
40759
+ if (result.some((r) => r === null)) {
40760
+ return null;
40761
+ }
40762
+ return result;
40763
+ }
40764
+ function checkMetadataLanguage(parsedConfigSection, outWarnings) {
40765
+ const lang2 = toLang2(parsedConfigSection.metadata_language.toLowerCase());
40766
+ if (lang2?.length !== 2) {
40767
+ outWarnings.push(`In the [global] section: metadata_language = "${parsedConfigSection.metadata_language}" is not a recognized ISO 639 language code`);
40768
+ }
40769
+ return parsedConfigSection;
40770
+ }
40771
+ function checkNewRecordDefaultLanguage(parsedConfigSection, outWarnings) {
40772
+ const lang2 = toLang2(parsedConfigSection.new_record_default_language.toLowerCase());
40773
+ if (!(lang2 in LANG_2_TO_3_MAPPER)) {
40774
+ outWarnings.push(`In the [editing] section: new_record_default_language = "${parsedConfigSection.new_record_default_language}" is not a recognized ISO 639 language code`);
40775
+ return {
40776
+ ...parsedConfigSection,
40777
+ new_record_default_language: undefined,
40778
+ };
40779
+ }
40780
+ return {
40781
+ ...parsedConfigSection,
40782
+ new_record_default_language: lang2,
40783
+ };
40784
+ }
40785
+ function checkNewRecordStandard(parsedConfigSection, outWarnings) {
40786
+ const standard = parsedConfigSection.new_record_standard;
40787
+ const normalizedStandard = typeof standard === 'string' ? standard.trim().toLowerCase() : null;
40788
+ if (normalizedStandard === 'iso19139' ||
40789
+ normalizedStandard === 'iso19115-3') {
40790
+ return {
40791
+ ...parsedConfigSection,
40792
+ new_record_standard: normalizedStandard,
40793
+ };
40794
+ }
40795
+ outWarnings.push(`In the [editing] section: new_record_standard = "${standard}" is not a supported metadata standard`);
40796
+ return {
40797
+ ...parsedConfigSection,
40798
+ new_record_standard: undefined,
40799
+ };
40800
+ }
40801
+
40802
+ /**
40803
+ * This loader extends the default one based on JSON files but also loads custom translations
40804
+ * defined in the app configuration
40805
+ * Implements a fallback on default lang if translated labels are empty
40806
+ */
40807
+ class FileWithOverridesTranslateLoader extends FileTranslateLoader {
40808
+ getTranslation(lang) {
40809
+ const baseLang = lang.substring(0, 2); // removing the right part of e.g. en_EN
40810
+ return super.getTranslation(baseLang).pipe(map$1((translations) => ({
40811
+ ...translations,
40812
+ ...getCustomTranslations(baseLang),
40813
+ })));
40814
+ }
40815
+ }
40816
+
40817
+ const MISSING_CONFIG_ERROR = `Application configuration was not initialized correctly.
40818
+ This error might show up in case of an invalid/malformed configuration file.
40819
+
40820
+ Note: make sure that you have called \`loadAppConfig\` from '../../../../../libs/util/app-config/src' before starting the Angular application.`;
40821
+ let globalConfig = null;
40822
+ function getGlobalConfig() {
40823
+ if (globalConfig === null)
40824
+ throw new Error(MISSING_CONFIG_ERROR);
40825
+ return globalConfig;
40826
+ }
40827
+ let themeConfig = null;
40828
+ function getThemeConfig() {
40829
+ if (themeConfig === null)
40830
+ throw new Error(MISSING_CONFIG_ERROR);
40831
+ return themeConfig;
40832
+ }
40833
+ let mapConfig = null;
40834
+ function getOptionalMapConfig() {
40835
+ return mapConfig;
40836
+ }
40837
+ let searchConfig = null;
40838
+ function getOptionalSearchConfig() {
40839
+ return searchConfig;
40840
+ }
40841
+ let editorConfig = null;
40842
+ function getOptionalEditorConfig() {
40843
+ return editorConfig;
40844
+ }
40845
+ let metadataQualityConfig = null;
40846
+ function getMetadataQualityConfig() {
40847
+ return (metadataQualityConfig ||
40848
+ {
40849
+ ENABLED: false,
40850
+ });
40851
+ }
40852
+ let customTranslations = null;
40853
+ function getCustomTranslations(langCode) {
40854
+ if (customTranslations === null)
40855
+ throw new Error(MISSING_CONFIG_ERROR);
40856
+ return langCode in customTranslations ? customTranslations[langCode] : {};
40857
+ }
40858
+ let appConfigLoaded = false;
40859
+ function parseGlobalSection(parsed, { warnings, errors }) {
40860
+ let parsedGlobalSection = parseConfigSection(parsed, 'global', ['geonetwork4_api_url'], [
40861
+ 'datahub_url',
40862
+ 'edit_url_template',
40863
+ 'proxy_path',
40864
+ 'metadata_language',
40865
+ 'login_url',
40866
+ 'logout_url',
40867
+ 'settings_url',
40868
+ 'web_component_embedder_url',
40869
+ 'languages',
40870
+ 'contact_email',
40871
+ 'reuse_form_url',
40872
+ ], warnings, errors);
40873
+ if (parsedGlobalSection?.metadata_language) {
40874
+ parsedGlobalSection = checkMetadataLanguage(parsedGlobalSection, warnings);
40875
+ }
40876
+ return parsedGlobalSection === null
40877
+ ? null
40878
+ : {
40879
+ GN4_API_URL: parsedGlobalSection.geonetwork4_api_url,
40880
+ DATAHUB_URL: parsedGlobalSection.datahub_url,
40881
+ EDIT_URL_TEMPLATE: parsedGlobalSection.edit_url_template,
40882
+ PROXY_PATH: parsedGlobalSection.proxy_path,
40883
+ METADATA_LANGUAGE: parsedGlobalSection.metadata_language
40884
+ ? parsedGlobalSection.metadata_language.toLowerCase()
40885
+ : undefined,
40886
+ LOGIN_URL: parsedGlobalSection.login_url,
40887
+ LOGOUT_URL: parsedGlobalSection.logout_url,
40888
+ SETTINGS_URL: parsedGlobalSection.settings_url,
40889
+ WEB_COMPONENT_EMBEDDER_URL: parsedGlobalSection.web_component_embedder_url,
40890
+ LANGUAGES: parsedGlobalSection.languages,
40891
+ CONTACT_EMAIL: parsedGlobalSection.contact_email,
40892
+ REUSE_FORM_URL: parsedGlobalSection.reuse_form_url,
40893
+ };
40894
+ }
40895
+ function parseMapSection(parsed, { warnings, errors }) {
40896
+ const parsedLayersSections = parseMultiConfigSection(parsed, 'map_layer', ['type'], ['name', 'url', 'data', 'styleUrl', 'accessToken'], warnings, errors);
40897
+ const parsedMapSection = parseConfigSection(parsed, 'map', [], [
40898
+ 'max_zoom',
40899
+ 'do_not_tile_wms',
40900
+ 'max_extent',
40901
+ 'max_feature_count',
40902
+ 'baselayer',
40903
+ 'do_not_use_default_basemap',
40904
+ 'external_viewer_url_template',
40905
+ 'external_viewer_open_new_tab',
40906
+ ], warnings, errors);
40907
+ return parsedMapSection === null || parsedLayersSections === null
40908
+ ? null
40909
+ : {
40910
+ MAX_ZOOM: parsedMapSection.max_zoom,
40911
+ DO_NOT_TILE_WMS: parsedMapSection.do_not_tile_wms,
40912
+ MAX_EXTENT: parsedMapSection.max_extent,
40913
+ MAX_FEATURE_COUNT: parsedMapSection.max_feature_count,
40914
+ EXTERNAL_VIEWER_URL_TEMPLATE: parsedMapSection.external_viewer_url_template,
40915
+ EXTERNAL_VIEWER_OPEN_NEW_TAB: parsedMapSection.external_viewer_open_new_tab,
40916
+ DO_NOT_USE_DEFAULT_BASEMAP: !!parsedMapSection.do_not_use_default_basemap,
40917
+ MAP_LAYERS: parsedLayersSections.map((map_layer) => ({
40918
+ TYPE: map_layer.type,
40919
+ URL: map_layer.url,
40920
+ NAME: map_layer.name,
40921
+ DATA: map_layer.data,
40922
+ STYLE_URL: map_layer.styleUrl,
40923
+ ACCESS_TOKEN: map_layer.accessToken,
40924
+ })),
40925
+ };
40926
+ }
40927
+ function parseThemeSection(parsed, { warnings, errors }) {
40928
+ const parsedThemeSection = parseConfigSection(parsed, 'theme', ['primary_color', 'secondary_color', 'main_color', 'background_color'], [
40929
+ 'header_foreground_color',
40930
+ 'main_font',
40931
+ 'title_font',
40932
+ 'fonts_stylesheet_url',
40933
+ 'thumbnail_placeholder',
40934
+ 'header_background',
40935
+ 'favicon',
40936
+ ], warnings, errors);
40937
+ return parsedThemeSection === null
40938
+ ? null
40939
+ : {
40940
+ PRIMARY_COLOR: parsedThemeSection.primary_color,
40941
+ SECONDARY_COLOR: parsedThemeSection.secondary_color,
40942
+ MAIN_COLOR: parsedThemeSection.main_color,
40943
+ BACKGROUND_COLOR: parsedThemeSection.background_color,
40944
+ HEADER_FOREGROUND_COLOR: parsedThemeSection.header_foreground_color,
40945
+ THUMBNAIL_PLACEHOLDER: parsedThemeSection.thumbnail_placeholder,
40946
+ HEADER_BACKGROUND: parsedThemeSection.header_background,
40947
+ TITLE_FONT: parsedThemeSection.title_font,
40948
+ MAIN_FONT: parsedThemeSection.main_font,
40949
+ FONTS_STYLESHEET_URL: parsedThemeSection.fonts_stylesheet_url,
40950
+ FAVICON: parsedThemeSection.favicon,
40951
+ };
40952
+ }
40953
+ function parseSearchSection(parsed, { warnings, errors }) {
40954
+ const parsedSearchSection = parseConfigSection(parsed, 'search', [], [
40955
+ 'record_kind_quick_filter',
40956
+ 'filter_geometry_data',
40957
+ 'filter_geometry_url',
40958
+ 'do_not_use_default_search_preset',
40959
+ 'search_preset',
40960
+ 'advanced_filters',
40961
+ 'limit',
40962
+ 'spatial_extent_max_file_size',
40963
+ 'geocoding_provider',
40964
+ 'geocoding_provider_options',
40965
+ 'geocoding_provider_labels',
40966
+ ], warnings, errors);
40967
+ const parsedSearchParams = parseMultiConfigSection(parsed, 'search_preset', ['name'], ['sort', 'filters'], warnings, errors);
40968
+ const parsedCustomFilters = parseMultiConfigSection(parsed, 'custom_filter', ['name', 'base_filter'], ['exclude_values', 'include_values', 'label_key'], warnings, errors);
40969
+ const parsedGeocodingProviderLabels = parsedSearchSection?.geocoding_provider_labels;
40970
+ return parsedSearchSection === null
40971
+ ? null
40972
+ : {
40973
+ RECORD_KIND_QUICK_FILTER: parsedSearchSection.record_kind_quick_filter,
40974
+ FILTER_GEOMETRY_DATA: parsedSearchSection.filter_geometry_data,
40975
+ FILTER_GEOMETRY_URL: parsedSearchSection.filter_geometry_url,
40976
+ DO_NOT_USE_DEFAULT_SEARCH_PRESET: !!parsedSearchSection.do_not_use_default_search_preset,
40977
+ SEARCH_PRESET: parsedSearchParams.map((param) => ({
40978
+ sort: param.sort,
40979
+ name: param.name,
40980
+ filters: param.filters,
40981
+ })),
40982
+ ADVANCED_FILTERS: parsedSearchSection.advanced_filters,
40983
+ CUSTOM_FILTERS: (parsedCustomFilters ?? []).map((customFilter) => ({
40984
+ name: customFilter.name,
40985
+ baseFilter: customFilter.base_filter,
40986
+ excludeValues: customFilter.exclude_values,
40987
+ includeValues: customFilter.include_values,
40988
+ labelKey: customFilter.label_key,
40989
+ })),
40990
+ LIMIT: parsedSearchSection.limit,
40991
+ SPATIAL_EXTENT_MAX_FILE_SIZE: parsedSearchSection.spatial_extent_max_file_size,
40992
+ GEOCODING_PROVIDER: parsedSearchSection.geocoding_provider,
40993
+ GEOCODING_PROVIDER_OPTIONS: parsedSearchSection.geocoding_provider_options,
40994
+ GEOCODING_PROVIDER_LABELS: parsedGeocodingProviderLabels
40995
+ ? {
40996
+ MAIN: parsedGeocodingProviderLabels.main,
40997
+ SECONDARY: parsedGeocodingProviderLabels.secondary,
40998
+ TERTIARY: parsedGeocodingProviderLabels.tertiary,
40999
+ }
41000
+ : undefined,
41001
+ };
41002
+ }
41003
+ function parseMetadataQualitySection(parsed, { warnings, errors }) {
41004
+ const parsedMetadataQualitySection = parseConfigSection(parsed, 'metadata-quality', [], ['enabled'], warnings, errors);
41005
+ return parsedMetadataQualitySection === null
41006
+ ? null
41007
+ : {
41008
+ ENABLED: parsedMetadataQualitySection.enabled,
41009
+ SORTABLE: parsedMetadataQualitySection.sortable,
41010
+ };
41011
+ }
41012
+ function parseEditingSection(parsed, { warnings, errors }) {
41013
+ let parsedEditingSection = parseConfigSection(parsed, 'editing', [], ['new_record_default_language', 'new_record_standard'], warnings, errors);
41014
+ if (parsedEditingSection !== null &&
41015
+ parsedEditingSection.new_record_default_language !== undefined) {
41016
+ parsedEditingSection = checkNewRecordDefaultLanguage(parsedEditingSection, warnings);
41017
+ }
41018
+ if (parsedEditingSection !== null &&
41019
+ parsedEditingSection.new_record_standard !== undefined) {
41020
+ parsedEditingSection = checkNewRecordStandard(parsedEditingSection, warnings);
41021
+ }
41022
+ return parsedEditingSection === null
41023
+ ? null
41024
+ : {
41025
+ NEW_RECORD_DEFAULT_LANGUAGE: parsedEditingSection.new_record_default_language,
41026
+ NEW_RECORD_STANDARD: parsedEditingSection.new_record_standard,
41027
+ };
41028
+ }
41029
+ const SECTION_PARSERS = {
41030
+ global: parseGlobalSection,
41031
+ map: parseMapSection,
41032
+ theme: parseThemeSection,
41033
+ search: parseSearchSection,
41034
+ metadataQuality: parseMetadataQualitySection,
41035
+ editor: parseEditingSection,
41036
+ translations: (parsed) => parseTranslationsConfigSection(parsed, 'translations'),
41037
+ };
41038
+ /**
41039
+ * Loads the configuration file and stores the given sections (all by default);
41040
+ * omitted sections are reset (their getters will throw or return null);
41041
+ * resolves with the parsed configuration file, e.g. to read sections with a custom parser
41042
+ */
41043
+ function loadAppConfig(configUrl = 'assets/configuration/default.toml', sections = Object.keys(SECTION_PARSERS)) {
41044
+ console.log(`[geonetwork-ui] Loading application configuration from ${configUrl}`);
41045
+ return fetch(configUrl)
41046
+ .then((resp) => {
41047
+ if (!resp.ok)
41048
+ throw new Error('Configuration file could not be loaded');
41049
+ return resp.text();
41050
+ })
41051
+ .then((conf) => {
41052
+ let parsed;
41053
+ try {
41054
+ parsed = TOML.parse(conf, { joiner: '\n', bigint: false });
41055
+ }
41056
+ catch (e) {
41057
+ throw new Error(`An error occurred when parsing the configuration file: ${e.message}`);
41058
+ }
41059
+ const issues = { warnings: [], errors: [] };
41060
+ const config = Object.fromEntries(sections.map((name) => [name, SECTION_PARSERS[name](parsed, issues)]));
41061
+ if (issues.errors.length) {
41062
+ throw new Error(`One or more mandatory settings were missing from the configuration file.
41063
+ ${issues.errors.join('\n')}`);
41064
+ }
41065
+ else if (issues.warnings.length) {
41066
+ console.warn(`One or more unexpected settings were encountered in the configuration file.
41067
+ ${issues.warnings.join('\n')}`);
41068
+ }
41069
+ globalConfig = config.global ?? null;
41070
+ themeConfig = config.theme ?? null;
41071
+ mapConfig = config.map ?? null;
41072
+ searchConfig = config.search ?? null;
41073
+ metadataQualityConfig = config.metadataQuality ?? null;
41074
+ editorConfig = config.editor ?? null;
41075
+ customTranslations = config.translations ?? {};
41076
+ appConfigLoaded = true;
41077
+ return parsed;
41078
+ });
41079
+ }
41080
+ function isConfigLoaded() {
41081
+ return appConfigLoaded;
41082
+ }
41083
+ function _reset() {
41084
+ globalConfig = null;
41085
+ themeConfig = null;
41086
+ mapConfig = null;
41087
+ searchConfig = null;
41088
+ metadataQualityConfig = null;
41089
+ editorConfig = null;
41090
+ customTranslations = null;
41091
+ appConfigLoaded = false;
41092
+ }
41093
+ const TRANSLATE_WITH_OVERRIDES_CONFIG = {
41094
+ compiler: {
41095
+ provide: TranslateCompiler,
41096
+ useClass: TranslateMessageFormatCompiler,
41097
+ },
41098
+ loader: [
41099
+ {
41100
+ provide: TRANSLATE_HTTP_LOADER_CONFIG,
41101
+ useValue: {
41102
+ prefix: './assets/i18n/',
41103
+ suffix: '.json',
41104
+ },
41105
+ },
41106
+ {
41107
+ provide: TranslateLoader,
41108
+ useClass: FileWithOverridesTranslateLoader,
41109
+ deps: [HttpClient, TRANSLATE_HTTP_LOADER_CONFIG],
41110
+ },
41111
+ ],
41112
+ };
41113
+
41114
+ const okAppConfigFixture = () => `
41115
+ [global]
41116
+ geonetwork4_api_url = "/geonetwork/srv/api"
41117
+ proxy_path = "/proxy/?url="
41118
+ metadata_language = "fre"
41119
+ login_url = "/cas/login?service="
41120
+ logout_url = "/geonetwork/signout"
41121
+ settings_url = "/geonetwork/settings"
41122
+ web_component_embedder_url = "/datahub/wc-embedder.html"
41123
+
41124
+ [map]
41125
+ max_zoom = 10
41126
+ max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
41127
+ do_not_use_default_basemap = false
41128
+ external_viewer_url_template = 'https://example.com/myviewer?'
41129
+ external_viewer_open_new_tab = true
41130
+ [[map_layer]]
41131
+ type = "wms"
41132
+ url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
41133
+ name = "masque_hdf_ign_carto_latin1"
41134
+ [[map_layer]]
41135
+ type = "wfs"
41136
+ url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
41137
+ name = "masque_hdf_ign_carto_latin1"
41138
+
41139
+ [theme]
41140
+ primary_color = "#093564"
41141
+ secondary_color = "#c2e9dc"
41142
+ main_color = "#212029" # All-purpose text color
41143
+ background_color = "#fdfbff"
41144
+ thumbnail_placeholder = 'assets/img/placeholder.svg'
41145
+ header_background = 'teal'
41146
+ header_foreground_color = "#872e2e"
41147
+ main_font = 'sans-serif'
41148
+ title_font = 'serif'
41149
+ fonts_stylesheet_url = "https://fonts.googleapis.com/css2?family=Open+Sans"
41150
+
41151
+ [search]
41152
+ record_kind_quick_filter = false
41153
+ filter_geometry_url = 'https://my.domain.org/geom.json'
41154
+ do_not_use_default_search_preset = false
41155
+ geocoding_provider = "geoplateforme"
41156
+ geocoding_provider_options.index = "poi"
41157
+ geocoding_provider_options.category = "administratif"
41158
+ geocoding_provider_options.limit = 5
41159
+ geocoding_provider_labels.main = '/properties/name/0'
41160
+ geocoding_provider_labels.secondary = '/properties/citycode/0'
41161
+ geocoding_provider_labels.tertiary = '/properties/category/1'
41162
+ advanced_filters = ['publicationYear', 'documentStandard', 'inspireKeyword', 'topic', 'license', 'myOrg:firstCustomFilter', 'myOrg:secondCustomFilter']
41163
+
41164
+ [[custom_filter]]
41165
+ name = 'myOrg:firstCustomFilter'
41166
+ base_filter = 'keyword'
41167
+ exclude_values = ['my keyword 1', 'my keyword 2']
41168
+ label_key = 'myOrg.firstCustomFilter'
41169
+
41170
+ [[custom_filter]]
41171
+ name = 'myOrg:secondCustomFilter'
41172
+ base_filter = 'keyword'
41173
+ include_values = ['my keyword 3', 'my keyword 4']
41174
+ label_key = 'myOrg.secondCustomFilter'
41175
+
41176
+ [[search_preset]]
41177
+ sort = "-createDate"
41178
+ name = 'filterByOrgs'
41179
+ filters.q = 'Carto'
41180
+ filters.organisation = ['Org1', 'Org2']
41181
+ filters.format = ['ESRI Shapefile']
41182
+ filters.topic = ['boundaries']
41183
+ filters.publicationYear = ['2023', '2022']
41184
+ filters.spatial = ['yes']
41185
+
41186
+ [translations.en]
41187
+ "my.first.key" = 'First label.'
41188
+ "my.second.key" = """
41189
+ Second label,
41190
+ on two lines."""
41191
+
41192
+ [translations.de]
41193
+ my.first.key = 'Erste Etikett.'
41194
+
41195
+ [translations.fr]
41196
+ my.sample.text = "Un bon exemple de texte."
41197
+ "my.quoted.text" = 'du texte entre guillements.'
41198
+ `;
41199
+ const appConfigWithTranslationFixture = () => okAppConfigFixture();
41200
+ const minimalAppConfigFixture = () => `
41201
+ [global]
41202
+ geonetwork4_api_url = "/geonetwork/srv/api"
41203
+ proxy_path = "/proxy/?url="
41204
+
41205
+ [theme]
41206
+ primary_color = "#093564"
41207
+ secondary_color = "#c2e9dc"
41208
+ main_color = "#212029" # All-purpose text color
41209
+ background_color = "#fdfbff"
41210
+ `;
41211
+ const customFilterMissingMandatoryConfigFixture = () => `
41212
+ [global]
41213
+ geonetwork4_api_url = "/geonetwork/srv/api"
41214
+
41215
+ [theme]
41216
+ primary_color = "#093564"
41217
+ secondary_color = "#c2e9dc"
41218
+ main_color = "#212029" # All-purpose text color
41219
+ background_color = "#fdfbff"
41220
+
41221
+ [search]
41222
+ advanced_filters = ['myOrg:firstCustomFilter']
41223
+
41224
+ [[custom_filter]]
41225
+ name = 'myOrg:firstCustomFilter'
41226
+ `;
41227
+ const mapConfigFixture = () => ({
41228
+ MAX_ZOOM: 10,
41229
+ MAX_EXTENT: [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855],
41230
+ DO_NOT_USE_DEFAULT_BASEMAP: false,
41231
+ DO_NOT_TILE_WMS: false,
41232
+ EXTERNAL_VIEWER_URL_TEMPLATE: 'https://example.com/myviewer/#/?actions=[{"type":"CATALOG:ADD_LAYERS_FROM_CATALOGS","layers":["${layer_name}"],"sources":[{"url":"${service_url}","type":"${service_type}"}]}]',
41233
+ EXTERNAL_VIEWER_OPEN_NEW_TAB: true,
41234
+ MAP_LAYERS: [
41235
+ {
41236
+ TYPE: 'xyz',
41237
+ URL: 'https://some-basemap-server',
41238
+ },
41239
+ {
41240
+ TYPE: 'wms',
41241
+ URL: 'https://some-wms-server',
41242
+ NAME: 'some_layername',
41243
+ },
41244
+ {
41245
+ TYPE: 'wfs',
41246
+ URL: 'https://some-wfs-server',
41247
+ NAME: 'some_layername',
41248
+ },
41249
+ ],
41250
+ });
41251
+ const malformedConfigFixture = () => `
41252
+ {
41253
+ "I thought": "we were still doing json"
41254
+ }
41255
+ `;
41256
+ const missingMandatoryConfigFixture = () => `
41257
+ [theme]
41258
+ primary_color = "#093564"
41259
+ secondary_color = "#c2e9dc"
41260
+ background_color = "#fdfbff"
41261
+ main_font = 'sans-serif'
41262
+ `;
41263
+ const wrongLanguageCodeConfigFixture = () => `
41264
+ [global]
41265
+ geonetwork4_api_url = "/geonetwork/srv/api"
41266
+ proxy_path = "/proxy/?url="
41267
+ metadata_language = "abc"
41268
+
41269
+ [map]
41270
+
41271
+ [theme]
41272
+ primary_color = "#093564"
41273
+ secondary_color = "#c2e9dc"
41274
+ main_color = "#212029" # All-purpose text color
41275
+ background_color = "#fdfbff"
41276
+ `;
41277
+ const unrecognizedKeysConfigFixture = () => `
41278
+ [global]
41279
+ geonetwork4_api_url = "/geonetwork/srv/api"
41280
+ proxy_path = "/proxy/?url="
41281
+ metadata_language = "fre"
41282
+ another_path = '/whatever'
41283
+
41284
+ [map]
41285
+ max_zoom = 10
41286
+ max_extent = [-418263.418776, 5251529.591305, 961272.067714, 6706890.609855]
41287
+ do_not_use_default_basemap = false
41288
+ external_viewer_url_template = 'https://example.com/myviewer?'
41289
+ external_viewer_open_new_tab = true
41290
+ another_zoom = 15
41291
+ [[map_layer]]
41292
+ type = "wms"
41293
+ url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
41294
+ name = "masque_hdf_ign_carto_latin1"
41295
+ [[map_layer]]
41296
+ type = "wfs"
41297
+ url = "https://www.geo2france.fr/geoserver/cr_hdf/ows"
41298
+ name = "masque_hdf_ign_carto_latin1"
41299
+ another_layer = "wrong layer definition"
41300
+
41301
+ [theme]
41302
+ primary_color = "#093564"
41303
+ secondary_color = "#c2e9dc"
41304
+ main_color = "#212029" # All-purpose text color
41305
+ background_color = "#fdfbff"
41306
+ thumbnail_placeholder = 'assets/img/placeholder.svg'
41307
+ header_background = 'teal'
41308
+ header_foreground_color = "#872e2e"
41309
+ main_font = 'sans-serif'
41310
+ title_font = 'serif'
41311
+ another_color = 'red'
41312
+ `;
41313
+
41314
+ function getMapContextLayerFromConfig(config) {
41315
+ switch (config.TYPE) {
41316
+ case 'wms':
41317
+ return {
41318
+ type: 'wms',
41319
+ url: config.URL,
41320
+ name: config.NAME,
41321
+ };
41322
+ case 'wfs':
41323
+ return {
41324
+ type: 'wfs',
41325
+ url: config.URL,
41326
+ featureType: config.NAME,
41327
+ };
41328
+ case 'xyz':
41329
+ return {
41330
+ type: config.TYPE,
41331
+ url: config.URL,
41332
+ };
41333
+ case 'geojson':
41334
+ return {
41335
+ type: config.TYPE,
41336
+ ...(config.DATA ? { data: config.DATA } : { url: config.URL }),
41337
+ };
41338
+ case 'maplibre-style':
41339
+ return {
41340
+ type: config.TYPE,
41341
+ styleUrl: config.STYLE_URL,
41342
+ accessToken: config.ACCESS_TOKEN,
41343
+ };
41344
+ }
41345
+ }
41346
+
40937
41347
  const CHART_TYPE_VALUES = [
40938
41348
  'bar',
40939
41349
  'bar-horizontal',
@@ -40949,5 +41359,5 @@ const CHART_TYPE_VALUES = [
40949
41359
  * Generated bundle index. Do not edit.
40950
41360
  */
40951
41361
 
40952
- export { ADD_RESULTS, ADD_SEARCH, AVAILABLE_LICENSES, AbstractAction, AbstractSearchField, ActionMenuComponent, AddLayerFromCatalogComponent, AddLayerRecordPreviewComponent, AddResults, AddSearch, AnchorLinkDirective, ApiCardComponent, ApplicationBannerComponent, AuthService, AutocompleteComponent, AutofocusDirective, AvailableServicesField, AvatarComponent, AvatarServiceInterface, BASEMAP_LAYERS, BadgeComponent, BaseConverter, BaseFileReader, BaseReader, BlockListComponent, BoundingBoxSearchField, ButtonComponent, CHART_TYPE_VALUES, CLEAR_ERROR, CLEAR_RESULTS, CarouselComponent, CatalogTitleComponent, CellPopinComponent, ChartComponent, ChartViewComponent, CheckToggleComponent, CheckboxComponent, ClearError, ClearResults, ColorScaleComponent, ConfirmationDialogComponent, ContactDetailsComponent, ContactDetailsFormComponent, ContactPillComponent, ContentGhostComponent, CopyTextButtonComponent, DEFAULT_BASEMAP_LAYER, DEFAULT_CONFIGURATION, DEFAULT_GN4_LOGIN_URL, DEFAULT_GN4_LOGOUT_URL, DEFAULT_GN4_SETTINGS_URL, DEFAULT_LANG, DEFAULT_PAGE_SIZE, DEFAULT_RECORD_CONVERTER, DEFAULT_RESULTS_LAYOUT_CONFIG, DEFAULT_SEARCH_KEY, DEFAULT_SPATIAL_EXTENT_STYLE, DISABLE_AUTH, DISABLE_DRAFT, DO_NOT_USE_DEFAULT_BASEMAP, DataService, DataTableComponent, DataViewComponent, DataViewPermalinkComponent, DataViewShareComponent, DataViewWebComponentComponent, DatePickerComponent, DateRangeDropdownComponent, DateRangeInputsComponent, DateRangePickerComponent, DateRangeSearchField, DateService, DcatApConverter, DefaultRouterModule, DownloadItemComponent, DownloadsListComponent, DragAndDropFileInputComponent, DropdownMultiselectComponent, DropdownSelectorComponent, EDITOR_FEATURE_KEY, ES_QUERY_FIELDS_PRIORITY, ES_RESOURCES_VALUES, ES_SOURCE_SUMMARY, EXTERNAL_VIEWER_OPEN_NEW_TAB, EXTERNAL_VIEWER_URL_TEMPLATE, EditableLabelDirective, EditorFacade, EditorService, ElasticsearchService, ErrorComponent, ErrorType, ExpandablePanelButtonComponent, ExpandablePanelComponent, ExternalLinkCardComponent, ExternalViewerButtonComponent, FIELDS_BRIEF, FIELDS_SUMMARY, FILTER_GEOMETRY, FILTER_SUMMARY_IGNORE_LIST, FORMATS, FacetBlockComponent, FacetItemComponent, FacetListComponent, FacetsContainerComponent, FavoriteStarComponent, FavoritesService, FeatureCatalogListComponent, FeatureDetailComponent, FeatureEditorModule, FeatureMapModule, FeatureRecordModule, FeatureSearchModule, FetchError, FieldFocusDirective, FieldsService, FigureComponent, FigureContainerComponent, FileInputComponent, FileTranslateLoader, FilesDropDirective, FilterDropdownComponent, FormFieldArrayComponent, FormFieldComponent, FormFieldDateComponent, FormFieldFileComponent, FormFieldKeywordsComponent, FormFieldLicenseComponent, FormFieldObjectComponent, FormFieldRichComponent, FormFieldSimpleComponent, FormFieldSpatialExtentComponent, FormFieldTemporalExtentsComponent, FormFieldTopicsComponent, FormFieldWrapperComponent, FullTextSearchField, FuzzySearchComponent, GEOCODING_PROVIDER, GEONETWORK_UI_TAG_NAME, GEONETWORK_UI_VERSION, GeoDataBadgeComponent, GeoTableViewComponent, GeocodingService, GeojsonReader, Gn4Converter, Gn4PlatformMapper, Gn4PlatformService, Gn4Repository, Gn4SettingsService, GnUiHumanizeDateDirective, GpfApiDlComponent, GravatarService, I18nInterceptor, ISO_TOPICS, ImageFallbackDirective, ImageInputComponent, ImageOverlayPreviewComponent, ImportRecordComponent, InlineFilterComponent, InteractiveTableColumnComponent, InteractiveTableComponent, InternalLinkCardComponent, IsSpatialSearchField, Iso191153Converter, Iso19139Converter, KeywordBadgeComponent, KindBadgeComponent, LANGUAGES_LIST, LANGUAGE_NAMES, LANGUAGE_STORAGE_KEY, LANG_2_TO_3_MAPPER, LOGIN_URL, LOGOUT_URL, LONLAT_CRS_CODES, LanguageSwitcherComponent, LayersPanelComponent, LicenseSearchField, LinkClassifierService, LinkUsage, LoadingMaskComponent, LocationSearchComponent, LogService, MAP_FEATURE_KEY, MAP_VIEW_CONSTRAINTS, MAX_UPLOAD_SIZE_MB, METADATA_LANGUAGE, MapContainerComponent, MapFacade, MapLegendComponent, MapStateContainerComponent, MapStyleService, MapUtilsService, MapViewComponent, MarkdownEditorComponent, MarkdownParserComponent, MaxLinesComponent, mdview_actions as MdViewActions, MdViewFacade, MetadataCatalogComponent, MetadataContactComponent, MetadataDoiComponent, MetadataInfoComponent, MetadataLinkType, MetadataMapperContext, MetadataQualityComponent, MetadataQualityItemComponent, MetadataQualityPanelComponent, ModalDialogComponent, MultilingualPanelComponent, MultilingualSearchField, MyOrgService, NAMESPACES, NOT_APPLICABLE_CONSTRAINT, NOT_KNOWN_CONSTRAINT, NotificationComponent, NotificationsContainerComponent, NotificationsService, OPEN_DATA_LICENSE, ORGANIZATIONS_STRATEGY, ORGANIZATION_PAGE_URL_TOKEN, ORGANIZATION_URL_TOKEN, OnlineResourceCardComponent, OnlineServiceResourceInputComponent, OrganisationPreviewComponent, OrganisationsComponent, OrganisationsFilterComponent, OrganisationsResultComponent, OrganizationSearchField, OrganizationsFromGroupsService, OrganizationsFromMetadataService, OrganizationsServiceInterface, OwnerSearchField, PAGINATE, PARSE_DELIMITER, PATCH_RESULTS_AGGREGATIONS, PROXY_PATH, Paginate, PaginationButtonsComponent, PaginationComponent, PaginationDotsComponent, PatchResultsAggregations, PlatformServiceInterface, PopoverComponent, PopupAlertComponent, PossibleResourceTypes, PossibleResourceTypesDefinition, PreviousNextButtonsComponent, ProgressBarComponent, ProxyService, QUERY_FIELDS, RECORD_DATASET_URL_TOKEN, RECORD_REUSE_URL_TOKEN, RECORD_SERVICE_URL_TOKEN, REQUEST_MORE_ON_AGGREGATION, REQUEST_MORE_RESULTS, REQUEST_NEW_RESULTS, RESULTS_LAYOUT_CONFIG, REUSE_LIGHT_CONFIGURATION, ROUTER_CONFIG, ROUTER_ROUTE_DATASET, ROUTER_ROUTE_ORGANIZATION, ROUTER_ROUTE_REUSE, ROUTER_ROUTE_SEARCH, ROUTER_ROUTE_SERVICE, ROUTER_STATE_KEY, ROUTE_PARAMS, RecordApiFormComponent, RecordFormComponent, RecordKindField, RecordMetaComponent, RecordMetricComponent, RecordPreviewCardComponent, RecordPreviewComponent, RecordPreviewFeedComponent, RecordPreviewListComponent, RecordPreviewRowComponent, RecordPreviewTextComponent, RecordPreviewTitleComponent, RecordStatusValues, RecordsMetricsComponent, RecordsRepositoryInterface, RecordsService, RequestMoreOnAggregation, RequestMoreResults, RequestNewResults, ResourceCreationRevisionDateSearchField, ResourceTypeLegacyField, ResultsHitsContainerComponent, ResultsHitsNumberComponent, ResultsHitsSearchKindComponent, ResultsLayoutComponent, ResultsLayoutConfigItem, ResultsListComponent, ResultsListContainerComponent, ResultsListItemComponent, ResultsTableComponent, ResultsTableContainerComponent, ReusePresentationForms, RoleLabels, RoleValues, RouterEffects, RouterFacade, RouterService, SEARCH_FEATURE_KEY, SETTINGS_URL, SET_CONFIG_AGGREGATIONS, SET_CONFIG_FILTERS, SET_CONFIG_REQUEST_FIELDS, SET_ERROR, SET_FAVORITES_ONLY, SET_FILTERS, SET_INCLUDE_ON_AGGREGATION, SET_PAGE_SIZE, SET_RESULTS_AGGREGATIONS, SET_RESULTS_HITS, SET_RESULTS_LAYOUT, SET_SEARCH, SET_SORT_BY, SET_SPATIAL_FILTER_ENABLED, SPATIAL_SCOPES, SearchEffects, SearchFacade, SearchFeatureCatalogComponent, SearchFiltersSummaryComponent, SearchFiltersSummaryItemComponent, SearchInputComponent, SearchRouterContainerDirective, SearchService, SearchStateContainerDirective, SelectionService, ServiceCapabilitiesComponent, SetConfigAggregations, SetConfigFilters, SetConfigRequestFields, SetError, SetFavoritesOnly, SetFilters, SetIncludeOnAggregation, SetPageSize, SetResultsAggregations, SetResultsHits, SetResultsLayout, SetSearch, SetSortBy, SetSpatialFilterEnabled, SimpleSearchField, SiteTitleComponent, SortByComponent, SortByEnum, SortableListComponent, SourceLabelComponent, SourcesService, SpatialExtentComponent, SpatialExtentDropdownComponent, SpinningLoaderComponent, StacItemsResultGridComponent, StacViewComponent, StarToggleComponent, StickyHeaderComponent, SupportedTypes, SwitchToggleComponent, THUMBNAIL_PLACEHOLDER, TRANSLATE_DEBUG_CONFIG, TRANSLATE_DEFAULT_CONFIG, TRANSLATE_WITH_OVERRIDES_CONFIG, TableViewComponent, TextAreaComponent, TextInputComponent, ThemeService, ThumbnailComponent, TranslatedSearchField, TruncatedTextComponent, UPDATE_CONFIG_AGGREGATIONS, UPDATE_FILTERS, UPDATE_REQUEST_AGGREGATION_TERM, UpdateConfigAggregations, UpdateFilters, UrlInputComponent, UserFeedbackItemComponent, UserPreviewComponent, UserSearchField, VECTOR_STYLE_DEFAULT, ViewportIntersectorComponent, WEB_COMPONENT_EMBEDDER_URL, XmlParseError, _reset, allChildrenElement, appConfigWithTranslationFixture, appendChildTree, appendChildren, assertValidXml, associationTypeValues, bboxToPolygon, blockModelFixture, bytesToMegabytes, canEditRecord, checkFileFormat, clearSelectedFeatures, createChild, createDocument, createElement, createFuzzyFilter, createNestedChild, createNestedElement, createSpatialExtentLayer, currentPage, defaultMapStyleFixture, defaultMapStyleHlFixture, downgradeImage, downsizeImage, draftSaveSuccess, dragPanCondition, dropEmptyTranslations, editorReducer, emptyBlockModelFixture, findChildElement, findChildOrCreate, findChildrenElement, findConverterForDocument, findNestedChildOrCreate, findNestedElement, findNestedElements, findParent, firstChildElement, formatDate, formatUserInfo, getAddressLines, getAllKeysValidator, getArrayItem, getAsArray, getAsUrl, getBadgeColor, getCustomTranslations, getError, getFavoritesOnly, getFileFormat, getFileFormatFromServiceOutput, getFirstValue, getFormatPriority, getGeometryBoundingBox, getGeometryFromGeoJSON, getGlobalConfig, getIndividualDisplayName, getIsMobile, getJsonDataItemsProxy, getKeywordHierarchyPath, getLayers, getLinkId, getLinkLabel, getLinkPriority, getMapContext, getMapContextLayerFromConfig, getMapState, getMetadataQualityConfig, getMimeTypeForFormat, getNamespace, getOptionalEditorConfig, getOptionalMapConfig, getOptionalSearchConfig, getPageSize, getQualityValidators, getResourceType, getReusePresentationForm, getReuseType, getRootElement, getSearchConfigAggregations, getSearchFilters, getSearchResults, getSearchResultsAggregations, getSearchResultsHits, getSearchResultsLayout, getSearchResultsLoading, getSearchSortBy, getSearchState, getSearchStateSearch, getSelectedFeatures, getSpatialFilterEnabled, getTemporalRangeUnion, getThemeConfig, handleScrollOnNavigation, hasRecordChangedSinceDraft, hasRecordChangedSinceDraftSuccess, initSearch, initialEditorState, initialMapState, initialState, isBoundingBox, isBoundingBoxWithinWorldExtent, isConfigLoaded, isDateRange, isFileExtensionValid, isFormatInQueryParam, isPublished, itemModelFixture, kindToCodeListValue, loadAppConfig, malformedConfigFixture, mapConfigFixture, mapContact, mapKeywords, mapLogo, mapOrganization, mapReducer, markRecordAsChanged, matchesNoApplicableConstraint, matchesNoKnownConstraint, megabytesToBytes, mimeTypeToFormat, minimalAppConfigFixture, missingMandatoryConfigFixture, mouseWheelZoomCondition, noDuplicateFileName, okAppConfigFixture, openDataset, openRecord, organizationsServiceFactory, parse, parseXmlString, placeholder, prioritizePageScroll, propagateToDocumentOnly, provideGn4, provideI18n, provideLocalizedDateAdapter, provideRepositoryUrl, readAttribute, readDataset, readDatasetHeaders, readFileAsText, readText, reducer$2 as reducer, reducerSearch, removeAllChildren, removeChildren, removeChildrenByName, removeSearchParams, removeWhitespace, renameElements, saveRecord, saveRecordFailure, saveRecordSuccess, selectCanEditRecord, selectCurrentPage, selectEditorConfig, selectEditorState, selectFallback, selectFallbackFields, selectField, selectHasRecordChanged, selectIsPublished, selectRecord, selectRecordChangedSinceSave, selectRecordSaveError, selectRecordSaving, selectRecordSections, selectRecordSource, selectTranslatedField, selectTranslatedValue, setContext, setCurrentPage, setEditorConfiguration, setFieldVisibility, setFocusedField, setSelectedFeatures, setTextContent, sortByFromString, sortByToString, sortByToStrings, spatialExtentToGeometry, spatialExtentsToFeatureCollection, stripHtml, stripNamespace, toDate, toIndividual, toLang2, toLang3, totalPages, undoRecordDraft, unrecognizedKeysConfigFixture, updateFrequencyCodeValues, updateLanguages, updateRecordField, updateRecordLanguages, wmsLayerFlatten, writeAttribute, wrongLanguageCodeConfigFixture, xmlToString };
41362
+ export { ADD_RESULTS, ADD_SEARCH, AVAILABLE_LICENSES, AbstractAction, AbstractSearchField, ActionMenuComponent, AddLayerFromCatalogComponent, AddLayerRecordPreviewComponent, AddResults, AddSearch, AnchorLinkDirective, ApiCardComponent, ApplicationBannerComponent, AuthService, AutocompleteComponent, AutofocusDirective, AvailableServicesField, AvatarComponent, AvatarServiceInterface, BASEMAP_LAYERS, BadgeComponent, BaseConverter, BaseFileReader, BaseReader, BlockListComponent, BoundingBoxSearchField, ButtonComponent, CHART_TYPE_VALUES, CLEAR_ERROR, CLEAR_RESULTS, CUSTOM_FIELDS, CarouselComponent, CatalogTitleComponent, CellPopinComponent, ChartComponent, ChartViewComponent, CheckToggleComponent, CheckboxComponent, ClearError, ClearResults, ColorScaleComponent, ConfirmationDialogComponent, ContactDetailsComponent, ContactDetailsFormComponent, ContactPillComponent, ContentGhostComponent, CopyTextButtonComponent, DEFAULT_BASEMAP_LAYER, DEFAULT_CONFIGURATION, DEFAULT_GEOCODING_PROVIDER, DEFAULT_GN4_LOGIN_URL, DEFAULT_GN4_LOGOUT_URL, DEFAULT_GN4_SETTINGS_URL, DEFAULT_LANG, DEFAULT_PAGE_SIZE, DEFAULT_RECORD_CONVERTER, DEFAULT_RESULTS_LAYOUT_CONFIG, DEFAULT_SEARCH_KEY, DEFAULT_SPATIAL_EXTENT_STYLE, DISABLE_AUTH, DISABLE_DRAFT, DO_NOT_USE_DEFAULT_BASEMAP, DataService, DataTableComponent, DataViewComponent, DataViewPermalinkComponent, DataViewShareComponent, DataViewWebComponentComponent, DatePickerComponent, DateRangeDropdownComponent, DateRangeInputsComponent, DateRangePickerComponent, DateRangeSearchField, DateService, DcatApConverter, DefaultRouterModule, DownloadItemComponent, DownloadsListComponent, DragAndDropFileInputComponent, DropdownMultiselectComponent, DropdownSelectorComponent, EDITOR_FEATURE_KEY, ES_QUERY_FIELDS_PRIORITY, ES_RESOURCES_VALUES, ES_SOURCE_SUMMARY, EXTERNAL_VIEWER_OPEN_NEW_TAB, EXTERNAL_VIEWER_URL_TEMPLATE, EditableLabelDirective, EditorFacade, EditorService, ElasticsearchService, ErrorComponent, ErrorType, ExpandablePanelButtonComponent, ExpandablePanelComponent, ExternalLinkCardComponent, ExternalViewerButtonComponent, FIELDS_BRIEF, FIELDS_SUMMARY, FILTER_GEOMETRY, FILTER_SUMMARY_IGNORE_LIST, FORMATS, FacetBlockComponent, FacetItemComponent, FacetListComponent, FacetsContainerComponent, FavoriteStarComponent, FavoritesService, FeatureCatalogListComponent, FeatureDetailComponent, FeatureEditorModule, FeatureMapModule, FeatureRecordModule, FeatureSearchModule, FetchError, FieldFocusDirective, FieldsService, FigureComponent, FigureContainerComponent, FileInputComponent, FileTranslateLoader, FilesDropDirective, FilterDropdownComponent, FormFieldArrayComponent, FormFieldComponent, FormFieldDateComponent, FormFieldFileComponent, FormFieldKeywordsComponent, FormFieldLicenseComponent, FormFieldObjectComponent, FormFieldRichComponent, FormFieldSimpleComponent, FormFieldSpatialExtentComponent, FormFieldTemporalExtentsComponent, FormFieldTopicsComponent, FormFieldWrapperComponent, FullTextSearchField, FuzzySearchComponent, GEOCODING_PROVIDER, GEOCODING_PROVIDER_LABELS, GEONETWORK_UI_TAG_NAME, GEONETWORK_UI_VERSION, GeoDataBadgeComponent, GeoTableViewComponent, GeocodingService, GeojsonReader, Gn4Converter, Gn4PlatformMapper, Gn4PlatformService, Gn4Repository, Gn4SettingsService, GnUiHumanizeDateDirective, GpfApiDlComponent, GravatarService, I18nInterceptor, ISO_TOPICS, ImageFallbackDirective, ImageInputComponent, ImageOverlayPreviewComponent, ImportRecordComponent, InlineFilterComponent, InteractiveTableColumnComponent, InteractiveTableComponent, InternalLinkCardComponent, IsSpatialSearchField, Iso191153Converter, Iso19139Converter, KeywordBadgeComponent, KindBadgeComponent, LANGUAGES_LIST, LANGUAGE_NAMES, LANGUAGE_STORAGE_KEY, LANG_2_TO_3_MAPPER, LOGIN_URL, LOGOUT_URL, LONLAT_CRS_CODES, LanguageSwitcherComponent, LayersPanelComponent, LicenseSearchField, LinkClassifierService, LinkUsage, LoadingMaskComponent, LocationSearchComponent, LogService, MAP_FEATURE_KEY, MAP_VIEW_CONSTRAINTS, MAX_UPLOAD_SIZE_MB, METADATA_LANGUAGE, MapContainerComponent, MapFacade, MapLegendComponent, MapStateContainerComponent, MapUtilsService, MapViewComponent, MarkdownEditorComponent, MarkdownParserComponent, MaxLinesComponent, mdview_actions as MdViewActions, MdViewFacade, MetadataCatalogComponent, MetadataContactComponent, MetadataDoiComponent, MetadataInfoComponent, MetadataLinkType, MetadataMapperContext, MetadataQualityComponent, MetadataQualityItemComponent, MetadataQualityPanelComponent, ModalDialogComponent, MultilingualPanelComponent, MultilingualSearchField, MyOrgService, NAMESPACES, NOT_APPLICABLE_CONSTRAINT, NOT_KNOWN_CONSTRAINT, NotificationComponent, NotificationsContainerComponent, NotificationsService, OPEN_DATA_LICENSE, ORGANIZATIONS_STRATEGY, ORGANIZATION_PAGE_URL_TOKEN, ORGANIZATION_URL_TOKEN, OnlineResourceCardComponent, OnlineServiceResourceInputComponent, OrganisationPreviewComponent, OrganisationsComponent, OrganisationsFilterComponent, OrganisationsResultComponent, OrganizationSearchField, OrganizationsFromGroupsService, OrganizationsFromMetadataService, OrganizationsServiceInterface, OwnerSearchField, PAGINATE, PARSE_DELIMITER, PATCH_RESULTS_AGGREGATIONS, PROXY_PATH, Paginate, PaginationButtonsComponent, PaginationComponent, PaginationDotsComponent, PatchResultsAggregations, PlatformServiceInterface, PopoverComponent, PopupAlertComponent, PossibleResourceTypes, PossibleResourceTypesDefinition, PreviousNextButtonsComponent, ProgressBarComponent, ProxyService, QUERY_FIELDS, RECORD_DATASET_URL_TOKEN, RECORD_REUSE_URL_TOKEN, RECORD_SERVICE_URL_TOKEN, REQUEST_MORE_ON_AGGREGATION, REQUEST_MORE_RESULTS, REQUEST_NEW_RESULTS, RESULTS_LAYOUT_CONFIG, REUSE_LIGHT_CONFIGURATION, ROUTER_CONFIG, ROUTER_ROUTE_DATASET, ROUTER_ROUTE_ORGANIZATION, ROUTER_ROUTE_REUSE, ROUTER_ROUTE_SEARCH, ROUTER_ROUTE_SERVICE, ROUTER_STATE_KEY, ROUTE_PARAMS, RecordApiFormComponent, RecordFormComponent, RecordKindField, RecordMetaComponent, RecordMetricComponent, RecordPreviewCardComponent, RecordPreviewComponent, RecordPreviewFeedComponent, RecordPreviewListComponent, RecordPreviewRowComponent, RecordPreviewTextComponent, RecordPreviewTitleComponent, RecordStatusValues, RecordsMetricsComponent, RecordsRepositoryInterface, RecordsService, RequestMoreOnAggregation, RequestMoreResults, RequestNewResults, ResourceCreationRevisionDateSearchField, ResourceTypeLegacyField, ResultsHitsContainerComponent, ResultsHitsNumberComponent, ResultsHitsSearchKindComponent, ResultsLayoutComponent, ResultsLayoutConfigItem, ResultsListComponent, ResultsListContainerComponent, ResultsListItemComponent, ResultsTableComponent, ResultsTableContainerComponent, ReusePresentationForms, RoleLabels, RoleValues, RouterEffects, RouterFacade, RouterService, SEARCH_FEATURE_KEY, SETTINGS_URL, SET_CONFIG_AGGREGATIONS, SET_CONFIG_FILTERS, SET_CONFIG_REQUEST_FIELDS, SET_ERROR, SET_FAVORITES_ONLY, SET_FILTERS, SET_INCLUDE_ON_AGGREGATION, SET_PAGE_SIZE, SET_RESULTS_AGGREGATIONS, SET_RESULTS_HITS, SET_RESULTS_LAYOUT, SET_SEARCH, SET_SORT_BY, SET_SPATIAL_FILTER_ENABLED, SPATIAL_EXTENT_MAX_FILE_SIZE, SPATIAL_SCOPES, SearchEffects, SearchFacade, SearchFeatureCatalogComponent, SearchFiltersSummaryComponent, SearchFiltersSummaryItemComponent, SearchInputComponent, SearchRouterContainerDirective, SearchService, SearchStateContainerDirective, SelectionService, ServiceCapabilitiesComponent, SetConfigAggregations, SetConfigFilters, SetConfigRequestFields, SetError, SetFavoritesOnly, SetFilters, SetIncludeOnAggregation, SetPageSize, SetResultsAggregations, SetResultsHits, SetResultsLayout, SetSearch, SetSortBy, SetSpatialFilterEnabled, SimpleSearchField, SiteTitleComponent, SortByComponent, SortByEnum, SortableListComponent, SourceLabelComponent, SourcesService, SpatialExtentComponent, SpatialExtentDropdownComponent, SpinningLoaderComponent, StacItemsResultGridComponent, StacViewComponent, StarToggleComponent, StickyHeaderComponent, SupportedTypes, SwitchToggleComponent, THUMBNAIL_PLACEHOLDER, TRANSLATE_DEBUG_CONFIG, TRANSLATE_DEFAULT_CONFIG, TRANSLATE_WITH_OVERRIDES_CONFIG, TableViewComponent, TextAreaComponent, TextInputComponent, ThemeService, ThumbnailComponent, TranslatedSearchField, TruncatedTextComponent, UPDATE_CONFIG_AGGREGATIONS, UPDATE_FILTERS, UPDATE_REQUEST_AGGREGATION_TERM, UpdateConfigAggregations, UpdateFilters, UrlInputComponent, UserFeedbackItemComponent, UserPreviewComponent, UserSearchField, VECTOR_STYLE_DEFAULT, ViewportIntersectorComponent, WEB_COMPONENT_EMBEDDER_URL, XmlParseError, _reset, allChildrenElement, appConfigWithTranslationFixture, appendChildTree, appendChildren, assertValidXml, associationTypeValues, bboxToGeometry, blockModelFixture, bytesToMegabytes, canEditRecord, checkFileFormat, checkMetadataLanguage, checkNewRecordDefaultLanguage, checkNewRecordStandard, clearSelectedFeatures, createChild, createDocument, createElement, createFuzzyFilter, createNestedChild, createNestedElement, createSpatialExtentLayer, currentPage, customFilterMissingMandatoryConfigFixture, downgradeImage, downsizeImage, draftSaveSuccess, dragPanCondition, dropEmptyTranslations, editorReducer, emptyBlockModelFixture, findChildElement, findChildOrCreate, findChildrenElement, findConverterForDocument, findNestedChildOrCreate, findNestedElement, findNestedElements, findParent, firstChildElement, formatDate, formatUserInfo, getAddressLines, getAllKeysValidator, getArrayItem, getAsArray, getAsUrl, getBadgeColor, getCustomTranslations, getError, getFavoritesOnly, getFileFormat, getFileFormatFromServiceOutput, getFirstValue, getFormatPriority, getGeometryBoundingBox, getGeometryFromGeoJSON, getGlobalConfig, getIndividualDisplayName, getIsMobile, getJsonDataItemsProxy, getKeywordHierarchyPath, getLayers, getLinkId, getLinkLabel, getLinkPriority, getMapContext, getMapContextLayerFromConfig, getMapState, getMetadataQualityConfig, getMimeTypeForFormat, getNamespace, getOptionalEditorConfig, getOptionalMapConfig, getOptionalSearchConfig, getPageSize, getQualityValidators, getResourceType, getReusePresentationForm, getReuseType, getRootElement, getSearchConfigAggregations, getSearchFilters, getSearchResults, getSearchResultsAggregations, getSearchResultsHits, getSearchResultsLayout, getSearchResultsLoading, getSearchSortBy, getSearchState, getSearchStateSearch, getSelectedFeatures, getSpatialFilterEnabled, getTemporalRangeUnion, getThemeConfig, handleScrollOnNavigation, hasRecordChangedSinceDraft, hasRecordChangedSinceDraftSuccess, initSearch, initialEditorState, initialMapState, initialState, isBoundingBox, isBoundingBoxWithinWorldExtent, isConfigLoaded, isDateRange, isFileExtensionValid, isFormatInQueryParam, isPublished, itemModelFixture, kindToCodeListValue, loadAppConfig, malformedConfigFixture, mapConfigFixture, mapContact, mapKeywords, mapLogo, mapOrganization, mapReducer, markRecordAsChanged, matchesNoApplicableConstraint, matchesNoKnownConstraint, megabytesToBytes, mimeTypeToFormat, minimalAppConfigFixture, missingMandatoryConfigFixture, mouseWheelZoomCondition, noDuplicateFileName, okAppConfigFixture, openDataset, openRecord, organizationsServiceFactory, parse, parseConfigSection, parseMultiConfigSection, parseTranslationsConfigSection, parseXmlString, placeholder, prioritizePageScroll, propagateToDocumentOnly, provideGn4, provideI18n, provideLocalizedDateAdapter, provideRepositoryUrl, readAttribute, readDataset, readDatasetHeaders, readFileAsText, readText, reducer$2 as reducer, reducerSearch, removeAllChildren, removeChildren, removeChildrenByName, removeSearchParams, removeWhitespace, renameElements, saveRecord, saveRecordFailure, saveRecordSuccess, selectCanEditRecord, selectCurrentPage, selectEditorConfig, selectEditorState, selectFallback, selectFallbackFields, selectField, selectHasRecordChanged, selectIsPublished, selectRecord, selectRecordChangedSinceSave, selectRecordSaveError, selectRecordSaving, selectRecordSections, selectRecordSource, selectTranslatedField, selectTranslatedValue, setContext, setCurrentPage, setEditorConfiguration, setFieldVisibility, setFocusedField, setSelectedFeatures, setTextContent, sortByFromString, sortByToString, sortByToStrings, spatialExtentToGeometry, spatialExtentsToFeatureCollection, stripHtml, stripNamespace, toDate, toIndividual, toLang2, toLang3, totalPages, undoRecordDraft, unrecognizedKeysConfigFixture, updateFrequencyCodeValues, updateLanguages, updateRecordField, updateRecordLanguages, wmsLayerFlatten, writeAttribute, wrongLanguageCodeConfigFixture, xmlToString };
40953
41363
  //# sourceMappingURL=geonetwork-ui.mjs.map